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

fix: Use aperture table in poromechanics with conforming fractures #3194

Merged
merged 34 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
adbd3c2
decouple debug matrix output from logLevel
Jun 21, 2024
c036976
Merge remote-tracking branch 'origin/develop' into pt/write-matrix
Jun 21, 2024
65fa11a
victor's suggestions
Jun 21, 2024
ffea8de
debug contact
Jun 27, 2024
06c5d84
Merge branch 'develop' into pt/debug-contact
paveltomin Jun 28, 2024
d7df1f0
code style and remove debug
Jun 28, 2024
1ba9393
Update SolidMechanicsLagrangeContact.cpp
paveltomin Jun 28, 2024
194602b
Update SinglePhasePoromechanicsConformingFractures.cpp
paveltomin Jun 28, 2024
2950eaa
Update SolidMechanicsLagrangeContact.cpp
paveltomin Jun 28, 2024
c678634
fix build
Jun 28, 2024
f244566
Merge branch 'develop' into pt/debug-contact
paveltomin Jul 2, 2024
7577b5d
last update
Jul 2, 2024
3da4a7e
fix
Jul 2, 2024
ce6c22f
Merge branch 'develop' into pt/debug-contact
paveltomin Jul 2, 2024
8bf8e02
Merge branch 'develop' into pt/debug-contact
paveltomin Jul 3, 2024
dd88474
fix
Jul 3, 2024
1a0347c
Merge branch 'pt/debug-contact' of https://github.com/GEOS-DEV/GEOS i…
Jul 3, 2024
dcf2308
build fix
Jul 3, 2024
5f22591
fix edfm
Jul 3, 2024
d9b7330
revert and try another way
Jul 4, 2024
d5ddb7f
build fix
Jul 5, 2024
b12f753
this should work
Jul 5, 2024
47e17f1
Update SurfaceElementSubRegion.hpp
paveltomin Jul 5, 2024
8c7a8d6
one last try
Jul 5, 2024
90923b9
Merge branch 'pt/debug-contact' of https://github.com/GEOS-DEV/GEOS i…
Jul 5, 2024
fa97b6a
revert and give up
Jul 5, 2024
3839b4a
Update SinglePhaseBase.cpp
paveltomin Jul 5, 2024
45b2ca0
Update SinglePhaseBase.cpp
paveltomin Jul 5, 2024
17dc67e
revert
Jul 5, 2024
3b5fc93
Merge branch 'pt/debug-contact' of https://github.com/GEOS-DEV/GEOS i…
Jul 5, 2024
cae43ba
Update HydrofractureSolver.cpp
paveltomin Jul 5, 2024
e5ba0ce
Merge branch 'develop' into pt/debug-contact
paveltomin Jul 10, 2024
07a4d1d
Update .integrated_tests.yaml
paveltomin Jul 10, 2024
59f42d2
Update BASELINE_NOTES.md
paveltomin Jul 10, 2024
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
32 changes: 20 additions & 12 deletions src/coreComponents/physicsSolvers/contact/ContactSolverBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,19 +122,20 @@

