FEBio & SOFA Soft-Tissue Biomechanics (.feb, .scn)
@modelscript/febio (languages/febio) provides native WebAssembly parsing, hyperelastic and biphasic poroelastic material stability verification, element Jacobian volume positivity checking, non-linear strain-energy and Cauchy stress evaluation, DAEBuilder lowering, and CalculiX .inp / Modelica projections for FEBio (febio_spec 3.0 / 4.0) soft-tissue biomechanics and SOFA Framework (.scn) real-time surgical simulation scenes.
Supported Extensions & Standards
| Extension | Format | Description |
|---|---|---|
.feb | FEBio Specification | XML specification of Material, Mesh / Geometry, Boundary, Loads, Contact, and Step blocks |
.scn | SOFA Scene Graph | Simulation Open Framework Architecture (Node, MechanicalObject, TetrahedronFEMForceField, CollisionPipeline) |
Key Capabilities
1. Hyperelastic, Viscoelastic & Biphasic Constitutive Models
- Parses and evaluates soft-tissue strain energy density functions
across biological constitutive laws: - Neo-Hookean & Mooney-Rivlin:
- Ogden Hyperelastic:
- Holmes-Mow & Biphasic Poroelastic: Articular cartilage fluid-solid mixture hydraulic permeability
and interstitial fluid pressure.
- Neo-Hookean & Mooney-Rivlin:
- Enforces Drucker stability (
), positive bulk/shear moduli, and positive element Jacobians ( ).
2. CalculiX FEA, Modelica & DAE Lowering
- Solves Principal stretches, Cauchy stresses, and strain energy densities (
solveHyperelasticMechanics), exports to CalculiX / Abaqus.inp(febioToCalculixInp) and Modelica (febioToModelica), and lowers lumped compliance dynamics intoDAEBuilder.
Pre-Flight Diagnostics
10 rules9 error1 warning
| Code | Rule | Severity | Message |
|---|---|---|---|
M9401 | febio-invalid-material-constant | error | Non-physical material constant <paramDesc> in material '<materialName>'. |
M9402 | febio-inverted-element-jacobian | error | Element '<elemId>' (<elemType>) has non-positive Jacobian determinant det(J) = '<detJ>'. |
M9403 | febio-unresolved-node-or-set | error | Unresolved <refKind> reference '<refId>' in '<contextName>'. |
M9404 | febio-unconstrained-rigid-body | warning | Model '<modelTitle>' has no fixed or prescribed displacement boundary conditions to prevent rigid-body motion. |
M9405 | febio-invalid-biphasic-permeability | error | Invalid biphasic/poroelastic parameter (<reason>) in material '<materialName>'. |
M9406 | febio-invalid-time-stepper | error | Invalid <Control> time-stepper configuration: time_steps='<timeSteps>', step_size='<stepSize>' (both must be > 0). |
M9407 | febio-unresolved-material-id | error | Unresolved material ID '<matId>' referenced in '<contextName>'. |
M9408 | febio-contact-penalty-invalid | error | Contact interface '<contactName>' has invalid configuration: <detail>. |
M9409 | febio-sofa-missing-mechanical-object | error | SOFA <Node> '<nodeName>' contains '<<forceFieldType>>' without a '<MechanicalObject>' state container. |
M9410 | febio-duplicate-entity-id | error | Duplicate <entityKind> identifier '<id>'. |
Generated from languages/febio/src/lints/rules.ts. All languages →
CLI Usage
bash
# Inspect FEBio materials, mesh nodes/elements, and boundary conditions
msx febio inspect LiverHyperelastic.feb
# Validate Drucker hyperelastic stability and element Jacobian determinants
msx febio validate LiverHyperelastic.feb
# Solve hyperelastic strain energy and Cauchy stress response
msx febio solve LiverHyperelastic.feb
# Project FEBio mesh and materials to CalculiX/Abaqus .inp or Modelica
msx febio to-inp LiverHyperelastic.feb > LiverHyperelastic.inp
msx febio to-modelica LiverHyperelastic.feb > LiverHyperelastic.mo
