flow360.Geometry#
- class Geometry[source]#
Bases:
AssetBaseGeometry component for workbench (simulation V2)
- property face_group_tag#
getter for face_group_tag
- property edge_group_tag#
getter for edge_group_tag
- property body_group_tag#
getter for body_group_tag
- property snappy_bodies#
Getter for the snappy registry.
- get_dynamic_default_settings(simulation_dict)[source]#
Get the default geometry settings from the simulation dict
- Parameters:
simulation_dict (dict)
- classmethod from_file(file_names, project_name=None, solver_version=None, length_unit='m', tags=None, folder=None)[source]#
Create asset draft from files :param file_names: :param project_name: :param tags: :param folder: Folder object where the asset will be created (optional; defaults to root if unspecified) :return:
- classmethod import_to_project(name, file_names, project_id, length_unit='m', tags=None)[source]#
Create a geometry draft for adding to an existing project.
This creates a geometry that will be added as a supplementary component (dependency) to an existing project, rather than creating a new project.
- Parameters:
name (str) – Name for the geometry component
file_names (Union[List[str], str]) – Path(s) to the geometry file(s)
project_id (str) – ID of the existing project to add this geometry to
length_unit (LengthUnitType, optional) – Unit of length (default is “m”)
tags (List[str], optional) – Tags to assign to the geometry (default is None)
- Returns:
A draft configured for submission to an existing project
- Return type:
GeometryDraft
- show_available_groupings(verbose_mode=False)[source]#
Display all the possible groupings for faces and edges
- Parameters:
verbose_mode (bool)
- group_faces_by_tag(tag_name)[source]#
Group faces by tag name
- Parameters:
tag_name (str)
- Return type:
None
- group_edges_by_tag(tag_name)[source]#
Group edges by tag name
- Parameters:
tag_name (str)
- Return type:
None
- group_bodies_by_tag(tag_name)[source]#
Group bodies by tag name
- Parameters:
tag_name (str)
- Return type:
None
- group_faces_for_snappy()[source]#
Group faces according to body::region convention for snappyHexMesh.
- Return type:
None
- rename_edges(current_name_pattern, new_name_prefix)[source]#
Rename the edge in the current edge group
- rename_surfaces(current_name_pattern, new_name_prefix)[source]#
Rename the face in the current face group
- property entity_info#
Return the entity info associated with the asset (copy to prevent unintentional overwrites)
- get_download_file_list()#
return list of files available for download
- Returns:
List of files available for download
- Return type:
List
- property info: AssetMetaBaseModelV2#
Return the metadata of the asset
- property name#
returns name of resource
- property params#
Return the simulation parameters associated with the asset
- property project_id#
get project ID
- rename(new_name)#
Rename the current asset.
- Parameters:
new_name (str) – The new name for the asset.
- rename_body_groups(current_name_pattern, new_name_prefix)[source]#
Rename the body in the current body group
- short_description()#
- Returns:
generates short description of resource (name, id, status)
- Return type:
- property solver_version#
get solver version
- wait(timeout_minutes=60)#
Wait until the Resource finishes processing.
While waiting, an animated dot sequence is displayed using the current non-final status value. The status is dynamically updated every few seconds with an increasing number of dots: ⠇ running………………………… This implementation leverages Rich’s status() method via our custom logger (log.status) to perform in-place status updates. If the process does not finish within the specified timeout, a TimeoutError is raised.