flow360.component.surface_mesh_v2.SurfaceMeshV2#

class SurfaceMeshV2[source]#

Bases: AssetBase

Surface mesh component for workbench (simulation V2)

classmethod from_cloud(id, **kwargs)[source]#
Parameters:

id (str) – ID of the surface mesh resource in the cloud

Returns:

Surface mesh object

Return type:

SurfaceMeshV2

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

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

  • meta_data (SurfaceMeshMetaV2 | None)

Returns:

Surface mesh object

Return type:

SurfaceMeshV2

classmethod from_file(file_name, project_name=None, solver_version=None, length_unit='m', tags=None, folder=None)[source]#
Parameters:
  • file_name (str) – The name of the input surface mesh file (*.cgns, *.ugrid)

  • project_name (str, optional) – The name of the newly created project, defaults to file name if empty

  • solver_version (str) – Solver version to use for the project

  • length_unit (LengthUnitType) – Length unit to use for the project (“m”, “mm”, “cm”, “inch”, “ft”)

  • tags (List[str]) – List of string tags to be added to the project upon creation

  • folder (Optional[Folder], optional) – Parent folder for the project. If None, creates in root.

Returns:

Draft of the surface mesh to be submitted

Return type:

SurfaceMeshDraftV2

classmethod import_to_project(name, file_name, project_id, length_unit='m', tags=None)[source]#

Create a surface mesh draft for adding to an existing project.

This creates a surface mesh 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 surface mesh component

  • file_name (str) – Path to the surface mesh file (*.cgns, *.ugrid)

  • project_id (str) – ID of the existing project to add this surface mesh to

  • length_unit (LengthUnitType, optional) – Unit of length (default is “m”)

  • tags (List[str], optional) – Tags to assign to the surface mesh (default is None)

Returns:

A draft configured for submission to an existing project

Return type:

SurfaceMeshDraftV2

get_dynamic_default_settings(simulation_dict)[source]#

Get the default surface mesh settings from the simulation dict

Parameters:

simulation_dict (dict)

property boundary_names: List[str]#

Retrieve all boundary names available in this surface mesh as a list

Returns:

List of boundary names contained within the surface mesh

Return type:

List[str]

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.

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.