Use cloud project#
This example demonstrates retrieving an existing Flow360 project from the cloud using its unique identifier. It illustrates how to access the projectβs geometry, define new simulation parameters (specifically modifying freestream conditions in this instance), and submit a subsequent simulation case associated with this project. This process allows users to build upon existing cloud assets, such as geometries or meshes, for further analysis or parameter variations.
1import flow360 as fl
2
3my_project = fl.Project.from_cloud("PROJECT_ID_HERE")
4# Applicable for projects with Geometry being the starting point.
5geo = my_project.geometry
6
7geo.group_faces_by_tag("groupName")
8
9# Submit a case with changed freestream velocity and angle of attack
10with fl.SI_unit_system:
11 far_field_zone = fl.AutomatedFarfield()
12
13 params = fl.SimulationParams(
14 meshing=fl.MeshingParams(
15 defaults=fl.MeshingDefaults(
16 boundary_layer_first_layer_thickness=0.001,
17 surface_max_edge_length=1,
18 ),
19 volume_zones=[far_field_zone],
20 ),
21 reference_geometry=fl.ReferenceGeometry(),
22 operating_condition=fl.AerospaceCondition(
23 velocity_magnitude=105, # Changed
24 alpha=10 * fl.u.deg, # Changed
25 ),
26 time_stepping=fl.Steady(max_steps=1000),
27 models=[
28 fl.Wall(
29 surfaces=[geo["*"]],
30 ),
31 fl.Freestream(
32 surfaces=[far_field_zone.farfield],
33 ),
34 ],
35 outputs=[
36 fl.SurfaceOutput(
37 surfaces=geo["*"],
38 output_fields=["Cp", "Cf", "yPlus", "CfVec"],
39 )
40 ],
41 )
42
43my_project.run_case(
44 params=params, name="Case of Simple Airplane from Python with modifidied freestream"
45)
Notes#
The
Project.from_cloud
method is used to instantiate aProject
object linked to an existing cloud project, identified by its unique ID.Project assets, such as the geometry, can be accessed via attributes like
my_project.geometry
.Submitting a new case via
my_project.run_case
utilizes the project structure. Flow360 will attempt to reuse existing compatible assets (e.g., surface or volume meshes) based on the providedSimulationParams
, potentially skipping mesh generation steps if suitable assets are found within the project tree.