Friction driver suggestions#4037
Conversation
| name="restarts" | ||
| timeFrequency="1" | ||
| targetExactTimestep="0" | ||
| target="/Outputs/restartOutput"/> |
There was a problem hiding this comment.
The restart is for the CI so that the table can be saved in the restart file for comparisons with baselines.
| integer const numRows = m_table.size( 0 ); | ||
| forAll< parallelDevicePolicy<> >( numRows, | ||
| [ kernelWrapper, table ] | ||
| GEOS_HOST_DEVICE ( integer const ei ) |
There was a problem hiding this comment.
Switch to a truely parallel loop. Should use openmp (or gpu if available).
| m_table( index, NTRAC ) = traction*sin_theta; | ||
| m_table( index, STRAC0 ) = traction*cos_theta*cos_phi; | ||
| m_table( index, STRAC1 ) = traction*cos_theta*sin_phi; | ||
|
|
||
| real64 cohesion = 0.; | ||
| real64 frictionCoeff = 0.; | ||
| if constexpr ( std::is_same_v< CoulombFriction, FRICTION_TYPE > ) { | ||
| m_table( index, NJUMP ) = jump*sin_theta; | ||
| m_table( index, SLIP0 ) = jump*cos_theta*cos_phi; | ||
| m_table( index, SLIP1 ) = jump*cos_theta*sin_phi; |
There was a problem hiding this comment.
I can't say I fully understand this but it looks to me that we want to resolve the traction and jump onto a direction. We therefore need a unit size vector. For 3d we need 2 angles to define a unit vector. That's why I think we need the second angle.
| for( integer nt = 0; nt < m_numSteps+1; ++nt ) | ||
| if( CoulombFriction const * coulombFriction = dynamic_cast< CoulombFriction const * >(&getFriction()) ) | ||
| { | ||
| for( integer nj = 0; nj < m_numSteps+1; ++nj ) |
There was a problem hiding this comment.
I don't know it the need will always be to test every (jump, traction) combination. If this is the case, then what I am proposing drifts away from this. It expects the user to use the functions to explicitly define these combinations.
There was a problem hiding this comment.
I think the idea is to plug as input the required initial state for ALM and let it run through contact and then state.
But I started with state as it was easier to start with.
| for( integer nt = 0; nt < m_numSteps+1; ++nt ) | ||
| if( CoulombFriction const * coulombFriction = dynamic_cast< CoulombFriction const * >(&getFriction()) ) | ||
| { | ||
| for( integer nj = 0; nj < m_numSteps+1; ++nj ) |
There was a problem hiding this comment.
I think the idea is to plug as input the required initial state for ALM and let it run through contact and then state.
But I started with state as it was easier to start with.
At #3883 I created a base class for the constitutive drivers. The idea is to make these run as integrated tests instead of unit tests. This PR uses this framework to do the friction driver.
There is a big difference: The original implementation was scanning over all the possible jump vs traction combinations. This is more linear so the user has to provide functions that cover all the combinations.