- variableThe name of the variable that this object applies to
C++ Type:AuxVariableName
Controllable:No
Description:The name of the variable that this object applies to
ElasticEnergyAux
The ElasticEnergyAux has not been documented. The content listed below should be used as a starting point for documenting the class, which includes the typical automatic documentation associated with a MooseObject; however, what is contained is ultimately determined by what is necessary to make the documentation clear for users.
Compute the local elastic energy
Overview
Example Input File Syntax
Input Parameters
- base_nameMechanical property base name
C++ Type:std::string
Controllable:No
Description:Mechanical property base name
- blockThe list of blocks (ids or names) that this object will be applied
C++ Type:std::vector<SubdomainName>
Controllable:No
Description:The list of blocks (ids or names) that this object will be applied
- boundaryThe list of boundaries (ids or names) from the mesh where this object applies
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:The list of boundaries (ids or names) from the mesh where this object applies
- check_boundary_restrictedTrueWhether to check for multiple element sides on the boundary in the case of a boundary restricted, element aux variable. Setting this to false will allow contribution to a single element's elemental value(s) from multiple boundary sides on the same element (example: when the restricted boundary exists on two or more sides of an element, such as at a corner of a mesh
Default:True
C++ Type:bool
Controllable:No
Description:Whether to check for multiple element sides on the boundary in the case of a boundary restricted, element aux variable. Setting this to false will allow contribution to a single element's elemental value(s) from multiple boundary sides on the same element (example: when the restricted boundary exists on two or more sides of an element, such as at a corner of a mesh
- execute_onLINEAR TIMESTEP_ENDThe list of flag(s) indicating when this object should be executed, the available options include FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM, PRE_DISPLACE.
Default:LINEAR TIMESTEP_END
C++ Type:ExecFlagEnum
Options:FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM, PRE_DISPLACE
Controllable:No
Description:The list of flag(s) indicating when this object should be executed, the available options include FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM, PRE_DISPLACE.
- prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
C++ Type:MaterialPropertyName
Controllable:No
Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
- use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Default:False
C++ Type:bool
Controllable:No
Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Optional Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:Yes
Description:Set the enabled status of the MooseObject.
- 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
Input Files
- (modules/contact/test/tests/explicit_dynamics/settlement.i)
- (modules/solid_mechanics/test/tests/elastic_patch/elastic_patch_quadratic.i)
- (modules/solid_mechanics/test/tests/auxkernels/tensorelasticenergyaux.i)
- (modules/solid_mechanics/test/tests/elastic_patch/elastic_patch.i)
- (modules/contact/test/tests/mortar_dynamics/block-dynamics-reference.i)
- (modules/solid_mechanics/test/tests/anisotropic_patch/anisotropic_patch_test.i)
(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
[]
[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 = 1.0e-3
generate_output = 'stress_zz strain_zz'
[]
[inertia_x]
type = InertialForce
variable = disp_x
[]
[inertia_y]
type = InertialForce
variable = disp_y
[]
[inertia_z]
type = InertialForce
variable = disp_z
[]
[gravity]
type = Gravity
variable = disp_z
value = -98.10
[]
[]
[BCs]
[x_front]
type = DirichletBC
variable = disp_x
boundary = 'ball_front'
preset = false
value = 0.0
[]
[y_front]
type = DirichletBC
variable = disp_y
boundary = 'ball_front'
preset = false
value = 0.0
[]
[x_fixed]
type = DirichletBC
variable = disp_x
boundary = 'base_back'
preset = false
value = 0.0
[]
[y_fixed]
type = DirichletBC
variable = disp_y
boundary = 'base_back'
preset = false
value = 0.0
[]
[z_fixed]
type = DirichletBC
variable = disp_z
boundary = 'base_back'
preset = false
value = 0.0
[]
[z_fixed_front]
type = DirichletBC
variable = disp_z
boundary = 'base_front'
preset = false
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
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
start_time = -0.01
end_time = 0.04
dt = 1.0e-4
timestep_tolerance = 1e-6
[TimeIntegrator]
type = CentralDifference
solve_type = lumped
[]
[]
[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/elastic_patch/elastic_patch_quadratic.i)
# Patch Test for second order hex elements (HEX20)
#
# From Abaqus, Verification Manual, 1.5.2
#
# This test is designed to compute constant xx, yy, zz, xy, yz, and zx
# stress on a set of irregular hexes. The mesh is composed of one
# block with seven elements. The elements form a unit cube with one
# internal element. There is a nodeset for each exterior node.
# The cube is displaced on all exterior nodes using the functions,
#
# ux = 1e-4 * (2x + y + z) / 2
# uy = 1e-4 * (x + 2y + z) / 2
# ux = 1e-4 * (x + y + 2z) / 2
#
# giving uniform strains of
#
# exx = eyy = ezz = 2*exy = 2*eyz = 2*exz = 1e-4
#
#
# Hooke's Law provides an analytical solution for the uniform stress state.
# For example,
#
# stress xx = lambda(exx + eyy + ezz) + 2 * G * exx
# stress xy = 2 * G * exy
#
# where:
#
# lambda = (2 * G * nu) / (1 - 2 * nu)
# G = 0.5 * E / (1 + nu)
#
# For the test below, E = 1e6 and nu = 0.25, giving lambda = G = 4e5
#
# Thus
#
# stress xx = 4e5 * (3e-4) + 2 * 4e5 * 1e-4 = 200
# stress xy = 2 * 4e5 * 1e-4 / 2 = 40
#
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
file = elastic_patch_quadratic.e
[] # Mesh
[Functions]
[./xDispFunc]
type = ParsedFunction
expression = 5e-5*(2*x+y+z)
[../]
[./yDispFunc]
type = ParsedFunction
expression = 5e-5*(x+2*y+z)
[../]
[./zDispFunc]
type = ParsedFunction
expression = 5e-5*(x+y+2*z)
[../]
[] # Functions
[Variables]
[./disp_x]
order = SECOND
family = LAGRANGE
[../]
[./disp_y]
order = SECOND
family = LAGRANGE
[../]
[./disp_z]
order = SECOND
family = LAGRANGE
[../]
[] # Variables
[AuxVariables]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zx]
order = CONSTANT
family = MONOMIAL
[../]
[./elastic_energy]
order = CONSTANT
family = MONOMIAL
[../]
[./vonmises]
order = CONSTANT
family = MONOMIAL
[../]
[./hydrostatic]
order = CONSTANT
family = MONOMIAL
[../]
[./firstinv]
order = CONSTANT
family = MONOMIAL
[../]
[./secondinv]
order = CONSTANT
family = MONOMIAL
[../]
[./thirdinv]
order = CONSTANT
family = MONOMIAL
[../]
[] # AuxVariables
[Kernels]
[SolidMechanics]
use_displaced_mesh = true
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = stress_xx
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = stress_yy
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 2
variable = stress_zz
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 1
variable = stress_xy
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 2
variable = stress_yz
[../]
[./stress_zx]
type = RankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 0
variable = stress_zx
[../]
[./elastic_energy]
type = ElasticEnergyAux
variable = elastic_energy
[../]
[./vonmises]
type = RankTwoScalarAux
rank_two_tensor = stress
scalar_type = VonMisesStress
variable = vonmises
[../]
[./hydrostatic]
type = RankTwoScalarAux
rank_two_tensor = stress
scalar_type = Hydrostatic
variable = hydrostatic
[../]
[./fi]
type = RankTwoScalarAux
rank_two_tensor = stress
scalar_type = FirstInvariant
variable = firstinv
[../]
[./si]
type = RankTwoScalarAux
rank_two_tensor = stress
scalar_type = SecondInvariant
variable = secondinv
[../]
[./ti]
type = RankTwoScalarAux
rank_two_tensor = stress
scalar_type = ThirdInvariant
variable = thirdinv
[../]
[] # AuxKernels
[BCs]
[./all_nodes_x]
type = FunctionDirichletBC
variable = disp_x
boundary = '1 2 3 4 6 7 8 9 10 12 15 17 18 19 20 21 23 24 25 26'
function = xDispFunc
[../]
[./all_nodes_y]
type = FunctionDirichletBC
variable = disp_y
boundary = '1 2 3 4 6 7 8 9 10 12 15 17 18 19 20 21 23 24 25 26'
function = yDispFunc
[../]
[./all_nodes_z]
type = FunctionDirichletBC
variable = disp_z
boundary = '1 2 3 4 6 7 8 9 10 12 15 17 18 19 20 21 23 24 25 26'
function = zDispFunc
[../]
[] # BCs
[Materials]
[./elast_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.25
[../]
[./strain]
type = ComputeSmallStrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[] # Materials
[Executioner]
type = Transient
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
nl_rel_tol = 1e-6
l_max_its = 20
start_time = 0.0
dt = 1.0
num_steps = 1
end_time = 1.0
[] # Executioner
[Outputs]
[./out]
type = Exodus
elemental_as_nodal = true
[../]
[] # Outputs
(modules/solid_mechanics/test/tests/auxkernels/tensorelasticenergyaux.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
nz = 0
xmax = 3
ymax = 2
zmax = 0
elem_type = QUAD4
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./dummy]
[../]
[]
[AuxVariables]
[./disp_x]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = sin(x)*0.1
[../]
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = cos(y)*0.05
[../]
[../]
[./E]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./elastic_energy]
type = ElasticEnergyAux
variable = E
[../]
[]
[Materials]
[./elasticity]
type = ComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '1 2 4 3 2 5 1 3 1'
[../]
[./strain]
type = ComputeSmallStrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
kernel_coverage_check = false
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/elastic_patch/elastic_patch.i)
# Patch Test
# This test is designed to compute constant xx, yy, zz, xy, yz, and zx
# stress on a set of irregular hexes. The mesh is composed of one
# block with seven elements. The elements form a unit cube with one
# internal element. There is a nodeset for each exterior node.
# The cube is displaced by 1e-6 units in x, 2e-6 in y, and 3e-6 in z.
# The faces are sheared as well (1e-6, 2e-6, and 3e-6 for xy, yz, and
# zx). This gives a uniform strain/stress state for all six unique
# tensor components.
# With Young's modulus at 1e6 and Poisson's ratio at 0, the shear
# modulus is 5e5 (G=E/2/(1+nu)). Therefore,
#
# stress xx = 1e6 * 1e-6 = 1
# stress yy = 1e6 * 2e-6 = 2
# stress zz = 1e6 * 3e-6 = 3
# stress xy = 2 * 5e5 * 1e-6 / 2 = 0.5
# (2 * G * gamma_xy / 2 = 2 * G * epsilon_xy)
# stress yz = 2 * 5e5 * 2e-6 / 2 = 1
# stress zx = 2 * 5e5 * 3e-6 / 2 = 1.5
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
block = '1 2 3 4 5 6 7'
[]
[Mesh]#Comment
file = elastic_patch.e
[] # Mesh
[Functions]
[./rampConstant1]
type = PiecewiseLinear
x = '0. 1. 2.'
y = '0. 1. 1.'
scale_factor = 1e-6
[../]
[./rampConstant2]
type = PiecewiseLinear
x = '0. 1. 2.'
y = '0. 1. 1.'
scale_factor = 2e-6
[../]
[./rampConstant3]
type = PiecewiseLinear
x = '0. 1. 2.'
y = '0. 1. 1.'
scale_factor = 3e-6
[../]
[./rampConstant4]
type = PiecewiseLinear
x = '0. 1. 2.'
y = '0. 1. 1.'
scale_factor = 4e-6
[../]
[./rampConstant6]
type = PiecewiseLinear
x = '0. 1. 2.'
y = '0. 1. 1.'
scale_factor = 6e-6
[../]
[] # Functions
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[./disp_z]
order = FIRST
family = LAGRANGE
[../]
[] # Variables
[AuxVariables]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zx]
order = CONSTANT
family = MONOMIAL
[../]
[./elastic_energy]
order = CONSTANT
family = MONOMIAL
[../]
[./vonmises]
order = CONSTANT
family = MONOMIAL
[../]
[./hydrostatic]
order = CONSTANT
family = MONOMIAL
[../]
[./firstinv]
order = CONSTANT
family = MONOMIAL
[../]
[./secondinv]
order = CONSTANT
family = MONOMIAL
[../]
[./thirdinv]
order = CONSTANT
family = MONOMIAL
[../]
[./maxprincipal]
order = CONSTANT
family = MONOMIAL
[../]
[./midprincipal]
order = CONSTANT
family = MONOMIAL
[../]
[./minprincipal]
order = CONSTANT
family = MONOMIAL
[../]
[./direction]
order = CONSTANT
family = MONOMIAL
[../]
[./max_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./sint]
order = CONSTANT
family = MONOMIAL
[../]
[] # AuxVariables
[Kernels]
[SolidMechanics]
use_displaced_mesh = true
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[../]
[./stress_zx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zx
index_i = 2
index_j = 0
[../]
[./elastic_energy]
type = ElasticEnergyAux
variable = elastic_energy
[../]
[./vonmises]
type = RankTwoScalarAux
rank_two_tensor = stress
variable = vonmises
scalar_type = vonmisesStress
[../]
[./hydrostatic]
type = RankTwoScalarAux
rank_two_tensor = stress
variable = hydrostatic
scalar_type = hydrostatic
[../]
[./fi]
type = RankTwoScalarAux
rank_two_tensor = stress
variable = firstinv
scalar_type = firstinvariant
[../]
[./si]
type = RankTwoScalarAux
rank_two_tensor = stress
variable = secondinv
scalar_type = secondinvariant
[../]
[./ti]
type = RankTwoScalarAux
rank_two_tensor = stress
variable = thirdinv
scalar_type = thirdinvariant
[../]
[./maxprincipal]
type = RankTwoScalarAux
rank_two_tensor = stress
variable = maxprincipal
scalar_type = MaxPRiNCIpAl
[../]
[./midprincipal]
type = RankTwoScalarAux
rank_two_tensor = stress
variable = midprincipal
scalar_type = MidPRiNCIpAl
[../]
[./minprincipal]
type = RankTwoScalarAux
rank_two_tensor = stress
variable = minprincipal
scalar_type = MiNPRiNCIpAl
[../]
[./direction]
type = RankTwoScalarAux
rank_two_tensor = stress
variable = direction
scalar_type = direction
direction = '1 1 1'
[../]
[./max_shear]
type = RankTwoScalarAux
rank_two_tensor = stress
variable = max_shear
scalar_type = MaxShear
[../]
[./sint]
type = RankTwoScalarAux
rank_two_tensor = stress
variable = sint
scalar_type = StressIntensity
[../]
[] # AuxKernels
[BCs]
[./node1_x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./node1_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 1
function = rampConstant2
[../]
[./node1_z]
type = FunctionDirichletBC
variable = disp_z
boundary = 1
function = rampConstant3
[../]
[./node2_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 2
function = rampConstant1
[../]
[./node2_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 2
function = rampConstant2
[../]
[./node2_z]
type = FunctionDirichletBC
variable = disp_z
boundary = 2
function = rampConstant6
[../]
[./node3_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 3
function = rampConstant1
[../]
[./node3_y]
type = DirichletBC
variable = disp_y
boundary = 3
value = 0.0
[../]
[./node3_z]
type = FunctionDirichletBC
variable = disp_z
boundary = 3
function = rampConstant3
[../]
[./node4_x]
type = DirichletBC
variable = disp_x
boundary = 4
value = 0.0
[../]
[./node4_y]
type = DirichletBC
variable = disp_y
boundary = 4
value = 0.0
[../]
[./node4_z]
type = DirichletBC
variable = disp_z
boundary = 4
value = 0.0
[../]
[./node5_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 5
function = rampConstant1
[../]
[./node5_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 5
function = rampConstant4
[../]
[./node5_z]
type = FunctionDirichletBC
variable = disp_z
boundary = 5
function = rampConstant3
[../]
[./node6_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 6
function = rampConstant2
[../]
[./node6_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 6
function = rampConstant4
[../]
[./node6_z]
type = FunctionDirichletBC
variable = disp_z
boundary = 6
function = rampConstant6
[../]
[./node7_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 7
function = rampConstant2
[../]
[./node7_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 7
function = rampConstant2
[../]
[./node7_z]
type = FunctionDirichletBC
variable = disp_z
boundary = 7
function = rampConstant3
[../]
[./node8_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 8
function = rampConstant1
[../]
[./node8_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 8
function = rampConstant2
[../]
[./node8_z]
type = DirichletBC
variable = disp_z
boundary = 8
value = 0.0
[../]
[] # BCs
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.0
[../]
[./strain]
type = ComputeFiniteStrain
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
[../]
[] # Materials
[Executioner]
type = Transient
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
nl_abs_tol = 1e-10
l_max_its = 20
start_time = 0.0
dt = 1.0
num_steps = 2
end_time = 2.0
[] # Executioner
[Outputs]
exodus = true
[] # Outputs
(modules/contact/test/tests/mortar_dynamics/block-dynamics-reference.i)
starting_point = 2e-1
offset = -0.19
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[normal_lm]
block = 3
use_dual = true
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[DynamicTensorMechanics]
displacements = 'disp_x disp_y'
generate_output = 'stress_xx stress_yy'
strain = FINITE
block = '1 2'
zeta = 1.0
alpha = 0.0
[]
[inertia_x]
type = InertialForce
variable = disp_x
velocity = vel_x
acceleration = accel_x
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[inertia_y]
type = InertialForce
variable = disp_y
velocity = vel_y
acceleration = accel_y
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[strain]
type = ComputeFiniteStrain
block = '1 2'
[]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '7750'
[]
[]
[AuxVariables]
[vel_x]
block = '1 2'
[]
[accel_x]
block = '1 2'
[]
[vel_y]
block = '1 2'
[]
[accel_y]
block = '1 2'
[]
[vel_z]
block = '1 2'
[]
[accel_z]
block = '1 2'
[]
[kinetic_energy]
order = CONSTANT
family = MONOMIAL
[]
[elastic_energy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = 'timestep_end'
[]
[vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = 'timestep_end'
[]
[accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = 'timestep_end'
[]
[vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = 'timestep_end'
[]
[kinetic_energy]
type = KineticEnergyAux
block = '1 2'
variable = kinetic_energy
newmark_velocity_x = vel_x
newmark_velocity_y = vel_y
newmark_velocity_z = 0.0
density = density
[]
[elastic_energy]
type = ElasticEnergyAux
variable = elastic_energy
block = '1 2'
[]
[]
# User object provides the contact force (e.g. LM)
# for the application of the generalized force
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
lm_variable = normal_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
# Not using 'dynamic' constraints results in poor enforcement of contact
# constraints and lack of kinetic and elastic energy conservation.
[weighted_gap_lm]
type = ComputeDynamicWeightedGapLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
disp_x = disp_x
disp_y = disp_y
newmark_beta = 0.25
newmark_gamma = 0.5
use_displaced_mesh = true
# Capture tolerance is important. If too small, stabilization takes longer
capture_tolerance = 1.0e-5
c = 1.0e6
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 4 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 30 # 50
function = '0' # '1e-2*t'
[]
[]
[Executioner]
type = Transient
end_time = 0.275 # 8.0
dt = 0.025
dtmin = .025
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu NONZERO 1e-15'
nl_max_its = 50
line_search = 'none'
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
checkpoint = true
csv = true
[]
[Postprocessors]
active = 'contact total_kinetic_energy total_elastic_energy'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[total_kinetic_energy]
type = ElementIntegralVariablePostprocessor
variable = kinetic_energy
block = '1 2'
[]
[total_elastic_energy]
type = ElementIntegralVariablePostprocessor
variable = elastic_energy
block = '1 2'
[]
[]
(modules/solid_mechanics/test/tests/anisotropic_patch/anisotropic_patch_test.i)
# Patch Test
# This test is designed to compute constant xx, yy, zz, xy, yz, and zx
# stress on a set of irregular hexes. The mesh is composed of one
# block with seven elements. The elements form a unit cube with one
# internal element. There is a nodeset for each exterior node.
# The cube is displaced by 1e-6 units in x, 2e-6 in y, and 3e-6 in z.
# The faces are sheared as well (1e-6, 2e-6, and 3e-6 for xy, yz, and
# zx). This gives a uniform strain/stress state for all six unique
# tensor components.
# With Young's modulus at 1e6 and Poisson's ratio at 0, the shear
# modulus is 5e5 (G=E/2/(1+nu)). Therefore,
#
# stress xx = 1e6 * 1e-6 = 1
# stress yy = 1e6 * 2e-6 = 2
# stress zz = 1e6 * 3e-6 = 3
# stress xy = 2 * 5e5 * 1e-6 / 2 = 0.5
# (2 * G * gamma_xy / 2 = 2 * G * epsilon_xy)
# stress yz = 2 * 5e5 * 2e-6 / 2 = 1
# stress zx = 2 * 5e5 * 3e-6 / 2 = 1.5
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
block = '1 2 3 4 5 6 7'
[]
[Mesh]#Comment
file = anisotropic_patch_test.e
[] # Mesh
[Functions]
[./rampConstant1]
type = PiecewiseLinear
x = '0. 1. 2.'
y = '0. 1. 1.'
scale_factor = 1e-6
[../]
[./rampConstant2]
type = PiecewiseLinear
x = '0. 1. 2.'
y = '0. 1. 1.'
scale_factor = 2e-6
[../]
[./rampConstant3]
type = PiecewiseLinear
x = '0. 1. 2.'
y = '0. 1. 1.'
scale_factor = 3e-6
[../]
[./rampConstant4]
type = PiecewiseLinear
x = '0. 1. 2.'
y = '0. 1. 1.'
scale_factor = 4e-6
[../]
[./rampConstant6]
type = PiecewiseLinear
x = '0. 1. 2.'
y = '0. 1. 1.'
scale_factor = 6e-6
[../]
[] # Functions
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[./disp_z]
order = FIRST
family = LAGRANGE
[../]
[] # Variables
[AuxVariables]
[./elastic_energy]
order = CONSTANT
family = MONOMIAL
[../]
[] # AuxVariables
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = SMALL
add_variables = true
generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_yz stress_zx vonmises_stress hydrostatic_stress firstinv_stress secondinv_stress thirdinv_stress'
[../]
[]
[AuxKernels]
[./elastic_energy]
type = ElasticEnergyAux
variable = elastic_energy
[../]
[] # AuxKernels
[BCs]
[./node1_x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./node1_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 1
function = rampConstant2
[../]
[./node1_z]
type = FunctionDirichletBC
variable = disp_z
boundary = 1
function = rampConstant3
[../]
[./node2_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 2
function = rampConstant1
[../]
[./node2_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 2
function = rampConstant2
[../]
[./node2_z]
type = FunctionDirichletBC
variable = disp_z
boundary = 2
function = rampConstant6
[../]
[./node3_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 3
function = rampConstant1
[../]
[./node3_y]
type = DirichletBC
variable = disp_y
boundary = 3
value = 0.0
[../]
[./node3_z]
type = FunctionDirichletBC
variable = disp_z
boundary = 3
function = rampConstant3
[../]
[./node4_x]
type = DirichletBC
variable = disp_x
boundary = 4
value = 0.0
[../]
[./node4_y]
type = DirichletBC
variable = disp_y
boundary = 4
value = 0.0
[../]
[./node4_z]
type = DirichletBC
variable = disp_z
boundary = 4
value = 0.0
[../]
[./node5_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 5
function = rampConstant1
[../]
[./node5_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 5
function = rampConstant4
[../]
[./node5_z]
type = FunctionDirichletBC
variable = disp_z
boundary = 5
function = rampConstant3
[../]
[./node6_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 6
function = rampConstant2
[../]
[./node6_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 6
function = rampConstant4
[../]
[./node6_z]
type = FunctionDirichletBC
variable = disp_z
boundary = 6
function = rampConstant6
[../]
[./node7_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 7
function = rampConstant2
[../]
[./node7_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 7
function = rampConstant2
[../]
[./node7_z]
type = FunctionDirichletBC
variable = disp_z
boundary = 7
function = rampConstant3
[../]
[./node8_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 8
function = rampConstant1
[../]
[./node8_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 8
function = rampConstant2
[../]
[./node8_z]
type = DirichletBC
variable = disp_z
boundary = 8
value = 0.0
[../]
[] # BCs
[Materials]
[./elastic_tensor]
type = ComputeElasticityTensor
C_ijkl = '1e6 0.0 0.0 1e6 0.0 1e6 0.5e6 0.5e6 0.5e6'
fill_method = symmetric9
euler_angle_1 = 18.0
euler_angle_2 = 43.0
euler_angle_3 = 177.0
# Isotropic material constants
# The three euler angles do not matter
# youngs_modulus = 1e6
# poissons_ratio = 0.0
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[] # Materials
[Executioner]
type = Transient
nl_abs_tol = 1e-10
l_max_its = 20
start_time = 0.0
dt = 1.0
num_steps = 2
end_time = 2.0
[] # Executioner
[Outputs]
file_base = anisotropic_patch_test_out
[./exodus]
type = Exodus
elemental_as_nodal = true
[../]
[] # Outputs