.TRANSFORM.Math.variableFactor

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;

Interface

function variableFactor
  extends TRANSFORM.Icons.Function;
  input Real[:] variable "Array with variable values";
  input Real[:] fixed "Array with fixed values";
  output Real[size(variable, 1), size(fixed, 1)] f "Ratio factor matrix";
end variableFactor;

Generated at 2024-11-22T19:25:38Z by OpenModelicaOpenModelica 1.24.2 using GenerateDoc.mos