- data_typeThe type of data to retrieve for the section_name
C++ Type:MooseEnum
Controllable:No
Description:The type of data to retrieve for the section_name
- section_nameThe name of the section to get data for
C++ Type:std::string
Controllable:No
Description:The name of the section to get data for
PerfGraphData
Retrieves performance information about a section from the PerfGraph.
Description
PerfGraphData
retrieves performance data from the PerfGraph and reports it as a Postprocessor
.
The name of the section that you wish to retrieve performance data for is to be provided in the "section_name" parameter. The performance data type (see Performance Data Types for details on the possible options) is to be provided in the "data_type".
Most registered PerfGraph sections are not registered until the first moment they are ran. Depending on what execution flags are set (when PerfGraphData
is executed), the system by default will error if retrieving information for a section that has not ran yet. To skip this error and return zero for sections that have not ran yet, you must set "must_exist" to false
. See Early Retrieval for more information.
Input Parameters
- execute_onTIMESTEP_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.
Default: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, TRANSFER
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.
- must_existTrueWhether or not the section must exist; if false and the section does not exist, the value is set to zero
Default:True
C++ Type:bool
Controllable:No
Description:Whether or not the section must exist; if false and the section does not exist, the value is set to zero
- 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
- allow_duplicate_execution_on_initialFalseIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
Default:False
C++ Type:bool
Controllable:No
Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
- 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.
- execution_order_group0Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
Default:0
C++ Type:int
Controllable:No
Description:Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
- force_postauxFalseForces the UserObject to be executed in POSTAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in POSTAUX
- force_preauxFalseForces the UserObject to be executed in PREAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREAUX
- force_preicFalseForces the UserObject to be executed in PREIC during initial setup
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREIC during initial setup
- 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
- 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/phase_field/tutorials/spinodal_decomposition/s4_mobility.i)
- (modules/solid_mechanics/test/tests/notched_plastic_block/biaxial_smooth.i)
- (test/tests/postprocessors/memory_usage/print_memory_usage.i)
- (modules/stochastic_tools/examples/paper/full_solve.i)
- (modules/combined/test/tests/reference_residual/reference_residual_perfgraph.i)
- (test/tests/postprocessors/print_perf_data/print_perf_data.i)
- (modules/solid_mechanics/test/tests/notched_plastic_block/cmc_smooth.i)
- (modules/combined/examples/phase_field-mechanics/hex_grain_growth_2D_eldrforce.i)
- (modules/phase_field/tutorials/spinodal_decomposition/s3_decomp.i)
- (modules/optimization/examples/simpleTransient/main_gradient.i)
- (modules/solid_mechanics/test/tests/notched_plastic_block/cmc_planar.i)
- (modules/solid_mechanics/test/tests/notched_plastic_block/biaxial_planar.i)
- (test/tests/postprocessors/perf_graph_data/perf_graph.i)
- (modules/phase_field/tutorials/spinodal_decomposition/s5_energycurve.i)
- (test/tests/postprocessors/print_perf_data/use_log_data_no_print.i)
- (modules/phase_field/tutorials/spinodal_decomposition/s2_fasttest.i)
- (modules/solid_mechanics/test/tests/notched_plastic_block/biaxial_abbo.i)
- (modules/combined/examples/phase_field-mechanics/poly_grain_growth_2D_eldrforce.i)
- (test/tests/outputs/output_on/postprocessors.i)
References
No citations exist within this document.section_name
C++ Type:std::string
Controllable:No
Description:The name of the section to get data for
data_type
C++ Type:MooseEnum
Options:SELF, CHILDREN, TOTAL, SELF_AVG, CHILDREN_AVG, TOTAL_AVG, SELF_PERCENT, CHILDREN_PERCENT, TOTAL_PERCENT, SELF_MEMORY, CHILDREN_MEMORY, TOTAL_MEMORY, CALLS
Controllable:No
Description:The type of data to retrieve for the section_name
must_exist
Default:True
C++ Type:bool
Controllable:No
Description:Whether or not the section must exist; if false and the section does not exist, the value is set to zero
(modules/phase_field/tutorials/spinodal_decomposition/s4_mobility.i)
#
# Example simulation of an iron-chromium alloy at 500 C. Equilibrium
# concentrations are at 23.6 and 82.3 mol% Cr. Kappa value, free energy equation,
# and mobility equation were provided by Lars Hoglund. Solved using the split
# form of the Cahn-Hilliard equation.
#
[Mesh]
type = GeneratedMesh
dim = 2
elem_type = QUAD4
nx = 25
ny = 25
nz = 0
xmin = 0
xmax = 25
ymin = 0
ymax = 25
zmin = 0
zmax = 0
uniform_refine = 2
[]
[Variables]
[./c] # Mole fraction of Cr (unitless)
order = FIRST
family = LAGRANGE
[../]
[./w] # Chemical potential (eV/mol)
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./concentrationIC] # 46.774 mol% Cr with variations
type = RandomIC
min = 0.44774
max = 0.48774
seed = 210
variable = c
[../]
[]
[BCs]
[./Periodic]
[./c_bcs]
auto_direction = 'x y'
[../]
[../]
[]
[Kernels]
[./w_dot]
variable = w
v = c
type = CoupledTimeDerivative
[../]
[./coupled_res]
variable = w
type = SplitCHWRes
mob_name = M
[../]
[./coupled_parsed]
variable = c
type = SplitCHParsed
f_name = f_loc
kappa_name = kappa_c
w = w
[../]
[]
[Materials]
# d is a scaling factor that makes it easier for the solution to converge
# without changing the results. It is defined in each of the first three
# materials and must have the same value in each one.
[./kappa] # Gradient energy coefficient (eV nm^2/mol)
type = GenericFunctionMaterial
prop_names = 'kappa_c'
prop_values = '8.125e-16*6.24150934e+18*1e+09^2*1e-27'
# kappa_c *eV_J*nm_m^2* d
[../]
[./mobility] # Mobility (nm^2 mol/eV/s)
# NOTE: This is a fitted equation, so only 'Conv' has units
type = DerivativeParsedMaterial
property_name = M
coupled_variables = c
constant_names = 'Acr Bcr Ccr Dcr
Ecr Fcr Gcr
Afe Bfe Cfe Dfe
Efe Ffe Gfe
nm_m eV_J d'
constant_expressions = '-32.770969 -25.8186669 -3.29612744 17.669757
37.6197853 20.6941796 10.8095813
-31.687117 -26.0291774 0.2286581 24.3633544
44.3334237 8.72990497 20.956768
1e+09 6.24150934e+18 1e-27'
expression = 'nm_m^2/eV_J/d*((1-c)^2*c*10^
(Acr*c+Bcr*(1-c)+Ccr*c*log(c)+Dcr*(1-c)*log(1-c)+
Ecr*c*(1-c)+Fcr*c*(1-c)*(2*c-1)+Gcr*c*(1-c)*(2*c-1)^2)
+c^2*(1-c)*10^
(Afe*c+Bfe*(1-c)+Cfe*c*log(c)+Dfe*(1-c)*log(1-c)+
Efe*c*(1-c)+Ffe*c*(1-c)*(2*c-1)+Gfe*c*(1-c)*(2*c-1)^2))'
derivative_order = 1
outputs = exodus
[../]
[./local_energy] # Local free energy function (eV/mol)
type = DerivativeParsedMaterial
property_name = f_loc
coupled_variables = c
constant_names = 'A B C D E F G eV_J d'
constant_expressions = '-2.446831e+04 -2.827533e+04 4.167994e+03 7.052907e+03
1.208993e+04 2.568625e+03 -2.354293e+03
6.24150934e+18 1e-27'
expression = 'eV_J*d*(A*c+B*(1-c)+C*c*log(c)+D*(1-c)*log(1-c)+
E*c*(1-c)+F*c*(1-c)*(2*c-1)+G*c*(1-c)*(2*c-1)^2)'
derivative_order = 2
[../]
[./precipitate_indicator] # Returns 1/625 if precipitate
type = ParsedMaterial
property_name = prec_indic
coupled_variables = c
expression = if(c>0.6,0.0016,0)
[../]
[]
[Postprocessors]
[./step_size] # Size of the time step
type = TimestepSize
[../]
[./iterations] # Number of iterations needed to converge timestep
type = NumNonlinearIterations
[../]
[./nodes] # Number of nodes in mesh
type = NumNodes
[../]
[./evaluations] # Cumulative residual calculations for simulation
type = NumResidualEvaluations
[../]
[./precipitate_area] # Fraction of surface devoted to precipitates
type = ElementIntegralMaterialProperty
mat_prop = prec_indic
[../]
[./active_time] # Time computer spent on simulation
type = PerfGraphData
section_name = "Root"
data_type = total
[../]
[]
[Preconditioning]
[./coupled]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
l_max_its = 30
l_tol = 1e-6
nl_max_its = 50
nl_abs_tol = 1e-9
end_time = 604800 # 7 days
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type
-sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly
ilu 1'
[./TimeStepper]
type = IterationAdaptiveDT
dt = 10
cutback_factor = 0.8
growth_factor = 1.5
optimal_iterations = 7
[../]
[./Adaptivity]
coarsen_fraction = 0.1
refine_fraction = 0.7
max_h_level = 2
[../]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
console = true
csv = true
[./console]
type = Console
max_rows = 10
[../]
[]
(modules/solid_mechanics/test/tests/notched_plastic_block/biaxial_smooth.i)
# Uses a multi-smooted version of Mohr-Coulomb (via CappedMohrCoulombStressUpdate and ComputeMultipleInelasticStress) to simulate the following problem.
# A cubical block is notched around its equator.
# All of its outer surfaces have roller BCs, but the notched region is free to move as needed
# The block is initialised with a high hydrostatic tensile stress
# Without the notch, the BCs do not allow contraction of the block, and this stress configuration is admissible
# With the notch, however, the interior parts of the block are free to move in order to relieve stress, and this causes plastic failure
# The top surface is then pulled upwards (the bottom is fixed because of the roller BCs)
# This causes more failure
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 9
ny = 9
nz = 9
xmin = 0
xmax = 0.1
ymin = 0
ymax = 0.1
zmin = 0
zmax = 0.1
[]
[block_to_remove_xmin]
type = SubdomainBoundingBoxGenerator
bottom_left = '-0.01 -0.01 0.045'
top_right = '0.01 0.11 0.055'
location = INSIDE
block_id = 1
input = generated_mesh
[]
[block_to_remove_xmax]
type = SubdomainBoundingBoxGenerator
bottom_left = '0.09 -0.01 0.045'
top_right = '0.11 0.11 0.055'
location = INSIDE
block_id = 1
input = block_to_remove_xmin
[]
[block_to_remove_ymin]
type = SubdomainBoundingBoxGenerator
bottom_left = '-0.01 -0.01 0.045'
top_right = '0.11 0.01 0.055'
location = INSIDE
block_id = 1
input = block_to_remove_xmax
[]
[block_to_remove_ymax]
type = SubdomainBoundingBoxGenerator
bottom_left = '-0.01 0.09 0.045'
top_right = '0.11 0.11 0.055'
location = INSIDE
block_id = 1
input = block_to_remove_ymin
[]
[remove_block]
type = BlockDeletionGenerator
block = 1
input = block_to_remove_ymax
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
add_variables = true
incremental = true
generate_output = 'max_principal_stress mid_principal_stress min_principal_stress stress_zz'
eigenstrain_names = ini_stress
[../]
[]
[Postprocessors]
[./uz]
type = PointValue
point = '0 0 0.1'
use_displaced_mesh = false
variable = disp_z
[../]
[./s_zz]
type = ElementAverageValue
use_displaced_mesh = false
variable = stress_zz
[../]
[./num_res]
type = NumResidualEvaluations
[../]
[./nr_its] # num_iters is the average number of NR iterations encountered per element in this timestep
type = ElementAverageValue
variable = num_iters
[../]
[./max_nr_its] # max_num_iters is the maximum number of NR iterations encountered in the element during the whole simulation
type = ElementExtremeValue
variable = max_num_iters
[../]
[./runtime]
type = PerfGraphData
data_type = TOTAL
section_name = 'Root'
[../]
[]
[BCs]
# back=zmin, front=zmax, bottom=ymin, top=ymax, left=xmin, right=xmax
[./xmin_xzero]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./xmax_xzero]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[../]
[./ymin_yzero]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./ymax_yzero]
type = DirichletBC
variable = disp_y
boundary = top
value = 0.0
[../]
[./zmin_zzero]
type = DirichletBC
variable = disp_z
boundary = back
value = '0'
[../]
[./zmax_disp]
type = FunctionDirichletBC
variable = disp_z
boundary = front
function = '1E-6*max(t,0)'
[../]
[]
[AuxVariables]
[./mc_int]
order = CONSTANT
family = MONOMIAL
[../]
[./num_iters]
order = CONSTANT
family = MONOMIAL
[../]
[./max_num_iters]
order = CONSTANT
family = MONOMIAL
[../]
[./yield_fcn]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./mc_int_auxk]
type = MaterialStdVectorAux
index = 0
property = plastic_internal_parameter
variable = mc_int
[../]
[./num_iters_auxk]
type = MaterialRealAux
property = plastic_NR_iterations
variable = num_iters
[../]
[./max_num_iters_auxk]
type = MaterialRealAux
property = max_plastic_NR_iterations
variable = max_num_iters
[../]
[./yield_fcn_auxk]
type = MaterialStdVectorAux
index = 6
property = plastic_yield_function
variable = yield_fcn
[../]
[]
[UserObjects]
[./ts]
type = SolidMechanicsHardeningConstant
value = 1E16
[../]
[./mc_coh]
type = SolidMechanicsHardeningConstant
value = 5E6
[../]
[./mc_phi]
type = SolidMechanicsHardeningConstant
value = 35
convert_to_radians = true
[../]
[./mc_psi]
type = SolidMechanicsHardeningConstant
value = 10
convert_to_radians = true
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 16E9
poissons_ratio = 0.25
[../]
[./mc]
type = CappedMohrCoulombStressUpdate
tensile_strength = ts
compressive_strength = ts
cohesion = mc_coh
friction_angle = mc_phi
dilation_angle = mc_psi
smoothing_tol = 0.2E6
yield_function_tol = 1E-5
[../]
[./stress]
type = ComputeMultipleInelasticStress
inelastic_models = mc
perform_finite_strain_rotations = false
[../]
[./strain_from_initial_stress]
type = ComputeEigenstrainFromInitialStress
initial_stress = '6E6 0 0 0 6E6 0 0 0 6E6'
eigenstrain_name = ini_stress
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
[../]
[]
[Executioner]
start_time = -1
end_time = 10
dt = 1
solve_type = NEWTON
type = Transient
l_tol = 1E-2
nl_abs_tol = 1E-5
nl_rel_tol = 1E-7
l_max_its = 200
nl_max_its = 400
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
[]
[Outputs]
file_base = biaxial_smooth
perf_graph = true
exodus = false
csv = true
[]
(test/tests/postprocessors/memory_usage/print_memory_usage.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./dt]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Adaptivity]
[./Markers]
[./uni]
type = UniformMarker
mark = REFINE
[../]
[../]
# this marker will tag every element for refinement, growing the problem
# exponentially with each timestep
marker = uni
# avoid a refine after the final step
stop_time = 4.5
[]
[Postprocessors]
[./physical]
type = MemoryUsage
mem_type = physical_memory
value_type = total
# by default MemoryUsage reports the peak value for the current timestep
# out of all samples that have been taken (at linear and non-linear iterations)
execute_on = 'INITIAL TIMESTEP_END NONLINEAR LINEAR'
[../]
[./virtual]
type = MemoryUsage
mem_type = virtual_memory
value_type = total
execute_on = 'INITIAL TIMESTEP_END'
[../]
[./page_faults]
type = MemoryUsage
mem_type = page_faults
value_type = total
execute_on = 'INITIAL TIMESTEP_END'
[../]
[./DOFs]
type = NumDOFs
execute_on = 'INITIAL TIMESTEP_END'
[../]
[./walltime]
type = PerfGraphData
section_name = "Root"
data_type = total
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu'
nl_abs_tol = 1e-10
num_steps = 5
dt = 1
[]
[Outputs]
csv = true
execute_on = 'INITIAL TIMESTEP_END FINAL'
perf_graph = true
[]
(modules/stochastic_tools/examples/paper/full_solve.i)
[StochasticTools]
[]
[Distributions]
[uniform]
type = Uniform
lower_bound = 1
upper_bound = 9
[]
[]
[Samplers]
[mc]
type = MonteCarlo
num_rows = 10
distributions = 'uniform uniform'
execute_on = 'initial timestep_end'
[]
[]
[MultiApps]
[runner]
type = SamplerFullSolveMultiApp
sampler = mc
input_files = 'sub.i'
mode = batch-restore
[]
[]
[Transfers]
[runner]
type = SamplerParameterTransfer
to_multi_app = runner
parameters = 'BCs/left/value BCs/right/value'
sampler = mc
[]
[data]
type = SamplerPostprocessorTransfer
from_multi_app = runner
to_vector_postprocessor = storage
from_postprocessor = average
sampler = mc
[]
[]
[VectorPostprocessors]
[storage]
type = StochasticResults
[]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Postprocessors]
[total]
type = MemoryUsage
execute_on = 'INITIAL TIMESTEP_END'
[]
[per_proc]
type = MemoryUsage
value_type = "average"
execute_on = 'INITIAL TIMESTEP_END'
[]
[max_proc]
type = MemoryUsage
value_type = "max_process"
execute_on = 'INITIAL TIMESTEP_END'
[]
[total_time]
type = PerfGraphData
execute_on = 'INITIAL TIMESTEP_END'
data_type = 'TOTAL'
section_name = 'Root'
[]
[run_time]
type = ChangeOverTimePostprocessor
postprocessor = total_time
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/combined/test/tests/reference_residual/reference_residual_perfgraph.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
type = GeneratedMesh
dim = 3
nx = 4
ny = 4
nz = 4
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = 'ref'
[]
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[./disp_z]
order = FIRST
family = LAGRANGE
[../]
[./temp]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./saved_x]
[../]
[./saved_y]
[../]
[./saved_z]
[../]
[./saved_t]
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
volumetric_locking_correction = true
incremental = true
save_in = 'saved_x saved_y saved_z'
eigenstrain_names = thermal_expansion
strain = FINITE
decomposition_method = EigenSolution
extra_vector_tags = 'ref'
temperature = temp
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = temp
save_in = saved_t
extra_vector_tags = 'ref'
[../]
[]
[Functions]
[./pull]
type = PiecewiseLinear
x = '0 1 2'
y = '0 1 1'
scale_factor = 0.1
[../]
[]
[BCs]
[./bottom_x]
type = DirichletBC
variable = disp_x
boundary = bottom
value = 0.0
[../]
[./bottom_y]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./bottom_z]
type = DirichletBC
variable = disp_z
boundary = bottom
value = 0.0
[../]
[./top_x]
type = DirichletBC
variable = disp_x
boundary = top
value = 0.0
[../]
[./top_y]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = pull
[../]
[./top_z]
type = DirichletBC
variable = disp_z
boundary = top
value = 0.0
[../]
[./bottom_temp]
type = DirichletBC
variable = temp
boundary = bottom
value = 10.0
[../]
[./top_temp]
type = DirichletBC
variable = temp
boundary = top
value = 20.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
block = 0
youngs_modulus = 1.0
poissons_ratio = 0.3
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = 0
[../]
[./thermal_expansion]
type = ComputeThermalExpansionEigenstrain
block = 0
eigenstrain_name = thermal_expansion
temperature = temp
thermal_expansion_coeff = 1e-5
stress_free_temperature = 0.0
[../]
[./heat1]
type = HeatConductionMaterial
block = 0
specific_heat = 1.0
thermal_conductivity = 1e-3 #Tuned to give temperature reference resid close to that of solidmech
[../]
[./density]
type = Density
block = 0
density = 1.0
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
nl_rel_tol = 1e-10
l_tol = 1e-3
l_max_its = 100
dt = 1.0
end_time = 2.0
[]
[Postprocessors]
[./res_calls]
type = PerfGraphData
section_name = "ReferenceResidualProblem::computeResidualInternal"
data_type = calls
[../]
[./elapsed]
type = PerfGraphData
section_name = "Root"
data_type = total
[../]
[]
[Outputs]
csv = true
[]
(test/tests/postprocessors/print_perf_data/print_perf_data.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[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]
[./elapsed]
type = PerfGraphData
section_name = "Root"
data_type = total
[../]
[./res_calls]
type = PerfGraphData
section_name = "FEProblem::computeResidualInternal"
data_type = calls
[../]
[./jac_calls]
type = PerfGraphData
section_name = "FEProblem::computeJacobianInternal"
data_type = calls
[../]
[./jac_total_time]
type = PerfGraphData
section_name = "FEProblem::computeJacobianInternal"
data_type = self
[../]
[./jac_average_time]
type = PerfGraphData
section_name = "FEProblem::computeJacobianInternal"
data_type = total_avg
[../]
[./jac_total_time_with_sub]
type = PerfGraphData
section_name = "FEProblem::computeJacobianInternal"
data_type = total
[../]
[./jac_average_time_with_sub]
type = PerfGraphData
section_name = "FEProblem::computeJacobianInternal"
data_type = total_avg
[../]
[./jac_percent_of_active_time]
type = PerfGraphData
section_name = "FEProblem::computeJacobianInternal"
data_type = self_percent
[../]
[./jac_percent_of_active_time_with_sub]
type = PerfGraphData
section_name = "FEProblem::computeJacobianInternal"
data_type = total_percent
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
csv = true
perf_graph = true
[]
(modules/solid_mechanics/test/tests/notched_plastic_block/cmc_smooth.i)
# Uses a multi-smoothed version of capped-Mohr-Coulomb (via CappedMohrCoulombStressUpdate and ComputeMultipleInelasticStress) to simulate the following problem.
# A cubical block is notched around its equator.
# All of its outer surfaces have roller BCs, but the notched region is free to move as needed
# The block is initialised with a high hydrostatic tensile stress
# Without the notch, the BCs do not allow contraction of the block, and this stress configuration is admissible
# With the notch, however, the interior parts of the block are free to move in order to relieve stress, and this causes plastic failure
# The top surface is then pulled upwards (the bottom is fixed because of the roller BCs)
# This causes more failure
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 9
ny = 9
nz = 9
xmin = 0
xmax = 0.1
ymin = 0
ymax = 0.1
zmin = 0
zmax = 0.1
[]
[block_to_remove_xmin]
type = SubdomainBoundingBoxGenerator
bottom_left = '-0.01 -0.01 0.045'
top_right = '0.01 0.11 0.055'
location = INSIDE
block_id = 1
input = generated_mesh
[]
[block_to_remove_xmax]
type = SubdomainBoundingBoxGenerator
bottom_left = '0.09 -0.01 0.045'
top_right = '0.11 0.11 0.055'
location = INSIDE
block_id = 1
input = block_to_remove_xmin
[]
[block_to_remove_ymin]
type = SubdomainBoundingBoxGenerator
bottom_left = '-0.01 -0.01 0.045'
top_right = '0.11 0.01 0.055'
location = INSIDE
block_id = 1
input = block_to_remove_xmax
[]
[block_to_remove_ymax]
type = SubdomainBoundingBoxGenerator
bottom_left = '-0.01 0.09 0.045'
top_right = '0.11 0.11 0.055'
location = INSIDE
block_id = 1
input = block_to_remove_ymin
[]
[remove_block]
type = BlockDeletionGenerator
block = 1
input = block_to_remove_ymax
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
add_variables = true
incremental = true
generate_output = 'max_principal_stress mid_principal_stress min_principal_stress stress_zz'
eigenstrain_names = ini_stress
[../]
[]
[Postprocessors]
[./uz]
type = PointValue
point = '0 0 0.1'
use_displaced_mesh = false
variable = disp_z
[../]
[./s_zz]
type = ElementAverageValue
use_displaced_mesh = false
variable = stress_zz
[../]
[./num_res]
type = NumResidualEvaluations
[../]
[./nr_its] # num_iters is the average number of NR iterations encountered per element in this timestep
type = ElementAverageValue
variable = num_iters
[../]
[./max_nr_its] # max_num_iters is the maximum number of NR iterations encountered in the element during the whole simulation
type = ElementExtremeValue
variable = max_num_iters
[../]
[./runtime]
type = PerfGraphData
data_type = TOTAL
section_name = 'Root'
[../]
[]
[BCs]
# back=zmin, front=zmax, bottom=ymin, top=ymax, left=xmin, right=xmax
[./xmin_xzero]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./xmax_xzero]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[../]
[./ymin_yzero]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./ymax_yzero]
type = DirichletBC
variable = disp_y
boundary = top
value = 0.0
[../]
[./zmin_zzero]
type = DirichletBC
variable = disp_z
boundary = back
value = '0'
[../]
[./zmax_disp]
type = FunctionDirichletBC
variable = disp_z
boundary = front
function = '1E-6*max(t,0)'
[../]
[]
[AuxVariables]
[./mc_int]
order = CONSTANT
family = MONOMIAL
[../]
[./num_iters]
order = CONSTANT
family = MONOMIAL
[../]
[./max_num_iters]
order = CONSTANT
family = MONOMIAL
[../]
[./yield_fcn]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./mc_int_auxk]
type = MaterialStdVectorAux
index = 0
property = plastic_internal_parameter
variable = mc_int
[../]
[./num_iters_auxk]
type = MaterialRealAux
property = plastic_NR_iterations
variable = num_iters
[../]
[./max_num_iters_auxk]
type = MaterialRealAux
property = max_plastic_NR_iterations
variable = max_num_iters
[../]
[./yield_fcn_auxk]
type = MaterialStdVectorAux
index = 0
property = plastic_yield_function
variable = yield_fcn
[../]
[]
[UserObjects]
[./ts]
type = SolidMechanicsHardeningConstant
value = 3E6
[../]
[./cs]
type = SolidMechanicsHardeningConstant
value = 1E16
[../]
[./mc_coh]
type = SolidMechanicsHardeningConstant
value = 5E6
[../]
[./mc_phi]
type = SolidMechanicsHardeningConstant
value = 35
convert_to_radians = true
[../]
[./mc_psi]
type = SolidMechanicsHardeningConstant
value = 10
convert_to_radians = true
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 16E9
poissons_ratio = 0.25
[../]
[./mc]
type = CappedMohrCoulombStressUpdate
tensile_strength = ts
compressive_strength = cs
cohesion = mc_coh
friction_angle = mc_phi
dilation_angle = mc_psi
smoothing_tol = 0.2E6
yield_function_tol = 1E-5
perfect_guess = false # this is so we can observe some Newton-Raphson iterations, for comparison with other models, and it is not optimal in any real-life simulations
[../]
[./stress]
type = ComputeMultipleInelasticStress
inelastic_models = mc
perform_finite_strain_rotations = false
[../]
[./strain_from_initial_stress]
type = ComputeEigenstrainFromInitialStress
initial_stress = '2.5E6 0 0 0 2.5E6 0 0 0 2.5E6'
eigenstrain_name = ini_stress
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
[../]
[]
[Executioner]
start_time = -1
end_time = 10
dt = 1
solve_type = NEWTON
type = Transient
l_tol = 1E-2
nl_abs_tol = 1E-5
nl_rel_tol = 1E-7
l_max_its = 200
nl_max_its = 400
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
[]
[Outputs]
file_base = cmc_smooth
perf_graph = true
exodus = false
csv = true
[]
(modules/combined/examples/phase_field-mechanics/hex_grain_growth_2D_eldrforce.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 17
nz = 0
xmax = 1000
ymax = 866
zmax = 0
elem_type = QUAD4
uniform_refine = 2
[]
[GlobalParams]
op_num = 3
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
[../]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[]
[UserObjects]
[./hex_ic]
type = PolycrystalHex
coloring_algorithm = bt
grain_num = 36
x_offset = 0.0
output_adjacency_matrix = true
[../]
[./euler_angle_file]
type = EulerAngleFileReader
file_name = grn_36_test2_2D.tex
[../]
[./grain_tracker]
type = GrainTrackerElasticity
threshold = 0.2
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
flood_entity_type = ELEMENTAL
fill_method = symmetric9
C_ijkl = '1.27e5 0.708e5 0.708e5 1.27e5 0.708e5 1.27e5 0.7355e5 0.7355e5 0.7355e5'
euler_angle_provider = euler_angle_file
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = hex_ic
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[./elastic_strain11]
order = CONSTANT
family = MONOMIAL
[../]
[./elastic_strain22]
order = CONSTANT
family = MONOMIAL
[../]
[./elastic_strain12]
order = CONSTANT
family = MONOMIAL
[../]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./var_indices]
order = CONSTANT
family = MONOMIAL
[../]
[./C1111]
order = CONSTANT
family = MONOMIAL
[../]
[./vonmises_stress]
order = CONSTANT
family = MONOMIAL
[../]
[./euler_angle]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[./PolycrystalElasticDrivingForce]
[../]
[./TensorMechanics]
displacements = 'disp_x disp_y'
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = 'initial timestep_end'
[../]
[./elastic_strain11]
type = RankTwoAux
variable = elastic_strain11
rank_two_tensor = elastic_strain
index_i = 0
index_j = 0
execute_on = timestep_end
[../]
[./elastic_strain22]
type = RankTwoAux
variable = elastic_strain22
rank_two_tensor = elastic_strain
index_i = 1
index_j = 1
execute_on = timestep_end
[../]
[./elastic_strain12]
type = RankTwoAux
variable = elastic_strain12
rank_two_tensor = elastic_strain
index_i = 0
index_j = 1
execute_on = timestep_end
[../]
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
execute_on = timestep_end
flood_counter = grain_tracker
field_display = UNIQUE_REGION
[../]
[./var_indices]
type = FeatureFloodCountAux
variable = var_indices
execute_on = timestep_end
flood_counter = grain_tracker
field_display = VARIABLE_COLORING
[../]
[./C1111]
type = RankFourAux
variable = C1111
rank_four_tensor = elasticity_tensor
index_l = 0
index_j = 0
index_k = 0
index_i = 0
execute_on = timestep_end
[../]
[./vonmises_stress]
type = RankTwoScalarAux
variable = vonmises_stress
rank_two_tensor = stress
scalar_type = VonMisesStress
[../]
[./euler_angle]
type = OutputEulerAngles
variable = euler_angle
euler_angle_provider = euler_angle_file
grain_tracker = grain_tracker
output_euler_angle = 'phi1'
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
variable = 'gr0 gr1 gr2'
[../]
[../]
[./top_displacement]
type = DirichletBC
variable = disp_y
boundary = top
value = -50.0
[../]
[./x_anchor]
type = DirichletBC
variable = disp_x
boundary = 'left right'
value = 0.0
[../]
[./y_anchor]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
block = 0
T = 500 # K
wGB = 15 # nm
GBmob0 = 2.5e-6 # m^4/(Js) from Schoenfelder 1997
Q = 0.23 # Migration energy in eV
GBenergy = 0.708 # GB energy in J/m^2
[../]
[./ElasticityTensor]
type = ComputePolycrystalElasticityTensor
block = 0
grain_tracker = grain_tracker
[../]
[./strain]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y'
[../]
[./stress]
type = ComputeLinearElasticStress
block = 0
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./dt]
type = TimestepSize
[../]
[./run_time]
type = PerfGraphData
section_name = "Root"
data_type = total
[../]
[./bnd_length]
type = GrainBoundaryArea
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
off_diag_row = 'disp_x disp_y'
off_diag_column = 'disp_y disp_x'
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart -pc_hypre_boomeramg_strong_threshold'
petsc_options_value = 'hypre boomeramg 31 0.7'
l_tol = 1.0e-4
l_max_its = 30
nl_max_its = 40
nl_rel_tol = 1.0e-7
start_time = 0.0
num_steps = 50
[./TimeStepper]
type = IterationAdaptiveDT
dt = 1.5
growth_factor = 1.2
cutback_factor = 0.8
optimal_iterations = 8
[../]
[./Adaptivity]
initial_adaptivity = 2
refine_fraction = 0.8
coarsen_fraction = 0.05
max_h_level = 3
[../]
[]
[Outputs]
exodus = true
[]
(modules/phase_field/tutorials/spinodal_decomposition/s3_decomp.i)
#
# Simulation of iron-chromium alloy decomposition using simplified conditions.
#
[Mesh]
type = GeneratedMesh
dim = 2
elem_type = QUAD4
nx = 25
ny = 25
nz = 0
xmin = 0
xmax = 25
ymin = 0
ymax = 25
zmin = 0
zmax = 0
uniform_refine = 2
[]
[Variables]
[./c] # Mole fraction of Cr (unitless)
order = FIRST
family = LAGRANGE
[../]
[./w] # Chemical potential (eV/mol)
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./concentrationIC] # 46.774 mol% Cr with variations
type = RandomIC
min = 0.44774
max = 0.48774
seed = 210
variable = c
[../]
[]
[BCs]
[./Periodic]
[./c_bcs]
auto_direction = 'x y'
[../]
[../]
[]
[Kernels]
[./w_dot]
variable = w
v = c
type = CoupledTimeDerivative
[../]
[./coupled_res]
variable = w
type = SplitCHWRes
mob_name = M
[../]
[./coupled_parsed]
variable = c
type = SplitCHParsed
f_name = f_loc
kappa_name = kappa_c
w = w
[../]
[]
[Materials]
# d is a scaling factor that makes it easier for the solution to converge
# without changing the results. It is defined in each of the materials and
# must have the same value in each one.
[./constants]
# Define constant values kappa_c and M. Eventually M will be replaced with
# an equation rather than a constant.
type = GenericFunctionMaterial
prop_names = 'kappa_c M'
prop_values = '8.125e-16*6.24150934e+18*1e+09^2*1e-27
2.2841e-26*1e+09^2/6.24150934e+18/1e-27'
# kappa_c*eV_J*nm_m^2*d
# M*nm_m^2/eV_J/d
[../]
[./local_energy]
# Defines the function for the local free energy density as given in the
# problem, then converts units and adds scaling factor.
type = DerivativeParsedMaterial
property_name = f_loc
coupled_variables = c
constant_names = 'A B C D E F G eV_J d'
constant_expressions = '-2.446831e+04 -2.827533e+04 4.167994e+03 7.052907e+03
1.208993e+04 2.568625e+03 -2.354293e+03
6.24150934e+18 1e-27'
expression = 'eV_J*d*(A*c+B*(1-c)+C*c*log(c)+D*(1-c)*log(1-c)+
E*c*(1-c)+F*c*(1-c)*(2*c-1)+G*c*(1-c)*(2*c-1)^2)'
derivative_order = 2
[../]
[]
[Postprocessors]
[./step_size] # Size of the time step
type = TimestepSize
[../]
[./iterations] # Number of iterations needed to converge timestep
type = NumNonlinearIterations
[../]
[./nodes] # Number of nodes in mesh
type = NumNodes
[../]
[./evaluations] # Cumulative residual calculations for simulation
type = NumResidualEvaluations
[../]
[./active_time] # Time computer spent on simulation
type = PerfGraphData
section_name = "Root"
data_type = total
[../]
[]
[Preconditioning]
[./coupled]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
l_max_its = 30
l_tol = 1e-6
nl_max_its = 50
nl_abs_tol = 1e-9
end_time = 604800 # 7 days
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type
-sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly
ilu 1'
[./TimeStepper]
type = IterationAdaptiveDT
dt = 10
cutback_factor = 0.8
growth_factor = 1.5
optimal_iterations = 7
[../]
[./Adaptivity]
coarsen_fraction = 0.1
refine_fraction = 0.7
max_h_level = 2
[../]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
console = true
csv = true
[./console]
type = Console
max_rows = 10
[../]
[]
(modules/optimization/examples/simpleTransient/main_gradient.i)
[Optimization]
[]
[OptimizationReporter]
type = OptimizationReporter
parameter_names = 'source'
num_values = '44'
[]
[MultiApps]
[forward]
type = FullSolveMultiApp
input_files = forward.i
execute_on = FORWARD
[]
[adjoint]
type = FullSolveMultiApp
input_files = adjoint.i
execute_on = ADJOINT
[]
[]
[Transfers]
[to_forward]
type = MultiAppReporterTransfer
to_multi_app = forward
from_reporters = 'OptimizationReporter/source'
to_reporters = 'src_values/values'
[]
[from_forward]
type = MultiAppReporterTransfer
from_multi_app = forward
from_reporters = 'measured_data/misfit_values measured_data/simulation_values'
to_reporters = 'OptimizationReporter/misfit_values OptimizationReporter/simulation_values'
[]
[to_adjoint]
type = MultiAppReporterTransfer
to_multi_app = adjoint
from_reporters = 'OptimizationReporter/source OptimizationReporter/misfit_values'
to_reporters = 'src_values/values measured_data/misfit_values'
[]
[from_adjoint]
type = MultiAppReporterTransfer
from_multi_app = adjoint
from_reporters = 'adjoint/inner_product'
to_reporters = 'OptimizationReporter/grad_source'
[]
[]
[Executioner]
type = Optimize
solve_on = none
tao_solver = taolmvm
petsc_options_iname = '-tao_gatol -tao_ls_type'
petsc_options_value = '1e-2 unit'
verbose = true
[]
[Postprocessors]
[./elapsed]
type = PerfGraphData
section_name = "Root"
data_type = total
[../]
[]
[Outputs]
[pgraph]
type = PerfGraphOutput
level = 1
[]
[]
(modules/solid_mechanics/test/tests/notched_plastic_block/cmc_planar.i)
# Uses an unsmoothed version of capped-Mohr-Coulomb (via ComputeMultiPlasticityStress with SolidMechanicsPlasticTensileMulti and SolidMechanicsPlasticMohrCoulombMulti) to simulate the following problem.
# A cubical block is notched around its equator.
# All of its outer surfaces have roller BCs, but the notched region is free to move as needed
# The block is initialised with a high hydrostatic tensile stress
# Without the notch, the BCs do not allow contraction of the block, and this stress configuration is admissible
# With the notch, however, the interior parts of the block are free to move in order to relieve stress, and this causes plastic failure
# The top surface is then pulled upwards (the bottom is fixed because of the roller BCs)
# This causes more failure
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 9
ny = 9
nz = 9
xmin = 0
xmax = 0.1
ymin = 0
ymax = 0.1
zmin = 0
zmax = 0.1
[]
[block_to_remove_xmin]
type = SubdomainBoundingBoxGenerator
bottom_left = '-0.01 -0.01 0.045'
top_right = '0.01 0.11 0.055'
location = INSIDE
block_id = 1
input = generated_mesh
[]
[block_to_remove_xmax]
type = SubdomainBoundingBoxGenerator
bottom_left = '0.09 -0.01 0.045'
top_right = '0.11 0.11 0.055'
location = INSIDE
block_id = 1
input = block_to_remove_xmin
[]
[block_to_remove_ymin]
type = SubdomainBoundingBoxGenerator
bottom_left = '-0.01 -0.01 0.045'
top_right = '0.11 0.01 0.055'
location = INSIDE
block_id = 1
input = block_to_remove_xmax
[]
[block_to_remove_ymax]
type = SubdomainBoundingBoxGenerator
bottom_left = '-0.01 0.09 0.045'
top_right = '0.11 0.11 0.055'
location = INSIDE
block_id = 1
input = block_to_remove_ymin
[]
[remove_block]
type = BlockDeletionGenerator
block = 1
input = block_to_remove_ymax
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
add_variables = true
incremental = true
generate_output = 'max_principal_stress mid_principal_stress min_principal_stress stress_zz'
eigenstrain_names = ini_stress
[../]
[]
[Postprocessors]
[./uz]
type = PointValue
point = '0 0 0.1'
use_displaced_mesh = false
variable = disp_z
[../]
[./s_zz]
type = ElementAverageValue
use_displaced_mesh = false
variable = stress_zz
[../]
[./num_res]
type = NumResidualEvaluations
[../]
[./nr_its]
type = ElementAverageValue
variable = num_iters
[../]
[./max_nr_its]
type = ElementExtremeValue
variable = num_iters
[../]
[./runtime]
type = PerfGraphData
data_type = TOTAL
section_name = 'Root'
[../]
[]
[BCs]
# back=zmin, front=zmax, bottom=ymin, top=ymax, left=xmin, right=xmax
[./xmin_xzero]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./xmax_xzero]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[../]
[./ymin_yzero]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./ymax_yzero]
type = DirichletBC
variable = disp_y
boundary = top
value = 0.0
[../]
[./zmin_zzero]
type = DirichletBC
variable = disp_z
boundary = back
value = '0'
[../]
[./zmax_disp]
type = FunctionDirichletBC
variable = disp_z
boundary = front
function = '1E-6*max(t,0)'
[../]
[]
[AuxVariables]
[./mc_int]
order = CONSTANT
family = MONOMIAL
[../]
[./plastic_strain]
order = CONSTANT
family = MONOMIAL
[../]
[./num_iters]
order = CONSTANT
family = MONOMIAL
[../]
[./yield_fcn]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./mc_int_auxk]
type = MaterialStdVectorAux
index = 0
property = plastic_internal_parameter
variable = mc_int
[../]
[./plastic_strain_aux]
type = MaterialRankTwoTensorAux
i = 2
j = 2
property = plastic_strain
variable = plastic_strain
[../]
[./num_iters_auxk] # cannot use plastic_NR_iterations directly as this is zero, since no NR iterations are actually used, since we use a custom algorithm to do the return
type = ParsedAux
coupled_variables = plastic_strain
expression = 'if(plastic_strain>0,1,0)'
variable = num_iters
[../]
[./yield_fcn_auxk]
type = MaterialStdVectorAux
index = 0
property = plastic_yield_function
variable = yield_fcn
[../]
[]
[UserObjects]
[./ts]
type = SolidMechanicsHardeningConstant
value = 3E6
[../]
[./tensile]
type = SolidMechanicsPlasticTensileMulti
tensile_strength = ts
yield_function_tolerance = 1
internal_constraint_tolerance = 1.0E-6
#shift = 1
use_custom_returnMap = false
use_custom_cto = false
[../]
[./mc_coh]
type = SolidMechanicsHardeningConstant
value = 5E6
[../]
[./mc_phi]
type = SolidMechanicsHardeningConstant
value = 35
convert_to_radians = true
[../]
[./mc_psi]
type = SolidMechanicsHardeningConstant
value = 10
convert_to_radians = true
[../]
[./mc]
type = SolidMechanicsPlasticMohrCoulombMulti
cohesion = mc_coh
friction_angle = mc_phi
dilation_angle = mc_psi
yield_function_tolerance = 1E-5
internal_constraint_tolerance = 1E-11
use_custom_returnMap = false
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 16E9
poissons_ratio = 0.25
[../]
[./mc]
type = ComputeMultiPlasticityStress
ep_plastic_tolerance = 1E-6
plastic_models = 'tensile mc'
max_NR_iterations = 50
specialIC = rock
deactivation_scheme = safe_to_dumb
debug_fspb = crash
[../]
[./strain_from_initial_stress]
type = ComputeEigenstrainFromInitialStress
initial_stress = '2.5E6 0 0 0 2.5E6 0 0 0 2.5E6'
eigenstrain_name = ini_stress
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
[../]
[]
[Executioner]
start_time = -1
end_time = 10
dt = 1
solve_type = NEWTON
type = Transient
l_tol = 1E-2
nl_abs_tol = 1E-5
nl_rel_tol = 1E-7
l_max_its = 200
nl_max_its = 400
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
[]
[Outputs]
file_base = cmc_planar
perf_graph = true
exodus = false
csv = true
[]
(modules/solid_mechanics/test/tests/notched_plastic_block/biaxial_planar.i)
# Uses non-smoothed Mohr-Coulomb (via ComputeMultiPlasticityStress and SolidMechanicsPlasticMohrCoulombMulti) to simulate the following problem.
# A cubical block is notched around its equator.
# All of its outer surfaces have roller BCs, but the notched region is free to move as needed
# The block is initialised with a high hydrostatic tensile stress
# Without the notch, the BCs do not allow contraction of the block, and this stress configuration is admissible
# With the notch, however, the interior parts of the block are free to move in order to relieve stress, and this causes plastic failure
# The top surface is then pulled upwards (the bottom is fixed because of the roller BCs)
# This causes more failure
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 9
ny = 9
nz = 9
xmin = 0
xmax = 0.1
ymin = 0
ymax = 0.1
zmin = 0
zmax = 0.1
[]
[block_to_remove_xmin]
type = SubdomainBoundingBoxGenerator
bottom_left = '-0.01 -0.01 0.045'
top_right = '0.01 0.11 0.055'
location = INSIDE
block_id = 1
input = generated_mesh
[]
[block_to_remove_xmax]
type = SubdomainBoundingBoxGenerator
bottom_left = '0.09 -0.01 0.045'
top_right = '0.11 0.11 0.055'
location = INSIDE
block_id = 1
input = block_to_remove_xmin
[]
[block_to_remove_ymin]
type = SubdomainBoundingBoxGenerator
bottom_left = '-0.01 -0.01 0.045'
top_right = '0.11 0.01 0.055'
location = INSIDE
block_id = 1
input = block_to_remove_xmax
[]
[block_to_remove_ymax]
type = SubdomainBoundingBoxGenerator
bottom_left = '-0.01 0.09 0.045'
top_right = '0.11 0.11 0.055'
location = INSIDE
block_id = 1
input = block_to_remove_ymin
[]
[remove_block]
type = BlockDeletionGenerator
block = 1
input = block_to_remove_ymax
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
incremental = true
generate_output = 'max_principal_stress mid_principal_stress min_principal_stress stress_zz'
eigenstrain_names = ini_stress
[]
[]
[Postprocessors]
[uz]
type = PointValue
point = '0 0 0.1'
use_displaced_mesh = false
variable = disp_z
[]
[s_zz]
type = ElementAverageValue
use_displaced_mesh = false
variable = stress_zz
[]
[num_res]
type = NumResidualEvaluations
[]
[nr_its]
type = ElementAverageValue
variable = num_iters
[]
[max_nr_its]
type = ElementExtremeValue
variable = num_iters
[]
[runtime]
type = PerfGraphData
data_type = TOTAL
section_name = 'Root'
[]
[]
[BCs]
# back=zmin, front=zmax, bottom=ymin, top=ymax, left=xmin, right=xmax
[xmin_xzero]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[xmax_xzero]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[ymin_yzero]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[ymax_yzero]
type = DirichletBC
variable = disp_y
boundary = top
value = 0.0
[]
[zmin_zzero]
type = DirichletBC
variable = disp_z
boundary = back
value = '0'
[]
[zmax_disp]
type = FunctionDirichletBC
variable = disp_z
boundary = front
function = '1E-6*max(t,0)'
[]
[]
[AuxVariables]
[mc_int]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain]
order = CONSTANT
family = MONOMIAL
[]
[num_iters]
order = CONSTANT
family = MONOMIAL
[]
[yield_fcn]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[mc_int_auxk]
type = MaterialStdVectorAux
index = 0
property = plastic_internal_parameter
variable = mc_int
[]
[plastic_strain_aux]
type = MaterialRankTwoTensorAux
i = 2
j = 2
property = plastic_strain
variable = plastic_strain
[]
[num_iters_auxk] # cannot use plastic_NR_iterations directly as this is zero, since no NR iterations are actually used, since we use a custom algorithm to do the return
type = ParsedAux
coupled_variables = plastic_strain
expression = 'if(plastic_strain>0,1,0)'
variable = num_iters
[]
[yield_fcn_auxk]
type = MaterialStdVectorAux
index = 0
property = plastic_yield_function
variable = yield_fcn
[]
[]
[UserObjects]
[mc_coh]
type = SolidMechanicsHardeningConstant
value = 5E6
[]
[mc_phi]
type = SolidMechanicsHardeningConstant
value = 35
convert_to_radians = true
[]
[mc_psi]
type = SolidMechanicsHardeningConstant
value = 10
convert_to_radians = true
[]
[mc]
type = SolidMechanicsPlasticMohrCoulombMulti
cohesion = mc_coh
friction_angle = mc_phi
dilation_angle = mc_psi
yield_function_tolerance = 1E-5
internal_constraint_tolerance = 1E-11
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 16E9
poissons_ratio = 0.25
[]
[mc]
type = ComputeMultiPlasticityStress
ep_plastic_tolerance = 1E-11
plastic_models = mc
max_NR_iterations = 1000
debug_fspb = crash
[]
[strain_from_initial_stress]
type = ComputeEigenstrainFromInitialStress
initial_stress = '6E6 0 0 0 6E6 0 0 0 6E6'
eigenstrain_name = ini_stress
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
start_time = -1
end_time = 10
dt = 1
dtmin = 1
solve_type = NEWTON
type = Transient
l_tol = 1E-2
nl_abs_tol = 1E-5
nl_rel_tol = 1E-7
l_max_its = 200
nl_max_its = 400
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
[]
[Outputs]
perf_graph = true
csv = true
[]
(test/tests/postprocessors/perf_graph_data/perf_graph.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
ny = 10
nz = 10
[]
[Variables]
[u]
[]
[]
[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]
# Getting this information on INITIAL has no practical use, but
# we want to make sure that we can obtain information about
# a section that has not ran yet.
[self]
type = PerfGraphData
section_name = FEProblem::computeResidualInternal
data_type = CALLS
must_exist = false
execute_on = 'INITIAL TIMESTEP_END'
[]
[children]
type = PerfGraphData
section_name = FEProblem::computeResidualInternal
data_type = CHILDREN
execute_on = 'TIMESTEP_END'
[]
[total]
type = PerfGraphData
section_name = FEProblem::computeResidualInternal
data_type = SELF
execute_on = 'TIMESTEP_END'
[]
[self_avg]
type = PerfGraphData
section_name = FEProblem::computeResidualInternal
data_type = SELF_AVG
execute_on = 'TIMESTEP_END'
[]
[children_avg]
type = PerfGraphData
section_name = FEProblem::computeResidualInternal
data_type = CHILDREN_AVG
execute_on = 'TIMESTEP_END'
[]
[total_avg]
type = PerfGraphData
section_name = FEProblem::computeResidualInternal
data_type = TOTAL_AVG
execute_on = 'TIMESTEP_END'
[]
[self_percent]
type = PerfGraphData
section_name = FEProblem::computeResidualInternal
data_type = SELF_PERCENT
execute_on = 'TIMESTEP_END'
[]
[children_percent]
type = PerfGraphData
section_name = FEProblem::computeResidualInternal
data_type = CHILDREN_PERCENT
execute_on = 'TIMESTEP_END'
[]
[total_percent]
type = PerfGraphData
section_name = FEProblem::computeResidualInternal
data_type = TOTAL_PERCENT
execute_on = 'TIMESTEP_END'
[]
[self_memory]
type = PerfGraphData
section_name = FEProblem::computeResidualInternal
data_type = SELF_MEMORY
execute_on = 'TIMESTEP_END'
[]
[children_memory]
type = PerfGraphData
section_name = FEProblem::computeResidualInternal
data_type = CHILDREN_MEMORY
execute_on = 'TIMESTEP_END'
[]
[total_memory]
type = PerfGraphData
section_name = FEProblem::computeResidualInternal
data_type = TOTAL_MEMORY
execute_on = 'TIMESTEP_END'
[]
[calls]
type = PerfGraphData
section_name = FEProblem::computeResidualInternal
data_type = CALLS
execute_on = 'TIMESTEP_END'
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
csv = true
[]
(modules/phase_field/tutorials/spinodal_decomposition/s5_energycurve.i)
#
# Example simulation of an iron-chromium alloy at 500 C. Equilibrium
# concentrations are at 23.6 and 82.3 mol% Cr. Kappa value, free energy equation,
# and mobility equation were provided by Lars Hoglund. Solved using the split
# form of the Cahn-Hilliard equation.
[Mesh]
type = GeneratedMesh
dim = 2
elem_type = QUAD4
nx = 25
ny = 25
nz = 0
xmin = 0
xmax = 25
ymin = 0
ymax = 25
zmin = 0
zmax = 0
uniform_refine = 2
[]
[Variables]
[./c] # Mole fraction of Cr (unitless)
order = FIRST
family = LAGRANGE
scaling = 1e+04
[../]
[./w] # Chemical potential (eV/mol)
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./f_density] # Local energy density (eV/mol)
order = CONSTANT
family = MONOMIAL
[../]
[]
[ICs]
[./concentrationIC] # 46.774 mol% Cr with variations
type = RandomIC
min = 0.44774
max = 0.48774
seed = 210
variable = c
[../]
[]
[BCs]
[./Periodic]
[./c_bcs]
auto_direction = 'x y'
[../]
[../]
[]
[Kernels]
[./w_dot]
variable = w
v = c
type = CoupledTimeDerivative
[../]
[./coupled_res]
variable = w
type = SplitCHWRes
mob_name = M
[../]
[./coupled_parsed]
variable = c
type = SplitCHParsed
f_name = f_loc
kappa_name = kappa_c
w = w
[../]
[]
[AuxKernels]
# Calculates the energy density by combining the local and gradient energies
[./f_density] # (eV/mol/nm^2)
type = TotalFreeEnergy
variable = f_density
f_name = 'f_loc'
kappa_names = 'kappa_c'
interfacial_vars = c
[../]
[]
[Materials]
# d is a scaling factor that makes it easier for the solution to converge
# without changing the results. It is defined in each of the first three
# materials and must have the same value in each one.
[./kappa] # Gradient energy coefficient (eV nm^2/mol)
type = GenericFunctionMaterial
prop_names = 'kappa_c'
prop_values = '8.125e-16*6.24150934e+18*1e+09^2*1e-27'
# kappa_c *eV_J*nm_m^2* d
[../]
[./mobility] # Mobility (nm^2 mol/eV/s)
# NOTE: This is a fitted equation, so only 'Conv' has units
type = DerivativeParsedMaterial
property_name = M
coupled_variables = c
constant_names = 'Acr Bcr Ccr Dcr
Ecr Fcr Gcr
Afe Bfe Cfe Dfe
Efe Ffe Gfe
nm_m eV_J d'
constant_expressions = '-32.770969 -25.8186669 -3.29612744 17.669757
37.6197853 20.6941796 10.8095813
-31.687117 -26.0291774 0.2286581 24.3633544
44.3334237 8.72990497 20.956768
1e+09 6.24150934e+18 1e-27'
expression = 'nm_m^2/eV_J/d*((1-c)^2*c*10^
(Acr*c+Bcr*(1-c)+Ccr*c*log(c)+Dcr*(1-c)*log(1-c)+
Ecr*c*(1-c)+Fcr*c*(1-c)*(2*c-1)+Gcr*c*(1-c)*(2*c-1)^2)
+c^2*(1-c)*10^
(Afe*c+Bfe*(1-c)+Cfe*c*log(c)+Dfe*(1-c)*log(1-c)+
Efe*c*(1-c)+Ffe*c*(1-c)*(2*c-1)+Gfe*c*(1-c)*(2*c-1)^2))'
derivative_order = 1
outputs = exodus
[../]
[./local_energy] # Local free energy function (eV/mol)
type = DerivativeParsedMaterial
property_name = f_loc
coupled_variables = c
constant_names = 'A B C D E F G eV_J d'
constant_expressions = '-2.446831e+04 -2.827533e+04 4.167994e+03 7.052907e+03
1.208993e+04 2.568625e+03 -2.354293e+03
6.24150934e+18 1e-27'
expression = 'eV_J*d*(A*c+B*(1-c)+C*c*log(c)+D*(1-c)*log(1-c)+
E*c*(1-c)+F*c*(1-c)*(2*c-1)+G*c*(1-c)*(2*c-1)^2)'
derivative_order = 2
[../]
[./precipitate_indicator] # Returns 1/625 if precipitate
type = ParsedMaterial
property_name = prec_indic
coupled_variables = c
expression = if(c>0.6,0.0016,0)
[../]
[]
[Postprocessors]
[./step_size] # Size of the time step
type = TimestepSize
[../]
[./iterations] # Number of iterations needed to converge timestep
type = NumNonlinearIterations
[../]
[./nodes] # Number of nodes in mesh
type = NumNodes
[../]
[./evaluations] # Cumulative residual calculations for simulation
type = NumResidualEvaluations
[../]
[./total_energy] # Total free energy at each timestep
type = ElementIntegralVariablePostprocessor
variable = f_density
execute_on = 'initial timestep_end'
[../]
[./num_features] # Number of precipitates formed
type = FeatureFloodCount
variable = c
threshold = 0.6
[../]
[./precipitate_area] # Fraction of surface devoted to precipitates
type = ElementIntegralMaterialProperty
mat_prop = prec_indic
[../]
[./active_time] # Time computer spent on simulation
type = PerfGraphData
section_name = "Root"
data_type = total
[../]
[]
[Preconditioning]
[./coupled]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
l_max_its = 30
l_tol = 1e-6
nl_max_its = 50
nl_abs_tol = 1e-9
end_time = 604800 # 7 days
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type
-sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly
ilu 1'
[./TimeStepper]
type = IterationAdaptiveDT
dt = 10
cutback_factor = 0.8
growth_factor = 1.5
optimal_iterations = 7
[../]
[./Adaptivity]
coarsen_fraction = 0.1
refine_fraction = 0.7
max_h_level = 2
[../]
[]
[Outputs]
exodus = true
console = true
csv = true
[./console]
type = Console
max_rows = 10
[../]
[]
(test/tests/postprocessors/print_perf_data/use_log_data_no_print.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.1
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Postprocessors]
[./elapsed]
type = PerfGraphData
section_name = "Root"
data_type = total
[../]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
(modules/phase_field/tutorials/spinodal_decomposition/s2_fasttest.i)
#
# Simulation of an iron-chromium alloy using simple code and a test set of
# initial conditions.
#
[Mesh]
# generate a 2D, 25nm x 25nm mesh
type = GeneratedMesh
dim = 2
elem_type = QUAD4
nx = 100
ny = 100
nz = 0
xmin = 0
xmax = 25
ymin = 0
ymax = 25
zmin = 0
zmax = 0
[]
[Variables]
[./c] # Mole fraction of Cr (unitless)
order = FIRST
family = LAGRANGE
[../]
[./w] # Chemical potential (eV/mol)
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
# Use a bounding box IC at equilibrium concentrations to make sure the
# model behaves as expected.
[./testIC]
type = BoundingBoxIC
variable = c
x1 = 5
x2 = 20
y1 = 5
y2 = 20
inside = 0.823
outside = 0.236
[../]
[]
[BCs]
# periodic BC as is usually done on phase-field models
[./Periodic]
[./c_bcs]
auto_direction = 'x y'
[../]
[../]
[]
[Kernels]
# See wiki page "Developing Phase Field Models" for more information on Split
# Cahn-Hilliard equation kernels.
# http://mooseframework.org/wiki/PhysicsModules/PhaseField/DevelopingModels/
[./w_dot]
variable = w
v = c
type = CoupledTimeDerivative
[../]
[./coupled_res]
variable = w
type = SplitCHWRes
mob_name = M
[../]
[./coupled_parsed]
variable = c
type = SplitCHParsed
f_name = f_loc
kappa_name = kappa_c
w = w
[../]
[]
[Materials]
# d is a scaling factor that makes it easier for the solution to converge
# without changing the results. It is defined in each of the materials and
# must have the same value in each one.
[./constants]
# Define constant values kappa_c and M. Eventually M will be replaced with
# an equation rather than a constant.
type = GenericFunctionMaterial
prop_names = 'kappa_c M'
prop_values = '8.125e-16*6.24150934e+18*1e+09^2*1e-27
2.2841e-26*1e+09^2/6.24150934e+18/1e-27'
# kappa_c*eV_J*nm_m^2*d
# M*nm_m^2/eV_J/d
[../]
[./local_energy]
# Defines the function for the local free energy density as given in the
# problem, then converts units and adds scaling factor.
type = DerivativeParsedMaterial
property_name = f_loc
coupled_variables = c
constant_names = 'A B C D E F G eV_J d'
constant_expressions = '-2.446831e+04 -2.827533e+04 4.167994e+03 7.052907e+03
1.208993e+04 2.568625e+03 -2.354293e+03
6.24150934e+18 1e-27'
expression = 'eV_J*d*(A*c+B*(1-c)+C*c*log(c)+D*(1-c)*log(1-c)+
E*c*(1-c)+F*c*(1-c)*(2*c-1)+G*c*(1-c)*(2*c-1)^2)'
derivative_order = 2
[../]
[]
[Postprocessors]
[./evaluations] # Cumulative residual calculations for simulation
type = NumResidualEvaluations
[../]
[./elapsed]
type = PerfGraphData
section_name = "Root"
data_type = total
[../]
[]
[Preconditioning]
# Preconditioning is required for Newton's method. See wiki page "Solving
# Phase Field Models" for more information.
# http://mooseframework.org/wiki/PhysicsModules/PhaseField/SolvingModels/
[./coupled]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
l_max_its = 30
l_tol = 1e-6
nl_max_its = 50
nl_abs_tol = 1e-9
end_time = 86400 # 1 day. We only need to run this long enough to verify
# the model is working properly.
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type
-sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly
ilu 1'
[./TimeStepper]
# Turn on time stepping
type = IterationAdaptiveDT
dt = 10
cutback_factor = 0.8
growth_factor = 1.5
optimal_iterations = 7
[../]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
console = true
csv = true
[./console]
type = Console
max_rows = 10
[../]
[]
(modules/solid_mechanics/test/tests/notched_plastic_block/biaxial_abbo.i)
# Uses an Abbo et al smoothed version of Mohr-Coulomb (via SolidMechanicsPlasticMohrCoulomb and ComputeMultiPlasticityStress) to simulate the following problem.
# A cubical block is notched around its equator.
# All of its outer surfaces have roller BCs, but the notched region is free to move as needed
# The block is initialised with a high hydrostatic tensile stress
# Without the notch, the BCs do not allow contraction of the block, and this stress configuration is admissible
# With the notch, however, the interior parts of the block are free to move in order to relieve stress, and this causes plastic failure
# The top surface is then pulled upwards (the bottom is fixed because of the roller BCs)
# This causes more failure
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 9
ny = 9
nz = 9
xmin = 0
xmax = 0.1
ymin = 0
ymax = 0.1
zmin = 0
zmax = 0.1
[]
[block_to_remove_xmin]
type = SubdomainBoundingBoxGenerator
bottom_left = '-0.01 -0.01 0.045'
top_right = '0.01 0.11 0.055'
location = INSIDE
block_id = 1
input = generated_mesh
[]
[block_to_remove_xmax]
type = SubdomainBoundingBoxGenerator
bottom_left = '0.09 -0.01 0.045'
top_right = '0.11 0.11 0.055'
location = INSIDE
block_id = 1
input = block_to_remove_xmin
[]
[block_to_remove_ymin]
type = SubdomainBoundingBoxGenerator
bottom_left = '-0.01 -0.01 0.045'
top_right = '0.11 0.01 0.055'
location = INSIDE
block_id = 1
input = block_to_remove_xmax
[]
[block_to_remove_ymax]
type = SubdomainBoundingBoxGenerator
bottom_left = '-0.01 0.09 0.045'
top_right = '0.11 0.11 0.055'
location = INSIDE
block_id = 1
input = block_to_remove_ymin
[]
[remove_block]
type = BlockDeletionGenerator
block = 1
input = block_to_remove_ymax
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
add_variables = true
incremental = true
generate_output = 'max_principal_stress mid_principal_stress min_principal_stress stress_zz'
eigenstrain_names = ini_stress
[../]
[]
[Postprocessors]
[./uz]
type = PointValue
point = '0 0 0.1'
use_displaced_mesh = false
variable = disp_z
[../]
[./s_zz]
type = ElementAverageValue
use_displaced_mesh = false
variable = stress_zz
[../]
[./num_res]
type = NumResidualEvaluations
[../]
[./nr_its] # num_iters is the average number of NR iterations encountered per element in this timestep
type = ElementAverageValue
variable = num_iters
[../]
[./max_nr_its] # num_iters is the average number of NR iterations encountered in the element in this timestep, so we must get max(max_nr_its) to obtain the max number of iterations
type = ElementExtremeValue
variable = num_iters
[../]
[./runtime]
type = PerfGraphData
data_type = TOTAL
section_name = 'Root'
[../]
[]
[BCs]
# back=zmin, front=zmax, bottom=ymin, top=ymax, left=xmin, right=xmax
[./xmin_xzero]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./xmax_xzero]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[../]
[./ymin_yzero]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./ymax_yzero]
type = DirichletBC
variable = disp_y
boundary = top
value = 0.0
[../]
[./zmin_zzero]
type = DirichletBC
variable = disp_z
boundary = back
value = '0'
[../]
[./zmax_disp]
type = FunctionDirichletBC
variable = disp_z
boundary = front
function = '1E-6*max(t,0)'
[../]
[]
[AuxVariables]
[./mc_int]
order = CONSTANT
family = MONOMIAL
[../]
[./num_iters]
order = CONSTANT
family = MONOMIAL
[../]
[./yield_fcn]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./mc_int_auxk]
type = MaterialStdVectorAux
index = 0
property = plastic_internal_parameter
variable = mc_int
[../]
[./num_iters_auxk]
type = MaterialRealAux
property = plastic_NR_iterations
variable = num_iters
[../]
[./yield_fcn_auxk]
type = MaterialStdVectorAux
index = 0
property = plastic_yield_function
variable = yield_fcn
[../]
[]
[UserObjects]
[./mc_coh]
type = SolidMechanicsHardeningConstant
value = 5E6
[../]
[./mc_phi]
type = SolidMechanicsHardeningConstant
value = 35
convert_to_radians = true
[../]
[./mc_psi]
type = SolidMechanicsHardeningConstant
value = 10
convert_to_radians = true
[../]
[./mc]
type = SolidMechanicsPlasticMohrCoulomb
cohesion = mc_coh
friction_angle = mc_phi
dilation_angle = mc_psi
mc_tip_smoother = 0.02E6
mc_edge_smoother = 29
yield_function_tolerance = 1E-5
internal_constraint_tolerance = 1E-11
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 16E9
poissons_ratio = 0.25
[../]
[./mc]
type = ComputeMultiPlasticityStress
ep_plastic_tolerance = 1E-11
plastic_models = mc
max_NR_iterations = 1000
debug_fspb = crash
[../]
[./strain_from_initial_stress]
type = ComputeEigenstrainFromInitialStress
initial_stress = '6E6 0 0 0 6E6 0 0 0 6E6'
eigenstrain_name = ini_stress
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
[../]
[]
[Executioner]
start_time = -1
end_time = 10
dt = 1
solve_type = NEWTON
type = Transient
l_tol = 1E-2
nl_abs_tol = 1E-5
nl_rel_tol = 1E-7
l_max_its = 200
nl_max_its = 400
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
[]
[Outputs]
file_base = biaxial_abbo
perf_graph = true
exodus = false
csv = true
[]
(modules/combined/examples/phase_field-mechanics/poly_grain_growth_2D_eldrforce.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
nz = 0
xmax = 1000
ymax = 1000
zmax = 0
elem_type = QUAD4
uniform_refine = 2
[]
[GlobalParams]
op_num = 8
var_name_base = gr
grain_num = 36
[]
[Variables]
[./PolycrystalVariables]
[../]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[]
[UserObjects]
[./euler_angle_file]
type = EulerAngleFileReader
file_name = grn_36_rand_2D.tex
[../]
[./voronoi]
type = PolycrystalVoronoi
coloring_algorithm = bt
[../]
[./grain_tracker]
type = GrainTrackerElasticity
threshold = 0.2
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
flood_entity_type = ELEMENTAL
C_ijkl = '1.27e5 0.708e5 0.708e5 1.27e5 0.708e5 1.27e5 0.7355e5 0.7355e5 0.7355e5'
fill_method = symmetric9
euler_angle_provider = euler_angle_file
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[./elastic_strain11]
order = CONSTANT
family = MONOMIAL
[../]
[./elastic_strain22]
order = CONSTANT
family = MONOMIAL
[../]
[./elastic_strain12]
order = CONSTANT
family = MONOMIAL
[../]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./var_indices]
order = CONSTANT
family = MONOMIAL
[../]
[./vonmises_stress]
order = CONSTANT
family = MONOMIAL
[../]
[./C1111]
order = CONSTANT
family = MONOMIAL
[../]
[./euler_angle]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[./PolycrystalElasticDrivingForce]
[../]
[./TensorMechanics]
use_displaced_mesh = true
displacements = 'disp_x disp_y'
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[../]
[./elastic_strain11]
type = RankTwoAux
variable = elastic_strain11
rank_two_tensor = elastic_strain
index_i = 0
index_j = 0
execute_on = timestep_end
[../]
[./elastic_strain22]
type = RankTwoAux
variable = elastic_strain22
rank_two_tensor = elastic_strain
index_i = 1
index_j = 1
execute_on = timestep_end
[../]
[./elastic_strain12]
type = RankTwoAux
variable = elastic_strain12
rank_two_tensor = elastic_strain
index_i = 0
index_j = 1
execute_on = timestep_end
[../]
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
execute_on = timestep_end
flood_counter = grain_tracker
field_display = UNIQUE_REGION
[../]
[./var_indices]
type = FeatureFloodCountAux
variable = var_indices
execute_on = timestep_end
flood_counter = grain_tracker
field_display = VARIABLE_COLORING
[../]
[./C1111]
type = RankFourAux
variable = C1111
rank_four_tensor = elasticity_tensor
index_l = 0
index_j = 0
index_k = 0
index_i = 0
execute_on = timestep_end
[../]
[./vonmises_stress]
type = RankTwoScalarAux
variable = vonmises_stress
rank_two_tensor = stress
scalar_type = VonMisesStress
execute_on = timestep_end
[../]
[./euler_angle]
type = OutputEulerAngles
variable = euler_angle
euler_angle_provider = euler_angle_file
grain_tracker = grain_tracker
output_euler_angle = 'phi1'
execute_on = 'initial timestep_end'
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x'
variable = 'gr0 gr1 gr2 gr3 gr4 gr5 gr6 gr7'
[../]
[../]
[./top_displacement]
type = DirichletBC
variable = disp_y
boundary = top
value = -50.0
[../]
[./x_anchor]
type = DirichletBC
variable = disp_x
boundary = 'left right'
value = 0.0
[../]
[./y_anchor]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
block = 0
T = 500 # K
wGB = 15 # nm
GBmob0 = 2.5e-6 # m^4/(Js) from Schoenfelder 1997
Q = 0.23 # Migration energy in eV
GBenergy = 0.708 # GB energy in J/m^2
[../]
[./ElasticityTensor]
type = ComputePolycrystalElasticityTensor
grain_tracker = grain_tracker
[../]
[./strain]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y'
[../]
[./stress]
type = ComputeLinearElasticStress
block = 0
[../]
[]
[Postprocessors]
[./ngrains]
type = FeatureFloodCount
variable = bnds
threshold = 0.7
[../]
[./dofs]
type = NumDOFs
[../]
[./dt]
type = TimestepSize
[../]
[./run_time]
type = PerfGraphData
section_name = "Root"
data_type = total
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
coupled_groups = 'disp_x,disp_y'
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart -pc_hypre_boomeramg_strong_threshold'
petsc_options_value = 'hypre boomeramg 31 0.7'
l_tol = 1.0e-4
l_max_its = 30
nl_max_its = 25
nl_rel_tol = 1.0e-7
start_time = 0.0
num_steps = 50
[./TimeStepper]
type = IterationAdaptiveDT
dt = 1.5
growth_factor = 1.2
cutback_factor = 0.8
optimal_iterations = 8
[../]
[./Adaptivity]
initial_adaptivity = 2
refine_fraction = 0.8
coarsen_fraction = 0.05
max_h_level = 3
[../]
[]
[Outputs]
file_base = poly36_grtracker
exodus = true
[]
(test/tests/outputs/output_on/postprocessors.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.1
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Postprocessors]
[./sum]
type = PerfGraphData
section_name = "Root"
data_type = total
execute_on = 'initial nonlinear timestep_end'
[../]
[]
[Executioner]
type = Transient
num_steps = 2
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = false
[./console]
type = Console
execute_postprocessors_on = 'initial nonlinear timestep_end'
[../]
[]