February 7, 2022 at 8:35 pmvedamaSubscriber
I want to get started on an automated process of adaption on Fluent on a cluster but I want to adapt cells based on how many cells are being marked. Let's say for example, I have 1000 cells and 100 of those cells have a pressure value above 1E+05 Pascal threshold and I only want to mark those for adaption.
In my scripting code, I would iteratively change the pressure threshold to different values until I get 100 cells marked for refinement and use that value as a refinement criterion by entering it in the TUI. I know the commands to modify adaption criterion using TUI and I know I need the *.out file to be able to make changes but I want to combine it with my external code (could be any language). I'm looking for guidance on how to go about this simultaneously on my external code with an active fluent window open. I hope my question makes sense?February 8, 2022 at 10:09 amRobAnsys EmployeeThe adaption tools will allow cells to be marked if their value hits a pre-set criterion. However, whilst the register will report the number of cells in it, I'm not sure that's available to any of the report functions: they'd be the way to get a parameter out of Fluent.
February 8, 2022 at 2:51 pmDrAmineAnsys EmployeeIn Fluent itself you can try to create a Scheme script which will detect how many cells are marked for adaption and store that in a rampant variable which you might access elsewhere. With that value you can steer Fluent to adjust the pressure threshold till you get what you want as number of cells.
February 8, 2022 at 7:09 pmvedamaSubscriber
Okay, I had no idea Scheme programming existed in Fluent. Thank you! This might be quite a basic follow-up question, but how would I store the value printed? When I type:
(ti-menu-load-string (format #f "/mesh/adapt/list-adaption-cells\n"))
/mesh/adapt/list-adaption-cells No. of cells marked for refinement : 708
How would I got about storing 708? I want to keep running this step through a do-loop, adjusting threshold values, until I arrive at a specified value, say 100.
February 9, 2022 at 8:00 amDrAmineAnsys EmployeeYou can then use things like pick-robust or pick-a-real to pick that value. More can be found on the Ansys Customer Portal (if you have access).
February 9, 2022 at 5:54 pmvedamaSubscriberPick-robust works great. Thank you!
February 10, 2022 at 9:29 amDrAmineAnsys EmployeeWelcome!
Viewing 6 reply threads
Ansys Innovation Space
- You must be logged in to reply to this topic.
Simulation World 2022
Earth Rescue – An Ansys Online Series
Ansys BlogTrending discussions
- Suppress Fluent to open with GUI while performing in journal file
- Heat transfer coefficient
- What are the differences between CFX and Fluent?
- Floating point exception in Fluent
- Time Step Size and Courant Number
- Difference between K-epsilon and K-omega Turbulence Model
- The solver failed with a non-zero exit code of : 2
- Floating point exception
- Exporting Data Results
Top Rated Tags