luminarycloud.solution¶
Classes¶
Represents a solution for a simulation. |
Module Contents¶
- class luminarycloud.solution.Solution¶
Represents a solution for a simulation.
- id: str¶
Solution ID.
- simulation_id: str¶
Simulation ID of parent
- iteration: str¶
Iteration index of the solution.
- physical_time: float¶
The physical time, in seconds, of the solution iteration (for transient simulations).
- download_surface_data() tarfile.TarFile ¶
Download the raw surface data as a gzipped tarball containing .vtu files.
- Returns:
- tarfile.Tarfile
Examples
>>> with solution.download_surface_data() as streaming_tar_file: ... path = f"./surface_data_{solution.id}" ... streaming_tar_file.extractall(path) ... print(f"Extracted files to {path}:") ... print("\t" + "\n\t".join(os.listdir(path))) Extracted files to ./surface_data_<solution.id>: surface_0_bound_z_minus.vtu summary.vtm surface_0_bound_airfoil.vtu surface_0_bound_z_plus.vtu surface_0_bound_farfield.vtu
- download_volume_data() tarfile.TarFile ¶
Download volume solution for a completed steady simulation as a gzipped tarball containing .vtu & .vtp files.
The output may be broken up into multiple .vtu files for large simulations.
- Returns:
- tarfile.Tarfile
Examples
>>> with solution.download_volume_data() as streaming_tar_file: ... path = f"./volume_data_{solution.id}" ... streaming_tar_file.extractall(path) ... print(f"Extracted files to {path}:") ... for root, dirs, filenames in os.walk(path): ... print("\t" + "\n\t".join([os.path.join(root, file) for file in filenames])) Extracted files to ./volume_data_<solution.id>: ./volume_data_<solution.id>/volume_data_<solution.id>.vtm ./volume_data_<solution.id>/volume_data_<solution.id>/volume_data_<solution.id>_1_0.vtp ./volume_data_<solution.id>/volume_data_<solution.id>/volume_data_<solution.id>_3_0.vtp ./volume_data_<solution.id>/volume_data_<solution.id>/volume_data_<solution.id>_4_0.vtp ./volume_data_<solution.id>/volume_data_<solution.id>/volume_data_<solution.id>_2_0.vtp ./volume_data_<solution.id>/volume_data_<solution.id>/volume_data_<solution.id>_0_0.vtu