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

asked 2024-04-15 02:14:09 -0600

PmP's avatar

updated 2024-04-16 09:25:54 -0600

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 ... (more)

edit retag flag offensive close merge delete