Simulation handoff API
cadflow.simulation describes distributed face contact and material assignments for an assembly. CadFlow validates and packages geometry evidence; meshing, loads, boundary conditions, stepping, nonlinear solution, and convergence remain responsibilities of the downstream solver adapter.
Model contents
ContactSimulationModel contains:
| Collection | Identity | Role |
|---|---|---|
surfaces | surface_id | Component-local face regions and roles |
contact_laws | law_id | Normal and tangential constitutive declaration |
contact_pairs | pair_id | Two surfaces, law, search and sliding settings |
surface_properties | property_id | Thickness or other region properties |
materials | material_id | Mechanical material values |
component_materials | component ID | Material assignment |
The model also records explicit length, force, time, and temperature units. Derived pressure, penalty, damping, density, and thermal-expansion units are included in serialized data.
Surface references
make_surface_region_rsurfaceregion accepts compatibility faces or replayable GeometryRef values. geometry_ref_from_face(face, flip=False) creates a stable selector from a public face. flip reverses the intended surface orientation in simulation evidence.
Surface resolution checks that the component exists, resolves each selector, and records stable face evidence. Current packaging expects target parts to be directly resolvable from the assembly structure.
Constitutive declarations
SurfaceContactLaw supports the documented NormalContactModel, FrictionModel, and related penalty/cohesive parameters. SurfaceContactPair connects two distinct surfaces and specifies clearance or interference, search tolerance, opposed-normal threshold, sliding formulation, and optional activation step.
MechanicalMaterial stores explicit elastic, density, yield, thermal, and metadata fields. CadFlow never derives engineering constants from a material name.
Validate, analyze, export
report = cad.validate_contact_simulation_model_rcontactsimulationvalidationreport(
simulation, assembly
)
report.raise_for_errors()
analysis = cad.analyze_contact_simulation_model_rcontactsimulationanalysis(
simulation, assembly
)
manifest = cad.export_contact_simulation_package_rpath(
simulation, assembly, "out/contact-package"
)
Validation checks schema and cross-references. Analysis resolves surfaces and computes native face/pair metrics such as area, centroid, bounds, separation, and relative orientation. Export writes simulation JSON, component-local BREP geometry, selected faces, hashes, indices, and rigid transforms.
Candidate or metric evidence is preprocessing information, not a solved contact state. A solver adapter must define how neutral laws map to solver-specific cards and document any unsupported field.
See all 22 Simulation symbols.