carbonfly.constant_writer module
Writers for OpenFOAM constant/ configuration files.
This module provides helper functions to populate the constant/ directory of an OpenFOAM case using template dictionaries shipped with carbonfly.
- carbonfly.constant_writer.write_constant_files(case_root: Path)[source]
Copy standard constant/ dictionaries into the case folder.
This writes a minimal set of OpenFOAM dicts under case_root/constant/, using template files shipped with carbonfly. Existing files are not overwritten.
- Parameters:
case_root (Path) – Case root directory.
- carbonfly.constant_writer.write_residuals_file(case_root: Path)[source]
Copy the standard system/residuals file into the case folder.
Uses the template shipped with carbonfly. If the destination exists, it is not overwritten.
- Parameters:
case_root (Path) – Case root directory.
- Raises:
FileNotFoundError – If the residuals template file cannot be found.