RunMat
  • Pricing
RunMat
GitHub
GitHub
Sign inTry in browser
DesktopRuntimePhysicsCADAdministrationAgent

Get RunMat updates

New releases, guides and examples.

Product+
  • Runtime
  • GPU
  • Parallel
  • Compile
  • Interop and MEX
  • Simulation
  • MCAD
  • ECAD
  • Enterprise
  • AI integrations
  • Pricing
  • Download
Math+
  • Signal processing
  • Linear algebra
  • Statistics
  • Curve fitting
  • Differential equations
  • Control systems
  • Optimization
  • Finance
  • Data and tables
  • Plotting
Physics+
  • Simulation overview
  • Structural
  • Thermal
  • Electromagnetic
  • Joule heating
  • Thermal stress
  • Acoustics
  • Fluid flow
  • Conjugate heat transfer
  • Fluid–structure
  • What is FEA
Industries+
  • Aerospace
  • Automotive and transportation
  • Defense
  • Electronics and semiconductors
  • Energy
  • Industrial machinery
  • Life sciences
  • Quantitative finance
Learn+
  • Guides
  • Docs
  • Function reference
  • Language reference
  • Migration guide
  • Changelog
  • MATLAB Online
  • MATLAB AI agent
  • For students
Compare+
  • RunMat vs MATLAB
  • RunMat vs Ansys
  • RunMat vs SOLIDWORKS
  • RunMat vs Altium
  • RunMat vs Cadence
  • RunMat vs COMSOL
  • RunMat vs Python
  • RunMat vs Julia
  • RunMat vs Physics AI
  • RunMat vs Octave
  • Benchmarks
  • MATLAB alternatives
  • All comparisons
Company+
  • About
  • Blog
  • Contact
  • Source code↗
  • License
  • Privacy
  • Terms

Product

  • Runtime
  • GPU
  • Parallel
  • Compile
  • Interop and MEX
  • Simulation
  • MCAD
  • ECAD
  • Enterprise
  • AI integrations
  • Pricing
  • Download

Math

  • Signal processing
  • Linear algebra
  • Statistics
  • Curve fitting
  • Differential equations
  • Control systems
  • Optimization
  • Finance
  • Data and tables
  • Plotting

Physics

  • Simulation overview
  • Structural
  • Thermal
  • Electromagnetic
  • Joule heating
  • Thermal stress
  • Acoustics
  • Fluid flow
  • Conjugate heat transfer
  • Fluid–structure
  • What is FEA

Industries

  • Aerospace
  • Automotive and transportation
  • Defense
  • Electronics and semiconductors
  • Energy
  • Industrial machinery
  • Life sciences
  • Quantitative finance

Learn

  • Guides
  • Docs
  • Function reference
  • Language reference
  • Migration guide
  • Changelog
  • MATLAB Online
  • MATLAB AI agent
  • For students

Compare

  • RunMat vs MATLAB
  • RunMat vs Ansys
  • RunMat vs SOLIDWORKS
  • RunMat vs Altium
  • RunMat vs Cadence
  • RunMat vs COMSOL
  • RunMat vs Python
  • RunMat vs Julia
  • RunMat vs Physics AI
  • RunMat vs Octave
  • Benchmarks
  • MATLAB alternatives
  • All comparisons

Company

  • About
  • Blog
  • Contact
  • Source code↗
  • License
  • Privacy
  • Terms
GitHubXLinkedIn

© Dystr, Inc. · RunMat v0.7.1, Nov 17, 2026

RunMat® is a registered trademark of Dystr, Inc. MATLAB® is a registered trademark of The MathWorks, Inc. RunMat is not affiliated with, endorsed by, or sponsored by The MathWorks, Inc.

/
    • Grammar
    • Declarations
    • Procedures
    • Types, units and expressions
    • Files, modules and imports
    • Studies, analyses and state
    • Outputs, fields and observations
    • Operations and output queries
    • Operation reference
    • RunMat function integration
    • Diagnostics and tooling
    • Geometry features and AP242
    • Geometry, models and assignments
    • Constraints, loads and interfaces
    • Fluid materials
Docs>Physics>Language reference

Types, units and expressions

The checker gives every input, reference, literal and operation a type before a study is planned. Physical values carry a dimension, so a length cannot stand in for a force because both are numbers, and a pressure written in MPa and one written in Pa are the same quantity.

Types

Inputs, model parameters and let bindings are declared with a type: input thickness : length = 8 mm.

GroupTypes
Plain valuesboolean, integer, real, dimensionless, complex, string
Geometry and kinematicslength, displacement, area, volume, angle, rotation, velocity, acceleration, angular_velocity, angular_acceleration
Mass and timemass, mass_density, time, frequency, mass_flow_rate, volume_flow_rate
Mechanicsforce, moment, pressure, stress, body_force_density, energy, power
Heattemperature, temperature_difference, heat_flux, heat_generation_density, heat_transfer_coefficient, thermal_conductivity
Electromagneticselectric_potential, electric_current, electric_current_density, electric_charge, electric_charge_density, magnetic_flux_density, magnetic_vector_potential
Declarationsgeometry, mesh, material, model, study, execution
Regionsregion<solid>, region<face>, region<edge>, region<vertex>, region<cell>

