summaryrefslogtreecommitdiff
path: root/Simulator/Simulator/Files/ThermodynamicFunctions/EOSConstants.mo
blob: 50278159af98f707d00320f47c91f0990c68356d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
within Simulator.Files.ThermodynamicFunctions;

function EOSConstants
  extends Modelica.Icons.Function;
  parameter Real R_gas = 8.314;
  input Integer Nc;
  input Real Tc[Nc], Pc[Nc];
  input Real T;
  output Real a[Nc];
algorithm
  for i in 1:Nc loop
    a[i] := 0.42748 * R_gas ^ 2 * (Tc[i] ^ 2.5 / (Pc[i] * T ^ 0.5));
  end for;
end EOSConstants;