Skip to content
Merged
Show file tree
Hide file tree
Changes from 20 commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
f0dee83
Initial commit
CusiniM Jun 4, 2021
36f0a89
CoupleSolid design.
CusiniM Jun 8, 2021
7a717f4
Distinction between poro and compressible solids.
CusiniM Jun 8, 2021
6c39e6e
Should now work.
CusiniM Jun 8, 2021
214b101
biotCoefficientUpdate
CusiniM Jun 8, 2021
d68e4d5
getBulkModulus
CusiniM Jun 8, 2021
5fd36d0
First round of compilation errors.
CusiniM Jun 8, 2021
9588df7
more fixes
CusiniM Jun 8, 2021
6a78a07
REgister catalog porousSolid
CusiniM Jun 8, 2021
8376aa2
trying to understand compiling issues.
Jun 9, 2021
7dc9a8d
uncrustified and fixed all porosity issues. Still compilation error f…
Jun 9, 2021
1f07b96
fix missing namespace closeout
rrsettgast Jun 14, 2021
70ce545
It now builds.
CusiniM Jun 14, 2021
b16462e
Merge remote-tracking branch 'origin/develop' into cusini/feature/por…
CusiniM Jun 14, 2021
12e867f
adding damage models to passThrough
CusiniM Jun 15, 2021
6cc05db
fixed compilation errors.
CusiniM Jun 15, 2021
687d8df
adding permeability Models.
CusiniM Jun 15, 2021
78a9534
Register catalog of porous+damage
CusiniM Jun 16, 2021
3d95812
Addressed most of Thomas comments.
CusiniM Jun 17, 2021
d21f5eb
remove useless file
CusiniM Jun 17, 2021
9ccb04d
Adding perm to PorousSolid and small fixes based on reviews.
CusiniM Jun 17, 2021
829ef48
Permeability models added to Porous and Compressible solids.
CusiniM Jun 18, 2021
d2aaa7d
starting removal of poroealstic
CusiniM Jun 22, 2021
215991f
Merge remote-tracking branch 'origin/develop' into cusini/feature/por…
CusiniM Jun 22, 2021
13f375d
Mandel runs fine
CusiniM Jun 23, 2021
81b2241
got back the PoroElastic
CusiniM Jun 23, 2021
6b2d1fe
Use permeability from constitutive model everywhere.
CusiniM Jun 29, 2021
ace16f4
Merge remote-tracking branch 'origin/develop' into cusini/feature/por…
CusiniM Jun 29, 2021
21029f1
rst files
Jun 29, 2021
cadc45e
Merge branch 'cusini/feature/porousSolidModel' of github.com:GEOSX/GE…
Jun 30, 2021
054e7e4
Modified all xml files.
CusiniM Jul 8, 2021
c3ca4b8
Usage of ConstitutivePassThruHandler
CusiniM Jul 8, 2021
a6db464
Merge remote-tracking branch 'origin/develop' into cusini/feature/por…
CusiniM Jul 8, 2021
99962aa
rst files
Jul 9, 2021
42641c3
Merge branch 'cusini/feature/porousSolidModel' of github.com:GEOSX/GE…
Jul 9, 2021
cfa5233
fixed some more xml files.
CusiniM Jul 9, 2021
3aad2b0
Merge branch 'cusini/feature/porousSolidModel' of github.com:GEOSX/GE…
Jul 9, 2021
81d7ccf
rst files fixed
Jul 9, 2021
111e7e6
fixes to xmls.
CusiniM Jul 9, 2021
367ab49
should have fixed all integratedTests xmls.
CusiniM Jul 9, 2021
d5c0b24
fixed a few xmls.
CusiniM Jul 9, 2021
f8eb741
fixed xmls + unit tests. Still need to fix wells.
CusiniM Jul 10, 2021
2ac003f
fixed multiphasePoro + xmls in examples
CusiniM Jul 12, 2021
72fd0f4
hopefully last xmls.
CusiniM Jul 12, 2021
3d8d521
Fixing use of porosity in acc term + fixing xml files for poroelastic…
CusiniM Jul 13, 2021
f8e152d
Merge remote-tracking branch 'origin/develop' into cusini/feature/por…
CusiniM Jul 13, 2021
49a5700
porosity initializaiton works fine. Poroelastic cases match perfectly.
CusiniM Jul 15, 2021
2c864ba
fixed compilation error.
Jul 16, 2021
cf03d46
fixed coeffModelNames issue.
Jul 19, 2021
3bbf0e0
Merge remote-tracking branch 'origin/develop' into cusini/feature/por…
Jul 19, 2021
7e34d46
integrated tests can all run apart from poroelastic_embedded.
Jul 19, 2021
69cdc1e
fix travis failures.
CusiniM Jul 20, 2021
23bc5be
fixed vncc error. Added comp=-1 to porosity field spec.
Jul 20, 2021
28a9cf5
passing integrated tests. Update of submodule tag.
Jul 21, 2021
eff7146
update integrated tests tag.
Jul 21, 2021
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 host-configs/darwin-clang.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ set(ENABLE_GEOSX_PTP ON CACHE BOOL "" FORCE)

