NEML Stress
Use a constitutive model in the NEML library to compute stress
Stress Calculator Based on NEML Constitutive Models
This material model provides an interface to the constitutive models for structural materials provided by the Nuclear Engineering Material model Library (NEML) developed by Argonne National Laboratory. This is a general interface to all of the models provided by that library, which are documented in detail in the NEML documentation.
NEML permits the definition of complex material constitutive models, the details of which are defined in an XML file that is independent of the MOOSE input file. The required inputs for this model on the MOOSE side simply provide the location of the XML file, which contains a database of potentially multiple material models, and the name of the model within that database to be used. This model computes the stress, elasticity tensor, and material Jacobian.
Using this model requires that the NEML source code is present. NEML is provided as a submodule in BlackBear under the directory blackbear/contrib/neml
. The up-to-date version of the NEML submodule is obtained using:
git submodule init
git submodule update
in the blackbear
directory. NEML is compiled using the MOOSE build system, so no separate compilation step is required to build the library.
(test/tests/neml_simple/le_stress.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[Mesh]
type = GeneratedMesh
dim = 3
[]
[Kernels]
[TensorMechanics]
[]
[]
[AuxVariables]
[strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[strain_yz]
order = CONSTANT
family = MONOMIAL
[]
[strain_xz]
order = CONSTANT
family = MONOMIAL
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[stress_yz]
order = CONSTANT
family = MONOMIAL
[]
[stress_xz]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[strain_xx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[]
[strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[]
[strain_zz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[strain_xy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xy
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[strain_yz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yz
index_i = 1
index_j = 2
execute_on = timestep_end
[]
[strain_xz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xz
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[]
[stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
execute_on = timestep_end
[]
[stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[]
[BCs]
[fx]
type = DirichletBC
variable = disp_x
boundary = 4
value = 0.0
[]
[fy]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[]
[fz]
type = DirichletBC
variable = disp_z
boundary = 0
value = 0.0
[]
[pz]
type = FunctionDirichletBC
variable = disp_z
boundary = 5
function = pull
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1'
y = '0 0.1'
[]
[]
[Materials]
[strain]
type = ComputeSmallStrain
[]
[stress]
type = NEMLStress
model = simple_example
database = 'examples.xml'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = True
[]
[]
[Postprocessors]
[stress_xx]
type = ElementAverageValue
variable = stress_xx
[]
[stress_yy]
type = ElementAverageValue
variable = stress_yy
[]
[stress_zz]
type = ElementAverageValue
variable = stress_zz
[]
[stress_xy]
type = ElementAverageValue
variable = stress_xy
[]
[stress_xz]
type = ElementAverageValue
variable = stress_xz
[]
[stress_yz]
type = ElementAverageValue
variable = stress_yz
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
l_max_its = 2
l_tol = 1e-3
nl_max_its = 10
nl_rel_tol = 1e-6
nl_abs_tol = 1e-8
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
end_time = 1.0
dt = 1.0
[]
[Outputs]
exodus = false
console = true
csv = true
[]
(test/tests/neml_complex/examples.xml)
<materials>
<simple_example type="SmallStrainElasticity">
<elastic type="IsotropicLinearElasticModel">
<m1_type>youngs</m1_type>
<m1>100000</m1>
<m2_type>poissons</m2_type>
<m2>0.30</m2>
</elastic>
<alpha>1.0e-4</alpha>
</simple_example>
<variable_example type="SmallStrainElasticity">
<elastic type="IsotropicLinearElasticModel">
<m1_type>youngs</m1_type>
<m1>{YoungsVar}</m1>
<m2_type>poissons</m2_type>
<m2>{PoissonsVar}</m2>
</elastic>
<alpha>1.0e-4</alpha>
</variable_example>
<complex_example type="GeneralIntegrator">
<elastic type="IsotropicLinearElasticModel">
<m1>150000.0</m1>
<m1_type>youngs</m1_type>
<m2>0.3</m2>
<m2_type>poissons</m2_type>
</elastic>
<rule type="TVPFlowRule">
<elastic type="IsotropicLinearElasticModel">
<m1>150000.0</m1>
<m1_type>youngs</m1_type>
<m2>0.3</m2>
<m2_type>poissons</m2_type>
</elastic>
<flow type="PerzynaFlowRule">
<surface type="IsoJ2"/>
<hardening type="LinearIsotropicHardeningRule">
<s0>100.0</s0>
<K>2500.0</K>
</hardening>
<g type="GPowerLaw">
<n>5.0</n>
<eta>100.0</eta>
</g>
</flow>
</rule>
</complex_example>
</materials>
(test/tests/neml_simple/le_stress_variableOverwrite.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[Mesh]
type = GeneratedMesh
dim = 3
[]
[Kernels]
[TensorMechanics]
[]
[]
[AuxVariables]
[strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[strain_yz]
order = CONSTANT
family = MONOMIAL
[]
[strain_xz]
order = CONSTANT
family = MONOMIAL
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[stress_yz]
order = CONSTANT
family = MONOMIAL
[]
[stress_xz]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[strain_xx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[]
[strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[]
[strain_zz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[strain_xy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xy
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[strain_yz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yz
index_i = 1
index_j = 2
execute_on = timestep_end
[]
[strain_xz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xz
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[]
[stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
execute_on = timestep_end
[]
[stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[]
[BCs]
[fx]
type = DirichletBC
variable = disp_x
boundary = 4
value = 0.0
[]
[fy]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[]
[fz]
type = DirichletBC
variable = disp_z
boundary = 0
value = 0.0
[]
[pz]
type = FunctionDirichletBC
variable = disp_z
boundary = 5
function = pull
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1'
y = '0 0.1'
[]
[]
[Materials]
[strain]
type = ComputeSmallStrain
[]
[stress]
type = NEMLStress
database = 'examples.xml'
model = variable_example
neml_variable_iname = 'PoissonsVar YoungsVar'
neml_variable_value = '0.3 100000'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = True
[]
[]
[Postprocessors]
[stress_xx]
type = ElementAverageValue
variable = stress_xx
[]
[stress_yy]
type = ElementAverageValue
variable = stress_yy
[]
[stress_zz]
type = ElementAverageValue
variable = stress_zz
[]
[stress_xy]
type = ElementAverageValue
variable = stress_xy
[]
[stress_xz]
type = ElementAverageValue
variable = stress_xz
[]
[stress_yz]
type = ElementAverageValue
variable = stress_yz
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
l_max_its = 2
l_tol = 1e-3
nl_max_its = 10
nl_rel_tol = 1e-6
nl_abs_tol = 1e-8
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
end_time = 1.0
dt = 1.0
[]
[Outputs]
file_base = le_stress_out
exodus = false
console = true
csv = true
[]
(test/tests/neml_complex/examples.xml)
<materials>
<simple_example type="SmallStrainElasticity">
<elastic type="IsotropicLinearElasticModel">
<m1_type>youngs</m1_type>
<m1>100000</m1>
<m2_type>poissons</m2_type>
<m2>0.30</m2>
</elastic>
<alpha>1.0e-4</alpha>
</simple_example>
<variable_example type="SmallStrainElasticity">
<elastic type="IsotropicLinearElasticModel">
<m1_type>youngs</m1_type>
<m1>{YoungsVar}</m1>
<m2_type>poissons</m2_type>
<m2>{PoissonsVar}</m2>
</elastic>
<alpha>1.0e-4</alpha>
</variable_example>
<complex_example type="GeneralIntegrator">
<elastic type="IsotropicLinearElasticModel">
<m1>150000.0</m1>
<m1_type>youngs</m1_type>
<m2>0.3</m2>
<m2_type>poissons</m2_type>
</elastic>
<rule type="TVPFlowRule">
<elastic type="IsotropicLinearElasticModel">
<m1>150000.0</m1>
<m1_type>youngs</m1_type>
<m2>0.3</m2>
<m2_type>poissons</m2_type>
</elastic>
<flow type="PerzynaFlowRule">
<surface type="IsoJ2"/>
<hardening type="LinearIsotropicHardeningRule">
<s0>100.0</s0>
<K>2500.0</K>
</hardening>
<g type="GPowerLaw">
<n>5.0</n>
<eta>100.0</eta>
</g>
</flow>
</rule>
</complex_example>
</materials>
(test/tests/neml_stochasticSimple/le_stress_simple.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[Mesh]
type = GeneratedMesh
dim = 3
[]
[Kernels]
[TensorMechanics]
[]
[]
[AuxVariables]
[strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[strain_yz]
order = CONSTANT
family = MONOMIAL
[]
[strain_xz]
order = CONSTANT
family = MONOMIAL
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[stress_yz]
order = CONSTANT
family = MONOMIAL
[]
[stress_xz]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[strain_xx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[]
[strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[]
[strain_zz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[strain_xy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xy
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[strain_yz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yz
index_i = 1
index_j = 2
execute_on = timestep_end
[]
[strain_xz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xz
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[]
[stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
execute_on = timestep_end
[]
[stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[]
[BCs]
[fx]
type = DirichletBC
variable = disp_x
boundary = 4
value = 0.0
[]
[fy]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[]
[fz]
type = DirichletBC
variable = disp_z
boundary = 0
value = 0.0
[]
[pz]
type = FunctionDirichletBC
variable = disp_z
boundary = 5
function = pull
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1'
y = '0 0.1'
[]
[]
[Materials]
[strain]
type = ComputeSmallStrain
[]
[stress]
type = NEMLStress
database = 'examples.xml'
model = variable_example
neml_variable_iname = 'YoungsVar PoissonsVar'
neml_variable_value = '100000 0.3'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = True
[]
[]
[Postprocessors]
[avg_stress_xx]
type = ElementAverageValue
variable = stress_xx
[]
[avg_stress_yy]
type = ElementAverageValue
variable = stress_yy
[]
[avg_stress_zz]
type = ElementAverageValue
variable = stress_zz
[]
[avg_stress_xy]
type = ElementAverageValue
variable = stress_xy
[]
[avg_stress_xz]
type = ElementAverageValue
variable = stress_xz
[]
[avg_stress_yz]
type = ElementAverageValue
variable = stress_yz
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
l_max_its = 2
l_tol = 1e-3
nl_max_its = 10
nl_rel_tol = 1e-6
nl_abs_tol = 1e-8
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
end_time = 1.0
dt = 1.0
[]
[Controls]
[samplerReciever]
type=SamplerReceiver
[]
[]
[Outputs]
exodus = false
[]
(test/tests/neml_benchmark/linear_strain_hardening/elas_plas_LSH_neml.i)
#
[GlobalParams]
order = FIRST
family = LAGRANGE
volumetric_locking_correction = true
displacements = 'disp_x disp_y'
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
xmax = 1.0
ymax = 1.0
elem_type = QUAD4
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
strain = FINITE
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz stress_xy vonmises_stress hydrostatic_stress elastic_strain_xx elastic_strain_yy elastic_strain_zz strain_xx strain_yy strain_zz'
[../]
[]
[Functions]
[./appl_dispy]
type = PiecewiseLinear
x = '0 1.0 2.0 3.0'
y = '0.0 0.208e-4 0.50e-4 1.00e-4'
[../]
[]
[BCs]
[./side_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./bot_y]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./top_y]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = appl_dispy
[../]
[]
[Materials]
[./stress]
type = NEMLStress
database = 'LSH_matl.xml'
model = 'AC_simple'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
line_search = 'none'
nl_rel_tol = 1e-9
nl_abs_tol = 1e-10
l_tol = 1e-4
l_max_its = 100
nl_max_its = 20
dt = 0.1
dtmin = 0.001
start_time = 0.0
end_time = 2.0
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
[]
[Postprocessors]
[./stress_xx]
type = ElementAverageValue
variable = stress_xx
[../]
[./stress_yy]
type = ElementAverageValue
variable = stress_yy
[../]
[./stress_zz]
type = ElementAverageValue
variable = stress_zz
[../]
[./stress_xy]
type = ElementAverageValue
variable = stress_xy
[../]
[./vonmises]
type = ElementAverageValue
variable = vonmises_stress
[../]
[./pressure]
type = ElementAverageValue
variable = hydrostatic_stress
[../]
[./el_strain_xx]
type = ElementAverageValue
variable = elastic_strain_xx
[../]
[./el_strain_yy]
type = ElementAverageValue
variable = elastic_strain_yy
[../]
[./el_strain_zz]
type = ElementAverageValue
variable = elastic_strain_zz
[../]
[./tot_strain_xx]
type = ElementAverageValue
variable = strain_xx
[../]
[./tot_strain_yy]
type = ElementAverageValue
variable = strain_yy
[../]
[./tot_strain_zz]
type = ElementAverageValue
variable = strain_zz
[../]
[./disp_x1]
type = NodalVariableValue
nodeid = 0
variable = disp_x
[../]
[./disp_x4]
type = NodalVariableValue
nodeid = 3
variable = disp_x
[../]
[./disp_y1]
type = NodalVariableValue
nodeid = 0
variable = disp_y
[../]
[./disp_y4]
type = NodalVariableValue
nodeid = 3
variable = disp_y
[../]
[./_dt]
type = TimestepSize
[../]
# [./num_lin_it]
# type = NumLinearIterations
# [../]
# [./num_nonlin_it]
# type = NumNonlinearIterations
# [../]
# [./tot_lin_it]
# type = CumulativeValuePostprocessor
# postprocessor = num_lin_it
# [../]
# [./tot_nonlin_it]
# type = CumulativeValuePostprocessor
# postprocessor = num_nonlin_it
# [../]
# [./alive_time]
# type = PerfGraphData
# section_name = Root
# data_type = TOTAL
# [../]
[]
[Outputs]
exodus = true
csv = true
[./console]
type = Console
output_linear = true
[../]
[]
(test/tests/neml_simple/le_stress_thermal.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[Mesh]
type = GeneratedMesh
dim = 3
[]
[Kernels]
[TensorMechanics]
[]
[]
[AuxVariables]
[strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[strain_yz]
order = CONSTANT
family = MONOMIAL
[]
[strain_xz]
order = CONSTANT
family = MONOMIAL
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[stress_yz]
order = CONSTANT
family = MONOMIAL
[]
[stress_xz]
order = CONSTANT
family = MONOMIAL
[]
[temp]
initial_condition = 0.0
[]
[]
[AuxKernels]
[strain_xx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[]
[strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[]
[strain_zz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[strain_xy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xy
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[strain_yz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yz
index_i = 1
index_j = 2
execute_on = timestep_end
[]
[strain_xz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xz
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[]
[stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
execute_on = timestep_end
[]
[stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[temp]
type = FunctionAux
variable = temp
function = temperature
[]
[]
[BCs]
[fx]
type = DirichletBC
variable = disp_x
boundary = 4
value = 0.0
[]
[fy]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[]
[fz]
type = DirichletBC
variable = disp_z
boundary = 0
value = 0.0
[]
[pz]
type = DirichletBC
variable = disp_z
boundary = 5
value = 0.0
[]
[]
[Functions]
[temperature]
type = PiecewiseLinear
x = '0 1'
y = '0 100.0'
[]
[]
[Materials]
[strain]
type = ComputeSmallStrain
eigenstrain_names = thermal
[]
[stress]
type = NEMLStress
database = 'examples.xml'
model = 'simple_example'
temperature = temp
[]
[thermal_strain]
type = NEMLThermalExpansionEigenstrain
database = 'examples.xml'
model = 'simple_example'
temperature = temp
eigenstrain_name = thermal
stress_free_temperature = 0.0
[]
[]
[Preconditioning]
[pc]
type = SMP
full = True
[]
[]
[Postprocessors]
[stress_xx]
type = ElementAverageValue
variable = stress_xx
[]
[stress_yy]
type = ElementAverageValue
variable = stress_yy
[]
[stress_zz]
type = ElementAverageValue
variable = stress_zz
[]
[stress_xy]
type = ElementAverageValue
variable = stress_xy
[]
[stress_xz]
type = ElementAverageValue
variable = stress_xz
[]
[stress_yz]
type = ElementAverageValue
variable = stress_yz
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
l_max_its = 2
l_tol = 1e-3
nl_max_its = 10
nl_rel_tol = 1e-6
nl_abs_tol = 1e-8
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
end_time = 1.0
dt = 1.0
[]
[Outputs]
exodus = false
console = true
csv = true
[]
(test/tests/neml_complex/inelastic_dt.i)
#
#
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
type = GeneratedMesh
dim = 3
[]
[Modules/TensorMechanics/Master]
[all]
generate_output = 'strain_xx strain_yy strain_zz strain_xy strain_yz strain_xz
stress_xx stress_yy stress_zz stress_xy stress_yz stress_xz'
add_variables = true
[]
[]
[BCs]
[fx]
type = DirichletBC
variable = disp_x
boundary = 4
value = 0.0
[]
[fy]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[]
[fz]
type = DirichletBC
variable = disp_z
boundary = 0
value = 0.0
[]
[px]
type = FunctionDirichletBC
preset = true
variable = disp_x
boundary = 2
function = pull
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 500.0 1000.0'
y = '0 0.01 0.02'
[]
[]
[Materials]
[stress]
type = NEMLStress
database = 'examples.xml'
model = 'complex_example'
target_increment = 1e-3
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Postprocessors]
[min_dt]
type = ElementExtremeMaterialProperty
value_type = min
mat_prop = material_timestep_limit
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
l_max_its = 5
l_tol = 1e-14
nl_max_its = 10
nl_rel_tol = 1e-10
nl_abs_tol = 1e-12
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
end_time = 1000.0
dt = 100.0
[]
[Outputs]
exodus = false
console = true
csv = true
[]
(test/tests/neml_complex/inelastic.i)
#
#
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
type = GeneratedMesh
dim = 3
[]
[Modules/TensorMechanics/Master]
[all]
generate_output = 'strain_xx strain_yy strain_zz strain_xy strain_yz strain_xz
stress_xx stress_yy stress_zz stress_xy stress_yz stress_xz'
add_variables = true
[]
[]
[BCs]
[fx]
type = DirichletBC
variable = disp_x
boundary = 4
value = 0.0
[]
[fy]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[]
[fz]
type = DirichletBC
variable = disp_z
boundary = 0
value = 0.0
[]
[px]
type = FunctionDirichletBC
preset = true
variable = disp_x
boundary = 2
function = pull
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 10000.0'
y = '0 0.1'
[]
[]
[Materials]
[stress]
type = NEMLStress
database = 'examples.xml'
model = 'complex_example'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Postprocessors]
[stress_xx]
type = ElementAverageValue
variable = stress_xx
[]
[stress_yy]
type = ElementAverageValue
variable = stress_yy
[]
[stress_zz]
type = ElementAverageValue
variable = stress_zz
[]
[stress_xy]
type = ElementAverageValue
variable = stress_xy
[]
[stress_xz]
type = ElementAverageValue
variable = stress_xz
[]
[stress_yz]
type = ElementAverageValue
variable = stress_yz
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
l_max_its = 5
l_tol = 1e-14
nl_max_its = 10
nl_rel_tol = 1e-10
nl_abs_tol = 1e-12
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
end_time = 10000.0
dt = 100.0
[]
[Outputs]
exodus = false
console = true
csv = true
[]
(test/tests/neml_benchmark/power_law_creep/nafems_test5a_lim_neml.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
volumetric_locking_correction = true
displacements = 'disp_x disp_y'
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
xmax = 0.1
ymax = 0.1
elem_type = QUAD4
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
strain = FINITE
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz stress_xy vonmises_stress hydrostatic_stress elastic_strain_xx elastic_strain_yy elastic_strain_zz strain_xx strain_yy strain_zz thirdinv_stress'
[../]
[]
[BCs]
[./bot_y]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./side_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./top_press]
type = Pressure
variable = disp_y
boundary = top
component = 1
factor = -100.0
[../]
[./side_press]
type = Pressure
variable = disp_x
boundary = right
component = 0
factor = -200.0
[../]
[]
[Materials]
[./stress]
type = NEMLStress
database = 'power_law_creep.xml'
model = 'test_pcreep'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu superlu_dist'
line_search = 'none'
nl_rel_tol = 1e-9
nl_abs_tol = 1e-8
l_max_its = 50
nl_max_its = 100
end_time = 1000.0
l_tol = 1e-3
[./TimeStepper]
type = IterationAdaptiveDT
dt = 1e-6
time_t = '1e-6 2e-6 3e-6 5e-6 9e-6 1.7e-5 3.3e-5 6.5e-5 1.29e-4 2.57e-4 5.13e-4 1.025e-3 2.049e-3 4.097e-3 8.193e-3 1.638e-2 3.276e-2 5.734e-2 0.106 0.180 0.291 0.457 0.706 1.08 1.64 2.48 3.74 5.63 8.46 12.7 19.1 28.7 43.0 64.5 108.0 194.0 366.0 710.0 1000.0'
time_dt = '1e-6 1e-6 2e-6 4e-6 8e-6 1.6e-5 3.2e-5 6.4e-5 1.28e-4 2.56e-4 5.12e-4 1.024e-3 2.048e-3 4.096e-3 8.192e-3 1.6384e-2 2.458e-2 4.915e-2 7.40e-2 0.111 0.166 0.249 0.374 0.560 0.840 1.26 1.89 2.83 4.25 6.40 9.6 14.3 21.5 43.0 86.1 172.0 344.0 290.0 290.0'
optimal_iterations = 30
iteration_window = 9
growth_factor = 2.0
cutback_factor = 0.5
[../]
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
[]
[Postprocessors]
[./tot_strain_xx]
type = ElementAverageValue
variable = strain_xx
[../]
[./tot_strain_yy]
type = ElementAverageValue
variable = strain_yy
[../]
[./sigma_xx]
type = ElementAverageValue
variable = stress_xx
[../]
[./sigma_yy]
type = ElementAverageValue
variable = stress_yy
[../]
[./sigma_zz]
type = ElementAverageValue
variable = stress_zz
[../]
[./vonmises]
type = ElementAverageValue
variable = vonmises_stress
[../]
[./pressure]
type = ElementAverageValue
variable = hydrostatic_stress
[../]
[./invariant3]
type = ElementAverageValue
variable = thirdinv_stress
[../]
[./disp_x2]
type = NodalVariableValue
nodeid = 1
variable = disp_x
[../]
[./disp_x3]
type = NodalVariableValue
nodeid = 2
variable = disp_x
[../]
[./disp_y3]
type = NodalVariableValue
nodeid = 2
variable = disp_y
[../]
[./disp_y4]
type = NodalVariableValue
nodeid = 3
variable = disp_y
[../]
[./_dt]
type = TimestepSize
[../]
[./elas_str_xx]
type = ElementAverageValue
variable = elastic_strain_xx
[../]
[./elas_str_yy]
type = ElementAverageValue
variable = elastic_strain_yy
[../]
[./elas_str_zz]
type = ElementAverageValue
variable = elastic_strain_zz
[../]
# [./num_lin_it]
# type = NumLinearIterations
# [../]
# [./num_nonlin_it]
# type = NumNonlinearIterations
# [../]
# [./tot_lin_it]
# type = CumulativeValuePostprocessor
# postprocessor = num_lin_it
# [../]
# [./tot_nonlin_it]
# type = CumulativeValuePostprocessor
# postprocessor = num_nonlin_it
# [../]
# [./alive_time]
# type = PerfGraphData
# section_name = Root
# data_type = TOTAL
# [../]
[]
[Outputs]
print_linear_residuals = true
perf_graph = true
csv = true
[./out]
type = Exodus
elemental_as_nodal = true
[../]
[./console]
type = Console
max_rows = 25
[../]
[]
(test/tests/neml_simple/le_stress.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[Mesh]
type = GeneratedMesh
dim = 3
[]
[Kernels]
[TensorMechanics]
[]
[]
[AuxVariables]
[strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[strain_yz]
order = CONSTANT
family = MONOMIAL
[]
[strain_xz]
order = CONSTANT
family = MONOMIAL
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[stress_yz]
order = CONSTANT
family = MONOMIAL
[]
[stress_xz]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[strain_xx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[]
[strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[]
[strain_zz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[strain_xy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xy
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[strain_yz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yz
index_i = 1
index_j = 2
execute_on = timestep_end
[]
[strain_xz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xz
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[]
[stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
execute_on = timestep_end
[]
[stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[]
[BCs]
[fx]
type = DirichletBC
variable = disp_x
boundary = 4
value = 0.0
[]
[fy]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[]
[fz]
type = DirichletBC
variable = disp_z
boundary = 0
value = 0.0
[]
[pz]
type = FunctionDirichletBC
variable = disp_z
boundary = 5
function = pull
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1'
y = '0 0.1'
[]
[]
[Materials]
[strain]
type = ComputeSmallStrain
[]
[stress]
type = NEMLStress
model = simple_example
database = 'examples.xml'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = True
[]
[]
[Postprocessors]
[stress_xx]
type = ElementAverageValue
variable = stress_xx
[]
[stress_yy]
type = ElementAverageValue
variable = stress_yy
[]
[stress_zz]
type = ElementAverageValue
variable = stress_zz
[]
[stress_xy]
type = ElementAverageValue
variable = stress_xy
[]
[stress_xz]
type = ElementAverageValue
variable = stress_xz
[]
[stress_yz]
type = ElementAverageValue
variable = stress_yz
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
l_max_its = 2
l_tol = 1e-3
nl_max_its = 10
nl_rel_tol = 1e-6
nl_abs_tol = 1e-8
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
end_time = 1.0
dt = 1.0
[]
[Outputs]
exodus = false
console = true
csv = true
[]
(test/tests/neml_regression/neml_regression.i)
# This is a common input file that can be used for all NEML regression tests, which
# use a material driver.
# Notes:
# 1) A single csv file provides both the expected temperature and strain inputs and
# stress outputs. This file is almost identical to the one used in the NEML tests,
# is named 'test_x_out.csv', and lives in the 'gold' directory. The only change
# made to this file is that a first row with headings is added. It may seem odd
# to use the same file for the inputs and the gold results, but it facilitates
# supplying and comparing to the NEML regression tests.
# 2) Mandel notation is used in the ordering of the stress/strain components in this
# file. There is a scaling factor of sqrt(2) used in converting between those and
# the tensor components used in MOOSE.
# 3) Because all DOFs on the nodes of the single element are fully prescribed, there
# is no solution needed, so every step solves with no iterations.
# 4) The computations are a bit slow will full integration. Single point integration
# can be used here without changing the solution, and is employed to accelerate
# these computations.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[cube]
type = GeneratedMeshGenerator
dim = 3
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
generate_output = 'strain_xx strain_yy strain_zz strain_xy strain_yz strain_xz
stress_xx stress_yy stress_zz stress_xy stress_yz stress_xz'
add_variables = true
[]
[]
[AuxVariables]
[temperature]
[]
[]
[AuxKernels]
[temperature]
type = FunctionAux
function = temperature
variable = temperature
execute_on = 'initial timestep_begin'
[]
[]
[BCs]
[x]
type = FunctionDirichletBC
variable = disp_x
boundary = 'left right back front bottom top'
function = u_x
[]
[y]
type = FunctionDirichletBC
variable = disp_y
boundary = 'left right back front bottom top'
function = u_y
[]
[z]
type = FunctionDirichletBC
variable = disp_z
boundary = 'left right back front bottom top'
function = u_z
[]
[]
[Functions]
[temperature]
type = PiecewiseLinear
format = columns
xy_in_file_only = false
x_index_in_file = 0
y_index_in_file = 1
[]
[strain_xx]
type = PiecewiseLinear
format = columns
xy_in_file_only = false
x_index_in_file = 0
y_index_in_file = 2
[]
[strain_yy]
type = PiecewiseLinear
format = columns
xy_in_file_only = false
x_index_in_file = 0
y_index_in_file = 3
[]
[strain_zz]
type = PiecewiseLinear
format = columns
xy_in_file_only = false
x_index_in_file = 0
y_index_in_file = 4
[]
[strain_yz]
type = PiecewiseLinear
format = columns
xy_in_file_only = false
x_index_in_file = 0
y_index_in_file = 5
[]
[strain_xz]
type = PiecewiseLinear
format = columns
xy_in_file_only = false
x_index_in_file = 0
y_index_in_file = 6
[]
[strain_xy]
type = PiecewiseLinear
format = columns
xy_in_file_only = false
x_index_in_file = 0
y_index_in_file = 7
[]
[u_x]
type = ParsedFunction
vars = 'strain_xx strain_xy strain_xz'
vals = 'strain_xx strain_xy strain_xz'
value = 'x*strain_xx + 1/sqrt(2)*y*strain_xy + 1/sqrt(2)*z*strain_xz'
[]
[u_y]
type = ParsedFunction
vars = 'strain_yy strain_xy strain_yz'
vals = 'strain_yy strain_xy strain_yz'
value = 'y*strain_yy + 1/sqrt(2)*x*strain_xy + 1/sqrt(2)*z*strain_yz'
[]
[u_z]
type = ParsedFunction
vars = 'strain_zz strain_xz strain_yz'
vals = 'strain_zz strain_xz strain_yz'
value = 'z*strain_zz + 1/sqrt(2)*x*strain_xz + 1/sqrt(2)*y*strain_yz'
[]
[]
[Materials]
[stress]
type = NEMLStress
model = 'model'
[]
[]
[Postprocessors]
[stress_11]
type = ElementAverageValue
variable = stress_xx
execute_on = 'initial timestep_end'
[]
[stress_22]
type = ElementAverageValue
variable = stress_yy
execute_on = 'initial timestep_end'
[]
[stress_33]
type = ElementAverageValue
variable = stress_zz
execute_on = 'initial timestep_end'
[]
[stress_12_tensor]
type = ElementAverageValue
variable = stress_xy
execute_on = 'initial timestep_end'
outputs = none
[]
[stress_12]
type = LinearCombinationPostprocessor
pp_names = 'stress_12_tensor'
pp_coefs = '1.41421356237'
execute_on = 'initial timestep_end'
[]
[stress_13_tensor]
type = ElementAverageValue
variable = stress_xz
execute_on = 'initial timestep_end'
outputs = none
[]
[stress_13]
type = LinearCombinationPostprocessor
pp_names = 'stress_13_tensor'
pp_coefs = '1.41421356237'
execute_on = 'initial timestep_end'
[]
[stress_23_tensor]
type = ElementAverageValue
variable = stress_yz
execute_on = 'initial timestep_end'
outputs = none
[]
[stress_23]
type = LinearCombinationPostprocessor
pp_names = 'stress_23_tensor'
pp_coefs = '1.41421356237'
execute_on = 'initial timestep_end'
[]
[strain_11]
type = ElementAverageValue
variable = strain_xx
execute_on = 'initial timestep_end'
[]
[strain_22]
type = ElementAverageValue
variable = strain_yy
execute_on = 'initial timestep_end'
[]
[strain_33]
type = ElementAverageValue
variable = strain_zz
execute_on = 'initial timestep_end'
[]
[strain_12_tensor]
type = ElementAverageValue
variable = strain_xy
execute_on = 'initial timestep_end'
outputs = none
[]
[strain_12]
type = LinearCombinationPostprocessor
pp_names = 'strain_12_tensor'
pp_coefs = '1.41421356237'
execute_on = 'initial timestep_end'
[]
[strain_13_tensor]
type = ElementAverageValue
variable = strain_xz
execute_on = 'initial timestep_end'
outputs = none
[]
[strain_13]
type = LinearCombinationPostprocessor
pp_names = 'strain_13_tensor'
pp_coefs = '1.41421356237'
execute_on = 'initial timestep_end'
[]
[strain_23_tensor]
type = ElementAverageValue
variable = strain_yz
execute_on = 'initial timestep_end'
outputs = none
[]
[strain_23]
type = LinearCombinationPostprocessor
pp_names = 'strain_23_tensor'
pp_coefs = '1.41421356237'
execute_on = 'initial timestep_end'
[]
[temperature]
type = ElementAverageValue
variable = temperature
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
[Quadrature]
order = FIRST #Single qp to make this fully prescribed, single-element test run faster
[]
l_max_its = 5
l_tol = 1e-14
nl_max_its = 10
nl_rel_tol = 1e-10
nl_abs_tol = 1e-12
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
end_time = 1000.0
dt = 10.0
[]
[Outputs]
[csv]
type = CSV
[]
[]
(test/tests/neml_simple/le_stress_variableOverwrite.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[Mesh]
type = GeneratedMesh
dim = 3
[]
[Kernels]
[TensorMechanics]
[]
[]
[AuxVariables]
[strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[strain_yz]
order = CONSTANT
family = MONOMIAL
[]
[strain_xz]
order = CONSTANT
family = MONOMIAL
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[stress_yz]
order = CONSTANT
family = MONOMIAL
[]
[stress_xz]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[strain_xx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[]
[strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[]
[strain_zz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[strain_xy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xy
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[strain_yz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yz
index_i = 1
index_j = 2
execute_on = timestep_end
[]
[strain_xz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xz
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[]
[stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
execute_on = timestep_end
[]
[stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[]
[BCs]
[fx]
type = DirichletBC
variable = disp_x
boundary = 4
value = 0.0
[]
[fy]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[]
[fz]
type = DirichletBC
variable = disp_z
boundary = 0
value = 0.0
[]
[pz]
type = FunctionDirichletBC
variable = disp_z
boundary = 5
function = pull
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1'
y = '0 0.1'
[]
[]
[Materials]
[strain]
type = ComputeSmallStrain
[]
[stress]
type = NEMLStress
database = 'examples.xml'
model = variable_example
neml_variable_iname = 'PoissonsVar YoungsVar'
neml_variable_value = '0.3 100000'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = True
[]
[]
[Postprocessors]
[stress_xx]
type = ElementAverageValue
variable = stress_xx
[]
[stress_yy]
type = ElementAverageValue
variable = stress_yy
[]
[stress_zz]
type = ElementAverageValue
variable = stress_zz
[]
[stress_xy]
type = ElementAverageValue
variable = stress_xy
[]
[stress_xz]
type = ElementAverageValue
variable = stress_xz
[]
[stress_yz]
type = ElementAverageValue
variable = stress_yz
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
l_max_its = 2
l_tol = 1e-3
nl_max_its = 10
nl_rel_tol = 1e-6
nl_abs_tol = 1e-8
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
end_time = 1.0
dt = 1.0
[]
[Outputs]
file_base = le_stress_out
exodus = false
console = true
csv = true
[]