Skywalker X8: GeometryAI surface meshing¶
This notebook reconstructs the benchmark's GeometryAI surface mesh from the public Skywalker X8 geometry. It covers geometry preparation, surface-meshing controls, and the named viewpoints used to inspect repaired gaps and openings. 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 geometry without exposing the benchmark account's private project.
import flow360 as fl
from flow360.examples import download_benchmark_assets
root_asset_files = download_benchmark_assets("Skywalker_x8", "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="Skywalker X8: surface meshing")
project.geometry.group_faces_by_tag("groupByBodyId")
Geometry preparation and meshing settings¶
The transform and complete meshing configuration match the benchmark. The automated farfield is retained because its half-body setting changes the generated surface; refinements and boundary-layer defaults remain so this notebook and the linked project share one meshing definition. Physics and solver settings are omitted.
solver_version = "release-25.11"
center_of_mass = (-21.653452, 0.0, -22.806651) * fl.u.mm
geometry_scale = 2.02861274034528
surface_max_edge_length = 15 * fl.u.mm
geometry_accuracy = 0.3 * fl.u.mm
curvature_resolution_angle = 5 * fl.u.deg
target_surface_node_count = 200 * 1e3
preserve_thin_geometry = True
remove_hidden_geometry = True
automated_farfield = fl.AutomatedFarfield(domain_type="half_body_negative_y")
near_body_refinement = fl.Box(
name="Near-body refinement",
center=(-43.89107235025507, 0.0, 47.92800906634561) * fl.u.mm,
size=(1343.0528700452733, 2583.0, 438.7235050642182) * fl.u.mm,
)
refinements = [
fl.UniformRefinement(
entities=[near_body_refinement],
spacing=8 * fl.u.mm,
),
fl.UniformRefinement(
entities=[
fl.Box(
name="Reference refinement",
center=(-110, 0, 50) * fl.u.mm,
size=(0.75, 2.5, 0.45) * fl.u.m,
axis_of_rotation=(0, 0, 1),
angle_of_rotation=27.5 * fl.u.deg,
)
],
spacing=4 * fl.u.mm,
),
]
boundary_layer_first_layer_thickness = 0.1 / 15 * fl.u.mm
with fl.create_draft(new_run_from=project.geometry) as draft:
draft._length_unit = 1 * fl.u.mm
project._length_unit = draft._length_unit
coordinate_system = fl.CoordinateSystem(
name="Skywalker X8 transform",
reference_point=center_of_mass,
axis_of_rotation=(0, 0, 1),
angle_of_rotation=180 * fl.u.deg,
scale=(geometry_scale, geometry_scale, geometry_scale),
translation=(21.653452, 0.0, 22.806651) * fl.u.mm,
)
draft.coordinate_systems.assign(
entities=list(draft.body_groups),
coordinate_system=coordinate_system,
)
with fl.SI_unit_system:
params = fl.SimulationParams(
meshing=fl.MeshingParams(
defaults=fl.MeshingDefaults(
surface_max_edge_length=surface_max_edge_length,
geometry_accuracy=geometry_accuracy,
curvature_resolution_angle=curvature_resolution_angle,
target_surface_node_count=target_surface_node_count,
boundary_layer_first_layer_thickness=boundary_layer_first_layer_thickness,
preserve_thin_geometry=preserve_thin_geometry,
remove_hidden_geometry=remove_hidden_geometry,
min_passage_size=50 * fl.u.mm,
),
refinements=refinements,
volume_zones=[automated_farfield],
)
)
params = fl.SimulationParams.model_validate(params.model_dump(mode="python"))
with fl.warning_bypass("potential_length_scale_mismatch"):
surface_mesh = project.generate_surface_mesh(
params=params,
name=f"Skywalker_x8_surface_mesh_{solver_version}",
use_geometry_AI=True,
solver_version=solver_version,
)
Wait for the surface mesh¶
The wait keeps the notebook attached until the generated surface mesh reaches a terminal state.
surface_mesh.wait()
surface_mesh
Named inspection viewpoints¶
These camera settings reproduce the benchmark's inspection angles. They help review repaired regions but do not affect mesh generation. matrix is the camera model-view transform used by the benchmark renderer.
viewpoints = {
"iso_1": {"up": [0.40824829046386274, 0.40824829046386274, 0.8164965809277264], "zoom": 2.126017854775626, "matrix": [[0.7071067811865492, 0.40824829046386785, -0.5773502691896302, -1646.759173486375], [-0.7071067811865493, 0.4082482904638676, -0.5773502691896301, -2051.533005741824], [-1.1102230246251593e-16, 0.8164965809277357, 0.5773502691896301, 1725.4148780037306], [0, 0, 0, 1]], "vertScale": 963.2590053210199},
"gaps": {"up": [-1, 0, 0], "zoom": 3.3593232541732534, "matrix": [[2.2204460492503185e-16, -1.0000000000000118, 0, -88.05151179031587], [1.0000000000000024, 2.220446049250339e-16, 0, -173.4326438291763], [0, 0, 1.0000000000000075, 3162.3437136583375], [0, 0, 0, 1]], "vertScale": 609.6185716994652},
"gap_tail": {"up": [-1, 0, 0], "zoom": 13.249523659340532, "matrix": [[2.220446049250338e-16, -1.0000000000000033, 0, 113.77005902163552], [1.0000000000000113, 2.2204460492503205e-16, 0, -64.80481362916342], [0, 0, 1.000000000000006, 3689.983192872139], [0, 0, 0, 1]], "vertScale": 185.89065601205215},
"nose_close": {"up": [0, 0, 1], "zoom": 10.542995427476095, "matrix": [[0.7071067811865492, 0, -0.7071067811865525, -3126.653050200795], [-0.707106781186549, 0, -0.7071067811865527, -2832.525413394921], [0, 1.0000000000000113, 0, -11.802958529603686], [0, 0, 0, 1]], "vertScale": 233.61127886514032},
"gap_flap": {"up": [1, 0, 0], "zoom": 14.302784566518044, "matrix": [[2.2204460492503264e-16, 1.0000000000000149, 0, 175.45625178538427], [-1.000000000000006, 2.220446049250346e-16, 0, -547.6706032204403], [0, 0, 1.0000000000000087, 3815.3965746919757], [0, 0, 0, 1]], "vertScale": 172.20161804350073},
"flap2": {"up": [-0.9678410210318038, -0.25156263237634396, 0], "zoom": 6.1098334136031, "matrix": [[0.25156263237634396, -0.9678410210318038, 0, 150.7000661653572], [-0.9678410210318038, -0.25156263237634396, 0, -774.1757221308461], [0, 0, -1, -4112.521674783411], [0, 0, 0, 1]], "vertScale": 403.11453326999225},
}
list(viewpoints)