July 24, 2023 at 1:45 pmJD_JNSubscriber
I've set up a journal file in Fluent by 'recording' my actions and was able to execute successfully with zero problems. However, the moment I change the name of the mesh to be read within the journal (I have said mesh in the right folder, and is exactly similar to the mesh used when creating the journal file, just with different number of elements), the journal crashes and fluent throws an error.
Error: cx-name-to-id: cannot find widget: Error Object: "Solid*Frame2*Table3*Frame1"
I have tried changing the names of other files within the journal, and it does so without any issues. Because I tested these out, I now understand that the journal error occurs solely due to using a different mesh file name than the one used to create the journal. There is no access issue, no location mismatch issue, no different kind of mesh issue, nothing.
I have no idea why Fluent journal execution crashes solely when I change the name of the mesh to be read in the journal.
I am at the end of my wits, please help asap!
July 24, 2023 at 2:22 pmFederico Alzamora PrevitaliSubscriber
Does the new mesh have the same topology as the originial mesh? If the surface IDs of the new mesh are different, I suspect this will cause issues, even if these surfaces have the same names.
July 24, 2023 at 4:46 pmJD_JNSubscriber
The overall cell count does differ between the 2 meshes, but not their zones or surfaces or any other feature. It might be worth mentioning that it is a 3D polyhedral mesh, meshed using Fluent meshing.
July 25, 2023 at 6:48 amNickFLSubscriber
In Fluent Meshing, open one of the two meshes. Type: boundary/mange/list into the TUI and see what is listed. Do this for the second mesh and compare the two lists. Are there any faces missing? Are the IDs and the names the same? The element counts and types are obviously going to be different.
July 26, 2023 at 6:56 pmJD_JNSubscriber
July 27, 2023 at 6:40 amNickFLSubscriber
OK, my hypothesis here is that you created your script file using the GUI. My understanding is that when has a popup window that opens, the order that the relevant selection entities (i.e. faces or cells) will be ordered by the ID. Since the ID numbers have changed between the two meshes, the order and possibly the number of these, the GUI will have difficulty reconstructing exactly what you are trying to do.
So what are the solutions? One would be to go into Fluent meshing and rename and renumber the ids exactly how they were in the original script. I am not sure if this can be done in the GUI (if Rob is “listening” in maybe he can let us know). But I know it can be done using scheme. Unfortuantly my memory is not good enough to give you the exact command right now. But this would require a lot of bookkeeping if you have a large number of faces, which it seems you have.
The other approach would be to re-create your script using the TUI commands. Without looking at your script, I would imagine that all the commands using the TUI would let you used any named selections that you have created. This would be much more robust and allow you to import a third, fourth, fifth grid without trouble (if they have the same named selections). Plus, you would get the added benefit of learning the TUI which is a skill too many new users lack.
There is also the new Python approach that I am still trying to learn myself. And depending on what you are trying to accomplish, not all commands are fully integrated into Python. But in those cases where it is not, you could execute those commands using TUI commands (again, that is my understanding).
July 27, 2023 at 10:36 amJD_JNSubscriber
Thank you so much for this!
I’ve managed to find the TUI command to change ids of face zones, which is what I’m trying to do. However, there is now a strange problem.
I tried to change the id of a face zone from being ‘430’ to ‘444’ [based on the comparison of ids between the 2 meshes], but when I do that, fluent meshing throws an error saying “Zone with id 444 already exists”.
However when I ask it for the zone with id ‘444’, it says “Invalid zone”. You can see this here:
I also checked if there were any cell zones with this id, but sadly, I couldn’t find it there either. I’ve hit a brick wall again and have no idea what to do
July 25, 2023 at 9:14 amRobAnsys Employee
GUI journals can do interesting things if you have a panel open/closed when recording and then closed/open when running. TUI journals tend to be more reliable, and PyFluent will replace those in time.
Nick's comments are valid - check the mesh in Fluent in both cases as you may have a relabelled surface/volume due to a change.
July 26, 2023 at 6:59 pmJD_JNSubscriber
Thank you for your valuable inputs.
Could you please explain what you meant by 'having a panel open/closed' ? Which panel are you referring to ?
July 27, 2023 at 10:16 amRobAnsys Employee
I'm always listening..... ;)
The ID numbers in the labels are picked up from the order Fluent Meshing does things, and whilst there may be a way to tag and alter the labels it's risky and not something I'd attempt. Those labels are created as you have many fluid zones with a common boundary. Ie fluid:1 and fluid:2 both have a wall called "mywall"; when moving into Fluent solver you must have a unique wall for each fluid so you'll have mywall:1 and mywall:2 (exact labels will differ and I'm not going to try and figure out the syntax).
So, options. Be more targeted with labels, or create a single fluid label for all zones, or groups of zones if you have rotating/stationary/porous fluids.
TUI scripts would avoid the button error (most panels have an OK or Apply button) and the GUI assumes the panel is open/closed in exactly same way each time. So, if you open the panel, hit record & click OK when you run the journal next time the panel isn't open and it all goes wrong. That's distinct from the label issue.
How many of the surfaces need to be altered from default conditions? You may find reading the new mesh into the existing case (not in Workbench) sets up most/all of what you need.
July 27, 2023 at 10:47 amJD_JNSubscriber
Thanks a million!
You are right in that, the easiest approach would have been for me to simply read the case and replace the mesh. However, I am solving a coupled electrochemical thermal model, with lots of UDFs.
For some unknown reason, after I’ve loaded all the UDFs, when I try to simply read a new mesh onto the existing case file , Fluent throws me a ton of “UDF not found” errors, as can be seen here:
which is why I opted to go for the journal file route instead of me having to write a case file every time for the several cases I need to simulate.
Renaming the boundary zones seems to be quicker, as I only need to rename 16 face zones, but I’ve hit a brick wall there as well, which you can see in my latest reponse to Nick.
July 27, 2023 at 11:19 amRobAnsys Employee
What's at the top of the error list? As it looks to be just one library can you just reload it?
Changing zone IDs can do all sorts of interesting things to the case file!
July 27, 2023 at 12:39 pmJD_JNSubscriber
At the very top of the errors this is what I got:
I followed your advice and after deleting, unloading and reloading the UDFs, the case seems to be fine, but for whatever reason, I couldn't initialze the solution.
So then I tried renaming the case file to a new name and then tried initializing - still didn't work.
Then I closed Fluent, and then loaded the UDFs and the new renamed case file with the replaced mesh, and then tried to initialize it, and voila! The solution is now able to initialize.
I suspect this is just a bug in fluent.
In any case, I am happy to have found a workaround which finally works! Hopefully the results will be as I expected
Thank you very much Rob and Nick! Both of you have saved me a ton of needless repetitive effort and a lot of time !
I have learned a lot from this experience :)
- You must be logged in to reply to this topic.
Boost Ansys Fluent Simulations with AWS
Computational Fluid Dynamics (CFD) helps engineers design products in which the flow of fluid components is a significant challenge. These different use cases often require large complex models to solve on a traditional workstation. Click here to join this event to learn how to leverage Ansys Fluids on the cloud, thanks to Ansys Gateway powered by AWS.
Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- Floating point exception in Fluent
- What are the differences between CFX and Fluent?
- Heat transfer coefficient
- Difference between K-epsilon and K-omega Turbulence Model
- Getting graph and tabular data from result in workbench mechanical
- The solver failed with a non-zero exit code of : 2
- Suppress Fluent to open with GUI while performing in journal file
- Mesh Interfaces in ANSYS FLUENT
- Time Step Size and Courant Number
- error: Received signal SIGSEGV
© 2023 Copyright ANSYS, Inc. All rights reserved.