Skip to content

Improved stability for Nitsche contact on unlabeled meshes

Zach Atkins requested to merge zach/nitsche-method-stability-improvements into main

Summary

This MR changes the Nitsche contact BCs to use the computed face normal vectors and fix the Jacobian, which fixes convergence issues on some unlabeled simplex meshes.

Example: IDOX2-1_L0_V3_DF100_ES.msh

Mesh: IDOX2-1_L0_V3_DF100_ES.msh

YAML: Ratel_IDOX2-1_Load0_DF100_Voxel3.yml

This is the reduced resolution single-grain mesh @ewjensen provided me. Prior to the changes in this MR, the nonlinear solver fails after a few SNES iterations. The change to the Jacobian fixes convergence, and the change to use face normal vector fixes some strange artifacts in the converged solution for solution order greater than 1.

Run Output
> mpirun -np 24 --use-hwthread-cpus ./bin/ratel-quasistatic -options_file ../examples/Ratel_IDOX2-1_Load0_DF100_Voxel3.yml -options_file examples/ratel-monitor.yml
DM Object: Solution 24 MPI processes
  type: plex
Solution in 3 dimensions:
  Min/Max of 0-cells per rank: 75/95
  Min/Max of 1-cells per rank: 331/388
  Min/Max of 2-cells per rank: 443/497
  Min/Max of 3-cells per rank: 185/204
Labels:
  depth: 4 strata with value/size (0 (95), 1 (388), 2 (497), 3 (203))
  celltype: 4 strata with value/size (0 (95), 1 (388), 3 (497), 6 (203))
  Cell Sets: 1 strata with value/size (1 (203))
  IDOX face label for DM face 1: 4 strata with value/size (0 (224), 1 (2), 3 (2), 2 (2))
  Face Sets: 1 strata with value/size (1 (375))
Field P2:
  adjacency FEM
----- Ratel Quasistatic Example -----

Ratel Context:
  MPI:
    Hostname: zatkins-desktop
    Total ranks: 24
  libCEED:
    Backend resource: /cpu/self/avx/blocked
    Backend MemType: host
  PETSc:
    VecType: standard
    MatType: shell
  Mesh:
    Global DoFs: 23772
    Local DoFs: [717, 957]
  Solver: quasistatic solver
  Materials:
    Ratel Material:
      Name: IDOX
      Model: Neo-Hookean hyperelasticity at finite strain, in current configuration
        Command line option: elasticity-neo-hookean-current
        Active fields:
          Field 0:
            Name:                 displacement
            Number of components: 3
            libCEED eval mode(s): gradient
        Number of stored components: 16
        Diagnostic output size:
          Projected:  15
          Dual/Nodal: 1
        Model Parameters:
          -rho:
            Description:  Density (kg/m^3)
            Restrictions: rho >= 0
            Required:     false (Default: 1.)
            Value:        1.
          -nu:
            Description:  Poisson's ratio (unitless)
            Restrictions: 0 <= nu < 0.5
            Required:     true
            Value:        0.3
          -E:
            Description:  Young's Modulus (Pa)
            Restrictions: E >= 0
            Required:     true
            Value:        23.2
          -mu:
            Description:  Shear Modulus: E / (2 (1 + nu)) (Pa)
            Restrictions: mu >= 0
            Required:     false (Default: 0.)
            Value:        8.92308
          -lambda:
            Description:  First Lame parameter: 2 mu nu / (1 - 2 nu) (Pa)
            Restrictions: lambda >= 0
            Required:     false (Default: 0.)
            Value:        13.3846
          -bulk:
            Description:  Bulk Modulus: 2 mu (1 + nu) / (3 (1 - 2 nu)) (Pa)
            Restrictions: bulk >= 0
            Required:     false (Default: 0.)
            Value:        19.3333
          -two_mu:
            Description:  Shear Modulus multiplied by 2 (Pa)
            Restrictions: mu >= 0
            Required:     false (Default: 0.)
            Value:        17.8462
      Forcing: none
  Platen (contact) boundaries:
    Face top:
      Platen center: [0.409349, 0.765687, 0.259700]
      Platen normal: [0.000000, 0.000000, -1.000000]
      Nitsche's method parameter: 10000.000000
      Coefficient of friction: 0.400000
        Distance at time 1.000000: 0.050000
    Face bottom:
      Platen center: [0.409349, 0.765687, 0.001101]
      Platen normal: [0.000000, 0.000000, 1.000000]
      Nitsche's method parameter: 10000.000000
      Coefficient of friction: 0.400000
        Distance at time 1.000000: 0.000000
  Initial condition:
    Type: zero initial condition
  Finite elements, field 0:
    Polynomial order: 2
    Additional quadrature points: 0
    Basis application: simplex
    Element topology: tetrahedron
  Geometry order for diagnostic values mesh: use solution mesh geometric order
  Has manufactured solution: no
  Expected strain energy: not set
0 TS dt 0.5 time 0.
    0 SNES Function norm 6.013985227560e-01 
    Linear solve converged due to CONVERGED_RTOL iterations 108
Iteratively computed extreme singular values: max 36.4241 min 0.0035695 max/min 10204.3
    1 SNES Function norm 1.653818116390e-01 
    Linear solve converged due to CONVERGED_RTOL iterations 110
Iteratively computed extreme singular values: max 11.9886 min 0.00239529 max/min 5005.08
    2 SNES Function norm 1.387182028183e-02 
    Linear solve converged due to CONVERGED_RTOL iterations 140
Iteratively computed extreme singular values: max 11.7687 min 0.0030388 max/min 3872.81
    3 SNES Function norm 1.161491550924e-02 
    Linear solve converged due to CONVERGED_RTOL iterations 118
Iteratively computed extreme singular values: max 6.98499 min 0.00208671 max/min 3347.37
    4 SNES Function norm 6.379618649343e-03 
    Linear solve converged due to CONVERGED_RTOL iterations 173
Iteratively computed extreme singular values: max 25.3576 min 0.00187494 max/min 13524.5
    5 SNES Function norm 5.687235159213e-03 
    Linear solve converged due to CONVERGED_RTOL iterations 145
Iteratively computed extreme singular values: max 10.6583 min 0.00266911 max/min 3993.2
    6 SNES Function norm 3.958741543829e-03 
    Linear solve converged due to CONVERGED_RTOL iterations 166
Iteratively computed extreme singular values: max 8.52106 min 0.00446465 max/min 1908.56
    7 SNES Function norm 3.271982470159e-03 
    Linear solve converged due to CONVERGED_RTOL iterations 147
Iteratively computed extreme singular values: max 11.6823 min 0.00202595 max/min 5766.33
    8 SNES Function norm 1.851086248028e-03 
    Linear solve converged due to CONVERGED_RTOL iterations 185
Iteratively computed extreme singular values: max 14.8211 min 0.0576854 max/min 256.93
    9 SNES Function norm 1.829695164960e-03 
    Linear solve converged due to CONVERGED_RTOL iterations 180
Iteratively computed extreme singular values: max 18.7167 min 0.00116072 max/min 16125.
   10 SNES Function norm 1.806617846417e-03 
    Linear solve converged due to CONVERGED_RTOL iterations 177
Iteratively computed extreme singular values: max 17.5438 min 0.00150231 max/min 11677.8
   11 SNES Function norm 1.776372672863e-03 
    Linear solve converged due to CONVERGED_RTOL iterations 169
Iteratively computed extreme singular values: max 13.9379 min 0.00264942 max/min 5260.72
   12 SNES Function norm 1.734639280249e-03 
    Linear solve converged due to CONVERGED_RTOL iterations 159
Iteratively computed extreme singular values: max 8.79769 min 0.00979226 max/min 898.433
   13 SNES Function norm 1.678521246906e-03 
    Linear solve converged due to CONVERGED_RTOL iterations 147
Iteratively computed extreme singular values: max 7.44951 min 0.00216544 max/min 3440.19
   14 SNES Function norm 1.560209110238e-03 
    Linear solve converged due to CONVERGED_RTOL iterations 136
Iteratively computed extreme singular values: max 7.4809 min 0.00398338 max/min 1878.03
   15 SNES Function norm 1.401145300488e-03 
    Linear solve converged due to CONVERGED_RTOL iterations 115
Iteratively computed extreme singular values: max 7.71869 min 0.00192503 max/min 4009.65
   16 SNES Function norm 1.143319575973e-03 
    Linear solve converged due to CONVERGED_RTOL iterations 124
Iteratively computed extreme singular values: max 4.07097 min 0.0431031 max/min 94.4471
   17 SNES Function norm 8.255602701508e-04 
    Linear solve converged due to CONVERGED_RTOL iterations 102
Iteratively computed extreme singular values: max 5.6617 min 0.00763676 max/min 741.375
   18 SNES Function norm 4.738527519464e-04 
    Linear solve converged due to CONVERGED_RTOL iterations 124
Iteratively computed extreme singular values: max 5.36709 min 0.0374497 max/min 143.315
   19 SNES Function norm 3.308094212261e-04 
    Linear solve converged due to CONVERGED_RTOL iterations 132
Iteratively computed extreme singular values: max 5.31773 min 0.00495632 max/min 1072.92
   20 SNES Function norm 2.128014147750e-04 
    Linear solve converged due to CONVERGED_RTOL iterations 136
Iteratively computed extreme singular values: max 5.19519 min 0.00354396 max/min 1465.93
   21 SNES Function norm 2.636150330774e-05 
    Linear solve converged due to CONVERGED_RTOL iterations 123
Iteratively computed extreme singular values: max 3.75851 min 0.0997387 max/min 37.6836
   22 SNES Function norm 8.573802066825e-07 
    Linear solve converged due to CONVERGED_RTOL iterations 127
Iteratively computed extreme singular values: max 4.94796 min 0.010811 max/min 457.679
   23 SNES Function norm 3.033299936680e-09 
  Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 23
1 TS dt 0.5 time 0.5
    0 SNES Function norm 9.822944465279e-01 
    Linear solve converged due to CONVERGED_RTOL iterations 66
Iteratively computed extreme singular values: max 1.85508 min 0.0152517 max/min 121.632
    1 SNES Function norm 8.077310360650e-02 
    Linear solve converged due to CONVERGED_RTOL iterations 107
Iteratively computed extreme singular values: max 3.19236 min 0.0043698 max/min 730.55
    2 SNES Function norm 1.499542956302e-02 
    Linear solve converged due to CONVERGED_RTOL iterations 115
Iteratively computed extreme singular values: max 3.59546 min 0.00256755 max/min 1400.35
    3 SNES Function norm 9.260091953452e-03 
    Linear solve converged due to CONVERGED_RTOL iterations 113
Iteratively computed extreme singular values: max 4.20452 min 0.00213251 max/min 1971.63
    4 SNES Function norm 8.371907093673e-03 
    Linear solve converged due to CONVERGED_RTOL iterations 103
Iteratively computed extreme singular values: max 3.49719 min 0.00657021 max/min 532.28
    5 SNES Function norm 4.332685041169e-03 
    Linear solve converged due to CONVERGED_RTOL iterations 156
Iteratively computed extreme singular values: max 5.37182 min 0.0207061 max/min 259.432
    6 SNES Function norm 3.918124089505e-03 
    Linear solve converged due to CONVERGED_RTOL iterations 137
Iteratively computed extreme singular values: max 3.44746 min 0.00203546 max/min 1693.7
    7 SNES Function norm 3.093919557086e-03 
    Linear solve converged due to CONVERGED_RTOL iterations 113
Iteratively computed extreme singular values: max 4.48705 min 0.00167483 max/min 2679.1
    8 SNES Function norm 2.475900799459e-03 
    Linear solve converged due to CONVERGED_RTOL iterations 108
Iteratively computed extreme singular values: max 2.74365 min 0.00163831 max/min 1674.68
    9 SNES Function norm 2.024925974338e-03 
    Linear solve converged due to CONVERGED_RTOL iterations 107
Iteratively computed extreme singular values: max 3.21616 min 0.00233628 max/min 1376.61
   10 SNES Function norm 1.624761013464e-03 
    Linear solve converged due to CONVERGED_RTOL iterations 107
Iteratively computed extreme singular values: max 2.72603 min 0.00336311 max/min 810.566
   11 SNES Function norm 9.564549894991e-04 
    Linear solve converged due to CONVERGED_RTOL iterations 111
Iteratively computed extreme singular values: max 2.93829 min 0.00240722 max/min 1220.62
   12 SNES Function norm 1.728445075910e-04 
    Linear solve converged due to CONVERGED_RTOL iterations 157
Iteratively computed extreme singular values: max 2.73456 min 0.013947 max/min 196.068
   13 SNES Function norm 6.400575669910e-06 
    Linear solve converged due to CONVERGED_RTOL iterations 179
Iteratively computed extreme singular values: max 3.11371 min 0.000559189 max/min 5568.26
   14 SNES Function norm 6.896412371610e-09 
  Nonlinear solve converged due to CONVERGED_FNORM_RELATIVE iterations 14
2 TS dt 0.5 time 1.
TS steps: 2
TS converged reason: CONVERGED_TIME
Computed strain energy: 3.633686495682e-03
Max displacement:       [1.148917150613e-02, 7.303644966137e-03, 4.991395138873e-02]
Surface 1:
  Centroid:             [4.187914299867e-01, 7.624014716264e-01, 1.051027495234e-01]
  Surface Force:        [-4.750548218690e-11, 7.461907480799e-11, 1.085220455166e-10]
Time taken to compute solution (sec): 613.261

Results plot:

Initial config: image After compression: image

Checklist

Closes #NA

  • Atomic commit history
  • All new features documented
  • Updated CHANGELOG.md

Merge request reports

Loading