jax_sbgeom.interfaces.dagmc_interface module
- create_dagmc_surface_mesh(discrete_blanket: LayeredDiscreteBlanket, flux_surface: FluxSurface, material_names: List[str], finitesize_coilset: FiniteSizeCoilSet = None, discrete_coilset: DiscreteFiniteSizeCoilSet = None, coil_material_name: str = None)[source]
Create a DAGMC blanket geometry from a layered discrete blanket and a flux surface.
Requires PyDAGMC and PyMOAB to be installed. These are not required dependencies for jax-sbgeom, so this function is only available when those packages are installed.
Note for writing the result to a .h5m file MOAB should have been compiled with HDF5 support.
Uses a conversion factor from meter to centimeter (all positions multiplied by 100)
- Parameters:
discrete_blanket (
LayeredDiscreteBlanket) – The layered discrete blanket to create the DAGMC geometry for.flux_surface (
FluxSurface) – The flux surface from which to create the blanket. Expected to be a FluxSurfaceFourierExtended instance (where d = 2.0 is the first external surce, and then etc.)material_names (
List[str]) – The names of the materials for each blanket layer.finitesize_coilset (
FiniteSizeCoilSet) – The finite size coilset to include in the DAGMC geometry. If None, no coils are included. Default is None.discrete_coilset (
DiscreteFiniteSizeCoilSet) – The discrete coilset parameters for the finite size coilset. Required if finitesize_coilset is provided. Default is None.coil_material_name (
str) – The name of the material for the coils. If a list is provided, it must have the same length as the number of coils in the finitesize_coilset after truncating to the phi range in discrete_coilset. Required if finitesize_coilset is provided. Default is None.
- Returns:
dagmc_blanket – The created DAGMC blanket geometry.
- Return type:
DAGMCModel
- tetrahedral_mesh_to_moab_mesh(vertices: Array, connectivity: Array, conversion_factor: float = 100.0)[source]
Convert a tetrahedral mesh to a MOAB mesh.
PyMOAB is required to use this function.
Note for writing the result to a .h5m file MOAB should have been compiled with HDF5 support.
- Parameters:
vertices (
Array) – Vertices of the tetrahedral mesh.connectivity (
Array) – Connectivity of the tetrahedral mesh.conversion_factor (
float) – Conversion factor (scaling from m->cm ), default 100
- Returns:
moab_core – The MOAB core containing the tetrahedral mesh.
- Return type:
pymoab.core.Core