CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   FLUENT (https://www.cfd-online.com/Forums/fluent/)
-   -   batch command to run fluent from nth time step (https://www.cfd-online.com/Forums/fluent/32474-batch-command-run-fluent-nth-time-step.html)

solomon November 9, 2003 14:04

batch command to run fluent from nth time step
 
What is the command to run fluent in batch mode starting from the nth time step case/data file. The nth time step is referring to the last time step a previous Fluent run is terminated.


thomas November 10, 2003 03:40

Re: batch command to run fluent from nth time step
 
Hi, you need to create a Journal file, you are gonna used in a shell script window by the following command: --------------------------------------------------- fluent 2d (or 3d) -g < Name of your journal file >& results.txt & ---------------------------------------------------

Now in your journal file here are the basic command to read a cas/dat, iterate a number of time step, write cas/dat and close fluent:

----------------------------------------------- rc 'Name_1'.cas (read case) rd 'Name_1'.dat (read data) nd (Number of time step) (Maximum Its per time step) wc 'Name_2'.cas (read case) wd 'Name_2'.dat (read data) Exit yes --------------------------------------------------

You should check for the command 'nd' I propose to you. For that read a unsteday case in Fluent and go in the 'iteration' section of the graphic user interface (GUI). You will find this command. Check if 'nd' is correct cause I have not use it for a while and I do not have Fluent to check by my own.

cheers, thomas yes

solomon November 10, 2003 17:14

Re: batch command to run fluent from nth time step
 
Just to make clear things, Thomas, you are suggesting to read all the previous case and data files one by one untill the nth case and data files inorder to continue from the time step the run teminated.

That sounds a tedious job as I have 600 case and data files from a fluent run of many timesteps. If this is the only option, I will tray to do so.

Thank you

thomas November 11, 2003 03:51

Re: batch command to run fluent from nth time step
 
Hi,

NO i am not suggesting such a thing. Read the initial cas/dat and then the command will execute your nth time step for this case. Then when the run is done save the cas/dat in a file.

thomas

thomas November 12, 2003 05:26

CORRECTION !!!
 
Hi, I am sorry but I have done a mistake in my previous message. The command to set a number of time step using a text command is not 'nd' but the following command:

s/d (numbre of time step) (maxiteration per time step)

I had access to fluent this morning and I checked it. thomas

solomon November 12, 2003 06:29

Re: CORRECTION !!!
 
Thomas, The issue that I have and I would like to address is that I have case and data files saved for up to 600 time steps. I want to proceed from where I stopped instead of running Fluent from the first time step. That is to start at 600th time step and go to 601,602, etc. in a batch mode.

I have the journal file to read case file and iterate and save results starting from the first time step. Here the issue is to start from some intermediary time step and proceed further.

thank You Solomon

thomas November 12, 2003 07:37

Re: CORRECTION !!!
 
Hi, Well this what I explain to you in my first answer. If I am assuming you have a data file already saved at the 600th iteration you have to read that file in your journal file. Then the iteration precedure 's/d' will continue from the 600 to ....

here is the Journal file you got to excexute

rc name.cas rd name.dat ( data at 600th time step ) s/d x y %x = number of time step %y = max iteration per time step wc final.cas wd final.dat (data file after the x time step) exit yes

To use that in batch mode here is the command: fluent 2/3d -g <journal_file_name> & res.txt & I do not think I can make it clearer. Hope this is what you wanted. thomas

solomon November 12, 2003 17:51

Re: batch command to run fluent from nth time step
 
Thomas, I get the 600th case and data files read and obtained results but it get starts counting from the first time step over writing previous results. That means it considers it as if it is a new case and data files though it is a continuation of previous run.

The case and data files should be saved ( I want them to be asaved ) as: filename601.cas,filename601.data, filename602.cas,filename602.data, filename603.cas,filename603.data,etc.

But I get them saved as the following as if it is a start run even though I started by reading the 600 th time step case and data files:

filename001.cas,filename001.data, filename002.cas,filename002.data, filename003.cas,filename003.data, etc.

This is important because I want to archieve the resulting files in their right order as I am going to have a huge number of them may be in the order of ten thousandths.

Thank You Solomon


thomas November 13, 2003 07:14

Re: batch command to run fluent from nth time step
 
Sorry I am confused. Would answer the following question : Does the filename referenced 001.cas/dat contains : -> the data for one time step after initialization ? -> the data of the 601 nth time step ?

You should post here your journal file text to let other people check your commands. Futhermore I encourage you to contact your area Fluent office.

Regards, thomas

varghese November 13, 2003 07:30

Re: batch command to run fluent from nth time step
 
Dear Solomon,

If it is just the problem of numbering, you can take the control of naming your case and data files through your journal. Ja, if you have 10000s of it, it would be again a problem. Another radical step will be to correct your time in the boundary condition file. At 600th time step apply file/write-bc. Check in the resulting file, the time defintion. You can edit it and apply file/read-bc. I hope it will allow you to continue from where you stopped.

Greetings Varghese

thomas November 13, 2003 07:37

Re: batch command to run fluent from nth time step
 
This is what I thought. I wondered and wanted to know if the saving is done by auto-save throught fluent or directly in the journal file.

thomas

solomon November 16, 2003 05:03

Re: batch command to run fluent from nth time step
 
Thomas,

The saving is done through fluent autosave feature and it is adjusted so that the case and data files are saved in 20 time steps interval:

filename020.cas

filename020.dat

filename040.cas

filename040.dat

etc

solomon

thomas November 16, 2003 07:38

Re: batch command to run fluent from nth time step
 
Hi, I agree with varghese, it is a problem of numbering. I I am sure your data/case file contain the right calculation but their names are different from what you think. To solve that problem either find a trick in your auto-save file name or do it in your journal file (command wcd) but it seems very heavy to do cause if I remember you have a lot of file to save.

Cheers thomas

maphd August 25, 2015 20:05

Hello Thomas,

I run a large eddy simulation in fluent 14. I saved my case and data files at different time steps every 50 time steps and I run the simulation for 1000 time steps. Could you tell me how I can find an average value of a variable lets say velocity from all of the files that I saved?

I do not want to open them one by one and put into excel or any other place to take the average of a variable. Is there any way that fluent can read those by itself and calculated the average? I think what you were suggesting above which is called a journal file make this job for me right? I appreciate your help.

Thank you,


All times are GMT -4. The time now is 10:34.