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

Incompressible fluid materials

A fluid material declares its law in the fluid block. A constant-viscosity Newtonian fluid:

material water {
    mass_density = 1000 kg/m^3
    fluid {
        law = incompressible_newtonian
        dynamic_viscosity = 0.001 Pa*s
    }
}

Density has one authority: the material's shared mass_density. The fluid law owns dynamic viscosity, not a second density. Both coefficients must be finite and strictly positive. The law, viscosity, and density are required; no acoustic property, imported metadata, default coefficient, or scalar inlet speed supplies missing fluid physics.

Fluid material assignments use explicitly declared cell regions:

region volume : cell { select result; expect exactly_one }
// Inside the model:
assign material.water to geometry.channel.region.volume

Cell and Solid ownership remain distinct even when they refer to the same CAD volume. Exact shared property compilation checks every canonical volume element has one Cell material owner. The initial homogeneous material envelope requires all owners to declare identical physical density and viscosity; material names may differ. Missing, overlapping, unused, mixed Cell/Solid, and heterogeneous ownership rejects. Coefficients are not averaged or selected by node order.

Shear-thinning and yield-stress fluids

Generalized-Newtonian laws make the viscosity a function of the local shear rate γ˙=2D:D\dot\gamma=\sqrt{2\mathbf D:\mathbf D}γ˙​=2D:D​, evaluated face by face from the solved velocity gradient:

lawViscosityMembers
power_lawKγ˙n−1K\dot\gamma^{n-1}Kγ˙​n−1consistency (Pa·s^n, SI number), power_index, minimum_shear_rate (default 1e-3 1/s)
carreauμ∞+(μ0−μ∞)[1+(λγ˙)2](n−1)/2\mu_\infty+(\mu_0-\mu_\infty)[1+(\lambda\dot\gamma)^2]^{(n-1)/2}μ∞​+(μ0​−μ∞​)[1+(λγ˙​)2](n−1)/2zero_shear_viscosity, infinite_shear_viscosity, relaxation_time, power_index
carreau_yasudaas Carreau with exponent aaaplus transition_exponent
crossμ∞+(μ0−μ∞)/(1+(λγ˙)m)\mu_\infty+(\mu_0-\mu_\infty)/(1+(\lambda\dot\gamma)^m)μ∞​+(μ0​−μ∞​)/(1+(λγ˙​)m)zero_shear_viscosity, infinite_shear_viscosity, time_constant, rate_index
binghamτy(1−e−mγ˙)/γ˙+μp\tau_y(1-e^{-m\dot\gamma})/\dot\gamma+\mu_pτy​(1−e−mγ˙​)/γ˙​+μp​yield_stress, plastic_viscosity, regularization (default 1000 s)
herschel_bulkleyτy(1−e−mγ˙)/γ˙+Kγ˙n−1\tau_y(1-e^{-m\dot\gamma})/\dot\gamma+K\dot\gamma^{n-1}τy​(1−e−mγ˙​)/γ˙​+Kγ˙​n−1yield_stress, consistency, power_index, regularization
casson(τy(1−e−mγ˙)/γ˙+μp)2(\sqrt{\tau_y(1-e^{-m\dot\gamma})/\dot\gamma}+\sqrt{\mu_p})^2(τy​(1−e−mγ˙​)/γ˙​​+μp​​)2yield_stress, plastic_viscosity, regularization

Blood as a Carreau fluid:

material blood {
    mass_density = 1060 kg/m^3
    fluid {
        law = carreau
        zero_shear_viscosity = 0.056 Pa*s
        infinite_shear_viscosity = 0.00345 Pa*s
        relaxation_time = 3.313 s
        power_index = 0.3568
    }
}

Yield-stress laws use Papanastasiou regularization, so unyielded regions flow with a large but finite viscosity set by regularization; minimum_shear_rate holds a shear-thinning viscosity finite where the fluid is at rest.

Porous zones

A porous material describes a region that the surrounding fluid flows through: a filter cartridge, a packed bed, a metal foam or a tube bank represented as a resistance. Assign it to the porous region. The flowing fluid's density and viscosity come from the fluid material on the rest of the domain, so the porous material carries only its resistance law.

lawMomentum sink per unit volumeMembers
darcyμK u\dfrac{\mu}{K}\,\mathbf uKμ​upermeability (m^2), porosity
darcy_forchheimer(μK+12ρC2∣u∣)u\left(\dfrac{\mu}{K}+\tfrac12\rho C_2\lvert\mathbf u\rvert\right)\mathbf u(Kμ​+21​ρC2​∣u∣)upermeability (m^2), inertial_coefficient (1/m), porosity

Velocity in a porous zone is the superficial (Darcy) velocity, so mass flow is continuous across the zone boundary. Uniform flow through a zone of length LLL loses Δp=(μU/K+12ρC2U2)L\Delta p = \left(\mu U/K + \tfrac12\rho C_2 U^2\right)LΔp=(μU/K+21​ρC2​U2)L. The sink is implicit in the momentum equation and part of the solver's momentum-balance acceptance.

material pleated_media {
    porous {
        law = darcy_forchheimer
        permeability = 2e-11 m^2
        inertial_coefficient = 1.5e5 m^-1
        porosity = 0.85
    }
}

A material is either a fluid or a porous medium, not both.

On this page
  • Shear-thinning and yield-stress fluids
  • Porous zones