SurfaceMesh#

SurfaceMesh#

alias of SurfaceMeshV2

Properties

SurfaceMesh.stats: SurfaceMeshStats#

Surface mesh statistics, including the node count and the number of triangular and quadrilateral surface elements.

The statistics are fetched from the cloud the first time this property is accessed and cached thereafter. The surface mesh must have finished processing for the statistics to be available.

Returns:

Object exposing n_nodes, n_triangles, n_quadrilaterals and version.

Return type:

SurfaceMeshStats

Raises:

Flow360RuntimeError – If the statistics cannot be retrieved, for example when the surface mesh is not ready yet.

SurfaceMesh.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]

Additional Constructors

classmethod SurfaceMesh.from_cloud(id, **kwargs)#
Parameters:

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

Returns:

Surface mesh object

Return type:

SurfaceMeshV2

classmethod SurfaceMesh.from_local_storage(mesh_id=None, local_storage_path='', meta_data=None)#
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

Methods

classmethod SurfaceMesh.from_file(file_name, project_name=None, solver_version=None, length_unit='m', tags=None, folder=None)#
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 SurfaceMesh.import_to_project(name, file_name, project_id, length_unit='m', tags=None)#

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