to_MPa function

Requirements.Units.Conversions.to_MPa  ยท source

Icon of to_MPa

Convert from pascal to megapascal

Extends Modelica.Units.Icons.Conversion

Convert from pascal to megapascal: MPa := Pa/1000000. The input Pa is the value in pascal (type Modelica.Units.SI.Pressure), the output MPa the value in megapascal (type NonSI.Pressure_MPa). The inverse is from_MPa.

The conversion is a multiplication by a constant factor, without offset, so it converts differences and rates alike; it is exact up to floating-point rounding and has no limits on the input. The function is inlined. A check model uses it to give a variable of the model in the unit in which the requirement states it; see Conversions. Examples.Elementary.Units.Conversions asserts it through the round trip to_MPa(from_MPa(7)).

Copyright © 2026 Model Based Innovation LLC. All rights reserved.

Inputs

NameTypeDescription
Pa inputSI.PressureValue in pascal

Outputs

NameTypeDescription
MPa outputNonSI.Pressure_MPaValue in megapascal