bluemira.radiation_transport.neutronics.dagmc.dagmc_converter_fast_ctd

fast_ctd DAGMC converter workflow definition.

Classes

DAGMCConverterFastCTDConfig

Converter config model for DAGMCConverterFastCTD.

DAGMCConverterFastCTD

fast_ctd CA to DAGMC converter workflow.

Module Contents

class bluemira.radiation_transport.neutronics.dagmc.dagmc_converter_fast_ctd.DAGMCConverterFastCTDConfig(/, **data: Any)

Bases: bluemira.radiation_transport.neutronics.dagmc.dagmc_converter.DAGMCConverterConfig

Inheritance diagram of bluemira.radiation_transport.neutronics.dagmc.dagmc_converter_fast_ctd.DAGMCConverterFastCTDConfig

Converter config model for DAGMCConverterFastCTD.

Parameters:

data (Any)

converter_type: Literal['fast_ctd'] = 'fast_ctd'
imprint_geometry: bool = True

If True, imprint the geometry before converting to DAGMC.

imprint_per_compound: bool = True

If True, imprint solids grouped in a compound together only. Set to False to imprint all solids together. This may take much longer.

minimum_include_volume: float = 1.0

Minimum volume of a solid to be included in the DAGMC model.

fix_step_to_brep_geometry: bool = False

Attempts to fix small edges and gaps, refer to the fast_ctd documentation.

merge_dist_tolerance: float = 0.001

Distance tolerance for merging entities.

lin_deflection_tol: float = 0.001

Linear edge length after which a mesh node is added. Refer to the OCC BRepMesh_IncrementalMesh documentation for more details.

lin_deflection_is_absolute: bool = False

Whether the linear deflection tolerance is absolute or relative to edge length.

angular_deflection_tol: float = 0.5

Angular extent after which a a mesh node is added. Refer to the OCC BRepMesh_IncrementalMesh documentation for more details.

run_make_watertight: bool = True

Run the make_watertight subprocess from DAGMC. Attempts to make the DAGMC model watertight. Useful to run check_geometry manually on the output if it’s not watertight.

save_vtk_model: bool = True

Save the DAGMC model as a VTK file, viewable in ParaView.

enable_ext_debug_logging: bool = False

Enable debug logging in the fast_ctd pipeline, in the C++ extension code.

use_cached_files: bool = True

Use the cached intermediary files if they exist, picking up where the last run ended. This can happen if the converter failed during a run and the intermediate files were not cleaned up.

clean_up_cached: bool = True

Clean up the cach intermediate files after the conversion is completes successfully.

run_converter(shapes: list, names: list[str], comp_mat_mapping: dict[str, str], output_dagmc_model_path: pathlib.Path) None

Run the converter.

Parameters:
  • shapes (list) – List of shapes to be converted.

  • names (list[str]) – List of names for the shapes.

  • comp_mat_mapping (dict[str, str]) – Mapping of component names to material names.

  • output_dagmc_model_path (pathlib.Path) – Path to the output DAGMC model file.

Return type:

None

class bluemira.radiation_transport.neutronics.dagmc.dagmc_converter_fast_ctd.DAGMCConverterFastCTD(shapes: list[bluemira.geometry.base.BluemiraGeoT], names: list[str], comp_mat_mapping: dict[str, str])

Bases: bluemira.radiation_transport.neutronics.dagmc.dagmc_converter.DAGMCConverter[DAGMCConverterFastCTDConfig]

Inheritance diagram of bluemira.radiation_transport.neutronics.dagmc.dagmc_converter_fast_ctd.DAGMCConverterFastCTD

fast_ctd CA to DAGMC converter workflow.

Parameters:
  • shapes (list[bluemira.geometry.base.BluemiraGeoT])

  • names (list[str])

  • comp_mat_mapping (dict[str, str])

_run_imprint_all() list[bluemira.geometry.solid.BluemiraSolid]
Return type:

list[bluemira.geometry.solid.BluemiraSolid]

_run_imprint_per_compound() list[bluemira.geometry.base.BluemiraGeo]
Return type:

list[bluemira.geometry.base.BluemiraGeo]

run(output_dagmc_model_path: pathlib.Path, converter_config: DAGMCConverterFastCTDConfig) None

Convert the DAGMC file to a format suitable for use in Bluemira.

Parameters:
  • output_dagmc_model_path (pathlib.Path) – Path to the output DAGMC model file.

  • converter_config (DAGMCConverterFastCTDConfig) – Configuration options for the converter.

Raises:

TypeError – If the shapes are not of type BluemiraSolid or BluemiraCompound.

Return type:

None