HomeIndustriesProductsServicesPartnersAbout Us

Customer Login

Home arrow Blog arrow Changing Solver Control Parameters on the Fly via the MOD File
Changing Solver Control Parameters on the Fly via the MOD File Print E-mail

The MOD file can be used to change some solver control parameters while the solver is running. The idea is that some solution control and output control parameters can be modified by creating a modelname.MOD file,  without stopping and restarting the simulation. The MOD file should be in the directory where your modelname.DTF file is located (where the solver is running).

The flow solver checks for the presence of a modelname.MOD file at the beginning of each solution iteration. If that file exists, the solver will open the file, read and process any commands found in that file, echo the commands to a file named modelname.HIS, and finally delete the original modelname.MOD file. The MOD file is a plain text file created by the user (with Notepad or some other text editor; do not use Microsoft Word). Please note that the text file should be in ASCII format only.

Here is the simple example of using a MOD file. Lets say you are running a steady state case.

The output settings are:
  • Number of Iterations  =  1000
  • Output  =  End of Simulation
Let's say the solver has completed 500 iterations and you wish to post process your results in CFD-VIEW. Because you have selected the “End of Simulation” output option, you will not have any solution data until the solver is finished. Rather than stopping the simulation, you can use a MOD file.

Following are some simple steps for using the MOD file:

Image

Image
1. Create modelname.MOD file using Notepad or some other text editor and put it in the same directory where your modelname.DTF file is.
Note:  If you are using Notepad to create the MOD file, make sure the file is saved as *.MOD without the .txt extension.  If the .txt  extension is in the file name, the solver will not recognize the file as a MOD file.
Image
2. Write the command keyword “SAVE_CONTINUE” in modelname.MOD file as shown.

Image
3. The solver checks for the presence of a modelname.MOD file at the beginning of each solution iteration. It will open the modelname.MOD file, read and process the command “SAVE_CONTINUE” (in this case saving the data/results to modelname.DTF), create a history file named modelname.HIS, and delete the original modelname.MOD file.  You can now open that DTF file in CFD-VIEW and post-process the results.
 
Image
4. Once the MOD file has been processed, the history file, modelname.HIS, provides   information about changes that were made to the solver during the run.

Image

The user can also change the control parameters at a desired iteration or time step by using the ‘perform_at_iteration’ and ‘perform_at_time_step’ commands, respectively. These commands should precede the command the user wants to execute at that iteration or time. Given below is an example of a MOD file that tells the solver to change the enthalpy under-relaxation at the 250th iteration and at the 500th iteration.

Image

The solver has many MOD file commands available that are useful in many situations.  A list of the available commands can be found here.

If you have any questions about this feature or would like us to discuss other topics in the future, please let us know.

Regards,
Kartik Shah
ESI CFD Support Team

 
© 2012 ESI Group CFD Portal