CFD Online Discussion Forums

CFD Online Discussion Forums (
-   CFX (
-   -   Write .def file from command line (

Alejandro September 9, 2005 18:40

Write .def file from command line
Hi! I'm using CFX5.7.1 and I have lots of mesh files .gtm, and for each of them I have to write a .def file which I will later simulate. So I don't have to define each time the boundary conditions for each .gtm, I just reread the mesh file and write a new .def file (I'm simulating airfoils at different attack angles). Is there a way in which I can reread a .gtm file from the command line, and afterwards write a .def file? Thanks!!!

Paul Lewis September 10, 2005 07:49

Re: Write .def file from command line
Hi Alejandro,

If you're modelling an aerofoil at different angles of attack you can often get away with just one mesh. Set the front and top of your box as inlets, then set the boundary conditions to angle the inlet flow. The aerofoil stays at the same angle as your domain but the fluid angle changes relative to it.



Jeff September 10, 2005 23:50

Re: Write .def file from command line
CFX-Pre was set up to be completely scriptable. Run cfx5pre -help from the command line to see what the options are. There should be an option to run CFX-Pre in batch mode.


Alejandro September 11, 2005 18:14

Re: Write .def file from command line
Thanks Paul and Jeff! I don't think I'm doing it the "right way", but either way its working, I got around with just one mesh, and to change the velocity angle I changed its x and y components, exporting to a text file the .def file, I did a script to generate many different texts files just changing the air speed, and then writing again the .def files and running them, everything in one batch file.. so it got pretty automated.

All times are GMT -4. The time now is 07:16.