Skip to content

Friction driver suggestions#4037

Merged
jafranc merged 1 commit intojafranc/feat/ALMDriverfrom
dkachuma/alm-driver
Apr 24, 2026
Merged

Friction driver suggestions#4037
jafranc merged 1 commit intojafranc/feat/ALMDriverfrom
dkachuma/alm-driver

Conversation

@dkachuma
Copy link
Copy Markdown
Contributor

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.

name="restarts"
timeFrequency="1"
targetExactTimestep="0"
target="/Outputs/restartOutput"/>
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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 )
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Switch to a truely parallel loop. Should use openmp (or gpu if available).

Comment thread src/coreComponents/constitutiveDrivers/contact/LogLevelsInfo.hpp
Comment thread src/coreComponents/constitutiveDrivers/contact/FrictionDriver.cpp
Comment thread src/coreComponents/constitutiveDrivers/contact/FrictionDriver.cpp
Comment on lines +168 to +174
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;
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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 )
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

Copy link
Copy Markdown
Contributor

@jafranc jafranc left a comment

Choose a reason for hiding this comment

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

Great addition @dkachuma, let's restart from this proposal

Comment thread src/coreComponents/constitutiveDrivers/contact/FrictionDriver.cpp
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 )
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.

@jafranc jafranc merged commit cd3d4fe into jafranc/feat/ALMDriver Apr 24, 2026
15 of 22 checks passed
@jafranc jafranc deleted the dkachuma/alm-driver branch April 24, 2026 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants