scale energy residual to have the same relative order as the mass balance residuals

This commit is contained in:
Tor Harald Sandve 2022-08-29 15:05:01 +02:00
parent 949bb6ecb5
commit 3e27c23222

View File

@ -748,7 +748,7 @@ namespace Opm {
}
if constexpr (has_energy_) {
B_avg[ contiEnergyEqIdx ] += 1.0;
B_avg[ contiEnergyEqIdx ] += 1.0 / (4.182e1); // converting J -> RM3 (entalpy / (cp * deltaK * rho) assuming change of 1e-5K of water
const auto R2 = ebosResid[cell_idx][contiEnergyEqIdx];
R_sum[ contiEnergyEqIdx ] += R2;
maxCoeff[ contiEnergyEqIdx ] = std::max( maxCoeff[ contiEnergyEqIdx ], std::abs( R2 ) / pvValue );