mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Merge pull request #4037 from totto82/scaleEnergy
scale energy residual to have the same relative order as the mass balance residuals
This commit is contained in:
commit
a2c5ec1127
@ -736,7 +736,7 @@ namespace Opm {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if constexpr (has_energy_) {
|
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];
|
const auto R2 = ebosResid[cell_idx][contiEnergyEqIdx];
|
||||||
R_sum[ contiEnergyEqIdx ] += R2;
|
R_sum[ contiEnergyEqIdx ] += R2;
|
||||||
maxCoeff[ contiEnergyEqIdx ] = std::max( maxCoeff[ contiEnergyEqIdx ], std::abs( R2 ) / pvValue );
|
maxCoeff[ contiEnergyEqIdx ] = std::max( maxCoeff[ contiEnergyEqIdx ], std::abs( R2 ) / pvValue );
|
||||||
|
Loading…
Reference in New Issue
Block a user