NREL / EnergyPlus

EnergyPlus™ is a whole building energy simulation program that engineers, architects, and researchers use to model both energy consumption and water use in buildings.
https://energyplus.net
Other
1.12k stars 389 forks source link

Low density material causes a fatal error using HAMT model (Ticket 9568) #4317

Open lgu1234 opened 10 years ago

lgu1234 commented 10 years ago

A possible cause may be zero initial value of vapor pressure at the interior virtual cell.

Here is my reply to the user:

Ivan:

I debugged the program and found the cause. Here is what happens.

Eq. 46 presents a procedure how to calculate node temperature (Engineering Reference p49). There are 4 items in the numerator at the right hand side of the equation. The second item is heat generated due to vaporization. The forth item is thermal heat capacitance impact. When the initial vapor pressure value of the virtual node (last node of the interior layer) is set to 0, it cause large vapor pressure difference with negative direction, so that a large negative value of the second item is generated. If the thermal capacity is not big enough, a sum of the numerator values is so small, so that the calculated temperature is going to negative and can not be recovered by further iterations. That is why negative temperatures beyond the minimum value were obtained to trigger a fatal error. When the thermal capacity is large enough, it will overcome the negative value of the second item by a sum of numerator items, so that iteration will go to a right direction.

I am not aware of a workaround. For the time being, you may use higher density (>= 25 kg/m3). I am going to create CR.

Hope this helps.

mjwitte commented 10 years ago

Where is the initial value of vapor pressure coming from? Is this from a user input for initial conditions that could be changed?

lgu1234 commented 10 years ago

The initial values were set internally. Since I only debugged several steps, I have not had a clear picture yet.

mjwitte commented 9 years ago

Helpdesk ticket 10236 user file appears to be crashing due to the same issue. LKL notes: IN V8.1, this is happening at line 1766 of HB HamtManager. The temperature is -273.72 (kelvin conv is 273.15) so, it's trying to take a negative number to a power (.81), It is cell 57879.

User file added as a defect file for this issue.

aaron-boranian commented 6 years ago

Using under-relaxation method in HAMT model as an alternative solution choice

Problem: The keep-to-date method may cause numerical instability

Rationale: The keep-to-date method may cause numerical instability because the updated variable values are used at the next index in a traditional for loop. For some cases, the solution becomes non-convergent. A possible revision is to use relaxation methods to improve the convergence of the Gauss-Seidel method.

Solution: The under-relaxation method is employed to make non-convergent systems converge. A choice to select solution method will be added in the SurfaceProperty:HeatTransferAlgorithm object.

Migrated from UserVoice feedback from @lgu1234