- custom_small_jacobianThe name of the small stress Jacobian.
C++ Type:MaterialPropertyName
Unit:(no unit assumed)
Controllable:No
Description:The name of the small stress Jacobian.
- custom_small_stressThe name of the small stress.
C++ Type:MaterialPropertyName
Unit:(no unit assumed)
Controllable:No
Description:The name of the small stress.
ComputeLagrangianObjectiveCustomSymmetricStress
Objectively integrated constitutive model with a user-defined small stress and small stress Jacobian, useful for coupling with 3rd party libraries which define custom stress-strain relations.
Input Parameters
- base_nameMaterial property base name
C++ Type:std::string
Controllable:No
Description:Material property base name
- blockThe list of blocks (ids or names) that this object will be applied
C++ Type:std::vector<SubdomainName>
Controllable:No
Description:The list of blocks (ids or names) that this object will be applied
- boundaryThe list of boundaries (ids or names) from the mesh where this object applies
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:The list of boundaries (ids or names) from the mesh where this object applies
- computeTrueWhen false, MOOSE will not call compute methods on this material. The user must call computeProperties() after retrieving the MaterialBase via MaterialBasePropertyInterface::getMaterialBase(). Non-computed MaterialBases are not sorted for dependencies.
Default:True
C++ Type:bool
Controllable:No
Description:When false, MOOSE will not call compute methods on this material. The user must call computeProperties() after retrieving the MaterialBase via MaterialBasePropertyInterface::getMaterialBase(). Non-computed MaterialBases are not sorted for dependencies.
- constant_onNONEWhen ELEMENT, MOOSE will only call computeQpProperties() for the 0th quadrature point, and then copy that value to the other qps.When SUBDOMAIN, MOOSE will only call computeQpProperties() for the 0th quadrature point, and then copy that value to the other qps. Evaluations on element qps will be skipped
Default:NONE
C++ Type:MooseEnum
Options:NONE, ELEMENT, SUBDOMAIN
Controllable:No
Description:When ELEMENT, MOOSE will only call computeQpProperties() for the 0th quadrature point, and then copy that value to the other qps.When SUBDOMAIN, MOOSE will only call computeQpProperties() for the 0th quadrature point, and then copy that value to the other qps. Evaluations on element qps will be skipped
- declare_suffixAn optional suffix parameter that can be appended to any declared properties. The suffix will be prepended with a '_' character.
C++ Type:MaterialPropertyName
Unit:(no unit assumed)
Controllable:No
Description:An optional suffix parameter that can be appended to any declared properties. The suffix will be prepended with a '_' character.
- large_kinematicsFalseUse a large displacement stress update.
Default:False
C++ Type:bool
Controllable:No
Description:Use a large displacement stress update.
- objective_ratetruesdellWhich type of objective integration to use
Default:truesdell
C++ Type:MooseEnum
Options:truesdell, jaumann, green_naghdi
Controllable:No
Description:Which type of objective integration to use
Optional Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:Yes
Description:Set the enabled status of the MooseObject.
- implicitTrueDetermines whether this object is calculated using an implicit or explicit form
Default:True
C++ Type:bool
Controllable:No
Description:Determines whether this object is calculated using an implicit or explicit form
- seed0The seed for the master random number generator
Default:0
C++ Type:unsigned int
Controllable:No
Description:The seed for the master random number generator
- use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Advanced Parameters
- output_propertiesList of material properties, from this material, to output (outputs must also be defined to an output type)
C++ Type:std::vector<std::string>
Controllable:No
Description:List of material properties, from this material, to output (outputs must also be defined to an output type)
- outputsnone Vector of output names where you would like to restrict the output of variables(s) associated with this object
Default:none
C++ Type:std::vector<OutputName>
Controllable:No
Description:Vector of output names where you would like to restrict the output of variables(s) associated with this object
Outputs Parameters
- prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
C++ Type:MaterialPropertyName
Unit:(no unit assumed)
Controllable:No
Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
- use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Default:False
C++ Type:bool
Controllable:No
Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Material Property Retrieval Parameters
Input Files
- (modules/solid_mechanics/test/tests/neml2/viscoplasticity/kinharden.i)
- (modules/solid_mechanics/test/tests/neml2/plasticity/isokinharden.i)
- (modules/solid_mechanics/test/tests/neml2/viscoplasticity/perfect.i)
- (modules/solid_mechanics/test/tests/neml2/plasticity/kinharden.i)
- (modules/combined/test/tests/optimization/invOpt_elasticity_modular/forward.i)
- (modules/solid_mechanics/test/tests/neml2/laromance/laromance_return_mapping.i)
- (modules/solid_mechanics/test/tests/neml2/solve_failure/moose.i)
- (modules/solid_mechanics/test/tests/neml2/plasticity/perfect.i)
- (modules/solid_mechanics/test/tests/neml2/elasticity/elasticity.i)
- (modules/solid_mechanics/test/tests/neml2/viscoplasticity/isokinharden.i)
- (modules/solid_mechanics/test/tests/neml2/viscoplasticity/radial_return.i)
- (modules/solid_mechanics/test/tests/neml2/viscoplasticity/isoharden.i)
- (modules/solid_mechanics/test/tests/neml2/plasticity/isoharden.i)
- (modules/solid_mechanics/test/tests/neml2/viscoplasticity/chaboche.i)
- (modules/combined/test/tests/optimization/invOpt_elasticity_modular/grad.i)
(modules/solid_mechanics/test/tests/neml2/viscoplasticity/kinharden.i)
N = 2
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = ${N}
ny = ${N}
nz = ${N}
[]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[all]
strain = SMALL
new_system = true
add_variables = true
formulation = TOTAL
volumetric_locking_correction = true
[]
[]
[]
[]
[NEML2]
input = 'kinharden_neml2.i'
[all]
model = 'model'
verbose = true
device = 'cpu'
moose_input_types = 'MATERIAL MATERIAL POSTPROCESSOR POSTPROCESSOR MATERIAL MATERIAL'
moose_inputs = ' neml2_strain neml2_strain time time neml2_stress kinematic_plastic_strain'
neml2_inputs = ' forces/E old_forces/E forces/t old_forces/t old_state/S old_state/internal/Kp'
moose_output_types = 'MATERIAL MATERIAL'
moose_outputs = ' neml2_stress kinematic_plastic_strain'
neml2_outputs = ' state/S state/internal/Kp'
moose_derivative_types = 'MATERIAL'
moose_derivatives = 'neml2_jacobian'
neml2_derivatives = 'state/S forces/E'
[]
[]
[Postprocessors]
[time]
type = TimePostprocessor
execute_on = 'INITIAL TIMESTEP_BEGIN'
outputs = 'none'
[]
[]
[Materials]
[convert_strain]
type = RankTwoTensorToSymmetricRankTwoTensor
from = 'mechanical_strain'
to = 'neml2_strain'
[]
[stress]
type = ComputeLagrangianObjectiveCustomSymmetricStress
custom_small_stress = 'neml2_stress'
custom_small_jacobian = 'neml2_jacobian'
[]
[]
[BCs]
[xfix]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[yfix]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[zfix]
type = DirichletBC
variable = disp_z
boundary = back
value = 0
[]
[xdisp]
type = FunctionDirichletBC
variable = disp_x
boundary = right
function = t
preset = false
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
dt = 1e-3
dtmin = 1e-3
num_steps = 5
residual_and_jacobian_together = true
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/neml2/plasticity/isokinharden.i)
N = 2
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = ${N}
ny = ${N}
nz = ${N}
[]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[all]
strain = SMALL
new_system = true
add_variables = true
formulation = TOTAL
volumetric_locking_correction = true
[]
[]
[]
[]
[NEML2]
input = 'isokinharden_neml2.i'
[all]
model = 'model'
verbose = true
device = 'cpu'
moose_input_types = 'MATERIAL POSTPROCESSOR POSTPROCESSOR MATERIAL MATERIAL MATERIAL'
moose_inputs = ' neml2_strain time time plastic_strain equivalent_plastic_strain kinematic_plastic_strain'
neml2_inputs = ' forces/E forces/t old_forces/t old_state/internal/Ep old_state/internal/ep old_state/internal/Kp'
moose_output_types = 'MATERIAL MATERIAL MATERIAL MATERIAL'
moose_outputs = ' neml2_stress plastic_strain equivalent_plastic_strain kinematic_plastic_strain'
neml2_outputs = ' state/S state/internal/Ep state/internal/ep state/internal/Kp'
moose_derivative_types = 'MATERIAL'
moose_derivatives = 'neml2_jacobian'
neml2_derivatives = 'state/S forces/E'
[]
[]
[Postprocessors]
[time]
type = TimePostprocessor
execute_on = 'INITIAL TIMESTEP_BEGIN'
outputs = 'none'
[]
[]
[Materials]
[convert_strain]
type = RankTwoTensorToSymmetricRankTwoTensor
from = 'mechanical_strain'
to = 'neml2_strain'
[]
[stress]
type = ComputeLagrangianObjectiveCustomSymmetricStress
custom_small_stress = 'neml2_stress'
custom_small_jacobian = 'neml2_jacobian'
[]
[]
[BCs]
[xfix]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[yfix]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[zfix]
type = DirichletBC
variable = disp_z
boundary = back
value = 0
[]
[xdisp]
type = FunctionDirichletBC
variable = disp_x
boundary = right
function = t
preset = false
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
dt = 1e-3
dtmin = 1e-3
num_steps = 5
residual_and_jacobian_together = true
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/neml2/viscoplasticity/perfect.i)
N = 2
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = ${N}
ny = ${N}
nz = ${N}
[]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[all]
strain = SMALL
new_system = true
add_variables = true
formulation = TOTAL
volumetric_locking_correction = true
[]
[]
[]
[]
[NEML2]
input = 'perfect_neml2.i'
[all]
model = 'model'
verbose = true
device = 'cpu'
moose_input_types = 'MATERIAL MATERIAL POSTPROCESSOR POSTPROCESSOR MATERIAL'
moose_inputs = ' neml2_strain neml2_strain time time neml2_stress'
neml2_inputs = ' forces/E old_forces/E forces/t old_forces/t old_state/S'
moose_output_types = 'MATERIAL'
moose_outputs = ' neml2_stress'
neml2_outputs = ' state/S'
moose_derivative_types = 'MATERIAL'
moose_derivatives = 'neml2_jacobian'
neml2_derivatives = 'state/S forces/E'
[]
[]
[Postprocessors]
[time]
type = TimePostprocessor
execute_on = 'INITIAL TIMESTEP_BEGIN'
outputs = 'none'
[]
[]
[Materials]
[convert_strain]
type = RankTwoTensorToSymmetricRankTwoTensor
from = 'mechanical_strain'
to = 'neml2_strain'
[]
[stress]
type = ComputeLagrangianObjectiveCustomSymmetricStress
custom_small_stress = 'neml2_stress'
custom_small_jacobian = 'neml2_jacobian'
[]
[]
[BCs]
[xfix]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[yfix]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[zfix]
type = DirichletBC
variable = disp_z
boundary = back
value = 0
[]
[xdisp]
type = FunctionDirichletBC
variable = disp_x
boundary = right
function = t
preset = false
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
dt = 1e-3
dtmin = 1e-3
num_steps = 5
residual_and_jacobian_together = true
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/neml2/plasticity/kinharden.i)
N = 2
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = ${N}
ny = ${N}
nz = ${N}
[]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[all]
strain = SMALL
new_system = true
add_variables = true
formulation = TOTAL
volumetric_locking_correction = true
[]
[]
[]
[]
[NEML2]
input = 'kinharden_neml2.i'
[all]
model = 'model'
verbose = true
device = 'cpu'
moose_input_types = 'MATERIAL POSTPROCESSOR POSTPROCESSOR MATERIAL MATERIAL'
moose_inputs = ' neml2_strain time time plastic_strain kinematic_plastic_strain'
neml2_inputs = ' forces/E forces/t old_forces/t old_state/internal/Ep old_state/internal/Kp'
moose_output_types = 'MATERIAL MATERIAL MATERIAL'
moose_outputs = ' neml2_stress plastic_strain kinematic_plastic_strain'
neml2_outputs = ' state/S state/internal/Ep state/internal/Kp'
moose_derivative_types = 'MATERIAL'
moose_derivatives = 'neml2_jacobian'
neml2_derivatives = 'state/S forces/E'
[]
[]
[Postprocessors]
[time]
type = TimePostprocessor
execute_on = 'INITIAL TIMESTEP_BEGIN'
outputs = 'none'
[]
[]
[Materials]
[convert_strain]
type = RankTwoTensorToSymmetricRankTwoTensor
from = 'mechanical_strain'
to = 'neml2_strain'
[]
[stress]
type = ComputeLagrangianObjectiveCustomSymmetricStress
custom_small_stress = 'neml2_stress'
custom_small_jacobian = 'neml2_jacobian'
[]
[]
[BCs]
[xfix]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[yfix]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[zfix]
type = DirichletBC
variable = disp_z
boundary = back
value = 0
[]
[xdisp]
type = FunctionDirichletBC
variable = disp_x
boundary = right
function = t
preset = false
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
dt = 1e-3
dtmin = 1e-3
num_steps = 5
residual_and_jacobian_together = true
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/optimization/invOpt_elasticity_modular/forward.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 11
ny = 11
xmin = -4
xmax = 4
ymin = -4
ymax = 4
[]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[T]
[]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
displacements = 'disp_x disp_y'
[all]
strain = SMALL
new_system = true
formulation = TOTAL
incremental = true
volumetric_locking_correction = false
displacements = 'disp_x disp_y'
[]
[]
[]
[]
[NEML2]
input = 'elasticity.i'
verbose = true
device = 'cpu'
[all]
model = 'forward_elasticity_model'
moose_input_types = 'MATERIAL'
moose_inputs = 'neml2_strain'
neml2_inputs = 'forces/E'
moose_parameter_types = 'MATERIAL'
moose_parameters = 'E_material'
neml2_parameters = 'E'
moose_output_types = 'MATERIAL'
moose_outputs = 'neml2_stress'
neml2_outputs = 'state/S'
moose_derivative_types = 'MATERIAL'
moose_derivatives = 'neml2_jacobian'
neml2_derivatives = 'state/S forces/E'
[]
[]
[BCs]
[bottom_x]
type = DirichletBC
variable = disp_x
boundary = bottom
value = 0.0
[]
[bottom_y]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[top_x]
type = NeumannBC
variable = disp_x
boundary = top
value = 1.0
[]
[top_y]
type = NeumannBC
variable = disp_y
boundary = top
value = 1.0
[]
[]
[Materials]
[convert_strain]
type = RankTwoTensorToSymmetricRankTwoTensor
from = 'mechanical_strain'
to = 'neml2_strain'
[]
[stress]
type = ComputeLagrangianObjectiveCustomSymmetricStress
custom_small_stress = 'neml2_stress'
custom_small_jacobian = 'neml2_jacobian'
[]
[E_material]
type = GenericFunctionMaterial
prop_names = 'E_material'
prop_values = 'E'
[]
[]
[Functions]
[E]
type = NearestReporterCoordinatesFunction
x_coord_name = parametrization/coordx
y_coord_name = parametrization/coordy
value_name = parametrization/youngs_modulus
[]
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = disp_x
objective_name = objective_value
[]
[parametrization]
type = ConstantReporter
real_vector_names = 'coordx coordy youngs_modulus'
real_vector_values = '0 0 0; ${fparse 8/3} 0 ${fparse -8/3}; 5 5 5'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
# better efficiency if we compute them together
residual_and_jacobian_together = true
nl_rel_tol = 1e-10
nl_abs_tol = 1e-14
[]
[Postprocessors]
[point1]
type = PointValue
point = '-1.0 -1.0 0.0'
variable = disp_x
execute_on = TIMESTEP_END
[]
[point2]
type = PointValue
point = '-1.0 0.0 0.0'
variable = disp_x
execute_on = TIMESTEP_END
[]
[point3]
type = PointValue
point = '-1.0 1.0 0.0'
variable = disp_x
execute_on = TIMESTEP_END
[]
[point4]
type = PointValue
point = '0.0 -1.0 0.0'
variable = disp_x
execute_on = TIMESTEP_END
[]
[point5]
type = PointValue
point = '0.0 0.0 0.0'
variable = disp_x
execute_on = TIMESTEP_END
[]
[point6]
type = PointValue
point = '0.0 1.0 0.0'
variable = disp_x
execute_on = TIMESTEP_END
[]
[point7]
type = PointValue
point = '1.0 -1.0 0.0'
variable = disp_x
execute_on = TIMESTEP_END
[]
[point8]
type = PointValue
point = '1.0 0.0 0.0'
variable = disp_x
execute_on = TIMESTEP_END
[]
[point9]
type = PointValue
point = '1.0 1.0 0.0'
variable = disp_x
execute_on = TIMESTEP_END
[]
[]
[Outputs]
file_base = 'forward'
console = false
[]
(modules/solid_mechanics/test/tests/neml2/laromance/laromance_return_mapping.i)
# NEML2 file in MPA
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 2
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[all]
strain = SMALL
new_system = true
add_variables = true
formulation = TOTAL
volumetric_locking_correction = true
[]
[]
[]
[]
[BCs]
[xfix]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[yfix]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[zfix]
type = DirichletBC
variable = disp_z
boundary = back
value = 0
[]
[pressure_x]
type = Pressure
variable = disp_x
boundary = right
function = pressure_fcn
[]
[]
[Functions]
[pressure_fcn]
type = ParsedFunction
expression = 'if(t<200,t,200)' #MPa
[]
[]
[Materials]
[init_dd]
type = GenericConstantMaterial
prop_names = 'T init_cell_dd init_wall_dd init_envFac'
prop_values = '750 1e11 8e12 2e15'
[]
[]
[NEML2]
input = 'models/laromance_matl_radial_return.i'
[all]
model = 'model'
verbose = true
device = 'cpu'
moose_input_types = 'MATERIAL MATERIAL MATERIAL MATERIAL MATERIAL MATERIAL MATERIAL POSTPROCESSOR POSTPROCESSOR'
moose_inputs = 'T neml2_strain inelastic_strain eff_inelastic_strain cell_dd wall_dd init_envFac time time'
neml2_inputs = 'forces/T forces/E old_state/Ep old_state/ep old_state/cell_dd old_state/wall_dd forces/env_fac forces/t old_forces/t'
moose_output_types = 'Material MATERIAL MATERIAL MATERIAL MATERIAL MATERIAL MATERIAL MATERIAL MATERIAL'
moose_outputs = 'neml2_stress inelastic_strain eff_inelastic_strain eff_inelastic_strain_rate vonmises_stress cell_rate wall_rate cell_dd wall_dd'
neml2_outputs = 'state/S state/Ep state/ep state/ep_rate state/s state/cell_rate state/wall_rate state/cell_dd state/wall_dd'
initialize_outputs = 'wall_dd cell_dd init_envFac'
initialize_output_values = 'init_wall_dd init_cell_dd init_envFac'
moose_derivative_types = 'MATERIAL'
moose_derivatives = 'neml2_jacobian'
neml2_derivatives = 'state/S forces/E'
[]
[]
[Materials]
[convert_strain]
type = RankTwoTensorToSymmetricRankTwoTensor
from = 'mechanical_strain'
to = 'neml2_strain'
[]
[stress]
type = ComputeLagrangianObjectiveCustomSymmetricStress
custom_small_stress = 'neml2_stress'
custom_small_jacobian = 'neml2_jacobian'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
nl_rel_tol = 1e-10
nl_abs_tol = 1e-12
dt = 50
dtmin = 50
num_steps = 10
residual_and_jacobian_together = true
[]
[Postprocessors]
[time]
type = TimePostprocessor
execute_on = 'INITIAL TIMESTEP_BEGIN'
outputs = 'none'
[]
[eff_inelastic_strain]
type = ElementAverageMaterialProperty
mat_prop = eff_inelastic_strain
[]
[eff_inelastic_strain_rate]
type = ElementAverageMaterialProperty
mat_prop = eff_inelastic_strain_rate
[]
[rhom_rate]
type = ElementAverageMaterialProperty
mat_prop = cell_rate
[]
[rhoi_rate]
type = ElementAverageMaterialProperty
mat_prop = wall_rate
[]
[rhom_dd]
type = ElementAverageMaterialProperty
mat_prop = cell_dd
[]
[rhoi_dd]
type = ElementAverageMaterialProperty
mat_prop = wall_dd
[]
[vm_stress]
type = ElementAverageMaterialProperty
mat_prop = vonmises_stress
[]
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/neml2/solve_failure/moose.i)
N = 2
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = ${N}
ny = ${N}
nz = ${N}
[]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[all]
strain = SMALL
incremental = true
new_system = true
add_variables = true
volumetric_locking_correction = true
[]
[]
[]
[]
[AuxVariables]
[temp]
initial_condition = 1200
[]
[]
[BCs]
[xfix]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[yfix]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[zfix]
type = DirichletBC
variable = disp_z
boundary = back
value = 0
[]
[xdisp]
type = FunctionDirichletBC
variable = disp_x
boundary = right
function = 'xdisp_func'
# Setting this to true is discouraged as it could plasticity solve more difficult.
# We do it here simply to make the solve to fail to test the error handling.
preset = true
[]
[]
[NEML2]
input = 'neml2.i'
[all]
model = 'model'
verbose = true
device = 'cpu'
moose_input_types = 'MATERIAL MATERIAL POSTPROCESSOR POSTPROCESSOR MATERIAL MATERIAL MATERIAL'
moose_inputs = ' neml2_strain neml2_strain time time neml2_stress equivalent_plastic_strain back_stress'
neml2_inputs = ' forces/E old_forces/E forces/t old_forces/t old_state/S old_state/internal/ep old_state/internal/X'
moose_output_types = 'MATERIAL MATERIAL MATERIAL'
moose_outputs = ' neml2_stress equivalent_plastic_strain back_stress'
neml2_outputs = ' state/S state/internal/ep state/internal/X'
moose_derivative_types = 'MATERIAL'
moose_derivatives = 'neml2_jacobian'
neml2_derivatives = 'state/S forces/E'
[]
[]
[Materials]
[convert_strain]
type = RankTwoTensorToSymmetricRankTwoTensor
from = 'mechanical_strain'
to = 'neml2_strain'
[]
[stress]
type = ComputeLagrangianObjectiveCustomSymmetricStress
custom_small_stress = 'neml2_stress'
custom_small_jacobian = 'neml2_jacobian'
[]
[]
[Functions]
[xdisp_func]
type = PiecewiseLinear
x = '0 0.005 0.01 0.015 0.02'
y = '0 0.005 0 -0.005 0'
[]
[]
[Postprocessors]
[time]
type = TimePostprocessor
execute_on = 'INITIAL TIMESTEP_BEGIN'
outputs = 'none'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
dt = 1e-3
dtmin = 1e-5
end_time = 0.006
nl_abs_tol = 1e-12
nl_rel_tol = 1e-10
nl_max_its = 12
line_search = none
residual_and_jacobian_together = true
[]
[Outputs]
exodus = true
print_linear_residuals = false
[]
(modules/solid_mechanics/test/tests/neml2/plasticity/perfect.i)
N = 2
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = ${N}
ny = ${N}
nz = ${N}
[]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[all]
strain = SMALL
new_system = true
add_variables = true
formulation = TOTAL
volumetric_locking_correction = true
[]
[]
[]
[]
[NEML2]
input = 'perfect_neml2.i'
[all]
model = 'model'
verbose = true
device = 'cpu'
moose_input_types = 'MATERIAL POSTPROCESSOR POSTPROCESSOR MATERIAL'
moose_inputs = ' neml2_strain time time plastic_strain'
neml2_inputs = ' forces/E forces/t old_forces/t old_state/internal/Ep'
moose_output_types = 'MATERIAL MATERIAL'
moose_outputs = ' neml2_stress plastic_strain'
neml2_outputs = ' state/S state/internal/Ep'
moose_derivative_types = 'MATERIAL'
moose_derivatives = 'neml2_jacobian'
neml2_derivatives = 'state/S forces/E'
[]
[]
[Postprocessors]
[time]
type = TimePostprocessor
execute_on = 'INITIAL TIMESTEP_BEGIN'
outputs = 'none'
[]
[]
[Materials]
[convert_strain]
type = RankTwoTensorToSymmetricRankTwoTensor
from = 'mechanical_strain'
to = 'neml2_strain'
[]
[stress]
type = ComputeLagrangianObjectiveCustomSymmetricStress
custom_small_stress = 'neml2_stress'
custom_small_jacobian = 'neml2_jacobian'
[]
[]
[BCs]
[xfix]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[yfix]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[zfix]
type = DirichletBC
variable = disp_z
boundary = back
value = 0
[]
[xdisp]
type = FunctionDirichletBC
variable = disp_x
boundary = right
function = t
preset = false
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
dt = 1e-3
dtmin = 1e-3
num_steps = 5
residual_and_jacobian_together = true
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/neml2/elasticity/elasticity.i)
N = 2
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = ${N}
ny = ${N}
nz = ${N}
[]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[all]
strain = SMALL
new_system = true
add_variables = true
formulation = TOTAL
volumetric_locking_correction = true
[]
[]
[]
[]
[NEML2]
input = 'elasticity_neml2.i'
[all]
model = 'model'
verbose = true
device = 'cpu'
moose_input_types = 'MATERIAL'
moose_inputs = 'neml2_strain'
neml2_inputs = 'forces/E'
moose_output_types = 'MATERIAL'
moose_outputs = 'neml2_stress'
neml2_outputs = 'state/S'
moose_derivative_types = 'MATERIAL'
moose_derivatives = 'neml2_jacobian'
neml2_derivatives = 'state/S forces/E'
[]
[]
[Materials]
[convert_strain]
type = RankTwoTensorToSymmetricRankTwoTensor
from = 'mechanical_strain'
to = 'neml2_strain'
[]
[stress]
type = ComputeLagrangianObjectiveCustomSymmetricStress
custom_small_stress = 'neml2_stress'
custom_small_jacobian = 'neml2_jacobian'
[]
[]
[BCs]
[xfix]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[yfix]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[zfix]
type = DirichletBC
variable = disp_z
boundary = back
value = 0
[]
[xdisp]
type = FunctionDirichletBC
variable = disp_x
boundary = right
function = t
preset = false
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
dt = 1e-3
dtmin = 1e-3
num_steps = 5
residual_and_jacobian_together = true
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/neml2/viscoplasticity/isokinharden.i)
N = 2
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = ${N}
ny = ${N}
nz = ${N}
[]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[all]
strain = SMALL
new_system = true
add_variables = true
formulation = TOTAL
volumetric_locking_correction = true
[]
[]
[]
[]
[NEML2]
input = 'isokinharden_neml2.i'
[all]
model = 'model'
verbose = true
device = 'cpu'
moose_input_types = 'MATERIAL MATERIAL POSTPROCESSOR POSTPROCESSOR MATERIAL MATERIAL MATERIAL'
moose_inputs = ' neml2_strain neml2_strain time time neml2_stress equivalent_plastic_strain kinematic_plastic_strain'
neml2_inputs = ' forces/E old_forces/E forces/t old_forces/t old_state/S old_state/internal/ep old_state/internal/Kp'
moose_output_types = 'MATERIAL MATERIAL MATERIAL'
moose_outputs = ' neml2_stress equivalent_plastic_strain kinematic_plastic_strain'
neml2_outputs = ' state/S state/internal/ep state/internal/Kp'
moose_derivative_types = 'MATERIAL'
moose_derivatives = 'neml2_jacobian'
neml2_derivatives = 'state/S forces/E'
[]
[]
[Postprocessors]
[time]
type = TimePostprocessor
execute_on = 'INITIAL TIMESTEP_BEGIN'
outputs = 'none'
[]
[]
[Materials]
[convert_strain]
type = RankTwoTensorToSymmetricRankTwoTensor
from = 'mechanical_strain'
to = 'neml2_strain'
[]
[stress]
type = ComputeLagrangianObjectiveCustomSymmetricStress
custom_small_stress = 'neml2_stress'
custom_small_jacobian = 'neml2_jacobian'
[]
[]
[BCs]
[xfix]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[yfix]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[zfix]
type = DirichletBC
variable = disp_z
boundary = back
value = 0
[]
[xdisp]
type = FunctionDirichletBC
variable = disp_x
boundary = right
function = t
preset = false
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
dt = 1e-3
dtmin = 1e-3
num_steps = 5
residual_and_jacobian_together = true
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/neml2/viscoplasticity/radial_return.i)
N = 2
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = ${N}
ny = ${N}
nz = ${N}
[]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[all]
strain = SMALL
new_system = true
add_variables = true
formulation = TOTAL
volumetric_locking_correction = true
[]
[]
[]
[]
[NEML2]
input = 'radial_return_neml2.i'
[all]
model = 'model'
verbose = true
device = 'cpu'
moose_input_types = 'MATERIAL POSTPROCESSOR POSTPROCESSOR MATERIAL MATERIAL'
moose_inputs = ' neml2_strain time time plastic_strain consistency'
neml2_inputs = ' forces/E forces/t old_forces/t old_state/internal/Ep old_state/internal/gamma'
moose_output_types = 'MATERIAL MATERIAL MATERIAL'
moose_outputs = ' neml2_stress plastic_strain consistency'
neml2_outputs = ' state/S state/internal/Ep state/internal/gamma'
moose_derivative_types = 'MATERIAL'
moose_derivatives = 'neml2_jacobian'
neml2_derivatives = 'state/S forces/E'
[]
[]
[Postprocessors]
[time]
type = TimePostprocessor
execute_on = 'INITIAL TIMESTEP_BEGIN'
outputs = 'none'
[]
[]
[Materials]
[convert_strain]
type = RankTwoTensorToSymmetricRankTwoTensor
from = 'mechanical_strain'
to = 'neml2_strain'
[]
[stress]
type = ComputeLagrangianObjectiveCustomSymmetricStress
custom_small_stress = 'neml2_stress'
custom_small_jacobian = 'neml2_jacobian'
[]
[]
[BCs]
[xfix]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[yfix]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[zfix]
type = DirichletBC
variable = disp_z
boundary = back
value = 0
[]
[xdisp]
type = FunctionDirichletBC
variable = disp_x
boundary = right
function = t
preset = false
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
dt = 1e-3
dtmin = 1e-3
num_steps = 5
residual_and_jacobian_together = true
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/neml2/viscoplasticity/isoharden.i)
N = 2
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = ${N}
ny = ${N}
nz = ${N}
[]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[all]
strain = SMALL
new_system = true
add_variables = true
formulation = TOTAL
volumetric_locking_correction = true
[]
[]
[]
[]
[NEML2]
input = 'isoharden_neml2.i'
[all]
model = 'model'
verbose = true
device = 'cpu'
moose_input_types = 'MATERIAL MATERIAL POSTPROCESSOR POSTPROCESSOR MATERIAL MATERIAL'
moose_inputs = ' neml2_strain neml2_strain time time neml2_stress equivalent_plastic_strain'
neml2_inputs = ' forces/E old_forces/E forces/t old_forces/t old_state/S old_state/internal/ep'
moose_output_types = 'MATERIAL MATERIAL'
moose_outputs = ' neml2_stress equivalent_plastic_strain'
neml2_outputs = ' state/S state/internal/ep'
moose_derivative_types = 'MATERIAL'
moose_derivatives = 'neml2_jacobian'
neml2_derivatives = 'state/S forces/E'
[]
[]
[Postprocessors]
[time]
type = TimePostprocessor
execute_on = 'INITIAL TIMESTEP_BEGIN'
outputs = 'none'
[]
[]
[Materials]
[convert_strain]
type = RankTwoTensorToSymmetricRankTwoTensor
from = 'mechanical_strain'
to = 'neml2_strain'
[]
[stress]
type = ComputeLagrangianObjectiveCustomSymmetricStress
custom_small_stress = 'neml2_stress'
custom_small_jacobian = 'neml2_jacobian'
[]
[]
[BCs]
[xfix]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[yfix]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[zfix]
type = DirichletBC
variable = disp_z
boundary = back
value = 0
[]
[xdisp]
type = FunctionDirichletBC
variable = disp_x
boundary = right
function = t
preset = false
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
dt = 1e-3
dtmin = 1e-3
num_steps = 5
residual_and_jacobian_together = true
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/neml2/plasticity/isoharden.i)
N = 2
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = ${N}
ny = ${N}
nz = ${N}
[]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[all]
strain = SMALL
new_system = true
add_variables = true
formulation = TOTAL
volumetric_locking_correction = true
[]
[]
[]
[]
[NEML2]
input = 'isoharden_neml2.i'
[all]
model = 'model'
verbose = true
device = 'cpu'
moose_input_types = 'MATERIAL POSTPROCESSOR POSTPROCESSOR MATERIAL MATERIAL'
moose_inputs = ' neml2_strain time time plastic_strain equivalent_plastic_strain'
neml2_inputs = ' forces/E forces/t old_forces/t old_state/internal/Ep old_state/internal/ep'
moose_output_types = 'MATERIAL MATERIAL MATERIAL'
moose_outputs = ' neml2_stress plastic_strain equivalent_plastic_strain'
neml2_outputs = ' state/S state/internal/Ep state/internal/ep'
moose_derivative_types = 'MATERIAL'
moose_derivatives = 'neml2_jacobian'
neml2_derivatives = 'state/S forces/E'
[]
[]
[Postprocessors]
[time]
type = TimePostprocessor
execute_on = 'INITIAL TIMESTEP_BEGIN'
outputs = 'none'
[]
[]
[Materials]
[convert_strain]
type = RankTwoTensorToSymmetricRankTwoTensor
from = 'mechanical_strain'
to = 'neml2_strain'
[]
[stress]
type = ComputeLagrangianObjectiveCustomSymmetricStress
custom_small_stress = 'neml2_stress'
custom_small_jacobian = 'neml2_jacobian'
[]
[]
[BCs]
[xfix]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[yfix]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[zfix]
type = DirichletBC
variable = disp_z
boundary = back
value = 0
[]
[xdisp]
type = FunctionDirichletBC
variable = disp_x
boundary = right
function = t
preset = false
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
dt = 1e-3
dtmin = 1e-3
num_steps = 5
residual_and_jacobian_together = true
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/neml2/viscoplasticity/chaboche.i)
N = 2
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = ${N}
ny = ${N}
nz = ${N}
[]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[all]
strain = SMALL
new_system = true
add_variables = true
formulation = TOTAL
volumetric_locking_correction = true
[]
[]
[]
[]
[NEML2]
input = 'chaboche_neml2.i'
[all]
model = 'model'
verbose = true
device = 'cpu'
moose_input_types = 'MATERIAL MATERIAL POSTPROCESSOR POSTPROCESSOR MATERIAL MATERIAL MATERIAL MATERIAL'
moose_inputs = ' neml2_strain neml2_strain time time neml2_stress equivalent_plastic_strain back_stress_1 back_stress_2'
neml2_inputs = ' forces/E old_forces/E forces/t old_forces/t old_state/S old_state/internal/ep old_state/internal/X1 old_state/internal/X2'
moose_output_types = 'MATERIAL MATERIAL MATERIAL MATERIAL'
moose_outputs = ' neml2_stress equivalent_plastic_strain back_stress_1 back_stress_2'
neml2_outputs = ' state/S state/internal/ep state/internal/X1 state/internal/X2'
moose_derivative_types = 'MATERIAL'
moose_derivatives = 'neml2_jacobian'
neml2_derivatives = 'state/S forces/E'
[]
[]
[Postprocessors]
[time]
type = TimePostprocessor
execute_on = 'INITIAL TIMESTEP_BEGIN'
outputs = 'none'
[]
[]
[Materials]
[convert_strain]
type = RankTwoTensorToSymmetricRankTwoTensor
from = 'mechanical_strain'
to = 'neml2_strain'
[]
[stress]
type = ComputeLagrangianObjectiveCustomSymmetricStress
custom_small_stress = 'neml2_stress'
custom_small_jacobian = 'neml2_jacobian'
[]
[]
[BCs]
[xfix]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[yfix]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[zfix]
type = DirichletBC
variable = disp_z
boundary = back
value = 0
[]
[xdisp]
type = FunctionDirichletBC
variable = disp_x
boundary = right
function = t
preset = false
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
dt = 1e-3
dtmin = 1e-3
num_steps = 5
residual_and_jacobian_together = true
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/optimization/invOpt_elasticity_modular/grad.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 11
ny = 11
xmin = -4
xmax = 4
ymin = -4
ymax = 4
[]
displacements = 'adj_disp_x adj_disp_y'
[]
[Variables]
# adjoint
[adj_disp_x]
[]
[adj_disp_y]
[]
[]
[AuxVariables]
[dummy]
[]
[T]
[]
# displacement variables to be transferred from the forward app
# we use them to compute stress and stress derivative wrt E
[disp_x]
[]
[disp_y]
[]
[]
[DiracKernels]
[misfit_is_adjoint_force]
type = ReporterPointSource
variable = adj_disp_x
x_coord_name = misfit/measurement_xcoord
y_coord_name = misfit/measurement_ycoord
z_coord_name = misfit/measurement_zcoord
value_name = misfit/misfit_values
[]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
displacements = 'adj_disp_x adj_disp_y'
[adjoint]
strain = SMALL
new_system = true
formulation = TOTAL
incremental = true
volumetric_locking_correction = false
displacements = 'adj_disp_x adj_disp_y'
# add base name to distinguish between forward and adjoint
# the total lagrangian formulation does not add base_name correctly without setting both, which should be improved
base_name = 'adjoint'
strain_base_name = 'adjoint'
[]
[]
[]
[]
[NEML2]
input = 'elasticity.i'
verbose = true
device = 'cpu'
[forward]
model = 'forward_elasticity_model'
moose_input_types = 'MATERIAL'
moose_inputs = 'forward_strain'
neml2_inputs = 'forces/E'
moose_parameter_types = 'MATERIAL'
moose_parameters = 'E_material'
neml2_parameters = 'E'
moose_output_types = 'MATERIAL'
moose_outputs = 'forward_stress'
neml2_outputs = 'state/S'
moose_parameter_derivative_types = 'MATERIAL'
moose_parameter_derivatives = 'forward_dstress_dE'
neml2_parameter_derivatives = 'state/S E'
[]
[adjoint]
model = 'adjoint_elasticity_model'
moose_input_types = 'MATERIAL'
moose_inputs = 'adjoint_strain'
neml2_inputs = 'forces/E'
moose_parameter_types = 'MATERIAL'
moose_parameters = 'E_material'
neml2_parameters = 'E'
moose_output_types = 'MATERIAL'
moose_outputs = 'adjoint_stress'
neml2_outputs = 'state/S'
moose_derivative_types = 'MATERIAL'
moose_derivatives = 'adjoint_jacobian'
neml2_derivatives = 'state/S forces/E'
[]
[]
[BCs]
[bottom_ux]
type = DirichletBC
variable = adj_disp_x
boundary = bottom
value = 0.0
[]
[bottom_uy]
type = DirichletBC
variable = adj_disp_y
boundary = bottom
value = 0.0
[]
[]
[Materials]
[E_material]
type = GenericFunctionMaterial
prop_names = 'E_material'
prop_values = 'E'
[]
# forward
[forward_strain]
type = ComputeLagrangianStrain
displacements = 'disp_x disp_y'
base_name = 'forward'
[]
[convert_forward_strain]
type = RankTwoTensorToSymmetricRankTwoTensor
from = 'forward_mechanical_strain'
to = 'forward_strain'
[]
# adjoint
[convert_adjoint_strain]
type = RankTwoTensorToSymmetricRankTwoTensor
from = 'adjoint_mechanical_strain'
to = 'adjoint_strain'
[]
[adjoint_stress]
type = ComputeLagrangianObjectiveCustomSymmetricStress
custom_small_stress = 'adjoint_stress'
custom_small_jacobian = 'adjoint_jacobian'
base_name = 'adjoint'
[]
[]
[Functions]
[E]
type = NearestReporterCoordinatesFunction
x_coord_name = parametrization/coordx
y_coord_name = parametrization/coordy
value_name = parametrization/youngs_modulus
[]
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = 'adj_disp_x'
[]
[misfit]
type = OptimizationData
[]
[parametrization]
type = ConstantReporter
real_vector_names = 'coordx coordy youngs_modulus'
real_vector_values = '0 0 0; ${fparse 8/3} 0 ${fparse -8/3}; 5 5 5'
[]
[]
[VectorPostprocessors]
[grad_youngs_modulus]
type = AdjointStrainSymmetricStressGradInnerProduct
stress_derivative_name = 'forward_dstress_dE'
adjoint_strain_name = 'adjoint_mechanical_strain'
variable = dummy
function = E
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
# we do not compute them together as this is overwritting DiracKernel's residual calculation, which should be improved
residual_and_jacobian_together = false
nl_rel_tol = 1e-10
nl_abs_tol = 1e-14
[]
[Outputs]
file_base = 'adjoint'
console = false
[]