SimMinimalDXHeating Subroutine

public subroutine SimMinimalDXHeating(OutdoorDryBulb, OutdoorHumRatio, OutdoorPressure, InletAirDryBulbTemp, InletAirHumRat, RatedCOP, RatedTotCap, SensibleHeatingLoad, RatedAirMassFlowRate, COP, TotalHeatingCapacity, OutletAirTemp, OutletAirHumRat, ElecHeatingPower, TotalHeatingEnergyRate, TotalSensibleHeatOut)

Uses

  • proc~~simminimaldxheating~~UsesGraph proc~simminimaldxheating SimMinimalDXHeating module~minimaldxheating MinimalDXHeating proc~simminimaldxheating->module~minimaldxheating iso_fortran_env iso_fortran_env module~minimaldxheating->iso_fortran_env

Simplified EnergyPlus subroutine for calculating the performance of a DX heating coil. This is the subroutine to call from your program.

Arguments

Type IntentOptional AttributesName
real(kind=dp), intent(in) :: OutdoorDryBulb

Outdoor dry bulb air temperature [°C]

real(kind=dp), intent(in) :: OutdoorHumRatio

Outdoor air humidity ratio [kgH₂O kgAIR⁻¹]

real(kind=dp), intent(in) :: OutdoorPressure

Outdoor barometric pressure [Pa]

real(kind=dp), intent(in) :: InletAirDryBulbTemp

Indoor (inlet) dry bulb air temperature [°C]

real(kind=dp), intent(in) :: InletAirHumRat

Indoor (inlet) air humidity ratio [kgH₂O kgAIR⁻¹]

real(kind=dp), intent(in) :: RatedCOP

Rated Coefficient Of Performance (COP) [1]

real(kind=dp), intent(in) :: RatedTotCap

Rated (total) system capacity [W]

real(kind=dp), intent(in) :: SensibleHeatingLoad

Building sensible load to be met [W]

real(kind=dp), intent(in) :: RatedAirMassFlowRate

rated air mass flow rate [kg s⁻¹]

real(kind=dp), intent(out) :: COP

Actual (calculated) Coefficient Of Performance (COP) [1]

real(kind=dp), intent(out) :: TotalHeatingCapacity

Actual (calculated) total system capacity [W]

real(kind=dp), intent(out) :: OutletAirTemp

Actual (calculated) outlet air dry bulb temperature existing the cooling coil [°C]

real(kind=dp), intent(out) :: OutletAirHumRat

Actual (calculated) outlet air humidity ratio existing the cooling coil [kgH₂O kgAIR⁻¹]

real(kind=dp), intent(out) :: ElecHeatingPower

Calculated electrical power consumed by the DX unit [W]

real(kind=dp), intent(out) :: TotalHeatingEnergyRate

Total cooling power of the DX unit (energy rate extracted by DX unit from the indoor environment) [W]

real(kind=dp), intent(out) :: TotalSensibleHeatOut

Total energy rate rejected by the evaporator into the outdoor environment i.e. TotalHeatingEnergyRate + ElecHeatingPower [W]


Calls

