Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: feature/byer3/thermal well #3156

Merged
merged 83 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from 82 commits
Commits
Show all changes
83 commits
Select commit Hold shift + click to select a range
3c5801c
Add support for mass constraits (inj wells only)
tjb-ltk Dec 20, 2023
de5b3da
Mass constraint test cases - fixed value & table input
tjb-ltk Dec 20, 2023
993296d
add proper isZero check
tjb-ltk Dec 22, 2023
7bd1201
Merge branch 'develop' into feature/byer3/mass_inj_const
jafranc Dec 28, 2023
825d27d
Throw error if massinj constraint and useSurfaceConditions set to 0, …
tjb-ltk Jan 3, 2024
c94eed6
run make uncrustify_style
tjb-ltk Jan 8, 2024
701bce6
fix for UseSurfaceConditions set to 1
tjb-ltk Jan 8, 2024
6858b81
Thermal well devs
tjb-ltk Feb 8, 2024
8fd8f40
Fix rel mode compiler errors ++
tjb-ltk Feb 13, 2024
384e29e
Load well prop ders in containers similar to reservoir
tjb-ltk Feb 16, 2024
064cc07
Added col indexing for well jacobian terms, includes specialization f…
tjb-ltk Mar 13, 2024
aee32bc
thermal devs- 1) energy eqn for perf in/out flows, 2) reservoir well …
tjb-ltk Apr 15, 2024
6323c13
1) fix isthermal well field runtime error 2) fix refactored isotherm…
tjb-ltk Apr 17, 2024
34a2a01
thermal well devs - 1) derivative bugfixes 2) added thermal to post l…
tjb-ltk Apr 22, 2024
828b009
thermal devs - 1) fixes for > 1 well seg 2) added soln updating/scali…
tjb-ltk May 1, 2024
8b10201
1) Added simple temperature constraint 2) Fixes from running numerica…
tjb-ltk May 13, 2024
25e3503
missing merge in previous commit
tjb-ltk May 14, 2024
aa800e3
more merge fixes
tjb-ltk May 14, 2024
c9138c5
1) add iterative solver config for thermal res+well 2) skip well cal…
tjb-ltk May 24, 2024
5d95d0f
merge dev 20240526
tjb-ltk May 26, 2024
b4983b0
merge with dev
tjb-ltk May 28, 2024
d297111
code cleanup
tjb-ltk May 31, 2024
0ec258e
Use phase fraction not phase vol fraction ..and ders
tjb-ltk May 31, 2024
a489169
fix for spe11b
tjb-ltk Jun 3, 2024
420855d
fix pedantry
tjb-ltk Jun 3, 2024
32ae6b9
1) add Aww numerical derivative unit tests, 2) thermal index fix
tjb-ltk Jun 5, 2024
bea94d5
more pedantics
tjb-ltk Jun 5, 2024
887192d
pedantics
tjb-ltk Jun 5, 2024
b9b6676
remove debug
tjb-ltk Jun 5, 2024
99efdea
compiler warning error
tjb-ltk Jun 6, 2024
2b8ca8d
fix file path
tjb-ltk Jun 7, 2024
86ed597
lets try all combinations of file input path
tjb-ltk Jun 10, 2024
4de08c1
Merge remote-tracking branch 'origin/feature/byer3/thermal_well' into…
tjb-ltk Jun 14, 2024
7c8fb31
updated to latest dev/modules
tjb-ltk Jun 14, 2024
0e2b420
cleanup
tjb-ltk Jun 14, 2024
11e6056
mod fix
tjb-ltk Jun 14, 2024
dfaa419
Fix runner build errors
tjb-ltk Jun 14, 2024
f508369
move mpi com outside of subregion loop
tjb-ltk Jun 18, 2024
bce0bf9
build fix for ubunnto etal
tjb-ltk Jun 18, 2024
a1b70ac
build fix for ubunnto etal t2
tjb-ltk Jun 18, 2024
b3ed475
build fix for ubunnto etal t3
tjb-ltk Jun 18, 2024
e4edc21
move input file data to char array, write out array to file, delete file
tjb-ltk Jun 18, 2024
352ca5d
uncrustify
tjb-ltk Jun 18, 2024
574a18e
testing
tjb-ltk Jun 18, 2024
25fae7f
remove dead code
tjb-ltk Jun 19, 2024
371eb04
mpi parallel fix for closed wells
tjb-ltk Jun 21, 2024
9c7a462
1) fix temp constraint eqn setup for well spanning > 1 cores , 2) wel…
tjb-ltk Jul 9, 2024
b5b3413
Merge branch 'develop' into feature/byer3/thermal_well
rrsettgast Jul 11, 2024
2e1bb1e
resolve latest merge
tjb-ltk Jul 11, 2024
dc1faee
Merge branch 'develop' into feature/byer3/thermal_well
tjb-ltk Jul 22, 2024
561710e
1) remove schema addition for current nonlinear stats , 2) remove tes…
tjb-ltk Jul 22, 2024
fbf9898
only register region state props once
tjb-ltk Jul 23, 2024
e6db741
1) for shutin wells zero completion perforation rates for clarity in …
tjb-ltk Jul 29, 2024
109e43f
Merge branch 'develop' into feature/byer3/thermal_well
tjb-ltk Jul 29, 2024
8963ffa
code cleanup - remove partial thermal impl for single phase
tjb-ltk Jul 30, 2024
25d8e2b
run non-automatic uncrusty
tjb-ltk Jul 30, 2024
eee00a3
one more time
tjb-ltk Jul 30, 2024
11d1d80
revert single phase well initialization to dev ver, fix will be adde…
tjb-ltk Aug 1, 2024
c51952f
restructure for GPU reqs
tjb-ltk Aug 5, 2024
47eada8
remove tjb specifics
tjb-ltk Aug 5, 2024
3a70471
Fixes for unittests when GPU enabled
tjb-ltk Aug 9, 2024
d7c6759
Merge branch 'develop' into feature/byer3/thermal_well - Chasing the …
tjb-ltk Aug 9, 2024
5b66e34
fix merge error
tjb-ltk Aug 9, 2024
127d4cf
test add instead of remove plus insert.
CusiniM Aug 10, 2024
0f46cdc
Merge remote-tracking branch 'origin/develop' into feature/byer3/ther…
CusiniM Aug 10, 2024
4da9ef7
Merge branch 'feature/byer3/thermal_well' of github.com:GEOS-DEV/GEOS…
CusiniM Aug 10, 2024
b711a87
Remove & and add const.
CusiniM Aug 10, 2024
17cc023
Update src/coreComponents/unitTests/fluidFlowTests/testCompFlowUtils.hpp
CusiniM Aug 10, 2024
720901c
1) dont allocate temperature_n for isothermal run, 2) uncrustify style
tjb-ltk Aug 12, 2024
fdeea3a
remove debug std::cout
tjb-ltk Aug 20, 2024
4cf2106
remove std::cout
tjb-ltk Sep 5, 2024
35cf15b
code cleanup
tjb-ltk Sep 18, 2024
f1f633b
Code cleanup
tjb-ltk Sep 19, 2024
e659c7c
move KernalLaunchSelectors from common to physicsSolvers
tjb-ltk Oct 9, 2024
3162266
PR requested changes
tjb-ltk Oct 24, 2024
988ae2b
dev merge
tjb-ltk Oct 25, 2024
dcb533b
fix pedantry
tjb-ltk Oct 27, 2024
7e3619c
Merge branch 'develop' into feature/byer3/thermal_well
CusiniM Oct 28, 2024
72f8895
fix compilation errors.
CusiniM Oct 28, 2024
32d1d28
Merge branch 'feature/byer3/thermal_well' of github.com:GEOS-DEV/GEOS…
CusiniM Oct 28, 2024
12e9314
update baselines
tjb-ltk Oct 29, 2024
aa71f2a
perfs global res cell index set with wrong array (node instead of ce…
tjb-ltk Oct 30, 2024
f5ef324
Update .integrated_tests.yaml
CusiniM Oct 31, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .integrated_tests.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
baselines:
bucket: geosx
baseline: integratedTests/baseline_integratedTests-pr2878-8188-ed2ded2
baseline: integratedTests/baseline_integratedTests-pr3156-8300-32d1d28
CusiniM marked this conversation as resolved.
Show resolved Hide resolved

allow_fail:
all: ''
Expand Down
4 changes: 4 additions & 0 deletions BASELINE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ This file is designed to track changes to the integrated test baselines.
Any developer who updates the baseline ID in the .integrated_tests.yaml file is expected to create an entry in this file with the pull request number, date, and their justification for rebaselining.
These notes should be in reverse-chronological order, and use the following time format: (YYYY-MM-DD).

PR #3156 (2024-10-29)
====================
Restart check errors due to 1) schema node added to enable thermal option in well model and 2) arrays removed/added for option. Max difference errors due treatment of shutin wells. Previously non-zero rate value reported for shutin well, new code will set rate arrays to zero.

