functionmeanFactor

Calcutes a matrix fA and f that returns the calculates a mean value based on a ratio of variable to fixed values using variableFactor

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 (fA) such that

for i in 1:nPhases loop

Q_flows_phase[i] + f[i,:]*Q_flows_wall[:] = 0; // where f is from function variableFactor

T_phase[i] = fA[i,:]*T_wall[:];

end for;

Inputs

TypeNameDefaultDescription
RealvariableArray with variable values
RealfixedArray with fixed values

Outputs

TypeNameDefaultDescription
RealfARatio factor matrix
RealfRatio factor matrix