- boundaryThe list of boundary IDs from the mesh where this object applies
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:The list of boundary IDs from the mesh where this object applies
- valueValue of the BC
C++ Type:double
Unit:(no unit assumed)
Controllable:Yes
Description:Value of the BC
- variableThe name of the variable that this residual object operates on
C++ Type:NonlinearVariableName
Unit:(no unit assumed)
Controllable:No
Description:The name of the variable that this residual object operates on
ExplicitDirichletBC
Imposes the essential boundary condition , where is a constant, controllable value.
Overview
This applies a Dirichlet BC meant to be used in conjunction with ExplicitMixedOrder.
BC's are applied by calculating the residual force needed,, to enforce BC's during an explicit solution update.
At each boundary node:
where is the force required to enforce the BC and is the displacement to be enforced.
Input Parameters
- diag_save_inThe name of auxiliary variables to save this BC's diagonal jacobian contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)
C++ Type:std::vector<AuxVariableName>
Unit:(no unit assumed)
Controllable:No
Description:The name of auxiliary variables to save this BC's diagonal jacobian contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)
- displacementsThe displacements
C++ Type:std::vector<VariableName>
Unit:(no unit assumed)
Controllable:No
Description:The displacements
- matrix_onlyFalseWhether this object is only doing assembly to matrices (no vectors)
Default:False
C++ Type:bool
Controllable:No
Description:Whether this object is only doing assembly to matrices (no vectors)
- save_inThe name of auxiliary variables to save this BC's residual contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)
C++ Type:std::vector<AuxVariableName>
Unit:(no unit assumed)
Controllable:No
Description:The name of auxiliary variables to save this BC's residual contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)
Optional Parameters
- absolute_value_vector_tagsThe tags for the vectors this residual object should fill with the absolute value of the residual contribution
C++ Type:std::vector<TagName>
Controllable:No
Description:The tags for the vectors this residual object should fill with the absolute value of the residual contribution
- extra_matrix_tagsThe extra tags for the matrices this Kernel should fill
C++ Type:std::vector<TagName>
Controllable:No
Description:The extra tags for the matrices this Kernel should fill
- extra_vector_tagsThe extra tags for the vectors this Kernel should fill
C++ Type:std::vector<TagName>
Controllable:No
Description:The extra tags for the vectors this Kernel should fill
Contribution To Tagged Field Data 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
- matrix_tagssystem timeThe tag for the matrices this Kernel should fill
Default:system time
C++ Type:MultiMooseEnum
Options:nontime, system, time
Controllable:No
Description:The tag for the matrices this Kernel should fill
- vector_tagsresidualThe tag for the vectors this Kernel should fill
Default:residual
C++ Type:MultiMooseEnum
Options:nontime, time, residual
Controllable:No
Description:The tag for the vectors this Kernel should fill
Tagging Parameters
Input Files
- (modules/contact/test/tests/explicit_dynamics/highvel.i)
- (modules/contact/test/tests/explicit_dynamics/deep_impact.i)
- (modules/contact/test/tests/explicit_dynamics/test_balance_optimized.i)
- (modules/contact/test/tests/explicit_dynamics/settlement.i)
- (modules/solid_mechanics/test/tests/dynamics/time_integration/direct_central_difference_multiVarBC.i)
- (modules/contact/test/tests/explicit_dynamics/test_balance.i)
(modules/contact/test/tests/explicit_dynamics/highvel.i)
# One element test to test the central difference time integrator in 3D.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[Problem]
extra_tag_matrices = 'mass'
[]
[Mesh]
[block_one]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = 4.5
xmax = 5.5
ymin = 4.5
ymax = 5.5
zmin = 0.06
zmax = 1.06
boundary_name_prefix = 'ball'
[]
[block_two]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 2
xmin = 0.0
xmax = 10
ymin = 0.0
ymax = 10
zmin = -2
zmax = 0
boundary_name_prefix = 'base'
boundary_id_offset = 10
[]
[block_one_id]
type = SubdomainIDGenerator
input = block_one
subdomain_id = 1
[]
[block_two_id]
type = SubdomainIDGenerator
input = block_two
subdomain_id = 2
[]
[combine]
type = MeshCollectionGenerator
inputs = ' block_one_id block_two_id'
[]
[]
[AuxVariables]
[penetration]
[]
[]
[AuxKernels]
[penetration]
type = PenetrationAux
variable = penetration
boundary = ball_back
paired_boundary = base_front
quantity = distance
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[AuxVariables]
[gap_rate]
[]
[vel_x]
[]
[accel_x]
[]
[vel_y]
[]
[accel_y]
[]
[vel_z]
[]
[accel_z]
[]
[stress_zz]
family = MONOMIAL
order = CONSTANT
[]
[strain_zz]
family = MONOMIAL
order = CONSTANT
[]
[kinetic_energy_one]
order = CONSTANT
family = MONOMIAL
[]
[elastic_energy_one]
order = CONSTANT
family = MONOMIAL
[]
[kinetic_energy_two]
order = CONSTANT
family = MONOMIAL
[]
[elastic_energy_two]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[stress_zz]
type = RankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 2
variable = stress_zz
execute_on = 'TIMESTEP_END'
[]
[strain_zz]
type = RankTwoAux
rank_two_tensor = mechanical_strain
index_i = 2
index_j = 2
variable = strain_zz
[]
[accel_x]
type = TestNewmarkTI
variable = accel_x
displacement = disp_x
first = false
execute_on = 'LINEAR TIMESTEP_BEGIN TIMESTEP_END'
[]
[vel_x]
type = TestNewmarkTI
variable = vel_x
displacement = disp_x
execute_on = 'LINEAR TIMESTEP_BEGIN TIMESTEP_END'
[]
[accel_y]
type = TestNewmarkTI
variable = accel_y
displacement = disp_y
first = false
execute_on = 'LINEAR TIMESTEP_BEGIN TIMESTEP_END'
[]
[vel_y]
type = TestNewmarkTI
variable = vel_y
displacement = disp_x
execute_on = 'LINEAR TIMESTEP_BEGIN TIMESTEP_END'
[]
[accel_z]
type = TestNewmarkTI
variable = accel_z
displacement = disp_z
first = false
execute_on = 'LINEAR TIMESTEP_BEGIN TIMESTEP_END'
[]
[vel_z]
type = TestNewmarkTI
variable = vel_z
displacement = disp_z
execute_on = 'LINEAR TIMESTEP_BEGIN TIMESTEP_END'
[]
[kinetic_energy_one]
type = KineticEnergyAux
block = '1'
variable = kinetic_energy_one
newmark_velocity_x = vel_x
newmark_velocity_y = vel_y
newmark_velocity_z = vel_z
density = density
[]
[elastic_energy_one]
type = ElasticEnergyAux
variable = elastic_energy_one
block = '1'
[]
[kinetic_energy_two]
type = KineticEnergyAux
block = '2'
variable = kinetic_energy_two
newmark_velocity_x = vel_x
newmark_velocity_y = vel_y
newmark_velocity_z = vel_z
density = density
[]
[elastic_energy_two]
type = ElasticEnergyAux
variable = elastic_energy_two
block = '2'
[]
[]
[Kernels]
[DynamicTensorMechanics]
displacements = 'disp_x disp_y disp_z'
stiffness_damping_coefficient = 1.0e-3
generate_output = 'stress_zz strain_zz'
[]
[Mass_x]
type = MassMatrix
variable = disp_x
density = density
matrix_tags = 'mass'
[]
[Mass_y]
type = MassMatrix
variable = disp_y
density = density
matrix_tags = 'mass'
[]
[Mass_z]
type = MassMatrix
variable = disp_z
density = density
matrix_tags = 'mass'
[]
[gravity]
type = Gravity
variable = disp_z
value = -981
block = 1
[]
[]
[BCs]
[x_front]
type = ExplicitDirichletBC
variable = disp_x
boundary = 'ball_front'
value = 0.0
[]
[y_front]
type = ExplicitDirichletBC
variable = disp_y
boundary = 'ball_front'
value = 0.0
[]
[x_fixed]
type = ExplicitDirichletBC
variable = disp_x
boundary = 'base_back'
value = 0.0
[]
[y_fixed]
type = ExplicitDirichletBC
variable = disp_y
boundary = 'base_back'
value = 0.0
[]
[z_fixed]
type = ExplicitDirichletBC
variable = disp_z
boundary = 'base_back'
value = 0.0
[]
[z_fixed_front]
type = ExplicitDirichletBC
variable = disp_z
boundary = 'base_front'
value = 0.0
[]
[]
[ExplicitDynamicsContact]
[my_contact]
model = frictionless_balance
primary = base_front
secondary = ball_back
vel_x = 'vel_x'
vel_y = 'vel_y'
vel_z = 'vel_z'
verbose = true
[]
[]
[Materials]
[elasticity_tensor_block_one]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.0
block = 1
outputs = 'exodus'
output_properties = __all__
[]
[elasticity_tensor_block_two]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e10
poissons_ratio = 0.0
block = 2
outputs = 'exodus'
output_properties = __all__
[]
[strain_block]
type = ComputeFiniteStrain # ComputeIncrementalSmallStrain
displacements = 'disp_x disp_y disp_z'
implicit = false
[]
[stress_block]
type = ComputeFiniteStrainElasticStress
[]
[density_one]
type = GenericConstantMaterial
prop_names = density
prop_values = 1e1
outputs = 'exodus'
output_properties = 'density'
block = '1'
[]
[density_two]
type = GenericConstantMaterial
prop_names = density
prop_values = 1e6
outputs = 'exodus'
output_properties = 'density'
block = '2'
[]
[wave_speed]
type = WaveSpeed
outputs = 'exodus'
output_properties = 'wave_speed'
[]
[]
[Executioner]
type = Transient
end_time = 0.03
dt = 2e-4
timestep_tolerance = 1e-6
[TimeIntegrator]
type = ExplicitMixedOrder
mass_matrix_tag = mass
second_order_vars = 'disp_x disp_y disp_z'
[]
[]
[Outputs]
interval = 2
exodus = true
csv = true
execute_on = 'TIMESTEP_END'
file_base = highvel_out
[]
[Postprocessors]
[accel_58z]
type = NodalVariableValue
nodeid = 1
variable = accel_z
[]
[vel_58z]
type = NodalVariableValue
nodeid = 1
variable = vel_z
[]
[critical_time_step]
type = CriticalTimeStep
[]
[contact_pressure_max]
type = NodalExtremeValue
variable = contact_pressure
block = '1 2'
value_type = max
[]
[penetration_max]
type = NodalExtremeValue
variable = penetration
block = '1 2'
value_type = max
[]
[total_kinetic_energy_one]
type = ElementIntegralVariablePostprocessor
variable = kinetic_energy_one
block = '1'
[]
[total_elastic_energy_one]
type = ElementIntegralVariablePostprocessor
variable = elastic_energy_one
block = '1'
[]
[total_kinetic_energy_two]
type = ElementIntegralVariablePostprocessor
variable = kinetic_energy_two
block = '2'
[]
[total_elastic_energy_two]
type = ElementIntegralVariablePostprocessor
variable = elastic_energy_two
block = '2'
[]
[]
(modules/contact/test/tests/explicit_dynamics/deep_impact.i)
# This test demonstrates explicit contact with MOOSE and includes optimizations
# to enhance performance.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Problem]
extra_tag_matrices = 'mass'
[]
[Mesh]
[block_one]
type = GeneratedMeshGenerator
dim = 3
nx = 4
ny = 4
nz = 4
xmin = 4.5
xmax = 5.5
ymin = 4.5
ymax = 5.5
zmin = 0.0001
zmax = 1.0001
boundary_name_prefix = 'ball'
[]
[block_two]
type = GeneratedMeshGenerator
dim = 3
nx = 9
ny = 9
nz = 4
xmin = 3
xmax = 7
ymin = 3
ymax = 7
zmin = -2
zmax = 0
boundary_name_prefix = 'base'
boundary_id_offset = 10
[]
[block_one_id]
type = SubdomainIDGenerator
input = block_one
subdomain_id = 1
[]
[block_two_id]
type = SubdomainIDGenerator
input = block_two
subdomain_id = 2
[]
[combine]
type = MeshCollectionGenerator
inputs = ' block_one_id block_two_id'
[]
allow_renumbering = false
# patch_update_strategy = always
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[AuxVariables]
[gap_rate]
[]
[vel_x]
[]
[accel_x]
[]
[vel_y]
[]
[accel_y]
[]
[vel_z]
[]
[accel_z]
[]
[]
[AuxKernels]
[accel_x]
type = TestNewmarkTI
variable = accel_x
displacement = disp_x
first = false
execute_on = 'TIMESTEP_END'
[]
[vel_x]
type = TestNewmarkTI
variable = vel_x
displacement = disp_x
execute_on = 'TIMESTEP_END'
[]
[accel_y]
type = TestNewmarkTI
variable = accel_y
displacement = disp_y
first = false
execute_on = 'TIMESTEP_END'
[]
[vel_y]
type = TestNewmarkTI
variable = vel_y
displacement = disp_x
execute_on = 'TIMESTEP_END'
[]
[accel_z]
type = TestNewmarkTI
variable = accel_z
displacement = disp_z
first = false
execute_on = 'TIMESTEP_END'
[]
[vel_z]
type = TestNewmarkTI
variable = vel_z
displacement = disp_z
execute_on = 'TIMESTEP_END'
[]
[]
[Kernels]
[DynamicTensorMechanics]
displacements = 'disp_x disp_y disp_z'
[]
[Mass_x]
type = MassMatrix
variable = disp_x
density = density
matrix_tags = 'mass'
[]
[Mass_y]
type = MassMatrix
variable = disp_y
density = density
matrix_tags = 'mass'
[]
[Mass_z]
type = MassMatrix
variable = disp_z
density = density
matrix_tags = 'mass'
[]
[]
[Kernels]
[gravity]
type = Gravity
variable = disp_z
value = -981.0
block = 1
[]
[]
[BCs]
[x_front]
type = ExplicitDirichletBC
variable = disp_x
boundary = 'ball_front'
value = 0.0
[]
[y_front]
type = ExplicitDirichletBC
variable = disp_y
boundary = 'ball_front'
value = 0.0
[]
[x_fixed]
type = ExplicitDirichletBC
variable = disp_x
boundary = 'base_back'
value = 0.0
[]
[y_fixed]
type = ExplicitDirichletBC
variable = disp_y
boundary = 'base_back'
value = 0.0
[]
[z_fixed]
type = ExplicitDirichletBC
variable = disp_z
boundary = 'base_back'
value = 0.0
[]
[]
[ExplicitDynamicsContact]
[my_contact]
model = frictionless_balance
primary = 'base_front ball_back'
secondary = 'ball_back base_front'
vel_x = 'vel_x'
vel_y = 'vel_y'
vel_z = 'vel_z'
[]
[]
[Materials]
[elasticity_tensor_block_one]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e1
poissons_ratio = 0.3
block = 1
constant_on = SUBDOMAIN
[]
[elasticity_tensor_block_two]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e7
poissons_ratio = 0.3
block = 2
constant_on = SUBDOMAIN
[]
[strain_block]
type = ComputeFiniteStrain
displacements = 'disp_x disp_y disp_z'
implicit = false
[]
[stress_block]
type = ComputeFiniteStrainElasticStress
[]
[density_one]
type = GenericConstantMaterial
prop_names = density
prop_values = 1e7
output_properties = 'density'
block = '1'
[]
[density_two]
type = GenericConstantMaterial
prop_names = density
prop_values = 1e3
output_properties = 'density'
block = '2'
[]
[wave_speed]
type = WaveSpeed
outputs = 'exodus'
output_properties = 'wave_speed'
[]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 0.04
dt = 0.0001
timestep_tolerance = 1e-6
[TimeIntegrator]
type = ExplicitMixedOrder
mass_matrix_tag = 'mass'
use_constant_mass = true
second_order_vars = 'disp_x disp_y disp_z'
[]
skip_exception_check = true
[]
[Outputs]
interval = 100
exodus = true
[]
(modules/contact/test/tests/explicit_dynamics/test_balance_optimized.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[Problem]
extra_tag_matrices = 'mass'
[]
[Mesh]
[block_one]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = 4.5
xmax = 5.5
ymin = 4.5
ymax = 5.5
zmin = 0.0001
zmax = 1.0001
boundary_name_prefix = 'ball'
[]
[block_two]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 2
xmin = 0.0
xmax = 10
ymin = 0.0
ymax = 10
zmin = -2
zmax = 0
boundary_name_prefix = 'base'
boundary_id_offset = 10
[]
[block_one_id]
type = SubdomainIDGenerator
input = block_one
subdomain_id = 1
[]
[block_two_id]
type = SubdomainIDGenerator
input = block_two
subdomain_id = 2
[]
[combine]
type = MeshCollectionGenerator
inputs = ' block_one_id block_two_id'
[]
allow_renumbering = false
patch_update_strategy = auto
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[AuxVariables]
[gap_rate]
[]
[vel_x]
[]
[accel_x]
[]
[vel_y]
[]
[accel_y]
[]
[vel_z]
[]
[accel_z]
[]
[]
[AuxKernels]
[accel_x]
type = TestNewmarkTI
variable = accel_x
displacement = disp_x
first = false
execute_on = 'TIMESTEP_END'
[]
[vel_x]
type = TestNewmarkTI
variable = vel_x
displacement = disp_x
execute_on = 'TIMESTEP_END'
[]
[accel_y]
type = TestNewmarkTI
variable = accel_y
displacement = disp_y
first = false
execute_on = 'TIMESTEP_END'
[]
[vel_y]
type = TestNewmarkTI
variable = vel_y
displacement = disp_x
execute_on = 'TIMESTEP_END'
[]
[accel_z]
type = TestNewmarkTI
variable = accel_z
displacement = disp_z
first = false
execute_on = 'TIMESTEP_END'
[]
[vel_z]
type = TestNewmarkTI
variable = vel_z
displacement = disp_z
execute_on = 'TIMESTEP_END'
[]
[]
[Kernels]
[DynamicTensorMechanics]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
stiffness_damping_coefficient = 0.001
decomposition_method = EigenSolution
[]
[Mass_x]
type = MassMatrix
variable = disp_x
density = density
matrix_tags = 'mass'
[]
[Mass_y]
type = MassMatrix
variable = disp_y
density = density
matrix_tags = 'mass'
[]
[Mass_z]
type = MassMatrix
variable = disp_z
density = density
matrix_tags = 'mass'
[]
[]
[Kernels]
[gravity]
type = Gravity
variable = disp_z
value = -981.0
[]
[]
[BCs]
[x_front]
type = ExplicitDirichletBC
variable = disp_x
boundary = 'ball_front'
value = 0.0
[]
[y_front]
type = ExplicitDirichletBC
variable = disp_y
boundary = 'ball_front'
value = 0.0
[]
[x_fixed]
type = ExplicitDirichletBC
variable = disp_x
boundary = 'base_back'
value = 0.0
[]
[y_fixed]
type = ExplicitDirichletBC
variable = disp_y
boundary = 'base_back'
value = 0.0
[]
[z_fixed]
type = ExplicitDirichletBC
variable = disp_z
boundary = 'base_back'
value = 0.0
[]
[z_fixed_front]
type = ExplicitDirichletBC
variable = disp_z
boundary = 'base_front'
value = 0.0
[]
[]
[ExplicitDynamicsContact]
[my_contact]
model = frictionless_balance
primary = base_front
secondary = ball_back
vel_x = 'vel_x'
vel_y = 'vel_y'
vel_z = 'vel_z'
[]
[]
[Materials]
[elasticity_tensor_block_one]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.0
block = 1
constant_on = SUBDOMAIN
[]
[elasticity_tensor_block_two]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e10
poissons_ratio = 0.0
block = 2
constant_on = SUBDOMAIN
[]
[strain_block]
type = ComputeFiniteStrain
displacements = 'disp_x disp_y disp_z'
implicit = false
[]
[stress_block]
type = ComputeFiniteStrainElasticStress
[]
[density_one]
type = GenericConstantMaterial
prop_names = density
prop_values = 1e1
output_properties = 'density'
block = '1'
[]
[density_two]
type = GenericConstantMaterial
prop_names = density
prop_values = 1e6
output_properties = 'density'
block = '2'
[]
[wave_speed]
type = WaveSpeed
outputs = 'exodus'
output_properties = 'wave_speed'
[]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 0.0025
dt = 0.00001
timestep_tolerance = 1e-6
[TimeIntegrator]
type = ExplicitMixedOrder
mass_matrix_tag = 'mass'
use_constant_mass = true
second_order_vars = 'disp_x disp_y disp_z'
[]
[]
[Outputs]
interval = 10
exodus = true
csv = true
file_base = test_balance_out
[]
(modules/contact/test/tests/explicit_dynamics/settlement.i)
# One element test to test the central difference time integrator in 3D.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[Problem]
extra_tag_matrices = 'mass'
[]
[Mesh]
[block_one]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = 4.5
xmax = 5.5
ymin = 4.5
ymax = 5.5
zmin = 0.0001
zmax = 1.0001
boundary_name_prefix = 'ball'
[]
[block_two]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 2
xmin = 0.0
xmax = 10
ymin = 0.0
ymax = 10
zmin = -2
zmax = 0
boundary_name_prefix = 'base'
boundary_id_offset = 10
[]
[block_one_id]
type = SubdomainIDGenerator
input = block_one
subdomain_id = 1
[]
[block_two_id]
type = SubdomainIDGenerator
input = block_two
subdomain_id = 2
[]
[combine]
type = MeshCollectionGenerator
inputs = ' block_one_id block_two_id'
[]
[]
[AuxVariables]
[penetration]
[]
[]
[AuxKernels]
[penetration]
type = PenetrationAux
variable = penetration
boundary = ball_back
paired_boundary = base_front
quantity = distance
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[AuxVariables]
[gap_rate]
[]
[vel_x]
[]
[accel_x]
[]
[vel_y]
[]
[accel_y]
[]
[vel_z]
[]
[accel_z]
[]
[stress_zz]
family = MONOMIAL
order = CONSTANT
[]
[strain_zz]
family = MONOMIAL
order = CONSTANT
[]
[kinetic_energy_one]
order = CONSTANT
family = MONOMIAL
[]
[elastic_energy_one]
order = CONSTANT
family = MONOMIAL
[]
[kinetic_energy_two]
order = CONSTANT
family = MONOMIAL
[]
[elastic_energy_two]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[stress_zz]
type = RankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 2
variable = stress_zz
execute_on = 'TIMESTEP_END'
[]
[strain_zz]
type = RankTwoAux
rank_two_tensor = mechanical_strain
index_i = 2
index_j = 2
variable = strain_zz
[]
[accel_x]
type = TestNewmarkTI
variable = accel_x
displacement = disp_x
first = false
execute_on = 'LINEAR TIMESTEP_BEGIN TIMESTEP_END'
[]
[vel_x]
type = TestNewmarkTI
variable = vel_x
displacement = disp_x
execute_on = 'LINEAR TIMESTEP_BEGIN TIMESTEP_END'
[]
[accel_y]
type = TestNewmarkTI
variable = accel_y
displacement = disp_y
first = false
execute_on = 'LINEAR TIMESTEP_BEGIN TIMESTEP_END'
[]
[vel_y]
type = TestNewmarkTI
variable = vel_y
displacement = disp_x
execute_on = 'LINEAR TIMESTEP_BEGIN TIMESTEP_END'
[]
[accel_z]
type = TestNewmarkTI
variable = accel_z
displacement = disp_z
first = false
execute_on = 'LINEAR TIMESTEP_BEGIN TIMESTEP_END'
[]
[vel_z]
type = TestNewmarkTI
variable = vel_z
displacement = disp_z
execute_on = 'LINEAR TIMESTEP_BEGIN TIMESTEP_END'
[]
[kinetic_energy_one]
type = KineticEnergyAux
block = '1'
variable = kinetic_energy_one
newmark_velocity_x = vel_x
newmark_velocity_y = vel_y
newmark_velocity_z = vel_z
density = density
[]
[elastic_energy_one]
type = ElasticEnergyAux
variable = elastic_energy_one
block = '1'
[]
[kinetic_energy_two]
type = KineticEnergyAux
block = '2'
variable = kinetic_energy_two
newmark_velocity_x = vel_x
newmark_velocity_y = vel_y
newmark_velocity_z = vel_z
density = density
[]
[elastic_energy_two]
type = ElasticEnergyAux
variable = elastic_energy_two
block = '2'
[]
[]
[Kernels]
[DynamicTensorMechanics]
displacements = 'disp_x disp_y disp_z'
stiffness_damping_coefficient = 9.5e-4
generate_output = 'stress_zz strain_zz'
[]
[Mass_x]
type = MassMatrix
variable = disp_x
density = density
matrix_tags = 'mass'
[]
[Mass_y]
type = MassMatrix
variable = disp_y
density = density
matrix_tags = 'mass'
[]
[Mass_z]
type = MassMatrix
variable = disp_z
density = density
matrix_tags = 'mass'
[]
[gravity]
type = Gravity
variable = disp_z
value = -98.10
block = 1
[]
[]
[BCs]
[x_front]
type = ExplicitDirichletBC
variable = disp_x
boundary = 'ball_front'
value = 0.0
[]
[y_front]
type = ExplicitDirichletBC
variable = disp_y
boundary = 'ball_front'
value = 0.0
[]
[x_fixed]
type = ExplicitDirichletBC
variable = disp_x
boundary = 'base_back'
value = 0.0
[]
[y_fixed]
type = ExplicitDirichletBC
variable = disp_y
boundary = 'base_back'
value = 0.0
[]
[z_fixed]
type = ExplicitDirichletBC
variable = disp_z
boundary = 'base_back'
value = 0.0
[]
[z_fixed_front]
type = ExplicitDirichletBC
variable = disp_z
boundary = 'base_front'
value = 0.0
[]
[]
[ExplicitDynamicsContact]
[my_contact]
model = frictionless_balance
primary = base_front
secondary = ball_back
vel_x = 'vel_x'
vel_y = 'vel_y'
vel_z = 'vel_z'
verbose = true
[]
[]
[Materials]
[elasticity_tensor_block_one]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.0
block = 1
outputs = 'exodus'
output_properties = __all__
[]
[elasticity_tensor_block_two]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e10
poissons_ratio = 0.0
block = 2
outputs = 'exodus'
output_properties = __all__
[]
[strain_block]
type = ComputeFiniteStrain # ComputeIncrementalStrain
displacements = 'disp_x disp_y disp_z'
implicit = false
[]
[stress_block]
type = ComputeFiniteStrainElasticStress
[]
[density_one]
type = GenericConstantMaterial
prop_names = density
prop_values = 1e1
outputs = 'exodus'
output_properties = 'density'
block = '1'
[]
[density_two]
type = GenericConstantMaterial
prop_names = density
prop_values = 1e6
outputs = 'exodus'
output_properties = 'density'
block = '2'
[]
[wave_speed]
type = WaveSpeed
outputs = 'exodus'
output_properties = 'wave_speed'
[]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 0.05
dt = 1.0e-4
timestep_tolerance = 1e-6
[TimeIntegrator]
type = ExplicitMixedOrder
mass_matrix_tag = 'mass'
second_order_vars = 'disp_x disp_y disp_z'
[]
[]
[Outputs]
interval = 1
exodus = true
csv = true
execute_on = 'TIMESTEP_END'
[]
[Postprocessors]
[accel_58z]
type = NodalVariableValue
nodeid = 1
variable = accel_z
[]
[vel_58z]
type = NodalVariableValue
nodeid = 1
variable = vel_z
[]
[critical_time_step]
type = CriticalTimeStep
[]
[contact_pressure_max]
type = NodalExtremeValue
variable = contact_pressure
block = '1 2'
value_type = max
[]
[penetration_max]
type = NodalExtremeValue
variable = penetration
block = '1 2'
value_type = max
[]
[total_kinetic_energy_one]
type = ElementIntegralVariablePostprocessor
variable = kinetic_energy_one
block = '1'
[]
[total_elastic_energy_one]
type = ElementIntegralVariablePostprocessor
variable = elastic_energy_one
block = '1'
[]
[total_kinetic_energy_two]
type = ElementIntegralVariablePostprocessor
variable = kinetic_energy_two
block = '2'
[]
[total_elastic_energy_two]
type = ElementIntegralVariablePostprocessor
variable = elastic_energy_two
block = '2'
[]
[]
(modules/solid_mechanics/test/tests/dynamics/time_integration/direct_central_difference_multiVarBC.i)
###########################################################
# This is a simple test with a time-dependent problem
# demonstrating the use of a central difference with a
# direct calculation of acceleration.
#
# Testing that the first and second time derivatives
# are calculated correctly using the Central Difference Direct
# method
###########################################################
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Problem]
extra_tag_matrices = 'mass'
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 4
ny = 4
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[Functions]
[forcing_fn]
type = ParsedFunction
expression = 't'
[]
[]
[Kernels]
[DynamicSolidMechanics]
displacements = 'disp_x disp_y'
[]
[massmatrix]
type = MassMatrix
density = density
matrix_tags = 'mass'
variable = disp_x
[]
[massmatrix_y]
type = MassMatrix
density = density
matrix_tags = 'mass'
variable = disp_y
[]
[]
[Materials]
[elasticity_tensor_block_one]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e1
poissons_ratio = 0.33
[]
[strain_block]
type = ComputeFiniteStrain
displacements = 'disp_x disp_y'
implicit = false
[]
[stress_block]
type = ComputeFiniteStrainElasticStress
implicit = false
[]
[density]
type = GenericConstantMaterial
prop_names = 'density'
prop_values = 1
[]
[]
[BCs]
[left_x]
type = ExplicitDirichletBC
variable = disp_x
boundary = 'left'
value = 0
[]
[left_y]
type = ExplicitDirichletBC
variable = disp_y
boundary = 'left'
value = 0
[]
[right_x]
type = ExplicitFunctionDirichletBC
variable = disp_x
boundary = 'right'
function = forcing_fn
[]
[]
[Executioner]
type = Transient
[TimeIntegrator]
type = ExplicitMixedOrder
mass_matrix_tag = 'mass'
second_order_vars = 'disp_x disp_y'
[]
start_time = 0.0
num_steps = 6
dt = 0.1
[]
[Postprocessors]
[left_x]
type = AverageNodalVariableValue
variable = disp_x
boundary = left
[]
[right_y]
type = AverageNodalVariableValue
variable = disp_x
boundary = left
[]
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/explicit_dynamics/test_balance.i)
# One element test to test the central difference time integrator in 3D.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[Problem]
extra_tag_matrices = 'mass'
[]
[Mesh]
[block_one]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = 4.5
xmax = 5.5
ymin = 4.5
ymax = 5.5
zmin = 0.0001
zmax = 1.0001
boundary_name_prefix = 'ball'
[]
[block_two]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 2
xmin = 0.0
xmax = 10
ymin = 0.0
ymax = 10
zmin = -2
zmax = 0
boundary_name_prefix = 'base'
boundary_id_offset = 10
[]
[block_one_id]
type = SubdomainIDGenerator
input = block_one
subdomain_id = 1
[]
[block_two_id]
type = SubdomainIDGenerator
input = block_two
subdomain_id = 2
[]
[combine]
type = MeshCollectionGenerator
inputs = ' block_one_id block_two_id'
[]
allow_renumbering = false
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[AuxVariables]
[gap_rate]
[]
[vel_x]
[]
[accel_x]
[]
[vel_y]
[]
[accel_y]
[]
[vel_z]
[]
[accel_z]
[]
[stress_zz]
family = MONOMIAL
order = CONSTANT
[]
[strain_zz]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[stress_zz]
type = RankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 2
variable = stress_zz
execute_on = 'TIMESTEP_END'
[]
[strain_zz]
type = RankTwoAux
rank_two_tensor = mechanical_strain
index_i = 2
index_j = 2
variable = strain_zz
[]
[accel_x]
type = TestNewmarkTI
variable = accel_x
displacement = disp_x
first = false
execute_on = 'LINEAR TIMESTEP_BEGIN TIMESTEP_END'
[]
[vel_x]
type = TestNewmarkTI
variable = vel_x
displacement = disp_x
execute_on = 'LINEAR TIMESTEP_BEGIN TIMESTEP_END'
[]
[accel_y]
type = TestNewmarkTI
variable = accel_y
displacement = disp_y
first = false
execute_on = 'LINEAR TIMESTEP_BEGIN TIMESTEP_END'
[]
[vel_y]
type = TestNewmarkTI
variable = vel_y
displacement = disp_x
execute_on = 'LINEAR TIMESTEP_BEGIN TIMESTEP_END'
[]
[accel_z]
type = TestNewmarkTI
variable = accel_z
displacement = disp_z
first = false
execute_on = 'LINEAR TIMESTEP_BEGIN TIMESTEP_END'
[]
[vel_z]
type = TestNewmarkTI
variable = vel_z
displacement = disp_z
execute_on = 'LINEAR TIMESTEP_BEGIN TIMESTEP_END'
[]
[]
[AuxVariables]
[penetration]
[]
[]
[AuxKernels]
[penetration]
type = PenetrationAux
variable = penetration
boundary = ball_back
paired_boundary = base_front
quantity = distance
[]
[]
[Kernels]
[DynamicTensorMechanics]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
stiffness_damping_coefficient = 0.001
generate_output = 'stress_zz strain_zz'
[]
[Mass_x]
type = MassMatrix
variable = disp_x
density = density
matrix_tags = 'mass'
[]
[Mass_y]
type = MassMatrix
variable = disp_y
density = density
matrix_tags = 'mass'
[]
[Mass_z]
type = MassMatrix
variable = disp_z
density = density
matrix_tags = 'mass'
[]
[]
[Kernels]
[gravity]
type = Gravity
variable = disp_z
value = -981.0
[]
[]
[BCs]
[x_front]
type = ExplicitDirichletBC
variable = disp_x
boundary = 'ball_front'
value = 0.0
[]
[y_front]
type = ExplicitDirichletBC
variable = disp_y
boundary = 'ball_front'
value = 0.0
[]
[x_fixed]
type = ExplicitDirichletBC
variable = disp_x
boundary = 'base_back'
value = 0.0
[]
[y_fixed]
type = ExplicitDirichletBC
variable = disp_y
boundary = 'base_back'
value = 0.0
[]
[z_fixed]
type = ExplicitDirichletBC
variable = disp_z
boundary = 'base_back'
value = 0.0
[]
[z_fixed_front]
type = ExplicitDirichletBC
variable = disp_z
boundary = 'base_front'
value = 0.0
[]
[]
[ExplicitDynamicsContact]
[my_contact]
model = frictionless_balance
primary = base_front
secondary = ball_back
vel_x = 'vel_x'
vel_y = 'vel_y'
vel_z = 'vel_z'
verbose = true
[]
[]
[Materials]
[elasticity_tensor_block_one]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.0
block = 1
outputs = 'exodus'
output_properties = __all__
[]
[elasticity_tensor_block_two]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e10
poissons_ratio = 0.0
block = 2
outputs = 'exodus'
output_properties = __all__
[]
[strain_block]
type = ComputeFiniteStrain
displacements = 'disp_x disp_y disp_z'
implicit = false
[]
[stress_block]
type = ComputeFiniteStrainElasticStress
[]
[density_one]
type = GenericConstantMaterial
prop_names = density
prop_values = 1e1
outputs = 'exodus'
output_properties = 'density'
block = '1'
[]
[density_two]
type = GenericConstantMaterial
prop_names = density
prop_values = 1e6
outputs = 'exodus'
output_properties = 'density'
block = '2'
[]
[wave_speed]
type = WaveSpeed
outputs = 'exodus'
output_properties = 'wave_speed'
[]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 0.0025
dt = 0.00001
timestep_tolerance = 1e-6
[TimeIntegrator]
type = ExplicitMixedOrder
mass_matrix_tag = 'mass'
second_order_vars = 'disp_x disp_y disp_z'
[]
[]
[Outputs]
interval = 10
exodus = true
csv = true
[]
[Postprocessors]
[accel_58z]
type = NodalVariableValue
nodeid = 1
variable = accel_z
[]
[vel_58z]
type = NodalVariableValue
nodeid = 1
variable = vel_z
[]
[disp_58z]
type = NodalVariableValue
nodeid = 1
variable = disp_z
[]
[critical_time_step]
type = CriticalTimeStep
[]
[contact_pressure_max]
type = NodalExtremeValue
variable = contact_pressure
block = '1 2'
value_type = max
[]
[]