The value of each parameter of the foam generation process is determined in the following way:
- The tool looks if the the value of the parameter was specified through CLI.
- If the parameter is not specified, but YAML config file is specified, it looks for it there.
- If not found, it takes the hard-coded default value of the parameter.
The config file can be specified as:
foamgen -c config_file.yml
All parameters and their default values can be viewed using:
foamgen -h
The unstructured mesh workflow with default parameters can be run as:
foamgen -ptmu
foamgen
can also be imported as a python module. For example, to create sphere packing, following code can be run:
import foamgen as fg
cfg = fg.generation.parse_config_file('basic.yml')
cfg.pack.active = True
fg.generation.generate(cfg)
where basic.yml
is a valid configurational file. Such file can be found in examples
directory.