proc~~simminimaldxheating~~CallsGraph proc~simminimaldxheating SimMinimalDXHeating proc~calcminimaldxheating CalcMinimalDXHeating proc~simminimaldxheating->proc~calcminimaldxheating proc~gethumratiofromenthalpyandtdrybulb GetHumRatioFromEnthalpyAndTDryBulb proc~calcminimaldxheating->proc~gethumratiofromenthalpyandtdrybulb proc~initpsychrometrics InitPsychrometrics proc~calcminimaldxheating->proc~initpsychrometrics proc~gettdrybulbfromenthalpyandhumratio GetTDryBulbFromEnthalpyAndHumRatio proc~calcminimaldxheating->proc~gettdrybulbfromenthalpyandhumratio proc~getonofffan GetOnOffFan proc~calcminimaldxheating->proc~getonofffan proc~gethumratiofromtdewpoint GetHumRatioFromTDewPoint proc~calcminimaldxheating->proc~gethumratiofromtdewpoint proc~getrelhumfromhumratio GetRelHumFromHumRatio proc~calcminimaldxheating->proc~getrelhumfromhumratio proc~psytsatfnhpb PsyTsatFnHPb proc~calcminimaldxheating->proc~psytsatfnhpb proc~getmoistairenthalpy GetMoistAirEnthalpy proc~calcminimaldxheating->proc~getmoistairenthalpy proc~getmoistairdensity GetMoistAirDensity proc~calcminimaldxheating->proc~getmoistairdensity proc~gettwetbulbfromhumratio GetTWetBulbFromHumRatio proc~calcminimaldxheating->proc~gettwetbulbfromhumratio proc~isip isIP proc~gethumratiofromenthalpyandtdrybulb->proc~isip proc~setunitsystem SetUnitSystem proc~initpsychrometrics->proc~setunitsystem proc~gettdrybulbfromenthalpyandhumratio->proc~isip proc~gethumratiofromvappres GetHumRatioFromVapPres proc~gethumratiofromtdewpoint->proc~gethumratiofromvappres proc~getsatvappres GetSatVapPres proc~gethumratiofromtdewpoint->proc~getsatvappres proc~getvappresfromhumratio GetVapPresFromHumRatio proc~getrelhumfromhumratio->proc~getvappresfromhumratio proc~getrelhumfromvappres GetRelHumFromVapPres proc~getrelhumfromhumratio->proc~getrelhumfromvappres proc~getsatairenthalpy GetSatAirEnthalpy proc~psytsatfnhpb->proc~getsatairenthalpy proc~getmoistairenthalpy->proc~isip proc~getmoistairvolume GetMoistAirVolume proc~getmoistairdensity->proc~getmoistairvolume proc~gettdewpointfromhumratio GetTDewPointFromHumRatio proc~gettwetbulbfromhumratio->proc~gettdewpointfromhumratio proc~gethumratiofromtwetbulb GetHumRatioFromTWetBulb proc~gettwetbulbfromhumratio->proc~gethumratiofromtwetbulb proc~gettdewpointfromhumratio->proc~getvappresfromhumratio proc~gettdewpointfromvappres GetTDewPointFromVapPres proc~gettdewpointfromhumratio->proc~gettdewpointfromvappres proc~getmoistairvolume->proc~isip proc~gettrankinefromtfahrenheit GetTRankineFromTFahrenheit proc~getmoistairvolume->proc~gettrankinefromtfahrenheit proc~gettkelvinfromtcelsius GetTKelvinFromTCelsius proc~getmoistairvolume->proc~gettkelvinfromtcelsius proc~getrelhumfromvappres->proc~getsatvappres proc~getsatairenthalpy->proc~getmoistairenthalpy proc~getsathumratio GetSatHumRatio proc~getsatairenthalpy->proc~getsathumratio proc~gethumratiofromtwetbulb->proc~isip proc~gethumratiofromtwetbulb->proc~getsathumratio proc~getsatvappres->proc~isip proc~getsatvappres->proc~gettrankinefromtfahrenheit proc~getsatvappres->proc~gettkelvinfromtcelsius proc~gettdewpointfromvappres->proc~isip proc~gettdewpointfromvappres->proc~getsatvappres proc~dlnpws_ dLnPws_ proc~gettdewpointfromvappres->proc~dlnpws_ proc~getsathumratio->proc~getsatvappres proc~dlnpws_->proc~isip proc~dlnpws_->proc~gettrankinefromtfahrenheit proc~dlnpws_->proc~gettkelvinfromtcelsius

Contents

Source Code


