to_gpkg function

Requirements.Units.Conversions.to_gpkg  ยท source

Icon of to_gpkg

Convert from kilogram per kilogram to gram per kilogram

Extends Modelica.Units.Icons.Conversion

Convert from kilogram per kilogram to gram per kilogram: gpkg := 1000*kgpkg. The input kgpkg is the value in kilogram per kilogram (type Modelica.Media.Interfaces.Types.MassFraction), the output gpkg the value in gram per kilogram (type NonSI.MassFraction_gpkg). The inverse is from_gpkg.

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_gpkg(from_gpkg(7)).

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

Inputs

NameTypeDescription
kgpkg inputModelica.Media.Interfaces.Types.MassFractionValue in kilogram per kilogram

Outputs

NameTypeDescription
gpkg outputNonSI.MassFraction_gpkgValue in gram per kilogram