Skip to content
Preview.inp@modelscript/fea 8 diagnostic rules
Parser WASM GLR
Diagnostics 8 rules
DAE Arena Lowering
Simulation Native Solvers
Projections Modelica
Live ExampleTitaniumCantileverBracket.inp

CalculiX / Abaqus 3D Structural Static Stress Deck

Linear elastic finite-element deck in Ti-6Al-4V with fixed root boundary nodes and a 4.5 kN tip bending load.

Playground
Source (28 lines)
1*HEADING
2Ti-6Al-4V Aerospace Actuator Bracket Static Stress Study
3*NODE
41, 0.0, 0.0, 0.0
52, 0.12, 0.0, 0.0
63, 0.12, 0.04, 0.0
74, 0.0, 0.04, 0.0
85, 0.0, 0.0, 0.025
96, 0.12, 0.0, 0.025
107, 0.12, 0.04, 0.025
118, 0.0, 0.04, 0.025
12*ELEMENT, TYPE=C3D8, ELSET=EALL
131, 1, 2, 3, 4, 5, 6, 7, 8
14*MATERIAL, NAME=TI6AL4V
15*ELASTIC
16114.0E9, 0.34
17*SOLID SECTION, ELSET=EALL, MATERIAL=TI6AL4V
18*BOUNDARY
191, 1, 3, 0.0
204, 1, 3, 0.0
215, 1, 3, 0.0
228, 1, 3, 0.0
23*STEP
24*STATIC
25*CLOAD
262, 3, -2250.0
276, 3, -2250.0
28*END STEP
3D Finite-Element Mesh & Von Mises Stress Contour
C3D8 FINITE-ELEMENT CANTILEVER DEFORMATION & VON MISES STRESS *BOUNDARY (U1=U2=U3=0) *CLOAD F_z = −4.5 kN u_z,max = −1.84 mm σ_max = 312 MPa (Root) 12 MPa (Tip) MATERIAL & SAFETY Alloy Ti-6Al-4V Young's Modulus E 114.0 GPa Poisson Ratio ν 0.34 Peak Von Mises 312.4 MPa Yield Strength σ_y 880.0 MPa Safety Factor (FoS) 2.82 (PASS)
Drag to pan · Click % to reset

FEA (CalculiX, Abaqus & NASTRAN) ​

@modelscript/fea (languages/fea) provides native parsing, parametric template materialization, 3D CAD boundary condition synthesis, structural theory slicing, and cross-domain TGG synchronization for Finite Element Analysis input decks.


Supported Dialects & Extensions ​

ExtensionDialectKey Directives
.inpCalculiX / Abaqus input deck*HEADING, *NODE, *ELEMENT, *NSET, *ELSET, *MATERIAL, *ELASTIC, *DENSITY, *SOLID SECTION, *STEP, *STATIC, *FREQUENCY, *BOUNDARY, *CLOAD, *DLOAD
.inptParametric CalculiX / Abaqus templateSupports {{ expression }} mustache substitutions over workspace parameters
.bdfNASTRAN Bulk Data DeckSOL, CEND, BEGIN BULK, GRID, CTETRA, CHEXA, PSOLID, MAT1, SPC1, FORCE, MOMENT, LOAD, ENDDATA
.feaModelScript native FEA configurationStructured material, mesh, boundary, and load study definitions

Parametric Template Materialization ({{ expr }}) ​

Input decks (.inpt, .inp, .bdf, .fea) can embed parametric expressions enclosed in {{ ... }} placeholders:

ini
*MATERIAL, NAME=AL7075
*ELASTIC
{{ E_modulus }}, {{ poisson_ratio }}
*DENSITY
{{ rho_al }}
*CLOAD
LOAD_SET, 3, {{ -tip_mass * 9.81 }}

materializeFeaDeck(templateText, parameters) (languages/fea/src/materializer.ts) evaluates arithmetic expressions (+, -, *, /, ^), functions (sin, cos, tan, sqrt, abs, min, max, log, exp), and built-in constants (PI, E) via evaluateFeaExpression, formatting values in engineering notation and recording any unresolved symbols or syntax errors.


3D CAD Face Boundary Condition & Load Synthesis ​

When a user selects a topological face in the 3D CAD viewer, synthesizeFeaBoundary and applyBoundaryActionToDeck (languages/fea/src/boundary-synthesizer.ts) automatically generate solver-native boundary and load cards for the target dialect:

Boundary KindCalculiX / Abaqus (.inp)NASTRAN Bulk Data (.bdf)
Fixed Support (fixed)*BOUNDARY constraining DOFs 1, 6 (or 1, 3) on NSET_<FACE>SPC1 card locking DOFs 123456 (or 123) on SET_<FACE>
Point / Concentrated Force (force)*CLOAD directional nodal force components (Fx,Fy,Fz) along the face normalFORCE card with magnitude and normal unit vector (nx,ny,nz)
Distributed Pressure (pressure)*DLOAD surface pressure (P) applied to ELSET_<FACE>PLOAD4 / FORCE cards distributed across face elements
Torque / Moment (moment)*CLOAD rotational DOFs 4, 5, 6MOMENT card around face normal axis

