Skip to content
Stable.calc@modelscript/gensys 6 diagnostic rules
Parser WASM GLR
Diagnostics 6 rules
DAE Arena Lowering
Simulation Native Solvers
Projections Modelica, FMU
Live ExampleHighSpeedPassengerBogie.calc

GENSYS High-Speed Railway Vehicle & Bogie Suspension

Multi-body rail vehicle model with carbody, bolster, bogie frame, two wheelsets, primary/secondary air-spring couplings, and EN 14363 track.

Playground
Source (11 lines)
1## GENSYS High-Speed Passenger Coach Bogie Deck
2func const v_kmh = 250.0
3mass m_carbody  0.0 0.0 -1.85   38000.0 38000.0 38000.0   58000.0 1250000.0 1250000.0
4mass m_bogie1   9.5 0.0 -0.65    2600.0  2600.0  2600.0    1800.0    3200.0    4600.0
5mass m_axle11  10.8 0.0 -0.46    1450.0  1450.0  1450.0     820.0     140.0     820.0
6mass m_axle12   8.2 0.0 -0.46    1450.0  1450.0  1450.0     820.0     140.0     820.0
7 
8coupl k_sec_z   m_carbody m_bogie1  0.42e6
9coupl c_sec_z   m_carbody m_bogie1  28.0e3
10coupl k_prim_11 m_bogie1  m_axle11  1.15e6
11coupl k_prim_12 m_bogie1  m_axle12  1.15e6
GENSYS Multibody Rail Vehicle Topology
GensysModel
Drag to pan · Click % to reset

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 .sub structured card records defining rigid car bodies, bogies, wheelsets, and primary/secondary spring-damper couplings.
  • Track Geometry & Irregularities: Ingests .geom and .trax files with longitudinal distance, horizontal/vertical irregularities, cant (crosslevel), and curvature 1/R.
  • Kalker FASTSIM & Polach Contact Mechanics: Discretizes rolling contact ellipses into elastic/slip zones to compute tangential creep forces (Fx, Fy) and spin moment (Mz) 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).
  • EN 14363 / UIC 518 Vehicle Acceptance: Automated safety evaluation of the derailment quotient (Y/Q≤0.8) and Prud'homme lateral track shifting force limits.
  • Ride Comfort & Equivalent Conicity: Evaluates Sperling ride index (Wz) and wheel-rail equivalent conicity (λ).
  • DAE Lowering & MultiBody Export: Direct lowering to linear-memory DAEBuilder and automated projection to standard Modelica.Mechanics.MultiBody components.
  • FMI 2.0 / 3.0 Co-Simulation FMU Export: Packages complete vehicle and track dynamics into standalone .fmu archives 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.0

Benchmarks ​

  • 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 V=40 m/s (144 km/h).
    • Validates secondary and primary suspension settling dynamics, 8-patch FASTSIM contact in WASM, and EN 14363 / UIC 518 derailment safety limits.

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

CodeRuleSeverityMessage
G1001invalid-body-masserrorBody '<name>' has non-positive mass (<mass> kg).
G1002non-positive-inertiaerrorBody '<name>' has non-positive principal inertia tensor components.
G1003dangling-body1-referenceerrorCoupling '<name>' references unknown body1 '<body1>'.
G1004dangling-body2-referenceerrorCoupling '<name>' references unknown body2 '<body2>'.
G1005invalid-track-gaugeerrorTrack specification defines non-positive or unphysical gauge (<gauge> m).
G1006unclosed-rail-profilewarningWheel-rail contact profile '<profileName>' curve has discontinuous slope or is unclosed.

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

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