Getting Started with Foamgen¶
Input philosophy¶
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.
Importing package¶
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.