- arrayFalseTrue to make this variable a array variable regardless of number of components. If 'components' > 1, this will automatically be set to true.
Default:False
C++ Type:bool
Controllable:No
Description:True to make this variable a array variable regardless of number of components. If 'components' > 1, this will automatically be set to true.
- array_var_component_namesOnly for use with array variables, allows setting custom names for each array variable component. If this not set, the default name for each array variable componenet is `base_name`+'_'+component number. If used, a name must be provided for each component and the values are used to name the components as `base_name`+'_'+ `array_var_component_names[component]`.
C++ Type:std::vector<std::string>
Controllable:No
Description:Only for use with array variables, allows setting custom names for each array variable component. If this not set, the default name for each array variable componenet is `base_name`+'_'+component number. If used, a name must be provided for each component and the values are used to name the components as `base_name`+'_'+ `array_var_component_names[component]`.
- 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
- components1Number of components for an array variable
Default:1
C++ Type:unsigned int
Range:components>0
Controllable:No
Description:Number of components for an array variable
- disable_p_refinementFalseTrue to disable p-refinement for this variable.
Default:False
C++ Type:bool
Controllable:No
Description:True to disable p-refinement for this variable.
- familyLAGRANGESpecifies the family of FE shape functions to use for this variable
Default:LAGRANGE
C++ Type:MooseEnum
Controllable:No
Description:Specifies the family of FE shape functions to use for this variable
- fvFalseTrue to make this variable a finite volume variable
Default:False
C++ Type:bool
Controllable:No
Description:True to make this variable a finite volume variable
- initial_conditionSpecifies a constant initial condition for this variable
C++ Type:std::vector<Real>
Unit:(no unit assumed)
Controllable:No
Description:Specifies a constant initial condition for this variable
- initial_from_file_varGives the name of a variable for which to read an initial condition from a mesh file
C++ Type:std::string
Controllable:No
Description:Gives the name of a variable for which to read an initial condition from a mesh file
- orderFIRSTSpecifies the order of the FE shape function to use for this variable (additional orders not listed are allowed)
Default:FIRST
C++ Type:MooseEnum
Controllable:No
Description:Specifies the order of the FE shape function to use for this variable (additional orders not listed are allowed)
- p_refinementFalseWhether this variable's finite element basis should use element p-levels when the mesh is p-refined. If this is not specified, MOOSE sets the default based on the finite element family.
Default:False
C++ Type:bool
Controllable:No
Description:Whether this variable's finite element basis should use element p-levels when the mesh is p-refined. If this is not specified, MOOSE sets the default based on the finite element family.
- solver_sysnl0If this variable is a solver variable, this is the solver system to which it should be added.
Default:nl0
C++ Type:SolverSystemName
Controllable:No
Description:If this variable is a solver variable, this is the solver system to which it should be added.
AuxVariable
Represents standard field variables, e.g. Lagrange, Hermite, or non-constant Monomials
Auxiliary variables are used to compute or store intermediate quantities that are not the main variables, the ones being solved for, of the equation system.
A detailed description of the MOOSE variable system is given in the base class documentation.
Input 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.
- eigenFalseTrue to make this variable an eigen variable
Default:False
C++ Type:bool
Controllable:No
Description:True to make this variable an eigen variable
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:No
Description:Set the enabled status of the MooseObject.
- outputsVector of output names where you would like to restrict the output of variables(s) associated with this object
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
- scalingSpecifies a scaling factor to apply to this variable
C++ Type:std::vector<Real>
Unit:(no unit assumed)
Controllable:No
Description:Specifies a scaling factor to apply to this variable
- use_dualFalseTrue to use dual basis for Lagrange multipliers
Default:False
C++ Type:bool
Controllable:No
Description:True to use dual basis for Lagrange multipliers
Advanced Parameters
Input Files
- (modules/chemical_reactions/test/tests/thermochimica/FeTiVO.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/neml2/large_neml.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/neml2/small_neml.i)
- (modules/chemical_reactions/test/tests/thermochimica/MoRu_subblock.i)
(modules/chemical_reactions/test/tests/thermochimica/FeTiVO.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
[]
[]
[GlobalParams]
elements = 'O Ti V Fe'
output_phases = 'gas_ideal SlagBsoln Hemasoln'
output_species = 'gas_ideal:O2 SlagBsoln:Fe2O3'
output_element_potentials = 'mu:O mu:Ti mu:Fe'
output_vapor_pressures = 'vp:gas_ideal:O2'
[]
[ChemicalComposition]
[thermo]
thermofile = FeTiVO.dat
tunit = K
punit = atm
munit = moles
temperature = T
uo_name = Thermochimica
output_species_unit = mole_fraction
reinitialization_type = none
[]
[]
[Variables]
[T]
type = MooseVariable
initial_condition = 2000
[]
[]
[ICs]
[O]
type = FunctionIC
variable = O
function = '2.0*(1-x)+1.6*x'
[]
[Ti]
type = FunctionIC
variable = Ti
function = '0.5*(1-x)+0.55*x'
[]
[V]
type = FunctionIC
variable = V
function = '0.5*(1-x)+0.75*x'
[]
[Fe]
type = FunctionIC
variable = Fe
function = '0.5*(1-x)+0.25*x'
[]
[]
[Problem]
solve = false
[]
[VectorPostprocessors]
[Fe2O3]
type = NodalValueSampler
variable = SlagBsoln:Fe2O3
sort_by = x
[]
[]
[Executioner]
type = Steady
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/neml2/large_neml.i)
constraint_types = 'strain strain strain stress stress stress stress strain stress'
targets = 'strain11 zero zero zero zero zero zero zero zero'
[Mesh]
[base]
type = FileMeshGenerator
file = '3d.exo'
[]
[sidesets]
type = SideSetsFromNormalsGenerator
input = base
normals = '-1 0 0
1 0 0
0 -1 0
0 1 0
0 0 -1
0 0 1'
fixed_normal = true
new_boundary = 'left right bottom top back front'
[]
[]
[BCs]
[fix1_x]
type = DirichletBC
boundary = fix_all
matrix_tags = 'system time'
value = 0
variable = disp_x
vector_tags = residual
[]
[]
[BCs]
[fix1_y]
type = DirichletBC
boundary = fix_all
matrix_tags = 'system time'
value = 0
variable = disp_y
vector_tags = residual
[]
[]
[BCs]
[fix1_z]
type = DirichletBC
boundary = fix_all
matrix_tags = 'system time'
value = 0
variable = disp_z
vector_tags = residual
[]
[]
[BCs]
[fix2_x]
type = DirichletBC
boundary = fix_xy
matrix_tags = 'system time'
value = 0
variable = disp_x
vector_tags = residual
[]
[]
[BCs]
[fix2_y]
type = DirichletBC
boundary = fix_xy
matrix_tags = 'system time'
value = 0
variable = disp_y
vector_tags = residual
[]
[]
[BCs]
[fix3_z]
type = DirichletBC
boundary = fix_z
matrix_tags = 'system time'
value = 0
variable = disp_z
vector_tags = residual
[]
[]
[BCs]
[Periodic]
[x]
variable = disp_x
auto_direction = 'x y z'
[]
[y]
variable = disp_y
auto_direction = 'x y z'
[]
[z]
variable = disp_z
auto_direction = 'x y z'
[]
[]
[]
[Functions]
[strain11]
type = ParsedFunction
expression = 't'
[]
[]
[Functions]
[zero]
type = ConstantFunction
value = 0
[]
[]
[Materials]
[convert_strain]
type = RankTwoTensorToSymmetricRankTwoTensor
from = mechanical_strain
outputs = none
to = neml2_strain
[]
[]
[Materials]
[stress]
type = ComputeLagrangianObjectiveCustomSymmetricStress
custom_small_jacobian = dneml2_stress/dneml2_strain
custom_small_stress = neml2_stress
large_kinematics = true
outputs = none
[]
[compute_homogenization_gradient]
type = ComputeHomogenizedLagrangianStrain
constraint_types = ${constraint_types}
targets = ${targets}
macro_gradient = hvar
[]
[compute_strain]
type = ComputeLagrangianStrain
homogenization_gradient_names = 'homogenization_gradient'
displacements = 'disp_x disp_y disp_z'
large_kinematics = true
[]
[]
[Materials]
[neml2_stress_to_moose]
type = NEML2ToMOOSESymmetricRankTwoTensorMaterialProperty
block = ''
from_neml2 = neml2_stress
neml2_executor = neml2_model_all
outputs = none
to_moose = neml2_stress
[]
[neml2_jacobian_to_moose]
type = NEML2ToMOOSESymmetricRankFourTensorMaterialProperty
block = ''
from_neml2 = neml2_stress
neml2_executor = neml2_model_all
neml2_input_derivative = neml2_strain
outputs = none
to_moose = dneml2_stress/dneml2_strain
[]
[]
[UserObjects]
[moose_strain_to_neml2]
type = MOOSESymmetricRankTwoTensorToNEML2
block = ''
execute_on = 'INITIAL LINEAR NONLINEAR'
from_moose = neml2_strain
quantity_type = MATERIAL
to_neml2 = neml2_strain
[]
[neml2_index_model_all]
type = NEML2BatchIndexGenerator
block = ''
execute_on = 'INITIAL LINEAR NONLINEAR'
[]
[neml2_model_all]
type = NEML2ModelExecutor
batch_index_generator = neml2_index_model_all
device = cpu
execute_on = 'INITIAL LINEAR NONLINEAR TIMESTEP_END'
gatherers = 'moose_strain_to_neml2'
input = neml2_elastic.i
model = model
param_gatherers = ''
[]
[]
[Variables]
[disp_x]
type = MooseVariable
family = LAGRANGE
order = FIRST
[]
[disp_y]
type = MooseVariable
family = LAGRANGE
order = FIRST
[]
[disp_z]
type = MooseVariable
family = LAGRANGE
order = FIRST
[]
[]
[AuxKernels]
[pk1_stress_xx_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = pk1_stress_xx
variable = pk1_stress_xx
[]
[pk1_stress_xy_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = pk1_stress_xy
variable = pk1_stress_xy
[]
[pk1_stress_xz_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = pk1_stress_xz
variable = pk1_stress_xz
[]
[pk1_stress_yx_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = pk1_stress_yx
variable = pk1_stress_yx
[]
[pk1_stress_yy_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = pk1_stress_yy
variable = pk1_stress_yy
[]
[pk1_stress_yz_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = pk1_stress_yz
variable = pk1_stress_yz
[]
[pk1_stress_zx_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = pk1_stress_zx
variable = pk1_stress_zx
[]
[pk1_stress_zy_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = pk1_stress_zy
variable = pk1_stress_zy
[]
[pk1_stress_zz_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = pk1_stress_zz
variable = pk1_stress_zz
[]
[deformation_gradient_xx_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = deformation_gradient_xx
variable = deformation_gradient_xx
[]
[deformation_gradient_xy_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = deformation_gradient_xy
variable = deformation_gradient_xy
[]
[deformation_gradient_xz_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = deformation_gradient_xz
variable = deformation_gradient_xz
[]
[deformation_gradient_yx_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = deformation_gradient_yx
variable = deformation_gradient_yx
[]
[deformation_gradient_yy_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = deformation_gradient_yy
variable = deformation_gradient_yy
[]
[deformation_gradient_yz_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = deformation_gradient_yz
variable = deformation_gradient_yz
[]
[deformation_gradient_zx_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = deformation_gradient_zx
variable = deformation_gradient_zx
[]
[deformation_gradient_zy_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = deformation_gradient_zy
variable = deformation_gradient_zy
[]
[deformation_gradient_zz_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = deformation_gradient_zz
variable = deformation_gradient_zz
[]
[]
[AuxVariables]
[pk1_stress_xx]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[pk1_stress_xy]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[pk1_stress_xz]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[pk1_stress_yx]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[pk1_stress_yy]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[pk1_stress_yz]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[pk1_stress_zx]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[pk1_stress_zy]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[pk1_stress_zz]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_xx]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_xy]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_xz]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_yx]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_yy]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_yz]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_zx]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_zy]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_zz]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[]
[Kernels]
[TM_all0]
type = HomogenizedTotalLagrangianStressDivergence
component = 0
displacements = 'disp_x disp_y disp_z'
large_kinematics = true
stabilize_strain = false
variable = disp_x
macro_var = hvar
constraint_types = ${constraint_types}
targets = ${targets}
[]
[TM_all1]
type = HomogenizedTotalLagrangianStressDivergence
component = 1
displacements = 'disp_x disp_y disp_z'
large_kinematics = true
stabilize_strain = false
variable = disp_y
macro_var = hvar
constraint_types = ${constraint_types}
targets = ${targets}
[]
[TM_all2]
type = HomogenizedTotalLagrangianStressDivergence
component = 2
displacements = 'disp_x disp_y disp_z'
large_kinematics = true
stabilize_strain = false
variable = disp_z
macro_var = hvar
constraint_types = ${constraint_types}
targets = ${targets}
[]
[]
[Materials]
[pk1_stress_xx_all]
type = RankTwoCartesianComponent
block = ''
index_i = 0
index_j = 0
outputs = none
property_name = pk1_stress_xx
rank_two_tensor = pk1_stress
[]
[pk1_stress_xy_all]
type = RankTwoCartesianComponent
block = ''
index_i = 0
index_j = 1
outputs = none
property_name = pk1_stress_xy
rank_two_tensor = pk1_stress
[]
[pk1_stress_xz_all]
type = RankTwoCartesianComponent
block = ''
index_i = 0
index_j = 2
outputs = none
property_name = pk1_stress_xz
rank_two_tensor = pk1_stress
[]
[pk1_stress_yx_all]
type = RankTwoCartesianComponent
block = ''
index_i = 1
index_j = 0
outputs = none
property_name = pk1_stress_yx
rank_two_tensor = pk1_stress
[]
[pk1_stress_yy_all]
type = RankTwoCartesianComponent
block = ''
index_i = 1
index_j = 1
outputs = none
property_name = pk1_stress_yy
rank_two_tensor = pk1_stress
[]
[pk1_stress_yz_all]
type = RankTwoCartesianComponent
block = ''
index_i = 1
index_j = 2
outputs = none
property_name = pk1_stress_yz
rank_two_tensor = pk1_stress
[]
[pk1_stress_zx_all]
type = RankTwoCartesianComponent
block = ''
index_i = 2
index_j = 0
outputs = none
property_name = pk1_stress_zx
rank_two_tensor = pk1_stress
[]
[pk1_stress_zy_all]
type = RankTwoCartesianComponent
block = ''
index_i = 2
index_j = 1
outputs = none
property_name = pk1_stress_zy
rank_two_tensor = pk1_stress
[]
[pk1_stress_zz_all]
type = RankTwoCartesianComponent
block = ''
index_i = 2
index_j = 2
outputs = none
property_name = pk1_stress_zz
rank_two_tensor = pk1_stress
[]
[deformation_gradient_xx_all]
type = RankTwoCartesianComponent
block = ''
index_i = 0
index_j = 0
outputs = none
property_name = deformation_gradient_xx
rank_two_tensor = deformation_gradient
[]
[deformation_gradient_xy_all]
type = RankTwoCartesianComponent
block = ''
index_i = 0
index_j = 1
outputs = none
property_name = deformation_gradient_xy
rank_two_tensor = deformation_gradient
[]
[deformation_gradient_xz_all]
type = RankTwoCartesianComponent
block = ''
index_i = 0
index_j = 2
outputs = none
property_name = deformation_gradient_xz
rank_two_tensor = deformation_gradient
[]
[deformation_gradient_yx_all]
type = RankTwoCartesianComponent
block = ''
index_i = 1
index_j = 0
outputs = none
property_name = deformation_gradient_yx
rank_two_tensor = deformation_gradient
[]
[deformation_gradient_yy_all]
type = RankTwoCartesianComponent
block = ''
index_i = 1
index_j = 1
outputs = none
property_name = deformation_gradient_yy
rank_two_tensor = deformation_gradient
[]
[deformation_gradient_yz_all]
type = RankTwoCartesianComponent
block = ''
index_i = 1
index_j = 2
outputs = none
property_name = deformation_gradient_yz
rank_two_tensor = deformation_gradient
[]
[deformation_gradient_zx_all]
type = RankTwoCartesianComponent
block = ''
index_i = 2
index_j = 0
outputs = none
property_name = deformation_gradient_zx
rank_two_tensor = deformation_gradient
[]
[deformation_gradient_zy_all]
type = RankTwoCartesianComponent
block = ''
index_i = 2
index_j = 1
outputs = none
property_name = deformation_gradient_zy
rank_two_tensor = deformation_gradient
[]
[deformation_gradient_zz_all]
type = RankTwoCartesianComponent
block = ''
index_i = 2
index_j = 2
outputs = none
property_name = deformation_gradient_zz
rank_two_tensor = deformation_gradient
[]
[]
[Variables]
[hvar]
type = MooseVariableScalar
family = SCALAR
order = NINTH
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
residual_and_jacobian_together = true
solve_type = 'newton'
line_search = 'none'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
l_max_its = 2
l_tol = 1e-14
nl_max_its = 20
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 0.2
dtmin = 0.2
end_time = 1.0
[]
[Outputs]
[out]
type = Exodus
[]
[]
[Postprocessors]
[time]
type = TimePostprocessor
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[mCS_xx]
type = ElementAverageValue
variable = pk1_stress_xx
[]
[mCS_yy]
type = ElementAverageValue
variable = pk1_stress_yy
[]
[mCS_zz]
type = ElementAverageValue
variable = pk1_stress_zz
[]
[mCS_xy]
type = ElementAverageValue
variable = pk1_stress_xy
[]
[mCS_xz]
type = ElementAverageValue
variable = pk1_stress_xz
[]
[mCS_yx]
type = ElementAverageValue
variable = pk1_stress_yx
[]
[mCS_yz]
type = ElementAverageValue
variable = pk1_stress_yz
[]
[mCS_zy]
type = ElementAverageValue
variable = pk1_stress_zy
[]
[mCS_zx]
type = ElementAverageValue
variable = pk1_stress_zx
[]
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/neml2/small_neml.i)
constraint_types = 'strain none none stress stress stress stress none stress'
targets = 'strain11 zero zero zero zero zero'
[Mesh]
[base]
type = FileMeshGenerator
file = '3d.exo'
[]
[sidesets]
type = SideSetsFromNormalsGenerator
input = base
normals = '-1 0 0
1 0 0
0 -1 0
0 1 0
0 0 -1
0 0 1'
fixed_normal = true
new_boundary = 'left right bottom top back front'
[]
[]
[BCs]
[fix1_x]
type = DirichletBC
boundary = fix_all
matrix_tags = 'system time'
value = 0
variable = disp_x
vector_tags = residual
[]
[]
[BCs]
[fix1_y]
type = DirichletBC
boundary = fix_all
matrix_tags = 'system time'
value = 0
variable = disp_y
vector_tags = residual
[]
[]
[BCs]
[fix1_z]
type = DirichletBC
boundary = fix_all
matrix_tags = 'system time'
value = 0
variable = disp_z
vector_tags = residual
[]
[]
[BCs]
[fix2_x]
type = DirichletBC
boundary = fix_xy
matrix_tags = 'system time'
value = 0
variable = disp_x
vector_tags = residual
[]
[]
[BCs]
[fix2_y]
type = DirichletBC
boundary = fix_xy
matrix_tags = 'system time'
value = 0
variable = disp_y
vector_tags = residual
[]
[]
[BCs]
[fix3_z]
type = DirichletBC
boundary = fix_z
matrix_tags = 'system time'
value = 0
variable = disp_z
vector_tags = residual
[]
[]
[Functions]
[strain11]
type = ParsedFunction
expression = t
[]
[]
[Functions]
[zero]
type = ConstantFunction
value = 0
[]
[]
[Materials]
[compute_homogenization_gradient]
type = ComputeHomogenizedLagrangianStrain
constraint_types = ${constraint_types}
targets = ${targets}
macro_gradient = hvar
[]
[compute_strain]
type = ComputeLagrangianStrain
homogenization_gradient_names = 'homogenization_gradient'
displacements = 'disp_x disp_y disp_z'
[]
[]
[Materials]
[neml2_stress_to_moose]
type = NEML2ToMOOSESymmetricRankTwoTensorMaterialProperty
block = ''
from_neml2 = neml2_stress
neml2_executor = neml2_model_all
outputs = none
to_moose = neml2_stress
[]
[neml2_jacobian_to_moose]
type = NEML2ToMOOSESymmetricRankFourTensorMaterialProperty
block = ''
from_neml2 = neml2_stress
neml2_executor = neml2_model_all
neml2_input_derivative = neml2_strain
outputs = none
to_moose = dneml2_stress/dneml2_strain
[]
[]
[Materials]
[convert_strain]
type = RankTwoTensorToSymmetricRankTwoTensor
from = mechanical_strain
outputs = none
to = neml2_strain
[]
[]
[Materials]
[stress]
type = ComputeLagrangianObjectiveCustomSymmetricStress
custom_small_jacobian = dneml2_stress/dneml2_strain
custom_small_stress = neml2_stress
large_kinematics = false
outputs = none
[]
[]
[BCs]
[Periodic]
[x]
variable = disp_x
auto_direction = 'x y z'
[]
[y]
variable = disp_y
auto_direction = 'x y z'
[]
[z]
variable = disp_z
auto_direction = 'x y z'
[]
[]
[]
[UserObjects]
[moose_strain_to_neml2]
type = MOOSESymmetricRankTwoTensorToNEML2
block = ''
execute_on = 'INITIAL LINEAR NONLINEAR'
from_moose = neml2_strain
quantity_type = MATERIAL
to_neml2 = neml2_strain
[]
[neml2_index_model_all]
type = NEML2BatchIndexGenerator
block = ''
execute_on = 'INITIAL LINEAR NONLINEAR'
[]
[neml2_model_all]
type = NEML2ModelExecutor
batch_index_generator = neml2_index_model_all
device = cpu
execute_on = 'INITIAL LINEAR NONLINEAR TIMESTEP_END'
gatherers = 'moose_strain_to_neml2'
input = neml2_elastic.i
model = model
param_gatherers = ''
[]
[]
[Variables]
[disp_x]
type = MooseVariable
family = LAGRANGE
order = FIRST
[]
[disp_y]
type = MooseVariable
family = LAGRANGE
order = FIRST
[]
[disp_z]
type = MooseVariable
family = LAGRANGE
order = FIRST
[]
[hvar]
type = MooseVariableScalar
family = SCALAR
order = SIXTH
[]
[]
[AuxKernels]
[cauchy_stress_xx_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = cauchy_stress_xx
variable = cauchy_stress_xx
[]
[cauchy_stress_xy_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = cauchy_stress_xy
variable = cauchy_stress_xy
[]
[cauchy_stress_xz_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = cauchy_stress_xz
variable = cauchy_stress_xz
[]
[cauchy_stress_yx_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = cauchy_stress_yx
variable = cauchy_stress_yx
[]
[cauchy_stress_yy_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = cauchy_stress_yy
variable = cauchy_stress_yy
[]
[cauchy_stress_yz_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = cauchy_stress_yz
variable = cauchy_stress_yz
[]
[cauchy_stress_zx_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = cauchy_stress_zx
variable = cauchy_stress_zx
[]
[cauchy_stress_zy_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = cauchy_stress_zy
variable = cauchy_stress_zy
[]
[cauchy_stress_zz_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = cauchy_stress_zz
variable = cauchy_stress_zz
[]
[deformation_gradient_xx_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = deformation_gradient_xx
variable = deformation_gradient_xx
[]
[deformation_gradient_xy_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = deformation_gradient_xy
variable = deformation_gradient_xy
[]
[deformation_gradient_xz_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = deformation_gradient_xz
variable = deformation_gradient_xz
[]
[deformation_gradient_yx_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = deformation_gradient_yx
variable = deformation_gradient_yx
[]
[deformation_gradient_yy_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = deformation_gradient_yy
variable = deformation_gradient_yy
[]
[deformation_gradient_yz_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = deformation_gradient_yz
variable = deformation_gradient_yz
[]
[deformation_gradient_zx_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = deformation_gradient_zx
variable = deformation_gradient_zx
[]
[deformation_gradient_zy_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = deformation_gradient_zy
variable = deformation_gradient_zy
[]
[deformation_gradient_zz_all]
type = MaterialRealAux
block = ''
execute_on = TIMESTEP_END
property = deformation_gradient_zz
variable = deformation_gradient_zz
[]
[]
[AuxVariables]
[cauchy_stress_xx]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[cauchy_stress_xy]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[cauchy_stress_xz]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[cauchy_stress_yx]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[cauchy_stress_yy]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[cauchy_stress_yz]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[cauchy_stress_zx]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[cauchy_stress_zy]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[cauchy_stress_zz]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_xx]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_xy]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_xz]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_yx]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_yy]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_yz]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_zx]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_zy]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[deformation_gradient_zz]
type = MooseVariableConstMonomial
family = MONOMIAL
order = CONSTANT
[]
[]
[Kernels]
[TM_all0]
type = HomogenizedTotalLagrangianStressDivergence
component = 0
displacements = 'disp_x disp_y disp_z'
large_kinematics = false
stabilize_strain = false
variable = disp_x
macro_var = hvar
constraint_types = ${constraint_types}
targets = ${targets}
[]
[TM_all1]
type = HomogenizedTotalLagrangianStressDivergence
component = 1
displacements = 'disp_x disp_y disp_z'
large_kinematics = false
stabilize_strain = false
variable = disp_y
macro_var = hvar
constraint_types = ${constraint_types}
targets = ${targets}
[]
[TM_all2]
type = HomogenizedTotalLagrangianStressDivergence
component = 2
displacements = 'disp_x disp_y disp_z'
large_kinematics = false
stabilize_strain = false
variable = disp_z
macro_var = hvar
constraint_types = ${constraint_types}
targets = ${targets}
[]
[]
[Materials]
[cauchy_stress_xx_all]
type = RankTwoCartesianComponent
block = ''
index_i = 0
index_j = 0
outputs = none
property_name = cauchy_stress_xx
rank_two_tensor = cauchy_stress
[]
[cauchy_stress_xy_all]
type = RankTwoCartesianComponent
block = ''
index_i = 0
index_j = 1
outputs = none
property_name = cauchy_stress_xy
rank_two_tensor = cauchy_stress
[]
[cauchy_stress_xz_all]
type = RankTwoCartesianComponent
block = ''
index_i = 0
index_j = 2
outputs = none
property_name = cauchy_stress_xz
rank_two_tensor = cauchy_stress
[]
[cauchy_stress_yx_all]
type = RankTwoCartesianComponent
block = ''
index_i = 1
index_j = 0
outputs = none
property_name = cauchy_stress_yx
rank_two_tensor = cauchy_stress
[]
[cauchy_stress_yy_all]
type = RankTwoCartesianComponent
block = ''
index_i = 1
index_j = 1
outputs = none
property_name = cauchy_stress_yy
rank_two_tensor = cauchy_stress
[]
[cauchy_stress_yz_all]
type = RankTwoCartesianComponent
block = ''
index_i = 1
index_j = 2
outputs = none
property_name = cauchy_stress_yz
rank_two_tensor = cauchy_stress
[]
[cauchy_stress_zx_all]
type = RankTwoCartesianComponent
block = ''
index_i = 2
index_j = 0
outputs = none
property_name = cauchy_stress_zx
rank_two_tensor = cauchy_stress
[]
[cauchy_stress_zy_all]
type = RankTwoCartesianComponent
block = ''
index_i = 2
index_j = 1
outputs = none
property_name = cauchy_stress_zy
rank_two_tensor = cauchy_stress
[]
[cauchy_stress_zz_all]
type = RankTwoCartesianComponent
block = ''
index_i = 2
index_j = 2
outputs = none
property_name = cauchy_stress_zz
rank_two_tensor = cauchy_stress
[]
[deformation_gradient_xx_all]
type = RankTwoCartesianComponent
block = ''
index_i = 0
index_j = 0
outputs = none
property_name = deformation_gradient_xx
rank_two_tensor = deformation_gradient
[]
[deformation_gradient_xy_all]
type = RankTwoCartesianComponent
block = ''
index_i = 0
index_j = 1
outputs = none
property_name = deformation_gradient_xy
rank_two_tensor = deformation_gradient
[]
[deformation_gradient_xz_all]
type = RankTwoCartesianComponent
block = ''
index_i = 0
index_j = 2
outputs = none
property_name = deformation_gradient_xz
rank_two_tensor = deformation_gradient
[]
[deformation_gradient_yx_all]
type = RankTwoCartesianComponent
block = ''
index_i = 1
index_j = 0
outputs = none
property_name = deformation_gradient_yx
rank_two_tensor = deformation_gradient
[]
[deformation_gradient_yy_all]
type = RankTwoCartesianComponent
block = ''
index_i = 1
index_j = 1
outputs = none
property_name = deformation_gradient_yy
rank_two_tensor = deformation_gradient
[]
[deformation_gradient_yz_all]
type = RankTwoCartesianComponent
block = ''
index_i = 1
index_j = 2
outputs = none
property_name = deformation_gradient_yz
rank_two_tensor = deformation_gradient
[]
[deformation_gradient_zx_all]
type = RankTwoCartesianComponent
block = ''
index_i = 2
index_j = 0
outputs = none
property_name = deformation_gradient_zx
rank_two_tensor = deformation_gradient
[]
[deformation_gradient_zy_all]
type = RankTwoCartesianComponent
block = ''
index_i = 2
index_j = 1
outputs = none
property_name = deformation_gradient_zy
rank_two_tensor = deformation_gradient
[]
[deformation_gradient_zz_all]
type = RankTwoCartesianComponent
block = ''
index_i = 2
index_j = 2
outputs = none
property_name = deformation_gradient_zz
rank_two_tensor = deformation_gradient
[]
[]
[Executioner]
type = Transient
residual_and_jacobian_together = true
solve_type = 'newton'
line_search = 'none'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
l_max_its = 2
l_tol = 1e-14
nl_max_its = 20
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
start_time = 0.0
dt = 0.2
dtmin = 0.2
end_time = 1.0
[]
[Outputs]
[out]
type = Exodus
[]
[]
[Postprocessors]
[time]
type = TimePostprocessor
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[mCS_xx]
type = ElementAverageValue
variable = cauchy_stress_xx
[]
[mCS_yy]
type = ElementAverageValue
variable = cauchy_stress_yy
[]
[mCS_zz]
type = ElementAverageValue
variable = cauchy_stress_zz
[]
[mCS_xy]
type = ElementAverageValue
variable = cauchy_stress_xy
[]
[mCS_xz]
type = ElementAverageValue
variable = cauchy_stress_xz
[]
[mCS_yx]
type = ElementAverageValue
variable = cauchy_stress_yx
[]
[mCS_yz]
type = ElementAverageValue
variable = cauchy_stress_yz
[]
[mCS_zy]
type = ElementAverageValue
variable = cauchy_stress_zy
[]
[mCS_zx]
type = ElementAverageValue
variable = cauchy_stress_zx
[]
[]
(modules/chemical_reactions/test/tests/thermochimica/MoRu_subblock.i)
[Mesh]
[two_blocks]
type = CartesianMeshGenerator
dim = 2
dx = '0.5 1.0'
dy = '1.0'
ix = '5 5'
iy = '5'
subdomain_id = '0 1'
[]
[]
[ChemicalComposition]
tunit = K
punit = atm
munit = moles
is_fv = true
temperature = T
[block_0]
block = '0'
elements = 'Mo Ru'
thermofile = Kaye_NobleMetals.dat
output_phases = 'BCCN HCPN'
output_species = 'BCCN:Mo'
is_fv = false
output_species_unit = mole_fraction
[]
[block_1]
block = '1'
elements = 'Fe O'
thermofile = FeTiVO.dat
output_phases = 'gas_ideal'
output_species = 'SlagBsoln:Fe2O3'
output_species_unit = moles
[]
[]
[ICs]
[Mo]
type = FunctionIC
variable = Mo
function = '0.8*(1-x)+4.3*x'
block = '0'
[]
[Ru]
type = FunctionIC
variable = Ru
function = '0.2*(1-x)+4.5*x'
block = '0'
[]
[O]
type = FunctionIC
variable = O
function = '2.0*(1-x)+1.6*x'
block = '1'
[]
[Fe]
type = FunctionIC
variable = Fe
function = '0.5*(1-x)+0.25*x'
block = '1'
[]
[]
[AuxVariables]
[T]
type = MooseVariable
[]
[]
[AuxKernels]
[T]
type = ParsedAux
variable = T
use_xyzt = true
expression = '1250.0+1000.0*(x/1.5)'
execute_on = 'INITIAL'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]