|
The DTF utility offers several options for viewing
and manipulating simulation data in a DTF file. Simulation
data is essentially all settings that 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 it in CFD-ACE-GUI.
In this tip, we will demonstrate how to use the
-vd and -ud options of the DTF utility.
The usage for the DTF utility is: DTF -[command] modelname.DTF
For example, to view the DTF data, you would use the -vd option and would type
(either in a command prompt or a shell): DTF -vd modelname.DTF
This command will output the results to the shell directly. If you would like
to output the resutls to a file, you can do the following:
DTF -vd modelname.DTF > dtf_data.txt.
The last part of the command (" > dtf_data ")
will take the output and place it into a text file called
dtf_data. You can now open and edit the file in
your favorite text editor (e.g. Notepad, vi, etc.).
Viewing DTF Data (-vd option):
The -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)
Consider a case where we want to change the maximum number of iterations from 200 to 300.
Figure 1 shows the output for the -vd option, where the line for
"MAX_ITER int 1 200" has been uncommented (i.e. the # character has been deleted).
This has been done because now will use that file to change the maximum number of iteration and
update the DTF with this new number.
Figure 1. Snippet of the DTF data created using the -vd option
Updating DTF Data (-ud option):
Simply edit the dtf_data file and change "MAX_ITER int 1 200" to
"MAX_ITER int 1 300", then save the file. Now, 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
Note that only uncommented variables will be updated.
Also note that ">" has been changed to "<" for the -ud option.
Alternatively, you can echo the variable 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 we have updated the DTF file using the -ud option, let's
will execute the -vd command one more time to verify that
the data was indeed 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 just updated the maximum number of iterations without
opening the DTF file in CFD-ACE-GUI. The file is now ready to
be submitted to the solver. Here are a few instances for which
this tool may help you:
-
When dealing with large models, it can take a significant
amount of time to open, make the changes and save the DTF file
with CFD-ACE-GUI. So the DTF utility is very useful and practical
way to update large models.
-
Even if the model is small, you can still use this tool to
update DTF data. It will still save you the time of 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
local computer, or transfer the file from the remote machine to
your local machine to make the changes. You can simply execute
the DTF commands on the remote machine and submit the job to the
solver with the new settings.
If you have any questions about this topic or would like us to discuss other topics in the future,
please let us know.
Regards,
ESI CFD Support Team
|