|
[Sponsors] |
February 19, 2021, 09:40 |
Scripting in CFX
|
#1 |
New Member
biltu M
Join Date: Feb 2021
Posts: 17
Rep Power: 5 |
Hi CFDians,
I want to create/record a script to automate the repetitive steps in CFX pre and post. Could anyone tell me how will I be able to do so? I recorded the script in the workbench which works fine but only for the workbench. This script does not record anything that I do in the Designer Modeler, Mesh or CFX pre and post. Looking for help to automate steps in all or any amongst Designer Modeler, Mesh or CFX pre and post. |
|
February 19, 2021, 10:12 |
|
#2 |
Senior Member
Join Date: Jun 2009
Posts: 1,804
Rep Power: 32 |
Best to read the documentation.
The scripting language for ANSYS CFX is Perl plus CFX Command Language (CCL). You can record a session in CFX-Pre/CFD-Post and look at the session file to get an idea. Using a recorded session as a template, you can insert your specifics.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
February 19, 2021, 12:50 |
|
#3 |
New Member
biltu M
Join Date: Feb 2021
Posts: 17
Rep Power: 5 |
Dear Opaque,
Thank you for your answer. Where/How can I possibly record CFX pre & CFD post? I am new to CFX. |
|
February 19, 2021, 15:16 |
|
#4 |
Senior Member
Join Date: Jun 2009
Posts: 1,804
Rep Power: 32 |
- Start CFX-Pre/CFD-Post
- Before you open any file, go to the Session top menu - Select New Session - Select Session/Start Recording - Now start your work like - Open the file, - Load the mesh - Setup some physics, or whatever you feel you want recorded - Select Stop Recording There should be some file named <your case>.cse file in your directory/folder. You can edit that file, and read it through to understand how CFX-Pre works. If you want to repeat the same steps in exactly the same order, you can close CFX-Pre (not quit), and now use Session/Play session and it should repeat whatever was recorded and you will be again exactly where you stopped recording.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
February 21, 2021, 06:55 |
|
#5 |
New Member
biltu M
Join Date: Feb 2021
Posts: 17
Rep Power: 5 |
Thank you Opaque.
It works more or less as I don't have exact same parts but only similar to one another. It saves a lot of manual work though. Is it also possible to automate somehow in the mesher tab of CFX or the general mesh/geometry tab? My model has ~30M elements. When I open CFX after meshing, it takes a ton of time to open/load the model in the CFX. I checked the amount of CPU and memory being used during loading file and found that only a fraction of available CPU and memory is being used. Is there any possibility to control the usage of available CPU and memory? OR use parallel computation for this step somehow? I have successfully used parallel computation for CFX solution and mesh generation. |
|
February 21, 2021, 17:11 |
|
#6 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143 |
It sounds like your model is bigger than your RAM can handle so it is going to swap memory (or the page file, same thing). So this would accelerate greatly by increasing the RAM in your workstation. There are no CPU or memory settings you can adjust to fix this, you just need more memory.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
February 22, 2021, 01:35 |
|
#7 |
New Member
biltu M
Join Date: Feb 2021
Posts: 17
Rep Power: 5 |
Dear Ghorrocks,
I have 128GB RAM but only 10-15GB are being used when loading the model. I am wondering why the rest of 115 are sitting doing nothing? and if I can put this available resources for the task? |
|
February 22, 2021, 03:15 |
|
#8 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143 |
It is the OS doing this, not CFX. When the memory required exceeds available physical memory it will start using the page/swap file to reduce memory useage, and this reduced useage is what is shown. If you want to control this look at the page/swap file settings on your PC - but use it carefully, you can brick your computer if you stuff it up.
Also don't forget that other applications take memory as well. So make sure you close other applications down. Even better, do the simulation straight after rebooting the computer. This thread has good information if you want more detail: estimating RAM
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
February 22, 2021, 08:06 |
|
#9 |
New Member
biltu M
Join Date: Feb 2021
Posts: 17
Rep Power: 5 |
Thank you ghorrocks. This issue is clear now.
I have one final question. Can I automate mesh generation? How? |
|
February 22, 2021, 18:39 |
|
#10 |
Super Moderator
Glenn Horrocks
Join Date: Mar 2009
Location: Sydney, Australia
Posts: 17,703
Rep Power: 143 |
The easiest way to automate mesh generation is to run it inside workbench. Then you have a workflow you can run, parameters and all that.
If you want to drive the mesher directly yourself then your best bet is to go to ICEM or Fluent mesher. These can be run via scripts easily. ANSYS mesh looks horrible (or impossible) to run via a script.
__________________
Note: I do not answer CFD questions by PM. CFD questions should be posted on the forum. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Scripting in CFX | Bdew8556 | Main CFD Forum | 0 | June 2, 2020 09:53 |
CFX Post .cse scripting with Perl | nealrm | CFX | 1 | March 5, 2019 22:50 |
CFX pressure in Simulations problem | nasdak | CFX | 1 | April 14, 2010 13:22 |
PhD using CFX | Rui | CFX | 9 | May 28, 2007 05:59 |
FSI using CFX and ANSYS | Bi Chang | CFX | 2 | May 10, 2005 04:47 |