summaryrefslogtreecommitdiff
path: root/Simulator/Simulator/Files/ThermodynamicFunctions/HVapId.mo
diff options
context:
space:
mode:
Diffstat (limited to 'Simulator/Simulator/Files/ThermodynamicFunctions/HVapId.mo')
-rw-r--r--Simulator/Simulator/Files/ThermodynamicFunctions/HVapId.mo20
1 files changed, 0 insertions, 20 deletions
diff --git a/Simulator/Simulator/Files/ThermodynamicFunctions/HVapId.mo b/Simulator/Simulator/Files/ThermodynamicFunctions/HVapId.mo
deleted file mode 100644
index 7e681c2..0000000
--- a/Simulator/Simulator/Files/ThermodynamicFunctions/HVapId.mo
+++ /dev/null
@@ -1,20 +0,0 @@
-within Simulator.Files.ThermodynamicFunctions;
-
- function HVapId
- /* Calculates enthalpy of ideal vapor */
- extends Modelica.Icons.Function;
- input Real SH(unit = "J/kmol") "from chemsep database std. Heat of formation";
- input Real VapCp[6] "from chemsep database";
- input Real HOV[6] "from chemsep database";
- input Real Tc "critical temp, from chemsep database";
- input Real T(unit = "K") "Temperature";
- output Real Hvap(unit = "J/mol") "Molar Enthalpy";
- protected
- Integer n = 100;
- Real Cp[n - 1];
- algorithm
- for i in 1:n - 1 loop
- Cp[i] := VapCpId(VapCp, 298.15 + i * (T - 298.15) / n);
- end for;
- Hvap := (T - 298.15) * (VapCpId(VapCp, T) / 2 + sum(Cp[:]) + VapCpId(VapCp, 298.15) / 2) / n;
- end HVapId;