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

refactor: move contact into solidMechanics #3531

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
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 @@
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:

Check warning on line 254 in src/coreComponents/constitutive/contact/CoulombFriction.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/contact/CoulombFriction.hpp#L254

Added line #L254 was not covered by tests
{
// Elastic tangential deformation

Expand All @@ -263,7 +267,7 @@

break;
}
case fields::contact::FractureState::Slip:
case FractureState::Slip:

Check warning on line 270 in src/coreComponents/constitutive/contact/CoulombFriction.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/constitutive/contact/CoulombFriction.hpp#L270

Added line #L270 was not covered by tests
{
// Plastic tangential deformation

Expand Down Expand Up @@ -553,7 +557,6 @@
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 @@
setSizedFromParent( 0 );

string & frictionLawName = subRegion.getReference< string >( viewKeyStruct::frictionLawNameString() );
frictionLawName =PhysicsSolverBase::getConstitutiveName< FrictionBase >( subRegion );
frictionLawName = PhysicsSolverBase::getConstitutiveName< FrictionBase >( subRegion );

Check warning on line 90 in src/coreComponents/physicsSolvers/inducedSeismicity/SpringSlider.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/inducedSeismicity/SpringSlider.cpp#L90

Added line #L90 was not covered by tests
GEOS_ERROR_IF( frictionLawName.empty(), GEOS_FMT( "{}: FrictionBase model not found on subregion {}",
this->getDataContext(), subRegion.getDataContext() ) );
} );
Expand All @@ -113,11 +113,11 @@
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 >();

Check warning on line 118 in src/coreComponents/physicsSolvers/inducedSeismicity/SpringSlider.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/inducedSeismicity/SpringSlider.cpp#L116-L118

Added lines #L116 - L118 were not covered by tests

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

Check warning on line 120 in src/coreComponents/physicsSolvers/inducedSeismicity/SpringSlider.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/inducedSeismicity/SpringSlider.cpp#L120

Added line #L120 was not covered by tests


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 @@

// 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 @@
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 >();

Check warning on line 609 in src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanicsConformingFractures.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanicsConformingFractures.cpp#L609

Added line #L609 was not covered by tests

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

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 );

Check warning on line 625 in src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanicsConformingFractures.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanicsConformingFractures.cpp#L625

Added line #L625 was not covered by tests

// Accumulation derivative
if( isFractureOpen )
Expand Down Expand Up @@ -690,7 +691,7 @@
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 );

Check warning on line 694 in src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanicsConformingFractures.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanicsConformingFractures.cpp#L694

Added line #L694 was not covered by tests
skipAssembly &= !isOpen;

for( localIndex kf = 0; kf < 2; ++kf )
Expand Down Expand Up @@ -775,9 +776,9 @@
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 >();

Check warning on line 781 in src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanicsConformingFractures.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/MultiphasePoromechanicsConformingFractures.cpp#L779-L781

Added lines #L779 - L781 were not covered by tests

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 @@

// 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 @@
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 >();

Check warning on line 606 in src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp#L606

Added line #L606 was not covered by tests

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

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 );

Check warning on line 624 in src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp#L624

Added line #L624 was not covered by tests

// Accumulation derivative
if( isFractureOpen )
Expand Down Expand Up @@ -681,7 +682,7 @@
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 );

Check warning on line 685 in src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp#L685

Added line #L685 was not covered by tests
skipAssembly &= !isOpen;

for( localIndex kf=0; kf<2; ++kf )
Expand Down Expand Up @@ -762,9 +763,9 @@
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 >();

Check warning on line 768 in src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp#L766-L768

Added lines #L766 - L768 were not covered by tests

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