void ContactSolverBase::computeFractureStateStatistics( MeshLevel const & mesh,
globalIndex & numStick,
globalIndex & numNewSlip,
globalIndex & numSlip,
globalIndex & numOpen ) const
{
ElementRegionManager const & elemManager = mesh.getElemManager();

array1d< globalIndex > localCounter( 3 );
array1d< globalIndex > localCounter( 4 );

Check warning on line 131 in src/coreComponents/physicsSolvers/contact/ContactSolverBase.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/ContactSolverBase.cpp#L131

Added line #L131 was not covered by tests

elemManager.forElementSubRegions< SurfaceElementSubRegion >( [&]( SurfaceElementSubRegion const & subRegion )
{
arrayView1d< integer const > const & ghostRank = subRegion.ghostRank();
arrayView1d< integer const > const & fractureState = subRegion.getField< fields::contact::fractureState >();

RAJA::ReduceSum< parallelHostReduce, localIndex > stickCount( 0 ), slipCount( 0 ), openCount( 0 );
RAJA::ReduceSum< parallelHostReduce, localIndex > stickCount( 0 ), newSlipCount( 0 ), slipCount( 0 ), openCount( 0 );

Check warning on line 138 in src/coreComponents/physicsSolvers/contact/ContactSolverBase.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/ContactSolverBase.cpp#L138

Added line #L138 was not covered by tests
forAll< parallelHostPolicy >( subRegion.size(), [=] ( localIndex const kfe )
{
if( ghostRank[kfe] < 0 )
Expand All @@ -147,6 +148,10 @@
break;
}
case FractureState::NewSlip:
{
newSlipCount += 1;
break;

Check warning on line 153 in src/coreComponents/physicsSolvers/contact/ContactSolverBase.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/ContactSolverBase.cpp#L152-L153

Added lines #L152 - L153 were not covered by tests
}
case FractureState::Slip:
{
slipCount += 1;
Expand All @@ -162,40 +167,43 @@
} );

localCounter[0] += stickCount.get();
localCounter[1] += slipCount.get();
localCounter[2] += openCount.get();
localCounter[1] += newSlipCount.get();
localCounter[2] += slipCount.get();
localCounter[3] += openCount.get();

Check warning on line 172 in src/coreComponents/physicsSolvers/contact/ContactSolverBase.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/ContactSolverBase.cpp#L170-L172

Added lines #L170 - L172 were not covered by tests
} );

array1d< globalIndex > totalCounter( 3 );
array1d< globalIndex > totalCounter( 4 );

Check warning on line 175 in src/coreComponents/physicsSolvers/contact/ContactSolverBase.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/ContactSolverBase.cpp#L175

Added line #L175 was not covered by tests

MpiWrapper::allReduce( localCounter.data(),
totalCounter.data(),
3,
4,
MPI_SUM,
MPI_COMM_GEOSX );

numStick = totalCounter[0];
numSlip = totalCounter[1];
numOpen = totalCounter[2];
numStick = totalCounter[0];
numNewSlip = totalCounter[1];
numSlip = totalCounter[2];
numOpen = totalCounter[3];

Check warning on line 186 in src/coreComponents/physicsSolvers/contact/ContactSolverBase.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/ContactSolverBase.cpp#L183-L186

Added lines #L183 - L186 were not covered by tests
}

void ContactSolverBase::outputConfigurationStatistics( DomainPartition const & domain ) const
{
if( getLogLevel() >=1 )
{
globalIndex numStick = 0;
globalIndex numNewSlip = 0;

Check warning on line 194 in src/coreComponents/physicsSolvers/contact/ContactSolverBase.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/ContactSolverBase.cpp#L194

Added line #L194 was not covered by tests
globalIndex numSlip = 0;
globalIndex numOpen = 0;

forDiscretizationOnMeshTargets( domain.getMeshBodies(), [&]( string const &,
MeshLevel const & mesh,
arrayView1d< string const > const & )
{
computeFractureStateStatistics( mesh, numStick, numSlip, numOpen );
computeFractureStateStatistics( mesh, numStick, numNewSlip, numSlip, numOpen );

Check warning on line 202 in src/coreComponents/physicsSolvers/contact/ContactSolverBase.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/ContactSolverBase.cpp#L202

Added line #L202 was not covered by tests

GEOS_LOG_RANK_0( GEOS_FMT( " Number of element for each fracture state:"
" stick: {:12} | slip: {:12} | open: {:12}",
numStick, numSlip, numOpen ) );
" stick: {:12} | new slip: {:12} | slip: {:12} | open: {:12}",
numStick, numNewSlip, numSlip, numOpen ) );
} );
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class ContactSolverBase : public SolidMechanicsLagrangianFEM