PR #2878 (2024-10-17)
=====================
Sorted region cellBlocks names alphabetically. Therefore affected ordering of: faceManager/elemSubRegionList, nodeManager/elemList, nodeManager/elemSubRegionList, SurfaceElementSubRegion::fractureElementsToCellSubRegions, field::perforation::reservoirElementSubregion.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,6 @@ CO2BrineFluid< PHASE1, PHASE2, FLASH >::KernelWrapper::

if( m_isThermal )
{

m_phase1.enthalpy.compute( pressure,
temperatureInCelsius,
phaseCompFraction.value[ip1].toSliceConst(), phaseCompFraction.derivs[ip1].toSliceConst(),
Expand Down
40 changes: 40 additions & 0 deletions src/coreComponents/constitutive/fluid/multifluid/Layouts.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,23 @@ namespace geos
{
namespace constitutive
{

namespace singlefluid
{
struct DerivativeOffset
{
/// index of derivative wrt pressure
static integer constexpr dP = 0;
/// index of derivative wrt temperature
static integer constexpr dT = 1;

};
}
namespace multifluid
{

/// indices of pressure, temperature, and composition derivatives
// Fix me - if the order is changed the code crashes
struct DerivativeOffset
{
/// index of derivative wrt pressure
Expand All @@ -44,6 +57,33 @@ struct DerivativeOffset
static integer constexpr dC = 2;
};

/// indices of pressure, temperature, and composition derivatives
template< integer NC, integer IS_THERMAL >
struct DerivativeOffsetC {};

template< integer NC >
struct DerivativeOffsetC< NC, 1 >
{
/// index of derivative wrt pressure
static integer constexpr dP = 0;
/// index of derivative wrt temperature
static integer constexpr dT = dP + 1;
/// index of first derivative wrt compositions
static integer constexpr dC = dP+2;
/// number of derivatives
static integer constexpr nDer = NC + 2;
};
template< integer NC >
struct DerivativeOffsetC< NC, 0 >
{
/// index of derivative wrt pressure
static integer constexpr dP = 0;
/// index of first derivative wrt compositions
static integer constexpr dC = dP+1;
/// number of derivatives
static integer constexpr nDer = NC + 1;
};

#if defined( GEOS_USE_DEVICE )

/// Constitutive model phase property array layout
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,14 @@
virtual real64 defaultDensity() const = 0;
virtual real64 defaultViscosity() const = 0;

/**
* @brief Get the thermal flag.
* @return boolean value indicating whether the model can be used to assemble the energy balance equation or not
* @detail if isThermal is true, the constitutive model compute the enthalpy and internal energy of the phase.
* This can be used to check the compatibility of the constitutive model with the solver
*/
virtual bool isThermal() const { return false; }

Check warning on line 285 in src/coreComponents/constitutive/fluid/singlefluid/SingleFluidBase.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/fluid/singlefluid/SingleFluidBase.hpp#L285

Added line #L285 was not covered by tests
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do you need to add one with true in ThermalCompressibleSinglePhaseFluid ?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tjb-ltk Is this resolved?


protected:

virtual void postInputInitialization() override;
Expand Down
2 changes: 1 addition & 1 deletion src/coreComponents/dataRepository/Group.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -457,7 +457,6 @@ class Group
{
using T = std::conditional_t< std::is_const< CONTAINERTYPE >::value, CASTTYPE const, CASTTYPE >;
T * const castedContainer = dynamic_cast< T * >( &container );

if( castedContainer != nullptr )
{
lambda( *castedContainer );
Expand Down Expand Up @@ -598,6 +597,7 @@ class Group
void forSubGroups( LOOKUP_CONTAINER const & subGroupKeys, LAMBDA && lambda )
{
localIndex counter = 0;

for( auto const & subgroup : subGroupKeys )
{
applyLambdaToContainer< GROUPTYPE, GROUPTYPES... >( getGroup( subgroup ), [&]( auto & castedSubGroup )
Expand Down
1 change: 1 addition & 0 deletions src/coreComponents/linearAlgebra/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ if( ENABLE_HYPRE )
interfaces/hypre/mgrStrategies/SinglePhaseReservoirHybridFVM.hpp
interfaces/hypre/mgrStrategies/SolidMechanicsEmbeddedFractures.hpp
interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseFVM.hpp
interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseReservoirFVM.hpp
interfaces/hypre/mgrStrategies/ThermalMultiphasePoromechanics.hpp
interfaces/hypre/mgrStrategies/ThermalSinglePhasePoromechanics.hpp )
list( APPEND linearAlgebra_sources
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
#include "linearAlgebra/interfaces/hypre/mgrStrategies/SinglePhaseReservoirFVM.hpp"
#include "linearAlgebra/interfaces/hypre/mgrStrategies/SinglePhaseReservoirHybridFVM.hpp"
#include "linearAlgebra/interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseFVM.hpp"
#include "linearAlgebra/interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseReservoirFVM.hpp"
#include "linearAlgebra/interfaces/hypre/mgrStrategies/ThermalSinglePhasePoromechanics.hpp"
#include "linearAlgebra/interfaces/hypre/mgrStrategies/ThermalMultiphasePoromechanics.hpp"
#include "linearAlgebra/interfaces/hypre/mgrStrategies/SolidMechanicsEmbeddedFractures.hpp"
Expand Down Expand Up @@ -112,6 +113,11 @@
setStrategy< ThermalCompositionalMultiphaseFVM >( params.mgr, numComponentsPerField, precond, mgrData );
break;
}
case LinearSolverParameters::MGR::StrategyType::thermalCompositionalMultiphaseReservoirFVM:

Check warning on line 116 in src/coreComponents/linearAlgebra/interfaces/hypre/HypreMGR.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/linearAlgebra/interfaces/hypre/HypreMGR.cpp#L116

Added line #L116 was not covered by tests
{
setStrategy< ThermalCompositionalMultiphaseReservoirFVM >( params.mgr, numComponentsPerField, precond, mgrData );
break;

Check warning on line 119 in src/coreComponents/linearAlgebra/interfaces/hypre/HypreMGR.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/linearAlgebra/interfaces/hypre/HypreMGR.cpp#L118-L119

Added lines #L118 - L119 were not covered by tests
}
case LinearSolverParameters::MGR::StrategyType::hybridSinglePhasePoromechanics:
{
setStrategy< HybridSinglePhasePoromechanics >( params.mgr, numComponentsPerField, precond, mgrData );
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
/*
* ------------------------------------------------------------------------------------------------------------
* SPDX-License-Identifier: LGPL-2.1-only
*
* Copyright (c) 2018-2020 Lawrence Livermore National Security LLC
* Copyright (c) 2018-2020 The Board of Trustees of the Leland Stanford Junior University
* Copyright (c) 2018-2020 TotalEnergies
* Copyright (c) 2019- GEOSX Contributors
* All rights reserved
*
* See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details.
* ------------------------------------------------------------------------------------------------------------
*/

/**
* @file ThermalCompositionalMultiphaseFVM.hpp
*/

#ifndef GEOS_LINEARALGEBRA_INTERFACES_HYPREMGRTHERMALCOMPOSITIONALMULTIPHASERESERVOIRFVM_HPP_
#define GEOS_LINEARALGEBRA_INTERFACES_HYPREMGRTHERMALCOMPOSITIONALMULTIPHASERESERVOIRFVM_HPP_

#include "linearAlgebra/interfaces/hypre/HypreMGR.hpp"

namespace geos
{

namespace hypre
{

namespace mgr
{

/**
* @brief ThermalCompositionalMultiphaseReservoirFVM strategy.
*
* Labels description stored in point_marker_array
* 0 = reservoir pressure
* 1 = reservoir density (component 1 )
* ... = reservoir densities (# components , NC)
* NC + 1 = reservoir temperature
*
* numResLabels - 1 = reservoir temperature
* numResLabels = well pressure
* numResLabels + 1 = well density
* ... = ... (well densities)
* numResLabels + numWellLabels - 3 = last well density
* numResLabels + numWellLabels - 2 = well rate
* numResLabels + numWellLabels - 1 = well temperature
*
* 3-level MGR reduction strategy
* - 1st level: eliminate the well block
* - 2nd level: eliminate the reservoir density associated with the volume constraint
* - 3rd level: eliminate the remaining the reservoir densities
* - The coarse grid (pressure and temperature system) is solved with BoomerAMG with numFunctions==2.
*
*/

class ThermalCompositionalMultiphaseReservoirFVM : public MGRStrategyBase< 3 >
{
public:
/**
* @brief Constructor.
* @param numComponentsPerField array with number of components for each field
*/
explicit ThermalCompositionalMultiphaseReservoirFVM( arrayView1d< int const > const & numComponentsPerField )
tjb-ltk marked this conversation as resolved.
Show resolved Hide resolved
: MGRStrategyBase( LvArray::integerConversion< HYPRE_Int >( numComponentsPerField[0] + numComponentsPerField[1] ) )

Check warning on line 66 in src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseReservoirFVM.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseReservoirFVM.hpp#L65-L66

Added lines #L65 - L66 were not covered by tests
{
HYPRE_Int const numResLabels = LvArray::integerConversion< HYPRE_Int >( numComponentsPerField[0] );

Check warning on line 68 in src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseReservoirFVM.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseReservoirFVM.hpp#L68

Added line #L68 was not covered by tests

// Level 0: eliminate the well block
m_labels[0].resize( numResLabels );
std::iota( m_labels[0].begin(), m_labels[0].end(), 0 );

Check warning on line 72 in src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseReservoirFVM.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseReservoirFVM.hpp#L71-L72

Added lines #L71 - L72 were not covered by tests

// Level 1: eliminate last density which corresponds to the volume constraint equation
m_labels[1].resize( numResLabels - 2 );
std::iota( m_labels[1].begin(), m_labels[1].end(), 0 );
m_labels[1].push_back( numResLabels-1 ); // keep temperature

Check warning on line 77 in src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseReservoirFVM.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseReservoirFVM.hpp#L75-L77

Added lines #L75 - L77 were not covered by tests
// Level 2: eliminate the other densities
m_labels[2].push_back( 0 ); // keep pressure
m_labels[2].push_back( numResLabels-1 ); // keep temperature

Check warning on line 80 in src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseReservoirFVM.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseReservoirFVM.hpp#L79-L80

Added lines #L79 - L80 were not covered by tests

setupLabels();

Check warning on line 82 in src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseReservoirFVM.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseReservoirFVM.hpp#L82

Added line #L82 was not covered by tests

// level 0
m_levelFRelaxType[0] = MGRFRelaxationType::gsElimWInverse;
m_levelFRelaxIters[0] = 1;
m_levelInterpType[0] = MGRInterpolationType::blockJacobi;
m_levelRestrictType[0] = MGRRestrictionType::injection;
m_levelCoarseGridMethod[0] = MGRCoarseGridMethod::galerkin;
m_levelGlobalSmootherType[0] = MGRGlobalSmootherType::none;

Check warning on line 90 in src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseReservoirFVM.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseReservoirFVM.hpp#L85-L90

Added lines #L85 - L90 were not covered by tests

m_levelFRelaxType[1] = MGRFRelaxationType::jacobi;
m_levelFRelaxIters[1] = 1;
m_levelInterpType[1] = MGRInterpolationType::jacobi; // Diagonal scaling (Jacobi)
m_levelRestrictType[1] = MGRRestrictionType::injection;
m_levelCoarseGridMethod[1] = MGRCoarseGridMethod::galerkin; // Standard Galerkin
m_levelGlobalSmootherType[1] = MGRGlobalSmootherType::blockGaussSeidel;
m_levelGlobalSmootherIters[1] = 1;

Check warning on line 98 in src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseReservoirFVM.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseReservoirFVM.hpp#L92-L98

Added lines #L92 - L98 were not covered by tests

m_levelFRelaxType[2] = MGRFRelaxationType::jacobi;
m_levelFRelaxIters[2] = 1;
m_levelInterpType[2] = MGRInterpolationType::injection; // Injection
m_levelRestrictType[2] = MGRRestrictionType::injection;
m_levelCoarseGridMethod[2] = MGRCoarseGridMethod::cprLikeBlockDiag; // Non-Galerkin Quasi-IMPES CPR
m_levelGlobalSmootherType[2] = MGRGlobalSmootherType::ilu0;
m_levelGlobalSmootherIters[2] = 1;
}

Check warning on line 107 in src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseReservoirFVM.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseReservoirFVM.hpp#L100-L107

Added lines #L100 - L107 were not covered by tests

/**
* @brief Setup the MGR strategy.
* @param precond preconditioner wrapper
* @param mgrData auxiliary MGR data
*/
void setup( LinearSolverParameters::MGR const &,

Check warning on line 114 in src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseReservoirFVM.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseReservoirFVM.hpp#L114

Added line #L114 was not covered by tests
HyprePrecWrapper & precond,
HypreMGRData & mgrData )
{
setReduction( precond, mgrData );

Check warning on line 118 in src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseReservoirFVM.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseReservoirFVM.hpp#L118

Added line #L118 was not covered by tests

// Configure the BoomerAMG solver used as mgr coarse solver for the pressure/temperature reduced system
setPressureTemperatureAMG( mgrData.coarseSolver );
}

Check warning on line 122 in src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseReservoirFVM.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/linearAlgebra/interfaces/hypre/mgrStrategies/ThermalCompositionalMultiphaseReservoirFVM.hpp#L121-L122

Added lines #L121 - L122 were not covered by tests
};

} // namespace mgr

} // namespace hypre

} // namespace geos

#endif /*GEOS_LINEARALGEBRA_INTERFACES_HYPREMGRCOMPOSITIONALMULTIPHASERESERVOIRFVM_HPP_*/
Original file line number Diff line number Diff line change
Expand Up @@ -271,28 +271,29 @@ struct LinearSolverParameters
*/
enum class StrategyType : integer
{
invalid, ///< default value, to ensure solver sets something
singlePhaseReservoirFVM, ///< finite volume single-phase flow with wells
singlePhaseHybridFVM, ///< hybrid finite volume single-phase flow
singlePhaseReservoirHybridFVM, ///< hybrid finite volume single-phase flow with wells
singlePhasePoromechanics, ///< single phase poromechanics with finite volume single phase flow
thermalSinglePhasePoromechanics, ///< thermal single phase poromechanics with finite volume single phase flow
hybridSinglePhasePoromechanics, ///< single phase poromechanics with hybrid finite volume single phase flow
singlePhasePoromechanicsEmbeddedFractures, ///< single phase poromechanics with FV embedded fractures
singlePhasePoromechanicsConformingFractures, ///< single phase poromechanics with FV conforming fractures
singlePhasePoromechanicsReservoirFVM, ///< single phase poromechanics with finite volume single phase flow with wells
compositionalMultiphaseFVM, ///< finite volume compositional multiphase flow
compositionalMultiphaseHybridFVM, ///< hybrid finite volume compositional multiphase flow
compositionalMultiphaseReservoirFVM, ///< finite volume compositional multiphase flow with wells
compositionalMultiphaseReservoirHybridFVM, ///< hybrid finite volume compositional multiphase flow with wells
reactiveCompositionalMultiphaseOBL, ///< finite volume reactive compositional flow with OBL
thermalCompositionalMultiphaseFVM, ///< finite volume thermal compositional multiphase flow
multiphasePoromechanics, ///< multiphase poromechanics with finite volume compositional multiphase flow
multiphasePoromechanicsReservoirFVM, ///< multiphase poromechanics with finite volume compositional multiphase flow with wells
thermalMultiphasePoromechanics, ///< thermal multiphase poromechanics with finite volume compositional multiphase flow
hydrofracture, ///< hydrofracture
lagrangianContactMechanics, ///< Lagrangian contact mechanics
solidMechanicsEmbeddedFractures ///< Embedded fractures mechanics
invalid, ///< default value, to ensure solver sets something
singlePhaseReservoirFVM, ///< finite volume single-phase flow with wells
singlePhaseHybridFVM, ///< hybrid finite volume single-phase flow
singlePhaseReservoirHybridFVM, ///< hybrid finite volume single-phase flow with wells
singlePhasePoromechanics, ///< single phase poromechanics with finite volume single phase flow
thermalSinglePhasePoromechanics, ///< thermal single phase poromechanics with finite volume single phase flow
hybridSinglePhasePoromechanics, ///< single phase poromechanics with hybrid finite volume single phase flow
singlePhasePoromechanicsEmbeddedFractures, ///< single phase poromechanics with FV embedded fractures
singlePhasePoromechanicsConformingFractures, ///< single phase poromechanics with FV embedded fractures
singlePhasePoromechanicsReservoirFVM, ///< single phase poromechanics with finite volume single phase flow with wells
compositionalMultiphaseFVM, ///< finite volume compositional multiphase flow
compositionalMultiphaseHybridFVM, ///< hybrid finite volume compositional multiphase flow
compositionalMultiphaseReservoirFVM, ///< finite volume compositional multiphase flow with wells
compositionalMultiphaseReservoirHybridFVM, ///< hybrid finite volume compositional multiphase flow with wells
reactiveCompositionalMultiphaseOBL, ///< finite volume reactive compositional flow with OBL
thermalCompositionalMultiphaseFVM, ///< finite volume thermal compositional multiphase flow
thermalCompositionalMultiphaseReservoirFVM,///< finite volume thermal compositional multiphase flow
multiphasePoromechanics, ///< multiphase poromechanics with finite volume compositional multiphase flow
multiphasePoromechanicsReservoirFVM, ///< multiphase poromechanics with finite volume compositional multiphase flow with wells
thermalMultiphasePoromechanics, ///< thermal multiphase poromechanics with finite volume compositional multiphase flow
hydrofracture, ///< hydrofracture
lagrangianContactMechanics, ///< Lagrangian contact mechanics
solidMechanicsEmbeddedFractures ///< Embedded fractures mechanics
};

StrategyType strategy = StrategyType::invalid; ///< Predefined MGR solution strategy (solver specific)
Expand Down Expand Up @@ -379,6 +380,7 @@ ENUM_STRINGS( LinearSolverParameters::MGR::StrategyType,
"compositionalMultiphaseReservoirHybridFVM",
"reactiveCompositionalMultiphaseOBL",
"thermalCompositionalMultiphaseFVM",
"thermalCompositionalMultiphaseReservoirFVM",
"multiphasePoromechanics",
"multiphasePoromechanicsReservoirFVM",
"thermalMultiphasePoromechanics",
Expand Down
2 changes: 2 additions & 0 deletions src/coreComponents/mesh/PerforationData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ PerforationData::PerforationData( string const & name, Group * const parent )
registerField( fields::perforation::reservoirElementRegion{}, &m_toMeshElements.m_toElementRegion );
registerField( fields::perforation::reservoirElementSubRegion{}, &m_toMeshElements.m_toElementSubRegion );
registerField( fields::perforation::reservoirElementIndex{}, &m_toMeshElements.m_toElementIndex );
registerField( fields::perforation::reservoirElementGlobalIndex{}, &m_reservoirElementGlobalIndex );

registerField( fields::perforation::wellElementIndex{}, &m_wellElementIndex );
registerField( fields::perforation::location{}, &m_location );
registerField( fields::perforation::wellTransmissibility{}, &m_wellTransmissibility );
Expand Down
17 changes: 17 additions & 0 deletions src/coreComponents/mesh/PerforationData.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,20 @@ class PerforationData : public ObjectManagerBase
*/
arrayView1d< localIndex const > getWellElements() const { return m_wellElementIndex; }

/**
* @brief Get perforation-to-reservoir-element connectivity.
* @return list of global reservoir element index connected to each perforation
*/
arrayView1d< globalIndex > getReservoirElementGlobalIndex() { return m_reservoirElementGlobalIndex; }



/**
* @brief Provide an immutable accessor to a const perforation-to-reservoir-element connectivity.
* @return list of well element index connected to each perforation
*/
arrayView1d< globalIndex const > getReservoirElementGlobalIndex() const { return m_reservoirElementGlobalIndex; }


/**
* @brief Get perforation locations.
Expand Down Expand Up @@ -275,6 +289,9 @@ class PerforationData : public ObjectManagerBase
/// Indices of the well elements to which perforations are attached
array1d< localIndex > m_wellElementIndex;

/// Global indices of reservoir cell containing perforation
array1d< globalIndex > m_reservoirElementGlobalIndex;

/// Location of the perforations
array2d< real64 > m_location;

Expand Down
8 changes: 8 additions & 0 deletions src/coreComponents/mesh/PerforationFields.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ DECLARE_FIELD( reservoirElementIndex,
WRITE_AND_READ,
"For each perforation, element index of the perforated element" );

DECLARE_FIELD( reservoirElementGlobalIndex,
"reservoirElementGlobalIndex",
array1d< globalIndex >,
0,
NOPLOT,
WRITE_AND_READ,
"For each perforation, global element index of the perforated element" );

DECLARE_FIELD( wellElementIndex,
"wellElementIndex",
array1d< localIndex >,
Expand Down
Loading
Loading