Structural Theory Slicing & Safety Margin Extraction ​

extractFeaSlicingProperties(text) (languages/fea/src/language.ts) extracts structural parameters (DENSITY, VOLUME, MAX_VON_MISES_STRESS, YIELD_STRENGTH) directly from the CST and evaluates the structural safety margin:

Safety Factor (SF)=σyieldσvon Mises, max,isSafe⟺σvon Mises, max≤σyield

Returning { mass, maxVonMisesPa, yieldStrengthPa, safetyFactor, isSafe } directly to the Multi-Domain Theory Coordinator (CaeContractOracle) and SysML v2 requirement verifiers.


Built-In Solver & IDE Actions ​

@modelscript/fea registers three interactive actions in feaLanguage.actions:

  • open_fea_viewer: Opens the 3D FEA mesh, boundary condition, and von Mises stress contour viewer.
  • materialize_deck: Evaluates all {{ expr }} template placeholders against workspace parameters to produce a concrete .inp or .bdf deck.
  • run_simulation (fea_run_simulation): Parses *MATERIAL, *ELASTIC, *BOUNDARY, and *CLOAD/*DLOAD sections, solves the 3D tetrahedral finite element stiffness matrix, and returns nodal displacements and element von Mises stress contours.

Polyglot TGG Rules ​

@modelscript/fea defines 6 bidirectional Triple Graph Grammar (TGG) rules in languages/fea/src/language.ts:

Rule NameSource (fea)Target LanguageTarget Construct
FeaStressMassToModelicaParamFeaDeck (mass, maxVonMisesPa)modelicaComponentClause (parameter Real)
FeaStressMassToSysmlAttributeFeaDeck (safetyFactor, mass)sysml2AttributeUsage
FeaMaterialToSysmlAttributeSection (*MATERIAL / MAT1)sysml2AttributeUsage
FeaBoundaryFixToModelicaFixedSection (*BOUNDARY / SPC1)modelicaComponentClause (Modelica.Mechanics.MultiBody.Parts.Fixed)
FeaSpringToModelicaSpringSection (*SPRING)modelicaComponentClause (Modelica.Mechanics.Translational.Components.Spring)
FeaLoadCaseToSysmlRequirementSection (*STEP / SUBCASE)sysml2RequirementUsage

Command Line Interface (msx fea) ​

bash
msx fea <action> [files...] [options]
ActionDescriptionKey Options
lintValidates CalculiX, Abaqus, and NASTRAN syntax, element topologies, material cards, and constraints.—
summaryPrints structural summary: element count by kind (C3D4, C3D10, CHEXA), materials, and load steps.—
inspectDumps parsed boundary sets, node coordinates, material elastic moduli, and load cases.—
to-modelicaGenerates Modelica equivalent structural stiffness models and translational boundary ports.--out=<file.mo>
to-daeLowers structural mass and stiffness matrices into ModelScript linear-memory DAE arena.--out=<file.json>
solveSolves linear elastostatic stiffness matrix for nodal displacements and von Mises stress contours.—

Examples ​

bash
# Validate element connectivity and material properties in an Abaqus deck
msx fea lint BracketAssembly.inp

# Display mesh statistics, node count, and material properties
msx fea summary ChassisStructure.bdf

# Solve linear static displacement and print max von Mises stress
msx fea solve BracketAssembly.inp

Diagnostic Rules ​

8 rules6 error2 warning Run with msx lint

CodeRuleSeverityMessage
F1001zero-elastic-moduluserrorMaterial '<mat>' has non-positive Young's modulus '<val>'.
F1002poisson-ratio-limiterrorPoisson's ratio '<val>' for material '<mat>' violates physical stability bounds (-1.0 < nu < 0.5).
F1003unconstrained-rigid-bodywarningStructural mesh '<name>' has only '<count>' constrained boundary nodes; rigid-body motion may be unconstrained.
F1004empty-mesherrorFEA deck '<name>' does not contain any defined finite elements.
F1005missing-material-definitionerrorElement set '<elset>' lacks an assigned material specification or section.
F1006degenerate-element-nodeserrorElement '<elemId>' of type '<type>' contains duplicate or degenerate node references.
F1007negative-yield-stresserrorPlastic yield strength '<val>' for material '<mat>' must be strictly positive.
F1008negative-densitywarningMass density '<val>' for material '<mat>' must be strictly positive for dynamic analysis.

Generated from languages/fea/src/errors.ts. All languages →

Open-Core under the GNU AGPL v3 License; Enterprise Edition (ee/) under the ModelScript Enterprise License. • Trademark Policy