DC-DC converter: GeometryAI surface meshing¶
This notebook reconstructs the benchmark's GeometryAI surface mesh for a detailed converter and ducted-fan assembly. It focuses on geometry grouping and the surface controls that preserve thin fins, small passages, and curved components. Volume meshing, the rotating zone, physics, 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 CAD 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("converter_DC_MRF", "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="DC-DC converter: surface meshing")
Geometry preparation and meshing settings¶
Faces are grouped by source body and edges by source edge. The complete benchmark meshing configuration is retained, including the automated farfield, octree spacing, rotation zone, uniform refinement, and boundary layer. Physics and solver settings are omitted.
solver_version = "release-25.12"
with fl.SI_unit_system, fl.create_draft(
new_run_from=project.geometry,
face_grouping="groupByBodyId",
edge_grouping="edgeId",
) as draft:
draft._length_unit = 1 * fl.u.mm
project._length_unit = draft._length_unit
cylinder = fl.Cylinder(
name="Cylinder",
axis=(0, 1, 0),
center=(0, 27.3, 0.25) * fl.u.mm,
height=7 * fl.u.mm,
outer_radius=19.5 * fl.u.mm,
)
farfield = fl.AutomatedFarfield(method="auto", relative_size=50)
params = fl.SimulationParams(
meshing=fl.MeshingParams(
defaults=fl.MeshingDefaults(
surface_max_edge_length=5 * fl.u.m,
curvature_resolution_angle=12 * fl.u.deg,
geometry_accuracy=0.05 * fl.u.mm,
sealing_size=0 * fl.u.m,
remove_hidden_geometry=True,
min_passage_size=0.05 * fl.u.mm,
target_surface_node_count=1e6,
preserve_thin_geometry=True,
boundary_layer_first_layer_thickness=0.1 * fl.u.mm,
octree_spacing=fl.OctreeSpacing(base_spacing=0.1 * fl.u.mm),
),
volume_zones=[
farfield,
fl.RotationVolume(
name="Rotation zone",
entities=[cylinder],
enclosed_entities=[
draft.surfaces["body00002"],
draft.surfaces["body00003"],
],
spacing_axial=2.5e-1 * fl.u.mm,
spacing_radial=2.5e-1 * fl.u.mm,
spacing_circumferential=2.5e-1 * fl.u.mm,
),
],
gap_treatment_strength=0.1,
refinements=[
fl.UniformRefinement(
name="Uniform refinement",
entities=[cylinder],
spacing=2.5e-1 * fl.u.mm,
),
fl.BoundaryLayer(
name="Boundary layer refinement",
faces=[draft.surfaces["body00003"]],
first_layer_thickness=0.001 * fl.u.mm,
),
],
)
)
params = fl.SimulationParams.model_validate(params.model_dump(mode="python"))
surface_mesh = project.generate_surface_mesh(
params=params,
name=f"converter_DC_MRF_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.
surface_mesh.wait()
surface_mesh
Named inspection viewpoints¶
These camera and body-visibility settings reproduce the benchmark's inspection angles. They help review the fan, top surface, and internal details but do not affect mesh generation. matrix is the camera model-view transform used by the benchmark renderer.
viewpoints = {
"iso_1": {"hiddenBodies": ["body00073", "body00070", "body00002", "body00003"], "renderAllBodies": True, "filteredVertScale": 85, "up": [-0.3596473766186481, 0.71235912545657, 0.602659307461584], "zoom": 1.2681778250102456, "matrix": [[-0.8402758071349966, -0.35964737661864743, 0.40569734092665155, 62.43820809734093], [0.03356124131120216, 0.7123591254565697, 0.7010122106357368, 119.86493169485324], [-0.541119405515347, 0.6026593074615838, -0.5865079267193599, -86.6628258236852], [0, 0, 0, 1]], "vertScale": 106.72302199723282},
"top_1": {"hiddenBodies": ["body00073", "body00070", "body00002"], "up": [0, 0, 1], "zoom": 1.856739153597502, "matrix": [[-1.0000000000000004, 0, 0, -0.2303886251468068], [0, -4.4408920985006247e-16, 1, 188.7389957650554], [0, 0.9999999999999997, 4.440892098500626e-16, -0.17301588960171466], [0, 0, 0, 1]], "vertScale": 72.89326002133238},
"Fan_close": {"up": [0.00823878651585384, 0.58992282802773, 0.8074175991198802], "zoom": 3.1662844822789156, "matrix": [[-0.9996475399468296, 0.008238786515853832, 0.02523723984506076, 4.307077039235329], [0.02523723984506075, 0.5899228280277287, 0.807065139066711, 160.91064768369247], [-0.008238786515853807, 0.80741759911988, -0.5899228280277294, -96.44494482704495], [0, 0, 0, 1]], "vertScale": 42.74529678949075},
"internal_2": {"hiddenBodies": ["body00073", "body00070", "body00002", "body00003"], "up": [0.7337890712550434, 0.4280361274569884, -0.5275781198062388], "zoom": 350.2983650171271, "matrix": [[0.5869958678059506, 0.733789071255042, -0.34203720570341883, -6784.312668841882], [-0.008486877111416527, 0.428036127456987, 0.9037217749443265, 17932.465869341377], [0.8095454428848595, -0.5275781198062374, 0.25748301576235444, 5107.659536285422], [0, 0, 0, 1]], "vertScale": 34.00662076911256},
}
list(viewpoints)