Merge pull request #3911 from GitPaean/fixing_numerical_aquifer_equil

Fixing equilibration when having numerical aquifers.
This commit is contained in:
Kai Bao
2022-05-26 22:09:32 +02:00
committed by GitHub
2 changed files with 9 additions and 4 deletions

View File

@@ -1479,7 +1479,7 @@ if(MPI_FOUND)
add_test_compare_parallel_simulation(CASENAME numerical_aquifer_3d_2aqu add_test_compare_parallel_simulation(CASENAME numerical_aquifer_3d_2aqu
FILENAME 3D_2AQU_NUM FILENAME 3D_2AQU_NUM
SIMULATOR flow SIMULATOR flow
ABS_TOL 0.12 ABS_TOL 0.17
REL_TOL ${coarse_rel_tol_parallel} REL_TOL ${coarse_rel_tol_parallel}
DIR aquifer-num DIR aquifer-num
TEST_ARGS --tolerance-cnv=0.00003 --time-step-control=pid --linsolver=cpr) TEST_ARGS --tolerance-cnv=0.00003 --time-step-control=pid --linsolver=cpr)

View File

@@ -1852,15 +1852,20 @@ private:
const unsigned int elemIdx = elemMapper.index(element); const unsigned int elemIdx = elemMapper.index(element);
cellCenterDepth_[elemIdx] = Details::cellCenterDepth(element); cellCenterDepth_[elemIdx] = Details::cellCenterDepth(element);
const auto cartIx = cartesianIndexMapper_.cartesianIndex(elemIdx); const auto cartIx = cartesianIndexMapper_.cartesianIndex(elemIdx);
cellZSpan_[elemIdx] = Details::cellZSpan(element);
cellZMinMax_[elemIdx] = Details::cellZMinMax(element);
if (!num_aqu_cells.empty()) { if (!num_aqu_cells.empty()) {
const auto search = num_aqu_cells.find(cartIx); const auto search = num_aqu_cells.find(cartIx);
if (search != num_aqu_cells.end()) { if (search != num_aqu_cells.end()) {
const auto* aqu_cell = num_aqu_cells.at(cartIx); const auto* aqu_cell = num_aqu_cells.at(cartIx);
cellCenterDepth_[elemIdx] = aqu_cell->depth; const double depth_change_num_aqu = aqu_cell->depth - cellCenterDepth_[elemIdx];
cellCenterDepth_[elemIdx] += depth_change_num_aqu;
cellZSpan_[elemIdx].first += depth_change_num_aqu;
cellZSpan_[elemIdx].second += depth_change_num_aqu;
cellZMinMax_[elemIdx].first += depth_change_num_aqu;
cellZMinMax_[elemIdx].second += depth_change_num_aqu;
} }
} }
cellZSpan_[elemIdx] = Details::cellZSpan(element);
cellZMinMax_[elemIdx] = Details::cellZMinMax(element);
} }
} }