Tracking & Parsing¶
- class tracking.Tracker¶
Track materials and boundaries between all provided components
- extract_components(root_component)¶
Get all components stored in root and their materials.
- Parameters
root_component (SimpleComponent | GenericComponentAssembly) – component to track
- get_block_types() list[str]¶
Get block types. These are the same as the types of simple components. For example the type of coolant1 is coolant.
- Returns
list of block types
- Return type
list[str]
- get_blocks() list[str]¶
Get names of created blocks. Blocks are named the same as their corresponding simple components. For example the block corresponding to coolant0 is named coolant0.
- Returns
list of block names
- Return type
list[str]
- get_blocks_of_material(material: str) list[str]¶
Get blocks of simple components made of specified material
- Parameters
material (str) – name of material
- Returns
block names made of that material
- Return type
list[str]
- get_sidesets() list[str]¶
Get names of created sidesets. Sidesets are named according to the names of the simple components on either side. For example the sideset between coolant0 and cladding0 is coolant0_cladding0. Sidesets not at interfaces are named like <component_name>_air.
- Returns
list of sideset names
- Return type
list[str]
- get_sidesets_between_components(*types: str) list[str]¶
Get sidesets between specified simple component types. Providing only 1 type will assume that the other side of the interface is ‘air’
- Returns
list of sidesets
- Return type
list[str]
- get_sidesets_between_materials(*materials: str) list[str]¶
Get all sidesets between components made of these materials. Providing only 1 material will assume the other to be ‘air’.
- Returns
list of sidesets
- Return type
list[str]
- give_identifiers(root_component)¶
Give every component a unique identifier recursively, if it doesn’t already have one
- Parameters
root_component (GenericComponentAssembly) – top-level component class
- make_boundary_name(parts_of_name: list[str], internal=False) str¶
Generate a standardised boundary name
- Parameters
parts_of_name (list[str]) – list of components or materials
internal (bool, optional) – whether this name is only to be used internally, by default False
- Returns
standardised boundary name
- Return type
str
- organise_into_groups()¶
Create groups for material, component, component boundary, and material boundary groups in cubit
- reset()¶
Reset internal state
- track_boundaries()¶
Find boundaries between simple components. Make component-component and material-material groups. Add simple components to blocks and groups. Add component interfaces to sidesets and groups.
- class parsing.ParameterFiller¶
Process json files. Fill in missed input parameters with defaults.
- log¶
stores info about the json processing step
- Type
list
- design_tree¶
stores the design tree for the geometry we want to construct
- Type
dict
- config¶
stores the default configuration for our design tree (if any)
- Type
dict
- add_log(message: str)¶
Add message to log
- print_log()¶
Print messages in log
- process_design_tree(design_tree: dict) dict¶
Fill in missing parameters of design tree with default config values
- Parameters
design_tree (dict) – Parametrical description of geometry
- Returns
Filled design tree
- Return type
dict
- parsing.get_format_extension(format_type: str) str¶
Get the extension given a file format
- Parameters
format_type (str) – file format
- Returns
file extension
- Return type
str