The DTF utility offers several options for viewing and manipulating simulation data in a DTF file. Simulation data is essentially all settings which are not Volume Conditions or Boundary Conditions. By using a couple of DTF commands, you can update the data in the DTF file without opening the it in CFD-ACE-GUI. In this tip, I will demonstrate how to use the -vd and -ud options of the DTF utility.
Viewing Data (DTF -vd option):
The DTF -vd option allows you to view general settings in the DTF file such as the following:
Number of Iterations
Relaxation Parameters
Diagnostics
Restart File
Number of Time Steps
Database Entries (e.g. mixture mass fractions)
Parametric Input
Solver Selection (CGS+Pre or AMG)
The usage for the DTF utility is:
DTF -[command] modelname.DTF
For the -vd option, you would type:
DTF -vd modelname.DTF > dtf_data
The last part of the command (" > dtf_data ") will take the output from the DTF command and place it into a file called dtf_data. You can now open and edit the file in your favorite text editor (e.g. Notepad, vi, etc.) In Figure 1, I have uncommented the line for MAX_ITER int 1 200. In this example, I will will change the maximum iterations from 200 to 300.
Figure 1. Snippet of the DTF data created using the -vd option.
Updating DTF Data (DTF -ud option):
Now that we have changed the number of iterations, we need to update the DTF file with the changes using the -ud option. The usage for this option is the following:
DTF -ud modelname.DTF < dtf_data
Alternatively, you can echo the update to the command if you know the variable name and arguments. To update the maximum iterations using this method, you would do the following from the command line:
echo ‘MAX_ITER int 1 300’ | DTF -ud modelname.DTF
Now that I have updated the DTF file using the -ud option, I will execute the -vd command once again just to check that the data was updated. You can see in Figure 2 that the maximum iterations has been changed from 200 to 300.
Figure 2. Snippet showing that the maximum iterations has been updated in the DTF file.
We have now updated the maximum number of iterations without opening the file in CFD-ACE-GUI. The file is now ready to submit to the solver. Here are a few instances when this tool may help you:
When dealing with large models, this tool can be very useful since it can take a significant amount of time to open, make the change, and save the file in CFD-ACE-GUI.
Even if the model is small, you can still use this tool to update DTF data. It will still save you the time opening and saving the file in CFD-ACE-GUI.
When running files on remote machines, this tool is useful since you do not need to display CFD-ACE-GUI back to your machine or transfer the file from the remote machine to your local machine to make the changes. You can just simply execute the commands on the remote machine and submit the job to the solver with the new settings