functionvariableFactor

Calcutes a matrix f from 0 to 1 that relates a ratio of variable to fixed values

Extends from Modelica.Icons.Function (Icon for functions).

Information

For example,


It is desired to model the heat transfer to the wall of a container with liquid and gas, each phase modeled with one node while the wall has some number of nodes with fixed areas. The level of the liquid height varies so the area involved in the heat transfer changes. To capture this ratios of the areas of the wall associated with the heat transfer are needed to create the balance equations for Q_flows and T. This function will return the factor matrix (f) such that

for i in 1:nPhases loop

Q_flows_phase[i] + f[i,:]*Q_flows_wall[:] = 0;

T_phase[i] = fA[i,:]*T_wall[:]; // where fA is calculated from the function meanFactor

end for;

Inputs

TypeNameDefaultDescription
RealvariableArray with variable values
RealfixedArray with fixed values

Outputs

TypeNameDefaultDescription
RealfRatio factor matrix