TorsoCAE Documentation
What is TorsoCAE?
TorsoCAE is an AI-driven, browser-based CAD pre-processor and multi-physics simulation platform. Import geometry or a mesh, prepare the model, solve structural, thermal, CFD, CHT, FSI, or contact problems, and inspect the results in one workspace.
Choose Torso + DOLFINx, Torso + MFEM, Kratos, the native Torso shell solver, or supported PINN workflows. Linear systems can also use TorsoHPC remote solvers when additional compute capacity is available.
Three ways to drive it: point-and-click in the browser, replay a recorded Python journal, or ask Sesame, the built-in AI CAE expert. Model-building and solve actions share the same state contract; post-display state is saved with the project, while collaboration remains live session state rather than a solver journal action.
Three Workflows
Build the same model interactively, from a reproducible Python journal, or by asking Sesame.
| Workflow | How it runs | When to use |
|---|---|---|
| Manual | You click in the browser. Each action also pushes a journal entry. | Exploration, ad-hoc geometry, learning the tool. |
| Journal | Run a recorded or authored journals/*.py file while the browser follows its progress. |
Reproducing a setup, parameter sweeps, regression tests. |
| AI | Ask Sesame in plain English to create geometry, assign conditions, configure models, solve, report, or control the viewport. | Quick scaffolding, "create a box with a hole", routine ops where typing the click sequence is tedious. |
Model state is kept consistent across interactive use, journal playback, project restore, and Sesame actions.
Assets & Projects
The Assets tab keeps account-owned files in four groups: CAD, meshes, TorsoCAE projects, and journals. Upload and open CAD in one action, import Nastran, CGNS or Abaqus/CalculiX meshes, load a .tcae project, or play a journal. Search, thumbnails, download, and delete controls are available in the same panel.
A .tcae project stores the model setup, geometry and mesh references, conditions, solver/model settings, reports, scene workspaces, annotations, and optionally solver results. When results are included, every available transient, nonlinear, or modal frame is stored so the frame slider remains usable after restoration.
Saving an opened project creates a dated version when its saved state or CAD, mesh, or result bytes change. Enter an optional description in Project Notes before saving. The notes show a readable list of changed settings; the archive keeps exact machine-readable state changes and immutable copies of changed geometry and mesh data. On opening a versioned project, choose Original or a later version before its resources are restored. Versions saved without solver results restore their setup and are marked “Setup only.”
Project save checks that referenced CAD, mesh, and requested result files are present before replacing the server's working archive. It verifies every stored version, writes the replacement atomically, and keeps one verified previous copy. If the working archive is damaged, opening it from Assets offers that previous copy for recovery without deleting the damaged file.
Press Ctrl+S to open the TorsoCAE save dialog instead of the browser's page-save dialog. Select Include results when the project must be post-processable without rerunning the solve.
CAD Import & Edit
Drop a STEP / IGES / BREP / STL / OBJ / GLB / USD file into the upload zone, or paste a server-relative path into the AI assistant ("import cadex/tumbler.step").
Parasolid (optional): When enabled by the server, import .x_t or .x_b through the same upload, Assets, Sesame, or session.upload(...) workflow. The licensed OCCT reader preserves supported geometry, assemblies, names and colors and prepares STEP for editing and meshing. Sheet bodies remain surfaces. Imported bodies retain their original XT source alongside the prepared STEP in saved projects. Existing prepared projects can reopen with Parasolid import disabled. Parasolid PMI/GD&T transfer is not provided by this reader.
USD (.usd / .usda / .usdc / .usdz): A USD stage imports as native faceted CAD: closed shells become solids and open or non-manifold surfaces become sheets, so transforms, edits and meshing work as for STEP. USD stores render meshes, already a faceted approximation of the original design, so every face is a planar facet: there are no analytic cylinders or fillets for defeature or dimensioning, and meshes are at least as fine as the facets. A multi-file package such as an NVIDIA SimReady asset keeps its layers in subfolders: in Assets → CAD choose Upload Folder, then import the root layer (textures and MDL are not needed and are skipped). A single .usdz or self-contained layer can be uploaded directly. Every referenced layer must be inside the root layer's folder; absolute paths, URLs, symlinks and missing layers are refused. The authored variant selections are used, instances and point instancers are expanded, and guide, proxy and invisible prims are skipped. Coordinates are converted to millimetres and Z up from the stage's metersPerUnit and upAxis (USD defaults: centimetres, Y up). Bodies follow rigid bodies, then component models; names come from the prims. Physics densities, friction, authored masses and joints are reported with the import (hover the status line, or ask Sesame) as information only: USD carries no stiffness, so assign structural materials yourself; joints are not turned into interfaces.
USD face budget: Settings → CAD Import → USD face budget (default 50,000) sets how many faces an import builds. Within the budget every USD polygon becomes one face exactly as authored. Above it each body is simplified by the same ratio: neighbouring polygons merge into fewer, larger triangles that sit slightly off the source surface. Parts of up to 256 triangles stay exact, and no part may cross itself or move more than 1% of its own size, so assemblies of many small parts can end above the budget. The import notices give the face count and the largest distance of a source vertex from the result. Import time, memory (about 20 KB per face to build) and meshing time grow roughly in proportion to the face count. Lower the budget for faster imports and coarser meshes; raise it for a closer surface, within what the server's memory can hold. Low budgets on assemblies with interpenetrating parts may not volume-mesh; raise the budget. Each budget keeps its own prepared file, so returning to a budget used before skips the conversion.
Faceted surfaces: Facets are grouped into smooth surfaces (Patch 1, Patch 2, …) for selection, boundary conditions and mesh surface tags: a crease sharper than 40° starts a new surface, and slivers under 0.1% of a body's area join their neighbour, so a smooth body such as a tire is one surface. Grouping changes only what you pick and tag; every facet keeps its position, at any budget. The same grouping applies to any CAD solid or sheet of at least 50 flat triangle or quad faces without holes, such as STEP exported from a mesh.
OBJ preparation: OBJ contains polygon surfaces, not analytic CAD. You can translate, rotate, mirror, scale and stretch an OBJ body, mesh its surface, or generate a volume mesh when it is closed and manifold. OBJ group surface tags are retained when meshing. Coordinates retain their source units. For an open or defective surface, use CAD → Shrink-wrap to create a closed analysis envelope. Shrink-wrap changes geometry at its selected cell size; inspect thin walls, wings and small features before solving. The feature-conforming method uses the same surface for display and meshing; invalid projections report an error. Solid booleans, fillets and CAD feature edits require the prepared CAD body. Surface meshing preserves the imported triangulation; a smaller mesh-size setting alone does not refine that surface.
Edit operations
- Heal Geometry — repairs gaps, sliver faces, missing topology. Run this first on imported CAD before any other edit.
- Defeature — use the operation dropdown to remove small cylindrical holes, analytic fillets, chamfers, selected logo/text faces, or merge small coplanar faces. Removal creates a new body and hides the source to avoid displaying both shapes in the same place; use the source's Geometry tree checkboxes to compare them. The other choices inspect thin planar regions, candidate symmetry planes, separate solids, and solid interference without changing the model. Lengths use CAD units; interference uses a minimum overlap volume in CAD units cubed. Review inspection candidates before using them for a simulation setup.
- Merge Smooth — dissolves edges between smoothly-curved faces within an angle tolerance.
- Fuse Geometry — fuses selected faces that lie on the same underlying surface (planes, cylinders, cones, spheres, tori).
- Split by Size — cuts faces larger than a threshold with axis-aligned planes; useful before meshing very large flat regions.
- Split at Bends — inserts boundaries wherever adjacent faces exceed the bend angle; recovers feature edges after a healing/merge that was too aggressive.
Defeature choices
| Choice | Use | Threshold |
|---|---|---|
| Small holes | Remove complete cylindrical holes and their connected small caps or countersinks. | Maximum radius, CAD length units |
| Small fillets | Suppress qualifying analytic blends. | Maximum radius, CAD length units |
| Small chamfers | Suppress qualifying narrow planar chamfers. | Maximum width, CAD length units |
| Selected logos/text | Remove the CAD faces selected in the viewport. | No size required |
| Small faces | Merge narrow faces only when they share the same plane with a neighbor. | Maximum width, CAD length units |
| Thin regions | Report candidate gaps between opposing planar faces. | Maximum thickness, CAD length units |
| Symmetry | Report candidate planes from matching CAD vertices; review the surfaces before applying a symmetry condition. | Match tolerance, CAD length units |
| Separate solids | List solids within the selected CAD body. | None |
| Interference | Report overlaps between solids within the selected CAD body. | Minimum overlap volume, CAD units cubed |
Choose a threshold from the feature sizes you intend to remove; the initial value in the box is not a recommended tolerance. A removal adds a derived body and hides the source so the two shapes do not overlap in the viewport. The source and its conditions remain available in the Geometry tree. If no feature matches or the solid does not change, no derived body is created. Inspect choices leave the geometry untouched.
Journal example: session.edit("defeature", {"mode": "small-holes", "max_size": 3.0}, output="new"). For inspection: report = session.edit("defeature", {"mode": "symmetry", "max_size": 0.01})["defeature_report"]. Sesame can use the same operations; for selected logo or text faces, select them first and ask Sesame to remove the selected decoration.
CSG Bodies
Constructive Solid Geometry runs as a separate workflow from file import. Build geometry from primitives + boolean operations, transform individual bodies, then mesh whichever body you care about.
Primitives
| Shape | Parameters |
|---|---|
| Box | dx, dy, dz, cx, cy, cz |
| Sphere | r, cx, cy, cz |
| Cylinder | r, h, cx, cy, cz |
| Cone | r1, r2, h, cx, cy, cz (r2 = 0 for pointed) |
| Torus | r1, r2, cx, cy, cz (r1 = ring, r2 = tube) |
cx / cy / cz use the coordinates shown in the viewport.
Extrude profiles
CSG Create / Edit: Create uses the primitive and profile controls. Boolean controls below the editor provide Union, Cut, Intersect and Partition in both Create and Edit. A new primitive opens its dimensions in Edit. Choose a body, an operation and, when the body has several features, the feature to edit. Construction steps and operand parameters are edited in the CSG panel. Drag a box face to change its dimension, a cylinder or sphere wall to change radius, or a torus surface to change tube radius. Cone end radii and torus major radius have separate dimension handles. Extrusion length and revolution angle are also editable. A selected Boolean-result surface edits its originating operand while retaining the Boolean result. Shared surfaces expose their owning construction steps in the CSG panel. Releasing commits the drag; Escape cancels it. Typed changes use Apply or Cancel. Undo/redo restores committed edits. Named variables are optional under Parameters; dimensions driven by compound expressions retain those expressions and are edited through their source parameters.
Fillet and Chamfer: choosing the operation immediately enables edge highlighting and selection. Changing a dimension keeps the edge filter active. For Flange, select its planar face and then its edge. Profile / hole supports circles and rectangles on a planar face, with local u/v offsets from the face centroid. Choose Join or Cut for a profile. This is a dimensioned face-profile operation, not a general constrained sketcher.
Flange: choose the broad planar sheet face and a straight edge, then set matching thickness, inner bend radius, tangent wall length, angle between 0 and 180 degrees, and direction (+1/-1). The arrow changes length; the ring changes angle. Lightweight geometry follows dragging while exact native previews are coalesced. A completed drag commits one edit; Escape cancels an active drag. Typed changes use Apply or Cancel. Curved-edge flanges, corner relief and unfolding are not included.
Authored Union, Cut and Intersect results retain editable copies of their operand feature histories and independent parameters. Editing those features rebuilds the result; it does not edit the separate original operand bodies. Existing transform and partition tools remain available through their established paths. Saved projects retain exact CAD and construction definitions. Imported feature bases require one solid; existing derived meshes must be removed before modifying their CAD, and completed result files are retained.
Python equivalents are session.cad_design(definition, body_id=...), session.cad_parameters(values, body_id=...) and session.cad_design_info(body_id). Sesame uses the same commands through cad_design and inspect_cad_design. The portable example is journals/cad_parametric_flange1.py.
- Polygon —
sides, radius - I-section —
H, B, tw, tf - NACA airfoil — 4-digit series +
chord - User-defined parametric curve — multiline assignments defining a closed XY curve, using earlier variables and parameter
t.
All extrudes accept length, draft (degrees, ±45 in the panel), and twist (degrees per unit length, default 0). Draft is a side-wall taper: positive narrows away from the starting plane, negative widens. Twist rotates about the profile's Z axis through the origin; total rotation is twist multiplied by length. With the panel's meter units, 4500 deg/m over 0.02 m gives 90 degrees. Positive rotation is right-handed about +Z. Draft and twist can be combined; offsets that collapse or split the profile are rejected rather than silently changed. Combined draft/twist supports up to ten turns per extrusion.
Automatic parametric dimensions
Shift-click the title-bar Dim button and check Auto dimensions. A normal click then shows the defining dimensions of all visible parametric bodies; click again to hide them. Adding, hiding, editing or deleting a body updates its annotations automatically. Boolean results include labelled dimensions of their operand features, including hole radii. Values refresh after geometry edits and the display setting is restored with the project. Dimension lines, extension lines and radius arrows appear beside the geometry, using millimetres and degrees. Full parameter names, positions and expression details are listed in the Shift-click menu. These annotations display the stored design parameters and do not modify geometry. Direct face and CAD-node measurement remains active when Dim is enabled, whether Auto dimensions is checked or not. Unchecking Auto dimensions removes only the automatic annotations. Hide All applies to both annotation types; Clear All removes the current annotations.
Boolean ops
- Union A ∪ B — merge two bodies
- Cut A − B — subtract B from A
- Intersect A ∩ B — keep overlap only
- Partition — split A by B while retaining every part of A
The Boolean controls are visible below the CSG editor in both Create and Edit. Select Body A, Body B and the operation, then Apply Boolean. Each operation creates a result body and preserves its inputs. Authored Union/Cut/Intersect results retain copies of operand construction definitions; changing an operand dimension in the result regenerates that Boolean. Partition uses the existing exact-geometry path.
Transforms (in-place edit)
Translate, rotate, mirror, scale (uniform), or stretch (non-uniform) any body. Conditions already assigned to the body remain associated with it after an in-place transform.
Meshing
Pick an algorithm, set a size factor, click Mesh. The body selector determines which CSG body or imported solid is meshed.
Size factor
Multiplier on Gmsh's automatic mesh size. 1.0 = default, 0.5 = roughly twice as fine, 2.0 = roughly twice as coarse. min_size / max_size override absolute bounds (leave blank for auto).
Algorithms
See the algorithm reference for full details. Quick guide:
- Delaunay — default tetrahedral mesher, general purpose.
- HXT — fastest tet mesher (parallel). Use for large parts.
- Frontal — slower than Delaunay but produces higher-quality tets.
- Hex-Dominant — mixed hex / tet (~80% hexes by element count on box-like geometry).
- Hex-Transfinite — pure all-hex structured mesh. Only works on box-like volumes (6 faces, 4 edges each); silently skipped on others.
Element order
Order 1 = linear elements (Tet4, Hex8). Order 2 = quadratic (Tet10, Hex27). Quadratic elements resolve curved geometry and stress gradients more accurately, with more degrees of freedom and compute cost. DOLFINx and MFEM preserve the midside geometry and field nodes for supported structural solid models; a submodel that lacks quadratic support reports an explicit error.
Mesh-first (no CAD required)
Two additional mesh algorithms build a mesh object directly, without a CAD body:
- Structured Hex8 — block-structured all-hex grid over a Cartesian, cylindrical, or spherical domain (bounds +
divisionsper axis). Only valid for logically block-structured smooth maps — channels, boxes, annular/cylindrical sectors, spherical shells away from the poles. - Octree Cut — voxelized Cartesian Hex8 mesh from analytic implicit geometry (sphere/box/cylinder + CSG union/intersection/difference) or CAD-tagged geometry. Every leaf cell refines uniformly to
max_level; boundary quads are real Hex8 faces tagged by nearest-surface lookup, so this is a conforming, body-fitted mesh usable by normal solvers (structural, thermal, CFD, MFEM) — not a CutFEM/embedded-boundary mesh. Geometry is a voxelized/staircase approximation of the true boundary, not exact BREP conformance.
Imported Nastran, CGNS and Abaqus/CalculiX files, inline journal meshes, and generated mesh-first models appear in Components like CAD-derived meshes. Apply boundary conditions directly to their surface tags and volume conditions directly to their listed volume or mesh domain; CAD is not required.
Abaqus / CalculiX mesh decks
Import .inp or CGX Abaqus-format .msh through Assets → Mesh. Upload the main deck and its include files together, or choose Upload Folder to preserve subdirectories. Then import the main deck. Relative *INCLUDE paths must stay under its directory; missing files, cycles, symlinks and absolute paths are rejected. Companion set, surface and load files remain visible in Assets. Gmsh-format .msh is a different format and is not supported by this importer.
The native reader retains original IDs, named node/element sets, named solid-face surfaces and quadratic connectivity. By default Hex20 geometry is completed to Hex27, with conforming Quad9 boundaries, for the current solvers; shared nodes and curved geometry are preserved. Administrators can set MESH_CONVERT_SERENDIPITY_TO_COMPLETE=0 in .env to retain serendipity elements instead (backend support is still required). Coordinates retain source units. Constant isotropic materials and simple zero translational supports are imported where representable. Loads, contact, specialized material laws and analysis steps require review and setup in Torso; import notices identify unhandled keywords. Element integration/formulation is selected by Torso's backend rather than copied from the source solver. Part instances and geometry-changing commands require a flat explicit-node/element export.
mesh = session.import_inp_mesh("meshex/engine/model.inp", name="Engine")
for notice in mesh.get("warnings", []):
print(notice)
Mesh Edits
Once a mesh exists, geometric mesh editing operates on the patch data directly without re-meshing the CAD.
- Translate / Rotate / Mirror — rigid-body transforms of the whole mesh.
- Copy, Mirror-Copy — duplicate the mesh in place; the copy becomes the new active mesh, original is preserved.
- Move Node — drag a single mesh node to a new position.
- Morph — Laplacian or RBF deformation with per-tag boundary conditions (fixed, constant displacement, or per-vertex prescribed).
- Split Boundary by Size / Bends — divide an aggregated imported boundary into selectable tags while keeping the largest piece on the original tag.
All coordinates are in viewer space; the mesh editor handles the Gmsh-local conversion.
Boundary Conditions & Materials
Selection
Click a face in the viewport to select it (becomes a surface tag). Shift-click to add multiple. Selected faces show in the BC panel on the right.
Surface groups
Group multiple faces under a single name (Group Surfaces) so a single BC entry covers all of them. Useful when a logical surface was split into multiple faces by a CAD edit. Groups can be renamed or deleted from the tree.
BC types
| Type | Applies to | Values |
|---|---|---|
fixed / free | Structural | (none); components restricts to a subset of axes |
symmetry | Structural | (none) — constrains displacement normal to the selected planar boundary and leaves tangential displacement free |
spring | Structural (MFEM hyperelastic excluded) | [Kx, Ky, Kz] in the global frame or [Kn, Kt] in the surface frame (N/m³) |
traction | Structural | [tx, ty, tz] (N/m²) |
pressure | Structural | scalar (Pa, +ve = inward) |
displacement | Structural | [ux, uy, uz] (m); components prescribes only those axes and leaves the others free |
rbe2 | Structural (DOLFINx / MFEM only, not Kratos) | reference point plus dependent x/y/z components; supported linear and finite-rotation models accept optional translation springs (N/m) and rotation springs (N·m/rad) on its six reference DOFs |
contact_slave / contact_master | Structural — Contact Mechanics | see contact section |
sea_input_power / sea_point_force | Structural — Statistical Energy Analysis | W, or N rms on a plate, per band: one value or [[f_Hz, value], ...] |
fixed_temp | Thermal | scalar (K) |
heat_flux | Thermal | scalar (W/m²) |
convection | Thermal | [h, T_inf] |
radiation | Thermal — DOLFINx / MFEM | Emissivity (constant or expression in surface temperature T, kelvin), and surroundings temperature or an enclosure. Radiation can also be added to convection, heat flux or fixed temperature. |
adiabatic (alias insulated) | Thermal | (none) |
wall (alias no_slip) | Incompressible CFD | (none) — zero-velocity wall |
moving_wall / wall_velocity | Incompressible CFD (DOLFINx only) | [vx, vy, vz] (m/s) — prescribed-velocity wall, e.g. lid-driven cavity |
symmetry / slip / free_slip / slip_wall | Incompressible CFD | (none) — zero-normal-velocity slip wall / symmetry plane |
inlet_velocity | Incompressible CFD | [vx, vy, vz] (m/s); components may be x/y/z/t expressions where supported by the backend |
inlet_velocity | Compressible DGFV | numeric [vx, vy, vz] (m/s) |
outlet_pressure | Incompressible & compressible CFD | scalar (Pa) |
farfield | Compressible DGFV | (none) — uses the volume's freestream state |
wall / symmetry | Compressible DGFV | (none) — inviscid slip flux; not a no-slip wall |
For geometric nonlinear static, geometric nonlinear dynamics, and flexible multibody dynamics, structural traction and pressure conditions expose Follower Load. A follower traction rotates with the deformed surface while retaining its prescribed magnitude; follower pressure acts on the current normal and current area. Both backends include the corresponding load stiffness in the Newton tangent. Leave the option off for the original dead-load behavior.
Expression-enabled condition values may use x, y, z, t, geometry bounds such as xmin/xmax, radial coordinate r, pi, and sin, cos, tan, exp, log, sqrt, and abs. Components may mix numbers and expressions, for example [0, "-1.5e7*sin(pi*t)", 0]. Use ** for powers. Expression availability follows the selected BC and backend; unrelated material, solver, and geometry parameters remain numeric.
Thermal radiation
Use Thermal → Thermal Radiation for a radiation study, or add radiation to an existing thermal, ThermoElastic or CHT setup on DOLFINx or MFEM. In Components → Conditions → Boundary, select faces or a surface group and choose Radiation. To combine cooling mechanisms, choose Convection and enable Radiation in the same boundary controls. Applying radiation does not replace the convection condition.
To surroundings needs emissivity and the radiation surroundings temperature in kelvin. This temperature can differ from the convection air temperature. Emissivity accepts a constant between 0 and 1 or an expression such as 0.6 + 0.0002*(T-300); T is the local surface temperature in kelvin. Arithmetic, powers, standard math functions, minimum, maximum, clip and where(condition, a, b) are supported. Invalid emissivity values are reported, never silently clipped.
Surface to surface needs an enclosure defined in the Model panel. Assign its name and a surface emissivity to each participating face. A closed enclosure must contain all enclosing surfaces. An open enclosure also takes a surroundings temperature. Occlusion and reflected radiation are included for opaque diffuse-gray surfaces separated by a transparent medium. Participating gases, spectral radiation, glass transmission and specular reflection are not modeled.
For Solve with heat transfer, Torso iterates the temperature field and radiative flux to thermal equilibrium. For Prescribed on radiating surfaces, available in the Thermal Radiation submodel, assign Fixed Temperature with radiation enabled on each radiating face. This calculates surface exchange only; no volume temperature or conductive heat-flux solution is produced. Prescribed temperatures are currently face constants, not a transfer from an earlier result.
Patch size controls radiation resolution independently of the thermal mesh: 0 uses each boundary facet, while a positive size groups nearby facets with similar normals. Increase rays per patch and refine patch size or surface tessellation to check exchange accuracy. In partitioned fluid/solid CHT, each enclosure currently belongs to one constituent domain; an enclosure spanning both domains is rejected. Radiation topology sensitivities are not yet supported.
Post provides Radiative Heat Flux, Irradiation, Radiosity and Emissivity on the assigned surfaces, alongside existing thermal and structural results. Reports → Thermal Radiation Balance reports area, temperature, emissivity and net radiative power per surface. Positive power leaves the surface. Results and radiation setup survive project save/reload.
Volume Conditions
Volume-condition fields adapt to the selected model. They may be assigned to CAD/CSG solids or directly to imported, inline, and generated mesh domains. Structural models use Young's modulus E (Pa), Poisson ratio ν, density ρ, optional gravity acceleration gravity_x/y/z (m/s²), and optional explicit body-force density body_force_x/y/z (N/m³). The solver applies ρ * gravity + body_force over the assigned volume; surface loads remain traction or pressure boundary conditions.
Hyperelastic volumes also take Arruda-Boyce λm, or up to three Ogden terms: μ1…μ3 (Pa, each > 0) with nonzero α1…α3; DOLFINx and MFEM solve every term. Thermal volumes use conductivity k (W/m·K), specific heat cp, and density ρ; thermoelastic adds expansion coefficient α and reference temperature. Incompressible CFD uses viscosity μ (Pa·s) and density ρ. Compressible Euler uses freestream density ρ, pressure, γ, and velocity components.
User Material Definitions
The Python API can define portable material functions from constants, tables, equations, or a journal-local Python function sampled over a declared range. These functions can be composed into nonlinear-elastic, hyperelastic, plasticity, viscoelastic, or custom material-law definitions and passed as law=... to solid(name).material(...). The definition is retained by journal replay and project save/load.
from pytorsocae import MaterialFunction, MaterialLaw
curve = MaterialFunction.from_callable(
lambda strain: 250e6 + 700e6 * strain**0.25,
input="equivalent_plastic_strain",
output="flow_stress",
domain=(0.0, 0.30),
)
law = MaterialLaw.plasticity(
elasticity={"type": "isotropic", "E": 210e9, "nu": 0.3},
yield_surface={"type": "j2"},
flow_rule={"type": "associated"},
hardening=curve,
)
session.solid("Specimen").material(E=210e9, nu=0.3, law=law)
For true conjugate heat transfer on DOLFINx or MFEM, density and dynamic viscosity may be temperature-dependent material functions. Assign the functions directly to the fluid volume as rho=... and mu=.... Their only input must be named temperature; values are evaluated locally on each MPI rank and the property update is included in CHT convergence.
rho_T = MaterialFunction.expression(
"rho0 * (1 - beta * (temperature - T0))",
inputs="temperature", output="rho",
parameters={"rho0": 998.2, "beta": 2.1e-4, "T0": 293.15},
)
mu_T = MaterialFunction.table(
input="temperature", output="mu",
points=[[293.15, 1.002e-3], [333.15, 0.467e-3]],
)
session.solid("Fluid").material(
physics="laminar_flow", rho=rho_T, mu=mu_T, cp=4182.0, k=0.6,
)
Temperature-dependent properties require a model that solves temperature; isothermal flow rejects them. The achieved relative property residual is reported as cht_material_property_residual. Its default tolerance is the larger of the CHT coupling tolerance and 1e-4; advanced journals may set material_property_tolerance and max_material_iterations (default 12) under model_options.conjugate_heat_transfer. Python functions are evaluated only while constructing a sampled material definition and are not called during finite-element integration. Full custom stress/state material laws still require a matching native constitutive evaluator. TorsoCAE reports unsupported combinations rather than substituting a built-in law.
Initial Conditions
Initial conditions define fields at the start of a fresh transient solve. Select one volume, open Conditions → Initial, and enter constants or expressions. Expressions may use x, y, z, geometry bounds, comparisons, where, pi, and the standard math functions listed above. Vector fields accept one expression per component.
Compressible DGFV exposes density, pressure, and velocity; structural transient models expose displacement, velocity, and acceleration; incompressible flow exposes velocity and pressure; DGFV VOF adds phase fraction; and DGFV RANS adds its turbulence variables. Initial conditions are saved with the project and are separate from restart checkpoints. A model only shows fields that its selected formulation consumes.
Tied interfaces
A Tied Contact interface bonds touching surfaces of two meshes or bodies whose surface meshes need not match. Select both surfaces and create it under Interface Condition, or press Auto-tie touching bodies to join every pair of bodies whose surfaces lie on each other within the gap (blank uses 5% of the coarser body's mean facet size). In journals use session.create_interface(surfaces=[...], type="tied_contact") or session.auto_tie().
The finer side follows the other unless dependent_side names it. Each dependent node is tied at its closest point on the other side, to that facet's nodes. With mortar set, non-matching meshes are tied by dual mortar instead: each dependent node becomes a weighted combination of the other side's nodes, with weights integrated over the facet overlaps, so constant tractions transfer exactly; the rows are wider, which costs memory and makes the system harder for iterative solvers. Rim nodes the other side does not cover, and nodes that already carry a support, RBE2 or second tie, are always tied at their closest point. position_tolerance sets the largest gap a node is tied across.
Physics, Backends & Solve
Pick a physics model, a submodel, and a numerics backend, then click Compute. While a local solve is active, the same button becomes Pause; it suspends the existing serial or MPI process in memory and changes to Resume. Suspension releases CPU execution without rebuilding the model, but retains memory and allocated solver resources. Stop Compute terminates the solve. For models that can continue later (laminar and SST flow, FSI, structural dynamics, geometric nonlinear and geometric nonlinear dynamics) the button reads Stop & Save: choose where to save the project, and the solver stops after its current step (laminar and SST flow finish their current 25-step batch) and the project is written with a checkpoint inside. Cancelling the save just stops the solve. Load that project later and click Continue from step N/M to carry on from the checkpoint; step numbers and simulation time continue where they left off.
Physics & submodels
- Structural —
linear_elastic,modal_analysis,frequency_response,linear_buckling,geometric_nonlinear(static total-Lagrangian large deformation),geometric_nonlinear_dynamics(DOLFINx or MFEM Newton transient),flexible_multibody_dynamics(RBE2-backed flexible bodies and lower-pair joints),structural_dynamics(linear transient),hyperelastic-arruda-boyce,hyperelastic-ogden,elastoplastic-j2,elastoplastic-chaboche, andcontact_mechanics(see Contact Mechanics). The nativetorsobackend provides linear MITC4+ shell analysis andstatistical_energy_analysis(see Statistical Energy Analysis). Structural transient solvers share Newmark, HHT-alpha, and generalized-alpha integration. Outputs include displacement, von Mises stress, principal stresses, strain energy density (J/m³, with the total strain energy in the results), reactions, and model-specific history fields. - Thermal —
thermal_only(steady-state conduction) and Thermoelastic (heat conduction followed by thermal expansion and stress, usingαand a reference temperature). Usethermoelasticin new journals; olderthermal_stressjournals and projects remain valid. Outputs include temperature and heat flux; Thermoelastic also provides displacement, von Mises and principal stresses. MFEM supports Tet4, Hex8, Tet10 and Hex27 for both thermal submodels, preserving quadratic geometry and fields in MPI runs. - CFD —
stokes,laminar_flow,rans_k_epsilon,rans_k_omega_sst,volume_of_fluid,conjugate_heat_transfer,compressible_flow, andfluid_structure_interaction. See CFD and FSI.
Numerics backend
The backend list automatically narrows to implementations available for the selected formulation, physics, and submodel:
| Backend | Notes |
|---|---|
dolfinx | FEniCSx/DOLFINx. Serial or MPI-parallel. Broad submodel coverage, including nonlinear structure, FSI, RANS, shared compressible DGFV, and overset rotating-mesh flow with either flow model and both rotation modes. |
kratos | Kratos Multiphysics. Supports linear/geometric-nonlinear structure, ALM contact, thermal conduction, and CHT; does not support RBE2. |
mfem | MFEM via parallel PyMFEM. Supports structural static/dynamics, hyperelasticity, elastoplasticity, finite-rotation RBE2, Tribol contact, thermal, laminar/RANS flow, compressible Euler, CHT, FSI, shared DGFV models, and overset rotating-mesh flow with either flow model and both rotation modes. |
torso | Native C++20 MITC4+ linear shell analysis on four-node quadrilateral midsurface meshes. |
Solver options
algo selects the linear solver: auto (recommended default), direct, cg, gmres, bicgstab, bcgsl, or a remote torsohpc-* option (see TorsoHPC Remote Solve). precond selects the preconditioner (jacobi, gamg, ilu, or schur for mixed velocity/pressure systems). device (Solver tab, above Cores) selects CPU or a CUDA GPU. GPU assembly is available wherever the matrices go through the Torso assembler (the Solver tab enables GPU only for those model and backend combinations; changing the model never changes the device, and a GPU request the model cannot honour is refused before the run starts), and PINNs train on the GPU; DOLFINx modal, frequency response, plasticity and FSI, MFEM hyperelastic, contact and FEM compressible flow, Kratos and explicit compressible DGFV offer CPU only, and a GPU request without a visible CUDA device reports an error rather than silently changing device. The Solver tab's Linear Solver list offers the selected device's solvers: GPU offers torsohpc-petsc-cuda and torsohpc-cudss, CPU the others.
Explicit compressible DGFV advances the conservative state directly with SSPRK3 and CFL subcycling, so linear-solver and preconditioner selections do not apply to that formulation.
Options without a Solver-tab control are set through Sesame or session.set_solver_options(...); they are saved with the project and sent with Compute. They include max_load_bisections (DOLFINx geometric_nonlinear and hyperelastic, and MFEM hyperelastic and elastoplastic, halve a failed load increment and retry, default 6; MFEM also ends an increment's Newton loop after five non-improving iterations, and an inverted element fails the trial so bisection takes over), quadrature_degree for DOLFINx hyperelasticity and plasticity, force_tags, live_viz_interval, steady-SST steady_rans and pseudo-time controls, adaptive time stepping, Newton line search, and MFEM FEM compressible-flow cfl, ode_solver and order.
Cases & combinations
Use Single Analysis for the base setup or Cases & Combinations to define named load cases and weighted combinations. Base materials and supports remain active; case-specific pressure, traction, displacement, temperature, heat-flux, convection, inlet, and outlet conditions are added only to that case. Select any number of cases and combinations, then run them as one batch.
dead = session.analysis_case("dead", name="Dead load")
dead.surface(12, scope_id="mesh_0").bc("traction", values=[0, -5000, 0])
session.load_combination("operating", {"dead": 1.0, "pressure": 1.0})
results = session.compute_analysis(cases=["dead"], combinations=["operating"])
Modal analysis
submodel="modal_analysis" on DOLFINx solves Kx = λMx with positive density and homogeneous displacement supports. Applied static loads are not used. Set num_modes and eigen_tol with set_solver_options; use eigen_solver="slepc" for distributed MPI. The journal API's automatic eigensolver resolves to oneMKL FEAST through TorsoHPC, which is single-process and requires max_frequency_hz or an eigen_interval_max in eigenvalue units. The browser selects SLEPc by default so its normal multi-core setting works. Mode amplitudes are normalized and shown with Play Frames.
Linear buckling
submodel="linear_buckling" on DOLFINx or MFEM first solves the linear-elastic reference load, then returns dimensionless critical load factors and normalized mode shapes. A compressive reference traction, pressure, or body load and adequate supports are required; a load factor multiplies that reference load. Set num_modes and eigen_tol with set_solver_options. SLEPc is the distributed CPU/MPI default. FEAST is an explicit single-process choice and its eigen_interval_min/eigen_interval_max are positive load factors, not frequencies. The result list and Play Frames show each buckling mode and keep preload stress fields.
FW–H receiver acoustics and audio
Enable FW–H recording before transient laminar or RANS CFD. Select solid-wall tags, named receiver coordinates (metres), physical sound speed, ambient velocity, startup discard time and panel subdivisions. DOLFINx and MFEM support laminar/SST FEM or DGFV and k–ε DGFV. The recorder currently supports stationary impermeable walls on one conforming mesh. Steady-RANS pseudo-time, moving/permeable surfaces and coupled interfaces are not supported.
Use a complete closed body surface, or explicitly enable partial-surface contributions. Normals point from solid into fluid. Pressure is recorded at every physical timestep independently of viewport frames; surface subdivision does not replace CFD mesh refinement. Choose timestep and duration for your frequency band and establish convergence. Resolved transient-RANS fluctuations do not contain unresolved turbulent broadband noise.
During a solve, choose Reports → FW–H receiver acoustics → Update available audio. The next recording checkpoint captures the cumulative pressure history; receiver processing runs on the compute queue. Each microphone has an in-app player with play/pause and seeking, duration and playback-gain information. Previous audio remains playable while an update runs. A short recording may not yet cover propagation delays or enough samples: continue the solve and update again. Playback uses physical time, without looping or pitch shifting. Audio duration/source-time controls select excerpts for long histories. Capture happens on demand and temporarily copies the available history; storage and copy cost grow with panels × recorded samples. Save the selected acoustic result with the project to retain the captured history even if the subsequent CFD solve fails. In journals, snapshot = session.snapshot_fwh(cfd_job_id) captures the history of an owned running CFD job; follow it with processed = session.process_fwh(result=snapshot) and session.report("fwh", "psd_db", result=processed).
After Compute, choose Reports → FW–H receiver acoustics. Expressions psd_db, psd, time and third_octave show labelled receiver curves, RMS/OASPL, sampled peaks and frequency resolution. Process Recorded Data reuses saved histories with edited receivers, source-time window and Welch segment size; it creates a separate result without rerunning CFD; Use Current CFD Result switches Reports back to the original recording. Sound speed/ambient flow remain those of the recording. Sesame drives the same controls with update_available_audio, process_fwh and run_report(operation="fwh"), including audio sample rate, excerpt limit, normalization, Pa/full-scale gain and source-data export.
Reports export pressure/spectrum CSV, plots, JSON and WAV per receiver, with optional raw HDF5/manifest ZIP. WAV is resampled from pressure while preserving physical time. Normalized playback and explicit Pa/full-scale gain are documented separately from physical SPL; headphone volume is not calibrated SPL. HTML/PDF analysis reports include acoustic tables/plots and companion audio; HTML includes short playable previews.
Save the project with results to retain full source histories for reprocessing after reload. Raw storage grows with panels × timesteps. Statistical broadband source powers cannot feed FW–H. Viscous traction, exterior quadrupoles and external scattering are omitted. Analytic and MPI workflow tests do not establish experimental acoustic accuracy.
Broadband acoustic source power
Under RANS Turbulence → Broadband acoustic sources, enable source evaluation and select the models appropriate to the flow. SST supports FEM and DGFV on DOLFINx and MFEM; k–ε supports DGFV on both. Source evaluation is an optional result pass on a non-overlapping CFD domain, including MPI. It preserves the CFD equations and fields. Existing results without acoustic fields must be recomputed with this option enabled.
- Proudman: volumetric acoustic power density in W/m³ from 0.1 ρ ε (√(2k)/c₀)⁵. SST supplies ε = β* k ω. The assumptions include low Mach number and approximately isotropic turbulence; a wall contour alone cannot describe the volume sources in the wake.
- Goldstein jet: axisymmetric jet self-noise, shear-noise and total source power density. Specify the jet axis/origin and the convection Mach number (source convection speed divided by sound speed, below one). The velocity gradient supplies radial mean shear. This implementation uses the published two-equation-model anisotropy, not an RSM stress tensor. It is not a general wall-noise model.
- Curle surface: wall acoustic power per area, Ac (∂p/∂t)rms² / (12πρc₀³), in W/m². Supply wall tags, the correlation area in m² and pressure-derivative RMS in Pa/s from measurements or an explicitly specified model. Pressure RMS in Pa is not interchangeable. These supplied statistics are uniform over each selected patch; no empirical RANS wall-pressure closure is silently assumed.
Reports → Acoustic Source Power lists integrated volume/selected-wall powers in W and input provenance, including after .tcae reload. Use section plots for volumetric sources and surface data export for wall fields. Raw cell fields are available in the NPZ export. HTML/PDF analysis reports include the source-power table. Source-level fields use 10 log₁₀(q/qref), with default references 10⁻¹² W/m³ or W/m²; the level is undefined where power is zero. These are not receiver SPL values. Proudman and jet are alternative estimates; jet self and shear are already included in the jet total. Do not add every reported power together.
Check flow convergence, turbulence boundary conditions, source-region extent, mesh sensitivity and sound speed (343 m/s is an air default). Cell-centre source values use native geometric cell volumes for MPI integration. No receiver pressure, spectrum, A-weighting, wave propagation, stochastic LEE/Lilley source synthesis or FW–H analysis is provided by this option.
session.set_model_options(acoustic_sources={
"enabled": True, "models": ["proudman"], "sound_speed": 343.0
})
result = session.compute()
report = session.report("acoustic_sources", "", result=result,
output_dir="acoustic_reports")
Model references: published Proudman, Goldstein and Curle source equations; OpenFOAM Proudman formulation.
Frequency response
submodel="frequency_response" solves the steady harmonic response of one 3D linear-elastic solid on DOLFINx or MFEM with CPU/MPI, including quadratic Tet10 and Hex27 geometry and fields. Set a fixed or zero-displacement support and a traction, pressure, or body-force amplitude. With set_model_options, set frequency_start_hz (default 1), frequency_stop_hz (100), frequency_points (50, maximum 100), structural_damping_ratio (0.02), and structural_natural_frequency_hz (0 uses the sweep midpoint as the damping reference). A single point requires equal start and stop frequencies. Choose a direct or GMRES-family linear solve; CG cannot solve the harmonic block system. The frequency-response panel shows the same values used by Compute and Sesame. Results include component displacement amplitudes, in-phase and quadrature displacement, true peak displacement, and amplification relative to the same static load. Play Frames steps through frequency. Contact, follower loads, RBE2 constraints, and coupled bodies are not supported.
Specify the load phase with phi in degrees: F(t) = F₀ cos(ωt + phi). The model phase defaults to zero; each traction or pressure BC may override it with phi. Both real and imaginary load vectors are assembled. Compare damping ratios accepts up to 11 additional values, each computed with a full FE sweep and the same damping reference frequency.
In Reports → Frequency Response / Amplification, use amplification_factor to overlay the saved damping curves or max_displacement for displacement versus frequency. Sampled resonant peaks are marked, and JSON, CSV, PNG and SVG artifacts are saved. Curves remain available after loading the project. The global amplification is the surface-peak displacement divided by its quasistatic value under the same phased load; the Post field Displacement amplification provides the local ratio, undefined at zero static response. These are displacement measures: establishing strength or fatigue survival requires stress response and applicable material limits. Refine the frequency spacing near peaks.
session.set_physics("structural", "frequency_response", backend="dolfinx")
session.set_model_options(frequency_start_hz=10, frequency_stop_hz=100,
frequency_points=25, structural_damping_ratio=0.02,
structural_natural_frequency_hz=40, phi=30,
damping_ratios=[0.01, 0.05, 0.1])
session.set_solver_options(n_cores=4, algo="direct", device="cpu")
response = session.compute()
curves = session.report("frequency_response", "amplification_factor",
result=response, output_dir="fra_reports")
Statistical energy analysis
submodel="statistical_energy_analysis" on the Torso Native backend predicts band-averaged vibration and sound levels from meshed solid bodies. These are levels averaged over an ensemble of nominally identical systems, which is the right tool when there are many modes per band. It covers airborne sound transmission through panels and structure-borne sound through plate assemblies.
Mark each mesh as sea_plate or sea_acoustic_cavity under Volume, or with set_mesh_physics.
- Plates: flat, of uniform thickness, and thin (thickness at most a quarter of √area). Each takes E, ν, ρ, a damping loss factor, and a radiation edge factor (1 for simply supported edges, 2 for clamped).
- Cavities: each takes ρ, the speed of sound, and a damping loss factor or a reverberation time T60.
Plate area, thickness and perimeter, and cavity volume, wall area and edge length, are measured from the mesh.
Auto-tie joins every pair of touching bodies with an sea_junction interface. The geometry decides the junction kind:
- plates meeting along a line form a line junction (bending, extensional and shear waves);
- a plate face on a cavity is an area junction (radiation);
- two touching cavities share an aperture;
- a plate between two cavities also carries the non-resonant mass-law path.
A facet joins only the nearest body it touches, so the rooms on either side of a panel are joined to the panel, not through it.
Load a surface with SEA Input Power (W per band) or SEA Point Force (N rms per band, plates only). Enter one value, or a spectrum such as 125:0.01, 1000:0.02, which is interpolated log-log at band centres. Choose octave or one-third-octave bands, the band range and the mass-law limiting angle (78°) in the Statistical Energy Analysis block.
Play Frames steps through the bands, showing:
- velocity level for plates (dB re 1 nm/s);
- sound pressure level for cavities (dB re 20 µPa);
- energy level, modal overlap, modes in band and input power.
The last frame holds the overall levels. In Reports → SEA Band Levels / Level Difference, plot level, level_difference (driven room minus each other room), energy_level, modal_overlap, modes_in_band or input_power. Bands with fewer than one mode per subsystem are flagged as estimates.
session.set_physics("structural", "statistical_energy_analysis", backend="torso")
session.set_mesh_physics("mesh_1", "sea_plate")
session.solid("Panel").material(E=70e9, nu=0.33, rho=2700, damping_loss_factor=0.01,
physics="sea_plate")
session.auto_tie()
session.surface(1, scope_id="body_0").bc("sea_input_power", values=[[125, 0.01], [1000, 0.02]])
session.set_model_options(sea_band_type="third_octave", frequency_start_hz=100,
frequency_stop_hz=5000)
result = session.compute()
difference = session.report("sea_bands", "level_difference", result=result)
Flexible multibody dynamics
submodel="flexible_multibody_dynamics" connects flexible bodies through frames, surface attachments, and lower-pair joints. Configure the model with set_flexible_multibody(...). Fixed, spherical, revolute, prismatic, cylindrical, planar, and screw joints are supported, and results include flexible deformation, stress, motion frames, and named joint reactions.
The current milestone requires every non-ground frame to have one RBE2 surface attachment and all flexible bodies to share one mesh. Rigid primal bodies, universal/sliding joints, and multi-mesh body assembly fail explicitly instead of silently using an approximate model.
Electromagnetics — dielectric electrostatics and piezoelectricity
Select FEM, Electromagnetics and DOLFINx. Electrostatics solves the electric potential in a linear dielectric. Assign relative permittivity, ground one boundary and prescribe voltage on another; other boundaries default to electrical insulation. Normal electric displacement specifies outward D · n in C/m².
Electroelastic — Piezoelectric solves displacement and potential together: voltage drives deformation and mechanical loads generate electrical response. Electrical and structural conditions have separate channels on each face. Constrain rigid motion and provide a potential reference for every disconnected domain. Use one conforming 3D mesh, with tagged volumes for multiple materials; linear and quadratic tetrahedra/hexahedra are supported.
Material tensors use stress-charge form: stiffness C at constant electric field (6×6 Pa), coupling e (3×6 C/m²), and relative permittivity at constant strain (scalar or symmetric positive-definite 3×3). Voigt order is xx, yy, zz, yz, xz, xy with engineering shear strains. Blank stiffness uses E and nu. Material-axis columns form an orthonormal right-handed local-to-global frame. Enter measured coefficients; the default zero coupling describes an uncoupled material.
Use Auto, a direct solver or an indefinite-capable Krylov method for static piezoelectricity; CG is rejected. Inspect potential (V), electric field (V/m), electric displacement (C/m²), dielectric energy density (J/m³), displacement and stresses in Post and Reports. Electrical vectors retain component and magnitude fields.
Electroelastic — Harmonic Response solves coupled sinusoidal displacement and voltage phasors on the same 3D mesh. Give every material a positive density, set a frequency sweep and damping ratio in Model, and enter each driven electrode's voltage amplitude and phase φ in degrees. Mass and damping act on displacement; electrical potential has no inertia. Post includes in-phase/quadrature and amplitude fields for displacement, potential and electric field, plus peak von Mises stress. Journals can set measurement_points, measurement_component and measurement_interval to report amplitudes, CV and traveling-wave ratio at chosen FE nodes. For a single frequency, enter a phase list and driven voltage surface tag in Model; Torso reuses two solved voltage bases and Reports plots the saved phase CV/TWR curves. The optional static amplification reference is skipped by default; set compute_amplification=True when amplification factors are needed. This first harmonic model supports voltage, ground, insulation, fixed or zero displacement, and free surfaces; unsupported charge or mechanical harmonic loads fail explicitly. Floating equipotential electrodes are not yet modeled.
Replay electrostatic_dielectric1.py or piezoelectric_patch1.py from Journals. piezo_ishihara_bimorph1.py reproduces the Ishihara et al. (2023) P-15 3D bimorph on Hex27 cells (tip displacement 0.79708 µm against the published 0.79706 µm). piezo_stepwise_beam1.py and piezo_stepwise_harmonic1.py set up the stepwise beam from cadex/Stepwise beam.x_t for static and harmonic response, and the Stepwise Piezoelectric Beam demo case opens a saved phase sweep. Setup and results persist in the normal project archive.
Optimization and DOE
Structural topology optimization is available from the Optimization / DOE panel and Python journals for one DOLFINx linear-elastic mesh. The study minimizes compliance subject to a volume-fraction limit and supports SIMP, optional Helmholtz filtering, Heaviside projection continuation, passive solid/void cell IDs, multiple load cases, and serial or MPI execution.
study = session.optimization_study(
mesh_id="mesh_0",
volume_fraction=0.4,
initial_volume_fraction=0.5,
penalty=3.0,
filter_radius=0.01,
projection_continuation={20: 2.0, 40: 4.0},
optimizer="mma",
)
result = session.optimize(
study, max_iterations=150, design_tolerance=1e-3,
checkpoint_interval=5, checkpoint_path="beam_topology_checkpoint",
)
session.plot_result("Retained Material", result=result,
field_view_threshold=0.5)
optimizer="mma" is the general distributed constrained optimizer. optimizer="oc" remains available for the single volume-constraint reference workflow and accepts move_limit. Exact checkpoint resume is available for OC and BESO; MMA checkpoints preserve the design and history, but resume_from is rejected because its moving-asymptote history is not yet serialized.
Results include displacement and structural stresses plus design density, cell material fraction, filtered density, relative stiffness, and the retained-material preview. The preview thresholds the original mesh; it is not a remeshed manufacturing geometry or a second verification solve.
Bidirectional Evolutionary Structural Optimization (BESO)
Select BESO-Evolve in Optimization Controls for the structural topology preset, or set optimizer="beso" in a structural journal study. BESO starts from solid material, removes low-energy elements and can reintroduce material. States remain binary; removed cells retain the selected small stiffness to keep the analysis well posed. The filter acts on cell sensitivity, rather than smoothing density. The material fraction applies to the design region; preserved cells remain solid outside that budget.
study = session.optimization_study(
optimizer="beso", volume_fraction=0.1, filter_radius=0.01,
beso_options={"addition_ratio": 0.04, "removal_ratio": 0.08,
"stress_limit": 1e9, "failure_tolerance": 1,
"decay": -0.2, "void_density": 1e-6})
result = session.optimize(study, max_iterations=100,
checkpoint_path="bracket_beso")
This implementation uses DOLFINx linear elasticity and distributed MPI selection. Multiple load cases use the maximum cell strain-energy density; reported compliance is the sum of case compliances. A stress-limit safeguard arrests mass reduction when the allowed additional failed-element count is exceeded. It does not guarantee a feasible stress-constrained optimum. Two-cycle oscillation is reported separately from convergence.
Rigid bearing loads can use an RBE2 boundary with reference_force (three global force components in N) and reference_moment (three global moments in N m). These reference loads currently require linear structural analysis. Keep attachment constraints identical across load cases. Non-design masks, restart state and binary density use the normal optimization result/checkpoint workflow. journals/topology_beso_bracket.py imports the accompanying original Bearing_Bracket_Assy_STEP214.STEP, removes the bearing insert, prepares the cylindrical bore, partitions the five protected CAD regions, creates a conforming mesh and runs through the normal session workflow and saves a project in the account workspace. The developer benchmark tests/bench_beso_bracket.py generates the reference comparison report.
Thermal Topology and Custom Study Terms
For steady conduction, select thermal/thermal_only on DOLFINx, assign conductivity and thermal boundary conditions, then choose objectives and constraints from the supported responses. The design redistributes conducting material within the selected mesh. This workflow supports serial and MPI execution.
study = session.optimization_study(
design={"type": "density", "mesh_id": "mesh_0", "initial_fraction": 0.3,
"minimum_property": 0.001, "filter_radius": 0.02},
objectives=[{"id": "temperature", "response": "mean_temperature"}],
constraints=[{"id": "material", "response": "volume_fraction",
"sense": "le", "limit": 0.4, "scale": 0.4}],
optimizer="mma",
)
result = session.optimize(study, max_iterations=200)
session.plot_result("Temperature", result=result, filename="temperature.png")
session.save_project("thermal_topology.tcae", include_results=True)
Available thermal responses are mean_temperature, ks_max_temperature, thermal_compliance, boundary_heat_flow, and volume_fraction. Use weight for objective weighting, sense="le" for an upper limit, sense="ge" for a lower limit, and positive scale to normalize a constraint. Negative objective weights maximize a response. The generic syntax also supports structural compliance and volume fraction for the base load case.
Temperature and volume-fraction responses accept region="all", a unique volume name, or region={"volume_tags": [1, 2]}. Heat flow uses region={"surface_tags": [1, 2]} and is positive outward in watts. Thermal compliance measures the natural thermal load weighted by temperature; it is zero for purely prescribed temperatures with no natural load.
ks_max_temperature is a smooth approximation controlled by parameters={"coefficient": 0.1}, in inverse kelvin. It can underestimate the actual maximum; always check the final peak temperature when assessing a temperature limit. minimum_property is the conductivity floor relative to the material's conductivity. Low-density regions remain poor conductors and do not model coolant flow.
The steady-conduction density adapter uses one design mesh, one steady load state, and constant material properties. These are adapter capabilities, not limits of the study framework. Results include Temperature, Heat Flux, Relative Conductivity, and material-density views. External MMA design snapshots cannot yet resume the optimizer exactly. Transient and shape parameter adapters remain future work.
Coolant Channels and Cold Plates
Steady flow and heat-transfer topology studies are available through journals on Torso + DOLFINx. Select cfd/laminar_flow, assign fluid density, viscosity, conductivity and heat capacity, and use MMA. Density represents solid fraction: zero is coolant and one is conducting material with finite flow resistance. Specify the two phases in the study's design:
"properties": {
"inverse_permeability": {"void": 0.0, "solid": 1e6,
"law": "ramp", "penalty": 0.1},
"conductivity": {"void": 0.6, "solid": 15.0,
"law": "simp", "penalty": 3.0},
}
inverse_permeability is the viscosity-weighted flow-resistance coefficient in Pa s/m²; conductivity is in W/(m K). Inlet and outlet cells remain coolant. Apply flow and thermal conditions with their respective physics arguments. A velocity inlet can use expressions; a pressure outlet and a thermal reference are needed for the cooling example.
Minimize mean_temperature with parameters={"reference_temperature": 293.15} to use temperature rise as the objective. Hydraulic responses include flow_dissipation (W), pressure_drop (Pa, with inlet_tags and outlet_tags parameters), and volume_flow (m³/s, positive outward through the selected surface region). Temperature and material-fraction objectives and constraints can be combined.
For a fixed cold plate, select cfd/conjugate_heat_transfer and pass the fluid and solid mesh IDs to the study. Assign each mesh with set_mesh_physics(..., "laminar_flow") or set_mesh_physics(..., "thermal_only"), then create their normal partitioned_exchange interface. The meshes remain separate and may be nonmatching; Torso combines their native assembled systems and enforces temperature continuity with the conservative interface operator. Use a response scope to select solid temperature or fluid material fraction. Temperature-dependent flow properties, buoyancy and transient optimization are not supported by this adapter.
Generic Studies and DOE
session.design_study(...) is the journal-level study contract. It contains named analyses with mesh scopes, typed parameters with bounds and scope, named responses, and a method. session.run_study(study) runs either optimization or design of experiments. Topology density is currently exposed as type="density_topology"; it is a parameter specialization rather than part of the study driver.
Select Optimization under Physics to open the Optimization / DOE panel. Choose a preset (structural topology, thermal topology, coolant channel, or CHT), select the design mesh and, for CHT, its analysis and solid-response meshes. Choose the method and algorithm first; only their applicable design parameters are shown. Set Maximum iterations and design change tolerance under Optimization Controls. SIMP-MMA and SIMP-OC combine SIMP material interpolation with their respective density optimizers; BESO-Evolve uses binary structural evolution. Flow studies display MMA (RAMP/SIMP) because flow resistance uses RAMP and conductivity uses SIMP. Journals retain optimizer="mma", "oc", or "beso". DOE offers Latin-hypercube or full-factorial sampling with bounds, sample count and seed controls.
Download setup project saves the current geometry, materials, conditions, interfaces, and study settings. Download study journal creates a Python journal that loads that project and runs the study. Keep the project at the filename entered in the panel; it must be accessible where the journal runs. Run the current model with Optimize or Run DOE in this panel. Set cores, linear solver, preconditioner and tolerance under Execution. The ordinary Compute panel is disabled while Optimization is selected. The study run button shows elapsed compute time and provides Pause/Resume; Stop Study remains available during journal preparation and solving, and waits for server confirmation. Each evaluated topology design streams to Post and remains available in Play Frames; Retained Material is the default topology view. Its 0–1 cutoff slider changes the display only. Completed outputs are available in Assets → Post; saved projects appear in Assets → Projects. Shape presets will be added after their benchmark cases are verified.
For local execution, place the project beside the journal or enter its path. For hosted playback, use a project path in your account's workspace, such as the path recorded after opening a project. Downloading a file to your computer alone does not make it available to the hosted solver.
The structural preset minimizes compliance. The thermal preset minimizes mean temperature. Coolant-channel and CHT presets minimize mean temperature rise above the specified reference. CHT evaluates that objective on the selected solid-response mesh and applies its material-fraction limit to the fluid design mesh. The basic presets include a material-volume constraint; additional objectives and hydraulic constraints can be added in the journal.
| Control | Meaning |
|---|---|
| Initial material fraction / material fraction limit | Starting density and maximum material fraction for optimization, from 0.001 to 1. A DOE varies uniform material fraction using its sampling bounds instead. |
| Filter radius / SIMP exponent | Spatial smoothing radius in metres (0 disables the filter), and the density interpolation exponent (at least 1). |
| Solid flow resistance | Brinkman resistance for the solid phase, in Pa s/m². Applies to coolant-channel and CHT presets. |
| Coolant / solid conductivity | Design-phase conductivities in W/(m K). They do not replace the separate fixed solid's assigned material in a CHT model. |
| Reference temperature | Temperature in kelvin subtracted from the cooling objective; it does not apply a temperature BC. |
| Maximum iterations / design change tolerance | Iteration budget and maximum permitted design change for optimization stopping. |
| DOE bounds / samples / levels / seed | Lower and upper uniform material fractions; Latin hypercube uses sample count and a reproducible seed, while full factorial uses levels. |
Sesame can inspect and change this setup with set_study_setup, run it with run_study, stop it with stop_solver, save the project with save_project, and download the configured journal with export_study_journal. Setup, save and download actions do not imply that an analysis has run. Preset settings also survive project save/reload and journal recording/replay.
DOE also supports explicit samples through journals. It prepares the analysis once and evaluates responses at every sample without assembling adjoints. See thermal_topology_doe1.py. Optimization uses the same response definitions and prepared analysis but adds sensitivities and OC or MMA.
See flow_topology_cooling_channel1.py and cht_topology_cooling_plate1.py in the journals folder. They save result plots and projects. Inspect result["optimization"]["converged"] and the final constraints: reaching the iteration limit is not proof of an optimum. Density plots show intermediate material; a thresholded part requires a separate remeshed verification analysis.
CFD
Set physics="cfd" with one of the CFD submodels. Incompressible flow runs on DOLFINx or MFEM where implemented. rans_k_omega_sst supports FEM and DGFV, rans_k_epsilon uses DGFV, and compressible_flow supports MFEM DG or shared DGFV on DOLFINx and MFEM.
- Incompressible laminar — transient incompressible Navier-Stokes on DOLFINx or MFEM. Select FEM for the mixed velocity/pressure discretization or DGFV for the conservative staggered pressure/face-flux discretization. Assign
mu/rhoon the fluid volume andinlet_velocity/outlet_pressure/wall/symmetryboundaries. - Volume of Fluid (VOF) — immiscible two-phase DGFV with bounded conservative cell-volume transport, phase-dependent density and viscosity, and gravity. Define both phases and the initial fraction under Immiscible Phases. Active velocity coupling refreshes pressure and velocity at each phase-CFL interval for accuracy; frozen coupling reuses the outer-step flow field during phase subcycling for lower cost. Post exposes Volume Fraction and Density alongside Velocity and Pressure. Surface tension is not yet available.
- RANS k-epsilon and k-omega SST — select DGFV with
formulation="dgfv"for either two-equation model on DOLFINx or MFEM. Assignmu/rhoon the fluid volume, then set inlet intensity plus an optional turbulence length scale or viscosity ratio. Wall-function and wall-resolved treatments are available. DGFV turbulence transport currently requiresdg_order=0. - FEM k-omega SST — omit
formulation="dgfv"to use the established FEM SST implementation. Model options includesst_variant="sst_2003m"or"sstm". DOLFINx also provides steady pseudo-transient convergence controls; pseudo-time is numerical continuation rather than physical time. - DGFV formulation — for
laminar_flow,dg_order=0gives the finite-volume limit; higher orders add DG accuracy on the same pressure/face-flux formulation. Compressible Euler and DGFV RANS currently requiredg_order=0. DGFV controls such asdg_order,dg_cfl,dg_penalty, anddg_relaxationbelong inset_model_options(...), not solver options. - RANS outputs — k-epsilon exposes Turbulent Kinetic Energy, Turbulence Dissipation Rate, and Eddy Viscosity. SST exposes Turbulent Kinetic Energy, Specific Dissipation Rate, and Eddy Viscosity. All are normal Post scalar fields.
- Conjugate heat transfer (CHT) — couples the laminar-flow solve with a scalar thermal solve across a shared fluid/solid interface.
- Compressible flow — ideal-gas inviscid Euler. Select DGFV with
formulation="dgfv"on DOLFINx or MFEM, or FEM on MFEM. Assignrho,pressure,gamma, and freestream velocity on the fluid volume. DGFV accepts freestreamfarfield, numericinlet_velocity, characteristicoutlet_pressure, and inviscidwall/symmetryboundaries; unspecified exterior tags default to farfield. It uses HLLC with positivity-safe HLL fallback, SSPRK3, and automatic CFL subcycling. The validated DGFV scope isdg_order=0; Post includes Velocity, Pressure, Density, Mach Number, and Total Energy Density. - Overset rotating-mesh flow — an interface type, not a submodel: one stationary background mesh, one rigidly rotating component mesh, and one
oversetinterface between their fringe surfaces, on top of whichever CFD submodel you select.laminar_flowandrans_k_omega_sstare supported on bothdolfinxandmfem, with either rotation mode; both backends wrap each body in the same shared k-ω SST closure. Prescribed rotation uses angular speed; torque-driven rotation integrates the computed hydrodynamic moment. Both modes are resumable — the rotor pose, and for torque-driven its angle and rate, are checkpointed with the flow state. Time integration is the theta family (time_theta=1.0backward Euler,0.5Crank-Nicolson ondolfinx;mfemis backward Euler only), plustime_scheme="bossak"on the laminar path only — SST is theta-only because k/ω have no Bossak form. Overset is not an FSI mesh-motion option.
Overset journal setup
session.set_physics("cfd", "laminar_flow", backend="dolfinx") # or "rans_k_omega_sst"
session.create_interface(
type="overset",
surfaces=[
{"scope_id": "background", "surface_tags": [9]},
{"scope_id": "rotor", "surface_tags": [1]},
],
rotation={
"axis_point": [0, 0, 0],
"axis_direction": [0, 0, 1],
"mode": "prescribed",
"component_scope_id": "rotor",
"omega": 20.0,
},
)
session.set_solver_options(time_scheme="theta", num_steps=100, dt=1e-3, n_cores=4)
result = session.compute(mesh_ids=["background", "rotor"])
Compressible DGFV journal setup
session.set_physics("cfd", "compressible_flow", backend="dolfinx")
session.solid("Fluid").material(
rho=1.225, pressure=101325.0, gamma=1.4,
velocity_x=170.0, velocity_y=0.0, velocity_z=0.0,
)
session.solid("Fluid").initial_condition(
"density", "where(x <= 0.5, 1.0, 0.125)"
)
session.solid("Fluid").initial_condition(
"pressure", "where(x <= 0.5, 100000.0, 10000.0)"
)
session.surfaceGroup("Farfield", scope_id="flow_mesh").bc("farfield")
session.surfaceGroup("Outlet", scope_id="flow_mesh").bc(
"outlet_pressure", values=[101325.0],
)
session.surfaceGroup("Body", scope_id="flow_mesh").bc("wall")
session.set_model_options(dg_order=0, dg_cfl=0.4)
session.set_solver_options(
formulation="dgfv", num_steps=250, dt=2e-4, n_cores=4,
)
result = session.compute(mesh_ids=["flow_mesh"])
Conjugate Heat Transfer
True CHT solves fluid motion and fluid energy together with heat conduction in a separate solid domain. Start with one fluid mesh and one solid mesh, assign laminar_flow and thermal_only to the respective volumes, then select the two shared boundaries and create a Partitioned Exchange under Interface Condition.
- Fluid volume: assign
rho,mu, conductivityk, and heat capacitycpunderlaminar_flow. - Solid volume: assign conductivity
kunderthermal_only. - Fluid boundaries: assign inlet velocity, outlet pressure, and wall conditions in the CFD channel.
- Thermal boundaries: assign temperatures, heat fluxes, convection, or insulation in the thermal channel.
- Choose Fluid temperature / solid heat flux for the standard solve order, or Solid temperature / fluid heat flux when the solid-side temperature drives the fluid energy solve.
- The default Conservative FE Projection preserves interface heat balance through an adjoint load map. Nearest Neighbor is available for locally matched interfaces.
Set the accelerator and maximum coupling iterations under Partitioned Coupling in Compute. Torso + DOLFINx, Torso + MFEM, and Kratos support CHT. Current scope is one fluid mesh, one solid mesh, and one logical thermal interface.
Fluid-Structure Interaction
Set physics="cfd", submodel="fluid_structure_interaction", and choose Torso + DOLFINx or Torso + MFEM. Both support serial and MPI runs. FSI uses one fluid mesh and one structural mesh with ALE mesh motion, iterative interface coupling, conservative surface transfer, and adaptive substepping. Either mesh may be tetrahedral or hexahedral; quadratic Tet10/Hex27 structures exchange loads through matching quadratic surface traces.
- Assign
laminar_flowto the fluid mesh and the selected structural submodel, normallygeometric_nonlinear, to the structural mesh. - Select the matching fluid and structural boundaries and create a Partitioned Exchange. Choose its field mapper there; the required traction and motion directions are shown before creation.
- Accelerator and maximum coupling iterations live under Partitioned Coupling. FSI-only mesh motion, predictor, substepping, and constituent controls remain model options, never general linear-solver options.
- Structural response defaults to
geometric_nonlinear(total-Lagrangian Saint Venant-Kirchhoff); uselinearonly for small-deflection cases.
Contact Mechanics
Set physics="structural", submodel="contact_mechanics", and choose MFEM or Kratos to analyze interacting surfaces.
- Assign
contact_slaveandcontact_masterBCs on the two candidate contact surfaces. - Choose Finite Strain (default) or Small Strain under Physics > Contact Kinematics. Both retain each body's assigned linear elastic material (
Eandnu). Finite strain includes large rotations and uses the Saint Venant-Kirchhoff relation between second Piola-Kirchhoff stress and Green-Lagrange strain; it does not select a Neo-Hookean material. - In journals, use
session.set_contact_options(nonlinear=True)for finite strain ornonlinear=Falsefor small strain. The choice is recorded and saved with the project. Sesame can set it with the same option. - Additional contact formulation controls are available through
set_contact_options(...), separate from general solver options. - Friction/tangential-damping coefficients are assigned on the contact boundary condition itself, not through
set_contact_options. - RBE2 is not available under the Kratos backend, so combining RBE2 with
contact_mechanicsin a single run is not currently supported.
TorsoHPC Remote Solve
Instead of solving locally, route the assembled linear system to the TorsoHPC compute service by picking a torsohpc-* solver algo: torsohpc-pardiso, torsohpc-amgcl, or torsohpc-blaze.
torsohpc-pardiso,torsohpc-amgcl, andtorsohpc-blazeall support serial and distributed MPI solves.torsohpc-blazeis BiCGSTAB with symmetric diagonal scaling and takes no preconditioner.torsohpc-petscruns a PETSc solve on the service;torsohpc-petsc-cudaruns it on the service's GPU with a cuSPARSE matrix and GPU vectors. Both run the setupautopicks for the system (Krylov method, preconditioner, field splits or MUMPS), sopreconddoes not apply. The GPU solver requires a TorsoHPC service running on a machine with a CUDA device; on it every LU factorization, including oneautopicks, runs on NVIDIA cuDSS.torsohpc-cudssis a direct LU solve on the service's GPU with NVIDIA cuDSS (TorsoHPC PETSc with-pc_factor_mat_solver_type cudss);tol,max_iterandpreconddo not apply.- For AMGCL, choose
none,jacobi,ilu, orgamg/amgaccording to the problem. Explicit choices are respected and unsupported combinations report an error. - Modal
eigen_solver="feast"uses the interval-based oneMKL FEAST service; provide an eigenvalue interval or maximum frequency.
PINNs Solver
Physics-Informed Neural Networks (PINNs) provide a differentiable approach to simulation. By training a neural network to minimize PDE residuals, PINNs can approximate solutions to partial differential equations efficiently.
Usage
Select PINN (e.g., PhysicsNemo) as the physics backend in the solver panel to enable. Training parameters must be defined:
- Epochs: Training iterations (default 10000)
- Learning Rate: Optimizer step size (default 1e-3)
- Collocation Points: Number of points for PDE residuals evaluation (default 20000)
Example (Python)
session.set_physics("structural", "linear_elastic")
session.set_solver_options(
formulation="pinns",
pinn_provider="physicsnemo",
pinn_epochs=5000,
pinn_learning_rate=1e-4,
pinn_collocation_points=10000
)
result = session.compute(mesh_ids=["mesh_0"])
Journal Scripting
Geometry, mesh, condition, material, model, solver, and compute actions are recorded as Python. Pure post-display state is saved with the project, while collaboration remains live session state rather than a solver journal command.
Recording
Recording is automatic — the journal panel shows entries as they accumulate. Click Save Journal to save it as journal_<timestamp>.py in Assets › journals, with a download link. After playing a journal, pressing Stop saves the played script plus the steps recorded after it under the played file's name in Assets › journals, whether the journal was opened from your computer or from Assets.
Playback
Click Play Journal and pick a file. The browser clears the current setup, then re-runs each action while geometry, meshes, conditions, and results update in real time.
The script
from pytorsocae import TorsoCAESession
session = TorsoCAESession()
session.upload("part.step")
session.edit("merge-smooth", {"angle_deg": 30})
session.mesh(mesh_id="mesh_0", algo_id="hxt", size_factor=1.0, dim=3)
session.set_physics("structural", "linear_elastic", backend="dolfinx")
session.solid("Body_1").material(E=210e9, nu=0.3)
session.surface(3, scope_id="mesh_0").bc("fixed")
session.surface(7, scope_id="mesh_0").bc("traction", values=[0, 0, -1000])
session.set_solver_options(formulation="fem", n_cores=4)
result = session.compute(mesh_ids=["mesh_0"])
Pure CSG session:
session.csg_make_shape("box", {"dx":10, "dy":10, "dz":10}, name="Box", body_id="body_0")
session.csg_make_shape("cylinder", {"r":3, "h":12}, name="Hole", body_id="body_1")
session.csg_boolean("cut", "body_0", "body_1", name="Box - Hole", body_id="body_2")
session.csg_transform("body_2", "rotate", {"ax":1,"ay":0,"az":0,"angle_deg":90})
session.mesh(algo_id="delaunay", size_factor=0.5, dim=3)
Current Python API
| Task | Public journal calls |
|---|---|
| Open and edit geometry | upload(...), load_existing(...), select_body(...) / csg_select(...), edit(...), heal_geometry(...), merge_smooth(...), split_by_size(...), split_at_bends(...), fuse_geometry(...), extract_co_volume(...), delete_solid(...), import_delete(...), and csg_make_shape(...), csg_extrude(...), csg_extrude_profile(...), csg_revolve(...), csg_revolve_profile(...), csg_transform(...), csg_slice(...), csg_boolean(...), csg_delete(...) |
| Mesh | mesh(...), mesh_delete(...), import_mesh(...), inline_mesh(...), import_mesh_file(...), import_nastran_mesh(...), import_cgns_mesh(...), build_structured_mesh(...), build_multiblock_structured_mesh(...), build_octree_cut_mesh(...) (each also callable without the build_ prefix), mesh_edit(...), mesh_data(...), and mesh_boundaries(...) |
| Model setup | set_physics(...), solid(name).material(...), solid(name).initial_condition(...), surface(...).bc(...), surfaceGroup(...).bc(...), group(...), delete_group(...), rename_group(...), rename_body(...), and set_mesh_physics(...) |
| Controls | set_model_options(...) for model/discretization data; set_solver_options(...) for formulation, time, solver, and execution controls; set_contact_options(...) for contact numerics |
| Specialized model topology | set_flexible_multibody(...) defines frames, attachments, bodies, and joints |
| Coupling and interfaces | create_interface(...), remove_interface(...), rename_interface(...), set_coupling_options(...), set_fsi_options(...) |
| Analysis cases | analysis_case(...), remove_analysis_case(...), load_combination(...), remove_load_combination(...), analysis_definition(), analysis_plan(...), and compute_analysis(...) |
| Solve | compute(mesh_ids=[...]); physics and submodel are selected beforehand. fem(bcs=..., physics=..., submodel=..., **materials) is the lower-level one-shot form that takes conditions, physics and materials as arguments instead of reading accumulated session state — useful for parameter sweeps, but it bypasses the session's own bookkeeping, so prefer compute(...) in ordinary journals. |
| Post and export | report(...), generate_analysis_report(title=..., purpose=..., format="both"), plot_reports(...), plot_result(...), animate_result(...), export_field_data(...), and export_results(...) (save_results(...) alias) |
| Project | save_project(filename, include_results=True), list_project_versions(path), and load_project(path, version="v1") write, inspect, and restore portable .tcae archives |
Journals run anywhere Python and the server's dependencies are installed — they're not tied to the browser.
Post & Reports
Streamlines: line count controls density across the full seed area. Current-result lines can be regenerated from the saved or latest live volume fields without rerunning CFD. Their colors follow the selected result variable, legend range, palette and contour bands. Choose Moving dash-dot, Dash-dot, or Solid for the rounded, highlighted line style. Motion indicates flow direction; its animation speed is visual, not physical particle travel time. New frames retain sampled field values for correct coloring during playback and after saving a project. Older historical frames retain their original paths and show unavailable field colors in grey; current volume values are never substituted for historical samples.
Ghost Shell: changes result-surface opacity while keeping the selected field colors. The full translucent shell remains visible around a section cut; opaque surfaces and streamlines follow the cut. Closing the section restores the normal view. Field coloring applies to result surfaces whether streamlines are shown or hidden, and ghost settings are restored with the Post workspace.
CFD surface-force reports: set solver force_tags to the body wall tags before computing. In Reports → Surface Force History / Lift & Drag, enter Fx,Fy,Fz or magnitude; surface tag 0 sums all recorded tags. Curves show pressure-plus-viscous force on the body in N, using global axes. Lift and drag require the appropriate flow-relative directions (for the zero-incidence Cessna journal, drag = Fx and lift = Fy). Histories and CSV/JSON/PNG/SVG exports also work after reloading a project saved with results. The horizontal axis is recorded steps; exported solver time may be pseudo-time. Small force variation alone does not establish convergence or mesh independence.
After a solve completes, or after opening a .tcae with saved results, use Generate Analyses Report in Reports. Choose HTML, PDF, or both, and optionally state the design purpose. Sesame interprets the recorded geometry, materials, boundary conditions, physics, and actual result figures. The Reports panel shows progress and keeps links to generated private artifacts. Report files are separate from the project archive.
Smooth is off by default. Element stress values remain unaveraged; native nodal fields such as displacement and temperature retain their interpolation. Enable Smooth to recover continuous surface contours on the selected frame, without changing the solution or frame history. Older results that saved only averaged stresses must be recomputed to recover element-local stress values.
Geometry/Post displays result fields on the model. Select displacement, stress, strain energy density, temperature, heat flux, velocity, pressure, turbulence, phase-fraction, or other fields emitted by the active result. Transient, nonlinear, VOF, and modal results use the frame slider; modal frames correspond to mode shapes. Mesh edges remain available as an overlay when enabled in Settings.
For a structural topology study, Volume Fraction colors the original design domain. Select Retained Material to preview source mesh cells above the adjustable material-fraction cutoff (initially 0.5), including faces exposed where lower-density cells are hidden. Design Density, Filtered Density, Relative Stiffness, Displacement, and stress fields remain separate plots. The retained-cell view is not a remeshed or independently verified part.
Choose a legend style appropriate to the field: Linear Rainbow preserves the traditional engineering contour display; Perceptual gives a uniform sequential scale; Diverging centers signed values at zero; Logarithmic resolves positive values spanning several orders of magnitude; and Symmetric Log handles signed multi-decade ranges. Contours independently switch the selected style from continuous colors to discrete bands. The same mapping is used by surfaces, sections, iso-surfaces, vector magnitudes, streamlines, tracers, and the visible legend. Legend Range sets the selected field's color range, for example to resolve a stress distribution past a local peak; blank bounds follow the data. Values beyond a bound take its end color and the legend marks that end with ≥ or ≤. Each field keeps its own range, saved with the project.
Use smoothing, deformation scaling, contours, section cuts, iso-surfaces, streamlines, or animated tracer particles as appropriate to the field. Add scene tabs to keep several field or section views available at once. Text overlays accept live @ commands such as @time, @step, and @nelem; typing @ opens a filtered command list, @\n inserts a line break, and @@ prints a literal @. Scope mesh counts by stable ID or visible name, for example @nelem{"Mesh 1"}.
Snapshots and turntables: the toolbar buttons save a PNG of the viewport or record one turntable revolution as WebP (default) and/or GIF. Shift+Click the turntable button for its settings: seconds per revolution, direction, formats, and whether axes, legend and background are included (no background records transparency). Sesame can change these settings and record.
Dimensions: click the dimension button to start measuring; it stays highlighted while active, and the view still orbits, pans and zooms. Click two points: any highlighted snap point (a vertex, mesh node, facet or face centre, or edge midpoint) is measured exactly, on the same surface or not. A click on a faceted patch or mesh surface away from snap points measures where it lands; one cylindrical or spherical face alone gives its radius. Shift+Click the button for the list, Clear all, Hide all and Snap to mesh nodes. Right-click or Esc stops measuring.
Reports creates statistics, reaction/contact forces, line profiles, line integrals, and surface integrals. Field Data (.csv) exports one field or every available field with coordinates from a selected surface or the active cross-section. Select a surface in the model tree or viewport, or activate and position the cross-section first. Vector selections include magnitude and X/Y/Z components; raw computational values are exported without visual smoothing. Add report scenes to compare several plots without replacing the current one. Reports and their scenes are saved with the project.
Expressions
Available variables depend on the result and are returned with each report. Common names include coordinates x/y/z, structural fields disp_x/y/z, disp_mag, von_mises, p1/p2/p3, thermal temperature, and CFD u_x/u_y/u_z, vel_mag, and pressure. Expressions support arithmetic, comparisons, **, trigonometric and hyperbolic functions, exponentials/logarithms, sqrt, abs, where, clip, minimum/maximum, and constants pi/e.
profile = session.report(
"line_profile",
expression="sin(pi*x/10)*von_mises",
line_start=[0, 0, 0],
line_end=[10, 0, 0],
n_points=101,
)
session.plot_result(
"Von Mises Stress",
result=result,
filename="von_mises.png",
smooth=True,
)
session.export_field_data(
["Displacement", "Von Mises Stress"],
result=result,
surface_tag=3,
scope_id="body_1",
output_dir=".",
filename="surface_3.csv",
)
plot_result(...) writes the exterior result by default. Add normal=[nx,ny,nz] and constant for a cut-plane plot. export_field_data(...) uses the same display field names shown in Post; omit fields to export all available fields. If no filename is supplied, the defaults are default.png and default.csv respectively, and a relative path may be included.
Collaboration
Open the handshake control in the title bar to share the project currently in the workspace. Sharing does not require a running solver. Invite another signed-in user with their public Torso ID and assign a recognizable alias.
- The admin authorizes or removes participants and may pass or reclaim control.
- Participants can request control, follow the current controller's viewport, or explore independently.
- Shared running simulations remain available through Connect to Simulation.
- Collaboration controls are live session actions and are not recorded in journals.
Sweeps & Surrogates
Sweep a model over parameter ranges with the FEM/CFD solvers, then train a neural surrogate (PhysicsNeMo Transolver) on the collected fields. A trained surrogate predicts full nodal solution fields for new parameter values in milliseconds — instant what-if exploration from a handful of real solves.
Sweep & train
from sweep import ParameterSweep
import surrogate
sweep = ParameterSweep("bracket_v1", params={"load": (2e5, 2e6), "height": (0.6, 1.4)})
for s in sweep.samples(8, method="lhs", seed=42): # lhs | random | grid
session = build_and_solve(s) # any normal session/compute journal
sweep.record(s, result, mesh_data=session.mesh_data())
sweep.finalize()
surrogate.run_training("bracket_v1", job_id="train_0",
surrogate_epochs=300, surrogate_seed=7)
Instant prediction
pred = surrogate.run_inference("bracket_v1", {"load": 1.1e6, "height": 1.0},
job_id="pred_0")
pred["max_displacement"], pred["infer_seconds"] # npz + viewer viz also produced
Active learning
Instead of a dense grid, let an ensemble pick the most informative next runs:
next_pts = surrogate.run_suggestion("bracket_v1", n=2)["suggestions"]
# solve those, sweep.record(...) each, re-run training
sweep = ParameterSweep.resume("bracket_v1")
Fields are auto-detected from the solver output (displacement, von Mises, temperature, velocity, pressure). Datasets and checkpoints live in data/surrogates/<name>/.
In the app
The Neural Inference tab lists every trained dataset with one slider per swept parameter — drag for an instant prediction. Predictions render in the viewport and are post-processable in the Post tab exactly like FEM, DGFV, and PINNs solutions. Sesame can drive them too ("predict at load 1.1e6").
Sesame
Sesame lives in the right-side chat panel. It sees the active model setup and can carry out the same preparation, solver, reporting, and collaboration actions available in the workspace.
What it can do
Representative actions include:
| Category | Examples | Trigger phrase |
|---|---|---|
| Geometry | csg_create_primitive, csg_boolean_op, csg_transform, cad_edges, cad_edit, import_cad_file | "fillet the selected edges with radius 1 in CAD units" |
| Surfaces | select_surfaces, create_surface_group, rename_face | "group the top and bottom faces as 'clamped'" |
| Volume conditions | assign_material | "assign steel and gravity -9.81 in Y to the bracket" |
| Mesh | set_mesh_parameters + run_mesh, create_structured_mesh, create_octree_cut_mesh, mesh_morph | "mesh with HXT at size factor 0.5" |
| Solver | set_physics, assign_initial_condition / clear_initial_condition, assign_bc / assign_bc_group, create_interface, set_model_options, set_solver_options, set_contact_options, set_coupling_options, set_fsi_options, set_mesh_physics, compute_fem, start_monitor | "fix the base, push 2mm displacement on the top face, and solve" |
| Analysis cases | define_analysis_case, assign_analysis_case_bc, clear_analysis_case_bc, remove_analysis_case, define_load_combination, remove_load_combination, run_analysis_batch | "remove the wind combination, then run dead and operating" |
| Post / Reports | set_post_processing, set_result_frame, run_report, manage_report_series, manage_workspace, export_result_plot, export_field_data | "plot von Mises along the centerline and keep it beside the displacement profile" |
| Assets / Sessions | manage_asset, set_compute_meshes, manage_simulation_connection, save_project | "open my modal project and switch to mode 3" |
| Viewport / UI | set_camera, set_entity_visibility, navigate_to_tab, viewport_action, play_journal | "hide the CAD body, show the result mesh, and fit the view" |
| Knowledge | update_knowledge | Sesame records verified reusable learnings itself after non-trivial workflows. |
Ask Sesame for parameter names, valid ranges, backend availability, current fields, frames, residuals, assets, reports, or the current setup before changing it. For example: "show the available FSI options", "set this mesh as the CHT solid", "plot von Mises along the centerline", or "run the operating combination". Sesame reports a solve as started when it is submitted and only reports a report or UI action as complete after the workspace confirms it.
Vision
Sesame always has the current model state, including selections, bodies, surfaces, meshes and refinements, conditions, materials, interfaces, physics and solver options, available result fields, frame or mode position, report scenes, residuals, and account assets. The viewport image itself is only sent when you check Vision in the chat panel. Vision captures the active Geometry/Post view or Reports plot; enable it when Sesame needs to inspect what is displayed.
What it doesn't do
Browser file pickers and security-sensitive account actions require you to interact with the browser. For a CAD file already in Assets, ask Sesame to open it by path rather than upload it again.
Use your own AI agent with Torso
Connect your agent to Torso through MCP to create and edit geometry, prepare meshes, configure physics and boundary conditions, run analyses, inspect results and record journals. The agent discovers Torso's available commands and engineering guidance through the connection. Its actions appear live in your Torso project, just as Sesame's actions do.
Connect Codex, Claude Code or Gemini CLI
- Sign in to Torso and open the project you want the agent to work on.
- Open Sesame and select Connect agent.
- Choose your agent: Codex CLI, Claude Code or Gemini CLI. Choose the terminal you use: Bash / Zsh or PowerShell.
- Select Copy connection command and paste it into that terminal. The command contains your Torso server address and connection credentials.
- Start your agent from that terminal, or reconnect its Torso MCP connection if it is already running. Keep the Torso project tab open while the agent works.
No Torso software installation is needed on the agent's machine. Use the command shown by your own Torso session; it works with that session's local or hosted server address.
For Codex, the copied command sets the connection token in the current terminal's environment.
Start Codex from that same terminal so it can read the token. If you open a new terminal,
copy and run the connection command again. If your agent says a server named
torso already exists, update or remove its old Torso entry before adding the new connection.
Connect another MCP agent
Select Other MCP client and copy the connection settings. In your agent, add an MCP connection using the displayed MCP server URL and the Authorization header provided in the copied settings. Select Streamable HTTP if the agent asks for a transport type.
Use the complete URL supplied by Torso, including /mcp. The connection token
comes from your Torso session; it is not your LLM provider's API key. Keep it private.
Check the connection
Ask your agent:
Connect to Torso, inspect my current project and summarize its geometry, physics, mesh and available results. Do not change anything yet.
The response should describe the actual project you have open. To let the agent inspect viewport images as well, enable Vision in Sesame.
Then give it the engineering task and the relevant loads, materials and constraints. For example:
Record a journal while you configure this bracket with the material, supports and loads we agreed on. Check the mesh and setup, run the analysis, then show and explain the results.
You can watch geometry, selections, setup panels and results change in Torso. If you make edits yourself or switch projects, tell the agent to inspect the current state again before continuing. The connection controls the selected browser tab.
Analyses and journals
The agent can submit analyses and check their progress and results. Submission is not completion: ask it to verify the job status and computed results before drawing conclusions. You retain Torso's normal job controls.
Ask the agent to start journal recording before making changes and stop recording when finished. Torso generates the Python journal in Assets → journals, and the agent can replay a saved journal. Directly saving arbitrary agent-written Python as a new journal file is not currently exposed.
For unattended imports, upload files to Assets first. Browser file pickers may require your interaction.
Disconnect and usage
Select Disconnect agent to revoke access. Connections expire after eight hours. After reloading or closing the tab, create a fresh connection and update your agent using the newly copied command.
Disconnecting does not cancel a simulation or CAD operation already submitted. If a connection is interrupted, inspect the project and job status before repeating an operation; it may already have completed.
Your agent's subscription or API usage and Torso compute charges apply normally. MCP command execution itself makes no LLM requests. Explicit use of Sesame's autonomous monitoring or AI report interpretation can use Torso's configured LLM provider.
Troubleshooting
| Symptom | Action |
|---|---|
| Agent cannot connect | Copy a fresh connection command from the intended Torso tab. Check that the agent can reach the displayed server URL and that the token is current. |
| Codex reports a missing token | Run the copied command and start Codex from the same terminal. A new terminal does not inherit a token set in another one. |
| Agent says MCP is disabled in this folder | Use a working folder you trust and complete your agent's normal workspace-trust prompt. |
| Browser offline or actions appear elsewhere | Keep the connected tab open and responsive. Check that you are watching the tab from which you copied the command. |
| Sesame is busy | Wait for the current Sesame command series to finish before asking the external agent to make changes. |
| No viewport image | Enable Vision in Sesame and use an agent/model that accepts image tool results. |
| Operation interrupted | Ask the agent to check the existing operation and project state before resubmitting it. Use Torso's job controls if you want to stop a solve. |
Agent-specific MCP settings: Codex · Claude Code · Gemini CLI.
Compute Credits
One credit buys one core-minute of server compute — equivalently $3.00 per core-hour. Time is metered by the second, so a 90-core-second run costs 1.5 credits. Charges are rounded down to the last whole cent, with a one cent minimum per operation.
Current price: 5¢ per credit. New accounts start with 100 credits — 100 core-minutes, worth $5.00.
A solve on 4 cores for 30 seconds consumes 120 core-seconds and costs 2 credits, the same as 120 seconds on one core. Only time the job is actually running is billed: a paused simulation costs nothing while paused.
What things cost
Measured from real runs, on one core. You are billed for the CPU time a job actually uses, so a job on 4 busy cores costs about four times as much, and time spent waiting — for example on a remote TorsoHPC solve — costs nothing. Anything up to 12 core-seconds lands on the one cent minimum.
| Operation | Typical core-seconds | Credits | Cost |
|---|---|---|---|
| CSG primitive or boolean | 0.15 | 0.2 | 1¢ |
| Mesh import (Nastran, CGNS) | 0.2 | 0.2 | 1¢ |
Meshing: delaunay | 0.4 | 0.2 | 1¢ |
| CAD edit: delete solid, defeature | 0.5 | 0.2 | 1¢ |
Meshing: octree_cut | 3.1 | 0.2 | 1¢ |
Solve: linear_elastic | 3.2 | 0.2 | 1¢ |
| CAD edit: extract co-volume | 6.7 | 0.2 | 1¢ |
| Solve: conjugate heat transfer (small) | 8.2 | 0.2 | 1¢ |
Solve: geometric_nonlinear | 85 | 1.4 | 7¢ |
Solve: elastoplastic-j2 | 253 | 4.2 | 21¢ |
| Solve: hyperelastic (Arruda-Boyce, Ogden) | 449 | 7.4 | 37¢ |
| Journal run, long CFD case | 2,319 | 38.6 | $1.93 |
Two operations are charged a flat rate rather than by time:
saving a .tcae project costs 1 credit (5¢), and loading
one costs 2 credits (10¢).
What a balance gets you
| Balance | Compute | Value | Realistically |
|---|---|---|---|
| 100 | 1.7 core-hours | $5.00 | The starter grant. Hundreds of CAD, CSG and meshing operations, dozens of linear solves, and around 70 nonlinear structural runs. |
| 1,000 | 17 core-hours | $50 | A full project: repeated meshing studies, a dozen hyperelastic or elastoplastic runs, several long CFD journals. |
| 10,000 | 167 core-hours | $500 | A validation campaign across several cases and mesh refinements, on many cores. |
Running out
A running job is never killed for lack of credits — it finishes, and the cost is settled at the end even if that takes the balance below zero. Pausing or aborting settles what has been consumed so far, so stopping early is billed for the work already done.
While the balance is below zero you cannot start a new
solve, mesh or journal, load a .tcae project,
or resume a paused simulation; starting a solve, mesh or
journal also needs at least 1 credit in hand. You can still
save your project at any balance, and you can always
suspend or abort a running job — nothing traps you with work you
cannot stop or keep. Redeem a voucher or top up and everything unlocks.
Keeping costs down
- Coarsen the mesh while setting a case up; refine only for the final run.
- Extra cores finish sooner but cost proportionally more, so they buy turnaround, not savings. One core is the cheapest way to run anything you are not waiting on.
- Pause a long simulation you are unsure about — paused time is free, and resumable submodels pick up where they stopped.
- Demo cases and result inspection are free; they start no solver.
Redeem a voucher from the credits panel in the account menu, top right. A voucher sent to a specific email address only works while you are signed in with that email address.
Mesh Algorithm Reference
| ID | Description | Best for |
|---|---|---|
delaunay | Standard Delaunay tetrahedralisation | General purpose, default |
hxt | Parallel Delaunay (Gmsh algorithm 10) | Large parts, fastest tet output |
hxt_frontal | Frontal-Delaunay surfaces (6), HXT volume (10) | Alternative surface triangulation for curved CAD faces; verify mesh quality |
frontal | Frontal-Delaunay (Gmsh algorithm 4) | Higher tet quality, slower |
automatic | Gmsh-chooses-for-you (algorithm 2) | Mixed geometry |
hex_dominant | Tet mesh with SubdivisionAlgorithm = 2 | Approximate hex preference; ~80% hex by element count on box-like geometry |
hex_transfinite | Structured all-hex via setTransfiniteVolume | Pure box-like volumes (6 faces × 4 curves) |
structured_hex | Strict structured Hex8 meshing | Conformal six-face blocks; rejects incompatible volumes instead of falling back to tetrahedra |
For 2-D meshes (dim = 2): delaunay_2d, frontal_2d, automatic_2d, meshadapt, delaunay_quads.
CAD Edit Operation Reference
| Journal operation | UI label | Parameters |
|---|---|---|
heal-geometry | Heal Geometry | tolerance (mm; 0 = auto) |
defeature | Defeature / Inspect CAD | mode and positive max_size where applicable; selected decoration faces may be passed as face_names |
fillet | Fillet | Current edge_refs and positive radius in CAD units; replaces the body |
chamfer | Chamfer | Current edge_refs and positive distance in CAD units, equal on both adjacent faces; replaces the body |
merge-smooth | Merge Smooth | angle_deg |
fuse-geometry | Fuse Geometry | face_names (selected faces) |
split-by-size | Split by Size | max_size (mm) |
split-at-bends | Split at Bends | angle_deg |
extract-co-volume | Extract Co-Volume | optional interior seed=[x,y,z]; creates disconnected closed fluid-domain solids |
delete-solid | Delete Solid | solid_id and occurrence_path from CAD topology |
CSG Operation Reference
Fillet and Chamfer
In CSG > Edit, choose Fillet or Chamfer. Edges immediately highlight as you hover; click the intended edge and enter a positive radius or distance, or drag its dimension handle. Changing a value keeps edge selection active. Click Apply to commit typed edits; release commits a dimension drag. Escape or Cancel discards the pending edit. No separate edge-pick button is needed.
For authored geometry, the edit is retained as a construction step in the CSG panel. Sesame uses inspect_cad_design to obtain feature-graph references and cad_design to regenerate the same body. The existing native edge/corner API below supports its own edge catalogs, corner selection and tangent contours; those catalog references belong to session.edit and cannot be substituted for feature-graph references.
The feature replaces the same body after it succeeds. Its name, color, and material stay attached. An invalid radius, stale selection, or ambiguous condition target leaves the existing body intact. Delete meshes derived from the body before changing its edges. Remove vertex-attached dimensions before editing; face conditions are retained only where their target can be identified unambiguously.
catalog = session.cad_edges(body_id, operation="fillet")
# Inspect catalog["edges"] and choose the intended edge by its points.
edge = catalog["edges"][0]
session.edit("fillet", {"edge_refs": [edge["edge_ref"]], "radius": 1.0},
body_id=body_id)
For a chamfer, request a fresh catalog with operation="chamfer" and call session.edit("chamfer", {"edge_refs": [...], "distance": 0.5}, body_id=body_id). References belong to the current geometry; request a new catalog after an edit. Sesame can inspect and select edges with cad_edges, then apply the same operation through cad_edit.
To round the edges meeting at a corner in a journal, choose a vertex by its point and pass its incident edges:
catalog = session.cad_edges(body_id, operation="fillet")
# Inspect the vertex points and choose the intended corner.
corner = catalog["vertices"][0]
session.edit("fillet", {"edge_refs": corner["edge_refs"], "radius": 1.0},
body_id=body_id)
With Sesame, select the desired edges or corner and ask, for example, "Fillet my selection with radius 1 in CAD units" or "Chamfer these edges with equal distance 0.5 in CAD units". You can also ask it to inspect available edges, select a corner by position, clear the selection, or exit edge-pick mode. Inspection of the same body and operation keeps the current selection. Selecting a target does not apply an edit; a successful edit is confirmed only after the updated body is loaded. If the target or size is unclear, specify it before applying.
Parametric dimensions and selection
| Geometry | Editable dimensions | Viewport interaction |
|---|---|---|
| Box | Width, depth, height | Drag a face; its opposite side stays fixed |
| Cylinder | Radius, height | Drag the wall radially or an end face axially |
| Sphere | Radius | Drag the surface; the center stays fixed |
| Cone / frustum | Base radius, top radius, height | Use the independent radius/height handles; an end face controls height |
| Torus | Major radius, tube radius | Drag the surface for tube radius; use the major-radius handle for ring size |
| Extrusion | Profile dimensions, length, draft, twist or path | Drag the end face or length handle; edit profile and other settings in the panel |
| Revolution | Profile dimensions, axis, sweep angle | Drag the angular handle; edit profile and axis settings in the panel |
Named parameters and expressions stay attached to the design. When multiple dimensions share a driving variable or a surface has several owners, select the intended construction step or edit its source parameter. A Boolean-result hole surface targets its originating tool radius. Geometry edits preserve the graph output; they do not resize an unrelated source body.
Primitives — session.csg_make_shape(type, params, name, body_id)
box {"dx","dy","dz", "cx","cy","cz"}
sphere {"r", "cx","cy","cz"}
cylinder {"r","h", "cx","cy","cz"}
cone {"r1","r2","h", "cx","cy","cz"}
torus {"r1","r2", "cx","cy","cz"}
Extrude — session.csg_extrude(pts, length, draft, name, body_id, twist=0, path=None)
pts is a list of [x, y] pairs forming a closed profile (last point auto-connects to first).
Revolve — session.csg_revolve(pts, axis, angle=360, name="", body_id="")
Choose Revolve Profile in the CAD menu and use the same polygon, I-section, NACA, or user-defined parametric profile controls as Extrude. Set an axis point and direction in the profile's XY plane; the direction follows the right-hand rule. Angle must be greater than 0 and at most 360 degrees. Keep the entire closed profile on one side of the axis so the swept solid does not overlap itself.
definition = "x=.03+.005*cos(t); y=.005*sin(t)"
axis = {"point": [0, 0], "direction": [0, 1]}
body = session.csg_revolve_profile("parametric", {"definition": definition}, axis=axis, angle=360, name="Ring")
Revolution uses native OCCT and saves the resulting solid as STEP. Journals retain the parametric definition and axis values. Sesame exposes the same operation as csg_revolve.
User-defined parametric profiles
Under Extrude profiles, choose User-defined parametric curve below NACA Airfoil. In the multiline box, define variables in order, then the coordinates x and y. Each assignment can reuse earlier scalar or t-dependent variables. Separate assignments with newlines or semicolons. Click Preview to check the sampled outline, then Extrude to construct the solid.
R=0.01
r=0.002
a=(R-r)*t/r
x=(R-r)*cos(t)+r*cos(a)
y=(R-r)*sin(t)-r*sin(a)
This example is a five-cusped hypocycloid, not a qualified gear-tooth design. Coordinates use the current CAD units (the CSG panel labels meters); trigonometric arguments are radians. The default interval is 0..2*pi. To change it, assign t=start..end before any t-dependent variables; bounds may use earlier constants. Use ** for powers, with functions such as sin, cos, sqrt, abs, exp, log, minimum, maximum, and where. Names are case-sensitive. Forward references, reassignment, imports, and arbitrary code are not supported.
The curve must close over its interval and enclose usable area. Undefined expressions and repeated adjacent points are rejected; native construction also checks spline self-intersections and solid validity. Preview is a sampled outline, not a guarantee that extrusion will succeed. The default uses 512 samples; very fine features need resolution checks.
definition = """R=0.01
r=0.002
a=(R-r)*t/r
x=(R-r)*cos(t)+r*cos(a)
y=(R-r)*sin(t)-r*sin(a)"""
body = session.csg_extrude_profile(
"parametric", {"definition": definition}, length=0.02,
name="Cycloidal profile")
Add twist=4500 to this call for 90 degrees of rotation over its 0.02 length. Add draft=5 for an inward 5-degree taper only where the profile has enough clearance; sharp cusps and narrow features may not admit that offset. Zero draft and zero twist retain a straight extrusion. Newly created extrusions use size-aware display tessellation; existing saved display meshes must be regenerated to gain the finer appearance.
Journals retain the definition rather than dumping sampled coordinates. Journal callers can optionally specify n in the parameter dictionary (16 to 4096 samples). Sesame accepts the same definition through csg_extrude(profile="parametric", definition=..., length=...).
Extrude Along a Path Curve
Choose a profile as usual, then enable Along a path curve. Enter a second, independent multiline definition of x, y, and z. It supports the same dependent variables, functions, and optional t=start..end interval as the profile. This is a general expression path, not a helix-only tool. Preview shows the profile and an isometric view of the path.
The profile's local XY origin is placed at the path start, with its plane perpendicular to the initial tangent. Local X is aligned with world X projected onto that plane, or world Y if the tangent is parallel to X. The section then follows the path with automatic orientation. The path coordinates set position and extent; do not supply an extrusion length. Path sweeps currently keep a constant section, so Draft and Twist are disabled. Switching back to straight extrusion retains those controls' previous values.
profile = """r=0.002
x=r*cos(t)
y=r*sin(t)"""
path = """R=0.02
p=0.008
t=0..6*pi
x=R*cos(t)
y=R*sin(t)
z=p*t/(2*pi)"""
body = session.csg_extrude_profile(
"parametric", {"definition": profile},
path={"definition": path}, name="Path sweep")
This example creates a three-turn spring. Replace the path expressions to create a bend, a spatial curve, or a closed loop instead. Profile and path variables are separate; the path cannot implicitly read the profile's r. Coordinates use CAD length units and trigonometric functions use radians. An optional n in either journal parameter dictionary controls its sampling independently (default 512, range 16–4096).
Use smooth paths and enough samples to resolve their features. Repeated adjacent points, nonfinite coordinates, and degenerate curves are rejected; the constructed solid is checked for validity and self-interference. An oversized section can intersect itself around a bend or between neighboring turns. Sampling and successful construction are not substitutes for checking the geometry and mesh at the required resolution. See journals/csg_path_sweep1.py for a sweep followed by meshing through the session API.
Boolean — session.csg_boolean(op, body_a, body_b, name, body_id)
op ∈ {"union", "cut", "intersect"}. body_a / body_b are body_id strings.
Transform — session.csg_transform(body_id, op, params)
translate {"tx","ty","tz"}
rotate {"ax","ay","az","angle_deg"}
mirror {"plane": "xy"|"yz"|"xz"}
scale {"sx","sy","sz"} # uniform-with-axis scale (gp_Trsf)
stretch {"sx","sy","sz"} # non-uniform per-axis (gp_GTrsf)
Delete — session.csg_delete(body_id)
Removes the selected CSG body from the current model.
Keyboard & Mouse
| Action | Input |
|---|---|
| Orbit camera | Left-drag |
| Pan | Right-drag |
| Zoom | Scroll wheel |
| Select face | Click |
| Add to selection | Shift-click |
| Fit view | Fit button (top-right) |
| Snap views | Top / Front / Side / Iso buttons |
| Save project | Ctrl+S |
| Coordinate readout | Bottom-centre — shows nearest vertex under mouse |