(test/tests/mastodonblock/outputs/stress_strain_output.i)
# One element model to test Mastodon Actions. Periodic boundary conditions are
# applied and an acceleration is prescribed at the bottom surface.
[Mesh]
type = GeneratedMesh # Can generate simple lines, rectangles and rectangular prisms
dim = 3 # Dimension of the mesh
nx = 1 # Number of elements in the x direction
ny = 1 # Number of elements in the y direction
nz = 1 # Number of elements in the z direction
xmin = 0.0
xmax = 1
ymin = 0.0
ymax = 1
zmin = 0.0
zmax = 1
[]
[Mastodon]
[./Outputs]
stress_strain_output = true
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[AuxVariables]
inactive = 'stress_xx stress_yy stress_xy stress_zz stress_zx stress_yz strain_xx strain_yy strain_xy strain_zz strain_zx strain_yz'
[./vel_x]
[../]
[./accel_x]
[../]
[./vel_y]
[../]
[./accel_y]
[../]
[./vel_z]
[../]
[./accel_z]
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zx]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_zx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./layer_id]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./DynamicTensorMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
[./inertia_x]
type = InertialForce
variable = disp_x
velocity = vel_x
acceleration = accel_x
beta = 0.25
gamma = 0.5
use_displaced_mesh = false
[../]
[./inertia_y]
type = InertialForce
variable = disp_y
velocity = vel_y
acceleration = accel_y
beta = 0.25
gamma = 0.5
use_displaced_mesh = false
[../]
[./inertia_z]
type = InertialForce
variable = disp_z
velocity = vel_z
acceleration = accel_z
beta = 0.25
gamma = 0.5
use_displaced_mesh = false
[../]
[]
[AuxKernels]
inactive = 'stress_xx stress_yy stress_xy stress_zz stress_zx stress_yz strain_xx strain_yy strain_xy strain_zz strain_zx strain_yz'
[./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
[../]
[./accel_z]
type = NewmarkAccelAux
variable = accel_z
displacement = disp_z
velocity = vel_z
beta = 0.25
execute_on = timestep_end
[../]
[./vel_z]
type = NewmarkVelAux
variable = vel_z
acceleration = accel_z
gamma = 0.5
execute_on = timestep_end
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 1
index_j = 0
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 2
index_j = 1
[../]
[./stress_zx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zx
index_i = 0
index_j = 2
[../]
[./strain_xy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = stress_xy
index_i = 1
index_j = 0
[../]
[./strain_yz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yz
index_i = 2
index_j = 1
[../]
[./strain_zx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_zx
index_i = 0
index_j = 2
[../]
[./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
[../]
[./strain_xx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xx
index_i = 0
index_j = 0
[../]
[./strain_yy]
type = RankTwoAux
rank_two_tensor =total_strain
variable = strain_yy
index_i = 1
index_j = 1
[../]
[./strain_zz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_zz
index_i = 2
index_j = 2
[../]
[./layer]
type = UniformLayerAuxKernel
variable = layer_id
interfaces = '2.0'
direction = '0 0 1'
execute_on = initial
[../]
[]
[BCs]
[./x_bot]
type = PresetAcceleration
boundary = 0
function = accel_bottom_x
variable = disp_x
beta = 0.25
acceleration = accel_x
velocity = vel_x
[../]
[./y_bot]
type = PresetAcceleration
boundary = 0
function = accel_bottom_y
variable = disp_y
beta = 0.25
acceleration = accel_y
velocity = vel_y
[../]
[./z_bot]
type = DirichletBC
variable = disp_z
boundary = 0
value = 0.0
[../]
[./Periodic]
[./x_dir]
variable = 'disp_x disp_y disp_z'
primary = '4'
secondary = '2'
translation = '1.0 0.0 0.0'
[../]
[./y_dir]
variable = 'disp_x disp_y disp_z'
primary = '1'
secondary = '3'
translation = '0.0 1.0 0.0'
[../]
[../]
[]
[Functions]
[./accel_bottom_x]
type = PiecewiseLinear
data_file = 'accel.csv'
format = columns
scale_factor = 1.0
[../]
[./accel_bottom_y]
type = PiecewiseLinear
data_file = 'accel.csv'
format = columns
scale_factor = 2.0
[../]
[]
[Materials]
[./Elasticity_tensor_1]
type = ComputeIsotropicElasticityTensorSoil
block = 0
layer_variable = layer_id
layer_ids = '0'
shear_modulus = '1.0e+2'
poissons_ratio = '0.2'
density = '1.0'
[../]
[./strain_1]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[../]
[./stress_1]
type = ComputeLinearElasticStress
block = 0
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
nl_abs_tol = 1e-11
nl_rel_tol = 1e-11
start_time = 32
end_time = 33
dt = 0.01
timestep_tolerance = 1e-6
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = '201 hypre boomeramg 4'
line_search = 'none'
[]
[Postprocessors]
[./_dt]
type = TimestepSize
[../]
[./disp_6x]
type = NodalVariableValue
nodeid = 6
variable = disp_x
[../]
[./disp_6y]
type = NodalVariableValue
nodeid = 6
variable = disp_y
[../]
[./disp_6z]
type = NodalVariableValue
nodeid = 6
variable = disp_z
[../]
[./vel_6x]
type = NodalVariableValue
nodeid = 6
variable = vel_x
[../]
[./vel_6y]
type = NodalVariableValue
nodeid = 6
variable = vel_y
[../]
[./vel_6z]
type = NodalVariableValue
nodeid = 6
variable = vel_z
[../]
[./accel_6x]
type = NodalVariableValue
nodeid = 6
variable = accel_x
[../]
[./accel_6y]
type = NodalVariableValue
nodeid = 6
variable = accel_y
[../]
[./accel_6z]
type = NodalVariableValue
nodeid = 6
variable = accel_z
[../]
[./stress_xy_el]
type = ElementalVariableValue
variable = stress_xy
elementid = 0
[../]
[./stress_yz_el]
type = ElementalVariableValue
variable = stress_yz
elementid = 0
[../]
[./stress_zx_el]
type = ElementalVariableValue
variable = stress_zx
elementid = 0
[../]
[./strain_xy_el]
type = ElementalVariableValue
variable = strain_xy
elementid = 0
[../]
[./strain_yz_el]
type = ElementalVariableValue
variable = strain_yz
elementid = 0
[../]
[./strain_zx_el]
type = ElementalVariableValue
variable = strain_zx
elementid = 0
[../]
[./stress_xx_el]
type = ElementalVariableValue
variable = stress_xx
elementid = 0
[../]
[./stress_yy_el]
type = ElementalVariableValue
variable = stress_yy
elementid = 0
[../]
[./stress_zz_el]
type = ElementalVariableValue
variable = stress_zz
elementid = 0
[../]
[./strain_xx_el]
type = ElementalVariableValue
variable = strain_xx
elementid = 0
[../]
[./strain_yy_el]
type = ElementalVariableValue
variable = strain_yy
elementid = 0
[../]
[./strain_zz_el]
type = ElementalVariableValue
variable = strain_zz
elementid = 0
[../]
[]
[Outputs]
exodus = true
csv = true
perf_graph = false
[]