Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Displaced face objects interfere with fake side neighbors (czm) #18175

Closed
lindsayad opened this issue Jun 25, 2021 · 0 comments · Fixed by #18225
Closed

Displaced face objects interfere with fake side neighbors (czm) #18175

lindsayad opened this issue Jun 25, 2021 · 0 comments · Fixed by #18225
Assignees
Labels
C: Framework P: normal A defect affecting operation with a low possibility of significantly affects. T: defect An anomaly, which is anything that deviates from expectations.

Comments

@lindsayad
Copy link
Member

Bug Description

As shared with @arovinelli, if you have use_displaced_mesh = true in a face postprocessor, then _reinit_displaced_face is true in FEProblemBase::reinitNeighbor and so then call the displaced problem reinitNeighbor which produces failed point inversions when interface neighbors don't actually share a common face and when the option to use the undisplaced reference points has not been selected. If there is an interface kernel that suggests that the undisplaced reference points should be used but it doesn't actually execute on the displaced mesh, then its suggestion is ignored (and I think that's an ok default behavior). A fix would be to introduce a _reinit_displaced_interface member that would be false if there are no displaced interface kernels, which would avoid reinit of displaced elements around the interface altogether.

Steps to Reproduce

This input will trigger the failed point inversions warning in dbg mode:

#
# Stretch + rotation test
#
# This test is designed to compute a uniaxial stress and then follow it as the mesh is rotated by 45 degrees.
#
# The mesh is composed of two, single-elemnt blocks
# The large deforamtion traction separation kinematic assumes linear rotations and uses the velocity gradient L to keep track of area changes, hence it converges to the proper solutoin in the limit of dt->0. Smaller the time step higher the accuracy.

[Mesh]
  [./msh]
  type = GeneratedMeshGenerator
  dim = 3
  nx = 1
  ny = 1
  nz = 2
  xmin = -0.5
  xmax = 0.5
  ymin = -0.5
  ymax = 0.5
  zmin = -1
  zmax = 1
  []
  [./new_block]
    type = SubdomainBoundingBoxGenerator
    input = msh
    block_id = 1
    bottom_left = '-0.5 -0.5 0'
    top_right = '0.5 0.5 0.5'
  []
  [./split]
    type = BreakMeshByBlockGenerator
    input = new_block
  []
[]

[GlobalParams]
  displacements = 'disp_x disp_y disp_z'
[]

[Functions]
  [./stretch]
    type = PiecewiseLinear
    x = '0 1'
    y = '0 1e2'
  [../]
[]

[BCs]
  [./fix_x]
    type = DirichletBC
    preset = true
    value = 0.0
    boundary = left
    variable = disp_x
  [../]
  [./fix_y]
    type = DirichletBC
    preset = true
    value = 0.0
    boundary = bottom
    variable = disp_y
  [../]
  [./fix_z]
    type = DirichletBC
    preset = true
    value = 0.0
    boundary = back
    variable = disp_z
  [../]
  [./back_z]
    type = FunctionNeumannBC
    boundary = front
    variable = disp_z
    use_displaced_mesh = false
    function = stretch
  [../]

[]


[Modules]
  [./TensorMechanics]
    [./Master]
      [./all]
        strain = FINITE
        add_variables = true
        use_finite_deform_jacobian = true
        use_automatic_differentiation = true
        generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_yz stress_xz'
      [../]
    [../]
  [../]
[]

[Modules/TensorMechanics/CohesiveZoneMaster]
  [./czm1]
    boundary = 'interface'
    displacements = 'disp_x disp_y disp_z'
  [../]
[]

[Materials]
  [./stress]
    type = ADComputeFiniteStrainElasticStress
  [../]
  [./elasticity_tensor]
    type = ADComputeIsotropicElasticityTensor
    youngs_modulus = 1e3
    poissons_ratio = 0.3
  [../]
  [./czm_3dc]
    type = SalehaniIrani3DCTraction
    boundary = 'interface'
    normal_gap_at_maximum_normal_traction = 0.01
    tangential_gap_at_maximum_shear_traction = 0.005
    maximum_normal_traction = 1000
    maximum_shear_traction = 700
    displacements = 'disp_x disp_y disp_z'
  [../]
[]


[Preconditioning]
  [./SMP]
    type = SMP
    full = true
  [../]
[]

[Postprocessors]
  [./Area]
     type = AreaPostprocessor
     boundary = interface
     use_displaced_mesh = true
  [../]
[]

[Executioner]
  # Executioner
  type = Transient

  solve_type = 'NEWTON'
  line_search = none
  petsc_options_iname = '-pc_type '
  petsc_options_value = 'lu'
  nl_rel_tol = 1e-30
  nl_abs_tol = 1e-10
  l_max_its = 20
  start_time = 0.0
  dt = 0.25
  end_time = 0.25
[]

[Outputs]
  [./out]
    type = CSV
  [../]
[]

Impact

Failed point inversions are always a scary thing. In this case it shouldn't actually impact the simulation, but it does indicate that we are doing unnecessary work.

@lindsayad lindsayad added T: defect An anomaly, which is anything that deviates from expectations. P: normal A defect affecting operation with a low possibility of significantly affects. labels Jun 25, 2021
@lindsayad lindsayad self-assigned this Jun 25, 2021
lindsayad added a commit to lindsayad/moose that referenced this issue Jul 1, 2021
lindsayad added a commit to lindsayad/moose that referenced this issue Jul 1, 2021
Or at least we should not try to invert physical points related to
interface kernels unless we actually have a displaced interface kernel
in our system

Closes idaholab#18175
lindsayad added a commit to lindsayad/moose that referenced this issue Jul 1, 2021
Or at least we should not try to invert physical points related to
interface kernels unless we actually have a displaced interface kernel
in our system

Closes idaholab#18175
lindsayad added a commit to lindsayad/moose that referenced this issue Jul 7, 2021
Or at least we should not try to invert physical points related to
interface kernels unless we actually have a displaced interface kernel
in our system

Closes idaholab#18175
lindsayad added a commit to lindsayad/moose that referenced this issue Jul 8, 2021
Or at least we should not try to invert physical points related to
interface kernels unless we actually have a displaced interface kernel
in our system

Closes idaholab#18175
FY 21 NEAMS Multiphysics Technical Assistance Support automation moved this from To do to Done Jul 9, 2021
jbadger95 pushed a commit to jbadger95/moose that referenced this issue Aug 9, 2021
jbadger95 pushed a commit to jbadger95/moose that referenced this issue Aug 9, 2021
Or at least we should not try to invert physical points related to
interface kernels unless we actually have a displaced interface kernel
in our system

Closes idaholab#18175
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C: Framework P: normal A defect affecting operation with a low possibility of significantly affects. T: defect An anomaly, which is anything that deviates from expectations.
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

1 participant