@@ -253,6 +253,13 @@ void SolidMechanicsLagrangeContact::computeTolerances( DomainPartition & domain
253
253
{
254
254
GEOS_MARK_FUNCTION;
255
255
256
+ real64 minNormalTractionTolerance ( 1e10 );
257
+ real64 maxNormalTractionTolerance ( -1e10 );
258
+ real64 minNormalDisplacementTolerance ( 1e10 );
259
+ real64 maxNormalDisplacementTolerance ( -1e10 );
260
+ real64 minSlidingTolerance ( 1e10 );
261
+ real64 maxSlidingTolerance ( -1e10 );
262
+
256
263
forDiscretizationOnMeshTargets ( domain.getMeshBodies (), [&] ( string const &,
257
264
MeshLevel & mesh,
258
265
arrayView1d< string const > const & )
@@ -302,6 +309,13 @@ void SolidMechanicsLagrangeContact::computeTolerances( DomainPartition & domain
302
309
arrayView1d< real64 > const & slidingTolerance =
303
310
subRegion.getReference < array1d< real64 > >( viewKeyStruct::slidingToleranceString () );
304
311
312
+ RAJA::ReduceMin< ReducePolicy< parallelHostPolicy >, real64 > minSubRegionNormalTractionTolerance ( 1e10 );
313
+ RAJA::ReduceMax< ReducePolicy< parallelHostPolicy >, real64 > maxSubRegionNormalTractionTolerance ( -1e10 );
314
+ RAJA::ReduceMin< ReducePolicy< parallelHostPolicy >, real64 > minSubRegionNormalDisplacementTolerance ( 1e10 );
315
+ RAJA::ReduceMax< ReducePolicy< parallelHostPolicy >, real64 > maxSubRegionNormalDisplacementTolerance ( -1e10 );
316
+ RAJA::ReduceMin< ReducePolicy< parallelHostPolicy >, real64 > minSubRegionSlidingTolerance ( 1e10 );
317
+ RAJA::ReduceMax< ReducePolicy< parallelHostPolicy >, real64 > maxSubRegionSlidingTolerance ( -1e10 );
318
+
305
319
forAll< parallelHostPolicy >( subRegion.size (), [=] ( localIndex const kfe )
306
320
{
307
321
if ( ghostRank[kfe] < 0 )
@@ -385,15 +399,36 @@ void SolidMechanicsLagrangeContact::computeTolerances( DomainPartition & domain
385
399
LvArray::tensorOps::scale< 3 , 3 >( rotatedInvStiffApprox, area );
386
400
387
401
// Finally, compute tolerances for the given fracture element
402
+
388
403
normalDisplacementTolerance[kfe] = rotatedInvStiffApprox[ 0 ][ 0 ] * averageYoungModulus / 2 .e +7 ;
404
+ minSubRegionNormalDisplacementTolerance.min ( normalDisplacementTolerance[kfe] );
405
+ maxSubRegionNormalDisplacementTolerance.max ( normalDisplacementTolerance[kfe] );
406
+
389
407
slidingTolerance[kfe] = sqrt ( rotatedInvStiffApprox[ 1 ][ 1 ] * rotatedInvStiffApprox[ 1 ][ 1 ] +
390
408
rotatedInvStiffApprox[ 2 ][ 2 ] * rotatedInvStiffApprox[ 2 ][ 2 ] ) * averageYoungModulus / 2 .e +7 ;
409
+ minSubRegionSlidingTolerance.min ( slidingTolerance[kfe] );
410
+ maxSubRegionSlidingTolerance.max ( slidingTolerance[kfe] );
411
+
391
412
normalTractionTolerance[kfe] = 1.0 / 2.0 * averageConstrainedModulus / averageBoxSize0 * normalDisplacementTolerance[kfe];
413
+ minSubRegionNormalTractionTolerance.min ( normalTractionTolerance[kfe] );
414
+ maxSubRegionNormalTractionTolerance.max ( normalTractionTolerance[kfe] );
392
415
}
393
416
} );
417
+
418
+ minNormalDisplacementTolerance = std::min ( minNormalDisplacementTolerance, minSubRegionNormalDisplacementTolerance.get () );
419
+ maxNormalDisplacementTolerance = std::max ( maxNormalDisplacementTolerance, maxSubRegionNormalDisplacementTolerance.get () );
420
+ minSlidingTolerance = std::min ( minSlidingTolerance, minSubRegionSlidingTolerance.get () );
421
+ maxSlidingTolerance = std::max ( maxSlidingTolerance, maxSubRegionSlidingTolerance.get () );
422
+ minNormalTractionTolerance = std::min ( minNormalTractionTolerance, minSubRegionNormalTractionTolerance.get () );
423
+ maxNormalTractionTolerance = std::max ( maxNormalTractionTolerance, maxSubRegionNormalTractionTolerance.get () );
394
424
}
395
425
} );
396
426
} );
427
+
428
+ GEOS_LOG_LEVEL_RANK_0 ( 2 , GEOS_FMT ( " {}: normal displacement tolerance = [{}, {}], sliding tolerance = [{}, {}], normal traction tolerance = [{}, {}]" ,
429
+ this ->getName (), minNormalDisplacementTolerance, maxNormalDisplacementTolerance,
430
+ minSlidingTolerance, maxSlidingTolerance,
431
+ minNormalTractionTolerance, maxNormalTractionTolerance ) );
397
432
}
398
433
399
434
void SolidMechanicsLagrangeContact::resetStateToBeginningOfStep ( DomainPartition & domain )
@@ -586,7 +621,7 @@ void SolidMechanicsLagrangeContact::assembleSystem( real64 const time,
586
621
587
622
assembleContact ( domain, dofManager, localMatrix, localRhs );
588
623
589
- // for sequenatial : add (fixed) pressure force contribution into residual (no derivatives)
624
+ // for sequential : add (fixed) pressure force contribution into residual (no derivatives)
590
625
if ( m_isFixedStressPoromechanicsUpdate )
591
626
{
592
627
forDiscretizationOnMeshTargets ( domain.getMeshBodies (), [&]( string const &,
@@ -2221,20 +2256,24 @@ bool SolidMechanicsLagrangeContact::updateConfiguration( DomainPartition & domai
2221
2256
if ( ghostRank[kfe] < 0 )
2222
2257
{
2223
2258
integer const originalFractureState = fractureState[kfe];
2224
- if ( originalFractureState == contact:: FractureState::Open )
2259
+ if ( originalFractureState == FractureState::Open )
2225
2260
{
2226
- if ( dispJump[kfe][0 ] > -normalDisplacementTolerance[kfe] )
2261
+ if ( dispJump[kfe][0 ] <= -normalDisplacementTolerance[kfe] )
2227
2262
{
2228
- fractureState[kfe] = contact:: FractureState::Open ;
2229
- }
2230
- else
2231
- {
2232
- fractureState [kfe] = contact::FractureState::Stick ;
2263
+ fractureState[kfe] = FractureState::Stick ;
2264
+ if ( getLogLevel () >= 10 )
2265
+ GEOS_LOG ( GEOS_FMT ( " {}: {} -> {}: dispJump = {}, normalDisplacementTolerance = {} " ,
2266
+ kfe, originalFractureState, fractureState[kfe],
2267
+ dispJump [kfe][ 0 ], normalDisplacementTolerance[kfe] ) ) ;
2233
2268
}
2234
2269
}
2235
2270
else if ( traction[kfe][0 ] > normalTractionTolerance[kfe] )
2236
2271
{
2237
- fractureState[kfe] = contact::FractureState::Open;
2272
+ fractureState[kfe] = FractureState::Open;
2273
+ if ( getLogLevel () >= 10 )
2274
+ GEOS_LOG ( GEOS_FMT ( " {}: {} -> {}: traction = {}, normalTractionTolerance = {}" ,
2275
+ kfe, originalFractureState, fractureState[kfe],
2276
+ traction[kfe][0 ], normalTractionTolerance[kfe] ) );
2238
2277
}
2239
2278
else
2240
2279
{
@@ -2245,29 +2284,33 @@ bool SolidMechanicsLagrangeContact::updateConfiguration( DomainPartition & domai
2245
2284
contactWrapper.computeLimitTangentialTractionNorm ( traction[kfe][0 ],
2246
2285
dLimitTangentialTractionNorm_dTraction );
2247
2286
2248
- if ( originalFractureState == contact:: FractureState::Stick && currentTau >= limitTau )
2287
+ if ( originalFractureState == FractureState::Stick && currentTau >= limitTau )
2249
2288
{
2250
2289
currentTau *= (1.0 - m_slidingCheckTolerance);
2251
2290
}
2252
- else if ( originalFractureState != contact:: FractureState::Stick && currentTau <= limitTau )
2291
+ else if ( originalFractureState != FractureState::Stick && currentTau <= limitTau )
2253
2292
{
2254
2293
currentTau *= (1.0 + m_slidingCheckTolerance);
2255
2294
}
2256
2295
if ( currentTau > limitTau )
2257
2296
{
2258
- if ( originalFractureState == contact:: FractureState::Stick )
2297
+ if ( originalFractureState == FractureState::Stick )
2259
2298
{
2260
- fractureState[kfe] = contact:: FractureState::NewSlip;
2299
+ fractureState[kfe] = FractureState::NewSlip;
2261
2300
}
2262
2301
else
2263
2302
{
2264
- fractureState[kfe] = contact:: FractureState::Slip;
2303
+ fractureState[kfe] = FractureState::Slip;
2265
2304
}
2266
2305
}
2267
2306
else
2268
2307
{
2269
- fractureState[kfe] = contact:: FractureState::Stick;
2308
+ fractureState[kfe] = FractureState::Stick;
2270
2309
}
2310
+ if ( getLogLevel () >= 10 && fractureState[kfe] != originalFractureState )
2311
+ GEOS_LOG ( GEOS_FMT ( " {}: {} -> {}: currentTau = {}, limitTau = {}" ,
2312
+ kfe, originalFractureState, fractureState[kfe],
2313
+ currentTau, limitTau ) );
2271
2314
}
2272
2315
2273
2316
changed += faceArea[kfe] * !compareFractureStates ( originalFractureState, fractureState[kfe] );
@@ -2289,21 +2332,23 @@ bool SolidMechanicsLagrangeContact::updateConfiguration( DomainPartition & domai
2289
2332
// and total area of fracture elements
2290
2333
totalArea = MpiWrapper::sum ( totalArea );
2291
2334
2335
+ GEOS_LOG_LEVEL_RANK_0 ( 2 , GEOS_FMT ( " {}: changed area {} out of {}" , getName (), changedArea, totalArea ) );
2336
+
2292
2337
// Assume converged if changed area is below certain fraction of total area
2293
2338
return changedArea <= m_nonlinearSolverParameters.m_configurationTolerance * totalArea;
2294
2339
}
2295
2340
2296
2341
bool SolidMechanicsLagrangeContact::isFractureAllInStickCondition ( DomainPartition const & domain ) const
2297
2342
{
2298
- globalIndex numStick, numSlip, numOpen;
2343
+ globalIndex numStick, numNewSlip, numSlip, numOpen;
2299
2344
forDiscretizationOnMeshTargets ( domain.getMeshBodies (), [&] ( string const &,
2300
2345
MeshLevel const & mesh,
2301
2346
arrayView1d< string const > const & )
2302
2347
{
2303
- computeFractureStateStatistics ( mesh, numStick, numSlip, numOpen );
2348
+ computeFractureStateStatistics ( mesh, numStick, numNewSlip, numSlip, numOpen );
2304
2349
} );
2305
2350
2306
- return ( ( numSlip + numOpen ) == 0 );
2351
+ return ( ( numNewSlip + numSlip + numOpen ) == 0 );
2307
2352
}
2308
2353
2309
2354
real64 SolidMechanicsLagrangeContact::setNextDt ( real64 const & currentDt,
0 commit comments