Contact Pressure on Primary surface

14 views
Skip to first unread message

Osama Abdelaleim

unread,
Jul 19, 2020, 5:07:42 PM7/19/20
to mastodon-users
Hi all,

I was wondering how to view the contact pressure on the primary/master contact surface. 

Setting up the contact block only postprocesses the contact pressure on the slave/secondary surface. I tried example 6a and can only visualize the contact pressure on the smaller block (slave surface) but not on the larger block (master surface).

Thanks,
Osama

Christopher Wong

unread,
Sep 30, 2020, 5:33:50 PM9/30/20
to mastodon-users
Don't use postprocessors for this. Set up all of the auxiliary variables and kernels, and their contours should show up in the exodus viewer. It's been awhile since I've ran a contact model, but I think I remember that the contact forces only show up on the primary boundary (in MOOSE contact, you have boundaries and paired boundaires, i.e., slaves and masters). But, if you think about it, this isn't such a huge deal - as long as you know the contact pressure at one surface, just remember Newton's Third Law!

Set up all your variables something like this:

```
[AuxVariables]
  [slip_mag]
    order = FIRST
    family = LAGRANGE
  []
  [slip_x]
    order = FIRST
    family = LAGRANGE
  []
  [slip_y]
    order = FIRST
    family = LAGRANGE
  []
  [slip_z]
    order = FIRST
    family = LAGRANGE
  []
  [slip_accum]
    order = FIRST
    family = LAGRANGE
  []
  [force_x]
    order = FIRST
    family = LAGRANGE
  []
  [force_y]
    order = FIRST
    family = LAGRANGE
  []
  [force_z]
    order = FIRST
    family = LAGRANGE
  []
  [norm_force_mag]
    order = FIRST
    family = LAGRANGE
  []
  [norm_force_x]
    order = FIRST
    family = LAGRANGE
  []
  [norm_force_y]
    order = FIRST
    family = LAGRANGE
  []
  [norm_force_z]
    order = FIRST
    family = LAGRANGE
  []
  [tang_force_mag]
    order = FIRST
    family = LAGRANGE
  []
  [tang_force_x]
    order = FIRST
    family = LAGRANGE
  []
  [tang_force_y]
    order = FIRST
    family = LAGRANGE
  []
  [tang_force_z]
    order = FIRST
    family = LAGRANGE
  []
  [friction_energy]
    order = FIRST
    family = LAGRANGE
  []
  [stress_xy]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_yz]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_zx]
    order = CONSTANT
    family = MONOMIAL
  []
  [strain_xy]
    order = CONSTANT
    family = MONOMIAL
  []
  [strain_yz]
    order = CONSTANT
    family = MONOMIAL
  []
  [strain_zx]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_xx]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_yy]
    order = CONSTANT
    family = MONOMIAL
  []
  [stress_zz]
    order = CONSTANT
    family = MONOMIAL
  []
  [strain_xx]
    order = CONSTANT
    family = MONOMIAL
  []
  [strain_yy]
    order = CONSTANT
    family = MONOMIAL
  []
  [strain_zz]
    order = CONSTANT
    family = MONOMIAL
  []
[]

[AuxKernels]
  # set up auxillary kernels for contact variables
  [slip_mag]
    type = PenetrationAux
    variable = slip_mag
    quantity = incremental_slip_magnitude
    boundary = reactor_contact
    paired_boundary = soil_contact
  []
  [slip_x]
    type = PenetrationAux
    variable = slip_x
    quantity = incremental_slip_x
    boundary = reactor_contact
    paired_boundary = soil_contact
  []
  [slip_y]
    type = PenetrationAux
    variable = slip_y
    quantity = incremental_slip_y
    boundary = reactor_contact
    paired_boundary = soil_contact
  []
  [slip_z]
    type = PenetrationAux
    variable = slip_z
    quantity = incremental_slip_z
    boundary = reactor_contact
    paired_boundary = soil_contact
  []
  [slip_accum]
    type = PenetrationAux
    variable = slip_accum
    quantity = accumulated_slip
    boundary = reactor_contact
    paired_boundary = soil_contact
  []
  [force_x]
    type = PenetrationAux
    variable = force_x
    quantity = force_x
    boundary = reactor_contact
    paired_boundary = soil_contact
  []
  [force_y]
    type = PenetrationAux
    variable = force_y
    quantity = force_y
    boundary = reactor_contact
    paired_boundary = soil_contact
  []
  [force_z]
    type = PenetrationAux
    variable = force_z
    quantity = force_z
    boundary = reactor_contact
    paired_boundary = soil_contact
  []
  [norm_force_mag]
    type = PenetrationAux
    variable = norm_force_mag
    quantity = normal_force_magnitude
    boundary = reactor_contact
    paired_boundary = soil_contact
  []
  [norm_force_x]
    type = PenetrationAux
    variable = norm_force_x
    quantity = normal_force_x
    boundary = reactor_contact
    paired_boundary = soil_contact
  []
  [norm_force_y]
    type = PenetrationAux
    variable = norm_force_y
    quantity = normal_force_y
    boundary = reactor_contact
    paired_boundary = soil_contact
  []
  [norm_force_z]
    type = PenetrationAux
    variable = norm_force_z
    quantity = normal_force_z
    boundary = reactor_contact
    paired_boundary = soil_contact
  []
  [tang_force_mag]
    type = PenetrationAux
    variable = tang_force_mag
    quantity = tangential_force_magnitude
    boundary = reactor_contact
    paired_boundary = soil_contact
  []
  [tang_force_x]
    type = PenetrationAux
    variable = tang_force_x
    quantity = tangential_force_x
    boundary = reactor_contact
    paired_boundary = soil_contact
  []
  [tang_force_y]
    type = PenetrationAux
    variable = tang_force_y
    quantity = tangential_force_y
    boundary = reactor_contact
    paired_boundary = soil_contact
  []
  [tang_force_z]
    type = PenetrationAux
    variable = tang_force_z
    quantity = tangential_force_z
    boundary = reactor_contact
    paired_boundary = soil_contact
  []
  [friction_energy]
    type = PenetrationAux
    variable = friction_energy
    quantity = frictional_energy
    boundary = reactor_contact
    paired_boundary = soil_contact
  []

  # Set up auxillary kernels for stress-strain tensors
  [stress_xy]
    type = RankTwoAux
    rank_two_tensor = stress
    variable = stress_xy
    index_i = 1
    index_j = 0
  []
  [stress_yz]
    type = RankTwoAux
    rank_two_tensor = stress
    variable = stress_yz
    index_i = 2
    index_j = 1
  []
  [stress_zx]
    type = RankTwoAux
    rank_two_tensor = stress
    variable = stress_zx
    index_i = 0
    index_j = 2
  []
  [strain_xy]
    type = RankTwoAux
    rank_two_tensor = total_strain
    variable = stress_xy
    index_i = 1
    index_j = 0
  []
  [strain_yz]
    type = RankTwoAux
    rank_two_tensor = total_strain
    variable = strain_yz
    index_i = 2
    index_j = 1
  []
  [strain_zx]
    type = RankTwoAux
    rank_two_tensor = total_strain
    variable = strain_zx
    index_i = 0
    index_j = 2
  []
  [stress_xx]
    type = RankTwoAux
    rank_two_tensor = stress
    variable = stress_xx
    index_i = 0
    index_j = 0
  []
  [stress_yy]
    type = RankTwoAux
    rank_two_tensor = stress
    variable = stress_yy
    index_i = 1
    index_j = 1
  []
  [stress_zz]
    type = RankTwoAux
    rank_two_tensor = stress
    variable = stress_zz
    index_i = 2
    index_j = 2
  []
  [strain_xx]
    type = RankTwoAux
    rank_two_tensor = total_strain
    variable = strain_xx
    index_i = 0
    index_j = 0
  []
  [strain_yy]
    type = RankTwoAux
    rank_two_tensor =total_strain
    variable = strain_yy
    index_i = 1
    index_j = 1
  []
  [strain_zz]
    type = RankTwoAux
    rank_two_tensor = total_strain
    variable = strain_zz
    index_i = 2
    index_j = 2
  []
[]
```

And don't forget your contact constraint object, of course:

```
[Contact]
  [ssi_contact]
    slave = reactor_contact
    master = soil_contact # make coarser mesh the master
    model = coulomb
    friction_coefficient = 0.5
    formulation = penalty
    penalty = 1.0e8
    normalize_penalty = true
  []
[]
```

Then, just set up your outputs to write an ExodusII file and open in it up in ParaView or something. This alone should give you a lot of information. 

When it comes to post-processing a field variable's solution, don't even bother with PostProcessor objects. Just be sure to set up it's variable object so that it gets written to the exo file.
Reply all
Reply to author
Forward
0 new messages