## inverseinverse |

This information is part of the Modelica Standard Library maintained by the Modelica Association.

Every function with one output argument may have one or more "`inverse`

" annotations to define inverses of this function.

functionf1inputA1 u1; ...inputT1 uk; ...inputAm um = am; ...inputAn un;outputT2 y;annotation(inverse(uk = f2(..., y, ....), ui = f3(..., y, ...), ...));algorithm...endf1;

The meaning is that function "`f2`

" is one inverse to function "`f1`

" where the previous output "`y`

" is now an input and the previous input "`uk`

" is now an output. More than one inverse can be defined within the same inverse annotation. Several inverses are separated by commas. *(The inverse requires that for all valid values of the input arguments of f2(...,y, ...) and uk being calculated as uk := f2(..., y, ...) implies the equality y = f1(..., uk, ...,) up to a certain precision.)*

Function "`f1`

" can have any number and types of arguments with and without default value. The restriction is that the number of unknown variables in the output argument of both "`f1`

" and "`f2`

" must be the same and that "`f2`

" must have exactly the same arguments as "`f1`

" (with the same defaults, if an argument um has a default), but the order of the arguments may be permuted.

functionh_pTXinputReal p "pressure";inputReal T "temperature";inputReal X[:] "mass fractions";outputReal h "specific enthalpy";annotation(inverse(T = T_phX(p,h,X)));algorithm...endh_pTX;functionT_phXinputReal p "pressure";inputReal h "specific enthalpy";inputReal X[:] "mass fractions";outputReal T "temperature";algorithm...endT_phX;