Loading Fluids
Fluids can be loaded using the load fluid command.
The result value indicates whether the fluid was loaded (1) or not (0).
The command directly defines the functions p(a, b), h(a, b), ....
Any existing function with the same name is overridden.
To use multiple fluids, use the as statement to define aliases for each fluid.
The alias is then used as prefix and postfix to define the function names.
| Expression | Result |
|---|---|
| load fluid air | 1 |
| rho(1 bar, 20 °C) | 1.1888175 kg/m3 |
| h(10 MPa, 500 K) | 625.57961 kJ/kg |
| load fluid nitrogen as N | 1 |
| N_rho(1 bar, 20 °C) | 1.1495944 kg/m3 |
| rho_N(1 bar, 20 °C) | 1.1495944 kg/m3 |
| load fluid chocolate | 0 |
Find the list of available pure fluids and fluid mixtures in the Reference.
Defining States, Calculating Properties
Input Properties
Typically, the state of a fluid is fully defined by a known pair of properties.
Use a pair of the following properties to define a state:
- p: pressure
- T: temperature
- h: specific enthalpy
- s: specific entropy
- rho: density
- x: vapor quality
For a defined state, you can then query different kind of properties as shown below. The sequence in which you pass the arguments to the function does not play a role. Calcumber identifies the type of the parameters by its unit.
| Expression | Result |
|---|---|
| load fluid water | 1 |
| Define state: | |
| T = 20 °C | 20 °C |
| p = 1 bar | 1 bar |
| Query properties: | |
| rho(T, p) | 998.20654 kg/m3 |
| s(T, p) | 0.29646311 kJ/(kg*K) |
| h(T, p) | 84.006054 kJ/kg |
| Directly pass values for p and h: | |
| x(950 hPa, 1500 kJ/kg) to % | 48.138810 % |
More State Properties
In addition to the properties defined above (p, T, h, s, rho and x), there are more properties as listed below. The values of these properties can be calculated from a defined state, but these properties cannot be used to define states.
| load fluid ethanol | 1 |
| T = -5 °C | -5 °C |
| p = 0.5 bar | 0.5 bar |
| Gibbs energy: g(T,p) | -28.689770 kJ/kg |
| Internal energy: u(T,p) | -212.54646 kJ/kg |
| Specific volume: v(T,p) | 0.0012336460 m3/kg |
| Speed of sound: a(T,p) | 1246.8739 m/s |
| Viscosity: mu(T,p) to mPa*s | 2.0357303 mPa*s |
| Thermal conductivity: k(T,p) | 0.17013680 W/(m*K) |
| Surface tension: sigma(T) | 0.024772133 N/m |
| Specific heat: | |
| at constant pressure: cp(T, p) | 2226.0719 J/(kg*K) |
| at constant volume: cv(T, p) | 1848.7873 J/(kg*K) |
Two Phase Region
For a pure fluid, saturation pressure and saturation temperature are
uniquely related. Therefore p(T) and T(p) can be
used to calculate the saturation pressure or temperature. The vapor
quality does not affect the result. For mixed fluids, these functions
return the values at 50% vapor quality.
| Expression | Result |
|---|---|
| load fluid nitrogen | 1 |
| In two phase region: | |
| Saturation temperature from pressure: T(1 bar) | 77.243500 K |
| Saturation pressure from temperature: p(100 K) | 7.7827498 bar |
| Enthalpy at bubble and dew point: | |
| p = 1 bar | 1 bar |
| h_bubble = h(p, 0%) | -122.24684 kJ/kg |
| h_mix = h(p, 90%) | 57.140879 kJ/kg |
| h_dew = h(p, 100%) | 77.072847 kJ/kg |
| Enthalpy values may be positive or negative | |
| because the enthalpy reference point is arbitrary. | |
| Only enthalpy differences are physically meaningful. | |
| Enthalpy of vaporization: | |
| h_vap = h_dew - h_bubble | 199.31969 kJ/kg |
State Independent Properties
| Expression | Result |
|---|---|
| load fluid R11 | 1 |
| Critical temperature: T_crit | 471.11 K |
| Triple point: | |
| p_triple | 0.000065100898 bar |
| T_triple | 162.68 K |
| Molar mass: M | 137.368 g/mol |
| Global warming potential: | |
| GWP20 | 6730 |
| GWP100 | 4750 |
| GWP500 | 1620 |
| Ozone depletion potential: | |
| ODP | 1 |
Temperature Conversion
The following temperature units are defined in Calcumber:
| K | Kelvin. Base unit for all temperatures. |
| °C or degC | Degree Celsius |
| °F or degF | Degree Fahrenheit |
| °Ra or degRa | Degree Rankine |
By default, all temperature values are interpreted as temperature
differences. Therefore, converting °C to Kelvin will not add 273.15 K.
This behavior prevents interpretation problems in many calculations as
shown in the example below:
| Expression | Result |
|---|---|
| Mass: m = 100 kg | 100 kg |
| Temp. increase: ΔT = 40 °C | 40 °C |
| Spec. heat: cp = 4182 J/(kg*K) | 4182 J/(kg*K) |
| Energy needed: | |
| m * ΔT * cp to kWh | 4.6466667 kWh |
Heating up 100 kg of water by 40°C needs 4.6 kWh. If Calcumber would convert 40°C to 313 K, the result would be 36.4 kWh, which would be the value for heating it up from 0 K to 313 K.
For converting actual temperature values between the scales, use the defined conversion functions as below:
| Expression | Result |
|---|---|
| Conversion of temperature differences: | |
| 10 °C to K | 10 K |
| 10 °F to K | 5.5555556 K |
| Conversion of temperature values: | |
| to_K(10 °C) | 283.15 K |
| to_K(10 °F) | 260.92778 K |
| to_degF(0 °C) | 32 °F |
| to_degC(0 °F) | -17.777778 °C |
| to_degRa(1000 °C) | 2291.67 °Ra |
Refrigeration Cycle Example
This example calculates a simple vapor-compression refrigeration cycle using propane (R290) as the refrigerant.
Starting from the evaporation and condensation temperature, superheating, subcooling, and compressor isentropic efficiency, Calcumber calculates the thermodynamic state at each point of the cycle. The required fluid properties such as pressure, enthalpy, entropy, and specific volume are obtained directly from the integrated CoolProp thermodynamic property library. The example then determines the coefficient of performance (COP), compressor power consumption, refrigerant mass flow rate, and suction volume flow required to deliver a heating capacity of 10 kW.
Click the table to open the calculation in Calcumber. You can modify the temperatures, refrigerant, efficiency, or heating capacity and immediately see how the cycle performance changes.
| load fluid R290 | 1 |
| Evaporation temperature: T_v = -10 °C | -10 °C |
| Condensation temperature: T_k = 45 °C | 45 °C |
| Subcooling: T_sc = 5 °C | 5 °C |
| Superheating: T_sh = 10 °C | 10 °C |
| Isentropic efficiency: eff = 60 % | 60 % |
| Heating capacity: Qt_h = 10 kW | 10 kW |
| Evaporation pressure: p_v = p(T_v) | 3.4527994 bar |
| Condensation pressure: p_k = p(T_k) | 15.343141 bar |
| Before compression: | |
| T1 = T_v + T_sh | 0 °C |
| h1 = h(T1, p_v) | 580.29472 kJ/kg |
| s1 = s(T1, p_v) | 2.4466331 kJ/(kg*K) |
| v1 = v(T1, p_v) | 0.13762839 m3/kg |
| Compression: | |
| h2s = h(s1, p_k) | 654.16499 kJ/kg |
| h2 = h1 + (h2s - h1)/eff to kJ/kg | 703.41183 kJ/kg |
| T2 = T(h2, p_k) | 356.25538 K |
| Subcooling: | |
| h3 = h(p_k, T_k - T_sc) | 307.05278 kJ/kg |
| Expansion: | |
| h4 = h3 | 307.05278 kJ/kg |
| COP, Power, Mass Flow Rate | |
| ========================== | |
| COP = (h2 - h3)/(h2 - h1) | 3.2193661 |
| P_el = Qt_h / COP | 3.1062015 kW |
| mt = Qt_h / (h2 - h3) to g/s | 25.229649 g/s |
| Vt = v1 * mt to m3/h | 12.500338 m3/h |
Example with Multiple Fluids
This example demonstrates how multiple fluids can be used within the same Calcumber calculation. Water is loaded as `fluid1` and air as `fluid2`, allowing thermodynamic properties of both fluids to be accessed independently.
The first part calculates the heating power transferred by a hydronic heating circuit from the supply and return temperatures, pressure, and water flow rate. The second part models the air side of an air-to-water heat pump. Using the calculated heating power and the airflow rate, it determines the enthalpy and temperature drop of the air as heat is extracted from the source.
This approach is useful whenever energy is transferred between different media, such as water and air, water and refrigerant, or refrigerant and air. By assigning each fluid its own name, properties from multiple fluids can be combined in a single calculation.
| load fluid water as fluid1 | 1 |
| load fluid air as fluid2 | 1 |
| Heating Circuit | |
| =============== | |
| Flow rate: Vt = 10 l/min | 10 l/min |
| Supply temperature: T_s = 32 °C | 32 °C |
| Return temperature: T_r = 24 °C | 24 °C |
| Pressure: p = 3 bar | 3 bar |
| Power: | |
| Δh = fluid1_h(p, T_s) - fluid1_h(p, T_r) | 33.438783 kJ/kg |
| P = Δh * fluid1_rho(p, T_s) * Vt to kW | 5.5459130 kW |
| Source, Air-to-Water Heat Pump | |
| ============================== | |
| Volume flow rate: Vt_L = 2400 m3/h | 2400 m3/h |
| Inlet temperature: T_in = 2 °C | 2 °C |
| Mass flow rate: m_t = fluid2_rho(T_in, 1 bar) * Vt_L | 3040.4126 kg/h |
| Calculation of Cooling | |
| ====================== | |
| Specific enthalpy of inlet air: | |
| h_in = fluid2_h(T_in, 1 bar) | 401.30214 kJ/kg |
| Specific enthalpy of outlet air: | |
| h_out = h_in - P / m_t | 394735.50 m2/s2 |
| Outlet air temperature: | |
| T_out = fluid2_T(1 bar, h_out) | 268.62020 K |
| In °C: to_degC(T_out) | -4.5298048 °C |
Reference
Pure Fluids List
| Fluid | Aliases |
|---|---|
| 1-Butene | 1Butene, 1BUTENE, 1-BUTENE, Butene |
| Acetone | acetone, ACETONE |
| Air | air, AIR, R729 |
| Ammonia | NH3, ammonia, R717, AMMONIA |
| Argon | argon, ARGON, R740, Ar |
| Benzene | benzene, BENZENE |
| CarbonDioxide | R744, co2, CO2, carbondioxide, CARBONDIOXIDE |
| CarbonMonoxide | CO, CARBONMONOXIDE |
| CarbonylSulfide | COS, CARBONYLSULFIDE |
| cis-2-Butene | Cis-2-Butene, CIS-2-BUTENE, C2BUTENE |
| CycloHexane | Cyclohexane, CYCLOHEXANE, CYCLOHEX |
| Cyclopentane | CycloPentane, cyclopentane, CYCLOPENTANE, CYCLOPEN |
| CycloPropane | cyclopropane, Cyclopropane, CYCLOPROPANE, CYCLOPRO |
| D4 | Octamethylcyclotetrasiloxane, OCTAMETHYLCYCLOTETRASILOXANE |
| D5 | Decamethylcyclopentasiloxane, DECAMETHYLCYCLOPENTASILOXANE |
| D6 | Dodecamethylcyclohexasiloxane, DODECAMETHYLCYCLOHEXASILOXANE |
| Deuterium | deuterium, DEUTERIUM, D2 |
| Dichloroethane | DICHLOROETHANE, 1, 2-dichloroethane, 1, 2-DICHLOROETHANE |
| DiethylEther | DEE, DiethylEther |
| DimethylCarbonate | DMC, dimethylcarbonate, DIMETHYLCARBONATE |
| DimethylEther | DIMETHYLETHER, DME |
| Ethane | ethane, ETHANE, R170, n-C2H6 |
| Ethanol | C2H6O, ethanol, ETHANOL |
| EthylBenzene | ethylbenzene, ETHYLBENZENE, EBENZENE |
| Ethylene | ethylene, ETHYLENE, R1150 |
| EthyleneOxide | ETHYLENEOXIDE |
| Fluorine | fluorine, FLUORINE |
| HeavyWater | D2O, HEAVYWATER |
| Helium | helium, HELIUM, He, R704 |
| HFE143m | HFE-143m, HFE143M, HFE-143M, RE143A, RE143a |
| Hydrogen | hydrogen, HYDROGEN, H2, R702 |
| HydrogenChloride | HydrogenChloride, HYDROGENCHLORIDE, HCl, HCL |
| HydrogenSulfide | H2S, HYDROGENSULFIDE |
| IsoButane | isobutane, Isobutane, ISOBUTANE, R600A, R600a, ISOBUTAN |
| IsoButene | Isobutene, ISOBUTENE, IBUTENE |
| Isohexane | ihexane, ISOHEXANE |
| Isopentane | ipentane, R601a, ISOPENTANE, IPENTANE |
| Krypton | krypton, KRYPTON |
| m-Xylene | mXylene, m-xylene, M-XYLENE, MC8H10 |
| MD2M | Decamethyltetrasiloxane, DECAMETHYLTETRASILOXANE |
| MD3M | Dodecamethylpentasiloxane, DODECAMETHYLPENTASILOXANE |
| MD4M | Tetradecamethylhexasiloxane, TETRADECAMETHYLHEXASILOXANE |
| MDM | Octamethyltrisiloxane, OCTAMETHYLTRISILOXANE |
| Methane | CH4, methane, METHANE, R50, n-C1H4 |
| Methanol | methanol, METHANOL |
| MethylLinoleate | METHYLLINOLEATE, MLINOLEA |
| MethylLinolenate | METHYLLINOLENATE, MLINOLEN |
| MethylOleate | METHYLOLEATE, MOLEATE |
| MethylPalmitate | METHYLPALMITATE, MPALMITA |
| MethylStearate | METHYLSTEARATE, MSTEARAT |
| MM | Hexamethyldisiloxane, HEXAMETHYLDISILOXANE |
| n-Butane | nButane, butane, Butane, BUTANE, N-BUTANE, R600, NC4H10, n-C4H10 |
| n-Decane | Decane, decane, DECANE, N-DECANE, NC10H22, n-C10H22 |
| n-Dodecane | nDodecane, Dodecane, DODECANE, N-DODECANE, C12, NC12H26, n-C12H26 |
| n-Heptane | nHeptane, Heptane, HEPTANE, N-HEPTANE, NC7H16, n-C7H16 |
| n-Hexane | nHexane, Hexane, HEXANE, N-HEXANE, NC6H14, n-C6H14 |
| n-Nonane | nonane, Nonane, NONANE, N-NONANE, NC9H20, n-C9H20 |
| n-Octane | nOctane, Octane, OCTANE, N-OCTANE, NC8H18, n-C8H18 |
| n-Pentane | nPentane, Pentane, PENTANE, N-PENTANE, R601, NC5H12, n-C5H12 |
| n-Propane | Propane, propane, R290, C3H8, PROPANE, N-PROPANE, NC3H8, n-C3H8 |
| n-Undecane | Undecane, UNDECANE, N-UNDECANE, C11, NC11H24, n-C11H24 |
| Neon | neon, NEON, R720 |
| Neopentane | neopentn, NEOPENTANE |
| Nitrogen | nitrogen, NITROGEN, N2, R728 |
| NitrousOxide | N2O, NITROUSOXIDE |
| Novec649 | Novec1230, NOVEC649 |
| o-Xylene | oXylene, o-xylene, O-XYLENE, OC8H10 |
| OrthoDeuterium | orthodeuterium, ORTHODEUTERIUM |
| OrthoHydrogen | Orthohydrogen, orthohydrogen, ORTHOHYDROGEN, ORTHOHYD |
| Oxygen | oxygen, OXYGEN, O2, R732 |
| p-Xylene | pXylene, p-xylene, P-XYLENE, PC8H10 |
| ParaDeuterium | paradeuterium, PARADEUTERIUM |
| ParaHydrogen | Parahydrogen, parahydrogen, PARAHYDROGEN, PARAHYD |
| Propylene | propylene, PROPYLENE, PROPYLEN, R1270 |
| Propyne | propyne, PROPYNE |
| R11 | |
| R113 | |
| R114 | |
| R115 | |
| R116 | |
| R12 | |
| R123 | |
| R1233zd(E) | R1233zdE, R1233ZDE, R1233ZD(E), R1233ZD |
| R1234yf | R1234YF |
| R1234ze(E) | R1234ZE, R1234ZEE, R1234zeE, R1234ZE(E) |
| R1234ze(Z) | R1234ZE(Z), R1234ZEZ |
| R124 | |
| R1243zf | R1243ZF |
| R125 | |
| R13 | |
| R1336mzz(E) | (E)-1, 1, 1, 4, 4, 4-HEXAFLUORO-2-BUTENE, r1336mzz(e), R1336mzz(E), (E)-1, 1, 1, 4, 4, 4-Hexafluoro-2-butene, R1336MZZ(E), (e)-1, 1, 1, 4, 4, 4-hexafluoro-2-butene, R1336MZZE |
| R134a | R134A |
| R13I1 | CF3I |
| R14 | |
| R141b | R141B |
| R142b | R142B |
| R143a | R143A |
| R152A | R152a |
| R161 | Fluoroethane, FLUOROETHANE |
| R21 | |
| R218 | |
| R22 | |
| R227EA | R227ea |
| R23 | |
| R236EA | R236ea |
| R236FA | R236fa |
| R245ca | R245CA |
| R245fa | R245FA |
| R32 | |
| R365MFC | R365mfc |
| R40 | MethylChloride |
| R404A | R404a |
| R407C | R407c |
| R41 | |
| R410A | R410a |
| R507A | R507a |
| RC318 | |
| SES36 | |
| SulfurDioxide | SO2, SULFURDIOXIDE |
| SulfurHexafluoride | SULFURHEXAFLUORIDE, SF6 |
| Toluene | toluene, TOLUENE |
| trans-2-Butene | Trans-2-Butene, TRANS-2-BUTENE, T2BUTENE |
| Water | water, WATER, H2O, h2o, R718 |
| Xenon | Xe, xenon, XENON |
Fluid Mixtures List
Besides pure fluids, there is a list of mixtures that can be loaded:
Air (air, AIR, R729), Amarillo, Ekofisk, GulfCoast, GulfCoastGas(NIST1), HighCO2, HighN2, NaturalGasSample,
TypicalNaturalGas
R401A,
R401B, R401C, R402A,
R402B, R403A, R403B, R404A, R405A, R406A, R407A, R407B, R407C, R407D, R407E, R407F, R408A, R409A, R409B, R410A,
R410B,
R411A, R411B, R412A, R413A, R414A, R414B, R415A, R415B, R416A, R417A, R417B, R417C, R418A, R419A, R419B, R420A,
R421A,
R421B, R422A, R422B, R422C, R422D, R422E, R423A, R424A, R425A, R426A, R427A, R428A, R429A, R430A, R431A, R432A,
R433A,
R433B, R433C, R434A, R435A, R436A, R436B, R437A, R438A, R439A, R440A, R441A, R442A, R443A, R444A, R444B, R445A,
R446A,
R447A, R448A, R449A, R449B, R450A, R451A, R451B, R452A, R453A, R454A, R454B, R500, R501, R502, R503, R504, R507A,
R508A,
R508B, R509A, R510A, R511A, R512A, R513A
Phase Diagrams
Calcumber does not currently generate phase diagrams. For plotting thermodynamic cycles and visualizing fluid states, we recommend using CoolPack. Although the software developed in the 90's at the Technical University of Denmark is no longer maintained, it remains a valuable tool and still runs on Windows. For convenience, log(p)-h diagrams for all fluids available in CoolPack have been generated and are provided below as PDF files.
R11, CCl3F Trichlorofuoromethane
R113, CCl2FCClF2, Trichlorotrifluoroethane
R114, CClF2CClF2, Dichlorotetrafluoroethane
R1150, CH2=CH2, Ethene (ethylene]
R12, CCl2F2, Dichlorodifluoromethane
R123, CHCI2CF3, Dichlorotrifluoroethane
R1270, CH3CH=CH2, Propene (propylene)
R13, CClF3, Chlorotrifluoromethane
R134a, CH2FCF3, 1,1,1,2-tetrafluoroethane
R152a, CH3CHF2, 1,1-difluoroethane
R21, CHCI2F, Dichlorofluoromethane
R22, CHCIF2, Chlorodifluoromethane
R401a, R22/R152a/R124 (53/13/34)
R401b, R22/R152a/R124 (61/11/28)
R401c, R22/R152a/R124 (33/15/52)
R402a, R125/R290/R22 (60/2/38)
R402b, R125/R290/R22 (38/2/60)
R404a, R125/R143a/R134a (44/52/4)
R406a, R22/R142b/R600a (55/41/4)
R407a, R32/R125/R134a (20/40/40)
R407b, R32/R125/R134a (10/70/20)
R407c, R32/R125/R134a (23/25/52)
R408a, R22/143a/R125 (47/46/7)
R409a, R22/R124/R142b (60/25/15)
R600a, CH(CH3)3, 2-methyl propane (isobutane)
RC318, C4F8, Octafluorocyclobutane
Credits
CoolPack
Phase diagrams provided here were created using Cool CoolPack. The software was developed in the 1990s at the Technical University of Denmark. Althogh it is no longer maintained, it still runs on Windows and remains a valuabletool for refrigeration and thermodynamic calculations.
You might also be interested in CoolTools, which is intended to become the successor for CoolPack.
CoolProp
Calcumber uses CoolProp to calculate thermodynamic fluid properties. CoolProp is a widely used open-source thermophysical property library developed by researchers and engineers from academia and industry.
It provides accurate properties for refrigerants, water, air, and many other fluids, including density, enthalpy, entropy, viscosity, thermal conductivity, and saturation properties. CoolProp is used in education, research, and engineering applications worldwide.
For more information, see the article Pure and Pseudo-pure Fluid Thermophysical Property Evaluation and the Open-Source Thermophysical Property Library CoolProp .