-
Notifications
You must be signed in to change notification settings - Fork 89
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
Changes from all commits
adbd3c2
c036976
65fa11a
ffea8de
06c5d84
d7df1f0
1ba9393
194602b
2950eaa
c678634
f244566
7577b5d
3da4a7e
ce6c22f
8bf8e02
dd88474
1a0347c
dcf2308
5f22591
d9b7330
d5ddb7f
b12f753
47e17f1
8c7a8d6
90923b9
fa97b6a
3839b4a
45b2ca0
17dc67e
3b5fc93
cae43ba
e5ba0ce
07a4d1d
59f42d2
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 |
---|---|---|
|
@@ -253,6 +253,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 261 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp Codecov / codecov/patchsrc/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L256-L261
|
||
|
||
forDiscretizationOnMeshTargets( domain.getMeshBodies(), [&] ( string const &, | ||
MeshLevel & mesh, | ||
arrayView1d< string const > const & ) | ||
|
@@ -302,6 +309,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 317 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp Codecov / codecov/patchsrc/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L312-L317
|
||
|
||
forAll< parallelHostPolicy >( subRegion.size(), [=] ( localIndex const kfe ) | ||
{ | ||
if( ghostRank[kfe] < 0 ) | ||
|
@@ -385,15 +399,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 405 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp Codecov / codecov/patchsrc/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L404-L405
|
||
|
||
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 410 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp Codecov / codecov/patchsrc/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L409-L410
|
||
|
||
normalTractionTolerance[kfe] = 1.0 / 2.0 * averageConstrainedModulus / averageBoxSize0 * normalDisplacementTolerance[kfe]; | ||
minSubRegionNormalTractionTolerance.min( normalTractionTolerance[kfe] ); | ||
maxSubRegionNormalTractionTolerance.max( normalTractionTolerance[kfe] ); | ||
Check warning on line 414 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp Codecov / codecov/patchsrc/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L413-L414
|
||
} | ||
} ); | ||
|
||
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 423 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp Codecov / codecov/patchsrc/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L418-L423
|
||
} | ||
} ); | ||
} ); | ||
|
||
GEOS_LOG_LEVEL_RANK_0( 2, GEOS_FMT( "{}: normal displacement tolerance = [{}, {}], sliding tolerance = [{}, {}], normal traction tolerance = [{}, {}]", | ||
this->getName(), minNormalDisplacementTolerance, maxNormalDisplacementTolerance, | ||
minSlidingTolerance, maxSlidingTolerance, | ||
minNormalTractionTolerance, maxNormalTractionTolerance ) ); | ||
} | ||
|
||
void SolidMechanicsLagrangeContact::resetStateToBeginningOfStep( DomainPartition & domain ) | ||
|
@@ -586,7 +621,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 &, | ||
|
@@ -2221,20 +2256,24 @@ | |
if( ghostRank[kfe] < 0 ) | ||
{ | ||
integer const originalFractureState = fractureState[kfe]; | ||
if( originalFractureState == contact::FractureState::Open ) | ||
if( originalFractureState == FractureState::Open ) | ||
{ | ||
if( dispJump[kfe][0] > -normalDisplacementTolerance[kfe] ) | ||
if( dispJump[kfe][0] <= -normalDisplacementTolerance[kfe] ) | ||
{ | ||
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 2265 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp Codecov / codecov/patchsrc/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L2263-L2265
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 2274 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp Codecov / codecov/patchsrc/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L2272-L2274
|
||
kfe, originalFractureState, fractureState[kfe], | ||
traction[kfe][0], normalTractionTolerance[kfe] ) ); | ||
} | ||
else | ||
{ | ||
|
@@ -2245,29 +2284,33 @@ | |
contactWrapper.computeLimitTangentialTractionNorm( traction[kfe][0], | ||
dLimitTangentialTractionNorm_dTraction ); | ||
|
||
if( originalFractureState == contact::FractureState::Stick && currentTau >= limitTau ) | ||
if( originalFractureState == FractureState::Stick && currentTau >= limitTau ) | ||
{ | ||
currentTau *= (1.0 - m_slidingCheckTolerance); | ||
} | ||
else if( originalFractureState != contact::FractureState::Stick && currentTau <= limitTau ) | ||
else if( originalFractureState != FractureState::Stick && currentTau <= limitTau ) | ||
{ | ||
currentTau *= (1.0 + m_slidingCheckTolerance); | ||
} | ||
if( currentTau > limitTau ) | ||
{ | ||
if( originalFractureState == contact::FractureState::Stick ) | ||
if( originalFractureState == FractureState::Stick ) | ||
{ | ||
fractureState[kfe] = contact::FractureState::NewSlip; | ||
fractureState[kfe] = FractureState::NewSlip; | ||
} | ||
else | ||
{ | ||
fractureState[kfe] = contact::FractureState::Slip; | ||
fractureState[kfe] = FractureState::Slip; | ||
} | ||
} | ||
else | ||
{ | ||
fractureState[kfe] = contact::FractureState::Stick; | ||
fractureState[kfe] = FractureState::Stick; | ||
} | ||
if( getLogLevel() >= 10 && fractureState[kfe] != originalFractureState ) | ||
GEOS_LOG( GEOS_FMT( "{}: {} -> {}: currentTau = {}, limitTau = {}", | ||
Check warning on line 2311 in src/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp Codecov / codecov/patchsrc/coreComponents/physicsSolvers/contact/SolidMechanicsLagrangeContact.cpp#L2310-L2311
|
||
kfe, originalFractureState, fractureState[kfe], | ||
currentTau, limitTau ) ); | ||
} | ||
|
||
changed += faceArea[kfe] * !compareFractureStates( originalFractureState, fractureState[kfe] ); | ||
|
@@ -2289,21 +2332,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 ) ); | ||
|
||
// 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 ); | ||
} ); | ||
|
||
return ( ( numSlip + numOpen ) == 0 ); | ||
return ( ( numNewSlip + numSlip + numOpen ) == 0 ); | ||
} | ||
|
||
real64 SolidMechanicsLagrangeContact::setNextDt( real64 const & currentDt, | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -168,14 +168,6 @@ DECLARE_FIELD( hydraulicAperture, | |
WRITE_AND_READ, | ||
"Hydraulic aperture" ); | ||
|
||
DECLARE_FIELD( minimumHydraulicAperture, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not needed anymore |
||
"minimumHydraulicAperture", | ||
array1d< real64 >, | ||
0, | ||
LEVEL_0, | ||
WRITE_AND_READ, | ||
"minimum value of the hydraulic aperture" ); | ||
|
||
DECLARE_FIELD( gravityCoefficient, | ||
"gravityCoefficient", | ||
array1d< real64 >, | ||
|
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.
this is just to avoid gcc warnings