Source Code

  subroutine SimMinimalDXHeating(OutdoorDryBulb, OutdoorHumRatio, OutdoorPressure,                    & !I
                                 InletAirDryBulbTemp, InletAirHumRat,                                 & !I
                                 RatedCOP, RatedTotCap, SensibleHeatingLoad, RatedAirMassFlowRate,    & !I
                                 COP, TotalHeatingCapacity,                                           & !I
                                 OutletAirTemp, OutletAirHumRat,                                      & !O
                                 ElecHeatingPower, TotalHeatingEnergyRate, TotalSensibleHeatOut)        !O

    !+ Simplified EnergyPlus subroutine for calculating the performance of a DX heating coil.
    !+ This is the subroutine to call from your program.


    use MinimalDXHeating, only: CalcMinimalDXHeating

    ! Using fortran 2008 standard to represent double-precision floating-point format
    integer, parameter :: dp = REAL64

    ! Subroutine arguments
    real(dp), intent(in)    :: OutdoorDryBulb
        !+ Outdoor dry bulb air temperature `[°C]`
    real(dp), intent(in)    :: OutdoorHumRatio
        !+ Outdoor air humidity ratio `[kgH₂O kgAIR⁻¹]`
    real(dp), intent(in)    :: OutdoorPressure
        !+ Outdoor barometric pressure `[Pa]`
    real(dp), intent(in)    :: InletAirDryBulbTemp
        !+ Indoor (inlet) dry bulb air temperature `[°C]`
    real(dp), intent(in)    :: InletAirHumRat
        !+ Indoor (inlet) air humidity ratio `[kgH₂O kgAIR⁻¹]`
    real(dp), intent(in)    :: RatedCOP
        !+ Rated Coefficient Of Performance (COP) `[1]`
    real(dp), intent(in)    :: RatedTotCap
        !+ Rated (total) system capacity `[W]`
    real(dp), intent(in)    :: SensibleHeatingLoad
        !+ Building sensible load to be met `[W]`
    real(dp), intent(in)    :: RatedAirMassFlowRate
        !+ rated air mass flow rate `[kg s⁻¹]`
    real(dp), intent(out)   :: COP
    !+ Actual (calculated) Coefficient Of Performance (COP) `[1]`
    real(dp), intent(out)   :: TotalHeatingCapacity
        !+ Actual (calculated) total system capacity `[W]`
    real(dp), intent(out)   :: OutletAirTemp
        !+ Actual (calculated) outlet air dry bulb temperature existing the cooling coil `[°C]`
    real(dp), intent(out)   :: OutletAirHumRat
        !+ Actual (calculated) outlet air humidity ratio existing the cooling coil `[kgH₂O kgAIR⁻¹]`
    real(dp), intent(out)   :: ElecHeatingPower
        !+ Calculated electrical power consumed by the DX unit `[W]`
    real(dp), intent(out)   :: TotalHeatingEnergyRate
        !+ Total cooling power of the DX unit (energy rate extracted by DX unit from the indoor environment) `[W]`
    real(dp), intent(out)   :: TotalSensibleHeatOut
        !+ Total energy rate rejected by the evaporator into the outdoor environment
        !+ i.e. TotalHeatingEnergyRate + ElecHeatingPower `[W]`

    ! Local variables
    real(dp) :: PartLoadRatio

    ! Get SensibleHeatingLoad and SensCoolingEnergyRates to calculate actual PartLoadRatio
    PartLoadRatio = 1.0_dp

    call CalcMinimalDXHeating(OutdoorDryBulb, OutdoorHumRatio, OutdoorPressure,             & !I
                              InletAirDryBulbTemp, InletAirHumRat,                          & !I
                              RatedCOP, RatedTotCap, PartLoadRatio, RatedAirMassFlowRate,   & !I
                              OutletAirTemp, OutletAirHumRat,                               & !O
                              ElecHeatingPower, TotalHeatingEnergyRate, TotalSensibleHeatOut) !O

    ! Calculate PartLoadRatio from previous call
    PartLoadRatio = SensibleHeatingLoad / TotalHeatingEnergyRate

    ! Keep PartLoadRatio  bounded between 0 and 1
    if ( PartLoadRatio < 0.0_dp ) PartLoadRatio = 0.0_dp
    if ( PartLoadRatio > 1.0_dp ) PartLoadRatio = 1.0_dp

    call CalcMinimalDXHeating(OutdoorDryBulb, OutdoorHumRatio, OutdoorPressure,             & !I
                              InletAirDryBulbTemp, InletAirHumRat,                          & !I
                              RatedCOP, RatedTotCap, PartLoadRatio, RatedAirMassFlowRate,   & !I
                              OutletAirTemp, OutletAirHumRat,                               & !O
                              ElecHeatingPower, TotalHeatingEnergyRate, TotalSensibleHeatOut) !O

    ! Calculate the actual COP for the DX unit under specified conditions
    COP = TotalHeatingEnergyRate / ElecHeatingPower
    TotalHeatingCapacity = TotalHeatingEnergyRate / PartLoadRatio

  end subroutine SimMinimalDXHeating