set(GEOSX_TPL_DIR "/usr/local/GEOSX/GEOSX_TPL" CACHE PATH "" FORCE )
if(NOT ( EXISTS "${GEOSX_TPL_DIR}" AND IS_DIRECTORY "${GEOSX_TPL_DIR}" ) )
set(GEOSX_TPL_DIR "../../thirdPartyLibs/install-darwin-clang-release" CACHE PATH "" FORCE )
set(GEOSX_TPL_DIR "../../../thirdPartyLibs/install-darwin-clang-release" CACHE PATH "" FORCE )
endif()

include(${CMAKE_CURRENT_LIST_DIR}/tpls.cmake)
13 changes: 12 additions & 1 deletion src/coreComponents/constitutive/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ set( constitutive_headers
fluid/ProppantSlurryFluid.hpp
fluid/ParticleFluidBase.hpp
fluid/particleFluidSelector.hpp
solid/CompressibleSolid.hpp
solid/CoupledSolid.hpp
solid/Damage.hpp
solid/DamageVolDev.hpp
solid/DamageSpectral.hpp
Expand All @@ -44,13 +46,17 @@ set( constitutive_headers
solid/ElasticTransverseIsotropic.hpp
solid/PoroElastic.hpp
solid/PoreVolumeCompressibleSolid.hpp
solid/PorousSolid.hpp
solid/PropertyConversions.hpp
solid/SolidBase.hpp
solid/SolidModelDiscretizationOps.hpp
solid/SolidModelDiscretizationOpsFullyAnisotroipic.hpp
solid/SolidModelDiscretizationOpsIsotropic.hpp
solid/SolidModelDiscretizationOpsTransverseIsotropic.hpp
solid/TriaxialDriver.hpp
solid/porosity/BiotPorosity.hpp
solid/porosity/PorosityBase.hpp
solid/porosity/PressurePorosity.hpp
relativePermeability/RelativePermeabilityBase.hpp
relativePermeability/BrooksCoreyRelativePermeability.hpp
relativePermeability/BrooksCoreyBakerRelativePermeability.hpp
Expand Down Expand Up @@ -88,7 +94,8 @@ set( constitutive_sources
fluid/SlurryFluidBase.cpp
fluid/ProppantSlurryFluid.cpp
fluid/ParticleFluidBase.cpp
fluid/ParticleFluid.cpp
fluid/ParticleFluid.cpp
solid/CompressibleSolid.cpp
solid/Damage.cpp
solid/DamageVolDev.cpp
solid/DamageSpectral.cpp
Expand All @@ -98,8 +105,12 @@ set( constitutive_sources
solid/ElasticTransverseIsotropic.cpp
solid/PoroElastic.cpp
solid/PoreVolumeCompressibleSolid.cpp
solid/PorousSolid.cpp
solid/SolidBase.cpp
solid/TriaxialDriver.cpp
solid/porosity/BiotPorosity.cpp
solid/porosity/PorosityBase.cpp
solid/porosity/PressurePorosity.cpp
relativePermeability/RelativePermeabilityBase.cpp
relativePermeability/BrooksCoreyRelativePermeability.cpp
relativePermeability/BrooksCoreyBakerRelativePermeability.cpp
Expand Down
49 changes: 49 additions & 0 deletions src/coreComponents/constitutive/ConstitutivePassThru.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
#include "solid/ElasticIsotropic.hpp"
#include "solid/ElasticTransverseIsotropic.hpp"
#include "solid/PoroElastic.hpp"
#include "solid/PorousSolid.hpp"

namespace geosx
{
Expand Down Expand Up @@ -190,6 +191,54 @@ struct ConstitutivePassThru< DamageBase >
}
};


/**
* Specialization for the PorousSolid models.
*/
template<>
struct ConstitutivePassThru< PorousSolidBase >
{
template< typename LAMBDA >
static void execute( ConstitutiveBase & constitutiveRelation, LAMBDA && lambda )
{
if( auto * const ptr1 = dynamic_cast< PorousSolid< DruckerPragerExtended > * >( &constitutiveRelation ) )
{
lambda( *ptr1 );
}
else if( auto * const ptr2 = dynamic_cast< PorousSolid< DruckerPrager > * >( &constitutiveRelation ) )
{
lambda( *ptr2 );
}
else if( auto * const ptr3 = dynamic_cast< PorousSolid< ElasticIsotropic > * >( &constitutiveRelation ) )
{
lambda( *ptr3 );
}
else if( auto * const ptr4 = dynamic_cast< PorousSolid< ElasticTransverseIsotropic > * >( &constitutiveRelation ) )
{
lambda( *ptr4 );
}
else if( auto * const ptr5 = dynamic_cast< PorousSolid< DamageSpectral< ElasticIsotropic > > * >( &constitutiveRelation ) )
{
lambda( *ptr5 );
}
else if( auto * const ptr6 = dynamic_cast< PorousSolid< DamageVolDev< ElasticIsotropic > > * >( &constitutiveRelation ) )
{
lambda( *ptr6 );
}
else if( auto * const ptr7 = dynamic_cast< PorousSolid< Damage< ElasticIsotropic > > * >( &constitutiveRelation ) )
{
lambda( *ptr7 );
}
else
{
GEOSX_ERROR( "ConstitutivePassThru< PorousSolidBase >::execute failed. The constitutive relation is named "
<< constitutiveRelation.getName() << " with type "
<< LvArray::system::demangleType( constitutiveRelation ) );
}
}
};


}
}

Expand Down
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
Copy link
Contributor

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.

Copy link
Collaborator Author

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.

{
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;
Copy link
Contributor

Choose a reason for hiding this comment

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

We should define a macro for this. This pattern is reproduced quite a lot.

Copy link
Contributor

@klevzoff klevzoff Jun 16, 2021

Choose a reason for hiding this comment

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

I'm actually deleting these in all fluid models in another PR. There is no real reason to disallow assignment for update classes (not that anyone ever does it), rule of 0 works just fine.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Should I start getting rid of them as well?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I'd recommend at least not adding them to new code. We have enough boilerplate as it is :)


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;

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 );
Copy link
Contributor

Choose a reason for hiding this comment

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

This derivative sounds not correct.

Copy link
Contributor

@sytuannguyen sytuannguyen Jun 25, 2021

Choose a reason for hiding this comment

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

Also, it is well-known that Kozeny-Carman is not relevant for rock. We may want to increase a little bit the bottom line by considering for example a relevant adaptation of Kozeny-Carman theory for rock by Mavko and Nur 1997 in Geophysics?


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_
Loading