-
Notifications
You must be signed in to change notification settings - Fork 97
Creation of a CoupleSolidModel to handle Poro-Solid-Damage models. #1455
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
Changes from 20 commits
f0dee83
36f0a89
7a717f4
6c39e6e
214b101
d68e4d5
5fd36d0
9588df7
6a78a07
8376aa2
7dc9a8d
1f07b96
70ce545
b16462e
12e867f
6cc05db
687d8df
78a9534
3d95812
d21f5eb
9ccb04d
829ef48
d2aaa7d
215991f
13f375d
81b2241
6b2d1fe
ace16f4
21029f1
cadc45e
054e7e4
c3ca4b8
a6db464
99962aa
42641c3
cfa5233
3aad2b0
81d7ccf
111e7e6
367ab49
d5c0b24
f8eb741
2ac003f
72fd0f4
3d8d521
f8e152d
49a5700
2c864ba
cf03d46
3bbf0e0
7e34d46
69cdc1e
23bc5be
28a9cf5
eff7146
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| /* | ||
| * ------------------------------------------------------------------------------------------------------------ | ||
| * 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 Total, S.A | ||
| * Copyright (c) 2019- GEOSX Contributors | ||
| * All rights reserved | ||
| * | ||
| * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. | ||
| * ------------------------------------------------------------------------------------------------------------ | ||
| */ | ||
|
|
||
| /** | ||
| * @file CarmanKozenyPermeability.cpp | ||
| */ | ||
|
|
||
| #include "CarmanKozenyPermeability.hpp" | ||
|
|
||
| namespace geosx | ||
| { | ||
|
|
||
| using namespace dataRepository; | ||
|
|
||
| namespace constitutive | ||
| { | ||
|
|
||
|
|
||
| CarmanKozenyPermeability::CarmanKozenyPermeability( string const & name, Group * const parent ): | ||
| PermeabilityBase( name, parent ) | ||
| { | ||
| registerWrapper( viewKeyStruct::particleDiameterString(), &m_particleDiameter ). | ||
| setInputFlag( InputFlags::REQUIRED ). | ||
| setDescription( "Diameter of the spherical particles." ); | ||
|
|
||
| registerWrapper( viewKeyStruct::sphericityString(), &m_sphericity ). | ||
| setInputFlag( InputFlags::REQUIRED ). | ||
| setDescription( "Sphericity of the particles." ); | ||
|
|
||
| registerWrapper( viewKeyStruct::dPerm_dPorosityString(), &m_dPerm_dPorosity ); | ||
| } | ||
|
|
||
| std::unique_ptr< ConstitutiveBase > | ||
| CarmanKozenyPermeability::deliverClone( string const & name, | ||
| Group * const parent ) const | ||
| { | ||
| return ConstitutiveBase::deliverClone( name, parent ); | ||
| } | ||
|
|
||
| void CarmanKozenyPermeability::allocateConstitutiveData( dataRepository::Group & parent, | ||
| localIndex const numConstitutivePointsPerParentIndex ) | ||
| { | ||
| m_dPerm_dPorosity.resize( 0, numConstitutivePointsPerParentIndex, 3 ); | ||
| PermeabilityBase::allocateConstitutiveData( parent, numConstitutivePointsPerParentIndex ); | ||
| } | ||
|
|
||
| void CarmanKozenyPermeability::postProcessInput() | ||
| {} | ||
|
|
||
| REGISTER_CATALOG_ENTRY( ConstitutiveBase, CarmanKozenyPermeability, string const &, Group * const ) | ||
|
|
||
| } | ||
| } /* namespace geosx */ |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,168 @@ | ||
| /* | ||
| * ------------------------------------------------------------------------------------------------------------ | ||
| * 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 Total, S.A | ||
| * Copyright (c) 2019- GEOSX Contributors | ||
| * All rights reserved | ||
| * | ||
| * See top level LICENSE, COPYRIGHT, CONTRIBUTORS, NOTICE, and ACKNOWLEDGEMENTS files for details. | ||
| * ------------------------------------------------------------------------------------------------------------ | ||
| */ | ||
|
|
||
| /** | ||
| * @file CarmanKozenyPermeability.hpp | ||
| */ | ||
|
|
||
| #ifndef GEOSX_CONSTITUTIVE_PERMEABILITY_CARMANKOZENYPERMEABILITY_HPP_ | ||
| #define GEOSX_CONSTITUTIVE_PERMEABILITY_CARMANKOZENYPERMEABILITY_HPP_ | ||
|
|
||
| #include "constitutive/permeability/PermeabilityBase.hpp" | ||
|
|
||
|
|
||
| namespace geosx | ||
| { | ||
| namespace constitutive | ||
| { | ||
|
|
||
| class CarmanKozenyPermeabilityUpdate : public PermeabilityBaseUpdate | ||
| { | ||
| public: | ||
|
|
||
| CarmanKozenyPermeabilityUpdate( arrayView3d< real64 > const & permeability, | ||
| arrayView3d< real64 > const & dPerm_dPressure, | ||
| arrayView3d< real64 > const & dPerm_dPorosity, | ||
| real64 const particleDiameter, | ||
| real64 const sphericity ) | ||
| : PermeabilityBaseUpdate( permeability, dPerm_dPressure ), | ||
| m_dPerm_dPorosity( dPerm_dPorosity ), | ||
| m_particleDiameter( particleDiameter ), | ||
| m_sphericity( sphericity ) | ||
| {} | ||
|
|
||
| /// Default copy constructor | ||
| CarmanKozenyPermeabilityUpdate( CarmanKozenyPermeabilityUpdate const & ) = default; | ||
|
|
||
| /// Default move constructor | ||
| CarmanKozenyPermeabilityUpdate( CarmanKozenyPermeabilityUpdate && ) = default; | ||
|
|
||
| /// Deleted copy assignment operator | ||
| CarmanKozenyPermeabilityUpdate & operator=( CarmanKozenyPermeabilityUpdate const & ) = delete; | ||
|
|
||
| /// Deleted move assignment operator | ||
| CarmanKozenyPermeabilityUpdate & operator=( CarmanKozenyPermeabilityUpdate && ) = delete; | ||
|
||
|
|
||
| GEOSX_HOST_DEVICE | ||
| GEOSX_FORCE_INLINE | ||
| void compute( real64 const & porosity, | ||
| arraySlice1d< real64 > const & permeability, | ||
| arraySlice1d< real64 > const & dPerm_dPorosity ) const; | ||
|
|
||
| GEOSX_HOST_DEVICE | ||
| GEOSX_FORCE_INLINE | ||
| virtual void updatePorosity( localIndex const k, | ||
| localIndex const q, | ||
| real64 const & porosity ) const override | ||
| { | ||
| compute( porosity, | ||
| m_permeability[k][q], | ||
| m_dPerm_dPorosity[k][q] ); | ||
| } | ||
|
|
||
| private: | ||
|
|
||
| /// dPermeability_dPorosity | ||
| arrayView3d< real64 > m_dPerm_dPorosity; | ||
|
|
||
| /// Particle diameter | ||
| real64 m_particleDiameter; | ||
|
|
||
| /// Sphericity of the particles | ||
| real64 m_sphericity; | ||
|
|
||
| }; | ||
|
|
||
|
|
||
| class CarmanKozenyPermeability : public PermeabilityBase | ||
| { | ||
| public: | ||
| CarmanKozenyPermeability( string const & name, Group * const parent ); | ||
|
|
||
| ~CarmanKozenyPermeability() = default; | ||
CusiniM marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| std::unique_ptr< ConstitutiveBase > deliverClone( string const & name, | ||
| Group * const parent ) const override; | ||
|
|
||
| virtual void allocateConstitutiveData( dataRepository::Group & parent, | ||
| localIndex const numConstitutivePointsPerParentIndex ) override; | ||
|
|
||
| static string catalogName() { return "CarmanKozenyPermeability"; } | ||
|
|
||
| virtual string getCatalogName() const override { return catalogName(); } | ||
|
|
||
| /// Type of kernel wrapper for in-kernel update | ||
| using KernelWrapper = CarmanKozenyPermeabilityUpdate; | ||
|
|
||
| /** | ||
| * @brief Create an update kernel wrapper. | ||
| * @return the wrapper | ||
| */ | ||
| KernelWrapper createKernelWrapper() | ||
| { | ||
| return KernelWrapper( m_permeability, | ||
| m_dPerm_dPressure, | ||
| m_dPerm_dPorosity, | ||
| m_particleDiameter, | ||
| m_sphericity ); | ||
| } | ||
|
|
||
|
|
||
| struct viewKeyStruct : public PermeabilityBase::viewKeyStruct | ||
| { | ||
| static constexpr char const * dPerm_dPorosityString() { return "dPerm_dPorosity"; } | ||
| static constexpr char const * particleDiameterString() { return "particleDiameter"; } | ||
| static constexpr char const * sphericityString() { return "sphericity"; } | ||
| } viewKeys; | ||
|
|
||
| protected: | ||
| virtual void postProcessInput() override; | ||
|
|
||
| private: | ||
| /// dPermeability_dPorosity | ||
| array3d< real64 > m_dPerm_dPorosity; | ||
|
|
||
| /// Particle diameter | ||
| real64 m_particleDiameter; | ||
|
|
||
| /// Sphericity of the particles | ||
| real64 m_sphericity; | ||
| }; | ||
|
|
||
|
|
||
| GEOSX_HOST_DEVICE | ||
| GEOSX_FORCE_INLINE | ||
| void CarmanKozenyPermeabilityUpdate::compute( real64 const & porosity, | ||
| arraySlice1d< real64 > const & permeability, | ||
| arraySlice1d< real64 > const & dPerm_dPorosity ) const | ||
| { | ||
| real64 const permValue = pow( m_sphericity*m_particleDiameter, 2 ) * pow( porosity, 3 ) | ||
| / (150 * pow( (1 - porosity), 2 ) ); | ||
| real64 const dPerm_dPorValue = pow( m_sphericity*m_particleDiameter, 2 ) * pow( porosity, 3 ); | ||
|
||
|
|
||
| for( localIndex i=0; i < permeability.size(); i++ ) | ||
| { | ||
| permeability[i] = permValue; | ||
| dPerm_dPorosity[i] = dPerm_dPorValue; | ||
| } | ||
| } | ||
|
|
||
|
|
||
|
|
||
| }/* namespace constitutive */ | ||
|
|
||
| } /* namespace geosx */ | ||
|
|
||
|
|
||
| #endif //GEOSX_CONSTITUTIVE_PERMEABILITY_FRACTUREPERMEABILITY_HPP_ | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I propose to use KozenyCarman instead of CarmanKozeny to make it more consistent with literature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think my Petrophysics professor always used CarmanKozeny and that 's why I am used to that but I am fine with changing it.