GENSYS Railway Dynamics (.calc, .sub, .geom, .trax, .wheel)
ModelScript provides native support for GENSYS, the world standard railway vehicle dynamics, track-vehicle interaction, and vehicle running safety simulation environment.
Capabilities
- Command Deck Parsing: Full support for
.calc,.run, and.substructured card records defining rigid car bodies, bogies, wheelsets, and primary/secondary spring-damper couplings. - Track Geometry & Irregularities: Ingests
.geomand.traxfiles with longitudinal distance, horizontal/vertical irregularities, cant (crosslevel), and curvature. - Kalker FASTSIM & Polach Contact Mechanics: Discretizes rolling contact ellipses into elastic/slip zones to compute tangential creep forces (
, ) and spin moment ( ) with non-linear saturation. - WebAssembly Contact Mechanics Kernel:
- High-performance AssemblyScript linear memory kernel (
contact.wasm) executing Kalker FASTSIM 8-slice strip integration and Polach creep mechanics. - High-throughput multi-axle batched contact patch solvers (
batchFastsim,batchPolach).
- High-performance AssemblyScript linear memory kernel (
- EN 14363 / UIC 518 Vehicle Acceptance: Automated safety evaluation of the derailment quotient (
) and Prud'homme lateral track shifting force limits. - Ride Comfort & Equivalent Conicity: Evaluates Sperling ride index (
) and wheel-rail equivalent conicity ( ). - DAE Lowering & MultiBody Export: Direct lowering to linear-memory
DAEBuilderand automated projection to standardModelica.Mechanics.MultiBodycomponents. - FMI 2.0 / 3.0 Co-Simulation FMU Export: Packages complete vehicle and track dynamics into standalone
.fmuarchives with standardized vehicle states, running safety outputs, and C co-simulation wrapper runtime. - Interactive 3D Viewport: WebGL/Three.js 3D visualization rendering carbody shells, front/rear bogie frames, wheelsets, and primary/secondary spring dampers with orbit controls.
CLI Usage
bash
# Pre-flight linting of GENSYS vehicle deck
msx gensys lint coach.calc
# Direct DAE simulation in WebAssembly arena with CSV trajectory export
msx gensys simulate coach.calc --stop-time=5.0 --step=0.005 --out=results.csv
# Export vehicle dynamics as an FMI 2.0/3.0 Co-Simulation FMU
msx gensys to-fmu coach.ins --out=PassengerCoach.fmu
# Export to standard Modelica MultiBody model
msx gensys to-modelica coach.calc --out=PassengerCoach.mo
# Verify EN 14363 running safety criteria
msx gensys verify --y-force=28.5 --q-force=82.0 --axle-load=160.0Benchmarks
- Manchester Benchmark for Railway Vehicle Dynamics (
languages/gensys/testsuite/ManchesterBenchmark.ins):- Standard passenger coach benchmark (Iwnicki et al.): 32-ton passenger carbody, two 3.2-ton bogie frames, four 1.8-ton wheelsets running at
(144 km/h). - Validates secondary and primary suspension settling dynamics, 8-patch FASTSIM contact in WASM, and EN 14363 / UIC 518 derailment safety limits.
- Standard passenger coach benchmark (Iwnicki et al.): 32-ton passenger carbody, two 3.2-ton bogie frames, four 1.8-ton wheelsets running at
MCP Tools
AI agents interacting via the ModelScript MCP server have access to:
gensys_lint: Validates body parameters, mass positivity, and suspension couplings.gensys_verify_en14363: Assesses derailment quotient and lateral track shift limits.gensys_fastsim: Computes rolling contact tangential creep forces and adhesion saturation.
Diagnostic Rules
6 rules5 error1 warning Run with msx gensys lint
| Code | Rule | Severity | Message |
|---|---|---|---|
G1001 | invalid-body-mass | error | Body '<name>' has non-positive mass (<mass> kg). |
G1002 | non-positive-inertia | error | Body '<name>' has non-positive principal inertia tensor components. |
G1003 | dangling-body1-reference | error | Coupling '<name>' references unknown body1 '<body1>'. |
G1004 | dangling-body2-reference | error | Coupling '<name>' references unknown body2 '<body2>'. |
G1005 | invalid-track-gauge | error | Track specification defines non-positive or unphysical gauge (<gauge> m). |
G1006 | unclosed-rail-profile | warning | Wheel-rail contact profile '<profileName>' curve has discontinuous slope or is unclosed. |
Generated from languages/gensys/src/errors.ts. All languages →

