All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.synerset.hvacengine.fluids.liquidwater.LiquidWaterEquations Maven / Gradle / Ivy

Go to download

HVAC|Engine is a comprehensive library for calculating moist air properties, including crucial thermodynamic processes such as heating, dry cooling, real cooling with condensate discharge, mixing single or multiple air streams, and more. Immutable, thread-safe, very accurate.

There is a newer version: 1.2.0
Show newest version
package com.synerset.hvacengine.fluids.liquidwater;

import com.synerset.hvacengine.common.Validators;
import com.synerset.unitility.unitsystem.thermodynamic.Density;
import com.synerset.unitility.unitsystem.thermodynamic.SpecificEnthalpy;
import com.synerset.unitility.unitsystem.thermodynamic.SpecificHeat;
import com.synerset.unitility.unitsystem.thermodynamic.Temperature;

/**
 * LIQUID WATER EQUATIONS LIBRARY (PSYCHROMETRICS) 

* Set of static methods outputs process result as an array with process heat, core output air parameters (temperature, humidity ratio) and condensate * properties. Methods do not create a separate instance of FlowOfMoistAir for performance reasons - each ot these methods may be used in iterative solvers, and we * do not want to lose memory or performance for unnecessary object creation.

*

* REFERENCE SOURCES:

* [1] F.E. Jones, G.L. Harris. ITS-90 Density of water formulation for volumetric standards' calibration. Journal of Research of the National Institute of Standards and Technology (1992)

* [2] Water specific heat tables: https://www.engineeringtoolbox.com/specific-heat-capacity-water-d_660.html

*

* REFERENCES LEGEND KEY:

* [reference no] [value symbology in standard, unit] (equation number) [page]

* * @author Piotr Jażdżyk, MScEng */ public final class LiquidWaterEquations { public static final double HEAT_OF_WATER_VAPORIZATION = 2500.9; // [kJ/kg] - Water heat of vaporization (t=0oC) private LiquidWaterEquations() { } /** * Returns water enthalpy at provided temperature in kJ/kg

* Outputs 0.0 for negative temperatures. * REFERENCE SOURCE: [-] [kJ/kg] (-) [-]

* EQUATION LIMITS: n/a

* * @param tx water temperature, oC * @return water enthalpy at provided temperature, kJ/kg */ public static double specificEnthalpy(double tx) { return tx < 0.0 ? 0.0 : tx * specificHeat(tx); } public static SpecificEnthalpy specificEnthalpy(Temperature temperature) { Validators.requireNotNull(temperature); double specificEnthalpyVal = specificEnthalpy(temperature.getInCelsius()); return SpecificEnthalpy.ofKiloJoulePerKiloGram(specificEnthalpyVal); } /** * Returns water density at provided temperature and constant pressure at 101.325kPa Pa

* REFERENCE SOURCE: [1] [kg/m3] (1) [kg/m3]

* EQUATION LIMITS: {0.0 oC,+150.0 oC} at Pat=101.325kPa

* * @param tx water temperature, oC * @return water density at temperature tx and atmospheric pressure, kg/m3 */ public static double density(double tx) { return (999.83952 + 16.945176 * tx - 7.9870401 * Math.pow(10, -3) * Math.pow(tx, 2) - 46.170461 * Math.pow(10, -6) * Math.pow(tx, 3) + 105.56302 * Math.pow(10, -9) * Math.pow(tx, 4) - 280.54253 * Math.pow(10, -12) * Math.pow(tx, 5)) / (1 + 16.89785 * Math.pow(10, -3) * tx); } public static Density density(Temperature temperature) { Validators.requireNotNull(temperature); double densityVal = density(temperature.getInCelsius()); return Density.ofKilogramPerCubicMeter(densityVal); } /** * Returns water isobaric specific heat kJ/kgK

* REFERENCE SOURCE: [2] [kJ/kgK] (1) [kg/m3]

* EQUATION LIMITS: {0.0 oC,+250 oC}

* * @param tx water temperature, oC * @return water isobaric specific heat */ public static double specificHeat(double tx) { if (tx > 0 && tx <= 100) { return 3.93240161 * Math.pow(10, -13) * Math.pow(tx, 6) - 1.525847751 * Math.pow(10, -10) * Math.pow(tx, 5) + 2.479227180 * Math.pow(10, -8) * Math.pow(tx, 4) - 2.166932275 * Math.pow(10, -6) * Math.pow(tx, 3) + 1.156152199 * Math.pow(10, -4) * Math.pow(tx, 2) - 3.400567477 * Math.pow(10, -3) * tx + 4.219924305; } else { return 2.588246403 * Math.pow(10, -15) * Math.pow(tx, 7) - 3.604612987 * Math.pow(10, -12) * Math.pow(tx, 6) + 2.112059173 * Math.pow(10, -9) * Math.pow(tx, 5) - 6.727469888 * Math.pow(10, -7) * Math.pow(tx, 4) + 1.255841880 * Math.pow(10, -4) * Math.pow(tx, 3) - 1.370455849 * Math.pow(10, -2) * Math.pow(tx, 2) + 8.093157187 * Math.pow(10, -1) * tx - 15.75651097; } } public static SpecificHeat specificHeat(Temperature temperature) { Validators.requireNotNull(temperature); double specHeatVal = specificHeat(temperature.getInCelsius()); return SpecificHeat.ofKiloJoulePerKiloGramKelvin(specHeatVal); } }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy