Skip to content

Commit

Permalink
Update Maxwell model for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
jchristopherson committed Sep 26, 2023
1 parent e77de8e commit 529dbe3
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ F = N k \delta
\delta_{i+1} = sgn \left( x_{i+1} - x_{i} + \delta_{i} \right) \min \left( \left| x_{i+1} - x_{i} + \delta_{i} \right|, \Delta \right)
```
```math
\Delta = \frac{\mu_c}{k}
\Delta = \frac{N \mu_c}{k}
```
- Generalized Maxwell Slip Model
```math
Expand Down
4 changes: 2 additions & 2 deletions src/friction.f90
Original file line number Diff line number Diff line change
Expand Up @@ -594,9 +594,9 @@ pure module function lg_get_state_var_count(this) result(rst)
!!
!! The signle-element, Maxwell model is defined as follows.
!!
!! $$ F = N k \delta $$
!! $$ F = k \delta $$
!! $$ \delta_{i+1} = sgn \left( x_{i+1} - x_{i} + \delta_{i} \right) \min \left( \left| x_{i+1} - x_{i} + \delta_{i} \right|, \Delta \right) $$
!! $$ \Delta = \frac{\mu_c}{k} $$
!! $$ \Delta = \frac{N \mu_c}{k} $$
!!
!! where:
!!
Expand Down
4 changes: 2 additions & 2 deletions src/friction_maxwell.f90
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ module function mx_eval(this, t, x, dxdt, nrm, svars) result(rst)

real(real64) :: s, d, delta

delta = this%friction_coefficient / this%stiffness
delta = nrm * this%friction_coefficient / this%stiffness
s = x - this%x_prev + this%d_prev
d = sign(1.0d0, s) * min(abs(s), delta)
rst = nrm * this%stiffness * d
rst = this%stiffness * d

this%d_prev = d
this%x_prev = x
Expand Down
4 changes: 2 additions & 2 deletions test/friction_model_tests.f90
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ function test_maxwell() result(rst)
mdl%friction_coefficient = coeff

! Compute the actual solution
delta = mdl%friction_coefficient / mdl%stiffness
delta = normal * mdl%friction_coefficient / mdl%stiffness
sdelta = min(abs(pos), delta) * sign(1.0d0, pos)
ans = normal * mdl%stiffness * sdelta
ans = mdl%stiffness * sdelta

! Test
f = mdl%evaluate(0.0d0, pos, 0.0d0, normal)
Expand Down

0 comments on commit 529dbe3

Please sign in to comment.