CFD Online Discussion Forums

CFD Online Discussion Forums (
-   CFX (
-   -   Perl script for intialisation (

pratik mehta September 5, 2008 04:43

Perl script for intialisation
I am in need of a perl script for my CFX run , i need a script which does the first solver run with steady state for 200 iteration and later transient for specifed number of total timesteps and Max coefficent loop of 3 per timesteps. here in my script I have made two .def files one steady and another one unsteady , all I need this script to run the steady file and later run unsteady with initialization with the result file of steady state

I have my script as shown but it doesnt work at all , could anyone please tell me where are the mistakes ?

************************************************** ** %run1= (NAME => "run1", INIT => "");

%run2= (NAME => "run2", INIT => "run_001.res");

# Define a list of definition files to run @runList = ("\%run1", "\%run2");

foreach $run (@runList) {

if (!defined($run->{NAME})) {

print "Found run without a name.\n";

$errors = 1; }

if (!defined($run->{INIT})) {

print "No initial file found for " . $run->{NAME} . ".\n";

$errors = 1; } }

#loop over the list foreach $run (@runList) { $name = $run->{NAME}; $initFile = $run->{INIT};

#Open the solver to accept some CCL from STDIN open(SOLVER,"|cfx5solve -def steady.def -name $name $initCmd -part 2 -start-method \"MPICH2 Local Parallel for Windows\" ");

} # end of loop


Thank you in advance for your kind response

underGroundMan September 9, 2008 11:24

Re: Perl script for intialisation
Let me make life easier for you. Run a steady state flow and then initialise your unsteady flow with steady state results. Easy peasy

pratik mehta September 10, 2008 03:09

Re: Perl script for intialisation

Thats what I want to do using the script since I have many such cases to run for different geometries, In all I have 8 definition file and each one needs this process of steady state run and later transient run.

My entire goal is to do this by perl script , So I need some help in making the script which will do the things as mentioned

thanks for your kind reply

All times are GMT -4. The time now is 23:02.