diff --git a/src/coreComponents/constitutive/CMakeLists.txt b/src/coreComponents/constitutive/CMakeLists.txt index 6af439fe23f..78af66e0f94 100644 --- a/src/coreComponents/constitutive/CMakeLists.txt +++ b/src/coreComponents/constitutive/CMakeLists.txt @@ -154,6 +154,7 @@ set( constitutive_headers permeability/PressurePermeability.hpp permeability/ProppantPermeability.hpp permeability/SlipDependentPermeability.hpp + permeability/StrainDependentPermeability.hpp permeability/WillisRichardsPermeability.hpp relativePermeability/BrooksCoreyBakerRelativePermeability.hpp relativePermeability/BrooksCoreyStone2RelativePermeability.hpp @@ -303,6 +304,7 @@ set( constitutive_sources permeability/PressurePermeability.cpp permeability/ProppantPermeability.cpp permeability/SlipDependentPermeability.cpp + permeability/StrainDependentPermeability.cpp permeability/WillisRichardsPermeability.cpp relativePermeability/BrooksCoreyBakerRelativePermeability.cpp relativePermeability/BrooksCoreyStone2RelativePermeability.cpp diff --git a/src/coreComponents/constitutive/ConstitutivePassThru.hpp b/src/coreComponents/constitutive/ConstitutivePassThru.hpp index d78d7bb1bf8..e6300a110a9 100644 --- a/src/coreComponents/constitutive/ConstitutivePassThru.hpp +++ b/src/coreComponents/constitutive/ConstitutivePassThru.hpp @@ -47,6 +47,7 @@ #include "solid/porosity/ReactivePorosity.hpp" #include "permeability/ConstantPermeability.hpp" #include "permeability/CarmanKozenyPermeability.hpp" +#include "permeability/StrainDependentPermeability.hpp" #include "permeability/ExponentialDecayPermeability.hpp" #include "permeability/ParallelPlatesPermeability.hpp" #include "permeability/PressurePermeability.hpp" @@ -341,8 +342,19 @@ struct ConstitutivePassThru< PorousSolidBase > PorousSolid< ElasticIsotropic, CarmanKozenyPermeability >, PorousSolid< ElasticTransverseIsotropic, CarmanKozenyPermeability >, PorousSolid< ElasticIsotropicPressureDependent, CarmanKozenyPermeability >, - PorousSolid< ElasticOrthotropic, CarmanKozenyPermeability > >::execute( constitutiveRelation, - std::forward< LAMBDA >( lambda ) ); + PorousSolid< ElasticOrthotropic, CarmanKozenyPermeability >, + PorousSolid< DruckerPragerExtended, StrainDependentPermeability >, + PorousSolid< ModifiedCamClay, StrainDependentPermeability >, + PorousSolid< DelftEgg, StrainDependentPermeability >, + PorousSolid< DruckerPrager, StrainDependentPermeability >, + PorousSolid< DuvautLionsSolid< DruckerPrager >, StrainDependentPermeability >, + PorousSolid< DuvautLionsSolid< DruckerPragerExtended >, StrainDependentPermeability >, + PorousSolid< DuvautLionsSolid< ModifiedCamClay >, StrainDependentPermeability >, + PorousSolid< ElasticIsotropic, StrainDependentPermeability >, + PorousSolid< ElasticTransverseIsotropic, StrainDependentPermeability >, + PorousSolid< ElasticIsotropicPressureDependent, StrainDependentPermeability >, + PorousSolid< ElasticOrthotropic, StrainDependentPermeability > >::execute( constitutiveRelation, + std::forward< LAMBDA >( lambda ) ); } }; @@ -487,6 +499,17 @@ struct ConstitutivePassThru< CoupledSolidBase > PorousSolid< ElasticTransverseIsotropic, CarmanKozenyPermeability >, PorousSolid< ElasticIsotropicPressureDependent, CarmanKozenyPermeability >, PorousSolid< ElasticOrthotropic, CarmanKozenyPermeability >, + PorousSolid< DruckerPragerExtended, StrainDependentPermeability >, + PorousSolid< ModifiedCamClay, StrainDependentPermeability >, + PorousSolid< DelftEgg, StrainDependentPermeability >, + PorousSolid< DruckerPrager, StrainDependentPermeability >, + PorousSolid< DuvautLionsSolid< DruckerPrager >, StrainDependentPermeability >, + PorousSolid< DuvautLionsSolid< DruckerPragerExtended >, StrainDependentPermeability >, + PorousSolid< DuvautLionsSolid< ModifiedCamClay >, StrainDependentPermeability >, + PorousSolid< ElasticIsotropic, StrainDependentPermeability >, + PorousSolid< ElasticTransverseIsotropic, StrainDependentPermeability >, + PorousSolid< ElasticIsotropicPressureDependent, StrainDependentPermeability >, + PorousSolid< ElasticOrthotropic, StrainDependentPermeability >, PorousDamageSolid< DamageSpectral< ElasticIsotropic > >, PorousDamageSolid< DamageVolDev< ElasticIsotropic > >, PorousDamageSolid< Damage< ElasticIsotropic > >, @@ -528,6 +551,17 @@ struct ConstitutivePassThru< CoupledSolidBase > PorousSolid< ElasticTransverseIsotropic, CarmanKozenyPermeability >, PorousSolid< ElasticIsotropicPressureDependent, CarmanKozenyPermeability >, PorousSolid< ElasticOrthotropic, CarmanKozenyPermeability >, + PorousSolid< DruckerPragerExtended, StrainDependentPermeability >, + PorousSolid< ModifiedCamClay, StrainDependentPermeability >, + PorousSolid< DelftEgg, StrainDependentPermeability >, + PorousSolid< DruckerPrager, StrainDependentPermeability >, + PorousSolid< DuvautLionsSolid< DruckerPrager >, StrainDependentPermeability >, + PorousSolid< DuvautLionsSolid< DruckerPragerExtended >, StrainDependentPermeability >, + PorousSolid< DuvautLionsSolid< ModifiedCamClay >, StrainDependentPermeability >, + PorousSolid< ElasticIsotropic, StrainDependentPermeability >, + PorousSolid< ElasticTransverseIsotropic, StrainDependentPermeability >, + PorousSolid< ElasticIsotropicPressureDependent, StrainDependentPermeability >, + PorousSolid< ElasticOrthotropic, StrainDependentPermeability >, PorousDamageSolid< DamageSpectral< ElasticIsotropic > >, PorousDamageSolid< DamageVolDev< ElasticIsotropic > >, PorousDamageSolid< Damage< ElasticIsotropic > >, diff --git a/src/coreComponents/constitutive/permeability/CarmanKozenyPermeability.hpp b/src/coreComponents/constitutive/permeability/CarmanKozenyPermeability.hpp index 2a121e0d36c..c16b57cab9e 100644 --- a/src/coreComponents/constitutive/permeability/CarmanKozenyPermeability.hpp +++ b/src/coreComponents/constitutive/permeability/CarmanKozenyPermeability.hpp @@ -63,6 +63,19 @@ class CarmanKozenyPermeabilityUpdate : public PermeabilityBaseUpdate m_dPerm_dPorosity[k][q] ); } + GEOS_HOST_DEVICE + virtual void updateFromPorosityAndStrain( localIndex const k, + real64 const & currentPorosity, + real64 const & referencePorosity ) const override + { + GEOS_UNUSED_VAR( referencePorosity ); + + // PorousSolid stores permeability cell-centered with one quadrature point. + compute( currentPorosity, + m_permeability[k][0], + m_dPerm_dPorosity[k][0] ); + } + private: /// dPermeability_dPorosity diff --git a/src/coreComponents/constitutive/permeability/PermeabilityBase.hpp b/src/coreComponents/constitutive/permeability/PermeabilityBase.hpp index 190b8f1b4f6..143e731838d 100644 --- a/src/coreComponents/constitutive/permeability/PermeabilityBase.hpp +++ b/src/coreComponents/constitutive/permeability/PermeabilityBase.hpp @@ -56,6 +56,14 @@ class PermeabilityBaseUpdate GEOS_UNUSED_VAR( k, q, pressure, porosity ); } + GEOS_HOST_DEVICE + virtual void updateFromPorosityAndStrain( localIndex const k, + real64 const & currentPorosity, + real64 const & referencePorosity ) const + { + GEOS_UNUSED_VAR( k, currentPorosity, referencePorosity ); + } + GEOS_HOST_DEVICE virtual void updateFromAperture( localIndex const k, localIndex const q, diff --git a/src/coreComponents/constitutive/permeability/StrainDependentPermeability.cpp b/src/coreComponents/constitutive/permeability/StrainDependentPermeability.cpp new file mode 100644 index 00000000000..67883234124 --- /dev/null +++ b/src/coreComponents/constitutive/permeability/StrainDependentPermeability.cpp @@ -0,0 +1,113 @@ +/* + * ------------------------------------------------------------------------------------------------------------ + * SPDX-License-Identifier: LGPL-2.1-only + * + * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC + * Copyright (c) 2018-2024 TotalEnergies + * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University + * Copyright (c) 2023-2024 Chevron + * Copyright (c) 2019- GEOS/GEOSX Contributors + * All rights reserved + * + * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. + * ------------------------------------------------------------------------------------------------------------ + */ + +/** + * @file StrainDependentPermeability.cpp + */ + +#include "StrainDependentPermeability.hpp" + +namespace geos +{ + +using namespace dataRepository; + +namespace constitutive +{ + + +StrainDependentPermeability::StrainDependentPermeability( string const & name, Group * const parent ): + PermeabilityBase( name, parent ) +{ + registerWrapper( viewKeyStruct::referencePermeabilityComponentsString(), &m_referencePermeabilityComponents ). + setInputFlag( InputFlags::REQUIRED ). + setRestartFlags( RestartFlags::NO_WRITE ). + setDescription( "Reference xx, yy and zz components of a diagonal permeability tensor." ); + + registerWrapper( viewKeyStruct::strainDependenceConstantsString(), &m_strainDependenceConstants ). + setInputFlag( InputFlags::REQUIRED ). + setDescription( "Volumetric strain dependence coefficients for each permeability component." ); + + registerWrapper( viewKeyStruct::referencePermeabilityString(), &m_referencePermeability ). + setApplyDefaultValue( 0.0 ). + setPlotLevel( PlotLevel::LEVEL_0 ). + setDescription( "Reference permeability field" ); + + registerWrapper( viewKeyStruct::dPerm_dPorosityString(), &m_dPerm_dPorosity ); +} + +std::unique_ptr< ConstitutiveBase > +StrainDependentPermeability::deliverClone( string const & name, + Group * const parent ) const +{ + return PermeabilityBase::deliverClone( name, parent ); +} + +void StrainDependentPermeability::allocateConstitutiveData( Group & parent, + localIndex const numPts ) +{ + // NOTE: enforcing 1 quadrature point + m_dPerm_dPorosity.resize( 0, 1, 3 ); + + m_referencePermeability.resize( 0, 1, 3 ); + + PermeabilityBase::allocateConstitutiveData( parent, numPts ); + + integer constexpr numQuad = 1; // NOTE: enforcing 1 quadrature point + + for( localIndex ei = 0; ei < parent.size(); ++ei ) + { + for( localIndex q = 0; q < numQuad; ++q ) + { + m_referencePermeability[ei][q][0] = m_referencePermeabilityComponents[0]; + m_referencePermeability[ei][q][1] = m_referencePermeabilityComponents[1]; + m_referencePermeability[ei][q][2] = m_referencePermeabilityComponents[2]; + } + } +} + +void StrainDependentPermeability::initializeState() const +{ + localIndex const numE = m_permeability.size( 0 ); + integer constexpr numQuad = 1; // NOTE: enforcing 1 quadrature point + + auto permView = m_permeability.toView(); + real64 const permComponents[3] = { m_referencePermeabilityComponents[0], + m_referencePermeabilityComponents[1], + m_referencePermeabilityComponents[2] }; + + forAll< parallelDevicePolicy<> >( numE, [=] GEOS_HOST_DEVICE ( localIndex const ei ) + { + for( localIndex q = 0; q < numQuad; ++q ) + { + for( integer dim=0; dim < 3; ++dim ) + { + // The default value is -1 so if it still -1 it needs to be set to something physical + if( permView[ei][q][dim] < 0 ) + { + permView[ei][q][dim] = permComponents[dim]; + } + } + } + } ); +} + +void StrainDependentPermeability::postInputInitialization() +{} + +REGISTER_CATALOG_ENTRY( ConstitutiveBase, StrainDependentPermeability, string const &, Group * const ) + +} +} /* namespace geos */ diff --git a/src/coreComponents/constitutive/permeability/StrainDependentPermeability.hpp b/src/coreComponents/constitutive/permeability/StrainDependentPermeability.hpp new file mode 100644 index 00000000000..b2ebc5d5fb8 --- /dev/null +++ b/src/coreComponents/constitutive/permeability/StrainDependentPermeability.hpp @@ -0,0 +1,174 @@ +/* + * ------------------------------------------------------------------------------------------------------------ + * SPDX-License-Identifier: LGPL-2.1-only + * + * Copyright (c) 2016-2024 Lawrence Livermore National Security LLC + * Copyright (c) 2018-2024 TotalEnergies + * Copyright (c) 2018-2024 The Board of Trustees of the Leland Stanford Junior University + * Copyright (c) 2023-2024 Chevron + * Copyright (c) 2019- GEOS/GEOSX Contributors + * All rights reserved + * + * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. + * ------------------------------------------------------------------------------------------------------------ + */ + +/** + * @file StrainDependentPermeability.hpp + */ + +#ifndef GEOS_CONSTITUTIVE_PERMEABILITY_STRAINDEPENDENTPERMEABILITY_HPP_ +#define GEOS_CONSTITUTIVE_PERMEABILITY_STRAINDEPENDENTPERMEABILITY_HPP_ + +#include "constitutive/permeability/PermeabilityBase.hpp" +#include "LvArray/src/tensorOps.hpp" + + +namespace geos +{ +namespace constitutive +{ + +class StrainDependentPermeabilityUpdate : public PermeabilityBaseUpdate +{ +public: + + StrainDependentPermeabilityUpdate( arrayView3d< real64 > const & permeability, + arrayView3d< real64 > const & dPerm_dPressure, + arrayView3d< real64 > const & dPerm_dPorosity, + arrayView3d< real64 > const & referencePermeability, + R1Tensor const strainDependenceConstants ) + : PermeabilityBaseUpdate( permeability, dPerm_dPressure ), + m_dPerm_dPorosity( dPerm_dPorosity ), + m_referencePermeability( referencePermeability ), + m_strainDependenceConstants( strainDependenceConstants ) + {} + + GEOS_HOST_DEVICE + void compute( real64 const & referencePorosity, + real64 const (&referencePermeability)[3], + R1Tensor const strainDependenceConstants, + real64 const & currentPorosity, + arraySlice1d< real64 > const & permeability, + arraySlice1d< real64 > const & dPerm_dPorosity ) const; + + GEOS_HOST_DEVICE + virtual void updateFromPorosityAndStrain( localIndex const k, + real64 const & currentPorosity, + real64 const & referencePorosity ) const override + { + real64 referencePermeability[3]; + + referencePermeability[0] = m_referencePermeability[k][0][0]; + referencePermeability[1] = m_referencePermeability[k][0][1]; + referencePermeability[2] = m_referencePermeability[k][0][2]; + + compute( referencePorosity, + referencePermeability, + m_strainDependenceConstants, + currentPorosity, + m_permeability[k][0], + m_dPerm_dPorosity[k][0] ); + } + +private: + + /// dPermeability_dPorosity + arrayView3d< real64 > m_dPerm_dPorosity; + + /// Reference permeability + arrayView3d< real64 > m_referencePermeability; + + /// Volumetric strain dependence coefficients for each permeability component + R1Tensor m_strainDependenceConstants; +}; + + +class StrainDependentPermeability : public PermeabilityBase +{ +public: + + StrainDependentPermeability( string const & name, dataRepository::Group * const parent ); + + std::unique_ptr< ConstitutiveBase > deliverClone( string const & name, + dataRepository::Group * const parent ) const override; + + static string catalogName() { return "StrainDependentPermeability"; } + + virtual string getCatalogName() const override { return catalogName(); } + + virtual void allocateConstitutiveData( dataRepository::Group & parent, + localIndex const numPts ) override; + + /// Type of kernel wrapper for in-kernel update + using KernelWrapper = StrainDependentPermeabilityUpdate; + + /** + * @brief Create an update kernel wrapper. + * @return the wrapper + */ + KernelWrapper createKernelWrapper() const + { + return KernelWrapper( m_permeability, + m_dPerm_dPressure, + m_dPerm_dPorosity, + m_referencePermeability, + m_strainDependenceConstants ); + } + + + struct viewKeyStruct : public PermeabilityBase::viewKeyStruct + { + static constexpr char const * referencePermeabilityComponentsString() { return "referencePermeabilityComponents"; } + static constexpr char const * dPerm_dPorosityString() { return "dPerm_dPorosity"; } + static constexpr char const * strainDependenceConstantsString() { return "strainDependenceConstants"; } + static constexpr char const * referencePermeabilityString() { return "referencePermeability"; } + }; + + virtual void initializeState() const override final; + +protected: + + virtual void postInputInitialization() override; + +private: + + /// Permeability components at the reference pressure + R1Tensor m_referencePermeabilityComponents; + + /// dPermeability_dPorosity + array3d< real64 > m_dPerm_dPorosity; + + /// Reference permeability + array3d< real64 > m_referencePermeability; + + /// Volumetric strain dependence coefficients for each permeability component + R1Tensor m_strainDependenceConstants; +}; + + +GEOS_HOST_DEVICE +inline +void StrainDependentPermeabilityUpdate::compute( real64 const & referencePorosity, + real64 const (&referencePermeability)[3], + R1Tensor const strainDependenceConstants, + real64 const & currentPorosity, + arraySlice1d< real64 > const & permeability, + arraySlice1d< real64 > const & dPerm_dPorosity ) const +{ + real64 const porosityRatio = currentPorosity / referencePorosity; + + for( localIndex i = 0; i < permeability.size(); ++i ) + { + permeability[i] = referencePermeability[i] * pow( porosityRatio, strainDependenceConstants[i] ); + dPerm_dPorosity[i] = strainDependenceConstants[i] * permeability[i] / currentPorosity; + } +} + + +}/* namespace constitutive */ + +} /* namespace geos */ + + +#endif //GEOS_CONSTITUTIVE_PERMEABILITY_STRAINDEPENDENTPERMEABILITY_HPP_ diff --git a/src/coreComponents/constitutive/solid/PorousSolid.cpp b/src/coreComponents/constitutive/solid/PorousSolid.cpp index 5b871f186e6..4b2f6dc7226 100644 --- a/src/coreComponents/constitutive/solid/PorousSolid.cpp +++ b/src/coreComponents/constitutive/solid/PorousSolid.cpp @@ -20,6 +20,7 @@ #include "PorousSolid.hpp" #include "ElasticIsotropic.hpp" +#include "ElasticIsotropicPressureDependent.hpp" #include "ElasticTransverseIsotropic.hpp" #include "ElasticOrthotropic.hpp" #include "DelftEgg.hpp" @@ -29,6 +30,7 @@ #include "DuvautLionsSolid.hpp" #include "constitutive/permeability/ConstantPermeability.hpp" #include "constitutive/permeability/CarmanKozenyPermeability.hpp" +#include "constitutive/permeability/StrainDependentPermeability.hpp" namespace geos { @@ -72,6 +74,17 @@ typedef PorousSolid< DuvautLionsSolid< DruckerPrager >, CarmanKozenyPermeability typedef PorousSolid< DuvautLionsSolid< DruckerPragerExtended >, CarmanKozenyPermeability > PorousViscoDruckerPragerExtendedCK; typedef PorousSolid< DuvautLionsSolid< ModifiedCamClay >, CarmanKozenyPermeability > PorousViscoModifiedCamClayCK; typedef PorousSolid< ModifiedCamClay, CarmanKozenyPermeability > PorousModifiedCamClayCK; +typedef PorousSolid< ElasticIsotropic, StrainDependentPermeability > PorousElasticIsotropicSD; +typedef PorousSolid< ElasticIsotropicPressureDependent, StrainDependentPermeability > PorousElasticIsotropicPressureDependentSD; +typedef PorousSolid< ElasticTransverseIsotropic, StrainDependentPermeability > PorousElasticTransverseIsotropicSD; +typedef PorousSolid< ElasticOrthotropic, StrainDependentPermeability > PorousElasticOrthotropicSD; +typedef PorousSolid< DelftEgg, StrainDependentPermeability > PorousDelftEggSD; +typedef PorousSolid< DruckerPrager, StrainDependentPermeability > PorousDruckerPragerSD; +typedef PorousSolid< DruckerPragerExtended, StrainDependentPermeability > PorousDruckerPragerExtendedSD; +typedef PorousSolid< DuvautLionsSolid< DruckerPrager >, StrainDependentPermeability > PorousViscoDruckerPragerSD; +typedef PorousSolid< DuvautLionsSolid< DruckerPragerExtended >, StrainDependentPermeability > PorousViscoDruckerPragerExtendedSD; +typedef PorousSolid< DuvautLionsSolid< ModifiedCamClay >, StrainDependentPermeability > PorousViscoModifiedCamClaySD; +typedef PorousSolid< ModifiedCamClay, StrainDependentPermeability > PorousModifiedCamClaySD; REGISTER_CATALOG_ENTRY( ConstitutiveBase, PorousElasticIsotropicConstant, string const &, Group * const ) @@ -94,6 +107,17 @@ REGISTER_CATALOG_ENTRY( ConstitutiveBase, PorousModifiedCamClayCK, string const REGISTER_CATALOG_ENTRY( ConstitutiveBase, PorousViscoDruckerPragerCK, string const &, Group * const ) REGISTER_CATALOG_ENTRY( ConstitutiveBase, PorousViscoDruckerPragerExtendedCK, string const &, Group * const ) REGISTER_CATALOG_ENTRY( ConstitutiveBase, PorousViscoModifiedCamClayCK, string const &, Group * const ) +REGISTER_CATALOG_ENTRY( ConstitutiveBase, PorousElasticIsotropicSD, string const &, Group * const ) +REGISTER_CATALOG_ENTRY( ConstitutiveBase, PorousElasticIsotropicPressureDependentSD, string const &, Group * const ) +REGISTER_CATALOG_ENTRY( ConstitutiveBase, PorousElasticTransverseIsotropicSD, string const &, Group * const ) +REGISTER_CATALOG_ENTRY( ConstitutiveBase, PorousElasticOrthotropicSD, string const &, Group * const ) +REGISTER_CATALOG_ENTRY( ConstitutiveBase, PorousDelftEggSD, string const &, Group * const ) +REGISTER_CATALOG_ENTRY( ConstitutiveBase, PorousDruckerPragerSD, string const &, Group * const ) +REGISTER_CATALOG_ENTRY( ConstitutiveBase, PorousDruckerPragerExtendedSD, string const &, Group * const ) +REGISTER_CATALOG_ENTRY( ConstitutiveBase, PorousModifiedCamClaySD, string const &, Group * const ) +REGISTER_CATALOG_ENTRY( ConstitutiveBase, PorousViscoDruckerPragerSD, string const &, Group * const ) +REGISTER_CATALOG_ENTRY( ConstitutiveBase, PorousViscoDruckerPragerExtendedSD, string const &, Group * const ) +REGISTER_CATALOG_ENTRY( ConstitutiveBase, PorousViscoModifiedCamClaySD, string const &, Group * const ) } diff --git a/src/coreComponents/constitutive/solid/PorousSolid.hpp b/src/coreComponents/constitutive/solid/PorousSolid.hpp index d7f27433787..3f9f5306923 100644 --- a/src/coreComponents/constitutive/solid/PorousSolid.hpp +++ b/src/coreComponents/constitutive/solid/PorousSolid.hpp @@ -128,6 +128,8 @@ class PorousSolidUpdates : public CoupledSolidUpdates< SOLID_TYPE, BiotPorosity, dPorosity_dTemperature = 0.0; } + updateMatrixPermeability( k ); + // Save the derivative of solid density wrt pressure for the computation of the body force dSolidDensity_dPressure = m_porosityUpdate.dGrainDensity_dPressure( k ); } @@ -241,6 +243,26 @@ class PorousSolidUpdates : public CoupledSolidUpdates< SOLID_TYPE, BiotPorosity, m_porosityUpdate.updateThermalExpansionCoefficient( k, thermalExpansionCoefficient ); } + GEOS_HOST_DEVICE + void updateMatrixPermeability( localIndex const k ) const + { + // Compute averaged porosity over all quadrature points for the cell-centered permeability + integer const numQuad = m_porosityUpdate.numGauss(); + + real64 avgPorosity = 0.0; + + for( localIndex q = 0; q < numQuad; ++q ) + { + avgPorosity += m_porosityUpdate.getPorosity( k, q ); + } + + avgPorosity /= numQuad; + + m_permUpdate.updateFromPorosityAndStrain( k, + avgPorosity, + m_porosityUpdate.getReferencePorosity( k ) ); + } + GEOS_HOST_DEVICE void computePorosity( localIndex const k, localIndex const q, diff --git a/src/coreComponents/constitutive/solid/porosity/PorosityBase.hpp b/src/coreComponents/constitutive/solid/porosity/PorosityBase.hpp index 5ce2cce6d38..b564de08bc4 100644 --- a/src/coreComponents/constitutive/solid/porosity/PorosityBase.hpp +++ b/src/coreComponents/constitutive/solid/porosity/PorosityBase.hpp @@ -84,6 +84,13 @@ class PorosityBaseUpdates return m_initialPorosity[k][q]; } + GEOS_HOST_DEVICE + inline + real64 getReferencePorosity( localIndex const k ) const + { + return m_referencePorosity[k]; + } + protected: /// New value of porosity diff --git a/src/coreComponents/physicsSolvers/multiphysics/kernelSpecs.json b/src/coreComponents/physicsSolvers/multiphysics/kernelSpecs.json index bf248e898f3..b68e4240cfa 100644 --- a/src/coreComponents/physicsSolvers/multiphysics/kernelSpecs.json +++ b/src/coreComponents/physicsSolvers/multiphysics/kernelSpecs.json @@ -61,6 +61,17 @@ "PorousSolid, CarmanKozenyPermeability>", "PorousSolid, CarmanKozenyPermeability>", "PorousSolid, CarmanKozenyPermeability>", + "PorousSolid", + "PorousSolid", + "PorousSolid", + "PorousSolid", + "PorousSolid", + "PorousSolid", + "PorousSolid", + "PorousSolid", + "PorousSolid, StrainDependentPermeability>", + "PorousSolid, StrainDependentPermeability>", + "PorousSolid, StrainDependentPermeability>", "PorousDamageSolid>", "PorousDamageSolid>", "PorousDamageSolid>" @@ -100,7 +111,8 @@ ], "CONSTITUTIVE_TYPE": [ "PorousSolid", - "PorousSolid" + "PorousSolid", + "PorousSolid" ], "FE_TYPE": [ "H1_Hexahedron_Lagrange1_GaussLegendre2", @@ -136,7 +148,11 @@ "PorousSolid", "PorousSolid", "PorousSolid", - "PorousSolid" + "PorousSolid", + "PorousSolid", + "PorousSolid", + "PorousSolid", + "PorousSolid" ], "FE_TYPE": [ "H1_Hexahedron_Lagrange1_GaussLegendre2", diff --git a/src/coreComponents/physicsSolvers/solidMechanics/kernelSpecs.json b/src/coreComponents/physicsSolvers/solidMechanics/kernelSpecs.json index 9eb41224111..6219c74919f 100644 --- a/src/coreComponents/physicsSolvers/solidMechanics/kernelSpecs.json +++ b/src/coreComponents/physicsSolvers/solidMechanics/kernelSpecs.json @@ -94,14 +94,17 @@ "CONSTITUTIVE_TYPE": [ "PorousSolid", "PorousSolid", + "PorousSolid", "PorousSolid", "PorousSolid", "PorousSolid", "PorousSolid", + "PorousSolid", "PorousSolid, ConstantPermeability>", "PorousSolid, CarmanKozenyPermeability>", "PorousSolid, ConstantPermeability>", - "PorousSolid, CarmanKozenyPermeability>" + "PorousSolid, CarmanKozenyPermeability>", + "PorousSolid, StrainDependentPermeability>" ], "FE_TYPE": [ "H1_Hexahedron_Lagrange1_GaussLegendre2", @@ -139,7 +142,8 @@ ], "CONSTITUTIVE_TYPE": [ "PorousSolid", - "PorousSolid" + "PorousSolid", + "PorousSolid" ], "FE_TYPE": [ "H1_Hexahedron_Lagrange1_GaussLegendre2",