Modelica.Media.Examples.SolveOneNonlinearEquation

Demonstrate how to solve one non-linear algebraic equation in one unknown

Information

This package demonstrates how to solve one non-linear algebraic equation in one unknown with function solveOneNonlinearEquation.

Extends from Modelica.Icons.ExamplesPackage (Icon for packages containing runnable examples).

Package Content

Name Description
Modelica.Media.Examples.SolveOneNonlinearEquation.Inverse_sine Inverse_sine Solve y = A*sin(w*x) for x, given y
Modelica.Media.Examples.SolveOneNonlinearEquation.Inverse_sh_T Inverse_sh_T Solve h = h_T(T), s = s_T(T) for T, if h or s is given for ideal gas NASA
Modelica.Media.Examples.SolveOneNonlinearEquation.InverseIncompressible_sh_T InverseIncompressible_sh_T Inverse computation for incompressible media
Modelica.Media.Examples.SolveOneNonlinearEquation.Inverse_sh_TX Inverse_sh_TX Solve h = h_TX(TX) for T, if h is given for ideal gas NASA

Modelica.Media.Examples.SolveOneNonlinearEquation.Inverse_sine Modelica.Media.Examples.SolveOneNonlinearEquation.Inverse_sine

Solve y = A*sin(w*x) for x, given y

Information

This models solves the following non-linear equation

y = A*sin(w*x); -> determine x for given y

Translate model "Inverse_sine" and simulate for 0 sec. The result is printed to the output window.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

NameDescription
y_zeroDesired value of A*sin(w*x)
x_minMinimum value of x_zero
x_maxMaximum value of x_zero
AAmplitude of sine
wAngular frequency of sine

Modelica.Media.Examples.SolveOneNonlinearEquation.Inverse_sh_T Modelica.Media.Examples.SolveOneNonlinearEquation.Inverse_sh_T

Solve h = h_T(T), s = s_T(T) for T, if h or s is given for ideal gas NASA

Information

This models computes the temperature Th for predefined specific enthalpy h1 via numerical inversion of function Modelica.Media.IdealGases.Common.Functions.h_T. The specific enthalpy h2 is computed as check variable from temperature Th and must be identical to h1.

In an analogous manner, the temperature Ts is computed for predefined specific entropy s1 via numerical inversion of function Modelica.Media.IdealGases.Common.Functions.s0_T. The specific entropy s2 is computed as check variable from temperature Ts and must be identical to s1.

The numerical computation of the inverse function is performed by function Modelica.Math.Nonlinear.solveOneNonlinearEquation in both cases.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

NameDescription
replaceable package MediumMedium model
T_minVary temperature linearly from T_min (time=0) up to T_max (time=1) [K]
T_maxVary temperature linearly from T_min (time=0) up to T_max (time=1) [K]
pFixed pressure in model [Pa]

Connectors

NameDescription
replaceable package MediumMedium model

Modelica.Media.Examples.SolveOneNonlinearEquation.InverseIncompressible_sh_T Modelica.Media.Examples.SolveOneNonlinearEquation.InverseIncompressible_sh_T

Inverse computation for incompressible media

Information

This models computes the temperature Th for predefined specific enthalpy h1 via numerical inversion of function Modelica.Media.Incompressible.TableBased.h_T. The specific enthalpy h2 is computed as check variable from temperature Th and must be identical to h1.

In an analogous manner, the temperature Ts is computed for predefined specific entropy s1 via numerical inversion of function Modelica.Media.Incompressible.TableBased.s_T. The specific entropy s2 is computed as check variable from temperature Ts and must be identical to s1.

The numerical computation of the inverse function is performed by function Modelica.Math.Nonlinear.solveOneNonlinearEquation in both cases.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

NameDescription
replaceable package MediumMedium model
T_minVary temperature linearly from T_min (time=0) up to T_max (time=1) [K]
T_maxVary temperature linearly from T_min (time=0) up to T_max (time=1) [K]
pFixed pressure in model [Pa]

Connectors

NameDescription
replaceable package MediumMedium model

Modelica.Media.Examples.SolveOneNonlinearEquation.Inverse_sh_TX Modelica.Media.Examples.SolveOneNonlinearEquation.Inverse_sh_TX

Solve h = h_TX(TX) for T, if h is given for ideal gas NASA

Information

This models computes the temperature Th for predefined specific enthalpy h1 via numerical inversion of function Modelica.Media.IdealGases.Common.Functions.h_T. The specific enthalpy h2 is computed as check variable from temperature Th and must be identical to h1.

In an analogous manner, the temperature Ts is computed for predefined specific entropy s1 via numerical inversion of function Modelica.Media.IdealGases.Common.Functions.s0_T. The specific entropy s2 is computed as check variable from temperature Ts and must be identical to s1.

The numerical computation of the inverse function is performed by function Modelica.Math.Nonlinear.solveOneNonlinearEquation in both cases.

Extends from Modelica.Icons.Example (Icon for runnable examples).

Parameters

NameDescription
replaceable package MediumMedium model
T_minVary temperature linearly from T_min (time=0) up to T_max (time=1) [K]
T_maxVary temperature linearly from T_min (time=0) up to T_max (time=1) [K]
pFixed pressure in model [Pa]
X[4]Mass fraction vector [1]

Connectors

NameDescription
replaceable package MediumMedium model
Automatically generated Thu Oct 1 16:08:01 2020.