luminarycloud.project

Classes

Project

Represents a Project object.

Functions

create_project(→ Project)

Create a project owned by the user.

get_project(→ Project)

Get a specific project by ID.

list_projects(→ list[Project])

List projects accessible by the user.

Module Contents

class luminarycloud.project.Project

Represents a Project object.

id: str
name: str
description: str
storage_usage_bytes: int
property create_time: datetime.datetime
property update_time: datetime.datetime
update(*, name: str = '', description: str = '') None

Update/Edit project attributes.

Mutates self.

Parameters:
namestr, optional

New project name.

descriptionstr, optional

New project description.

delete() None

Delete the project.

create_geometry(cad_file_path: os.PathLike, *, name: str | None = None, scaling: float | None = None, wait: bool = False) luminarycloud.geometry.Geometry

Create a new geometry in the project by uploading a supported CAD file.

For more information on supported formats and best practices, see: https://docs.luminarycloud.com/en/articles/9274255-upload-cad

Parameters:
cad_file_pathPathLike or str

Path or URL to the CAD file to upload.

Returns:
Geometry

The newly created Geometry.

Other Parameters:
namestr, optional

Name of the geometry on Luminary Cloud. A default name will be used if unset.

scalingfloat, optional

Scaling to apply to the source CAD file upon import. Defaults to 1.0 if unset.

waitbool, optional

If set to True, this function will block until the geometry import completes. Otherwise, it will return immediately and the import will occur in the background. Defaults to False.

list_geometries() list[luminarycloud.geometry.Geometry]

List all geometries in project.

Returns:
list[Geometry]

A list of all available Geometries in the project.

upload_mesh(path: os.PathLike | str, *, name: str | None = None, scaling: float | None = None, chunk_size: int | None = None, mesh_type: luminarycloud.enum.MeshType | None = None, do_not_read_zones_openfoam: bool | None = None) luminarycloud.mesh.Mesh

Upload a mesh to the project.

For more information on supported formats and best practices see: https://docs.luminarycloud.com/en/articles/9275233-upload-a-mesh

Parameters:
pathpathlike or str

Path or URL to the mesh file to upload.

Other Parameters:
namestr, optional

Name of the mesh resource on Luminary Cloud. Defaults to the filename without the extension.

scalingfloat, optional

If set, apply a scaling factor to the mesh.

chunk_sizeint, optional

Number of bytes per uploaded chunk. Default size is 1 MB.

mesh_typeMeshType, optional

The file format of the mesh file. Required for OpenFOAM format.

do_not_read_zones_openfoambool, default False

If true, disables reading cell zones in the polyMesh/cellZones file for OpenFOAM meshes.

create_mesh(*, name: str, adaptation_params: luminarycloud.mesh.MeshAdaptationParameters) luminarycloud.mesh.Mesh

Create a new mesh in the project.

Parameters:
namestr

(Optional) Mesh name. Max 256 characters.

adaptation_paramsMeshAdaptationParameters

(Required) Should be specified if creating a new mesh via mesh adaptation. Note: this parameter will become optional in the future when additional ways of creating a mesh are supported.

list_meshes() list[luminarycloud.mesh.Mesh]

List all meshes in project.

create_simulation(mesh_id: str, name: str, simulation_template_id: str, *, description: str = '', batch_processing: bool = False) luminarycloud.simulation.Simulation

Create a new simulation.

Parameters:
mesh_idstr

Mesh ID.

namestr

Simulation name. If empty, a default name will be generated.

simulation_template_idstr

ID of the SimulationTemplate used to set up the simulation.

Other Parameters:
descriptionstr, optional

Simulation description.

batch_processingbool, default False

If True, batch processing will be used for this simulation. Use Batch Processing on simulations that are not time-sensitive to save up to 65% in credits.

list_simulations() list[luminarycloud.simulation.Simulation]

List all simulations in project.

list_simulation_templates() list[luminarycloud.simulation_template.SimulationTemplate]

List all simulation templates in project.

luminarycloud.project.create_project(name: str, description: str = '') Project

Create a project owned by the user.

Parameters:
namestr

Project name.

descriptionstr

Project description.

luminarycloud.project.get_project(id: str) Project

Get a specific project by ID.

Parameters:
idstr

Project ID.

luminarycloud.project.list_projects() list[Project]

List projects accessible by the user.