Type names are exact: there are no aliases, so bool, scalar and density are errors. The region's topology is part of its type: a face region cannot be passed where region<solid> is expected, even when it holds one entity, and a region type always names one topology.

model bracket(region body : region<solid>, region pad : region<face>) {
    input body_material : material
    input service_load : force = 1 kN
}

Units

A quantity is a number followed by a unit: 8 mm, 1.5 kN, 2700 kg/m^3. These unit symbols are accepted, and combine into unit expressions with *, / and integer powers ^:

DimensionUnits
Lengthm, mm, um, nm, cm, km, in (also inch), ft
Times, ms, us, ns
FrequencyHz, kHz, MHz, GHz
Masskg, gram
Accelerationg (standard gravity, 9.806 65 m/s²)
ForceN, kN
Pressure and stressPa, kPa, MPa, GPa
EnergyJ
PowerW, mW, kW, MW
TemperatureK, degC (absolute), delta_degC (difference)
CurrentA, mA, kA
ChargeC
PotentialV, mV, kV, MV
Magnetic flux densityT, mT
Anglerad, deg
Memory (execution resources)B, KiB, MiB, GiB

Derived units are written as expressions:

QuantityWritten as
Densitykg/m^3
Thermal conductivityW/m/K
Specific heatJ/kg/K
Heat transfer coefficientW/m^2/K
Heat fluxW/m^2
Dynamic viscosityPa*s
Electrical conductivityA/V/m; S/m Not yet releasedStatus
Current densityA/m^2
Electric fieldV/m, kV/mm
Thermal expansion coefficientK^-1
Specific acoustic impedancePa*s/m
Permeability (porous)m^2

A bare number is dimensionless; it never takes on the unit its destination expects, so youngs_modulus = 200e9 is an error and poisson_ratio = 0.3 is correct. Compatible units are converted for computation, and the authored unit is kept for diagnostics and display.

Temperatures

K and degC are absolute temperatures, and delta_degC is a temperature difference. 20 degC is 293.15 K, while 20 delta_degC is a 20 K rise. The checker rejects arithmetic that mixes them up, such as adding two absolute temperatures, and a temperature_difference input does not accept 20 degC.

Lists, vectors and records

Lists are ordered and, after type resolution, homogeneous. Records have named fields:

let direction = [0, -1, 0]
let sample = { at = 10 ms, value = 1 kN }

A vector quantity is written either with a unit on each component, [0 mm, 0 mm, 5 mm], or with one unit after the list, [0, 0, -100000] Pa. Both forms are accepted by loads and geometry operations; in orientation and frame members (origin = [0, 0, 0] m) the trailing-unit form is Not yet releasedStatus. A direction is dimensionless and is wrapped in the frame it is expressed in, such as global([0, 0, 1]).

References

A reference names a declaration and, where it applies, an owned member. Every segment is checked:

geometry.bracket
geometry.bracket.region.support
material.aluminum
model.bracket.constraint.fixed_support
model.response_spectrum.design
load_case.service
analysis.static.state.basis
analysis.static.field.node.displacement
output.peak_stress
input.service_load

References resolve through lexical scope and the module's imports. An unresolved or ambiguous reference is a check error; nothing is looked up by string at solve time.

Expressions and operators

Expressions are immutable. They combine literals, references, lists, records and calls to cataloged operations with these operators:

OperatorMeaning
+, -, *, /, ^Arithmetic, with units: 1.5 * input.service_load is a force, input.force / input.area a pressure.
==, !=, <, <=, >, >=Comparisons of quantities of the same dimension.
a..bAn integer range, such as workers = 4..32.

Operations are called by name with positional and named arguments, such as max(magnitude(output.displacement), over = geometry.bracket.region.body). Each operation's overloads fix the accepted field location, quantity, shape, named arguments and result type; an unknown operation or an argument of the wrong kind is a check error. The catalog of output operations is in operations and output queries.

Inputs and let

input declares a value that a study, a sweep case or the command line can set; let names a local expression:

input service_load : force {
    default = 1 kN
    minimum = 0 N
    maximum = 5 kN
}

let proof_load = 1.5 * input.service_load

Inputs are immutable. A default is optional; without one, every study binding or sweep case must supply the value. Bounds have the input's type and dimension, and a value outside them is an error. Any name can be declared, including names that are also keywords, such as input load : force Not yet releasedStatus. See inputs, sweeps and cases.

On this page
  • Types
  • Units
  • Temperatures
  • Lists, vectors and records
  • References
  • Expressions and operators
  • Inputs and let