Crewed reentry vehicle: GeometryAI surface meshing¶

This notebook rebuilds the benchmark's GeometryAI surface mesh of a crewed reentry vehicle, a capsule and its trunk, imported from a single STEP assembly. It keeps the 90° rotation applied to the assembly and meshes the whole vehicle with one set of global settings, without local refinements. Volume meshing and the downstream health case are available in the linked Flow360 project, but are intentionally outside this notebook.

Requirements¶

Install and configure the Flow360 Python API using the installation and setup guide. This notebook targets the latest client with the public benchmark-asset helper:

pip install "flow360>=25.10.4"

Run the cells from top to bottom in one kernel.

Imports and public input geometry¶

The public snapshot contains the source STEP assembly without exposing the benchmark account's private project. The geometry is imported in inches with the v2 CAD importer, as in the benchmark.

In [ ]:
import flow360 as fl
from flow360.examples import download_benchmark_assets
In [ ]:
solver_version = "release-25.12"

root_asset_files = download_benchmark_assets("Crewed_Reentry_Vehicle", "root_assets")
geometry_files = [
    file for file in root_asset_files
    if "/results/" not in file and "/logs/" not in file
    and file.lower().endswith((".csm", ".egads", ".stp", ".step", ".iges", ".igs", ".stl"))
]
project = fl.Project.from_geometry(
    geometry_files,
    name="Crewed reentry vehicle: surface meshing",
    solver_version=solver_version,
    length_unit="inch",
    cad_importer_version="v2",
)

Geometry preparation and meshing settings¶

The assembly is rotated 90° about the vertical axis before meshing. The complete benchmark meshing configuration is retained: the global meshing defaults and the automated farfield. Physics and solver settings are omitted.

In [ ]:
with fl.SI_unit_system, fl.create_draft(
    new_run_from=project.geometry,
    face_grouping="groupByBodyId",
    edge_grouping="edgeId",
) as draft:
    z_rotation = draft.coordinate_systems.add(
        coordinate_system=fl.CoordinateSystem(
            name="Z Rotation",
            axis_of_rotation=(0, 0, 1),
            angle_of_rotation=90 * fl.u.deg,
        )
    )
    draft.coordinate_systems.assign(
        entities=list(draft.body_groups),
        coordinate_system=z_rotation,
    )

    farfield = fl.AutomatedFarfield()
    params = fl.SimulationParams(
        meshing=fl.MeshingParams(
            defaults=fl.MeshingDefaults(
                surface_max_edge_length=1 * fl.u.inch,
                curvature_resolution_angle=6 * fl.u.deg,
                geometry_accuracy=1 * fl.u.mm,
                target_surface_node_count=1.25e6,
                remove_hidden_geometry=True,
                preserve_thin_geometry=True,
                boundary_layer_first_layer_thickness=0.05 * fl.u.mm,
            ),
            volume_zones=[farfield],
        ),
    )

    params = fl.SimulationParams.model_validate(params.model_dump(mode="python"))
    surface_mesh = project.generate_surface_mesh(
        params=params,
        name=f"Crewed_Reentry_Vehicle_surface_mesh_{solver_version}",
        solver_version=solver_version,
        use_geometry_AI=True,
    )

Wait for the surface mesh¶

The wait keeps the notebook attached until the generated surface mesh reaches a terminal state.

In [ ]:
surface_mesh.wait()
surface_mesh

Named inspection viewpoints¶

These camera settings reproduce the benchmark's inspection angles over the full vehicle, the capsule details, the capsule-to-trunk interface, the trunk panels and a close-up of the bolt heads on an access panel. They help review the mesh but do not affect mesh generation. matrix is the camera model-view transform used by the benchmark renderer, and vertScale is the height of the orthographic view.

In [ ]:
viewpoints = {
    "ISO-1": {"up": [0.44487210443346337, 0.26678984504686193, -0.8549339093034114], "zoom": 1.9722881205016476, "matrix": [[-0.53363678590201, 0.4448721044334644, -0.7192500201106106, -413.9263327684033], [0.8456010900903149, 0.2667898450468617, -0.4623656291485594, -270.3868403807813], [-0.013804969041760321, -0.8549339093034114, -0.5185532118818122, -319.45592043702953], [0, 0, 0, 1]], "vertScale": 195.00263511087516},
    "BACK-ISO": {"up": [0.16233234041111974, 0.02907703973655165, 0.9863076279826732], "zoom": 2.1285531893178935, "matrix": [[-0.3447279921030874, 0.16233234041111957, 0.9245597994273936, 677.2987971804438], [0.9382521714447202, 0.029077039736551395, 0.34472799210308736, 238.00943583021203], [0.029077039736551732, 0.9863076279826731, -0.16233234041111966, -102.41621869219021], [0, 0, 0, 1]], "vertScale": 180.68676067190228},
    "NOSE-DETAILS": {"up": [0.061432705893701374, 0.06325488472960131, 0.9961048349468156], "zoom": 7.78071019078741, "matrix": [[0.6701243972331637, 0.061432705893701305, -0.7397021798531263, -567.9700583621213], [-0.7422261112539829, 0.06325488472960138, -0.6671575670938874, -477.7308446661714], [0.0058044815168083455, 0.9961048349468156, 0.08798559990076892, 105.23334067115042], [0, 0, 0, 1]], "vertScale": 49.426460199757244},
    "DETAIL": {"up": [0.032120798079017895, -0.9943120973303508, 0.10154657765422402], "zoom": 24.419202411426202, "matrix": [[0.9865322276670042, 0.03212079807901755, -0.16038210032649608, -82.83331047969016], [0.015237430819940636, -0.9943120973303519, -0.10541002705874715, -122.16055744460358], [-0.1628557167445422, 0.1015465776542236, -0.9814103668141771, -637.6331529933019], [0, 0, 0, 1]], "vertScale": 15.748792941363664},
    "SIDE-BACK-BETTER": {"up": [0.0006120974008701604, 0.8234444373546558, 0.5673965843450647], "zoom": 4.56268201258786, "matrix": [[0.9999773300718132, 0.0006120974008701596, -0.006705570759968535, 65.69653213321712], [-0.004308736333198026, 0.8234444373546549, -0.5673805542851161, -391.2039747521416], [0.00517437277900192, 0.5673965843450643, 0.8234284072947071, 587.3475869381306], [0, 0, 0, 1]], "vertScale": 84.28660193934435},
    "FOR-CLASSIFICATION": {"up": [0, -0.7071067811865475, 0.7071067811865475], "zoom": 2.1285248324224324, "matrix": [[0.9999999999999984, 0, 0, 8.743688738936573], [0, -0.7071067811865478, -0.7071067811865477, -561.1542260513154], [0, 0.7071067811865471, -0.7071067811865483, -559.0022633999763], [0, 0, 0, 1]], "vertScale": 180.6895260816137},
    "BOLT-CLOSE-UP": {"up": [0.40824829046386274, 0.40824829046386274, 0.8164965809277264], "zoom": 36.34489725241226, "matrix": [[0.7071067811865475, 0.4082482904638629, -0.577350269189626, -434.47303130940884], [-0.7071067811865476, 0.4082482904638626, -0.5773502691896258, -379.02487623288187], [-1.6653345369377348e-16, 0.8164965809277259, 0.5773502691896255, 438.2696483243819], [0, 0, 0, 1]], "vertScale": 10.58199113962745},
}
list(viewpoints)