turbo_moc.meshing.meshing_3d module#

Conforming reference meshing, spanwise deformation, volume sweep and export.

Reuses the 2D example for blade splines, smooth periodics, inflation layers, and automatic core grading. Volume assembly and CGNS auditing follow the ParaBlade mesh_examples/3D and 3D_v2 examples, without a ParaBlade dependency.

class turbo_moc.meshing.meshing_3d.CoreDeformation(section, numerics, *, sliding_boundaries=())[source]#

Bases: object

Positive-weight harmonic core displacement with protected near-wall nodes.

Every span station retains the reference connectivity. Prescribed collar coordinates are scaled with the blade, so smoothing cannot erase layers. This is a section-normal collar, not a 3D normal extrusion at a tapered wall.

Methods

deform(scale, reference, target, pitch)

Match a new section while keeping opposite periodic nodes paired.

deform(scale, reference, target, pitch)[source]#

Match a new section while keeping opposite periodic nodes paired.

turbo_moc.meshing.meshing_3d.add_cgns_periodicity(zone, node_tags, meridional_channel, length_scale=1.0, *, assembly_transform=None)[source]#

Store reciprocal vertex maps and current-to-donor rigid transforms.

turbo_moc.meshing.meshing_3d.add_cgns_units(base)[source]#

CGNS coordinates are metres, while rotational angles are radians.

turbo_moc.meshing.meshing_3d.assemble_volume(section, xyz_sections, meridional_channel)[source]#

Turn section quads/triangles into oriented hexes/prisms and surface faces.

turbo_moc.meshing.meshing_3d.boundary_types(overrides=None)[source]#

Default to reference-compatible Null; do not infer unspecified physics.

turbo_moc.meshing.meshing_3d.collect_surface_mesh()[source]#

Gather mesh polygons without any refitting or reconstructed geometry.

turbo_moc.meshing.meshing_3d.collect_volume_arrays()[source]#

Retain real cell IDs/connectivity for histograms, slicing and worst cells.

turbo_moc.meshing.meshing_3d.emit(progress, label, fraction=None)[source]#
turbo_moc.meshing.meshing_3d.export_cgns(path, settings, meridional_channel, *, assembly=None)[source]#

Write the current 3D Gmsh mesh as CGNS 3.4 ADF, and audit its BC tree.

Requires exactly one fluid physical volume plus the seven named patches. Returns statistics suitable for the example’s JSON/Markdown report. CGNS periodic patches remain named BCs; Fluent’s periodic pairing is a solver setup step, with the transform recorded in the mesh summary and MSH file.

turbo_moc.meshing.meshing_3d.export_mesh(mesh_dir, config, output_dir, *, progress=None)[source]#

Export existing connectivity; filename/BC/unit edits do not remesh.

turbo_moc.meshing.meshing_3d.export_reference_mesh(mesh_dir, config, output_dir, *, progress=None)[source]#

Export existing 2D cells, with physical coordinates for a linear cascade.

Annular reference cells remain in the length-scaled conformal chart. Their explicit descriptor prevents confusing this design grid with a physical Cartesian two-dimensional CFD domain. Export never regenerates a mesh.

turbo_moc.meshing.meshing_3d.generate_section(blade, curves, numerics, *, progress=None)[source]#

Build reference topology and statistics in the caller’s Gmsh session.

The staged workflow owns initialization, finalization and artifact files. Keep CAD, inflation, grading and extraction here so they have one owner.

turbo_moc.meshing.meshing_3d.load_mesh_surfaces(mesh_file, surfaces=('blade', 'inlet', 'outlet', 'periodic_left', 'periodic_right', 'hub', 'shroud'))[source]#

Read selected physical boundaries as compact points and polygon arrays.

turbo_moc.meshing.meshing_3d.load_section(directory)[source]#
turbo_moc.meshing.meshing_3d.main(config_file, output_dir='output', *, row_id=None)[source]#

Solve MoC, construct one reference mesh, sweep it and optionally export.

This is the same numerical sequence used by the app, without an embedded browser. Native viewers and previews follow the workflow YAML. Configuration imports are deferred to avoid a validation cycle.

turbo_moc.meshing.meshing_3d.pyvista_options(options)[source]#

Validate YAML surface selection and the mesh-line toggle.

turbo_moc.meshing.meshing_3d.reference_mesh(design, config, output_dir, *, progress=None)[source]#

Generate and publish a 2D mesh only; no span sweep or volume export.

turbo_moc.meshing.meshing_3d.save_section(directory, section, design)[source]#
turbo_moc.meshing.meshing_3d.validate_volume(section, xyz_sections, meridional_channel)[source]#

Check Jacobians, seven exterior patches and a complete periodic bijection.

turbo_moc.meshing.meshing_3d.view_mesh_pyvista(output_dir, options, *, show=True, save_figure=False)[source]#

View selected surfaces of one passage and its full row; save a safe preview.

turbo_moc.meshing.meshing_3d.volume_mesh(section, design, config, output_dir, *, progress=None)[source]#

Sweep the supplied reference artifact; never refit, recenter or remesh.