Skip to content
Permalink
Browse files

Merge pull request #13317 from tophmatthews/ad_creep

AD robustness tests
  • Loading branch information...
lindsayad committed May 20, 2019
2 parents d286709 + dee2bce commit 77c5b83bab223f117da5381a56bb2200dfa287d8
Showing with 838 additions and 84 deletions.
  1. +1 −0 modules/combined/test/tests/ad_power_law_creep/gold/power_law_creep_out.e
  2. +1 −0 modules/combined/test/tests/ad_power_law_creep/gold/power_law_creep_restart2_tm_out.e
  3. +1 −0 modules/combined/test/tests/ad_power_law_creep/gold/power_law_creep_smallstrain_out.e
  4. +132 −0 modules/combined/test/tests/ad_power_law_creep/power_law_creep.i
  5. +144 −0 modules/combined/test/tests/ad_power_law_creep/power_law_creep_restart1.i
  6. +145 −0 modules/combined/test/tests/ad_power_law_creep/power_law_creep_restart2.i
  7. +90 −0 modules/combined/test/tests/ad_power_law_creep/power_law_creep_simple.i
  8. +149 −0 modules/combined/test/tests/ad_power_law_creep/power_law_creep_smallstrain.i
  9. +84 −0 modules/combined/test/tests/ad_power_law_creep/tests
  10. BIN modules/combined/test/tests/power_law_creep/gold/power_law_creep_test_out.e
  11. BIN modules/combined/test/tests/power_law_creep/gold/power_law_creep_test_tm_out.e
  12. +2 −6 modules/tensor_mechanics/include/materials/ADPowerLawCreepStressUpdate.h
  13. +3 −15 modules/tensor_mechanics/include/materials/ADRadialReturnStressUpdate.h
  14. +6 −7 modules/tensor_mechanics/include/materials/ADSingleVariableReturnMappingSolution.h
  15. +0 −1 modules/tensor_mechanics/include/materials/SingleVariableReturnMappingSolution.h
  16. +3 −3 modules/tensor_mechanics/src/kernels/ADStressDivergenceTensors.C
  17. +8 −11 modules/tensor_mechanics/src/materials/ADPowerLawCreepStressUpdate.C
  18. +4 −6 modules/tensor_mechanics/src/materials/ADRadialReturnStressUpdate.C
  19. +15 −21 modules/tensor_mechanics/src/materials/ADSingleVariableReturnMappingSolution.C
  20. +2 −2 modules/tensor_mechanics/src/materials/PowerLawCreepStressUpdate.C
  21. +6 −12 modules/tensor_mechanics/src/materials/SingleVariableReturnMappingSolution.C
  22. +33 −0 test/tests/kernels/ad_jacobians/test.i
  23. +9 −0 test/tests/kernels/ad_jacobians/tests
@@ -0,0 +1,132 @@
# 1x1x1 unit cube with uniform pressure on top face

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

[Mesh]
type = GeneratedMesh
dim = 3
[]

[Variables]
[./temp]
initial_condition = 1000.0
[../]
[]

[Modules/TensorMechanics/Master]
[./all]
strain = FINITE
incremental = true
add_variables = true
generate_output = 'stress_yy creep_strain_xx creep_strain_yy creep_strain_zz elastic_strain_yy'
use_automatic_differentiation = true
[../]
[]

[Kernels]
[./heat]
type = ADHeatConduction
variable = temp
[../]
[./heat_ie]
type = ADHeatConductionTimeDerivative
variable = temp
[../]
[]

[BCs]
[./u_top_pull]
type = ADPressure
variable = disp_y
component = 1
boundary = top
constant = -10.0e6
[../]
[./u_bottom_fix]
type = ADPresetBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./u_yz_fix]
type = ADPresetBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./u_xy_fix]
type = ADPresetBC
variable = disp_z
boundary = back
value = 0.0
[../]
[./temp_fix]
type = DirichletBC
variable = temp
boundary = 'bottom top'
value = 1000.0
[../]
[]

[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2e11
poissons_ratio = 0.3
[../]
[./radial_return_stress]
type = ADComputeMultipleInelasticStress
inelastic_models = 'power_law_creep'
[../]
[./power_law_creep]
type = ADPowerLawCreepStressUpdate
coefficient = 1.0e-15
n_exponent = 4
activation_energy = 3.0e5
temperature = temp
[../]

[./thermal]
type = HeatConductionMaterial
specific_heat = 1.0
thermal_conductivity = 100.
[../]
[./density]
type = ADDensity
density = 1.0
[../]
[]

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

[Executioner]
type = Transient
solve_type = 'PJFNK'

petsc_options = '-snes_ksp'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'

line_search = 'none'

l_max_its = 20
nl_max_its = 20
nl_rel_tol = 1e-6
nl_abs_tol = 1e-6
l_tol = 1e-5
start_time = 0.0
end_time = 1.0
num_steps = 10
dt = 0.1
[]

[Outputs]
exodus = true
[]
@@ -0,0 +1,144 @@
# 1x1x1 unit cube with uniform pressure on top face

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

[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
[]

[Variables]
[./temp]
order = FIRST
family = LAGRANGE
initial_condition = 1000.0
[../]
[]

[Modules/TensorMechanics/Master]
[./all]
strain = FINITE
incremental = true
add_variables = true
generate_output = 'stress_yy creep_strain_xx creep_strain_yy creep_strain_zz elastic_strain_yy'
use_automatic_differentiation = true
[../]
[]

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

[Kernels]
[./heat]
type = ADHeatConduction
variable = temp
[../]
[./heat_ie]
type = ADHeatConductionTimeDerivative
variable = temp
[../]
[]

[BCs]
[./u_top_pull]
type = ADPressure
variable = disp_y
component = 1
boundary = top
constant = -10.0e6
function = top_pull
[../]
[./u_bottom_fix]
type = ADPresetBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./u_yz_fix]
type = ADPresetBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./u_xy_fix]
type = ADPresetBC
variable = disp_z
boundary = back
value = 0.0
[../]
[./temp_fix]
type = DirichletBC
variable = temp
boundary = 'bottom top'
value = 1000.0
[../]
[]

[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2e11
poissons_ratio = 0.3
[../]
[./radial_return_stress]
type = ADComputeMultipleInelasticStress
inelastic_models = 'power_law_creep'
[../]
[./power_law_creep]
type = ADPowerLawCreepStressUpdate
coefficient = 1.0e-15
n_exponent = 4
activation_energy = 3.0e5
temperature = temp
[../]

[./thermal]
type = HeatConductionMaterial
specific_heat = 1.0
thermal_conductivity = 100.
[../]
[./density]
type = ADDensity
density = 1.0
[../]
[]

[Executioner]
type = Transient
solve_type = 'PJFNK'

petsc_options = '-snes_ksp'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'

line_search = 'none'

l_max_its = 20
nl_max_its = 20
nl_rel_tol = 1e-6
nl_abs_tol = 1e-6
l_tol = 1e-5
start_time = 0.0
end_time = 1.0
num_steps = 6
dt = 0.1
[]

[Outputs]
exodus = true
csv = true
[./out]
type = Checkpoint
num_files = 1
[../]
[]

0 comments on commit 77c5b83

Please sign in to comment.
You can’t perform that action at this time.