Render Command¶
Usage¶
Usage: xfds render [OPTIONS] [DIRECTORY] COMMAND [ARGS]...
Render an FDS template file into scenarios.
Arguments:
[DIRECTORY] Directory containing pbd.yml configuration file. [default: .]
Options:
--help Show this message and exit.
Developed by pbd.tools
Description¶
The xFDS render command converts template input files into usable modeling files. From a given directory (or the current directory if not specified), xFDS will traverse up the file system until it finds a pbd.yml
configuration file. It then parses the contents of the configuration file and generates a model for each set of parameters.
Each input file specified in the configuration file will be treated like a template. The templates will be processed with the data specified in the configuration file and placed in an output
directory.
For example, the configuration file below expects two files to be located in the same directory as the configuration file: model.fds
and model.pbs
. It recognizes that a single parameter
is set.
examples/pbs/pbd.yml | |
---|---|
1 2 3 4 5 6 7 8 |
|
The two input files are defined in a way that uses the n
parameter from the configuration file. The model.fds
template is a simple file that just creates n
meshes placed next to each other in the x-direction. Meahwhile, the model.pbs
template is a partial PBS file showing how the nodes specifications can be altered based on the n
umber of processors required (assuming 1 processor per mesh).
examples/pbs/model.fds | |
---|---|
1 2 3 4 |
|
examples/pbs/model.pbs | |
---|---|
1 2 3 4 |
|
xFDS will process each of the templates and place them in a directory ./output/using_{{n}}_nodes
where {{n}}
is replaced by the parameter n
. Each model is placed in its own directory where the name matches the input files.
Tip
While xFDS will treat every specified file as a template, if there is no template syntax defined, the file will be copied over to the output directory and be given the same base name as the model file. This is useful for having consistent Smokeview scripts, Smokeview ini files, or other files for each model.
Warning
xFDS will use the name
defined in the configuration file and match the file extension from the template file. This is how model.fds
gets renamed to using_{{n}}_nodes.fds
in the output.
If you are using the &CATF
feature in FDS, make sure the OTHER_FILES
do not have an .fds
file extension. Use a .txt
or .data
extension instead if you need to use this feature.
You can have multiple .fds
files in a project as long as they're specified as different models.
Files in output/using_4_nodes
:
examples/pbs/output/using_4_nodes/using_4_nodes.fds | |
---|---|
1 2 3 4 |
|
examples/pbs/output/using_4_nodes/using_4_nodes.pbs | |
---|---|
1 |
|
Files in output/using_8_nodes
:
examples/pbs/output/using_8_nodes/using_8_nodes.fds | |
---|---|
1 2 3 4 5 6 7 8 |
|
examples/pbs/output/using_8_nodes/using_8_nodes.pbs | |
---|---|
1 |
|
Files in output/using_12_nodes
:
examples/pbs/output/using_12_nodes/using_12_nodes.fds | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 |
|
examples/pbs/output/using_12_nodes/using_12_nodes.pbs | |
---|---|
1 |
|