void computeFractureStateStatistics( MeshLevel const & mesh,
globalIndex & numStick,
globalIndex & numNewSlip,
globalIndex & numSlip,
globalIndex & numOpen ) const;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -406,8 +406,8 @@
forAll< POLICY >( size, [=] GEOS_HOST_DEVICE ( localIndex const k )
{

localIndex const & f0 = elemsToFaces[k][0];
localIndex const & f1 = elemsToFaces[k][1];
localIndex const f0 = elemsToFaces[k][0];
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is just to avoid gcc warnings

localIndex const f1 = elemsToFaces[k][1];

Check warning on line 410 in src/coreComponents/physicsSolvers/contact/SolidMechanicsALMKernels.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsALMKernels.hpp#L409-L410

Added lines #L409 - L410 were not covered by tests

real64 Nbar[3];
Nbar[0] = faceNormal[f0][0] - faceNormal[f1][0];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,13 @@
{
GEOS_MARK_FUNCTION;

real64 minNormalTractionTolerance( 1e10 );
real64 maxNormalTractionTolerance( -1e10 );
real64 minNormalDisplacementTolerance( 1e10 );
real64 maxNormalDisplacementTolerance( -1e10 );
real64 minSlidingTolerance( 1e10 );
real64 maxSlidingTolerance( -1e10 );

Check warning on line 260 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L255-L260

Added lines #L255 - L260 were not covered by tests

forDiscretizationOnMeshTargets( domain.getMeshBodies(), [&] ( string const &,
MeshLevel & mesh,
arrayView1d< string const > const & )
Expand Down Expand Up @@ -301,6 +308,13 @@
arrayView1d< real64 > const & slidingTolerance =
subRegion.getReference< array1d< real64 > >( viewKeyStruct::slidingToleranceString() );

RAJA::ReduceMin< ReducePolicy< parallelHostPolicy >, real64 > minSubRegionNormalTractionTolerance( 1e10 );
RAJA::ReduceMax< ReducePolicy< parallelHostPolicy >, real64 > maxSubRegionNormalTractionTolerance( -1e10 );
RAJA::ReduceMin< ReducePolicy< parallelHostPolicy >, real64 > minSubRegionNormalDisplacementTolerance( 1e10 );
RAJA::ReduceMax< ReducePolicy< parallelHostPolicy >, real64 > maxSubRegionNormalDisplacementTolerance( -1e10 );
RAJA::ReduceMin< ReducePolicy< parallelHostPolicy >, real64 > minSubRegionSlidingTolerance( 1e10 );
RAJA::ReduceMax< ReducePolicy< parallelHostPolicy >, real64 > maxSubRegionSlidingTolerance( -1e10 );

Check warning on line 316 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L311-L316

Added lines #L311 - L316 were not covered by tests

forAll< parallelHostPolicy >( subRegion.size(), [=] ( localIndex const kfe )
{
if( ghostRank[kfe] < 0 )
Expand Down Expand Up @@ -384,15 +398,36 @@
LvArray::tensorOps::scale< 3, 3 >( rotatedInvStiffApprox, area );

// Finally, compute tolerances for the given fracture element

normalDisplacementTolerance[kfe] = rotatedInvStiffApprox[ 0 ][ 0 ] * averageYoungModulus / 2.e+7;
minSubRegionNormalDisplacementTolerance.min( normalDisplacementTolerance[kfe] );
maxSubRegionNormalDisplacementTolerance.max( normalDisplacementTolerance[kfe] );

Check warning on line 404 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L403-L404

Added lines #L403 - L404 were not covered by tests

slidingTolerance[kfe] = sqrt( rotatedInvStiffApprox[ 1 ][ 1 ] * rotatedInvStiffApprox[ 1 ][ 1 ] +
rotatedInvStiffApprox[ 2 ][ 2 ] * rotatedInvStiffApprox[ 2 ][ 2 ] ) * averageYoungModulus / 2.e+7;
minSubRegionSlidingTolerance.min( slidingTolerance[kfe] );
maxSubRegionSlidingTolerance.max( slidingTolerance[kfe] );

Check warning on line 409 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L408-L409

Added lines #L408 - L409 were not covered by tests

normalTractionTolerance[kfe] = 1.0 / 2.0 * averageConstrainedModulus / averageBoxSize0 * normalDisplacementTolerance[kfe];
minSubRegionNormalTractionTolerance.min( normalTractionTolerance[kfe] );
maxSubRegionNormalTractionTolerance.max( normalTractionTolerance[kfe] );

Check warning on line 413 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L412-L413

Added lines #L412 - L413 were not covered by tests
}
} );

minNormalDisplacementTolerance = std::min( minNormalDisplacementTolerance, minSubRegionNormalDisplacementTolerance.get() );
maxNormalDisplacementTolerance = std::max( maxNormalDisplacementTolerance, maxSubRegionNormalDisplacementTolerance.get() );
minSlidingTolerance = std::min( minSlidingTolerance, minSubRegionSlidingTolerance.get() );
maxSlidingTolerance = std::max( maxSlidingTolerance, maxSubRegionSlidingTolerance.get() );
minNormalTractionTolerance = std::min( minNormalTractionTolerance, minSubRegionNormalTractionTolerance.get() );
maxNormalTractionTolerance = std::max( maxNormalTractionTolerance, maxSubRegionNormalTractionTolerance.get() );

Check warning on line 422 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L417-L422

Added lines #L417 - L422 were not covered by tests
}
} );
} );

