flow360.Geometry#

class Geometry[source]#

Bases: AssetBase

Geometry 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_cloud(id, **kwargs)[source]#

Create asset with the given ID

Parameters:

id (str)

Return type:

Geometry

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:

Parameters:
  • file_names (List[str] | str)

  • project_name (str | None)

  • solver_version (str | None)

  • length_unit (Literal['m', 'mm', 'cm', 'inch', 'ft'])

  • tags (List[str] | None)

  • folder (Folder | None)

Return type:

GeometryDraft

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)

classmethod from_local_storage(geometry_id=None, local_storage_path='', meta_data=None)[source]#
Parameters:
  • geometry_id (str) – ID of the geometry resource

  • local_storage_path – The folder of the project, defaults to current working directory

  • meta_data (GeometryMeta | None)

Returns:

Geometry object

Return type:

Geometry

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

reset_face_grouping()[source]#

Reset the face grouping

Return type:

None

reset_edge_grouping()[source]#

Reset the edge grouping

Return type:

None

reset_body_grouping()[source]#

Reset the body grouping

Return type:

None

rename_edges(current_name_pattern, new_name_prefix)[source]#

Rename the edge in the current edge group

Parameters:
  • current_name_pattern (str) – The current name of a single edge or the name pattern of the edges

  • new_name_prefix (str) – The new name of a single edge or the new name prefix of the edges

rename_surfaces(current_name_pattern, new_name_prefix)[source]#

Rename the face in the current face group

Parameters:
  • current_name_pattern (str) – The current name of a single face or the name pattern of the faces

  • new_name_prefix (str) – The new name of a single face or the new name prefix of the faces

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

Parameters:
  • current_name_pattern (str) – The current name of a single body or the name pattern of the bodies

  • new_name_prefix (str) – The new name of a single body or the new name prefix of the bodies

short_description()#
Returns:

generates short description of resource (name, id, status)

Return type:

str

property solver_version#

get solver version

property tags: List[str]#

get asset tags

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.