- 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
Controllable:No
Description:Number of components for an array variable
- disable_p_refinementFalseTrue to disable p-refinement for this variable. Note that because this happens on the family basis, users need to have this flag consistently set for all variables in the same family. Currently MOOSE disables p-refinement for variables in the following families by default: LAGRANGE NEDELEC_ONE RAVIART_THOMAS LAGRANGE_VEC CLOUGH BERNSTEIN and RATIONAL_BERNSTEIN.
Default:False
C++ Type:bool
Controllable:No
Description:True to disable p-refinement for this variable. Note that because this happens on the family basis, users need to have this flag consistently set for all variables in the same family. Currently MOOSE disables p-refinement for variables in the following families by default: LAGRANGE NEDELEC_ONE RAVIART_THOMAS LAGRANGE_VEC CLOUGH BERNSTEIN and RATIONAL_BERNSTEIN.
- familySCALARSpecifies the family of FE shape functions to use for this variable.
Default:SCALAR
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<double>
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
- orderFIRSTOrder of the FE shape function to use for this variable (additional orders not listed here are allowed, depending on the family).
Default:FIRST
C++ Type:MooseEnum
Controllable:No
Description:Order of the FE shape function to use for this variable (additional orders not listed here are allowed, depending on the 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.
MooseVariableScalar
Moose wrapper class around scalar variables
A detailed description of the MOOSE variable system is given in the base class documentation.
This variable type is very useful for solving ODEs where the independent variable is time, e.g. the variable does not have any spatial dependence.
Typically, contribution to the residual and Jacobian equations for scalar variables are handled using ScalarKernels
. For coupling with spatial variables, then augmentations of the base classes, such as the KernelScalarBase
for the Kernel
class, can be used as described here: Coupling with Spatial Variables.
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<double>
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
- (test/tests/fvkernels/constraints/integral.i)
- (tutorials/shield_multiphysics/inputs/step11_multiapps/step11_2d_fluid.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/neml2/large_neml.i)
- (test/tests/scaling/scalar-field-grouping/test.i)
- (test/tests/fvkernels/constraints/integral_transient.i)
- (test/tests/transfers/multiapp_postprocessor_to_scalar/between_multiapp/sub0.i)
- (test/tests/transfers/multiapp_scalar_to_auxscalar_transfer/between_multiapp/sub0.i)
- (test/tests/fviks/continuity/test.i)
- (tutorials/shield_multiphysics/inputs/step10_finite_volume/step10.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/homogenization/neml2/small_neml.i)
- (test/tests/transfers/multiapp_scalar_to_auxscalar_transfer/between_multiapp/sub1.i)
- (test/tests/fvkernels/constraints/point_value.i)
- (test/tests/transfers/multiapp_postprocessor_to_scalar/between_multiapp/sub1.i)
- (test/tests/fvkernels/constraints/bounded_value.i)
(test/tests/fvkernels/constraints/integral.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 4
[]
[Variables]
[v]
type = MooseVariableFVReal
[]
[lambda]
type = MooseVariableScalar
[]
[]
[FVKernels]
[diff]
type = FVDiffusion
variable = v
coeff = coeff
[]
[average]
type = FVIntegralValueConstraint
variable = v
phi0 = 13
lambda = lambda
[]
[]
[FVBCs]
[left]
type = FVDirichletBC
variable = v
boundary = left
value = 7
[]
[]
[Materials]
[diff]
type = ADGenericFunctorMaterial
prop_names = 'coeff'
prop_values = '1'
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
[]
[Outputs]
exodus = true
[]
(tutorials/shield_multiphysics/inputs/step11_multiapps/step11_2d_fluid.i)
cp_water_multiplier = 5e-2
mu_multiplier = 1
# Real facility uses forced convection to cool the water tank at full power
# Need to lower power for natural convection so concrete doesn't get too hot.
power = '${fparse 5e4 / 144 * 0.5}'
[Mesh]
[fmg]
type = FileMeshGenerator
file = 'mesh2d_coarse_in.e'
[]
[]
[Variables]
[vel_x]
type = INSFVVelocityVariable
block = 'water'
initial_condition = 1e-4
[]
[vel_y]
type = INSFVVelocityVariable
block = 'water'
initial_condition = 1e-4
[]
[pressure]
type = INSFVPressureVariable
block = 'water'
initial_condition = 1e5
[]
[T_fluid]
type = INSFVEnergyVariable
initial_condition = 300
block = 'water'
scaling = 1e-05
[]
[lambda]
type = MooseVariableScalar
family = SCALAR
order = FIRST
# Cleans up console output
outputs = none
[]
[]
[GlobalParams]
velocity_interp_method = rc
rhie_chow_user_object = ins_rhie_chow_interpolator
rho = rho
[]
[FVKernels]
[water_ins_mass_advection]
type = INSFVMassAdvection
advected_interp_method = upwind
block = water
variable = pressure
[]
[water_ins_mass_pressure_pin]
type = FVPointValueConstraint
lambda = lambda
phi0 = 1e5
point = '1 3 0'
variable = pressure
[]
[water_ins_momentum_time_vel_x]
type = INSFVMomentumTimeDerivative
block = water
momentum_component = x
variable = vel_x
[]
[water_ins_momentum_time_vel_y]
type = INSFVMomentumTimeDerivative
block = water
momentum_component = y
variable = vel_y
[]
[water_ins_momentum_advection_x]
type = INSFVMomentumAdvection
advected_interp_method = upwind
block = water
momentum_component = x
variable = vel_x
characteristic_speed = 0.01
[]
[water_ins_momentum_advection_y]
type = INSFVMomentumAdvection
advected_interp_method = upwind
block = water
momentum_component = y
variable = vel_y
characteristic_speed = 0.1
[]
[water_ins_momentum_diffusion_x]
type = INSFVMomentumDiffusion
block = water
momentum_component = x
mu = mu
variable = vel_x
[]
[water_ins_momentum_diffusion_y]
type = INSFVMomentumDiffusion
block = water
momentum_component = y
mu = mu
variable = vel_y
[]
[water_ins_momentum_pressure_x]
type = INSFVMomentumPressure
block = water
momentum_component = x
pressure = pressure
variable = vel_x
[]
[water_ins_momentum_pressure_y]
type = INSFVMomentumPressure
block = water
momentum_component = y
pressure = pressure
variable = vel_y
[]
[water_ins_momentum_gravity_z]
type = INSFVMomentumGravity
block = water
gravity = '0 -9.81 0'
momentum_component = y
variable = vel_y
[]
[water_ins_momentum_boussinesq_z]
type = INSFVMomentumBoussinesq
T_fluid = T_fluid
alpha_name = alpha
block = water
gravity = '0 -9.81 0'
momentum_component = y
ref_temperature = 300
rho = 955.7
variable = vel_y
[]
# Energy conservation equation
[water_ins_energy_time]
type = INSFVEnergyTimeDerivative
block = water
dh_dt = dh_dt
rho = rho
variable = T_fluid
[]
[water_ins_energy_advection]
type = INSFVEnergyAdvection
advected_interp_method = upwind
block = water
variable = T_fluid
[]
[water_ins_energy_diffusion_all]
type = FVDiffusion
block = water
coeff = k
variable = T_fluid
[]
# Turbulence
[water_ins_viscosity_rans_x]
type = INSFVMixingLengthReynoldsStress
variable = vel_x
mixing_length = mixing_length
momentum_component = 'x'
u = vel_x
v = vel_y
[]
[water_ins_viscosity_rans_y]
type = INSFVMixingLengthReynoldsStress
variable = vel_y
mixing_length = mixing_length
momentum_component = 'y'
u = vel_x
v = vel_y
[]
[water_ins_energy_rans]
type = WCNSFVMixingLengthEnergyDiffusion
variable = T_fluid
cp = cp
mixing_length = mixing_length
schmidt_number = 1
u = vel_x
v = vel_y
[]
[]
[AuxKernels]
[mixing_length]
type = WallDistanceMixingLengthAux
variable = mixing_length
walls = 'water_boundary inner_cavity_water'
execute_on = 'initial'
[]
[]
[FunctorMaterials]
[water]
type = ADGenericFunctorMaterial
block = 'water'
prop_names = 'rho k cp mu alpha_wall'
prop_values = '955.7 0.6 ${fparse cp_water_multiplier * 4181} ${fparse 7.98e-4 * mu_multiplier} 30'
[]
[boussinesq_params]
type = ADGenericFunctorMaterial
prop_names = 'alpha '
prop_values = '2.9e-3'
[]
[water_ins_enthalpy_material]
type = INSFVEnthalpyFunctorMaterial
block = water
cp = cp
execute_on = ALWAYS
outputs = none
temperature = T_fluid
[]
[total_viscosity]
type = MixingLengthTurbulentViscosityFunctorMaterial
u = 'vel_x'
v = 'vel_y'
mixing_length = mixing_length
mu = mu
[]
[]
[FVBCs]
[vel_x_water_boundary]
type = INSFVNoSlipWallBC
boundary = 'water_boundary inner_cavity_water'
function = 0
variable = vel_x
[]
[vel_y_water_boundary]
type = INSFVNoSlipWallBC
boundary = 'water_boundary inner_cavity_water'
function = 0
variable = vel_y
[]
[T_fluid_inner_cavity]
type = FVFunctorNeumannBC
boundary = inner_cavity_water
functor = ${power}
variable = T_fluid
[]
[T_fluid_water_boundary]
type = FVFunctorConvectiveHeatFluxBC
boundary = water_boundary
variable = T_fluid
T_bulk = T_fluid
T_solid = T_solid
heat_transfer_coefficient = 600
is_solid = false
[]
[]
[UserObjects]
[ins_rhie_chow_interpolator]
type = INSFVRhieChowInterpolator
pressure = 'pressure'
u = 'vel_x'
v = 'vel_y'
block = 'water'
[]
[]
[AuxVariables]
# This isn't used in simulation, but useful for visualization
[vel_z]
type = INSFVVelocityVariable
block = 'water'
initial_condition = 0
[]
[mixing_length]
block = 'water'
order = CONSTANT
family = MONOMIAL
fv = true
[]
# This is the variable that is transferred from the main app
[T_solid]
block = 'concrete_hd concrete Al'
initial_condition = 300
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Executioner]
type = Transient
solve_type = NEWTON
automatic_scaling = true
off_diagonals_in_auto_scaling = true
line_search = none
# Direct solve works for everything small enough
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu NONZERO superlu_dist'
nl_abs_tol = 3e-7
nl_max_its = 10
l_max_its = 3
start_time = -1
dtmax = 100
[TimeStepper]
type = FunctionDT
function = 'if(t < 0.1, 0.1, t)'
[]
[]
[Outputs]
exodus = true
[]
(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
displacements = 'disp_x disp_y disp_z'
matrix_tags = 'system time'
value = 0
variable = disp_x
vector_tags = residual
[]
[]
[BCs]
[fix1_y]
type = DirichletBC
boundary = fix_all
displacements = 'disp_x disp_y disp_z'
matrix_tags = 'system time'
value = 0
variable = disp_y
vector_tags = residual
[]
[]
[BCs]
[fix1_z]
type = DirichletBC
boundary = fix_all
displacements = 'disp_x disp_y disp_z'
matrix_tags = 'system time'
value = 0
variable = disp_z
vector_tags = residual
[]
[]
[BCs]
[fix2_x]
type = DirichletBC
boundary = fix_xy
displacements = 'disp_x disp_y disp_z'
matrix_tags = 'system time'
value = 0
variable = disp_x
vector_tags = residual
[]
[]
[BCs]
[fix2_y]
type = DirichletBC
boundary = fix_xy
displacements = 'disp_x disp_y disp_z'
matrix_tags = 'system time'
value = 0
variable = disp_y
vector_tags = residual
[]
[]
[BCs]
[fix3_z]
type = DirichletBC
boundary = fix_z
displacements = 'disp_x disp_y disp_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 = neml2_jacobian
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]
[material_neml2_to_moose_stress]
type = NEML2ToMOOSESymmetricRankTwoTensorMaterialProperty
block = ''
from_neml2 = state/S
neml2_executor = neml2_model_all
outputs = none
to_moose = neml2_stress
[]
[material_neml2_to_moose_jacobian]
type = NEML2ToMOOSESymmetricRankFourTensorMaterialProperty
block = ''
from_neml2 = state/S
neml2_executor = neml2_model_all
neml2_input_derivative = forces/E
outputs = none
to_moose = neml2_jacobian
[]
[]
[UserObjects]
[UO_strain_moose_to_neml2]
type = MOOSESymmetricRankTwoTensorMaterialPropertyToNEML2
block = ''
execute_on = 'INITIAL LINEAR NONLINEAR'
from_moose = neml2_strain
to_neml2 = forces/E
[]
[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'
gatherers = UO_strain_moose_to_neml2
input = neml2_elastic.i
model = model
param_gatherers = ''
execution_order_group = 1
[]
[]
[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
[]
[]
(test/tests/scaling/scalar-field-grouping/test.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 20
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[interface_primary_side]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary_interface'
[]
[]
[Variables]
[u]
type = MooseVariableFVReal
block = 0
initial_condition = 0.5
[]
[v]
type = MooseVariableFVReal
block = 1
initial_condition = 0.5
[]
[lambda]
type = MooseVariableScalar
[]
[]
[FVKernels]
[diff_left]
type = FVDiffusion
variable = u
coeff = 'left'
block = 0
[]
[diff_right]
type = FVDiffusion
variable = v
coeff = 'right'
block = 1
[]
[]
[FVInterfaceKernels]
[interface]
type = FVTwoVarContinuityConstraint
variable1 = u
variable2 = v
boundary = 'primary_interface'
subdomain1 = '0'
subdomain2 = '1'
lambda = 'lambda'
[]
[]
[FVBCs]
[left]
type = FVDirichletBC
variable = u
boundary = 'left'
value = 1
[]
[v_left]
type = FVDirichletBC
variable = v
boundary = 'right'
value = 0
[]
[]
[Materials]
[block0]
type = ADGenericFunctorMaterial
block = '0'
prop_names = 'left'
prop_values = '1'
[]
[block1]
type = ADGenericFunctorMaterial
block = '1'
prop_names = 'right'
prop_values = '1'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm lu NONZERO'
automatic_scaling = true
off_diagonals_in_auto_scaling = true
scaling_group_variables = 'u v lambda'
verbose = true
[]
[Outputs]
exodus = true
[]
(test/tests/fvkernels/constraints/integral_transient.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 4
[]
[Variables]
[v]
type = MooseVariableFVReal
[]
[lambda]
type = MooseVariableScalar
[]
[]
[FVKernels]
[diff]
type = FVDiffusion
variable = v
coeff = coeff
[]
[average]
type = FVIntegralValueConstraint
variable = v
phi0 = phi0_pp
lambda = lambda
[]
[]
[FVBCs]
[left]
type = FVDirichletBC
variable = v
boundary = left
value = 7
[]
[]
[Materials]
[diff]
type = ADGenericFunctorMaterial
prop_names = 'coeff'
prop_values = '1'
[]
[]
[Postprocessors]
[phi0_pp]
type = FunctionValuePostprocessor
function = 't + 13'
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
[]
[Outputs]
exodus = true
[]
(test/tests/transfers/multiapp_postprocessor_to_scalar/between_multiapp/sub0.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[from_1]
type = MooseVariableScalar
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[average_0]
type = ElementAverageValue
variable = u
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
line_search = none
nl_abs_tol = 1e-12
[]
[Outputs]
csv = true
[]
(test/tests/transfers/multiapp_scalar_to_auxscalar_transfer/between_multiapp/sub0.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[AuxVariables]
[base_0]
family = SCALAR
order = FIRST
initial_condition = 1
[]
[from_1]
type = MooseVariableScalar
order = FOURTH
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
line_search = none
nl_abs_tol = 1e-12
[]
[Outputs]
csv = true
[]
(test/tests/fviks/continuity/test.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 20
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[interface_primary_side]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary_interface'
[]
[]
[GlobalParams]
# retain behavior at time of test creation
two_term_boundary_expansion = false
[]
[Variables]
[u]
type = MooseVariableFVReal
block = 0
initial_condition = 0.5
[]
[v]
type = MooseVariableFVReal
block = 1
initial_condition = 0.5
[]
[lambda]
type = MooseVariableScalar
[]
[]
[Problem]
kernel_coverage_check = false
[]
[FVKernels]
[diff_left]
type = FVDiffusion
variable = u
coeff = 'left'
block = 0
[]
[diff_right]
type = FVDiffusion
variable = v
coeff = 'right'
block = 1
[]
[]
[FVInterfaceKernels]
[interface]
type = FVTwoVarContinuityConstraint
variable1 = u
variable2 = v
boundary = 'primary_interface'
subdomain1 = '0'
subdomain2 = '1'
lambda = 'lambda'
[]
[]
[FVBCs]
[left]
type = FVDirichletBC
variable = u
boundary = 'left'
value = 1
[]
[v_left]
type = FVDirichletBC
variable = v
boundary = 'right'
value = 0
[]
[]
[Materials]
[block0]
type = ADGenericFunctorMaterial
block = '0'
prop_names = 'left'
prop_values = '1'
[]
[block1]
type = ADGenericFunctorMaterial
block = '1'
prop_names = 'right'
prop_values = '1'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm lu NONZERO'
[]
[Outputs]
exodus = true
[]
(tutorials/shield_multiphysics/inputs/step10_finite_volume/step10.i)
cp_water_multiplier = 5e-2
mu_multiplier = 1
power = '${fparse 5e4 / 144}'
[Mesh]
[fmg]
type = FileMeshGenerator
file = 'mesh2d_in.e'
[]
[]
[Variables]
[vel_x]
type = INSFVVelocityVariable
block = 'water'
initial_condition = 1e-4
[]
[vel_y]
type = INSFVVelocityVariable
block = 'water'
initial_condition = 1e-4
[]
[pressure]
type = INSFVPressureVariable
block = 'water'
initial_condition = 1e5
[]
[T_fluid]
type = INSFVEnergyVariable
initial_condition = 300
block = 'water'
scaling = 1e-05
[]
[lambda]
type = MooseVariableScalar
family = SCALAR
order = FIRST
[]
[]
[AuxVariables]
# This isn't used in simulation, but useful for visualization
[vel_z]
type = INSFVVelocityVariable
block = 'water'
initial_condition = 0
[]
[mixing_length]
block = 'water'
order = CONSTANT
family = MONOMIAL
fv = true
[]
[]
[GlobalParams]
velocity_interp_method = rc
rhie_chow_user_object = ins_rhie_chow_interpolator
rho = rho
[]
[FVKernels]
[water_ins_mass_advection]
type = INSFVMassAdvection
advected_interp_method = upwind
block = water
variable = pressure
[]
[water_ins_mass_pressure_pin]
type = FVPointValueConstraint
lambda = lambda
phi0 = 1e5
point = '1 3 0'
variable = pressure
[]
[water_ins_momentum_time_vel_x]
type = INSFVMomentumTimeDerivative
block = water
momentum_component = x
variable = vel_x
[]
[water_ins_momentum_time_vel_y]
type = INSFVMomentumTimeDerivative
block = water
momentum_component = y
variable = vel_y
[]
[water_ins_momentum_advection_x]
type = INSFVMomentumAdvection
advected_interp_method = upwind
block = water
momentum_component = x
variable = vel_x
characteristic_speed = 0.01
[]
[water_ins_momentum_advection_y]
type = INSFVMomentumAdvection
advected_interp_method = upwind
block = water
momentum_component = y
variable = vel_y
characteristic_speed = 0.1
[]
[water_ins_momentum_diffusion_x]
type = INSFVMomentumDiffusion
block = water
momentum_component = x
mu = mu
variable = vel_x
[]
[water_ins_momentum_diffusion_y]
type = INSFVMomentumDiffusion
block = water
momentum_component = y
mu = mu
variable = vel_y
[]
[water_ins_momentum_pressure_x]
type = INSFVMomentumPressure
block = water
momentum_component = x
pressure = pressure
variable = vel_x
[]
[water_ins_momentum_pressure_y]
type = INSFVMomentumPressure
block = water
momentum_component = y
pressure = pressure
variable = vel_y
[]
[water_ins_momentum_gravity_z]
type = INSFVMomentumGravity
block = water
gravity = '0 -9.81 0'
momentum_component = y
variable = vel_y
[]
[water_ins_momentum_boussinesq_z]
type = INSFVMomentumBoussinesq
T_fluid = T_fluid
alpha_name = alpha
block = water
gravity = '0 -9.81 0'
momentum_component = y
ref_temperature = 300
rho = 955.7
variable = vel_y
[]
# Energy conservation equation
[water_ins_energy_time]
type = INSFVEnergyTimeDerivative
block = water
dh_dt = dh_dt
rho = rho
variable = T_fluid
[]
[water_ins_energy_advection]
type = INSFVEnergyAdvection
advected_interp_method = upwind
block = water
variable = T_fluid
[]
[water_ins_energy_diffusion_all]
type = FVDiffusion
block = water
coeff = k
variable = T_fluid
[]
# Turbulence
[water_ins_viscosity_rans_x]
type = INSFVMixingLengthReynoldsStress
variable = vel_x
mixing_length = mixing_length
momentum_component = 'x'
u = vel_x
v = vel_y
[]
[water_ins_viscosity_rans_y]
type = INSFVMixingLengthReynoldsStress
variable = vel_y
mixing_length = mixing_length
momentum_component = 'y'
u = vel_x
v = vel_y
[]
[water_ins_energy_rans]
type = WCNSFVMixingLengthEnergyDiffusion
variable = T_fluid
cp = cp
mixing_length = mixing_length
schmidt_number = 1
u = vel_x
v = vel_y
[]
[]
[AuxKernels]
[mixing_length]
type = WallDistanceMixingLengthAux
variable = mixing_length
walls = 'water_boundary inner_cavity_water'
execute_on = 'initial'
[]
[]
[FunctorMaterials]
[water]
type = ADGenericFunctorMaterial
block = 'water'
prop_names = 'rho k cp mu alpha_wall'
prop_values = '955.7 0.6 ${fparse cp_water_multiplier * 4181} ${fparse 7.98e-4 * mu_multiplier} 30'
[]
[boussinesq_params]
type = ADGenericFunctorMaterial
prop_names = 'alpha '
prop_values = '2.9e-3'
[]
[water_ins_enthalpy_material]
type = INSFVEnthalpyFunctorMaterial
block = water
cp = cp
execute_on = ALWAYS
outputs = none
temperature = T_fluid
[]
[total_viscosity]
type = MixingLengthTurbulentViscosityFunctorMaterial
u = 'vel_x'
v = 'vel_y'
mixing_length = mixing_length
mu = mu
[]
[]
[FVBCs]
[vel_x_water_boundary]
type = INSFVNoSlipWallBC
boundary = 'water_boundary inner_cavity_water'
function = 0
variable = vel_x
[]
[vel_y_water_boundary]
type = INSFVNoSlipWallBC
boundary = 'water_boundary inner_cavity_water'
function = 0
variable = vel_y
[]
[T_fluid_inner_cavity]
type = FVFunctorNeumannBC
boundary = inner_cavity_water
functor = ${power}
variable = T_fluid
[]
[T_fluid_water_boundary]
type = FVFunctorConvectiveHeatFluxBC
boundary = water_boundary
variable = T_fluid
T_bulk = T_fluid
T_solid = 300
heat_transfer_coefficient = 600
is_solid = false
[]
[]
[UserObjects]
[ins_rhie_chow_interpolator]
type = INSFVRhieChowInterpolator
pressure = 'pressure'
u = 'vel_x'
v = 'vel_y'
block = 'water'
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Executioner]
type = Transient
solve_type = NEWTON
automatic_scaling = true
off_diagonals_in_auto_scaling = true
line_search = none
# Direct solve works for everything small enough
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu NONZERO superlu_dist'
nl_abs_tol = 1e-8
nl_max_its = 10
l_max_its = 3
steady_state_tolerance = 1e-12
steady_state_detection = true
normalize_solution_diff_norm_by_dt = false
start_time = -1
dtmax = 100
[TimeStepper]
type = FunctionDT
function = 'if(t < 1, 0.1, t / 10)'
[]
[]
[Outputs]
exodus = true
[]
(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
displacements = 'disp_x disp_y disp_z'
matrix_tags = 'system time'
value = 0
variable = disp_x
vector_tags = residual
[]
[]
[BCs]
[fix1_y]
type = DirichletBC
boundary = fix_all
displacements = 'disp_x disp_y disp_z'
matrix_tags = 'system time'
value = 0
variable = disp_y
vector_tags = residual
[]
[]
[BCs]
[fix1_z]
type = DirichletBC
boundary = fix_all
displacements = 'disp_x disp_y disp_z'
matrix_tags = 'system time'
value = 0
variable = disp_z
vector_tags = residual
[]
[]
[BCs]
[fix2_x]
type = DirichletBC
boundary = fix_xy
displacements = 'disp_x disp_y disp_z'
matrix_tags = 'system time'
value = 0
variable = disp_x
vector_tags = residual
[]
[]
[BCs]
[fix2_y]
type = DirichletBC
boundary = fix_xy
displacements = 'disp_x disp_y disp_z'
matrix_tags = 'system time'
value = 0
variable = disp_y
vector_tags = residual
[]
[]
[BCs]
[fix3_z]
type = DirichletBC
boundary = fix_z
displacements = 'disp_x disp_y disp_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 = state/S
neml2_executor = neml2_model_all
outputs = none
to_moose = neml2_stress
[]
[neml2_jacobian_to_moose]
type = NEML2ToMOOSESymmetricRankFourTensorMaterialProperty
block = ''
from_neml2 = state/S
neml2_executor = neml2_model_all
neml2_input_derivative = forces/E
outputs = none
to_moose = neml2_jacobian
[]
[]
[Materials]
[convert_strain]
type = RankTwoTensorToSymmetricRankTwoTensor
from = mechanical_strain
outputs = none
to = neml2_strain
[]
[]
[Materials]
[stress]
type = ComputeLagrangianObjectiveCustomSymmetricStress
custom_small_jacobian = neml2_jacobian
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_jacobian]
type = MOOSESymmetricRankTwoTensorMaterialPropertyToNEML2
block = ''
execute_on = 'INITIAL LINEAR NONLINEAR'
from_moose = neml2_strain
to_neml2 = forces/E
[]
[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'
gatherers = moose_strain_to_jacobian
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
[]
[]
(test/tests/transfers/multiapp_scalar_to_auxscalar_transfer/between_multiapp/sub1.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[AuxVariables]
[base_1]
family = SCALAR
order = FOURTH
initial_condition = 14
[]
[from_0]
type = MooseVariableScalar
order = FIRST
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 3
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 2
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
line_search = none
nl_abs_tol = 1e-12
[]
[Outputs]
csv = true
[]
(test/tests/fvkernels/constraints/point_value.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 4
[]
[Variables]
[v]
type = MooseVariableFVReal
[]
[lambda]
type = MooseVariableScalar
[]
[]
[FVKernels]
[diff]
type = FVDiffusion
variable = v
coeff = coeff
[]
[average]
type = FVPointValueConstraint
variable = v
phi0 = 13
lambda = lambda
point = '0.3 0 0'
[]
[]
[FVBCs]
[left]
type = FVDirichletBC
variable = v
boundary = left
value = 7
[]
[]
[Materials]
[diff]
type = ADGenericFunctorMaterial
prop_names = 'coeff'
prop_values = '1'
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
[]
[Outputs]
exodus = true
[]
(test/tests/transfers/multiapp_postprocessor_to_scalar/between_multiapp/sub1.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[from_0]
type = MooseVariableScalar
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 3
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 2
[]
[]
[Postprocessors]
[average_1]
type = ElementAverageValue
variable = u
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
line_search = none
nl_abs_tol = 1e-12
[]
[Outputs]
csv = true
[]
(test/tests/fvkernels/constraints/bounded_value.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
[]
[Variables]
[v]
type = MooseVariableFVReal
# breaks the constraint
initial_condition = -1
[]
[lambda]
type = MooseVariableScalar
[]
[]
[FVKernels]
[time]
type = FVTimeKernel
variable = v
[]
[diff]
type = FVDiffusion
variable = v
coeff = coeff
[]
[average]
type = FVBoundedValueConstraint
variable = v
phi0 = 0
lambda = lambda
bound_type = 'HIGHER_THAN'
[]
[]
[FVBCs]
[left]
type = FVDirichletBC
variable = v
boundary = left
value = 7
[]
[right]
type = FVDirichletBC
variable = v
boundary = right
value = 0
[]
[]
[Materials]
[diff]
type = ADGenericFunctorMaterial
prop_names = 'coeff'
prop_values = '1'
[]
[]
[Executioner]
type = Transient
solve_type = 'Newton'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
num_steps = 2
dt = 0.001
nl_abs_tol = 1e-12
[]
[Outputs]
exodus = true
[]