GEOS_LOG_LEVEL_RANK_0( 2, GEOS_FMT( "{}: normal displacement tolerance = [{}, {}], sliding tolerance = [{}, {}], normal traction tolerance = [{}, {}]",

Check warning on line 427 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L427

Added line #L427 was not covered by tests
this->getName(), minNormalDisplacementTolerance, maxNormalDisplacementTolerance,
minSlidingTolerance, maxSlidingTolerance,
minNormalTractionTolerance, maxNormalTractionTolerance ) );
}

void SolidMechanicsLagrangeContact::resetStateToBeginningOfStep( DomainPartition & domain )
Expand Down Expand Up @@ -562,7 +597,7 @@

assembleContact( domain, dofManager, localMatrix, localRhs );

// for sequenatial: add (fixed) pressure force contribution into residual (no derivatives)
// for sequential: add (fixed) pressure force contribution into residual (no derivatives)
if( m_isFixedStressPoromechanicsUpdate )
{
forDiscretizationOnMeshTargets( domain.getMeshBodies(), [&]( string const &,
Expand Down Expand Up @@ -1896,20 +1931,24 @@
if( ghostRank[kfe] < 0 )
{
integer const originalFractureState = fractureState[kfe];
if( originalFractureState == contact::FractureState::Open )
if( originalFractureState == FractureState::Open )

Check warning on line 1934 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L1934

Added line #L1934 was not covered by tests
{
if( dispJump[kfe][0] > -normalDisplacementTolerance[kfe] )
if( dispJump[kfe][0] <= -normalDisplacementTolerance[kfe] )

Check warning on line 1936 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L1936

Added line #L1936 was not covered by tests
{
fractureState[kfe] = contact::FractureState::Open;
}
else
{
fractureState[kfe] = contact::FractureState::Stick;
fractureState[kfe] = FractureState::Stick;
if( getLogLevel() >= 10 )
GEOS_LOG( GEOS_FMT( "{}: {} -> {}: dispJump = {}, normalDisplacementTolerance = {}",

Check warning on line 1940 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L1938-L1940

Added lines #L1938 - L1940 were not covered by tests
Copy link
Collaborator

Choose a reason for hiding this comment

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

it would be better to avoid this logging inside the cell loop.

kfe, originalFractureState, fractureState[kfe],
dispJump[kfe][0], normalDisplacementTolerance[kfe] ) );
}
}
else if( traction[kfe][0] > normalTractionTolerance[kfe] )
{
fractureState[kfe] = contact::FractureState::Open;
fractureState[kfe] = FractureState::Open;
if( getLogLevel() >= 10 )
GEOS_LOG( GEOS_FMT( "{}: {} -> {}: traction = {}, normalTractionTolerance = {}",

Check warning on line 1949 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L1947-L1949

Added lines #L1947 - L1949 were not covered by tests
kfe, originalFractureState, fractureState[kfe],
traction[kfe][0], normalTractionTolerance[kfe] ) );
}
else
{
Expand All @@ -1920,29 +1959,33 @@
contactWrapper.computeLimitTangentialTractionNorm( traction[kfe][0],
dLimitTangentialTractionNorm_dTraction );

if( originalFractureState == contact::FractureState::Stick && currentTau >= limitTau )
if( originalFractureState == FractureState::Stick && currentTau >= limitTau )

Check warning on line 1962 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L1962

Added line #L1962 was not covered by tests
{
currentTau *= (1.0 - m_slidingCheckTolerance);
}
else if( originalFractureState != contact::FractureState::Stick && currentTau <= limitTau )
else if( originalFractureState != FractureState::Stick && currentTau <= limitTau )

Check warning on line 1966 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L1966

Added line #L1966 was not covered by tests
{
currentTau *= (1.0 + m_slidingCheckTolerance);
}
if( currentTau > limitTau )
{
if( originalFractureState == contact::FractureState::Stick )
if( originalFractureState == FractureState::Stick )

Check warning on line 1972 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L1972

Added line #L1972 was not covered by tests
{
fractureState[kfe] = contact::FractureState::NewSlip;
fractureState[kfe] = FractureState::NewSlip;

Check warning on line 1974 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L1974

Added line #L1974 was not covered by tests
}
else
{
fractureState[kfe] = contact::FractureState::Slip;
fractureState[kfe] = FractureState::Slip;

Check warning on line 1978 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L1978

Added line #L1978 was not covered by tests
}
}
else
{
fractureState[kfe] = contact::FractureState::Stick;
fractureState[kfe] = FractureState::Stick;

Check warning on line 1983 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L1983

Added line #L1983 was not covered by tests
}
if( getLogLevel() >= 10 && fractureState[kfe] != originalFractureState )
GEOS_LOG( GEOS_FMT( "{}: {} -> {}: currentTau = {}, limitTau = {}",

Check warning on line 1986 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L1985-L1986

Added lines #L1985 - L1986 were not covered by tests
kfe, originalFractureState, fractureState[kfe],
currentTau, limitTau ) );
}

changed += faceArea[kfe] * !compareFractureStates( originalFractureState, fractureState[kfe] );
Expand All @@ -1964,21 +2007,23 @@
// and total area of fracture elements
totalArea = MpiWrapper::sum( totalArea );

GEOS_LOG_LEVEL_RANK_0( 2, GEOS_FMT( " {}: changed area {} out of {}", getName(), changedArea, totalArea ) );

Check warning on line 2010 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L2010

Added line #L2010 was not covered by tests

// Assume converged if changed area is below certain fraction of total area
return changedArea <= m_nonlinearSolverParameters.m_configurationTolerance * totalArea;
}

bool SolidMechanicsLagrangeContact::isFractureAllInStickCondition( DomainPartition const & domain ) const
{
globalIndex numStick, numSlip, numOpen;
globalIndex numStick, numNewSlip, numSlip, numOpen;
forDiscretizationOnMeshTargets( domain.getMeshBodies(), [&] ( string const &,
MeshLevel const & mesh,
arrayView1d< string const > const & )
{
computeFractureStateStatistics( mesh, numStick, numSlip, numOpen );
computeFractureStateStatistics( mesh, numStick, numNewSlip, numSlip, numOpen );

Check warning on line 2023 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L2023

Added line #L2023 was not covered by tests
} );

return ( ( numSlip + numOpen ) == 0 );
return ( ( numNewSlip + numSlip + numOpen ) == 0 );

Check warning on line 2026 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L2026

Added line #L2026 was not covered by tests
}

real64 SolidMechanicsLagrangeContact::setNextDt( real64 const & currentDt,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -750,12 +750,13 @@ void SinglePhaseBase::implicitStepComplete( real64 const & time,
singlePhaseBaseKernels::StatisticsKernel::
saveDeltaPressure( subRegion.size(), pres, initPres, deltaPres );

arrayView1d< real64 const > const dVol = subRegion.getField< fields::flow::deltaVolume >();
arrayView1d< real64 > const dVol = subRegion.getField< fields::flow::deltaVolume >();
arrayView1d< real64 > const vol = subRegion.getReference< array1d< real64 > >( CellElementSubRegion::viewKeyStruct::elementVolumeString() );

forAll< parallelDevicePolicy<> >( subRegion.size(), [=] GEOS_HOST_DEVICE ( localIndex const ei )
{
vol[ei] += dVol[ei];
dVol[ei] = 0.0;
} );

SingleFluidBase const & fluid =
Expand All @@ -773,6 +774,8 @@ void SinglePhaseBase::implicitStepComplete( real64 const & time,
porousSolid.saveConvergedState(); // porosity_n <- porosity
}

updateMass( subRegion );
paveltomin marked this conversation as resolved.
Show resolved Hide resolved

if( m_isThermal )
{
arrayView2d< real64 const > const porosity = porousSolid.getPorosity();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
#include "SinglePhasePoromechanicsConformingFractures.hpp"

#include "constitutive/solid/PorousSolid.hpp"
#include "constitutive/contact/ContactSelector.hpp"
#include "constitutive/fluid/singlefluid/SingleFluidBase.hpp"
#include "linearAlgebra/solvers/BlockPreconditioner.hpp"
#include "linearAlgebra/solvers/SeparateComponentPreconditioner.hpp"
Expand Down Expand Up @@ -736,25 +737,35 @@
string const porousSolidName = subRegion.getReference< string >( FlowSolverBase::viewKeyStruct::solidNamesString() );
CoupledSolidBase & porousSolid = subRegion.getConstitutiveModel< CoupledSolidBase >( porousSolidName );

constitutive::ConstitutivePassThru< CompressibleSolidBase >::execute( porousSolid, [=, &subRegion] ( auto & castedPorousSolid )
string const & contactRelationName = subRegion.template getReference< string >( SolidMechanicsLagrangianFEM::viewKeyStruct::contactRelationNameString() );
ContactBase const & contact = subRegion.getConstitutiveModel< ContactBase >( contactRelationName );

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

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/SinglePhasePoromechanicsConformingFractures.cpp#L740-L741

Added lines #L740 - L741 were not covered by tests

constitutiveUpdatePassThru( contact, [&] ( auto & castedContact )

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

View check run for this annotation

Codecov / codecov/patch

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

Added line #L743 was not covered by tests
{
using ContactType = TYPEOFREF( castedContact );
typename ContactType::KernelWrapper contactWrapper = castedContact.createKernelWrapper();

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

View check run for this annotation

Codecov / codecov/patch

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

Added line #L746 was not covered by tests

typename TYPEOFREF( castedPorousSolid ) ::KernelWrapper porousMaterialWrapper = castedPorousSolid.createKernelUpdates();

poromechanicsFracturesKernels::StateUpdateKernel::
launch< parallelDevicePolicy<> >( subRegion.size(),
porousMaterialWrapper,
dispJump,
pressure,
area,
volume,
deltaVolume,
aperture,
minimumHydraulicAperture,
oldHydraulicAperture,
hydraulicAperture,
fractureTraction );
constitutive::ConstitutivePassThru< CompressibleSolidBase >::execute( porousSolid, [=, &subRegion] ( auto & castedPorousSolid )

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

View check run for this annotation

Codecov / codecov/patch

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

Added line #L748 was not covered by tests
{

typename TYPEOFREF( castedPorousSolid ) ::KernelWrapper porousMaterialWrapper = castedPorousSolid.createKernelUpdates();

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

View check run for this annotation

Codecov / codecov/patch

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

Added line #L751 was not covered by tests

poromechanicsFracturesKernels::StateUpdateKernel::
launch< parallelDevicePolicy<> >( subRegion.size(),

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

View check run for this annotation

Codecov / codecov/patch

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

Added line #L754 was not covered by tests
porousMaterialWrapper,
contactWrapper,
dispJump,
pressure,
area,
volume,
deltaVolume,
aperture,
minimumHydraulicAperture,
oldHydraulicAperture,
hydraulicAperture,
fractureTraction );

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

View check run for this annotation

Codecov / codecov/patch

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

Added lines #L756 - L766 were not covered by tests

} );
} );
} );
} );
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,11 @@
* @param[out] hydraulicAperture the effecture aperture
* @param[in] fractureTraction the fracture traction
*/
template< typename POLICY, typename POROUS_WRAPPER >
template< typename POLICY, typename POROUS_WRAPPER, typename CONTACT_WRAPPER >
static void
launch( localIndex const size,
POROUS_WRAPPER const & porousMaterialWrapper,
CONTACT_WRAPPER const & contactWrapper,
arrayView2d< real64 const > const & dispJump,
arrayView1d< real64 const > const & pressure,
arrayView1d< real64 const > const & area,
Expand All @@ -69,8 +70,8 @@
// update aperture to be equal to the normal displacement jump
aperture[k] = dispJump[k][0]; // the first component of the jump is the normal one.

hydraulicAperture[k] = minimumHydraulicAperture[k] + aperture[k];
real64 const dHydraulicAperture_dNormalJump = 1.0;
real64 dHydraulicAperture_dNormalJump = 0.0;
hydraulicAperture[k] = contactWrapper.computeHydraulicAperture( aperture[k], dHydraulicAperture_dNormalJump );

Check warning on line 74 in src/coreComponents/physicsSolvers/multiphysics/poromechanicsKernels/SinglePhasePoromechanicsFractures.hpp

View check run for this annotation

Codecov / codecov/patch

src/coreComponents/physicsSolvers/multiphysics/poromechanicsKernels/SinglePhasePoromechanicsFractures.hpp#L73-L74

Added lines #L73 - L74 were not covered by tests

deltaVolume[k] = hydraulicAperture[k] * area[k] - volume[k];

Expand Down
Loading