- postprocessorThe name of the postprocessor
C++ Type:PostprocessorName
Controllable:No
Description:The name of the postprocessor
CumulativeValuePostprocessor
Creates a cumulative sum of a Postprocessor value with time.
The running sum does not take into account tallies from failed time steps. The CumulativeValuePostprocessor
may be executed multiple times per time step using the execute_on
parameter.
For time integration of postprocessors, use the TimeIntegratedPostprocessor.
Example input syntax
In this example, we tally the total number of nonlinear iterations over the time steps of the transient problem using a CumulativeValuePostprocessor
.
[Postprocessors]
[nonlin_it]
type = NumNonlinearIterations
[]
[cumulative_nonlin_it]
type = CumulativeValuePostprocessor
postprocessor = nonlin_it
[]
[]
(test/tests/postprocessors/cumulative_value_postprocessor/cumulative_value_postprocessor.i)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.
- 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/contact/test/tests/pdass_problems/cylinder_friction_penalty_frictional_al_action.i)
- (modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_normal_al_backup.i)
- (modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_normal_al_test_nochange.i)
- (modules/contact/test/tests/pdass_problems/ironing_penalty_al.i)
- (modules/contact/test/tests/bouncing-block-contact/frictionless-penalty-weighted-gap-action.i)
- (modules/contact/test/tests/mortar_tm/2d/ad_frictionless_fir/small.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven_stabilized_action.i)
- (modules/contact/test/tests/bouncing-block-contact/frictionless-nodal-reduced-active-set.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/straight_channel_porosity_step/dc.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/cylindrical/no-slip-tris.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/finite_action.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_stabilized.i)
- (test/tests/geomsearch/patch_update_strategy/always-grid-sequence.i)
- (modules/contact/test/tests/mortar_cartesian_lms/two_block_1st_order_constraint_lm_xy_friction.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/finite.i)
- (modules/contact/test/tests/fieldsplit/frictionless_mortar_FS.i)
- (modules/contact/test/tests/mortar_tm/2d/ad_frictional/finite_rr.i)
- (modules/contact/test/tests/bouncing-block-contact/frictionless-penalty-weighted-gap.i)
- (modules/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-fretting-wear-test-projection_angle.i)
- (modules/contact/test/tests/mortar_tm/2d/frictionless_first/small.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/cylindrical/no-slip-tris-action.i)
- (modules/contact/test/tests/mortar_tm/2d/frictionless_second/finite_rr.i)
- (modules/solid_mechanics/test/tests/rom_stress_update/AD_finite_strain_power_law_creep.i)
- (modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_frictional_al.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/small-2d/small.i)
- (modules/contact/test/tests/mortar_tm/2drz/frictionless_first/small.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d-rz/finite_action.i)
- (modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_adaptivity.i)
- (modules/contact/test/tests/mortar_restart/frictional_bouncing_block_action_restart_2.i)
- (modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_frictional_al_action_amg.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/2d-rc-no-slip.i)
- (modules/combined/test/tests/nodal_patch_recovery/npr_with_lower_domains.i)
- (modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_frictional_al_action_amg_bussetta_simple.i)
- (modules/contact/test/tests/3d-mortar-contact/frictionless-mortar-3d-action.i)
- (modules/contact/test/tests/bouncing-block-contact/frictional-penalty-weighted-vel.i)
- (modules/contact/test/tests/mortar_tm/2d/frictionless_second/small.i)
- (modules/contact/test/tests/mortar_tm/2d/ad_frictionless_sec/small.i)
- (modules/porous_flow/examples/ates/ates.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/cylindrical/diverging.i)
- (modules/solid_mechanics/test/tests/rom_stress_update/REG_finite_strain_laromance.i)
- (modules/contact/test/tests/tan-pen-and-scaling/bouncing-block-tan-pen.i)
- (modules/contact/test/tests/mortar_cartesian_lms/two_block_1st_order_constraint_lm_xy_friction_pg.i)
- (modules/contact/test/tests/mortar_tm/2drz/ad_frictionless_second/finite_rr.i)
- (modules/contact/test/tests/mortar_tm/2drz/ad_frictionless_first/small.i)
- (modules/contact/test/tests/3d-mortar-contact/frictionless-mortar-3d.i)
- (modules/navier_stokes/test/tests/finite_volume/two_phase/mixture_model/channel-advection-slip.i)
- (modules/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-wear-vel.i)
- (modules/contact/test/tests/mortar_tm/2drz/ad_frictionless_second/finite.i)
- (test/tests/postprocessors/cumulative_value_postprocessor/cumulative_value_postprocessor.i)
- (modules/contact/test/tests/mortar_tm/2drz/ad_frictionless_first/finite_rr.i)
- (modules/contact/test/tests/mortar_tm/2d/ad_frictional/finite.i)
- (modules/contact/test/tests/multiple_contact_pairs/multiple_pairs.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven_stabilized.i)
- (modules/contact/test/tests/bouncing-block-contact/frictional-mortar-min-lm-mortar-disp.i)
- (modules/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-vel.i)
- (modules/contact/test/tests/bouncing-block-contact/frictional-nodal-min-normal-lm-mortar-pdass-tangential-lm-mortar-action.i)
- (modules/solid_mechanics/test/tests/rom_stress_update/REG_finite_strain_power_law_creep.i)
- (modules/contact/test/tests/mortar_tm/2d/ad_frictionless_fir/finite.i)
- (modules/contact/test/tests/ranfs-and-scaling/bouncing-block-ranfs.i)
- (modules/contact/test/tests/mortar_tm/2d/frictionless_first/finite_rr.i)
- (modules/solid_mechanics/test/tests/rom_stress_update/3tile_strain.i)
- (modules/contact/test/tests/3d-mortar-contact/frictional-mortar-3d-action.i)
- (modules/contact/test/tests/mortar_tm/2drz/ad_frictionless_second/small.i)
- (test/tests/multiapps/grid-sequencing/vi-coarse.i)
- (modules/contact/test/tests/mortar_dynamics/block-dynamics-reference.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/finite_action_rr.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_stabilized_action.i)
- (test/tests/multiapps/grid-sequencing/vi-fine-alone.i)
- (modules/contact/test/tests/mortar_tm/2drz/frictionless_second/finite.i)
- (modules/contact/test/tests/mortar_tm/2d/frictionless_second/finite.i)
- (modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_frictional_al_action_amg_tight.i)
- (test/tests/nodalkernels/constraint_enforcement/upper-and-lower-bound.i)
- (modules/contact/test/tests/sliding_block/in_and_out/frictionless_penalty_contact_line_search.i)
- (modules/contact/test/tests/mortar_cartesian_lms/frictionless-mortar-3d-friction.i)
- (modules/navier_stokes/examples/laser-welding/2d.i)
- (modules/contact/test/tests/mortar_dynamics/block-dynamics-action.i)
- (modules/contact/test/tests/multiple_contact_pairs/multiple_pairs_mortar.i)
- (modules/contact/test/tests/mortar_tm/2drz/frictionless_first/finite.i)
- (modules/contact/test/tests/bouncing-block-contact/frictionless-weighted-gap.i)
- (modules/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-fretting-wear-test-action.i)
- (modules/navier_stokes/examples/laser-welding/3d.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d-rz/finite_action_al.i)
- (test/tests/multiapps/grid-sequencing/vi-fine.i)
- (modules/contact/test/tests/mortar_cartesian_lms/frictionless-mortar-3d.i)
- (modules/navier_stokes/test/tests/finite_volume/two_phase/mixture_model/channel-drift-flux.i)
- (modules/contact/test/tests/kinematic-and-scaling/bouncing-block-kinematic.i)
- (modules/contact/test/tests/mortar_dynamics/block-dynamics.i)
- (modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_frictional_al_tight_slip.i)
- (modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_normal_al.i)
- (modules/contact/test/tests/bouncing-block-contact/grid-sequencing/grid-sequencing.i)
- (modules/contact/test/tests/mortar_cartesian_lms/two_block_1st_order_constraint_lm_xy.i)
- (modules/contact/test/tests/bouncing-block-contact/frictionless-weighted-gap-mixed-basis.i)
- (modules/contact/test/tests/mortar_tm/2d/ad_frictionless_fir/finite_rr.i)
- (modules/contact/test/tests/mortar_tm/2d/ad_frictionless_sec/finite.i)
- (modules/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-wear.i)
- (modules/solid_mechanics/test/tests/rom_stress_update/AD_finite_strain_laromance.i)
- (modules/contact/test/tests/mortar_tm/2drz/ad_frictionless_first/finite.i)
- (modules/contact/test/tests/mortar_tm/2drz/frictionless_second/small.i)
- (modules/contact/test/tests/bouncing-block-contact/tied-nodes.i)
- (modules/contact/test/tests/mortar_tm/2drz/frictionless_second/finite_rr.i)
- (modules/contact/test/tests/mortar_cartesian_lms/frictionless-weighted-gap-lm.i)
- (modules/contact/test/tests/bouncing-block-contact/bouncing-block-ranfs.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/finite_rr.i)
- (modules/contact/test/tests/mortar_tm/2d/frictionless_first/finite.i)
- (test/tests/nodalkernels/constraint_enforcement/ad-upper-and-lower-bound.i)
- (modules/contact/test/tests/mortar_restart/frictional_bouncing_block_action_restart_1.i)
- (modules/contact/test/tests/mortar_cartesian_lms/two_block_1st_order_constraint_lm_xy_friction_vcp.i)
- (modules/contact/test/tests/pdass_problems/frictional_bouncing_block.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/small-2d-rz/small.i)
- (modules/contact/test/tests/mortar_tm/2d/ad_frictional/finite_stiff.i)
- (test/tests/nodalkernels/constraint_enforcement/vi-bounding.i)
- (modules/contact/test/tests/pdass_problems/frictional_bouncing_block_action.i)
- (test/tests/multiapps/grid-sequencing/vi-coarser.i)
- (modules/contact/test/tests/multiple_contact_pairs/multiple_pairs_mortar_friction.i)
- (modules/contact/test/tests/mortar_tm/2drz/frictionless_first/finite_rr.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d-rz/finite.i)
- (modules/contact/test/tests/mortar_tm/2d/ad_frictionless_sec/finite_rr.i)
- (modules/contact/test/tests/3d-mortar-contact/frictionless-mortar-3d-test-derivative-trimming.i)
- (modules/contact/test/tests/mortar_dynamics/block-dynamics-friction-creep.i)
(test/tests/postprocessors/cumulative_value_postprocessor/cumulative_value_postprocessor.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
coord_type = RZ
rz_coord_axis = X
[]
[Variables]
[u]
[]
[]
[Kernels]
[time_derivative]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
scheme = implicit-euler
[TimeStepper]
type = ConstantDT
dt = 0.01
[]
start_time = 0.0
num_steps = 2
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Postprocessors]
[nonlin_it]
type = NumNonlinearIterations
[]
[cumulative_nonlin_it]
type = CumulativeValuePostprocessor
postprocessor = nonlin_it
[]
[]
[Outputs]
csv = true
[]
(modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_frictional_al_action.i)
[GlobalParams]
volumetric_locking_correction = true
displacements = 'disp_x disp_y'
[]
[Mesh]
[input_file]
type = FileMeshGenerator
file = hertz_cyl_finer.e
[]
allow_renumbering = false
[]
[Problem]
type = AugmentedLagrangianContactFEProblem
extra_tag_vectors = 'ref'
[]
[AuxVariables]
[penalty_normal_pressure]
[]
[penalty_frictional_pressure]
[]
[accumulated_slip_one]
[]
[tangential_vel_one]
[]
[normal_gap]
[]
[normal_lm]
[]
[saved_x]
[]
[saved_y]
[]
[active]
[]
[]
[Functions]
[disp_ramp_vert]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. -0.020 -0.020'
[]
[disp_ramp_horz]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. 0.0 0.015'
[]
[]
[Modules/TensorMechanics/Master/all]
strain = FINITE
add_variables = true
save_in = 'saved_x saved_y'
extra_vector_tags = 'ref'
block = '1 2 3 4 5 6 7'
generate_output = 'stress_xx stress_yy stress_xy'
[]
[AuxKernels]
[penalty_normal_pressure]
type = PenaltyMortarUserObjectAux
variable = penalty_normal_pressure
user_object = penalty_friction_object_al_friction
contact_quantity = normal_pressure
boundary = 3
[]
[penalty_frictional_pressure]
type = PenaltyMortarUserObjectAux
variable = penalty_frictional_pressure
user_object = penalty_friction_object_al_friction
contact_quantity = tangential_pressure_one
boundary = 3
[]
[penalty_tangential_vel_one]
type = PenaltyMortarUserObjectAux
variable = tangential_vel_one
user_object = penalty_friction_object_al_friction
contact_quantity = tangential_velocity_one
boundary = 3
[]
[penalty_accumulated_slip_one]
type = PenaltyMortarUserObjectAux
variable = accumulated_slip_one
user_object = penalty_friction_object_al_friction
contact_quantity = accumulated_slip_one
boundary = 3
[]
[normal_lm]
type = PenaltyMortarUserObjectAux
variable = normal_lm
user_object = penalty_friction_object_al_friction
contact_quantity = normal_lm
boundary = 3
[]
[normal_gap]
type = PenaltyMortarUserObjectAux
variable = normal_gap
user_object = penalty_friction_object_al_friction
contact_quantity = normal_gap
boundary = 3
[]
[]
[Postprocessors]
[bot_react_x]
type = NodalSum
variable = saved_x
boundary = 1
[]
[bot_react_y]
type = NodalSum
variable = saved_y
boundary = 1
[]
[top_react_x]
type = NodalSum
variable = saved_x
boundary = 4
[]
[top_react_y]
type = NodalSum
variable = saved_y
boundary = 4
[]
[_dt]
type = TimestepSize
[]
[num_lin_it]
type = NumLinearIterations
[]
[num_nonlin_it]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nonlin_it
[]
[gap]
type = SideExtremeValue
value_type = min
variable = normal_gap
boundary = 3
[]
[num_al]
type = NumAugmentedLagrangeIterations
[]
[active_set_size]
type = NodalSum
variable = active
[]
[]
[BCs]
[side_x]
type = DirichletBC
variable = disp_y
boundary = '1 2'
value = 0.0
[]
[bot_y]
type = DirichletBC
variable = disp_x
boundary = '1 2'
value = 0.0
[]
[top_y_disp]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = disp_ramp_vert
[]
[top_x_disp]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = disp_ramp_horz
[]
[]
[Materials]
[stuff1_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.0
[]
[stuff1_stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[stuff2_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '2 3 4 5 6 7'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stuff2_stress]
type = ComputeFiniteStrainElasticStress
block = '2 3 4 5 6 7'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = -pc_type
petsc_options_value = lu
line_search = 'basic'
nl_abs_tol = 1e-10
nl_rel_tol = 1e-8
nl_max_its = 50
l_tol = 1e-05
l_abs_tol = 1e-13
start_time = 0.0
end_time = 0.2 # 3.5
dt = 0.1
dtmin = 0.1
[Predictor]
type = SimplePredictor
scale = 1.0
[]
automatic_scaling = true
compute_scaling_once = false
off_diagonals_in_auto_scaling = true
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[surface]
type = NodalValueSampler
use_displaced_mesh = false
variable = 'disp_x disp_y penalty_normal_pressure penalty_frictional_pressure normal_gap'
boundary = '3'
sort_by = id
[]
[]
[Outputs]
print_linear_residuals = true
perf_graph = true
exodus = true
csv = false
[vectorpp_output]
type = CSV
create_final_symlink = true
execute_on = 'INITIAL TIMESTEP_END FINAL'
[]
[]
[Contact]
[al_friction]
formulation = mortar_penalty
model = coulomb
primary = '2'
secondary = '3'
penalty = 1e5
penalty_friction = 1e8
friction_coefficient = 0.4
al_penetration_tolerance = 1e-7
al_incremental_slip_tolerance = 1.0 # Not active
penalty_multiplier = 100
penalty_multiplier_friction = 1
[]
[]
(modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_normal_al_backup.i)
[GlobalParams]
volumetric_locking_correction = true
displacements = 'disp_x disp_y'
[]
[Mesh]
[input_file]
type = FileMeshGenerator
file = hertz_cyl_finer.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10001
new_block_name = 'secondary_lower'
sidesets = '3'
input = input_file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10000
sidesets = '2'
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Problem]
type = AugmentedLagrangianContactFEProblem
extra_tag_vectors = 'ref'
maximum_lagrangian_update_iterations = 1000
[]
[AuxVariables]
[penalty_normal_pressure]
[]
[penalty_frictional_pressure]
[]
[accumulated_slip_one]
[]
[tangential_vel_one]
[]
[normal_gap]
[]
[normal_lm]
[]
[saved_x]
[]
[saved_y]
[]
[active]
[]
[]
[Functions]
[disp_ramp_vert]
type = PiecewiseLinear
x = '0. 0.1 0.2'
y = '0. -0.020 0.0'
[]
[disp_ramp_horz]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. 0.0 0.015'
[]
[]
[Modules/TensorMechanics/Master/all]
strain = FINITE
add_variables = true
save_in = 'saved_x saved_y'
extra_vector_tags = 'ref'
block = '1 2 3 4 5 6 7'
generate_output = 'stress_xx stress_yy stress_xy'
[]
[AuxKernels]
[penalty_normal_pressure]
type = PenaltyMortarUserObjectAux
variable = penalty_normal_pressure
user_object = friction_uo
contact_quantity = normal_pressure
boundary = 3
[]
[normal_lm]
type = PenaltyMortarUserObjectAux
variable = normal_lm
user_object = friction_uo
contact_quantity = normal_lm
boundary = 3
[]
[normal_gap]
type = PenaltyMortarUserObjectAux
variable = normal_gap
user_object = friction_uo
contact_quantity = normal_gap
boundary = 3
[]
[]
[Postprocessors]
[bot_react_x]
type = NodalSum
variable = saved_x
boundary = 1
[]
[bot_react_y]
type = NodalSum
variable = saved_y
boundary = 1
[]
[top_react_x]
type = NodalSum
variable = saved_x
boundary = 4
[]
[top_react_y]
type = NodalSum
variable = saved_y
boundary = 4
[]
[_dt]
type = TimestepSize
[]
[num_lin_it]
type = NumLinearIterations
[]
[num_nonlin_it]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nonlin_it
[]
[gap]
type = SideExtremeValue
value_type = min
variable = normal_gap
boundary = 3
[]
[num_al]
type = NumAugmentedLagrangeIterations
[]
[active_set_size]
type = NodalSum
variable = active
[]
[]
[BCs]
[side_x]
type = DirichletBC
variable = disp_y
boundary = '1 2'
value = 0.0
[]
[bot_y]
type = DirichletBC
variable = disp_x
boundary = '1 2'
value = 0.0
[]
[top_y_disp]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = disp_ramp_vert
[]
[top_x_disp]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = disp_ramp_horz
[]
[]
[Materials]
[stuff1_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.0
[]
[stuff1_stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[stuff2_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '2 3 4 5 6 7'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stuff2_stress]
type = ComputeFiniteStrainElasticStress
block = '2 3 4 5 6 7'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = -pc_type
petsc_options_value = lu
line_search = 'none'
nl_abs_tol = 1e-10
nl_rel_tol = 1e-8
nl_max_its = 1300
l_tol = 1e-05
l_abs_tol = 1e-13
start_time = 0.0
end_time = 0.2 # 3.5
dt = 0.1
dtmin = 0.001
[Predictor]
type = SimplePredictor
scale = 1.0
[]
automatic_scaling = true
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[surface]
type = NodalValueSampler
use_displaced_mesh = false
variable = 'disp_x disp_y penalty_normal_pressure normal_gap'
boundary = '3'
sort_by = id
[]
[]
[Outputs]
print_linear_residuals = true
perf_graph = true
exodus = true
csv = false
[vectorpp_output]
type = CSV
create_final_symlink = true
execute_on = 'INITIAL TIMESTEP_END FINAL'
[]
[]
[UserObjects]
[friction_uo]
type = PenaltyWeightedGapUserObject
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
disp_x = disp_x
disp_y = disp_y
penalty = 1e7
penalty_multiplier = 10
penetration_tolerance = 1e-12
use_physical_gap = true
[]
[]
[Constraints]
[x]
type = NormalMortarMechanicalContact
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[y]
type = NormalMortarMechanicalContact
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[]
(modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_normal_al_test_nochange.i)
[GlobalParams]
volumetric_locking_correction = true
displacements = 'disp_x disp_y'
[]
[Mesh]
[input_file]
type = FileMeshGenerator
file = hertz_cyl_finer.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10001
new_block_name = 'secondary_lower'
sidesets = '3'
input = input_file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10000
sidesets = '2'
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Problem]
type = AugmentedLagrangianContactFEProblem
extra_tag_vectors = 'ref'
maximum_lagrangian_update_iterations = 1000
[]
[AuxVariables]
[penalty_normal_pressure]
[]
[penalty_frictional_pressure]
[]
[accumulated_slip_one]
[]
[tangential_vel_one]
[]
[normal_gap]
[]
[normal_lm]
[]
[saved_x]
[]
[saved_y]
[]
[active]
[]
[dual_var]
use_dual = true
block = '10001'
[]
[]
[Functions]
[disp_ramp_vert]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. -0.020 -0.020'
[]
[disp_ramp_horz]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. 0.0 0.015'
[]
[]
[Modules/TensorMechanics/Master/all]
strain = FINITE
add_variables = true
save_in = 'saved_x saved_y'
extra_vector_tags = 'ref'
block = '1 2 3 4 5 6 7'
generate_output = 'stress_xx stress_yy stress_xy'
[]
[AuxKernels]
[penalty_normal_pressure]
type = PenaltyMortarUserObjectAux
variable = penalty_normal_pressure
user_object = friction_uo
contact_quantity = normal_pressure
boundary = 3
[]
[normal_lm]
type = PenaltyMortarUserObjectAux
variable = normal_lm
user_object = friction_uo
contact_quantity = normal_lm
boundary = 3
[]
[normal_gap]
type = PenaltyMortarUserObjectAux
variable = normal_gap
user_object = friction_uo
contact_quantity = normal_gap
boundary = 3
[]
[]
[Postprocessors]
[bot_react_x]
type = NodalSum
variable = saved_x
boundary = 1
[]
[bot_react_y]
type = NodalSum
variable = saved_y
boundary = 1
[]
[top_react_x]
type = NodalSum
variable = saved_x
boundary = 4
[]
[top_react_y]
type = NodalSum
variable = saved_y
boundary = 4
[]
[_dt]
type = TimestepSize
[]
[num_lin_it]
type = NumLinearIterations
[]
[num_nonlin_it]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nonlin_it
[]
[gap]
type = SideExtremeValue
value_type = min
variable = normal_gap
boundary = 3
[]
[num_al]
type = NumAugmentedLagrangeIterations
[]
[active_set_size]
type = NodalSum
variable = active
[]
[]
[BCs]
[side_x]
type = DirichletBC
variable = disp_y
boundary = '1 2'
value = 0.0
[]
[bot_y]
type = DirichletBC
variable = disp_x
boundary = '1 2'
value = 0.0
[]
[top_y_disp]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = disp_ramp_vert
[]
[top_x_disp]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = disp_ramp_horz
[]
[]
[Materials]
[stuff1_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.0
[]
[stuff1_stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[stuff2_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '2 3 4 5 6 7'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stuff2_stress]
type = ComputeFiniteStrainElasticStress
block = '2 3 4 5 6 7'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = -pc_type
petsc_options_value = lu
line_search = 'none'
nl_abs_tol = 1e-12
nl_rel_tol = 1e-8
nl_max_its = 1300
l_tol = 1e-05
l_abs_tol = 1e-13
start_time = 0.0
end_time = 1.0 # 3.5
dt = 0.1
dtmin = 0.001
[Predictor]
type = SimplePredictor
scale = 1.0
[]
automatic_scaling = true
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[surface]
type = NodalValueSampler
use_displaced_mesh = false
variable = 'disp_x disp_y penalty_normal_pressure normal_gap'
boundary = '3'
sort_by = id
[]
[]
[Outputs]
print_linear_residuals = true
perf_graph = true
exodus = true
csv = false
[vectorpp_output]
type = CSV
create_final_symlink = true
execute_on = 'INITIAL TIMESTEP_END FINAL'
[]
[]
[UserObjects]
[friction_uo]
type = PenaltyWeightedGapUserObject
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
disp_x = disp_x
disp_y = disp_y
penalty = 1e7
penetration_tolerance = 1e-8
use_mortar_scaled_gap = true
aux_lm = dual_var
[]
[]
[Constraints]
[x]
type = NormalMortarMechanicalContact
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[y]
type = NormalMortarMechanicalContact
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[]
(modules/contact/test/tests/pdass_problems/ironing_penalty_al.i)
[GlobalParams]
volumetric_locking_correction = true
displacements = 'disp_x disp_y'
[]
[Mesh]
[input_file]
type = FileMeshGenerator
file = iron.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10001
new_block_name = 'secondary_lower'
sidesets = '10'
input = input_file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10000
sidesets = '20'
new_block_name = 'primary_lower'
input = secondary
[]
patch_update_strategy = auto
patch_size = 20
allow_renumbering = false
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[penalty_normal_pressure]
order = FIRST
family = LAGRANGE
[]
[penalty_frictional_pressure]
order = FIRST
family = LAGRANGE
[]
[accumulated_slip_one]
order = FIRST
family = LAGRANGE
[]
[tangential_vel_one]
order = FIRST
family = LAGRANGE
[]
[real_weighted_gap]
order = FIRST
family = LAGRANGE
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[saved_x]
[]
[saved_y]
[]
[diag_saved_x]
[]
[diag_saved_y]
[]
[von_mises]
order = CONSTANT
family = MONOMIAL
[]
[]
[Functions]
[disp_ramp_vert]
type = PiecewiseLinear
x = '0. 2. 8.'
y = '0. -1.0 -1.0'
[]
[disp_ramp_horz]
type = PiecewiseLinear
x = '0. 8.'
y = '0. 8.'
[]
[]
[Kernels]
[TensorMechanics]
use_displaced_mesh = true
save_in = 'saved_x saved_y'
block = '1 2'
strain = FINITE
[]
[]
[AuxKernels]
[penalty_normal_pressure_auxk]
type = PenaltyMortarUserObjectAux
variable = penalty_normal_pressure
user_object = friction_uo
contact_quantity = normal_pressure
[]
[penalty_frictional_pressure_auxk]
type = PenaltyMortarUserObjectAux
variable = penalty_frictional_pressure
user_object = friction_uo
contact_quantity = tangential_pressure_one
[]
[penalty_accumulated_slip_auxk]
type = PenaltyMortarUserObjectAux
variable = accumulated_slip_one
user_object = friction_uo
contact_quantity = accumulated_slip_one
[]
[penalty_tangential_vel_auxk]
type = PenaltyMortarUserObjectAux
variable = tangential_vel_one
user_object = friction_uo
contact_quantity = tangential_velocity_one
[]
[real_weighted_gap_auxk]
type = PenaltyMortarUserObjectAux
variable = real_weighted_gap
user_object = friction_uo
contact_quantity = normal_gap
[]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
execute_on = timestep_end
block = '1 2'
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
execute_on = timestep_end
block = '1 2'
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
execute_on = timestep_end
block = '1 2'
[]
[von_mises_kernel]
#Calculates the von mises stress and assigns it to von_mises
type = RankTwoScalarAux
variable = von_mises
rank_two_tensor = stress
execute_on = timestep_end
scalar_type = VonMisesStress
block = '1 2'
[]
[]
# [VectorPostprocessors]
# [penalty_normal_pressure]
# type = NodalValueSampler
# variable = penalty_normal_pressure
# boundary = 10
# sort_by = id
# []
# []
[Postprocessors]
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[force_x]
type = NodalSum
boundary = 30
variable = saved_x
[]
[force_y]
type = NodalSum
boundary = 30
variable = saved_y
[]
[gap]
type = SideExtremeValue
value_type = min
variable = real_weighted_gap
boundary = 10
[]
[num_al]
type = NumAugmentedLagrangeIterations
[]
[]
[BCs]
[bot_x_disp]
type = DirichletBC
variable = disp_x
boundary = '40'
value = 0.0
preset = false
[]
[bot_y_disp]
type = DirichletBC
variable = disp_y
boundary = '40'
value = 0.0
preset = false
[]
[top_y_disp]
type = FunctionDirichletBC
variable = disp_y
boundary = '30'
function = disp_ramp_vert
preset = false
[]
[top_x_disp]
type = FunctionDirichletBC
variable = disp_x
boundary = '30'
function = disp_ramp_horz
preset = false
[]
[]
[Materials]
[stuff1_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 6896
poissons_ratio = 0.32
[]
[stuff1_strain]
type = ComputeFiniteStrain
block = '2'
[]
[stuff1_stress]
type = ComputeFiniteStrainElasticStress
block = '2'
[]
[stuff2_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 689.6
poissons_ratio = 0.32
[]
[stuff2_strain]
type = ComputeFiniteStrain
block = '1'
[]
[stuff2_stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu superlu_dist'
line_search = 'none'
nl_abs_tol = 1e-7
nl_rel_tol = 1e-7
l_tol = 1e-6
l_max_its = 7
nl_max_its = 300
start_time = 0.0
end_time = 6.5 # 6.5
dt = 0.0125
dtmin = 1e-5
[Predictor]
type = SimplePredictor
scale = 1.0
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Outputs]
print_linear_residuals = true
perf_graph = true
exodus = true
csv = true
# [chkfile]
# type = CSV
# start_time = 0.0
# execute_vector_postprocessors_on = FINAL
# []
[console]
type = Console
max_rows = 5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Problem]
type = AugmentedLagrangianContactFEProblem
[]
[UserObjects]
[friction_uo]
type = PenaltyFrictionUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 10000
secondary_subdomain = 10001
disp_x = disp_x
disp_y = disp_y
friction_coefficient = 0.4 # with 2.0 works
secondary_variable = disp_x
penalty = 5e5
penalty_friction = 1e4
slip_tolerance = 1e-05
penetration_tolerance = 1e-03
[]
[]
[Constraints]
[x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[t_x]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = friction_uo
[]
[t_y]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = friction_uo
[]
[]
(modules/contact/test/tests/bouncing-block-contact/frictionless-penalty-weighted-gap-action.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
preset = false
[]
[Mesh]
[mesh_file]
type = FileMeshGenerator
file = long-bottom-block-1elem-blocks.e
[]
[remove_blocks]
type = BlockDeletionGenerator
input = mesh_file
block = '3 4'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[]
[Contact]
[weighted_gap]
formulation = mortar_penalty
model = frictionless
secondary = 10
primary = 20
penalty = 1e0
use_dual = false
[]
[]
[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 / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = true
abort_on_solve_fail = true
nl_rel_tol = 1e-13
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[]
(modules/contact/test/tests/mortar_tm/2d/ad_frictionless_fir/small.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'small'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[]
[Modules/TensorMechanics/Master]
[action]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e0
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeLinearElasticStress
block = 'plank block'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven_stabilized_action.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 64
ny = 64
[]
[]
[Modules]
[IncompressibleNavierStokes]
equation_type = steady-state
block = 0
velocity_boundary = 'bottom right top left'
velocity_function = '0 0 0 0 lid_function 0 0 0'
pressure_pinned_node = 0
density_name = rho
dynamic_viscosity_name = mu
# There are multiple types of stabilization possible in incompressible
# Navier Stokes. The user can specify supg = true to apply streamline
# upwind petrov-galerkin stabilization to the momentum equations. This
# is most useful for high Reynolds numbers, e.g. when inertial effects
# dominate over viscous effects. The user can also specify pspg = true
# to apply pressure stabilized petrov-galerkin stabilization to the mass
# equation. PSPG is a form of Galerkin Least Squares. This stabilization
# allows equal order interpolations to be used for pressure and velocity.
# Finally, the alpha parameter controls the amount of stabilization.
# For PSPG, decreasing alpha leads to increased accuracy but may induce
# spurious oscillations in the pressure field. Some numerical experiments
# suggest that alpha between .1 and 1 may be optimal for accuracy and
# robustness.
supg = true
pspg = true
alpha = 1e-1
laplace = true
integrate_p_by_parts = true
gravity = '0 0 0'
family = LAGRANGE
order = FIRST
[]
[]
[Materials]
[const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '1 1'
[]
[]
[Functions]
[lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'asm 2 ilu 4'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
file_base = lid_driven_stabilized_out
exodus = true
[]
[Postprocessors]
[lin]
type = NumLinearIterations
[]
[nl]
type = NumNonlinearIterations
[]
[lin_tot]
type = CumulativeValuePostprocessor
postprocessor = 'lin'
[]
[nl_tot]
type = CumulativeValuePostprocessor
postprocessor = 'nl'
[]
[]
(modules/contact/test/tests/bouncing-block-contact/frictionless-nodal-reduced-active-set.i)
starting_point = .5
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1
[]
[Mesh]
file = square-blocks-no-offset.e
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[ICs]
[./disp_y]
block = 2
variable = disp_y
value = ${starting_point}
type = ConstantIC
[../]
[]
[Kernels]
[./disp_x]
type = MatDiffusion
variable = disp_x
[../]
[./disp_y]
type = MatDiffusion
variable = disp_y
[../]
[]
[Constraints]
[./disp_x]
type = RANFSNormalMechanicalContact
secondary = 10
primary = 20
variable = disp_x
primary_variable = disp_x
component = x
[../]
[./disp_y]
type = RANFSNormalMechanicalContact
secondary = 10
primary = 20
variable = disp_y
primary_variable = disp_y
component = y
[../]
[]
[BCs]
[./botx]
type = DirichletBC
variable = disp_x
preset = false
boundary = 40
value = 0.0
[../]
[./topx]
type = DirichletBC
variable = disp_x
preset = false
boundary = 30
value = 0.0
[../]
[./boty]
type = DirichletBC
variable = disp_y
preset = false
boundary = 40
value = 0.0
[../]
[./topy]
type = FunctionDirichletBC
variable = disp_y
preset = false
boundary = 30
function = '${starting_point} - t'
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
dtmin = 1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -ksp_monitor_true_residual -snes_view'
petsc_options_iname = '-mat_mffd_err -pc_type -pc_hypre_type'
petsc_options_value = '1e-5 hypre boomeramg'
l_max_its = 30
nl_max_its = 20
line_search = 'project'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[exo]
type = Exodus
execute_on = 'nonlinear'
[]
print_linear_residuals = false
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Postprocessors]
[./num_nl]
type = NumNonlinearIterations
[../]
[./cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[../]
[]
(modules/navier_stokes/test/tests/finite_volume/cns/straight_channel_porosity_step/dc.i)
p_initial=1.01e5
T=273.15
# u refers to the superficial velocity
u_in=1
rho_in=1.30524
sup_mom_y_in=${fparse u_in * rho_in}
user_limiter='min_mod'
friction_coeff=10
[GlobalParams]
fp = fp
two_term_boundary_expansion = true
limiter = ${user_limiter}
[]
[Mesh]
[cartesian]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
nx = 3
ymin = 0
ymax = 18
ny = 90
[]
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Problem]
fv_bcs_integrity_check = false
[]
[Variables]
[pressure]
type = MooseVariableFVReal
initial_condition = ${p_initial}
[]
[sup_mom_x]
type = MooseVariableFVReal
initial_condition = 1e-15
[]
[sup_mom_y]
type = MooseVariableFVReal
initial_condition = 1e-15
[]
[T_fluid]
type = MooseVariableFVReal
initial_condition = ${T}
[]
[]
[AuxVariables]
[vel_y]
type = MooseVariableFVReal
[]
[rho]
type = MooseVariableFVReal
[]
[eps]
type = MooseVariableFVReal
[]
[]
[AuxKernels]
[vel_y]
type = ADMaterialRealAux
variable = vel_y
property = vel_y
execute_on = 'timestep_end'
[]
[rho]
type = ADMaterialRealAux
variable = rho
property = rho
execute_on = 'timestep_end'
[]
[eps]
type = MaterialRealAux
variable = eps
property = porosity
execute_on = 'timestep_end'
[]
[]
[FVKernels]
[mass_time]
type = FVMatPropTimeKernel
mat_prop_time_derivative = 'dsuperficial_rho_dt'
variable = pressure
[]
[mass_advection]
type = PCNSFVKTDC
variable = pressure
eqn = "mass"
[]
[momentum_time]
type = FVMatPropTimeKernel
mat_prop_time_derivative = 'dsuperficial_rhou_dt'
variable = sup_mom_x
[]
[momentum_advection]
type = PCNSFVKTDC
variable = sup_mom_x
eqn = "momentum"
momentum_component = 'x'
[]
[eps_grad]
type = PNSFVPGradEpsilon
variable = sup_mom_x
momentum_component = 'x'
epsilon_function = 'eps'
[]
[drag]
type = PCNSFVMomentumFriction
variable = sup_mom_x
momentum_component = 'x'
Darcy_name = 'cl'
momentum_name = superficial_rhou
[]
[momentum_time_y]
type = FVMatPropTimeKernel
mat_prop_time_derivative = 'dsuperficial_rhov_dt'
variable = sup_mom_y
[]
[momentum_advection_y]
type = PCNSFVKTDC
variable = sup_mom_y
eqn = "momentum"
momentum_component = 'y'
[]
[eps_grad_y]
type = PNSFVPGradEpsilon
variable = sup_mom_y
momentum_component = 'y'
epsilon_function = 'eps'
[]
[drag_y]
type = PCNSFVMomentumFriction
variable = sup_mom_y
momentum_component = 'y'
Darcy_name = 'cl'
momentum_name = superficial_rhov
[]
[energy_time]
type = FVMatPropTimeKernel
mat_prop_time_derivative = 'dsuperficial_rho_et_dt'
variable = T_fluid
[]
[energy_advection]
type = PCNSFVKTDC
variable = T_fluid
eqn = "energy"
[]
[]
[FVBCs]
[rho_bottom]
type = PCNSFVStrongBC
boundary = 'bottom'
variable = pressure
superficial_velocity = 'ud_in'
T_fluid = ${T}
eqn = 'mass'
velocity_function_includes_rho = true
[]
[rhou_bottom]
type = PCNSFVStrongBC
boundary = 'bottom'
variable = sup_mom_x
superficial_velocity = 'ud_in'
T_fluid = ${T}
eqn = 'momentum'
momentum_component = 'x'
velocity_function_includes_rho = true
[]
[rhov_bottom]
type = PCNSFVStrongBC
boundary = 'bottom'
variable = sup_mom_y
superficial_velocity = 'ud_in'
T_fluid = ${T}
eqn = 'momentum'
momentum_component = 'y'
velocity_function_includes_rho = true
[]
[rho_et_bottom]
type = PCNSFVStrongBC
boundary = 'bottom'
variable = T_fluid
superficial_velocity = 'ud_in'
T_fluid = ${T}
eqn = 'energy'
velocity_function_includes_rho = true
[]
[rho_top]
type = PCNSFVStrongBC
boundary = 'top'
variable = pressure
pressure = ${p_initial}
eqn = 'mass'
[]
[rhou_top]
type = PCNSFVStrongBC
boundary = 'top'
variable = sup_mom_x
pressure = ${p_initial}
eqn = 'momentum'
momentum_component = 'x'
[]
[rhov_top]
type = PCNSFVStrongBC
boundary = 'top'
variable = sup_mom_y
pressure = ${p_initial}
eqn = 'momentum'
momentum_component = 'y'
[]
[rho_et_top]
type = PCNSFVStrongBC
boundary = 'top'
variable = T_fluid
pressure = ${p_initial}
eqn = 'energy'
[]
[wall_pressure_x]
type = PCNSFVImplicitMomentumPressureBC
momentum_component = 'x'
boundary = 'left right'
variable = sup_mom_x
[]
[wall_pressure_y]
type = PCNSFVImplicitMomentumPressureBC
momentum_component = 'y'
boundary = 'left right'
variable = sup_mom_y
[]
# Use these to help create more accurate cell centered gradients for cells adjacent to boundaries
[T_bottom]
type = FVDirichletBC
variable = T_fluid
value = ${T}
boundary = 'bottom'
[]
[sup_mom_x_bottom_and_walls]
type = FVDirichletBC
variable = sup_mom_x
value = 0
boundary = 'bottom left right'
[]
[sup_mom_y_walls]
type = FVDirichletBC
variable = sup_mom_y
value = 0
boundary = 'left right'
[]
[sup_mom_y_bottom]
type = FVDirichletBC
variable = sup_mom_y
value = ${sup_mom_y_in}
boundary = 'bottom'
[]
[p_top]
type = FVDirichletBC
variable = pressure
value = ${p_initial}
boundary = 'top'
[]
[]
[Functions]
[ud_in]
type = ParsedVectorFunction
expression_x = '0'
expression_y = '${sup_mom_y_in}'
[]
[eps]
type = ParsedFunction
expression = 'if(y < 2.8, 1,
if(y < 3.2, 1 - .5 / .4 * (y - 2.8),
if(y < 6.8, .5,
if(y < 7.2, .5 - .25 / .4 * (y - 6.8),
if(y < 10.8, .25,
if(y < 11.2, .25 + .25 / .4 * (y - 10.8),
if(y < 14.8, .5,
if(y < 15.2, .5 + .5 / .4 * (y - 14.8),
1))))))))'
[]
[]
[Materials]
[var_mat]
type = PorousMixedVarMaterial
pressure = pressure
T_fluid = T_fluid
superficial_rhou = sup_mom_x
superficial_rhov = sup_mom_y
porosity = porosity
[]
[porosity]
type = GenericFunctionMaterial
prop_names = 'porosity'
prop_values = 'eps'
[]
[ad_generic]
type = ADGenericConstantVectorMaterial
prop_names = 'cl'
prop_values = '${friction_coeff} ${friction_coeff} ${friction_coeff}'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
solve_type = NEWTON
line_search = 'bt'
type = Transient
nl_max_its = 20
[TimeStepper]
type = IterationAdaptiveDT
dt = 5e-5
optimal_iterations = 6
growth_factor = 1.2
[]
num_steps = 10
nl_abs_tol = 1e-8
automatic_scaling = true
compute_scaling_once = false
resid_vs_jac_scaling_param = 0.5
verbose = true
steady_state_detection = true
steady_state_tolerance = 1e-8
normalize_solution_diff_norm_by_dt = false
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
[out]
type = Exodus
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
active = ''
[num_nl]
type = NumNonlinearIterations
[]
[total_nl]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/cylindrical/no-slip-tris.i)
mu = 1
rho = 1
advected_interp_method = 'average'
velocity_interp_method = 'rc'
[GlobalParams]
two_term_boundary_expansion = true
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = vel_x
v = vel_y
pressure = pressure
[]
[]
[Mesh]
type = GeneratedMesh
nx = 4
ny = 4
xmax = 3.9
ymax = 4.1
elem_type = TRI3
dim = 2
[]
[Problem]
coord_type = 'RZ'
[]
[Variables]
[vel_x]
type = INSFVVelocityVariable
initial_condition = 1e-15
[]
[vel_y]
type = INSFVVelocityVariable
initial_condition = 1e-15
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = INSFVMomentumAdvection
variable = vel_x
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = vel_x
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = vel_x
momentum_component = 'x'
pressure = pressure
[]
[v_advection]
type = INSFVMomentumAdvection
variable = vel_y
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'y'
# we can think of the axis as a slip wall boundary, no normal velocity and no viscous shear
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = vel_y
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = vel_y
momentum_component = 'y'
pressure = pressure
[]
[]
[FVBCs]
active = 'inlet-u inlet-v free-slip-wall-u free-slip-wall-v outlet-p axis-u axis-v'
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'bottom'
variable = vel_x
function = 0
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'bottom'
variable = vel_y
function = 1
[]
[free-slip-wall-u]
type = INSFVNaturalFreeSlipBC
boundary = 'right'
variable = vel_x
momentum_component = 'x'
[]
[free-slip-wall-v]
type = INSFVNaturalFreeSlipBC
boundary = 'right'
variable = vel_y
momentum_component = 'y'
[]
[no-slip-wall-u]
type = INSFVNoSlipWallBC
boundary = 'right'
variable = vel_x
function = 0
[]
[no-slip-wall-v]
type = INSFVNoSlipWallBC
boundary = 'right'
variable = vel_y
function = 0
[]
[outlet-p]
type = INSFVOutletPressureBC
boundary = 'top'
variable = pressure
function = 0
[]
[axis-u]
type = INSFVSymmetryVelocityBC
boundary = 'left'
variable = vel_x
u = vel_x
v = vel_y
mu = ${mu}
momentum_component = x
[]
[axis-v]
type = INSFVSymmetryVelocityBC
boundary = 'left'
variable = vel_y
u = vel_x
v = vel_y
mu = ${mu}
momentum_component = y
[]
[axis-p]
type = INSFVSymmetryPressureBC
boundary = 'left'
variable = pressure
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-12
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[in]
type = SideIntegralVariablePostprocessor
variable = vel_y
boundary = 'bottom'
[]
[out]
type = SideIntegralVariablePostprocessor
variable = vel_y
boundary = 'top'
[]
[num_lin]
type = NumLinearIterations
outputs = 'console'
[]
[num_nl]
type = NumNonlinearIterations
outputs = 'console'
[]
[cum_lin]
type = CumulativeValuePostprocessor
outputs = 'console'
postprocessor = 'num_lin'
[]
[cum_nl]
type = CumulativeValuePostprocessor
outputs = 'console'
postprocessor = 'num_nl'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/finite_action.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[temp]
order = ${order}
block = 'plank block'
scaling = 1e-1
[]
[]
[Modules/TensorMechanics/Master]
[action]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
strain = FINITE
[]
[]
[Kernels]
[hc]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = 'plank block'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e6
[]
[]
[MortarGapHeatTransfer]
[mortar_heat_transfer]
temperature = temp
use_displaced_mesh = true
gap_flux_options = conduction
gap_conductivity = 1
boundary = plank_right
primary_boundary = plank_right
primary_subdomain = frictionless_primary_subdomain
secondary_boundary = block_left
secondary_subdomain = frictionless_secondary_subdomain
thermal_lm_scaling = 1e-7
gap_geometry_type = PLATE
[]
[]
[BCs]
[left_temp]
type = ADDirichletBC
variable = temp
boundary = 'plank_left'
value = 400
[]
[right_temp]
type = ADDirichletBC
variable = temp
boundary = 'block_right'
value = 300
[]
[left_x]
type = ADDirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = ADDirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
preset = false
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
preset = false
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[]
[heat_plank]
type = ADHeatConductionMaterial
block = plank
thermal_conductivity = 2
specific_heat = 1
[]
[heat_block]
type = ADHeatConductionMaterial
block = block
thermal_conductivity = 1
specific_heat = 1
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -snes_max_it'
petsc_options_value = 'lu NONZERO 1e-15 20'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'none'
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[avg_temp]
type = ElementAverageValue
variable = temp
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact avg_temp'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_stabilized.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 64
ny = 64
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[AuxVariables]
[vel_x]
[]
[vel_y]
[]
[]
[AuxKernels]
[vel_x]
type = VectorVariableComponentAux
variable = vel_x
vector_variable = velocity
component = 'x'
[]
[vel_y]
type = VectorVariableComponentAux
variable = vel_y
vector_variable = velocity
component = 'y'
[]
[]
[Variables]
[./velocity]
family = LAGRANGE_VEC
[../]
[./p]
[../]
[]
[ICs]
[velocity]
type = VectorConstantIC
x_value = 0
y_value = 0
variable = velocity
[]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[./mass_pspg]
type = INSADMassPSPG
variable = p
[../]
[./momentum_convection]
type = INSADMomentumAdvection
variable = velocity
[../]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
[../]
[./momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[../]
[]
[BCs]
[./no_slip]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom right left'
[../]
[./lid]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'top'
function_x = 'lid_function'
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[ins_mat]
type = INSADTauMaterial
velocity = velocity
pressure = p
alpha = .1
[]
[]
[Functions]
[./lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
exodus = true
file_base = lid_driven_stabilized_out
[]
[Postprocessors]
[lin]
type = NumLinearIterations
[]
[nl]
type = NumNonlinearIterations
[]
[lin_tot]
type = CumulativeValuePostprocessor
postprocessor = 'lin'
[]
[nl_tot]
type = CumulativeValuePostprocessor
postprocessor = 'nl'
[]
[]
(test/tests/geomsearch/patch_update_strategy/always-grid-sequence.i)
[Mesh]
type = FileMesh
file = long_range_coarse.e
dim = 2
patch_update_strategy = always
displacements = 'disp_x disp_y'
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = 'ref'
solution_variables = 'u'
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./linear_field]
[../]
[./receiver]
# The field to transfer into
[../]
[./disp_x]
[../]
[./disp_y]
[../]
[./elemental_reciever]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 1
extra_vector_tags = 'ref'
[../]
[]
[AuxKernels]
[./linear_in_y]
# This just gives us something to transfer that varies in y so we can ensure the transfer is working properly...
type = FunctionAux
variable = linear_field
function = y
execute_on = initial
[../]
[./right_to_left]
type = GapValueAux
variable = receiver
paired_variable = linear_field
paired_boundary = rightleft
execute_on = 'nonlinear timestep_end'
boundary = leftright
[../]
[./y_displacement]
type = FunctionAux
variable = disp_y
function = t
execute_on = 'linear timestep_begin'
block = left
[../]
[./elemental_right_to_left]
type = GapValueAux
variable = elemental_reciever
paired_variable = linear_field
paired_boundary = rightleft
boundary = leftright
[../]
[]
[BCs]
[./top]
type = FunctionDirichletBC
variable = u
boundary = 'lefttop righttop'
function = 't'
[../]
[./bottom]
type = DirichletBC
variable = u
boundary = 'leftbottom rightbottom'
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 3
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
num_grids = 2
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[num_nl]
type = NumNonlinearIterations
[]
[total_nl]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[]
(modules/contact/test/tests/mortar_cartesian_lms/two_block_1st_order_constraint_lm_xy_friction.i)
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
theta = 0
velocity = 0.1
refine = 3
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.35
xmax = -0.05
ymin = -1
ymax = 0
nx = 1
ny = 3
elem_type = QUAD4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_sideset_names]
type = RenameBoundaryGenerator
input = left_block_sidesets
old_boundary = '10 11 12 13'
new_boundary = 'l_bottom l_right l_top l_left'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sideset_names
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.3
ymin = -1
ymax = 0
nx = 1
ny = 2
elem_type = QUAD4
[]
[right_block_sidesets]
type = RenameBoundaryGenerator
input = right_block
old_boundary = '0 1 2 3'
new_boundary = '20 21 22 23'
[]
[right_block_sideset_names]
type = RenameBoundaryGenerator
input = right_block_sidesets
old_boundary = '20 21 22 23'
new_boundary = 'r_bottom r_right r_top r_left'
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block_sideset_names
subdomain_id = 2
[]
[combined_mesh]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_id'
[]
[left_lower]
type = LowerDBlockFromSidesetGenerator
input = combined_mesh
sidesets = '11'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[right_lower]
type = LowerDBlockFromSidesetGenerator
input = left_lower
sidesets = '23'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[rotate_mesh]
type = TransformGenerator
input = right_lower
transform = ROTATE
vector_value = '0 0 ${theta}'
[]
uniform_refine = ${refine}
[]
[Variables]
[lm_x]
block = 'secondary_lower'
use_dual = true
[]
[lm_y]
block = 'secondary_lower'
use_dual = true
[]
[]
[AuxVariables]
[normal_lm]
family = LAGRANGE
order = FIRST
[]
[tangent_lm]
family = LAGRANGE
order = FIRST
[]
[]
[AuxKernels]
[normal_lm]
type = MortarPressureComponentAux
variable = normal_lm
primary_boundary = '23'
secondary_boundary = '11'
lm_var_x = lm_x
lm_var_y = lm_y
component = 'NORMAL'
boundary = '11'
[]
[tangent_lm]
type = MortarPressureComponentAux
variable = tangent_lm
primary_boundary = '23'
secondary_boundary = '11'
lm_var_x = lm_x
lm_var_y = lm_y
component = 'tangent1'
boundary = '11'
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
incremental = true
add_variables = true
block = '1 2'
[]
[]
[Functions]
[horizontal_movement]
type = ParsedFunction
expression = '${velocity} * t * cos(${theta}/180*pi)'
[]
[vertical_movement]
type = ParsedFunction
expression = '${velocity} * t * sin(${theta}/180*pi)'
[]
[]
[BCs]
[push_left_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 13
function = horizontal_movement
[]
[fix_right_x]
type = DirichletBC
variable = disp_x
boundary = 21
value = 0.0
[]
[fix_right_y]
type = DirichletBC
variable = disp_y
boundary = 21
value = 0.0
[]
[push_left_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 13
function = vertical_movement
[]
[]
[Materials]
[elasticity_tensor_left]
type = ComputeIsotropicElasticityTensor
block = 1
youngs_modulus = 1.0e4
poissons_ratio = 0.3
[]
[stress_left]
type = ComputeFiniteStrainElasticStress
block = 1
[]
[elasticity_tensor_right]
type = ComputeIsotropicElasticityTensor
block = 2
youngs_modulus = 1.0e8
poissons_ratio = 0.3
[]
[stress_right]
type = ComputeFiniteStrainElasticStress
block = 2
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeFrictionalForceCartesianLMMechanicalContact # ComputeCartesianLMFrictionMechanicalContact
# type = ComputeWeightedGapLMMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_x = lm_x
lm_y = lm_y
variable = lm_x # This can be anything really
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
correct_edge_dropping = true
mu = 1.0
c_t = 1.0e5
[]
[normal_x]
type = CartesianMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_y]
type = CartesianMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15'
line_search = none
dt = 0.1
dtmin = 0.1
end_time = 1.0
l_max_its = 100
nl_max_its = 20
nl_rel_tol = 1e-8
snesmf_reuse_base = false
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[avg_disp_x]
type = ElementAverageValue
variable = disp_x
block = '1 2'
[]
[avg_disp_y]
type = ElementAverageValue
variable = disp_y
block = '1 2'
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
[]
[min_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
value_type = min
[]
[min_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
value_type = min
[]
[num_lin_it]
type = NumLinearIterations
[]
[num_nonlin_it]
type = NumNonlinearIterations
[]
[tot_lin_it]
type = CumulativeValuePostprocessor
postprocessor = num_lin_it
[]
[tot_nonlin_it]
type = CumulativeValuePostprocessor
postprocessor = num_nonlin_it
[]
[max_norma_lm]
type = ElementExtremeValue
variable = normal_lm
[]
[min_norma_lm]
type = ElementExtremeValue
variable = normal_lm
value_type = min
[]
[]
[VectorPostprocessors]
[normal_lm]
type = NodalValueSampler
block = 'secondary_lower'
variable = normal_lm
sort_by = 'y'
[]
[tangent_lm]
type = NodalValueSampler
block = 'secondary_lower'
variable = tangent_lm
sort_by = 'y'
[]
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/finite.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[secondary]
input = block_rename
type = LowerDBlockFromSidesetGenerator
sidesets = 'block_left'
new_block_id = '30'
new_block_name = 'frictionless_secondary_subdomain'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'plank_right'
new_block_id = '20'
new_block_name = 'frictionless_primary_subdomain'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[temp]
order = ${order}
block = 'plank block'
scaling = 1e-1
[]
[thermal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
scaling = 1e-7
[]
[frictionless_normal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
use_dual = true
[]
[]
[Modules/TensorMechanics/Master]
[action]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
strain = FINITE
[]
[]
[Kernels]
[hc]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = 'plank block'
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
lm_variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_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 = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[thermal_contact]
type = GapConductanceConstraint
variable = thermal_lm
secondary_variable = temp
k = 1
use_displaced_mesh = true
primary_boundary = plank_right
primary_subdomain = frictionless_primary_subdomain
secondary_boundary = block_left
secondary_subdomain = frictionless_secondary_subdomain
displacements = 'disp_x disp_y'
[]
[]
[BCs]
[left_temp]
type = ADDirichletBC
variable = temp
boundary = 'plank_left'
value = 400
[]
[right_temp]
type = ADDirichletBC
variable = temp
boundary = 'block_right'
value = 300
[]
[left_x]
type = ADDirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = ADDirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
preset = false
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
preset = false
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[]
[heat_plank]
type = ADHeatConductionMaterial
block = plank
thermal_conductivity = 2
specific_heat = 1
[]
[heat_block]
type = ADHeatConductionMaterial
block = block
thermal_conductivity = 1
specific_heat = 1
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -snes_max_it'
petsc_options_value = 'lu NONZERO 1e-15 20'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'none'
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[avg_temp]
type = ElementAverageValue
variable = temp
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact avg_temp'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/contact/test/tests/fieldsplit/frictionless_mortar_FS.i)
offset = 0.021
vy = 0.15
vx = 0.04
refine = 1
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[Mesh]
[original_file_mesh]
type = FileMeshGenerator
file = long_short_blocks.e
[]
uniform_refine = ${refine}
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
incremental = true
add_variables = true
block = '1 2'
use_automatic_differentiation = true
[]
[]
[Functions]
[horizontal_movement]
type = ParsedFunction
value = 'if(t<0.5,${vx}*t-${offset},${vx}-${offset})'
[]
[vertical_movement]
type = ParsedFunction
value = 'if(t<0.5,${offset},${vy}*(t-0.5)+${offset})'
[]
[]
[BCs]
[push_left_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 30
function = horizontal_movement
preset = false
[]
[fix_right_x]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[fix_right_y]
type = DirichletBC
variable = disp_y
boundary = '40'
value = 0.0
[]
[push_left_y]
type = FunctionDirichletBC
variable = disp_y
boundary = '30'
function = vertical_movement
preset = false
[]
[]
[Materials]
[elasticity_tensor_left]
type = ADComputeIsotropicElasticityTensor
block = 1
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[]
[stress_left]
type = ADComputeFiniteStrainElasticStress
block = 1
[]
[elasticity_tensor_right]
type = ADComputeIsotropicElasticityTensor
block = 2
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[]
[stress_right]
type = ADComputeFiniteStrainElasticStress
block = 2
[]
[]
[Contact]
[leftright]
secondary = 10
primary = 20
model = frictionless
formulation = mortar
c_normal = 1e6
[]
[]
[ICs]
[disp_y]
block = 1
variable = disp_y
value = ${offset}
type = ConstantIC
[]
[disp_x]
block = 1
variable = disp_x
value = -${offset}
type = ConstantIC
[]
[]
[Preconditioning]
[FSP]
type = FSP
topsplit = 'contact_interior'
[contact_interior]
splitting = 'interior contact'
splitting_type = schur
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart -pc_fieldsplit_schur_fact_type -mat_mffd_err'
petsc_options_value = '200 full 1e-5'
schur_pre = 'S'
[]
[interior]
vars = 'disp_x disp_y'
petsc_options_iname = '-ksp_type -pc_type -pc_hypre_type '
petsc_options_value = 'gmres hypre boomeramg'
[]
[contact]
vars = 'leftright_normal_lm'
[]
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
end_time = 1
abort_on_solve_fail = true
l_max_its = 200
nl_abs_tol = 1e-8
line_search = 'none'
nl_max_its = 20
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[lin]
type = NumLinearIterations
outputs = 'console'
[]
[cum]
type = CumulativeValuePostprocessor
postprocessor = 'lin'
outputs = 'console'
[]
[]
(modules/contact/test/tests/mortar_tm/2d/ad_frictional/finite_rr.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite_rr'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = 'ref'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[]
[Modules/TensorMechanics/Master]
[action]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
extra_vector_tags = 'ref'
[]
[]
[Contact]
[frictional]
primary = plank_right
secondary = block_left
formulation = mortar
model = coulomb
c_normal = 1e3
c_tangential = 1e-6
friction_coefficient = 0.1
tangential_lm_scaling = 1.0e-10
[]
[]
[BCs]
[left_x]
type = ADDirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
preset = false
[]
[left_y]
type = ADDirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
preset = false
[]
[right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
preset = false
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
preset = false
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu NONZERO 1e-15'
end_time = 5.3
dt = 0.12
dtmin = 0.12
timestep_tolerance = 1e-6
line_search = 'contact'
nl_div_tol = 1e100
nl_abs_tol = 1e-7
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictional_normal_lm
subdomain = frictional_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/contact/test/tests/bouncing-block-contact/frictionless-penalty-weighted-gap.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
preset = false
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[]
[UserObjects]
[weighted_gap_uo]
type = PenaltyWeightedGapUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
disp_x = disp_x
disp_y = disp_y
penalty = 1e0
use_physical_gap = true
[]
[]
[Constraints]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
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
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 / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = true
abort_on_solve_fail = true
nl_rel_tol = 1e-13
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[]
(modules/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-fretting-wear-test-projection_angle.i)
starting_point = 0.5e-1
offset = -0.045
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = long-bottom-block-1elem-blocks-multiple-projections-lowerd.e
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[normal_lm]
block = 3
use_dual = true
# scaling = 1.0e-5
[]
[frictional_lm]
block = 3
use_dual = true
# scaling = 1.0e-5
[]
[]
[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
hht_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]
[worn_depth]
block = '3'
[]
[gap_vel]
block = '3'
[]
[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'
[]
[]
[AuxKernels]
[gap_vel]
type = WeightedGapVelAux
variable = gap_vel
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
disp_x = disp_x
disp_y = disp_y
debug_mesh = true
minimum_projection_angle = 0.0
[]
[worn_depth]
type = MortarArchardsLawAux
variable = worn_depth
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
displacements = 'disp_x disp_y'
friction_coefficient = 0.5
energy_wear_coefficient = 1.0e-6
normal_pressure = normal_lm
execute_on = 'TIMESTEP_END'
debug_mesh = true
minimum_projection_angle = 0.0
[]
[accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = 'linear timestep_end'
[]
[vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = 'linear timestep_end'
[]
[accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = 'linear timestep_end'
[]
[vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = 'linear timestep_end'
[]
[]
[UserObjects]
[weighted_vel_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
secondary_variable = disp_x
lm_variable_normal = normal_lm
lm_variable_tangential_one = frictional_lm
disp_x = disp_x
disp_y = disp_y
debug_mesh = true
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeDynamicFrictionalForceLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
wear_depth = worn_depth
c = 1e6
c_t = 1e6
normalize_c = true
mu = 0.5
friction_lm = frictional_lm
capture_tolerance = 1.0e-5
newmark_beta = 0.25
newmark_gamma = 0.5
debug_mesh = true
minimum_projection_angle = 0.0
[]
[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
debug_mesh = true
minimum_projection_angle = 0.0
weighted_gap_uo = weighted_vel_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
debug_mesh = true
minimum_projection_angle = 0.0
weighted_gap_uo = weighted_vel_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
minimum_projection_angle = 0.0
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
minimum_projection_angle = 0.0
weighted_velocities_uo = weighted_vel_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(4.0 * pi / 4 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * (cos(32.0 * pi / 4 * t) - 1.0)'
[]
[]
[Executioner]
type = Transient
end_time = 0.0
dt = 0.05
dtmin = .002
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15'
nl_max_its = 40
l_max_its = 15
line_search = 'l2'
snesmf_reuse_base = true
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
checkpoint = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/contact/test/tests/mortar_tm/2d/frictionless_first/small.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'small'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[]
[Modules/TensorMechanics/Master]
[action]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank block'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e0
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = FunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
[]
[right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[]
[]
[Materials]
[plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ComputeLinearElasticStress
block = 'plank block'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/cylindrical/no-slip-tris-action.i)
mu = 1
rho = 1
[Mesh]
type = GeneratedMesh
nx = 4
ny = 4
xmax = 3.9
ymax = 4.1
elem_type = TRI3
dim = 2
[]
[Problem]
coord_type = 'RZ'
[]
[Modules]
[NavierStokesFV]
compressibility = 'incompressible'
density = 'rho'
dynamic_viscosity = 'mu'
porosity = 'porosity'
initial_velocity = '1e-15 1e-15 0'
initial_pressure = 0.0
inlet_boundaries = 'bottom'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_function = '0 1'
wall_boundaries = 'left right'
momentum_wall_types = 'symmetry noslip'
outlet_boundaries = 'top'
momentum_outlet_types = 'fixed-pressure'
pressure_function = '0'
momentum_two_term_bc_expansion = true
pressure_two_term_bc_expansion = true
mass_advection_interpolation = 'average'
momentum_advection_interpolation = 'average'
[]
[]
[FunctorMaterials]
[const]
type = ADGenericFunctorMaterial
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-12
[]
[Postprocessors]
[in]
type = SideIntegralVariablePostprocessor
variable = vel_y
boundary = 'bottom'
[]
[out]
type = SideIntegralVariablePostprocessor
variable = vel_y
boundary = 'top'
[]
[num_lin]
type = NumLinearIterations
outputs = 'console'
[]
[num_nl]
type = NumNonlinearIterations
outputs = 'console'
[]
[cum_lin]
type = CumulativeValuePostprocessor
outputs = 'console'
postprocessor = 'num_lin'
[]
[cum_nl]
type = CumulativeValuePostprocessor
outputs = 'console'
postprocessor = 'num_nl'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/contact/test/tests/mortar_tm/2d/frictionless_second/finite_rr.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD9
order = SECOND
name = 'finite_rr'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = 'ref'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[]
[Modules/TensorMechanics/Master]
[action]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank block'
extra_vector_tags = 'ref'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e0
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
preset = false
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = FunctionDirichletBC
variable = disp_x
preset = false
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
[]
[right_y]
type = FunctionDirichletBC
variable = disp_y
preset = false
boundary = block_right
function = '-t'
[]
[]
[Materials]
[plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = 'plank block'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 5.0
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
nl_abs_tol = 1e-7
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/solid_mechanics/test/tests/rom_stress_update/AD_finite_strain_power_law_creep.i)
[GlobalParams]
displacements = 'disp_r disp_z'
[]
[Problem]
coord_type = RZ
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 1
xmax = 2
nx = 50
ny = 50
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
incremental = true
add_variables = true
eigenstrain_names = 'thermal'
use_automatic_differentiation = true
[]
[]
[AuxVariables]
[temp]
initial_condition = 1000.0
[]
[]
[AuxKernels]
[cooling]
type = FunctionAux
variable = temp
function = '1000-10*t*x'
[]
[]
[BCs]
[top_pull]
type = ADFunctionNeumannBC
variable = disp_z
boundary = top
function = '1e7*t'
use_displaced_mesh = true
[]
[bottom_fix]
type = ADDirichletBC
variable = disp_z
boundary = bottom
value = 0.0
[]
[left_fix]
type = ADDirichletBC
variable = disp_r
boundary = left
value = 0.0
[]
[]
[Materials]
[eigenstrain]
type = ADComputeThermalExpansionEigenstrain
eigenstrain_name = 'thermal'
stress_free_temperature = 1000
thermal_expansion_coeff = 1e-4
temperature = temp
[]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 2e11
poissons_ratio = 0.3
[]
[stress]
type = ADComputeMultipleInelasticStress
inelastic_models = 'creep'
[]
[creep]
type = ADPowerLawCreepStressUpdate
coefficient = 1.0e-15
n_exponent = 4
activation_energy = 3.0e5
temperature = temp
[]
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
end_time = 10
dt = 1
automatic_scaling = true
[]
[Outputs]
print_linear_converged_reason = false
print_nonlinear_converged_reason = false
print_linear_residuals = false
perf_graph = true
[]
(modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_frictional_al.i)
[GlobalParams]
volumetric_locking_correction = true
displacements = 'disp_x disp_y'
[]
[Mesh]
[input_file]
type = FileMeshGenerator
file = hertz_cyl_finer.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10001
new_block_name = 'secondary_lower'
sidesets = '3'
input = input_file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10000
sidesets = '2'
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Problem]
type = AugmentedLagrangianContactFEProblem
extra_tag_vectors = 'ref'
[]
[AuxVariables]
[penalty_normal_pressure]
[]
[penalty_frictional_pressure]
[]
[accumulated_slip_one]
[]
[tangential_vel_one]
[]
[normal_gap]
[]
[normal_lm]
[]
[saved_x]
[]
[saved_y]
[]
[active]
[]
[dual_var]
use_dual = true
block = '10001'
[]
[]
[Functions]
[disp_ramp_vert]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. -0.020 -0.020'
[]
[disp_ramp_horz]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. 0.0 0.015'
[]
[]
[Modules/TensorMechanics/Master/all]
strain = FINITE
add_variables = true
save_in = 'saved_x saved_y'
extra_vector_tags = 'ref'
block = '1 2 3 4 5 6 7'
generate_output = 'stress_xx stress_yy stress_xy'
[]
[AuxKernels]
[penalty_normal_pressure]
type = PenaltyMortarUserObjectAux
variable = penalty_normal_pressure
user_object = friction_uo
contact_quantity = normal_pressure
boundary = 3
[]
[penalty_frictional_pressure]
type = PenaltyMortarUserObjectAux
variable = penalty_frictional_pressure
user_object = friction_uo
contact_quantity = tangential_pressure_one
boundary = 3
[]
[penalty_tangential_vel_one]
type = PenaltyMortarUserObjectAux
variable = tangential_vel_one
user_object = friction_uo
contact_quantity = tangential_velocity_one
boundary = 3
[]
[penalty_accumulated_slip_one]
type = PenaltyMortarUserObjectAux
variable = accumulated_slip_one
user_object = friction_uo
contact_quantity = accumulated_slip_one
boundary = 3
[]
[normal_lm]
type = PenaltyMortarUserObjectAux
variable = normal_lm
user_object = friction_uo
contact_quantity = normal_lm
boundary = 3
[]
[normal_gap]
type = PenaltyMortarUserObjectAux
variable = normal_gap
user_object = friction_uo
contact_quantity = normal_gap
boundary = 3
[]
[]
[Postprocessors]
[bot_react_x]
type = NodalSum
variable = saved_x
boundary = 1
[]
[bot_react_y]
type = NodalSum
variable = saved_y
boundary = 1
[]
[top_react_x]
type = NodalSum
variable = saved_x
boundary = 4
[]
[top_react_y]
type = NodalSum
variable = saved_y
boundary = 4
[]
[_dt]
type = TimestepSize
[]
[num_lin_it]
type = NumLinearIterations
[]
[num_nonlin_it]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nonlin_it
[]
[gap]
type = SideExtremeValue
value_type = min
variable = normal_gap
boundary = 3
[]
[num_al]
type = NumAugmentedLagrangeIterations
[]
[active_set_size]
type = NodalSum
variable = active
[]
[]
[BCs]
[side_x]
type = DirichletBC
variable = disp_y
boundary = '1 2'
value = 0.0
[]
[bot_y]
type = DirichletBC
variable = disp_x
boundary = '1 2'
value = 0.0
[]
[top_y_disp]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = disp_ramp_vert
[]
[top_x_disp]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = disp_ramp_horz
[]
[]
[Materials]
[stuff1_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.0
[]
[stuff1_stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[stuff2_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '2 3 4 5 6 7'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stuff2_stress]
type = ComputeFiniteStrainElasticStress
block = '2 3 4 5 6 7'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = -pc_type
petsc_options_value = lu
line_search = 'basic'
nl_abs_tol = 1e-10
nl_rel_tol = 1e-8
nl_max_its = 50
l_tol = 1e-05
l_abs_tol = 1e-13
start_time = 0.0
end_time = 0.2 # 3.5
dt = 0.1
dtmin = 0.1
[Predictor]
type = SimplePredictor
scale = 1.0
[]
automatic_scaling = true
compute_scaling_once = false
off_diagonals_in_auto_scaling = true
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[surface]
type = NodalValueSampler
use_displaced_mesh = false
variable = 'disp_x disp_y penalty_normal_pressure penalty_frictional_pressure normal_gap'
boundary = '3'
sort_by = id
[]
[]
[Outputs]
print_linear_residuals = true
perf_graph = true
exodus = true
csv = false
[vectorpp_output]
type = CSV
create_final_symlink = true
execute_on = 'INITIAL TIMESTEP_END FINAL'
[]
[]
[UserObjects]
[friction_uo]
type = PenaltyFrictionUserObject
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
disp_x = disp_x
disp_y = disp_y
penalty = 1e5
penalty_friction = 1e8
secondary_variable = disp_x
friction_coefficient = 0.4
penetration_tolerance = 1e-7
# Not solving the frictional problem tightly (below)
slip_tolerance = 1 # 1e-6
penalty_multiplier = 100
penalty_multiplier_friction = 1
use_physical_gap = true
aux_lm = dual_var
[]
[]
[Constraints]
[x]
type = NormalMortarMechanicalContact
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[y]
type = NormalMortarMechanicalContact
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 2
secondary_boundary = 3
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = friction_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 2
secondary_boundary = 3
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = friction_uo
[]
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/small-2d/small.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'small'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[secondary]
input = block_rename
type = LowerDBlockFromSidesetGenerator
sidesets = 'block_left'
new_block_id = '30'
new_block_name = 'frictionless_secondary_subdomain'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'plank_right'
new_block_id = '20'
new_block_name = 'frictionless_primary_subdomain'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[temp]
order = ${order}
block = 'plank block'
scaling = 1e-1
[]
[thermal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
scaling = 1e-7
[]
[frictionless_normal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
use_dual = true
[]
[]
[Modules/TensorMechanics/Master]
[action]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
[]
[]
[Kernels]
[hc]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = 'plank block'
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
lm_variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_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 = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[thermal_contact]
type = GapConductanceConstraint
variable = thermal_lm
secondary_variable = temp
k = 1
use_displaced_mesh = true
primary_boundary = plank_right
primary_subdomain = frictionless_primary_subdomain
secondary_boundary = block_left
secondary_subdomain = frictionless_secondary_subdomain
displacements = 'disp_x disp_y'
[]
[]
[BCs]
[left_temp]
type = DirichletBC
variable = temp
boundary = 'plank_left'
value = 400
[]
[right_temp]
type = DirichletBC
variable = temp
boundary = 'block_right'
value = 300
[]
[left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeLinearElasticStress
block = 'plank block'
[]
[heat_plank]
type = ADHeatConductionMaterial
block = plank
thermal_conductivity = 2
specific_heat = 1
[]
[heat_block]
type = ADHeatConductionMaterial
block = block
thermal_conductivity = 1
specific_heat = 1
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -snes_max_it'
petsc_options_value = 'lu NONZERO 1e-15 20'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'none'
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[avg_temp]
type = ElementAverageValue
variable = temp
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact avg_temp'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/contact/test/tests/mortar_tm/2drz/frictionless_first/small.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'small'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[]
[Modules/TensorMechanics/Master]
[block]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'block'
[]
[plank]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1.0e0
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = DirichletBC
variable = disp_x
boundary = block_right
value = 0
[]
[right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[]
[]
[Materials]
[plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ComputeLinearElasticStress
block = 'plank block'
[]
[swell]
type = ComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[]
[swell_mat]
type = GenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 10
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d-rz/finite_action.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite'
[Mesh]
patch_size = 80
patch_update_strategy = auto
coord_type = RZ
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[temp]
order = ${order}
block = 'plank block'
scaling = 1e-1
[]
[]
[Modules/TensorMechanics/Master]
[action]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
strain = FINITE
[]
[]
[Kernels]
[hc]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = 'plank block'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e6
[]
[]
[MortarGapHeatTransfer]
[mortar_heat_transfer]
temperature = temp
use_displaced_mesh = true
gap_flux_options = conduction
gap_conductivity = 1
boundary = plank_right
primary_boundary = plank_right
primary_subdomain = frictionless_primary_subdomain
secondary_boundary = block_left
secondary_subdomain = frictionless_secondary_subdomain
thermal_lm_scaling = 1e-7
gap_geometry_type = PLATE
[]
[]
[BCs]
[left_temp]
type = DirichletBC
variable = temp
boundary = 'plank_left'
value = 400
[]
[right_temp]
type = DirichletBC
variable = temp
boundary = 'block_right'
value = 300
[]
[left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
preset = false
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
preset = false
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[]
[heat_plank]
type = ADHeatConductionMaterial
block = plank
thermal_conductivity = 2
specific_heat = 1
[]
[heat_block]
type = ADHeatConductionMaterial
block = block
thermal_conductivity = 1
specific_heat = 1
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -snes_max_it'
petsc_options_value = 'lu NONZERO 1e-15 20'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'none'
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[avg_temp]
type = ElementAverageValue
variable = temp
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact avg_temp'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_adaptivity.i)
[GlobalParams]
volumetric_locking_correction = true
displacements = 'disp_x disp_y'
[]
[Mesh]
[input_file]
type = FileMeshGenerator
file = hertz_cyl_coarser.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10001
new_block_name = 'secondary_lower'
sidesets = '3'
input = input_file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10000
sidesets = '2'
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = 'ref'
[]
[AuxVariables]
[penalty_normal_pressure]
[]
[penalty_frictional_pressure]
[]
[accumulated_slip_one]
[]
[tangential_vel_one]
[]
[normal_gap]
[]
[react_x]
[]
[react_y]
[]
[]
[Functions]
[disp_ramp_vert]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. -0.020 -0.020'
[]
[disp_ramp_horz]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. 0.0 0.015'
[]
[]
[Modules/TensorMechanics/Master/all]
strain = FINITE
add_variables = true
extra_vector_tags = 'ref'
block = '1 2 3 4 5 6 7'
generate_output = 'stress_xx stress_yy stress_xy'
[]
[AuxKernels]
[penalty_normal_pressure]
type = PenaltyMortarUserObjectAux
variable = penalty_normal_pressure
user_object = friction_uo
contact_quantity = normal_pressure
[]
[penalty_frictional_pressure]
type = PenaltyMortarUserObjectAux
variable = penalty_frictional_pressure
user_object = friction_uo
contact_quantity = tangential_pressure_one
[]
[penalty_accumulated_slip]
type = PenaltyMortarUserObjectAux
variable = accumulated_slip_one
user_object = friction_uo
contact_quantity = accumulated_slip_one
[]
[penalty_tangential_vel]
type = PenaltyMortarUserObjectAux
variable = tangential_vel_one
user_object = friction_uo
contact_quantity = tangential_velocity_one
[]
[penalty_gap]
type = PenaltyMortarUserObjectAux
variable = normal_gap
user_object = friction_uo
contact_quantity = normal_gap
[]
[react_x]
type = TagVectorAux
vector_tag = 'ref'
v = 'disp_x'
variable = 'react_x'
[]
[react_y]
type = TagVectorAux
vector_tag = 'ref'
v = 'disp_y'
variable = 'react_y'
[]
[]
[Postprocessors]
[bot_react_x]
type = NodalSum
variable = react_x
boundary = 1
[]
[bot_react_y]
type = NodalSum
variable = react_y
boundary = 1
[]
[top_react_x]
type = NodalSum
variable = react_x
boundary = 4
[]
[top_react_y]
type = NodalSum
variable = react_y
boundary = 4
[]
[_dt]
type = TimestepSize
[]
[num_lin_it]
type = NumLinearIterations
[]
[num_nonlin_it]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nonlin_it
[]
[gap]
type = SideExtremeValue
value_type = min
variable = normal_gap
boundary = 3
[]
[num_al]
type = NumAugmentedLagrangeIterations
[]
[]
[BCs]
[side_x]
type = DirichletBC
variable = disp_y
boundary = '1 2'
value = 0.0
[]
[bot_y]
type = DirichletBC
variable = disp_x
boundary = '1 2'
value = 0.0
[]
[top_y_disp]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = disp_ramp_vert
[]
[top_x_disp]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = disp_ramp_horz
[]
[]
[Materials]
[stuff1_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e10
poissons_ratio = 0.0
[]
[stuff1_stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[stuff2_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '2 3 4 5 6 7'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stuff2_stress]
type = ComputeFiniteStrainElasticStress
block = '2 3 4 5 6 7'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15 1e-5'
line_search = 'none'
nl_abs_tol = 1e-10
start_time = 0.0
end_time = 0.3 # 3.5
l_tol = 1e-4
dt = 0.1
dtmin = 0.001
[Predictor]
type = SimplePredictor
scale = 1.0
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[surface]
type = NodalValueSampler
use_displaced_mesh = false
variable = 'disp_x disp_y penalty_normal_pressure penalty_frictional_pressure normal_gap'
boundary = '3'
sort_by = id
[]
[]
[Outputs]
print_linear_residuals = true
perf_graph = true
exodus = true
csv = false
[console]
type = Console
max_rows = 5
[]
[vectorpp_output]
type = CSV
create_final_symlink = true
file_base = cylinder_friction_penalty_adaptivity
execute_on = 'INITIAL TIMESTEP_END FINAL'
[]
[]
[UserObjects]
[friction_uo]
type = PenaltyFrictionUserObject
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
disp_x = disp_x
disp_y = disp_y
friction_coefficient = 0.4
secondary_variable = disp_x
penalty = 5e7
penalty_friction = 5e8
[]
[geo]
type = GeometrySphere
boundary = 3
center = '0 4 0'
radius = 3
[]
[]
[Adaptivity]
[Markers]
[contact]
type = BoundaryMarker
mark = REFINE
next_to = 3
[]
[]
initial_marker = contact
initial_steps = 2
[]
[Constraints]
[x]
type = NormalMortarMechanicalContact
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[y]
type = NormalMortarMechanicalContact
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 2
secondary_boundary = 3
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = friction_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 2
secondary_boundary = 3
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = friction_uo
[]
[]
(modules/contact/test/tests/mortar_restart/frictional_bouncing_block_action_restart_2.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = frictional_bouncing_block_action_restart_1_checkpoint_cp/0021-mesh.cpr
skip_partitioning = true
allow_renumbering = false
[]
uniform_refine = 0 # 1,2
patch_update_strategy = always
[]
[Problem]
#Note that the suffix is left off in the parameter below.
restart_file_base = frictional_bouncing_block_action_restart_1_checkpoint_cp/LATEST # You may also use a specific number here
kernel_coverage_check = false
material_coverage_check = false
# disp_y has an initial condition despite the checkpoint restart
allow_initial_conditions_with_restart = true
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
generate_output = 'stress_xx stress_yy'
block = '1 2'
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e3
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[]
[Contact]
[frictional]
primary = 20
secondary = 10
formulation = mortar
model = coulomb
friction_coefficient = 0.4
c_normal = 1.0e1
c_tangential = 1.0e6
generate_mortar_mesh = false
[]
[]
[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 = ADFunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 20 * t) + ${offset}'
preset = false
[]
[leftx]
type = ADFunctionDirichletBC
variable = disp_x
boundary = 30
function = '2e-2 * t'
# function = '0'
preset = false
[]
[]
[Executioner]
type = Transient
end_time = 6 # 70
start_time = 5.25
dt = 0.25 # 0.1 for finer meshes (uniform_refine)
dtmin = .01
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor -snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu superlu_dist NONZERO 1e-13 1e-5'
l_max_its = 30
nl_max_its = 40
line_search = 'basic'
snesmf_reuse_base = false
nl_abs_tol = 1e-9
nl_rel_tol = 1e-9
l_tol = 1e-07 # Tightening l_tol can help with friction
[]
[Debug]
show_var_residual_norms = true
[]
[VectorPostprocessors]
[cont_press]
type = NodalValueSampler
variable = frictional_normal_lm
boundary = '10'
sort_by = x
execute_on = FINAL
[]
[friction]
type = NodalValueSampler
variable = frictional_tangential_lm
boundary = '10'
sort_by = x
execute_on = FINAL
[]
[]
[Outputs]
exodus = true
[checkfile]
type = CSV
show = 'cont_press friction'
start_time = 0.0
execute_vector_postprocessors_on = FINAL
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative_nli contact cumulative_li num_l'
[num_nl]
type = NumNonlinearIterations
[]
[num_l]
type = NumLinearIterations
[]
[cumulative_nli]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[cumulative_li]
type = CumulativeValuePostprocessor
postprocessor = num_l
[]
[contact]
type = ContactDOFSetSize
variable = frictional_normal_lm
subdomain = 'frictional_secondary_subdomain'
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_frictional_al_action_amg.i)
[GlobalParams]
volumetric_locking_correction = true
displacements = 'disp_x disp_y'
[]
[Mesh]
[input_file]
type = FileMeshGenerator
file = cond_number.e
[]
allow_renumbering = false
[]
[Problem]
type = AugmentedLagrangianContactFEProblem
extra_tag_vectors = 'ref'
maximum_lagrangian_update_iterations = 1000
[]
[AuxVariables]
[penalty_normal_pressure]
[]
[penalty_frictional_pressure]
[]
[accumulated_slip_one]
[]
[tangential_vel_one]
[]
[normal_gap]
[]
[normal_lm]
[]
[saved_x]
[]
[saved_y]
[]
[active]
[]
[]
[Functions]
[disp_ramp_vert]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. -0.020 -0.020'
[]
[disp_ramp_horz]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. 0.0 0.015'
[]
[]
[Modules/TensorMechanics/Master/all]
strain = FINITE
add_variables = true
save_in = 'saved_x saved_y'
extra_vector_tags = 'ref'
block = '1 2 3 4 5 6 7'
generate_output = 'stress_xx stress_yy stress_xy'
[]
[AuxKernels]
[penalty_normal_pressure]
type = PenaltyMortarUserObjectAux
variable = penalty_normal_pressure
user_object = penalty_friction_object_al_friction
contact_quantity = normal_pressure
boundary = 3
[]
[penalty_frictional_pressure]
type = PenaltyMortarUserObjectAux
variable = penalty_frictional_pressure
user_object = penalty_friction_object_al_friction
contact_quantity = tangential_pressure_one
boundary = 3
[]
[penalty_tangential_vel_one]
type = PenaltyMortarUserObjectAux
variable = tangential_vel_one
user_object = penalty_friction_object_al_friction
contact_quantity = tangential_velocity_one
boundary = 3
[]
[penalty_accumulated_slip_one]
type = PenaltyMortarUserObjectAux
variable = accumulated_slip_one
user_object = penalty_friction_object_al_friction
contact_quantity = accumulated_slip_one
boundary = 3
[]
[normal_lm]
type = PenaltyMortarUserObjectAux
variable = normal_lm
user_object = penalty_friction_object_al_friction
contact_quantity = normal_lm
boundary = 3
[]
[normal_gap]
type = PenaltyMortarUserObjectAux
variable = normal_gap
user_object = penalty_friction_object_al_friction
contact_quantity = normal_gap
boundary = 3
[]
[]
[Postprocessors]
[bot_react_x]
type = NodalSum
variable = saved_x
boundary = 1
[]
[bot_react_y]
type = NodalSum
variable = saved_y
boundary = 1
[]
[top_react_x]
type = NodalSum
variable = saved_x
boundary = 4
[]
[top_react_y]
type = NodalSum
variable = saved_y
boundary = 4
[]
[_dt]
type = TimestepSize
[]
[num_lin_it]
type = NumLinearIterations
[]
[num_nonlin_it]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nonlin_it
[]
[gap]
type = SideExtremeValue
value_type = min
variable = normal_gap
boundary = 3
[]
[num_al]
type = NumAugmentedLagrangeIterations
[]
[active_set_size]
type = NodalSum
variable = active
[]
[]
[BCs]
[side_x]
type = DirichletBC
variable = disp_y
boundary = '1 2'
value = 0.0
[]
[bot_y]
type = DirichletBC
variable = disp_x
boundary = '1 2'
value = 0.0
[]
[top_y_disp]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = disp_ramp_vert
[]
[top_x_disp]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = disp_ramp_horz
[]
[]
[Materials]
[stuff1_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.0
[]
[stuff1_stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[stuff2_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '2 3 4 5 6 7'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stuff2_stress]
type = ComputeFiniteStrainElasticStress
block = '2 3 4 5 6 7'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-ksp_snes_ew'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = ' 201 hypre boomeramg 8'
line_search = 'none'
nl_abs_tol = 1e-10
nl_rel_tol = 1e-8
nl_max_its = 50
l_tol = 1e-05
l_abs_tol = 1e-13
start_time = 0.0
end_time = 0.2 # 1.0
dt = 0.1
dtmin = 0.1
[Predictor]
type = SimplePredictor
scale = 1.0
[]
automatic_scaling = true
compute_scaling_once = false
off_diagonals_in_auto_scaling = true
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[surface]
type = NodalValueSampler
use_displaced_mesh = false
variable = 'disp_x disp_y penalty_normal_pressure penalty_frictional_pressure normal_gap'
boundary = '3'
sort_by = id
[]
[]
[Outputs]
print_linear_residuals = true
perf_graph = true
exodus = true
csv = false
[vectorpp_output]
type = CSV
create_final_symlink = true
execute_on = 'INITIAL TIMESTEP_END FINAL'
[]
[]
[Contact]
[al_friction]
formulation = mortar_penalty
model = coulomb
primary = '2'
secondary = '3'
penalty = 1e7
penalty_friction = 1e+7
friction_coefficient = 0.4
al_penetration_tolerance = 1e-7
al_incremental_slip_tolerance = 1.0 # Not active
penalty_multiplier = 100
[]
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/2d-rc-no-slip.i)
mu = 1.1
rho = 1.1
l = 2
U = 1
advected_interp_method = 'average'
velocity_interp_method = 'rc'
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = vel_x
v = vel_y
pressure = pressure
[]
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 10
ymin = ${fparse -l / 2}
ymax = ${fparse l / 2}
nx = 100
ny = 20
[]
uniform_refine = 0
[]
[Variables]
[vel_x]
type = INSFVVelocityVariable
initial_condition = 1
[]
[vel_y]
type = INSFVVelocityVariable
initial_condition = 1
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = INSFVMomentumAdvection
variable = vel_x
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = vel_x
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = vel_x
momentum_component = 'x'
pressure = pressure
[]
[v_advection]
type = INSFVMomentumAdvection
variable = vel_y
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = vel_y
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = vel_y
momentum_component = 'y'
pressure = pressure
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = vel_x
function = '${U}'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = vel_y
function = '0'
[]
[walls-u]
type = INSFVNoSlipWallBC
boundary = 'top bottom'
variable = vel_x
function = 0
[]
[walls-v]
type = INSFVNoSlipWallBC
boundary = 'top bottom'
variable = vel_y
function = 0
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = '0'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
nl_rel_tol = 1e-12
[]
[Preconditioning]
active = FSP
[FSP]
type = FSP
# It is the starting point of splitting
topsplit = 'up' # 'up' should match the following block name
[up]
splitting = 'u p' # 'u' and 'p' are the names of subsolvers
splitting_type = schur
# Splitting type is set as schur, because the pressure part of Stokes-like systems
# is not diagonally dominant. CAN NOT use additive, multiplicative and etc.
#
# Original system:
#
# | Auu Aup | | u | = | f_u |
# | Apu 0 | | p | | f_p |
#
# is factorized into
#
# |I 0 | | Auu 0| | I Auu^{-1}*Aup | | u | = | f_u |
# |Apu*Auu^{-1} I | | 0 -S| | 0 I | | p | | f_p |
#
# where
#
# S = Apu*Auu^{-1}*Aup
#
# The preconditioning is accomplished via the following steps
#
# (1) p* = f_p - Apu*Auu^{-1}f_u,
# (2) p = (-S)^{-1} p*
# (3) u = Auu^{-1}(f_u-Aup*p)
petsc_options_iname = '-pc_fieldsplit_schur_fact_type -pc_fieldsplit_schur_precondition -ksp_gmres_restart -ksp_rtol -ksp_type'
petsc_options_value = 'full selfp 300 1e-4 fgmres'
[]
[u]
vars = 'vel_x vel_y'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_type -ksp_rtol -ksp_gmres_restart -ksp_pc_side'
petsc_options_value = 'hypre boomeramg gmres 5e-1 300 right'
[]
[p]
vars = 'pressure'
petsc_options_iname = '-ksp_type -ksp_gmres_restart -ksp_rtol -pc_type -ksp_pc_side'
petsc_options_value = 'gmres 300 5e-1 jacobi right'
[]
[]
[SMP]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
[]
[]
[Outputs]
print_linear_residuals = true
print_nonlinear_residuals = true
[out]
type = Exodus
hide = 'Re lin cum_lin'
[]
[perf]
type = PerfGraphOutput
[]
[]
[Postprocessors]
[Re]
type = ParsedPostprocessor
function = '${rho} * ${l} * ${U}'
pp_names = ''
[]
[lin]
type = NumLinearIterations
[]
[cum_lin]
type = CumulativeValuePostprocessor
postprocessor = lin
[]
[]
(modules/combined/test/tests/nodal_patch_recovery/npr_with_lower_domains.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[secondary]
input = block_rename
type = LowerDBlockFromSidesetGenerator
sidesets = 'block_left'
new_block_id = '30'
new_block_name = 'frictionless_secondary_subdomain'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'plank_right'
new_block_id = '20'
new_block_name = 'frictionless_primary_subdomain'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[temp]
order = ${order}
block = 'plank block'
scaling = 1e-1
[]
[thermal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
scaling = 1e-7
[]
[frictionless_normal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
use_dual = true
[]
[]
[AuxVariables]
[stress_xx]
order = FIRST
family = MONOMIAL
block = 'plank block'
[]
[stress_yy]
order = FIRST
family = MONOMIAL
block = 'plank block'
[]
[stress_xx_recovered]
order = FIRST
family = LAGRANGE
block = 'plank block'
[]
[stress_yy_recovered]
order = FIRST
family = LAGRANGE
block = 'plank block'
[]
[]
[AuxKernels]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
execute_on = 'timestep_end'
block = 'plank block'
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
execute_on = 'timestep_end'
block = 'plank block'
[]
[stress_xx_recovered]
type = NodalPatchRecoveryAux
variable = stress_xx_recovered
nodal_patch_recovery_uo = stress_xx_patch
execute_on = 'TIMESTEP_END'
block = 'plank block'
[]
[stress_yy_recovered]
type = NodalPatchRecoveryAux
variable = stress_yy_recovered
nodal_patch_recovery_uo = stress_yy_patch
execute_on = 'TIMESTEP_END'
block = 'plank block'
[]
[]
[Modules/TensorMechanics/Master]
[action]
generate_output = 'stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = false
strain = FINITE
[]
[]
[Kernels]
[hc]
type = HeatConduction
variable = temp
use_displaced_mesh = true
block = 'plank block'
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
lm_variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
[]
[stress_xx_patch]
type = NodalPatchRecoveryMaterialProperty
patch_polynomial_order = FIRST
property = 'stress'
component = '0 0'
execute_on = 'NONLINEAR TIMESTEP_END'
block = 'plank block'
[]
[stress_yy_patch]
type = NodalPatchRecoveryMaterialProperty
patch_polynomial_order = FIRST
property = 'stress'
component = '1 1'
execute_on = 'NONLINEAR TIMESTEP_END'
block = 'plank block'
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_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 = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[thermal_contact]
type = GapConductanceConstraint
variable = thermal_lm
secondary_variable = temp
k = 1
use_displaced_mesh = true
primary_boundary = plank_right
primary_subdomain = frictionless_primary_subdomain
secondary_boundary = block_left
secondary_subdomain = frictionless_secondary_subdomain
displacements = 'disp_x disp_y'
[]
[]
[BCs]
[left_temp]
type = DirichletBC
variable = temp
boundary = 'plank_left'
value = 400
[]
[right_temp]
type = DirichletBC
variable = temp
boundary = 'block_right'
value = 300
[]
[left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = FunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
preset = false
[]
[right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
preset = false
[]
[]
[Materials]
[plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = 'plank block'
[]
[heat_plank]
type = HeatConductionMaterial
block = plank
thermal_conductivity = 2
specific_heat = 1
[]
[heat_block]
type = HeatConductionMaterial
block = block
thermal_conductivity = 1
specific_heat = 1
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -snes_max_it'
petsc_options_value = 'lu NONZERO 1e-15 20'
end_time = 0.4
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'none'
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[avg_temp]
type = ElementAverageValue
variable = temp
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[stress_xx_recovered]
type = ElementExtremeValue
variable = stress_xx_recovered
block = 'block'
value_type = max
[]
[stress_yy_recovered]
type = ElementExtremeValue
variable = stress_yy_recovered
block = 'block'
value_type = max
[]
[]
[Outputs]
exodus = true
[comp]
type = CSV
show = 'contact avg_temp'
[]
[out]
type = CSV
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_frictional_al_action_amg_bussetta_simple.i)
[GlobalParams]
volumetric_locking_correction = true
displacements = 'disp_x disp_y'
[]
[Mesh]
[input_file]
type = FileMeshGenerator
file = cond_number.e
[]
allow_renumbering = false
[]
[Problem]
type = AugmentedLagrangianContactFEProblem
extra_tag_vectors = 'ref'
maximum_lagrangian_update_iterations = 1000
[]
[AuxVariables]
[penalty_normal_pressure]
[]
[penalty_frictional_pressure]
[]
[accumulated_slip_one]
[]
[tangential_vel_one]
[]
[normal_gap]
[]
[normal_lm]
[]
[saved_x]
[]
[saved_y]
[]
[active]
[]
[]
[Functions]
[disp_ramp_vert]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. -0.020 -0.020'
[]
[disp_ramp_horz]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. 0.0 0.015'
[]
[]
[Modules/TensorMechanics/Master/all]
strain = FINITE
add_variables = true
save_in = 'saved_x saved_y'
extra_vector_tags = 'ref'
block = '1 2 3 4 5 6 7'
generate_output = 'stress_xx stress_yy stress_xy'
[]
[AuxKernels]
[penalty_normal_pressure]
type = PenaltyMortarUserObjectAux
variable = penalty_normal_pressure
user_object = penalty_friction_object_al_friction
contact_quantity = normal_pressure
boundary = 3
[]
[penalty_frictional_pressure]
type = PenaltyMortarUserObjectAux
variable = penalty_frictional_pressure
user_object = penalty_friction_object_al_friction
contact_quantity = tangential_pressure_one
boundary = 3
[]
[penalty_tangential_vel_one]
type = PenaltyMortarUserObjectAux
variable = tangential_vel_one
user_object = penalty_friction_object_al_friction
contact_quantity = tangential_velocity_one
boundary = 3
[]
[penalty_accumulated_slip_one]
type = PenaltyMortarUserObjectAux
variable = accumulated_slip_one
user_object = penalty_friction_object_al_friction
contact_quantity = accumulated_slip_one
boundary = 3
[]
[normal_lm]
type = PenaltyMortarUserObjectAux
variable = normal_lm
user_object = penalty_friction_object_al_friction
contact_quantity = normal_lm
boundary = 3
[]
[normal_gap]
type = PenaltyMortarUserObjectAux
variable = normal_gap
user_object = penalty_friction_object_al_friction
contact_quantity = normal_gap
boundary = 3
[]
[]
[Postprocessors]
[bot_react_x]
type = NodalSum
variable = saved_x
boundary = 1
[]
[bot_react_y]
type = NodalSum
variable = saved_y
boundary = 1
[]
[top_react_x]
type = NodalSum
variable = saved_x
boundary = 4
[]
[top_react_y]
type = NodalSum
variable = saved_y
boundary = 4
[]
[_dt]
type = TimestepSize
[]
[num_lin_it]
type = NumLinearIterations
[]
[num_nonlin_it]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nonlin_it
[]
[gap]
type = SideExtremeValue
value_type = min
variable = normal_gap
boundary = 3
[]
[num_al]
type = NumAugmentedLagrangeIterations
[]
[active_set_size]
type = NodalSum
variable = active
[]
[]
[BCs]
[side_x]
type = DirichletBC
variable = disp_y
boundary = '1 2'
value = 0.0
[]
[bot_y]
type = DirichletBC
variable = disp_x
boundary = '1 2'
value = 0.0
[]
[top_y_disp]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = disp_ramp_vert
[]
[top_x_disp]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = disp_ramp_horz
[]
[]
[Materials]
[stuff1_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.0
[]
[stuff1_stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[stuff2_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '2 3 4 5 6 7'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stuff2_stress]
type = ComputeFiniteStrainElasticStress
block = '2 3 4 5 6 7'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-ksp_snes_ew'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = ' 201 hypre boomeramg 8'
line_search = 'none'
nl_abs_tol = 1e-10
nl_rel_tol = 1e-8
nl_max_its = 50
l_tol = 1e-05
l_abs_tol = 1e-13
start_time = 0.0
end_time = 0.1 # 1.0
dt = 0.1
dtmin = 0.1
[Predictor]
type = SimplePredictor
scale = 1.0
[]
automatic_scaling = true
compute_scaling_once = false
off_diagonals_in_auto_scaling = true
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[surface]
type = NodalValueSampler
use_displaced_mesh = false
variable = 'disp_x disp_y penalty_normal_pressure penalty_frictional_pressure normal_gap'
boundary = '3'
sort_by = id
[]
[]
[Outputs]
print_linear_residuals = true
perf_graph = true
exodus = true
csv = false
[vectorpp_output]
type = CSV
create_final_symlink = true
execute_on = 'INITIAL TIMESTEP_END FINAL'
[]
[]
[Contact]
[al_friction]
formulation = mortar_penalty
model = coulomb
primary = '2'
secondary = '3'
penalty = 1e7
penalty_friction = 1e+7
friction_coefficient = 0.4
adaptivity_penalty_friction = SIMPLE
adaptivity_penalty_normal = BUSSETTA
al_penetration_tolerance = 1e-7
al_incremental_slip_tolerance = 1e-5 # Not active
penalty_multiplier = 100
penalty_multiplier_friction = 5
[]
[]
(modules/contact/test/tests/3d-mortar-contact/frictionless-mortar-3d-action.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[disp_z]
block = '1 2'
[]
[]
[ICs]
[disp_z]
block = 1
variable = disp_z
value = '${fparse offset}'
type = ConstantIC
[]
[disp_x]
block = 1
variable = disp_x
value = 0
type = ConstantIC
[]
[disp_y]
block = 1
variable = disp_y
value = 0
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[disp_z]
type = MatDiffusion
variable = disp_z
[]
[]
[Contact]
[mortar]
primary = 'bottom_top'
secondary = 'top_bottom'
formulation = mortar
model = frictionless
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Executioner]
type = Transient
end_time = 1
dt = .5
dtmin = .01
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15 1e-5'
l_max_its = 100
nl_max_its = 30
nl_abs_tol = 1e-12
nl_rel_tol = 1e-9
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
csv = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = mortar_normal_lm
subdomain = 'mortar_secondary_subdomain'
execute_on = 'nonlinear timestep_end'
[]
[lambda]
type = ElementAverageValue
variable = mortar_normal_lm
block = 'mortar_secondary_subdomain'
[]
[]
[VectorPostprocessors]
[contact-pressure]
type = NodalValueSampler
block = mortar_secondary_subdomain
variable = mortar_normal_lm
sort_by = 'id'
execute_on = NONLINEAR
[]
[]
(modules/contact/test/tests/bouncing-block-contact/frictional-penalty-weighted-vel.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
preset = false
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[]
[UserObjects]
[weighted_vel_uo]
type = PenaltyFrictionUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
secondary_variable = disp_x
disp_x = disp_x
disp_y = disp_y
penalty = 5e1
penalty_friction = 1e0
friction_coefficient = 0.4
[]
[]
[Constraints]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[tangent_x]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangent_y]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_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 / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = true
abort_on_solve_fail = true
nl_rel_tol = 1e-12
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[]
(modules/contact/test/tests/mortar_tm/2d/frictionless_second/small.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD9
order = SECOND
name = 'small'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[]
[Modules/TensorMechanics/Master]
[action]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank block'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e0
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = FunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
[]
[right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[]
[]
[Materials]
[plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ComputeLinearElasticStress
block = 'plank block'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 5.0
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/contact/test/tests/mortar_tm/2d/ad_frictionless_sec/small.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD9
order = SECOND
name = 'small'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[]
[Modules/TensorMechanics/Master]
[action]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e0
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeLinearElasticStress
block = 'plank block'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 5.0
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/porous_flow/examples/ates/ates.i)
# Simulation designed to assess the recovery efficiency of a single-well ATES system
# Using KT stabilisation
# Boundary conditions: fixed porepressure and temperature at top, bottom and far end of model.
#####################################
flux_limiter = minmod # minmod, vanleer, mc, superbee, none
# depth of top of aquifer (m)
depth = 400
inject_fluid_mass = 1E8 # kg
produce_fluid_mass = ${inject_fluid_mass} # kg
inject_temp = 90 # degC
inject_time = 91 # days
store_time = 91 # days
produce_time = 91 # days
rest_time = 91 # days
num_cycles = 5 # Currently needs to be <= 10
cycle_length = ${fparse inject_time + store_time + produce_time + rest_time}
end_simulation = ${fparse cycle_length * num_cycles}
# Note: I have setup 10 cycles but you can set num_cycles less than 10.
start_injection1 = 0
start_injection2 = ${cycle_length}
start_injection3 = ${fparse cycle_length * 2}
start_injection4 = ${fparse cycle_length * 3}
start_injection5 = ${fparse cycle_length * 4}
start_injection6 = ${fparse cycle_length * 5}
start_injection7 = ${fparse cycle_length * 6}
start_injection8 = ${fparse cycle_length * 7}
start_injection9 = ${fparse cycle_length * 8}
start_injection10 = ${fparse cycle_length * 9}
end_injection1 = ${fparse start_injection1 + inject_time}
end_injection2 = ${fparse start_injection2 + inject_time}
end_injection3 = ${fparse start_injection3 + inject_time}
end_injection4 = ${fparse start_injection4 + inject_time}
end_injection5 = ${fparse start_injection5 + inject_time}
end_injection6 = ${fparse start_injection6 + inject_time}
end_injection7 = ${fparse start_injection7 + inject_time}
end_injection8 = ${fparse start_injection8 + inject_time}
end_injection9 = ${fparse start_injection9 + inject_time}
end_injection10 = ${fparse start_injection10 + inject_time}
start_production1 = ${fparse end_injection1 + store_time}
start_production2 = ${fparse end_injection2 + store_time}
start_production3 = ${fparse end_injection3 + store_time}
start_production4 = ${fparse end_injection4 + store_time}
start_production5 = ${fparse end_injection5 + store_time}
start_production6 = ${fparse end_injection6 + store_time}
start_production7 = ${fparse end_injection7 + store_time}
start_production8 = ${fparse end_injection8 + store_time}
start_production9 = ${fparse end_injection9 + store_time}
start_production10 = ${fparse end_injection10 + store_time}
end_production1 = ${fparse start_production1 + produce_time}
end_production2 = ${fparse start_production2 + produce_time}
end_production3 = ${fparse start_production3 + produce_time}
end_production4 = ${fparse start_production4 + produce_time}
end_production5 = ${fparse start_production5 + produce_time}
end_production6 = ${fparse start_production6 + produce_time}
end_production7 = ${fparse start_production7 + produce_time}
end_production8 = ${fparse start_production8 + produce_time}
end_production9 = ${fparse start_production9 + produce_time}
end_production10 = ${fparse start_production10 + produce_time}
synctimes = '${start_injection1} ${end_injection1} ${start_production1} ${end_production1}
${start_injection2} ${end_injection2} ${start_production2} ${end_production2}
${start_injection3} ${end_injection3} ${start_production3} ${end_production3}
${start_injection4} ${end_injection4} ${start_production4} ${end_production4}
${start_injection5} ${end_injection5} ${start_production5} ${end_production5}
${start_injection6} ${end_injection6} ${start_production6} ${end_production6}
${start_injection7} ${end_injection7} ${start_production7} ${end_production7}
${start_injection8} ${end_injection8} ${start_production8} ${end_production8}
${start_injection9} ${end_injection9} ${start_production9} ${end_production9}
${start_injection10} ${end_injection10} ${start_production10} ${end_production10}'
#####################################
# Geometry in RZ coordinates
# borehole radius (m)
bh_r = 0.1
# model radius (m)
max_r = 1000
# aquifer thickness (m)
aq_thickness = 20
# cap thickness (m)
cap_thickness = 40
# injection region top and bottom (m). Note, the mesh is created with the aquifer in y = (-0.5 * aq_thickness, 0.5 * aq_thickness), irrespective of depth (depth only sets the insitu porepressure and temperature)
screen_top = ${fparse 0.5 * aq_thickness}
screen_bottom = ${fparse -0.5 * aq_thickness}
# number of elements in radial direction
num_r = 25
# number of elements across half height of aquifer
num_y_aq = 10
# number of elements across height of cap
num_y_cap = 8
# mesh bias in radial direction
bias_r = 1.22
# mesh bias in vertical direction in aquifer top
bias_y_aq_top = 0.9
# mesh bias in vertical direction in cap top
bias_y_cap_top = 1.3
# mesh bias in vertical direction in aquifer bottom
bias_y_aq_bottom = ${fparse 1.0 / bias_y_aq_top}
# mesh bias in vertical direction in cap bottom
bias_y_cap_bottom = ${fparse 1.0 / bias_y_cap_top}
depth_centre = ${fparse depth + aq_thickness/2}
#####################################
# temperature at ground surface (degC)
temp0 = 20
# Vertical geothermal gradient (K/m). A positive number means temperature increases downwards.
geothermal_gradient = 20E-3
#####################################
# Gravity
gravity = -9.81
#####################################
half_aq_thickness = ${fparse aq_thickness * 0.5}
half_height = ${fparse half_aq_thickness + cap_thickness}
approx_screen_length = ${fparse screen_top - screen_bottom}
# Thermal radius (note this is not strictly correct, it should use the bulk specific heat
# capacity as defined below, but it doesn't matter here because this is purely for
# defining the region of refined mesh)
th_r = ${fparse sqrt(inject_fluid_mass / 1000 * 4.12e6 / (approx_screen_length * 3.1416 * aq_specific_heat_cap * aq_density))}
# radius of fine mesh
fine_r = ${fparse th_r * 2}
bias_r_fine = 1
num_r_fine = ${fparse int(fine_r/1)}
######################################
# aquifer properties
aq_porosity = 0.25
aq_hor_perm = 1E-11 # m^2
aq_ver_perm = 2E-12 # m^2
aq_density = 2650 # kg/m^3
aq_specific_heat_cap = 800 # J/Kg/K
aq_hor_thermal_cond = 3 # W/m/K
aq_ver_thermal_cond = 3 # W/m/K
aq_disp_parallel = 0 # m
aq_disp_perp = 0 # m
# Bulk volumetric heat capacity of aquifer:
aq_vol_cp = ${fparse aq_specific_heat_cap * aq_density * (1 - aq_porosity) + 4180 * 1000 * aq_porosity}
# Thermal radius (correct version using bulk cp):
R_th = ${fparse sqrt(inject_fluid_mass * 4180 / (approx_screen_length * 3.1416 * aq_vol_cp))}
aq_lambda_eff_hor = ${fparse aq_hor_thermal_cond + 0.3 * aq_disp_parallel * R_th * aq_vol_cp / (inject_time * 60 * 60 * 24)}
aq_lambda_eff_ver = ${fparse aq_ver_thermal_cond + 0.3 * aq_disp_perp * R_th * aq_vol_cp / (inject_time * 60 * 60 * 24)}
aq_hor_dry_thermal_cond = ${fparse aq_lambda_eff_hor * 60 * 60 * 24} # J/day/m/K
aq_ver_dry_thermal_cond = ${fparse aq_lambda_eff_ver * 60 * 60 * 24} # J/day/m/K
aq_hor_wet_thermal_cond = ${fparse aq_lambda_eff_hor * 60 * 60 * 24} # J/day/m/K
aq_ver_wet_thermal_cond = ${fparse aq_lambda_eff_ver * 60 * 60 * 24} # J/day/m/K
# cap-rock properties
cap_porosity = 0.25
cap_hor_perm = 1E-16 # m^2
cap_ver_perm = 1E-17 # m^2
cap_density = 2650 # kg/m^3
cap_specific_heat_cap = 800 # J/kg/K
cap_hor_thermal_cond = 3 # W/m/K
cap_ver_thermal_cond = 3 # W/m/K
cap_hor_dry_thermal_cond = ${fparse cap_hor_thermal_cond * 60 * 60 * 24} # J/day/m/K
cap_ver_dry_thermal_cond = ${fparse cap_ver_thermal_cond * 60 * 60 * 24} # J/day/m/K
cap_hor_wet_thermal_cond = ${fparse cap_hor_thermal_cond * 60 * 60 * 24} # J/day/m/K
cap_ver_wet_thermal_cond = ${fparse cap_ver_thermal_cond * 60 * 60 * 24} # J/day/m/K
######################################
[Mesh]
coord_type = RZ
[aq_top_fine]
type = GeneratedMeshGenerator
dim = 2
nx = ${num_r_fine}
xmin = ${bh_r}
xmax = ${fine_r}
bias_x = ${bias_r_fine}
bias_y = ${bias_y_aq_top}
ny = ${num_y_aq}
ymin = 0
ymax = ${half_aq_thickness}
[]
[cap_top_fine]
type = GeneratedMeshGenerator
dim = 2
nx = ${num_r_fine}
xmin = ${bh_r}
xmax = ${fine_r}
bias_x = ${bias_r_fine}
bias_y = ${bias_y_cap_top}
ny = ${num_y_cap}
ymax = ${half_height}
ymin = ${half_aq_thickness}
[]
[aq_and_cap_top_fine]
type = StitchedMeshGenerator
inputs = 'aq_top_fine cap_top_fine'
clear_stitched_boundary_ids = true
stitch_boundaries_pairs = 'top bottom'
[]
[aq_bottom_fine]
type = GeneratedMeshGenerator
dim = 2
nx = ${num_r_fine}
xmin = ${bh_r}
xmax = ${fine_r}
bias_x = ${bias_r_fine}
bias_y = ${bias_y_aq_bottom}
ny = ${num_y_aq}
ymax = 0
ymin = -${half_aq_thickness}
[]
[cap_bottom_fine]
type = GeneratedMeshGenerator
dim = 2
nx = ${num_r_fine}
xmin = ${bh_r}
xmax = ${fine_r}
bias_x = ${bias_r_fine}
bias_y = ${bias_y_cap_bottom}
ny = ${num_y_cap}
ymin = -${half_height}
ymax = -${half_aq_thickness}
[]
[aq_and_cap_bottom_fine]
type = StitchedMeshGenerator
inputs = 'aq_bottom_fine cap_bottom_fine'
clear_stitched_boundary_ids = true
stitch_boundaries_pairs = 'bottom top'
[]
[aq_and_cap_fine]
type = StitchedMeshGenerator
inputs = 'aq_and_cap_bottom_fine aq_and_cap_top_fine'
clear_stitched_boundary_ids = true
stitch_boundaries_pairs = 'top bottom'
[]
[aq_top]
type = GeneratedMeshGenerator
dim = 2
nx = ${num_r}
xmin = ${fine_r}
xmax = ${max_r}
bias_x = ${bias_r}
bias_y = ${bias_y_aq_top}
ny = ${num_y_aq}
ymin = 0
ymax = ${half_aq_thickness}
[]
[cap_top]
type = GeneratedMeshGenerator
dim = 2
nx = ${num_r}
xmin = ${fine_r}
xmax = ${max_r}
bias_x = ${bias_r}
bias_y = ${bias_y_cap_top}
ny = ${num_y_cap}
ymax = ${half_height}
ymin = ${half_aq_thickness}
[]
[aq_and_cap_top]
type = StitchedMeshGenerator
inputs = 'aq_top cap_top'
clear_stitched_boundary_ids = true
stitch_boundaries_pairs = 'top bottom'
[]
[aq_bottom]
type = GeneratedMeshGenerator
dim = 2
nx = ${num_r}
xmin = ${fine_r}
xmax = ${max_r}
bias_x = ${bias_r}
bias_y = ${bias_y_aq_bottom}
ny = ${num_y_aq}
ymax = 0
ymin = -${half_aq_thickness}
[]
[cap_bottom]
type = GeneratedMeshGenerator
dim = 2
nx = ${num_r}
xmin = ${fine_r}
xmax = ${max_r}
bias_x = ${bias_r}
bias_y = ${bias_y_cap_bottom}
ny = ${num_y_cap}
ymin = -${half_height}
ymax = -${half_aq_thickness}
[]
[aq_and_cap_bottom]
type = StitchedMeshGenerator
inputs = 'aq_bottom cap_bottom'
clear_stitched_boundary_ids = true
stitch_boundaries_pairs = 'bottom top'
[]
[aq_and_cap]
type = StitchedMeshGenerator
inputs = 'aq_and_cap_bottom aq_and_cap_top'
clear_stitched_boundary_ids = true
stitch_boundaries_pairs = 'top bottom'
[]
[aq_and_cap_all]
type = StitchedMeshGenerator
inputs = 'aq_and_cap_fine aq_and_cap'
clear_stitched_boundary_ids = true
stitch_boundaries_pairs = 'right left'
[]
[aquifer]
type = ParsedSubdomainMeshGenerator
input = aq_and_cap_all
combinatorial_geometry = 'y >= -${half_aq_thickness} & y <= ${half_aq_thickness}'
block_id = 1
[]
[top_cap]
type = ParsedSubdomainMeshGenerator
input = aquifer
combinatorial_geometry = 'y >= ${half_aq_thickness}'
block_id = 2
[]
[bottom_cap]
type = ParsedSubdomainMeshGenerator
input = top_cap
combinatorial_geometry = 'y <= -${half_aq_thickness}'
block_id = 3
[]
[injection_area]
type = ParsedGenerateSideset
combinatorial_geometry = 'x<=${bh_r}*1.000001 & y >= ${screen_bottom} & y <= ${screen_top}'
included_subdomains = 1
new_sideset_name = 'injection_area'
input = 'bottom_cap'
[]
[rename]
type = RenameBlockGenerator
old_block = '1 2 3'
new_block = 'aquifer caps caps'
input = 'injection_area'
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 ${gravity} 0'
[]
[Variables]
[porepressure]
[]
[temperature]
scaling = 1E-5
[]
[]
[PorousFlowFullySaturated]
coupling_type = ThermoHydro
porepressure = porepressure
temperature = temperature
fp = tabulated_water
stabilization = KT
flux_limiter_type = ${flux_limiter}
use_displaced_mesh = false
temperature_unit = Celsius
pressure_unit = Pa
time_unit = days
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = insitu_pressure
[]
[temperature]
type = FunctionIC
variable = temperature
function = insitu_temperature
[]
[]
[BCs]
[outer_boundary_porepressure]
type = FunctionDirichletBC
preset = true
variable = porepressure
function = insitu_pressure
boundary = 'bottom right top'
[]
[outer_boundary_temperature]
type = FunctionDirichletBC
preset = true
variable = temperature
function = insitu_temperature
boundary = 'bottom right top'
[]
[inject_heat]
type = FunctionDirichletBC
variable = temperature
function = ${inject_temp}
boundary = 'injection_area'
[]
[inject_fluid]
type = PorousFlowSink
variable = porepressure
boundary = injection_area
flux_function = injection_rate_value
[]
[produce_heat]
type = PorousFlowSink
variable = temperature
boundary = injection_area
flux_function = production_rate_value
fluid_phase = 0
use_enthalpy = true
save_in = heat_flux_out
[]
[produce_fluid]
type = PorousFlowSink
variable = porepressure
boundary = injection_area
flux_function = production_rate_value
[]
[]
[Controls]
[inject_on]
type = ConditionalFunctionEnableControl
enable_objects = 'BCs::inject_heat BCs::inject_fluid'
conditional_function = inject
implicit = false
execute_on = 'initial timestep_begin'
[]
[produce_on]
type = ConditionalFunctionEnableControl
enable_objects = 'BCs::produce_heat BCs::produce_fluid'
conditional_function = produce
implicit = false
execute_on = 'initial timestep_begin'
[]
[]
[Functions]
[insitu_pressure]
type = ParsedFunction
expression = '(y - ${depth_centre}) * 1000 * ${gravity} + 1E5' # approx insitu pressure in Pa
[]
[insitu_temperature]
type = ParsedFunction
expression = '${temp0} + (${depth_centre} - y) * ${geothermal_gradient}'
[]
[inject]
type = ParsedFunction
expression = 'if(t >= ${start_injection1} & t < ${end_injection1}, 1,
if(t >= ${start_injection2} & t < ${end_injection2}, 1,
if(t >= ${start_injection3} & t < ${end_injection3}, 1,
if(t >= ${start_injection4} & t < ${end_injection4}, 1,
if(t >= ${start_injection5} & t < ${end_injection5}, 1,
if(t >= ${start_injection6} & t < ${end_injection6}, 1,
if(t >= ${start_injection7} & t < ${end_injection7}, 1,
if(t >= ${start_injection8} & t < ${end_injection8}, 1,
if(t >= ${start_injection9} & t < ${end_injection9}, 1,
if(t >= ${start_injection10} & t < ${end_injection10}, 1, 0))))))))))'
[]
[produce]
type = ParsedFunction
expression = 'if(t >= ${start_production1} & t < ${end_production1}, 1,
if(t >= ${start_production2} & t < ${end_production2}, 1,
if(t >= ${start_production3} & t < ${end_production3}, 1,
if(t >= ${start_production4} & t < ${end_production4}, 1,
if(t >= ${start_production5} & t < ${end_production5}, 1,
if(t >= ${start_production6} & t < ${end_production6}, 1,
if(t >= ${start_production7} & t < ${end_production7}, 1,
if(t >= ${start_production8} & t < ${end_production8}, 1,
if(t >= ${start_production9} & t < ${end_production9}, 1,
if(t >= ${start_production10} & t < ${end_production10}, 1, 0))))))))))'
[]
[injection_rate_value]
type = ParsedFunction
symbol_names = true_screen_area
symbol_values = true_screen_area
expression = '-${inject_fluid_mass}/(true_screen_area * ${inject_time})'
[]
[production_rate_value]
type = ParsedFunction
symbol_names = true_screen_area
symbol_values = true_screen_area
expression = '${produce_fluid_mass}/(true_screen_area * ${produce_time})'
[]
[heat_out_in_timestep]
type = ParsedFunction
symbol_names = 'dt heat_out'
symbol_values = 'dt heat_out_fromBC'
expression = 'dt*heat_out'
[]
[produced_T_time_integrated]
type = ParsedFunction
symbol_names = 'dt produced_T'
symbol_values = 'dt produced_T'
expression = 'dt*produced_T / ${produce_time}'
[]
[]
[AuxVariables]
[density]
family = MONOMIAL
order = CONSTANT
[]
[porosity]
family = MONOMIAL
order = CONSTANT
[]
[heat_flux_out]
outputs = none
[]
[]
[AuxKernels]
[density]
type = PorousFlowPropertyAux
variable = density
property = density
[]
[porosity]
type = PorousFlowPropertyAux
variable = porosity
property = porosity
[]
[]
[FluidProperties]
[true_water]
type = Water97FluidProperties
[]
[tabulated_water]
type = TabulatedFluidProperties
fp = true_water
temperature_min = 275 # K
temperature_max = 600
interpolated_properties = 'density viscosity enthalpy internal_energy'
fluid_property_file = water97_tabulated_modified.csv
[]
[]
[Materials]
[porosity_aq]
type = PorousFlowPorosityConst
porosity = ${aq_porosity}
block = aquifer
[]
[porosity_caps]
type = PorousFlowPorosityConst
porosity = ${cap_porosity}
block = caps
[]
[permeability_aquifer]
type = PorousFlowPermeabilityConst
block = aquifer
permeability = '${aq_hor_perm} 0 0 0 ${aq_ver_perm} 0 0 0 0'
[]
[permeability_caps]
type = PorousFlowPermeabilityConst
block = caps
permeability = '${cap_hor_perm} 0 0 0 ${cap_ver_perm} 0 0 0 0'
[]
[aq_internal_energy]
type = PorousFlowMatrixInternalEnergy
block = aquifer
density = ${aq_density}
specific_heat_capacity = ${aq_specific_heat_cap}
[]
[caps_internal_energy]
type = PorousFlowMatrixInternalEnergy
block = caps
density = ${cap_density}
specific_heat_capacity = ${cap_specific_heat_cap}
[]
[aq_thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
block = aquifer
dry_thermal_conductivity = '${aq_hor_dry_thermal_cond} 0 0 0 ${aq_ver_dry_thermal_cond} 0 0 0 0'
wet_thermal_conductivity = '${aq_hor_wet_thermal_cond} 0 0 0 ${aq_ver_wet_thermal_cond} 0 0 0 0'
[]
[caps_thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
block = caps
dry_thermal_conductivity = '${cap_hor_dry_thermal_cond} 0 0 0 ${cap_ver_dry_thermal_cond} 0 0 0 0'
wet_thermal_conductivity = '${cap_hor_wet_thermal_cond} 0 0 0 ${cap_ver_wet_thermal_cond} 0 0 0 0'
[]
[]
[Postprocessors]
[true_screen_area] # this accounts for meshes that do not match screen_top and screen_bottom exactly
type = AreaPostprocessor
boundary = injection_area
execute_on = 'initial'
outputs = 'none'
[]
[dt]
type = TimestepSize
[]
[heat_out_fromBC]
type = NodalSum
variable = heat_flux_out
boundary = injection_area
execute_on = 'initial timestep_end'
outputs = 'none'
[]
[heat_out_per_timestep]
type = FunctionValuePostprocessor
function = heat_out_in_timestep
execute_on = 'timestep_end'
outputs = 'none'
[]
[heat_out_cumulative]
type = CumulativeValuePostprocessor
postprocessor = heat_out_per_timestep
execute_on = 'timestep_end'
outputs = 'csv console'
[]
[produced_T]
type = SideAverageValue
boundary = injection_area
variable = temperature
execute_on = 'initial timestep_end'
outputs = 'csv console'
[]
[produced_T_time_integrated]
type = FunctionValuePostprocessor
function = produced_T_time_integrated
execute_on = 'timestep_end'
outputs = 'none'
[]
[produced_T_cumulative]
type = CumulativeValuePostprocessor
postprocessor = produced_T_time_integrated
execute_on = 'timestep_end'
outputs = 'csv console'
[]
[]
[Preconditioning]
[basic]
type = SMP
full = true
petsc_options = '-ksp_diagonal_scale -ksp_diagonal_scale_fix'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -pc_asm_overlap'
petsc_options_value = ' asm lu NONZERO 2'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = ${end_simulation}
timestep_tolerance = 1e-5
[TimeStepper]
type = IterationAdaptiveDT
dt = 1e-3
growth_factor = 2
[]
dtmax = 1
dtmin = 1e-5
# rough calc for fluid, |R| ~ V*k*1E6 ~ V*1E-5
# rough calc for heat, |R| ~ V*(lam*1E-3 + h*1E-5) ~ V*(1E3 + 1E-2)
# so scale heat by 1E-7 and go for nl_abs_tol = 1E-4, which should give a max error of
# ~1Pa and ~0.1K in the first metre around the borehole
nl_abs_tol = 1E-4
nl_rel_tol = 1E-5
[]
[Outputs]
sync_times = ${synctimes}
[ex]
type = Exodus
time_step_interval = 20
[]
[csv]
type = CSV
execute_postprocessors_on = 'initial timestep_end'
[]
[]
(modules/navier_stokes/test/tests/finite_volume/ins/channel-flow/cylindrical/diverging.i)
mu = 1
rho = 1
advected_interp_method = 'average'
velocity_interp_method = 'rc'
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
v = v
pressure = pressure
[]
[]
[Mesh]
file = diverging.msh
uniform_refine = 2
[]
[Problem]
coord_type = 'RZ'
[]
[Variables]
[u]
type = INSFVVelocityVariable
initial_condition = 1e-15
[]
[v]
type = INSFVVelocityVariable
initial_condition = 1e-15
[]
[pressure]
type = INSFVPressureVariable
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = u
mu = ${mu}
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = u
momentum_component = 'x'
pressure = pressure
[]
[v_advection]
type = INSFVMomentumAdvection
variable = v
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
momentum_component = 'y'
# we can think of the axis as a slip wall boundary, no normal velocity and no viscous shear
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = v
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
[]
[]
[FVBCs]
active = 'inlet-u inlet-v free-slip-wall-u free-slip-wall-v outlet-p axis-u axis-v'
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'bottom'
variable = u
function = 0
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'bottom'
variable = v
function = 1
[]
[free-slip-wall-u]
type = INSFVNaturalFreeSlipBC
boundary = 'right'
variable = u
momentum_component = 'x'
[]
[free-slip-wall-v]
type = INSFVNaturalFreeSlipBC
boundary = 'right'
variable = v
momentum_component = 'y'
[]
[no-slip-wall-u]
type = INSFVNoSlipWallBC
boundary = 'right'
variable = u
function = 0
[]
[no-slip-wall-v]
type = INSFVNoSlipWallBC
boundary = 'right'
variable = v
function = 0
[]
[outlet-p]
type = INSFVOutletPressureBC
boundary = 'top'
variable = pressure
function = 0
[]
[axis-u]
type = INSFVSymmetryVelocityBC
boundary = 'left'
variable = u
u = u
v = v
mu = ${mu}
momentum_component = x
[]
[axis-v]
type = INSFVSymmetryVelocityBC
boundary = 'left'
variable = v
u = u
v = v
mu = ${mu}
momentum_component = y
[]
[axis-p]
type = INSFVSymmetryPressureBC
boundary = 'left'
variable = pressure
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-12
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[in]
type = SideIntegralVariablePostprocessor
variable = v
boundary = 'bottom'
[]
[out]
type = SideIntegralVariablePostprocessor
variable = v
boundary = 'top'
[]
[num_lin]
type = NumLinearIterations
outputs = 'console'
[]
[num_nl]
type = NumNonlinearIterations
outputs = 'console'
[]
[cum_lin]
type = CumulativeValuePostprocessor
outputs = 'console'
postprocessor = 'num_lin'
[]
[cum_nl]
type = CumulativeValuePostprocessor
outputs = 'console'
postprocessor = 'num_nl'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/solid_mechanics/test/tests/rom_stress_update/REG_finite_strain_laromance.i)
[GlobalParams]
displacements = 'disp_r disp_z'
[]
[Problem]
coord_type = RZ
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 1
xmax = 2
nx = 50
ny = 50
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
incremental = true
add_variables = true
eigenstrain_names = 'thermal'
use_automatic_differentiation = false
[]
[]
[AuxVariables]
[temp]
initial_condition = 1000.0
[]
[]
[AuxKernels]
[cooling]
type = FunctionAux
variable = temp
function = '1000-10*t*x'
[]
[]
[BCs]
[bottom_fix]
type = DirichletBC
variable = disp_z
boundary = bottom
value = 0.0
[]
[left_fix]
type = DirichletBC
variable = disp_r
boundary = left
value = 0.0
[]
[]
[Materials]
[eigenstrain]
type = ComputeThermalExpansionEigenstrain
eigenstrain_name = 'thermal'
stress_free_temperature = 1000
thermal_expansion_coeff = 1e-4 #1e-4
temperature = temp
[]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 3.30e11
poissons_ratio = 0.3
[]
[stress]
type = ComputeMultipleInelasticStress
inelastic_models = rom_stress_prediction
[]
[rom_stress_prediction]
type = SS316HLAROMANCEStressUpdateTest
temperature = temp
initial_cell_dislocation_density = 6.0e12
initial_wall_dislocation_density = 4.4e11
outputs = all
[]
[]
[Postprocessors]
[lin_its]
type = NumLinearIterations
[]
[total_lin_its]
type = CumulativeValuePostprocessor
postprocessor = lin_its
[]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
nl_abs_tol = 1e-6
nl_rel_tol = 1e-8
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
line_search = 'none'
end_time = 10
dt = 1
automatic_scaling = true
[]
[Outputs]
# print_linear_converged_reason = false
# print_nonlinear_converged_reason = false
# print_linear_residuals = false
perf_graph = true
[]
(modules/contact/test/tests/tan-pen-and-scaling/bouncing-block-tan-pen.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = long-bottom-block-no-lower-d-coarse.e
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[ICs]
[./disp_y]
block = 2
variable = disp_y
value = ${fparse starting_point + offset}
type = ConstantIC
[../]
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = false
use_automatic_differentiation = true
strain = SMALL
[]
[]
[Materials]
[elasticity]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e3
poissons_ratio = 0.3
constant_on = SUBDOMAIN
[]
[stress]
type = ADComputeLinearElasticStress
[]
[]
[Contact]
[leftright]
secondary = 10
primary = 20
model = coulomb
formulation = tangential_penalty
penalty = 1e3
friction_coefficient = 0.4
normal_smoothing_distance = 0.2
[]
[]
[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 / 40 * t) + ${offset}'
[../]
[./leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[../]
[]
[Executioner]
type = Transient
end_time = 100
dt = 5
dtmin = 5
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_hypre_type -mat_mffd_err -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 1e-5 200'
l_max_its = 200
nl_max_its = 20
line_search = 'none'
automatic_scaling = true
verbose = true
scaling_group_variables = 'disp_x disp_y'
resid_vs_jac_scaling_param = 1
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[exo]
type = Exodus
[]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
[nl]
type = NumNonlinearIterations
[]
[lin]
type = NumLinearIterations
[]
[tot_nl]
type = CumulativeValuePostprocessor
postprocessor = nl
[]
[tot_lin]
type = CumulativeValuePostprocessor
postprocessor = lin
[]
[]
(modules/contact/test/tests/mortar_cartesian_lms/two_block_1st_order_constraint_lm_xy_friction_pg.i)
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
theta = 0
velocity = 0.1
refine = 3
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.35
xmax = -0.05
ymin = -1
ymax = 0
nx = 1
ny = 3
elem_type = QUAD4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_sideset_names]
type = RenameBoundaryGenerator
input = left_block_sidesets
old_boundary = '10 11 12 13'
new_boundary = 'l_bottom l_right l_top l_left'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sideset_names
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.3
ymin = -1
ymax = 0
nx = 1
ny = 2
elem_type = QUAD4
[]
[right_block_sidesets]
type = RenameBoundaryGenerator
input = right_block
old_boundary = '0 1 2 3'
new_boundary = '20 21 22 23'
[]
[right_block_sideset_names]
type = RenameBoundaryGenerator
input = right_block_sidesets
old_boundary = '20 21 22 23'
new_boundary = 'r_bottom r_right r_top r_left'
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block_sideset_names
subdomain_id = 2
[]
[combined_mesh]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_id'
[]
[left_lower]
type = LowerDBlockFromSidesetGenerator
input = combined_mesh
sidesets = '11'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[right_lower]
type = LowerDBlockFromSidesetGenerator
input = left_lower
sidesets = '23'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[rotate_mesh]
type = TransformGenerator
input = right_lower
transform = ROTATE
vector_value = '0 0 ${theta}'
[]
uniform_refine = ${refine}
[]
[Variables]
[lm_x]
block = 'secondary_lower'
use_dual = true
[]
[lm_y]
block = 'secondary_lower'
use_dual = true
[]
[]
[AuxVariables]
[normal_lm]
family = LAGRANGE
order = FIRST
[]
[tangent_lm]
family = LAGRANGE
order = FIRST
[]
[aux_lm]
block = 'secondary_lower'
use_dual = false
[]
[]
[AuxKernels]
[normal_lm]
type = MortarPressureComponentAux
variable = normal_lm
primary_boundary = '23'
secondary_boundary = '11'
lm_var_x = lm_x
lm_var_y = lm_y
component = 'NORMAL'
boundary = '11'
[]
[tangent_lm]
type = MortarPressureComponentAux
variable = tangent_lm
primary_boundary = '23'
secondary_boundary = '11'
lm_var_x = lm_x
lm_var_y = lm_y
component = 'tangent1'
boundary = '11'
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
incremental = true
add_variables = true
block = '1 2'
[]
[]
[Functions]
[horizontal_movement]
type = ParsedFunction
expression = '${velocity} * t * cos(${theta}/180*pi)'
[]
[vertical_movement]
type = ParsedFunction
expression = '${velocity} * t * sin(${theta}/180*pi)'
[]
[]
[BCs]
[push_left_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 13
function = horizontal_movement
[]
[fix_right_x]
type = DirichletBC
variable = disp_x
boundary = 21
value = 0.0
[]
[fix_right_y]
type = DirichletBC
variable = disp_y
boundary = 21
value = 0.0
[]
[push_left_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 13
function = vertical_movement
[]
[]
[Materials]
[elasticity_tensor_left]
type = ComputeIsotropicElasticityTensor
block = 1
youngs_modulus = 1.0e4
poissons_ratio = 0.3
[]
[stress_left]
type = ComputeFiniteStrainElasticStress
block = 1
[]
[elasticity_tensor_right]
type = ComputeIsotropicElasticityTensor
block = 2
youngs_modulus = 1.0e8
poissons_ratio = 0.3
[]
[stress_right]
type = ComputeFiniteStrainElasticStress
block = 2
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeFrictionalForceCartesianLMMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_x = lm_x
lm_y = lm_y
variable = lm_x # This can be anything really
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
correct_edge_dropping = true
mu = 1.0
c_t = 1.0e5
use_petrov_galerkin = true
aux_lm = aux_lm
[]
[normal_x]
type = CartesianMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_y]
type = CartesianMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15'
line_search = none
dt = 0.1
dtmin = 0.1
end_time = 1.0
l_max_its = 100
nl_max_its = 20
nl_rel_tol = 1e-8
snesmf_reuse_base = false
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[avg_disp_x]
type = ElementAverageValue
variable = disp_x
block = '1 2'
[]
[avg_disp_y]
type = ElementAverageValue
variable = disp_y
block = '1 2'
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
[]
[min_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
value_type = min
[]
[min_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
value_type = min
[]
[num_lin_it]
type = NumLinearIterations
[]
[num_nonlin_it]
type = NumNonlinearIterations
[]
[tot_lin_it]
type = CumulativeValuePostprocessor
postprocessor = num_lin_it
[]
[tot_nonlin_it]
type = CumulativeValuePostprocessor
postprocessor = num_nonlin_it
[]
[max_norma_lm]
type = ElementExtremeValue
variable = normal_lm
[]
[min_norma_lm]
type = ElementExtremeValue
variable = normal_lm
value_type = min
[]
[]
[VectorPostprocessors]
[normal_lm]
type = NodalValueSampler
block = 'secondary_lower'
variable = normal_lm
sort_by = 'y'
[]
[tangent_lm]
type = NodalValueSampler
block = 'secondary_lower'
variable = tangent_lm
sort_by = 'y'
[]
[]
(modules/contact/test/tests/mortar_tm/2drz/ad_frictionless_second/finite_rr.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD9
order = SECOND
name = 'finite_rr'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = 0
ymax = 10
nx = 2
ny = 33
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = 'ref'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[]
[Modules/TensorMechanics/Master]
[block]
use_automatic_differentiation = true
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'block'
extra_vector_tags = 'ref'
[]
[plank]
use_automatic_differentiation = true
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
extra_vector_tags = 'ref'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e0
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
preset = false
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = block_right
value = 0
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
preset = false
boundary = block_right
function = '-t'
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[]
[swell]
type = ADComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[]
[swell_mat]
type = ADGenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 3
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
nl_abs_tol = 1e-12
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/contact/test/tests/mortar_tm/2drz/ad_frictionless_first/small.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'small'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[]
[Modules/TensorMechanics/Master]
[block]
use_automatic_differentiation = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'block'
[]
[plank]
use_automatic_differentiation = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e0
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = DirichletBC
variable = disp_x
boundary = block_right
value = 0
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeLinearElasticStress
block = 'plank block'
[]
[swell]
type = ADComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[]
[swell_mat]
type = ADGenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 10
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/contact/test/tests/3d-mortar-contact/frictionless-mortar-3d.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
second_order = false
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[disp_z]
block = '1 2'
[]
[mortar_normal_lm]
block = 'secondary_lower'
use_dual = true
[]
[]
[ICs]
[disp_z]
block = 1
variable = disp_z
value = '${fparse offset}'
type = ConstantIC
[]
[disp_x]
block = 1
variable = disp_x
value = 0
type = ConstantIC
[]
[disp_y]
block = 1
variable = disp_y
value = 0
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[disp_z]
type = MatDiffusion
variable = disp_z
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_variable = mortar_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
[]
[]
[Constraints]
[normal_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_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 = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_z]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Executioner]
type = Transient
end_time = 1
dt = .5
dtmin = .01
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15 1e-5'
l_max_its = 100
nl_max_its = 30
# nl_rel_tol = 1e-6
nl_abs_tol = 1e-12
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
csv = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = mortar_normal_lm
subdomain = 'secondary_lower'
execute_on = 'nonlinear timestep_end'
[]
[]
[VectorPostprocessors]
[contact-pressure]
type = NodalValueSampler
block = secondary_lower
variable = mortar_normal_lm
sort_by = 'id'
execute_on = NONLINEAR
[]
[]
(modules/navier_stokes/test/tests/finite_volume/two_phase/mixture_model/channel-advection-slip.i)
mu = 1.0
rho = 10.0
mu_d = 0.1
rho_d = 1.0
l = 2
U = 1
dp = 0.01
inlet_phase_2 = 0.1
advected_interp_method = 'average'
velocity_interp_method = 'rc'
[GlobalParams]
rhie_chow_user_object = 'rc'
mu_interp_method = 'average'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = vel_x
v = vel_y
pressure = pressure
[]
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = '${fparse l * 5}'
ymin = '${fparse -l / 2}'
ymax = '${fparse l / 2}'
nx = 10
ny = 6
[]
uniform_refine = 0
[]
[Variables]
[vel_x]
type = INSFVVelocityVariable
initial_condition = 0
[]
[vel_y]
type = INSFVVelocityVariable
initial_condition = 0
[]
[pressure]
type = INSFVPressureVariable
[]
[phase_2]
type = INSFVScalarFieldVariable
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = 'rho_mixture'
[]
[u_advection]
type = INSFVMomentumAdvection
variable = vel_x
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = 'rho_mixture'
momentum_component = 'x'
[]
[u_advection_slip]
type = WCNSFV2PMomentumAdvectionSlip
variable = vel_x
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = 'rho_mixture'
rho_d = ${rho_d}
fd = 0.5
u_slip = 'vel_slip_x'
v_slip = 'vel_slip_y'
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = vel_x
mu = 'mu_mixture'
limit_interpolation = true
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = vel_x
momentum_component = 'x'
pressure = pressure
[]
[v_advection]
type = INSFVMomentumAdvection
variable = vel_y
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = 'rho_mixture'
momentum_component = 'y'
[]
[v_advection_slip]
type = WCNSFV2PMomentumAdvectionSlip
variable = vel_y
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
rho_d = ${rho_d}
fd = 0.5
u_slip = 'vel_slip_x'
v_slip = 'vel_slip_y'
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = vel_y
mu = 'mu_mixture'
limit_interpolation = true
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = vel_y
momentum_component = 'y'
pressure = pressure
[]
[phase_2_advection]
type = INSFVScalarFieldAdvection
variable = phase_2
u_slip = 'vel_slip_x'
v_slip = 'vel_slip_y'
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = 'upwind'
[]
[phase_2_src]
type = NSFVMixturePhaseInterface
variable = phase_2
phase_coupled = phase_1
alpha = 0.1
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = vel_x
functor = '${U}'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = vel_y
functor = '0'
[]
[walls-u]
type = INSFVNoSlipWallBC
boundary = 'top bottom'
variable = vel_x
function = 0
[]
[walls-v]
type = INSFVNoSlipWallBC
boundary = 'top bottom'
variable = vel_y
function = 0
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = '0'
[]
[inlet_phase_2]
type = FVDirichletBC
boundary = 'left'
variable = phase_2
value = ${inlet_phase_2}
[]
[]
[AuxVariables]
[drag_coefficient]
type = MooseVariableFVReal
[]
[rho_mixture_var]
type = MooseVariableFVReal
[]
[mu_mixture_var]
type = MooseVariableFVReal
[]
[]
[AuxKernels]
[populate_cd]
type = FunctorAux
variable = drag_coefficient
functor = 'Darcy_coefficient'
[]
[populate_rho_mixture_var]
type = FunctorAux
variable = rho_mixture_var
functor = 'rho_mixture'
[]
[populate_mu_mixture_var]
type = FunctorAux
variable = mu_mixture_var
functor = 'mu_mixture'
[]
[]
[FunctorMaterials]
[phase_1]
property_name = 'phase_1'
type = ADParsedFunctorMaterial
functor_names = 'phase_2'
expression = '1 - phase_2'
outputs = 'out'
output_properties = 'phase_1'
[]
[populate_u_slip]
type = WCNSFV2PSlipVelocityFunctorMaterial
slip_velocity_name = 'vel_slip_x'
momentum_component = 'x'
u = 'vel_x'
v = 'vel_y'
rho = ${rho}
mu = 'mu_mixture'
rho_d = ${rho_d}
particle_diameter = ${dp}
linear_coef_name = 'Darcy_coefficient'
outputs = 'out'
output_properties = 'vel_slip_x'
[]
[populate_v_slip]
type = WCNSFV2PSlipVelocityFunctorMaterial
slip_velocity_name = 'vel_slip_y'
momentum_component = 'y'
u = 'vel_x'
v = 'vel_y'
rho = ${rho}
mu = 'mu_mixture'
rho_d = ${rho_d}
particle_diameter = ${dp}
linear_coef_name = 'Darcy_coefficient'
outputs = 'out'
output_properties = 'vel_slip_y'
[]
[CD]
type = NSFVDispersePhaseDragFunctorMaterial
rho = 'rho_mixture'
mu = mu_mixture
u = 'vel_x'
v = 'vel_y'
particle_diameter = ${dp}
[]
[mixing_material]
type = NSFVMixtureFunctorMaterial
phase_2_names = '${rho} ${mu}'
phase_1_names = '${rho_d} ${mu_d}'
prop_names = 'rho_mixture mu_mixture'
phase_1_fraction = 'phase_2'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
nl_rel_tol = 1e-10
[]
[Preconditioning]
[SMP]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
[]
[]
[Outputs]
[out]
type = Exodus
hide = 'Re lin cum_lin'
[]
[]
[Postprocessors]
[Re]
type = ParsedPostprocessor
function = '${rho} * ${l} * ${U}'
pp_names = ''
[]
[lin]
type = NumLinearIterations
[]
[cum_lin]
type = CumulativeValuePostprocessor
postprocessor = lin
[]
[]
(modules/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-wear-vel.i)
starting_point = 0.5e-1
offset = -0.05
[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
scaling = 1.0e3
[]
[frictional_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
hht_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]
[worn_depth]
block = '3'
[]
[gap_vel]
block = '3'
[]
[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'
[]
[]
[AuxKernels]
[gap_vel]
type = WeightedGapVelAux
variable = gap_vel
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
disp_x = disp_x
disp_y = disp_y
[]
[worn_depth]
type = MortarArchardsLawAux
variable = worn_depth
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
displacements = 'disp_x disp_y'
friction_coefficient = 0.5
energy_wear_coefficient = 1.0
normal_pressure = normal_lm
[]
[accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = 'linear timestep_end'
[]
[vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = 'linear timestep_end'
[]
[accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = 'linear timestep_end'
[]
[vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = 'linear timestep_end'
[]
[]
[UserObjects]
[weighted_vel_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
secondary_variable = disp_x
lm_variable_normal = normal_lm
lm_variable_tangential_one = frictional_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeDynamicFrictionalForceLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
c = 1e4
c_t = 1e6
mu = 0.15
friction_lm = frictional_lm
capture_tolerance = 1.0e-5
newmark_beta = 0.25
newmark_gamma = 0.5
[]
[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_vel_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_vel_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_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(16.0 * pi / 4 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 0.3
dt = 0.03
dtmin = .002
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15'
nl_max_its = 40
nl_abs_tol = 1.0e-11
nl_rel_tol = 1.0e-11
line_search = 'none'
snesmf_reuse_base = true
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
checkpoint = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/contact/test/tests/mortar_tm/2drz/ad_frictionless_second/finite.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD9
order = SECOND
name = 'finite'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = 0
ymax = 10
nx = 2
ny = 33
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[]
[Modules/TensorMechanics/Master]
[block]
use_automatic_differentiation = true
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'block'
[]
[plank]
use_automatic_differentiation = true
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e0
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
preset = false
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = block_right
value = 0
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
preset = false
boundary = block_right
function = '-t'
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[]
[swell]
type = ADComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[]
[swell_mat]
type = ADGenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 3
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(test/tests/postprocessors/cumulative_value_postprocessor/cumulative_value_postprocessor.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
coord_type = RZ
rz_coord_axis = X
[]
[Variables]
[u]
[]
[]
[Kernels]
[time_derivative]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
scheme = implicit-euler
[TimeStepper]
type = ConstantDT
dt = 0.01
[]
start_time = 0.0
num_steps = 2
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Postprocessors]
[nonlin_it]
type = NumNonlinearIterations
[]
[cumulative_nonlin_it]
type = CumulativeValuePostprocessor
postprocessor = nonlin_it
[]
[]
[Outputs]
csv = true
[]
(modules/contact/test/tests/mortar_tm/2drz/ad_frictionless_first/finite_rr.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite_rr'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = 'ref'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[]
[Modules/TensorMechanics/Master]
[block]
use_automatic_differentiation = true
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'block'
extra_vector_tags = 'ref'
[]
[plank]
use_automatic_differentiation = true
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
extra_vector_tags = 'ref'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e0
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = DirichletBC
variable = disp_x
boundary = block_right
value = 0
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[]
[swell]
type = ADComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[]
[swell_mat]
type = ADGenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
nl_abs_tol = 1e-12
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/contact/test/tests/mortar_tm/2d/ad_frictional/finite.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[]
[Modules/TensorMechanics/Master]
[action]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
[]
[]
[Contact]
[frictional]
primary = plank_right
secondary = block_left
formulation = mortar
model = coulomb
c_normal = 1e0
c_tangential = 1e-6
friction_coefficient = 0.1
tangential_lm_scaling = 1.0e-15
[]
[]
[BCs]
[left_x]
type = ADDirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
preset = false
[]
[left_y]
type = ADDirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
preset = false
[]
[right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
preset = false
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
preset = false
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu NONZERO 1e-15'
end_time = 5.3
dt = 0.12
dtmin = 0.12
timestep_tolerance = 1e-6
line_search = 'contact'
nl_div_tol = 1e100
nl_abs_tol = 1e-7
automatic_scaling = true
compute_scaling_once = false
ignore_variables_for_autoscaling = 'frictional_normal_lm frictional_tangential_lm'
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictional_normal_lm
subdomain = frictional_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/contact/test/tests/multiple_contact_pairs/multiple_pairs.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = multiple_pairs.e
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = true
strain = FINITE
generate_output = 'stress_xx'
[]
[]
[Materials]
[stiffStuff]
type = ComputeIsotropicElasticityTensor
block = '1 2 3'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stiffStuff_stress]
type = ComputeFiniteStrainElasticStress
block = '1 2 3'
[]
[]
[ICs]
[disp_y]
block = '2 3'
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Contact]
[action_name]
primary = '20 20'
secondary = '10 101'
penalty = 1e7
formulation = penalty
tangential_tolerance = 0.0001
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
preset = false
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
preset = false
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
preset = false
boundary = '30 301'
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
preset = false
boundary = '50 501'
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 60
dt = 2.0
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
nl_abs_tol = 1e-9
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[]
[VectorPostprocessors]
[cont_press]
type = NodalValueSampler
variable = contact_pressure
boundary = '10 101'
sort_by = x
execute_on = NONLINEAR
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven_stabilized.i)
[GlobalParams]
gravity = '0 0 0'
laplace = true
integrate_p_by_parts = true
family = LAGRANGE
order = FIRST
# There are multiple types of stabilization possible in incompressible
# Navier Stokes. The user can specify supg = true to apply streamline
# upwind petrov-galerkin stabilization to the momentum equations. This
# is most useful for high Reynolds numbers, e.g. when inertial effects
# dominate over viscous effects. The user can also specify pspg = true
# to apply pressure stabilized petrov-galerkin stabilization to the mass
# equation. PSPG is a form of Galerkin Least Squares. This stabilization
# allows equal order interpolations to be used for pressure and velocity.
# Finally, the alpha parameter controls the amount of stabilization.
# For PSPG, decreasing alpha leads to increased accuracy but may induce
# spurious oscillations in the pressure field. Some numerical experiments
# suggest that alpha between .1 and 1 may be optimal for accuracy and
# robustness.
supg = true
pspg = true
alpha = 1e-1
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 64
ny = 64
elem_type = QUAD4
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./vel_x]
[../]
[./vel_y]
[../]
[./p]
[../]
[]
[Kernels]
# mass
[./mass]
type = INSMass
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
# x-momentum, space
[./x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
# y-momentum, space
[./y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
[]
[BCs]
[./x_no_slip]
type = DirichletBC
variable = vel_x
boundary = 'bottom right left'
value = 0.0
[../]
[./lid]
type = FunctionDirichletBC
variable = vel_x
boundary = 'top'
function = 'lid_function'
[../]
[./y_no_slip]
type = DirichletBC
variable = vel_y
boundary = 'bottom right top left'
value = 0.0
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[]
[Functions]
[./lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'asm 2 ilu 4'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
exodus = true
print_linear_converged_reason = false
print_nonlinear_converged_reason = false
[]
[Postprocessors]
[lin]
type = NumLinearIterations
[]
[nl]
type = NumNonlinearIterations
[]
[lin_tot]
type = CumulativeValuePostprocessor
postprocessor = 'lin'
[]
[nl_tot]
type = CumulativeValuePostprocessor
postprocessor = 'nl'
[]
[]
(modules/contact/test/tests/bouncing-block-contact/frictional-mortar-min-lm-mortar-disp.i)
starting_point = 2e-1
# We offset slightly so we avoid the case where the bottom of the secondary block and the top of the
# primary block are perfectly vertically aligned which can cause the backtracking line search some
# issues for a coarse mesh (basic line search handles that fine)
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[./disp_x]
block = '1 2'
# order = SECOND
[../]
[./disp_y]
block = '1 2'
# order = SECOND
[../]
[./normal_lm]
block = 3
family = MONOMIAL
order = CONSTANT
[../]
[./tangential_lm]
block = 3
family = MONOMIAL
order = CONSTANT
[../]
[]
[ICs]
[./disp_y]
block = 2
variable = disp_y
value = ${fparse starting_point + offset}
type = ConstantIC
[../]
[]
[Kernels]
[./disp_x]
type = MatDiffusion
variable = disp_x
[../]
[./disp_y]
type = MatDiffusion
variable = disp_y
[../]
[]
[Constraints]
[normal_lm]
type = NormalMortarLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_x
secondary_disp_y = disp_y
use_displaced_mesh = true
compute_primal_residuals = false
ncp_function_type = min
[]
[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
[]
[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
[]
[tangential_lm]
type = TangentialMortarLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = tangential_lm
secondary_variable = disp_x
secondary_disp_y = disp_y
use_displaced_mesh = true
compute_primal_residuals = false
contact_pressure = normal_lm
friction_coefficient = .1
ncp_function_type = min
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = tangential_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = tangential_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
[]
[]
[BCs]
[./botx]
type = DirichletBC
variable = disp_x
preset = false
boundary = 40
value = 0.0
[../]
[./boty]
type = DirichletBC
variable = disp_y
preset = false
boundary = 40
value = 0.0
[../]
[./topy]
type = FunctionDirichletBC
variable = disp_y
preset = false
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[../]
[./leftx]
type = FunctionDirichletBC
variable = disp_x
preset = false
boundary = 50
function = '1e-2 * t'
[../]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor -snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
[./num_nl]
type = NumNonlinearIterations
[../]
[./cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[../]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-vel.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]
[gap_vel]
block = '3'
[]
[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'
[]
[]
[AuxKernels]
[gap_vel]
type = WeightedGapVelAux
variable = gap_vel
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
disp_x = disp_x
disp_y = disp_y
correct_edge_dropping = true
execute_on = 'TIMESTEP_END'
[]
[accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = 'linear timestep_end'
[]
[vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = 'linear timestep_end'
[]
[accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = 'linear timestep_end'
[]
[vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = 'linear timestep_end'
[]
[]
[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]
[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
use_displaced_mesh = true
c = 1e4
capture_tolerance = 1.0e-5
newmark_beta = 0.25
newmark_gamma = 0.5
[]
[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 = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 0.1
dt = 0.05
dtmin = 0.05
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err '
petsc_options_value = 'lu superlu_dist NONZERO 1e-15 1e-5'
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = false
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
checkpoint = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/contact/test/tests/bouncing-block-contact/frictional-nodal-min-normal-lm-mortar-pdass-tangential-lm-mortar-action.i)
starting_point = 2e-1
# We offset slightly so we avoid the case where the bottom of the secondary block and the top of the
# primary block are perfectly vertically aligned which can cause the backtracking line search some
# issues for a coarse mesh (basic line search handles that fine)
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
[original_file_mesh]
type = FileMeshGenerator
file = long-bottom-block-1elem-blocks-coarse.e
[]
# These sidesets need to be deleted because the contact action adds them automatically. For this
# particular mesh, the new IDs will be identical to the deleted ones and will conflict if we don't
# remove the original ones.
[delete_3]
type = BlockDeletionGenerator
input = original_file_mesh
block = 3
[]
[revised_file_mesh]
type = BlockDeletionGenerator
input = delete_3
block = 4
[]
[]
[Variables]
[disp_x]
block = '1 2'
# order = SECOND
[]
[disp_y]
block = '1 2'
# order = SECOND
[]
[]
[Contact]
[frictional]
primary = 20
secondary = 10
formulation = mortar
model = coulomb
friction_coefficient = 0.1
c_normal = 1.0e-2
c_tangential = 1.0e-1
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[]
[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 / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
hide = 'contact_pressure nodal_area penetration'
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = frictional_normal_lm
subdomain = frictional_secondary_subdomain
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/solid_mechanics/test/tests/rom_stress_update/REG_finite_strain_power_law_creep.i)
[GlobalParams]
displacements = 'disp_r disp_z'
[]
[Problem]
coord_type = RZ
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 1
xmax = 2
nx = 50
ny = 50
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
incremental = true
add_variables = true
eigenstrain_names = 'thermal'
use_automatic_differentiation = false
[]
[]
[AuxVariables]
[temp]
initial_condition = 1000.0
[]
[]
[AuxKernels]
[cooling]
type = FunctionAux
variable = temp
function = '1000-10*t*x'
[]
[]
[BCs]
[top_pull]
type = FunctionNeumannBC
variable = disp_z
boundary = top
function = '1e7*t'
use_displaced_mesh = true
[]
[bottom_fix]
type = DirichletBC
variable = disp_z
boundary = bottom
value = 0.0
[]
[left_fix]
type = DirichletBC
variable = disp_r
boundary = left
value = 0.0
[]
[]
[Materials]
[eigenstrain]
type = ComputeThermalExpansionEigenstrain
eigenstrain_name = 'thermal'
stress_free_temperature = 1000
thermal_expansion_coeff = 1e-4
temperature = temp
[]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2e11
poissons_ratio = 0.3
[]
[stress]
type = ComputeMultipleInelasticStress
inelastic_models = 'creep'
[]
[creep]
type = PowerLawCreepStressUpdate
coefficient = 1.0e-15
n_exponent = 4
activation_energy = 3.0e5
temperature = temp
[]
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
end_time = 10
dt = 1
automatic_scaling = true
[]
[Outputs]
print_linear_converged_reason = false
print_nonlinear_converged_reason = false
print_linear_residuals = false
perf_graph = true
[]
(modules/contact/test/tests/mortar_tm/2d/ad_frictionless_fir/finite.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[]
[Modules/TensorMechanics/Master]
[action]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e0
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/contact/test/tests/ranfs-and-scaling/bouncing-block-ranfs.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = long-bottom-block-no-lower-d-coarse.e
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[ICs]
[./disp_y]
block = 2
variable = disp_y
value = ${fparse starting_point + offset}
type = ConstantIC
[../]
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = false
use_automatic_differentiation = true
strain = SMALL
[]
[]
[Materials]
[elasticity]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e3
poissons_ratio = 0.3
[]
[stress]
type = ADComputeLinearElasticStress
[]
[]
[Constraints]
[./disp_x]
type = RANFSNormalMechanicalContact
secondary = 10
primary = 20
variable = disp_x
primary_variable = disp_x
component = x
normal_smoothing_distance = 0.1
[../]
[./disp_y]
type = RANFSNormalMechanicalContact
secondary = 10
primary = 20
variable = disp_y
primary_variable = disp_y
component = y
normal_smoothing_distance = 0.1
[../]
[]
[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 / 40 * t) + ${offset}'
[../]
[./leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[../]
[]
[Executioner]
type = Transient
end_time = 100
dt = 5
dtmin = 2.5
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_hypre_type -mat_mffd_err'
petsc_options_value = 'hypre boomeramg 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
automatic_scaling = true
verbose = true
scaling_group_variables = 'disp_x disp_y'
resid_vs_jac_scaling_param = 1
nl_rel_tol = 1e-12
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[exo]
type = Exodus
[]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
[nl]
type = NumNonlinearIterations
[]
[lin]
type = NumLinearIterations
[]
[tot_nl]
type = CumulativeValuePostprocessor
postprocessor = nl
[]
[tot_lin]
type = CumulativeValuePostprocessor
postprocessor = lin
[]
[]
(modules/contact/test/tests/mortar_tm/2d/frictionless_first/finite_rr.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite_rr'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = 'ref'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[]
[Modules/TensorMechanics/Master]
[action]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank block'
extra_vector_tags = 'ref'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e0
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = FunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
[]
[right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[]
[]
[Materials]
[plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = 'plank block'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
nl_abs_tol = 1e-7
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/solid_mechanics/test/tests/rom_stress_update/3tile_strain.i)
# This is a test to check that changing the finite_difference_width does indeed change convergence
# The number of nonlinear iterations should be greater a width of 1e-20 than 1e-2
[Mesh]
type = GeneratedMesh
dim = 3
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
group_variables = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[temperature]
initial_condition = 920
[]
[]
[AuxKernels]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
generate_output = 'vonmises_stress'
extra_vector_tags = 'ref'
[]
[]
[BCs]
[symmx]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[symmy]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[symmz]
type = DirichletBC
variable = disp_z
boundary = back
value = 0
[]
[pull_x]
type = DirichletBC
variable = disp_x
boundary = right
value = 5e-4
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e11
poissons_ratio = 0.3
[]
[stress]
type = ComputeMultipleInelasticStress
inelastic_models = rom_stress_prediction
[]
[rom_stress_prediction]
type = LAROMANCE3TileTest
temperature = temperature
outputs = all
initial_cell_dislocation_density = 5.7e12
initial_wall_dislocation_density = 4.83e11
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
dt = 1e-5
num_steps = 5
[]
[Postprocessors]
[extrapolation]
type = ElementAverageValue
variable = ROM_extrapolation
outputs = console
[]
[temperature]
type = ElementAverageValue
variable = temperature
outputs = 'console'
[]
[partition_weight]
type = ElementAverageMaterialProperty
mat_prop = partition_weight
outputs = 'console'
[]
[creep_rate]
type = ElementAverageMaterialProperty
mat_prop = creep_rate
[]
[rhom_rate]
type = ElementAverageMaterialProperty
mat_prop = cell_dislocation_rate
outputs = 'console'
[]
[rhoi_rate]
type = ElementAverageMaterialProperty
mat_prop = wall_dislocation_rate
outputs = 'console'
[]
[vonmises]
type = ElementAverageValue
variable = vonmises_stress
outputs = 'console'
[]
[nl_its]
type = NumNonlinearIterations
outputs = none
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
outputs = 'console'
[]
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/contact/test/tests/3d-mortar-contact/frictional-mortar-3d-action.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[Mesh]
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
allow_renumbering = false
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = true
strain = FINITE
block = '1 2'
use_automatic_differentiation = false
generate_output = 'stress_xx stress_xy stress_xz stress_yy stress_zz'
[]
[]
[Materials]
[tensor]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1.0e4
poissons_ratio = 0.0
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[tensor_1000]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e5
poissons_ratio = 0.0
[]
[stress_1000]
type = ComputeFiniteStrainElasticStress
block = '2'
[]
[]
[Contact]
[mortar]
primary = 'bottom_top'
secondary = 'top_bottom'
formulation = mortar
model = coulomb
friction_coefficient = 0.4
c_normal = 1e4
c_tangential = 1.0e4
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Executioner]
type = Transient
end_time = .025
dt = .025
dtmin = .001
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu superlu_dist NONZERO 1e-14 1e-5'
l_max_its = 15
nl_max_its = 30
nl_rel_tol = 1e-11
nl_abs_tol = 1e-12
line_search = 'basic'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
csv = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = mortar_normal_lm
subdomain = 'mortar_secondary_subdomain'
execute_on = 'nonlinear timestep_end'
[]
[]
[VectorPostprocessors]
[contact-pressure]
type = NodalValueSampler
block = mortar_secondary_subdomain
variable = mortar_normal_lm
sort_by = 'id'
execute_on = NONLINEAR
[]
[frictional-pressure]
type = NodalValueSampler
block = mortar_secondary_subdomain
variable = mortar_tangential_lm
sort_by = 'id'
execute_on = NONLINEAR
[]
[frictional-pressure-3d]
type = NodalValueSampler
block = mortar_secondary_subdomain
variable = mortar_tangential_3d_lm
sort_by = 'id'
execute_on = NONLINEAR
[]
[tangent_x]
type = NodalValueSampler
block = mortar_secondary_subdomain
variable = mortar_tangent_x
sort_by = 'id'
execute_on = NONLINEAR
[]
[tangent_y]
type = NodalValueSampler
block = mortar_secondary_subdomain
variable = mortar_tangent_y
sort_by = 'id'
execute_on = NONLINEAR
[]
[]
(modules/contact/test/tests/mortar_tm/2drz/ad_frictionless_second/small.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD9
order = SECOND
name = 'small'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = 0
ymax = 10
nx = 2
ny = 33
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[]
[Modules/TensorMechanics/Master]
[block]
use_automatic_differentiation = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'block'
[]
[plank]
use_automatic_differentiation = true
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e0
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = DirichletBC
variable = disp_x
boundary = block_right
value = 0
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeLinearElasticStress
block = 'plank block'
[]
[swell]
type = ADComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[]
[swell_mat]
type = ADGenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 3
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(test/tests/multiapps/grid-sequencing/vi-coarse.i)
l = 10
nx = 40
num_steps = 2
[Mesh]
type = GeneratedMesh
dim = 1
xmax = ${l}
nx = ${nx}
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[bounds]
[]
[]
[Bounds]
[u_upper_bound]
type = ConstantBounds
variable = bounds
bounded_variable = u
bound_type = upper
bound_value = ${l}
[]
[u_lower_bound]
type = ConstantBounds
variable = bounds
bounded_variable = u
bound_type = lower
bound_value = 0
[]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = 'x'
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = 'if(x<5,-1,1)'
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
value = 0
variable = u
[]
[right]
type = DirichletBC
boundary = right
value = ${l}
variable = u
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = ${num_steps}
solve_type = NEWTON
dtmin = 1
petsc_options = '-snes_vi_monitor'
petsc_options_iname = '-snes_max_linear_solve_fail -ksp_max_it -pc_type -sub_pc_factor_levels -snes_linesearch_type -snes_type'
petsc_options_value = '0 30 asm 16 basic vinewtonrsls'
[]
[Outputs]
exodus = true
[csv]
type = CSV
execute_on = 'nonlinear timestep_end'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
active = 'upper_violations lower_violations'
[upper_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = '${fparse 10+1e-8}'
comparator = 'greater'
[]
[lower_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = -1e-8
comparator = 'less'
[]
[nls]
type = NumNonlinearIterations
[]
[cum_nls]
type = CumulativeValuePostprocessor
postprocessor = nls
[]
[]
[MultiApps]
[coarser]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_begin
positions = '0 0 0'
input_files = vi-coarser.i
[]
[]
[Transfers]
[mesh_function_begin]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = coarser
source_variable = u
variable = u
execute_on = timestep_begin
[]
[]
(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/combined/test/tests/gap_heat_transfer_mortar/finite-2d/finite_action_rr.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
converge_on = 'disp_x disp_y temp'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[temp]
order = ${order}
block = 'plank block'
scaling = 1e-1
[]
[]
[Modules/TensorMechanics/Master]
[action]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
strain = FINITE
extra_vector_tags = 'ref'
[]
[]
[Kernels]
[hc]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = 'plank block'
extra_vector_tags = 'ref'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e6
[]
[]
[MortarGapHeatTransfer]
[mortar_heat_transfer]
temperature = temp
use_displaced_mesh = true
gap_flux_options = conduction
gap_conductivity = 1
boundary = plank_right
primary_boundary = plank_right
primary_subdomain = frictionless_primary_subdomain
secondary_boundary = block_left
secondary_subdomain = frictionless_secondary_subdomain
thermal_lm_scaling = 1e-7
gap_geometry_type = PLATE
[]
[]
[BCs]
[left_temp]
type = ADDirichletBC
variable = temp
boundary = 'plank_left'
value = 400
[]
[right_temp]
type = ADDirichletBC
variable = temp
boundary = 'block_right'
value = 300
[]
[left_x]
type = ADDirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = ADDirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
preset = false
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
preset = false
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[]
[heat_plank]
type = ADHeatConductionMaterial
block = plank
thermal_conductivity = 2
specific_heat = 1
[]
[heat_block]
type = ADHeatConductionMaterial
block = block
thermal_conductivity = 1
specific_heat = 1
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -snes_max_it'
petsc_options_value = 'lu NONZERO 1e-15 20'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'none'
nl_abs_tol = 1e-13
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[avg_temp]
type = ElementAverageValue
variable = temp
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact avg_temp'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_stabilized_action.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 64
ny = 64
[]
[]
[Modules]
[IncompressibleNavierStokes]
equation_type = steady-state
velocity_boundary = 'bottom right top left'
velocity_function = '0 0 0 0 lid_function 0 0 0'
pressure_pinned_node = 0
density_name = rho
dynamic_viscosity_name = mu
initial_velocity = '1e-15 1e-15 0'
use_ad = true
pspg = true
supg = true
alpha = 0.1
family = LAGRANGE
order = FIRST
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[]
[]
[Functions]
[lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
exodus = true
file_base = lid_driven_stabilized_out
[]
[Postprocessors]
[lin]
type = NumLinearIterations
[]
[nl]
type = NumNonlinearIterations
[]
[lin_tot]
type = CumulativeValuePostprocessor
postprocessor = 'lin'
[]
[nl_tot]
type = CumulativeValuePostprocessor
postprocessor = 'nl'
[]
[]
(test/tests/multiapps/grid-sequencing/vi-fine-alone.i)
l=10
nx=80
num_steps=2
[Mesh]
type = GeneratedMesh
dim = 1
xmax = ${l}
nx = ${nx}
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[bounds][]
[]
[Bounds]
[./u_upper_bounds]
type = ConstantBounds
variable = bounds
bounded_variable = u
bound_type = upper
bound_value = ${l}
[../]
[./u_lower_bounds]
type = ConstantBounds
variable = bounds
bounded_variable = u
bound_type = lower
bound_value = 0
[../]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = 'x'
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = 'if(x<5,-1,1)'
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
value = 0
variable = u
[]
[right]
type = DirichletBC
boundary = right
value = ${l}
variable = u
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = ${num_steps}
solve_type = NEWTON
dtmin = 1
petsc_options = '-snes_vi_monitor'
petsc_options_iname = '-snes_max_linear_solve_fail -ksp_max_it -pc_type -sub_pc_factor_levels -snes_linesearch_type -snes_type'
petsc_options_value = '0 30 asm 16 basic vinewtonrsls'
[]
[Outputs]
exodus = true
[csv]
type = CSV
execute_on = 'nonlinear timestep_end'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
active = 'upper_violations lower_violations'
[upper_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = ${fparse 10+1e-8}
comparator = 'greater'
[]
[lower_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = -1e-8
comparator = 'less'
[]
[nls]
type = NumNonlinearIterations
[]
[cum_nls]
type = CumulativeValuePostprocessor
postprocessor = nls
[]
[]
(modules/contact/test/tests/mortar_tm/2drz/frictionless_second/finite.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD9
order = SECOND
name = 'finite'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = 0
ymax = 10
nx = 2
ny = 33
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[]
[Modules/TensorMechanics/Master]
[block]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'block'
[]
[plank]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
preset = false
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = block_right
value = 0
[]
[right_y]
type = FunctionDirichletBC
variable = disp_y
preset = false
boundary = block_right
function = '-t'
[]
[]
[Materials]
[plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = 'plank block'
[]
[swell]
type = ComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[]
[swell_mat]
type = GenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 3
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/contact/test/tests/mortar_tm/2d/frictionless_second/finite.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD9
order = SECOND
name = 'finite'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[]
[Modules/TensorMechanics/Master]
[action]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank block'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e0
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
preset = false
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = FunctionDirichletBC
variable = disp_x
preset = false
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
[]
[right_y]
type = FunctionDirichletBC
variable = disp_y
preset = false
boundary = block_right
function = '-t'
[]
[]
[Materials]
[plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = 'plank block'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 5.0
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
l_max_its = 30
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_frictional_al_action_amg_tight.i)
[GlobalParams]
volumetric_locking_correction = true
displacements = 'disp_x disp_y'
[]
[Mesh]
[input_file]
type = FileMeshGenerator
file = cond_number.e
[]
allow_renumbering = false
[]
[Problem]
type = AugmentedLagrangianContactFEProblem
extra_tag_vectors = 'ref'
maximum_lagrangian_update_iterations = 1000
[]
[AuxVariables]
[penalty_normal_pressure]
[]
[penalty_frictional_pressure]
[]
[accumulated_slip_one]
[]
[tangential_vel_one]
[]
[normal_gap]
[]
[normal_lm]
[]
[saved_x]
[]
[saved_y]
[]
[active]
[]
[pid]
[]
[]
[Functions]
[disp_ramp_vert]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. -0.020 -0.020'
[]
[disp_ramp_horz]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. 0.0 0.015'
[]
[]
[Modules/TensorMechanics/Master/all]
strain = FINITE
add_variables = true
save_in = 'saved_x saved_y'
extra_vector_tags = 'ref'
block = '1 2 3 4 5 6 7'
generate_output = 'stress_xx stress_yy stress_xy'
[]
[AuxKernels]
[pid]
type = ProcessorIDAux
variable = pid
[]
[penalty_normal_pressure]
type = PenaltyMortarUserObjectAux
variable = penalty_normal_pressure
user_object = penalty_friction_object_al_friction
contact_quantity = normal_pressure
boundary = 3
[]
[penalty_frictional_pressure]
type = PenaltyMortarUserObjectAux
variable = penalty_frictional_pressure
user_object = penalty_friction_object_al_friction
contact_quantity = tangential_pressure_one
boundary = 3
[]
[penalty_tangential_vel_one]
type = PenaltyMortarUserObjectAux
variable = tangential_vel_one
user_object = penalty_friction_object_al_friction
contact_quantity = tangential_velocity_one
boundary = 3
[]
[penalty_accumulated_slip_one]
type = PenaltyMortarUserObjectAux
variable = accumulated_slip_one
user_object = penalty_friction_object_al_friction
contact_quantity = accumulated_slip_one
boundary = 3
[]
[normal_lm]
type = PenaltyMortarUserObjectAux
variable = normal_lm
user_object = penalty_friction_object_al_friction
contact_quantity = normal_lm
boundary = 3
[]
[normal_gap]
type = PenaltyMortarUserObjectAux
variable = normal_gap
user_object = penalty_friction_object_al_friction
contact_quantity = normal_gap
boundary = 3
[]
[]
[Postprocessors]
[bot_react_x]
type = NodalSum
variable = saved_x
boundary = 1
[]
[bot_react_y]
type = NodalSum
variable = saved_y
boundary = 1
[]
[top_react_x]
type = NodalSum
variable = saved_x
boundary = 4
[]
[top_react_y]
type = NodalSum
variable = saved_y
boundary = 4
[]
[_dt]
type = TimestepSize
[]
[num_lin_it]
type = NumLinearIterations
[]
[num_nonlin_it]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nonlin_it
[]
[gap]
type = SideExtremeValue
value_type = min
variable = normal_gap
boundary = 3
[]
[num_al]
type = NumAugmentedLagrangeIterations
[]
[active_set_size]
type = NodalSum
variable = active
[]
[]
[BCs]
[side_x]
type = DirichletBC
variable = disp_y
boundary = '1 2'
value = 0.0
[]
[bot_y]
type = DirichletBC
variable = disp_x
boundary = '1 2'
value = 0.0
[]
[top_y_disp]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = disp_ramp_vert
[]
[top_x_disp]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = disp_ramp_horz
[]
[]
[Materials]
[stuff1_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.0
[]
[stuff1_stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[stuff2_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '2 3 4 5 6 7'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stuff2_stress]
type = ComputeFiniteStrainElasticStress
block = '2 3 4 5 6 7'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-ksp_snes_ew'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = ' 201 hypre boomeramg 8'
line_search = 'none'
nl_abs_tol = 1e-12
nl_rel_tol = 1e-10
nl_max_its = 150
l_tol = 1e-05
l_abs_tol = 1e-13
start_time = 0.0
end_time = 0.1 # 1.0
dt = 0.1
dtmin = 0.1
[Predictor]
type = SimplePredictor
scale = 1.0
[]
automatic_scaling = true
compute_scaling_once = false
off_diagonals_in_auto_scaling = true
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[surface]
type = NodalValueSampler
use_displaced_mesh = false
variable = 'disp_x disp_y penalty_normal_pressure penalty_frictional_pressure normal_gap'
boundary = '3'
sort_by = id
[]
[]
[Outputs]
print_linear_residuals = true
perf_graph = true
exodus = true
csv = false
[vectorpp_output]
type = CSV
create_final_symlink = true
execute_on = 'INITIAL TIMESTEP_END FINAL'
[]
[]
[Contact]
[al_friction]
formulation = mortar_penalty
model = coulomb
primary = '2'
secondary = '3'
penalty = 1e7
penalty_friction = 1e+7
friction_coefficient = 0.4
al_penetration_tolerance = 1e-7
al_incremental_slip_tolerance = 1e-7
adaptivity_penalty_normal = BUSSETTA
adaptivity_penalty_friction = FRICTION_LIMIT
penalty_multiplier = 5
penalty_multiplier_friction = 5
[]
[]
(test/tests/nodalkernels/constraint_enforcement/upper-and-lower-bound.i)
l=10
nx=100
num_steps=10
[Mesh]
type = GeneratedMesh
dim = 1
xmax = ${l}
nx = ${nx}
[]
[Variables]
[u]
[]
[lm_upper]
[]
[lm_lower]
[]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = 'x'
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = 'if(x<5,-1,1)'
[]
[]
[NodalKernels]
[upper_bound]
type = UpperBoundNodalKernel
variable = lm_upper
v = u
exclude_boundaries = 'left right'
upper_bound = 10
[]
[forces_from_upper]
type = CoupledForceNodalKernel
variable = u
v = lm_upper
coef = -1
[]
[lower_bound]
type = LowerBoundNodalKernel
variable = lm_lower
v = u
exclude_boundaries = 'left right'
lower_bound = 0
[]
[forces_from_lower]
type = CoupledForceNodalKernel
variable = u
v = lm_lower
coef = 1
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
value = 0
variable = u
[]
[right]
type = DirichletBC
boundary = right
value = ${l}
variable = u
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = ${num_steps}
solve_type = NEWTON
dtmin = 1
petsc_options_iname = '-snes_max_linear_solve_fail -ksp_max_it -pc_type -sub_pc_factor_levels -snes_linesearch_type'
petsc_options_value = '0 30 asm 16 basic'
[]
[Outputs]
exodus = true
[csv]
type = CSV
execute_on = 'nonlinear timestep_end'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[active_upper_lm]
type = GreaterThanLessThanPostprocessor
variable = lm_upper
execute_on = 'nonlinear timestep_end'
value = 1e-8
comparator = 'greater'
[]
[upper_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = ${fparse 10+1e-8}
comparator = 'greater'
[]
[active_lower_lm]
type = GreaterThanLessThanPostprocessor
variable = lm_lower
execute_on = 'nonlinear timestep_end'
value = 1e-8
comparator = 'greater'
[]
[lower_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = -1e-8
comparator = 'less'
[]
[nls]
type = NumNonlinearIterations
[]
[cum_nls]
type = CumulativeValuePostprocessor
postprocessor = nls
[]
[]
(modules/contact/test/tests/sliding_block/in_and_out/frictionless_penalty_contact_line_search.i)
# This is a benchmark test that checks constraint based frictionless
# contact using the penalty method. In this test a sinusoidal
# displacement is applied in the horizontal direction to simulate
# a small block come in and out of contact as it slides down a larger block.
#
# The sinusoid is of the form 0.4sin(4t)+0.2. The gold file is run
# on one processor and the benchmark
# case is run on a minimum of 4 processors to ensure no parallel variability
# in the contact pressure and penetration results. Further documentation can
# found in moose/modules/contact/doc/sliding_block/
#
[Mesh]
file = sliding_elastic_blocks_2d.e
patch_size = 80
[]
[GlobalParams]
volumetric_locking_correction = false
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[./penetration]
[../]
[./inc_slip_x]
[../]
[./inc_slip_y]
[../]
[./accum_slip_x]
[../]
[./accum_slip_y]
[../]
[]
[Functions]
[./vertical_movement]
type = ParsedFunction
expression = -t
[../]
[./horizontal_movement]
type = ParsedFunction
expression = -0.04*sin(4*t)+0.02
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
add_variables = true
strain = FINITE
[../]
[]
[AuxKernels]
[./zeroslip_x]
type = ConstantAux
variable = inc_slip_x
boundary = 3
execute_on = timestep_begin
value = 0.0
[../]
[./zeroslip_y]
type = ConstantAux
variable = inc_slip_y
boundary = 3
execute_on = timestep_begin
value = 0.0
[../]
[./accum_slip_x]
type = AccumulateAux
variable = accum_slip_x
accumulate_from_variable = inc_slip_x
execute_on = timestep_end
[../]
[./accum_slip_y]
type = AccumulateAux
variable = accum_slip_y
accumulate_from_variable = inc_slip_y
execute_on = timestep_end
[../]
[./penetration]
type = PenetrationAux
variable = penetration
boundary = 3
paired_boundary = 2
[../]
[]
[Postprocessors]
[./nonlinear_its]
type = NumNonlinearIterations
execute_on = timestep_end
[../]
[./penetration]
type = NodalVariableValue
variable = penetration
nodeid = 222
[../]
[./contact_pressure]
type = NodalVariableValue
variable = contact_pressure
nodeid = 222
[../]
[./tot_nonlin_it]
type = CumulativeValuePostprocessor
postprocessor = nonlinear_its
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[../]
[./right_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = horizontal_movement
[../]
[./right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = vertical_movement
[../]
[]
[Materials]
[./left]
type = ComputeIsotropicElasticityTensor
block = '1 2'
youngs_modulus = 1e6
poissons_ratio = 0.3
constant_on = SUBDOMAIN
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-ksp_monitor_true_residual'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu superlu_dist'
line_search = 'contact'
contact_line_search_ltol = .5
contact_line_search_allowed_lambda_cuts = 0
l_max_its = 100
nl_max_its = 20
dt = 0.1
end_time = 3
# num_steps = 30
l_tol = 1e-6
nl_rel_tol = 1e-10
nl_abs_tol = 1e-6
dtmin = 0.01
[]
[Outputs]
perf_graph = true
print_linear_residuals = false
[./out]
type = Exodus
elemental_as_nodal = true
[../]
[./console]
type = Console
max_rows = 5
[../]
[]
[Contact]
[./leftright]
secondary = 3
primary = 2
model = frictionless
penalty = 1e+7
formulation = penalty
normal_smoothing_distance = 0.1
[../]
[]
(modules/contact/test/tests/mortar_cartesian_lms/frictionless-mortar-3d-friction.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
second_order = false
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[disp_z]
block = '1 2'
[]
[lm_x]
block = 'secondary_lower'
use_dual = true
[]
[lm_y]
block = 'secondary_lower'
use_dual = true
[]
[lm_z]
block = 'secondary_lower'
use_dual = true
[]
[]
[ICs]
[disp_z]
block = 1
variable = disp_z
value = '${fparse offset}'
type = ConstantIC
[]
[disp_x]
block = 1
variable = disp_x
value = 0
type = ConstantIC
[]
[disp_y]
block = 1
variable = disp_y
value = 0
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[disp_z]
type = MatDiffusion
variable = disp_z
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeFrictionalForceCartesianLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_x = lm_x
lm_y = lm_y
lm_z = lm_z
variable = lm_x # This can be anything really
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
correct_edge_dropping = true
c = 1e+02
c_t = 1e+2
mu = 0.10
[]
[normal_x]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_y]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_z]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_z
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Preconditioning]
[vcp]
type = VCP
full = true
lm_variable = 'lm_x lm_y lm_z'
primary_variable = 'disp_x disp_y disp_z'
preconditioner = 'LU'
is_lm_coupling_diagonal = true
adaptive_condensation = true
[]
[]
[Executioner]
type = Transient
end_time = 1
dt = .5
dtmin = .01
solve_type = 'NEWTON'
petsc_options_iname = '-pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = ' NONZERO 1e-10'
l_max_its = 100
nl_max_its = 30
# nl_rel_tol = 1e-6
nl_abs_tol = 1e-12
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
perf_graph = true
exodus = true
csv = true
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = lm_z
subdomain = 'secondary_lower'
execute_on = 'nonlinear timestep_end'
[]
[]
[VectorPostprocessors]
[contact-pressure]
type = NodalValueSampler
block = secondary_lower
variable = lm_z
sort_by = 'id'
execute_on = NONLINEAR
[]
[]
(modules/navier_stokes/examples/laser-welding/2d.i)
endtime=5e-4 # s
timestep=${fparse endtime/100} # s
surfacetemp=300 # K
power=190 # W
R=1.8257418583505537e-4 # m
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -.45e-3 # m
xmax = 0.45e-3 # m
ymin = -.9e-4 # m
ymax = 0
nx = 25
ny = 5
displacements = 'disp_x disp_y'
[]
[GlobalParams]
temperature = T
[]
[Variables]
[vel]
family = LAGRANGE_VEC
[]
[T]
[]
[p]
[]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[vel_x_aux]
[InitialCondition]
type = ConstantIC
value = 1e-15
[]
[]
[vel_y_aux]
[InitialCondition]
type = ConstantIC
value = 1e-15
[]
[]
[]
[AuxKernels]
[vel_x_value]
type = VectorVariableComponentAux
variable = vel_x_aux
vector_variable = vel
component = x
[]
[vel_y_value]
type = VectorVariableComponentAux
variable = vel_y_aux
vector_variable = vel
component = y
[]
[]
[ICs]
[T]
type = FunctionIC
variable = T
function = '(${surfacetemp} - 300) / .7e-3 * y + ${surfacetemp}'
[]
[]
[Kernels]
[disp_x]
type = Diffusion
variable = disp_x
[]
[disp_y]
type = Diffusion
variable = disp_y
[]
[mass]
type = INSADMass
variable = p
use_displaced_mesh = true
[]
[mass_pspg]
type = INSADMassPSPG
variable = p
use_displaced_mesh = true
[]
[momentum_time]
type = INSADMomentumTimeDerivative
variable = vel
use_displaced_mesh = true
[]
[momentum_advection]
type = INSADMomentumAdvection
variable = vel
use_displaced_mesh = true
[]
[momentum_mesh_advection]
type = INSADMomentumMeshAdvection
variable = vel
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
[]
[momentum_viscous]
type = INSADMomentumViscous
variable = vel
use_displaced_mesh = true
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = vel
pressure = p
integrate_p_by_parts = true
use_displaced_mesh = true
[]
[momentum_supg]
type = INSADMomentumSUPG
variable = vel
material_velocity = relative_velocity
use_displaced_mesh = true
[]
[temperature_time]
type = INSADHeatConductionTimeDerivative
variable = T
use_displaced_mesh = true
[]
[temperature_advection]
type = INSADEnergyAdvection
variable = T
use_displaced_mesh = true
[]
[temperature_mesh_advection]
type = INSADEnergyMeshAdvection
variable = T
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
[]
[temperature_conduction]
type = ADHeatConduction
variable = T
thermal_conductivity = 'k'
use_displaced_mesh = true
[]
[temperature_supg]
type = INSADEnergySUPG
variable = T
velocity = vel
use_displaced_mesh = true
[]
[]
[BCs]
[x_no_disp]
type = DirichletBC
variable = disp_x
boundary = 'bottom'
value = 0
[]
[y_no_disp]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0
[]
[no_slip]
type = ADVectorFunctionDirichletBC
variable = vel
boundary = 'bottom right left'
[]
[T_cold]
type = DirichletBC
variable = T
boundary = 'bottom'
value = 300
[]
[radiation_flux]
type = FunctionRadiativeBC
variable = T
boundary = 'top'
emissivity_function = '1'
Tinfinity = 300
stefan_boltzmann_constant = 5.67e-8
use_displaced_mesh = true
[]
[weld_flux]
type = GaussianEnergyFluxBC
variable = T
boundary = 'top'
P0 = ${power}
R = ${R}
x_beam_coord = '-0.35e-3 +0.7e-3*t/${endtime}'
y_beam_coord = '0'
use_displaced_mesh = true
[]
[vapor_recoil]
type = INSADVaporRecoilPressureMomentumFluxBC
variable = vel
boundary = 'top'
use_displaced_mesh = true
[]
[displace_x_top]
type = INSADDisplaceBoundaryBC
boundary = 'top'
variable = 'disp_x'
velocity = 'vel'
component = 0
associated_subdomain = 0
[]
[displace_y_top]
type = INSADDisplaceBoundaryBC
boundary = 'top'
variable = 'disp_y'
velocity = 'vel'
component = 1
associated_subdomain = 0
[]
[displace_x_top_dummy]
type = INSADDummyDisplaceBoundaryIntegratedBC
boundary = 'top'
variable = 'disp_x'
velocity = 'vel'
component = 0
[]
[displace_y_top_dummy]
type = INSADDummyDisplaceBoundaryIntegratedBC
boundary = 'top'
variable = 'disp_y'
velocity = 'vel'
component = 1
[]
[]
[Materials]
[ins_mat]
type = INSADStabilized3Eqn
velocity = vel
pressure = p
temperature = T
use_displaced_mesh = true
[]
[steel]
type = AriaLaserWeld304LStainlessSteel
temperature = T
beta = 1e7
use_displaced_mesh = true
[]
[steel_boundary]
type = AriaLaserWeld304LStainlessSteelBoundary
boundary = 'top'
temperature = T
use_displaced_mesh = true
[]
[const]
type = GenericConstantMaterial
prop_names = 'abs sb_constant'
prop_values = '1 5.67e-8'
use_displaced_mesh = true
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu NONZERO strumpack'
[]
[]
[Executioner]
type = Transient
end_time = ${endtime}
dtmin = 1e-8
dtmax = ${timestep}
petsc_options = '-snes_converged_reason -ksp_converged_reason -options_left'
solve_type = 'NEWTON'
line_search = 'none'
nl_max_its = 12
l_max_its = 100
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 7
dt = ${timestep}
linear_iteration_ratio = 1e6
growth_factor = 1.5
[]
[]
[Outputs]
[exodus]
type = Exodus
output_material_properties = true
show_material_properties = 'mu'
[]
checkpoint = true
perf_graph = true
[]
[Debug]
show_var_residual_norms = true
[]
[Adaptivity]
marker = combo
max_h_level = 4
[Indicators]
[error_T]
type = GradientJumpIndicator
variable = T
[]
[error_dispz]
type = GradientJumpIndicator
variable = disp_y
[]
[]
[Markers]
[errorfrac_T]
type = ErrorFractionMarker
refine = 0.4
coarsen = 0.2
indicator = error_T
[]
[errorfrac_dispz]
type = ErrorFractionMarker
refine = 0.4
coarsen = 0.2
indicator = error_dispz
[]
[combo]
type = ComboMarker
markers = 'errorfrac_T errorfrac_dispz'
[]
[]
[]
[Postprocessors]
[num_dofs]
type = NumDOFs
system = 'NL'
[]
[nl]
type = NumNonlinearIterations
[]
[tot_nl]
type = CumulativeValuePostprocessor
postprocessor = 'nl'
[]
[]
(modules/contact/test/tests/mortar_dynamics/block-dynamics-action.i)
starting_point = 2e-1
offset = -0.19
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = long-bottom-block-no-lower-d.e
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[]
[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'
stiffness_damping_coefficient = 1.0
hht_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'
[]
[]
[AuxKernels]
[accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = 'LINEAR timestep_end'
[]
[vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = 'LINEAR timestep_end'
[]
[accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = 'LINEAR timestep_end'
[]
[vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = 'LINEAR timestep_end'
[]
[]
[Contact]
[mechanical]
primary = 20
secondary = 10
formulation = mortar
model = frictionless
c_normal = 1e4
capture_tolerance = 1.0e-5
[]
[]
[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 = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 75
dt = 0.05
dtmin = .05
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err '
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = false
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
checkpoint = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = ''
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[]
(modules/contact/test/tests/multiple_contact_pairs/multiple_pairs_mortar.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = multiple_pairs.e
[]
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = true
strain = FINITE
generate_output = 'stress_xx'
block = '1 2 3'
[]
[]
[Materials]
[stiffStuff]
type = ComputeIsotropicElasticityTensor
block = '1 2 3'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stiffStuff_stress]
type = ComputeFiniteStrainElasticStress
block = '1 2 3'
[]
[]
[ICs]
[disp_y]
block = '2 3'
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Contact]
[first_pair]
primary = '20'
secondary = '10 '
model = frictionless
formulation = mortar
c_normal = 1e+06
[]
[second_pair]
primary = '20'
secondary = '101'
model = frictionless
formulation = mortar
c_normal = 1e+06
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
preset = false
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
preset = false
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
preset = false
boundary = '30 301'
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
preset = false
boundary = '50 501'
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
dt = 2.0
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
nl_abs_tol = 1e-9
line_search = 'none'
end_time = 18
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[]
[VectorPostprocessors]
[cont_press]
type = NodalValueSampler
variable = contact_pressure
boundary = '10 101'
sort_by = x
execute_on = NONLINEAR
[]
[]
(modules/contact/test/tests/mortar_tm/2drz/frictionless_first/finite.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[]
[Modules/TensorMechanics/Master]
[block]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'block'
[]
[plank]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e0
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = DirichletBC
variable = disp_x
boundary = block_right
value = 0
[]
[right_y]
type = FunctionDirichletBC
variable = disp_y
preset = false
boundary = block_right
function = '-t'
[]
[]
[Materials]
[plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = 'plank block'
[]
[swell]
type = ComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[]
[swell_mat]
type = GenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/contact/test/tests/bouncing-block-contact/frictionless-weighted-gap.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[normal_lm]
block = 3
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[]
[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]
[weighted_gap_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
c = 1
weighted_gap_uo = weighted_gap_uo
[]
[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 / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = true
nl_rel_tol = 1e-12
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-fretting-wear-test-action.i)
starting_point = 0.5e-1
offset = -0.045
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = long-bottom-block-1elem-blocks.e
[]
[remote]
type = BlockDeletionGenerator
input = file
block = '3 4'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[]
[Problem]
material_coverage_check = false
kernel_coverage_check = false
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Modules/TensorMechanics/DynamicMaster]
[all]
add_variables = true
hht_alpha = 0.0
newmark_beta = 0.25
newmark_gamma = 0.5
mass_damping_coefficient = 0.0
stiffness_damping_coefficient = 1.0
generate_output = 'stress_xx stress_yy'
block = '1 2'
strain = FINITE
density = density
[]
[]
[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'
[]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '7750'
[]
[]
[AuxVariables]
[worn_depth]
block = 'normal_secondary_subdomain'
[]
[gap_vel]
block = 'normal_secondary_subdomain'
[]
[]
[AuxKernels]
[gap_vel]
type = WeightedGapVelAux
variable = gap_vel
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = normal_primary_subdomain
secondary_subdomain = normal_secondary_subdomain
disp_x = disp_x
disp_y = disp_y
[]
[worn_depth]
type = MortarArchardsLawAux
variable = worn_depth
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = normal_primary_subdomain
secondary_subdomain = normal_secondary_subdomain
displacements = 'disp_x disp_y'
friction_coefficient = 0.5
energy_wear_coefficient = 1.0e-6
normal_pressure = normal_normal_lm
execute_on = 'TIMESTEP_END'
[]
[]
[Contact]
[normal]
formulation = mortar
model = coulomb
primary = 20
secondary = 10
c_normal = 1e+06
c_tangential = 1.0e+6
capture_tolerance = 1.0e-5
newmark_beta = 0.25
newmark_gamma = 0.5
mortar_dynamics = true
wear_depth = worn_depth
friction_coefficient = 0.5
normalize_c = true
[]
[]
[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(4.0 * pi / 4 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * (cos(32.0 * pi / 4 * t) - 1.0)'
[]
[]
[Executioner]
type = Transient
end_time = 0.5
dt = 0.05
dtmin = .002
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15'
nl_max_its = 40
l_max_its = 15
line_search = 'l2'
snesmf_reuse_base = true
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
checkpoint = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = normal_normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/navier_stokes/examples/laser-welding/3d.i)
period=1.25e-3
endtime=${period}
timestep=1.25e-5
surfacetemp=300
sb=5.67e-8
[GlobalParams]
temperature = T
[]
[Mesh]
type = GeneratedMesh
dim = 3
xmin = -.35e-3
xmax = 0.35e-3
ymin = -.35e-3
ymax = .35e-3
zmin = -.7e-3
zmax = 0
nx = 2
ny = 2
nz = 2
displacements = 'disp_x disp_y disp_z'
uniform_refine = 2
[]
[Variables]
[vel]
family = LAGRANGE_VEC
[]
[T]
[]
[p]
[]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[ICs]
[T]
type = FunctionIC
variable = T
function = '(${surfacetemp} - 300) / .7e-3 * z + ${surfacetemp}'
[]
[]
[Kernels]
[disp_x]
type = Diffusion
variable = disp_x
[]
[disp_y]
type = Diffusion
variable = disp_y
[]
[disp_z]
type = Diffusion
variable = disp_z
[]
[mass]
type = INSADMass
variable = p
use_displaced_mesh = true
[]
[mass_pspg]
type = INSADMassPSPG
variable = p
use_displaced_mesh = true
[]
[momentum_time]
type = INSADMomentumTimeDerivative
variable = vel
use_displaced_mesh = true
[]
[momentum_advection]
type = INSADMomentumAdvection
variable = vel
use_displaced_mesh = true
[]
[momentum_mesh_advection]
type = INSADMomentumMeshAdvection
variable = vel
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
[]
[momentum_viscous]
type = INSADMomentumViscous
variable = vel
use_displaced_mesh = true
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = vel
pressure = p
integrate_p_by_parts = true
use_displaced_mesh = true
[]
[momentum_supg]
type = INSADMomentumSUPG
variable = vel
material_velocity = relative_velocity
use_displaced_mesh = true
[]
[temperature_time]
type = INSADHeatConductionTimeDerivative
variable = T
use_displaced_mesh = true
[]
[temperature_advection]
type = INSADEnergyAdvection
variable = T
use_displaced_mesh = true
[]
[temperature_mesh_advection]
type = INSADEnergyMeshAdvection
variable = T
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
[]
[temperature_conduction]
type = ADHeatConduction
variable = T
thermal_conductivity = 'k'
use_displaced_mesh = true
[]
[temperature_supg]
type = INSADEnergySUPG
variable = T
velocity = vel
use_displaced_mesh = true
[]
[]
[BCs]
[x_no_disp]
type = DirichletBC
variable = disp_x
boundary = 'back'
value = 0
[]
[y_no_disp]
type = DirichletBC
variable = disp_y
boundary = 'back'
value = 0
[]
[z_no_disp]
type = DirichletBC
variable = disp_z
boundary = 'back'
value = 0
[]
[no_slip]
type = ADVectorFunctionDirichletBC
variable = vel
boundary = 'bottom right left top back'
[]
[T_cold]
type = DirichletBC
variable = T
boundary = 'back'
value = 300
[]
[radiation_flux]
type = FunctionRadiativeBC
variable = T
boundary = 'front'
emissivity_function = '1'
Tinfinity = 300
stefan_boltzmann_constant = ${sb}
use_displaced_mesh = true
[]
[weld_flux]
type = GaussianEnergyFluxBC
variable = T
boundary = 'front'
P0 = 159.96989792079225
R = 1.8257418583505537e-4
x_beam_coord = '2e-4 * cos(t * 2 * pi / ${period})'
y_beam_coord = '2e-4 * sin(t * 2 * pi / ${period})'
z_beam_coord = 0
use_displaced_mesh = true
[]
[vapor_recoil]
type = INSADVaporRecoilPressureMomentumFluxBC
variable = vel
boundary = 'front'
use_displaced_mesh = true
[]
[displace_x_top]
type = INSADDisplaceBoundaryBC
boundary = 'front'
variable = 'disp_x'
velocity = 'vel'
component = 0
associated_subdomain = 0
[]
[displace_y_top]
type = INSADDisplaceBoundaryBC
boundary = 'front'
variable = 'disp_y'
velocity = 'vel'
component = 1
associated_subdomain = 0
[]
[displace_z_top]
type = INSADDisplaceBoundaryBC
boundary = 'front'
variable = 'disp_z'
velocity = 'vel'
component = 2
associated_subdomain = 0
[]
[displace_x_top_dummy]
type = INSADDummyDisplaceBoundaryIntegratedBC
boundary = 'front'
variable = 'disp_x'
velocity = 'vel'
component = 0
[]
[displace_y_top_dummy]
type = INSADDummyDisplaceBoundaryIntegratedBC
boundary = 'front'
variable = 'disp_y'
velocity = 'vel'
component = 1
[]
[displace_z_top_dummy]
type = INSADDummyDisplaceBoundaryIntegratedBC
boundary = 'front'
variable = 'disp_z'
velocity = 'vel'
component = 2
[]
[]
[Materials]
[ins_mat]
type = INSADStabilized3Eqn
velocity = vel
pressure = p
temperature = T
use_displaced_mesh = true
[]
[steel]
type = AriaLaserWeld304LStainlessSteel
temperature = T
beta = 1e7
use_displaced_mesh = true
[]
[steel_boundary]
type = AriaLaserWeld304LStainlessSteelBoundary
boundary = 'front'
temperature = T
use_displaced_mesh = true
[]
[const]
type = GenericConstantMaterial
prop_names = 'abs sb_constant'
prop_values = '1 ${sb}'
use_displaced_mesh = true
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu NONZERO strumpack'
[]
[]
[Executioner]
type = Transient
end_time = ${endtime}
dtmin = 1e-8
dtmax = ${timestep}
petsc_options = '-snes_converged_reason -ksp_converged_reason -options_left'
solve_type = 'NEWTON'
line_search = 'none'
nl_max_its = 12
l_max_its = 100
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 7
dt = ${timestep}
linear_iteration_ratio = 1e6
growth_factor = 1.5
[]
[]
[Outputs]
[exodus]
type = Exodus
output_material_properties = true
show_material_properties = 'mu'
[]
checkpoint = true
perf_graph = true
[]
[Debug]
show_var_residual_norms = true
[]
[Adaptivity]
marker = combo
max_h_level = 4
[Indicators]
[error_T]
type = GradientJumpIndicator
variable = T
[]
[error_dispz]
type = GradientJumpIndicator
variable = disp_z
[]
[]
[Markers]
[errorfrac_T]
type = ErrorFractionMarker
refine = 0.4
coarsen = 0.2
indicator = error_T
[]
[errorfrac_dispz]
type = ErrorFractionMarker
refine = 0.4
coarsen = 0.2
indicator = error_dispz
[]
[combo]
type = ComboMarker
markers = 'errorfrac_T errorfrac_dispz'
[]
[]
[]
[Postprocessors]
[num_dofs]
type = NumDOFs
system = 'NL'
[]
[nl]
type = NumNonlinearIterations
[]
[tot_nl]
type = CumulativeValuePostprocessor
postprocessor = 'nl'
[]
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d-rz/finite_action_al.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite_al'
[Mesh]
patch_size = 80
patch_update_strategy = auto
coord_type = RZ
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Problem]
type = AugmentedLagrangianContactFEProblem
maximum_lagrangian_update_iterations = 20
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[temp]
order = ${order}
block = 'plank block'
scaling = 1e-1
[]
[]
[AuxVariables]
[penalty_normal_pressure]
[]
[]
[AuxKernels]
[penalty_normal_pressure]
type = PenaltyMortarUserObjectAux
variable = penalty_normal_pressure
user_object = penalty_weightedgap_object_al_frictionless
contact_quantity = normal_pressure
boundary = 'block_left'
[]
[]
[Modules/TensorMechanics/Master]
[action]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
strain = FINITE
[]
[]
[Kernels]
[hc]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = 'plank block'
[]
[]
[Contact]
[al_frictionless]
formulation = mortar_penalty
model = frictionless
primary = plank_right
secondary = block_left
penalty = 5e6
al_penetration_tolerance = 1e-7
penalty_multiplier = 50
[]
[]
[MortarGapHeatTransfer]
[mortar_heat_transfer]
temperature = temp
use_displaced_mesh = true
gap_flux_options = conduction
gap_conductivity = 1
boundary = plank_right
primary_boundary = plank_right
primary_subdomain = al_frictionless_primary_subdomain
secondary_boundary = block_left
secondary_subdomain = al_frictionless_secondary_subdomain
thermal_lm_scaling = 1e-7
gap_geometry_type = PLATE
[]
[]
[BCs]
[left_temp]
type = DirichletBC
variable = temp
boundary = 'plank_left'
value = 400
[]
[right_temp]
type = DirichletBC
variable = temp
boundary = 'block_right'
value = 300
[]
[left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
preset = false
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
preset = false
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[]
[heat_plank]
type = ADHeatConductionMaterial
block = plank
thermal_conductivity = 2
specific_heat = 1
[]
[heat_block]
type = ADHeatConductionMaterial
block = block
thermal_conductivity = 1
specific_heat = 1
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
end_time = 7.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'none'
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[avg_temp]
type = ElementAverageValue
variable = temp
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
exodus = true
[comp]
type = CSV
show = 'avg_temp'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(test/tests/multiapps/grid-sequencing/vi-fine.i)
l = 10
nx = 80
num_steps = 2
[Mesh]
type = GeneratedMesh
dim = 1
xmax = ${l}
nx = ${nx}
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[bounds]
[]
[]
[Bounds]
[u_upper_bounds]
type = ConstantBounds
variable = bounds
bounded_variable = u
bound_type = upper
bound_value = ${l}
[]
[u_lower_bounds]
type = ConstantBounds
variable = bounds
bounded_variable = u
bound_type = lower
bound_value = 0
[]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = 'x'
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = 'if(x<5,-1,1)'
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
value = 0
variable = u
[]
[right]
type = DirichletBC
boundary = right
value = ${l}
variable = u
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = ${num_steps}
solve_type = NEWTON
dtmin = 1
petsc_options = '-snes_vi_monitor'
petsc_options_iname = '-snes_max_linear_solve_fail -ksp_max_it -pc_type -sub_pc_factor_levels -snes_linesearch_type -snes_type'
petsc_options_value = '0 30 asm 16 basic vinewtonrsls'
[]
[Outputs]
exodus = true
[csv]
type = CSV
execute_on = 'nonlinear timestep_end'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
active = 'upper_violations lower_violations'
[upper_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = '${fparse 10+1e-8}'
comparator = 'greater'
[]
[lower_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = -1e-8
comparator = 'less'
[]
[nls]
type = NumNonlinearIterations
[]
[cum_nls]
type = CumulativeValuePostprocessor
postprocessor = nls
[]
[]
[MultiApps]
[coarse]
type = TransientMultiApp
app_type = MooseTestApp
execute_on = timestep_begin
positions = '0 0 0'
input_files = vi-coarse.i
[]
[]
[Transfers]
[mesh_function_begin]
type = MultiAppGeneralFieldShapeEvaluationTransfer
from_multi_app = coarse
source_variable = u
variable = u
execute_on = timestep_begin
[]
[]
(modules/contact/test/tests/mortar_cartesian_lms/frictionless-mortar-3d.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
second_order = false
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[disp_z]
block = '1 2'
[]
[lm_x]
block = 'secondary_lower'
use_dual = true
[]
[lm_y]
block = 'secondary_lower'
use_dual = true
[]
[lm_z]
block = 'secondary_lower'
use_dual = true
[]
[]
[ICs]
[disp_z]
block = 1
variable = disp_z
value = '${fparse offset}'
type = ConstantIC
[]
[disp_x]
block = 1
variable = disp_x
value = 0
type = ConstantIC
[]
[disp_y]
block = 1
variable = disp_y
value = 0
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[disp_z]
type = MatDiffusion
variable = disp_z
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapCartesianLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_x = lm_x
lm_y = lm_y
lm_z = lm_z
variable = lm_x # This can be anything really
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
correct_edge_dropping = true
c = 1e+02
[]
[normal_x]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_y]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_z]
type = CartesianMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_z
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Preconditioning]
[vcp]
type = VCP
full = true
lm_variable = 'lm_x lm_y lm_z'
primary_variable = 'disp_x disp_y disp_z'
preconditioner = 'LU'
is_lm_coupling_diagonal = true
adaptive_condensation = true
[]
[]
[Executioner]
type = Transient
end_time = 1
dt = .5
dtmin = .01
solve_type = 'NEWTON'
petsc_options_iname = '-mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = '1e-5 NONZERO 1e-10'
l_max_its = 100
nl_max_its = 30
# nl_rel_tol = 1e-6
nl_abs_tol = 1e-12
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
perf_graph = true
exodus = true
csv = true
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = lm_z
subdomain = 'secondary_lower'
execute_on = 'nonlinear timestep_end'
[]
[]
[VectorPostprocessors]
[contact-pressure]
type = NodalValueSampler
block = secondary_lower
variable = lm_z
sort_by = 'id'
execute_on = NONLINEAR
[]
[]
(modules/navier_stokes/test/tests/finite_volume/two_phase/mixture_model/channel-drift-flux.i)
mu = 1.0
rho = 10.0
mu_d = 0.1
rho_d = 1.0
l = 2
U = 1
dp = 0.01
inlet_phase_2 = 0.1
advected_interp_method = 'average'
velocity_interp_method = 'rc'
[GlobalParams]
rhie_chow_user_object = 'rc'
density_interp_method = 'average'
mu_interp_method = 'average'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = vel_x
v = vel_y
pressure = pressure
[]
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = '${fparse l * 5}'
ymin = '${fparse -l / 2}'
ymax = '${fparse l / 2}'
nx = 10
ny = 4
[]
uniform_refine = 0
[]
[Variables]
[vel_x]
type = INSFVVelocityVariable
initial_condition = 0
[]
[vel_y]
type = INSFVVelocityVariable
initial_condition = 0
[]
[pressure]
type = INSFVPressureVariable
[]
[phase_2]
type = INSFVScalarFieldVariable
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = 'rho_mixture'
[]
[u_advection]
type = INSFVMomentumAdvection
variable = vel_x
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = 'rho_mixture'
momentum_component = 'x'
[]
[u_drift]
type = WCNSFV2PMomentumDriftFlux
variable = vel_x
rho_d = ${rho_d}
fd = 'rho_mixture_var'
u_slip = 'vel_slip_x'
v_slip = 'vel_slip_y'
momentum_component = 'x'
[]
[u_viscosity]
type = INSFVMomentumDiffusion
variable = vel_x
mu = 'mu_mixture'
limit_interpolation = true
momentum_component = 'x'
[]
[u_pressure]
type = INSFVMomentumPressure
variable = vel_x
momentum_component = 'x'
pressure = pressure
[]
[v_advection]
type = INSFVMomentumAdvection
variable = vel_y
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = 'rho_mixture'
momentum_component = 'y'
[]
[v_drift]
type = WCNSFV2PMomentumDriftFlux
variable = vel_y
rho_d = ${rho_d}
fd = 'rho_mixture_var'
u_slip = 'vel_slip_x'
v_slip = 'vel_slip_y'
momentum_component = 'x'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = vel_y
mu = 'mu_mixture'
limit_interpolation = true
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = vel_y
momentum_component = 'y'
pressure = pressure
[]
[phase_2_advection]
type = INSFVScalarFieldAdvection
variable = phase_2
u_slip = 'vel_slip_x'
v_slip = 'vel_slip_y'
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = 'upwind'
[]
[phase_2_src]
type = NSFVMixturePhaseInterface
variable = phase_2
phase_coupled = phase_1
alpha = 0.1
[]
[]
[FVBCs]
[inlet-u]
type = INSFVInletVelocityBC
boundary = 'left'
variable = vel_x
functor = '${U}'
[]
[inlet-v]
type = INSFVInletVelocityBC
boundary = 'left'
variable = vel_y
functor = '0'
[]
[walls-u]
type = INSFVNoSlipWallBC
boundary = 'top bottom'
variable = vel_x
function = 0
[]
[walls-v]
type = INSFVNoSlipWallBC
boundary = 'top bottom'
variable = vel_y
function = 0
[]
[outlet_p]
type = INSFVOutletPressureBC
boundary = 'right'
variable = pressure
function = '0'
[]
[inlet_phase_2]
type = FVDirichletBC
boundary = 'left'
variable = phase_2
value = ${inlet_phase_2}
[]
[]
[AuxVariables]
[drag_coefficient]
type = MooseVariableFVReal
[]
[rho_mixture_var]
type = MooseVariableFVReal
[]
[mu_mixture_var]
type = MooseVariableFVReal
[]
[]
[AuxKernels]
[populate_cd]
type = FunctorAux
variable = drag_coefficient
functor = 'Darcy_coefficient'
[]
[populate_rho_mixture_var]
type = FunctorAux
variable = rho_mixture_var
functor = 'rho_mixture'
[]
[populate_mu_mixture_var]
type = FunctorAux
variable = mu_mixture_var
functor = 'mu_mixture'
[]
[]
[FunctorMaterials]
[populate_u_slip]
type = WCNSFV2PSlipVelocityFunctorMaterial
slip_velocity_name = 'vel_slip_x'
momentum_component = 'x'
u = 'vel_x'
v = 'vel_y'
rho = ${rho}
mu = 'mu_mixture'
rho_d = ${rho_d}
particle_diameter = ${dp}
linear_coef_name = 'Darcy_coefficient'
outputs = 'out'
output_properties = 'vel_slip_x'
[]
[populate_v_slip]
type = WCNSFV2PSlipVelocityFunctorMaterial
slip_velocity_name = 'vel_slip_y'
momentum_component = 'y'
u = 'vel_x'
v = 'vel_y'
rho = ${rho}
mu = 'mu_mixture'
rho_d = ${rho_d}
particle_diameter = ${dp}
linear_coef_name = 'Darcy_coefficient'
outputs = 'out'
output_properties = 'vel_slip_y'
[]
[compute_phase_1]
type = ADParsedFunctorMaterial
property_name = phase_1
functor_names = 'phase_2'
expression = '1 - phase_2'
outputs = 'out'
output_properties = 'phase_1'
[]
[CD]
type = NSFVDispersePhaseDragFunctorMaterial
rho = 'rho_mixture'
mu = mu_mixture
u = 'vel_x'
v = 'vel_y'
particle_diameter = ${dp}
[]
[mixing_material]
type = NSFVMixtureFunctorMaterial
phase_2_names = '${rho} ${mu}'
phase_1_names = '${rho_d} ${mu_d}'
prop_names = 'rho_mixture mu_mixture'
phase_1_fraction = 'phase_2'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
nl_rel_tol = 1e-10
[]
[Preconditioning]
[SMP]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
[]
[]
[Outputs]
print_linear_residuals = true
print_nonlinear_residuals = true
[out]
type = Exodus
hide = 'Re lin cum_lin'
[]
[perf]
type = PerfGraphOutput
[]
[]
[Postprocessors]
[Re]
type = ParsedPostprocessor
function = '${rho} * ${l} * ${U}'
pp_names = ''
[]
[lin]
type = NumLinearIterations
[]
[cum_lin]
type = CumulativeValuePostprocessor
postprocessor = lin
[]
[]
(modules/contact/test/tests/kinematic-and-scaling/bouncing-block-kinematic.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = long-bottom-block-no-lower-d-coarse.e
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[ICs]
[./disp_y]
block = 2
variable = disp_y
value = ${fparse starting_point + offset}
type = ConstantIC
[../]
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = false
use_automatic_differentiation = true
strain = SMALL
[]
[]
[Materials]
[elasticity]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e3
poissons_ratio = 0.3
[]
[stress]
type = ADComputeLinearElasticStress
[]
[]
[Contact]
[leftright]
secondary = 10
primary = 20
model = frictionless
formulation = kinematic
penalty = 1e3
normal_smoothing_distance = 0.1
[]
[]
[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 / 40 * t) + ${offset}'
[../]
[./leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[../]
[]
[Executioner]
type = Transient
end_time = 100
dt = 5
dtmin = 5
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 200'
l_max_its = 200
nl_max_its = 20
line_search = 'none'
automatic_scaling = true
verbose = true
scaling_group_variables = 'disp_x disp_y'
resid_vs_jac_scaling_param = 1
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[exo]
type = Exodus
[]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
[nl]
type = NumNonlinearIterations
[]
[lin]
type = NumLinearIterations
[]
[tot_nl]
type = CumulativeValuePostprocessor
postprocessor = nl
[]
[tot_lin]
type = CumulativeValuePostprocessor
postprocessor = lin
[]
[]
(modules/contact/test/tests/mortar_dynamics/block-dynamics.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'
[]
[]
[AuxKernels]
[accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = 'LINEAR timestep_end'
[]
[vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = 'LINEAR timestep_end'
[]
[accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = 'LINEAR timestep_end'
[]
[vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = 'LINEAR timestep_end'
[]
[]
# 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]
[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
use_displaced_mesh = true
c = 1e4
capture_tolerance = 1.0e-5
newmark_beta = 0.25
newmark_gamma = 0.5
[]
[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 = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 75
dt = 0.05
dtmin = .05
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err '
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = false
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
checkpoint = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_frictional_al_tight_slip.i)
[GlobalParams]
volumetric_locking_correction = true
displacements = 'disp_x disp_y'
[]
[Mesh]
[input_file]
type = FileMeshGenerator
file = hertz_cyl_finer.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10001
new_block_name = 'secondary_lower'
sidesets = '3'
input = input_file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10000
sidesets = '2'
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Problem]
type = AugmentedLagrangianContactFEProblem
extra_tag_vectors = 'ref'
maximum_lagrangian_update_iterations = 1000
[]
[AuxVariables]
[penalty_normal_pressure]
[]
[penalty_frictional_pressure]
[]
[accumulated_slip_one]
[]
[tangential_vel_one]
[]
[normal_gap]
[]
[normal_lm]
[]
[saved_x]
[]
[saved_y]
[]
[active]
[]
[dual_var]
use_dual = true
block = '10001'
[]
[]
[Functions]
[disp_ramp_vert]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. -0.020 -0.020'
[]
[disp_ramp_horz]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. 0.0 0.015'
[]
[]
[Modules/TensorMechanics/Master/all]
strain = FINITE
add_variables = true
save_in = 'saved_x saved_y'
extra_vector_tags = 'ref'
block = '1 2 3 4 5 6 7'
generate_output = 'stress_xx stress_yy stress_xy'
[]
[AuxKernels]
[penalty_normal_pressure]
type = PenaltyMortarUserObjectAux
variable = penalty_normal_pressure
user_object = friction_uo
contact_quantity = normal_pressure
boundary = 3
[]
[penalty_frictional_pressure]
type = PenaltyMortarUserObjectAux
variable = penalty_frictional_pressure
user_object = friction_uo
contact_quantity = tangential_pressure_one
boundary = 3
[]
[penalty_tangential_vel_one]
type = PenaltyMortarUserObjectAux
variable = tangential_vel_one
user_object = friction_uo
contact_quantity = tangential_velocity_one
boundary = 3
[]
[penalty_accumulated_slip_one]
type = PenaltyMortarUserObjectAux
variable = accumulated_slip_one
user_object = friction_uo
contact_quantity = accumulated_slip_one
boundary = 3
[]
[normal_lm]
type = PenaltyMortarUserObjectAux
variable = normal_lm
user_object = friction_uo
contact_quantity = normal_lm
boundary = 3
[]
[normal_gap]
type = PenaltyMortarUserObjectAux
variable = normal_gap
user_object = friction_uo
contact_quantity = normal_gap
boundary = 3
[]
[]
[Postprocessors]
[bot_react_x]
type = NodalSum
variable = saved_x
boundary = 1
[]
[bot_react_y]
type = NodalSum
variable = saved_y
boundary = 1
[]
[top_react_x]
type = NodalSum
variable = saved_x
boundary = 4
[]
[top_react_y]
type = NodalSum
variable = saved_y
boundary = 4
[]
[_dt]
type = TimestepSize
[]
[num_lin_it]
type = NumLinearIterations
[]
[num_nonlin_it]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nonlin_it
[]
[gap]
type = SideExtremeValue
value_type = min
variable = normal_gap
boundary = 3
[]
[num_al]
type = NumAugmentedLagrangeIterations
[]
[active_set_size]
type = NodalSum
variable = active
[]
[]
[BCs]
[side_x]
type = DirichletBC
variable = disp_y
boundary = '1 2'
value = 0.0
[]
[bot_y]
type = DirichletBC
variable = disp_x
boundary = '1 2'
value = 0.0
[]
[top_y_disp]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = disp_ramp_vert
[]
[top_x_disp]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = disp_ramp_horz
[]
[]
[Materials]
[stuff1_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e10
poissons_ratio = 0.0
[]
[stuff1_stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[stuff2_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '2 3 4 5 6 7'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stuff2_stress]
type = ComputeFiniteStrainElasticStress
block = '2 3 4 5 6 7'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = -pc_type
petsc_options_value = lu
line_search = 'basic'
nl_abs_tol = 1e-13
nl_rel_tol = 1e-11
nl_max_its = 75
l_tol = 1e-05
l_abs_tol = 1e-13
start_time = 0.0
end_time = 0.1 # 3.5
dt = 0.1
dtmin = 0.1
[Predictor]
type = SimplePredictor
scale = 1.0
[]
automatic_scaling = true
compute_scaling_once = false
off_diagonals_in_auto_scaling = true
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[surface]
type = NodalValueSampler
use_displaced_mesh = false
variable = 'disp_x disp_y normal_gap'
boundary = '3'
sort_by = id
[]
[]
[Outputs]
print_linear_residuals = true
perf_graph = true
exodus = true
csv = false
[vectorpp_output]
type = CSV
create_final_symlink = true
execute_on = 'INITIAL TIMESTEP_END FINAL'
[]
[]
[UserObjects]
[friction_uo]
type = PenaltyFrictionUserObject
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
disp_x = disp_x
disp_y = disp_y
penalty = 1e5
secondary_variable = disp_x
friction_coefficient = 0.4
penetration_tolerance = 1e-7
slip_tolerance = 1e-8
penalty_friction = 1e6
penalty_multiplier = 10
use_physical_gap = true
aux_lm = dual_var
[]
[]
[Constraints]
[x]
type = NormalMortarMechanicalContact
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[y]
type = NormalMortarMechanicalContact
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 2
secondary_boundary = 3
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = friction_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 2
secondary_boundary = 3
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = friction_uo
[]
[]
(modules/contact/test/tests/pdass_problems/cylinder_friction_penalty_normal_al.i)
[GlobalParams]
volumetric_locking_correction = true
displacements = 'disp_x disp_y'
[]
[Mesh]
[input_file]
type = FileMeshGenerator
file = hertz_cyl_finer.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10001
new_block_name = 'secondary_lower'
sidesets = '3'
input = input_file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10000
sidesets = '2'
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Problem]
type = AugmentedLagrangianContactFEProblem
extra_tag_vectors = 'ref'
[]
[AuxVariables]
[penalty_normal_pressure]
[]
[accumulated_slip_one]
[]
[tangential_vel_one]
[]
[normal_gap]
[]
[normal_lm]
[]
[saved_x]
[]
[saved_y]
[]
[active]
[]
[]
[Functions]
[disp_ramp_vert]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. -0.020 -0.020'
[]
[disp_ramp_horz]
type = PiecewiseLinear
x = '0. 1. 3.5'
y = '0. 0.0 0.015'
[]
[]
[Modules/TensorMechanics/Master/all]
strain = FINITE
add_variables = true
save_in = 'saved_x saved_y'
extra_vector_tags = 'ref'
block = '1 2 3 4 5 6 7'
generate_output = 'stress_xx stress_yy stress_xy'
[]
[AuxKernels]
[penalty_normal_pressure]
type = PenaltyMortarUserObjectAux
variable = penalty_normal_pressure
user_object = friction_uo
contact_quantity = normal_pressure
boundary = 3
[]
[normal_lm]
type = PenaltyMortarUserObjectAux
variable = normal_lm
user_object = friction_uo
contact_quantity = normal_lm
boundary = 3
[]
[normal_gap]
type = PenaltyMortarUserObjectAux
variable = normal_gap
user_object = friction_uo
contact_quantity = normal_gap
boundary = 3
[]
[]
[Postprocessors]
[bot_react_x]
type = NodalSum
variable = saved_x
boundary = 1
[]
[bot_react_y]
type = NodalSum
variable = saved_y
boundary = 1
[]
[top_react_x]
type = NodalSum
variable = saved_x
boundary = 4
[]
[top_react_y]
type = NodalSum
variable = saved_y
boundary = 4
[]
[_dt]
type = TimestepSize
[]
[num_lin_it]
type = NumLinearIterations
[]
[num_nonlin_it]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nonlin_it
[]
[gap]
type = SideExtremeValue
value_type = min
variable = normal_gap
boundary = 3
[]
[num_al]
type = NumAugmentedLagrangeIterations
[]
[active_set_size]
type = NodalSum
variable = active
[]
[]
[BCs]
[side_x]
type = DirichletBC
variable = disp_y
boundary = '1 2'
value = 0.0
[]
[bot_y]
type = DirichletBC
variable = disp_x
boundary = '1 2'
value = 0.0
[]
[top_y_disp]
type = FunctionDirichletBC
variable = disp_y
boundary = 4
function = disp_ramp_vert
[]
[top_x_disp]
type = FunctionDirichletBC
variable = disp_x
boundary = 4
function = disp_ramp_horz
[]
[]
[Materials]
[stuff1_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.0
[]
[stuff1_stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[stuff2_elas_tens]
type = ComputeIsotropicElasticityTensor
block = '2 3 4 5 6 7'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stuff2_stress]
type = ComputeFiniteStrainElasticStress
block = '2 3 4 5 6 7'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = -pc_type
petsc_options_value = lu
line_search = 'none'
nl_abs_tol = 1e-10
nl_rel_tol = 1e-8
nl_max_its = 1300
l_tol = 1e-05
l_abs_tol = 1e-13
start_time = 0.0
end_time = 0.2 # 3.5
dt = 0.1
dtmin = 0.001
[Predictor]
type = SimplePredictor
scale = 1.0
[]
automatic_scaling = true
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[surface]
type = NodalValueSampler
use_displaced_mesh = false
variable = 'disp_x disp_y penalty_normal_pressure normal_gap'
boundary = '3'
sort_by = id
[]
[]
[Outputs]
print_linear_residuals = true
perf_graph = true
exodus = true
csv = false
[vectorpp_output]
type = CSV
create_final_symlink = true
execute_on = 'INITIAL TIMESTEP_END FINAL'
[]
[]
[UserObjects]
[friction_uo]
type = PenaltyWeightedGapUserObject
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
disp_x = disp_x
disp_y = disp_y
penalty = 1e7
penetration_tolerance = 1e-12
use_physical_gap = true
[]
[]
[Constraints]
[x]
type = NormalMortarMechanicalContact
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[y]
type = NormalMortarMechanicalContact
primary_boundary = '2'
secondary_boundary = '3'
primary_subdomain = '10000'
secondary_subdomain = '10001'
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = friction_uo
[]
[]
(modules/contact/test/tests/bouncing-block-contact/grid-sequencing/grid-sequencing.i)
starting_point = 2e-1
# We offset slightly so we avoid the case where the bottom of the secondary block and the top of the
# primary block are perfectly vertically aligned which can cause the backtracking line search some
# issues for a coarsest mesh (basic line search handles that fine)
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
[]
[Mesh]
[File]
type = FileMeshGenerator
file = level0.e
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[]
[Contact]
[contact]
secondary = 10
primary = 20
formulation = mortar
model = coulomb
friction_coefficient = 0.4
c_normal = 1e+02
c_tangential = 1.0e2
[]
[]
[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 / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 200
num_steps = 3
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-6'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
nl_abs_tol = 5e-10
num_grids = 5
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[exo]
type = Exodus
sync_times = '15'
sync_only = true
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = contact_normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/contact/test/tests/mortar_cartesian_lms/two_block_1st_order_constraint_lm_xy.i)
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
theta = 0
velocity = 0.1
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.35
xmax = -0.05
ymin = -1
ymax = 0
nx = 1
ny = 3
elem_type = QUAD4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_sideset_names]
type = RenameBoundaryGenerator
input = left_block_sidesets
old_boundary = '10 11 12 13'
new_boundary = 'l_bottom l_right l_top l_left'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sideset_names
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.3
ymin = -1
ymax = 0
nx = 1
ny = 2
elem_type = QUAD4
[]
[right_block_sidesets]
type = RenameBoundaryGenerator
input = right_block
old_boundary = '0 1 2 3'
new_boundary = '20 21 22 23'
[]
[right_block_sideset_names]
type = RenameBoundaryGenerator
input = right_block_sidesets
old_boundary = '20 21 22 23'
new_boundary = 'r_bottom r_right r_top r_left'
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block_sideset_names
subdomain_id = 2
[]
[combined_mesh]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_id'
[]
[left_lower]
type = LowerDBlockFromSidesetGenerator
input = combined_mesh
sidesets = '11'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[right_lower]
type = LowerDBlockFromSidesetGenerator
input = left_lower
sidesets = '23'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[rotate_mesh]
type = TransformGenerator
input = right_lower
transform = ROTATE
vector_value = '0 0 ${theta}'
[]
[]
[Variables]
[lm_x]
block = 'secondary_lower'
use_dual = true
[]
[lm_y]
block = 'secondary_lower'
use_dual = true
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
incremental = true
add_variables = true
block = '1 2'
[]
[]
[Functions]
[horizontal_movement]
type = ParsedFunction
expression = '${velocity} * t * cos(${theta}/180*pi)'
[]
[vertical_movement]
type = ParsedFunction
expression = '${velocity} * t * sin(${theta}/180*pi)'
[]
[]
[BCs]
[push_left_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 13
function = horizontal_movement
[]
[fix_right_x]
type = DirichletBC
variable = disp_x
boundary = 21
value = 0.0
[]
[fix_right_y]
type = DirichletBC
variable = disp_y
boundary = 21
value = 0.0
[]
[push_left_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 13
function = vertical_movement
[]
[]
[Materials]
[elasticity_tensor_left]
type = ComputeIsotropicElasticityTensor
block = 1
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[]
[stress_left]
type = ComputeFiniteStrainElasticStress
block = 1
[]
[elasticity_tensor_right]
type = ComputeIsotropicElasticityTensor
block = 2
youngs_modulus = 1.0e6
poissons_ratio = 0.3
[]
[stress_right]
type = ComputeFiniteStrainElasticStress
block = 2
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapCartesianLMMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_x = lm_x
lm_y = lm_y
variable = lm_x # This can be anything really
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
correct_edge_dropping = true
[]
[normal_x]
type = CartesianMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_y]
type = CartesianMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu superlu_dist NONZERO 1e-10'
line_search = none
dt = 0.1
dtmin = 0.1
end_time = 1.0
l_max_its = 100
nl_max_its = 20
nl_rel_tol = 1e-6
snesmf_reuse_base = false
[]
[Outputs]
exodus = false
file_base = './output/1st_order_${theta}_degree_out'
[comp]
type = CSV
show = 'tot_lin_it tot_nonlin_it'
execute_on = 'FINAL'
[]
[]
[Postprocessors]
[avg_disp_x]
type = ElementAverageValue
variable = disp_x
block = '1 2'
[]
[avg_disp_y]
type = ElementAverageValue
variable = disp_y
block = '1 2'
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
[]
[min_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
value_type = min
[]
[min_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
value_type = min
[]
[num_lin_it]
type = NumLinearIterations
[]
[num_nonlin_it]
type = NumNonlinearIterations
[]
[tot_lin_it]
type = CumulativeValuePostprocessor
postprocessor = num_lin_it
[]
[tot_nonlin_it]
type = CumulativeValuePostprocessor
postprocessor = num_nonlin_it
[]
[]
(modules/contact/test/tests/bouncing-block-contact/frictionless-weighted-gap-mixed-basis.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
second_order = true
patch_update_strategy = always
[]
[Variables]
[./disp_x]
block = '1 2'
order = SECOND
[../]
[./disp_y]
block = '1 2'
order = SECOND
[../]
[./normal_lm]
block = 3
[../]
[]
# [AuxVariables]
# [pid]
# order = CONSTANT
# family = MONOMIAL
# []
# []
# [AuxKernels]
# [pid]
# type = ProcessorIDAux
# variable = pid
# []
# []
[ICs]
[./disp_y]
block = 2
variable = disp_y
value = ${fparse starting_point + offset}
type = ConstantIC
[../]
[]
[Kernels]
[./disp_x]
type = MatDiffusion
variable = disp_x
[../]
[./disp_y]
type = MatDiffusion
variable = disp_y
[../]
[]
[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]
[./weighted_gap_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
c = 1
weighted_gap_uo = weighted_gap_uo
[../]
[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
preset = false
[../]
[./boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
preset = false
[../]
[./topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
preset = false
[../]
[./leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
preset = false
[../]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor -snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = false
abort_on_solve_fail = true
nl_rel_tol = 1e-12
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[./num_nl]
type = NumNonlinearIterations
[../]
[./cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[../]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/contact/test/tests/mortar_tm/2d/ad_frictionless_fir/finite_rr.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite_rr'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = 'ref'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[]
[Modules/TensorMechanics/Master]
[action]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank block'
extra_vector_tags = 'ref'
use_automatic_differentiation = true
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e0
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
nl_abs_tol = 1e-7
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/contact/test/tests/mortar_tm/2d/ad_frictionless_sec/finite.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD9
order = SECOND
name = 'finite'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[]
[Modules/TensorMechanics/Master]
[action]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e0
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
preset = false
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = ADFunctionDirichletBC
variable = disp_x
preset = false
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
preset = false
boundary = block_right
function = '-t'
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 5.0
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-wear.i)
starting_point = 0.5e-1
offset = -0.05
[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
hht_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]
[worn_depth]
block = '3'
[]
[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'
[]
[]
[AuxKernels]
[worn_depth]
type = MortarArchardsLawAux
variable = worn_depth
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
displacements = 'disp_x disp_y'
friction_coefficient = 0.5
energy_wear_coefficient = 1.0
normal_pressure = normal_lm
[]
[accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = 'linear timestep_end'
[]
[vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = 'linear timestep_end'
[]
[accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = 'linear timestep_end'
[]
[vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = 'linear timestep_end'
[]
[]
[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]
[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
use_displaced_mesh = true
c = 1e4
capture_tolerance = 1.0e-5
newmark_beta = 0.25
newmark_gamma = 0.5
[]
[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(8.0 * pi / 4 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 0.675
dt = 0.075
dtmin = .075
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount '
petsc_options_value = 'lu superlu_dist NONZERO 1e-15'
nl_max_its = 30
line_search = 'l2'
snesmf_reuse_base = false
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
checkpoint = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/solid_mechanics/test/tests/rom_stress_update/AD_finite_strain_laromance.i)
[GlobalParams]
displacements = 'disp_r disp_z'
[]
[Problem]
coord_type = RZ
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 1
xmax = 2
nx = 50
ny = 50
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
incremental = true
add_variables = true
eigenstrain_names = 'thermal'
use_automatic_differentiation = true
[]
[]
[AuxVariables]
[temp]
initial_condition = 1000.0
[]
[]
[AuxKernels]
[cooling]
type = FunctionAux
variable = temp
function = '1000-10*t*x'
[]
[]
[BCs]
[bottom_fix]
type = ADDirichletBC
variable = disp_z
boundary = bottom
value = 0.0
[]
[left_fix]
type = ADDirichletBC
variable = disp_r
boundary = left
value = 0.0
[]
[]
[Materials]
[eigenstrain]
type = ADComputeThermalExpansionEigenstrain
eigenstrain_name = 'thermal'
stress_free_temperature = 1000
thermal_expansion_coeff = 1e-6 #1e-4
temperature = temp
[]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 3.30e11
poissons_ratio = 0.3
[]
[stress]
type = ADComputeMultipleInelasticStress
inelastic_models = rom_stress_prediction
[]
[rom_stress_prediction]
type = ADSS316HLAROMANCEStressUpdateTest
temperature = temp
initial_cell_dislocation_density = 6.0e12
initial_wall_dislocation_density = 4.4e11
outputs = all
[]
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
end_time = 10
dt = 1
automatic_scaling = true
[]
[Outputs]
# print_linear_converged_reason = false
# print_nonlinear_converged_reason = false
# print_linear_residuals = false
perf_graph = true
[]
(modules/contact/test/tests/mortar_tm/2drz/ad_frictionless_first/finite.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[]
[Modules/TensorMechanics/Master]
[block]
use_automatic_differentiation = true
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'block'
[]
[plank]
use_automatic_differentiation = true
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e0
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = DirichletBC
variable = disp_x
boundary = block_right
value = 0
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
preset = false
boundary = block_right
function = '-t'
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[]
[swell]
type = ADComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[]
[swell_mat]
type = ADGenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/contact/test/tests/mortar_tm/2drz/frictionless_second/small.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD9
order = SECOND
name = 'small'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = 0
ymax = 10
nx = 2
ny = 33
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[]
[Modules/TensorMechanics/Master]
[block]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'block'
[]
[plank]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e0
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = DirichletBC
variable = disp_x
boundary = block_right
value = 0
[]
[right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[]
[]
[Materials]
[plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ComputeLinearElasticStress
block = 'plank block'
[]
[swell]
type = ComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[]
[swell_mat]
type = GenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 3
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/contact/test/tests/bouncing-block-contact/tied-nodes.i)
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
[]
[Mesh]
file = long-bottom-block-symmetric-single-element.e
[]
[Variables]
[./disp_x]
scaling = 2
[../]
[./disp_y]
scaling = 3
[../]
[]
[Kernels]
[./disp_x]
type = MatDiffusion
variable = disp_x
[../]
[./disp_y]
type = MatDiffusion
variable = disp_y
[../]
[]
[Constraints]
[./disp_x]
type = RANFSTieNode
secondary = 10
primary = 20
variable = disp_x
primary_variable = disp_x
component = x
[../]
[./disp_y]
type = RANFSTieNode
secondary = 10
primary = 20
variable = disp_y
primary_variable = disp_y
component = y
[../]
[]
[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 = DirichletBC
variable = disp_y
boundary = 30
value = 0
[../]
[./topx]
type = DirichletBC
variable = disp_x
boundary = 30
value = 0
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dtmin = 1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[exo]
type = Exodus
[]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
[./num_nl]
type = NumNonlinearIterations
[../]
[./cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[../]
[]
(modules/contact/test/tests/mortar_tm/2drz/frictionless_second/finite_rr.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD9
order = SECOND
name = 'finite_rr'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = 0
ymax = 10
nx = 2
ny = 33
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = 'ref'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[]
[Modules/TensorMechanics/Master]
[block]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'block'
extra_vector_tags = 'ref'
[]
[plank]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
extra_vector_tags = 'ref'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e0
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
preset = false
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = block_right
value = 0
[]
[right_y]
type = FunctionDirichletBC
variable = disp_y
preset = false
boundary = block_right
function = '-t'
[]
[]
[Materials]
[plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = 'plank block'
[]
[swell]
type = ComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[]
[swell_mat]
type = GenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 3
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
nl_abs_tol = 1e-12
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/contact/test/tests/mortar_cartesian_lms/frictionless-weighted-gap-lm.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[lm_x]
block = 3
[]
[lm_y]
block = 3
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapCartesianLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
lm_x = lm_x
lm_y = lm_y
variable = lm_x # Shouldn't be needed, but forced by framework
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
c = 1
[]
[normal_x]
type = CartesianMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
[]
[normal_y]
type = CartesianMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
[]
[]
[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 / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = 5
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
l_tol = 1e-03
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = true
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = lm_y
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/contact/test/tests/bouncing-block-contact/bouncing-block-ranfs.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
diffusivity = 1e0
ping_pong_protection = true
[]
[Mesh]
file = long-bottom-block-no-lower-d.e
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[ICs]
[./disp_y]
block = 2
variable = disp_y
value = ${fparse starting_point + offset}
type = ConstantIC
[../]
[]
[Kernels]
[./disp_x]
type = MatDiffusion
variable = disp_x
[../]
[./disp_y]
type = MatDiffusion
variable = disp_y
[../]
[]
[Contact]
[./top_bottom]
secondary = 10
primary = 20
model = frictionless
formulation = ranfs
[../]
[]
[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 / 40 * t) + ${offset}'
[../]
[./leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[../]
[]
[Executioner]
type = Transient
end_time = 200
dt = 5
dtmin = 2.5
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_hypre_type -mat_mffd_err'
petsc_options_value = 'hypre boomeramg 1e-5'
l_max_its = 30
nl_max_its = 20
line_search = 'none'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[exo]
type = Exodus
[]
checkpoint = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
[./num_nl]
type = NumNonlinearIterations
[../]
[./cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[../]
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/finite_rr.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[secondary]
input = block_rename
type = LowerDBlockFromSidesetGenerator
sidesets = 'block_left'
new_block_id = '30'
new_block_name = 'frictionless_secondary_subdomain'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'plank_right'
new_block_id = '20'
new_block_name = 'frictionless_primary_subdomain'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
converge_on = 'disp_x disp_y temp'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[temp]
order = ${order}
block = 'plank block'
scaling = 1e-1
[]
[thermal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
scaling = 1e-7
[]
[frictionless_normal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
use_dual = true
[]
[]
[Modules/TensorMechanics/Master]
[action]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
strain = FINITE
extra_vector_tags = 'ref'
[]
[]
[Kernels]
[hc]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = 'plank block'
extra_vector_tags = 'ref'
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
lm_variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_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 = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[thermal_contact]
type = GapConductanceConstraint
variable = thermal_lm
secondary_variable = temp
k = 1
use_displaced_mesh = true
primary_boundary = plank_right
primary_subdomain = frictionless_primary_subdomain
secondary_boundary = block_left
secondary_subdomain = frictionless_secondary_subdomain
displacements = 'disp_x disp_y'
[]
[]
[BCs]
[left_temp]
type = ADDirichletBC
variable = temp
boundary = 'plank_left'
value = 400
[]
[right_temp]
type = ADDirichletBC
variable = temp
boundary = 'block_right'
value = 300
[]
[left_x]
type = ADDirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = ADDirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
preset = false
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
preset = false
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[]
[heat_plank]
type = ADHeatConductionMaterial
block = plank
thermal_conductivity = 2
specific_heat = 1
[]
[heat_block]
type = ADHeatConductionMaterial
block = block
thermal_conductivity = 1
specific_heat = 1
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -snes_max_it'
petsc_options_value = 'lu NONZERO 1e-15 20'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'none'
nl_abs_tol = 1e-13
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[avg_temp]
type = ElementAverageValue
variable = temp
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact avg_temp'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/contact/test/tests/mortar_tm/2d/frictionless_first/finite.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[]
[Modules/TensorMechanics/Master]
[action]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank block'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e0
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
preset = false
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = FunctionDirichletBC
variable = disp_x
preset = false
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
[]
[right_y]
type = FunctionDirichletBC
variable = disp_y
preset = false
boundary = block_right
function = '-t'
[]
[]
[Materials]
[plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = 'plank block'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(test/tests/nodalkernels/constraint_enforcement/ad-upper-and-lower-bound.i)
l=10
nx=100
num_steps=10
[Mesh]
type = GeneratedMesh
dim = 1
xmax = ${l}
nx = ${nx}
[]
[Variables]
[u]
[]
[lm_upper]
[]
[lm_lower]
[]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = 'x'
[]
[]
[Kernels]
[time]
type = ADTimeDerivative
variable = u
[]
[diff]
type = ADDiffusion
variable = u
[]
[ffn]
type = ADBodyForce
variable = u
function = 'if(x<5,-1,1)'
[]
[]
[NodalKernels]
[upper_bound]
type = ADUpperBoundNodalKernel
variable = lm_upper
v = u
exclude_boundaries = 'left right'
upper_bound = 10
[]
[forces_from_upper]
type = ADCoupledForceNodalKernel
variable = u
v = lm_upper
coef = -1
[]
[lower_bound]
type = ADLowerBoundNodalKernel
variable = lm_lower
v = u
exclude_boundaries = 'left right'
lower_bound = 0
[]
[forces_from_lower]
type = ADCoupledForceNodalKernel
variable = u
v = lm_lower
coef = 1
[]
[]
[BCs]
[left]
type = ADDirichletBC
boundary = left
value = 0
variable = u
[]
[right]
type = ADDirichletBC
boundary = right
value = ${l}
variable = u
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = ${num_steps}
solve_type = NEWTON
dtmin = 1
petsc_options_iname = '-snes_max_linear_solve_fail -ksp_max_it -pc_type -sub_pc_factor_levels -snes_linesearch_type'
petsc_options_value = '0 30 asm 16 basic'
[]
[Outputs]
exodus = true
[csv]
type = CSV
execute_on = 'nonlinear timestep_end'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[active_upper_lm]
type = GreaterThanLessThanPostprocessor
variable = lm_upper
execute_on = 'nonlinear timestep_end'
value = 1e-8
comparator = 'greater'
[]
[upper_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = ${fparse 10+1e-8}
comparator = 'greater'
[]
[active_lower_lm]
type = GreaterThanLessThanPostprocessor
variable = lm_lower
execute_on = 'nonlinear timestep_end'
value = 1e-8
comparator = 'greater'
[]
[lower_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = -1e-8
comparator = 'less'
[]
[nls]
type = NumNonlinearIterations
[]
[cum_nls]
type = CumulativeValuePostprocessor
postprocessor = nls
[]
[]
(modules/contact/test/tests/mortar_restart/frictional_bouncing_block_action_restart_1.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = long-bottom-block-no-lower-d.e
[]
allow_renumbering = false
uniform_refine = 0 # 1,2
patch_update_strategy = always
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
generate_output = 'stress_xx stress_yy'
block = '1 2'
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e3
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[]
[Contact]
[frictional]
primary = 20
secondary = 10
formulation = mortar
model = coulomb
friction_coefficient = 0.4
c_normal = 1.0e1
c_tangential = 1.0e6
[]
[]
[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 = ADFunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 20 * t) + ${offset}'
preset = false
[]
[leftx]
type = ADFunctionDirichletBC
variable = disp_x
boundary = 30
function = '2e-2 * t'
# function = '0'
preset = false
[]
[]
[Executioner]
type = Transient
end_time = 5.25 # 70
dt = 0.25 # 0.1 for finer meshes (uniform_refine)
dtmin = .01
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type '
'-pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15 '
' 1e-5'
l_max_its = 30
nl_max_its = 40
line_search = 'basic'
snesmf_reuse_base = false
nl_abs_tol = 1e-9
nl_rel_tol = 1e-9
l_tol = 1e-07 # Tightening l_tol can help with friction
[]
[Debug]
show_var_residual_norms = true
[]
[VectorPostprocessors]
[cont_press]
type = NodalValueSampler
variable = frictional_normal_lm
boundary = '10'
sort_by = x
execute_on = FINAL
[]
[friction]
type = NodalValueSampler
variable = frictional_tangential_lm
boundary = '10'
sort_by = x
execute_on = FINAL
[]
[]
[Outputs]
exodus = true
[checkfile]
type = CSV
show = 'cont_press friction'
start_time = 0.0
execute_vector_postprocessors_on = FINAL
[]
[checkpoint]
type = Checkpoint
num_files = 2
time_step_interval = 1
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative_nli contact cumulative_li num_l'
[num_nl]
type = NumNonlinearIterations
[]
[num_l]
type = NumLinearIterations
[]
[cumulative_nli]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[cumulative_li]
type = CumulativeValuePostprocessor
postprocessor = num_l
[]
[contact]
type = ContactDOFSetSize
variable = frictional_normal_lm
subdomain = 'frictional_secondary_subdomain'
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/contact/test/tests/mortar_cartesian_lms/two_block_1st_order_constraint_lm_xy_friction_vcp.i)
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
theta = 0
velocity = 0.1
refine = 3
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.35
xmax = -0.05
ymin = -1
ymax = 0
nx = 1
ny = 3
elem_type = QUAD4
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_sideset_names]
type = RenameBoundaryGenerator
input = left_block_sidesets
old_boundary = '10 11 12 13'
new_boundary = 'l_bottom l_right l_top l_left'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sideset_names
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.3
ymin = -1
ymax = 0
nx = 1
ny = 2
elem_type = QUAD4
[]
[right_block_sidesets]
type = RenameBoundaryGenerator
input = right_block
old_boundary = '0 1 2 3'
new_boundary = '20 21 22 23'
[]
[right_block_sideset_names]
type = RenameBoundaryGenerator
input = right_block_sidesets
old_boundary = '20 21 22 23'
new_boundary = 'r_bottom r_right r_top r_left'
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block_sideset_names
subdomain_id = 2
[]
[combined_mesh]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_id'
[]
[left_lower]
type = LowerDBlockFromSidesetGenerator
input = combined_mesh
sidesets = '11'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[right_lower]
type = LowerDBlockFromSidesetGenerator
input = left_lower
sidesets = '23'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[rotate_mesh]
type = TransformGenerator
input = right_lower
transform = ROTATE
vector_value = '0 0 ${theta}'
[]
uniform_refine = ${refine}
[]
[Variables]
[lm_x]
block = 'secondary_lower'
use_dual = true
[]
[lm_y]
block = 'secondary_lower'
use_dual = true
[]
[]
[AuxVariables]
[normal_lm]
family = LAGRANGE
order = FIRST
[]
[tangent_lm]
family = LAGRANGE
order = FIRST
[]
[]
[AuxKernels]
[normal_lm]
type = MortarPressureComponentAux
variable = normal_lm
primary_boundary = '23'
secondary_boundary = '11'
lm_var_x = lm_x
lm_var_y = lm_y
component = 'NORMAL'
boundary = '11'
[]
[tangent_lm]
type = MortarPressureComponentAux
variable = tangent_lm
primary_boundary = '23'
secondary_boundary = '11'
lm_var_x = lm_x
lm_var_y = lm_y
component = 'tangent1'
boundary = '11'
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
incremental = true
add_variables = true
block = '1 2'
[]
[]
[Functions]
[horizontal_movement]
type = ParsedFunction
expression = '${velocity} * t * cos(${theta}/180*pi)'
[]
[vertical_movement]
type = ParsedFunction
expression = '${velocity} * t * sin(${theta}/180*pi)'
[]
[]
[BCs]
[push_left_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 13
function = horizontal_movement
[]
[fix_right_x]
type = DirichletBC
variable = disp_x
boundary = 21
value = 0.0
[]
[fix_right_y]
type = DirichletBC
variable = disp_y
boundary = 21
value = 0.0
[]
[push_left_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 13
function = vertical_movement
[]
[]
[Materials]
[elasticity_tensor_left]
type = ComputeIsotropicElasticityTensor
block = 1
youngs_modulus = 1.0e4
poissons_ratio = 0.3
[]
[stress_left]
type = ComputeFiniteStrainElasticStress
block = 1
[]
[elasticity_tensor_right]
type = ComputeIsotropicElasticityTensor
block = 2
youngs_modulus = 1.0e8
poissons_ratio = 0.3
[]
[stress_right]
type = ComputeFiniteStrainElasticStress
block = 2
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeFrictionalForceCartesianLMMechanicalContact # ComputeCartesianLMFrictionMechanicalContact
# type = ComputeWeightedGapLMMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_x = lm_x
lm_y = lm_y
variable = lm_x # This can be anything really
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
correct_edge_dropping = true
mu = 1.0
c_t = 1.0e5
[]
[normal_x]
type = CartesianMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_x
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[normal_y]
type = CartesianMortarMechanicalContact
primary_boundary = '23'
secondary_boundary = '11'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = lm_y
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
[]
[]
[Preconditioning]
[vcp]
type = VCP
full = true
lm_variable = 'lm_x lm_y'
primary_variable = 'disp_x disp_y'
preconditioner = 'LU'
is_lm_coupling_diagonal = false
adaptive_condensation = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = ' 1e-8 NONZERO 1e-15'
line_search = none
dt = 0.1
dtmin = 0.1
end_time = 1.0
l_max_its = 100
nl_max_its = 20
nl_rel_tol = 1e-8
snesmf_reuse_base = false
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[avg_disp_x]
type = ElementAverageValue
variable = disp_x
block = '1 2'
[]
[avg_disp_y]
type = ElementAverageValue
variable = disp_y
block = '1 2'
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
[]
[min_disp_x]
type = ElementExtremeValue
variable = disp_x
block = '1 2'
value_type = min
[]
[min_disp_y]
type = ElementExtremeValue
variable = disp_y
block = '1 2'
value_type = min
[]
[num_lin_it]
type = NumLinearIterations
[]
[num_nonlin_it]
type = NumNonlinearIterations
[]
[tot_lin_it]
type = CumulativeValuePostprocessor
postprocessor = num_lin_it
[]
[tot_nonlin_it]
type = CumulativeValuePostprocessor
postprocessor = num_nonlin_it
[]
[max_norma_lm]
type = ElementExtremeValue
variable = normal_lm
[]
[min_norma_lm]
type = ElementExtremeValue
variable = normal_lm
value_type = min
[]
[]
[VectorPostprocessors]
[normal_lm]
type = NodalValueSampler
block = 'secondary_lower'
variable = normal_lm
sort_by = 'y'
[]
[tangent_lm]
type = NodalValueSampler
block = 'secondary_lower'
variable = tangent_lm
sort_by = 'y'
[]
[]
(modules/contact/test/tests/pdass_problems/frictional_bouncing_block.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
uniform_refine = 0 # 1,2
patch_update_strategy = always
allow_renumbering = false
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[frictional_normal_lm]
block = 3
use_dual = true
[]
[frictional_tangential_lm]
block = 3
use_dual = true
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
generate_output = 'stress_xx stress_yy'
block = '1 2'
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e3
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[]
[UserObjects]
[weighted_vel_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
lm_variable_normal = frictional_normal_lm
lm_variable_tangential_one = frictional_tangential_lm
secondary_variable = disp_x
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeFrictionalForceLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
friction_lm = frictional_tangential_lm
mu = 0.4
c = 1.0e1
c_t = 1.0e1
weighted_gap_uo = weighted_vel_uo
weighted_velocities_uo = weighted_vel_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_tangential_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_tangential_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_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 = ADFunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 20 * t) + ${offset}'
preset = false
[]
[leftx]
type = ADFunctionDirichletBC
variable = disp_x
boundary = 30
function = '2e-2 * t'
# function = '0'
preset = false
[]
[]
[Executioner]
type = Transient
end_time = 7 # 70
dt = 0.25 # 0.1 for finer meshes (uniform_refine)
dtmin = .01
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 40
line_search = 'none'
snesmf_reuse_base = false
nl_abs_tol = 1e-9
nl_rel_tol = 1e-9
l_tol = 1e-07 # Tightening l_tol can help with friction
[]
[Debug]
show_var_residual_norms = true
[]
[VectorPostprocessors]
[cont_press]
type = NodalValueSampler
variable = frictional_normal_lm
boundary = '10'
sort_by = x
execute_on = FINAL
[]
[friction]
type = NodalValueSampler
variable = frictional_tangential_lm
boundary = '10'
sort_by = x
execute_on = FINAL
[]
[]
[Outputs]
exodus = false
[checkfile]
type = CSV
show = 'cont_press friction'
start_time = 0.0
execute_vector_postprocessors_on = FINAL
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative_nli contact cumulative_li num_l'
[num_nl]
type = NumNonlinearIterations
[]
[num_l]
type = NumLinearIterations
[]
[cumulative_nli]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[cumulative_li]
type = CumulativeValuePostprocessor
postprocessor = num_l
[]
[contact]
type = ContactDOFSetSize
variable = frictional_normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/small-2d-rz/small.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'small'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[secondary]
input = block_rename
type = LowerDBlockFromSidesetGenerator
sidesets = 'block_left'
new_block_id = '30'
new_block_name = 'frictionless_secondary_subdomain'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'plank_right'
new_block_id = '20'
new_block_name = 'frictionless_primary_subdomain'
[]
[]
[Problem]
coord_type = RZ
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[temp]
order = ${order}
block = 'plank block'
scaling = 1e-1
[]
[thermal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
scaling = 1e-7
[]
[frictionless_normal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
use_dual = true
[]
[]
[Modules/TensorMechanics/Master]
[action]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
[]
[]
[Kernels]
[hc]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = 'plank block'
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
lm_variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_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 = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[thermal_contact]
type = GapConductanceConstraint
variable = thermal_lm
secondary_variable = temp
k = 1
use_displaced_mesh = true
primary_boundary = plank_right
primary_subdomain = frictionless_primary_subdomain
secondary_boundary = block_left
secondary_subdomain = frictionless_secondary_subdomain
displacements = 'disp_x disp_y'
[]
[]
[BCs]
[left_temp]
type = DirichletBC
variable = temp
boundary = 'plank_left'
value = 400
[]
[right_temp]
type = DirichletBC
variable = temp
boundary = 'block_right'
value = 300
[]
[left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
preset = false
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
preset = false
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeLinearElasticStress
block = 'plank block'
[]
[heat_plank]
type = ADHeatConductionMaterial
block = plank
thermal_conductivity = 2
specific_heat = 1
[]
[heat_block]
type = ADHeatConductionMaterial
block = block
thermal_conductivity = 1
specific_heat = 1
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -snes_max_it'
petsc_options_value = 'lu NONZERO 1e-15 20'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'none'
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[avg_temp]
type = ElementAverageValue
variable = temp
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact avg_temp'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/contact/test/tests/mortar_tm/2d/ad_frictional/finite_stiff.i)
E_block = 1e7
E_plank = 1e9
elem = QUAD8
order = SECOND
name = 'finite_stiff'
[Mesh]
patch_size = 200
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[]
[Modules/TensorMechanics/Master]
[action]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
[]
[]
[Contact]
[frictional]
primary = plank_right
secondary = block_left
formulation = mortar
model = coulomb
c_normal = 1e0
c_tangential = 1e-6
friction_coefficient = 0.2
tangential_lm_scaling = 1.0e-10
[]
[]
[BCs]
[left_x]
type = ADDirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
preset = false
[]
[left_y]
type = ADDirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
preset = false
[]
[right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
preset = false
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
preset = false
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu NONZERO 1e-12'
end_time = 5.3
dt = 0.12
dtmin = 0.12
line_search = 'none'
nl_div_tol = 1e100
timestep_tolerance = 1e-6
l_abs_tol = 1e-13
nl_abs_tol = 1e-9
nl_rel_tol = 1e-14
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictional_normal_lm
subdomain = frictional_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(test/tests/nodalkernels/constraint_enforcement/vi-bounding.i)
l=10
nx=100
num_steps=10
[Mesh]
type = GeneratedMesh
dim = 1
xmax = ${l}
nx = ${nx}
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[bounds][]
[]
[Bounds]
[./u_upper_bounds]
type = ConstantBounds
variable = bounds
bounded_variable = u
bound_type = upper
bound_value = ${l}
[../]
[./u_lower_bounds]
type = ConstantBounds
variable = bounds
bounded_variable = u
bound_type = lower
bound_value = 0
[../]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = 'x'
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = 'if(x<5,-1,1)'
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
value = 0
variable = u
[]
[right]
type = DirichletBC
boundary = right
value = ${l}
variable = u
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = ${num_steps}
solve_type = NEWTON
dtmin = 1
petsc_options_iname = '-snes_max_linear_solve_fail -ksp_max_it -pc_type -sub_pc_factor_levels -snes_linesearch_type -snes_type'
petsc_options_value = '0 30 asm 16 basic vinewtonrsls'
[]
[Outputs]
exodus = true
[csv]
type = CSV
execute_on = 'nonlinear timestep_end'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[upper_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = ${fparse 10+1e-8}
comparator = 'greater'
[]
[lower_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = -1e-8
comparator = 'less'
[]
[nls]
type = NumNonlinearIterations
[]
[cum_nls]
type = CumulativeValuePostprocessor
postprocessor = nls
[]
[]
(modules/contact/test/tests/pdass_problems/frictional_bouncing_block_action.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = long-bottom-block-1elem-blocks.e
[]
allow_renumbering = false
uniform_refine = 0 # 1,2
patch_update_strategy = always
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = FINITE
generate_output = 'stress_xx stress_yy'
block = '1 2'
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e3
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[]
[Contact]
[frictional]
primary = 20
secondary = 10
formulation = mortar
model = coulomb
friction_coefficient = 0.4
c_normal = 1.0e1
c_tangential = 1.0e1
[]
[]
[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 = ADFunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 20 * t) + ${offset}'
preset = false
[]
[leftx]
type = ADFunctionDirichletBC
variable = disp_x
boundary = 30
function = '2e-2 * t'
# function = '0'
preset = false
[]
[]
[Executioner]
type = Transient
end_time = 7 # 70
dt = 0.25 # 0.1 for finer meshes (uniform_refine)
dtmin = .01
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 40
line_search = 'basic'
snesmf_reuse_base = false
nl_abs_tol = 1e-9
nl_rel_tol = 1e-9
l_tol = 1e-07 # Tightening l_tol can help with friction
[]
[Debug]
show_var_residual_norms = true
[]
[VectorPostprocessors]
[cont_press]
type = NodalValueSampler
variable = frictional_normal_lm
boundary = '10'
sort_by = x
execute_on = FINAL
[]
[friction]
type = NodalValueSampler
variable = frictional_tangential_lm
boundary = '10'
sort_by = x
execute_on = FINAL
[]
[]
[Outputs]
[checkfile]
type = CSV
show = 'cont_press friction'
start_time = 0.0
execute_vector_postprocessors_on = FINAL
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative_nli contact cumulative_li num_l'
[num_nl]
type = NumNonlinearIterations
[]
[num_l]
type = NumLinearIterations
[]
[cumulative_nli]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[cumulative_li]
type = CumulativeValuePostprocessor
postprocessor = num_l
[]
[contact]
type = ContactDOFSetSize
variable = frictional_normal_lm
subdomain = 'frictional_secondary_subdomain'
execute_on = 'nonlinear timestep_end'
[]
[]
(test/tests/multiapps/grid-sequencing/vi-coarser.i)
l=10
nx=20
num_steps=2
[Mesh]
type = GeneratedMesh
dim = 1
xmax = ${l}
nx = ${nx}
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[bounds][]
[]
[Bounds]
[./u_upper_bounds]
type = ConstantBounds
variable = bounds
bounded_variable = u
bound_type = upper
bound_value = ${l}
[../]
[./u_lower_bounds]
type = ConstantBounds
variable = bounds
bounded_variable = u
bound_type = lower
bound_value = 0
[../]
[]
[ICs]
[u]
type = FunctionIC
variable = u
function = 'x'
[]
[]
[Kernels]
[time]
type = TimeDerivative
variable = u
[]
[diff]
type = Diffusion
variable = u
[]
[ffn]
type = BodyForce
variable = u
function = 'if(x<5,-1,1)'
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
value = 0
variable = u
[]
[right]
type = DirichletBC
boundary = right
value = ${l}
variable = u
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = ${num_steps}
solve_type = NEWTON
dtmin = 1
petsc_options = '-snes_vi_monitor'
petsc_options_iname = '-snes_max_linear_solve_fail -ksp_max_it -pc_type -sub_pc_factor_levels -snes_linesearch_type -snes_type'
petsc_options_value = '0 30 asm 16 basic vinewtonrsls'
[]
[Outputs]
exodus = true
[csv]
type = CSV
execute_on = 'nonlinear timestep_end'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
active = 'upper_violations lower_violations'
[upper_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = ${fparse 10+1e-8}
comparator = 'greater'
[]
[lower_violations]
type = GreaterThanLessThanPostprocessor
variable = u
execute_on = 'nonlinear timestep_end'
value = -1e-8
comparator = 'less'
[]
[nls]
type = NumNonlinearIterations
[]
[cum_nls]
type = CumulativeValuePostprocessor
postprocessor = nls
[]
[]
(modules/contact/test/tests/multiple_contact_pairs/multiple_pairs_mortar_friction.i)
starting_point = 2e-1
offset = 1e-2
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = multiple_pairs.e
[]
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = true
strain = FINITE
generate_output = 'stress_xx'
block = '1 2 3'
[]
[]
[Materials]
[stiffStuff]
type = ComputeIsotropicElasticityTensor
block = '1 2 3'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[stiffStuff_stress]
type = ComputeFiniteStrainElasticStress
block = '1 2 3'
[]
[]
[ICs]
[disp_y]
block = '2 3'
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Contact]
[first_pair]
primary = '20'
secondary = '10 '
model = coulomb
formulation = mortar
c_normal = 1e+04
c_tangential = 1.0e2
friction_coefficient = 0.2
tangential_lm_scaling = 1.0e-6
normal_lm_scaling = 1.0e-6
[]
[second_pair]
primary = '20'
secondary = '101'
model = coulomb
formulation = mortar
c_normal = 1e+04
c_tangential = 1.0e2
friction_coefficient = 0.2
tangential_lm_scaling = 1.0e-6
normal_lm_scaling = 1.0e-6
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
preset = false
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
preset = false
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
preset = false
boundary = '30 301'
function = '${starting_point} * cos(2 * pi / 40 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
preset = false
boundary = '50 501'
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
dt = 2.0
dtmin = .1
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
l_max_its = 30
nl_max_its = 20
nl_abs_tol = 1e-7
line_search = 'none'
end_time = 18
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[]
[VectorPostprocessors]
[cont_press]
type = NodalValueSampler
variable = contact_pressure
boundary = '10 101'
sort_by = x
execute_on = NONLINEAR
[]
[]
(modules/contact/test/tests/mortar_tm/2drz/frictionless_first/finite_rr.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite_rr'
[Problem]
coord_type = RZ
[]
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 9.2
ymax = 10.0
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = 'ref'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[]
[Modules/TensorMechanics/Master]
[block]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'block'
extra_vector_tags = 'ref'
[]
[plank]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank'
eigenstrain_names = 'swell'
extra_vector_tags = 'ref'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e0
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = DirichletBC
variable = disp_x
boundary = block_right
value = 0
[]
[right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[]
[]
[Materials]
[plank]
type = ComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = 'plank block'
[]
[swell]
type = ComputeEigenstrain
block = 'plank'
eigenstrain_name = swell
eigen_base = '1 0 0 0 0 0 0 0 0'
prefactor = swell_mat
[]
[swell_mat]
type = GenericFunctionMaterial
prop_names = 'swell_mat'
prop_values = '7e-2*(1-cos(4*t))'
block = 'plank'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
nl_abs_tol = 1e-12
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d-rz/finite.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite'
[Mesh]
patch_size = 80
patch_update_strategy = auto
coord_type = RZ
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[secondary]
input = block_rename
type = LowerDBlockFromSidesetGenerator
sidesets = 'block_left'
new_block_id = '30'
new_block_name = 'frictionless_secondary_subdomain'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'plank_right'
new_block_id = '20'
new_block_name = 'frictionless_primary_subdomain'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[temp]
order = ${order}
block = 'plank block'
scaling = 1e-1
[]
[thermal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
scaling = 1e-7
[]
[frictionless_normal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
use_dual = true
[]
[]
[Modules/TensorMechanics/Master]
[action]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
strain = FINITE
[]
[]
[Kernels]
[hc]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = 'plank block'
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
lm_variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_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 = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[thermal_contact]
type = GapConductanceConstraint
variable = thermal_lm
secondary_variable = temp
k = 1
use_displaced_mesh = true
primary_boundary = plank_right
primary_subdomain = frictionless_primary_subdomain
secondary_boundary = block_left
secondary_subdomain = frictionless_secondary_subdomain
displacements = 'disp_x disp_y'
[]
[]
[BCs]
[left_temp]
type = DirichletBC
variable = temp
boundary = 'plank_left'
value = 400
[]
[right_temp]
type = DirichletBC
variable = temp
boundary = 'block_right'
value = 300
[]
[left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
preset = false
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
preset = false
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[]
[heat_plank]
type = ADHeatConductionMaterial
block = plank
thermal_conductivity = 2
specific_heat = 1
[]
[heat_block]
type = ADHeatConductionMaterial
block = block
thermal_conductivity = 1
specific_heat = 1
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -snes_max_it'
petsc_options_value = 'lu NONZERO 1e-15 20'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'none'
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[avg_temp]
type = ElementAverageValue
variable = temp
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact avg_temp'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/contact/test/tests/mortar_tm/2d/ad_frictionless_sec/finite_rr.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD9
order = SECOND
name = 'finite_rr'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Problem]
type = ReferenceResidualProblem
extra_tag_vectors = 'ref'
reference_vector = 'ref'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[]
[Modules/TensorMechanics/Master]
[action]
strain = FINITE
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank block'
extra_vector_tags = 'ref'
use_automatic_differentiation = true
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e0
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
preset = false
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
preset = false
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = ADFunctionDirichletBC
variable = disp_x
preset = false
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
preset = false
boundary = block_right
function = '-t'
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu 1e-5 NONZERO 1e-15'
end_time = 5.0
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'contact'
nl_abs_tol = 1e-7
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/contact/test/tests/3d-mortar-contact/frictionless-mortar-3d-test-derivative-trimming.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
diffusivity = 1e0
scaling = 1e0
[]
[Mesh]
second_order = false
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 1
nz = 1
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[disp_z]
block = '1 2'
[]
[mortar_normal_lm]
block = 'secondary_lower'
use_dual = true
[]
[]
[ICs]
[disp_z]
block = 1
variable = disp_z
value = '${fparse offset}'
type = ConstantIC
[]
[disp_x]
block = 1
variable = disp_x
value = 0
type = ConstantIC
[]
[disp_y]
block = 1
variable = disp_y
value = 0
type = ConstantIC
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[disp_z]
type = MatDiffusion
variable = disp_z
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
lm_variable = mortar_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
[]
[]
[Constraints]
[normal_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
c = 1.0e4
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_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 = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_z]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Executioner]
type = Transient
end_time = 1
dt = .5
dtmin = .01
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15 1e-5'
l_max_its = 100
nl_max_its = 30
# nl_rel_tol = 1e-6
nl_abs_tol = 1e-12
line_search = 'none'
snesmf_reuse_base = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
csv = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = mortar_normal_lm
subdomain = 'secondary_lower'
execute_on = 'nonlinear timestep_end'
[]
[]
[VectorPostprocessors]
[contact-pressure]
type = NodalValueSampler
block = secondary_lower
variable = mortar_normal_lm
sort_by = 'id'
execute_on = NONLINEAR
[]
[]
(modules/contact/test/tests/mortar_dynamics/block-dynamics-friction-creep.i)
starting_point = 1e-1
offset = -0.095
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[normal_lm]
block = 3
use_dual = true
[]
[frictional_lm]
block = 3
use_dual = true
[]
[]
[AuxVariables]
[creep_strain_xx]
order = CONSTANT
family = MONOMIAL
block = '2'
[]
[creep_strain_yy]
order = CONSTANT
family = MONOMIAL
block = '2'
[]
[creep_strain_xy]
order = CONSTANT
family = MONOMIAL
block = '2'
[]
[]
[AuxKernels]
[creep_strain_xx]
type = RankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xx
index_i = 0
index_j = 0
block = '2'
[]
[creep_strain_yy]
type = RankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_yy
index_i = 1
index_j = 1
block = '2'
[]
[creep_strain_xy]
type = RankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xy
index_i = 0
index_j = 1
block = '2'
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Modules/TensorMechanics/DynamicMaster]
[all]
add_variables = true
alpha = 0.0
newmark_beta = 0.25
newmark_gamma = 0.5
mass_damping_coefficient = 0.0
stiffness_damping_coefficient = 0.01
displacements = 'disp_x disp_y'
generate_output = 'stress_xx stress_yy'
block = '1 2'
strain = FINITE
[]
[]
[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
[]
[multiple_inelastic]
type = ComputeMultipleInelasticStress
inelastic_models = 'creep'
block = '2'
[]
[creep]
type = PowerLawCreepStressUpdate
coefficient = 1.0e-23 # 10e-24
n_exponent = 4
activation_energy = 0
block = '2'
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '775'
[]
[]
# User object provides the contact force (e.g. LM)
# for the application of the generalized force
[UserObjects]
[weighted_vel_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
lm_variable_normal = normal_lm
lm_variable_tangential_one = frictional_lm
secondary_variable = disp_x
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeDynamicFrictionalForceLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
friction_lm = frictional_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
c = 1e4
c_t = 1e4
mu = 0.5
interpolate_normals = false
newmark_beta = 0.25
newmark_gamma = 0.5
capture_tolerance = 1e-04
[]
[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_vel_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_vel_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_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 = '1e-2*t' #'0.1 *sin(2 * pi / 12 * t)'
[]
[]
[Executioner]
type = Transient
end_time = 0.25
dt = 0.05
dtmin = 0.05
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err '
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
nl_max_its = 50
line_search = 'none'
snesmf_reuse_base = false
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
checkpoint = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]