- bufferThe buffer this compute is writing to
C++ Type:std::string
Controllable:No
Description:The buffer this compute is writing to
ComputeVonMisesStress
Compute vonMises stress.
ComputeVonMisesStress computes the scalar von Mises equivalent stress from a rank-2 stress tensor field. Formulas for 2D and 3D are supported.
Overview
Given Cauchy "stress" components , the 3D equivalent stress is
For 2D, the expression reduces accordingly.
Example Input File Syntax
[TensorComputes<<<{"href": "../../syntax/TensorComputes/index.html"}>>>]
[Postprocess<<<{"href": "../../syntax/TensorComputes/Postprocess/index.html"}>>>]
[vonmises]
type = ComputeVonMisesStress<<<{"description": "Compute vonMises stress.", "href": "ComputeVonMisesStress.html"}>>>
buffer<<<{"description": "The buffer this compute is writing to"}>>> = sV
[]
[]
[](test/tests/mechanics/mech.i)Input Parameters
- stressstressStress tensor.
Default:stress
C++ Type:std::string
Controllable:No
Description:Stress tensor.
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:No
Description:Set the enabled status of the MooseObject.
Advanced Parameters
Input Files
stress
Default:stress
C++ Type:std::string
Controllable:No
Description:Stress tensor.
(test/tests/mechanics/mech.i)
[Domain]
dim = 2
nx = 32
ny = 32
xmax = ${fparse 2*pi}
ymax = ${fparse 2*pi}
zmax = ${fparse 2*pi}
mesh_mode = DUMMY
parallel_mode = FFT_AUTO
[]
[TensorComputes]
[Initialize]
[phase]
type = ParsedCompute
expression = '(cos(x)/2+0.5)^1*(cos(y)/2+0.5)^1*(cos(z)/2+0.5)^1'
extra_symbols = true
buffer = phase
[]
[K]
type = ParsedCompute
buffer = K
expression = '(1-phase)*Ka + phase*Kb'
inputs = phase
constant_names = 'Ka Kb'
constant_expressions = '1 10'
[]
[mu]
type = ParsedCompute
buffer = mu
expression = '(1-phase)*mua + phase*mub'
inputs = phase
constant_names = 'mua mub'
constant_expressions = '0.5 5'
[]
[Finit]
type = RankTwoIdentity
buffer = F
[]
[]
[Solve]
[hyper_elasticity]
type = HyperElasticIsotropic
buffer = stress
F = Fnew
K = K
mu = mu
[]
[root]
[applied_strain]
type = MacroscopicShearTensor
buffer = applied_strain
[]
[mech]
type = FFTMechanics
buffer = Fnew
F = F
K = K
mu = mu
l_max_its = 40
l_tol = 1e-5
nl_rel_tol = 2e-4
nl_abs_tol = 2e-3
constitutive_model = hyper_elasticity
stress = stress
applied_macroscopic_strain = applied_strain
[]
[]
[]
[Postprocess]
[displacements]
type = ComputeDisplacements
buffer = disp
F = F
[]
[vonmises]
type = ComputeVonMisesStress
buffer = sV
[]
[]
[]
[TensorSolver]
# no variables are integrated by this solver (FFTMechanics performs a steady state mechanics solve)
type = ForwardEulerSolver
root_compute = root
# deformation tensor is just forwarded Fnew -> F
forward_buffer = F
forward_buffer_new = Fnew
substeps = 3
[]
[TensorOutputs]
active = 'parallel' # serial
[serial]
type = XDMFTensorOutput
file_base = mech_serial
buffer = 'disp sV F phase'
output_mode = 'OVERSIZED_NODAL CELL CELL NODE'
enable_hdf5 = true
execute_on = 'TIMESTEP_END'
[]
[parallel]
# NODE and OVERSIZED_NODAL are not yet available in parallel output
type = XDMFTensorOutput
file_base = mech_parallel
buffer = 'sV F phase'
output_mode = 'CELL CELL CELL'
enable_hdf5 = true
execute_on = 'TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
num_steps = 3
dt = 0.02
[]
(examples/degeus_mechanics/mech.i)
[Domain]
dim = 3
nx = 32
ny = 32
nz = 32
xmax = ${fparse 2*pi}
ymax = ${fparse 2*pi}
zmax = ${fparse 2*pi}
mesh_mode = DUMMY
[]
[TensorComputes]
[Initialize]
[Finit]
type = RankTwoIdentity
buffer = F
[]
[phase]
type = PhaseMechanicsTest
buffer = phase
[]
[K]
type = ParsedCompute
buffer = K
expression = '(1-phase)*Ka + phase*Kb'
inputs = phase
constant_names = 'Ka Kb'
constant_expressions = '0.833 8.33'
[]
[mu]
type = ParsedCompute
buffer = mu
expression = '(1-phase)*mua + phase*mub'
inputs = phase
constant_names = 'mua mub'
constant_expressions = '0.386 3.86'
[]
[]
[Solve]
[hyper_elasticity]
type = HyperElasticIsotropic
buffer = stress
F = Fnew
K = K
mu = mu
[]
[root]
[applied_strain]
type = MacroscopicShearTensor
buffer = applied_strain
[]
[mech]
type = FFTMechanics
buffer = Fnew
F = F
K = K
mu = mu
l_tol = 1e-2
nl_rel_tol = 2e-2
nl_abs_tol = 2e-2
constitutive_model = hyper_elasticity
stress = stress
applied_macroscopic_strain = applied_strain
[]
[]
[]
[Postprocess]
[displacements]
type = ComputeDisplacements
buffer = disp
F = F
[]
[vonmises]
type = ComputeVonMisesStress
buffer = sV
[]
[]
[]
[TensorSolver]
# no variables are integrated by this solver (FFTMechanics performs a steady state mechanics solve)
type = ForwardEulerSolver
root_compute = root
# deformation tensor is just forwarded Fnew -> F
forward_buffer = F
forward_buffer_new = Fnew
substeps = 10
[]
[TensorOutputs]
[deformation_tensor]
type = XDMFTensorOutput
buffer = 'disp sV F'
output_mode = 'OVERSIZED_NODAL CELL CELL'
enable_hdf5 = true
[]
[]
[Executioner]
type = Transient
num_steps = 100
dt = 0.01
[]
(test/tests/mechanics/mech.i)
[Domain]
dim = 2
nx = 32
ny = 32
xmax = ${fparse 2*pi}
ymax = ${fparse 2*pi}
zmax = ${fparse 2*pi}
mesh_mode = DUMMY
parallel_mode = FFT_AUTO
[]
[TensorComputes]
[Initialize]
[phase]
type = ParsedCompute
expression = '(cos(x)/2+0.5)^1*(cos(y)/2+0.5)^1*(cos(z)/2+0.5)^1'
extra_symbols = true
buffer = phase
[]
[K]
type = ParsedCompute
buffer = K
expression = '(1-phase)*Ka + phase*Kb'
inputs = phase
constant_names = 'Ka Kb'
constant_expressions = '1 10'
[]
[mu]
type = ParsedCompute
buffer = mu
expression = '(1-phase)*mua + phase*mub'
inputs = phase
constant_names = 'mua mub'
constant_expressions = '0.5 5'
[]
[Finit]
type = RankTwoIdentity
buffer = F
[]
[]
[Solve]
[hyper_elasticity]
type = HyperElasticIsotropic
buffer = stress
F = Fnew
K = K
mu = mu
[]
[root]
[applied_strain]
type = MacroscopicShearTensor
buffer = applied_strain
[]
[mech]
type = FFTMechanics
buffer = Fnew
F = F
K = K
mu = mu
l_max_its = 40
l_tol = 1e-5
nl_rel_tol = 2e-4
nl_abs_tol = 2e-3
constitutive_model = hyper_elasticity
stress = stress
applied_macroscopic_strain = applied_strain
[]
[]
[]
[Postprocess]
[displacements]
type = ComputeDisplacements
buffer = disp
F = F
[]
[vonmises]
type = ComputeVonMisesStress
buffer = sV
[]
[]
[]
[TensorSolver]
# no variables are integrated by this solver (FFTMechanics performs a steady state mechanics solve)
type = ForwardEulerSolver
root_compute = root
# deformation tensor is just forwarded Fnew -> F
forward_buffer = F
forward_buffer_new = Fnew
substeps = 3
[]
[TensorOutputs]
active = 'parallel' # serial
[serial]
type = XDMFTensorOutput
file_base = mech_serial
buffer = 'disp sV F phase'
output_mode = 'OVERSIZED_NODAL CELL CELL NODE'
enable_hdf5 = true
execute_on = 'TIMESTEP_END'
[]
[parallel]
# NODE and OVERSIZED_NODAL are not yet available in parallel output
type = XDMFTensorOutput
file_base = mech_parallel
buffer = 'sV F phase'
output_mode = 'CELL CELL CELL'
enable_hdf5 = true
execute_on = 'TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
num_steps = 3
dt = 0.02
[]
(test/tests/mechanics/mech3d.i)
[Domain]
dim = 3
nx = 16
ny = 16
nz = 16
xmax = ${fparse 2*pi}
ymax = ${fparse 2*pi}
zmax = ${fparse 2*pi}
mesh_mode = DUMMY
parallel_mode = FFT_AUTO
[]
[TensorComputes]
[Initialize]
[phase]
type = ParsedCompute
expression = '(cos(x)/2+0.5)^1*(cos(y)/2+0.5)^1*(cos(z)/2+0.5)^1'
extra_symbols = true
buffer = phase
[]
[K]
type = ParsedCompute
buffer = K
expression = '(1-phase)*Ka + phase*Kb'
inputs = phase
constant_names = 'Ka Kb'
constant_expressions = '1 10'
[]
[mu]
type = ParsedCompute
buffer = mu
expression = '(1-phase)*mua + phase*mub'
inputs = phase
constant_names = 'mua mub'
constant_expressions = '0.5 5'
[]
[Finit]
type = RankTwoIdentity
buffer = F
[]
[]
[Solve]
[hyper_elasticity]
type = HyperElasticIsotropic
buffer = stress
F = Fnew
K = K
mu = mu
[]
[root]
[applied_strain]
type = MacroscopicShearTensor
buffer = applied_strain
[]
[mech]
type = FFTMechanics
buffer = Fnew
F = F
K = K
mu = mu
l_tol = 1e-2
nl_rel_tol = 2e-2
nl_abs_tol = 2e-2
constitutive_model = hyper_elasticity
stress = stress
applied_macroscopic_strain = applied_strain
[]
[]
[]
[Postprocess]
[displacements]
type = ComputeDisplacements
buffer = disp
F = F
[]
[vonmises]
type = ComputeVonMisesStress
buffer = sV
[]
[]
[]
[TensorSolver]
# no variables are integrated by this solver (FFTMechanics performs a steady state mechanics solve)
type = ForwardEulerSolver
root_compute = root
# deformation tensor is just forwarded Fnew -> F
forward_buffer = F
forward_buffer_new = Fnew
substeps = 10
[]
[TensorOutputs]
active = 'parallel' # serial
[serial]
type = XDMFTensorOutput
file_base = mech3d_serial
buffer = 'disp sV F phase'
output_mode = 'OVERSIZED_NODAL CELL CELL NODE'
enable_hdf5 = true
execute_on = 'TIMESTEP_END'
[]
[parallel]
# NODE and OVERSIZED_NODAL are not yet available in parallel output
type = XDMFTensorOutput
file_base = mech3d_parallel
buffer = 'sV F phase'
output_mode = 'CELL CELL CELL'
enable_hdf5 = true
execute_on = 'TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
num_steps = 3
dt = 0.01
[]