Skip to content

Commit

Permalink
Merge branch 'develop' into rasimhz/zformulation
Browse files Browse the repository at this point in the history
  • Loading branch information
paveltomin authored Feb 7, 2025
2 parents 9436e7c + b326384 commit d159b72
Show file tree
Hide file tree
Showing 57 changed files with 261 additions and 196 deletions.
9 changes: 6 additions & 3 deletions src/coreComponents/constitutive/contact/CoulombFriction.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
#define GEOS_CONSTITUTIVE_CONTACT_COULOMBFRICTION_HPP_

#include "FrictionBase.hpp"
#include "physicsSolvers/solidMechanics/contact/FractureState.hpp"
#include "LvArray/src/tensorOps.hpp"

namespace geos
{
Expand Down Expand Up @@ -241,13 +243,15 @@ inline void CoulombFrictionUpdates::computeShearTraction( localIndex const k,
arraySlice1d< real64 > const & tractionVector,
arraySlice2d< real64 > const & dTractionVector_dJump ) const
{
using namespace fields::contact;

// Compute the slip
real64 const slip[2] = { dispJump[1] - oldDispJump[1],
dispJump[2] - oldDispJump[2] };

switch( fractureState )
{
case fields::contact::FractureState::Stick:
case FractureState::Stick:
{
// Elastic tangential deformation

Expand All @@ -263,7 +267,7 @@ inline void CoulombFrictionUpdates::computeShearTraction( localIndex const k,

break;
}
case fields::contact::FractureState::Slip:
case FractureState::Slip:
{
// Plastic tangential deformation

Expand Down Expand Up @@ -553,7 +557,6 @@ inline void CoulombFrictionUpdates::constraintCheck( arraySlice1d< real64 const
real64 const slidingCheckTolerance,
integer & condConv ) const
{

using namespace fields::contact;

// Compute the slip
Expand Down
2 changes: 0 additions & 2 deletions src/coreComponents/constitutive/contact/FrictionBase.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
#define GEOS_CONSTITUTIVE_CONTACT_FRICTIONBASE_HPP_

#include "constitutive/ConstitutiveBase.hpp"
#include "functions/TableFunction.hpp"
#include "physicsSolvers/contact/ContactFields.hpp"


namespace geos
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#define GEOS_CONSTITUTIVE_CONTACT_FRICTIONLESSCONTACT_HPP_

#include "constitutive/contact/FrictionBase.hpp"
#include "physicsSolvers/solidMechanics/contact/FractureState.hpp"

namespace geos
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,6 @@
#define GEOS_CONSTITUTIVE_CONTACT_HYDRAULICAPERTUREBASE_HPP_

#include "constitutive/ConstitutiveBase.hpp"
#include "functions/TableFunction.hpp"
#include "physicsSolvers/contact/ContactFields.hpp"


namespace geos
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#define GEOS_CONSTITUTIVE_CONTACT_RATEANDSTATEFRICTION_HPP_

#include "FrictionBase.hpp"
#include "physicsSolvers/solidMechanics/contact/FractureState.hpp"

namespace geos
{
Expand Down
4 changes: 0 additions & 4 deletions src/coreComponents/physicsSolvers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,6 @@ set( physicsSolvers_sources
PhysicsSolverBase.cpp
SolverStatistics.cpp )

if( GEOS_ENABLE_CONTACT )
add_subdirectory( contact )
endif()

if( GEOS_ENABLE_FLUIDFLOW )
add_subdirectory( fluidFlow )
endif()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "mesh/DomainPartition.hpp"
#include "kernels/ExplicitRateAndStateKernels.hpp"
#include "rateAndStateFields.hpp"
#include "physicsSolvers/contact/ContactFields.hpp"
#include "physicsSolvers/solidMechanics/contact/ContactFields.hpp"
#include "fieldSpecification/FieldSpecificationManager.hpp"

namespace geos
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include "mesh/DomainPartition.hpp"
#include "kernels/ImplicitRateAndStateKernels.hpp"
#include "rateAndStateFields.hpp"
#include "physicsSolvers/contact/ContactFields.hpp"
#include "physicsSolvers/solidMechanics/contact/ContactFields.hpp"


namespace geos
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "dataRepository/InputFlags.hpp"
#include "mesh/DomainPartition.hpp"
#include "rateAndStateFields.hpp"
#include "physicsSolvers/contact/ContactFields.hpp"
#include "physicsSolvers/solidMechanics/contact/ContactFields.hpp"
#include "fieldSpecification/FieldSpecificationManager.hpp"
#include "constitutive/contact/RateAndStateFriction.hpp"
#include "kernels/RateAndStateKernelsBase.hpp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "dataRepository/InputFlags.hpp"
#include "mesh/DomainPartition.hpp"
#include "rateAndStateFields.hpp"
#include "physicsSolvers/contact/ContactFields.hpp"
#include "physicsSolvers/solidMechanics/contact/ContactFields.hpp"
#include "fieldSpecification/FieldSpecificationManager.hpp"
#include "physicsSolvers/fluidFlow/FlowSolverBaseFields.hpp"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#include "dataRepository/InputFlags.hpp"
#include "mesh/DomainPartition.hpp"
#include "rateAndStateFields.hpp"
#include "physicsSolvers/contact/ContactFields.hpp"
#include "physicsSolvers/solidMechanics/contact/ContactFields.hpp"
#include "fieldSpecification/FieldSpecificationManager.hpp"
#include "constitutive/contact/RateAndStateFriction.hpp"
#include "ExplicitQDRateAndState.hpp"
Expand Down Expand Up @@ -87,7 +87,7 @@ void SpringSlider< RSSOLVER_TYPE >::registerDataOnMesh( Group & meshBodies )
setSizedFromParent( 0 );

string & frictionLawName = subRegion.getReference< string >( viewKeyStruct::frictionLawNameString() );
frictionLawName =PhysicsSolverBase::getConstitutiveName< FrictionBase >( subRegion );
frictionLawName = PhysicsSolverBase::getConstitutiveName< FrictionBase >( subRegion );
GEOS_ERROR_IF( frictionLawName.empty(), GEOS_FMT( "{}: FrictionBase model not found on subregion {}",
this->getDataContext(), subRegion.getDataContext() ) );
} );
Expand All @@ -113,11 +113,11 @@ real64 SpringSlider< RSSOLVER_TYPE >::updateStresses( real64 const & time_n,
SurfaceElementSubRegion & subRegion )
{

arrayView2d< real64 const > const deltaSlip = subRegion.getField< fields::contact::deltaSlip >();
arrayView2d< real64 > const shearTraction = subRegion.getField< fields::rateAndState::shearTraction >();
arrayView2d< real64 > const shearTraction_n = subRegion.getField< fields::rateAndState::shearTraction_n >();
arrayView2d< real64 const > const deltaSlip = subRegion.getField< contact::deltaSlip >();
arrayView2d< real64 > const shearTraction = subRegion.getField< rateAndState::shearTraction >();
arrayView2d< real64 > const shearTraction_n = subRegion.getField< rateAndState::shearTraction_n >();

arrayView1d< real64 > const normalTraction = subRegion.getField< fields::rateAndState::normalTraction >();
arrayView1d< real64 > const normalTraction = subRegion.getField< rateAndState::normalTraction >();


string const & fricitonLawName = subRegion.template getReference< string >( viewKeyStruct::frictionLawNameString() );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

#include "RateAndStateKernelsBase.hpp"
#include "denseLinearAlgebra/denseLASolvers.hpp"
#include "physicsSolvers/solidMechanics/contact/ContactFields.hpp"

namespace geos
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
#include "physicsSolvers/solidMechanics/SolidMechanicsFields.hpp"
#include "physicsSolvers/solidMechanics/SolidMechanicsLagrangianFEM.hpp"
#include "physicsSolvers/solidMechanics/kernels/ImplicitSmallStrainQuasiStatic.hpp"
#include "physicsSolvers/contact/SolidMechanicsLagrangeContact.hpp"
//#include "physicsSolvers/contact/SolidMechanicsEmbeddedFractures.hpp"
#include "physicsSolvers/solidMechanics/contact/SolidMechanicsLagrangeContact.hpp"
//#include "physicsSolvers/solidMechanics/contact/SolidMechanicsEmbeddedFractures.hpp"

namespace geos
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "physicsSolvers/multiphysics/poromechanicsKernels/SinglePhasePoromechanicsFractures.hpp"
#include "finiteVolume/FluxApproximationBase.hpp"
#include "constitutive/fluid/multifluid/MultiFluidBase.hpp"
#include "physicsSolvers/solidMechanics/contact/ContactFields.hpp"

namespace geos
{
Expand Down Expand Up @@ -67,7 +68,7 @@ void MultiphasePoromechanicsConformingFractures< FLOW_SOLVER >::setupCoupling( D

// 2. Traction - pressure coupling in the fracture
dofManager.addCoupling( m_flowDofKey,
fields::contact::traction::key(),
contact::traction::key(),
DofManager::Connector::Elem );
}

Expand Down Expand Up @@ -605,7 +606,7 @@ assembleFluidMassResidualDerivativeWrtDisplacement( MeshLevel const & mesh,
arrayView2d< localIndex const > const & elemsToFaces = subRegion.faceList().toViewConst();
arrayView1d< real64 const > const & area = subRegion.getElementArea().toViewConst();

arrayView1d< integer const > const & fractureState = subRegion.getField< fields::contact::fractureState >();
arrayView1d< integer const > const & fractureState = subRegion.getField< contact::fractureState >();

forAll< serialPolicy >( subRegion.size(), [&]( localIndex const kfe )
{
Expand All @@ -621,7 +622,7 @@ assembleFluidMassResidualDerivativeWrtDisplacement( MeshLevel const & mesh,

stackArray2d< real64, 2*3*m_maxFaceNodes * MultiFluidBase::MAX_NUM_COMPONENTS > dRdU( MultiFluidBase::MAX_NUM_COMPONENTS, 2*3*m_maxFaceNodes );

bool const isFractureOpen = ( fractureState[kfe] == fields::contact::FractureState::Open );
bool const isFractureOpen = ( fractureState[kfe] == contact::FractureState::Open );

// Accumulation derivative
if( isFractureOpen )
Expand Down Expand Up @@ -690,7 +691,7 @@ assembleFluidMassResidualDerivativeWrtDisplacement( MeshLevel const & mesh,
real64 const dR_dAper = values[kfe1];
localIndex const kfe2 = columns[kfe1];

bool const isOpen = ( fractureState[kfe2] == fields::contact::FractureState::Open );
bool const isOpen = ( fractureState[kfe2] == contact::FractureState::Open );
skipAssembly &= !isOpen;

for( localIndex kf = 0; kf < 2; ++kf )
Expand Down Expand Up @@ -775,9 +776,9 @@ void MultiphasePoromechanicsConformingFractures< FLOW_SOLVER >::updateHydraulicA
arrayView2d< real64 const > const dispJump = subRegion.getField< contact::dispJump >();
arrayView1d< real64 const > const area = subRegion.getElementArea();
arrayView1d< real64 const > const volume = subRegion.getElementVolume();
arrayView2d< real64 const > const fractureTraction = subRegion.getField< fields::contact::traction >();
arrayView1d< real64 const > const pressure = subRegion.getField< fields::flow::pressure >();
arrayView1d< real64 const > const oldHydraulicAperture = subRegion.getField< fields::flow::aperture0 >();
arrayView2d< real64 const > const fractureTraction = subRegion.getField< contact::traction >();
arrayView1d< real64 const > const pressure = subRegion.getField< flow::pressure >();
arrayView1d< real64 const > const oldHydraulicAperture = subRegion.getField< flow::aperture0 >();

arrayView1d< real64 > const aperture = subRegion.getElementAperture();
arrayView1d< real64 > const hydraulicAperture = subRegion.getField< flow::hydraulicAperture >();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#define GEOS_PHYSICSSOLVERS_MULTIPHYSICS_MULTIPHASEPOROMECHANICSCONFORMINGFRACTURES_HPP_

#include "physicsSolvers/multiphysics/MultiphasePoromechanics.hpp"
#include "physicsSolvers/contact/SolidMechanicsLagrangeContact.hpp"
#include "physicsSolvers/solidMechanics/contact/SolidMechanicsLagrangeContact.hpp"

namespace geos
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

#include "OneWayCoupledFractureFlowContactMechanics.hpp"
#include "physicsSolvers/contact/ContactFields.hpp"
#include "physicsSolvers/solidMechanics/contact/ContactFields.hpp"
#include "physicsSolvers/fluidFlow/FlowSolverBaseFields.hpp"
#include "mesh/DomainPartition.hpp"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
#define GEOS_PHYSICSSOLVERS_MULTIPHYSICS_ONEWAYCOUPLEDFRACTUREFLOWCONTACTMECHANICS_HPP_

#include "physicsSolvers/multiphysics/CoupledSolver.hpp"
#include "physicsSolvers/contact/SolidMechanicsLagrangeContactBubbleStab.hpp"
#include "physicsSolvers/fluidFlow/SinglePhaseBase.hpp"
#include "physicsSolvers/solidMechanics/contact/SolidMechanicsLagrangeContactBubbleStab.hpp"
#include "dataRepository/Group.hpp"

namespace geos
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@
#include "physicsSolvers/solidMechanics/SolidMechanicsFields.hpp"
#include "physicsSolvers/solidMechanics/SolidMechanicsLagrangianFEM.hpp"
#include "physicsSolvers/solidMechanics/kernels/ImplicitSmallStrainQuasiStatic.hpp"
#include "physicsSolvers/contact/SolidMechanicsLagrangeContact.hpp"
#include "physicsSolvers/contact/SolidMechanicsEmbeddedFractures.hpp"
#include "physicsSolvers/solidMechanics/contact/SolidMechanicsLagrangeContact.hpp"
#include "physicsSolvers/solidMechanics/contact/SolidMechanicsEmbeddedFractures.hpp"
#include "physicsSolvers/fluidFlow/SinglePhaseHybridFVM.hpp"

namespace geos
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#include "physicsSolvers/multiphysics/poromechanicsKernels/SinglePhasePoromechanicsFractures.hpp"
#include "physicsSolvers/solidMechanics/SolidMechanicsFields.hpp"
#include "physicsSolvers/solidMechanics/SolidMechanicsLagrangianFEM.hpp"
#include "physicsSolvers/solidMechanics/contact/ContactFields.hpp"
#include "finiteVolume/FluxApproximationBase.hpp"

namespace geos
Expand Down Expand Up @@ -72,7 +73,7 @@ void SinglePhasePoromechanicsConformingFractures< FLOW_SOLVER >::setupCoupling(

// 2. Traction - pressure coupling in the fracture
dofManager.addCoupling( SinglePhaseBase::viewKeyStruct::elemDofFieldString(),
fields::contact::traction::key(),
contact::traction::key(),
DofManager::Connector::Elem );
}

Expand Down Expand Up @@ -602,7 +603,7 @@ assembleFluidMassResidualDerivativeWrtDisplacement( MeshLevel const & mesh,
arrayView2d< localIndex const > const & elemsToFaces = subRegion.faceList().toViewConst();
arrayView1d< real64 const > const & area = subRegion.getElementArea().toViewConst();

arrayView1d< integer const > const & fractureState = subRegion.getField< fields::contact::fractureState >();
arrayView1d< integer const > const & fractureState = subRegion.getField< contact::fractureState >();

forAll< serialPolicy >( subRegion.size(), [&]( localIndex const kfe )
{
Expand All @@ -620,7 +621,7 @@ assembleFluidMassResidualDerivativeWrtDisplacement( MeshLevel const & mesh,

stackArray1d< real64, 2*3*m_maxFaceNodes > dRdU( 2*3*m_maxFaceNodes );

bool const isFractureOpen = ( fractureState[kfe] == fields::contact::FractureState::Open );
bool const isFractureOpen = ( fractureState[kfe] == contact::FractureState::Open );

// Accumulation derivative
if( isFractureOpen )
Expand Down Expand Up @@ -681,7 +682,7 @@ assembleFluidMassResidualDerivativeWrtDisplacement( MeshLevel const & mesh,
real64 const dR_dAper = values[kfe1];
localIndex const kfe2 = columns[kfe1];

bool const isOpen = ( fractureState[kfe2] == fields::contact::FractureState::Open );
bool const isOpen = ( fractureState[kfe2] == contact::FractureState::Open );
skipAssembly &= !isOpen;

for( localIndex kf=0; kf<2; ++kf )
Expand Down Expand Up @@ -762,9 +763,9 @@ void SinglePhasePoromechanicsConformingFractures< FLOW_SOLVER >::updateHydraulic
arrayView2d< real64 const > const dispJump = subRegion.getField< contact::dispJump >();
arrayView1d< real64 const > const area = subRegion.getElementArea();
arrayView1d< real64 const > const volume = subRegion.getElementVolume();
arrayView2d< real64 const > const fractureTraction = subRegion.getField< fields::contact::traction >();
arrayView1d< real64 const > const pressure = subRegion.getField< fields::flow::pressure >();
arrayView1d< real64 const > const oldHydraulicAperture = subRegion.getField< fields::flow::aperture0 >();
arrayView2d< real64 const > const fractureTraction = subRegion.getField< contact::traction >();
arrayView1d< real64 const > const pressure = subRegion.getField< flow::pressure >();
arrayView1d< real64 const > const oldHydraulicAperture = subRegion.getField< flow::aperture0 >();

arrayView1d< real64 > const aperture = subRegion.getElementAperture();
arrayView1d< real64 > const hydraulicAperture = subRegion.getField< flow::hydraulicAperture >();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#define GEOS_PHYSICSSOLVERS_MULTIPHYSICS_SINGLEPHASEPOROMECHANICSCONFORMINGFRACTURES_HPP_

#include "physicsSolvers/multiphysics/SinglePhasePoromechanics.hpp"
#include "physicsSolvers/contact/SolidMechanicsLagrangeContact.hpp"
#include "physicsSolvers/solidMechanics/contact/SolidMechanicsLagrangeContact.hpp"

namespace geos
{
Expand Down
Loading

0 comments on commit d159b72

Please sign in to comment.