Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Humidifier "VariableInletWaterTemperature" not working after bugfix and proposal of addition to "Humidifier:electric" (EnergyPlus 9.4)

Hello to anyone reading this post. This post continues the line of this other question but as the issue is different I made a new one.

The previously mentioned question presented an error in EnergyPlus where the humidifier "VariableInletWaterTemperature" input wouldn't work and the "fixed" input would always be the method of calculation. A bugfix was proposed here by user shorowit.

I downloaded and installed the neccesary tools for building Energy Plus from the source files so I could modify them and apply this bugfix and other modifications. I use energyplus 9.4 and because of my lacking experience in C++ I couldn't directly apply the bugfix in version 9.4 (I do not know how to implement the case unsensitive string comparison) so I forced the source code to always enter the part of the subroutine for variable water temperature by removing the "if" condition of the fixed temperature part in the "humidifier.cc" file, which works for my purpose.

And it worked regarding the fact that the humidifier now used a different ammount of natural gas. The problem is that using a tank temperature of 55oC it consumed more energy instead of less (As it should because the fixed temperature uses 20oC, not only the calculations and documentantion says so, I calculated de thermal difference myself and it checks out).

After testing multiple things (Comparing my build to the original without changes and the results are the same, etc) I noticed 2 things:

  1. The inlet water temperature by calculating W=m_water(h_vap+DTSpefificHeat) with DT=(100-T_in) in every timestep was 0oC for the variable inlet temperature without changing with the temperature of the water tank even if I changed it between simulations. This tank temperature was outputed correctly by the corrresponding output variable.

  2. If I made the humidifier use the "mains temperature" manually I could reproduce exactly the mains temperature curve, leading me to think the error was in the line:

    if (SuppliedByWaterSystem) { // use water use storage tank supply temperature                                CurMakeupWaterTemp = WaterStorage(WaterTankID).TwaterSupply(TankSupplyID);
    

This line was always giving a temperature of 0oC. After revising the files related to the waterstorage object (Wateruse.cc and Datawater.cc) I think that the problem is that the variable ".TwaterSupply" is related to heat recovery as only in the heat recovery part of the connections subroutines is it used, and it is not the water tank temperature. So I changed the line to

            CurMakeupWaterTemp = WaterStorage(WaterTankID).Twater;

By doing this I could reproduce the inlet water temperature correctly with the equation W=m_water(h_vap+DTSpefificHeat) and was now the 55oC of the tank.

If this issue is inexistent in recent versions of EnergyPlus I do not know as I don't have other builds installed, but recent versions still use the "TwaterSupply" line, and seeing that this line of code was unusuable until the fix, I post this so it could be fully fixed.

The second part of this post is that because I wanted to work with an electric humidifier I manually substituted the lines in the electric humidifier that calculate the power consumption with the ones for the Gas humidifier. The calculations are the same and by considering the other electric uses I can now work with heat storage and an electric humidifier. I do not now how to add a new input to the humidifier:electric object but if I knew how, I would add it so both humidifiers had the same possible functionality as the electric one already works with a water storage tank which seems to be the more difficult part to code. I understand that the original purpose of the water tank is cold water storage from rainwater or groundwater sources, but as Energy Storage becomes a widely applied technique the added usability should be simple to implement and useful for the future.

Thank you for reading this post,

PMP.

Humidifier "VariableInletWaterTemperature" not working after bugfix and proposal of addition to "Humidifier:electric" (EnergyPlus 9.4)

Hello to anyone reading this post. This post continues the line of this other question but as the issue is different I made a new one.

The previously mentioned question presented an error in EnergyPlus where the humidifier "VariableInletWaterTemperature" input wouldn't work and the "fixed" input would always be the method of calculation. A bugfix was proposed here by user shorowit.

I downloaded and installed the neccesary tools for building Energy Plus from the source files so I could modify them and apply this bugfix and other modifications. I use energyplus 9.4 and because of my lacking experience in C++ I couldn't directly apply the bugfix in version 9.4 (I do not know how to implement the case unsensitive string comparison) so I forced the source code to always enter the part of the subroutine for variable water temperature by removing the "if" condition of the fixed temperature part in the "humidifier.cc" file, which works for my purpose.

And it worked regarding the fact that the humidifier now used a different ammount of natural gas. The problem is that using a tank temperature of 55oC it consumed more energy instead of less (As it should because the fixed temperature uses 20oC, not only the calculations and documentantion says so, I calculated de thermal difference myself and it checks out).

After testing multiple things (Comparing my build to the original without changes and the results are the same, etc) I noticed 2 things:

  1. The inlet water temperature by calculating W=m_water(h_vap+DTSpefificHeat) with DT=(100-T_in) in every timestep was 0oC for the variable inlet temperature without changing with the temperature of the water tank even if I changed it between simulations. This tank temperature was outputed correctly by the corrresponding output variable.

  2. If I made the humidifier use the "mains temperature" manually I could reproduce exactly the mains temperature curve, leading me to think the error was in the line:line 1254:

    if (SuppliedByWaterSystem) { // use water use storage tank supply temperature                                CurMakeupWaterTemp = WaterStorage(WaterTankID).TwaterSupply(TankSupplyID);
    

This line was always giving a temperature of 0oC. After revising the files related to the waterstorage object (Wateruse.cc and Datawater.cc) I think that the problem is that the variable ".TwaterSupply" is related to heat recovery as only in the heat recovery part of the connections subroutines is it used, and it is not the water tank temperature. So I changed the line to

            CurMakeupWaterTemp = WaterStorage(WaterTankID).Twater;

By doing this I could reproduce the inlet water temperature correctly with the equation W=m_water(h_vap+DTSpefificHeat) and was now the 55oC of the tank.

If this issue is inexistent in recent versions of EnergyPlus I do not know as I don't have other builds installed, but recent versions still use the "TwaterSupply" line, and seeing that this line of code was unusuable until the fix, I post this so it could be fully fixed.

The second part of this post is that because I wanted to work with an electric humidifier I manually substituted the lines in the electric humidifier that calculate the power consumption with the ones for the Gas humidifier. The calculations are the same and by considering the other electric uses I can now work with heat storage and an electric humidifier. I do not now how to add a new input to the humidifier:electric object but if I knew how, I would add it so both humidifiers had the same possible functionality as the electric one already works with a water storage tank which seems to be the more difficult part to code. I understand that the original purpose of the water tank is cold water storage from rainwater or groundwater sources, but as Energy Storage becomes a widely applied technique the added usability should be simple to implement and useful for the future.

Thank you for reading this post,

PMP.

Humidifier "VariableInletWaterTemperature" not working after bugfix and proposal of addition to "Humidifier:electric" (EnergyPlus 9.4)

Hello to anyone reading this post. This post continues the line of this other question but as the issue is different I made a new one.

The previously mentioned question presented an error in EnergyPlus where the humidifier "VariableInletWaterTemperature" input wouldn't work and the "fixed" input would always be the method of calculation. A bugfix was proposed here by user shorowit.

I downloaded and installed the neccesary tools for building Energy Plus from the source files so I could modify them and apply this bugfix and other modifications. I use energyplus 9.4 and because of my lacking experience in C++ I couldn't directly apply the bugfix in version 9.4 (I do not know how to implement the case unsensitive string comparison) so I forced the source code to always enter the part of the subroutine for variable water temperature by removing the "if" condition of the fixed temperature part in the "humidifier.cc" file, which works for my purpose.

And it worked regarding the fact that the humidifier now used a different ammount of natural gas. The problem is that using a tank temperature of 55oC it consumed more energy instead of less (As it should because the fixed temperature uses 20oC, not only the calculations and documentantion says so, I calculated de thermal difference myself and it checks out).

After testing multiple things (Comparing my build to the original without changes and the results are the same, etc) I noticed 2 things:

  1. The inlet water temperature by calculating W=m_water(h_vap+DTSpefificHeat) with DT=(100-T_in) in every timestep was 0oC for the variable inlet temperature without changing with the temperature of the water tank even if I changed it between simulations. This tank temperature was outputed correctly by the corrresponding output variable.

  2. If I made the humidifier use the "mains temperature" manually I could reproduce exactly the mains temperature curve, leading me to think the error was in the line 1254:

    if (SuppliedByWaterSystem) { // use water use storage tank supply temperature                                CurMakeupWaterTemp = WaterStorage(WaterTankID).TwaterSupply(TankSupplyID);
    

This line was always giving a temperature of 0oC. After revising the files related to the waterstorage object (Wateruse.cc and Datawater.cc) I think that the problem is that the variable ".TwaterSupply" is related to heat recovery as only in the heat recovery part of the connections subroutines is it used, and it is not the water tank temperature. So I changed the line to

            CurMakeupWaterTemp = WaterStorage(WaterTankID).Twater;

By doing this I could reproduce the inlet water temperature correctly with the equation W=m_water(h_vap+DTSpefificHeat) and was now the 55oC of the tank.

If this issue is inexistent in recent versions of EnergyPlus I do not know as I don't have other builds installed, but recent versions still use the "TwaterSupply" line, and seeing that this line of code was unusuable until the fix, I post this so it could be fully fixed.

The second part of this post is that because I wanted to work with an electric humidifier I manually substituted the lines in the electric humidifier that calculate the power consumption with the ones for the Gas humidifier. The calculations are the same and by considering the other electric uses I can now work with heat storage and an electric humidifier. I do not now how to add a new input to the humidifier:electric object but if I knew how, I would add it so both humidifiers had the same possible functionality as the electric one already works with a water storage tank which seems to be the more difficult part to code. I understand that the original purpose of the water tank is cold water storage from rainwater or groundwater sources, but as Energy Storage becomes a widely applied technique the added usability should be simple to implement and useful for the future.

Thank you for reading this post,

PMP.