- inputThe mesh we want to modify
C++ Type:MeshGeneratorName
Controllable:No
Description:The mesh we want to modify
- new_boundaryThe names of the boundaries to create
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:The names of the boundaries to create
ExtraNodesetGenerator
Creates a new node set and a new boundary made with the nodes the user provides.
Input Parameters
- coordThe nodes with coordinates you want to be in the nodeset. Separate multple coords with ';' (Either this parameter or "nodes" must be supplied).
C++ Type:std::vector<std::vector<double>>
Controllable:No
Description:The nodes with coordinates you want to be in the nodeset. Separate multple coords with ';' (Either this parameter or "nodes" must be supplied).
- nodesThe nodes you want to be in the nodeset (Either this parameter or "coord" must be supplied).
C++ Type:std::vector<unsigned int>
Controllable:No
Description:The nodes you want to be in the nodeset (Either this parameter or "coord" must be supplied).
- tolerance1e-06The tolerance in which two nodes are considered identical
Default:1e-06
C++ Type:double
Controllable:No
Description:The tolerance in which two nodes are considered identical
Optional Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:No
Description:Set the enabled status of the MooseObject.
- save_with_nameKeep the mesh from this mesh generator in memory with the name specified
C++ Type:std::string
Controllable:No
Description:Keep the mesh from this mesh generator in memory with the name specified
Advanced Parameters
- nemesisFalseWhether or not to output the mesh file in the nemesisformat (only if output = true)
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not to output the mesh file in the nemesisformat (only if output = true)
- outputFalseWhether or not to output the mesh file after generating the mesh
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not to output the mesh file after generating the mesh
- show_infoFalseWhether or not to show mesh info after generating the mesh (bounding box, element types, sidesets, nodesets, subdomains, etc)
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not to show mesh info after generating the mesh (bounding box, element types, sidesets, nodesets, subdomains, etc)
Debugging Parameters
Input Files
- (modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_creep_temperature_coefficients_function_variation.i)
- (modules/combined/examples/geochem-porous_flow/forge/porous_flow.i)
- (modules/solid_mechanics/test/tests/global_strain/global_strain_direction.i)
- (modules/navier_stokes/test/tests/finite_element/ins/cg-dg-hybrid/mms/lid-driven-skewed/hybrid-skewed-vortex.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven_md.i)
- (modules/navier_stokes/test/tests/finite_element/ins/wall_convection/steady.i)
- (modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_creep_integration_error.i)
- (modules/combined/test/tests/optimization/compliance_sensitivity/2d_mbb_pde.i)
- (modules/navier_stokes/test/tests/finite_element/ins/energy_source/steady-var.i)
- (modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_creep_temperature_coefficients_function.i)
- (modules/combined/examples/optimization/multi-load/square_main.i)
- (modules/xfem/test/tests/bimaterials/glued_bimaterials_2d.i)
- (test/tests/meshgenerators/extra_nodeset_generator/generate_extra_nodeset.i)
- (test/tests/mortar/periodic_segmental_constraint/periodic_simple3d.i)
- (modules/combined/test/tests/restart-transient-from-ss-with-stateful/sub_ss.i)
- (modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_creep_z_3d.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_stabilized_with_temp_transient.i)
- (modules/solid_mechanics/test/tests/global_strain/global_strain_shear.i)
- (test/tests/bcs/ad_nodal_bc_nonlocal_dependence/test.i)
- (test/tests/mortar/periodic_segmental_constraint/periodic_aux2d.i)
- (modules/solid_mechanics/test/tests/uel/tensile_uel_umat_moose_temperature.i)
- (modules/solid_mechanics/test/tests/uel/small.i)
- (modules/navier_stokes/test/tests/finite_element/ins/mms/supg/supg_mms_test.i)
- (modules/solid_mechanics/test/tests/finite_strain_elastic_anisotropy/3d_bar_orthotropic_90deg_rotation.i)
- (modules/solid_mechanics/test/tests/uel/tensile_uel_umat_moose.i)
- (modules/solid_mechanics/test/tests/cohesive_zone_model/bilinear_mixed.i)
- (modules/combined/examples/optimization/thermomechanical/thermomechanical_main.i)
- (modules/xfem/test/tests/moving_interface/moving_ad_bimaterial.i)
- (modules/contact/test/tests/cohesive_zone_model/bilinear_mixed_mortar_only_czm.i)
- (modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_creep_x_3d.i)
- (modules/solid_mechanics/test/tests/finite_strain_elastic_anisotropy/3d_bar_orthotropic_full_rotation.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven_split.i)
- (modules/combined/examples/optimization/helmholtz_multimat_nostrip.i)
- (modules/combined/examples/optimization/helmholtz_multimat_strip.i)
- (modules/combined/test/tests/optimization/compliance_sensitivity/paper_three_materials_test.i)
- (test/tests/mortar/periodic_segmental_constraint/penalty_periodic_simple3d.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven.i)
- (modules/combined/tutorials/introduction/thermal_mechanical/thermomech_step01.i)
- (modules/solid_mechanics/test/tests/auxkernels/ranktwoscalaraux.i)
- (modules/combined/test/tests/optimization/compliance_sensitivity/2d_mmb_2material.i)
- (modules/combined/test/tests/optimization/compliance_sensitivity/2d_mbb.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven_stabilized.i)
- (modules/solid_mechanics/test/tests/ad_anisotropic_creep/3d_bar_orthotropic_90deg_rotation_ad_creep_z_no_rotation.i)
- (test/tests/mortar/periodic_segmental_constraint/penalty_periodic_simple2d.i)
- (modules/combined/test/tests/optimization/compliance_sensitivity/2d_mmb_2material_cost_initial.i)
- (modules/combined/test/tests/optimization/optimization_density_update/top_opt_2d_pde_filter.i)
- (modules/solid_mechanics/test/tests/ad_finite_strain_jacobian/bending_jacobian.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven_chorin.i)
- (modules/navier_stokes/test/tests/finite_element/ins/boussinesq/boussinesq_square.i)
- (modules/porous_flow/test/tests/dirackernels/injection_production.i)
- (test/tests/mortar/ad_periodic_segmental_constraint/penalty_periodic_checker2d.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_stabilized_with_temp.i)
- (modules/navier_stokes/test/tests/finite_element/ins/cg-dg-hybrid/lid-driven/hybrid-cg-dg.i)
- (modules/xfem/test/tests/moving_interface/moving_bimaterial_finite_strain.i)
- (modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_iso_creep_x_3d.i)
- (modules/solid_mechanics/test/tests/ad_anisotropic_creep/aniso_creep_x_3d.i)
- (modules/combined/tutorials/introduction/thermal_mechanical_contact/thermomech_cont_step02.i)
- (modules/navier_stokes/test/tests/finite_element/ins/mms/pspg/pspg_mms_test.i)
- (modules/solid_mechanics/test/tests/finite_strain_jacobian/3d_bar.i)
- (modules/navier_stokes/test/tests/finite_element/ins/coupled-force/steady.i)
- (modules/combined/examples/optimization/2d_mbb_pde_amr.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/mixed-transient-steady/mixed.i)
- (modules/solid_mechanics/test/tests/ad_anisotropic_creep/3d_bar_orthotropic_90deg_rotation_ad_creep_x_no_rotation.i)
- (modules/navier_stokes/test/tests/finite_element/pins/expansion-channel/expansion-channel-slip-wall.i)
- (modules/combined/examples/geochem-porous_flow/forge/aquifer_geochemistry.i)
- (test/tests/mortar/ad_periodic_segmental_constraint/penalty_periodic_simple2d.i)
- (modules/solid_mechanics/test/tests/j2_plasticity/solid_mechanics_j2plasticity.i)
- (modules/combined/examples/effective_properties/effective_th_cond.i)
- (modules/navier_stokes/test/tests/finite_element/ins/energy_source/steady.i)
- (modules/solid_mechanics/test/tests/anisotropic_plasticity/ad_aniso_plasticity_x_rotate.i)
- (modules/combined/examples/mortar/eigenstrain.i)
- (modules/combined/examples/publications/rapid_dev/fig8.i)
- (modules/solid_mechanics/test/tests/finite_strain_elastic_anisotropy/3d_bar_orthotropic_full_rotation_ad.i)
- (modules/combined/test/tests/restart-transient-from-ss-with-stateful/sub_tr.i)
- (modules/navier_stokes/test/tests/finite_element/ins/mms/supg/supg_adv_dominated_mms.i)
- (test/tests/mortar/periodic_segmental_constraint/penalty_periodic_simple2d_flip.i)
- (modules/solid_mechanics/test/tests/uel/small_test_expanded_umat.i)
- (modules/solid_mechanics/test/tests/uel/small_test_uel_states_fields_gradient.i)
- (modules/solid_mechanics/test/tests/global_strain/global_strain_pressure_3D.i)
- (test/tests/meshgenerators/extra_nodeset_generator/generate_extra_nodeset_multiple_coord.i)
- (modules/solid_mechanics/test/tests/CylindricalRankTwoAux/test.i)
- (modules/solid_mechanics/test/tests/finite_strain_elastic_anisotropy/3d_bar_orthotropic_90deg_rotation_ad.i)
- (modules/xfem/test/tests/crack_tip_enrichment/edge_crack_2d.i)
- (modules/solid_mechanics/test/tests/uel/small_test_uel_states_fields.i)
- (modules/navier_stokes/test/tests/finite_element/ins/boussinesq/boussinesq_square_constant_names.i)
- (modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/exact.i)
- (modules/combined/examples/optimization/multi-load/single_subapp_one.i)
- (modules/combined/examples/optimization/thermomechanical/thermal_sub.i)
- (modules/navier_stokes/test/tests/finite_element/ins/nonzero-malloc/test.i)
- (modules/combined/examples/optimization/multi-load/single_main.i)
- (modules/xfem/test/tests/bimaterials/glued_ad_bimaterials_2d.i)
- (test/tests/mortar/periodic_segmental_constraint/periodic_simple2d.i)
- (modules/solid_mechanics/test/tests/finite_strain_elastic_anisotropy/3d_bar_orthotropic.i)
- (test/tests/mortar/ad_periodic_segmental_constraint/periodic_simple3d.i)
- (modules/solid_mechanics/test/tests/lagrangian/cartesian/total/rates/rotation.i)
- (modules/combined/examples/mortar/eigenstrain_action.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven.i)
- (modules/xfem/test/tests/moving_interface/moving_bimaterial_finite_strain_cut_mesh.i)
- (modules/solid_mechanics/test/tests/uel/reference.i)
- (modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_creep_y_3d.i)
- (modules/solid_mechanics/test/tests/global_strain/global_strain_action.i)
- (modules/solid_mechanics/test/tests/global_strain/global_strain_uniaxial.i)
- (modules/solid_mechanics/test/tests/uel/small_test_umat_states_fields.i)
- (test/tests/mortar/ad_periodic_segmental_constraint/testperiodicsole.i)
- (modules/combined/test/tests/optimization/optimization_density_update/top_opt_3d.i)
- (modules/solid_mechanics/test/tests/ad_anisotropic_creep/3d_bar_orthotropic_90deg_rotation_ad_creep_x.i)
- (modules/combined/examples/periodic_strain/global_strain_pfm.i)
- (modules/solid_mechanics/test/tests/ad_anisotropic_creep/aniso_iso_creep_x_3d.i)
- (modules/solid_mechanics/test/tests/global_strain/global_strain.i)
- (modules/navier_stokes/test/tests/finite_element/ins/jeffery_hamel/wedge_dirichlet.i)
- (modules/navier_stokes/test/tests/finite_element/ins/boussinesq/boussinesq_stabilized.i)
- (modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_creep_temperature_coefficients.i)
- (modules/navier_stokes/test/tests/finite_element/ins/cg-dg-hybrid/mms/lid-driven/hybrid-cg-dg-mms.i)
- (modules/solid_mechanics/test/tests/global_strain/global_strain_disp.i)
- (modules/navier_stokes/test/tests/finite_element/ins/hydrostatic/gravity.i)
- (test/tests/meshgenerators/extra_nodeset_generator/generate_extra_nodeset_coord.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/monolithic_material_based/rot-eg1.i)
- (modules/contact/test/tests/cohesive_zone_model/mortar_czm.i)
- (modules/combined/examples/optimization/2d_mbb_pde.i)
- (modules/combined/examples/optimization/thermomechanical/structural_sub.i)
- (modules/xfem/test/tests/moving_interface/moving_bimaterial.i)
- (modules/solid_mechanics/test/tests/free_expansion_abs_ref/free_expansion_abs_ref.i)
- (modules/combined/test/tests/optimization/compliance_sensitivity/thermal_test.i)
- (modules/combined/test/tests/optimization/compliance_sensitivity/3d_mbb.i)
- (modules/navier_stokes/test/tests/finite_element/ins/coupled-force/steady-function.i)
- (modules/combined/examples/geochem-porous_flow/geotes_2D/porous_flow.i)
- (modules/navier_stokes/test/tests/auxkernels/reynolds-number-functor-aux/fe.i)
- (modules/combined/examples/optimization/three_materials.i)
- (modules/combined/test/tests/optimization/optimization_density_update/top_opt_3d_pde_filter.i)
- (modules/navier_stokes/test/tests/finite_element/ins/block-restriction/one-mat-two-eqn-sets.i)
- (modules/combined/examples/optimization/multi-load/square_subapp_two.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_stabilized.i)
- (modules/solid_mechanics/test/tests/global_strain/global_strain_hydrostat.i)
- (modules/solid_mechanics/test/tests/shell/static/plate_bending2.i)
- (modules/solid_mechanics/test/tests/finite_strain_jacobian/bending_jacobian.i)
- (modules/solid_mechanics/test/tests/uel/small_test_umat_states_fields_gradient.i)
- (modules/solid_mechanics/test/tests/ad_anisotropic_creep/aniso_creep_integration_error.i)
- (modules/solid_mechanics/test/tests/uel/small_test_expanded.i)
- (test/tests/mortar/periodic_segmental_constraint/penalty_periodic_split.i)
- (test/tests/mortar/periodic_segmental_constraint/periodic_checker2d.i)
- (modules/navier_stokes/test/tests/finite_element/ins/mms/supg/supg_pspg_adv_dominated_mms.i)
- (modules/combined/examples/geochem-porous_flow/geotes_weber_tensleep/porous_flow.i)
- (test/tests/mortar/periodic_segmental_constraint/penalty_periodic_checker2d.i)
- (modules/solid_mechanics/tutorials/introduction/mech_step03a.i)
- (modules/combined/test/tests/optimization/compliance_sensitivity/2d_mbb_pde_amr.i)
- (modules/solid_mechanics/test/tests/uel/uel_test_print.i)
- (modules/navier_stokes/test/tests/auxkernels/peclet-number-functor-aux/fe-thermal.i)
- (modules/combined/examples/geochem-porous_flow/geotes_weber_tensleep/aquifer_geochemistry.i)
- (modules/solid_mechanics/test/tests/beam/static_vm/ansys_vm2.i)
- (modules/combined/examples/periodic_strain/global_strain_pfm_3D.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_stab_jac_test.i)
- (modules/contact/test/tests/cohesive_zone_model/bilinear_mixed_compare.i)
- (modules/solid_mechanics/test/tests/ad_anisotropic_creep/3d_bar_orthotropic_90deg_rotation_ad_creep_z.i)
- (modules/solid_mechanics/test/tests/uel/small_test.i)
- (modules/combined/test/tests/optimization/optimization_density_update/top_opt_2d.i)
- (modules/navier_stokes/test/tests/finite_element/ins/boussinesq/benchmark/benchmark.i)
- (test/tests/mortar/ad_periodic_segmental_constraint/periodic_simple2d.i)
- (modules/porous_flow/examples/tidal/atm_tides_open_hole.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/lid-driven/transient-lid-driven-with-energy.i)
- (modules/solid_mechanics/test/tests/cohesive_zone_model/bilinear_mixed_scale_strength.i)
- (modules/solid_mechanics/test/tests/ad_finite_strain_jacobian/3d_bar.i)
- (modules/navier_stokes/test/tests/finite_element/ins/block-restriction/two-mats-two-eqn-sets.i)
- (modules/navier_stokes/test/tests/finite_element/ins/velocity_channel/velocity_inletBC_no_parts.i)
- (modules/combined/examples/optimization/2d_mbb.i)
- (test/tests/mortar/periodic_segmental_constraint/penalty_periodic_aux.i)
- (modules/navier_stokes/test/tests/finite_element/ins/coupled-force/gravity-through-coupled-force.i)
- (test/tests/mortar/ad_periodic_segmental_constraint/penalty_periodic_simple3d.i)
- (modules/solid_mechanics/test/tests/anisotropic_plasticity/ad_aniso_plasticity_y.i)
- (modules/contact/test/tests/cohesive_zone_model/mortar_czm_analysis.i)
- (modules/combined/examples/optimization/multi-load/square_subapp_one.i)
- (modules/contact/test/tests/cohesive_zone_model/bilinear_mixed.i)
- (modules/combined/examples/optimization/3d_mbb.i)
- (test/tests/transfers/multiapp_variable_value_sample_transfer/full_domain_primary.i)
- (modules/solid_mechanics/test/tests/static_deformations/cosserat_tension.i)
- (modules/navier_stokes/test/tests/finite_element/ins/block-restriction/two-mats-one-eqn-set.i)
- (modules/solid_mechanics/test/tests/lagrangian/total/rates/rotation.i)
- (modules/combined/test/tests/optimization/compliance_sensitivity/2d_mmb_2material_cost.i)
- (modules/combined/test/tests/optimization/compliance_sensitivity/three_materials_thermal.i)
- (modules/solid_mechanics/test/tests/uel/tensile_umat_moose_umat.i)
- (modules/xfem/test/tests/checkpoint/checkpoint.i)
- (modules/navier_stokes/test/tests/finite_element/ins/coupled-force/gravity-object.i)
- (test/tests/mortar/periodic_segmental_constraint/testperiodicsole.i)
- (modules/solid_mechanics/test/tests/anisotropic_plasticity/ad_aniso_plasticity_x.i)
- (modules/combined/examples/optimization/multi-load/single_subapp_two.i)
(modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_creep_temperature_coefficients_function_variation.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 2
nz = 2
xmin = 0.0
ymin = 0.0
zmin = 0.0
xmax = 10.0
ymax = 1.0
zmax = 1.0
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = '100'
nodes = '3 69'
input = gen
[]
[corner_node_2]
type = ExtraNodesetGenerator
new_boundary = '101'
nodes = '4 47'
input = corner_node
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[temperature]
order = CONSTANT
family = MONOMIAL
[]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xz]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_yz]
order = CONSTANT
family = MONOMIAL
[]
[hill_constants_f]
order = CONSTANT
family = MONOMIAL
[]
[hill_constants_g]
order = CONSTANT
family = MONOMIAL
[]
[hill_constants_h]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[temperature]
type = FunctionAux
variable = temperature
function = time_temperature
[]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[creep_strain_xx]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xx
index_i = 0
index_j = 0
[]
[creep_strain_xy]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xy
index_i = 0
index_j = 1
[]
[creep_strain_yy]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_yy
index_i = 1
index_j = 1
[]
[creep_strain_zz]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_zz
index_i = 2
index_j = 2
[]
[creep_strain_xz]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xz
index_i = 0
index_j = 2
[]
[creep_strain_yz]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_yz
index_i = 1
index_j = 2
[]
[sigma_xx]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 1
index_j = 1
[]
[hill_constant_f]
type = MaterialStdVectorAux
property = hill_constants
variable = hill_constants_f
index = 0
[]
[hill_constant_g]
type = MaterialStdVectorAux
property = hill_constants
variable = hill_constants_g
index = 1
[]
[hill_constant_h]
type = MaterialStdVectorAux
property = hill_constants
variable = hill_constants_h
index = 2
[]
[]
[ICs]
[temp]
type = ConstantIC
variable = temperature
value = 50.0
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1.0e-9 1.0'
y = '0 -4e1 -4e1'
[]
[F]
type = PiecewiseLinear
x = '50 200'
y = '0.2 0.5'
[]
[G]
type = PiecewiseLinear
x = '50 200'
y = '0.9 0.6'
[]
[H]
type = PiecewiseLinear
x = '50 200'
y = '0.5 0.3'
[]
[L]
type = PiecewiseLinear
x = '50 200'
y = '1.5 1.5'
[]
[M]
type = PiecewiseLinear
x = '50 200'
y = '1.5 1.5'
[]
[N]
type = PiecewiseLinear
x = '50 200'
y = '1.5 1.5'
[]
[time_temperature]
type = PiecewiseLinear
x = '0 1.0e-2'
y = '50 200'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_xx stress_xx'
use_automatic_differentiation = true
add_variables = true
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 700
poissons_ratio = 0.0
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = 'trial_creep_aniso_iso'
max_iterations = 50
[]
[hill_constants]
type = ADHillConstants
# F G H L M N
hill_constants = "0.5 0.5 0.5 1.5 1.5 1.5"
function_names = 'F G H L M N'
temperature = temperature
[]
[trial_creep_aniso_iso]
type = ADHillCreepStressUpdate
coefficient = 1e-16
n_exponent = 9
m_exponent = 0
activation_energy = 0
max_inelastic_increment = 0.00003
relative_tolerance = 1e-20
absolute_tolerance = 1e-20
internal_solve_output_on = never
# Force it to not use integration error
max_integration_error = 1.0
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = 100
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = 101
value = 0.0
[]
[Pressure]
[Side1]
boundary = right
function = pull
[]
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-13
nl_abs_tol = 1.0e-14
l_max_its = 90
num_steps = 20
dt = 5.0e-4
start_time = 0
automatic_scaling = true
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[num_lin]
type = NumLinearIterations
outputs = console
[]
[num_nonlin]
type = NumNonlinearIterations
outputs = console
[]
[creep_strain_xx]
type = ElementalVariableValue
variable = creep_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_yy]
type = ElementalVariableValue
variable = creep_strain_yy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_zz]
type = ElementalVariableValue
variable = creep_strain_zz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_xy]
type = ElementalVariableValue
variable = creep_strain_xy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_yz]
type = ElementalVariableValue
variable = creep_strain_yz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_xz]
type = ElementalVariableValue
variable = creep_strain_xz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[elastic_strain_xx]
type = ElementalVariableValue
variable = elastic_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[sigma_xx]
type = ElementalVariableValue
variable = stress_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[]
[Outputs]
csv = true
exodus = true
perf_graph = true
[]
(modules/combined/examples/geochem-porous_flow/forge/porous_flow.i)
# Input file modified from RobPodgorney version
# - 2D instead of 3D with different resolution. Effectively this means a 1m height of RobPodgorney aquifer is simulated. RobPodgorney total mass flux is 2.5kg/s meaning 0.25kg/s is appropriate here
# - Celsius instead of Kelvin
# - no use of PorousFlowPointEnthalpySourceFromPostprocessor since that is not yet merged into MOOSE: a DirichletBC is used instead
# - Use of PorousFlowFullySaturated instead of PorousFlowUnsaturated, and the save_component_rate_in feature to record the change in kg of each species at each node for passing to the Geochem simulation
# - MultiApps and Transfers to transfer information between this simulation and the aquifer_geochemistry.i simulation
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 225
ny = 200
xmin = -400
xmax = 500
ymin = -400
ymax = 400
[]
[injection_node]
input = gen
type = ExtraNodesetGenerator
new_boundary = injection_node
coord = '0 0 0'
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[f_H]
initial_condition = 8.201229858451E-07
[]
[f_Na]
initial_condition = 2.281094143525E-03
[]
[f_K]
initial_condition = 2.305489507836E-04
[]
[f_Ca]
initial_condition = 5.818776782059E-04
[]
[f_Mg]
initial_condition = 1.539513498238E-07
[]
[f_SiO2]
initial_condition = 2.691822196469E-04
[]
[f_Al]
initial_condition = 4.457519474122E-08
[]
[f_Cl]
initial_condition = 4.744309776594E-03
[]
[f_SO4]
initial_condition = 9.516650880811E-06
[]
[f_HCO3]
initial_condition = 5.906126982324E-05
[]
[porepressure]
initial_condition = 20E6
[]
[temperature]
initial_condition = 220 # degC
scaling = 1E-6 # fluid enthalpy is roughly 1E6
[]
[]
[BCs]
[source_temperature]
type = DirichletBC
boundary = injection_node
variable = temperature
value = 70 # degC
[]
[]
[DiracKernels]
[inject_H]
type = PorousFlowPointSourceFromPostprocessor
point = ' 0 0 0'
mass_flux = 4.790385871045E-08
variable = f_H
[]
[inject_Na]
type = PorousFlowPointSourceFromPostprocessor
point = ' 0 0 0'
mass_flux = 7.586252963780E-07
variable = f_Na
[]
[inject_K]
type = PorousFlowPointSourceFromPostprocessor
point = ' 0 0 0'
mass_flux = 2.746517625125E-07
variable = f_K
[]
[inject_Ca]
type = PorousFlowPointSourceFromPostprocessor
point = ' 0 0 0'
mass_flux = 7.775129478597E-07
variable = f_Ca
[]
[inject_Mg]
type = PorousFlowPointSourceFromPostprocessor
point = ' 0 0 0'
mass_flux = 1.749872109005E-07
variable = f_Mg
[]
[inject_SiO2]
type = PorousFlowPointSourceFromPostprocessor
point = ' 0 0 0'
mass_flux = 4.100547515915E-06
variable = f_SiO2
[]
[inject_Al]
type = PorousFlowPointSourceFromPostprocessor
point = ' 0 0 0'
mass_flux = 2.502408592080E-08
variable = f_Al
[]
[inject_Cl]
type = PorousFlowPointSourceFromPostprocessor
point = ' 0 0 0'
mass_flux = 1.997260386272E-06
variable = f_Cl
[]
[inject_SO4]
type = PorousFlowPointSourceFromPostprocessor
point = ' 0 0 0'
mass_flux = 2.497372164191E-07
variable = f_SO4
[]
[inject_HCO3]
type = PorousFlowPointSourceFromPostprocessor
point = ' 0 0 0'
mass_flux = 5.003150992902E-06
variable = f_HCO3
[]
[inject_H2O]
type = PorousFlowPointSourceFromPostprocessor
point = ' 0 0 0'
mass_flux = 2.499865905987E-01
variable = porepressure
[]
[produce_H]
type = PorousFlowPeacemanBorehole
variable = f_H
SumQuantityUO = produced_mass_H
mass_fraction_component = 0
point_file = production.bh
line_length = 1
bottom_p_or_t = 20E6
unit_weight = '0 0 0'
use_mobility = true
character = 1
[]
[produce_Na]
type = PorousFlowPeacemanBorehole
variable = f_Na
SumQuantityUO = produced_mass_Na
mass_fraction_component = 1
point_file = production.bh
line_length = 1
bottom_p_or_t = 20E6
unit_weight = '0 0 0'
use_mobility = true
character = 1
[]
[produce_K]
type = PorousFlowPeacemanBorehole
variable = f_K
SumQuantityUO = produced_mass_K
mass_fraction_component = 2
point_file = production.bh
line_length = 1
bottom_p_or_t = 20E6
unit_weight = '0 0 0'
use_mobility = true
character = 1
[]
[produce_Ca]
type = PorousFlowPeacemanBorehole
variable = f_Ca
SumQuantityUO = produced_mass_Ca
mass_fraction_component = 3
point_file = production.bh
line_length = 1
bottom_p_or_t = 20E6
unit_weight = '0 0 0'
use_mobility = true
character = 1
[]
[produce_Mg]
type = PorousFlowPeacemanBorehole
variable = f_Mg
SumQuantityUO = produced_mass_Mg
mass_fraction_component = 4
point_file = production.bh
line_length = 1
bottom_p_or_t = 20E6
unit_weight = '0 0 0'
use_mobility = true
character = 1
[]
[produce_SiO2]
type = PorousFlowPeacemanBorehole
variable = f_SiO2
SumQuantityUO = produced_mass_SiO2
mass_fraction_component = 5
point_file = production.bh
line_length = 1
bottom_p_or_t = 20E6
unit_weight = '0 0 0'
use_mobility = true
character = 1
[]
[produce_Al]
type = PorousFlowPeacemanBorehole
variable = f_Al
SumQuantityUO = produced_mass_Al
mass_fraction_component = 6
point_file = production.bh
line_length = 1
bottom_p_or_t = 20E6
unit_weight = '0 0 0'
use_mobility = true
character = 1
[]
[produce_Cl]
type = PorousFlowPeacemanBorehole
variable = f_Cl
SumQuantityUO = produced_mass_Cl
mass_fraction_component = 7
point_file = production.bh
line_length = 1
bottom_p_or_t = 20E6
unit_weight = '0 0 0'
use_mobility = true
character = 1
[]
[produce_SO4]
type = PorousFlowPeacemanBorehole
variable = f_SO4
SumQuantityUO = produced_mass_SO4
mass_fraction_component = 8
point_file = production.bh
line_length = 1
bottom_p_or_t = 20E6
unit_weight = '0 0 0'
use_mobility = true
character = 1
[]
[produce_HCO3]
type = PorousFlowPeacemanBorehole
variable = f_HCO3
SumQuantityUO = produced_mass_HCO3
mass_fraction_component = 9
point_file = production.bh
line_length = 1
bottom_p_or_t = 20E6
unit_weight = '0 0 0'
use_mobility = true
character = 1
[]
[produce_H2O]
type = PorousFlowPeacemanBorehole
variable = porepressure
SumQuantityUO = produced_mass_H2O
mass_fraction_component = 10
point_file = production.bh
line_length = 1
bottom_p_or_t = 20E6
unit_weight = '0 0 0'
use_mobility = true
character = 1
[]
[remove_heat_at_production_well]
type = PorousFlowPeacemanBorehole
variable = temperature
SumQuantityUO = produced_heat
point_file = production.bh
line_length = 1
bottom_p_or_t = 20E6
unit_weight = '0 0 0'
use_mobility = true
use_enthalpy = true
character = 1
[]
[]
[UserObjects]
[produced_mass_H]
type = PorousFlowSumQuantity
[]
[produced_mass_Na]
type = PorousFlowSumQuantity
[]
[produced_mass_K]
type = PorousFlowSumQuantity
[]
[produced_mass_Ca]
type = PorousFlowSumQuantity
[]
[produced_mass_Mg]
type = PorousFlowSumQuantity
[]
[produced_mass_SiO2]
type = PorousFlowSumQuantity
[]
[produced_mass_Al]
type = PorousFlowSumQuantity
[]
[produced_mass_Cl]
type = PorousFlowSumQuantity
[]
[produced_mass_SO4]
type = PorousFlowSumQuantity
[]
[produced_mass_HCO3]
type = PorousFlowSumQuantity
[]
[produced_mass_H2O]
type = PorousFlowSumQuantity
[]
[produced_heat]
type = PorousFlowSumQuantity
[]
[]
[Postprocessors]
[heat_extracted]
type = PorousFlowPlotQuantity
uo = produced_heat
[]
[approx_production_temperature]
type = PointValue
point = '100 0 0'
variable = temperature
[]
[mass_extracted_H]
type = PorousFlowPlotQuantity
uo = produced_mass_H
execute_on = 'initial timestep_end'
[]
[mass_extracted_Na]
type = PorousFlowPlotQuantity
uo = produced_mass_Na
execute_on = 'initial timestep_end'
[]
[mass_extracted_K]
type = PorousFlowPlotQuantity
uo = produced_mass_K
execute_on = 'initial timestep_end'
[]
[mass_extracted_Ca]
type = PorousFlowPlotQuantity
uo = produced_mass_Ca
execute_on = 'initial timestep_end'
[]
[mass_extracted_Mg]
type = PorousFlowPlotQuantity
uo = produced_mass_Mg
execute_on = 'initial timestep_end'
[]
[mass_extracted_SiO2]
type = PorousFlowPlotQuantity
uo = produced_mass_SiO2
execute_on = 'initial timestep_end'
[]
[mass_extracted_Al]
type = PorousFlowPlotQuantity
uo = produced_mass_Al
execute_on = 'initial timestep_end'
[]
[mass_extracted_Cl]
type = PorousFlowPlotQuantity
uo = produced_mass_Cl
execute_on = 'initial timestep_end'
[]
[mass_extracted_SO4]
type = PorousFlowPlotQuantity
uo = produced_mass_SO4
execute_on = 'initial timestep_end'
[]
[mass_extracted_HCO3]
type = PorousFlowPlotQuantity
uo = produced_mass_HCO3
execute_on = 'initial timestep_end'
[]
[mass_extracted_H2O]
type = PorousFlowPlotQuantity
uo = produced_mass_H2O
execute_on = 'initial timestep_end'
[]
[mass_extracted]
type = LinearCombinationPostprocessor
pp_names = 'mass_extracted_H mass_extracted_Na mass_extracted_K mass_extracted_Ca mass_extracted_Mg mass_extracted_SiO2 mass_extracted_Al mass_extracted_Cl mass_extracted_SO4 mass_extracted_HCO3 mass_extracted_H2O'
pp_coefs = '1 1 1 1 1 1 1 1 1 1 1'
execute_on = 'initial timestep_end'
[]
[dt]
type = TimestepSize
execute_on = 'timestep_begin'
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 2E-4
bulk_modulus = 2E9
viscosity = 1E-3
density0 = 980
cv = 4000.0
cp = 4000.0
porepressure_coefficient = 0
[]
[]
[PorousFlowFullySaturated]
coupling_type = ThermoHydro
porepressure = porepressure
temperature = temperature
mass_fraction_vars = 'f_H f_Na f_K f_Ca f_Mg f_SiO2 f_Al f_Cl f_SO4 f_HCO3'
save_component_rate_in = 'rate_H rate_Na rate_K rate_Ca rate_Mg rate_SiO2 rate_Al rate_Cl rate_SO4 rate_HCO3 rate_H2O' # change in kg at every node / dt
fp = the_simple_fluid
temperature_unit = Celsius
[]
[AuxVariables]
[rate_H]
[]
[rate_Na]
[]
[rate_K]
[]
[rate_Ca]
[]
[rate_Mg]
[]
[rate_SiO2]
[]
[rate_Al]
[]
[rate_Cl]
[]
[rate_SO4]
[]
[rate_HCO3]
[]
[rate_H2O]
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.01
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-14 0 0 0 1E-14 0 0 0 1E-14'
[]
[thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '2.5 0 0 0 2.5 0 0 0 2.5'
[]
[rock_heat]
type = PorousFlowMatrixInternalEnergy
density = 2750.0
specific_heat_capacity = 900.0
[]
[]
[Preconditioning]
active = typically_efficient
[typically_efficient]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = ' hypre boomeramg'
[]
[strong]
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 ilu NONZERO 2'
[]
[probably_too_strong]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 31536000 #1 year
[TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 500
[]
[]
[Outputs]
exodus = true
csv = true
[]
[MultiApps]
[react]
type = TransientMultiApp
input_files = aquifer_geochemistry.i
clone_master_mesh = true
execute_on = 'timestep_end'
[]
[]
[Transfers]
[changes_due_to_flow]
type = MultiAppCopyTransfer
source_variable = 'rate_H rate_Na rate_K rate_Ca rate_Mg rate_SiO2 rate_Al rate_Cl rate_SO4 rate_HCO3 rate_H2O temperature'
variable = 'pf_rate_H pf_rate_Na pf_rate_K pf_rate_Ca pf_rate_Mg pf_rate_SiO2 pf_rate_Al pf_rate_Cl pf_rate_SO4 pf_rate_HCO3 pf_rate_H2O temperature'
to_multi_app = react
[]
[massfrac_from_geochem]
type = MultiAppCopyTransfer
source_variable = 'massfrac_H massfrac_Na massfrac_K massfrac_Ca massfrac_Mg massfrac_SiO2 massfrac_Al massfrac_Cl massfrac_SO4 massfrac_HCO3'
variable = 'f_H f_Na f_K f_Ca f_Mg f_SiO2 f_Al f_Cl f_SO4 f_HCO3'
from_multi_app = react
[]
[]
(modules/solid_mechanics/test/tests/global_strain/global_strain_direction.i)
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
[]
[cnode]
type = ExtraNodesetGenerator
coord = '0 0'
new_boundary = 100
input = generated_mesh
[]
[]
[Variables]
[./u_x]
[../]
[./u_y]
[../]
[./global_strain]
order = THIRD
family = SCALAR
[../]
[]
[AuxVariables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[AuxKernels]
[./disp_x]
type = GlobalDisplacementAux
variable = disp_x
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 0
[../]
[./disp_y]
type = GlobalDisplacementAux
variable = disp_y
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 1
[../]
[]
[GlobalParams]
displacements = 'u_x u_y'
block = 0
[]
[Kernels]
[SolidMechanics]
[../]
[]
[ScalarKernels]
[./global_strain]
type = GlobalStrain
variable = global_strain
global_strain_uo = global_strain_uo
[../]
[]
[BCs]
[./Periodic]
[./left-right]
auto_direction = 'x'
variable = 'u_x u_y'
[../]
[../]
# fix center point location
[./centerfix_x]
type = DirichletBC
boundary = 100
variable = u_x
value = 0
[../]
[./fix_y]
type = DirichletBC
boundary = bottom
variable = u_y
value = 0
[../]
[./appl_y]
type = DirichletBC
boundary = top
variable = u_y
value = -0.1
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
C_ijkl = '1 1'
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
global_strain = global_strain
[../]
[./global_strain]
type = ComputeGlobalStrain
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[]
[UserObjects]
[./global_strain_uo]
type = GlobalStrainUserObject
execute_on = 'Initial Linear Nonlinear'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'PJFNK'
line_search = basic
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
l_max_its = 30
nl_max_its = 12
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-10
start_time = 0.0
num_steps = 2
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/cg-dg-hybrid/mms/lid-driven-skewed/hybrid-skewed-vortex.i)
rho=1
mu=1
[Mesh]
[gen_mesh]
type = FileMeshGenerator
file = skewed.msh
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen_mesh
[]
[]
[Variables]
[u]
family = MONOMIAL
order = SECOND
[]
[v]
family = MONOMIAL
order = SECOND
[]
[pressure][]
[]
[Kernels]
[momentum_x_convection]
type = ADConservativeAdvection
variable = u
velocity = 'velocity'
[]
[momentum_x_diffusion]
type = Diffusion
variable = u
[]
[momentum_x_pressure]
type = PressureGradient
integrate_p_by_parts = false
variable = u
pressure = pressure
component = 0
[]
[u_forcing]
type = BodyForce
variable = u
function = forcing_u
[]
[momentum_y_convection]
type = ADConservativeAdvection
variable = v
velocity = 'velocity'
[]
[momentum_y_diffusion]
type = Diffusion
variable = v
[]
[momentum_y_pressure]
type = PressureGradient
integrate_p_by_parts = false
variable = v
pressure = pressure
component = 1
[]
[v_forcing]
type = BodyForce
variable = v
function = forcing_v
[]
[mass]
type = ADConservativeAdvection
variable = pressure
velocity = velocity
advected_quantity = -1
[]
[]
[DGKernels]
[momentum_x_convection]
type = ADDGAdvection
variable = u
velocity = 'velocity'
[]
[momentum_x_diffusion]
type = DGDiffusion
variable = u
sigma = 6
epsilon = -1
[]
[momentum_y_convection]
type = ADDGAdvection
variable = v
velocity = 'velocity'
[]
[momentum_y_diffusion]
type = DGDiffusion
variable = v
sigma = 6
epsilon = -1
[]
[]
[BCs]
[u_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'left bottom right top'
variable = u
sigma = 6
epsilon = -1
function = exact_u
[]
[v_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'left bottom right top'
variable = v
sigma = 6
epsilon = -1
function = exact_v
[]
[pressure_pin]
type = FunctionDirichletBC
variable = pressure
boundary = 'pinned_node'
function = 'exact_p'
[]
[]
[Materials]
[rho]
type = ADGenericConstantMaterial
prop_names = 'rho'
prop_values = '${rho}'
[]
[vel]
type = ADVectorFromComponentVariablesMaterial
vector_prop_name = 'velocity'
u = u
v = v
[]
[rhou]
type = ADParsedMaterial
property_name = 'rhou'
coupled_variables = 'u'
material_property_names = 'rho'
expression = 'rho*u'
[]
[rhov]
type = ADParsedMaterial
property_name = 'rhov'
coupled_variables = 'v'
material_property_names = 'rho'
expression = 'rho*v'
[]
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'x^2*(1-x)^2*(2*y-6*y^2+4*y^3)'
[]
[exact_v]
type = ParsedFunction
expression = '-y^2*(1-y)^2*(2*x-6*x^2+4*x^3)'
[]
[exact_p]
type = ParsedFunction
expression = 'x*(1-x)-2/12'
[]
[forcing_u]
type = ParsedFunction
expression = '-4*mu/rho*(-1+2*y)*(y^2-6*x*y^2+6*x^2*y^2-y+6*x*y-6*x^2*y+3*x^2-6*x^3+3*x^4)+1-2*x+4*x^3'
'*y^2*(2*y^2-2*y+1)*(y-1)^2*(-1+2*x)*(x-1)^3'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[forcing_v]
type = ParsedFunction
expression = '4*mu/rho*(-1+2*x)*(x^2-6*y*x^2+6*x^2*y^2-x+6*x*y-6*x*y^2+3*y^2-6*y^3+3*y^4)+4*y^3*x^2*(2'
'*x^2-2*x+1)*(x-1)^2*(-1+2*y)*(y-1)^3'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu NONZERO mumps'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2u]
type = ElementL2Error
variable = u
function = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2v]
variable = v
function = exact_v
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2p]
variable = pressure
function = exact_p
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven_md.i)
[GlobalParams]
gravity = '0 0 0'
order = FIRST
family = LAGRANGE
u = vel_x
v = vel_y
pressure = p
temperature = T
porosity = porosity
eos = eos
[]
[Mesh]
[./square]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.1
ymin = 0
ymax = 0.1
nx = 20
ny = 20
elem_type = QUAD4
[]
[middle_node]
type = ExtraNodesetGenerator
input = square
new_boundary = 'bottom_left_corner'
coord = '0 0'
[]
[]
[FluidProperties]
[./eos]
type = SimpleFluidProperties
density0 = 100 # kg/m^3
thermal_expansion = 0 # K^{-1}
cp = 1272.0
viscosity = 0.1 # Pa-s, Re=rho*u*L/mu = 100*1*0.1/0.1 = 100
[../]
[]
[Variables]
# velocity
[./vel_x]
scaling = 1.e-1
initial_condition = 0.0
[../]
[./vel_y]
scaling = 1.e-1
initial_condition = 0.0
[../]
# Pressure
[./p]
scaling = 1
initial_condition = 1.0e5
[../]
[]
[AuxVariables]
[rho]
# incompressible flow, rho = constant
initial_condition = 100
[]
[T]
# nothing really depends on T, but eos requires temperature
initial_condition = 800
[]
[porosity]
# nothing really depends on porosity, but PINSFEFluidPressureTimeDerivative requires it
# need make it conditional
initial_condition = 1
[]
[]
[Materials]
[flow_mat]
type = INSFEMaterial
[]
[]
[Kernels]
# mass eqn
[mass_time]
type = PINSFEFluidPressureTimeDerivative
variable = p
[]
[mass_space]
type = INSFEFluidMassKernel
variable = p
[]
# x-momentum eqn
[x_momentum_time]
type = PINSFEFluidVelocityTimeDerivative
variable = vel_x
[]
[x_momentum_space]
type = INSFEFluidMomentumKernel
variable = vel_x
component = 0
[]
# y-momentum eqn
[y_momentum_time]
type = PINSFEFluidVelocityTimeDerivative
variable = vel_y
[]
[y_momentum_space]
type = INSFEFluidMomentumKernel
variable = vel_y
component = 1
[]
[]
[BCs]
[x_zero]
type = DirichletBC
variable = vel_x
boundary = 'bottom left right'
value = 0
[]
[x_lid]
type = DirichletBC
variable = vel_x
boundary = 'top'
value = 1
[]
[y_zero]
type = DirichletBC
variable = vel_y
boundary = 'bottom top left right'
value = 0
[]
[p_anchor]
type = DirichletBC
variable = p
boundary = 'bottom_left_corner'
value = 1e5
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
solve_type = 'PJFNK'
[]
[]
[Executioner]
type = Transient
dt = 0.01
dtmin = 1.e-4
petsc_options_iname = '-pc_type -ksp_gmres_restart'
petsc_options_value = 'lu 100'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-8
nl_max_its = 10
l_tol = 1e-6
l_max_its = 100
start_time = 0.0
end_time = 2
num_steps = 5
[]
[Outputs]
perf_graph = true
print_linear_residuals = false
time_step_interval = 1
execute_on = 'initial timestep_end'
[./console]
type = Console
output_linear = false
[../]
[./out]
type = Exodus
hide = 'porosity'
[../]
[]
(modules/navier_stokes/test/tests/finite_element/ins/wall_convection/steady.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./velocity]
family = LAGRANGE_VEC
[../]
[./p]
[../]
[temperature][]
[]
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
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
[../]
[./temperature_advection]
type = INSADEnergyAdvection
variable = temperature
[../]
[./temperature_conduction]
type = ADHeatConduction
variable = temperature
thermal_conductivity = 'k'
[../]
[temperature_ambient_convection]
type = INSADEnergyAmbientConvection
variable = temperature
alpha = 1
T_ambient = 0.5
[]
[temperature_supg]
type = INSADEnergySUPG
variable = temperature
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
[../]
[./temperature_hot]
type = DirichletBC
variable = temperature
boundary = 'bottom'
value = 1
[../]
[./temperature_cold]
type = DirichletBC
variable = temperature
boundary = 'top'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat]
type = INSADStabilized3Eqn
velocity = velocity
pressure = p
temperature = temperature
[]
[]
[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)'
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_factor_levels -ksp_gmres_restart'
petsc_options_value = 'asm 6 200'
line_search = 'none'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_creep_integration_error.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 2
nz = 2
xmin = 0.0
ymin = 0.0
zmin = 0.0
xmax = 10.0
ymax = 1.0
zmax = 1.0
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = '100'
nodes = '3 69'
input = gen
[]
[corner_node_2]
type = ExtraNodesetGenerator
new_boundary = '101'
nodes = '4 47'
input = corner_node
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[creep_strain_xx]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xx
index_i = 0
index_j = 0
[]
[creep_strain_xy]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xy
index_i = 0
index_j = 1
[]
[creep_strain_yy]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_yy
index_i = 1
index_j = 1
[]
[sigma_xx]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 1
index_j = 1
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1.0'
y = '0 -4e1'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_xx stress_xx'
use_automatic_differentiation = true
add_variables = true
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 7000
poissons_ratio = 0.0
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "trial_creep_two"
max_iterations = 50
absolute_tolerance = 1e-16
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
hill_constants = "0.5 0.25 0.3866 1.6413 1.6413 1.2731"
[]
[trial_creep_two]
type = ADHillCreepStressUpdate
coefficient = 1e-16
n_exponent = 9
m_exponent = 0
activation_energy = 0
max_inelastic_increment = 1.0e-4
absolute_tolerance = 1e-20
relative_tolerance = 1e-20
max_integration_error = 1.0e-5
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = 100
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = 101
value = 0.0
[]
[Pressure]
[Side1]
boundary = right
function = pull
[]
[]
[]
[UserObjects]
[terminator_creep]
type = Terminator
expression = 'time_step_size > matl_ts_min'
fail_mode = SOFT
execute_on = TIMESTEP_END
[]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1.0e-13
nl_abs_tol = 1.0e-13
l_max_its = 10
end_time = 1.65e-1
dt = 2.5e-2
start_time = 0
automatic_scaling = true
[./TimeStepper]
type = IterationAdaptiveDT
dt = 2.5e-2
time_t = '0.0 10.0'
time_dt = '2.5e-2 2.5e-2 '
optimal_iterations = 30
iteration_window = 9
growth_factor = 1.5
cutback_factor = 0.5
timestep_limiting_postprocessor = matl_ts_min
[../]
[]
[Postprocessors]
[time_step_size]
type = TimestepSize
[]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[num_lin]
type = NumLinearIterations
outputs = console
[]
[num_nonlin]
type = NumNonlinearIterations
outputs = console
[]
[creep_strain_xx]
type = ElementalVariableValue
variable = creep_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[elastic_strain_xx]
type = ElementalVariableValue
variable = elastic_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[sigma_xx]
type = ElementalVariableValue
variable = stress_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[]
[Outputs]
csv = true
exodus = true
perf_graph = true
[]
(modules/combined/test/tests/optimization/compliance_sensitivity/2d_mbb_pde.i)
vol_frac = 0.5
E0 = 1
Emin = 1e-8
power = 3
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 150
ny = 50
xmin = 0
xmax = 30
ymin = 0
ymax = 10
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = hold_y
nodes = 0
[]
[push]
type = ExtraNodesetGenerator
input = node
new_boundary = push
coord = '30 10 0'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[Dc]
initial_condition = -1.0
[]
[]
[AuxVariables]
[sensitivity]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[AuxKernel]
type = MaterialRealAux
variable = sensitivity
property = sensitivity
execute_on = LINEAR
[]
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = ${vol_frac}
[]
[Dc_elem]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[AuxKernel]
type = SelfAux
variable = Dc_elem
v = Dc
execute_on = 'TIMESTEP_END'
[]
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[Kernels]
[diffusion]
type = FunctionDiffusion
variable = Dc
function = 0.15 # radius coeff
[]
[potential]
type = Reaction
variable = Dc
[]
[source]
type = CoupledForce
variable = Dc
v = sensitivity
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_y
boundary = hold_y
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[boundary_penalty]
type = ADRobinBC
variable = Dc
boundary = 'left top'
coefficient = 10
[]
[boundary_penalty_right]
type = ADRobinBC
variable = Dc
boundary = 'right'
coefficient = 10
[]
[]
[NodalKernels]
[push]
type = NodalGravity
variable = disp_y
boundary = push
gravity_value = -1
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${E0}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
incremental = false
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[update]
type = DensityUpdate
density_sensitivity = Dc_elem
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
line_search = none
nl_abs_tol = 1e-4
l_max_its = 200
start_time = 0.0
dt = 1.0
num_steps = 70
[]
[Outputs]
[out]
type = CSV
execute_on = 'INITIAL TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = sensitivity
[]
[]
[Controls]
[first_period]
type = TimePeriod
start_time = 0.0
end_time = 10
enable_objects = 'BCs::boundary_penalty_right'
execute_on = 'initial timestep_begin'
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/energy_source/steady-var.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[AuxVariables]
[u]
initial_condition = 1
[]
[]
[Variables]
[./velocity]
family = LAGRANGE_VEC
[../]
[./p]
[../]
[temperature][]
[]
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
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
[../]
[./temperature_advection]
type = INSADEnergyAdvection
variable = temperature
[../]
[./temperature_conduction]
type = ADHeatConduction
variable = temperature
thermal_conductivity = 'k'
[../]
[temperature_source]
type = INSADEnergySource
variable = temperature
source_variable = u
[]
[temperature_supg]
type = INSADEnergySUPG
variable = temperature
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
[../]
[./temperature_hot]
type = DirichletBC
variable = temperature
boundary = 'bottom'
value = 1
[../]
[./temperature_cold]
type = DirichletBC
variable = temperature
boundary = 'top'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat]
type = INSADStabilized3Eqn
velocity = velocity
pressure = p
temperature = temperature
[]
[]
[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)'
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_factor_levels -ksp_gmres_restart'
petsc_options_value = 'asm 6 200'
line_search = 'none'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
[out]
type = Exodus
hide = 'u'
[]
[]
(modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_creep_temperature_coefficients_function.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 2
nz = 2
xmin = 0.0
ymin = 0.0
zmin = 0.0
xmax = 10.0
ymax = 1.0
zmax = 1.0
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = '100'
nodes = '3 69'
input = gen
[]
[corner_node_2]
type = ExtraNodesetGenerator
new_boundary = '101'
nodes = '4 47'
input = corner_node
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[temperature]
order = CONSTANT
family = MONOMIAL
[]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xz]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_yz]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[temperature]
type = ConstantAux
variable = temperature
value = 50
[]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[creep_strain_xx]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xx
index_i = 0
index_j = 0
[]
[creep_strain_xy]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xy
index_i = 0
index_j = 1
[]
[creep_strain_yy]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_yy
index_i = 1
index_j = 1
[]
[creep_strain_zz]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_zz
index_i = 2
index_j = 2
[]
[creep_strain_xz]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xz
index_i = 0
index_j = 2
[]
[creep_strain_yz]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_yz
index_i = 1
index_j = 2
[]
[sigma_xx]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 1
index_j = 1
[]
[]
[ICs]
[temp]
type = ConstantIC
variable = temperature
value = 50.0
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1.0e-9 1.0'
y = '0 -4e1 -4e1'
[]
[F]
type = PiecewiseLinear
x = '-1000 10000'
y = '0.5 0.5'
[]
[G]
type = PiecewiseLinear
x = '-1000 10000'
y = '0.5 0.5'
[]
[H]
type = PiecewiseLinear
x = '-1000 10000'
y = '0.5 0.5'
[]
[L]
type = PiecewiseLinear
x = '-1000 10000'
y = '1.5 1.5'
[]
[M]
type = PiecewiseLinear
x = '-1000 10000'
y = '1.5 1.5'
[]
[N]
type = PiecewiseLinear
x = '-1000 10000'
y = '1.5 1.5'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_xx stress_xx'
use_automatic_differentiation = true
add_variables = true
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 700
poissons_ratio = 0.0
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = 'trial_creep_aniso_iso'
max_iterations = 50
[]
[hill_constants]
type = ADHillConstants
# F G H L M N
hill_constants = "0.5 0.5 0.5 1.5 1.5 1.5"
function_names = 'F G H L M N'
temperature = temperature
[]
[trial_creep_aniso_iso]
type = ADHillCreepStressUpdate
coefficient = 1e-16
n_exponent = 9
m_exponent = 0
activation_energy = 0
max_inelastic_increment = 0.00003
relative_tolerance = 1e-20
absolute_tolerance = 1e-20
internal_solve_output_on = never
# Force it to not use integration error
max_integration_error = 1.0
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = 100
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = 101
value = 0.0
[]
[Pressure]
[Side1]
boundary = right
function = pull
[]
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-13
nl_abs_tol = 1.0e-14
l_max_its = 90
num_steps = 50
dt = 5.0e-4
start_time = 0
automatic_scaling = true
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[num_lin]
type = NumLinearIterations
outputs = console
[]
[num_nonlin]
type = NumNonlinearIterations
outputs = console
[]
[creep_strain_xx]
type = ElementalVariableValue
variable = creep_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_yy]
type = ElementalVariableValue
variable = creep_strain_yy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_zz]
type = ElementalVariableValue
variable = creep_strain_zz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_xy]
type = ElementalVariableValue
variable = creep_strain_xy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_yz]
type = ElementalVariableValue
variable = creep_strain_yz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_xz]
type = ElementalVariableValue
variable = creep_strain_xz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[elastic_strain_xx]
type = ElementalVariableValue
variable = elastic_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[sigma_xx]
type = ElementalVariableValue
variable = stress_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[]
[Outputs]
csv = true
exodus = true
perf_graph = true
[]
(modules/combined/examples/optimization/multi-load/square_main.i)
# This example is intended to reproduce a 2D example with opposing horizontal
# loads (see [1]). This test has an undefined solution if reguar SIMP is applied.
# Using multi-loads SIMP, on the other hand, generates a structure that optimizes
# the response to both loads individually,
# [1]. Lat. Am. j. solids struct. 12 (5), May 2015
# Topological derivative-based topology optimization of structures subject to multiple load-cases
vol_frac = 0.5
power = 1.0
E0 = 1.0
Emin = 1.0e-6
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[Bottom]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 100
xmin = 0
xmax = 150
ymin = 0
ymax = 150
[]
[left_load]
type = ExtraNodesetGenerator
input = Bottom
new_boundary = left_load
coord = '0 150 0'
[]
[right_load]
type = ExtraNodesetGenerator
input = left_load
new_boundary = right_load
coord = '150 150 0'
[]
[left_support]
type = ExtraNodesetGenerator
input = right_load
new_boundary = left_support
coord = '0 0 0'
[]
[right_support]
type = ExtraNodesetGenerator
input = left_support
new_boundary = right_support
coord = '150 0 0'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[mat_den]
family = MONOMIAL
order = CONSTANT
[]
[sensitivity_one]
family = MONOMIAL
order = SECOND
initial_condition = -1.0
[]
[sensitivity_two]
family = MONOMIAL
order = SECOND
initial_condition = -1.0
[]
[total_sensitivity]
family = MONOMIAL
order = SECOND
initial_condition = -1.0
[]
[]
[ICs]
[mat_den]
type = RandomIC
seed = 7
variable = mat_den
max = '${fparse vol_frac+0.35}'
min = '${fparse vol_frac-0.35}'
[]
[]
[AuxKernels]
[total_sensitivity]
type = ParsedAux
variable = total_sensitivity
expression = '0.5*sensitivity_one + 0.5*sensitivity_two'
coupled_variables = 'sensitivity_one sensitivity_two'
execute_on = 'LINEAR TIMESTEP_END'
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_y]
type = DirichletBC
variable = disp_y
boundary = left_support
value = 0.0
[]
[no_x]
type = DirichletBC
variable = disp_x
boundary = left_support
value = 0.0
[]
[no_y_right]
type = DirichletBC
variable = disp_y
boundary = right_support
value = 0.0
[]
[no_x_right]
type = DirichletBC
variable = disp_x
boundary = right_support
value = 0.0
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${E0}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[update]
type = DensityUpdate
density_sensitivity = total_sensitivity
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = MULTIAPP_FIXED_POINT_BEGIN
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-10
dt = 1.0
num_steps = 10
[]
[Outputs]
exodus = true
[out]
type = CSV
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[mesh_volume]
type = VolumePostprocessor
execute_on = 'initial timestep_end'
[]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[vol_frac]
type = ParsedPostprocessor
function = 'total_vol / mesh_volume'
pp_names = 'total_vol mesh_volume'
[]
[sensitivity]
type = ElementIntegralVariablePostprocessor
variable = total_sensitivity
[]
[]
[MultiApps]
[sub_app_one]
type = TransientMultiApp
input_files = square_subapp_one.i
[]
[sub_app_two]
type = TransientMultiApp
input_files = square_subapp_two.i
[]
[]
[Transfers]
# First SUB-APP
# To subapp densities
[subapp_one_density]
type = MultiAppCopyTransfer
to_multi_app = sub_app_one
source_variable = mat_den # Here
variable = mat_den
[]
# From subapp sensitivity
[subapp_one_sensitivity]
type = MultiAppCopyTransfer
from_multi_app = sub_app_one
source_variable = Dc # sensitivity_var
variable = sensitivity_one # Here
[]
# Second SUB-APP
# To subapp densities
[subapp_two_density]
type = MultiAppCopyTransfer
to_multi_app = sub_app_two
source_variable = mat_den # Here
variable = mat_den
[]
# From subapp sensitivity
[subapp_two_sensitivity]
type = MultiAppCopyTransfer
from_multi_app = sub_app_two
source_variable = Dc # sensitivity_var
variable = sensitivity_two # Here
[]
[]
(modules/xfem/test/tests/bimaterials/glued_bimaterials_2d.i)
# This test is for two layer materials with different youngs modulus
# The global stress is determined by switching the stress based on level set values
# The material interface is marked by a level set function
# The two layer materials are glued together
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y'
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
[../]
[]
[Mesh]
displacements = 'disp_x disp_y'
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
xmin = 0.0
xmax = 5.
ymin = 0.0
ymax = 5.
elem_type = QUAD4
[]
[./left_bottom]
type = ExtraNodesetGenerator
new_boundary = 'left_bottom'
coord = '0.0 0.0'
input = gen
[../]
[./left_top]
type = ExtraNodesetGenerator
new_boundary = 'left_top'
coord = '0.0 5.'
input = left_bottom
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[Functions]
[./ls_func]
type = ParsedFunction
expression = 'y-2.5'
[../]
[]
[AuxVariables]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./TensorMechanics]
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = stress_xx
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = stress_yy
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 1
variable = stress_xy
[../]
[./a_strain_xx]
type = RankTwoAux
rank_two_tensor = A_total_strain
index_i = 0
index_j = 0
variable = a_strain_xx
[../]
[./a_strain_yy]
type = RankTwoAux
rank_two_tensor = A_total_strain
index_i = 1
index_j = 1
variable = a_strain_yy
[../]
[./a_strain_xy]
type = RankTwoAux
rank_two_tensor = A_total_strain
index_i = 0
index_j = 1
variable = a_strain_xy
[../]
[./b_strain_xx]
type = RankTwoAux
rank_two_tensor = B_total_strain
index_i = 0
index_j = 0
variable = b_strain_xx
[../]
[./b_strain_yy]
type = RankTwoAux
rank_two_tensor = B_total_strain
index_i = 1
index_j = 1
variable = b_strain_yy
[../]
[./b_strain_xy]
type = RankTwoAux
rank_two_tensor = B_total_strain
index_i = 0
index_j = 1
variable = b_strain_xy
[../]
[]
[Constraints]
[./dispx_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_x
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[./dispy_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_y
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[]
[BCs]
[./bottomx]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[../]
[./bottomy]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[../]
[./topx]
type = FunctionDirichletBC
boundary = top
variable = disp_x
function = 0.03*t
[../]
[./topy]
type = FunctionDirichletBC
boundary = top
variable = disp_y
function = '0.03*t'
[../]
[]
[Materials]
[./elasticity_tensor_A]
type = ComputeIsotropicElasticityTensor
base_name = A
youngs_modulus = 1e9
poissons_ratio = 0.3
[../]
[./strain_A]
type = ComputeSmallStrain
base_name = A
[../]
[./stress_A]
type = ComputeLinearElasticStress
base_name = A
[../]
[./elasticity_tensor_B]
type = ComputeIsotropicElasticityTensor
base_name = B
youngs_modulus = 1e5
poissons_ratio = 0.3
[../]
[./strain_B]
type = ComputeSmallStrain
base_name = B
[../]
[./stress_B]
type = ComputeLinearElasticStress
base_name = B
[../]
[./combined_stress]
type = LevelSetBiMaterialRankTwo
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = stress
[../]
[./combined_dstressdstrain]
type = LevelSetBiMaterialRankFour
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = Jacobian_mult
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
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 = 'bt'
# controls for linear iterations
l_max_its = 20
l_tol = 1e-3
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-14
nl_abs_tol = 1e-7
# time control
start_time = 0.0
dt = 0.1
num_steps = 2
max_xfem_update = 1
[]
[Outputs]
exodus = true
execute_on = timestep_end
[./console]
type = Console
output_linear = true
[../]
[]
(test/tests/meshgenerators/extra_nodeset_generator/generate_extra_nodeset.i)
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[./extra_nodeset]
type = ExtraNodesetGenerator
input = square
new_boundary = 'middle_node'
nodes = '2'
[]
[]
[Outputs]
exodus = true
[]
(test/tests/mortar/periodic_segmental_constraint/periodic_simple3d.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 3
xmin = -3.0
xmax = 3.0
ymin = -3.0
ymax = 3.0
zmin = -3.0
zmax = 3.0
nx = 3
ny = 3
nz = 3
elem_type = HEX27
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3 4 5'
new_boundary = '10 11 12 13 14 15'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[left]
type = LowerDBlockFromSidesetGenerator
input = left_block_id
sidesets = '14'
new_block_id = '10004'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '15'
new_block_id = '10005'
new_block_name = 'primary_top'
[]
[back]
type = LowerDBlockFromSidesetGenerator
input = top
sidesets = '11'
new_block_id = '10001'
new_block_name = 'secondary_back'
[]
[front]
type = LowerDBlockFromSidesetGenerator
input = back
sidesets = '13'
new_block_id = '10003'
new_block_name = 'primary_front'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = front
[]
[]
[Variables]
[u]
order = SECOND
family = LAGRANGE
[]
[epsilon]
order = THIRD
family = SCALAR
[]
[./lm1]
order = FIRST
family = LAGRANGE
block = secondary_left
[../]
[./lm2]
order = FIRST
family = LAGRANGE
block = secondary_bottom
[../]
[./lm3]
order = FIRST
family = LAGRANGE
block = secondary_back
[../]
[]
[AuxVariables]
[sigma]
order = THIRD
family = SCALAR
[]
[]
[AuxScalarKernels]
[sigma]
type = FunctionScalarAux
variable = sigma
function = '1 2 3'
execute_on = initial #timestep_end
[]
[]
[Kernels]
[diff1]
type = Diffusion
variable = u
block = 1
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = EqualValueConstraint
primary_boundary = '12'
secondary_boundary = '14'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
variable = lm1
correct_edge_dropping = true
[]
[periodiclr]
type = PeriodicSegmentalConstraint
primary_boundary = '12'
secondary_boundary = '14'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
epsilon = epsilon
sigma = sigma
variable = lm1
correct_edge_dropping = true
[]
[mortarbt]
type = EqualValueConstraint
primary_boundary = '15'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
variable = lm2
correct_edge_dropping = true
[]
[periodicbt]
type = PeriodicSegmentalConstraint
primary_boundary = '15'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
epsilon = epsilon
sigma = sigma
variable = lm2
correct_edge_dropping = true
[]
[mortarbf]
type = EqualValueConstraint
primary_boundary = '13'
secondary_boundary = '11'
primary_subdomain = 'primary_front'
secondary_subdomain = 'secondary_back'
secondary_variable = u
variable = lm3
correct_edge_dropping = true
[]
[periodicbf]
type = PeriodicSegmentalConstraint
primary_boundary = '13'
secondary_boundary = '11'
primary_subdomain = 'primary_front'
secondary_subdomain = 'secondary_back'
secondary_variable = u
epsilon = epsilon
sigma = sigma
variable = lm3
correct_edge_dropping = true
[]
[]
[Preconditioning]
[smp]
full = true
type = SMP
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu NONZERO 1e-15'
solve_type = NEWTON
[]
[Outputs]
exodus = true
csv = true
[]
(modules/combined/test/tests/restart-transient-from-ss-with-stateful/sub_ss.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
nx = 8
ny = 8
xmin = -82.627
xmax = 82.627
ymin = -82.627
ymax = 82.627
dim = 2
[]
[./extra_nodes_x]
type = ExtraNodesetGenerator
input = 'gen'
new_boundary = 'no_x'
coord = '0 82.627 0'
[../]
[./extra_nodes_y]
type = ExtraNodesetGenerator
input = 'extra_nodes_x'
new_boundary = 'no_y'
coord = '-82.627 0 0'
[../]
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
[]
[AuxVariables]
[./temp]
[../]
[]
[Modules/TensorMechanics/Master]
# FINITE strain when strain is large, i.e., visible movement.
# SMALL strain when things are stressed, but may not move.
[./fuel]
add_variables = true
strain = FINITE
temperature = temp
eigenstrain_names = 'thermal_eigenstrain'
generate_output = 'vonmises_stress stress_xx stress_yy hydrostatic_stress max_principal_stress strain_xy elastic_strain_xx stress_xy'
extra_vector_tags = 'ref'
use_finite_deform_jacobian = true
incremental = true
[../]
[]
[BCs]
[./no_x]
type = DirichletBC
variable = disp_x
boundary = 'no_x'
value = 0.0
preset = true
[../]
[./no_y]
type = DirichletBC
preset = true
variable = disp_y
boundary = 'no_y'
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 3e10 # Pa
poissons_ratio = 0.33 # unitless
[../]
[./thermal_strains]
type = ComputeThermalExpansionEigenstrain
temperature = temp
thermal_expansion_coeff = 2e-6 # 1/K
stress_free_temperature = 500 # K
eigenstrain_name = 'thermal_eigenstrain'
[../]
[./stress_finite] # goes with FINITE strain formulation
type = ComputeFiniteStrainElasticStress
[../]
[]
[Postprocessors]
[./avg_temp]
type = ElementAverageValue
variable = temp
[../]
[./disp_x_max_element]
type = ElementExtremeValue
value_type = max
variable = disp_x
execute_on = 'initial timestep_end'
[../]
[./disp_y_max_element]
type = ElementExtremeValue
value_type = max
variable = disp_y
execute_on = 'initial timestep_end'
[../]
[./disp_x_max_nodal]
type = NodalExtremeValue
value_type = max
variable = disp_x
execute_on = 'initial timestep_end'
[../]
[./disp_y_max_nodal]
type = NodalExtremeValue
value_type = max
variable = disp_y
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 300'
line_search = 'none'
l_tol = 1e-02
nl_rel_tol = 5e-04
nl_abs_tol = 1e-2
l_max_its = 50
nl_max_its = 25
[]
[Outputs]
exodus = true
print_linear_residuals = false
perf_graph = true
[]
(modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_creep_z_3d.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 10
xmin = 0.0
ymin = 0.0
zmin = 0.0
xmax = 1.0
ymax = 1.0
zmax = 10.0
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = '100'
nodes = '9 3'
input = gen
[]
[corner_node_2]
type = ExtraNodesetGenerator
new_boundary = '101'
nodes = '12 1'
input = corner_node
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[creep_strain_xx]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xx
index_i = 0
index_j = 0
[]
[creep_strain_xy]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xy
index_i = 0
index_j = 1
[]
[creep_strain_zz]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_zz
index_i = 2
index_j = 2
[]
[sigma_zz]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1.0'
y = '-4e1 -4e1'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_zz stress_zz stress_xx stress_yy stress_xy stress_xz stress_yz'
use_automatic_differentiation = true
add_variables = true
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 700
poissons_ratio = 0.0
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "trial_creep_two"
max_iterations = 50
absolute_tolerance = 1e-16
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
hill_constants = "0.5 0.25 0.3866 1.6413 1.6413 1.2731"
[]
[trial_creep_two]
type = ADHillCreepStressUpdate
coefficient = 1e-16
n_exponent = 9
m_exponent = 0
activation_energy = 0
# F G H L M N
max_inelastic_increment = 0.00003
absolute_tolerance = 1e-20
relative_tolerance = 1e-20
# Force it to not use integration error
max_integration_error = 100.0
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_y
boundary = 100
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_x
boundary = 101
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0.0
[]
[pressure]
type = ADPressure
boundary = front
function = pull
variable = disp_z
component = 2
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1.0e-13
nl_abs_tol = 1.0e-13
l_max_its = 90
num_steps = 10
dt = 1.0e-4
start_time = 0
automatic_scaling = true
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[num_lin]
type = NumLinearIterations
outputs = console
[]
[num_nonlin]
type = NumNonlinearIterations
outputs = console
[]
[creep_strain_zz]
type = ElementalVariableValue
variable = creep_strain_zz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[elastic_strain_zz]
type = ElementalVariableValue
variable = elastic_strain_zz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[sigma_zz]
type = ElementalVariableValue
variable = stress_zz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[]
[Outputs]
csv = true
exodus = true
perf_graph = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_stabilized_with_temp_transient.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./velocity]
family = LAGRANGE_VEC
[../]
[./p]
[../]
[temperature]
[InitialCondition]
type = ConstantIC
value = 1.0
[]
[]
[]
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
variable = velocity
[]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[./mass_pspg]
type = INSADMassPSPG
variable = p
[../]
[./momentum_time]
type = INSADMomentumTimeDerivative
variable = velocity
[../]
[./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
[../]
[./temperature_advection]
type = INSADEnergyAdvection
variable = temperature
[../]
[temperature_time]
type = INSADHeatConductionTimeDerivative
variable = temperature
[]
[./temperature_conduction]
type = ADHeatConduction
variable = temperature
thermal_conductivity = 'k'
[../]
[temperature_supg]
type = INSADEnergySUPG
variable = temperature
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
[../]
[./temperature_hot]
type = DirichletBC
variable = temperature
boundary = 'bottom'
value = 1
[../]
[./temperature_cold]
type = DirichletBC
variable = temperature
boundary = 'top'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat]
type = INSADStabilized3Eqn
velocity = velocity
pressure = p
temperature = temperature
[]
[]
[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)'
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -sub_pc_factor_levels -ksp_gmres_restart'
petsc_options_value = 'asm 6 200'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/global_strain/global_strain_shear.i)
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 1
nz = 1
[]
[cnode]
type = ExtraNodesetGenerator
coord = '0.0 0.0 0.0'
new_boundary = 100
input = generated_mesh
[]
[]
[Variables]
[./u_x]
[../]
[./u_y]
[../]
[./u_z]
[../]
[./global_strain]
order = SIXTH
family = SCALAR
[../]
[]
[AuxVariables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./s01]
order = CONSTANT
family = MONOMIAL
[../]
[./e01]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./disp_x]
type = GlobalDisplacementAux
variable = disp_x
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 1
[../]
[./disp_y]
type = GlobalDisplacementAux
variable = disp_y
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 1
[../]
[./disp_z]
type = GlobalDisplacementAux
variable = disp_z
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 2
[../]
[./s01]
type = RankTwoAux
variable = s01
rank_two_tensor = stress
index_i = 0
index_j = 1
[../]
[./e01]
type = RankTwoAux
variable = e01
rank_two_tensor = total_strain
index_i = 0
index_j = 1
[../]
[]
[GlobalParams]
displacements = 'u_x u_y u_z'
block = 0
[]
[Kernels]
[SolidMechanics]
[../]
[]
[ScalarKernels]
[./global_strain]
type = GlobalStrain
variable = global_strain
global_strain_uo = global_strain_uo
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y z'
variable = ' u_x u_y u_z'
[../]
[../]
# fix center point location
[./centerfix_x]
type = DirichletBC
boundary = 100
variable = u_x
value = 0
[../]
[./centerfix_y]
type = DirichletBC
boundary = 100
variable = u_y
value = 0
[../]
[./centerfix_z]
type = DirichletBC
boundary = 100
variable = u_z
value = 0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
C_ijkl = '70e9 0.33'
fill_method = symmetric_isotropic_E_nu
[../]
[./strain]
type = ComputeSmallStrain
global_strain = global_strain
[../]
[./global_strain]
type = ComputeGlobalStrain
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[]
[UserObjects]
[./global_strain_uo]
type = GlobalStrainUserObject
applied_stress_tensor = '0 0 0 5e9 5e9 5e9'
execute_on = 'Initial Linear Nonlinear'
[../]
[]
[Postprocessors]
[./l2err_e01]
type = ElementL2Error
variable = e01
function = 0.095 #Shear strain check
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'PJFNK'
line_search = basic
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
l_max_its = 30
nl_max_its = 12
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-10
start_time = 0.0
num_steps = 2
[]
[Outputs]
exodus = true
[]
(test/tests/bcs/ad_nodal_bc_nonlocal_dependence/test.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 20
[]
[pin]
type = ExtraNodesetGenerator
input = gen
new_boundary = 'pin'
nodes = '0'
[]
[]
[Variables]
[u][]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left_neumann]
type = NeumannBC
boundary = 'left'
value = -1
variable = u
[]
[right_neumann]
type = NeumannBC
boundary = 'right'
value = 1
variable = u
[]
[pin]
type = ADAverageValuePin
variable = u
# This BC constrains a single degree of freedom on the node specified by the boundary name 'pin' but
# since only gradients of 'u' appear in the weak form and we have no other Dirichlet boundary conditions,
# constraining the single degree of freedom will make it appear as if we have constrained all the degrees of
# freedom in the system such that we have an average value of 0.
boundary = 'pin'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Problem]
# We have to close the matrix before enforcing boundary conditions, which destroys our sparsity pattern
error_on_jacobian_nonzero_reallocation = false
[]
[Outputs]
exodus = true
[]
(test/tests/mortar/periodic_segmental_constraint/periodic_aux2d.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -1.0
xmax = 1.0
ymin = -1.0
ymax = 1.0
nx = 4
ny = 4
elem_type = QUAD9
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[left]
type = LowerDBlockFromSidesetGenerator
input = left_block_id
sidesets = '13'
new_block_id = '10003'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '11'
new_block_id = '10001'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_top'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = top
[]
[]
[Variables]
[u]
order = SECOND
family = LAGRANGE
[]
[./lm1]
order = FIRST
family = LAGRANGE
block = secondary_left
[../]
[./lm2]
order = FIRST
family = LAGRANGE
block = secondary_bottom
[../]
[]
[AuxVariables]
[sigma]
order = SECOND
family = SCALAR
[]
[epsilon]
order = SECOND
family = SCALAR
[]
[]
[AuxScalarKernels]
[sigma]
type = FunctionScalarAux
variable = sigma
function = '1 1'
execute_on = initial #timestep_end
[]
[epsilon]
type = FunctionScalarAux
variable = epsilon
function = '-1 -1'
execute_on = initial #timestep_end
[]
[]
[Kernels]
[diff1]
type = Diffusion
variable = u
block = 1
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = EqualValueConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
variable = lm1
correct_edge_dropping = true
[]
[periodiclr]
type = PeriodicSegmentalConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
epsilon = epsilon
sigma = sigma
variable = lm1
correct_edge_dropping = true
compute_scalar_residuals = false
[]
[mortarbt]
type = EqualValueConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
variable = lm2
correct_edge_dropping = true
[]
[periodicbt]
type = PeriodicSegmentalConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
epsilon = epsilon
sigma = sigma
variable = lm2
correct_edge_dropping = true
compute_scalar_residuals = false
[]
[]
[Preconditioning]
[smp]
full = true
type = SMP
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu NONZERO 1e-15'
solve_type = NEWTON
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/uel/tensile_uel_umat_moose_temperature.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 1
nz = 1
elem_type = HEX8
[]
[extra_nodeset]
type = ExtraNodesetGenerator
input = mesh
new_boundary = 'master'
coord = '1.0 1.0 1.0'
[]
[]
[AuxVariables]
[temperature]
initial_condition = 500
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[Functions]
[function_pull]
type = PiecewiseLinear
x = '0 100'
y = '0 0.1'
[]
[]
[Constraints]
[one]
type = LinearNodalConstraint
variable = disp_x
primary = '6'
secondary_node_ids = '1 2 5'
penalty = 1.0e8
formulation = kinematic
weights = '1'
[]
[two]
type = LinearNodalConstraint
variable = disp_z
primary = '6'
secondary_node_ids = '4 5 7'
penalty = 1.0e8
formulation = kinematic
weights = '1'
[]
[]
[BCs]
[symmy]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[symmx]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[symmz]
type = DirichletBC
variable = disp_z
boundary = back
value = 0
[]
# What's done below is to capture the weird constraints
[axial_load]
type = FunctionDirichletBC
variable = disp_y
boundary = 'top'
function = function_pull
[]
[]
[UserObjects]
[uel]
type = AbaqusUserElement
variables = 'disp_x disp_y'
plugin = '../../../../solid_mechanics/examples/uel_build/uel'
use_displaced_mesh = false
aux_variables = temperature # TODO
#use_one_based_indexing = true # TODO
jtype = 17
num_state_vars = 177
constant_properties = '190 28.0 3.0 1.0 6.0 0.0 0.0 23.0 25.0 26.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 '
'0.0 0.0 0.0 0.0 0.0 31700000.0 0.32 6.67e-06 1e-08 5000.0 4.0' # 28 properties
extra_vector_tags = 'kernel_residual'
[]
[]
[Problem]
kernel_coverage_check = false
extra_tag_vectors = 'kernel_residual'
[]
[AuxVariables]
[res_x]
[]
[res_y]
[]
[]
[AuxKernels]
[res_x]
type = TagVectorAux
variable = res_x
v = disp_x
vector_tag = kernel_residual
[]
[res_y]
type = TagVectorAux
variable = res_y
v = disp_y
vector_tag = kernel_residual
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
l_max_its = 100
l_tol = 1e-8
nl_max_its = 50
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
dtmin = 1
dt = 5
end_time = 100
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/uel/small.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
xmax = 10
ymax = 3
elem_type = TRI3
[]
[pin]
type = ExtraNodesetGenerator
nodes = 106
new_boundary = pin
input = gen
[]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = pin
value = 0
[]
inactive = 'right_dirichlet'
[right_neumann]
type = FunctionNeumannBC
variable = disp_x
function = t
boundary = right
[]
[right_dirichlet]
type = FunctionDirichletBC
variable = disp_x
function = t/10
boundary = right
[]
[]
[UserObjects]
[uel]
type = AbaqusUserElement
variables = 'disp_x disp_y'
plugin = ../../plugins/small_strain_tri_uel
use_displaced_mesh = false
num_state_vars = 8
constant_properties = '100 0.3' # E nu
extra_vector_tags = 'kernel_residual'
[]
[]
[Problem]
kernel_coverage_check = false
extra_tag_vectors = 'kernel_residual'
[]
[AuxVariables]
[res_x]
[]
[res_y]
[]
[]
[AuxKernels]
[res_x]
type = TagVectorAux
variable = res_x
v = disp_x
vector_tag = kernel_residual
[]
[res_y]
type = TagVectorAux
variable = res_y
v = disp_y
vector_tag = kernel_residual
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
dt = 1
num_steps = 15
[]
[Postprocessors]
[delta_l]
type = SideAverageValue
variable = disp_x
boundary = right
execute_on = 'INITIAL TIMESTEP_END'
[]
[V]
type = ElementIntegralMaterialProperty
mat_prop = 1
use_displaced_mesh = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/mms/supg/supg_mms_test.i)
mu=1.5
rho=2.5
[GlobalParams]
gravity = '0 0 0'
supg = true
convective_term = true
integrate_p_by_parts = false
laplace = true
u = vel_x
v = vel_y
pressure = p
alpha = 1
order = SECOND
family = LAGRANGE
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
elem_type = QUAD9
nx = 4
ny = 4
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./vel_x]
[../]
[./vel_y]
[../]
[./p]
order = FIRST
[../]
[]
[Kernels]
# mass
[./mass]
type = INSMass
variable = p
[../]
# x-momentum, space
[./x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
component = 0
forcing_func = vel_x_source_func
[../]
# y-momentum, space
[./y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
component = 1
forcing_func = vel_y_source_func
[../]
[./p_source]
type = BodyForce
function = p_source_func
variable = p
[../]
[]
[BCs]
[./vel_x]
type = FunctionDirichletBC
preset = false
boundary = 'left right top bottom'
function = vel_x_func
variable = vel_x
[../]
[./vel_y]
type = FunctionDirichletBC
preset = false
boundary = 'left right top bottom'
function = vel_y_func
variable = vel_y
[../]
[./p]
type = FunctionDirichletBC
preset = false
boundary = 'left right top bottom'
function = p_func
variable = p
[../]
[]
[Functions]
[./vel_x_source_func]
type = ParsedFunction
expression = '-${mu}*(-0.028*pi^2*x^2*sin(0.2*pi*x*y) - 0.028*pi^2*y^2*sin(0.2*pi*x*y) - 0.1*pi^2*sin(0.5*pi*x) - 0.4*pi^2*sin(pi*y)) + ${rho}*(0.14*pi*x*cos(0.2*pi*x*y) + 0.4*pi*cos(pi*y))*(0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3) + ${rho}*(0.14*pi*y*cos(0.2*pi*x*y) + 0.2*pi*cos(0.5*pi*x))*(0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5) + 0.1*pi*y*cos(0.2*pi*x*y) + 0.25*pi*cos(0.5*pi*x)'
[../]
[./vel_y_source_func]
type = ParsedFunction
expression = '-${mu}*(-0.018*pi^2*x^2*sin(0.3*pi*x*y) - 0.018*pi^2*y^2*sin(0.3*pi*x*y) - 0.384*pi^2*sin(0.8*pi*x) - 0.027*pi^2*sin(0.3*pi*y)) + ${rho}*(0.06*pi*x*cos(0.3*pi*x*y) + 0.09*pi*cos(0.3*pi*y))*(0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3) + ${rho}*(0.06*pi*y*cos(0.3*pi*x*y) + 0.48*pi*cos(0.8*pi*x))*(0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5) + 0.1*pi*x*cos(0.2*pi*x*y) + 0.3*pi*cos(0.3*pi*y)'
[../]
[./p_source_func]
type = ParsedFunction
expression = '-0.06*pi*x*cos(0.3*pi*x*y) - 0.14*pi*y*cos(0.2*pi*x*y) - 0.2*pi*cos(0.5*pi*x) - 0.09*pi*cos(0.3*pi*y)'
[../]
[./vel_x_func]
type = ParsedFunction
expression = '0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5'
[../]
[./vel_y_func]
type = ParsedFunction
expression = '0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3'
[../]
[./p_func]
type = ParsedFunction
expression = '0.5*sin(0.5*pi*x) + 1.0*sin(0.3*pi*y) + 0.5*sin(0.2*pi*x*y) + 0.5'
[../]
[./vxx_func]
type = ParsedFunction
expression = '0.14*pi*y*cos(0.2*pi*x*y) + 0.2*pi*cos(0.5*pi*x)'
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
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]
type = Exodus
[../]
[./csv]
type = CSV
[../]
[]
[Postprocessors]
[./L2vel_x]
type = ElementL2Error
variable = vel_x
function = vel_x_func
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2vel_y]
variable = vel_y
function = vel_y_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2p]
variable = p
function = p_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2vxx]
variable = vxx
function = vxx_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[]
[AuxVariables]
[./vxx]
family = MONOMIAL
order = FIRST
[../]
[]
[AuxKernels]
[./vxx]
type = VariableGradientComponent
component = x
variable = vxx
gradient_variable = vel_x
[../]
[]
(modules/solid_mechanics/test/tests/finite_strain_elastic_anisotropy/3d_bar_orthotropic_90deg_rotation.i)
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
xmin = 0
xmax = 2
ymin = 0
ymax = 10
zmin = 0
zmax = 2
nx = 1
ny = 1
nz = 1
elem_type = HEX8
[]
[corner]
type = ExtraNodesetGenerator
new_boundary = 101
coord = '0 0 0'
input = generated_mesh
[]
[side]
type = ExtraNodesetGenerator
new_boundary = 102
coord = '2 0 0'
input = corner
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
use_finite_deform_jacobian = true
volumetric_locking_correction = false
generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_xz'
[]
[]
[Materials]
[stress]
type = ComputeFiniteStrainElasticStress
[]
[elasticity_tensor]
type = ComputeElasticityTensor
fill_method = orthotropic
C_ijkl = '2.0e3 2.0e5 2.0e3 0.71428571e3 0.71428571e3 0.71428571e3 0.4 0.2 0.004 0.004 0.2 0.4'
[]
[]
[BCs]
[fix_z]
type = DirichletBC
variable = disp_z
boundary = bottom
value = 0
[]
[rot_y]
type = DisplacementAboutAxis
boundary = bottom
function = t
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 1
variable = disp_y
[]
#
[rot_x]
type = DisplacementAboutAxis
boundary = bottom
function = t
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 0
variable = disp_x
[]
[rot_y90]
type = DisplacementAboutAxis
boundary = bottom
function = 90
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 1
variable = disp_y
[]
#
[rot_x90]
type = DisplacementAboutAxis
boundary = bottom
function = 90
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 0
variable = disp_x
[]
[press]
boundary = top
function = '-1.0*(t-90)*10.0'
use_displaced_mesh = true
displacements = 'disp_x disp_y disp_z'
type = Pressure
variable = disp_x
[]
[]
[Controls]
[c1]
type = TimePeriod
enable_objects = 'BCs::rot_x BCs::rot_y'
disable_objects = 'BCs::rot_x90 BCs::rot_y90 BCs::press'
start_time = '0'
end_time = '90'
[]
[c190plus]
type = TimePeriod
enable_objects = 'BCs::rot_x90 BCs::rot_y90 BCs::press'
disable_objects = 'BCs::rot_x BCs::rot_y '
start_time = '90'
end_time = '390'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-08
nl_max_its = 50
l_tol = 1e-4
l_max_its = 50
start_time = 0.0
dt = 5
dtmin = 5
num_steps = 78
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/uel/tensile_uel_umat_moose.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 1
nz = 1
elem_type = HEX8
[]
[extra_nodeset]
type = ExtraNodesetGenerator
input = mesh
new_boundary = 'master'
coord = '1.0 1.0 1.0'
[]
[]
# [AuxVariables]
# [temperature]
# initial_condition = 500
# []
# []
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[Functions]
[function_pull]
type = PiecewiseLinear
x = '0 100'
y = '0 0.1'
[]
[]
[Constraints]
[one]
type = LinearNodalConstraint
variable = disp_x
primary = '6'
secondary_node_ids = '1 2 5'
penalty = 1.0e8
formulation = kinematic
weights = '1'
[]
[two]
type = LinearNodalConstraint
variable = disp_z
primary = '6'
secondary_node_ids = '4 5 7'
penalty = 1.0e8
formulation = kinematic
weights = '1'
[]
[]
[BCs]
[symmy]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[symmx]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[symmz]
type = DirichletBC
variable = disp_z
boundary = back
value = 0
[]
# What's done below is to capture the weird constraints
[axial_load]
type = FunctionDirichletBC
variable = disp_y
boundary = 'top'
function = function_pull
[]
[]
[UserObjects]
[uel]
type = AbaqusUserElement
variables = 'disp_x disp_y'
plugin = '../../../../solid_mechanics/examples/uel_build/uel'
use_displaced_mesh = false
#temperature = temperature # TODO
#use_one_based_indexing = true # TODO
jtype = 17
num_state_vars = 177
constant_properties = '190.0 28.0 3.0 1.0 6.0 0.0 0.0 23.0 25.0 26.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 '
'0.0 0.0 0.0 0.0 0.0 31700000.0 0.32 6.67e-06 1e-08 5000.0 4.0' # 27 properties
extra_vector_tags = 'kernel_residual'
[]
[]
[Problem]
kernel_coverage_check = false
extra_tag_vectors = 'kernel_residual'
[]
[AuxVariables]
[res_x]
[]
[res_y]
[]
[]
[AuxKernels]
[res_x]
type = TagVectorAux
variable = res_x
v = disp_x
vector_tag = kernel_residual
[]
[res_y]
type = TagVectorAux
variable = res_y
v = disp_y
vector_tag = kernel_residual
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
l_max_its = 100
l_tol = 1e-8
nl_max_its = 50
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
dtmin = 1
dt = 5
end_time = 100
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/cohesive_zone_model/bilinear_mixed.i)
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymax = 2
nx = 1
ny = 2
[]
[block1]
type = SubdomainBoundingBoxGenerator
input = 'msh'
bottom_left = '0 0 0'
top_right = '1 1 0'
block_id = 1
block_name = 'block1'
[]
[block2]
type = SubdomainBoundingBoxGenerator
input = 'block1'
bottom_left = '0 1 0'
top_right = '1 2 0'
block_id = 2
block_name = 'block2'
[]
[split]
type = BreakMeshByBlockGenerator
input = block2
[]
[top_node]
type = ExtraNodesetGenerator
coord = '0 2 0'
input = split
new_boundary = top_node
[]
[bottom_node]
type = ExtraNodesetGenerator
coord = '0 0 0'
input = top_node
new_boundary = bottom_node
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
generate_output = 'stress_yy'
[all]
strain = FINITE
add_variables = true
use_automatic_differentiation = true
decomposition_method = TaylorExpansion
[]
[]
[]
[]
[BCs]
[fix_x]
type = DirichletBC
preset = true
value = 0.0
boundary = bottom_node
variable = disp_x
[]
[fix_top]
type = DirichletBC
preset = true
boundary = top
variable = disp_x
value = 0
[]
[top]
type = FunctionDirichletBC
boundary = top
variable = disp_y
function = 'if(t<=0.3,t,if(t<=0.6,0.3-(t-0.3),0.6-t))'
preset = true
[]
[bottom]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0
preset = true
[]
[]
[Physics/SolidMechanics/CohesiveZone]
[czm_ik]
boundary = 'interface'
[]
[]
[Materials]
[stress]
type = ADComputeFiniteStrainElasticStress
[]
[elasticity_tensor]
type = ADComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '1.684e5 0.176e5 0.176e5 1.684e5 0.176e5 1.684e5 0.754e5 0.754e5 0.754e5'
[]
[czm]
type = BiLinearMixedModeTraction
boundary = 'interface'
penalty_stiffness = 1e6
GI_c = 1e3
GII_c = 1e2
normal_strength = 1e4
shear_strength = 1e3
displacements = 'disp_x disp_y'
eta = 2.2
viscosity = 1e-3
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
line_search = none
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
l_max_its = 2
l_tol = 1e-14
nl_max_its = 30
nl_rel_tol = 1e-50
nl_abs_tol = 1e-15
start_time = 0.0
dt = 0.1
end_time = 1.0
dtmin = 0.1
[]
[Outputs]
exodus = true
[]
(modules/combined/examples/optimization/thermomechanical/thermomechanical_main.i)
vol_frac = 0.4
power = 2.0
E0 = 1.0e-6
E1 = 1.0
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 40
xmin = 0
xmax = 40
ymin = 0
ymax = 40
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = hold
nodes = 0
[]
[push_left]
type = ExtraNodesetGenerator
input = node
new_boundary = push_left
coord = '16 0 0'
[]
[push_center]
type = ExtraNodesetGenerator
input = push_left
new_boundary = push_center
coord = '24 0 0'
[]
[extra]
type = SideSetsFromBoundingBoxGenerator
input = push_center
bottom_left = '-0.01 17.999 0'
top_right = '5 22.001 0'
boundary_new = n1
boundaries_old = left
[]
[dirichlet_bc]
type = SideSetsFromNodeSetsGenerator
input = extra
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[mat_den]
family = MONOMIAL
order = FIRST
initial_condition = 0.02
[]
[sensitivity_one]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[]
[sensitivity_two]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[]
[total_sensitivity]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[]
[]
[AuxKernels]
[total_sensitivity]
type = ParsedAux
variable = total_sensitivity
expression = '(1-1.0e-7)*sensitivity_one + 1.0e-7*sensitivity_two'
coupled_variables = 'sensitivity_one sensitivity_two'
execute_on = 'LINEAR TIMESTEP_END'
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_y]
type = DirichletBC
variable = disp_y
boundary = hold
value = 0.0
[]
[no_x_symm]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${E1} + (mat_den ^ ${power}) * (${E1}-${E0})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
# We do filtering in the subapps
[update]
type = DensityUpdate
density_sensitivity = total_sensitivity
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = MULTIAPP_FIXED_POINT_BEGIN
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-8
dt = 1.0
num_steps = 2
[]
[Outputs]
[out]
type = CSV
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
exodus = true
[]
[Postprocessors]
[mesh_volume]
type = VolumePostprocessor
execute_on = 'initial timestep_end'
[]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[vol_frac]
type = ParsedPostprocessor
function = 'total_vol / mesh_volume'
pp_names = 'total_vol mesh_volume'
[]
[sensitivity]
type = ElementIntegralVariablePostprocessor
variable = total_sensitivity
[]
[]
[MultiApps]
[sub_app_one]
type = TransientMultiApp
input_files = structural_sub.i
[]
[sub_app_two]
type = TransientMultiApp
input_files = thermal_sub.i
[]
[]
[Transfers]
# First SUB-APP: STRUCTURAL
# To subapp densities
[subapp_one_density]
type = MultiAppCopyTransfer
to_multi_app = sub_app_one
source_variable = mat_den # Here
variable = mat_den
[]
# From subapp sensitivity
[subapp_one_sensitivity]
type = MultiAppCopyTransfer
from_multi_app = sub_app_one
source_variable = Dc # sensitivity_var
variable = sensitivity_one # Here
[]
# Second SUB-APP: HEAT CONDUCTIVITY
# To subapp densities
[subapp_two_density]
type = MultiAppCopyTransfer
to_multi_app = sub_app_two
source_variable = mat_den # Here
variable = mat_den
[]
# From subapp sensitivity
[subapp_two_sensitivity]
type = MultiAppCopyTransfer
from_multi_app = sub_app_two
source_variable = Tc # sensitivity_var
variable = sensitivity_two # Here
[]
[]
(modules/xfem/test/tests/moving_interface/moving_ad_bimaterial.i)
# This test is for two layer materials with different youngs modulus with AD
# The global stress is determined by switching the stress based on level set values
# The material interface is marked by a level set function
# The two layer materials are glued together
# This case is also meant to test for a bug in moving interfaces on displaced meshes
# It should fail during the healing step of the 2nd timestep if the bug is present.
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Mesh]
displacements = 'disp_x disp_y'
[generated_mesh]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
xmin = 0.0
xmax = 5.
ymin = 0.0
ymax = 5.
elem_type = QUAD4
[]
[./left_bottom]
type = ExtraNodesetGenerator
new_boundary = 'left_bottom'
coord = '0.0 0.0'
input = generated_mesh
[../]
[./left_top]
type = ExtraNodesetGenerator
new_boundary = 'left_top'
coord = '0.0 5.'
input = left_bottom
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Functions]
[./ls_func]
type = ParsedFunction
expression = 'y-3.153 + t'
[../]
[]
[AuxVariables]
[./a_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
strain = SMALL
use_automatic_differentiation = true
add_variables = true
generate_output = 'stress_xx stress_yy stress_xy'
[../]
[]
[AuxKernels]
[./a_strain_xx]
type = ADRankTwoAux
rank_two_tensor = A_total_strain
index_i = 0
index_j = 0
variable = a_strain_xx
[../]
[./a_strain_yy]
type = ADRankTwoAux
rank_two_tensor = A_total_strain
index_i = 1
index_j = 1
variable = a_strain_yy
[../]
[./a_strain_xy]
type = ADRankTwoAux
rank_two_tensor = A_total_strain
index_i = 0
index_j = 1
variable = a_strain_xy
[../]
[./b_strain_xx]
type = ADRankTwoAux
rank_two_tensor = B_total_strain
index_i = 0
index_j = 0
variable = b_strain_xx
[../]
[./b_strain_yy]
type = ADRankTwoAux
rank_two_tensor = B_total_strain
index_i = 1
index_j = 1
variable = b_strain_yy
[../]
[./b_strain_xy]
type = ADRankTwoAux
rank_two_tensor = B_total_strain
index_i = 0
index_j = 1
variable = b_strain_xy
[../]
[]
[Constraints]
[./dispx_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_x
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[./dispy_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_y
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[]
[BCs]
[./bottomx]
type = ADDirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[../]
[./bottomy]
type = ADDirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[../]
[./topx]
type = ADFunctionDirichletBC
boundary = top
variable = disp_x
function = 0.03*t
[../]
[./topy]
type = ADFunctionDirichletBC
boundary = top
variable = disp_y
function = '0.03*t'
[../]
[]
[Materials]
[./elasticity_tensor_A]
type = ADComputeIsotropicElasticityTensor
base_name = A
youngs_modulus = 1e9
poissons_ratio = 0.3
[../]
[./strain_A]
type = ADComputeSmallStrain
base_name = A
displacements = 'disp_x disp_y'
[../]
[./stress_A]
type = ADComputeLinearElasticStress
base_name = A
[../]
[./elasticity_tensor_B]
type = ADComputeIsotropicElasticityTensor
base_name = B
youngs_modulus = 1e7
poissons_ratio = 0.3
[../]
[./strain_B]
type = ADComputeSmallStrain
base_name = B
displacements = 'disp_x disp_y'
[../]
[./stress_B]
type = ADComputeLinearElasticStress
base_name = B
[../]
[./combined_stress]
type = ADLevelSetBiMaterialRankTwo
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = stress
[../]
[./combined_elasticity_tensor]
type = ADLevelSetBiMaterialRankFour
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = elasticity_tensor
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
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 = 'bt'
# controls for linear iterations
l_max_its = 20
l_tol = 1e-8
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-14
nl_abs_tol = 1e-50
# time control
start_time = 0.0
dt = 0.15
num_steps = 3
max_xfem_update = 1
[]
[Outputs]
exodus = true
execute_on = timestep_end
file_base = moving_bimaterial_out
perf_graph = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/contact/test/tests/cohesive_zone_model/bilinear_mixed_mortar_only_czm.i)
[Mesh]
[base]
type = GeneratedMeshGenerator
dim = 2
xmax = 1.1
ymax = 1
xmin = -0.1
nx = 1
ny = 1
[]
[rename_base]
type = RenameBoundaryGenerator
input = base
old_boundary = 'top bottom left right'
new_boundary = 'top_base bottom_base left_base right_base'
[]
[base_id]
type = SubdomainIDGenerator
input = rename_base
subdomain_id = 1
[]
[top]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymin = 1
ymax = 2
nx = 1
ny = 1
[]
[rename_top]
type = RenameBoundaryGenerator
input = top
old_boundary = 'top bottom left right'
new_boundary = '100 101 102 103'
[]
[top_id]
type = SubdomainIDGenerator
input = rename_top
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'base_id top_id'
[]
[top_node]
type = ExtraNodesetGenerator
coord = '0 2 0'
input = combined
new_boundary = top_node
[]
[bottom_node]
type = ExtraNodesetGenerator
coord = '-0.1 0 0'
input = top_node
new_boundary = bottom_node
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10001
new_block_name = 'secondary_lower'
sidesets = 'top_base'
input = bottom_node
[]
[primary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10000
sidesets = '101'
new_block_name = 'primary_lower'
input = secondary
[]
patch_update_strategy = auto
patch_size = 20
allow_renumbering = false
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Modules]
[TensorMechanics]
[Master]
generate_output = 'stress_yy'
[all]
strain = FINITE
add_variables = true
use_automatic_differentiation = true
decomposition_method = TaylorExpansion
generate_output = 'vonmises_stress'
block = '1 2'
[]
[]
[]
[]
[BCs]
[fix_x]
type = DirichletBC
preset = true
value = 0.0
boundary = bottom_node
variable = disp_x
[]
[fix_top]
type = DirichletBC
preset = true
boundary = 100
variable = disp_x
value = 0
[]
[top]
type = FunctionDirichletBC
boundary = 100
variable = disp_y
function = 'if(t<=0.3,t,if(t<=0.6,0.3-(t-0.3),0.6-t))'
preset = true
[]
[bottom]
type = DirichletBC
boundary = bottom_base
variable = disp_y
value = 0
preset = true
[]
[]
[Materials]
[normal_strength]
type = GenericConstantMaterial
prop_names = 'normal_strength'
prop_values = '1e3'
[]
[shear_strength]
type = GenericConstantMaterial
prop_names = 'shear_strength'
prop_values = '7.5e2'
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = '1 2'
[]
[elasticity_tensor]
type = ADComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '1.684e5 0.176e5 0.176e5 1.684e5 0.176e5 1.684e5 0.754e5 0.754e5 0.754e5'
block = '1 2'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = none
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
compute_scaling_once = false
off_diagonals_in_auto_scaling = true
l_max_its = 2
l_tol = 1e-14
nl_max_its = 150
nl_rel_tol = 1e-14
nl_abs_tol = 1e-12
start_time = 0.0
dt = 0.1
end_time = 1.0
dtmin = 0.1
[]
[Outputs]
exodus = true
[]
[UserObjects]
[czm_uo]
type = BilinearMixedModeCohesiveZoneModel
primary_boundary = 101
secondary_boundary = 'top_base'
primary_subdomain = 10000
secondary_subdomain = 10001
correct_edge_dropping = true
disp_x = disp_x
disp_y = disp_y
friction_coefficient = 0.0 # with 2.0 works
secondary_variable = disp_x
penalty = 0e6
penalty_friction = 0e4
use_physical_gap = true
# bilinear model parameters
normal_strength = 'normal_strength'
shear_strength = 'shear_strength'
penalty_stiffness = 200
power_law_parameter = 0.1
GI_c = 123
GII_c = 54
displacements = 'disp_x disp_y'
[]
[]
[Constraints]
[x]
type = NormalMortarMechanicalContact
primary_boundary = 101
secondary_boundary = 'top_base'
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = czm_uo
[]
[y]
type = NormalMortarMechanicalContact
primary_boundary = 101
secondary_boundary = 'top_base'
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = czm_uo
[]
[c_x]
type = MortarGenericTraction
primary_boundary = 101
secondary_boundary = 'top_base'
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
cohesive_zone_uo = czm_uo
[]
[c_y]
type = MortarGenericTraction
primary_boundary = 101
secondary_boundary = 'top_base'
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
cohesive_zone_uo = czm_uo
[]
[]
(modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_creep_x_3d.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 2
nz = 2
xmin = 0.0
ymin = 0.0
zmin = 0.0
xmax = 10.0
ymax = 1.0
zmax = 1.0
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = '100'
nodes = '3 69'
input = gen
[]
[corner_node_2]
type = ExtraNodesetGenerator
new_boundary = '101'
nodes = '4 47'
input = corner_node
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[creep_strain_xx]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xx
index_i = 0
index_j = 0
[]
[creep_strain_xy]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xy
index_i = 0
index_j = 1
[]
[creep_strain_yy]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_yy
index_i = 1
index_j = 1
[]
[sigma_xx]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 1
index_j = 1
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1.0e-9 1.0'
y = '0 -4e1 -4e1'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_xx stress_xx'
use_automatic_differentiation = true
add_variables = true
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 700
poissons_ratio = 0.0
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "trial_creep_two"
max_iterations = 50
absolute_tolerance = 1e-16
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
hill_constants = "0.5 0.25 0.3866 1.6413 1.6413 1.2731"
[]
[trial_creep_two]
type = ADHillCreepStressUpdate
coefficient = 1e-16
n_exponent = 9
m_exponent = 0
activation_energy = 0
max_inelastic_increment = 0.00003
absolute_tolerance = 1e-20
relative_tolerance = 1e-20
# Force it to not use integration error
max_integration_error = 100.0
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = 100
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = 101
value = 0.0
[]
[Pressure]
[Side1]
boundary = right
function = pull
[]
[]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -mat_mffd_err'
petsc_options_value = 'lu superlu_dist 1e-5'
nl_rel_tol = 1.0e-14
nl_abs_tol = 1.0e-14
l_max_its = 10
num_steps = 10
dt = 1.0e-4
start_time = 0
automatic_scaling = true
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[num_lin]
type = NumLinearIterations
outputs = console
[]
[num_nonlin]
type = NumNonlinearIterations
outputs = console
[]
[creep_strain_xx]
type = ElementalVariableValue
variable = creep_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[elastic_strain_xx]
type = ElementalVariableValue
variable = elastic_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[sigma_xx]
type = ElementalVariableValue
variable = stress_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[]
[Outputs]
csv = true
exodus = true
perf_graph = true
[]
(modules/solid_mechanics/test/tests/finite_strain_elastic_anisotropy/3d_bar_orthotropic_full_rotation.i)
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
xmin = 0
xmax = 2
ymin = 0
ymax = 10
zmin = 0
zmax = 2
nx = 1
ny = 1
nz = 1
elem_type = HEX8
[]
[corner]
type = ExtraNodesetGenerator
new_boundary = 101
coord = '0 0 0'
input = generated_mesh
[]
[side]
type = ExtraNodesetGenerator
new_boundary = 102
coord = '2 0 0'
input = corner
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
use_finite_deform_jacobian = true
volumetric_locking_correction = false
generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_xz'
[]
[]
[Materials]
[stress]
type = ComputeFiniteStrainElasticStress
[]
[elasticity_tensor]
type = ComputeElasticityTensor
fill_method = orthotropic
C_ijkl = '2.0e3 2.0e5 2.0e3 0.71428571e3 0.71428571e3 0.71428571e3 0.4 0.2 0.004 0.004 0.2 0.4'
[]
[]
[BCs]
[fix_z]
type = DirichletBC
variable = disp_z
boundary = bottom
value = 0
[]
[rot_y]
type = DisplacementAboutAxis
boundary = bottom
function = t
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 1
variable = disp_y
[]
#
[rot_x]
type = DisplacementAboutAxis
boundary = bottom
function = t
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 0
variable = disp_x
[]
[rot_y90]
type = DisplacementAboutAxis
boundary = bottom
function = 360
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 1
variable = disp_y
[]
#
[rot_x90]
type = DisplacementAboutAxis
boundary = bottom
function = 360
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 0
variable = disp_x
[]
[press]
boundary = top
function = '-1.0*(t-360)*10.0'
use_displaced_mesh = true
displacements = 'disp_x disp_y disp_z'
type = Pressure
variable = disp_y
[]
[]
[Controls]
[c1]
type = TimePeriod
enable_objects = 'BCs::rot_x BCs::rot_y'
disable_objects = 'BCs::rot_x90 BCs::rot_y90 BCs::press'
start_time = '0'
end_time = '360'
[]
[c190plus]
type = TimePeriod
enable_objects = 'BCs::rot_x90 BCs::rot_y90 BCs::press'
disable_objects = 'BCs::rot_x BCs::rot_y '
start_time = '360'
end_time = '660'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-08
nl_max_its = 50
l_tol = 1e-4
l_max_its = 50
start_time = 0.0
dt = 5
dtmin = 5
num_steps = 132
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven_split.i)
[GlobalParams]
gravity = '0 0 0'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 40
ny = 40
elem_type = QUAD4
[]
[./corner_node]
type = ExtraNodesetGenerator
boundary = 99
nodes = '0'
input = gen
[../]
[]
[Variables]
# x-velocity
[./u]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0.0
[../]
[../]
# y-velocity
[./v]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0.0
[../]
[../]
# x-acceleration
[./a1]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0.0
[../]
[../]
# y-acceleration
[./a2]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0.0
[../]
[../]
# Pressure
[./p]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 0
[../]
[../]
[]
[Kernels]
# split-momentum, x
[./x_split_momentum]
type = INSSplitMomentum
variable = a1
u = u
v = v
a1 = a1
a2 = a2
component = 0
[../]
# split-momentum, y
[./y_split_momentum]
type = INSSplitMomentum
variable = a2
u = u
v = v
a1 = a1
a2 = a2
component = 1
[../]
# projection-x, space
[./x_proj_space]
type = INSProjection
variable = u
a1 = a1
a2 = a2
pressure = p
component = 0
[../]
# projection-y, space
[./y_proj_space]
type = INSProjection
variable = v
a1 = a1
a2 = a2
pressure = p
component = 1
[../]
# projection-x, time
[./x_proj_time]
type = TimeDerivative
variable = u
[../]
# projection-y, time
[./y_proj_time]
type = TimeDerivative
variable = v
[../]
# Pressure
[./pressure_poisson]
type = INSPressurePoisson
variable = p
a1 = a1
a2 = a2
[../]
[]
[BCs]
[./x_no_slip]
type = DirichletBC
variable = u
boundary = 'bottom right left'
value = 0.0
[../]
[./lid]
type = DirichletBC
variable = u
boundary = 'top'
value = 100.0
[../]
[./y_no_slip]
type = DirichletBC
variable = v
boundary = 'bottom right top left'
value = 0.0
[../]
# Acceleration boundary conditions. What should these
# be on the lid? What should they be in general? I tried pinning
# values of acceleration at one node but that didn't seem to work.
# I also tried setting non-zero acceleration values on the lid but
# that didn't converge.
[./x_no_accel]
type = DirichletBC
variable = a1
boundary = 'bottom right top left'
value = 0.0
[../]
[./y_no_accel]
type = DirichletBC
variable = a2
boundary = 'bottom right top left'
value = 0.0
[../]
# With solid walls everywhere, we specify dp/dn=0, i.e the
# "natural BC" for pressure. Technically the problem still
# solves without pinning the pressure somewhere, but the pressure
# bounces around a lot during the solve, possibly because of
# the addition of arbitrary constants.
[./pressure_pin]
type = DirichletBC
variable = p
boundary = '99'
value = 0
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 0
# rho = 1000 # kg/m^3
# mu = 0.798e-3 # Pa-s at 30C
# cp = 4.179e3 # J/kg-K at 30C
# k = 0.58 # W/m-K at ?C
# Dummy parameters
prop_names = 'rho mu cp k'
prop_values = '1 1 1 1'
[../]
[]
[Preconditioning]
# [./FDP_Newton]
# type = FDP
# full = true
# petsc_options = '-snes'
# #petsc_options_iname = '-mat_fd_coloring_err'
# #petsc_options_value = '1.e-10'
# [../]
[./SMP_PJFNK]
type = SMP
full = true
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
[../]
[]
[Executioner]
type = Transient
dt = 1.e-4
dtmin = 1.e-6
petsc_options_iname = '-ksp_gmres_restart '
petsc_options_value = '300 '
line_search = 'none'
nl_rel_tol = 1e-5
nl_max_its = 6
l_tol = 1e-6
l_max_its = 100
start_time = 0.0
num_steps = 1000
[]
[Outputs]
file_base = lid_driven_split_out
exodus = true
[]
(modules/combined/examples/optimization/helmholtz_multimat_nostrip.i)
vol_frac = 0.35
power = 1.1
Emin = 1.0e-6
Ess = 0.475 # ss
Et = 1.0 # w
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
# final_generator = 'MoveRight'
[Bottom]
type = GeneratedMeshGenerator
dim = 2
nx = 320
ny = 30
xmin = 0
xmax = 150
ymin = 0
ymax = 15
[]
[RenameBottom]
type = RenameBoundaryGenerator
input = Bottom
old_boundary = 'top bottom right left'
new_boundary = 'top_bottom bottom_bottom right_bottom left_bottom'
[]
[Top]
type = GeneratedMeshGenerator
dim = 2
nx = 320
ny = 30
xmin = 0
xmax = 150
ymin = 0
ymax = 15
[]
[MoveTop]
type = TransformGenerator
input = Top
transform = TRANSLATE
vector_value = '0 15 0'
[]
[RenameTop]
type = RenameBoundaryGenerator
input = MoveTop
old_boundary = 'top bottom right left'
new_boundary = 'top_top bottom_top right_top left_top'
[]
[bottom_gen]
type = ParsedSubdomainMeshGenerator
input = RenameBottom
combinatorial_geometry = 'y <= 15'
block_id = 1
[]
[top_gen]
type = ParsedSubdomainMeshGenerator
input = RenameTop
combinatorial_geometry = 'y > 15'
block_id = 3
[]
[stitch]
type = StitchedMeshGenerator
inputs = 'bottom_gen top_gen'
stitch_boundaries_pairs = 'top_bottom bottom_top'
[]
[left_load]
type = ExtraNodesetGenerator
input = stitch
new_boundary = left_load
coord = '37.5 30 0'
[]
[right_load]
type = ExtraNodesetGenerator
input = left_load
new_boundary = right_load
coord = '112.5 30 0'
[]
[left_support]
type = ExtraNodesetGenerator
input = right_load
new_boundary = left_support
coord = '0 0 0'
[]
[right_support]
type = ExtraNodesetGenerator
input = left_support
new_boundary = right_support
coord = '150 0 0'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[Dc]
initial_condition = -1.0
[]
[]
[AuxVariables]
[Cc]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = ${vol_frac}
[]
[sensitivity]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[AuxKernel]
type = MaterialRealAux
variable = sensitivity
property = sensitivity
execute_on = LINEAR
[]
[]
[mat_den_nodal]
family = L2_LAGRANGE
order = FIRST
initial_condition = ${vol_frac}
[AuxKernel]
type = SelfAux
execute_on = TIMESTEP_END
variable = mat_den_nodal
v = mat_den
[]
[]
[Dc_elem]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[AuxKernel]
type = SelfAux
variable = Dc_elem
v = Dc
execute_on = 'TIMESTEP_END'
[]
[]
[]
[Kernels]
[diffusion]
type = FunctionDiffusion
variable = Dc
function = 4.0
[]
[potential]
type = Reaction
variable = Dc
[]
[source]
type = CoupledForce
variable = Dc
v = sensitivity
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_y]
type = DirichletBC
variable = disp_y
boundary = left_support
value = 0.0
[]
[no_x]
type = DirichletBC
variable = disp_x
boundary = left_support
value = 0.0
[]
[no_y_right]
type = DirichletBC
variable = disp_y
boundary = right_support
value = 0.0
[]
[boundary_penalty]
type = ADRobinBC
variable = Dc
boundary = 'bottom_bottom right_bottom left_bottom top_top right_top left_top'
coefficient = 10
[]
[]
[NodalKernels]
[left_down]
type = NodalGravity
variable = disp_y
boundary = left_load
gravity_value = -1e-3
mass = 1
[]
[right_down]
type = NodalGravity
variable = disp_y
boundary = right_load
gravity_value = -1e-3
mass = 1
[]
[]
[Materials]
[elasticity_tensor_one]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys_one
poissons_ratio = poissons_ratio
args = 'mat_den'
block = '1'
[]
[elasticity_tensor_three]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys_three
poissons_ratio = poissons_ratio
args = 'mat_den'
block = '3'
[]
# One: Tungsten
[E_phys_one]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${Et}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys_one
block = '1'
outputs = 'exodus'
[]
# Three: SS316
[E_phys_three]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${Ess}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys_three
block = '3'
outputs = 'exodus'
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc_one]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys_one
block = '1'
[]
[dc_three]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys_three
block = '3'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[update_one]
type = DensityUpdate
density_sensitivity = Dc_elem
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
block = '1'
[]
[update_three]
type = DensityUpdate
density_sensitivity = Dc_elem
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
block = '3'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-10
dt = 1.0
num_steps = 90
[]
[Outputs]
exodus = true
[out]
type = CSV
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[mesh_volume]
type = VolumePostprocessor
execute_on = 'initial timestep_end'
[]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[vol_frac]
type = ParsedPostprocessor
function = 'total_vol / mesh_volume'
pp_names = 'total_vol mesh_volume'
[]
[sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = sensitivity
block = '1 3'
[]
[objective_one]
type = ElementIntegralMaterialProperty
mat_prop = strain_energy_density
execute_on = 'INITIAL TIMESTEP_END'
block = '1'
[]
[objective_three]
type = ElementIntegralMaterialProperty
mat_prop = strain_energy_density
execute_on = 'INITIAL TIMESTEP_END'
block = '3'
[]
[]
(modules/combined/examples/optimization/helmholtz_multimat_strip.i)
vol_frac = 0.35
power = 1.1
Emin = 1.0e-6
Ess = 0.475 # ss
Et = 1.0 # w
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
# final_generator = 'MoveRight'
[Bottom]
type = GeneratedMeshGenerator
dim = 2
nx = 320
ny = 30
xmin = 0
xmax = 150
ymin = 0
ymax = 15
[]
[RenameBottom]
type = RenameBoundaryGenerator
input = Bottom
old_boundary = 'top bottom right left'
new_boundary = 'top_bottom bottom_bottom right_bottom left_bottom'
[]
[Middle]
type = GeneratedMeshGenerator
dim = 2
nx = 320
ny = 6
xmin = 0
xmax = 150
ymin = 0
ymax = 3
[]
[MoveMiddle]
type = TransformGenerator
input = Middle
transform = TRANSLATE
vector_value = '0 15 0'
[]
[RenameMiddle]
type = RenameBoundaryGenerator
input = MoveMiddle
old_boundary = 'top bottom right left'
new_boundary = 'top_middle bottom_middle right_middle left_middle'
[]
[Top]
type = GeneratedMeshGenerator
dim = 2
nx = 320
ny = 30
xmin = 0
xmax = 150
ymin = 0
ymax = 15
[]
[MoveTop]
type = TransformGenerator
input = Top
transform = TRANSLATE
vector_value = '0 18 0'
[]
[RenameTop]
type = RenameBoundaryGenerator
input = MoveTop
old_boundary = 'top bottom right left'
new_boundary = 'top_top bottom_top right_top left_top'
[]
[bottom_gen]
type = ParsedSubdomainMeshGenerator
input = RenameBottom
combinatorial_geometry = 'y <= 15'
block_id = 1
[]
[middle_gen]
type = ParsedSubdomainMeshGenerator
input = RenameMiddle
combinatorial_geometry = 'y <= 18 & y > 15'
block_id = 2
[]
[top_gen]
type = ParsedSubdomainMeshGenerator
input = RenameTop
combinatorial_geometry = 'y > 18'
block_id = 3
[]
[stitch]
type = StitchedMeshGenerator
inputs = 'bottom_gen middle_gen top_gen'
stitch_boundaries_pairs = 'top_bottom bottom_middle; top_middle bottom_top'
[]
[left_load]
type = ExtraNodesetGenerator
input = stitch
new_boundary = left_load
coord = '37.5 33 0'
[]
[right_load]
type = ExtraNodesetGenerator
input = left_load
new_boundary = right_load
coord = '112.5 33 0'
[]
[left_support]
type = ExtraNodesetGenerator
input = right_load
new_boundary = left_support
coord = '0 0 0'
[]
[right_support]
type = ExtraNodesetGenerator
input = left_support
new_boundary = right_support
coord = '150 0 0'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[Dc]
initial_condition = -1.0
[]
[]
[AuxVariables]
[Cc]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = ${vol_frac}
[]
[sensitivity]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[AuxKernel]
type = MaterialRealAux
variable = sensitivity
property = sensitivity
execute_on = LINEAR
[]
block = '1 2 3'
[]
[mat_den_nodal]
family = L2_LAGRANGE
order = FIRST
initial_condition = ${vol_frac}
[AuxKernel]
type = SelfAux
execute_on = TIMESTEP_END
variable = mat_den_nodal
v = mat_den
[]
[]
[Dc_elem]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[AuxKernel]
type = SelfAux
variable = Dc_elem
v = Dc
execute_on = 'TIMESTEP_END'
[]
[]
[]
[Kernels]
[diffusion]
type = FunctionDiffusion
variable = Dc
function = 4.0
[]
[potential]
type = Reaction
variable = Dc
[]
[source]
type = CoupledForce
variable = Dc
v = sensitivity
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_y]
type = DirichletBC
variable = disp_y
boundary = left_support
value = 0.0
[]
[no_x]
type = DirichletBC
variable = disp_x
boundary = left_support
value = 0.0
[]
[no_y_right]
type = DirichletBC
variable = disp_y
boundary = right_support
value = 0.0
[]
[boundary_penalty]
type = ADRobinBC
variable = Dc
boundary = 'bottom_bottom right_bottom left_bottom top_top right_top left_top left_middle '
'right_middle'
coefficient = 10
[]
[]
[NodalKernels]
[left_down]
type = NodalGravity
variable = disp_y
boundary = left_load
gravity_value = -1e-3
mass = 1
[]
[right_down]
type = NodalGravity
variable = disp_y
boundary = right_load
gravity_value = -1e-3
mass = 1
[]
[]
[Materials]
[sensitivity]
type = ParsedMaterial
property_name = 'sensitivity'
block = '2'
expression = '0'
[]
[elasticity_tensor_one]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys_one
poissons_ratio = poissons_ratio
args = 'mat_den'
block = '1'
[]
[elasticity_tensor_three]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys_three
poissons_ratio = poissons_ratio
args = 'mat_den'
block = '3'
[]
[elasticity_tensor_two]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1.0
poissons_ratio = 0.3
block = '2'
[]
# One: Tungsten
[E_phys_one]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${Et}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys_one
block = '1'
outputs = 'exodus'
[]
# Three: SS316
[E_phys_three]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${Ess}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys_three
block = '3'
outputs = 'exodus'
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc_one]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys_one
block = '1'
[]
[dc_three]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys_three
block = '3'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[update_one]
type = DensityUpdate
density_sensitivity = Dc_elem
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
block = '1'
[]
[update_three]
type = DensityUpdate
density_sensitivity = Dc_elem
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
block = '3'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-10
dt = 1.0
num_steps = 90
[]
[Outputs]
exodus = true
[out]
type = CSV
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[mesh_volume]
type = VolumePostprocessor
execute_on = 'initial timestep_end'
[]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[vol_frac]
type = ParsedPostprocessor
function = 'total_vol / mesh_volume'
pp_names = 'total_vol mesh_volume'
[]
[sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = sensitivity
block = '1 3'
[]
[objective_one]
type = ElementIntegralMaterialProperty
mat_prop = strain_energy_density
execute_on = 'INITIAL TIMESTEP_END'
block = '1'
[]
[objective_three]
type = ElementIntegralMaterialProperty
mat_prop = strain_energy_density
execute_on = 'INITIAL TIMESTEP_END'
block = '3'
[]
[]
(modules/combined/test/tests/optimization/compliance_sensitivity/paper_three_materials_test.i)
vol_frac = 0.4
cost_frac = 0.2 #0.283 # Change back to 0.4
power = 4
E0 = 1.0e-6
E1 = 0.2
E2 = 0.6
E3 = 1.0
rho0 = 1.0e-6
rho1 = 0.4
rho2 = 0.7
rho3 = 1.0
C0 = 1.0e-6
C1 = 0.5
C2 = 0.8
C3 = 1.0
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 50
ny = 50
xmin = 0
xmax = 50
ymin = 0
ymax = 50
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = hold
nodes = 0
[]
[push_left]
type = ExtraNodesetGenerator
input = node
new_boundary = push_left
coord = '25 0 0'
[]
[push_center]
type = ExtraNodesetGenerator
input = push_left
new_boundary = push_center
coord = '50 0 0'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[Dc]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[Cc]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[Cost]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = ${vol_frac}
[]
[]
[AuxKernels]
[Cost]
type = MaterialRealAux
variable = Cost
property = Cost_mat
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_y]
type = DirichletBC
variable = disp_y
boundary = hold
value = 0.0
[]
[no_x_symm]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[]
[NodalKernels]
[push_left]
type = NodalGravity
variable = disp_y
boundary = push_left
gravity_value = -1e-3
mass = 1
[]
[push_center]
type = NodalGravity
variable = disp_y
boundary = push_center
gravity_value = -1e-3
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# ordered multimaterial simp
expression = "A1:=(${E0}-${E1})/(${rho0}^${power}-${rho1}^${power}); "
"B1:=${E0}-A1*${rho0}^${power}; E1:=A1*mat_den^${power}+B1; "
"A2:=(${E1}-${E2})/(${rho1}^${power}-${rho2}^${power}); "
"B2:=${E1}-A2*${rho1}^${power}; E2:=A2*mat_den^${power}+B2; "
"A3:=(${E2}-${E3})/(${rho2}^${power}-${rho3}^${power}); "
"B3:=${E2}-A3*${rho2}^${power}; E3:=A3*mat_den^${power}+B3; "
"if(mat_den<${rho1},E1,if(mat_den<${rho2},E2,E3))"
coupled_variables = 'mat_den'
property_name = E_phys
[]
[Cost_mat]
type = DerivativeParsedMaterial
# ordered multimaterial simp
expression = "A1:=(${C0}-${C1})/(${rho0}^(1/${power})-${rho1}^(1/${power})); "
"B1:=${C0}-A1*${rho0}^(1/${power}); C1:=A1*mat_den^(1/${power})+B1; "
"A2:=(${C1}-${C2})/(${rho1}^(1/${power})-${rho2}^(1/${power})); "
"B2:=${C1}-A2*${rho1}^(1/${power}); C2:=A2*mat_den^(1/${power})+B2; "
"A3:=(${C2}-${C3})/(${rho2}^(1/${power})-${rho3}^(1/${power})); "
"B3:=${C2}-A3*${rho2}^(1/${power}); C3:=A3*mat_den^(1/${power})+B3; "
"if(mat_den<${rho1},C1,if(mat_den<${rho2},C2,C3))"
coupled_variables = 'mat_den'
property_name = Cost_mat
[]
[CostDensity]
type = ParsedMaterial
property_name = CostDensity
coupled_variables = 'mat_den Cost'
expression = 'mat_den*Cost'
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
[]
[cc]
type = CostSensitivity
design_density = mat_den
cost = Cost_mat
outputs = 'exodus'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[rad_avg]
type = RadialAverage
radius = 2
weights = linear
prop_name = sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
[rad_avg_cost]
type = RadialAverage
radius = 2
weights = linear
prop_name = cost_sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
[update]
type = DensityUpdateTwoConstraints
# This is
density_sensitivity = Dc
cost_density_sensitivity = Cc
cost = Cost
cost_fraction = ${cost_frac}
design_density = mat_den
volume_fraction = ${vol_frac}
bisection_lower_bound = 0
bisection_upper_bound = 1.0e16 # 100
relative_tolerance = 1.0e-3
bisection_move = 0.02
execute_on = TIMESTEP_BEGIN
[]
# Provides Dc
[calc_sense]
type = SensitivityFilter
density_sensitivity = Dc
design_density = mat_den
filter_UO = rad_avg
execute_on = TIMESTEP_END
force_postaux = true
[]
# Provides Cc
[calc_sense_cost]
type = SensitivityFilter
density_sensitivity = Cc
design_density = mat_den
filter_UO = rad_avg_cost
execute_on = TIMESTEP_END
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-10
dt = 1.0
num_steps = 25
[]
[Outputs]
exodus = true
[out]
type = CSV
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[mesh_volume]
type = VolumePostprocessor
execute_on = 'initial timestep_end'
[]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[vol_frac]
type = ParsedPostprocessor
function = 'total_vol / mesh_volume'
pp_names = 'total_vol mesh_volume'
[]
[sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = sensitivity
[]
[cost_sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = cost_sensitivity
[]
[cost]
type = ElementIntegralMaterialProperty
mat_prop = CostDensity
[]
[cost_frac]
type = ParsedPostprocessor
function = 'cost / mesh_volume'
pp_names = 'cost mesh_volume'
[]
[objective]
type = ElementIntegralMaterialProperty
mat_prop = strain_energy_density
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
(test/tests/mortar/periodic_segmental_constraint/penalty_periodic_simple3d.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 3
xmin = -3.0
xmax = 3.0
ymin = -3.0
ymax = 3.0
zmin = -3.0
zmax = 3.0
nx = 3
ny = 3
nz = 3
elem_type = HEX8
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3 4 5'
new_boundary = '10 11 12 13 14 15'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[left]
type = LowerDBlockFromSidesetGenerator
input = left_block_id
sidesets = '14'
new_block_id = '10004'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '15'
new_block_id = '10005'
new_block_name = 'primary_top'
[]
[back]
type = LowerDBlockFromSidesetGenerator
input = top
sidesets = '11'
new_block_id = '10001'
new_block_name = 'secondary_back'
[]
[front]
type = LowerDBlockFromSidesetGenerator
input = back
sidesets = '13'
new_block_id = '10003'
new_block_name = 'primary_front'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = front
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[epsilon]
order = THIRD
family = SCALAR
[]
[]
[AuxVariables]
[sigma]
order = THIRD
family = SCALAR
[]
[]
[AuxScalarKernels]
[sigma]
type = FunctionScalarAux
variable = sigma
function = '1 2 3'
execute_on = initial #timestep_end
[]
[]
[Kernels]
[diff1]
type = Diffusion
variable = u
block = 1
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = PenaltyEqualValueConstraint
primary_boundary = '12'
secondary_boundary = '14'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodiclr]
type = PenaltyPeriodicSegmentalConstraint
primary_boundary = '12'
secondary_boundary = '14'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[mortarbt]
type = PenaltyEqualValueConstraint
primary_boundary = '15'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodicbt]
type = PenaltyPeriodicSegmentalConstraint
primary_boundary = '15'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[mortarbf]
type = PenaltyEqualValueConstraint
primary_boundary = '13'
secondary_boundary = '11'
primary_subdomain = 'primary_front'
secondary_subdomain = 'secondary_back'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodicbf]
type = PenaltyPeriodicSegmentalConstraint
primary_boundary = '13'
secondary_boundary = '11'
primary_subdomain = 'primary_front'
secondary_subdomain = 'secondary_back'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[]
[Preconditioning]
[smp]
full = true
type = SMP
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
solve_type = NEWTON
[]
[Outputs]
csv = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
elem_type = QUAD9
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[AuxVariables]
[vel_x]
order = SECOND
[]
[vel_y]
order = SECOND
[]
[]
[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]
order = SECOND
family = LAGRANGE_VEC
[../]
[./T]
order = SECOND
[./InitialCondition]
type = ConstantIC
value = 1.0
[../]
[../]
[./p]
[../]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[./momentum_time]
type = INSADMomentumTimeDerivative
variable = velocity
[../]
[./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
[../]
[./temperature_time]
type = INSADHeatConductionTimeDerivative
variable = T
[../]
[./temperature_advection]
type = INSADEnergyAdvection
variable = T
[../]
[./temperature_conduction]
type = ADHeatConduction
variable = T
thermal_conductivity = 'k'
[../]
[]
[BCs]
[./no_slip]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom right left'
[../]
[./lid]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'top'
function_x = 'lid_function'
[../]
[./T_hot]
type = DirichletBC
variable = T
boundary = 'bottom'
value = 1
[../]
[./T_cold]
type = DirichletBC
variable = T
boundary = 'top'
value = 0
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat]
type = INSAD3Eqn
velocity = velocity
pressure = p
temperature = T
[]
[]
[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 = Transient
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
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_out
exodus = true
perf_graph = true
[]
(modules/combined/tutorials/introduction/thermal_mechanical/thermomech_step01.i)
#
# Single block coupled thermal/mechanical
# https://mooseframework.inl.gov/modules/combined/tutorials/introduction/thermoech_step01.html
#
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[generated]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmax = 2
ymax = 1
[]
[pin]
type = ExtraNodesetGenerator
input = generated
new_boundary = pin
coord = '0 0 0'
[]
[]
[Variables]
[T]
initial_condition = 300.0
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = T
[]
[time_derivative]
type = HeatConductionTimeDerivative
variable = T
[]
[heat_source]
type = HeatSource
variable = T
value = 5e4
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = FINITE
automatic_eigenstrain_names = true
generate_output = 'vonmises_stress'
[]
[]
[Materials]
[thermal]
type = HeatConductionMaterial
thermal_conductivity = 45.0
specific_heat = 0.5
[]
[density]
type = GenericConstantMaterial
prop_names = 'density'
prop_values = 8000.0
[]
[elasticity]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e9
poissons_ratio = 0.3
[]
[expansion1]
type = ComputeThermalExpansionEigenstrain
temperature = T
thermal_expansion_coeff = 0.001
stress_free_temperature = 300
eigenstrain_name = thermal_expansion
[]
[stress]
type = ComputeFiniteStrainElasticStress
[]
[]
[BCs]
[t_left]
type = DirichletBC
variable = T
value = 300
boundary = 'left'
[]
[t_right]
type = FunctionDirichletBC
variable = T
function = '300+5*t'
boundary = 'right'
[]
[pin_x]
type = DirichletBC
variable = disp_x
boundary = pin
value = 0
[]
[bottom_y]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
end_time = 5
dt = 1
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/auxkernels/ranktwoscalaraux.i)
[Mesh]
displacements = 'disp_x disp_y disp_z'
[generated_mesh]
type = GeneratedMeshGenerator
elem_type = HEX8
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
zmin = 0.0
zmax = 1.0
[]
[node]
type = ExtraNodesetGenerator
coord = '0.0 0.0 0.0'
new_boundary = 6
input = generated_mesh
[]
[snode]
type = ExtraNodesetGenerator
coord = '1.0 0.0 0.0'
new_boundary = 7
input = node
[]
[]
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[./disp_z]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
[]
[Materials]
[./fplastic]
type = FiniteStrainPlasticMaterial
block = 0
yield_stress='0. 445. 0.05 610. 0.1 680. 0.38 810. 0.95 920. 2. 950.'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
C_ijkl = '2.827e5 1.21e5 1.21e5 2.827e5 1.21e5 2.827e5 0.808e5 0.808e5 0.808e5'
fill_method = symmetric9
[../]
[./strain]
type = ComputeFiniteStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[../]
[]
[Functions]
[./topfunc]
type = ParsedFunction
expression = 't'
[../]
[]
[BCs]
[./bottom3]
type = DirichletBC
variable = disp_z
boundary = 0
value = 0.0
[../]
[./top]
type = FunctionDirichletBC
variable = disp_z
boundary = 5
function = topfunc
[../]
[./corner1]
type = DirichletBC
variable = disp_x
boundary = 6
value = 0.0
[../]
[./corner2]
type = DirichletBC
variable = disp_y
boundary = 6
value = 0.0
[../]
[./corner3]
type = DirichletBC
variable = disp_z
boundary = 6
value = 0.0
[../]
[./side1]
type = DirichletBC
variable = disp_y
boundary = 7
value = 0.0
[../]
[./side2]
type = DirichletBC
variable = disp_z
boundary = 7
value = 0.0
[../]
[]
[AuxVariables]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./vonmises]
order = CONSTANT
family = MONOMIAL
[../]
[./hydrostatic]
order = CONSTANT
family = MONOMIAL
[../]
[./L2norm]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./vonmises]
type = RankTwoScalarAux
rank_two_tensor = stress
variable = vonmises
scalar_type = VonMisesStress
[../]
[./hydrostatic]
type = RankTwoScalarAux
rank_two_tensor = stress
variable = hydrostatic
scalar_type = Hydrostatic
[../]
[./L2norm]
type = RankTwoScalarAux
rank_two_tensor = stress
variable = L2norm
scalar_type = L2norm
[../]
[]
[Postprocessors]
[./stress_zz]
type = ElementAverageValue
variable = stress_zz
[../]
[./vonmises]
type = ElementAverageValue
variable = vonmises
[../]
[./hydrostatic]
type = ElementAverageValue
variable = hydrostatic
[../]
[./L2norm]
type = ElementAverageValue
variable = L2norm
[../]
[]
[Executioner]
type = Transient
dt=0.1
dtmin=0.1
dtmax=1
end_time=1.0
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/optimization/compliance_sensitivity/2d_mmb_2material.i)
vol_frac = 0.5
power = 1
E0 = 1e-5
E1 = 0.6
E2 = 1.0
rho0 = 0.0
rho1 = 0.4
rho2 = 1.0
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 150
ny = 50
xmin = 0
xmax = 30
ymin = 0
ymax = 10
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = hold
nodes = 0
[]
[push]
type = ExtraNodesetGenerator
input = node
new_boundary = push
coord = '30 10 0'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[Dc]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
# initial_condition = ${vol_frac}
[]
[]
[ICs]
[mat_den]
type = RandomIC
seed = 5
variable = mat_den
max = '${fparse vol_frac+0.15}'
min = '${fparse vol_frac-0.15}'
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_y
boundary = hold
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[]
[NodalKernels]
[push]
type = NodalGravity
variable = disp_y
boundary = push
gravity_value = -1
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# ordered multimaterial simp
expression = "A1:=(${E0}-${E1})/(${rho0}^${power}-${rho1}^${power}); "
"B1:=${E0}-A1*${rho0}^${power}; E1:=A1*mat_den^${power}+B1; "
"A2:=(${E1}-${E2})/(${rho1}^${power}-${rho2}^${power}); "
"B2:=${E1}-A2*${rho1}^${power}; E2:=A2*mat_den^${power}+B2; "
"if(mat_den<${rho1},E1,E2)"
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity2
design_density = mat_den
youngs_modulus = E_phys
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[rad_avg]
type = RadialAverage
radius = 1.2
weights = linear
prop_name = sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
[update]
type = DensityUpdate
density_sensitivity = Dc
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
[]
[calc_sense]
type = SensitivityFilter
density_sensitivity = Dc
design_density = mat_den
filter_UO = rad_avg
execute_on = TIMESTEP_END
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-8
dt = 1.0
num_steps = 70
[]
[Outputs]
exodus = true
[out]
type = CSV
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = sensitivity
[]
[]
(modules/combined/test/tests/optimization/compliance_sensitivity/2d_mbb.i)
vol_frac = 0.5
E0 = 1
Emin = 1e-8
power = 2
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 150
ny = 50
xmin = 0
xmax = 30
ymin = 0
ymax = 10
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = hold
nodes = 0
[]
[push]
type = ExtraNodesetGenerator
input = node
new_boundary = push
coord = '30 10 0'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[Dc]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = ${vol_frac}
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_y
boundary = hold
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[]
[NodalKernels]
[push]
type = NodalGravity
variable = disp_y
boundary = push
gravity_value = -1
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${E0}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
incremental = false
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[rad_avg]
type = RadialAverage
radius = 1.2
weights = linear
prop_name = sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
[update]
type = DensityUpdate
density_sensitivity = Dc
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
[]
[calc_sense]
type = SensitivityFilter
density_sensitivity = Dc
design_density = mat_den
filter_UO = rad_avg
execute_on = TIMESTEP_END
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-8
dt = 1.0
num_steps = 70
[]
[Outputs]
[out]
type = CSV
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = sensitivity
[]
[]
(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/solid_mechanics/test/tests/ad_anisotropic_creep/3d_bar_orthotropic_90deg_rotation_ad_creep_z_no_rotation.i)
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
xmin = 0
xmax = 2
ymin = 0
ymax = 10
zmin = 0
zmax = 2
nx = 1
ny = 1
nz = 1
elem_type = HEX8
[]
[corner]
type = ExtraNodesetGenerator
new_boundary = 101
coord = '0 0 0'
input = generated_mesh
[]
[side]
type = ExtraNodesetGenerator
new_boundary = 102
coord = '2 0 0'
input = corner
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
volumetric_locking_correction = true
use_automatic_differentiation = true
generate_output = 'elastic_strain_yy stress_yy creep_strain_yy'
[]
[]
[Materials]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "trial_creep"
max_iterations = 50
absolute_tolerance = 1e-18
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
hill_constants = "0.5 1.0 0.5 1.5 1.5 1.5"
use_large_rotation = true
[]
[trial_creep]
type = ADHillCreepStressUpdate
coefficient = 5e-14
n_exponent = 10
m_exponent = 0
activation_energy = 0
max_inelastic_increment = 0.00003
absolute_tolerance = 1e-18
relative_tolerance = 1e-18
# Force it to not use integration error
max_integration_error = 100.0
use_transformation = true
[]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 500
poissons_ratio = 0.0
[]
[]
[BCs]
[fix_z]
type = ADDirichletBC
variable = disp_z
boundary = bottom
value = 0
[]
[rot_y]
type = DisplacementAboutAxis
boundary = bottom
function = 0
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 1
variable = disp_y
[]
#
[rot_x]
type = DisplacementAboutAxis
boundary = bottom
function = 0
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 0
variable = disp_x
[]
[rot_y90]
type = DisplacementAboutAxis
boundary = bottom
function = 0
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 1
variable = disp_y
[]
#
[rot_x90]
type = DisplacementAboutAxis
boundary = bottom
function = 0
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 0
variable = disp_x
[]
[press]
boundary = top
function = '-1.0*(t-90)*0.1'
use_displaced_mesh = true
displacements = 'disp_x disp_y disp_z'
type = Pressure
variable = disp_y
[]
[]
[Controls]
[c1]
type = TimePeriod
enable_objects = 'BCs::rot_x BCs::rot_y'
disable_objects = 'BCs::rot_x90 BCs::rot_y90 BCs::press'
start_time = '0'
end_time = '90'
[]
[c190plus]
type = TimePeriod
enable_objects = 'BCs::rot_x90 BCs::rot_y90 BCs::press'
disable_objects = 'BCs::rot_x BCs::rot_y '
start_time = '90'
end_time = '390'
[]
[]
[Postprocessors]
[creep_strain_xx]
type = ADElementAverageMaterialProperty
mat_prop = creep_strain_yy
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
nl_max_its = 50
automatic_scaling = true
l_tol = 1e-4
l_max_its = 50
start_time = 0.0
dt = 0.1
dtmin = 0.1
num_steps = 1200
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = false
csv = true
[]
(test/tests/mortar/periodic_segmental_constraint/penalty_periodic_simple2d.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -1.0
xmax = 1.0
ymin = -1.0
ymax = 1.0
nx = 2
ny = 2
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_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[left]
type = LowerDBlockFromSidesetGenerator
input = left_block_id
sidesets = '13'
new_block_id = '10003'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '11'
new_block_id = '10001'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_top'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = top
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[epsilon]
order = SECOND
family = SCALAR
[]
[]
[AuxVariables]
[sigma]
order = SECOND
family = SCALAR
[]
[]
[AuxScalarKernels]
[sigma]
type = FunctionScalarAux
variable = sigma
function = '1 2'
execute_on = initial #timestep_end
[]
[]
[Kernels]
[diff1]
type = Diffusion
variable = u
block = 1
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = PenaltyEqualValueConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodiclr]
type = PenaltyPeriodicSegmentalConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[mortarbt]
type = PenaltyEqualValueConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodicbt]
type = PenaltyPeriodicSegmentalConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
csv = true
[]
(modules/combined/test/tests/optimization/compliance_sensitivity/2d_mmb_2material_cost_initial.i)
vol_frac = 0.4
cost_frac = 0.22 # Change back to 0.4
power = 2.0
E0 = 1.0e-6
E1 = 0.3
E2 = 1.0
rho0 = 1.0e-6
rho1 = 0.3
rho2 = 1.0
C0 = 1.0e-6
C1 = 0.5
C2 = 1.0
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 150
ny = 50
xmin = 0
xmax = 30
ymin = 0
ymax = 10
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = hold
nodes = 0
[]
[push]
type = ExtraNodesetGenerator
input = node
new_boundary = push
coord = '30 10 0'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[Dc]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[Cc]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[Cost]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = ${vol_frac}
[]
[]
[AuxKernels]
[Cost]
type = MaterialRealAux
variable = Cost
property = Cost_mat
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_y
boundary = hold
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[]
[NodalKernels]
[push]
type = NodalGravity
variable = disp_y
boundary = push
gravity_value = -1
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# ordered multimaterial simp
expression = "A1:=(${E0}-${E1})/(${rho0}^${power}-${rho1}^${power}); "
"B1:=${E0}-A1*${rho0}^${power}; E1:=A1*mat_den^${power}+B1; "
"A2:=(${E1}-${E2})/(${rho1}^${power}-${rho2}^${power}); "
"B2:=${E1}-A2*${rho1}^${power}; E2:=A2*mat_den^${power}+B2; "
"if(mat_den<${rho1},E1,E2)"
coupled_variables = 'mat_den'
property_name = E_phys
[]
[Cost_mat]
type = DerivativeParsedMaterial
# ordered multimaterial simp
expression = "A1:=(${C0}-${C1})/(${rho0}^(1/${power})-${rho1}^(1/${power})); "
"B1:=${C0}-A1*${rho0}^(1/${power}); C1:=A1*mat_den^(1/${power})+B1; "
"A2:=(${C1}-${C2})/(${rho1}^(1/${power})-${rho2}^(1/${power})); "
"B2:=${C1}-A2*${rho1}^(1/${power}); C2:=A2*mat_den^(1/${power})+B2; "
"if(mat_den<${rho1},C1,C2)"
coupled_variables = 'mat_den'
property_name = Cost_mat
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
[]
[cc]
type = CostSensitivity
design_density = mat_den
cost = Cost_mat
outputs = 'exodus'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[rad_avg]
type = RadialAverage
radius = 1.2
weights = linear
prop_name = sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
[rad_avg_cost]
type = RadialAverage
radius = 1.2
weights = linear
prop_name = cost_sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
[update]
type = DensityUpdateTwoConstraints
# This is
density_sensitivity = Dc
cost_density_sensitivity = Cc
cost = Cost
cost_fraction = ${cost_frac}
design_density = mat_den
volume_fraction = ${vol_frac}
bisection_lower_bound = 0
bisection_upper_bound = 1.0e16 # 100
relative_tolerance = 1.0e-3
execute_on = TIMESTEP_BEGIN
[]
# Provides Dc
[calc_sense]
type = SensitivityFilter
density_sensitivity = Dc
design_density = mat_den
filter_UO = rad_avg
execute_on = TIMESTEP_END
force_postaux = true
[]
# Provides Cc
[calc_sense_cost]
type = SensitivityFilter
density_sensitivity = Cc
design_density = mat_den
filter_UO = rad_avg_cost
execute_on = TIMESTEP_END
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-8
dt = 1.0
num_steps = 10 #50000
[]
[Outputs]
exodus = true
[out]
type = CSV
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = sensitivity
[]
[cost_sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = cost_sensitivity
[]
[cost]
type = ElementIntegralVariablePostprocessor
variable = Cost
[]
[]
(modules/combined/test/tests/optimization/optimization_density_update/top_opt_2d_pde_filter.i)
vol_frac = 0.4
E0 = 1e5
Emin = 1e-4
power = 2
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 20
xmin = 0
xmax = 20
ymin = 0
ymax = 10
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = pull
nodes = 0
[]
[]
[Variables]
[Dc]
initial_condition = -1.0
[]
[]
[AuxVariables]
[sensitivity]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[AuxKernel]
type = MaterialRealAux
variable = sensitivity
property = sensitivity
execute_on = LINEAR
[]
[]
[compliance]
family = MONOMIAL
order = CONSTANT
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = ${vol_frac}
[]
[Dc_elem]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[AuxKernel]
type = SelfAux
variable = Dc_elem
v = Dc
execute_on = 'TIMESTEP_END'
[]
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[Kernels]
[diffusion]
type = FunctionDiffusion
variable = Dc
function = 0.05
[]
[potential]
type = Reaction
variable = Dc
[]
[source]
type = CoupledForce
variable = Dc
v = sensitivity
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_y
boundary = right
value = 0.0
[]
[boundary_penalty]
type = ADRobinBC
variable = Dc
boundary = 'left top'
coefficient = 10
[]
[]
[NodalKernels]
[pull]
type = NodalGravity
variable = disp_y
boundary = pull
gravity_value = -1
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${E0}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
incremental = false
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[update]
type = DensityUpdate
density_sensitivity = Dc_elem
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type '
petsc_options_value = 'lu'
nl_abs_tol = 1e-10
line_search = none
dt = 1.0
num_steps = 30
[]
[Outputs]
[out]
type = Exodus
time_step_interval = 10
[]
[]
(modules/solid_mechanics/test/tests/ad_finite_strain_jacobian/bending_jacobian.i)
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 2
nx = 10
ny = 2
elem_type = QUAD4
[]
[corner]
type = ExtraNodesetGenerator
new_boundary = 101
coord = '0 0'
input = generated_mesh
[]
[side]
type = ExtraNodesetGenerator
new_boundary = 102
coord = '10 0'
input = corner
[]
[mid]
type = ExtraNodesetGenerator
new_boundary = 103
coord = '5 2'
input = side
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
use_finite_deform_jacobian = true
volumetric_locking_correction = false
use_automatic_differentiation = true
[]
[]
[Materials]
[stress]
type = ADComputeFiniteStrainElasticStress
[]
[elasticity_tensor]
type = ADComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '1.684e5 0.176e5 0.176e5 1.684e5 0.176e5 1.684e5 0.754e5 0.754e5 0.754e5'
[]
[]
[BCs]
[fix_corner_x]
type = ADDirichletBC
variable = disp_x
boundary = 101
value = 0
[]
[fix_corner_y]
type = ADDirichletBC
variable = disp_y
boundary = 101
value = 0
[]
[fix_y]
type = ADDirichletBC
variable = disp_y
boundary = 102
value = 0
[]
[move_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = 103
function = '-t'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-10
nl_max_its = 10
l_tol = 1e-4
l_max_its = 50
dt = 0.1
dtmin = 0.1
num_steps = 2
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven_chorin.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 40
ny = 40
elem_type = QUAD4
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 99
nodes = '0'
input = gen
[]
[]
[Variables]
# x-velocity
[u]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = ConstantIC
value = 0.0
[]
[]
# y-velocity
[v]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = ConstantIC
value = 0.0
[]
[]
# x-star velocity
[u_star]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = ConstantIC
value = 0.0
[]
[]
# y-star velocity
[v_star]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = ConstantIC
value = 0.0
[]
[]
# Pressure
[p]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = ConstantIC
value = 0
[]
[]
[]
[Kernels]
[x_chorin_predictor]
type = INSChorinPredictor
variable = u_star
u = u
v = v
u_star = u_star
v_star = v_star
component = 0
predictor_type = 'new'
[]
[y_chorin_predictor]
type = INSChorinPredictor
variable = v_star
u = u
v = v
u_star = u_star
v_star = v_star
component = 1
predictor_type = 'new'
[]
[x_chorin_corrector]
type = INSChorinCorrector
variable = u
u_star = u_star
v_star = v_star
pressure = p
component = 0
[]
[y_chorin_corrector]
type = INSChorinCorrector
variable = v
u_star = u_star
v_star = v_star
pressure = p
component = 1
[]
[chorin_pressure_poisson]
type = INSChorinPressurePoisson
variable = p
u_star = u_star
v_star = v_star
[]
[]
[BCs]
[u_no_slip]
type = DirichletBC
variable = u
preset = false
boundary = 'bottom right left'
value = 0.0
[]
[u_lid]
type = DirichletBC
variable = u
preset = false
boundary = 'top'
value = 100.0
[]
[v_no_slip]
type = DirichletBC
variable = v
preset = false
boundary = 'bottom right top left'
value = 0.0
[]
# Make u_star satsify all the same variables as the real velocity.
[u_star_no_slip]
type = DirichletBC
variable = u_star
preset = false
boundary = 'bottom right left'
value = 0.0
[]
[u_star_lid]
type = DirichletBC
variable = u_star
preset = false
boundary = 'top'
value = 100.0
[]
[v_star_no_slip]
type = DirichletBC
variable = v_star
preset = false
boundary = 'bottom right top left'
value = 0.0
[]
# With solid walls everywhere, we specify dp/dn=0, i.e the
# "natural BC" for pressure. Technically the problem still
# solves without pinning the pressure somewhere, but the pressure
# bounces around a lot during the solve, possibly because of
# the addition of arbitrary constants.
[pressure_pin]
type = DirichletBC
variable = p
preset = false
boundary = '99'
value = 0
[]
[]
[Materials]
[const]
type = GenericConstantMaterial
block = 0
# rho = 1000 # kg/m^3
# mu = 0.798e-3 # Pa-s at 30C
# cp = 4.179e3 # J/kg-K at 30C
# k = 0.58 # W/m-K at ?C
# Dummy parameters
prop_names = 'rho mu cp k'
prop_values = '1 1 1 1'
[]
[]
[Preconditioning]
#active = 'FDP_Newton'
#active = 'SMP_PJFNK'
active = 'SMP_Newton'
[FDP_Newton]
type = FDP
full = true
solve_type = 'NEWTON'
#petsc_options_iname = '-mat_fd_coloring_err'
#petsc_options_value = '1.e-10'
[]
# For some reason, nonlinear convergence with JFNK is poor, but it
# seems to be OK for SMP_Newton. This may indicate a a scaling issue
# in the JFNK case....
[SMP_PJFNK]
type = SMP
full = true
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
[]
[SMP_Newton]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Transient
# Note: the explicit case with lid velocity = 100 and a 40x40 was unstable
# for dt=1.e-4, even though the restriction should be dt < dx/|u| = 1/4000 = 2.5e-4
#
dt = 1.e-3
dtmin = 1.e-6
petsc_options_iname = '-ksp_gmres_restart '
petsc_options_value = '300 '
line_search = 'none'
nl_rel_tol = 1e-12
nl_max_its = 6
l_max_its = 300
start_time = 0.0
num_steps = 5
automatic_scaling = true
verbose = true
compute_scaling_once = false
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
file_base = lid_driven_chorin_out
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/boussinesq/boussinesq_square.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmax = .05
ymax = .05
nx = 20
ny = 20
elem_type = QUAD9
[]
[./bottom_left]
type = ExtraNodesetGenerator
new_boundary = corner
coord = '0 0'
input = gen
[../]
[]
[Preconditioning]
[./Newton_SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -ksp_gmres_restart'
petsc_options_value = 'bjacobi lu NONZERO 200'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[out]
type = Exodus
execute_on = 'final'
[]
[]
[Variables]
[velocity]
family = LAGRANGE_VEC
order = SECOND
[]
[p][]
[./temp]
order = SECOND
initial_condition = 340
scaling = 1e-4
[../]
[]
[BCs]
[./velocity_dirichlet]
type = VectorDirichletBC
boundary = 'left right bottom top'
variable = velocity
# The third entry is to satisfy RealVectorValue
values = '0 0 0'
[../]
# Even though we are integrating by parts, because there are no integrated
# boundary conditions on the velocity p doesn't appear in the system of
# equations. Thus we must pin the pressure somewhere in order to ensure a
# unique solution
[./p_zero]
type = DirichletBC
boundary = corner
variable = p
value = 0
[../]
[./cold]
type = DirichletBC
variable = temp
boundary = left
value = 300
[../]
[./hot]
type = DirichletBC
variable = temp
boundary = right
value = 400
[../]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[momentum_advection]
type = INSADMomentumAdvection
variable = velocity
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
[]
[temp_advection]
type = INSADEnergyAdvection
variable = temp
[]
[temp_conduction]
type = ADHeatConduction
variable = temp
thermal_conductivity = 'k'
[../]
[./buoyancy]
type = INSADBoussinesqBodyForce
variable = velocity
temperature = temp
gravity = '0 -9.81 0'
[../]
[./gravity]
type = INSADGravityForce
variable = velocity
gravity = '0 -9.81 0'
[../]
[]
[Materials]
[./ad_const]
type = ADGenericConstantMaterial
# alpha = coefficient of thermal expansion where rho = rho0 -alpha * rho0 * delta T
prop_names = 'mu rho alpha k cp'
prop_values = '30.74e-6 .5757 2.9e-3 46.38e-3 1054'
[../]
[./const]
type = GenericConstantMaterial
prop_names = 'temp_ref'
prop_values = '900'
[../]
[ins_mat]
type = INSAD3Eqn
velocity = velocity
pressure = p
temperature = temp
[]
[]
(modules/porous_flow/test/tests/dirackernels/injection_production.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 1
xmin = -50
xmax = 50
ymin = -50
ymax = 50
zmin = 0
zmax = 10
[]
[central_nodes]
input = gen
type = ExtraNodesetGenerator
new_boundary = central_nodes
coord = '0 0 0; 0 0 10'
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[porepressure]
initial_condition = 20E6
[]
[temperature]
initial_condition = 400
scaling = 1E-6 # fluid enthalpy is roughly 1E6
[]
[]
[BCs]
[injection_temperature]
type = DirichletBC
variable = temperature
value = 300
boundary = central_nodes
[]
[]
[DiracKernels]
[fluid_injection]
type = PorousFlowPeacemanBorehole
variable = porepressure
SumQuantityUO = injected_mass
point_file = injection.bh
function_of = pressure
fluid_phase = 0
bottom_p_or_t = 21E6
unit_weight = '0 0 0'
use_mobility = true
character = -1
[]
[fluid_production]
type = PorousFlowPeacemanBorehole
variable = porepressure
SumQuantityUO = produced_mass
point_file = production.bh
function_of = pressure
fluid_phase = 0
bottom_p_or_t = 20E6
unit_weight = '0 0 0'
use_mobility = true
character = 1
[]
[remove_heat_at_production_well]
type = PorousFlowPeacemanBorehole
variable = temperature
SumQuantityUO = produced_heat
point_file = production.bh
function_of = pressure
fluid_phase = 0
bottom_p_or_t = 20E6
unit_weight = '0 0 0'
use_mobility = true
use_enthalpy = true
character = 1
[]
[]
[UserObjects]
[injected_mass]
type = PorousFlowSumQuantity
[]
[produced_mass]
type = PorousFlowSumQuantity
[]
[produced_heat]
type = PorousFlowSumQuantity
[]
[]
[Postprocessors]
[heat_joules_extracted_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_heat
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 2E-4
bulk_modulus = 2E9
viscosity = 1E-3
density0 = 1000
cv = 4000.0
cp = 4000.0
[]
[]
[PorousFlowUnsaturated]
porepressure = porepressure
temperature = temperature
coupling_type = ThermoHydro
gravity = '0 0 0'
fp = the_simple_fluid
[]
[Materials]
[porosity]
type = PorousFlowPorosityConst # only the initial value of this is ever used
porosity = 0.1
[]
[biot_modulus]
type = PorousFlowConstantBiotModulus
solid_bulk_compliance = 1E-10
fluid_bulk_modulus = 2E9
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
[]
[thermal_expansion]
type = PorousFlowConstantThermalExpansionCoefficient
fluid_coefficient = 5E-6
drained_coefficient = 2E-4
[]
[thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '1 0 0 0 1 0 0 0 1'
[]
[rock_heat]
type = PorousFlowMatrixInternalEnergy
density = 2500.0
specific_heat_capacity = 1200.0
[]
[]
[Preconditioning]
active = basic
[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'
[]
[preferred_but_might_not_be_installed]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 2E6
dt = 2E5
[]
[Outputs]
exodus = true
[]
(test/tests/mortar/ad_periodic_segmental_constraint/penalty_periodic_checker2d.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -1.0
xmax = 1.0
ymin = -1.0
ymax = 1.0
nx = 16
ny = 16
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_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[./lowrig]
type = SubdomainBoundingBoxGenerator
input = 'left_block_id'
block_id = 2
bottom_left = '0 -1 0'
top_right = '1 0 0'
[../]
[./upplef]
type = SubdomainBoundingBoxGenerator
input = 'lowrig'
block_id = 3
bottom_left = '-1 0 0'
top_right = '0 1 0'
[../]
[./upprig]
type = SubdomainBoundingBoxGenerator
input = 'upplef'
block_id = 4
bottom_left = '0 0 0'
top_right = '1 1 0'
[../]
[left]
type = LowerDBlockFromSidesetGenerator
input = upprig
sidesets = '13'
new_block_id = '10003'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '11'
new_block_id = '10001'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_top'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = top
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[epsilon]
order = SECOND
family = SCALAR
[]
[]
[AuxVariables]
[sigma]
order = SECOND
family = SCALAR
[]
[./flux_x]
order = FIRST
family = MONOMIAL
[../]
[./flux_y]
order = FIRST
family = MONOMIAL
[../]
[]
[AuxScalarKernels]
[sigma]
type = FunctionScalarAux
variable = sigma
function = '1 3'
execute_on = initial #timestep_end
[]
[]
[AuxKernels]
[./flux_x]
type = DiffusionFluxAux
diffusivity = 'conductivity'
variable = flux_x
diffusion_variable = u
component = x
block = '1 2 3 4'
[../]
[./flux_y]
type = DiffusionFluxAux
diffusivity = 'conductivity'
variable = flux_y
diffusion_variable = u
component = y
block = '1 2 3 4'
[../]
[]
[Kernels]
[diff1]
type = ADDiffusion
variable = u
block = '1 4'
[]
[diff2]
type = ADMatDiffusion
variable = u
block = '2 3'
diffusivity = conductivity
[]
[]
[Materials]
[k1]
type = ADGenericConstantMaterial
prop_names = 'conductivity'
prop_values = 1.0
block = '1 4'
[]
[k2]
type = ADGenericConstantMaterial
prop_names = 'conductivity'
prop_values = 10.0
block = '2 3'
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = ADPenaltyEqualValueConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodiclr]
type = ADPenaltyPeriodicSegmentalConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[mortarbt]
type = ADPenaltyEqualValueConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodicbt]
type = ADPenaltyPeriodicSegmentalConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[]
[Preconditioning]
[smp]
full = true
type = SMP
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
solve_type = NEWTON
[]
[Postprocessors]
[max]
type = ElementExtremeValue
variable = 'flux_x'
[]
[]
[Outputs]
csv = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_stabilized_with_temp.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./velocity]
family = LAGRANGE_VEC
[../]
[./p]
[../]
[temperature][]
[]
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
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
[../]
[./temperature_advection]
type = INSADEnergyAdvection
variable = temperature
[../]
[./temperature_conduction]
type = ADHeatConduction
variable = temperature
thermal_conductivity = 'k'
[../]
[temperature_supg]
type = INSADEnergySUPG
variable = temperature
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
[../]
[./temperature_hot]
type = DirichletBC
variable = temperature
boundary = 'bottom'
value = 1
[../]
[./temperature_cold]
type = DirichletBC
variable = temperature
boundary = 'top'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat]
type = INSADStabilized3Eqn
velocity = velocity
pressure = p
temperature = temperature
[]
[]
[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)'
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_factor_levels -ksp_gmres_restart'
petsc_options_value = 'asm 6 200'
line_search = 'none'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/cg-dg-hybrid/lid-driven/hybrid-cg-dg.i)
mu = 1
rho = 1
l = 200
U = 1
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = ${l}
ymin = 0
ymax = ${l}
nx = 20
ny = 20
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[]
[]
[Variables]
[u]
family = MONOMIAL
[]
[v]
family = MONOMIAL
[]
[pressure][]
[]
[Kernels]
[momentum_x_convection]
type = ADConservativeAdvection
variable = u
velocity = 'velocity'
advected_quantity = 'rhou'
[]
[momentum_x_diffusion]
type = MatDiffusion
variable = u
diffusivity = 'mu'
[]
[momentum_x_pressure]
type = PressureGradient
integrate_p_by_parts = false
variable = u
pressure = pressure
component = 0
[]
[momentum_y_convection]
type = ADConservativeAdvection
variable = v
velocity = 'velocity'
advected_quantity = 'rhov'
[]
[momentum_y_diffusion]
type = MatDiffusion
variable = v
diffusivity = 'mu'
[]
[momentum_y_pressure]
type = PressureGradient
integrate_p_by_parts = false
variable = v
pressure = pressure
component = 1
[]
[mass]
type = ADConservativeAdvection
variable = pressure
velocity = velocity
advected_quantity = -1
[]
[]
[DGKernels]
[momentum_x_convection]
type = ADDGAdvection
variable = u
velocity = 'velocity'
advected_quantity = 'rhou'
[]
[momentum_x_diffusion]
type = DGDiffusion
variable = u
sigma = 6
epsilon = -1
diff = 'mu'
[]
[momentum_y_convection]
type = ADDGAdvection
variable = v
velocity = 'velocity'
advected_quantity = 'rhov'
[]
[momentum_y_diffusion]
type = DGDiffusion
variable = v
sigma = 6
epsilon = -1
diff = 'mu'
[]
[]
[BCs]
[u_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'left bottom right'
variable = u
sigma = 6
epsilon = -1
function = '0'
diff = 'mu'
[]
[v_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'left bottom right top'
variable = v
sigma = 6
epsilon = -1
function = '0'
diff = 'mu'
[]
[u_top]
type = DGFunctionDiffusionDirichletBC
boundary = 'top'
variable = u
sigma = 6
epsilon = -1
function = '${U}'
diff = 'mu'
[]
[pressure_pin]
type = DirichletBC
variable = pressure
boundary = 'pinned_node'
value = 0
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho'
prop_values = '${rho}'
[]
[const_reg]
type = GenericConstantMaterial
prop_names = 'mu'
prop_values = '${mu}'
[]
[vel]
type = ADVectorFromComponentVariablesMaterial
vector_prop_name = 'velocity'
u = u
v = v
[]
[rhou]
type = ADParsedMaterial
property_name = 'rhou'
coupled_variables = 'u'
material_property_names = 'rho'
expression = 'rho*u'
[]
[rhov]
type = ADParsedMaterial
property_name = 'rhov'
coupled_variables = 'v'
material_property_names = 'rho'
expression = 'rho*v'
[]
[]
[AuxVariables]
[vel_x]
family = MONOMIAL
order = CONSTANT
[]
[vel_y]
family = MONOMIAL
order = CONSTANT
[]
[p]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[vel_x]
type = ProjectionAux
variable = vel_x
v = u
[]
[vel_y]
type = ProjectionAux
variable = vel_y
v = v
[]
[p]
type = ProjectionAux
variable = p
v = 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
[]
[Outputs]
exodus = true
[]
[Postprocessors]
[Re]
type = ParsedPostprocessor
pp_names = ''
function = '${rho} * ${U} * ${l} / ${mu}'
[]
[]
(modules/xfem/test/tests/moving_interface/moving_bimaterial_finite_strain.i)
# This test is for two layer materials with different youngs modulus with AD
# The global stress is determined by switching the stress based on level set values
# The material interface is marked by a level set function
# The two layer materials are glued together
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[XFEM]
output_cut_plane = true
[]
[UserObjects]
[level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[]
[]
[Mesh]
use_displaced_mesh = true
[generated_mesh]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmin = 0
xmax = 5
ymin = 0
ymax = 5
elem_type = QUAD4
[]
[left_bottom]
type = ExtraNodesetGenerator
new_boundary = 'left_bottom'
coord = '0 0'
input = generated_mesh
[]
[left_top]
type = ExtraNodesetGenerator
new_boundary = 'left_top'
coord = '0 5'
input = left_bottom
[]
[]
[Functions]
[ls_func]
type = ParsedFunction
expression = 'y-2.73+t'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[ls]
[]
[a_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[a_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[a_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[b_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[b_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[b_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[ls_function]
type = FunctionAux
variable = ls
function = ls_func
[]
[a_strain_xx]
type = RankTwoAux
variable = a_strain_xx
rank_two_tensor = A_total_strain
index_i = 0
index_j = 0
[]
[a_strain_yy]
type = RankTwoAux
variable = a_strain_yy
rank_two_tensor = A_total_strain
index_i = 1
index_j = 1
[]
[a_strain_xy]
type = RankTwoAux
variable = a_strain_xy
rank_two_tensor = A_total_strain
index_i = 0
index_j = 1
[]
[b_strain_xx]
type = RankTwoAux
variable = b_strain_xx
rank_two_tensor = B_total_strain
index_i = 0
index_j = 0
[]
[b_strain_yy]
type = RankTwoAux
variable = b_strain_yy
rank_two_tensor = B_total_strain
index_i = 1
index_j = 1
[]
[b_strain_xy]
type = RankTwoAux
variable = b_strain_xy
rank_two_tensor = B_total_strain
index_i = 0
index_j = 1
[]
[stress_xx]
type = RankTwoAux
variable = stress_xx
rank_two_tensor = stress
index_i = 0
index_j = 0
[]
[stress_xy]
type = RankTwoAux
variable = stress_xy
rank_two_tensor = stress
index_i = 0
index_j = 1
[]
[stress_yy]
type = RankTwoAux
variable = stress_yy
rank_two_tensor = stress
index_i = 1
index_j = 1
[]
[]
[Kernels]
[solid_x]
type = StressDivergenceTensors
variable = disp_x
component = 0
use_displaced_mesh = true
[]
[solid_y]
type = StressDivergenceTensors
variable = disp_y
component = 1
use_displaced_mesh = true
[]
[]
[Constraints]
[dispx_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_x
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[]
[dispy_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_y
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[]
[]
[BCs]
[bottomx]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[]
[bottomy]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[]
[topx]
type = FunctionDirichletBC
boundary = top
variable = disp_x
function = 0.03*t
[]
[topy]
type = FunctionDirichletBC
boundary = top
variable = disp_y
function = '0.03*t'
[]
[]
[Materials]
[elasticity_tensor_A]
type = ComputeIsotropicElasticityTensor
base_name = A
youngs_modulus = 1e9
poissons_ratio = 0.3
[]
[strain_A]
type = ComputeFiniteStrain
base_name = A
[]
[stress_A]
type = ComputeFiniteStrainElasticStress
base_name = A
[]
[elasticity_tensor_B]
type = ComputeIsotropicElasticityTensor
base_name = B
youngs_modulus = 1e7
poissons_ratio = 0.3
[]
[strain_B]
type = ComputeFiniteStrain
base_name = B
[]
[stress_B]
type = ComputeFiniteStrainElasticStress
base_name = B
[]
[combined_stress]
type = LevelSetBiMaterialRankTwo
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = stress
[]
[combined_jacob_mult]
type = LevelSetBiMaterialRankFour
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = Jacobian_mult
[]
[]
[Postprocessors]
[disp_x_norm]
type = ElementL2Norm
variable = disp_x
[]
[disp_y_norm]
type = ElementL2Norm
variable = disp_y
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-13
nl_abs_tol = 1e-50
# time control
start_time = 0.0
dt = 0.1
num_steps = 4
max_xfem_update = 1
[]
[Outputs]
print_linear_residuals = false
exodus = true
[]
(modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_iso_creep_x_3d.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 2
nz = 2
xmin = 0.0
ymin = 0.0
zmin = 0.0
xmax = 10.0
ymax = 1.0
zmax = 1.0
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = '100'
nodes = '3 69'
input = gen
[]
[corner_node_2]
type = ExtraNodesetGenerator
new_boundary = '101'
nodes = '4 47'
input = corner_node
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xz]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_yz]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[creep_strain_xx]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xx
index_i = 0
index_j = 0
[]
[creep_strain_xy]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xy
index_i = 0
index_j = 1
[]
[creep_strain_yy]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_yy
index_i = 1
index_j = 1
[]
[creep_strain_zz]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_zz
index_i = 2
index_j = 2
[]
[creep_strain_xz]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xz
index_i = 0
index_j = 2
[]
[creep_strain_yz]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_yz
index_i = 1
index_j = 2
[]
[sigma_xx]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 1
index_j = 1
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1.0e-9 1.0'
y = '0 -4e1 -4e1'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_xx stress_xx'
use_automatic_differentiation = true
add_variables = true
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 700
poissons_ratio = 0.0
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
# inelastic_models = 'trial_creep_iso'
max_iterations = 50
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
hill_constants = "0.5 0.5 0.5 1.5 1.5 1.5"
[]
[trial_creep_aniso_iso]
type = ADHillCreepStressUpdate
coefficient = 1e-16
n_exponent = 9
m_exponent = 0
activation_energy = 0
max_inelastic_increment = 0.00003
relative_tolerance = 1e-20
absolute_tolerance = 1e-20
internal_solve_output_on = never
# Force it to not use integration error
max_integration_error = 1.0
[]
[trial_creep_iso]
type = ADPowerLawCreepStressUpdate
coefficient = 1e-16
n_exponent = 9
m_exponent = 0
activation_energy = 0
# F G H L M N
max_inelastic_increment = 0.00003
relative_tolerance = 1e-16
absolute_tolerance = 1e-16
internal_solve_output_on = never
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = 100
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = 101
value = 0.0
[]
[Pressure]
[Side1]
boundary = right
function = pull
[]
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-13
nl_abs_tol = 1.0e-14
l_max_its = 90
num_steps = 10
dt = 5.0e-4
start_time = 0
automatic_scaling = true
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[num_lin]
type = NumLinearIterations
outputs = console
[]
[num_nonlin]
type = NumNonlinearIterations
outputs = console
[]
[creep_strain_xx]
type = ElementalVariableValue
variable = creep_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_yy]
type = ElementalVariableValue
variable = creep_strain_yy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_zz]
type = ElementalVariableValue
variable = creep_strain_zz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_xy]
type = ElementalVariableValue
variable = creep_strain_xy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_yz]
type = ElementalVariableValue
variable = creep_strain_yz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_xz]
type = ElementalVariableValue
variable = creep_strain_xz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[elastic_strain_xx]
type = ElementalVariableValue
variable = elastic_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[sigma_xx]
type = ElementalVariableValue
variable = stress_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[]
[Outputs]
csv = true
exodus = true
perf_graph = true
[]
(modules/solid_mechanics/test/tests/ad_anisotropic_creep/aniso_creep_x_3d.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 2
nz = 2
xmin = 0.0
ymin = 0.0
zmin = 0.0
xmax = 10.0
ymax = 1.0
zmax = 1.0
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = '100'
nodes = '3 69'
input = gen
[]
[corner_node_2]
type = ExtraNodesetGenerator
new_boundary = '101'
nodes = '4 47'
input = corner_node
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = RankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[creep_strain_xx]
type = RankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xx
index_i = 0
index_j = 0
[]
[creep_strain_xy]
type = RankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xy
index_i = 0
index_j = 1
[]
[creep_strain_yy]
type = RankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_yy
index_i = 1
index_j = 1
[]
[sigma_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 1
index_j = 1
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1.0e-9 1.0'
y = '0 -4e1 -4e1'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_xx stress_xx'
add_variables = true
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 700
poissons_ratio = 0.0
[]
[elastic_strain]
type = ComputeMultipleInelasticStress
inelastic_models = "trial_creep_two"
max_iterations = 50
absolute_tolerance = 1e-16
[]
[hill_tensor]
type = HillConstants
# F G H L M N
hill_constants = "0.5 0.25 0.3866 1.6413 1.6413 1.2731"
[]
[trial_creep_two]
type = HillCreepStressUpdate
coefficient = 1e-16
n_exponent = 9
m_exponent = 0
activation_energy = 0
max_inelastic_increment = 0.00003
absolute_tolerance = 1e-20
relative_tolerance = 1e-20
# Force it to not use integration error
max_integration_error = 100.0
[]
[]
[BCs]
[no_disp_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[no_disp_y]
type = DirichletBC
variable = disp_y
boundary = 100
value = 0.0
[]
[no_disp_z]
type = DirichletBC
variable = disp_z
boundary = 101
value = 0.0
[]
[Pressure]
[Side1]
boundary = right
function = pull
[]
[]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -mat_mffd_err'
petsc_options_value = 'lu superlu_dist 1e-5'
nl_rel_tol = 1.0e-14
nl_abs_tol = 1.0e-14
l_max_its = 10
num_steps = 10
dt = 1.0e-4
start_time = 0
automatic_scaling = true
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[num_lin]
type = NumLinearIterations
outputs = console
[]
[num_nonlin]
type = NumNonlinearIterations
outputs = console
[]
[creep_strain_xx]
type = ElementalVariableValue
variable = creep_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[elastic_strain_xx]
type = ElementalVariableValue
variable = elastic_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[sigma_xx]
type = ElementalVariableValue
variable = stress_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[]
[Outputs]
csv = true
exodus = true
perf_graph = true
[]
(modules/combined/tutorials/introduction/thermal_mechanical_contact/thermomech_cont_step02.i)
#
# Three shell thermo mechanical contact
# https://mooseframework.inl.gov/modules/combined/tutorials/introduction/step02.html
#
[GlobalParams]
displacements = 'disp_x disp_y'
block = '0 1 2'
[]
[Problem]
# switch to an axisymmetric coordinate system
coord_type = RZ
[]
[Mesh]
# inner cylinder
[inner]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 40
xmax = 1
ymin = -1.75
ymax = 1.75
boundary_name_prefix = inner
[]
# middle shell with subdomain ID 1
[middle_elements]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 40
xmin = 1.1
xmax = 2.1
ymin = -2.5
ymax = 2.5
boundary_name_prefix = middle
boundary_id_offset = 4
[]
[middle]
type = SubdomainIDGenerator
input = middle_elements
subdomain_id = 1
[]
# outer shell with subdomain ID 2
[outer_elements]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 48
xmin = 2.2
xmax = 3.2
ymin = -3
ymax = 3
boundary_name_prefix = outer
boundary_id_offset = 8
[]
[outer]
type = SubdomainIDGenerator
input = outer_elements
subdomain_id = 2
[]
[collect_meshes]
type = MeshCollectionGenerator
inputs = 'inner middle outer'
[]
# add set of 3 nodes to remove rigid body modes for y-translation in each block
[pin]
type = ExtraNodesetGenerator
input = collect_meshes
new_boundary = pin
coord = '0 0 0; 1.6 0 0; 2.7 0 0'
[]
patch_update_strategy = iteration
[]
[Variables]
# temperature field variable (first order Lagrange by default)
[T]
[]
# temperature lagrange multipliers
[Tlm1]
block = 'inner_gap_secondary_subdomain'
[]
[Tlm2]
block = 'outer_gap_secondary_subdomain'
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = T
[]
[dTdt]
type = HeatConductionTimeDerivative
variable = T
[]
[]
[Modules/TensorMechanics/Master]
[all]
add_variables = true
strain = FINITE
eigenstrain_names = thermal
generate_output = 'vonmises_stress stress_xx strain_xx stress_yy strain_yy'
volumetric_locking_correction = true
temperature = T
[]
[]
[Contact]
[inner_gap]
primary = middle_left
secondary = inner_right
model = frictionless
formulation = mortar
c_normal = 1e+0
[]
[outer_gap]
primary = outer_left
secondary = middle_right
model = frictionless
formulation = mortar
c_normal = 1e+0
[]
[]
[Constraints]
# thermal contact constraint
[Tlm1]
type = GapConductanceConstraint
variable = Tlm1
secondary_variable = T
use_displaced_mesh = true
k = 1e-1
primary_boundary = middle_left
primary_subdomain = inner_gap_secondary_subdomain
secondary_boundary = inner_right
secondary_subdomain = inner_gap_primary_subdomain
[]
[Tlm2]
type = GapConductanceConstraint
variable = Tlm2
secondary_variable = T
use_displaced_mesh = true
k = 1e-1
primary_boundary = outer_left
primary_subdomain = outer_gap_secondary_subdomain
secondary_boundary = middle_right
secondary_subdomain = outer_gap_primary_subdomain
[]
[]
[BCs]
[center_axis_fix]
type = DirichletBC
variable = disp_x
boundary = 'inner_left'
value = 0
[]
[y_translation_fix]
type = DirichletBC
variable = disp_y
boundary = 'pin'
value = 0
[]
[heat_center]
type = FunctionDirichletBC
variable = T
boundary = 'inner_left'
function = t*40
[]
[cool_right]
type = DirichletBC
variable = T
boundary = 'outer_right'
value = 0
[]
[]
[Materials]
[eigen_strain_inner]
type = ComputeThermalExpansionEigenstrain
eigenstrain_name = thermal
temperature = T
thermal_expansion_coeff = 1e-3
stress_free_temperature = 0
block = 0
[]
[eigen_strain_middle]
type = ComputeThermalExpansionEigenstrain
eigenstrain_name = thermal
temperature = T
thermal_expansion_coeff = 2e-4
stress_free_temperature = 0
block = 1
[]
[eigen_strain_outer]
type = ComputeThermalExpansionEigenstrain
eigenstrain_name = thermal
temperature = T
thermal_expansion_coeff = 1e-5
stress_free_temperature = 0
block = 2
[]
[elasticity]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
[]
# thermal properties
[thermal_conductivity_0]
type = HeatConductionMaterial
thermal_conductivity = 50
specific_heat = 1
block = 0
[]
[thermal_conductivity_1]
type = HeatConductionMaterial
thermal_conductivity = 5
specific_heat = 1
block = 1
[]
[thermal_conductivity_2]
type = HeatConductionMaterial
thermal_conductivity = 1
specific_heat = 1
block = 2
[]
[density]
type = Density
density = 1
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
# [Debug]
# show_var_residual_norms = true
# []
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu nonzero '
snesmf_reuse_base = false
end_time = 7
dt = 0.05
nl_rel_tol = 1e-08
nl_abs_tol = 1e-50
[Predictor]
type = SimplePredictor
scale = 0.5
[]
[]
[Outputs]
exodus = true
print_linear_residuals = false
perf_graph = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/mms/pspg/pspg_mms_test.i)
mu=1.5
rho=2.5
[GlobalParams]
gravity = '0 0 0'
pspg = true
convective_term = true
integrate_p_by_parts = true
laplace = true
u = vel_x
v = vel_y
pressure = p
alpha = 1e-6
order = FIRST
family = LAGRANGE
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
elem_type = QUAD9
nx = 4
ny = 4
[]
[./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
x_vel_forcing_func = vel_x_source_func
y_vel_forcing_func = vel_y_source_func
[../]
# x-momentum, space
[./x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
component = 0
forcing_func = vel_x_source_func
[../]
# y-momentum, space
[./y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
component = 1
forcing_func = vel_y_source_func
[../]
[./p_source]
type = BodyForce
function = p_source_func
variable = p
[../]
[]
[BCs]
[./vel_x]
type = FunctionDirichletBC
boundary = 'left right top bottom'
function = vel_x_func
variable = vel_x
[../]
[./vel_y]
type = FunctionDirichletBC
boundary = 'left right top bottom'
function = vel_y_func
variable = vel_y
[../]
[./p]
type = FunctionDirichletBC
boundary = 'left right top bottom'
function = p_func
variable = p
[../]
[]
[Functions]
[./vel_x_source_func]
type = ParsedFunction
expression = '-${mu}*(-0.028*pi^2*x^2*sin(0.2*pi*x*y) - 0.028*pi^2*y^2*sin(0.2*pi*x*y) - 0.1*pi^2*sin(0.5*pi*x) - 0.4*pi^2*sin(pi*y)) + ${rho}*(0.14*pi*x*cos(0.2*pi*x*y) + 0.4*pi*cos(pi*y))*(0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3) + ${rho}*(0.14*pi*y*cos(0.2*pi*x*y) + 0.2*pi*cos(0.5*pi*x))*(0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5) + 0.1*pi*y*cos(0.2*pi*x*y) + 0.25*pi*cos(0.5*pi*x)'
[../]
[./vel_y_source_func]
type = ParsedFunction
expression = '-${mu}*(-0.018*pi^2*x^2*sin(0.3*pi*x*y) - 0.018*pi^2*y^2*sin(0.3*pi*x*y) - 0.384*pi^2*sin(0.8*pi*x) - 0.027*pi^2*sin(0.3*pi*y)) + ${rho}*(0.06*pi*x*cos(0.3*pi*x*y) + 0.09*pi*cos(0.3*pi*y))*(0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3) + ${rho}*(0.06*pi*y*cos(0.3*pi*x*y) + 0.48*pi*cos(0.8*pi*x))*(0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5) + 0.1*pi*x*cos(0.2*pi*x*y) + 0.3*pi*cos(0.3*pi*y)'
[../]
[./p_source_func]
type = ParsedFunction
expression = '-0.06*pi*x*cos(0.3*pi*x*y) - 0.14*pi*y*cos(0.2*pi*x*y) - 0.2*pi*cos(0.5*pi*x) - 0.09*pi*cos(0.3*pi*y)'
[../]
[./vel_x_func]
type = ParsedFunction
expression = '0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5'
[../]
[./vel_y_func]
type = ParsedFunction
expression = '0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3'
[../]
[./p_func]
type = ParsedFunction
expression = '0.5*sin(0.5*pi*x) + 1.0*sin(0.3*pi*y) + 0.5*sin(0.2*pi*x*y) + 0.5'
[../]
[./vxx_func]
type = ParsedFunction
expression = '0.14*pi*y*cos(0.2*pi*x*y) + 0.2*pi*cos(0.5*pi*x)'
[../]
[./px_func]
type = ParsedFunction
expression = '0.1*pi*y*cos(0.2*pi*x*y) + 0.25*pi*cos(0.5*pi*x)'
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
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]
type = Exodus
[../]
[./csv]
type = CSV
[../]
[]
[Postprocessors]
[./L2vel_x]
type = ElementL2Error
variable = vel_x
function = vel_x_func
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2vel_y]
variable = vel_y
function = vel_y_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2p]
variable = p
function = p_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2vxx]
variable = vxx
function = vxx_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2px]
variable = px
function = px_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[]
[AuxVariables]
[./vxx]
family = MONOMIAL
order = FIRST
[../]
[./px]
family = MONOMIAL
order = FIRST
[../]
[]
[AuxKernels]
[./vxx]
type = VariableGradientComponent
component = x
variable = vxx
gradient_variable = vel_x
[../]
[./px]
type = VariableGradientComponent
component = x
variable = px
gradient_variable = p
[../]
[]
(modules/solid_mechanics/test/tests/finite_strain_jacobian/3d_bar.i)
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
xmin = 0
xmax = 2
ymin = 0
ymax = 2
zmin = 0
zmax = 10
nx = 10
ny = 2
nz = 2
elem_type = HEX8
[]
[corner]
type = ExtraNodesetGenerator
new_boundary = 101
coord = '0 0 0'
input = generated_mesh
[]
[side]
type = ExtraNodesetGenerator
new_boundary = 102
coord = '2 0 0'
input = corner
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
use_finite_deform_jacobian = true
volumetric_locking_correction = false
[../]
[]
[Materials]
[./stress]
type = ComputeFiniteStrainElasticStress
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '1.684e5 0.176e5 0.176e5 1.684e5 0.176e5 1.684e5 0.754e5 0.754e5 0.754e5'
[../]
[]
[BCs]
[./fix_corner_x]
type = DirichletBC
variable = disp_x
boundary = 101
value = 0
[../]
[./fix_corner_y]
type = DirichletBC
variable = disp_y
boundary = 101
value = 0
[../]
[./fix_side_y]
type = DirichletBC
variable = disp_y
boundary = 102
value = 0
[../]
[./fix_z]
type = DirichletBC
variable = disp_z
boundary = back
value = 0
[../]
[./move_z]
type = FunctionDirichletBC
variable = disp_z
boundary = front
function = 't'
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-10
nl_max_its = 10
l_tol = 1e-4
l_max_its = 50
dt = 0.2
dtmin = 0.2
num_steps = 2
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/coupled-force/steady.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./velocity]
family = LAGRANGE_VEC
[../]
[./p]
[../]
[u]
family = LAGRANGE_VEC
[]
[]
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
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_coupled_force]
type = INSADMomentumCoupledForce
variable = velocity
coupled_vector_var = u
[]
[./momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[../]
[u_diff]
type = VectorDiffusion
variable = u
[]
[]
[BCs]
[./no_slip]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom right left top'
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[u_left]
type = VectorFunctionDirichletBC
variable = u
boundary = 'left'
function_x = 1
function_y = 1
[]
[u_right]
type = VectorFunctionDirichletBC
variable = u
boundary = 'right'
function_x = -1
function_y = -1
[]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[ins_mat]
type = INSADTauMaterial
velocity = velocity
pressure = p
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_factor_levels -ksp_gmres_restart'
petsc_options_value = 'asm 6 200'
line_search = 'none'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
exodus = true
[]
(modules/combined/examples/optimization/2d_mbb_pde_amr.i)
vol_frac = 0.5
E0 = 1
Emin = 1e-8
power = 2
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 30
ny = 10
xmin = 0
xmax = 30
ymin = 0
ymax = 10
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = pull
nodes = 0
[]
[push]
type = ExtraNodesetGenerator
input = node
new_boundary = push
coord = '30 10 0'
[]
[]
[Variables]
[Dc]
initial_condition = -1.0
[]
[]
[AuxVariables]
[Emin]
family = MONOMIAL
order = CONSTANT
initial_condition = ${Emin}
[]
[power]
family = MONOMIAL
order = CONSTANT
initial_condition = ${power}
[]
[E0]
family = MONOMIAL
order = CONSTANT
initial_condition = ${E0}
[]
[sensitivity]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[AuxKernel]
type = MaterialRealAux
variable = sensitivity
property = sensitivity
execute_on = LINEAR
[]
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = ${vol_frac}
[]
[Dc_elem]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[AuxKernel]
type = SelfAux
variable = Dc_elem
v = Dc
execute_on = 'TIMESTEP_END'
[]
[]
[mat_den_nodal]
family = L2_LAGRANGE
order = FIRST
initial_condition = ${vol_frac}
[AuxKernel]
type = SelfAux
execute_on = TIMESTEP_END
variable = mat_den_nodal
v = mat_den
[]
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[Kernels]
[diffusion]
type = FunctionDiffusion
variable = Dc
function = 0.15 # radius coeff
[]
[potential]
type = Reaction
variable = Dc
[]
[source]
type = CoupledForce
variable = Dc
v = sensitivity
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_y
boundary = pull
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[boundary_penalty]
type = ADRobinBC
variable = Dc
boundary = 'left top'
coefficient = 10
[]
[boundary_penalty_right]
type = ADRobinBC
variable = Dc
boundary = 'right'
coefficient = 10
[]
[]
[NodalKernels]
[pull]
type = NodalGravity
variable = disp_y
boundary = push
gravity_value = -1
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'Emin mat_den power E0'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${E0}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
incremental = false
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[update]
type = DensityUpdate
density_sensitivity = Dc_elem
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
line_search = none
nl_abs_tol = 1e-4
l_max_its = 200
start_time = 0.0
dt = 1.0
num_steps = 70
[]
[Outputs]
[out]
type = Exodus
execute_on = 'INITIAL TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Controls]
[first_period]
type = TimePeriod
start_time = 0.0
end_time = 40
enable_objects = 'BCs::boundary_penalty_right'
execute_on = 'initial timestep_begin'
[]
[]
[Adaptivity]
max_h_level = 2
recompute_markers_during_cycles = true
interval = 1
cycles_per_step = 1
marker = density_marker
[Indicators]
[density_jump]
type = ValueJumpIndicator
variable = mat_den_nodal
[]
[]
[Markers]
[density_marker]
type = ErrorToleranceMarker
indicator = density_jump
coarsen = 0.1
refine = 0.1
[]
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/mixed-transient-steady/mixed.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./velocity]
family = LAGRANGE_VEC
[../]
[./p]
[../]
[temperature]
[InitialCondition]
type = ConstantIC
value = 1.0
[]
[]
[]
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
variable = velocity
[]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[./mass_pspg]
type = INSADMassPSPG
variable = p
[../]
[./momentum_time]
type = INSADMomentumTimeDerivative
variable = velocity
[../]
[./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
[../]
[./temperature_advection]
type = INSADEnergyAdvection
variable = temperature
[../]
[./temperature_conduction]
type = ADHeatConduction
variable = temperature
thermal_conductivity = 'k'
[../]
[temperature_supg]
type = INSADEnergySUPG
variable = temperature
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
[../]
[./temperature_hot]
type = DirichletBC
variable = temperature
boundary = 'bottom'
value = 1
[../]
[./temperature_cold]
type = DirichletBC
variable = temperature
boundary = 'top'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat]
type = INSADStabilized3Eqn
velocity = velocity
pressure = p
temperature = temperature
[]
[]
[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)'
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -sub_pc_factor_levels -ksp_gmres_restart'
petsc_options_value = 'asm 6 200'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/ad_anisotropic_creep/3d_bar_orthotropic_90deg_rotation_ad_creep_x_no_rotation.i)
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
xmin = 0
xmax = 2
ymin = 0
ymax = 10
zmin = 0
zmax = 2
nx = 1
ny = 1
nz = 1
elem_type = HEX8
[]
[corner]
type = ExtraNodesetGenerator
new_boundary = 101
coord = '0 0 0'
input = generated_mesh
[]
[side]
type = ExtraNodesetGenerator
new_boundary = 102
coord = '2 0 0'
input = corner
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
volumetric_locking_correction = true
use_automatic_differentiation = true
generate_output = 'elastic_strain_xx stress_xx creep_strain_xx creep_strain_yy creep_strain_zz'
[]
[]
[Materials]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "trial_creep"
max_iterations = 50
absolute_tolerance = 1e-18
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
hill_constants = "0.25 0.4 0.65 1.5 1.5 1.5"
[]
[trial_creep]
type = ADHillCreepStressUpdate
coefficient = 5e-14
n_exponent = 10
m_exponent = 0
activation_energy = 0
max_inelastic_increment = 0.00003
absolute_tolerance = 1e-18
relative_tolerance = 1e-18
# Force it to not use integration error
max_integration_error = 100.0
[]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 500
poissons_ratio = 0.0
[]
[]
[BCs]
[fix_x]
type = ADDirichletBC
variable = disp_x
boundary = bottom
value = 0
[]
[rot_z]
type = DisplacementAboutAxis
boundary = bottom
function = 0
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '1. 0. 1.0e-13'
component = 2
variable = disp_z
[]
#
[rot_y]
type = DisplacementAboutAxis
boundary = bottom
function = 0
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '1. 0. 1.0e-13'
component = 1
variable = disp_y
[]
[rot_z90]
type = DisplacementAboutAxis
boundary = bottom
function = 0
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '1. 0. 1.0e-13'
component = 2
variable = disp_z
[]
#
[rot_y90]
type = DisplacementAboutAxis
boundary = bottom
function = 0
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '1. 0. 1.0e-13'
component = 1
variable = disp_y
[]
[press]
type = Pressure
boundary = top
function = '-1.0*(t-90)*0.1'
use_displaced_mesh = true
displacements = 'disp_x disp_y disp_z'
variable = disp_y
[]
[]
[Postprocessors]
[creep_strain_yy]
type = ADElementAverageMaterialProperty
mat_prop = creep_strain_yy
[]
[]
[Controls]
[c1]
type = TimePeriod
enable_objects = 'BCs::rot_z BCs::rot_y'
disable_objects = 'BCs::rot_z90 BCs::rot_y90 BCs::press'
start_time = '0'
end_time = '90'
[]
[c190plus]
type = TimePeriod
enable_objects = 'BCs::rot_z90 BCs::rot_y90 BCs::press'
disable_objects = 'BCs::rot_z BCs::rot_y '
start_time = '90'
end_time = '390'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
nl_rel_tol = 1e-11
nl_abs_tol = 1e-11
nl_max_its = 50
l_tol = 1e-4
l_max_its = 50
start_time = 0.0
dt = 0.1
dtmin = 0.1
num_steps = 1200
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = false
csv = true
[]
(modules/navier_stokes/test/tests/finite_element/pins/expansion-channel/expansion-channel-slip-wall.i)
# This is an example showing the conservative form with combined velocity inlet condition,
# pressure outlet condition and slip wall boundary condition.
[GlobalParams]
gravity = '0 -9.8 0'
order = FIRST
family = LAGRANGE
u = vel_x
v = vel_y
pressure = p
temperature = T
porosity = porosity
eos = eos
conservative_form = true
p_int_by_parts = true
[]
[Mesh]
[file]
type = FileMeshGenerator
file = expansion-channel.e
[]
[add_corners]
type = ExtraNodesetGenerator
input = file
new_boundary = 'corners'
coord = '-0.05 -0.5 0; 0.05 -0.5 0; -0.1 0.5 0; 0.1 0.5 0'
[]
[]
[NodalNormals]
# boundaries 3 (left) and 4 (right) are walls
boundary = '3 4'
corner_boundary = 'corners'
[]
[FluidProperties]
[eos]
type = SimpleFluidProperties
density0 = 100 # kg/m^3
thermal_expansion = 0.001 # K^{-1}
cp = 100
viscosity = 0.1 # Pa-s, Re=rho*u*L/mu = 100*1*0.1/0.1 = 100
thermal_conductivity = 72
[]
[]
[Variables]
# velocities
[vel_x]
scaling = 1e-1
initial_condition = 0
[]
[vel_y]
scaling = 1e-2
initial_condition = 1
[]
# Pressure
[p]
initial_condition = 1.01e5
[]
# Temperature
[T]
scaling = 1e-4
initial_condition = 630
[]
[]
[AuxVariables]
[rho]
initial_condition = 77.0
[]
[porosity]
initial_condition = 0.6
[]
[vol_heat]
initial_condition = 1e3
[]
[]
[Materials]
[mat]
type = PINSFEMaterial
alpha = 1e3
beta = 100
[]
[]
[Kernels]
# mass balance (continuity) equation
[mass_time]
type = PINSFEFluidPressureTimeDerivative
variable = p
[]
[mass_space]
type = INSFEFluidMassKernel
variable = p
[]
# momentum equations for x- and y- velocities
[x_momentum_time]
type = PINSFEFluidVelocityTimeDerivative
variable = vel_x
[]
[x_momentum_space]
type = INSFEFluidMomentumKernel
variable = vel_x
component = 0
[]
[y_momentum_time]
type = PINSFEFluidVelocityTimeDerivative
variable = vel_y
[]
[y_momentum_space]
type = INSFEFluidMomentumKernel
variable = vel_y
component = 1
[]
# fluid energy equation
[temperature_time]
type = PINSFEFluidTemperatureTimeDerivative
variable = T
[]
[temperature_space]
type = INSFEFluidEnergyKernel
variable = T
power_density = vol_heat
[]
[]
[AuxKernels]
[rho_aux]
type = FluidDensityAux
variable = rho
p = p
T = T
fp = eos
[]
[]
[BCs]
# BCs for mass equation
# Inlet
[mass_inlet]
type = INSFEFluidMassBC
variable = p
boundary = '1'
[]
# Outlet
[mass_out]
type = INSFEFluidMassBC
variable = p
boundary = '2'
[]
# BCs for x-momentum equation
# Inlet
[vx_in]
type = INSFEFluidMomentumBC
variable = vel_x
boundary = '1'
component = 0
#p_fn = 1.05e5
v_fn = 1
[]
# Outlet
[vx_out]
type = INSFEFluidMomentumBC
variable = vel_x
boundary = '2'
component = 0
p_fn = 1e5
[]
# Walls (left and right walls)
[vx_wall]
type = INSFEFluidWallMomentumBC
variable = vel_x
boundary = '3 4'
component = 0
[]
# BCs for y-momentum equation
# Inlet
[vy_in]
type = INSFEFluidMomentumBC
variable = vel_y
boundary = '1'
component = 1
v_fn = 1
[]
# Outlet
[vy_out]
type = INSFEFluidMomentumBC
variable = vel_y
boundary = '2'
component = 1
p_fn = 1e5
[]
# Walls (left and right walls)
[vy_wall]
type = INSFEFluidWallMomentumBC
variable = vel_y
boundary = '3 4'
component = 1
[]
# Special slip-wall BCs for both x- and y- velocities
[slipwall]
type = INSFEMomentumFreeSlipBC
boundary = '3 4'
variable = vel_x
u = vel_x
v = vel_y
[]
# BCs for fluid energy equation
# Inlet
[T_in]
type = INSFEFluidEnergyBC
variable = T
boundary = '1'
T_fn = 630
[]
# Outlet
[T_out]
type = INSFEFluidEnergyBC
variable = T
boundary = '2'
T_fn = 630
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = FDP
full = true
solve_type = 'PJFNK'
[]
[]
[Executioner]
type = Transient
dt = 0.2
dtmin = 1.e-6
[TimeStepper]
type = IterationAdaptiveDT
growth_factor = 1.25
optimal_iterations = 15
linear_iteration_ratio = 100
dt = 0.1
cutback_factor = 0.5
cutback_factor_at_failure = 0.5
[]
dtmax = 25
petsc_options_iname = '-pc_type -ksp_gmres_restart'
petsc_options_value = 'lu 100'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-8
nl_max_its = 12
l_tol = 1e-5
l_max_its = 100
start_time = 0.0
end_time = 500
num_steps = 2
[]
[Outputs]
perf_graph = true
print_linear_residuals = false
time_step_interval = 1
execute_on = 'initial timestep_end'
[console]
type = Console
output_linear = false
[]
[out]
type = Exodus
use_displaced = false
[]
[]
(modules/combined/examples/geochem-porous_flow/forge/aquifer_geochemistry.i)
# Simulates geochemistry in the aquifer. This input file may be run in standalone fashion, which will study the natural kinetically-controlled mineral changes in the same way as natural_reservoir.i. To simulate the FORGE injection scenario, run the porous_flow.i simulation which couples to this input file using MultiApps.
# This file receives pf_rate_H pf_rate_Na pf_rate_K pf_rate_Ca pf_rate_Mg pf_rate_SiO2 pf_rate_Al pf_rate_Cl pf_rate_SO4 pf_rate_HCO3 pf_rate_H2O and temperature as AuxVariables from porous_flow.i
# The pf_rate quantities are kg/s changes of fluid-component mass at each node, but the geochemistry module expects rates-of-changes of moles at every node. Secondly, since this input file considers just 1 litre of aqueous solution at every node, the nodal_void_volume is used to convert pf_rate_* into rate_*_per_1l, which is measured in mol/s/1_litre_of_aqueous_solution.
# This file sends massfrac_H massfrac_Na massfrac_K massfrac_Ca massfrac_Mg massfrac_SiO2 massfrac_Al massfrac_Cl massfrac_SO4 massfrac_HCO3 to porous_flow.i. These are computed from the corresponding transported_* quantities.
# The results depend on the kinetic rates used and these are recognised to be poorly constrained by experiment
[UserObjects]
[rate_Albite]
type = GeochemistryKineticRate
kinetic_species_name = Albite
intrinsic_rate_constant = 1E-17
multiply_by_mass = true
area_quantity = 10
activation_energy = 69.8E3
one_over_T0 = 0.003354
[]
[rate_Anhydrite]
type = GeochemistryKineticRate
kinetic_species_name = Anhydrite
intrinsic_rate_constant = 1.0E-7
multiply_by_mass = true
area_quantity = 10
activation_energy = 14.3E3
one_over_T0 = 0.003354
[]
[rate_Anorthite]
type = GeochemistryKineticRate
kinetic_species_name = Anorthite
intrinsic_rate_constant = 1.0E-13
multiply_by_mass = true
area_quantity = 10
activation_energy = 17.8E3
one_over_T0 = 0.003354
[]
[rate_Calcite]
type = GeochemistryKineticRate
kinetic_species_name = Calcite
intrinsic_rate_constant = 1.0E-10
multiply_by_mass = true
area_quantity = 10
activation_energy = 23.5E3
one_over_T0 = 0.003354
[]
[rate_Chalcedony]
type = GeochemistryKineticRate
kinetic_species_name = Chalcedony
intrinsic_rate_constant = 1.0E-18
multiply_by_mass = true
area_quantity = 10
activation_energy = 90.1E3
one_over_T0 = 0.003354
[]
[rate_Clinochl-7A]
type = GeochemistryKineticRate
kinetic_species_name = Clinochl-7A
intrinsic_rate_constant = 1.0E-17
multiply_by_mass = true
area_quantity = 10
activation_energy = 88.0E3
one_over_T0 = 0.003354
[]
[rate_Illite]
type = GeochemistryKineticRate
kinetic_species_name = Illite
intrinsic_rate_constant = 1E-17
multiply_by_mass = true
area_quantity = 10
activation_energy = 29E3
one_over_T0 = 0.003354
[]
[rate_K-feldspar]
type = GeochemistryKineticRate
kinetic_species_name = K-feldspar
intrinsic_rate_constant = 1E-17
multiply_by_mass = true
area_quantity = 10
activation_energy = 38E3
one_over_T0 = 0.003354
[]
[rate_Kaolinite]
type = GeochemistryKineticRate
kinetic_species_name = Kaolinite
intrinsic_rate_constant = 1E-18
multiply_by_mass = true
area_quantity = 10
activation_energy = 22.2E3
one_over_T0 = 0.003354
[]
[rate_Quartz]
type = GeochemistryKineticRate
kinetic_species_name = Quartz
intrinsic_rate_constant = 1E-18
multiply_by_mass = true
area_quantity = 10
activation_energy = 90.1E3
one_over_T0 = 0.003354
[]
[rate_Paragonite]
type = GeochemistryKineticRate
kinetic_species_name = Paragonite
intrinsic_rate_constant = 1E-17
multiply_by_mass = true
area_quantity = 10
activation_energy = 22E3
one_over_T0 = 0.003354
[]
[rate_Phlogopite]
type = GeochemistryKineticRate
kinetic_species_name = Phlogopite
intrinsic_rate_constant = 1E-17
multiply_by_mass = true
area_quantity = 10
activation_energy = 22E3
one_over_T0 = 0.003354
[]
[rate_Laumontite]
type = GeochemistryKineticRate
kinetic_species_name = Laumontite
intrinsic_rate_constant = 1.0E-15
multiply_by_mass = true
area_quantity = 10
activation_energy = 17.8E3
one_over_T0 = 0.003354
[]
[rate_Zoisite]
type = GeochemistryKineticRate
kinetic_species_name = Zoisite
intrinsic_rate_constant = 1E-16
multiply_by_mass = true
area_quantity = 10
activation_energy = 66.1E3
one_over_T0 = 0.003354
[]
[definition]
type = GeochemicalModelDefinition
database_file = '../../../../geochemistry/database/moose_geochemdb.json'
basis_species = 'H2O H+ Na+ K+ Ca++ Mg++ SiO2(aq) Al+++ Cl- SO4-- HCO3-'
remove_all_extrapolated_secondary_species = true
kinetic_minerals = 'Albite Anhydrite Anorthite Calcite Chalcedony Clinochl-7A Illite K-feldspar Kaolinite Quartz Paragonite Phlogopite Zoisite Laumontite'
kinetic_rate_descriptions = 'rate_Albite rate_Anhydrite rate_Anorthite rate_Calcite rate_Chalcedony rate_Clinochl-7A rate_Illite rate_K-feldspar rate_Kaolinite rate_Quartz rate_Paragonite rate_Phlogopite rate_Zoisite rate_Laumontite'
[]
[nodal_void_volume_uo]
type = NodalVoidVolume
porosity = porosity
execute_on = 'initial timestep_end' # "initial" means this is evaluated properly for the first timestep
[]
[]
[SpatialReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
charge_balance_species = 'Cl-'
constraint_species = 'H2O H+ Na+ K+ Ca++ Mg++ SiO2(aq) Al+++ Cl- SO4-- HCO3-'
# Following numbers are from water_60_to_220degC_out.csv
constraint_value = ' 1.0006383866109 9.5165072498215e-07 0.100020379171 0.0059389061065 0.011570884507621 4.6626763057447e-06 0.0045110404925255 5.8096968688789e-17 0.13500708594394 6.6523540147676e-05 7.7361407898089e-05'
constraint_meaning = 'kg_solvent_water free_concentration free_concentration free_concentration free_concentration free_concentration free_concentration free_concentration bulk_composition free_concentration free_concentration'
constraint_unit = ' kg molal molal molal molal molal molal molal moles molal molal'
initial_temperature = 220
temperature = temperature
kinetic_species_name = ' Albite Anorthite K-feldspar Quartz Phlogopite Paragonite Calcite Anhydrite Chalcedony Illite Kaolinite Clinochl-7A Zoisite Laumontite'
kinetic_species_initial_value = '4.324073236492E+02 4.631370307325E+01 2.685015418378E+02 7.720095013956E+02 1.235192062541E+01 7.545461404965E-01 4.234651808835E-04 4.000485907930E-04 4.407616361072E+00 1.342524904876E+01 1.004823151125E+00 4.728132387707E-01 7.326007326007E-01 4.818116116598E-01'
kinetic_species_unit = ' moles moles moles moles moles moles moles moles moles moles moles moles moles moles'
evaluate_kinetic_rates_always = true # otherwise will easily "run out" of dissolving species
source_species_names = 'H2O H+ Na+ K+ Ca++ Mg++ SiO2(aq) Al+++ Cl- SO4-- HCO3-'
source_species_rates = 'rate_H2O_per_1l rate_H_per_1l rate_Na_per_1l rate_K_per_1l rate_Ca_per_1l rate_Mg_per_1l rate_SiO2_per_1l rate_Al_per_1l rate_Cl_per_1l rate_SO4_per_1l rate_HCO3_per_1l'
ramp_max_ionic_strength_initial = 0 # max_ionic_strength in such a simple problem does not need ramping
execute_console_output_on = ''
add_aux_molal = false # save some memory and reduce variables in output exodus
add_aux_mg_per_kg = false # save some memory and reduce variables in output exodus
add_aux_free_mg = false # save some memory and reduce variables in output exodus
add_aux_activity = false # save some memory and reduce variables in output exodus
add_aux_bulk_moles = false # save some memory and reduce variables in output exodus
adaptive_timestepping = true
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 15
ny = 10
xmin = -100
xmax = 200
ymin = -100
ymax = 100
[]
[injection_node]
input = gen
type = ExtraNodesetGenerator
new_boundary = injection_node
coord = '0 0 0'
[]
[]
[Executioner]
type = Transient
[TimeStepper]
type = FunctionDT
function = 'max(1E6, 0.3 * t)'
[]
end_time = 4E12
[]
[AuxVariables]
[temperature]
initial_condition = 220.0
[]
[porosity]
initial_condition = 0.01
[]
[nodal_void_volume]
[]
[free_cm3_Kfeldspar] # necessary because of the minus sign in K-feldspar which does not parse correctly in the porosity AuxKernel
[]
[free_cm3_Clinochl7A] # necessary because of the minus sign in Clinochl-7A which does not parse correctly in the porosity AuxKernel
[]
[pf_rate_H] # change in H mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_Na]
[]
[pf_rate_K]
[]
[pf_rate_Ca]
[]
[pf_rate_Mg]
[]
[pf_rate_SiO2]
[]
[pf_rate_Al]
[]
[pf_rate_Cl]
[]
[pf_rate_SO4]
[]
[pf_rate_HCO3]
[]
[pf_rate_H2O] # change in H2O mass (kg/s) at each node provided by the porous-flow simulation
[]
[rate_H_per_1l]
[]
[rate_Na_per_1l]
[]
[rate_K_per_1l]
[]
[rate_Ca_per_1l]
[]
[rate_Mg_per_1l]
[]
[rate_SiO2_per_1l]
[]
[rate_Al_per_1l]
[]
[rate_Cl_per_1l]
[]
[rate_SO4_per_1l]
[]
[rate_HCO3_per_1l]
[]
[rate_H2O_per_1l]
[]
[transported_H]
[]
[transported_Na]
[]
[transported_K]
[]
[transported_Ca]
[]
[transported_Mg]
[]
[transported_SiO2]
[]
[transported_Al]
[]
[transported_Cl]
[]
[transported_SO4]
[]
[transported_HCO3]
[]
[transported_H2O]
[]
[transported_mass]
[]
[massfrac_H]
[]
[massfrac_Na]
[]
[massfrac_K]
[]
[massfrac_Ca]
[]
[massfrac_Mg]
[]
[massfrac_SiO2]
[]
[massfrac_Al]
[]
[massfrac_Cl]
[]
[massfrac_SO4]
[]
[massfrac_HCO3]
[]
[massfrac_H2O]
[]
[]
[AuxKernels]
[free_cm3_Kfeldspar]
type = GeochemistryQuantityAux
variable = free_cm3_Kfeldspar
species = 'K-feldspar'
quantity = free_cm3
execute_on = 'timestep_begin timestep_end'
[]
[free_cm3_Clinochl7A]
type = GeochemistryQuantityAux
variable = free_cm3_Clinochl7A
species = 'Clinochl-7A'
quantity = free_cm3
execute_on = 'timestep_begin timestep_end'
[]
[porosity_auxk]
type = ParsedAux
coupled_variables = 'free_cm3_Albite free_cm3_Anhydrite free_cm3_Anorthite free_cm3_Calcite free_cm3_Chalcedony free_cm3_Clinochl7A free_cm3_Illite free_cm3_Kfeldspar free_cm3_Kaolinite free_cm3_Quartz free_cm3_Paragonite free_cm3_Phlogopite free_cm3_Zoisite free_cm3_Laumontite'
expression = '1000.0 / (1000.0 + free_cm3_Albite + free_cm3_Anhydrite + free_cm3_Anorthite + free_cm3_Calcite + free_cm3_Chalcedony + free_cm3_Clinochl7A + free_cm3_Illite + free_cm3_Kfeldspar + free_cm3_Kaolinite + free_cm3_Quartz + free_cm3_Paragonite + free_cm3_Phlogopite + free_cm3_Zoisite + free_cm3_Laumontite)'
variable = porosity
execute_on = 'timestep_end'
[]
[nodal_void_volume_auxk]
type = NodalVoidVolumeAux
variable = nodal_void_volume
nodal_void_volume_uo = nodal_void_volume_uo
execute_on = 'initial timestep_end' # "initial" to ensure it is properly evaluated for the first timestep
[]
[rate_H_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_H nodal_void_volume'
variable = rate_H_per_1l
expression = 'pf_rate_H / 1.0079 / nodal_void_volume'
execute_on = 'timestep_begin'
[]
[rate_Na_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_Na nodal_void_volume'
variable = rate_Na_per_1l
expression = 'pf_rate_Na / 22.9898 / nodal_void_volume'
execute_on = 'timestep_begin'
[]
[rate_K_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_K nodal_void_volume'
variable = rate_K_per_1l
expression = 'pf_rate_K / 39.0983 / nodal_void_volume'
execute_on = 'timestep_begin'
[]
[rate_Ca_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_Ca nodal_void_volume'
variable = rate_Ca_per_1l
expression = 'pf_rate_Ca / 40.08 / nodal_void_volume'
execute_on = 'timestep_begin'
[]
[rate_Mg_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_Mg nodal_void_volume'
variable = rate_Mg_per_1l
expression = 'pf_rate_Mg / 24.305 / nodal_void_volume'
execute_on = 'timestep_begin'
[]
[rate_SiO2_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_SiO2 nodal_void_volume'
variable = rate_SiO2_per_1l
expression = 'pf_rate_SiO2 / 60.0843 / nodal_void_volume'
execute_on = 'timestep_begin'
[]
[rate_Al_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_Al nodal_void_volume'
variable = rate_Al_per_1l
expression = 'pf_rate_Al / 26.9815 / nodal_void_volume'
execute_on = 'timestep_begin'
[]
[rate_Cl_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_Cl nodal_void_volume'
variable = rate_Cl_per_1l
expression = 'pf_rate_Cl / 35.453 / nodal_void_volume'
execute_on = 'timestep_begin'
[]
[rate_SO4_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_SO4 nodal_void_volume'
variable = rate_SO4_per_1l
expression = 'pf_rate_SO4 / 96.0576 / nodal_void_volume'
execute_on = 'timestep_begin'
[]
[rate_HCO3_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_HCO3 nodal_void_volume'
variable = rate_HCO3_per_1l
expression = 'pf_rate_HCO3 / 61.0171 / nodal_void_volume'
execute_on = 'timestep_begin'
[]
[rate_H2O_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_H2O nodal_void_volume'
variable = rate_H2O_per_1l
expression = 'pf_rate_H2O / 18.01801802 / nodal_void_volume'
execute_on = 'timestep_begin'
[]
[transported_H_auxk]
type = GeochemistryQuantityAux
variable = transported_H
species = 'H+'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_begin'
[]
[transported_Na_auxk]
type = GeochemistryQuantityAux
variable = transported_Na
species = 'Na+'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_begin'
[]
[transported_K_auxk]
type = GeochemistryQuantityAux
variable = transported_K
species = 'K+'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_begin'
[]
[transported_Ca_auxk]
type = GeochemistryQuantityAux
variable = transported_Ca
species = 'Ca++'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_begin'
[]
[transported_Mg_auxk]
type = GeochemistryQuantityAux
variable = transported_Mg
species = 'Mg++'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_begin'
[]
[transported_SiO2_auxk]
type = GeochemistryQuantityAux
variable = transported_SiO2
species = 'SiO2(aq)'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_begin'
[]
[transported_Al_auxk]
type = GeochemistryQuantityAux
variable = transported_Al
species = 'Al+++'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_begin'
[]
[transported_Cl_auxk]
type = GeochemistryQuantityAux
variable = transported_Cl
species = 'Cl-'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_begin'
[]
[transported_SO4_auxk]
type = GeochemistryQuantityAux
variable = transported_SO4
species = 'SO4--'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_begin'
[]
[transported_HCO3_auxk]
type = GeochemistryQuantityAux
variable = transported_HCO3
species = 'HCO3-'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_begin'
[]
[transported_H2O_auxk]
type = GeochemistryQuantityAux
variable = transported_H2O
species = 'H2O'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_begin'
[]
[transported_mass_auxk]
type = ParsedAux
coupled_variables = ' transported_H transported_Na transported_K transported_Ca transported_Mg transported_SiO2 transported_Al transported_Cl transported_SO4 transported_HCO3 transported_H2O'
variable = transported_mass
expression = 'transported_H * 1.0079 + transported_Cl * 35.453 + transported_SO4 * 96.0576 + transported_HCO3 * 61.0171 + transported_SiO2 * 60.0843 + transported_Al * 26.9815 + transported_Ca * 40.08 + transported_Mg * 24.305 + transported_K * 39.0983 + transported_Na * 22.9898 + transported_H2O * 18.01801802'
execute_on = 'timestep_end'
[]
[massfrac_H_auxk]
type = ParsedAux
coupled_variables = 'transported_H transported_mass'
variable = massfrac_H
expression = 'transported_H * 1.0079 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_Na_auxk]
type = ParsedAux
coupled_variables = 'transported_Na transported_mass'
variable = massfrac_Na
expression = 'transported_Na * 22.9898 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_K_auxk]
type = ParsedAux
coupled_variables = 'transported_K transported_mass'
variable = massfrac_K
expression = 'transported_K * 39.0983 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_Ca_auxk]
type = ParsedAux
coupled_variables = 'transported_Ca transported_mass'
variable = massfrac_Ca
expression = 'transported_Ca * 40.08 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_Mg_auxk]
type = ParsedAux
coupled_variables = 'transported_Mg transported_mass'
variable = massfrac_Mg
expression = 'transported_Mg * 24.305 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_SiO2_auxk]
type = ParsedAux
coupled_variables = 'transported_SiO2 transported_mass'
variable = massfrac_SiO2
expression = 'transported_SiO2 * 60.0843 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_Al_auxk]
type = ParsedAux
coupled_variables = 'transported_Al transported_mass'
variable = massfrac_Al
expression = 'transported_Al * 26.9815 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_Cl_auxk]
type = ParsedAux
coupled_variables = 'transported_Cl transported_mass'
variable = massfrac_Cl
expression = 'transported_Cl * 35.453 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_SO4_auxk]
type = ParsedAux
coupled_variables = 'transported_SO4 transported_mass'
variable = massfrac_SO4
expression = 'transported_SO4 * 96.0576 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_HCO3_auxk]
type = ParsedAux
coupled_variables = 'transported_HCO3 transported_mass'
variable = massfrac_HCO3
expression = 'transported_HCO3 * 61.0171 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_H2O_auxk]
type = ParsedAux
coupled_variables = 'transported_H2O transported_mass'
variable = massfrac_H2O
expression = 'transported_H2O * 18.01801802 / transported_mass'
execute_on = 'timestep_end'
[]
[]
[GlobalParams]
point = '0 0 0'
reactor = reactor
[]
[Postprocessors]
[temperature]
type = PointValue
variable = 'solution_temperature'
[]
[porosity]
type = PointValue
variable = porosity
[]
[solution_temperature]
type = PointValue
variable = solution_temperature
[]
[massfrac_H]
type = PointValue
variable = massfrac_H
[]
[massfrac_Na]
type = PointValue
variable = massfrac_Na
[]
[massfrac_K]
type = PointValue
variable = massfrac_K
[]
[massfrac_Ca]
type = PointValue
variable = massfrac_Ca
[]
[massfrac_Mg]
type = PointValue
variable = massfrac_Mg
[]
[massfrac_SiO2]
type = PointValue
variable = massfrac_SiO2
[]
[massfrac_Al]
type = PointValue
variable = massfrac_Al
[]
[massfrac_Cl]
type = PointValue
variable = massfrac_Cl
[]
[massfrac_SO4]
type = PointValue
variable = massfrac_SO4
[]
[massfrac_HCO3]
type = PointValue
variable = massfrac_HCO3
[]
[massfrac_H2O]
type = PointValue
variable = massfrac_H2O
[]
[cm3_Albite]
type = PointValue
variable = 'free_cm3_Albite'
[]
[cm3_Anhydrite]
type = PointValue
variable = 'free_cm3_Anhydrite'
[]
[cm3_Anorthite]
type = PointValue
variable = 'free_cm3_Anorthite'
[]
[cm3_Calcite]
type = PointValue
variable = 'free_cm3_Calcite'
[]
[cm3_Chalcedony]
type = PointValue
variable = 'free_cm3_Chalcedony'
[]
[cm3_Clinochl-7A]
type = PointValue
variable = 'free_cm3_Clinochl-7A'
[]
[cm3_Illite]
type = PointValue
variable = 'free_cm3_Illite'
[]
[cm3_K-feldspar]
type = PointValue
variable = 'free_cm3_K-feldspar'
[]
[cm3_Kaolinite]
type = PointValue
variable = 'free_cm3_Kaolinite'
[]
[cm3_Quartz]
type = PointValue
variable = 'free_cm3_Quartz'
[]
[cm3_Paragonite]
type = PointValue
variable = 'free_cm3_Paragonite'
[]
[cm3_Phlogopite]
type = PointValue
variable = 'free_cm3_Phlogopite'
[]
[cm3_Zoisite]
type = PointValue
variable = 'free_cm3_Zoisite'
[]
[cm3_Laumontite]
type = PointValue
variable = 'free_cm3_Laumontite'
[]
[cm3_mineral]
type = LinearCombinationPostprocessor
pp_names = 'cm3_Albite cm3_Anhydrite cm3_Anorthite cm3_Calcite cm3_Chalcedony cm3_Clinochl-7A cm3_Illite cm3_K-feldspar cm3_Kaolinite cm3_Quartz cm3_Paragonite cm3_Phlogopite cm3_Zoisite cm3_Laumontite'
pp_coefs = '1 1 1 1 1 1 1 1 1 1 1 1 1 1'
[]
[pH]
type = PointValue
variable = 'pH'
[]
[]
[Outputs]
[exo]
type = Exodus
execute_on = final
[]
csv = true
[]
(test/tests/mortar/ad_periodic_segmental_constraint/penalty_periodic_simple2d.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -1.0
xmax = 1.0
ymin = -1.0
ymax = 1.0
nx = 2
ny = 2
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_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[left]
type = LowerDBlockFromSidesetGenerator
input = left_block_id
sidesets = '13'
new_block_id = '10003'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '11'
new_block_id = '10001'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_top'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = top
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[epsilon]
order = SECOND
family = SCALAR
[]
[]
[AuxVariables]
[sigma]
order = SECOND
family = SCALAR
[]
[]
[AuxScalarKernels]
[sigma]
type = FunctionScalarAux
variable = sigma
function = '1 2'
execute_on = initial #timestep_end
[]
[]
[Kernels]
[diff1]
type = ADDiffusion
variable = u
block = 1
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = ADPenaltyEqualValueConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodiclr]
type = ADPenaltyPeriodicSegmentalConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[mortarbt]
type = ADPenaltyEqualValueConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodicbt]
type = ADPenaltyPeriodicSegmentalConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
# exodus = true
csv = true
[]
(modules/solid_mechanics/test/tests/j2_plasticity/solid_mechanics_j2plasticity.i)
[Mesh]
displacements = 'x_disp y_disp z_disp'
[generated_mesh]
type = GeneratedMeshGenerator
elem_type = HEX8
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
zmin = 0.0
zmax = 1.0
[]
[cnode]
type = ExtraNodesetGenerator
coord = '0.0 0.0 0.0'
new_boundary = 6
input = generated_mesh
[]
[snode]
type = ExtraNodesetGenerator
coord = '1.0 0.0 0.0'
new_boundary = 7
input = cnode
[]
[]
[Variables]
[./x_disp]
order = FIRST
family = LAGRANGE
[../]
[./y_disp]
order = FIRST
family = LAGRANGE
[../]
[./z_disp]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'x_disp y_disp z_disp'
use_displaced_mesh = true
[../]
[]
[Materials]
[./fplastic]
type = FiniteStrainPlasticMaterial
block=0
yield_stress='0. 445. 0.05 610. 0.1 680. 0.38 810. 0.95 920. 2. 950.'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
C_ijkl = '2.827e5 1.21e5 1.21e5 2.827e5 1.21e5 2.827e5 0.808e5 0.808e5 0.808e5'
fill_method = symmetric9
[../]
[./strain]
type = ComputeFiniteStrain
block = 0
displacements = 'x_disp y_disp z_disp'
[../]
[]
[Functions]
[./topfunc]
type = ParsedFunction
expression = 't'
[../]
[]
[BCs]
[./bottom3]
type = DirichletBC
variable = z_disp
boundary = 0
value = 0.0
[../]
[./top]
type = FunctionDirichletBC
variable = z_disp
boundary = 5
function = topfunc
[../]
[./corner1]
type = DirichletBC
variable = x_disp
boundary = 6
value = 0.0
[../]
[./corner2]
type = DirichletBC
variable = y_disp
boundary = 6
value = 0.0
[../]
[./corner3]
type = DirichletBC
variable = z_disp
boundary = 6
value = 0.0
[../]
[./side1]
type = DirichletBC
variable = y_disp
boundary = 7
value = 0.0
[../]
[./side2]
type = DirichletBC
variable = z_disp
boundary = 7
value = 0.0
[../]
[]
[AuxVariables]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./peeq]
order = CONSTANT
family = MONOMIAL
[../]
[./pe11]
order = CONSTANT
family = MONOMIAL
[../]
[./pe22]
order = CONSTANT
family = MONOMIAL
[../]
[./pe33]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./pe11]
type = RankTwoAux
rank_two_tensor = plastic_strain
variable = pe11
index_i = 0
index_j = 0
[../]
[./pe22]
type = RankTwoAux
rank_two_tensor = plastic_strain
variable = pe22
index_i = 1
index_j = 1
[../]
[./pe33]
type = RankTwoAux
rank_two_tensor = plastic_strain
variable = pe33
index_i = 2
index_j = 2
[../]
[./eqv_plastic_strain]
type = MaterialRealAux
property = eqv_plastic_strain
variable = peeq
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full=true
[../]
[]
[Executioner]
type = Transient
dt=0.1
dtmax=1
dtmin=0.1
end_time=1.0
nl_abs_tol = 1e-10
[]
[Outputs]
file_base = out
exodus = true
[]
(modules/combined/examples/effective_properties/effective_th_cond.i)
# This example calculates the effective thermal conductivity across a microstructure
# with circular second phase precipitates. Two methods are used to calculate the effective thermal conductivity,
# the direct method that applies a temperature to one side and a heat flux to the other,
# and the AEH method.
[Mesh] #Sets mesh size to 10 microns by 10 microns
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 100
xmax = 10
ymax = 10
[]
[new_nodeset]
input = gen
type = ExtraNodesetGenerator
coord = '5 5'
new_boundary = 100
[]
[]
[Variables] #Adds variables needed for two ways of calculating effective thermal cond.
[T] #Temperature used for the direct calculation
initial_condition = 800
[]
[Tx_AEH] #Temperature used for the x-component of the AEH solve
initial_condition = 800
scaling = 1.0e4 #Scales residual to improve convergence
[]
[Ty_AEH] #Temperature used for the y-component of the AEH solve
initial_condition = 800
scaling = 1.0e4 #Scales residual to improve convergence
[]
[]
[AuxVariables] #Creates second constant phase
[phase2]
[]
[]
[ICs] #Sets the IC for the second constant phase
[phase2_IC] #Creates circles with smooth interfaces at random locations
variable = phase2
type = MultiSmoothCircleIC
int_width = 0.3
numbub = 20
bubspac = 1.5
radius = 0.5
outvalue = 0
invalue = 1
block = 0
[]
[]
[Kernels]
[HtCond] #Kernel for direct calculation of thermal cond
type = HeatConduction
variable = T
[]
[heat_x] #All other kernels are for AEH approach to calculate thermal cond.
type = HeatConduction
variable = Tx_AEH
[]
[heat_rhs_x]
type = HomogenizedHeatConduction
variable = Tx_AEH
component = 0
[]
[heat_y]
type = HeatConduction
variable = Ty_AEH
[]
[heat_rhs_y]
type = HomogenizedHeatConduction
variable = Ty_AEH
component = 1
[]
[]
[BCs]
[Periodic]
[all]
auto_direction = 'x y'
variable = 'Tx_AEH Ty_AEH'
[]
[]
[left_T] #Fix temperature on the left side
type = DirichletBC
variable = T
boundary = left
value = 800
[]
[right_flux] #Set heat flux on the right side
type = NeumannBC
variable = T
boundary = right
value = 5e-6
[]
[fix_x] #Fix Tx_AEH at a single point
type = DirichletBC
variable = Tx_AEH
value = 800
boundary = 100
[]
[fix_y] #Fix Ty_AEH at a single point
type = DirichletBC
variable = Ty_AEH
value = 800
boundary = 100
[]
[]
[Materials]
[thcond] #The equation defining the thermal conductivity is defined here, using two ifs
# The k in the bulk is k_b, in the precipitate k_p2, and across the interaface k_int
type = ParsedMaterial
block = 0
constant_names = 'length_scale k_b k_p2 k_int'
constant_expressions = '1e-6 5 1 0.1'
expression = 'sk_b:= length_scale*k_b; sk_p2:= length_scale*k_p2; sk_int:= k_int*length_scale; if(phase2>0.1,if(phase2>0.95,sk_p2,sk_int),sk_b)'
outputs = exodus
f_name = thermal_conductivity
coupled_variables = phase2
[]
[]
[Postprocessors]
[right_T]
type = SideAverageValue
variable = T
boundary = right
[]
[k_x_direct] #Effective thermal conductivity from direct method
# This value is lower than the AEH value because it is impacted by second phase
# on the right boundary
type = ThermalConductivity
variable = T
flux = 5e-6
length_scale = 1e-06
T_hot = 800
dx = 10
boundary = right
[]
[k_x_AEH] #Effective thermal conductivity in x-direction from AEH
type = HomogenizedThermalConductivity
chi = 'Tx_AEH Ty_AEH'
row = 0
col = 0
scale_factor = 1e6 #Scale due to length scale of problem
[]
[k_y_AEH] #Effective thermal conductivity in x-direction from AEH
type = HomogenizedThermalConductivity
chi = 'Tx_AEH Ty_AEH'
row = 1
col = 1
scale_factor = 1e6 #Scale due to length scale of problem
[]
[]
[Preconditioning]
[SMP]
type = SMP
off_diag_row = 'Tx_AEH Ty_AEH'
off_diag_column = 'Ty_AEH Tx_AEH'
[]
[]
[Executioner]
type = Steady
l_max_its = 15
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart -pc_hypre_boomeramg_strong_threshold'
petsc_options_value = 'hypre boomeramg 31 0.7'
l_tol = 1e-04
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
csv = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/energy_source/steady.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./velocity]
family = LAGRANGE_VEC
[../]
[./p]
[../]
[temperature][]
[]
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
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
[../]
[./temperature_advection]
type = INSADEnergyAdvection
variable = temperature
[../]
[./temperature_conduction]
type = ADHeatConduction
variable = temperature
thermal_conductivity = 'k'
[../]
[temperature_source]
type = INSADEnergySource
variable = temperature
source_function = 1
[]
[temperature_supg]
type = INSADEnergySUPG
variable = temperature
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
[../]
[./temperature_hot]
type = DirichletBC
variable = temperature
boundary = 'bottom'
value = 1
[../]
[./temperature_cold]
type = DirichletBC
variable = temperature
boundary = 'top'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat]
type = INSADStabilized3Eqn
velocity = velocity
pressure = p
temperature = temperature
[]
[]
[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)'
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_factor_levels -ksp_gmres_restart'
petsc_options_value = 'asm 6 200'
line_search = 'none'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/anisotropic_plasticity/ad_aniso_plasticity_x_rotate.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 2
nz = 2
xmin = 0.0
ymin = 0.0
zmin = 0.0
xmax = 10.0
ymax = 1.0
zmax = 1.0
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = '100'
nodes = '3 69'
input = gen
[]
[corner_node_2]
type = ExtraNodesetGenerator
new_boundary = '101'
nodes = '4 47'
input = corner_node
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[elastic_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[plasticity_strain_xx]
type = ADRankTwoAux
rank_two_tensor = trial_plasticity_plastic_strain
variable = plastic_strain_xx
index_i = 0
index_j = 0
[]
[plasticity_strain_xy]
type = ADRankTwoAux
rank_two_tensor = trial_plasticity_plastic_strain
variable = plastic_strain_xy
index_i = 0
index_j = 1
[]
[plasticity_strain_yy]
type = ADRankTwoAux
rank_two_tensor = trial_plasticity_plastic_strain
variable = plastic_strain_yy
index_i = 1
index_j = 1
[]
[plasticity_strain_zz]
type = ADRankTwoAux
rank_two_tensor = trial_plasticity_plastic_strain
variable = plastic_strain_zz
index_i = 2
index_j = 2
[]
[sigma_xx]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 1
index_j = 1
[]
[elastic_strain_yy]
type = ADRankTwoAux
rank_two_tensor = elastic_strain
variable = elastic_strain_yy
index_i = 1
index_j = 1
[]
[sigma_yy]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1e1 1e8'
y = '0 -4e2 -4e2'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_xx stress_xx'
use_automatic_differentiation = true
add_variables = true
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 70000
poissons_ratio = 0.25
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "trial_plasticity"
max_iterations = 50
absolute_tolerance = 1e-16
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
hill_constants = "0.5829856 0.364424 0.6342174 2.0691375 2.3492325 1.814589"
base_name = trial_plasticity
rotation_angles = '90 90 90'
[]
[trial_plasticity]
type = ADHillPlasticityStressUpdate
hardening_constant = 2000.0
yield_stress = 0.001 # was 200 for verification
absolute_tolerance = 1e-14
relative_tolerance = 1e-12
base_name = trial_plasticity
internal_solve_full_iteration_history = true
max_inelastic_increment = 2.0e-6
internal_solve_output_on = on_error
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = 100
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = 101
value = 0.0
[]
[Pressure]
[Side1]
boundary = right
function = pull
[]
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-11
nl_abs_tol = 1.0e-14
l_max_its = 90
num_steps = 25
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 30
iteration_window = 9
growth_factor = 1.05
cutback_factor = 0.5
timestep_limiting_postprocessor = matl_ts_min
dt = 1.0e-5
time_t = '0 3.4e-5 10'
time_dt = '1.0e-5 1.0e-7 1.0e-7'
[]
start_time = 0
automatic_scaling = true
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[num_lin]
type = NumLinearIterations
outputs = console
[]
[num_nonlin]
type = NumNonlinearIterations
outputs = console
[]
[plasticity_strain_yy]
type = ElementalVariableValue
variable = plastic_strain_yy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[elastic_strain_yy]
type = ElementalVariableValue
variable = elastic_strain_yy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[sigma_yy]
type = ElementalVariableValue
variable = stress_yy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[plasticity_strain_xx]
type = ElementalVariableValue
variable = plastic_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[elastic_strain_xx]
type = ElementalVariableValue
variable = elastic_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[sigma_xx]
type = ElementalVariableValue
variable = stress_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[plasticity_strain_zz]
type = ElementalVariableValue
variable = plastic_strain_zz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/combined/examples/mortar/eigenstrain.i)
#
# Eigenstrain with Mortar gradient periodicity
#
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 50
ny = 50
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
[]
[./cnode]
input = gen
type = ExtraNodesetGenerator
coord = '0.0 0.0'
new_boundary = 100
[../]
[./anode]
input = cnode
type = ExtraNodesetGenerator
coord = '0.0 0.5'
new_boundary = 101
[../]
[secondary_x]
input = anode
type = LowerDBlockFromSidesetGenerator
sidesets = '3'
new_block_id = 10
new_block_name = "secondary_x"
[]
[primary_x]
input = secondary_x
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = 12
new_block_name = "primary_x"
[]
[secondary_y]
input = primary_x
type = LowerDBlockFromSidesetGenerator
sidesets = '0'
new_block_id = 11
new_block_name = "secondary_y"
[]
[primary_y]
input = secondary_y
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = 13
new_block_name = "primary_y"
[]
[]
[GlobalParams]
derivative_order = 2
enable_jit = true
displacements = 'disp_x disp_y'
[]
# AuxVars to compute the free energy density for outputting
[AuxVariables]
[./local_energy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./local_free_energy]
type = TotalFreeEnergy
block = 0
execute_on = 'initial LINEAR'
variable = local_energy
interfacial_vars = 'c'
kappa_names = 'kappa_c'
[../]
[]
[Variables]
# Solute concentration variable
[./c]
[./InitialCondition]
type = RandomIC
min = 0.49
max = 0.51
[../]
block = 0
[../]
[./w]
block = 0
[../]
# Mesh displacement
[./disp_x]
block = 0
[../]
[./disp_y]
block = 0
[../]
# Lagrange multipliers for gradient component periodicity
[./lm_left_right_xx]
order = FIRST
family = LAGRANGE
block = secondary_x
[../]
[./lm_left_right_xy]
order = FIRST
family = LAGRANGE
block = secondary_x
[../]
[./lm_left_right_yx]
order = FIRST
family = LAGRANGE
block = secondary_x
[../]
[./lm_left_right_yy]
order = FIRST
family = LAGRANGE
block = secondary_x
[../]
[./lm_up_down_xx]
order = FIRST
family = LAGRANGE
block = secondary_y
[../]
[./lm_up_down_xy]
order = FIRST
family = LAGRANGE
block = secondary_y
[../]
[./lm_up_down_yx]
order = FIRST
family = LAGRANGE
block = secondary_y
[../]
[./lm_up_down_yy]
order = FIRST
family = LAGRANGE
block = secondary_y
[../]
[]
[Constraints]
[./ud_disp_x_grad_x]
type = EqualGradientConstraint
variable = lm_up_down_xx
component = 0
secondary_variable = disp_x
secondary_boundary = bottom
primary_boundary = top
secondary_subdomain = secondary_y
primary_subdomain = primary_y
periodic = true
[../]
[./ud_disp_x_grad_y]
type = EqualGradientConstraint
variable = lm_up_down_xy
component = 1
secondary_variable = disp_x
secondary_boundary = bottom
primary_boundary = top
secondary_subdomain = secondary_y
primary_subdomain = primary_y
periodic = true
[../]
[./ud_disp_y_grad_x]
type = EqualGradientConstraint
variable = lm_up_down_yx
component = 0
secondary_variable = disp_y
secondary_boundary = bottom
primary_boundary = top
secondary_subdomain = secondary_y
primary_subdomain = primary_y
periodic = true
[../]
[./ud_disp_y_grad_y]
type = EqualGradientConstraint
variable = lm_up_down_yy
component = 1
secondary_variable = disp_y
secondary_boundary = bottom
primary_boundary = top
secondary_subdomain = secondary_y
primary_subdomain = primary_y
periodic = true
[../]
[./lr_disp_x_grad_x]
type = EqualGradientConstraint
variable = lm_left_right_xx
component = 0
secondary_variable = disp_x
secondary_boundary = left
primary_boundary = right
secondary_subdomain = secondary_x
primary_subdomain = primary_x
periodic = true
[../]
[./lr_disp_x_grad_y]
type = EqualGradientConstraint
variable = lm_left_right_xy
component = 1
secondary_variable = disp_x
secondary_boundary = left
primary_boundary = right
secondary_subdomain = secondary_x
primary_subdomain = primary_x
periodic = true
[../]
[./lr_disp_y_grad_x]
type = EqualGradientConstraint
variable = lm_left_right_yx
component = 0
secondary_variable = disp_y
secondary_boundary = left
primary_boundary = right
secondary_subdomain = secondary_x
primary_subdomain = primary_x
periodic = true
[../]
[./lr_disp_y_grad_y]
type = EqualGradientConstraint
variable = lm_left_right_yy
component = 1
secondary_variable = disp_y
secondary_boundary = left
primary_boundary = right
secondary_subdomain = secondary_x
primary_subdomain = primary_x
periodic = true
[../]
[]
[Kernels]
# Set up stress divergence kernels
[./TensorMechanics]
block = 0
[../]
# Cahn-Hilliard kernels
[./c_dot]
type = CoupledTimeDerivative
variable = w
v = c
block = 0
[../]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
block = 0
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
block = 0
[../]
[]
[Materials]
# declare a few constants, such as mobilities (L,M) and interface gradient prefactors (kappa*)
[./consts]
type = GenericConstantMaterial
block = '0 10 11'
prop_names = 'M kappa_c'
prop_values = '0.2 0.01 '
[../]
[./shear1]
type = GenericConstantRankTwoTensor
block = 0
tensor_values = '0 0 0 0 0 0.5'
tensor_name = shear1
[../]
[./shear2]
type = GenericConstantRankTwoTensor
block = 0
tensor_values = '0 0 0 0 0 -0.5'
tensor_name = shear2
[../]
[./expand3]
type = GenericConstantRankTwoTensor
block = 0
tensor_values = '1 1 0 0 0 0'
tensor_name = expand3
[../]
[./weight1]
type = DerivativeParsedMaterial
block = 0
expression = '0.3*c^2'
property_name = weight1
coupled_variables = c
[../]
[./weight2]
type = DerivativeParsedMaterial
block = 0
expression = '0.3*(1-c)^2'
property_name = weight2
coupled_variables = c
[../]
[./weight3]
type = DerivativeParsedMaterial
block = 0
expression = '4*(0.5-c)^2'
property_name = weight3
coupled_variables = c
[../]
# matrix phase
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
C_ijkl = '1 1'
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y'
eigenstrain_names = eigenstrain
[../]
[./eigenstrain]
type = CompositeEigenstrain
block = 0
tensors = 'shear1 shear2 expand3'
weights = 'weight1 weight2 weight3'
args = c
eigenstrain_name = eigenstrain
[../]
[./stress]
type = ComputeLinearElasticStress
block = 0
[../]
# chemical free energies
[./chemical_free_energy]
type = DerivativeParsedMaterial
block = 0
property_name = Fc
expression = '4*c^2*(1-c)^2'
coupled_variables = 'c'
outputs = exodus
output_properties = Fc
[../]
# elastic free energies
[./elastic_free_energy]
type = ElasticEnergyMaterial
f_name = Fe
block = 0
args = 'c'
outputs = exodus
output_properties = Fe
[../]
# free energy (chemical + elastic)
[./free_energy]
type = DerivativeSumMaterial
block = 0
property_name = F
sum_materials = 'Fc Fe'
coupled_variables = 'c'
[../]
[]
[BCs]
[./Periodic]
[./up_down]
primary = top
secondary = bottom
translation = '0 -1 0'
variable = 'c w'
[../]
[./left_right]
primary = left
secondary = right
translation = '1 0 0'
variable = 'c w'
[../]
[../]
# fix center point location
[./centerfix_x]
type = DirichletBC
boundary = 100
variable = disp_x
value = 0
[../]
[./centerfix_y]
type = DirichletBC
boundary = 100
variable = disp_y
value = 0
[../]
# fix side point x coordinate to inhibit rotation
[./angularfix]
type = DirichletBC
boundary = 101
variable = disp_x
value = 0
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
# We monitor the total free energy and the total solute concentration (should be constant)
[Postprocessors]
[./total_free_energy]
type = ElementIntegralVariablePostprocessor
block = 0
execute_on = 'initial TIMESTEP_END'
variable = local_energy
[../]
[./total_solute]
type = ElementIntegralVariablePostprocessor
block = 0
execute_on = 'initial TIMESTEP_END'
variable = c
[../]
[./min]
type = ElementExtremeValue
block = 0
execute_on = 'initial TIMESTEP_END'
value_type = min
variable = c
[../]
[./max]
type = ElementExtremeValue
block = 0
execute_on = 'initial TIMESTEP_END'
value_type = max
variable = c
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'PJFNK'
line_search = basic
# mortar currently does not support MPI parallelization
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = ' lu NONZERO 1e-10'
l_max_its = 30
nl_max_its = 12
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-10
start_time = 0.0
num_steps = 200
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.01
[../]
[]
[Outputs]
execute_on = 'timestep_end'
print_linear_residuals = false
exodus = true
[./table]
type = CSV
delimiter = ' '
[../]
[]
(modules/combined/examples/publications/rapid_dev/fig8.i)
#
# Fig. 8 input for 10.1016/j.commatsci.2017.02.017
# D. Schwen et al./Computational Materials Science 132 (2017) 36-45
# Two growing particles with differnet anisotropic Eigenstrains
#
[Mesh]
[./gen]
type = GeneratedMeshGenerator
dim = 2
nx = 80
ny = 40
xmin = -20
xmax = 20
ymin = 0
ymax = 20
elem_type = QUAD4
[../]
[./cnode]
type = ExtraNodesetGenerator
input = gen
coord = '0.0 0.0'
new_boundary = 100
tolerance = 0.1
[../]
[]
[GlobalParams]
# CahnHilliard needs the third derivatives
derivative_order = 3
enable_jit = true
displacements = 'disp_x disp_y'
int_width = 1
[]
# AuxVars to compute the free energy density for outputting
[AuxVariables]
[./local_energy]
order = CONSTANT
family = MONOMIAL
[../]
[./cross_energy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./local_free_energy]
type = TotalFreeEnergy
variable = local_energy
interfacial_vars = 'c'
kappa_names = 'kappa_c'
additional_free_energy = cross_energy
execute_on = 'INITIAL TIMESTEP_END'
[../]
[./cross_terms]
type = CrossTermGradientFreeEnergy
variable = cross_energy
interfacial_vars = 'eta1 eta2 eta3'
kappa_names = 'kappa11 kappa12 kappa13
kappa21 kappa22 kappa23
kappa31 kappa32 kappa33'
execute_on = 'INITIAL TIMESTEP_END'
[../]
[]
# particle x positions and radius
P1X=8
P2X=-4
PR=2
[Variables]
# Solute concentration variable
[./c]
[./InitialCondition]
type = SpecifiedSmoothCircleIC
x_positions = '${P1X} ${P2X}'
y_positions = '0 0'
z_positions = '0 0'
radii = '${PR} ${PR}'
outvalue = 0.5
invalue = 0.9
[../]
[../]
[./w]
[../]
# Order parameter for the Matrix
[./eta1]
[./InitialCondition]
type = SpecifiedSmoothCircleIC
x_positions = '${P1X} ${P2X}'
y_positions = '0 0'
z_positions = '0 0'
radii = '${PR} ${PR}'
outvalue = 1.0
invalue = 0.0
[../]
[../]
# Order parameters for the 2 different inclusion orientations
[./eta2]
[./InitialCondition]
type = SmoothCircleIC
x1 = ${P2X}
y1 = 0
radius = ${PR}
invalue = 1.0
outvalue = 0.0
[../]
[../]
[./eta3]
[./InitialCondition]
type = SmoothCircleIC
x1 = ${P1X}
y1 = 0
radius = ${PR}
invalue = 1.0
outvalue = 0.0
[../]
[../]
# Lagrange-multiplier
[./lambda]
initial_condition = 1.0
[../]
[]
[Modules]
[./TensorMechanics]
[./Master]
[./all]
add_variables = true
strain = SMALL
eigenstrain_names = eigenstrain
[../]
[../]
[../]
[]
[Kernels]
# Split Cahn-Hilliard kernels
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
args = 'eta1 eta2 eta3'
kappa_name = kappa_c
w = w
[../]
[./wres]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
# Allen-Cahn and Lagrange-multiplier constraint kernels for order parameter 1
[./deta1dt]
type = TimeDerivative
variable = eta1
[../]
[./ACBulk1]
type = AllenCahn
variable = eta1
args = 'eta2 eta3 c'
mob_name = L1
f_name = F
[../]
[./ACInterface1]
type = ACMultiInterface
variable = eta1
etas = 'eta1 eta2 eta3'
mob_name = L1
kappa_names = 'kappa11 kappa12 kappa13'
[../]
[./lagrange1]
type = SwitchingFunctionConstraintEta
variable = eta1
h_name = h1
lambda = lambda
[../]
# Allen-Cahn and Lagrange-multiplier constraint kernels for order parameter 2
[./deta2dt]
type = TimeDerivative
variable = eta2
[../]
[./ACBulk2]
type = AllenCahn
variable = eta2
args = 'eta1 eta3 c'
mob_name = L2
f_name = F
[../]
[./ACInterface2]
type = ACMultiInterface
variable = eta2
etas = 'eta1 eta2 eta3'
mob_name = L2
kappa_names = 'kappa21 kappa22 kappa23'
[../]
[./lagrange2]
type = SwitchingFunctionConstraintEta
variable = eta2
h_name = h2
lambda = lambda
[../]
# Allen-Cahn and Lagrange-multiplier constraint kernels for order parameter 3
[./deta3dt]
type = TimeDerivative
variable = eta3
[../]
[./ACBulk3]
type = AllenCahn
variable = eta3
args = 'eta1 eta2 c'
mob_name = L3
f_name = F
[../]
[./ACInterface3]
type = ACMultiInterface
variable = eta3
etas = 'eta1 eta2 eta3'
mob_name = L3
kappa_names = 'kappa31 kappa32 kappa33'
[../]
[./lagrange3]
type = SwitchingFunctionConstraintEta
variable = eta3
h_name = h3
lambda = lambda
[../]
# Lagrange-multiplier constraint kernel for lambda
[./lagrange]
type = SwitchingFunctionConstraintLagrange
variable = lambda
etas = 'eta1 eta2 eta3'
h_names = 'h1 h2 h3'
epsilon = 1e-6
[../]
[]
[Materials]
# declare a few constants, such as mobilities (L,M) and interface gradient prefactors (kappa*)
[./consts]
type = GenericConstantMaterial
block = 0
prop_names = 'M kappa_c L1 L2 L3 kappa11 kappa12 kappa13 kappa21 kappa22 kappa23 kappa31 kappa32 kappa33'
prop_values = '0.2 0.5 1 1 1 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 2.00 '
[../]
# We use this to output the level of constraint enforcement
# ideally it should be 0 everywhere, if the constraint is fully enforced
[./etasummat]
type = ParsedMaterial
property_name = etasum
coupled_variables = 'eta1 eta2 eta3'
material_property_names = 'h1 h2 h3'
expression = 'h1+h2+h3-1'
outputs = exodus
[../]
# This parsed material creates a single property for visualization purposes.
# It will be 0 for phase 1, -1 for phase 2, and 1 for phase 3
[./phasemap]
type = ParsedMaterial
property_name = phase
coupled_variables = 'eta2 eta3'
expression = 'if(eta3>0.5,1,0)-if(eta2>0.5,1,0)'
outputs = exodus
[../]
# global mechanical properties
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '400 400'
fill_method = symmetric_isotropic
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
# eigenstrain
[./eigenstrain_2]
type = GenericConstantRankTwoTensor
tensor_name = s2
tensor_values = '0 -0.05 0 0 0 0'
[../]
[./eigenstrain_3]
type = GenericConstantRankTwoTensor
tensor_name = s3
tensor_values = '-0.05 0 0 0 0 0'
[../]
[./eigenstrain]
type = CompositeEigenstrain
weights = 'h2 h3'
tensors = 's2 s3'
args = 'eta2 eta3'
eigenstrain_name = eigenstrain
[../]
# switching functions
[./switching1]
type = SwitchingFunctionMaterial
function_name = h1
eta = eta1
h_order = SIMPLE
[../]
[./switching2]
type = SwitchingFunctionMaterial
function_name = h2
eta = eta2
h_order = SIMPLE
[../]
[./switching3]
type = SwitchingFunctionMaterial
function_name = h3
eta = eta3
h_order = SIMPLE
[../]
[./barrier]
type = MultiBarrierFunctionMaterial
etas = 'eta1 eta2 eta3'
[../]
# chemical free energies
[./chemical_free_energy_1]
type = DerivativeParsedMaterial
property_name = Fc1
expression = '4*c^2'
coupled_variables = 'c'
derivative_order = 2
[../]
[./chemical_free_energy_2]
type = DerivativeParsedMaterial
property_name = Fc2
expression = '(c-0.9)^2-0.4'
coupled_variables = 'c'
derivative_order = 2
[../]
[./chemical_free_energy_3]
type = DerivativeParsedMaterial
property_name = Fc3
expression = '(c-0.9)^2-0.5'
coupled_variables = 'c'
derivative_order = 2
[../]
# global chemical free energy
[./chemical_free_energy]
type = DerivativeMultiPhaseMaterial
f_name = Fc
fi_names = 'Fc1 Fc2 Fc3'
hi_names = 'h1 h2 h3'
etas = 'eta1 eta2 eta3'
coupled_variables = 'c'
W = 3
[../]
# global elastic free energy
[./elastic_free_energy]
type = ElasticEnergyMaterial
f_name = Fe
args = 'eta2 eta3'
outputs = exodus
output_properties = Fe
derivative_order = 2
[../]
# Penalize phase 2 and 3 coexistence
[./multi_phase_penalty]
type = DerivativeParsedMaterial
property_name = Fp
expression = '50*(eta2*eta3)^2'
coupled_variables = 'eta2 eta3'
derivative_order = 2
outputs = exodus
output_properties = Fp
[../]
# free energy
[./free_energy]
type = DerivativeSumMaterial
property_name = F
sum_materials = 'Fc Fe Fp'
coupled_variables = 'c eta1 eta2 eta3'
derivative_order = 2
[../]
[]
[BCs]
# fix center point location
[./centerfix_x]
type = DirichletBC
boundary = 100
variable = disp_x
value = 0
[../]
# fix side point x coordinate to inhibit rotation
[./angularfix]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
# We monitor the total free energy and the total solute concentration (should be constant)
[Postprocessors]
[./total_free_energy]
type = ElementIntegralVariablePostprocessor
variable = local_energy
execute_on = 'INITIAL TIMESTEP_END'
[../]
[./total_solute]
type = ElementIntegralVariablePostprocessor
variable = c
execute_on = 'INITIAL TIMESTEP_END'
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu'
l_max_its = 30
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-10
start_time = 0.0
end_time = 12.0
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 8
iteration_window = 1
dt = 0.01
[../]
[]
[Outputs]
print_linear_residuals = false
execute_on = 'INITIAL TIMESTEP_END'
exodus = true
[./table]
type = CSV
delimiter = ' '
[../]
[]
[Debug]
# show_var_residual_norms = true
[]
(modules/solid_mechanics/test/tests/finite_strain_elastic_anisotropy/3d_bar_orthotropic_full_rotation_ad.i)
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
xmin = 0
xmax = 2
ymin = 0
ymax = 10
zmin = 0
zmax = 2
nx = 1
ny = 1
nz = 1
elem_type = HEX8
[]
[corner]
type = ExtraNodesetGenerator
new_boundary = 101
coord = '0 0 0'
input = generated_mesh
[]
[side]
type = ExtraNodesetGenerator
new_boundary = 102
coord = '2 0 0'
input = corner
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
use_finite_deform_jacobian = true
volumetric_locking_correction = false
generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_xz'
use_automatic_differentiation = true
[]
[]
[Materials]
[stress]
type = ADComputeFiniteStrainElasticStress
[]
[elasticity_tensor]
type = ADComputeElasticityTensor
fill_method = orthotropic
C_ijkl = '2.0e3 2.0e5 2.0e3 0.71428571e3 0.71428571e3 0.71428571e3 0.4 0.2 0.004 0.004 0.2 0.4'
[]
[]
[BCs]
[fix_z]
type = ADDirichletBC
variable = disp_z
boundary = bottom
value = 0
[]
[rot_y]
type = DisplacementAboutAxis
boundary = bottom
function = t
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 1
variable = disp_y
[]
#
[rot_x]
type = DisplacementAboutAxis
boundary = bottom
function = t
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 0
variable = disp_x
[]
[rot_y90]
type = DisplacementAboutAxis
boundary = bottom
function = 360
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 1
variable = disp_y
[]
#
[rot_x90]
type = DisplacementAboutAxis
boundary = bottom
function = 360
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 0
variable = disp_x
[]
[press]
boundary = top
function = '-1.0*(t-360)*10.0'
use_displaced_mesh = true
displacements = 'disp_x disp_y disp_z'
type = Pressure
variable = disp_y
[]
[]
[Controls]
[c1]
type = TimePeriod
enable_objects = 'BCs::rot_x BCs::rot_y'
disable_objects = 'BCs::rot_x90 BCs::rot_y90 BCs::press'
start_time = '0'
end_time = '360'
[]
[c190plus]
type = TimePeriod
enable_objects = 'BCs::rot_x90 BCs::rot_y90 BCs::press'
disable_objects = 'BCs::rot_x BCs::rot_y '
start_time = '360'
end_time = '660'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-08
nl_max_its = 50
l_tol = 1e-4
l_max_its = 50
start_time = 0.0
dt = 5
dtmin = 5
num_steps = 132
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/restart-transient-from-ss-with-stateful/sub_tr.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
nx = 8
ny = 8
xmin = -82.627
xmax = 82.627
ymin = -82.627
ymax = 82.627
dim = 2
[]
[./extra_nodes_x]
type = ExtraNodesetGenerator
input = 'gen'
new_boundary = 'no_x'
coord = '0 82.627 0'
[../]
[./extra_nodes_y]
type = ExtraNodesetGenerator
input = 'extra_nodes_x'
new_boundary = 'no_y'
coord = '-82.627 0 0'
[../]
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
[]
[AuxVariables]
[./temp]
[../]
[]
[Modules/TensorMechanics/Master]
# FINITE strain when strain is large, i.e., visible movement.
# SMALL strain when things are stressed, but may not move.
[./fuel]
add_variables = true
strain = FINITE
temperature = temp
eigenstrain_names = 'thermal_eigenstrain'
generate_output = 'vonmises_stress stress_xx stress_yy hydrostatic_stress max_principal_stress strain_xy elastic_strain_xx stress_xy'
extra_vector_tags = 'ref'
use_finite_deform_jacobian = true
incremental = true
[../]
[]
[BCs]
[./no_x]
type = DirichletBC
variable = disp_x
boundary = 'no_x'
value = 0.0
preset = true
[../]
[./no_y]
type = DirichletBC
preset = true
variable = disp_y
boundary = 'no_y'
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 3e10 # Pa
poissons_ratio = 0.33 # unitless
[../]
[./thermal_strains]
type = ComputeThermalExpansionEigenstrain
temperature = temp
thermal_expansion_coeff = 2e-6 # 1/K
stress_free_temperature = 500 # K
eigenstrain_name = 'thermal_eigenstrain'
[../]
[./stress_finite] # goes with FINITE strain formulation
type = ComputeFiniteStrainElasticStress
[../]
[]
[Postprocessors]
[./avg_temp]
type = ElementAverageValue
variable = temp
execute_on = 'initial timestep_end'
[../]
[./disp_x_max_element]
type = ElementExtremeValue
value_type = max
variable = disp_x
execute_on = 'initial timestep_end'
[../]
[./disp_y_max_element]
type = ElementExtremeValue
value_type = max
variable = disp_y
execute_on = 'initial timestep_end'
[../]
[./disp_x_max_nodal]
type = NodalExtremeValue
value_type = max
variable = disp_x
execute_on = 'initial timestep_end'
[../]
[./disp_y_max_nodal]
type = NodalExtremeValue
value_type = max
variable = disp_y
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 300'
line_search = 'none'
l_tol = 1e-02
nl_rel_tol = 5e-04
nl_abs_tol = 1e-2
l_max_its = 50
nl_max_its = 25
start_time = 0
end_time = 40
dt = 10
[]
[Outputs]
print_linear_residuals = false
perf_graph = true
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/mms/supg/supg_adv_dominated_mms.i)
mu=1.5e-2
rho=2.5
[GlobalParams]
gravity = '0 0 0'
supg = true
convective_term = true
integrate_p_by_parts = false
transient_term = true
laplace = true
u = vel_x
v = vel_y
pressure = p
alpha = 1e0
order = SECOND
family = LAGRANGE
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
elem_type = QUAD9
nx = 4
ny = 4
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./vel_x]
[../]
[./vel_y]
[../]
[./p]
order = FIRST
[../]
[]
[Kernels]
# mass
[./mass]
type = INSMass
variable = p
[../]
[./x_time]
type = INSMomentumTimeDerivative
variable = vel_x
[../]
[./y_time]
type = INSMomentumTimeDerivative
variable = vel_y
[../]
# x-momentum, space
[./x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
component = 0
forcing_func = vel_x_source_func
[../]
# y-momentum, space
[./y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
component = 1
forcing_func = vel_y_source_func
[../]
[./p_source]
type = BodyForce
function = p_source_func
variable = p
[../]
[]
[BCs]
[./vel_x]
type = FunctionDirichletBC
boundary = 'left right top bottom'
function = vel_x_func
variable = vel_x
[../]
[./vel_y]
type = FunctionDirichletBC
boundary = 'left right top bottom'
function = vel_y_func
variable = vel_y
[../]
[./p]
type = FunctionDirichletBC
boundary = 'left right top bottom'
function = p_func
variable = p
[../]
[]
[Functions]
[./vel_x_source_func]
type = ParsedFunction
expression = '-${mu}*(-0.028*pi^2*x^2*sin(0.2*pi*x*y) - 0.028*pi^2*y^2*sin(0.2*pi*x*y) - 0.1*pi^2*sin(0.5*pi*x) - 0.4*pi^2*sin(pi*y)) + ${rho}*(0.14*pi*x*cos(0.2*pi*x*y) + 0.4*pi*cos(pi*y))*(0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3) + ${rho}*(0.14*pi*y*cos(0.2*pi*x*y) + 0.2*pi*cos(0.5*pi*x))*(0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5) + 0.1*pi*y*cos(0.2*pi*x*y) + 0.25*pi*cos(0.5*pi*x)'
[../]
[./vel_y_source_func]
type = ParsedFunction
expression = '-${mu}*(-0.018*pi^2*x^2*sin(0.3*pi*x*y) - 0.018*pi^2*y^2*sin(0.3*pi*x*y) - 0.384*pi^2*sin(0.8*pi*x) - 0.027*pi^2*sin(0.3*pi*y)) + ${rho}*(0.06*pi*x*cos(0.3*pi*x*y) + 0.09*pi*cos(0.3*pi*y))*(0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3) + ${rho}*(0.06*pi*y*cos(0.3*pi*x*y) + 0.48*pi*cos(0.8*pi*x))*(0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5) + 0.1*pi*x*cos(0.2*pi*x*y) + 0.3*pi*cos(0.3*pi*y)'
[../]
[./p_source_func]
type = ParsedFunction
expression = '-0.06*pi*x*cos(0.3*pi*x*y) - 0.14*pi*y*cos(0.2*pi*x*y) - 0.2*pi*cos(0.5*pi*x) - 0.09*pi*cos(0.3*pi*y)'
[../]
[./vel_x_func]
type = ParsedFunction
expression = '0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5'
[../]
[./vel_y_func]
type = ParsedFunction
expression = '0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3'
[../]
[./p_func]
type = ParsedFunction
expression = '0.5*sin(0.5*pi*x) + 1.0*sin(0.3*pi*y) + 0.5*sin(0.2*pi*x*y) + 0.5'
[../]
[./vxx_func]
type = ParsedFunction
expression = '0.14*pi*y*cos(0.2*pi*x*y) + 0.2*pi*cos(0.5*pi*x)'
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Transient
num_steps = 10
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-14
nl_max_its = 10
l_tol = 1e-6
l_max_its = 10
[./TimeStepper]
dt = .05
type = IterationAdaptiveDT
cutback_factor = 0.4
growth_factor = 1.2
optimal_iterations = 20
[../]
[]
[Outputs]
execute_on = 'final'
[./exodus]
type = Exodus
[../]
[./csv]
type = CSV
[../]
[]
[Postprocessors]
[./L2vel_x]
type = ElementL2Error
variable = vel_x
function = vel_x_func
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2vel_y]
variable = vel_y
function = vel_y_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2p]
variable = p
function = p_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2vxx]
variable = vxx
function = vxx_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[]
[AuxVariables]
[./vxx]
family = MONOMIAL
order = FIRST
[../]
[]
[AuxKernels]
[./vxx]
type = VariableGradientComponent
component = x
variable = vxx
gradient_variable = vel_x
[../]
[]
(test/tests/mortar/periodic_segmental_constraint/penalty_periodic_simple2d_flip.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -1.0
xmax = 1.0
ymin = -1.0
ymax = 1.0
nx = 2
ny = 2
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_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[left]
type = LowerDBlockFromSidesetGenerator
input = left_block_id
sidesets = '13'
new_block_id = '10003'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '11'
new_block_id = '10001'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_top'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = top
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[epsilon]
order = SECOND
family = SCALAR
[]
[]
[AuxVariables]
[sigma]
order = SECOND
family = SCALAR
[]
[]
[AuxScalarKernels]
[sigma]
type = FunctionScalarAux
variable = sigma
function = '1 2'
execute_on = initial #timestep_end
[]
[]
[Kernels]
[diff1]
type = Diffusion
variable = u
block = 1
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = PenaltyEqualValueConstraint
secondary_boundary = '11'
primary_boundary = '13'
secondary_subdomain = 'primary_right'
primary_subdomain = 'secondary_left'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodiclr]
type = PenaltyPeriodicSegmentalConstraint
secondary_boundary = '11'
primary_boundary = '13'
secondary_subdomain = 'primary_right'
primary_subdomain = 'secondary_left'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[mortarbt]
type = PenaltyEqualValueConstraint
secondary_boundary = '12'
primary_boundary = '10'
secondary_subdomain = 'primary_top'
primary_subdomain = 'secondary_bottom'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodicbt]
type = PenaltyPeriodicSegmentalConstraint
secondary_boundary = '12'
primary_boundary = '10'
secondary_subdomain = 'primary_top'
primary_subdomain = 'secondary_bottom'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/uel/small_test_expanded_umat.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
xmax = 10
ymax = 3
elem_type = TRI3
[]
[pin]
type = ExtraNodesetGenerator
nodes = 106
new_boundary = pin
input = gen
[]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = pin
value = 0
[]
inactive = 'right_dirichlet'
[right_neumann]
type = FunctionNeumannBC
variable = disp_x
function = t
boundary = right
[]
[right_dirichlet]
type = FunctionDirichletBC
variable = disp_x
function = t/10
boundary = right
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = SMALL
incremental = true
extra_vector_tags = 'kernel_residual'
[]
[]
[Materials]
[umat]
type = AbaqusUMATStress
constant_properties = '100 0.3'
plugin = '../../plugins/small_elastic_tri'
num_state_vars = 8
use_one_based_indexing = false
[]
[]
[Problem]
kernel_coverage_check = false
extra_tag_vectors = 'kernel_residual'
[]
[AuxVariables]
[res_x]
[]
[res_y]
[]
[]
[AuxKernels]
[res_x]
type = TagVectorAux
variable = res_x
v = disp_x
vector_tag = kernel_residual
[]
[res_y]
type = TagVectorAux
variable = res_y
v = disp_y
vector_tag = kernel_residual
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
dt = 1
num_steps = 15
[]
[Postprocessors]
[delta_l]
type = SideAverageValue
variable = disp_x
boundary = right
execute_on = 'INITIAL TIMESTEP_END'
[]
[V]
type = ElementIntegralMaterialProperty
mat_prop = 1
use_displaced_mesh = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/solid_mechanics/test/tests/uel/small_test_uel_states_fields_gradient.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
xmax = 10
ymax = 3
elem_type = TRI3
[]
[pin]
type = ExtraNodesetGenerator
nodes = 106
new_boundary = pin
input = gen
[]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[temperature]
initial_condition = 400
[]
[voltage]
initial_condition = 210
[]
[]
[AuxKernels]
[temperature]
type = FunctionAux
function = '25* x + 40 * y + 400'
variable = temperature
[]
[voltage]
type = FunctionAux
function = '10 * x + 4 * y + 210'
variable = voltage
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = pin
value = 0
[]
inactive = 'right_dirichlet'
[right_neumann]
type = FunctionNeumannBC
variable = disp_x
function = t/10
boundary = right
[]
[right_dirichlet]
type = FunctionDirichletBC
variable = disp_x
function = t/10
boundary = right
[]
[]
[UserObjects]
[uel]
type = AbaqusUserElement
variables = 'disp_x disp_y'
plugin = ../../../examples/uel_tri_states_tests/uel
use_displaced_mesh = false
num_state_vars = 8
constant_properties = '100 0.3' # E nu
external_fields = 'temperature voltage'
extra_vector_tags = 'kernel_residual'
[]
[]
[Problem]
kernel_coverage_check = false
extra_tag_vectors = 'kernel_residual'
[]
[AuxVariables]
[res_x]
[]
[res_y]
[]
[]
[AuxKernels]
[res_x]
type = TagVectorAux
variable = res_x
v = disp_x
vector_tag = kernel_residual
[]
[res_y]
type = TagVectorAux
variable = res_y
v = disp_y
vector_tag = kernel_residual
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
dt = 1
num_steps = 15
[]
[Postprocessors]
[delta_l]
type = SideAverageValue
variable = disp_x
boundary = right
execute_on = 'INITIAL TIMESTEP_END'
[]
[V]
type = ElementIntegralMaterialProperty
mat_prop = 1
use_displaced_mesh = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/solid_mechanics/test/tests/global_strain/global_strain_pressure_3D.i)
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 2
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[cnode]
type = ExtraNodesetGenerator
coord = '0.0 0.0 0.0'
new_boundary = 100
input = generated_mesh
[]
[]
[Variables]
[./u_x]
[../]
[./u_y]
[../]
[./u_z]
[../]
[./global_strain]
order = SIXTH
family = SCALAR
[../]
[]
[AuxVariables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./s00]
order = CONSTANT
family = MONOMIAL
[../]
[./s11]
order = CONSTANT
family = MONOMIAL
[../]
[./e00]
order = CONSTANT
family = MONOMIAL
[../]
[./e11]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./disp_x]
type = GlobalDisplacementAux
variable = disp_x
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 0
[../]
[./disp_y]
type = GlobalDisplacementAux
variable = disp_y
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 1
[../]
[./disp_z]
type = GlobalDisplacementAux
variable = disp_z
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 2
[../]
[./s00]
type = RankTwoAux
variable = s00
rank_two_tensor = stress
index_i = 0
index_j = 0
[../]
[./s11]
type = RankTwoAux
variable = s11
rank_two_tensor = stress
index_i = 1
index_j = 1
[../]
[./e00]
type = RankTwoAux
variable = e00
rank_two_tensor = total_strain
index_i = 0
index_j = 0
[../]
[./e11]
type = RankTwoAux
variable = e11
rank_two_tensor = total_strain
index_i = 1
index_j = 1
[../]
[]
[GlobalParams]
displacements = 'u_x u_y u_z'
block = 0
[]
[Kernels]
[SolidMechanics]
[../]
[]
[ScalarKernels]
[./global_strain]
type = GlobalStrain
variable = global_strain
global_strain_uo = global_strain_uo
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x z'
variable = ' u_x u_y u_z'
[../]
[../]
# fix center point location
[./centerfix_x]
type = DirichletBC
boundary = 100
variable = u_x
value = 0
[../]
[./fix_y]
type = DirichletBC
boundary = 100
variable = u_y
value = 0
[../]
[./centerfix_z]
type = DirichletBC
boundary = 100
variable = u_z
value = 0
[../]
[./Pressure]
[./top]
boundary = top
function = 0.3
[../]
[./bottom]
boundary = bottom
function = 0.3
[../]
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
C_ijkl = '7 0.33'
fill_method = symmetric_isotropic_E_nu
[../]
[./strain]
type = ComputeSmallStrain
global_strain = global_strain
[../]
[./global_strain]
type = ComputeGlobalStrain
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[]
[UserObjects]
[./global_strain_uo]
type = GlobalStrainUserObject
execute_on = 'Initial Linear Nonlinear'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'PJFNK'
line_search = basic
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
l_max_its = 30
nl_max_its = 12
l_tol = 1.0e-4
nl_rel_tol = 1.0e-6
nl_abs_tol = 1.0e-10
start_time = 0.0
num_steps = 2
[]
[Outputs]
exodus = true
[]
(test/tests/meshgenerators/extra_nodeset_generator/generate_extra_nodeset_multiple_coord.i)
[Mesh]
[./gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
[]
[./eng1]
type = ExtraNodesetGenerator
input = gen
new_boundary = 'corner'
coord = '0.5 1; 1 1; 1 0.5'
[]
[./eng2]
type = ExtraNodesetGenerator
input = eng1
new_boundary = 'single'
coord = '0 0'
[]
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/CylindricalRankTwoAux/test.i)
[Mesh]
[file_mesh]
type = FileMeshGenerator
file = circle.e
[]
[cnode]
type = ExtraNodesetGenerator
coord = '1000.0 0.0'
new_boundary = 10
input = file_mesh
[]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[AuxVariables]
[./T]
[../]
[./stress_rr]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_tt]
order = CONSTANT
family = MONOMIAL
[../]
[]
[ICs]
[./T_IC]
type = FunctionIC
variable = T
function = '1000-0.7*sqrt(x^2+y^2)'
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y'
[../]
[]
[AuxKernels]
[./stress_rr]
type = CylindricalRankTwoAux
variable = stress_rr
rank_two_tensor = stress
index_j = 0
index_i = 0
center_point = '0 0 0'
[../]
[./stress_tt]
type = CylindricalRankTwoAux
variable = stress_tt
rank_two_tensor = stress
index_j = 1
index_i = 1
center_point = '0 0 0'
[../]
[]
[BCs]
[./outer_x]
type = DirichletBC
variable = disp_x
boundary = 2
value = 0
[../]
[./outer_y]
type = DirichletBC
variable = disp_y
boundary = '2 10'
value = 0
[../]
[]
[Materials]
[./iso_C]
type = ComputeElasticityTensor
fill_method = symmetric_isotropic
C_ijkl = '2.15e5 0.74e5'
block = 1
[../]
[./strain]
type = ComputeSmallStrain
displacements = 'disp_x disp_y'
block = 1
eigenstrain_names = eigenstrain
[../]
[./stress]
type = ComputeLinearElasticStress
block = 1
[../]
[./thermal_strain]
type= ComputeThermalExpansionEigenstrain
thermal_expansion_coeff = 1e-6
temperature = T
stress_free_temperature = 273
block = 1
eigenstrain_name = eigenstrain
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 101'
l_max_its = 30
nl_max_its = 10
nl_abs_tol = 1e-9
nl_rel_tol = 1e-14
l_tol = 1e-4
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/solid_mechanics/test/tests/finite_strain_elastic_anisotropy/3d_bar_orthotropic_90deg_rotation_ad.i)
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
xmin = 0
xmax = 2
ymin = 0
ymax = 10
zmin = 0
zmax = 2
nx = 1
ny = 1
nz = 1
elem_type = HEX8
[]
[corner]
type = ExtraNodesetGenerator
new_boundary = 101
coord = '0 0 0'
input = generated_mesh
[]
[side]
type = ExtraNodesetGenerator
new_boundary = 102
coord = '2 0 0'
input = corner
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
use_finite_deform_jacobian = true
volumetric_locking_correction = false
use_automatic_differentiation = true
generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_xz'
[]
[]
[Materials]
[stress]
type = ADComputeFiniteStrainElasticStress
[]
[elasticity_tensor]
type = ADComputeElasticityTensor
fill_method = orthotropic
C_ijkl = '2.0e3 2.0e5 2.0e3 0.71428571e3 0.71428571e3 0.71428571e3 0.4 0.2 0.004 0.004 0.2 0.4'
[]
[]
[BCs]
[fix_z]
type = ADDirichletBC
variable = disp_z
boundary = bottom
value = 0
[]
[rot_y]
type = DisplacementAboutAxis
boundary = bottom
function = t
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 1
variable = disp_y
[]
#
[rot_x]
type = DisplacementAboutAxis
boundary = bottom
function = t
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 0
variable = disp_x
[]
[rot_y90]
type = DisplacementAboutAxis
boundary = bottom
function = 90
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 1
variable = disp_y
[]
#
[rot_x90]
type = DisplacementAboutAxis
boundary = bottom
function = 90
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 0
variable = disp_x
[]
[press]
boundary = top
function = '-1.0*(t-90)*10.0'
use_displaced_mesh = true
displacements = 'disp_x disp_y disp_z'
type = Pressure
variable = disp_x
[]
[]
[Controls]
[c1]
type = TimePeriod
enable_objects = 'BCs::rot_x BCs::rot_y'
disable_objects = 'BCs::rot_x90 BCs::rot_y90 BCs::press'
start_time = '0'
end_time = '90'
[]
[c190plus]
type = TimePeriod
enable_objects = 'BCs::rot_x90 BCs::rot_y90 BCs::press'
disable_objects = 'BCs::rot_x BCs::rot_y '
start_time = '90'
end_time = '390'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-08
nl_max_its = 50
l_tol = 1e-4
l_max_its = 50
start_time = 0.0
dt = 5
dtmin = 5
num_steps = 78
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = true
[]
(modules/xfem/test/tests/crack_tip_enrichment/edge_crack_2d.i)
[XFEM]
qrule = volfrac
output_cut_plane = true
use_crack_tip_enrichment = true
crack_front_definition = crack_tip
enrichment_displacements = 'enrich1_x enrich2_x enrich3_x enrich4_x enrich1_y enrich2_y enrich3_y enrich4_y'
displacements = 'disp_x disp_y'
cut_off_boundary = all
cut_off_radius = 0.2
[]
[UserObjects]
[./line_seg_cut_uo]
type = LineSegmentCutUserObject
cut_data = '0.0 1.0 0.5 1.0'
time_start_cut = 0.0
time_end_cut = 0.0
[../]
[./crack_tip]
type = CrackFrontDefinition
crack_direction_method = CrackDirectionVector
crack_front_points = '0.5 1.0 0'
crack_direction_vector = '1 0 0'
2d = true
axis_2d = 2
[../]
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 9
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 2.0
elem_type = QUAD4
[]
[./all_node]
type = BoundingBoxNodeSetGenerator
new_boundary = 'all'
top_right = '1 2 0'
bottom_left = '0 0 0'
input = gen
[../]
[./right_bottom_node]
type = ExtraNodesetGenerator
new_boundary = 'right_bottom_node'
coord = '1.0 0.0'
input = all_node
[../]
[./right_top_node]
type = ExtraNodesetGenerator
new_boundary = 'right_top_node'
coord = '1.0 2.0'
input = right_bottom_node
[../]
[]
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./saved_x]
[../]
[./saved_y]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./vonmises]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./TensorMechanics]
displacements = 'disp_x disp_y'
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
execute_on = timestep_end
[../]
[./vonmises]
type = RankTwoScalarAux
rank_two_tensor = stress
variable = vonmises
scalar_type = vonmisesStress
execute_on = timestep_end
[../]
[]
[BCs]
[./top_y]
type = Pressure
variable = disp_y
boundary = top
factor = -1
displacements = 'disp_x disp_y'
[../]
[./bottom_y]
type = Pressure
variable = disp_y
boundary = bottom
factor = -1
displacements = 'disp_x disp_y'
[../]
[./fix_y]
type = DirichletBC
boundary = right_bottom_node
variable = disp_y
value = 0.0
[../]
[./fix_x]
type = DirichletBC
boundary = right_bottom_node
variable = disp_x
value = 0.0
[../]
[./fix_x2]
type = DirichletBC
boundary = right_top_node
variable = disp_x
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.3
[../]
[./strain]
type = ComputeCrackTipEnrichmentSmallStrain
displacements = 'disp_x disp_y'
crack_front_definition = crack_tip
enrichment_displacements = 'enrich1_x enrich2_x enrich3_x enrich4_x enrich1_y enrich2_y enrich3_y enrich4_y'
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
line_search = 'none'
# Since we do not sub-triangularize the tip element,
# we need to use higher order quadrature rule to improve
# integration accuracy.
# Here second = SECOND is for regression test only.
# However, order = SIXTH is recommended.
[./Quadrature]
type = GAUSS
order = SECOND
[../]
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
# controls for linear iterations
l_max_its = 10
l_tol = 1e-4
# controls for nonlinear iterations
nl_max_its = 100
nl_rel_tol = 1e-12 #11
nl_abs_tol = 1e-12 #12
# time control
start_time = 0.0
dt = 1.0
end_time = 1.0
dtmin = 1.0
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Outputs]
file_base = edge_crack_2d_out
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/solid_mechanics/test/tests/uel/small_test_uel_states_fields.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
# nx = 10
# ny = 3
xmax = 10
ymax = 3
elem_type = TRI3
[]
[pin]
type = ExtraNodesetGenerator
nodes = 106
new_boundary = pin
input = gen
[]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[temperature]
initial_condition = 1500
[]
[voltage]
initial_condition = 210
[]
[]
[AuxKernels]
[temperature]
type = FunctionAux
function = temperature_function
variable = temperature
[]
[voltage]
type = FunctionAux
function = voltage_function
variable = voltage
[]
[]
[Functions]
[voltage_function]
type = PiecewiseLinear
x = '0 15'
y = '210 450'
[]
[temperature_function]
type = PiecewiseLinear
x = '0 15'
y = '1500 800'
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = pin
value = 0
[]
inactive = 'right_dirichlet'
# inactive = 'right_neumann'
[right_neumann]
type = FunctionNeumannBC
variable = disp_x
function = t
boundary = right
[]
[right_dirichlet]
type = FunctionDirichletBC
variable = disp_x
function = t/10
boundary = right
[]
[]
[UserObjects]
[uel]
type = AbaqusUserElement
variables = 'disp_x disp_y'
plugin = ../../../examples/uel_tri_states_tests/uel
use_displaced_mesh = false
num_state_vars = 8
constant_properties = '100 0.3' # E nu
external_fields = 'temperature voltage'
extra_vector_tags = 'kernel_residual'
[]
[]
[Problem]
kernel_coverage_check = false
extra_tag_vectors = 'kernel_residual'
[]
[AuxVariables]
[res_x]
[]
[res_y]
[]
[]
[AuxKernels]
[res_x]
type = TagVectorAux
variable = res_x
v = disp_x
vector_tag = kernel_residual
[]
[res_y]
type = TagVectorAux
variable = res_y
v = disp_y
vector_tag = kernel_residual
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
dt = 1
num_steps = 15
[]
[Postprocessors]
[delta_l]
type = SideAverageValue
variable = disp_x
boundary = right
execute_on = 'INITIAL TIMESTEP_END'
[]
[V]
type = ElementIntegralMaterialProperty
mat_prop = 1
use_displaced_mesh = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/boussinesq/boussinesq_square_constant_names.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmax = .05
ymax = .05
nx = 20
ny = 20
elem_type = QUAD9
[]
[bottom_left]
type = ExtraNodesetGenerator
new_boundary = corner
coord = '0 0'
input = gen
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_rel_tol = 1e-12
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[out]
type = Exodus
execute_on = 'final'
[]
[]
[Variables]
[velocity]
family = LAGRANGE_VEC
order = SECOND
[]
[p][]
[temp]
order = SECOND
initial_condition = 340
scaling = 1e-4
[]
[]
[BCs]
[velocity_dirichlet]
type = VectorDirichletBC
boundary = 'left right bottom top'
variable = velocity
# The third entry is to satisfy RealVectorValue
values = '0 0 0'
[]
# Even though we are integrating by parts, because there are no integrated
# boundary conditions on the velocity p doesn't appear in the system of
# equations. Thus we must pin the pressure somewhere in order to ensure a
# unique solution
[p_zero]
type = DirichletBC
boundary = corner
variable = p
value = 0
[]
[cold]
type = DirichletBC
variable = temp
boundary = left
value = 300
[]
[hot]
type = DirichletBC
variable = temp
boundary = right
value = 400
[]
[]
[Kernels]
[mass]
type = INSADMass
variable = p
[]
[momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[]
[momentum_advection]
type = INSADMomentumAdvection
variable = velocity
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
[]
[temp_advection]
type = INSADEnergyAdvection
variable = temp
[]
[temp_conduction]
type = ADHeatConduction
variable = temp
thermal_conductivity = 'k'
[]
[buoyancy]
type = INSADBoussinesqBodyForce
variable = velocity
temperature = temp
gravity = '0 -9.81 0'
ref_temp = 900
alpha_name = 2.9e-3
[]
[gravity]
type = INSADGravityForce
variable = velocity
gravity = '0 -9.81 0'
[]
[]
[Materials]
[ad_const]
type = ADGenericConstantMaterial
prop_names = 'mu rho k cp'
prop_values = '30.74e-6 .5757 46.38e-3 1054'
[]
[ins_mat]
type = INSAD3Eqn
velocity = velocity
pressure = p
temperature = temp
[]
[]
(modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/exact.i)
# This test provides comparison to calculated values from Leblond:1994kl
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
pore_shape_model = spherical
[]
[Mesh]
[./msh]
type = CartesianMeshGenerator
dim = 3
dx = 0.01
dy = 0.01
dz = 0.01
iz = 1
ix = 1
iy = 1
[../]
[./extra_nodeset]
type = ExtraNodesetGenerator
input = msh
new_boundary = 'origin'
coord = '0 0 0'
[]
[]
[Physics/SolidMechanics/QuasiStatic/All]
strain = FINITE
add_variables = true
generate_output = 'strain_xx strain_yy strain_xy hydrostatic_stress vonmises_stress'
use_automatic_differentiation = true
[]
[Functions]
[./Q_gtn]
type = ParsedFunction
symbol_names = 'avg_vonmises gtn_gauge_stress'
symbol_values = 'avg_vonmises gtn_gauge_stress'
expression = 'avg_vonmises/gtn_gauge_stress'
[../]
[./M_gtn]
type = ParsedFunction
symbol_names = 'avg_hydro gtn_gauge_stress'
symbol_values = 'avg_hydro gtn_gauge_stress'
expression = 'abs(avg_hydro) / gtn_gauge_stress'
[../]
[./Q_ten]
type = ParsedFunction
symbol_names = 'avg_vonmises ten_gauge_stress'
symbol_values = 'avg_vonmises ten_gauge_stress'
expression = 'avg_vonmises/ten_gauge_stress'
[../]
[./M_ten]
type = ParsedFunction
symbol_names = 'avg_hydro ten_gauge_stress'
symbol_values = 'avg_hydro ten_gauge_stress'
expression = 'abs(avg_hydro) / ten_gauge_stress'
[../]
[./Q_five]
type = ParsedFunction
symbol_names = 'avg_vonmises five_gauge_stress'
symbol_values = 'avg_vonmises five_gauge_stress'
expression = 'avg_vonmises/five_gauge_stress'
[../]
[./M_five]
type = ParsedFunction
symbol_names = 'avg_hydro five_gauge_stress'
symbol_values = 'avg_hydro five_gauge_stress'
expression = 'abs(avg_hydro) / five_gauge_stress'
[../]
[./Q_three]
type = ParsedFunction
symbol_names = 'avg_vonmises three_gauge_stress'
symbol_values = 'avg_vonmises three_gauge_stress'
expression = 'avg_vonmises / three_gauge_stress'
[../]
[./M_three]
type = ParsedFunction
symbol_names = 'avg_hydro three_gauge_stress'
symbol_values = 'avg_hydro three_gauge_stress'
expression = 'abs(avg_hydro) / three_gauge_stress'
[../]
[./Q_two]
type = ParsedFunction
symbol_names = 'avg_vonmises two_gauge_stress'
symbol_values = 'avg_vonmises two_gauge_stress'
expression = 'avg_vonmises/two_gauge_stress'
[../]
[./M_two]
type = ParsedFunction
symbol_names = 'avg_hydro two_gauge_stress'
symbol_values = 'avg_hydro two_gauge_stress'
expression = 'abs(avg_hydro) / two_gauge_stress'
[../]
[./Q_onepointfive]
type = ParsedFunction
symbol_names = 'avg_vonmises onepointfive_gauge_stress'
symbol_values = 'avg_vonmises onepointfive_gauge_stress'
expression = 'avg_vonmises / onepointfive_gauge_stress'
[../]
[./M_onepointfive]
type = ParsedFunction
symbol_names = 'avg_hydro onepointfive_gauge_stress'
symbol_values = 'avg_hydro onepointfive_gauge_stress'
expression = 'abs(avg_hydro) / onepointfive_gauge_stress'
[../]
[./Q_one]
type = ParsedFunction
symbol_names = 'avg_vonmises one_gauge_stress'
symbol_values = 'avg_vonmises one_gauge_stress'
expression = 'avg_vonmises / one_gauge_stress'
[../]
[./M_one]
type = ParsedFunction
symbol_names = 'avg_hydro one_gauge_stress'
symbol_values = 'avg_hydro one_gauge_stress'
expression = 'abs(avg_hydro) / one_gauge_stress'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e10
poissons_ratio = 0.3
[../]
[./stress]
type = ADComputeMultipleInelasticStress
inelastic_models = 'gtn lps_ten lps_five lps_three lps_two lps_onepointfive lps_one'
outputs = all
extra_stress_names = extra_stress
[../]
[./porosity]
type = ADPorosityFromStrain
initial_porosity = 1e-3
inelastic_strain = 'combined_inelastic_strain'
outputs = 'all'
[../]
[./gtn]
type = ADViscoplasticityStressUpdate
coefficient = 0
power = 1 # arbitrary
viscoplasticity_model = GTN
base_name = gtn
outputs = all
relative_tolerance = 1e-30
[../]
[./lps_ten]
type = ADViscoplasticityStressUpdate
coefficient = 0
power = 10
base_name = ten
outputs = all
relative_tolerance = 1e-30
[../]
[./lps_five]
type = ADViscoplasticityStressUpdate
coefficient = 0
power = 5
base_name = five
outputs = all
relative_tolerance = 1e-30
[../]
[./lps_three]
type = ADViscoplasticityStressUpdate
coefficient = 0
power = 3
base_name = three
outputs = all
relative_tolerance = 1e-30
[../]
[./lps_two]
type = ADViscoplasticityStressUpdate
coefficient = 0
power = 2
base_name = two
outputs = all
relative_tolerance = 1e-30
[../]
[./lps_onepointfive]
type = ADViscoplasticityStressUpdate
coefficient = 0
power = 1.5
base_name = onepointfive
outputs = all
relative_tolerance = 1e-30
[../]
[./lps_one]
type = ADViscoplasticityStressUpdate
coefficient = 0
power = 1
base_name = one
outputs = all
relative_tolerance = 1e-30
[../]
[./const_stress]
type = ComputeExtraStressConstant
extra_stress_tensor = '1 1 1 1 1 1 1 1 1'
outputs = all
[../]
[]
[BCs]
[./no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0.0
[../]
[./Pressure]
[./bcs]
boundary = 'top right front'
function = '10^(t/4.5)'
use_automatic_differentiation = true
[../]
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
num_steps = 10
nl_abs_tol = 1e-8
[]
[Postprocessors]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
[../]
[./gtn_gauge_stress]
type = ElementAverageValue
variable = gtn_gauge_stress
outputs = none
[../]
[./0Q_gtn]
type = FunctionValuePostprocessor
function = Q_gtn
[../]
[./0M_gtn]
type = FunctionValuePostprocessor
function = M_gtn
[../]
[./ten_gauge_stress]
type = ElementAverageValue
variable = ten_gauge_stress
outputs = none
[../]
[./1Q_ten]
type = FunctionValuePostprocessor
function = Q_ten
[../]
[./1M_ten]
type = FunctionValuePostprocessor
function = M_ten
[../]
[./five_gauge_stress]
type = ElementAverageValue
variable = five_gauge_stress
outputs = none
[../]
[./2Q_five]
type = FunctionValuePostprocessor
function = Q_five
[../]
[./2M_five]
type = FunctionValuePostprocessor
function = M_five
[../]
[./three_gauge_stress]
type = ElementAverageValue
variable = three_gauge_stress
outputs = none
[../]
[./3Q_three]
type = FunctionValuePostprocessor
function = Q_three
[../]
[./3M_three]
type = FunctionValuePostprocessor
function = M_three
[../]
[./two_gauge_stress]
type = ElementAverageValue
variable = two_gauge_stress
outputs = none
[../]
[./4Q_two]
type = FunctionValuePostprocessor
function = Q_two
[../]
[./4M_two]
type = FunctionValuePostprocessor
function = M_two
[../]
[./onepointfive_gauge_stress]
type = ElementAverageValue
variable = onepointfive_gauge_stress
outputs = none
[../]
[./5Q_onepointfive]
type = FunctionValuePostprocessor
function = Q_onepointfive
[../]
[./5M_onepointfive]
type = FunctionValuePostprocessor
function = M_onepointfive
[../]
[./one_gauge_stress]
type = ElementAverageValue
variable = one_gauge_stress
outputs = none
[../]
[./6Q_one]
type = FunctionValuePostprocessor
function = Q_one
[../]
[./6M_one]
type = FunctionValuePostprocessor
function = M_one
[../]
[]
[Outputs]
csv = true
file_base = exact_spherical_out
[]
(modules/combined/examples/optimization/multi-load/single_subapp_one.i)
power = 2
E0 = 1.0
Emin = 1.0e-6
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
# final_generator = 'MoveRight'
[Bottom]
type = GeneratedMeshGenerator
dim = 2
nx = 80
ny = 40
xmin = 0
xmax = 150
ymin = 0
ymax = 75
[]
[left_load]
type = ExtraNodesetGenerator
input = Bottom
new_boundary = left_load
coord = '37.5 75 0'
[]
[right_load]
type = ExtraNodesetGenerator
input = left_load
new_boundary = right_load
coord = '112.5 75 0'
[]
[left_support]
type = ExtraNodesetGenerator
input = right_load
new_boundary = left_support
coord = '0 0 0'
[]
[right_support]
type = ExtraNodesetGenerator
input = left_support
new_boundary = right_support
coord = '150 0 0'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[Dc]
family = MONOMIAL
order = SECOND
initial_condition = -1.0
[]
[Cc]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = 0.1
[]
[sensitivity_var]
family = MONOMIAL
order = SECOND
initial_condition = -1.0
[]
[]
[AuxKernels]
[sensitivity_kernel]
type = MaterialRealAux
property = sensitivity
variable = sensitivity_var
check_boundary_restricted = false
execute_on = 'TIMESTEP_END'
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_y]
type = DirichletBC
variable = disp_y
boundary = left_support
value = 0.0
[]
[no_x]
type = DirichletBC
variable = disp_x
boundary = left_support
value = 0.0
[]
[no_y_right]
type = DirichletBC
variable = disp_y
boundary = right_support
value = 0.0
[]
[]
[NodalKernels]
[push_left]
type = NodalGravity
variable = disp_y
boundary = left_load
gravity_value = -1e-3
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${E0}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.0
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[rad_avg]
type = RadialAverage
radius = 3
weights = linear
prop_name = sensitivity
force_preaux = true
execute_on = 'TIMESTEP_END'
[]
# No SIMP optimization in subapp
[calc_sense]
type = SensitivityFilter
density_sensitivity = Dc
design_density = mat_den
filter_UO = rad_avg
force_postaux = true
execute_on = 'TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-10
dt = 1.0
num_steps = 25
[]
[Outputs]
exodus = true
[out]
type = CSV
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[mesh_volume]
type = VolumePostprocessor
execute_on = 'initial timestep_end'
[]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[vol_frac]
type = ParsedPostprocessor
function = 'total_vol / mesh_volume'
pp_names = 'total_vol mesh_volume'
[]
[sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = sensitivity
execute_on = 'TIMESTEP_BEGIN TIMESTEP_END NONLINEAR'
[]
[objective]
type = ElementIntegralMaterialProperty
mat_prop = strain_energy_density
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
(modules/combined/examples/optimization/thermomechanical/thermal_sub.i)
vol_frac = 0.4
power = 2.0
E0 = 1.0e-6
E1 = 1.0
rho0 = 0.0
rho1 = 1.0
C0 = 1.0e-6
C1 = 1.0
TC0 = 1.0e-16
TC1 = 1.0
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 40
xmin = 0
xmax = 40
ymin = 0
ymax = 40
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = hold
nodes = 0
[]
[push_left]
type = ExtraNodesetGenerator
input = node
new_boundary = push_left
coord = '16 0 0'
[]
[push_center]
type = ExtraNodesetGenerator
input = push_left
new_boundary = push_center
coord = '24 0 0'
[]
[extra]
type = SideSetsFromBoundingBoxGenerator
input = push_center
bottom_left = '-0.01 17.999 0'
top_right = '5 22.001 0'
boundary_new = n1
boundaries_old = left
[]
[dirichlet_bc]
type = SideSetsFromNodeSetsGenerator
input = extra
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[temp]
initial_condition = 100.0
[]
[]
[AuxVariables]
[Dc]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[]
[Cc]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[]
[Tc]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[]
[Cost]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[]
[mat_den]
family = MONOMIAL
order = FIRST
initial_condition = ${vol_frac}
[]
[]
[AuxKernels]
[Cost]
type = MaterialRealAux
variable = Cost
property = Cost_mat
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temp
diffusion_coefficient = thermal_cond
[]
[heat_source]
type = HeatSource
value = 1e-2 # W/m^3
variable = temp
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_y]
type = DirichletBC
variable = disp_y
boundary = hold
value = 0.0
[]
[no_x_symm]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[left_n1]
type = DirichletBC
variable = temp
boundary = n1
value = 0.0
[]
[top]
type = NeumannBC
variable = temp
boundary = top
value = 0
[]
[bottom]
type = NeumannBC
variable = temp
boundary = bottom
value = 0
[]
[right]
type = NeumannBC
variable = temp
boundary = right
value = 0
[]
[left]
type = NeumannBC
variable = temp
boundary = left
value = 0
[]
[]
[NodalKernels]
[push_left]
type = NodalGravity
variable = disp_y
boundary = push_left
gravity_value = 0.0 # -1e-8
mass = 1
[]
[push_center]
type = NodalGravity
variable = disp_y
boundary = push_center
gravity_value = 0.0 # -1e-8
mass = 1
[]
[]
[Materials]
[thermal_cond]
type = DerivativeParsedMaterial
# ordered multimaterial simp
expression = "A1:=(${TC0}-${TC1})/(${rho0}^${power}-${rho1}^${power}); "
"B1:=${TC0}-A1*${rho0}^${power}; TC1:=A1*mat_den^${power}+B1; TC1"
coupled_variables = 'mat_den'
property_name = thermal_cond
outputs = 'exodus'
[]
[thermal_compliance]
type = ThermalCompliance
temperature = temp
thermal_conductivity = thermal_cond
outputs = 'exodus'
[]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# ordered multimaterial simp
expression = "A1:=(${E0}-${E1})/(${rho0}^${power}-${rho1}^${power}); "
"B1:=${E0}-A1*${rho0}^${power}; E1:=A1*mat_den^${power}+B1; E1"
coupled_variables = 'mat_den'
property_name = E_phys
[]
[Cost_mat]
type = DerivativeParsedMaterial
# ordered multimaterial simp
expression = "A1:=(${C0}-${C1})/(${rho0}^(1/${power})-${rho1}^(1/${power})); "
"B1:=${C0}-A1*${rho0}^(1/${power}); C1:=A1*mat_den^(1/${power})+B1; C1"
coupled_variables = 'mat_den'
property_name = Cost_mat
[]
[CostDensity]
type = ParsedMaterial
property_name = CostDensity
coupled_variables = 'mat_den Cost'
expression = 'mat_den*Cost'
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
[]
[cc]
type = CostSensitivity
design_density = mat_den
cost = Cost_mat
outputs = 'exodus'
[]
[tc]
type = ThermalSensitivity
design_density = mat_den
thermal_conductivity = thermal_cond
temperature = temp
outputs = 'exodus'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[rad_avg]
type = RadialAverage
radius = 0.1
weights = linear
prop_name = sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
[rad_avg_cost]
type = RadialAverage
radius = 0.1
weights = linear
prop_name = cost_sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
[rad_avg_thermal]
type = RadialAverage
radius = 0.1
weights = linear
prop_name = thermal_sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
# Provides Dc
[calc_sense]
type = SensitivityFilter
density_sensitivity = Dc
design_density = mat_den
filter_UO = rad_avg
execute_on = TIMESTEP_END
force_postaux = true
[]
# Provides Cc
[calc_sense_cost]
type = SensitivityFilter
density_sensitivity = Cc
design_density = mat_den
filter_UO = rad_avg_cost
execute_on = TIMESTEP_END
force_postaux = true
[]
# Provides Tc
[calc_sense_thermal]
type = SensitivityFilter
density_sensitivity = Tc
design_density = mat_den
filter_UO = rad_avg_thermal
execute_on = TIMESTEP_END
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-12
dt = 1.0
num_steps = 500
[]
[Outputs]
exodus = true
[out]
type = CSV
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[right_flux]
type = SideDiffusiveFluxAverage
variable = temp
boundary = right
diffusivity = 10
[]
[mesh_volume]
type = VolumePostprocessor
execute_on = 'initial timestep_end'
[]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[vol_frac]
type = ParsedPostprocessor
function = 'total_vol / mesh_volume'
pp_names = 'total_vol mesh_volume'
[]
[sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = sensitivity
[]
[cost_sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = cost_sensitivity
[]
[cost]
type = ElementIntegralMaterialProperty
mat_prop = CostDensity
[]
[cost_frac]
type = ParsedPostprocessor
function = 'cost / mesh_volume'
pp_names = 'cost mesh_volume'
[]
[objective]
type = ElementIntegralMaterialProperty
mat_prop = strain_energy_density
execute_on = 'INITIAL TIMESTEP_END'
[]
[objective_thermal]
type = ElementIntegralMaterialProperty
mat_prop = thermal_compliance
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/nonzero-malloc/test.i)
[GlobalParams]
gravity = '0 0 0'
pspg = true
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 5
ny = 5
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./vel_x]
[../]
[./vel_y]
[../]
[./T]
[./InitialCondition]
type = ConstantIC
value = 1.0
[../]
[../]
[./p]
[../]
[]
[Kernels]
# mass
[./mass]
type = INSMass
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
# x-momentum, time
[./x_momentum_time]
type = INSMomentumTimeDerivative
variable = vel_x
[../]
# x-momentum, space
[./x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
# y-momentum, time
[./y_momentum_time]
type = INSMomentumTimeDerivative
variable = vel_y
[../]
# y-momentum, space
[./y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
# temperature
[./temperature_time]
type = INSTemperatureTimeDerivative
variable = T
[../]
[./temperature_space]
type = INSTemperature
variable = T
u = vel_x
v = vel_y
[../]
[malloc]
type = MallocKernel
# Variable choice doesn't matter
variable = vel_x
[]
[]
[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
[../]
[./T_hot]
type = DirichletBC
variable = T
boundary = 'bottom'
value = 1
[../]
[./T_cold]
type = DirichletBC
variable = T
boundary = 'top'
value = 0
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[]
[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)'
[../]
[]
[Executioner]
type = Transient
num_steps = 5
dt = .5
dtmin = .5
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_out
perf_graph = true
[]
(modules/combined/examples/optimization/multi-load/single_main.i)
vol_frac = 0.3
power = 1.1
E0 = 1.0
Emin = 1.0e-6
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
# final_generator = 'MoveRight'
[Bottom]
type = GeneratedMeshGenerator
dim = 2
nx = 80
ny = 40
xmin = 0
xmax = 150
ymin = 0
ymax = 75
[]
[left_load]
type = ExtraNodesetGenerator
input = Bottom
new_boundary = left_load
coord = '37.5 75 0'
[]
[right_load]
type = ExtraNodesetGenerator
input = left_load
new_boundary = right_load
coord = '112.5 75 0'
[]
[left_support]
type = ExtraNodesetGenerator
input = right_load
new_boundary = left_support
coord = '0 0 0'
[]
[right_support]
type = ExtraNodesetGenerator
input = left_support
new_boundary = right_support
coord = '150 0 0'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = 0.02
[]
[sensitivity_one]
family = MONOMIAL
order = SECOND
initial_condition = -1.0
[]
[sensitivity_two]
family = MONOMIAL
order = SECOND
initial_condition = -1.0
[]
[total_sensitivity]
family = MONOMIAL
order = SECOND
initial_condition = -1.0
[]
[]
[AuxKernels]
[total_sensitivity]
type = ParsedAux
variable = total_sensitivity
expression = '0.5*sensitivity_one + 0.5*sensitivity_two'
coupled_variables = 'sensitivity_one sensitivity_two'
execute_on = 'LINEAR TIMESTEP_END'
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_y]
type = DirichletBC
variable = disp_y
boundary = left_support
value = 0.0
[]
[no_x]
type = DirichletBC
variable = disp_x
boundary = left_support
value = 0.0
[]
[no_y_right]
type = DirichletBC
variable = disp_y
boundary = right_support
value = 0.0
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${E0}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.0
[]
[stress]
type = ComputeLinearElasticStress
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
# We do filtering in the subapps
[update]
type = DensityUpdate
density_sensitivity = total_sensitivity
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = MULTIAPP_FIXED_POINT_BEGIN
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-10
dt = 1.0
num_steps = 25
[]
[Outputs]
exodus = true
[out]
type = CSV
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[mesh_volume]
type = VolumePostprocessor
execute_on = 'initial timestep_end'
[]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[vol_frac]
type = ParsedPostprocessor
function = 'total_vol / mesh_volume'
pp_names = 'total_vol mesh_volume'
[]
[sensitivity]
type = ElementIntegralVariablePostprocessor
variable = total_sensitivity
[]
[]
[MultiApps]
[sub_app_one]
type = TransientMultiApp
input_files = single_subapp_one.i
[]
[sub_app_two]
type = TransientMultiApp
input_files = single_subapp_two.i
[]
[]
[Transfers]
# First SUB-APP
# To subapp densities
[subapp_one_density]
type = MultiAppCopyTransfer
to_multi_app = sub_app_one
source_variable = mat_den # Here
variable = mat_den
[]
# From subapp sensitivity
[subapp_one_sensitivity]
type = MultiAppCopyTransfer
from_multi_app = sub_app_one
source_variable = Dc # sensitivity_var
variable = sensitivity_one # Here
[]
# Second SUB-APP
# To subapp densities
[subapp_two_density]
type = MultiAppCopyTransfer
to_multi_app = sub_app_two
source_variable = mat_den # Here
variable = mat_den
[]
# From subapp sensitivity
[subapp_two_sensitivity]
type = MultiAppCopyTransfer
from_multi_app = sub_app_two
source_variable = Dc # sensitivity_var
variable = sensitivity_two # Here
[]
[]
(modules/xfem/test/tests/bimaterials/glued_ad_bimaterials_2d.i)
# This test is for two layer materials with different youngs modulus using AD
# The global stress is determined by switching the stress based on level set values
# The material interface is marked by a level set function
# The two layer materials are glued together
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y'
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
[../]
[]
[Mesh]
displacements = 'disp_x disp_y'
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
xmin = 0.0
xmax = 5.
ymin = 0.0
ymax = 5.
elem_type = QUAD4
[]
[./left_bottom]
type = ExtraNodesetGenerator
new_boundary = 'left_bottom'
coord = '0.0 0.0'
input = gen
[../]
[./left_top]
type = ExtraNodesetGenerator
new_boundary = 'left_top'
coord = '0.0 5.'
input = left_bottom
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[Functions]
[./ls_func]
type = ParsedFunction
expression = 'y-2.5'
[../]
[]
[AuxVariables]
[./a_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
strain = SMALL
use_automatic_differentiation = true
add_variables = true
generate_output = 'stress_xx stress_yy stress_xy'
[../]
[]
[AuxKernels]
[./a_strain_xx]
type = ADRankTwoAux
rank_two_tensor = A_total_strain
index_i = 0
index_j = 0
variable = a_strain_xx
[../]
[./a_strain_yy]
type = ADRankTwoAux
rank_two_tensor = A_total_strain
index_i = 1
index_j = 1
variable = a_strain_yy
[../]
[./a_strain_xy]
type = ADRankTwoAux
rank_two_tensor = A_total_strain
index_i = 0
index_j = 1
variable = a_strain_xy
[../]
[./b_strain_xx]
type = ADRankTwoAux
rank_two_tensor = B_total_strain
index_i = 0
index_j = 0
variable = b_strain_xx
[../]
[./b_strain_yy]
type = ADRankTwoAux
rank_two_tensor = B_total_strain
index_i = 1
index_j = 1
variable = b_strain_yy
[../]
[./b_strain_xy]
type = ADRankTwoAux
rank_two_tensor = B_total_strain
index_i = 0
index_j = 1
variable = b_strain_xy
[../]
[]
[Constraints]
[./dispx_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_x
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[./dispy_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_y
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[]
[BCs]
[./bottomx]
type = ADDirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[../]
[./bottomy]
type = ADDirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[../]
[./topx]
type = ADFunctionDirichletBC
boundary = top
variable = disp_x
function = 0.03*t
[../]
[./topy]
type = ADFunctionDirichletBC
boundary = top
variable = disp_y
function = '0.03*t'
[../]
[]
[Materials]
[./elasticity_tensor_A]
type = ADComputeIsotropicElasticityTensor
base_name = A
youngs_modulus = 1e9
poissons_ratio = 0.3
[../]
[./strain_A]
type = ADComputeSmallStrain
base_name = A
[../]
[./stress_A]
type = ADComputeLinearElasticStress
base_name = A
[../]
[./elasticity_tensor_B]
type = ADComputeIsotropicElasticityTensor
base_name = B
youngs_modulus = 1e5
poissons_ratio = 0.3
[../]
[./strain_B]
type = ADComputeSmallStrain
base_name = B
[../]
[./stress_B]
type = ADComputeLinearElasticStress
base_name = B
[../]
[./combined_stress]
type = ADLevelSetBiMaterialRankTwo
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = stress
[../]
[./combined_elasticity_tensor]
type = ADLevelSetBiMaterialRankFour
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = elasticity_tensor
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
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 = 'bt'
# controls for linear iterations
l_max_its = 20
l_tol = 1e-8
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-14
nl_abs_tol = 1e-50
# time control
start_time = 0.0
dt = 0.1
num_steps = 2
max_xfem_update = 1
[]
[Outputs]
exodus = true
file_base = glued_bimaterials_2d_out
execute_on = timestep_end
[./console]
type = Console
output_linear = true
[../]
[]
(test/tests/mortar/periodic_segmental_constraint/periodic_simple2d.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -1.0
xmax = 1.0
ymin = -1.0
ymax = 1.0
nx = 2
ny = 2
elem_type = QUAD9
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[left]
type = LowerDBlockFromSidesetGenerator
input = left_block_id
sidesets = '13'
new_block_id = '10003'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '11'
new_block_id = '10001'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_top'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = top
[]
[]
[Variables]
[u]
order = SECOND
family = LAGRANGE
[]
[epsilon]
order = SECOND
family = SCALAR
[]
[./lm1]
order = FIRST
family = LAGRANGE
block = secondary_left
[../]
[./lm2]
order = FIRST
family = LAGRANGE
block = secondary_bottom
[../]
[]
[AuxVariables]
[sigma]
order = SECOND
family = SCALAR
[]
[]
[AuxScalarKernels]
[sigma]
type = FunctionScalarAux
variable = sigma
function = '1 2'
execute_on = initial #timestep_end
[]
[]
[Kernels]
[diff1]
type = Diffusion
variable = u
block = 1
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = EqualValueConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
variable = lm1
correct_edge_dropping = true
[]
[periodiclr]
type = PeriodicSegmentalConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
epsilon = epsilon
sigma = sigma
variable = lm1
correct_edge_dropping = true
[]
[mortarbt]
type = EqualValueConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
variable = lm2
correct_edge_dropping = true
[]
[periodicbt]
type = PeriodicSegmentalConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
epsilon = epsilon
sigma = sigma
variable = lm2
correct_edge_dropping = true
[]
[]
[Preconditioning]
[smp]
full = true
type = SMP
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu NONZERO 1e-15'
solve_type = NEWTON
[]
[Outputs]
exodus = true
csv = true
[]
(modules/solid_mechanics/test/tests/finite_strain_elastic_anisotropy/3d_bar_orthotropic.i)
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
xmin = 0
xmax = 2
ymin = 0
ymax = 2
zmin = 0
zmax = 10
nx = 6
ny = 2
nz = 2
elem_type = HEX8
[]
[corner]
type = ExtraNodesetGenerator
new_boundary = 101
coord = '0 0 0'
input = generated_mesh
[]
[side]
type = ExtraNodesetGenerator
new_boundary = 102
coord = '2 0 0'
input = corner
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
use_finite_deform_jacobian = true
volumetric_locking_correction = false
generate_output = 'stress_xx stress_yy stress_zz stress_xy stress_xz'
[]
[]
[Materials]
[stress]
type = ComputeFiniteStrainElasticStress
[]
[elasticity_tensor]
type = ComputeElasticityTensor
fill_method = orthotropic
C_ijkl = '2.0e5 2.0e5 2.0e5 0.71428571e5 0.71428571e5 0.71428571e5 0.4 0.4 0.4 0.4 0.4 0.4' # Isotropic
[]
[]
[BCs]
[fix_corner_x]
type = DirichletBC
variable = disp_x
boundary = 101
value = 0
[]
[fix_corner_y]
type = DirichletBC
variable = disp_y
boundary = 101
value = 0
[]
[fix_side_y]
type = DirichletBC
variable = disp_y
boundary = 102
value = 0
[]
[fix_z]
type = DirichletBC
variable = disp_z
boundary = back
value = 0
[]
[move_z]
type = FunctionDirichletBC
variable = disp_z
boundary = front
function = 't'
[]
[move_y]
type = FunctionDirichletBC
variable = disp_y
boundary = front
function = 't*1.4'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-12
nl_max_its = 50
l_tol = 1e-4
l_max_its = 50
dt = 0.4
dtmin = 0.4
num_steps = 1
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = true
[]
(test/tests/mortar/ad_periodic_segmental_constraint/periodic_simple3d.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 3
xmin = -3.0
xmax = 3.0
ymin = -3.0
ymax = 3.0
zmin = -3.0
zmax = 3.0
nx = 3
ny = 3
nz = 3
elem_type = HEX27
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3 4 5'
new_boundary = '10 11 12 13 14 15'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[left]
type = LowerDBlockFromSidesetGenerator
input = left_block_id
sidesets = '14'
new_block_id = '10004'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '15'
new_block_id = '10005'
new_block_name = 'primary_top'
[]
[back]
type = LowerDBlockFromSidesetGenerator
input = top
sidesets = '11'
new_block_id = '10001'
new_block_name = 'secondary_back'
[]
[front]
type = LowerDBlockFromSidesetGenerator
input = back
sidesets = '13'
new_block_id = '10003'
new_block_name = 'primary_front'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = front
[]
[]
[Variables]
[u]
order = SECOND
family = LAGRANGE
[]
[epsilon]
order = THIRD
family = SCALAR
[]
[./lm1]
order = FIRST
family = LAGRANGE
block = secondary_left
[../]
[./lm2]
order = FIRST
family = LAGRANGE
block = secondary_bottom
[../]
[./lm3]
order = FIRST
family = LAGRANGE
block = secondary_back
[../]
[]
[AuxVariables]
[sigma]
order = THIRD
family = SCALAR
[]
[]
[AuxScalarKernels]
[sigma]
type = FunctionScalarAux
variable = sigma
function = '1 2 3'
execute_on = initial #timestep_end
[]
[]
[Kernels]
[diff1]
type = Diffusion
variable = u
block = 1
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = EqualValueConstraint
primary_boundary = '12'
secondary_boundary = '14'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
variable = lm1
correct_edge_dropping = true
[]
[periodiclr]
type = ADPeriodicSegmentalConstraint
primary_boundary = '12'
secondary_boundary = '14'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
epsilon = epsilon
sigma = sigma
variable = lm1
correct_edge_dropping = true
[]
[mortarbt]
type = EqualValueConstraint
primary_boundary = '15'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
variable = lm2
correct_edge_dropping = true
[]
[periodicbt]
type = ADPeriodicSegmentalConstraint
primary_boundary = '15'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
epsilon = epsilon
sigma = sigma
variable = lm2
correct_edge_dropping = true
[]
[mortarbf]
type = EqualValueConstraint
primary_boundary = '13'
secondary_boundary = '11'
primary_subdomain = 'primary_front'
secondary_subdomain = 'secondary_back'
secondary_variable = u
variable = lm3
correct_edge_dropping = true
[]
[periodicbf]
type = ADPeriodicSegmentalConstraint
primary_boundary = '13'
secondary_boundary = '11'
primary_subdomain = 'primary_front'
secondary_subdomain = 'secondary_back'
secondary_variable = u
epsilon = epsilon
sigma = sigma
variable = lm3
correct_edge_dropping = true
[]
[]
[Preconditioning]
[smp]
full = true
type = SMP
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
solve_type = NEWTON
[]
[Outputs]
# exodus = true
csv = true
[]
(modules/solid_mechanics/test/tests/lagrangian/cartesian/total/rates/rotation.i)
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 2
nx = 1
ny = 1
[]
[bottom_left]
type = ExtraNodesetGenerator
input = msh
new_boundary = 'bottom_left'
coord = '0 0 0'
[]
[top_left]
type = ExtraNodesetGenerator
input = bottom_left
new_boundary = 'top_left'
coord = '0 1 0'
[]
[top_right]
type = ExtraNodesetGenerator
input = top_left
new_boundary = 'top_right'
coord = '1 1 0'
[]
[bottom_right]
type = ExtraNodesetGenerator
input = top_right
new_boundary = 'bottom_right'
coord = '1 0 0'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
large_kinematics = true
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[Kernels]
[sdx]
type = TotalLagrangianStressDivergence
variable = disp_x
component = 0
[]
[sdy]
type = TotalLagrangianStressDivergence
variable = disp_y
component = 1
[]
[]
[AuxVariables]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[AuxKernel]
type = RankTwoAux
rank_two_tensor = cauchy_stress
index_i = 0
index_j = 0
execute_on = TIMESTEP_END
[]
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[AuxKernel]
type = RankTwoAux
rank_two_tensor = cauchy_stress
index_i = 1
index_j = 1
execute_on = TIMESTEP_END
[]
[]
[]
[BCs]
[fix_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left'
value = 0
[]
[fix_x]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left'
value = 0
[]
[top_left_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 'top_left'
function = 'theta:=if(t<1,0,t-1); -sin(theta)'
[]
[top_left_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 'top_left'
function = 'theta:=if(t<1,0,t-1); cos(theta)-1'
[]
[bottom_right_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 'bottom_right'
function = 'theta:=if(t<1,0,t-1); if(t<1,t,2*cos(theta)-1)'
[]
[bottom_right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 'bottom_right'
function = 'theta:=if(t<1,0,t-1); if(t<1,0,2*sin(theta))'
[]
[top_right_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 'top_right'
function = 'theta:=if(t<1,0,t-1); phi:=theta+atan(0.5); if(t<1,t,sqrt(5)*cos(phi)-1)'
[]
[top_right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 'top_right'
function = 'theta:=if(t<1,0,t-1); phi:=theta+atan(0.5); if(t<1,0,sqrt(5)*sin(phi)-1)'
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e5
poissons_ratio = 0
[]
[stress]
type = ComputeLagrangianLinearElasticStress
[]
[strain]
type = ComputeLagrangianStrain
[]
[]
[Postprocessors]
[sxx]
type = ElementAverageValue
variable = stress_xx
execute_on = 'INITIAL TIMESTEP_END'
[]
[syy]
type = ElementAverageValue
variable = stress_yy
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
dt = 0.01
end_time = '${fparse pi/2+1}'
solve_type = NEWTON
line_search = none
petsc_options_iname = -pc_type
petsc_options_value = lu
automatic_scaling = true
nl_abs_tol = 1e-10
nl_rel_tol = 1e-10
[]
[Outputs]
csv = true
[]
(modules/combined/examples/mortar/eigenstrain_action.i)
#
# Eigenstrain with Mortar gradient periodicity
#
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 50
ny = 50
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
[]
[./cnode]
input = gen
type = ExtraNodesetGenerator
coord = '0.0 0.0'
new_boundary = 100
[../]
[./anode]
input = cnode
type = ExtraNodesetGenerator
coord = '0.0 0.5'
new_boundary = 101
[../]
[]
[Modules/PhaseField/MortarPeriodicity]
[./strain]
variable = 'disp_x disp_y'
periodicity = gradient
periodic_directions = 'x y'
[../]
[]
[GlobalParams]
derivative_order = 2
enable_jit = true
displacements = 'disp_x disp_y'
[]
# AuxVars to compute the free energy density for outputting
[AuxVariables]
[./local_energy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./local_free_energy]
type = TotalFreeEnergy
block = 0
execute_on = 'initial LINEAR'
variable = local_energy
interfacial_vars = 'c'
kappa_names = 'kappa_c'
[../]
[]
[Variables]
# Solute concentration variable
[./c]
[./InitialCondition]
type = RandomIC
min = 0.49
max = 0.51
[../]
block = 0
[../]
[./w]
block = 0
[../]
# Mesh displacement
[./disp_x]
block = 0
[../]
[./disp_y]
block = 0
[../]
[]
[Kernels]
# Set up stress divergence kernels
[./TensorMechanics]
[../]
# Cahn-Hilliard kernels
[./c_dot]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[]
[Materials]
# declare a few constants, such as mobilities (L,M) and interface gradient prefactors (kappa*)
[./consts]
type = GenericConstantMaterial
block = '0'
prop_names = 'M kappa_c'
prop_values = '0.2 0.01 '
[../]
[./shear1]
type = GenericConstantRankTwoTensor
block = 0
tensor_values = '0 0 0 0 0 0.5'
tensor_name = shear1
[../]
[./shear2]
type = GenericConstantRankTwoTensor
block = 0
tensor_values = '0 0 0 0 0 -0.5'
tensor_name = shear2
[../]
[./expand3]
type = GenericConstantRankTwoTensor
block = 0
tensor_values = '1 1 0 0 0 0'
tensor_name = expand3
[../]
[./weight1]
type = DerivativeParsedMaterial
block = 0
expression = '0.3*c^2'
property_name = weight1
coupled_variables = c
[../]
[./weight2]
type = DerivativeParsedMaterial
block = 0
expression = '0.3*(1-c)^2'
property_name = weight2
coupled_variables = c
[../]
[./weight3]
type = DerivativeParsedMaterial
block = 0
expression = '4*(0.5-c)^2'
property_name = weight3
coupled_variables = c
[../]
# matrix phase
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
C_ijkl = '1 1'
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y'
[../]
[./eigenstrain]
type = CompositeEigenstrain
block = 0
tensors = 'shear1 shear2 expand3'
weights = 'weight1 weight2 weight3'
args = c
eigenstrain_name = eigenstrain
[../]
[./stress]
type = ComputeLinearElasticStress
block = 0
[../]
# chemical free energies
[./chemical_free_energy]
type = DerivativeParsedMaterial
block = 0
property_name = Fc
expression = '4*c^2*(1-c)^2'
coupled_variables = 'c'
outputs = exodus
output_properties = Fc
[../]
# elastic free energies
[./elastic_free_energy]
type = ElasticEnergyMaterial
f_name = Fe
block = 0
args = 'c'
outputs = exodus
output_properties = Fe
[../]
# free energy (chemical + elastic)
[./free_energy]
type = DerivativeSumMaterial
block = 0
property_name = F
sum_materials = 'Fc Fe'
coupled_variables = 'c'
[../]
[]
[BCs]
[./Periodic]
[./up_down]
primary = top
secondary = bottom
translation = '0 -1 0'
variable = 'c w'
[../]
[./left_right]
primary = left
secondary = right
translation = '1 0 0'
variable = 'c w'
[../]
[../]
# fix center point location
[./centerfix_x]
type = DirichletBC
boundary = 100
variable = disp_x
value = 0
[../]
[./centerfix_y]
type = DirichletBC
boundary = 100
variable = disp_y
value = 0
[../]
# fix side point x coordinate to inhibit rotation
[./angularfix]
type = DirichletBC
boundary = 101
variable = disp_x
value = 0
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
# We monitor the total free energy and the total solute concentration (should be constant)
[Postprocessors]
[./total_free_energy]
type = ElementIntegralVariablePostprocessor
block = 0
execute_on = 'initial TIMESTEP_END'
variable = local_energy
[../]
[./total_solute]
type = ElementIntegralVariablePostprocessor
block = 0
execute_on = 'initial TIMESTEP_END'
variable = c
[../]
[./min]
type = ElementExtremeValue
block = 0
execute_on = 'initial TIMESTEP_END'
value_type = min
variable = c
[../]
[./max]
type = ElementExtremeValue
block = 0
execute_on = 'initial TIMESTEP_END'
value_type = max
variable = c
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'PJFNK'
line_search = basic
# mortar currently does not support MPI parallelization
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = ' lu NONZERO 1e-10'
l_max_its = 30
nl_max_its = 12
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-10
start_time = 0.0
num_steps = 200
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.01
[../]
[]
[Outputs]
execute_on = 'timestep_end'
print_linear_residuals = false
exodus = true
[./table]
type = CSV
delimiter = ' '
[../]
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven.i)
[GlobalParams]
gravity = '0 0 0'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
elem_type = QUAD9
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./vel_x]
order = SECOND
family = LAGRANGE
[../]
[./vel_y]
order = SECOND
family = LAGRANGE
[../]
[./T]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 1.0
[../]
[../]
[./p]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
# mass
[./mass]
type = INSMass
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
# x-momentum, time
[./x_momentum_time]
type = INSMomentumTimeDerivative
variable = vel_x
[../]
# x-momentum, space
[./x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
# y-momentum, time
[./y_momentum_time]
type = INSMomentumTimeDerivative
variable = vel_y
[../]
# y-momentum, space
[./y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
# temperature
[./temperature_time]
type = INSTemperatureTimeDerivative
variable = T
[../]
[./temperature_space]
type = INSTemperature
variable = T
u = vel_x
v = vel_y
[../]
[]
[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
[../]
[./T_hot]
type = DirichletBC
variable = T
boundary = 'bottom'
value = 1
[../]
[./T_cold]
type = DirichletBC
variable = T
boundary = 'top'
value = 0
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[]
[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 = Transient
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
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_out
exodus = true
perf_graph = true
[]
(modules/xfem/test/tests/moving_interface/moving_bimaterial_finite_strain_cut_mesh.i)
# This test is for two layer materials with different youngs modulus with AD
# The global stress is determined by switching the stress based on level set values
# The material interface is marked by a level set function
# The two layer materials are glued together
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[XFEM]
output_cut_plane = true
[]
[UserObjects]
[cut]
type = InterfaceMeshCut2DUserObject
mesh_file = line.e
interface_velocity_function = -1
heal_always = true
[]
[]
[Mesh]
use_displaced_mesh = true
[generated_mesh]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmin = 0
xmax = 5
ymin = 0
ymax = 5
elem_type = QUAD4
[]
[left_bottom]
type = ExtraNodesetGenerator
new_boundary = 'left_bottom'
coord = '0 0'
input = generated_mesh
[]
[left_top]
type = ExtraNodesetGenerator
new_boundary = 'left_top'
coord = '0 5'
input = left_bottom
[]
[]
# [Functions]
# [ls_func]
# type = ParsedFunction
# expression = 'y-2.73+t'
# []
# []
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[ls]
[]
[a_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[a_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[a_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[b_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[b_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[b_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
# [ls_function]
# type = FunctionAux
# variable = ls
# function = ls_func
# []
[a_strain_xx]
type = RankTwoAux
variable = a_strain_xx
rank_two_tensor = A_total_strain
index_i = 0
index_j = 0
[]
[a_strain_yy]
type = RankTwoAux
variable = a_strain_yy
rank_two_tensor = A_total_strain
index_i = 1
index_j = 1
[]
[a_strain_xy]
type = RankTwoAux
variable = a_strain_xy
rank_two_tensor = A_total_strain
index_i = 0
index_j = 1
[]
[b_strain_xx]
type = RankTwoAux
variable = b_strain_xx
rank_two_tensor = B_total_strain
index_i = 0
index_j = 0
[]
[b_strain_yy]
type = RankTwoAux
variable = b_strain_yy
rank_two_tensor = B_total_strain
index_i = 1
index_j = 1
[]
[b_strain_xy]
type = RankTwoAux
variable = b_strain_xy
rank_two_tensor = B_total_strain
index_i = 0
index_j = 1
[]
[stress_xx]
type = RankTwoAux
variable = stress_xx
rank_two_tensor = stress
index_i = 0
index_j = 0
[]
[stress_xy]
type = RankTwoAux
variable = stress_xy
rank_two_tensor = stress
index_i = 0
index_j = 1
[]
[stress_yy]
type = RankTwoAux
variable = stress_yy
rank_two_tensor = stress
index_i = 1
index_j = 1
[]
[]
[Kernels]
[solid_x]
type = StressDivergenceTensors
variable = disp_x
component = 0
use_displaced_mesh = true
[]
[solid_y]
type = StressDivergenceTensors
variable = disp_y
component = 1
use_displaced_mesh = true
[]
[]
[Constraints]
[dispx_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_x
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[]
[dispy_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_y
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[]
[]
[BCs]
[bottomx]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[]
[bottomy]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[]
[topx]
type = FunctionDirichletBC
boundary = top
variable = disp_x
function = 0.03*t
[]
[topy]
type = FunctionDirichletBC
boundary = top
variable = disp_y
function = '0.03*t'
[]
[]
[Materials]
[elasticity_tensor_A]
type = ComputeIsotropicElasticityTensor
base_name = A
youngs_modulus = 1e9
poissons_ratio = 0.3
[]
[strain_A]
type = ComputeFiniteStrain
base_name = A
[]
[stress_A]
type = ComputeFiniteStrainElasticStress
base_name = A
[]
[elasticity_tensor_B]
type = ComputeIsotropicElasticityTensor
base_name = B
youngs_modulus = 1e7
poissons_ratio = 0.3
[]
[strain_B]
type = ComputeFiniteStrain
base_name = B
[]
[stress_B]
type = ComputeFiniteStrainElasticStress
base_name = B
[]
[combined_stress]
type = LevelSetBiMaterialRankTwo
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = stress
[]
[combined_jacob_mult]
type = LevelSetBiMaterialRankFour
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = Jacobian_mult
[]
[]
[Postprocessors]
[disp_x_norm]
type = ElementL2Norm
variable = disp_x
[]
[disp_y_norm]
type = ElementL2Norm
variable = disp_y
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-13
nl_abs_tol = 1e-50
# time control
start_time = 0.0
dt = 0.1
num_steps = 4
max_xfem_update = 1
[]
[Outputs]
print_linear_residuals = false
exodus = true
[]
(modules/solid_mechanics/test/tests/uel/reference.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
xmax = 10
ymax = 3
elem_type = TRI3
[]
[pin]
type = ExtraNodesetGenerator
nodes = 106
new_boundary = pin
input = gen
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = SMALL
incremental = false
add_variables = true
extra_vector_tags = 'kernel_residual'
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = pin
value = 0
[]
inactive = 'right_dirichlet'
[right_neumann]
type = FunctionNeumannBC
variable = disp_x
function = t
boundary = right
[]
[right_dirichlet]
type = FunctionDirichletBC
variable = disp_x
function = t/10
boundary = right
[]
[]
[Materials]
[stress]
type = ComputeLinearElasticStress
[]
[elasticity]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 100
poissons_ratio = 0.3
[]
[]
[Problem]
extra_tag_vectors = 'kernel_residual'
[]
[AuxVariables]
[res_x]
[]
[res_y]
[]
[]
[AuxKernels]
[res_x]
type = TagVectorAux
variable = res_x
v = disp_x
vector_tag = kernel_residual
[]
[res_y]
type = TagVectorAux
variable = res_y
v = disp_y
vector_tag = kernel_residual
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
dt = 1
num_steps = 15
[]
[Postprocessors]
[delta_l]
type = SideAverageValue
variable = disp_x
boundary = right
execute_on = 'INITIAL TIMESTEP_END'
[]
[V]
type = ElementIntegralMaterialProperty
mat_prop = 1
use_displaced_mesh = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_creep_y_3d.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 10
nz = 2
xmin = 0.0
ymin = 0.0
zmin = 0.0
xmax = 1.0
ymax = 10.0
zmax = 1.0
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = '100'
nodes = '4 10'
input = gen
[]
[corner_node_2]
type = ExtraNodesetGenerator
new_boundary = '101'
nodes = '1 67'
input = corner_node
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[creep_strain_xx]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xx
index_i = 0
index_j = 0
[]
[creep_strain_xy]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xy
index_i = 0
index_j = 1
[]
[creep_strain_yy]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_yy
index_i = 1
index_j = 1
[]
[creep_strain_zz]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_yy
index_i = 1
index_j = 1
[]
[sigma_yy]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1.0e-11 1.0'
y = '0 -4e1 -4e1'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_yy stress_yy'
use_automatic_differentiation = true
add_variables = true
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 700
poissons_ratio = 0.0
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "trial_creep_two"
max_iterations = 50
absolute_tolerance = 1e-16
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
hill_constants = "0.5 0.25 0.3866 1.6413 1.6413 1.2731"
[]
[trial_creep_two]
type = ADHillCreepStressUpdate
coefficient = 1e-16
n_exponent = 9
m_exponent = 0
activation_energy = 0
max_inelastic_increment = 0.00003
absolute_tolerance = 1e-20
relative_tolerance = 1e-20
# Force it to not use integration error
max_integration_error = 0.000001
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = 101
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = 100
value = 0.0
[]
[pressure]
type = ADPressure
boundary = top
function = pull
variable = disp_y
component = 1
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1.0e-13
nl_abs_tol = 1.0e-13
l_max_its = 90
num_steps = 10
dt = 1.0e-4
start_time = 0
automatic_scaling = true
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[num_lin]
type = NumLinearIterations
outputs = console
[]
[num_nonlin]
type = NumNonlinearIterations
outputs = console
[]
[creep_strain_yy]
type = ElementalVariableValue
variable = creep_strain_yy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[elastic_strain_yy]
type = ElementalVariableValue
variable = elastic_strain_yy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[sigma_yy]
type = ElementalVariableValue
variable = stress_yy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[]
[Outputs]
csv = true
exodus = true
perf_graph = true
[]
(modules/solid_mechanics/test/tests/global_strain/global_strain_action.i)
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 2
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[cnode]
type = ExtraNodesetGenerator
coord = '0 -0.5 0'
new_boundary = 100
input = generated_mesh
[]
[]
[GlobalParams]
displacements = 'u_x u_y u_z'
block = 0
[]
[Variables]
[./global_strain]
order = SIXTH
family = SCALAR
[../]
[]
[Physics]
[SolidMechanics]
# QuasiStatic action for generating the tensor mechanics kernels, variables,
# strain calculation material, and the auxilliary system for visualization
[QuasiStatic]
[./stress_div]
strain = SMALL
add_variables = true
global_strain = global_strain #global strain contribution
generate_output = 'strain_xx strain_xy strain_yy stress_xx stress_xy
stress_yy vonmises_stress'
[../]
[../]
# GlobalStrain action for generating the objects associated with the global
# strain calculation and associated displacement visualization
[./GlobalStrain]
[./global_strain]
scalar_global_strain = global_strain
displacements = 'u_x u_y u_z'
auxiliary_displacements = 'disp_x disp_y disp_z'
global_displacements = 'ug_x ug_y ug_z'
[../]
[../]
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'z'
variable = 'u_x u_y u_z'
[../]
[../]
# fix center point location
[./centerfix_x]
type = DirichletBC
boundary = 100
variable = u_x
value = 0
[../]
[./centerfix_z]
type = DirichletBC
boundary = 100
variable = u_z
value = 0
[../]
# applied displacement
[./appl_y]
type = DirichletBC
boundary = top
variable = u_y
value = 0.033
[../]
[./fix_y]
type = DirichletBC
boundary = bottom
variable = u_y
value = 0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
C_ijkl = '7 0.33'
fill_method = symmetric_isotropic_E_nu
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'PJFNK'
line_search = basic
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
l_max_its = 30
nl_max_its = 12
l_tol = 1.0e-4
nl_rel_tol = 1.0e-6
nl_abs_tol = 1.0e-10
start_time = 0.0
num_steps = 2
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/global_strain/global_strain_uniaxial.i)
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 2
[]
[cnode]
type = ExtraNodesetGenerator
coord = '0.0 0.0 0.0'
new_boundary = 100
input = generated_mesh
[]
[]
[Variables]
[./u_x]
[../]
[./u_y]
[../]
[./u_z]
[../]
[./global_strain]
order = SIXTH
family = SCALAR
[../]
[]
[AuxVariables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./s00]
order = CONSTANT
family = MONOMIAL
[../]
[./s11]
order = CONSTANT
family = MONOMIAL
[../]
[./e00]
order = CONSTANT
family = MONOMIAL
[../]
[./e11]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./disp_x]
type = GlobalDisplacementAux
variable = disp_x
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 0
[../]
[./disp_y]
type = GlobalDisplacementAux
variable = disp_y
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 1
[../]
[./disp_z]
type = GlobalDisplacementAux
variable = disp_z
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 2
[../]
[./s00]
type = RankTwoAux
variable = s00
rank_two_tensor = stress
index_i = 0
index_j = 0
[../]
[./s11]
type = RankTwoAux
variable = s11
rank_two_tensor = stress
index_i = 1
index_j = 1
[../]
[./e00]
type = RankTwoAux
variable = e00
rank_two_tensor = total_strain
index_i = 0
index_j = 0
[../]
[./e11]
type = RankTwoAux
variable = e11
rank_two_tensor = total_strain
index_i = 1
index_j = 1
[../]
[]
[GlobalParams]
displacements = 'u_x u_y u_z'
block = 0
[]
[Kernels]
[SolidMechanics]
[../]
[]
[ScalarKernels]
[./global_strain]
type = GlobalStrain
variable = global_strain
global_strain_uo = global_strain_uo
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y z'
variable = ' u_x u_y u_z'
[../]
[../]
# fix center point location
[./centerfix_x]
type = DirichletBC
boundary = 100
variable = u_x
value = 0
[../]
[./centerfix_y]
type = DirichletBC
boundary = 100
variable = u_y
value = 0
[../]
[./centerfix_z]
type = DirichletBC
boundary = 100
variable = u_z
value = 0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
C_ijkl = '70e9 0.33'
fill_method = symmetric_isotropic_E_nu
[../]
[./strain]
type = ComputeSmallStrain
global_strain = global_strain
[../]
[./global_strain]
type = ComputeGlobalStrain
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[]
[UserObjects]
[./global_strain_uo]
type = GlobalStrainUserObject
applied_stress_tensor = '5e9 0 0 0 0 0'
execute_on = 'Initial Linear Nonlinear'
[../]
[]
[Postprocessors]
[./l2err_e00]
type = ElementL2Error
variable = e00
function = 0.07142857 #strain_xx = C1111/sigma_xx
[../]
[./l2err_e11]
type = ElementL2Error
variable = e11
function = -0.07142857*0.33 #strain_yy = -nu*strain_xx
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'PJFNK'
line_search = basic
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
l_max_its = 30
nl_max_its = 12
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 1
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/uel/small_test_umat_states_fields.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
xmax = 10
ymax = 3
elem_type = TRI3
[]
[pin]
type = ExtraNodesetGenerator
nodes = 106
new_boundary = pin
input = gen
[]
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[temperature]
initial_condition = 1500
[]
[voltage]
initial_condition = 210
[]
[]
[AuxKernels]
[temperature]
type = FunctionAux
function = temperature_function
variable = temperature
[]
[voltage]
type = FunctionAux
function = voltage_function
variable = voltage
[]
[]
[Functions]
[voltage_function]
type = PiecewiseLinear
x = '0 15'
y = '210 450'
[]
[temperature_function]
type = PiecewiseLinear
x = '0 15'
y = '1500 800'
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = pin
value = 0
[]
inactive = 'right_dirichlet'
[right_neumann]
type = FunctionNeumannBC
variable = disp_x
function = t
boundary = right
[]
[right_dirichlet]
type = FunctionDirichletBC
variable = disp_x
function = t/10
boundary = right
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = SMALL
incremental = true
extra_vector_tags = 'kernel_residual'
[]
[]
[Materials]
[umat]
type = AbaqusUMATStress
constant_properties = '100 0.3'
plugin = '../../plugins/small_elastic_tri_states'
num_state_vars = 2
use_one_based_indexing = false
temperature = 'temperature'
external_fields = 'voltage'
[]
[]
[Problem]
kernel_coverage_check = false
extra_tag_vectors = 'kernel_residual'
[]
[AuxVariables]
[res_x]
[]
[res_y]
[]
[]
[AuxKernels]
[res_x]
type = TagVectorAux
variable = res_x
v = disp_x
vector_tag = kernel_residual
[]
[res_y]
type = TagVectorAux
variable = res_y
v = disp_y
vector_tag = kernel_residual
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
dt = 1
num_steps = 15
[]
[Postprocessors]
[delta_l]
type = SideAverageValue
variable = disp_x
boundary = right
execute_on = 'INITIAL TIMESTEP_END'
[]
[V]
type = ElementIntegralMaterialProperty
mat_prop = 1
use_displaced_mesh = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(test/tests/mortar/ad_periodic_segmental_constraint/testperiodicsole.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -1.0
xmax = 1.0
ymin = -1.0
ymax = 1.0
nx = 2
ny = 2
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_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[left]
type = LowerDBlockFromSidesetGenerator
input = left_block_id
sidesets = '13'
new_block_id = '10003'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '11'
new_block_id = '10001'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_top'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = top
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[kappa_x]
order = FIRST
family = SCALAR
[]
[kappa_y]
order = FIRST
family = SCALAR
[]
[]
[AuxVariables]
[kappa_aux]
order = SECOND
family = SCALAR
[]
[./flux_x]
order = FIRST
family = MONOMIAL
[../]
[./flux_y]
order = FIRST
family = MONOMIAL
[../]
[]
[AuxScalarKernels]
[kappa]
type = FunctionScalarAux
variable = kappa_aux
function = '1 3'
execute_on = initial #timestep_end
[]
[]
[AuxKernels]
[./flux_x]
type = DiffusionFluxAux
diffusivity = 'conductivity'
variable = flux_x
diffusion_variable = u
component = x
block = 1
[../]
[./flux_y]
type = DiffusionFluxAux
diffusivity = 'conductivity'
variable = flux_y
diffusion_variable = u
component = y
block = 1
[../]
[]
[Kernels]
[diff1]
type = ADDiffusion
variable = u
block = 1
[]
[]
[Materials]
[k1]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 1.0
block = 1
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = ADPenaltyEqualValueConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e3
[]
[periodiclrx]
type = ADTestPeriodicSole
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
kappa = kappa_x
kappa_aux = kappa_aux
component = 0
kappa_other = kappa_y
correct_edge_dropping = true
pen_scale = 1.e3
[]
[periodiclry]
type = ADTestPeriodicSole
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
kappa = kappa_y
kappa_aux = kappa_aux
component = 1
kappa_other = kappa_x
correct_edge_dropping = true
pen_scale = 1.e3
[]
[mortarbt]
type = ADPenaltyEqualValueConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e3
[]
[periodicbtx]
type = ADTestPeriodicSole
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
kappa = kappa_x
kappa_aux = kappa_aux
component = 0
kappa_other = kappa_y
correct_edge_dropping = true
pen_scale = 1.e3
[]
[periodicbty]
type = ADTestPeriodicSole
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
kappa = kappa_y
kappa_aux = kappa_aux
component = 1
kappa_other = kappa_x
correct_edge_dropping = true
compute_scalar_residuals = true
pen_scale = 1.e3
[]
[]
[Preconditioning]
[smp]
full = true
type = SMP
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
solve_type = NEWTON
[]
[Postprocessors]
[max]
type = ElementExtremeValue
variable = 'flux_x'
[]
[]
[Outputs]
csv = true
[]
(modules/combined/test/tests/optimization/optimization_density_update/top_opt_3d.i)
vol_frac = 0.5
E0 = 1e5
Emin = 1e-2
power = 2
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 3
nx = 24
ny = 12
nz = 12
xmin = 0
xmax = 20
ymin = 0
ymax = 10
zmin = 0
zmax = 10
[]
[middle_bottom_left_edge]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = pull
coord = '0 0 5'
[]
[]
[AuxVariables]
[compliance]
family = MONOMIAL
order = CONSTANT
[]
[Dc]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = ${vol_frac}
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_y
boundary = right
value = 0.0
[]
[no_z]
type = DirichletBC
variable = disp_z
boundary = right
value = 0.0
[]
[]
[NodalKernels]
[pull]
type = NodalGravity
variable = disp_y
boundary = pull
gravity_value = -1
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${E0}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
incremental = false
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[rad_avg]
type = RadialAverage
radius = 0.5
weights = constant
prop_name = sensitivity
execute_on = TIMESTEP_END
execution_order_group = -1
[]
[update]
type = DensityUpdate
density_sensitivity = Dc
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
[]
[calc_sense]
type = SensitivityFilter
density_sensitivity = Dc
design_density = mat_den
filter_UO = rad_avg
execute_on = TIMESTEP_END
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu '
nl_abs_tol = 1e-10
l_max_its = 200
start_time = 0.0
dt = 1.0
num_steps = 10
[]
[Outputs]
[out]
type = Exodus
time_step_interval = 10
[]
[]
(modules/solid_mechanics/test/tests/ad_anisotropic_creep/3d_bar_orthotropic_90deg_rotation_ad_creep_x.i)
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
xmin = 0
xmax = 2
ymin = 0
ymax = 10
zmin = 0
zmax = 2
nx = 1
ny = 1
nz = 1
elem_type = HEX8
[]
[corner]
type = ExtraNodesetGenerator
new_boundary = 101
coord = '0 0 0'
input = generated_mesh
[]
[side]
type = ExtraNodesetGenerator
new_boundary = 102
coord = '2 0 0'
input = corner
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
volumetric_locking_correction = true
use_automatic_differentiation = true
generate_output = 'elastic_strain_xx stress_xx creep_strain_xx creep_strain_yy creep_strain_zz'
[]
[]
[Materials]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "trial_creep"
max_iterations = 50
absolute_tolerance = 1e-18
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
hill_constants = "0.25 0.4 0.65 1.5 1.5 1.5"
use_large_rotation = true
[]
[trial_creep]
type = ADHillCreepStressUpdate
coefficient = 5e-14
n_exponent = 10
m_exponent = 0
activation_energy = 0
max_inelastic_increment = 0.00003
absolute_tolerance = 1e-18
relative_tolerance = 1e-18
# Force it to not use integration error
max_integration_error = 100.0
use_transformation = true
[]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 500
poissons_ratio = 0.0
[]
[]
[BCs]
[fix_x]
type = ADDirichletBC
variable = disp_x
boundary = bottom
value = 0
[]
[rot_z]
type = DisplacementAboutAxis
boundary = bottom
function = t
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '1. 0. 1.0e-13'
component = 2
variable = disp_z
[]
#
[rot_y]
type = DisplacementAboutAxis
boundary = bottom
function = t
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '1. 0. 1.0e-13'
component = 1
variable = disp_y
[]
[rot_z90]
type = DisplacementAboutAxis
boundary = bottom
function = 90
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '1. 0. 1.0e-13'
component = 2
variable = disp_z
[]
#
[rot_y90]
type = DisplacementAboutAxis
boundary = bottom
function = 90
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '1. 0. 1.0e-13'
component = 1
variable = disp_y
[]
[press]
type = Pressure
boundary = top
function = '-1.0*(t-90)*0.1'
use_displaced_mesh = true
displacements = 'disp_x disp_y disp_z'
variable = disp_z
[]
[]
[Postprocessors]
# The strain is along Z axis, naming it creep_strain_yy
# for better comparison.
[creep_strain_yy]
type = ADElementAverageMaterialProperty
mat_prop = creep_strain_zz
[]
[]
[Controls]
[c1]
type = TimePeriod
enable_objects = 'BCs::rot_z BCs::rot_y'
disable_objects = 'BCs::rot_z90 BCs::rot_y90 BCs::press'
start_time = '0'
end_time = '90'
[]
[c190plus]
type = TimePeriod
enable_objects = 'BCs::rot_z90 BCs::rot_y90 BCs::press'
disable_objects = 'BCs::rot_z BCs::rot_y '
start_time = '90'
end_time = '390'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
nl_rel_tol = 1e-11
nl_abs_tol = 1e-11
nl_max_its = 50
l_tol = 1e-4
l_max_its = 50
start_time = 0.0
dt = 0.1
dtmin = 0.1
num_steps = 1200
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = false
csv = true
[]
(modules/combined/examples/periodic_strain/global_strain_pfm.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 50
ny = 50
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
[]
[./cnode]
input = gen
type = ExtraNodesetGenerator
coord = '0.0 0.0'
new_boundary = 100
[../]
[]
[Variables]
[./u_x]
[../]
[./u_y]
[../]
[./global_strain]
order = THIRD
family = SCALAR
[../]
[./c]
[./InitialCondition]
type = FunctionIC
function = 'sin(2*x*pi)*sin(2*y*pi)*0.05+0.6'
[../]
[../]
[./w]
[../]
[]
[AuxVariables]
[./local_energy]
order = CONSTANT
family = MONOMIAL
[../]
[./disp_x]
[../]
[./disp_y]
[../]
[./s00]
order = CONSTANT
family = MONOMIAL
[../]
[./s01]
order = CONSTANT
family = MONOMIAL
[../]
[./s10]
order = CONSTANT
family = MONOMIAL
[../]
[./s11]
order = CONSTANT
family = MONOMIAL
[../]
[./e00]
order = CONSTANT
family = MONOMIAL
[../]
[./e01]
order = CONSTANT
family = MONOMIAL
[../]
[./e10]
order = CONSTANT
family = MONOMIAL
[../]
[./e11]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./disp_x]
type = GlobalDisplacementAux
variable = disp_x
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 0
[../]
[./disp_y]
type = GlobalDisplacementAux
variable = disp_y
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 1
[../]
[./local_free_energy]
type = TotalFreeEnergy
execute_on = 'initial LINEAR'
variable = local_energy
interfacial_vars = 'c'
kappa_names = 'kappa_c'
[../]
[./s00]
type = RankTwoAux
variable = s00
rank_two_tensor = stress
index_i = 0
index_j = 0
[../]
[./s01]
type = RankTwoAux
variable = s01
rank_two_tensor = stress
index_i = 0
index_j = 1
[../]
[./s10]
type = RankTwoAux
variable = s10
rank_two_tensor = stress
index_i = 1
index_j = 0
[../]
[./s11]
type = RankTwoAux
variable = s11
rank_two_tensor = stress
index_i = 1
index_j = 1
[../]
[./e00]
type = RankTwoAux
variable = e00
rank_two_tensor = total_strain
index_i = 0
index_j = 0
[../]
[./e01]
type = RankTwoAux
variable = e01
rank_two_tensor = total_strain
index_i = 0
index_j = 1
[../]
[./e10]
type = RankTwoAux
variable = e10
rank_two_tensor = total_strain
index_i = 1
index_j = 0
[../]
[./e11]
type = RankTwoAux
variable = e11
rank_two_tensor = total_strain
index_i = 1
index_j = 1
[../]
[]
[GlobalParams]
derivative_order = 2
enable_jit = true
displacements = 'u_x u_y'
block = 0
[]
[Kernels]
[./TensorMechanics]
[../]
# Cahn-Hilliard kernels
[./c_dot]
type = CoupledTimeDerivative
variable = w
v = c
block = 0
[../]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
block = 0
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
block = 0
[../]
[]
[ScalarKernels]
[./global_strain]
type = GlobalStrain
variable = global_strain
global_strain_uo = global_strain_uo
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
variable = 'c w u_x u_y'
[../]
[../]
# fix center point location
[./centerfix_x]
type = DirichletBC
boundary = 100
variable = u_x
value = 0
[../]
[./centerfix_y]
type = DirichletBC
boundary = 100
variable = u_y
value = 0
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '0.2 0.01 '
[../]
[./shear1]
type = GenericConstantRankTwoTensor
tensor_values = '0 0 0 0 0 0.5'
tensor_name = shear1
[../]
[./shear2]
type = GenericConstantRankTwoTensor
tensor_values = '0 0 0 0 0 -0.5'
tensor_name = shear2
[../]
[./expand3]
type = GenericConstantRankTwoTensor
tensor_values = '1 1 0 0 0 0'
tensor_name = expand3
[../]
[./weight1]
type = DerivativeParsedMaterial
expression = '0.3*c^2'
property_name = weight1
coupled_variables = c
[../]
[./weight2]
type = DerivativeParsedMaterial
expression = '0.3*(1-c)^2'
property_name = weight2
coupled_variables = c
[../]
[./weight3]
type = DerivativeParsedMaterial
expression = '4*(0.5-c)^2'
property_name = weight3
coupled_variables = c
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1'
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
global_strain = global_strain
eigenstrain_names = eigenstrain
[../]
[./eigenstrain]
type = CompositeEigenstrain
tensors = 'shear1 shear2 expand3'
weights = 'weight1 weight2 weight3'
args = c
eigenstrain_name = eigenstrain
[../]
[./global_strain]
type = ComputeGlobalStrain
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
# chemical free energies
[./chemical_free_energy]
type = DerivativeParsedMaterial
property_name = Fc
expression = '4*c^2*(1-c)^2'
coupled_variables = 'c'
outputs = exodus
output_properties = Fc
[../]
# elastic free energies
[./elastic_free_energy]
type = ElasticEnergyMaterial
f_name = Fe
args = 'c'
outputs = exodus
output_properties = Fe
[../]
# free energy (chemical + elastic)
[./free_energy]
type = DerivativeSumMaterial
block = 0
property_name = F
sum_materials = 'Fc Fe'
coupled_variables = 'c'
[../]
[]
[UserObjects]
[./global_strain_uo]
type = GlobalStrainUserObject
execute_on = 'Initial Linear Nonlinear'
[../]
[]
[Postprocessors]
[./total_free_energy]
type = ElementIntegralVariablePostprocessor
execute_on = 'initial TIMESTEP_END'
variable = local_energy
[../]
[./total_solute]
type = ElementIntegralVariablePostprocessor
execute_on = 'initial TIMESTEP_END'
variable = c
[../]
[./min]
type = ElementExtremeValue
execute_on = 'initial TIMESTEP_END'
value_type = min
variable = c
[../]
[./max]
type = ElementExtremeValue
execute_on = 'initial TIMESTEP_END'
value_type = max
variable = c
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'PJFNK'
line_search = basic
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
l_max_its = 30
nl_max_its = 12
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-10
start_time = 0.0
end_time = 2.0
[./TimeStepper]
type = IterationAdaptiveDT
dt = 0.01
growth_factor = 1.5
cutback_factor = 0.8
optimal_iterations = 9
iteration_window = 2
[../]
[]
[Outputs]
execute_on = 'timestep_end'
print_linear_residuals = false
exodus = true
[./table]
type = CSV
delimiter = ' '
[../]
[]
(modules/solid_mechanics/test/tests/ad_anisotropic_creep/aniso_iso_creep_x_3d.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 2
nz = 2
xmin = 0.0
ymin = 0.0
zmin = 0.0
xmax = 10.0
ymax = 1.0
zmax = 1.0
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = '100'
nodes = '3 69'
input = gen
[]
[corner_node_2]
type = ExtraNodesetGenerator
new_boundary = '101'
nodes = '4 47'
input = corner_node
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xz]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_yz]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = RankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[creep_strain_xx]
type = RankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xx
index_i = 0
index_j = 0
[]
[creep_strain_xy]
type = RankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xy
index_i = 0
index_j = 1
[]
[creep_strain_yy]
type = RankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_yy
index_i = 1
index_j = 1
[]
[creep_strain_zz]
type = RankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_zz
index_i = 2
index_j = 2
[]
[creep_strain_xz]
type = RankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xz
index_i = 0
index_j = 2
[]
[creep_strain_yz]
type = RankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_yz
index_i = 1
index_j = 2
[]
[sigma_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 1
index_j = 1
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1.0e-9 1.0'
y = '0 -4e1 -4e1'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_xx stress_xx'
add_variables = true
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 700
poissons_ratio = 0.0
[]
[elastic_strain]
type = ComputeMultipleInelasticStress
# inelastic_models = 'trial_creep_iso'
max_iterations = 50
[]
[hill_tensor]
type = HillConstants
# F G H L M N
hill_constants = "0.5 0.5 0.5 1.5 1.5 1.5"
[]
[trial_creep_aniso_iso]
type = HillCreepStressUpdate
coefficient = 1e-16
n_exponent = 9
m_exponent = 0
activation_energy = 0
max_inelastic_increment = 0.00003
relative_tolerance = 1e-20
absolute_tolerance = 1e-20
internal_solve_output_on = never
# Force it to not use integration error
max_integration_error = 1.0
[]
[trial_creep_iso]
type = PowerLawCreepStressUpdate
coefficient = 1e-16
n_exponent = 9
m_exponent = 0
activation_energy = 0
# F G H L M N
max_inelastic_increment = 0.00003
relative_tolerance = 1e-16
absolute_tolerance = 1e-16
internal_solve_output_on = never
[]
[]
[BCs]
[no_disp_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[no_disp_y]
type = DirichletBC
variable = disp_y
boundary = 100
value = 0.0
[]
[no_disp_z]
type = DirichletBC
variable = disp_z
boundary = 101
value = 0.0
[]
[Pressure]
[Side1]
boundary = right
function = pull
[]
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-13
nl_abs_tol = 1.0e-14
l_max_its = 90
num_steps = 10
dt = 5.0e-4
start_time = 0
automatic_scaling = true
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[num_lin]
type = NumLinearIterations
outputs = console
[]
[num_nonlin]
type = NumNonlinearIterations
outputs = console
[]
[creep_strain_xx]
type = ElementalVariableValue
variable = creep_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_yy]
type = ElementalVariableValue
variable = creep_strain_yy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_zz]
type = ElementalVariableValue
variable = creep_strain_zz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_xy]
type = ElementalVariableValue
variable = creep_strain_xy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_yz]
type = ElementalVariableValue
variable = creep_strain_yz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_xz]
type = ElementalVariableValue
variable = creep_strain_xz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[elastic_strain_xx]
type = ElementalVariableValue
variable = elastic_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[sigma_xx]
type = ElementalVariableValue
variable = stress_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[]
[Outputs]
csv = true
exodus = true
perf_graph = true
[]
(modules/solid_mechanics/test/tests/global_strain/global_strain.i)
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
[]
[cnode]
type = ExtraNodesetGenerator
coord = '0 0'
new_boundary = 100
input = generated_mesh
[]
[]
[Variables]
[./u_x]
[../]
[./u_y]
[../]
[./global_strain]
order = THIRD
family = SCALAR
[../]
[]
[AuxVariables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[AuxKernels]
[./disp_x]
type = GlobalDisplacementAux
variable = disp_x
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 0
[../]
[./disp_y]
type = GlobalDisplacementAux
variable = disp_y
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 1
[../]
[]
[GlobalParams]
displacements = 'u_x u_y'
block = 0
[]
[Kernels]
[SolidMechanics]
[../]
[]
[ScalarKernels]
[./global_strain]
type = GlobalStrain
variable = global_strain
global_strain_uo = global_strain_uo
[../]
[]
[BCs]
[./Periodic]
[./left-right]
auto_direction = 'x y'
variable = 'u_x u_y'
[../]
[../]
# fix center point location
[./centerfix_x]
type = DirichletBC
boundary = 100
variable = u_x
value = 0
[../]
[./centerfix_y]
type = DirichletBC
boundary = 100
variable = u_y
value = 0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
C_ijkl = '1 1'
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
global_strain = global_strain
[../]
[./global_strain]
type = ComputeGlobalStrain
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[]
[UserObjects]
[./global_strain_uo]
type = GlobalStrainUserObject
applied_stress_tensor = '0.1 0.2 0 0 0 -0.2'
execute_on = 'Initial Linear Nonlinear'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'PJFNK'
line_search = basic
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
l_max_its = 30
nl_max_its = 12
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-10
start_time = 0.0
num_steps = 2
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/jeffery_hamel/wedge_dirichlet.i)
# This input file tests whether we can converge to the semi-analytical
# solution for flow in a 2D wedge.
[GlobalParams]
gravity = '0 0 0'
# Params used by the WedgeFunction for computing the exact solution.
# The value of K is only required for comparing the pressure to the
# exact solution, and is computed by the associated jeffery_hamel.py
# script.
alpha_degrees = 15
Re = 30
K = -9.78221333616
f = f_theta
[]
[Mesh]
[file]
type = FileMeshGenerator
# file = wedge_4x6.e
file = wedge_8x12.e
# file = wedge_16x24.e
# file = wedge_32x48.e
# file = wedge_64x96.e
[]
[./corner_node]
# Pin is on the centerline of the channel on the left-hand side of
# the domain at r=1. If you change the domain, you will need to
# update this pin location for the pressure exact solution to
# work.
type = ExtraNodesetGenerator
new_boundary = pinned_node
coord = '1 0'
input = file
[../]
[]
[Variables]
[./vel_x]
order = SECOND
family = LAGRANGE
[../]
[./vel_y]
order = SECOND
family = LAGRANGE
[../]
[./p]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./mass]
type = INSMass
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
[./x_momentum_time]
type = INSMomentumTimeDerivative
variable = vel_x
[../]
[./x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./y_momentum_time]
type = INSMomentumTimeDerivative
variable = vel_y
[../]
[./y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
[]
[BCs]
[./vel_x_no_slip]
type = DirichletBC
variable = vel_x
boundary = 'top_wall bottom_wall'
value = 0.0
[../]
[./vel_y_no_slip]
type = DirichletBC
variable = vel_y
boundary = 'top_wall bottom_wall'
value = 0.0
[../]
[./vel_x_inlet]
type = FunctionDirichletBC
variable = vel_x
boundary = 'inlet outlet'
function = 'vel_x_exact'
[../]
[./vel_y_inlet]
type = FunctionDirichletBC
variable = vel_y
boundary = 'inlet outlet'
function = 'vel_y_exact'
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 1
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = NEWTON
[../]
[]
[Executioner]
type = Transient
dt = 1.e-2
dtmin = 1.e-2
num_steps = 5
petsc_options_iname = '-ksp_gmres_restart -pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = '300 bjacobi ilu 4'
line_search = none
nl_rel_tol = 1e-13
nl_abs_tol = 1e-11
nl_max_its = 10
l_tol = 1e-6
l_max_its = 300
[]
[Outputs]
exodus = true
[]
[Functions]
[./f_theta]
# Non-dimensional solution values f(eta), 0 <= eta <= 1 for
# alpha=15 deg, Re=30. Note: this introduces an input file
# ordering dependency: this Function must appear *before* the two
# functions below which use it since apparently proper dependency
# resolution is not done in this scenario.
type = PiecewiseLinear
data_file = 'f.csv'
format = 'columns'
[../]
[./vel_x_exact]
type = WedgeFunction
var_num = 0
mu = 1
rho = 1
[../]
[./vel_y_exact]
type = WedgeFunction
var_num = 1
mu = 1
rho = 1
[../]
[./p_exact]
type = WedgeFunction
var_num = 2
mu = 1
rho = 1
[../]
[]
[Postprocessors]
[./vel_x_L2_error]
type = ElementL2Error
variable = vel_x
function = vel_x_exact
execute_on = 'initial timestep_end'
[../]
[./vel_y_L2_error]
type = ElementL2Error
variable = vel_y
function = vel_y_exact
execute_on = 'initial timestep_end'
[../]
[./p_L2_error]
type = ElementL2Error
variable = p
function = p_exact
execute_on = 'initial timestep_end'
[../]
[]
(modules/navier_stokes/test/tests/finite_element/ins/boussinesq/boussinesq_stabilized.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmax = .05
ymax = .05
nx = 20
ny = 20
elem_type = QUAD9
[]
[./bottom_left]
type = ExtraNodesetGenerator
new_boundary = corner
coord = '0 0'
input = gen
[../]
[]
[Preconditioning]
[./Newton_SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -ksp_gmres_restart'
petsc_options_value = 'bjacobi lu NONZERO 200'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[out]
type = Exodus
execute_on = 'final'
[]
[]
[Variables]
[velocity]
family = LAGRANGE_VEC
[]
[p][]
[temp]
initial_condition = 340
scaling = 1e-4
[]
[]
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
variable = velocity
[]
[]
[BCs]
[./velocity_dirichlet]
type = VectorDirichletBC
boundary = 'left right bottom top'
variable = velocity
# The third entry is to satisfy RealVectorValue
values = '0 0 0'
[../]
# Even though we are integrating by parts, because there are no integrated
# boundary conditions on the velocity p doesn't appear in the system of
# equations. Thus we must pin the pressure somewhere in order to ensure a
# unique solution
[./p_zero]
type = DirichletBC
boundary = corner
variable = p
value = 0
[../]
[./cold]
type = DirichletBC
variable = temp
boundary = left
value = 300
[../]
[./hot]
type = DirichletBC
variable = temp
boundary = right
value = 400
[../]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[mass_pspg]
type = INSADMassPSPG
variable = p
[]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[momentum_advection]
type = INSADMomentumAdvection
variable = velocity
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
[]
[./buoyancy]
type = INSADBoussinesqBodyForce
variable = velocity
temperature = temp
gravity = '0 -9.81 0'
[../]
[./gravity]
type = INSADGravityForce
variable = velocity
gravity = '0 -9.81 0'
[../]
[supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[]
[temp_advection]
type = INSADEnergyAdvection
variable = temp
[]
[temp_conduction]
type = ADHeatConduction
variable = temp
thermal_conductivity = 'k'
[../]
[temp_supg]
type = INSADEnergySUPG
variable = temp
velocity = velocity
[]
[]
[Materials]
[./ad_const]
type = ADGenericConstantMaterial
# alpha = coefficient of thermal expansion where rho = rho0 -alpha * rho0 * delta T
prop_names = 'mu rho alpha k cp'
prop_values = '30.74e-6 .5757 2.9e-3 46.38e-3 1054'
[../]
[./const]
type = GenericConstantMaterial
prop_names = 'temp_ref'
prop_values = '900'
[../]
[ins_mat]
type = INSADStabilized3Eqn
velocity = velocity
pressure = p
temperature = temp
[]
[]
(modules/solid_mechanics/test/tests/ad_anisotropic_creep/ad_aniso_creep_temperature_coefficients.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 2
nz = 2
xmin = 0.0
ymin = 0.0
zmin = 0.0
xmax = 10.0
ymax = 1.0
zmax = 1.0
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = '100'
nodes = '3 69'
input = gen
[]
[corner_node_2]
type = ExtraNodesetGenerator
new_boundary = '101'
nodes = '4 47'
input = corner_node
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xz]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_yz]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[creep_strain_xx]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xx
index_i = 0
index_j = 0
[]
[creep_strain_xy]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xy
index_i = 0
index_j = 1
[]
[creep_strain_yy]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_yy
index_i = 1
index_j = 1
[]
[creep_strain_zz]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_zz
index_i = 2
index_j = 2
[]
[creep_strain_xz]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xz
index_i = 0
index_j = 2
[]
[creep_strain_yz]
type = ADRankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_yz
index_i = 1
index_j = 2
[]
[sigma_xx]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 1
index_j = 1
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1.0e-9 1.0'
y = '0 -4e1 -4e1'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_xx stress_xx'
use_automatic_differentiation = true
add_variables = true
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 700
poissons_ratio = 0.0
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = 'trial_creep_aniso_iso'
max_iterations = 50
[]
[hill_constants]
type = ADHillConstants
# F G H L M N
hill_constants = "0.5 0.5 0.5 1.5 1.5 1.5"
[]
[trial_creep_aniso_iso]
type = ADHillCreepStressUpdate
coefficient = 1e-16
n_exponent = 9
m_exponent = 0
activation_energy = 0
max_inelastic_increment = 0.00003
relative_tolerance = 1e-20
absolute_tolerance = 1e-20
internal_solve_output_on = never
# Force it to not use integration error
max_integration_error = 1.0
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = 100
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = 101
value = 0.0
[]
[Pressure]
[Side1]
boundary = right
function = pull
[]
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-13
nl_abs_tol = 1.0e-14
l_max_its = 90
num_steps = 50
dt = 5.0e-4
start_time = 0
automatic_scaling = true
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[num_lin]
type = NumLinearIterations
outputs = console
[]
[num_nonlin]
type = NumNonlinearIterations
outputs = console
[]
[creep_strain_xx]
type = ElementalVariableValue
variable = creep_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_yy]
type = ElementalVariableValue
variable = creep_strain_yy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_zz]
type = ElementalVariableValue
variable = creep_strain_zz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_xy]
type = ElementalVariableValue
variable = creep_strain_xy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_yz]
type = ElementalVariableValue
variable = creep_strain_yz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[creep_strain_xz]
type = ElementalVariableValue
variable = creep_strain_xz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[elastic_strain_xx]
type = ElementalVariableValue
variable = elastic_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[sigma_xx]
type = ElementalVariableValue
variable = stress_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[]
[Outputs]
csv = true
exodus = true
perf_graph = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/cg-dg-hybrid/mms/lid-driven/hybrid-cg-dg-mms.i)
rho=1.1
mu=1.1
cp=1.1
k=1.1
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = -1
xmax = 1.0
ymin = -1
ymax = 1.0
nx = 2
ny = 2
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[]
[]
[Variables]
[u]
family = MONOMIAL
[]
[v]
family = MONOMIAL
[]
[pressure][]
[T]
family = MONOMIAL
[]
[]
[Kernels]
[momentum_x_convection]
type = ADConservativeAdvection
variable = u
velocity = 'velocity'
advected_quantity = 'rhou'
[]
[momentum_x_diffusion]
type = MatDiffusion
variable = u
diffusivity = 'mu'
[]
[momentum_x_pressure]
type = PressureGradient
integrate_p_by_parts = false
variable = u
pressure = pressure
component = 0
[]
[u_forcing]
type = BodyForce
variable = u
function = forcing_u
[]
[momentum_y_convection]
type = ADConservativeAdvection
variable = v
velocity = 'velocity'
advected_quantity = 'rhov'
[]
[momentum_y_diffusion]
type = MatDiffusion
variable = v
diffusivity = 'mu'
[]
[momentum_y_pressure]
type = PressureGradient
integrate_p_by_parts = false
variable = v
pressure = pressure
component = 1
[]
[v_forcing]
type = BodyForce
variable = v
function = forcing_v
[]
[mass]
type = ADConservativeAdvection
variable = pressure
velocity = velocity
advected_quantity = -1
[]
[p_forcing]
type = BodyForce
variable = pressure
function = forcing_p
[]
[T_convection]
type = ADConservativeAdvection
variable = T
velocity = 'velocity'
advected_quantity = 'rho_cp_temp'
[]
[T_diffusion]
type = MatDiffusion
variable = T
diffusivity = 'k'
[]
[T_forcing]
type = BodyForce
variable = T
function = forcing_T
[]
[]
[DGKernels]
[momentum_x_convection]
type = ADDGAdvection
variable = u
velocity = 'velocity'
advected_quantity = 'rhou'
[]
[momentum_x_diffusion]
type = DGDiffusion
variable = u
sigma = 6
epsilon = -1
diff = 'mu'
[]
[momentum_y_convection]
type = ADDGAdvection
variable = v
velocity = 'velocity'
advected_quantity = 'rhov'
[]
[momentum_y_diffusion]
type = DGDiffusion
variable = v
sigma = 6
epsilon = -1
diff = 'mu'
[]
[T_convection]
type = ADDGAdvection
variable = T
velocity = 'velocity'
advected_quantity = 'rho_cp_temp'
[]
[T_diffusion]
type = DGDiffusion
variable = T
sigma = 6
epsilon = -1
diff = 'k'
[]
[]
[BCs]
[u_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'left bottom right top'
variable = u
sigma = 6
epsilon = -1
function = exact_u
diff = 'mu'
[]
[v_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'left bottom right top'
variable = v
sigma = 6
epsilon = -1
function = exact_v
diff = 'mu'
[]
[pressure_pin]
type = FunctionDirichletBC
variable = pressure
boundary = 'pinned_node'
function = 'exact_p'
[]
[T_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'left bottom right top'
variable = T
sigma = 6
epsilon = -1
function = exact_T
diff = 'k'
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho cp'
prop_values = '${rho} ${cp}'
[]
[const_reg]
type = GenericConstantMaterial
prop_names = 'mu k'
prop_values = '${mu} ${k}'
[]
[vel]
type = ADVectorFromComponentVariablesMaterial
vector_prop_name = 'velocity'
u = u
v = v
[]
[rhou]
type = ADParsedMaterial
property_name = 'rhou'
coupled_variables = 'u'
material_property_names = 'rho'
expression = 'rho*u'
[]
[rhov]
type = ADParsedMaterial
property_name = 'rhov'
coupled_variables = 'v'
material_property_names = 'rho'
expression = 'rho*v'
[]
[rho_cp]
type = ADParsedMaterial
property_name = 'rho_cp'
material_property_names = 'rho cp'
expression = 'rho*cp'
[]
[rho_cp_temp]
type = ADParsedMaterial
property_name = 'rho_cp_temp'
material_property_names = 'rho cp'
coupled_variables = 'T'
expression = 'rho*cp*T'
[]
[]
[Functions]
[exact_u]
type = ParsedFunction
expression = 'sin(y)*cos((1/2)*x*pi)'
[]
[forcing_u]
type = ParsedFunction
expression = 'mu*sin(y)*cos((1/2)*x*pi) + (1/4)*pi^2*mu*sin(y)*cos((1/2)*x*pi) - 1/2*pi*rho*sin(x)*sin(y)*sin((1/2)*y*pi)*cos((1/2)*x*pi) + rho*sin(x)*cos(y)*cos((1/2)*x*pi)*cos((1/2)*y*pi) - pi*rho*sin(y)^2*sin((1/2)*x*pi)*cos((1/2)*x*pi) + sin(y)*cos(x)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_v]
type = ParsedFunction
expression = 'sin(x)*cos((1/2)*y*pi)'
[]
[forcing_v]
type = ParsedFunction
expression = 'mu*sin(x)*cos((1/2)*y*pi) + (1/4)*pi^2*mu*sin(x)*cos((1/2)*y*pi) - pi*rho*sin(x)^2*sin((1/2)*y*pi)*cos((1/2)*y*pi) - 1/2*pi*rho*sin(x)*sin(y)*sin((1/2)*x*pi)*cos((1/2)*y*pi) + rho*sin(y)*cos(x)*cos((1/2)*x*pi)*cos((1/2)*y*pi) + sin(x)*cos(y)'
symbol_names = 'mu rho'
symbol_values = '${mu} ${rho}'
[]
[exact_p]
type = ParsedFunction
expression = 'sin(x)*sin(y)'
[]
[forcing_p]
type = ParsedFunction
expression = '(1/2)*pi*sin(x)*sin((1/2)*y*pi) + (1/2)*pi*sin(y)*sin((1/2)*x*pi)'
[]
[exact_T]
type = ParsedFunction
expression = 'cos(x)*cos(y)'
[]
[forcing_T]
type = ParsedFunction
expression = '-cp*rho*sin(x)*sin(y)*cos(x)*cos((1/2)*y*pi) - cp*rho*sin(x)*sin(y)*cos(y)*cos((1/2)*x*pi) - 1/2*pi*cp*rho*sin(x)*sin((1/2)*y*pi)*cos(x)*cos(y) - 1/2*pi*cp*rho*sin(y)*sin((1/2)*x*pi)*cos(x)*cos(y) + 2*k*cos(x)*cos(y)'
symbol_names = 'rho cp k'
symbol_values = '${rho} ${cp} ${k}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu NONZERO mumps'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
csv = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2u]
type = ElementL2Error
variable = u
function = exact_u
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2v]
variable = v
function = exact_v
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2T]
variable = T
function = exact_T
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2p]
variable = pressure
function = exact_p
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(modules/solid_mechanics/test/tests/global_strain/global_strain_disp.i)
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 2
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[cnode]
type = ExtraNodesetGenerator
coord = '0 -0.5 0'
new_boundary = 100
input = generated_mesh
[]
[]
[Variables]
[./u_x]
[../]
[./u_y]
[../]
[./u_z]
[../]
[./global_strain]
order = SIXTH
family = SCALAR
[../]
[]
[AuxVariables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./s00]
order = CONSTANT
family = MONOMIAL
[../]
[./s11]
order = CONSTANT
family = MONOMIAL
[../]
[./e00]
order = CONSTANT
family = MONOMIAL
[../]
[./e11]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./disp_x]
type = GlobalDisplacementAux
variable = disp_x
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 0
[../]
[./disp_y]
type = GlobalDisplacementAux
variable = disp_y
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 1
[../]
[./disp_z]
type = GlobalDisplacementAux
variable = disp_z
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 2
[../]
[./s00]
type = RankTwoAux
variable = s00
rank_two_tensor = stress
index_i = 0
index_j = 0
[../]
[./s11]
type = RankTwoAux
variable = s11
rank_two_tensor = stress
index_i = 1
index_j = 1
[../]
[./e00]
type = RankTwoAux
variable = e00
rank_two_tensor = total_strain
index_i = 0
index_j = 0
[../]
[./e11]
type = RankTwoAux
variable = e11
rank_two_tensor = total_strain
index_i = 1
index_j = 1
[../]
[]
[GlobalParams]
displacements = 'u_x u_y u_z'
block = 0
[]
[Kernels]
[SolidMechanics]
[../]
[]
[ScalarKernels]
[./global_strain]
type = GlobalStrain
variable = global_strain
global_strain_uo = global_strain_uo
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'z'
variable = 'u_x u_y u_z'
[../]
[../]
# fix center point location
[./centerfix_x]
type = DirichletBC
boundary = 100
variable = u_x
value = 0
[../]
[./fix_y]
type = DirichletBC
boundary = bottom
variable = u_y
value = 0
[../]
[./centerfix_z]
type = DirichletBC
boundary = 100
variable = u_z
value = 0
[../]
[./appl_y]
type = DirichletBC
boundary = top
variable = u_y
value = 0.033
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
C_ijkl = '7 0.33'
fill_method = symmetric_isotropic_E_nu
[../]
[./strain]
type = ComputeSmallStrain
global_strain = global_strain
[../]
[./global_strain]
type = ComputeGlobalStrain
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[]
[UserObjects]
[./global_strain_uo]
type = GlobalStrainUserObject
execute_on = 'Initial Linear Nonlinear'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'PJFNK'
line_search = basic
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
l_max_its = 30
nl_max_its = 12
l_tol = 1.0e-4
nl_rel_tol = 1.0e-6
nl_abs_tol = 1.0e-10
start_time = 0.0
num_steps = 2
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/hydrostatic/gravity.i)
[GlobalParams]
gravity = '0 -0.001 0'
convective_term = false
integrate_p_by_parts = false
u = vel_x
v = vel_y
pressure = p
[]
[Mesh]
second_order = true
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 1
ny = 5
ymax = 5
[../]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = top_right
coord = '0 5'
input = gen
[../]
[]
[Variables]
[./vel_x]
order = SECOND
[../]
[./vel_y]
order = SECOND
[../]
[./p]
[../]
[]
[Kernels]
[./mass]
type = INSMass
variable = p
[../]
[./x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
component = 0
[../]
[./y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
component = 1
[../]
[]
[BCs]
[./x_no_slip]
type = DirichletBC
variable = vel_x
boundary = 'top bottom left right'
value = 0.0
[../]
[./y_no_slip]
type = DirichletBC
variable = vel_y
boundary = 'top bottom left right'
value = 0.0
[../]
[./p_corner]
type = DirichletBC
boundary = top_right
value = 0
variable = p
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
prop_names = 'rho mu'
prop_values = '100 1'
[../]
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = NEWTON
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-ksp_gmres_restart -pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = '300 bjacobi ilu 4'
line_search = none
nl_rel_tol = 1e-12
nl_max_its = 6
l_tol = 1e-6
l_max_its = 300
[]
[Outputs]
exodus = true
execute_on = TIMESTEP_END
[]
(test/tests/meshgenerators/extra_nodeset_generator/generate_extra_nodeset_coord.i)
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[./extra_nodeset]
type = ExtraNodesetGenerator
input = square
new_boundary = 'middle_node'
coord = '0.5 0.5'
[]
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/crystal_plasticity/monolithic_material_based/rot-eg1.i)
#
# Rotation Test
#
# This test is designed to compute a uniaxial stress and then follow that
# stress as the mesh is rotated 90 degrees.
#
# The mesh is composed of one block with a single element. The nodal
# displacements in the x and y directions are prescribed. Poisson's
# ratio is zero.
#
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
elem_type = HEX8
displacements = 'ux uy uz'
[]
[./side1n1]
input = gen
type = ExtraNodesetGenerator
coord = '0.0 0.0 0.0'
boundary = 6
[../]
[./side1n2]
input = side1n1
type = ExtraNodesetGenerator
coord = '1.0 0.0 0.0'
boundary = 7
[../]
[./side2n1]
input = side1n2
type = ExtraNodesetGenerator
coord = '0.0 1.0 0.0'
boundary = 8
[../]
[./side2n2]
input = side2n1
type = ExtraNodesetGenerator
coord = '1.0 1.0 0.0'
boundary = 9
[../]
[./side3n1]
input = side2n2
type = ExtraNodesetGenerator
coord = '0.0 1.0 1.0'
boundary = 10
[../]
[./side3n2]
input = side3n1
type = ExtraNodesetGenerator
coord = '1.0 1.0 1.0'
boundary = 11
[../]
[./side4n1]
input = side3n2
type = ExtraNodesetGenerator
coord = '0.0 0.0 1.0'
boundary = 12
[../]
[./side4n2]
input = side4n1
type = ExtraNodesetGenerator
coord = '1.0 0.0 1.0'
boundary = 13
[../]
[]
[Variables]
[./ux]
block = 0
[../]
[./uy]
block = 0
[../]
[./uz]
block = 0
[../]
[]
[Functions]
[./side2uxfunc]
type = ParsedFunction
expression = cos(pi/2*t)-1
[../]
[./side2uyfunc]
type = ParsedFunction
expression = sin(pi/2*t)
[../]
[./side3uxfunc]
type = ParsedFunction
expression = cos(pi/2*t)-sin(pi/2*t)-1
[../]
[./side3uyfunc]
type = ParsedFunction
expression = cos(pi/2*t)+sin(pi/2*t)-1
[../]
[./side4uxfunc]
type = ParsedFunction
expression = -sin(pi/2*t)
[../]
[./side4uyfunc]
type = ParsedFunction
expression = cos(pi/2*t)-1
[../]
[]
[BCs]
active = 'bcside1 bcside2ux bcside2uy bcside4ux bcside4uy bcside3uy bcside3ux bcx'
[./bcside1]
type = DirichletBC
variable = 'uy uz'
boundary = '6 7'
value = 0
[../]
[./bcside2ux]
type = FunctionDirichletBC
variable = uy
boundary = '8 9'
function = side2uxfunc
[../]
[./bcside2uy]
type = FunctionDirichletBC
variable = uz
boundary = '8 9'
function = side2uyfunc
[../]
[./bcside3ux]
type = FunctionDirichletBC
variable = uy
boundary = '10 11'
function = side3uxfunc
[../]
[./bcside3uy]
type = FunctionDirichletBC
variable = uz
boundary = '10 11'
function = side3uyfunc
[../]
[./bcside4ux]
type = FunctionDirichletBC
variable = uy
boundary = '12 13'
function = side4uxfunc
[../]
[./bcside4uy]
type = FunctionDirichletBC
variable = uz
boundary = '12 13'
function = side4uyfunc
[../]
[./bot]
type = DirichletBC
variable = 'ux uy uz'
boundary = back
value = 0
[../]
[./topxz]
type = DirichletBC
variable = 'ux uz'
boundary = front
value = 0
[../]
[./topy]
type = DirichletBC
variable = uy
boundary = front
value = 1
[../]
[./bcx]
type = DirichletBC
variable = ux
boundary = '6 7 8 9 10 11 12 13'
value = 0
[../]
[]
[Materials]
[./crysp]
type = FiniteStrainCrystalPlasticity
block = 0
disp_y = uy
disp_x = ux
slip_sys_file_name = input_slip_sys.txt
disp_z = uz
flowprops = ' 1 12 0.001 0.1'
C_ijkl = '1.684e5 1.214e5 1.214e5 1.684e5 1.214e5 1.684e5 .754e5 .754e5 .754e5'
nss = 12
hprops = '1 541.5 60.8 109.8'
gprops = '1 12 60.8'
fill_method = symmetric9
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
dt = 0.01
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = -pc_hypre_type
petsc_options_value = boomerang
dtmax = 0.01
end_time = 1
dtmin = 0.01
[]
[Outputs]
file_base = rot_eg1
solution_history = true
[./exodus]
type = Exodus
use_displaced = true
[../]
[]
[SolidMechanics]
[./tensormech]
disp_z = uz
disp_y = uy
disp_x = ux
[../]
[]
(modules/contact/test/tests/cohesive_zone_model/mortar_czm.i)
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymax = 1
nx = 5
ny = 5
boundary_name_prefix = bottom
[]
[msh_id]
type = SubdomainIDGenerator
input = msh
subdomain_id = 1
[]
[msh_two]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymin = 1
ymax = 2
nx = 5
ny = 5
boundary_name_prefix = top
boundary_id_offset = 10
[]
[msh_two_id]
type = SubdomainIDGenerator
input = msh_two
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'msh_id msh_two_id'
[]
[top_node]
type = ExtraNodesetGenerator
coord = '0 2 0'
input = combined
new_boundary = top_node
[]
[bottom_node]
type = ExtraNodesetGenerator
coord = '0 0 0'
input = top_node
new_boundary = bottom_node
[]
# Build subdomains
[secondary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10001
new_block_name = 'secondary_lower'
sidesets = 'bottom_top'
input = bottom_node
[]
[primary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10000
sidesets = 'top_bottom'
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Modules]
[TensorMechanics]
[Master]
generate_output = 'stress_yy'
[all]
strain = FINITE
add_variables = true
use_automatic_differentiation = true
decomposition_method = TaylorExpansion
block = '1 2'
[]
[]
[]
[]
[BCs]
[fix_x]
type = DirichletBC
preset = true
value = 0.0
boundary = bottom_node
variable = disp_x
[]
[fix_top]
type = DirichletBC
preset = true
boundary = top_top
variable = disp_x
value = 0
[]
[top]
type = FunctionDirichletBC
boundary = top_top
variable = disp_y
function = 'if(t<=0.3,t,if(t<=0.6,0.3-(t-0.3),0.6-t))'
preset = true
[]
[bottom]
type = DirichletBC
boundary = bottom_bottom
variable = disp_y
value = 0
preset = true
[]
[]
[AuxVariables]
[]
[AuxKernels]
[]
[Materials]
[stress]
type = ADComputeFiniteStrainElasticStress
block = '1 2'
[]
[elasticity_tensor]
type = ADComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '1.684e5 0.176e5 0.176e5 1.684e5 0.176e5 1.684e5 0.754e5 0.754e5 0.754e5'
block = '1 2'
[]
[normal_strength]
type = GenericFunctionMaterial
prop_names = 'N'
prop_values = 'if(x<0.5,1,100)*1e4'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
line_search = none
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
l_max_its = 2
l_tol = 1e-14
nl_max_its = 30
nl_rel_tol = 1e-11
nl_abs_tol = 1e-11
start_time = 0.0
dt = 0.01
end_time = 0.05
dtmin = 0.01
[]
[Outputs]
exodus = true
[]
[UserObjects]
[czm_uo]
type = BilinearMixedModeCohesiveZoneModel
primary_boundary = 'top_bottom'
secondary_boundary = 'bottom_top'
primary_subdomain = 10000
secondary_subdomain = 10001
disp_x = disp_x
disp_y = disp_y
friction_coefficient = 0.1 # with 2.0 works
secondary_variable = disp_x
penalty = 0e6
penalty_friction = 1e4
use_physical_gap = true
correct_edge_dropping = true
normal_strength = N
shear_strength = 1e3
viscosity = 1e-3
penalty_stiffness = 1e6
power_law_parameter = 2.2
GI_c = 1e3
GII_c = 1e2
displacements = 'disp_x disp_y'
[]
[]
[Constraints]
[x]
type = NormalMortarMechanicalContact
primary_boundary = 'top_bottom'
secondary_boundary = 'bottom_top'
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = czm_uo
correct_edge_dropping = true
[]
[y]
type = NormalMortarMechanicalContact
primary_boundary = 'top_bottom'
secondary_boundary = 'bottom_top'
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = czm_uo
correct_edge_dropping = true
[]
[c_x]
type = MortarGenericTraction
primary_boundary = 'top_bottom'
secondary_boundary = 'bottom_top'
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
cohesive_zone_uo = czm_uo
correct_edge_dropping = true
[]
[c_y]
type = MortarGenericTraction
primary_boundary = 'top_bottom'
secondary_boundary = 'bottom_top'
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
cohesive_zone_uo = czm_uo
correct_edge_dropping = true
[]
[]
(modules/combined/examples/optimization/2d_mbb_pde.i)
vol_frac = 0.5
E0 = 1
Emin = 1e-8
power = 2
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 150
ny = 50
xmin = 0
xmax = 30
ymin = 0
ymax = 10
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = hold_y
nodes = 0
[]
[push]
type = ExtraNodesetGenerator
input = node
new_boundary = push
coord = '30 10 0'
[]
[]
[Variables]
[Dc]
initial_condition = -1.0
[]
[]
[AuxVariables]
[Emin]
family = MONOMIAL
order = CONSTANT
initial_condition = ${Emin}
[]
[power]
family = MONOMIAL
order = CONSTANT
initial_condition = ${power}
[]
[E0]
family = MONOMIAL
order = CONSTANT
initial_condition = ${E0}
[]
[sensitivity]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[AuxKernel]
type = MaterialRealAux
variable = sensitivity
property = sensitivity
execute_on = LINEAR
[]
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = ${vol_frac}
[]
[Dc_elem]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[AuxKernel]
type = SelfAux
variable = Dc_elem
v = Dc
execute_on = 'TIMESTEP_END'
[]
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[Kernels]
[diffusion]
type = FunctionDiffusion
variable = Dc
function = 0.15 # radius coeff
[]
[potential]
type = Reaction
variable = Dc
[]
[source]
type = CoupledForce
variable = Dc
v = sensitivity
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_y
boundary = hold_y
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[boundary_penalty]
type = ADRobinBC
variable = Dc
boundary = 'left top'
coefficient = 10
[]
[boundary_penalty_right]
type = ADRobinBC
variable = Dc
boundary = 'right'
coefficient = 10
[]
[]
[NodalKernels]
[push]
type = NodalGravity
variable = disp_y
boundary = push
gravity_value = -1
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'Emin mat_den power E0'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${E0}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
incremental = false
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[update]
type = DensityUpdate
density_sensitivity = Dc_elem
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
line_search = none
nl_abs_tol = 1e-4
l_max_its = 200
start_time = 0.0
dt = 1.0
num_steps = 70
[]
[Outputs]
[out]
type = Exodus
execute_on = 'INITIAL TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Controls]
[first_period]
type = TimePeriod
start_time = 0.0
end_time = 10
enable_objects = 'BCs::boundary_penalty_right'
execute_on = 'initial timestep_begin'
[]
[]
(modules/combined/examples/optimization/thermomechanical/structural_sub.i)
vol_frac = 0.4
power = 2.0
E0 = 1.0e-6
E1 = 1.0
rho0 = 0.0
rho1 = 1.0
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 40
xmin = 0
xmax = 40
ymin = 0
ymax = 40
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = hold
nodes = 0
[]
[push_left]
type = ExtraNodesetGenerator
input = node
new_boundary = push_left
coord = '16 0 0'
[]
[push_center]
type = ExtraNodesetGenerator
input = push_left
new_boundary = push_center
coord = '24 0 0'
[]
[extra]
type = SideSetsFromBoundingBoxGenerator
input = push_center
bottom_left = '-0.01 17.999 0'
top_right = '5 22.001 0'
boundary_new = n1
boundaries_old = left
[]
[dirichlet_bc]
type = SideSetsFromNodeSetsGenerator
input = extra
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[Dc]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[]
[mat_den]
family = MONOMIAL
order = FIRST
initial_condition = ${vol_frac}
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_y]
type = DirichletBC
variable = disp_y
boundary = hold
value = 0.0
[]
[no_x_symm]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[]
[NodalKernels]
[push_left]
type = NodalGravity
variable = disp_y
boundary = push_left
gravity_value = -1.0e-3
mass = 1
[]
[push_center]
type = NodalGravity
variable = disp_y
boundary = push_center
gravity_value = -1.0e-3
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
expression = "A1:=(${E0}-${E1})/(${rho0}^${power}-${rho1}^${power}); "
"B1:=${E0}-A1*${rho0}^${power}; E1:=A1*mat_den^${power}+B1; E1"
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[rad_avg]
type = RadialAverage
radius = 1.2
weights = linear
prop_name = sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
[calc_sense]
type = SensitivityFilter
density_sensitivity = Dc
design_density = mat_den
filter_UO = rad_avg
execute_on = TIMESTEP_END
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-12
dt = 1.0
num_steps = 500
[]
[Outputs]
exodus = true
[out]
type = CSV
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[mesh_volume]
type = VolumePostprocessor
execute_on = 'INITIAL TIMESTEP_END'
[]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[vol_frac]
type = ParsedPostprocessor
function = 'total_vol / mesh_volume'
pp_names = 'total_vol mesh_volume'
[]
[sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = sensitivity
[]
[objective]
type = ElementIntegralMaterialProperty
mat_prop = strain_energy_density
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
(modules/xfem/test/tests/moving_interface/moving_bimaterial.i)
# This test is for two layer materials with different youngs modulus
# The global stress is determined by switching the stress based on level set values
# The material interface is marked by a level set function
# The two layer materials are glued together
# This case is also meant to test for a bug in moving interfaces on displaced meshes
# It should fail during the healing step of the 2nd timestep if the bug is present.
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Mesh]
displacements = 'disp_x disp_y'
[generated_mesh]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
xmin = 0.0
xmax = 5.
ymin = 0.0
ymax = 5.
elem_type = QUAD4
[]
[./left_bottom]
type = ExtraNodesetGenerator
new_boundary = 'left_bottom'
coord = '0.0 0.0'
input = generated_mesh
[../]
[./left_top]
type = ExtraNodesetGenerator
new_boundary = 'left_top'
coord = '0.0 5.'
input = left_bottom
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[Functions]
[./ls_func]
type = ParsedFunction
expression = 'y-3.153 + t'
[../]
[]
[AuxVariables]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./TensorMechanics]
displacements = 'disp_x disp_y'
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = stress_xx
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = stress_yy
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 1
variable = stress_xy
[../]
[./a_strain_xx]
type = RankTwoAux
rank_two_tensor = A_total_strain
index_i = 0
index_j = 0
variable = a_strain_xx
[../]
[./a_strain_yy]
type = RankTwoAux
rank_two_tensor = A_total_strain
index_i = 1
index_j = 1
variable = a_strain_yy
[../]
[./a_strain_xy]
type = RankTwoAux
rank_two_tensor = A_total_strain
index_i = 0
index_j = 1
variable = a_strain_xy
[../]
[./b_strain_xx]
type = RankTwoAux
rank_two_tensor = B_total_strain
index_i = 0
index_j = 0
variable = b_strain_xx
[../]
[./b_strain_yy]
type = RankTwoAux
rank_two_tensor = B_total_strain
index_i = 1
index_j = 1
variable = b_strain_yy
[../]
[./b_strain_xy]
type = RankTwoAux
rank_two_tensor = B_total_strain
index_i = 0
index_j = 1
variable = b_strain_xy
[../]
[]
[Constraints]
[./dispx_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_x
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[./dispy_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_y
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[]
[BCs]
[./bottomx]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[../]
[./bottomy]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[../]
[./topx]
type = FunctionDirichletBC
boundary = top
variable = disp_x
function = 0.03*t
[../]
[./topy]
type = FunctionDirichletBC
boundary = top
variable = disp_y
function = '0.03*t'
[../]
[]
[Materials]
[./elasticity_tensor_A]
type = ComputeIsotropicElasticityTensor
base_name = A
youngs_modulus = 1e9
poissons_ratio = 0.3
[../]
[./strain_A]
type = ComputeSmallStrain
base_name = A
displacements = 'disp_x disp_y'
[../]
[./stress_A]
type = ComputeLinearElasticStress
base_name = A
[../]
[./elasticity_tensor_B]
type = ComputeIsotropicElasticityTensor
base_name = B
youngs_modulus = 1e7
poissons_ratio = 0.3
[../]
[./strain_B]
type = ComputeSmallStrain
base_name = B
displacements = 'disp_x disp_y'
[../]
[./stress_B]
type = ComputeLinearElasticStress
base_name = B
[../]
[./combined_stress]
type = LevelSetBiMaterialRankTwo
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = stress
[../]
[./combined_dstressdstrain]
type = LevelSetBiMaterialRankFour
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = Jacobian_mult
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
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 = 'bt'
# controls for linear iterations
l_max_its = 20
l_tol = 1e-3
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
# time control
start_time = 0.0
dt = 0.15
num_steps = 3
max_xfem_update = 1
[]
[Outputs]
exodus = true
execute_on = timestep_end
[./console]
type = Console
output_linear = true
[../]
[]
(modules/solid_mechanics/test/tests/free_expansion_abs_ref/free_expansion_abs_ref.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
group_variables = 'disp_x disp_y'
[]
[Mesh]
[square]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
[]
[eng1]
type = ExtraNodesetGenerator
input = square
new_boundary = 'lower_left'
coord = '0 0'
[]
[eng2]
type = ExtraNodesetGenerator
input = eng1
new_boundary = 'lower_right'
coord = '1 0'
[]
[]
[AuxVariables]
[temp]
[]
[ref_x]
[]
[ref_y]
[]
[]
[AuxKernels]
[tempfuncaux]
type = FunctionAux
variable = temp
function = '(1-x)*t'
use_displaced_mesh = false
[]
[ref_x]
type = TagVectorAux
variable = 'ref_x'
vector_tag = 'ref'
v = 'disp_x'
execute_on = timestep_end
[]
[ref_y]
type = TagVectorAux
variable = 'ref_y'
vector_tag = 'ref'
execute_on = timestep_end
v = 'disp_y'
[]
[]
[BCs]
[fix_x]
type = DirichletBC
boundary = 'lower_left'
variable = disp_x
value = 0.0
[]
[fix_y]
type = DirichletBC
boundary = 'lower_left lower_right'
variable = disp_y
value = 0.0
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = SMALL
add_variables = true
temperature = temp
generate_output = 'stress_xx stress_xy stress_yy stress_zz strain_xx strain_xy strain_yy strain_zz'
planar_formulation = PLANE_STRAIN
eigenstrain_names = eigenstrain
absolute_value_vector_tags = 'ref'
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[elastic_stress]
type = ComputeLinearElasticStress
[]
[thermal_strain]
type = ComputeThermalExpansionEigenstrain
thermal_expansion_coeff = 0.02
temperature = temp
stress_free_temperature = 0.5
eigenstrain_name = eigenstrain
[]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
l_max_its = 100
l_tol = 1e-8
nl_max_its = 15
nl_rel_tol = 1e-10
nl_abs_tol = 1e-12
start_time = 0.0
dt = 1.0
dtmin = 1.0
end_time = 2.0
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/optimization/compliance_sensitivity/thermal_test.i)
vol_frac = 0.4
cost_frac = 10.0
power = 2.0
E0 = 1.0e-6
E1 = 1.0
rho0 = 0.0
rho1 = 1.0
C0 = 1.0e-6
C1 = 1.0
TC0 = 1.0e-16
TC1 = 1.0
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmin = 0
xmax = 40
ymin = 0
ymax = 40
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = hold
nodes = 0
[]
[push_left]
type = ExtraNodesetGenerator
input = node
new_boundary = push_left
coord = '16 0 0'
[]
[push_center]
type = ExtraNodesetGenerator
input = push_left
new_boundary = push_center
coord = '24 0 0'
[]
[extra]
type = SideSetsFromBoundingBoxGenerator
input = push_center
bottom_left = '-0.01 17.999 0'
top_right = '5 22.001 0'
boundary_new = n1
included_boundaries = left
[]
[dirichlet_bc]
type = SideSetsFromNodeSetsGenerator
input = extra
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[temp]
initial_condition = 100.0
[]
[]
[AuxVariables]
[Dc]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[]
[Cc]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[]
[Tc]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[]
[Cost]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[]
[mat_den]
family = MONOMIAL
order = FIRST
initial_condition = ${vol_frac}
[]
[]
[AuxKernels]
[Cost]
type = MaterialRealAux
variable = Cost
property = Cost_mat
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temp
diffusion_coefficient = thermal_cond
[]
[heat_source]
type = HeatSource
value = 1e-2 # W/m^3
variable = temp
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_y]
type = DirichletBC
variable = disp_y
boundary = hold
value = 0.0
[]
[no_x_symm]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[left_n1]
type = DirichletBC
variable = temp
boundary = n1
value = 0.0
[]
[top]
type = NeumannBC
variable = temp
boundary = top
value = 0
[]
[bottom]
type = NeumannBC
variable = temp
boundary = bottom
value = 0
[]
[right]
type = NeumannBC
variable = temp
boundary = right
value = 0
[]
[left]
type = NeumannBC
variable = temp
boundary = left
value = 0
[]
[]
[NodalKernels]
[push_left]
type = NodalGravity
variable = disp_y
boundary = push_left
gravity_value = 0.0 # -1e-8
mass = 1
[]
[push_center]
type = NodalGravity
variable = disp_y
boundary = push_center
gravity_value = 0.0 # -1e-8
mass = 1
[]
[]
[Materials]
[thermal_cond]
type = DerivativeParsedMaterial
# ordered multimaterial simp
expression = "A1:=(${TC0}-${TC1})/(${rho0}^${power}-${rho1}^${power}); "
"B1:=${TC0}-A1*${rho0}^${power}; TC1:=A1*mat_den^${power}+B1; TC1"
coupled_variables = 'mat_den'
property_name = thermal_cond
outputs = 'exodus'
[]
[thermal_compliance]
type = ThermalCompliance
temperature = temp
thermal_conductivity = thermal_cond
outputs = 'exodus'
[]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# ordered multimaterial simp
expression = "A1:=(${E0}-${E1})/(${rho0}^${power}-${rho1}^${power}); "
"B1:=${E0}-A1*${rho0}^${power}; E1:=A1*mat_den^${power}+B1; E1"
coupled_variables = 'mat_den'
property_name = E_phys
[]
[Cost_mat]
type = DerivativeParsedMaterial
# ordered multimaterial simp
expression = "A1:=(${C0}-${C1})/(${rho0}^(1/${power})-${rho1}^(1/${power})); "
"B1:=${C0}-A1*${rho0}^(1/${power}); C1:=A1*mat_den^(1/${power})+B1; C1"
coupled_variables = 'mat_den'
property_name = Cost_mat
[]
[CostDensity]
type = ParsedMaterial
property_name = CostDensity
coupled_variables = 'mat_den Cost'
expression = 'mat_den*Cost'
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
[]
[cc]
type = CostSensitivity
design_density = mat_den
cost = Cost_mat
outputs = 'exodus'
[]
[tc]
type = ThermalSensitivity
design_density = mat_den
thermal_conductivity = thermal_cond
temperature = temp
outputs = 'exodus'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[rad_avg]
type = RadialAverage
radius = 0.1
weights = linear
prop_name = sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
[rad_avg_cost]
type = RadialAverage
radius = 0.1
weights = linear
prop_name = cost_sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
[rad_avg_thermal]
type = RadialAverage
radius = 0.1
weights = linear
prop_name = thermal_sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
[update]
type = DensityUpdateTwoConstraints
density_sensitivity = Dc
cost_density_sensitivity = Cc
cost = Cost
cost_fraction = ${cost_frac}
design_density = mat_den
volume_fraction = ${vol_frac}
bisection_lower_bound = 0
bisection_upper_bound = 1.0e12 # 100
use_thermal_compliance = true
thermal_sensitivity = Tc
weight_mechanical_thermal = '0 1'
relative_tolerance = 1.0e-12
bisection_move = 0.015
adaptive_move = false
execute_on = TIMESTEP_BEGIN
[]
# Provides Dc
[calc_sense]
type = SensitivityFilter
density_sensitivity = Dc
design_density = mat_den
filter_UO = rad_avg
execute_on = TIMESTEP_END
force_postaux = true
[]
# Provides Cc
[calc_sense_cost]
type = SensitivityFilter
density_sensitivity = Cc
design_density = mat_den
filter_UO = rad_avg_cost
execute_on = TIMESTEP_END
force_postaux = true
[]
# Provides Tc
[calc_sense_thermal]
type = SensitivityFilter
density_sensitivity = Tc
design_density = mat_den
filter_UO = rad_avg_thermal
execute_on = TIMESTEP_END
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-12
dt = 1.0
num_steps = 5
[]
[Outputs]
exodus = true
[out]
type = CSV
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[right_flux]
type = SideDiffusiveFluxAverage
variable = temp
boundary = right
diffusivity = 10
[]
[mesh_volume]
type = VolumePostprocessor
execute_on = 'initial timestep_end'
[]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[vol_frac]
type = ParsedPostprocessor
function = 'total_vol / mesh_volume'
pp_names = 'total_vol mesh_volume'
[]
[sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = sensitivity
[]
[cost_sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = cost_sensitivity
[]
[cost]
type = ElementIntegralMaterialProperty
mat_prop = CostDensity
[]
[cost_frac]
type = ParsedPostprocessor
function = 'cost / mesh_volume'
pp_names = 'cost mesh_volume'
[]
[objective]
type = ElementIntegralMaterialProperty
mat_prop = strain_energy_density
execute_on = 'INITIAL TIMESTEP_END'
[]
[objective_thermal]
type = ElementIntegralMaterialProperty
mat_prop = thermal_compliance
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
(modules/combined/test/tests/optimization/compliance_sensitivity/3d_mbb.i)
vol_frac = 0.5
E0 = 1
Emin = 1e-8
power = 3
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 3
nx = 30
ny = 10
nz = 10
xmin = 0
xmax = 30
ymin = 0
ymax = 10
zmin = 0
zmax = 10
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = hold_y
coord = '0 0 0; 0 0 10'
[]
[push]
type = ExtraNodesetGenerator
input = node
new_boundary = push
coord = '30 10 5'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[Dc]
initial_condition = -1.0
[]
[]
[AuxVariables]
[sensitivity]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[AuxKernel]
type = MaterialRealAux
variable = sensitivity
property = sensitivity
execute_on = LINEAR
[]
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = ${vol_frac}
[]
[Dc_elem]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[AuxKernel]
type = SelfAux
variable = Dc_elem
v = Dc
execute_on = 'TIMESTEP_END'
[]
[]
[mat_den_nodal]
family = L2_LAGRANGE
order = FIRST
initial_condition = ${vol_frac}
[AuxKernel]
type = SelfAux
execute_on = TIMESTEP_END
variable = mat_den_nodal
v = mat_den
[]
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[Kernels]
[diffusion]
type = FunctionDiffusion
variable = Dc
function = 0.15 # radius coeff
[]
[potential]
type = Reaction
variable = Dc
[]
[source]
type = CoupledForce
variable = Dc
v = sensitivity
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_y
boundary = hold_y
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[boundary_penalty]
type = ADRobinBC
variable = Dc
boundary = 'left top front back'
coefficient = 10
[]
[boundary_penalty_right]
type = ADRobinBC
variable = Dc
boundary = 'right'
coefficient = 10
[]
[]
[NodalKernels]
[push]
type = NodalGravity
variable = disp_y
boundary = push
gravity_value = -1
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${E0}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
incremental = false
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[update]
type = DensityUpdate
density_sensitivity = Dc_elem
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
line_search = none
nl_abs_tol = 1e-4
l_max_its = 200
start_time = 0.0
dt = 1.0
num_steps = 2
[]
[Outputs]
[out]
type = CSV
execute_on = 'INITIAL TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = sensitivity
[]
[]
[Controls]
[first_period]
type = TimePeriod
start_time = 0.0
end_time = 10
enable_objects = 'BCs::boundary_penalty_right'
execute_on = 'initial timestep_begin'
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/coupled-force/steady-function.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./velocity]
family = LAGRANGE_VEC
[../]
[./p]
[../]
[u]
family = LAGRANGE_VEC
[]
[]
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
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_coupled_force]
type = INSADMomentumCoupledForce
variable = velocity
vector_function = 'vector_func'
[]
[./momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[../]
[u_diff]
type = VectorDiffusion
variable = u
[]
[]
[BCs]
[./no_slip]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom right left top'
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[u_left]
type = VectorFunctionDirichletBC
variable = u
boundary = 'left'
function_x = 1
function_y = 1
[]
[u_right]
type = VectorFunctionDirichletBC
variable = u
boundary = 'right'
function_x = -1
function_y = -1
[]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[ins_mat]
type = INSADTauMaterial
velocity = velocity
pressure = p
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_factor_levels -ksp_gmres_restart'
petsc_options_value = 'asm 6 200'
line_search = 'none'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
exodus = true
[]
[Functions]
[vector_func]
type = ParsedVectorFunction
expression_x = '-2*x + 1'
expression_y = '-2*x + 1'
[]
[]
(modules/combined/examples/geochem-porous_flow/geotes_2D/porous_flow.i)
# PorousFlow simulation of injection and production in a 2D aquifer
# Much of this file is standard porous-flow stuff. The unusual aspects are:
# - transfer of the rates of changes of each species (kg/s) to the aquifer_geochemistry.i simulation. This is achieved by saving these changes from the PorousFlowMassTimeDerivative residuals
# - transfer of the temperature field to the aquifer_geochemistry.i simulation
# Interesting behaviour can be simulated by this file without its "parent" simulation, exchanger.i. exchanger.i provides mass-fractions injected via the injection_rate_massfrac_* variables, but since these are more-or-less constant throughout the duration of the exchanger.i simulation, the initial_conditions specified below may be used. Similar, exchanger.i provides injection_temperature, but that is also constant.
injection_rate = -1.0 # kg/s/m, negative because injection as a source
production_rate = 1.0 # kg/s/m
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 14 # for better resolution, use 56 or 112
ny = 8 # for better resolution, use 32 or 64
xmin = -70
xmax = 70
ymin = -40
ymax = 40
[]
[injection_node]
input = gen
type = ExtraNodesetGenerator
new_boundary = injection_node
coord = '-30 0 0'
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[f0]
initial_condition = 0.002285946
[]
[f1]
initial_condition = 0.0035252
[]
[f2]
initial_condition = 1.3741E-05
[]
[porepressure]
initial_condition = 2E6
[]
[temperature]
initial_condition = 50
scaling = 1E-6 # fluid enthalpy is roughly 1E6
[]
[]
[BCs]
[injection_temperature]
type = MatchedValueBC
variable = temperature
v = injection_temperature
boundary = injection_node
[]
[]
[DiracKernels]
[inject_Na]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
line_length = 1.0
multiplying_var = injection_rate_massfrac_Na
point_file = injection.bh
variable = f0
[]
[inject_Cl]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
line_length = 1.0
multiplying_var = injection_rate_massfrac_Cl
point_file = injection.bh
variable = f1
[]
[inject_SiO2]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
line_length = 1.0
multiplying_var = injection_rate_massfrac_SiO2
point_file = injection.bh
variable = f2
[]
[inject_H2O]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
line_length = 1.0
multiplying_var = injection_rate_massfrac_H2O
point_file = injection.bh
variable = porepressure
[]
[produce_Na]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Na
fluxes = ${production_rate}
p_or_t_vals = 0.0
line_length = 1.0
mass_fraction_component = 0
point_file = production.bh
variable = f0
[]
[produce_Cl]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Cl
fluxes = ${production_rate}
p_or_t_vals = 0.0
line_length = 1.0
mass_fraction_component = 1
point_file = production.bh
variable = f1
[]
[produce_SiO2]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_SiO2
fluxes = ${production_rate}
p_or_t_vals = 0.0
line_length = 1.0
mass_fraction_component = 2
point_file = production.bh
variable = f2
[]
[produce_H2O]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_H2O
fluxes = ${production_rate}
p_or_t_vals = 0.0
line_length = 1.0
mass_fraction_component = 3
point_file = production.bh
variable = porepressure
[]
[produce_heat]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_heat
fluxes = ${production_rate}
p_or_t_vals = 0.0
line_length = 1.0
use_enthalpy = true
point_file = production.bh
variable = temperature
[]
[]
[UserObjects]
[injected_mass]
type = PorousFlowSumQuantity
[]
[produced_mass_Na]
type = PorousFlowSumQuantity
[]
[produced_mass_Cl]
type = PorousFlowSumQuantity
[]
[produced_mass_SiO2]
type = PorousFlowSumQuantity
[]
[produced_mass_H2O]
type = PorousFlowSumQuantity
[]
[produced_heat]
type = PorousFlowSumQuantity
[]
[]
[Postprocessors]
[dt]
type = TimestepSize
execute_on = TIMESTEP_BEGIN
[]
[tot_kg_injected_this_timestep]
type = PorousFlowPlotQuantity
uo = injected_mass
[]
[kg_Na_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Na
[]
[kg_Cl_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Cl
[]
[kg_SiO2_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_SiO2
[]
[kg_H2O_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_H2O
[]
[mole_rate_Na_produced]
type = FunctionValuePostprocessor
function = moles_Na
indirect_dependencies = 'kg_Na_produced_this_timestep dt'
[]
[mole_rate_Cl_produced]
type = FunctionValuePostprocessor
function = moles_Cl
indirect_dependencies = 'kg_Cl_produced_this_timestep dt'
[]
[mole_rate_SiO2_produced]
type = FunctionValuePostprocessor
function = moles_SiO2
indirect_dependencies = 'kg_SiO2_produced_this_timestep dt'
[]
[mole_rate_H2O_produced]
type = FunctionValuePostprocessor
function = moles_H2O
indirect_dependencies = 'kg_H2O_produced_this_timestep dt'
[]
[heat_joules_extracted_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_heat
[]
[production_temperature]
type = PointValue
point = '30 0 0'
variable = temperature
[]
[]
[Functions]
[moles_Na]
type = ParsedFunction
symbol_names = 'kg_Na dt'
symbol_values = 'kg_Na_produced_this_timestep dt'
expression = 'kg_Na * 1000 / 22.9898 / dt'
[]
[moles_Cl]
type = ParsedFunction
symbol_names = 'kg_Cl dt'
symbol_values = 'kg_Cl_produced_this_timestep dt'
expression = 'kg_Cl * 1000 / 35.453 / dt'
[]
[moles_SiO2]
type = ParsedFunction
symbol_names = 'kg_SiO2 dt'
symbol_values = 'kg_SiO2_produced_this_timestep dt'
expression = 'kg_SiO2 * 1000 / 60.0843 / dt'
[]
[moles_H2O]
type = ParsedFunction
symbol_names = 'kg_H2O dt'
symbol_values = 'kg_H2O_produced_this_timestep dt'
expression = 'kg_H2O * 1000 / 18.0152 / dt'
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0
bulk_modulus = 2E9
viscosity = 1E-3
density0 = 1000
cv = 4000.0
cp = 4000.0
[]
[]
[PorousFlowFullySaturated]
coupling_type = ThermoHydro
porepressure = porepressure
temperature = temperature
mass_fraction_vars = 'f0 f1 f2'
save_component_rate_in = 'rate_Na rate_Cl rate_SiO2 rate_H2O' # change in kg at every node / dt
fp = the_simple_fluid
temperature_unit = Celsius
[]
[AuxVariables]
[injection_temperature]
initial_condition = 200
[]
[injection_rate_massfrac_Na]
initial_condition = 0.002285946
[]
[injection_rate_massfrac_Cl]
initial_condition = 0.0035252
[]
[injection_rate_massfrac_SiO2]
initial_condition = 1.3741E-05
[]
[injection_rate_massfrac_H2O]
initial_condition = 0.994175112
[]
[rate_H2O]
[]
[rate_Na]
[]
[rate_Cl]
[]
[rate_SiO2]
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosityConst # this simulation has no porosity changes from dissolution
porosity = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-12 0 0 0 1E-12 0 0 0 1E-12'
[]
[thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '0 0 0 0 0 0 0 0 0'
[]
[rock_heat]
type = PorousFlowMatrixInternalEnergy
density = 2500.0
specific_heat_capacity = 1200.0
[]
[]
[Preconditioning]
active = typically_efficient
[typically_efficient]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = ' hypre boomeramg'
[]
[strong]
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 ilu NONZERO 2'
[]
[probably_too_strong]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 7.76E6 # 90 days
dt = 1E5
[]
[Outputs]
exodus = true
[]
[MultiApps]
[react]
type = TransientMultiApp
input_files = aquifer_geochemistry.i
clone_master_mesh = true
execute_on = 'timestep_end'
[]
[]
[Transfers]
[changes_due_to_flow]
type = MultiAppCopyTransfer
source_variable = 'rate_H2O rate_Na rate_Cl rate_SiO2 temperature'
variable = 'pf_rate_H2O pf_rate_Na pf_rate_Cl pf_rate_SiO2 temperature'
to_multi_app = react
[]
[massfrac_from_geochem]
type = MultiAppCopyTransfer
source_variable = 'massfrac_Na massfrac_Cl massfrac_SiO2'
variable = 'f0 f1 f2'
from_multi_app = react
[]
[]
(modules/navier_stokes/test/tests/auxkernels/reynolds-number-functor-aux/fe.i)
rho=1
mu=1
[GlobalParams]
gravity = '0 0 0'
pspg = true
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[]
[]
[AuxVariables]
[Reynolds]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[Reynolds]
type = ReynoldsNumberFunctorAux
variable = Reynolds
speed = speed
rho = ${rho}
mu = ${mu}
[]
[]
[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 = '${rho} ${mu}'
[]
[speed]
type = ADVectorMagnitudeFunctorMaterial
x_functor = vel_x
y_functor = vel_y
vector_magnitude_name = speed
[]
[]
[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'
petsc_options_value = 'asm 2 lu'
line_search = 'none'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(modules/combined/examples/optimization/three_materials.i)
vol_frac = 0.4
cost_frac = 0.3
power = 4
E0 = 1.0e-6
E1 = 0.2
E2 = 0.6
E3 = 1.0
rho0 = 1.0e-6
rho1 = 0.4
rho2 = 0.7
rho3 = 1.0
C0 = 1.0e-6
C1 = 0.5
C2 = 0.8
C3 = 1.0
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 50
ny = 50
xmin = 0
xmax = 50
ymin = 0
ymax = 50
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = hold
nodes = 0
[]
[push_left]
type = ExtraNodesetGenerator
input = node
new_boundary = push_left
coord = '25 0 0'
[]
[push_center]
type = ExtraNodesetGenerator
input = push_left
new_boundary = push_center
coord = '50 0 0'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[Dc]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[Cc]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[Cost]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = ${vol_frac}
[]
[]
[AuxKernels]
[Cost]
type = MaterialRealAux
variable = Cost
property = Cost_mat
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_y]
type = DirichletBC
variable = disp_y
boundary = hold
value = 0.0
[]
[no_x_symm]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[]
[NodalKernels]
[push_left]
type = NodalGravity
variable = disp_y
boundary = push_left
gravity_value = -1e-3
mass = 1
[]
[push_center]
type = NodalGravity
variable = disp_y
boundary = push_center
gravity_value = -1e-3
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# ordered multimaterial simp
expression = "A1:=(${E0}-${E1})/(${rho0}^${power}-${rho1}^${power}); "
"B1:=${E0}-A1*${rho0}^${power}; E1:=A1*mat_den^${power}+B1; "
"A2:=(${E1}-${E2})/(${rho1}^${power}-${rho2}^${power}); "
"B2:=${E1}-A2*${rho1}^${power}; E2:=A2*mat_den^${power}+B2; "
"A3:=(${E2}-${E3})/(${rho2}^${power}-${rho3}^${power}); "
"B3:=${E2}-A3*${rho2}^${power}; E3:=A3*mat_den^${power}+B3; "
"if(mat_den<${rho1},E1,if(mat_den<${rho2},E2,E3))"
coupled_variables = 'mat_den'
property_name = E_phys
[]
[Cost_mat]
type = DerivativeParsedMaterial
# ordered multimaterial simp
expression = "A1:=(${C0}-${C1})/(${rho0}^(1/${power})-${rho1}^(1/${power})); "
"B1:=${C0}-A1*${rho0}^(1/${power}); C1:=A1*mat_den^(1/${power})+B1; "
"A2:=(${C1}-${C2})/(${rho1}^(1/${power})-${rho2}^(1/${power})); "
"B2:=${C1}-A2*${rho1}^(1/${power}); C2:=A2*mat_den^(1/${power})+B2; "
"A3:=(${C2}-${C3})/(${rho2}^(1/${power})-${rho3}^(1/${power})); "
"B3:=${C2}-A3*${rho2}^(1/${power}); C3:=A3*mat_den^(1/${power})+B3; "
"if(mat_den<${rho1},C1,if(mat_den<${rho2},C2,C3))"
coupled_variables = 'mat_den'
property_name = Cost_mat
[]
[CostDensity]
type = ParsedMaterial
property_name = CostDensity
coupled_variables = 'mat_den Cost'
expression = 'mat_den*Cost'
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
[]
[cc]
type = CostSensitivity
design_density = mat_den
cost = Cost_mat
outputs = 'exodus'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[rad_avg]
type = RadialAverage
radius = 3
weights = linear
prop_name = sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
[rad_avg_cost]
type = RadialAverage
radius = 3
weights = linear
prop_name = cost_sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
[update]
type = DensityUpdateTwoConstraints
# This is
density_sensitivity = Dc
cost_density_sensitivity = Cc
cost = Cost
cost_fraction = ${cost_frac}
design_density = mat_den
volume_fraction = ${vol_frac}
bisection_lower_bound = 0
bisection_upper_bound = 1.0e16 # 100
bisection_move = 0.05
adaptive_move = true
relative_tolerance = 1.0e-3
execute_on = TIMESTEP_BEGIN
[]
# Provides Dc
[calc_sense]
type = SensitivityFilter
density_sensitivity = Dc
design_density = mat_den
filter_UO = rad_avg
execute_on = TIMESTEP_END
force_postaux = true
[]
# Provides Cc
[calc_sense_cost]
type = SensitivityFilter
density_sensitivity = Cc
design_density = mat_den
filter_UO = rad_avg_cost
execute_on = TIMESTEP_END
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-10
dt = 1.0
num_steps = 40
[]
[Outputs]
exodus = true
[out]
type = CSV
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[mesh_volume]
type = VolumePostprocessor
execute_on = 'initial timestep_end'
[]
[vol_frac]
type = ParsedPostprocessor
function = 'total_vol / mesh_volume'
pp_names = 'total_vol mesh_volume'
[]
[sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = sensitivity
[]
[cost_sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = cost_sensitivity
[]
[cost]
type = ElementIntegralMaterialProperty
mat_prop = CostDensity
[]
[cost_frac]
type = ParsedPostprocessor
function = 'cost / mesh_volume'
pp_names = 'cost mesh_volume'
[]
[]
(modules/combined/test/tests/optimization/optimization_density_update/top_opt_3d_pde_filter.i)
vol_frac = 0.4
E0 = 1e5
Emin = 1e-4
power = 2
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 3
nx = 24
ny = 12
nz = 12
xmin = 0
xmax = 20
ymin = 0
ymax = 10
zmin = 0
zmax = 10
[]
[middle_bottom_left_edge]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = pull
coord = '0 0 5'
[]
[]
[Variables]
[Dc]
initial_condition = -1.0
[]
[]
[AuxVariables]
[sensitivity]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[AuxKernel]
type = MaterialRealAux
variable = sensitivity
property = sensitivity
execute_on = LINEAR
[]
[]
[compliance]
family = MONOMIAL
order = CONSTANT
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = ${vol_frac}
[]
[Dc_elem]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[AuxKernel]
type = SelfAux
variable = Dc_elem
v = Dc
execute_on = 'TIMESTEP_END'
[]
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[Kernels]
[diffusion]
type = FunctionDiffusion
variable = Dc
function = 0.05
[]
[potential]
type = Reaction
variable = Dc
[]
[source]
type = CoupledForce
variable = Dc
v = sensitivity
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_y
boundary = right
value = 0.0
[]
[no_z]
type = DirichletBC
variable = disp_z
boundary = right
value = 0.0
[]
[boundary_penalty]
type = ADRobinBC
variable = Dc
boundary = 'left top front back'
coefficient = 10
[]
[]
[NodalKernels]
[pull]
type = NodalGravity
variable = disp_y
boundary = pull
gravity_value = -1
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${E0}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
incremental = false
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[update]
type = DensityUpdate
density_sensitivity = Dc_elem
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type '
petsc_options_value = 'lu'
nl_abs_tol = 1e-10
line_search = none
dt = 1.0
num_steps = 10
[]
[Outputs]
[out]
type = Exodus
time_step_interval = 10
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/block-restriction/one-mat-two-eqn-sets.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 2
ymin = 0
ymax = 1
nx = 16
ny = 8
elem_type = QUAD9
[]
[./corner_node_0]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node_0'
coord = '0 0 0'
input = gen
[../]
[./corner_node_1]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node_1'
coord = '1 0 0'
input = corner_node_0
[../]
[./subdomain1]
input = corner_node_1
type = SubdomainBoundingBoxGenerator
bottom_left = '1 0 0'
top_right = '2 1 0'
block_id = 1
[../]
[./break_boundary]
input = subdomain1
type = BreakBoundaryOnSubdomainGenerator
[../]
[./interface0]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
primary_block = '0'
paired_block = '1'
new_boundary = 'interface0'
[../]
[./interface1]
type = SideSetsBetweenSubdomainsGenerator
input = interface0
primary_block = '1'
paired_block = '0'
new_boundary = 'interface1'
[../]
[]
[Variables]
[velocity0]
order = SECOND
family = LAGRANGE_VEC
[]
[T0]
order = SECOND
[InitialCondition]
type = ConstantIC
value = 1.0
[]
[]
[p0]
[]
[]
[Kernels]
[./mass0]
type = INSADMass
variable = p0
block = 0
[../]
[./momentum_time0]
type = INSADMomentumTimeDerivative
variable = velocity0
block = 0
[../]
[./momentum_convection0]
type = INSADMomentumAdvection
variable = velocity0
block = 0
[../]
[./momentum_viscous0]
type = INSADMomentumViscous
variable = velocity0
block = 0
[../]
[./momentum_pressure0]
type = INSADMomentumPressure
variable = velocity0
pressure = p0
integrate_p_by_parts = true
block = 0
[../]
[./temperature_time0]
type = INSADHeatConductionTimeDerivative
variable = T0
block = 0
[../]
[./temperature_advection0]
type = INSADEnergyAdvection
variable = T0
block = 0
[../]
[./temperature_conduction0]
type = ADHeatConduction
variable = T0
thermal_conductivity = 'k'
block = 0
[../]
[./mass1]
type = INSADMass
variable = p0
block = 1
[../]
[./momentum_time1]
type = INSADMomentumTimeDerivative
variable = velocity0
block = 1
[../]
[./momentum_convection1]
type = INSADMomentumAdvection
variable = velocity0
block = 1
[../]
[./momentum_viscous1]
type = INSADMomentumViscous
variable = velocity0
block = 1
[../]
[./momentum_pressure1]
type = INSADMomentumPressure
variable = velocity0
pressure = p0
integrate_p_by_parts = true
block = 1
[../]
[./temperature_time1]
type = INSADHeatConductionTimeDerivative
variable = T0
block = 1
[../]
[./temperature_advection1]
type = INSADEnergyAdvection
variable = T0
block = 1
[../]
[./temperature_conduction1]
type = ADHeatConduction
variable = T0
thermal_conductivity = 'k'
block = 1
[../]
[]
[BCs]
[./no_slip0]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'bottom_to_0 interface0 left'
[../]
[./lid0]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'top_to_0'
function_x = 'lid_function0'
[../]
[./T_hot0]
type = DirichletBC
variable = T0
boundary = 'bottom_to_0'
value = 1
[../]
[./T_cold0]
type = DirichletBC
variable = T0
boundary = 'top_to_0'
value = 0
[../]
[./pressure_pin0]
type = DirichletBC
variable = p0
boundary = 'pinned_node_0'
value = 0
[../]
[./no_slip1]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'bottom_to_1 interface1 right'
[../]
[./lid1]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'top_to_1'
function_x = 'lid_function1'
[../]
[./T_hot1]
type = DirichletBC
variable = T0
boundary = 'bottom_to_1'
value = 1
[../]
[./T_cold1]
type = DirichletBC
variable = T0
boundary = 'top_to_1'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat0]
type = INSAD3Eqn
velocity = velocity0
pressure = p0
temperature = T0
block = '0 1'
[]
[]
[Functions]
# 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.
[./lid_function0]
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[./lid_function1]
type = ParsedFunction
expression = '4*(x-1)*(2-x)'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Transient
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_levels -sub_pc_factor_shift_type'
petsc_options_value = 'asm 2 ilu 4 NONZERO'
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
[]
(modules/combined/examples/optimization/multi-load/square_subapp_two.i)
power = 1.0
E0 = 1.0
Emin = 1.0e-6
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[Bottom]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 100
xmin = 0
xmax = 150
ymin = 0
ymax = 150
[]
[left_load]
type = ExtraNodesetGenerator
input = Bottom
new_boundary = left_load
coord = '0 150 0'
[]
[right_load]
type = ExtraNodesetGenerator
input = left_load
new_boundary = right_load
coord = '150 150 0'
[]
[left_support]
type = ExtraNodesetGenerator
input = right_load
new_boundary = left_support
coord = '0 0 0'
[]
[right_support]
type = ExtraNodesetGenerator
input = left_support
new_boundary = right_support
coord = '150 0 0'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[Dc]
family = MONOMIAL
order = SECOND
initial_condition = -1.0
[]
[Cc]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = 0.25
[]
[sensitivity_var]
family = MONOMIAL
order = SECOND
initial_condition = -1.0
[]
[]
[AuxKernels]
[sensitivity_kernel]
type = MaterialRealAux
check_boundary_restricted = false
property = sensitivity
variable = sensitivity_var
execute_on = 'TIMESTEP_END'
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_y]
type = DirichletBC
variable = disp_y
boundary = left_support
value = 0.0
[]
[no_x]
type = DirichletBC
variable = disp_x
boundary = left_support
value = 0.0
[]
[no_y_right]
type = DirichletBC
variable = disp_y
boundary = right_support
value = 0.0
[]
[no_x_right]
type = DirichletBC
variable = disp_x
boundary = right_support
value = 0.0
[]
[]
[NodalKernels]
[push_right]
type = NodalGravity
variable = disp_y
boundary = right_load
gravity_value = 1e-3
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${E0}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
# We do averaging in subapps
[rad_avg]
type = RadialAverage
radius = 8
weights = linear
prop_name = sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
[calc_sense]
type = SensitivityFilter
density_sensitivity = Dc
design_density = mat_den
filter_UO = rad_avg
execute_on = TIMESTEP_END
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-10
dt = 1.0
num_steps = 10
[]
[Outputs]
exodus = true
[out]
type = CSV
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[mesh_volume]
type = VolumePostprocessor
execute_on = 'initial timestep_end'
[]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[vol_frac]
type = ParsedPostprocessor
function = 'total_vol / mesh_volume'
pp_names = 'total_vol mesh_volume'
[]
[sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = sensitivity
execute_on = 'TIMESTEP_BEGIN TIMESTEP_END NONLINEAR'
[]
[objective]
type = ElementIntegralMaterialProperty
mat_prop = strain_energy_density
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
(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'
[]
[]
(modules/solid_mechanics/test/tests/global_strain/global_strain_hydrostat.i)
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 1
nz = 1
[]
[cnode]
type = ExtraNodesetGenerator
coord = '0.0 0.0 0.0'
new_boundary = 100
input = generated_mesh
[]
[]
[Variables]
[./u_x]
[../]
[./u_y]
[../]
[./u_z]
[../]
[./global_strain]
order = SIXTH
family = SCALAR
[../]
[]
[AuxVariables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[AuxKernels]
[./disp_x]
type = GlobalDisplacementAux
variable = disp_x
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 1
[../]
[./disp_y]
type = GlobalDisplacementAux
variable = disp_y
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 1
[../]
[./disp_z]
type = GlobalDisplacementAux
variable = disp_z
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 2
[../]
[]
[GlobalParams]
displacements = 'u_x u_y u_z'
block = 0
[]
[Kernels]
[SolidMechanics]
[../]
[]
[ScalarKernels]
[./global_strain]
type = GlobalStrain
variable = global_strain
global_strain_uo = global_strain_uo
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y z'
variable = ' u_x u_y u_z'
[../]
[../]
# fix center point location
[./centerfix_x]
type = DirichletBC
boundary = 100
variable = u_x
value = 0
[../]
[./centerfix_y]
type = DirichletBC
boundary = 100
variable = u_y
value = 0
[../]
[./centerfix_z]
type = DirichletBC
boundary = 100
variable = u_z
value = 0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
C_ijkl = '70e9 0.33'
fill_method = symmetric_isotropic_E_nu
[../]
[./strain]
type = ComputeSmallStrain
global_strain = global_strain
[../]
[./global_strain]
type = ComputeGlobalStrain
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[]
[UserObjects]
[./global_strain_uo]
type = GlobalStrainUserObject
applied_stress_tensor = '-5e9 -5e9 -5e9 0 0 0'
execute_on = 'Initial Linear Nonlinear'
[../]
[]
[Postprocessors]
[./l2err]
type = ScalarL2Error
variable = global_strain
function = -0.02428571 #strain = E*(1-2*nu)/sigma
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'PJFNK'
line_search = basic
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
l_max_its = 30
nl_max_its = 12
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-10
start_time = 0.0
num_steps = 2
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/shell/static/plate_bending2.i)
# Shell element verification test from Abaqus verification manual 1.3.13
# A 40 m x 20 m x 1 m plate that has E = 1000 Pa and Poisson's ratio = 0.3
# is subjected to the following boundary/loading conditions. A single shell
# element is used to model the plate.
# disp_z = 0 at vertices A (0, 0), B (40, 0) and D (20, 0).
# disp_x and disp_y are zero at all four vertices.
# F_z = -2.0 N at vertex C (40, 20).
# M_x = 20.0 Nm at vertices A and B (bottom boundary)
# M_x = -20.0 Nm at vertices C and D (top boundary)
# M_y = 10.0 Nm at vertices B and C (right boundary)
# M_y = -10.0 Nm at vertices A and D (left boundary)
# The disp_z at vertex C is -12.54 m using S4 elements in Abaqus.
# The solution obtained using Moose is -12.519 m with a relative error
# of 0.16%.
[Mesh]
[./gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 1
ny = 1
xmin = 0.0
xmax = 40.0
ymin = 0.0
ymax = 20.0
[../]
[./c_node]
type = ExtraNodesetGenerator
input = gmg
new_boundary = 100
coord = '40.0 20.0'
[../]
[]
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[./disp_z]
order = FIRST
family = LAGRANGE
[../]
[./rot_x]
order = FIRST
family = LAGRANGE
[../]
[./rot_y]
order = FIRST
family = LAGRANGE
[../]
[]
[BCs]
[./simply_support_x]
type = DirichletBC
variable = disp_x
boundary = 'right top bottom left'
value = 0.0
[../]
[./simply_support_y]
type = DirichletBC
variable = disp_y
boundary = 'right top bottom left'
value = 0.0
[../]
[./simply_support_z]
type = DirichletBC
variable = disp_z
boundary = 'bottom left'
value = 0.0
[../]
[]
[NodalKernels]
[./force_C]
type = ConstantRate
variable = disp_z
boundary = 100
rate = -2.0
[../]
[./Mx_AB]
type = ConstantRate
variable = rot_x
boundary = bottom
rate = 20.0
[../]
[./Mx_CD]
type = ConstantRate
variable = rot_x
boundary = top
rate = -20.0
[../]
[./My_BC]
type = ConstantRate
variable = rot_y
boundary = right
rate = 10.0
[../]
[./My_AD]
type = ConstantRate
variable = rot_y
boundary = left
rate = -10.0
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
line_search = 'none'
#nl_max_its = 2
nl_rel_tol = 1e-10
nl_abs_tol = 6e-6
dt = 1.0
dtmin = 1.0
end_time = 3
[]
[Kernels]
[./solid_disp_x]
type = ADStressDivergenceShell
block = '0'
component = 0
variable = disp_x
through_thickness_order = SECOND
[../]
[./solid_disp_y]
type = ADStressDivergenceShell
block = '0'
component = 1
variable = disp_y
through_thickness_order = SECOND
[../]
[./solid_disp_z]
type = ADStressDivergenceShell
block = '0'
component = 2
variable = disp_z
through_thickness_order = SECOND
[../]
[./solid_rot_x]
type = ADStressDivergenceShell
block = '0'
component = 3
variable = rot_x
through_thickness_order = SECOND
[../]
[./solid_rot_y]
type = ADStressDivergenceShell
block = '0'
component = 4
variable = rot_y
through_thickness_order = SECOND
[../]
[]
[Materials]
[./elasticity]
type = ADComputeIsotropicElasticityTensorShell
youngs_modulus = 1e3
poissons_ratio = 0.3
block = 0
through_thickness_order = SECOND
[../]
[./strain]
type = ADComputeIncrementalShellStrain
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y'
thickness = 1.0
through_thickness_order = SECOND
[../]
[./stress]
type = ADComputeShellStress
block = 0
through_thickness_order = SECOND
[../]
[]
[Postprocessors]
[./disp_z2]
type = PointValue
point = '40.0 20.0 0.0'
variable = disp_z
[../]
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/finite_strain_jacobian/bending_jacobian.i)
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 2
nx = 10
ny = 2
elem_type = QUAD4
[]
[corner]
type = ExtraNodesetGenerator
new_boundary = 101
coord = '0 0'
input = generated_mesh
[]
[side]
type = ExtraNodesetGenerator
new_boundary = 102
coord = '10 0'
input = corner
[]
[mid]
type = ExtraNodesetGenerator
new_boundary = 103
coord = '5 2'
input = side
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Physics/SolidMechanics/QuasiStatic]
[./all]
strain = FINITE
add_variables = true
use_finite_deform_jacobian = true
volumetric_locking_correction = false
[../]
[]
[Materials]
[./stress]
type = ComputeFiniteStrainElasticStress
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '1.684e5 0.176e5 0.176e5 1.684e5 0.176e5 1.684e5 0.754e5 0.754e5 0.754e5'
[../]
[]
[BCs]
[./fix_corner_x]
type = DirichletBC
variable = disp_x
boundary = 101
value = 0
[../]
[./fix_corner_y]
type = DirichletBC
variable = disp_y
boundary = 101
value = 0
[../]
[./fix_y]
type = DirichletBC
variable = disp_y
boundary = 102
value = 0
[../]
[./move_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 103
function = '-t'
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-10
nl_max_its = 10
l_tol = 1e-4
l_max_its = 50
dt = 0.1
dtmin = 0.1
num_steps = 2
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/uel/small_test_umat_states_fields_gradient.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
xmax = 10
ymax = 3
elem_type = TRI3
[]
[pin]
type = ExtraNodesetGenerator
nodes = 106
new_boundary = pin
input = gen
[]
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[temperature]
initial_condition = 400
[]
[voltage]
initial_condition = 210
[]
[]
[AuxKernels]
[temperature]
type = FunctionAux
function = '25* x + 40 * y + 400'
variable = temperature
[]
[voltage]
type = FunctionAux
function = '10 * x + 4 * y + 210'
variable = voltage
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = pin
value = 0
[]
inactive = 'right_dirichlet'
[right_neumann]
type = FunctionNeumannBC
variable = disp_x
function = t/10
boundary = right
[]
[right_dirichlet]
type = FunctionDirichletBC
variable = disp_x
function = t/10
boundary = right
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
strain = SMALL
incremental = true
extra_vector_tags = 'kernel_residual'
[]
[]
[Materials]
[umat]
type = AbaqusUMATStress
constant_properties = '100 0.3'
plugin = '../../plugins/small_elastic_tri_states'
num_state_vars = 2
use_one_based_indexing = true
temperature = 'temperature'
external_fields = 'voltage'
[]
[]
[Problem]
kernel_coverage_check = false
extra_tag_vectors = 'kernel_residual'
[]
[AuxVariables]
[res_x]
[]
[res_y]
[]
[]
[AuxKernels]
[res_x]
type = TagVectorAux
variable = res_x
v = disp_x
vector_tag = kernel_residual
[]
[res_y]
type = TagVectorAux
variable = res_y
v = disp_y
vector_tag = kernel_residual
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
dt = 1
num_steps = 15
[Quadrature]
type = GAUSS
order = CONSTANT
[]
[]
[Postprocessors]
[delta_l]
type = SideAverageValue
variable = disp_x
boundary = right
execute_on = 'INITIAL TIMESTEP_END'
[]
[V]
type = ElementIntegralMaterialProperty
mat_prop = 1
use_displaced_mesh = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/solid_mechanics/test/tests/ad_anisotropic_creep/aniso_creep_integration_error.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 2
nz = 2
xmin = 0.0
ymin = 0.0
zmin = 0.0
xmax = 10.0
ymax = 1.0
zmax = 1.0
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = '100'
nodes = '3 69'
input = gen
[]
[corner_node_2]
type = ExtraNodesetGenerator
new_boundary = '101'
nodes = '4 47'
input = corner_node
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[creep_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = RankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[creep_strain_xx]
type = RankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xx
index_i = 0
index_j = 0
[]
[creep_strain_xy]
type = RankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xy
index_i = 0
index_j = 1
[]
[creep_strain_yy]
type = RankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_yy
index_i = 1
index_j = 1
[]
[sigma_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 1
index_j = 1
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1.0'
y = '0 -4e1'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_xx stress_xx'
use_automatic_differentiation = false
add_variables = true
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 7000
poissons_ratio = 0.0
[]
[elastic_strain]
type = ComputeMultipleInelasticStress
inelastic_models = "trial_creep_two"
max_iterations = 50
absolute_tolerance = 1e-16
[]
[hill_tensor]
type = HillConstants
# F G H L M N
hill_constants = "0.5 0.25 0.3866 1.6413 1.6413 1.2731"
[]
[trial_creep_two]
type = HillCreepStressUpdate
coefficient = 1e-16
n_exponent = 9
m_exponent = 0
activation_energy = 0
max_inelastic_increment = 1.0e-4
absolute_tolerance = 1e-20
relative_tolerance = 1e-20
max_integration_error = 1.0e-5
[]
[]
[BCs]
[no_disp_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[no_disp_y]
type = DirichletBC
variable = disp_y
boundary = 100
value = 0.0
[]
[no_disp_z]
type = DirichletBC
variable = disp_z
boundary = 101
value = 0.0
[]
[Pressure]
[Side1]
boundary = right
function = pull
[]
[]
[]
[UserObjects]
[terminator_creep]
type = Terminator
expression = 'time_step_size > matl_ts_min'
fail_mode = SOFT
execute_on = TIMESTEP_END
[]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1.0e-13
nl_abs_tol = 1.0e-13
l_max_its = 10
end_time = 1.65e-1
dt = 2.5e-2
start_time = 0
automatic_scaling = true
[./TimeStepper]
type = IterationAdaptiveDT
dt = 2.5e-2
time_t = '0.0 10.0'
time_dt = '2.5e-2 2.5e-2 '
optimal_iterations = 30
iteration_window = 9
growth_factor = 1.5
cutback_factor = 0.5
timestep_limiting_postprocessor = matl_ts_min
[../]
[]
[Postprocessors]
[time_step_size]
type = TimestepSize
[]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[num_lin]
type = NumLinearIterations
outputs = console
[]
[num_nonlin]
type = NumNonlinearIterations
outputs = console
[]
[creep_strain_xx]
type = ElementalVariableValue
variable = creep_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[elastic_strain_xx]
type = ElementalVariableValue
variable = elastic_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[sigma_xx]
type = ElementalVariableValue
variable = stress_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[]
[Outputs]
csv = true
exodus = true
perf_graph = true
[]
(modules/solid_mechanics/test/tests/uel/small_test_expanded.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
xmax = 10
ymax = 3
elem_type = TRI3
[]
[pin]
type = ExtraNodesetGenerator
nodes = 106
new_boundary = pin
input = gen
[]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = pin
value = 0
[]
inactive = 'right_dirichlet'
[right_neumann]
type = FunctionNeumannBC
variable = disp_x
function = t
boundary = right
[]
[right_dirichlet]
type = FunctionDirichletBC
variable = disp_x
function = t/10
boundary = right
[]
[]
[UserObjects]
[uel]
type = AbaqusUserElement
variables = 'disp_x disp_y'
plugin = ../../../examples/uel_tri_tests/uel
use_displaced_mesh = false
num_state_vars = 18
constant_properties = '100 0.3' # E nu
extra_vector_tags = 'kernel_residual'
[]
[]
[Problem]
kernel_coverage_check = false
extra_tag_vectors = 'kernel_residual'
[]
[AuxVariables]
[res_x]
[]
[res_y]
[]
[]
[AuxKernels]
[res_x]
type = TagVectorAux
variable = res_x
v = disp_x
vector_tag = kernel_residual
[]
[res_y]
type = TagVectorAux
variable = res_y
v = disp_y
vector_tag = kernel_residual
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
dt = 1
num_steps = 15
[]
[Postprocessors]
[delta_l]
type = SideAverageValue
variable = disp_x
boundary = right
execute_on = 'INITIAL TIMESTEP_END'
[]
[V]
type = ElementIntegralMaterialProperty
mat_prop = 1
use_displaced_mesh = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(test/tests/mortar/periodic_segmental_constraint/penalty_periodic_split.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 3
xmin = -3.0
xmax = 3.0
ymin = -3.0
ymax = 3.0
zmin = -3.0
zmax = 3.0
nx = 3
ny = 3
nz = 3
elem_type = HEX8
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3 4 5'
new_boundary = '10 11 12 13 14 15'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[left]
type = LowerDBlockFromSidesetGenerator
input = left_block_id
sidesets = '14'
new_block_id = '10004'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '15'
new_block_id = '10005'
new_block_name = 'primary_top'
[]
[back]
type = LowerDBlockFromSidesetGenerator
input = top
sidesets = '11'
new_block_id = '10001'
new_block_name = 'secondary_back'
[]
[front]
type = LowerDBlockFromSidesetGenerator
input = back
sidesets = '13'
new_block_id = '10003'
new_block_name = 'primary_front'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = front
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[epsilon]
order = THIRD
family = SCALAR
[]
[]
[AuxVariables]
[sigma]
order = THIRD
family = SCALAR
[]
[]
[AuxScalarKernels]
[sigma]
type = FunctionScalarAux
variable = sigma
function = '1 2 3'
execute_on = initial #timestep_end
[]
[]
[Kernels]
[diff1]
type = Diffusion
variable = u
block = 1
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = PenaltyEqualValueConstraint
primary_boundary = '12'
secondary_boundary = '14'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodiclr]
type = PenaltyPeriodicSegmentalConstraint
primary_boundary = '12'
secondary_boundary = '14'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[mortarbt]
type = PenaltyEqualValueConstraint
primary_boundary = '15'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodicbt]
type = PenaltyPeriodicSegmentalConstraint
primary_boundary = '15'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[mortarbf]
type = PenaltyEqualValueConstraint
primary_boundary = '13'
secondary_boundary = '11'
primary_subdomain = 'primary_front'
secondary_subdomain = 'secondary_back'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodicbf]
type = PenaltyPeriodicSegmentalConstraint
primary_boundary = '13'
secondary_boundary = '11'
primary_subdomain = 'primary_front'
secondary_subdomain = 'secondary_back'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[]
[Preconditioning]
[FSP]
type = FSP
topsplit = 'uv' # 'uv' should match the following block name
[uv]
splitting = 'u v' # 'u' and 'v' are the names of subsolvers
splitting_type = additive
[]
[u]
vars = 'u'
petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = ' 201 hypre boomeramg 10'
[]
[v]
vars = 'epsilon'
petsc_options_iname = '-ksp_type -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
petsc_options_value = ' preonly hypre boomeramg 10'
[]
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
csv = true
[]
(test/tests/mortar/periodic_segmental_constraint/periodic_checker2d.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -1.0
xmax = 1.0
ymin = -1.0
ymax = 1.0
nx = 16
ny = 16
elem_type = QUAD9
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[lowrig]
type = SubdomainBoundingBoxGenerator
input = 'left_block_id'
block_id = 2
bottom_left = '0 -1 0'
top_right = '1 0 0'
[]
[upplef]
type = SubdomainBoundingBoxGenerator
input = 'lowrig'
block_id = 3
bottom_left = '-1 0 0'
top_right = '0 1 0'
[]
[upprig]
type = SubdomainBoundingBoxGenerator
input = 'upplef'
block_id = 4
bottom_left = '0 0 0'
top_right = '1 1 0'
[]
[left]
type = LowerDBlockFromSidesetGenerator
input = upprig
sidesets = '13'
new_block_id = '10003'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '11'
new_block_id = '10001'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_top'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = top
[]
[]
[Variables]
[u]
order = SECOND
family = LAGRANGE
[]
[epsilon]
order = SECOND
family = SCALAR
[]
[lm1]
order = FIRST
family = LAGRANGE
block = secondary_left
[]
[lm2]
order = FIRST
family = LAGRANGE
block = secondary_bottom
[]
[]
[AuxVariables]
[sigma]
order = SECOND
family = SCALAR
[]
[flux_x]
order = FIRST
family = MONOMIAL
[]
[flux_y]
order = FIRST
family = MONOMIAL
[]
[]
[AuxScalarKernels]
[sigma]
type = FunctionScalarAux
variable = sigma
function = '1 3'
execute_on = initial #timestep_end
[]
[]
[AuxKernels]
[flux_x]
type = DiffusionFluxAux
diffusivity = 'conductivity'
variable = flux_x
diffusion_variable = u
component = x
block = '1 2 3 4'
[]
[flux_y]
type = DiffusionFluxAux
diffusivity = 'conductivity'
variable = flux_y
diffusion_variable = u
component = y
block = '1 2 3 4'
[]
[]
[Kernels]
[diff1]
type = Diffusion
variable = u
block = '1 4'
[]
[diff2]
type = MatDiffusion
variable = u
block = '2 3'
diffusivity = conductivity
[]
[]
[Materials]
[k1]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 1.0
block = '1 4'
[]
[k2]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 10.0
block = '2 3'
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = EqualValueConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
variable = lm1
correct_edge_dropping = true
[]
[periodiclr]
type = PeriodicSegmentalConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
epsilon = epsilon
sigma = sigma
variable = lm1
correct_edge_dropping = true
[]
[mortarbt]
type = EqualValueConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
variable = lm2
correct_edge_dropping = true
[]
[periodicbt]
type = PeriodicSegmentalConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
epsilon = epsilon
sigma = sigma
variable = lm2
correct_edge_dropping = true
[]
[]
[Preconditioning]
[smp]
full = true
type = SMP
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -pc_factor_mat_solver_type'
petsc_options_value = 'lu NONZERO 1e-15 strumpack'
solve_type = NEWTON
[]
[Postprocessors]
[max]
type = ElementExtremeValue
variable = 'flux_x'
[]
[]
[Outputs]
csv = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/mms/supg/supg_pspg_adv_dominated_mms.i)
mu=1.5e-4
rho=2.5
[GlobalParams]
gravity = '0 0 0'
supg = true
pspg = true
convective_term = true
integrate_p_by_parts = false
transient_term = true
laplace = true
u = vel_x
v = vel_y
pressure = p
alpha = 1e0
order = FIRST
family = LAGRANGE
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
elem_type = QUAD9
nx = 4
ny = 4
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./vel_x]
[../]
[./vel_y]
[../]
[./p]
order = FIRST
[../]
[]
[Kernels]
# mass
[./mass]
type = INSMass
variable = p
x_vel_forcing_func = vel_x_source_func
y_vel_forcing_func = vel_y_source_func
[../]
[./x_time]
type = INSMomentumTimeDerivative
variable = vel_x
[../]
[./y_time]
type = INSMomentumTimeDerivative
variable = vel_y
[../]
# x-momentum, space
[./x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
component = 0
forcing_func = vel_x_source_func
[../]
# y-momentum, space
[./y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
component = 1
forcing_func = vel_y_source_func
[../]
[./p_source]
type = BodyForce
function = p_source_func
variable = p
[../]
[]
[BCs]
[./vel_x]
type = FunctionDirichletBC
boundary = 'left right top bottom'
function = vel_x_func
variable = vel_x
[../]
[./vel_y]
type = FunctionDirichletBC
boundary = 'left right top bottom'
function = vel_y_func
variable = vel_y
[../]
[./p]
type = FunctionDirichletBC
boundary = 'left right top bottom'
function = p_func
variable = p
[../]
[]
[Functions]
[./vel_x_source_func]
type = ParsedFunction
expression = '-${mu}*(-0.028*pi^2*x^2*sin(0.2*pi*x*y) - 0.028*pi^2*y^2*sin(0.2*pi*x*y) - 0.1*pi^2*sin(0.5*pi*x) - 0.4*pi^2*sin(pi*y)) + ${rho}*(0.14*pi*x*cos(0.2*pi*x*y) + 0.4*pi*cos(pi*y))*(0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3) + ${rho}*(0.14*pi*y*cos(0.2*pi*x*y) + 0.2*pi*cos(0.5*pi*x))*(0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5) + 0.1*pi*y*cos(0.2*pi*x*y) + 0.25*pi*cos(0.5*pi*x)'
[../]
[./vel_y_source_func]
type = ParsedFunction
expression = '-${mu}*(-0.018*pi^2*x^2*sin(0.3*pi*x*y) - 0.018*pi^2*y^2*sin(0.3*pi*x*y) - 0.384*pi^2*sin(0.8*pi*x) - 0.027*pi^2*sin(0.3*pi*y)) + ${rho}*(0.06*pi*x*cos(0.3*pi*x*y) + 0.09*pi*cos(0.3*pi*y))*(0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3) + ${rho}*(0.06*pi*y*cos(0.3*pi*x*y) + 0.48*pi*cos(0.8*pi*x))*(0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5) + 0.1*pi*x*cos(0.2*pi*x*y) + 0.3*pi*cos(0.3*pi*y)'
[../]
[./p_source_func]
type = ParsedFunction
expression = '-0.06*pi*x*cos(0.3*pi*x*y) - 0.14*pi*y*cos(0.2*pi*x*y) - 0.2*pi*cos(0.5*pi*x) - 0.09*pi*cos(0.3*pi*y)'
[../]
[./vel_x_func]
type = ParsedFunction
expression = '0.4*sin(0.5*pi*x) + 0.4*sin(pi*y) + 0.7*sin(0.2*pi*x*y) + 0.5'
[../]
[./vel_y_func]
type = ParsedFunction
expression = '0.6*sin(0.8*pi*x) + 0.3*sin(0.3*pi*y) + 0.2*sin(0.3*pi*x*y) + 0.3'
[../]
[./p_func]
type = ParsedFunction
expression = '0.5*sin(0.5*pi*x) + 1.0*sin(0.3*pi*y) + 0.5*sin(0.2*pi*x*y) + 0.5'
[../]
[./vxx_func]
type = ParsedFunction
expression = '0.14*pi*y*cos(0.2*pi*x*y) + 0.2*pi*cos(0.5*pi*x)'
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_view'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu NONZERO superlu_dist'
line_search = 'none'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-12
nl_max_its = 10
l_tol = 1e-6
l_max_its = 10
# To run to steady-state, set num-steps to some large number (1000000 for example)
type = Transient
num_steps = 10
steady_state_detection = true
steady_state_tolerance = 1e-10
[./TimeStepper]
dt = .1
type = IterationAdaptiveDT
cutback_factor = 0.4
growth_factor = 1.2
optimal_iterations = 20
[../]
[]
[Outputs]
execute_on = 'final'
[./exodus]
type = Exodus
[../]
[./csv]
type = CSV
[../]
[]
[Postprocessors]
[./L2vel_x]
type = ElementL2Error
variable = vel_x
function = vel_x_func
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2vel_y]
variable = vel_y
function = vel_y_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2p]
variable = p
function = p_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2vxx]
variable = vxx
function = vxx_func
type = ElementL2Error
outputs = 'console' execute_on = 'timestep_end'
[../]
[]
[AuxVariables]
[./vxx]
family = MONOMIAL
order = FIRST
[../]
[]
[AuxKernels]
[./vxx]
type = VariableGradientComponent
component = x
variable = vxx
gradient_variable = vel_x
[../]
[]
(modules/combined/examples/geochem-porous_flow/geotes_weber_tensleep/porous_flow.i)
#########################################
# #
# File written by create_input_files.py #
# #
#########################################
# PorousFlow simulation of injection and production in a simplified GeoTES aquifer
# Much of this file is standard porous-flow stuff. The unusual aspects are:
# - transfer of the rates of changes of each species (kg.s) to the aquifer_geochemistry.i simulation. This is achieved by saving these changes from the PorousFlowMassTimeDerivative residuals
# - transfer of the temperature field to the aquifer_geochemistry.i simulation
# Interesting behaviour can be simulated by this file without its 'parent' simulation, exchanger.i. exchanger.i provides mass-fractions injected via the injection_rate_massfrac_* variables, but since these are more-or-less constant throughout the duration of the exchanger.i simulation, the initial_conditions specified below may be used. Similar, exchanger.i provides injection_temperature, but that is also constant.
injection_rate = -0.02 # kg/s/m, negative because injection as a source
production_rate = 0.02 # kg/s/m, this is about the maximum that can be sustained by the aquifer, with its fairly low permeability, without porepressure becoming negative
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = -75
xmax = 75
ymin = 0
ymax = 40
zmin = -25
zmax = 25
nx = 15
ny = 4
nz = 5
[]
[aquifer]
type = ParsedSubdomainMeshGenerator
input = gen
block_id = 1
block_name = aquifer
combinatorial_geometry = 'z >= -5 & z <= 5'
[]
[injection_nodes]
input = aquifer
type = ExtraNodesetGenerator
new_boundary = injection_nodes
coord = '-25 0 -5; -25 0 5'
[]
[production_nodes]
input = injection_nodes
type = ExtraNodesetGenerator
new_boundary = production_nodes
coord = '25 0 -5; 25 0 5'
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 -10'
[]
[BCs]
[injection_temperature]
type = MatchedValueBC
variable = temperature
v = injection_temperature
boundary = injection_nodes
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0
bulk_modulus = 2E9
viscosity = 1E-3
density0 = 1000
cv = 4000.0
cp = 4000.0
[]
[]
[PorousFlowFullySaturated]
coupling_type = ThermoHydro
porepressure = porepressure
temperature = temperature
mass_fraction_vars = 'f_H f_Cl f_SO4 f_HCO3 f_SiO2aq f_Al f_Ca f_Mg f_Fe f_K f_Na f_Sr f_F f_BOH f_Br f_Ba f_Li f_NO3 f_O2aq '
save_component_rate_in = 'rate_H rate_Cl rate_SO4 rate_HCO3 rate_SiO2aq rate_Al rate_Ca rate_Mg rate_Fe rate_K rate_Na rate_Sr rate_F rate_BOH rate_Br rate_Ba rate_Li rate_NO3 rate_O2aq rate_H2O' # change in kg at every node / dt
fp = the_simple_fluid
temperature_unit = Celsius
[]
[Materials]
[porosity_caps]
type = PorousFlowPorosityConst # this simulation has no porosity changes from dissolution
block = 0
porosity = 0.01
[]
[porosity_aquifer]
type = PorousFlowPorosityConst # this simulation has no porosity changes from dissolution
block = aquifer
porosity = 0.063
[]
[permeability_caps]
type = PorousFlowPermeabilityConst
block = 0
permeability = '1E-18 0 0 0 1E-18 0 0 0 1E-18'
[]
[permeability_aquifer]
type = PorousFlowPermeabilityConst
block = aquifer
permeability = '1.7E-15 0 0 0 1.7E-15 0 0 0 4.1E-16'
[]
[thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '0 0 0 0 0 0 0 0 0'
[]
[rock_heat]
type = PorousFlowMatrixInternalEnergy
density = 2500.0
specific_heat_capacity = 1200.0
[]
[]
[Preconditioning]
active = typically_efficient
[typically_efficient]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = ' hypre boomeramg'
[]
[strong]
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 ilu NONZERO 2'
[]
[probably_too_strong]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
[]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 7.76E6 # 90 days
[TimeStepper]
type = FunctionDT
function = 'min(3E4, max(1E4, 0.2 * t))'
[]
[]
[Outputs]
exodus = true
[]
[Variables]
[f_H]
initial_condition = -2.952985071156e-06
[]
[f_Cl]
initial_condition = 0.04870664551708
[]
[f_SO4]
initial_condition = 0.0060359986852517
[]
[f_HCO3]
initial_condition = 5.0897287594019e-05
[]
[f_SiO2aq]
initial_condition = 3.0246609868421e-05
[]
[f_Al]
initial_condition = 3.268028901929e-08
[]
[f_Ca]
initial_condition = 0.00082159428184586
[]
[f_Mg]
initial_condition = 1.8546347062146e-05
[]
[f_Fe]
initial_condition = 4.3291908204093e-05
[]
[f_K]
initial_condition = 6.8434768308898e-05
[]
[f_Na]
initial_condition = 0.033298053919671
[]
[f_Sr]
initial_condition = 1.2771866652177e-05
[]
[f_F]
initial_condition = 5.5648860174073e-06
[]
[f_BOH]
initial_condition = 0.0003758574621917
[]
[f_Br]
initial_condition = 9.0315286107068e-05
[]
[f_Ba]
initial_condition = 1.5637460875161e-07
[]
[f_Li]
initial_condition = 8.3017067912701e-05
[]
[f_NO3]
initial_condition = 0.00010958455036169
[]
[f_O2aq]
initial_condition = -7.0806852373351e-05
[]
[porepressure]
initial_condition = 30E6
[]
[temperature]
initial_condition = 92
scaling = 1E-6 # fluid enthalpy is roughly 1E6
[]
[]
[DiracKernels]
[inject_H]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_H
point_file = injection.bh
variable = f_H
[]
[inject_Cl]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Cl
point_file = injection.bh
variable = f_Cl
[]
[inject_SO4]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_SO4
point_file = injection.bh
variable = f_SO4
[]
[inject_HCO3]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_HCO3
point_file = injection.bh
variable = f_HCO3
[]
[inject_SiO2aq]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_SiO2aq
point_file = injection.bh
variable = f_SiO2aq
[]
[inject_Al]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Al
point_file = injection.bh
variable = f_Al
[]
[inject_Ca]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Ca
point_file = injection.bh
variable = f_Ca
[]
[inject_Mg]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Mg
point_file = injection.bh
variable = f_Mg
[]
[inject_Fe]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Fe
point_file = injection.bh
variable = f_Fe
[]
[inject_K]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_K
point_file = injection.bh
variable = f_K
[]
[inject_Na]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Na
point_file = injection.bh
variable = f_Na
[]
[inject_Sr]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Sr
point_file = injection.bh
variable = f_Sr
[]
[inject_F]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_F
point_file = injection.bh
variable = f_F
[]
[inject_BOH]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_BOH
point_file = injection.bh
variable = f_BOH
[]
[inject_Br]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Br
point_file = injection.bh
variable = f_Br
[]
[inject_Ba]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Ba
point_file = injection.bh
variable = f_Ba
[]
[inject_Li]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_Li
point_file = injection.bh
variable = f_Li
[]
[inject_NO3]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_NO3
point_file = injection.bh
variable = f_NO3
[]
[inject_O2aq]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_O2aq
point_file = injection.bh
variable = f_O2aq
[]
[inject_H2O]
type = PorousFlowPolyLineSink
SumQuantityUO = injected_mass
fluxes = ${injection_rate}
p_or_t_vals = 0.0
multiplying_var = injection_rate_massfrac_H2O
point_file = injection.bh
variable = porepressure
[]
[produce_H]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_H
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 0
point_file = production.bh
variable = f_H
[]
[produce_Cl]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Cl
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 1
point_file = production.bh
variable = f_Cl
[]
[produce_SO4]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_SO4
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 2
point_file = production.bh
variable = f_SO4
[]
[produce_HCO3]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_HCO3
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 3
point_file = production.bh
variable = f_HCO3
[]
[produce_SiO2aq]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_SiO2aq
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 4
point_file = production.bh
variable = f_SiO2aq
[]
[produce_Al]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Al
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 5
point_file = production.bh
variable = f_Al
[]
[produce_Ca]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Ca
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 6
point_file = production.bh
variable = f_Ca
[]
[produce_Mg]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Mg
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 7
point_file = production.bh
variable = f_Mg
[]
[produce_Fe]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Fe
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 8
point_file = production.bh
variable = f_Fe
[]
[produce_K]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_K
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 9
point_file = production.bh
variable = f_K
[]
[produce_Na]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Na
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 10
point_file = production.bh
variable = f_Na
[]
[produce_Sr]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Sr
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 11
point_file = production.bh
variable = f_Sr
[]
[produce_F]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_F
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 12
point_file = production.bh
variable = f_F
[]
[produce_BOH]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_BOH
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 13
point_file = production.bh
variable = f_BOH
[]
[produce_Br]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Br
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 14
point_file = production.bh
variable = f_Br
[]
[produce_Ba]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Ba
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 15
point_file = production.bh
variable = f_Ba
[]
[produce_Li]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_Li
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 16
point_file = production.bh
variable = f_Li
[]
[produce_NO3]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_NO3
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 17
point_file = production.bh
variable = f_NO3
[]
[produce_O2aq]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_O2aq
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 18
point_file = production.bh
variable = f_O2aq
[]
[produce_H2O]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_mass_H2O
fluxes = ${production_rate}
p_or_t_vals = 0.0
mass_fraction_component = 19
point_file = production.bh
variable = porepressure
[]
[produce_heat]
type = PorousFlowPolyLineSink
SumQuantityUO = produced_heat
fluxes = ${production_rate}
p_or_t_vals = 0.0
use_enthalpy = true
point_file = production.bh
variable = temperature
[]
[]
[UserObjects]
[injected_mass]
type = PorousFlowSumQuantity
[]
[produced_mass_H]
type = PorousFlowSumQuantity
[]
[produced_mass_Cl]
type = PorousFlowSumQuantity
[]
[produced_mass_SO4]
type = PorousFlowSumQuantity
[]
[produced_mass_HCO3]
type = PorousFlowSumQuantity
[]
[produced_mass_SiO2aq]
type = PorousFlowSumQuantity
[]
[produced_mass_Al]
type = PorousFlowSumQuantity
[]
[produced_mass_Ca]
type = PorousFlowSumQuantity
[]
[produced_mass_Mg]
type = PorousFlowSumQuantity
[]
[produced_mass_Fe]
type = PorousFlowSumQuantity
[]
[produced_mass_K]
type = PorousFlowSumQuantity
[]
[produced_mass_Na]
type = PorousFlowSumQuantity
[]
[produced_mass_Sr]
type = PorousFlowSumQuantity
[]
[produced_mass_F]
type = PorousFlowSumQuantity
[]
[produced_mass_BOH]
type = PorousFlowSumQuantity
[]
[produced_mass_Br]
type = PorousFlowSumQuantity
[]
[produced_mass_Ba]
type = PorousFlowSumQuantity
[]
[produced_mass_Li]
type = PorousFlowSumQuantity
[]
[produced_mass_NO3]
type = PorousFlowSumQuantity
[]
[produced_mass_O2aq]
type = PorousFlowSumQuantity
[]
[produced_mass_H2O]
type = PorousFlowSumQuantity
[]
[produced_heat]
type = PorousFlowSumQuantity
[]
[]
[Postprocessors]
[dt]
type = TimestepSize
execute_on = TIMESTEP_BEGIN
[]
[tot_kg_injected_this_timestep]
type = PorousFlowPlotQuantity
uo = injected_mass
[]
[kg_H_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_H
[]
[kg_Cl_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Cl
[]
[kg_SO4_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_SO4
[]
[kg_HCO3_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_HCO3
[]
[kg_SiO2aq_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_SiO2aq
[]
[kg_Al_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Al
[]
[kg_Ca_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Ca
[]
[kg_Mg_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Mg
[]
[kg_Fe_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Fe
[]
[kg_K_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_K
[]
[kg_Na_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Na
[]
[kg_Sr_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Sr
[]
[kg_F_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_F
[]
[kg_BOH_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_BOH
[]
[kg_Br_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Br
[]
[kg_Ba_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Ba
[]
[kg_Li_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_Li
[]
[kg_NO3_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_NO3
[]
[kg_O2aq_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_O2aq
[]
[kg_H2O_produced_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_mass_H2O
[]
[mole_rate_H_produced]
type = FunctionValuePostprocessor
function = moles_H
indirect_dependencies = 'kg_H_produced_this_timestep dt'
[]
[mole_rate_Cl_produced]
type = FunctionValuePostprocessor
function = moles_Cl
indirect_dependencies = 'kg_Cl_produced_this_timestep dt'
[]
[mole_rate_SO4_produced]
type = FunctionValuePostprocessor
function = moles_SO4
indirect_dependencies = 'kg_SO4_produced_this_timestep dt'
[]
[mole_rate_HCO3_produced]
type = FunctionValuePostprocessor
function = moles_HCO3
indirect_dependencies = 'kg_HCO3_produced_this_timestep dt'
[]
[mole_rate_SiO2aq_produced]
type = FunctionValuePostprocessor
function = moles_SiO2aq
indirect_dependencies = 'kg_SiO2aq_produced_this_timestep dt'
[]
[mole_rate_Al_produced]
type = FunctionValuePostprocessor
function = moles_Al
indirect_dependencies = 'kg_Al_produced_this_timestep dt'
[]
[mole_rate_Ca_produced]
type = FunctionValuePostprocessor
function = moles_Ca
indirect_dependencies = 'kg_Ca_produced_this_timestep dt'
[]
[mole_rate_Mg_produced]
type = FunctionValuePostprocessor
function = moles_Mg
indirect_dependencies = 'kg_Mg_produced_this_timestep dt'
[]
[mole_rate_Fe_produced]
type = FunctionValuePostprocessor
function = moles_Fe
indirect_dependencies = 'kg_Fe_produced_this_timestep dt'
[]
[mole_rate_K_produced]
type = FunctionValuePostprocessor
function = moles_K
indirect_dependencies = 'kg_K_produced_this_timestep dt'
[]
[mole_rate_Na_produced]
type = FunctionValuePostprocessor
function = moles_Na
indirect_dependencies = 'kg_Na_produced_this_timestep dt'
[]
[mole_rate_Sr_produced]
type = FunctionValuePostprocessor
function = moles_Sr
indirect_dependencies = 'kg_Sr_produced_this_timestep dt'
[]
[mole_rate_F_produced]
type = FunctionValuePostprocessor
function = moles_F
indirect_dependencies = 'kg_F_produced_this_timestep dt'
[]
[mole_rate_BOH_produced]
type = FunctionValuePostprocessor
function = moles_BOH
indirect_dependencies = 'kg_BOH_produced_this_timestep dt'
[]
[mole_rate_Br_produced]
type = FunctionValuePostprocessor
function = moles_Br
indirect_dependencies = 'kg_Br_produced_this_timestep dt'
[]
[mole_rate_Ba_produced]
type = FunctionValuePostprocessor
function = moles_Ba
indirect_dependencies = 'kg_Ba_produced_this_timestep dt'
[]
[mole_rate_Li_produced]
type = FunctionValuePostprocessor
function = moles_Li
indirect_dependencies = 'kg_Li_produced_this_timestep dt'
[]
[mole_rate_NO3_produced]
type = FunctionValuePostprocessor
function = moles_NO3
indirect_dependencies = 'kg_NO3_produced_this_timestep dt'
[]
[mole_rate_O2aq_produced]
type = FunctionValuePostprocessor
function = moles_O2aq
indirect_dependencies = 'kg_O2aq_produced_this_timestep dt'
[]
[mole_rate_H2O_produced]
type = FunctionValuePostprocessor
function = moles_H2O
indirect_dependencies = 'kg_H2O_produced_this_timestep dt'
[]
[heat_joules_extracted_this_timestep]
type = PorousFlowPlotQuantity
uo = produced_heat
[]
[production_temperature]
type = AverageNodalVariableValue
boundary = production_nodes
variable = temperature
[]
[]
[Functions]
[moles_H]
type = ParsedFunction
symbol_names = 'kg_H dt'
symbol_values = 'kg_H_produced_this_timestep dt'
expression = 'kg_H * 1000 / 1.0079 / dt'
[]
[moles_Cl]
type = ParsedFunction
symbol_names = 'kg_Cl dt'
symbol_values = 'kg_Cl_produced_this_timestep dt'
expression = 'kg_Cl * 1000 / 35.453 / dt'
[]
[moles_SO4]
type = ParsedFunction
symbol_names = 'kg_SO4 dt'
symbol_values = 'kg_SO4_produced_this_timestep dt'
expression = 'kg_SO4 * 1000 / 96.0576 / dt'
[]
[moles_HCO3]
type = ParsedFunction
symbol_names = 'kg_HCO3 dt'
symbol_values = 'kg_HCO3_produced_this_timestep dt'
expression = 'kg_HCO3 * 1000 / 61.0171 / dt'
[]
[moles_SiO2aq]
type = ParsedFunction
symbol_names = 'kg_SiO2aq dt'
symbol_values = 'kg_SiO2aq_produced_this_timestep dt'
expression = 'kg_SiO2aq * 1000 / 60.0843 / dt'
[]
[moles_Al]
type = ParsedFunction
symbol_names = 'kg_Al dt'
symbol_values = 'kg_Al_produced_this_timestep dt'
expression = 'kg_Al * 1000 / 26.9815 / dt'
[]
[moles_Ca]
type = ParsedFunction
symbol_names = 'kg_Ca dt'
symbol_values = 'kg_Ca_produced_this_timestep dt'
expression = 'kg_Ca * 1000 / 40.08 / dt'
[]
[moles_Mg]
type = ParsedFunction
symbol_names = 'kg_Mg dt'
symbol_values = 'kg_Mg_produced_this_timestep dt'
expression = 'kg_Mg * 1000 / 24.305 / dt'
[]
[moles_Fe]
type = ParsedFunction
symbol_names = 'kg_Fe dt'
symbol_values = 'kg_Fe_produced_this_timestep dt'
expression = 'kg_Fe * 1000 / 55.847 / dt'
[]
[moles_K]
type = ParsedFunction
symbol_names = 'kg_K dt'
symbol_values = 'kg_K_produced_this_timestep dt'
expression = 'kg_K * 1000 / 39.0983 / dt'
[]
[moles_Na]
type = ParsedFunction
symbol_names = 'kg_Na dt'
symbol_values = 'kg_Na_produced_this_timestep dt'
expression = 'kg_Na * 1000 / 22.9898 / dt'
[]
[moles_Sr]
type = ParsedFunction
symbol_names = 'kg_Sr dt'
symbol_values = 'kg_Sr_produced_this_timestep dt'
expression = 'kg_Sr * 1000 / 87.62 / dt'
[]
[moles_F]
type = ParsedFunction
symbol_names = 'kg_F dt'
symbol_values = 'kg_F_produced_this_timestep dt'
expression = 'kg_F * 1000 / 18.9984 / dt'
[]
[moles_BOH]
type = ParsedFunction
symbol_names = 'kg_BOH dt'
symbol_values = 'kg_BOH_produced_this_timestep dt'
expression = 'kg_BOH * 1000 / 61.8329 / dt'
[]
[moles_Br]
type = ParsedFunction
symbol_names = 'kg_Br dt'
symbol_values = 'kg_Br_produced_this_timestep dt'
expression = 'kg_Br * 1000 / 79.904 / dt'
[]
[moles_Ba]
type = ParsedFunction
symbol_names = 'kg_Ba dt'
symbol_values = 'kg_Ba_produced_this_timestep dt'
expression = 'kg_Ba * 1000 / 137.33 / dt'
[]
[moles_Li]
type = ParsedFunction
symbol_names = 'kg_Li dt'
symbol_values = 'kg_Li_produced_this_timestep dt'
expression = 'kg_Li * 1000 / 6.941 / dt'
[]
[moles_NO3]
type = ParsedFunction
symbol_names = 'kg_NO3 dt'
symbol_values = 'kg_NO3_produced_this_timestep dt'
expression = 'kg_NO3 * 1000 / 62.0049 / dt'
[]
[moles_O2aq]
type = ParsedFunction
symbol_names = 'kg_O2aq dt'
symbol_values = 'kg_O2aq_produced_this_timestep dt'
expression = 'kg_O2aq * 1000 / 31.9988 / dt'
[]
[moles_H2O]
type = ParsedFunction
symbol_names = 'kg_H2O dt'
symbol_values = 'kg_H2O_produced_this_timestep dt'
expression = 'kg_H2O * 1000 / 18.01801802 / dt'
[]
[]
[AuxVariables]
[injection_temperature]
initial_condition = 92
[]
[injection_rate_massfrac_H]
initial_condition = -2.952985071156e-06
[]
[injection_rate_massfrac_Cl]
initial_condition = 0.04870664551708
[]
[injection_rate_massfrac_SO4]
initial_condition = 0.0060359986852517
[]
[injection_rate_massfrac_HCO3]
initial_condition = 5.0897287594019e-05
[]
[injection_rate_massfrac_SiO2aq]
initial_condition = 3.0246609868421e-05
[]
[injection_rate_massfrac_Al]
initial_condition = 3.268028901929e-08
[]
[injection_rate_massfrac_Ca]
initial_condition = 0.00082159428184586
[]
[injection_rate_massfrac_Mg]
initial_condition = 1.8546347062146e-05
[]
[injection_rate_massfrac_Fe]
initial_condition = 4.3291908204093e-05
[]
[injection_rate_massfrac_K]
initial_condition = 6.8434768308898e-05
[]
[injection_rate_massfrac_Na]
initial_condition = 0.033298053919671
[]
[injection_rate_massfrac_Sr]
initial_condition = 1.2771866652177e-05
[]
[injection_rate_massfrac_F]
initial_condition = 5.5648860174073e-06
[]
[injection_rate_massfrac_BOH]
initial_condition = 0.0003758574621917
[]
[injection_rate_massfrac_Br]
initial_condition = 9.0315286107068e-05
[]
[injection_rate_massfrac_Ba]
initial_condition = 1.5637460875161e-07
[]
[injection_rate_massfrac_Li]
initial_condition = 8.3017067912701e-05
[]
[injection_rate_massfrac_NO3]
initial_condition = 0.00010958455036169
[]
[injection_rate_massfrac_O2aq]
initial_condition = -7.0806852373351e-05
[]
[injection_rate_massfrac_H2O]
initial_condition = 0.91032275033842
[]
[rate_H]
[]
[rate_Cl]
[]
[rate_SO4]
[]
[rate_HCO3]
[]
[rate_SiO2aq]
[]
[rate_Al]
[]
[rate_Ca]
[]
[rate_Mg]
[]
[rate_Fe]
[]
[rate_K]
[]
[rate_Na]
[]
[rate_Sr]
[]
[rate_F]
[]
[rate_BOH]
[]
[rate_Br]
[]
[rate_Ba]
[]
[rate_Li]
[]
[rate_NO3]
[]
[rate_O2aq]
[]
[rate_H2O]
[]
[]
[MultiApps]
[react]
type = TransientMultiApp
input_files = aquifer_geochemistry.i
clone_master_mesh = true
execute_on = 'timestep_end'
[]
[]
[Transfers]
[changes_due_to_flow]
type = MultiAppCopyTransfer
source_variable = 'rate_H rate_Cl rate_SO4 rate_HCO3 rate_SiO2aq rate_Al rate_Ca rate_Mg rate_Fe rate_K rate_Na rate_Sr rate_F rate_BOH rate_Br rate_Ba rate_Li rate_NO3 rate_O2aq rate_H2O temperature'
variable = 'pf_rate_H pf_rate_Cl pf_rate_SO4 pf_rate_HCO3 pf_rate_SiO2aq pf_rate_Al pf_rate_Ca pf_rate_Mg pf_rate_Fe pf_rate_K pf_rate_Na pf_rate_Sr pf_rate_F pf_rate_BOH pf_rate_Br pf_rate_Ba pf_rate_Li pf_rate_NO3 pf_rate_O2aq pf_rate_H2O temperature'
to_multi_app = react
[]
[massfrac_from_geochem]
type = MultiAppCopyTransfer
source_variable = 'massfrac_H massfrac_Cl massfrac_SO4 massfrac_HCO3 massfrac_SiO2aq massfrac_Al massfrac_Ca massfrac_Mg massfrac_Fe massfrac_K massfrac_Na massfrac_Sr massfrac_F massfrac_BOH massfrac_Br massfrac_Ba massfrac_Li massfrac_NO3 massfrac_O2aq '
variable = 'f_H f_Cl f_SO4 f_HCO3 f_SiO2aq f_Al f_Ca f_Mg f_Fe f_K f_Na f_Sr f_F f_BOH f_Br f_Ba f_Li f_NO3 f_O2aq '
from_multi_app = react
[]
[]
(test/tests/mortar/periodic_segmental_constraint/penalty_periodic_checker2d.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -1.0
xmax = 1.0
ymin = -1.0
ymax = 1.0
nx = 16
ny = 16
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_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[./lowrig]
type = SubdomainBoundingBoxGenerator
input = 'left_block_id'
block_id = 2
bottom_left = '0 -1 0'
top_right = '1 0 0'
[../]
[./upplef]
type = SubdomainBoundingBoxGenerator
input = 'lowrig'
block_id = 3
bottom_left = '-1 0 0'
top_right = '0 1 0'
[../]
[./upprig]
type = SubdomainBoundingBoxGenerator
input = 'upplef'
block_id = 4
bottom_left = '0 0 0'
top_right = '1 1 0'
[../]
[left]
type = LowerDBlockFromSidesetGenerator
input = upprig
sidesets = '13'
new_block_id = '10003'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '11'
new_block_id = '10001'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_top'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = top
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[epsilon]
order = SECOND
family = SCALAR
[]
[]
[AuxVariables]
[sigma]
order = SECOND
family = SCALAR
[]
[./flux_x]
order = FIRST
family = MONOMIAL
[../]
[./flux_y]
order = FIRST
family = MONOMIAL
[../]
[]
[AuxScalarKernels]
[sigma]
type = FunctionScalarAux
variable = sigma
function = '1 3'
execute_on = initial #timestep_end
[]
[]
[AuxKernels]
[./flux_x]
type = DiffusionFluxAux
diffusivity = 'conductivity'
variable = flux_x
diffusion_variable = u
component = x
block = '1 2 3 4'
[../]
[./flux_y]
type = DiffusionFluxAux
diffusivity = 'conductivity'
variable = flux_y
diffusion_variable = u
component = y
block = '1 2 3 4'
[../]
[]
[Kernels]
[diff1]
type = Diffusion
variable = u
block = '1 4'
[]
[diff2]
type = MatDiffusion
variable = u
block = '2 3'
diffusivity = conductivity
[]
[]
[Materials]
[k1]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 1.0
block = '1 4'
[]
[k2]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 10.0
block = '2 3'
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = PenaltyEqualValueConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodiclr]
type = PenaltyPeriodicSegmentalConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[mortarbt]
type = PenaltyEqualValueConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodicbt]
type = PenaltyPeriodicSegmentalConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[]
[Preconditioning]
[smp]
full = true
type = SMP
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
solve_type = NEWTON
[]
[Postprocessors]
[max]
type = ElementExtremeValue
variable = 'flux_x'
[]
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/tutorials/introduction/mech_step03a.i)
#
# Added subdomains and subdomain-specific properties
# https://mooseframework.inl.gov/modules/solid_mechanics/tutorials/introduction/step03.html
#
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[generated]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 20
xmin = -0.25
xmax = 0.25
ymax = 5
[]
[block1]
type = SubdomainBoundingBoxGenerator
input = generated
block_id = 1
bottom_left = '-0.25 0 0'
top_right = '0 5 0'
[]
[block2]
type = SubdomainBoundingBoxGenerator
input = block1
block_id = 2
bottom_left = '0 0 0'
top_right = '0.25 5 0'
[]
# select a single node in the center of the bottom boundary
[pin]
type = ExtraNodesetGenerator
input = block2
new_boundary = pin
coord = '0 0 0'
[]
[]
[AuxVariables]
[T]
[]
[]
[AuxKernels]
[temperature_ramp]
type = FunctionAux
execute_on = TIMESTEP_BEGIN
variable = T
function = 300+5*t
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
automatic_eigenstrain_names = true
generate_output = 'vonmises_stress'
[]
[]
[BCs]
[pin_x]
type = DirichletBC
variable = disp_x
boundary = pin
value = 0
[]
[bottom_y]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[]
[Materials]
[elasticity]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e9
poissons_ratio = 0.3
[]
[expansion1]
type = ComputeThermalExpansionEigenstrain
temperature = T
thermal_expansion_coeff = 0.001
stress_free_temperature = 300
eigenstrain_name = thermal_expansion
block = 1
[]
[expansion2]
type = ComputeThermalExpansionEigenstrain
temperature = T
thermal_expansion_coeff = 0.002
stress_free_temperature = 300
eigenstrain_name = thermal_expansion
block = 2
[]
[stress]
type = ComputeLinearElasticStress
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
end_time = 5
dt = 1
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/optimization/compliance_sensitivity/2d_mbb_pde_amr.i)
vol_frac = 0.5
E0 = 1
Emin = 1e-8
power = 3
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 30
ny = 10
xmin = 0
xmax = 30
ymin = 0
ymax = 10
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = hold
nodes = 0
[]
[push]
type = ExtraNodesetGenerator
input = node
new_boundary = push
coord = '30 10 0'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[Dc]
initial_condition = -1.0
[]
[]
[AuxVariables]
[sensitivity]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[AuxKernel]
type = MaterialRealAux
variable = sensitivity
property = sensitivity
execute_on = LINEAR
[]
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = ${vol_frac}
[]
[Dc_elem]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[AuxKernel]
type = SelfAux
variable = Dc_elem
v = Dc
execute_on = 'TIMESTEP_END'
[]
[]
[mat_den_nodal]
family = L2_LAGRANGE
order = FIRST
initial_condition = ${vol_frac}
[AuxKernel]
type = SelfAux
execute_on = TIMESTEP_END
variable = mat_den_nodal
v = mat_den
[]
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[Kernels]
[diffusion]
type = FunctionDiffusion
variable = Dc
function = 0.15 # radius coeff
[]
[potential]
type = Reaction
variable = Dc
[]
[source]
type = CoupledForce
variable = Dc
v = sensitivity
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_y
boundary = hold
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[boundary_penalty]
type = ADRobinBC
variable = Dc
boundary = 'left top'
coefficient = 10
[]
[boundary_penalty_right]
type = ADRobinBC
variable = Dc
boundary = 'right'
coefficient = 10
[]
[]
[NodalKernels]
[push]
type = NodalGravity
variable = disp_y
boundary = push
gravity_value = -1
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${E0}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
incremental = false
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[update]
type = DensityUpdate
density_sensitivity = Dc_elem
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
line_search = none
nl_abs_tol = 1e-4
l_max_its = 200
start_time = 0.0
dt = 1.0
num_steps = 70
[]
[Outputs]
[out]
type = CSV
execute_on = 'INITIAL TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = sensitivity
[]
[]
[Controls]
[first_period]
type = TimePeriod
start_time = 0.0
end_time = 40
enable_objects = 'BCs::boundary_penalty_right'
execute_on = 'initial timestep_begin'
[]
[]
[Adaptivity]
max_h_level = 2
recompute_markers_during_cycles = true
interval = 1
cycles_per_step = 1
marker = density_marker
[Indicators]
[density_jump]
type = ValueJumpIndicator
variable = mat_den_nodal
[]
[]
[Markers]
[density_marker]
type = ErrorToleranceMarker
indicator = density_jump
coarsen = 0.1
refine = 0.1
[]
[]
[]
(modules/solid_mechanics/test/tests/uel/uel_test_print.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
elem_type = HEX8
[]
[extra_nodeset]
type = ExtraNodesetGenerator
input = mesh
new_boundary = 'master'
coord = '1.0 1.0 1.0'
[]
[]
[AuxVariables]
[temperature]
initial_condition = 1500
[]
[voltage]
initial_condition = 210
[]
[]
[AuxKernels]
[temperature]
type = FunctionAux
function = temperature_function
variable = temperature
[]
[voltage]
type = FunctionAux
function = voltage_function
variable = voltage
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[Functions]
[function_pull]
type = PiecewiseLinear
x = '0 100'
y = '0 0.1'
[]
[pressure_function]
type = PiecewiseLinear
x = '0 100'
y = '0 2.0e4'
[]
[voltage_function]
type = PiecewiseLinear
x = '0 100'
y = '210 450'
[]
[temperature_function]
type = PiecewiseLinear
x = '0 100'
y = '1500 800'
[]
[]
[Constraints]
[one]
type = LinearNodalConstraint
variable = disp_x
primary = '6'
secondary_node_ids = '1 2 5'
penalty = 1.0e8
formulation = kinematic
weights = '1'
[]
[two]
type = LinearNodalConstraint
variable = disp_z
primary = '6'
secondary_node_ids = '4 5 7'
penalty = 1.0e8
formulation = kinematic
weights = '1'
[]
[]
[BCs]
[symmy]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[symmx]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[symmz]
type = DirichletBC
variable = disp_z
boundary = back
value = 0
[]
[Pressure]
[press]
boundary = 'top'
displacements = 'disp_x disp_y disp_z'
function = pressure_function
[]
[]
[]
[UserObjects]
[uel]
type = AbaqusUserElement
variables = 'disp_x disp_y disp_z'
plugin = '../../../../solid_mechanics/examples/uel_build_tests/uel'
use_displaced_mesh = false
external_fields = 'temperature voltage'
jtype = 10
num_state_vars = 96 #
constant_properties = '2 1 2 210000 0.3'
extra_vector_tags = 'kernel_residual'
[]
[]
[Problem]
kernel_coverage_check = false
extra_tag_vectors = 'kernel_residual'
[]
[AuxVariables]
[res_x]
[]
[res_y]
[]
[]
[AuxKernels]
[res_x]
type = TagVectorAux
variable = res_x
v = disp_x
vector_tag = kernel_residual
[]
[res_y]
type = TagVectorAux
variable = res_y
v = disp_y
vector_tag = kernel_residual
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = ' lu superlu_dist'
line_search = none
l_max_its = 100
l_tol = 1e-8
nl_max_its = 1
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
error_on_dtmin = false
dtmin = 10
dt = 10
end_time = 10
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/auxkernels/peclet-number-functor-aux/fe-thermal.i)
rho = 1
mu = 1
k = 1
cp = 1
[GlobalParams]
gravity = '0 0 0'
pspg = true
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[]
[]
[AuxVariables]
[Pe]
family = MONOMIAL
order = FIRST
[]
[]
[AuxKernels]
[Pe]
type = PecletNumberFunctorAux
variable = Pe
speed = speed
thermal_diffusivity = 'thermal_diffusivity'
[]
[]
[Variables]
[vel_x][]
[vel_y][]
[p][]
[T][]
[]
[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
[]
[temperature_space]
type = INSTemperature
variable = T
u = vel_x
v = vel_y
[]
[]
[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
[]
[T_hot]
type = DirichletBC
variable = T
boundary = 'bottom'
value = 1
[]
[T_cold]
type = DirichletBC
variable = T
boundary = 'top'
value = 0
[]
[]
[Materials]
[const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu k cp'
prop_values = '${rho} ${mu} ${k} ${cp}'
[]
[speed]
type = ADVectorMagnitudeFunctorMaterial
x_functor = vel_x
y_functor = vel_y
vector_magnitude_name = speed
[]
[thermal_diffusivity]
type = ThermalDiffusivityFunctorMaterial
k = ${k}
rho = ${rho}
cp = ${cp}
[]
[]
[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'
petsc_options_value = 'asm 2 lu'
line_search = 'none'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(modules/combined/examples/geochem-porous_flow/geotes_weber_tensleep/aquifer_geochemistry.i)
#########################################
# #
# File written by create_input_files.py #
# #
#########################################
# Simulates geochemistry in the aquifer. This input file may be run in standalone fashion but it does not do anything of interest. To simulate something interesting, run the porous_flow.i simulation which couples to this input file using MultiApps.
# This file receives pf_rate_H pf_rate_Cl pf_rate_SO4 pf_rate_HCO3 pf_rate_SiO2aq pf_rate_Al pf_rate_Ca pf_rate_Mg pf_rate_Fe pf_rate_K pf_rate_Na pf_rate_Sr pf_rate_F pf_rate_BOH pf_rate_Br pf_rate_Ba pf_rate_Li pf_rate_NO3 pf_rate_O2aq pf_rate_H2O and temperature as AuxVariables from porous_flow.i
# The pf_rate quantities are kg/s changes of fluid-component mass at each node, but the geochemistry module expects rates-of-changes of moles at every node. Secondly, since this input file considers just 1 litre of aqueous solution at every node, the nodal_void_volume is used to convert pf_rate_* into rate_*_per_1l, which is measured in mol/s/1_litre_of_aqueous_solution.
# This file sends massfrac_H massfrac_Cl massfrac_SO4 massfrac_HCO3 massfrac_SiO2aq massfrac_Al massfrac_Ca massfrac_Mg massfrac_Fe massfrac_K massfrac_Na massfrac_Sr massfrac_F massfrac_BOH massfrac_Br massfrac_Ba massfrac_Li massfrac_NO3 massfrac_O2aq to porous_flow.i. These are computed from the corresponding transported_* quantities.
[UserObjects]
[definition]
type = GeochemicalModelDefinition
database_file = '../../../../geochemistry/database/moose_geochemdb.json'
basis_species = 'H2O H+ Cl- SO4-- HCO3- SiO2(aq) Al+++ Ca++ Mg++ Fe++ K+ Na+ Sr++ F- B(OH)3 Br- Ba++ Li+ NO3- O2(aq)'
equilibrium_minerals = 'Siderite Pyrrhotite Dolomite Illite Anhydrite Calcite Quartz K-feldspar Kaolinite Barite Celestite Fluorite Albite Chalcedony Goethite'
[]
[nodal_void_volume_uo]
type = NodalVoidVolume
porosity = porosity
execute_on = 'initial timestep_end' # initial means this is evaluated properly for the first timestep
[]
[]
[SpatialReactionSolver]
model_definition = definition
geochemistry_reactor_name = reactor
charge_balance_species = 'Cl-'
swap_out_of_basis = 'NO3- H+ Fe++ Ba++ SiO2(aq) Mg++ O2(aq) Al+++ K+ Ca++ HCO3-'
swap_into_basis = ' NH3 Pyrrhotite K-feldspar Barite Quartz Dolomite Siderite Calcite Illite Anhydrite Kaolinite'
# ASSUME that 1 litre of solution contains:
constraint_species = 'H2O Quartz Calcite K-feldspar Siderite Dolomite Anhydrite Pyrrhotite Illite Kaolinite Barite Na+ Cl- SO4-- Li+ B(OH)3 Br- F- Sr++ NH3'
constraint_value = ' 0.99778351 322.177447 12.111108 6.8269499 6.2844304 2.8670301 1.1912027 0.51474767 0.3732507 0.20903322 0.0001865889 1.5876606 1.5059455 0.046792579 0.013110503 0.006663119 0.001238987 0.00032108 0.000159781 0.001937302'
constraint_meaning = 'kg_solvent_water bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition bulk_composition'
constraint_unit = "kg moles moles moles moles moles moles moles moles moles moles moles moles moles moles moles moles moles moles moles"
prevent_precipitation = 'Fluorite Albite Goethite'
initial_temperature = 92
temperature = temperature
source_species_names = 'H+ Cl- SO4-- HCO3- SiO2(aq) Al+++ Ca++ Mg++ Fe++ K+ Na+ Sr++ F- B(OH)3 Br- Ba++ Li+ NO3- O2(aq) H2O'
source_species_rates = ' rate_H_per_1l rate_Cl_per_1l rate_SO4_per_1l rate_HCO3_per_1l rate_SiO2aq_per_1l rate_Al_per_1l rate_Ca_per_1l rate_Mg_per_1l rate_Fe_per_1l rate_K_per_1l rate_Na_per_1l rate_Sr_per_1l rate_F_per_1l rate_BOH_per_1l rate_Br_per_1l rate_Ba_per_1l rate_Li_per_1l rate_NO3_per_1l rate_O2aq_per_1l rate_H2O_per_1l'
ramp_max_ionic_strength_initial = 0 # max_ionic_strength in such a simple problem does not need ramping
execute_console_output_on = '' # only CSV and exodus output for this simulation
add_aux_molal = false # save some memory and reduce variables in output exodus
add_aux_mg_per_kg = false # save some memory and reduce variables in output exodus
add_aux_free_mg = false # save some memory and reduce variables in output exodus
add_aux_activity = false # save some memory and reduce variables in output exodus
add_aux_bulk_moles = false # save some memory and reduce variables in output exodus
adaptive_timestepping = true
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = -75
xmax = 75
ymin = 0
ymax = 40
zmin = -25
zmax = 25
nx = 15
ny = 4
nz = 5
[]
[aquifer]
type = ParsedSubdomainMeshGenerator
input = gen
block_id = 1
block_name = aquifer
combinatorial_geometry = 'z >= -5 & z <= 5'
[]
[injection_nodes]
input = aquifer
type = ExtraNodesetGenerator
new_boundary = injection_nodes
coord = '-25 0 -5; -25 0 5'
[]
[production_nodes]
input = injection_nodes
type = ExtraNodesetGenerator
new_boundary = production_nodes
coord = '25 0 -5; 25 0 5'
[]
[]
[GlobalParams]
point = '-25 0 0'
reactor = reactor
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 7.76E6 # 90 days
[TimeStepper]
type = FunctionDT
function = 'min(3E4, max(1E4, 0.2 * t))'
[]
[]
[AuxVariables]
[temperature]
initial_condition = 92.0
[]
[porosity]
initial_condition = 0.1
[]
[nodal_void_volume]
[]
[free_cm3_Kfeldspar] # necessary because of the minus sign in K-feldspar which does not parse correctly in the porosity AuxKernel
[]
[pf_rate_H] # change in H mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_Cl] # change in Cl mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_SO4] # change in SO4 mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_HCO3] # change in HCO3 mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_SiO2aq] # change in SiO2aq mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_Al] # change in Al mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_Ca] # change in Ca mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_Mg] # change in Mg mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_Fe] # change in Fe mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_K] # change in K mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_Na] # change in Na mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_Sr] # change in Sr mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_F] # change in F mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_BOH] # change in BOH mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_Br] # change in Br mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_Ba] # change in Ba mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_Li] # change in Li mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_NO3] # change in NO3 mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_O2aq] # change in O2aq mass (kg/s) at each node provided by the porous-flow simulation
[]
[pf_rate_H2O] # change in H2O mass (kg/s) at each node provided by the porous-flow simulation
[]
[rate_H_per_1l]
[]
[rate_Cl_per_1l]
[]
[rate_SO4_per_1l]
[]
[rate_HCO3_per_1l]
[]
[rate_SiO2aq_per_1l]
[]
[rate_Al_per_1l]
[]
[rate_Ca_per_1l]
[]
[rate_Mg_per_1l]
[]
[rate_Fe_per_1l]
[]
[rate_K_per_1l]
[]
[rate_Na_per_1l]
[]
[rate_Sr_per_1l]
[]
[rate_F_per_1l]
[]
[rate_BOH_per_1l]
[]
[rate_Br_per_1l]
[]
[rate_Ba_per_1l]
[]
[rate_Li_per_1l]
[]
[rate_NO3_per_1l]
[]
[rate_O2aq_per_1l]
[]
[rate_H2O_per_1l]
[]
[transported_H]
[]
[transported_Cl]
[]
[transported_SO4]
[]
[transported_HCO3]
[]
[transported_SiO2aq]
[]
[transported_Al]
[]
[transported_Ca]
[]
[transported_Mg]
[]
[transported_Fe]
[]
[transported_K]
[]
[transported_Na]
[]
[transported_Sr]
[]
[transported_F]
[]
[transported_BOH]
[]
[transported_Br]
[]
[transported_Ba]
[]
[transported_Li]
[]
[transported_NO3]
[]
[transported_O2aq]
[]
[transported_H2O]
[]
[transported_mass]
[]
[massfrac_H]
[]
[massfrac_Cl]
[]
[massfrac_SO4]
[]
[massfrac_HCO3]
[]
[massfrac_SiO2aq]
[]
[massfrac_Al]
[]
[massfrac_Ca]
[]
[massfrac_Mg]
[]
[massfrac_Fe]
[]
[massfrac_K]
[]
[massfrac_Na]
[]
[massfrac_Sr]
[]
[massfrac_F]
[]
[massfrac_BOH]
[]
[massfrac_Br]
[]
[massfrac_Ba]
[]
[massfrac_Li]
[]
[massfrac_NO3]
[]
[massfrac_O2aq]
[]
[massfrac_H2O]
[]
[]
[AuxKernels]
[free_cm3_Kfeldspar]
type = GeochemistryQuantityAux
variable = free_cm3_Kfeldspar
species = 'K-feldspar'
quantity = free_cm3
execute_on = 'timestep_end'
[]
[porosity_auxk]
type = ParsedAux
coupled_variables = 'free_cm3_Siderite free_cm3_Pyrrhotite free_cm3_Dolomite free_cm3_Illite free_cm3_Anhydrite free_cm3_Calcite free_cm3_Quartz free_cm3_Kfeldspar free_cm3_Kaolinite free_cm3_Barite free_cm3_Celestite free_cm3_Fluorite free_cm3_Albite free_cm3_Chalcedony free_cm3_Goethite'
expression = '1000.0 / (1000.0 + free_cm3_Siderite + free_cm3_Pyrrhotite + free_cm3_Dolomite + free_cm3_Illite + free_cm3_Anhydrite + free_cm3_Calcite + free_cm3_Quartz + free_cm3_Kfeldspar + free_cm3_Kaolinite + free_cm3_Barite + free_cm3_Celestite + free_cm3_Fluorite + free_cm3_Albite + free_cm3_Chalcedony + free_cm3_Goethite)'
variable = porosity
execute_on = 'timestep_end'
[]
[nodal_void_volume_auxk]
type = NodalVoidVolumeAux
variable = nodal_void_volume
nodal_void_volume_uo = nodal_void_volume_uo
execute_on = 'initial timestep_end' # initial to ensure it is properly evaluated for the first timestep
[]
[rate_H_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_H nodal_void_volume'
variable = rate_H_per_1l
expression = 'pf_rate_H / 1.0079 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_Cl_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_Cl nodal_void_volume'
variable = rate_Cl_per_1l
expression = 'pf_rate_Cl / 35.453 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_SO4_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_SO4 nodal_void_volume'
variable = rate_SO4_per_1l
expression = 'pf_rate_SO4 / 96.0576 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_HCO3_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_HCO3 nodal_void_volume'
variable = rate_HCO3_per_1l
expression = 'pf_rate_HCO3 / 61.0171 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_SiO2aq_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_SiO2aq nodal_void_volume'
variable = rate_SiO2aq_per_1l
expression = 'pf_rate_SiO2aq / 60.0843 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_Al_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_Al nodal_void_volume'
variable = rate_Al_per_1l
expression = 'pf_rate_Al / 26.9815 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_Ca_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_Ca nodal_void_volume'
variable = rate_Ca_per_1l
expression = 'pf_rate_Ca / 40.08 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_Mg_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_Mg nodal_void_volume'
variable = rate_Mg_per_1l
expression = 'pf_rate_Mg / 24.305 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_Fe_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_Fe nodal_void_volume'
variable = rate_Fe_per_1l
expression = 'pf_rate_Fe / 55.847 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_K_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_K nodal_void_volume'
variable = rate_K_per_1l
expression = 'pf_rate_K / 39.0983 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_Na_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_Na nodal_void_volume'
variable = rate_Na_per_1l
expression = 'pf_rate_Na / 22.9898 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_Sr_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_Sr nodal_void_volume'
variable = rate_Sr_per_1l
expression = 'pf_rate_Sr / 87.62 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_F_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_F nodal_void_volume'
variable = rate_F_per_1l
expression = 'pf_rate_F / 18.9984 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_BOH_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_BOH nodal_void_volume'
variable = rate_BOH_per_1l
expression = 'pf_rate_BOH / 61.8329 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_Br_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_Br nodal_void_volume'
variable = rate_Br_per_1l
expression = 'pf_rate_Br / 79.904 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_Ba_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_Ba nodal_void_volume'
variable = rate_Ba_per_1l
expression = 'pf_rate_Ba / 137.33 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_Li_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_Li nodal_void_volume'
variable = rate_Li_per_1l
expression = 'pf_rate_Li / 6.941 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_NO3_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_NO3 nodal_void_volume'
variable = rate_NO3_per_1l
expression = 'pf_rate_NO3 / 62.0049 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_O2aq_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_O2aq nodal_void_volume'
variable = rate_O2aq_per_1l
expression = 'pf_rate_O2aq / 31.9988 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[rate_H2O_per_1l_auxk]
type = ParsedAux
coupled_variables = 'pf_rate_H2O nodal_void_volume'
variable = rate_H2O_per_1l
expression = 'pf_rate_H2O / 18.01801802 / nodal_void_volume'
execute_on = 'timestep_end'
[]
[transported_H_auxk]
type = GeochemistryQuantityAux
variable = transported_H
species = 'H+'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_Cl_auxk]
type = GeochemistryQuantityAux
variable = transported_Cl
species = 'Cl-'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_SO4_auxk]
type = GeochemistryQuantityAux
variable = transported_SO4
species = 'SO4--'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_HCO3_auxk]
type = GeochemistryQuantityAux
variable = transported_HCO3
species = 'HCO3-'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_SiO2aq_auxk]
type = GeochemistryQuantityAux
variable = transported_SiO2aq
species = 'SiO2(aq)'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_Al_auxk]
type = GeochemistryQuantityAux
variable = transported_Al
species = 'Al+++'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_Ca_auxk]
type = GeochemistryQuantityAux
variable = transported_Ca
species = 'Ca++'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_Mg_auxk]
type = GeochemistryQuantityAux
variable = transported_Mg
species = 'Mg++'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_Fe_auxk]
type = GeochemistryQuantityAux
variable = transported_Fe
species = 'Fe++'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_K_auxk]
type = GeochemistryQuantityAux
variable = transported_K
species = 'K+'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_Na_auxk]
type = GeochemistryQuantityAux
variable = transported_Na
species = 'Na+'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_Sr_auxk]
type = GeochemistryQuantityAux
variable = transported_Sr
species = 'Sr++'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_F_auxk]
type = GeochemistryQuantityAux
variable = transported_F
species = 'F-'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_BOH_auxk]
type = GeochemistryQuantityAux
variable = transported_BOH
species = 'B(OH)3'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_Br_auxk]
type = GeochemistryQuantityAux
variable = transported_Br
species = 'Br-'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_Ba_auxk]
type = GeochemistryQuantityAux
variable = transported_Ba
species = 'Ba++'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_Li_auxk]
type = GeochemistryQuantityAux
variable = transported_Li
species = 'Li+'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_NO3_auxk]
type = GeochemistryQuantityAux
variable = transported_NO3
species = 'NO3-'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_O2aq_auxk]
type = GeochemistryQuantityAux
variable = transported_O2aq
species = 'O2(aq)'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_H2O_auxk]
type = GeochemistryQuantityAux
variable = transported_H2O
species = 'H2O'
quantity = transported_moles_in_original_basis
execute_on = 'timestep_end'
[]
[transported_mass_auxk]
type = ParsedAux
coupled_variables = ' transported_H transported_Cl transported_SO4 transported_HCO3 transported_SiO2aq transported_Al transported_Ca transported_Mg transported_Fe transported_K transported_Na transported_Sr transported_F transported_BOH transported_Br transported_Ba transported_Li transported_NO3 transported_O2aq transported_H2O'
variable = transported_mass
expression = 'transported_H * 1.0079 + transported_Cl * 35.453 + transported_SO4 * 96.0576 + transported_HCO3 * 61.0171 + transported_SiO2aq * 60.0843 + transported_Al * 26.9815 + transported_Ca * 40.08 + transported_Mg * 24.305 + transported_Fe * 55.847 + transported_K * 39.0983 + transported_Na * 22.9898 + transported_Sr * 87.62 + transported_F * 18.9984 + transported_BOH * 61.8329 + transported_Br * 79.904 + transported_Ba * 137.33 + transported_Li * 6.941 + transported_NO3 * 62.0049 + transported_O2aq * 31.9988 + transported_H2O * 18.01801802'
execute_on = 'timestep_end'
[]
[massfrac_H_auxk]
type = ParsedAux
coupled_variables = 'transported_H transported_mass'
variable = massfrac_H
expression = 'transported_H * 1.0079 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_Cl_auxk]
type = ParsedAux
coupled_variables = 'transported_Cl transported_mass'
variable = massfrac_Cl
expression = 'transported_Cl * 35.453 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_SO4_auxk]
type = ParsedAux
coupled_variables = 'transported_SO4 transported_mass'
variable = massfrac_SO4
expression = 'transported_SO4 * 96.0576 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_HCO3_auxk]
type = ParsedAux
coupled_variables = 'transported_HCO3 transported_mass'
variable = massfrac_HCO3
expression = 'transported_HCO3 * 61.0171 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_SiO2aq_auxk]
type = ParsedAux
coupled_variables = 'transported_SiO2aq transported_mass'
variable = massfrac_SiO2aq
expression = 'transported_SiO2aq * 60.0843 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_Al_auxk]
type = ParsedAux
coupled_variables = 'transported_Al transported_mass'
variable = massfrac_Al
expression = 'transported_Al * 26.9815 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_Ca_auxk]
type = ParsedAux
coupled_variables = 'transported_Ca transported_mass'
variable = massfrac_Ca
expression = 'transported_Ca * 40.08 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_Mg_auxk]
type = ParsedAux
coupled_variables = 'transported_Mg transported_mass'
variable = massfrac_Mg
expression = 'transported_Mg * 24.305 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_Fe_auxk]
type = ParsedAux
coupled_variables = 'transported_Fe transported_mass'
variable = massfrac_Fe
expression = 'transported_Fe * 55.847 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_K_auxk]
type = ParsedAux
coupled_variables = 'transported_K transported_mass'
variable = massfrac_K
expression = 'transported_K * 39.0983 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_Na_auxk]
type = ParsedAux
coupled_variables = 'transported_Na transported_mass'
variable = massfrac_Na
expression = 'transported_Na * 22.9898 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_Sr_auxk]
type = ParsedAux
coupled_variables = 'transported_Sr transported_mass'
variable = massfrac_Sr
expression = 'transported_Sr * 87.62 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_F_auxk]
type = ParsedAux
coupled_variables = 'transported_F transported_mass'
variable = massfrac_F
expression = 'transported_F * 18.9984 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_BOH_auxk]
type = ParsedAux
coupled_variables = 'transported_BOH transported_mass'
variable = massfrac_BOH
expression = 'transported_BOH * 61.8329 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_Br_auxk]
type = ParsedAux
coupled_variables = 'transported_Br transported_mass'
variable = massfrac_Br
expression = 'transported_Br * 79.904 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_Ba_auxk]
type = ParsedAux
coupled_variables = 'transported_Ba transported_mass'
variable = massfrac_Ba
expression = 'transported_Ba * 137.33 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_Li_auxk]
type = ParsedAux
coupled_variables = 'transported_Li transported_mass'
variable = massfrac_Li
expression = 'transported_Li * 6.941 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_NO3_auxk]
type = ParsedAux
coupled_variables = 'transported_NO3 transported_mass'
variable = massfrac_NO3
expression = 'transported_NO3 * 62.0049 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_O2aq_auxk]
type = ParsedAux
coupled_variables = 'transported_O2aq transported_mass'
variable = massfrac_O2aq
expression = 'transported_O2aq * 31.9988 / transported_mass'
execute_on = 'timestep_end'
[]
[massfrac_H2O_auxk]
type = ParsedAux
coupled_variables = 'transported_H2O transported_mass'
variable = massfrac_H2O
expression = 'transported_H2O * 18.01801802 / transported_mass'
execute_on = 'timestep_end'
[]
[]
[Postprocessors]
[memory]
type = MemoryUsage
outputs = 'console'
[]
[porosity]
type = PointValue
variable = porosity
[]
[solution_temperature]
type = PointValue
variable = solution_temperature
[]
[massfrac_H]
type = PointValue
variable = massfrac_H
[]
[massfrac_Cl]
type = PointValue
variable = massfrac_Cl
[]
[massfrac_SO4]
type = PointValue
variable = massfrac_SO4
[]
[massfrac_HCO3]
type = PointValue
variable = massfrac_HCO3
[]
[massfrac_SiO2aq]
type = PointValue
variable = massfrac_SiO2aq
[]
[massfrac_Al]
type = PointValue
variable = massfrac_Al
[]
[massfrac_Ca]
type = PointValue
variable = massfrac_Ca
[]
[massfrac_Mg]
type = PointValue
variable = massfrac_Mg
[]
[massfrac_Fe]
type = PointValue
variable = massfrac_Fe
[]
[massfrac_K]
type = PointValue
variable = massfrac_K
[]
[massfrac_Na]
type = PointValue
variable = massfrac_Na
[]
[massfrac_Sr]
type = PointValue
variable = massfrac_Sr
[]
[massfrac_F]
type = PointValue
variable = massfrac_F
[]
[massfrac_BOH]
type = PointValue
variable = massfrac_BOH
[]
[massfrac_Br]
type = PointValue
variable = massfrac_Br
[]
[massfrac_Ba]
type = PointValue
variable = massfrac_Ba
[]
[massfrac_Li]
type = PointValue
variable = massfrac_Li
[]
[massfrac_NO3]
type = PointValue
variable = massfrac_NO3
[]
[massfrac_O2aq]
type = PointValue
variable = massfrac_O2aq
[]
[massfrac_H2O]
type = PointValue
variable = massfrac_H2O
[]
[free_cm3_Siderite]
type = PointValue
variable = free_cm3_Siderite
[]
[free_cm3_Pyrrhotite]
type = PointValue
variable = free_cm3_Pyrrhotite
[]
[free_cm3_Dolomite]
type = PointValue
variable = free_cm3_Dolomite
[]
[free_cm3_Illite]
type = PointValue
variable = free_cm3_Illite
[]
[free_cm3_Anhydrite]
type = PointValue
variable = free_cm3_Anhydrite
[]
[free_cm3_Calcite]
type = PointValue
variable = free_cm3_Calcite
[]
[free_cm3_Quartz]
type = PointValue
variable = free_cm3_Quartz
[]
[free_cm3_K-feldspar]
type = PointValue
variable = free_cm3_K-feldspar
[]
[free_cm3_Kaolinite]
type = PointValue
variable = free_cm3_Kaolinite
[]
[free_cm3_Barite]
type = PointValue
variable = free_cm3_Barite
[]
[free_cm3_Celestite]
type = PointValue
variable = free_cm3_Celestite
[]
[free_cm3_Fluorite]
type = PointValue
variable = free_cm3_Fluorite
[]
[free_cm3_Albite]
type = PointValue
variable = free_cm3_Albite
[]
[free_cm3_Chalcedony]
type = PointValue
variable = free_cm3_Chalcedony
[]
[free_cm3_Goethite]
type = PointValue
variable = free_cm3_Goethite
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/solid_mechanics/test/tests/beam/static_vm/ansys_vm2.i)
# This is a reproduction of test number 2 of ANSYS apdl verification manual.
# This test checks for the deformation at the center of a beam with simply
# supported boundary conditions and a uniform load w = 10,000 lb/ft.
# ||||||||| def. ||||||||
# *---*---*---*---*---*---*---*---*
# /\ /\
# /// oo
# a l a
# <-----> <--------------> <----->
#
# l = 240 in, a = 120 in, A = 50.65 in^2, Iz = 7892 in^2
# E = 30e6 psi
# Solution deflection: 0.182 in. (dispz_5: -1.824633e-01)
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 1
nx = 8
xmin = 0.0
xmax = 480.0
[]
[cnode]
type = ExtraNodesetGenerator
coord = '0.0'
new_boundary = 'one'
input = generated_mesh
[]
[cnode1]
type = ExtraNodesetGenerator
coord = '60.0'
new_boundary = 'two'
input = cnode
[]
[cnode2]
type = ExtraNodesetGenerator
coord = '420.0'
new_boundary = 'eight'
input = cnode1
[]
[cnode3]
type = ExtraNodesetGenerator
coord = '480.0'
new_boundary = 'nine'
input = cnode2
[]
[cnode4]
type = ExtraNodesetGenerator
coord = '120.0'
new_boundary = 'BC1'
input = cnode3
[]
[cnode5]
type = ExtraNodesetGenerator
coord = '360.0'
new_boundary = 'BC2'
input = cnode4
[]
[]
[Physics/SolidMechanics/LineElement/QuasiStatic]
[./all]
add_variables = true
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
# Geometry parameters
area = 50.65
Ay = 0.0
Az = 0.0
Iy = 7892.0
Iz = 7892.0
y_orientation = '0 1.0 0.0'
[../]
[]
[Materials]
[./elasticity]
type = ComputeElasticityBeam
youngs_modulus = 30.0e6
# poissons_ratio = -0.9998699638
poissons_ratio = 0.33
# poissons_ratio = 0.3
shear_coefficient = 0.85
block = 0
[../]
[./stress]
type = ComputeBeamResultants
block = 0
[../]
[]
[BCs]
[./fixx1]
type = DirichletBC
variable = disp_x
boundary = 'BC1'
value = 0.0
[../]
[./fixy1]
type = DirichletBC
variable = disp_y
boundary = 'BC1'
value = 0.0
[../]
[./fixz1]
type = DirichletBC
variable = disp_z
boundary = 'BC1'
value = 0.0
[../]
[./fixy2]
type = DirichletBC
variable = disp_y
boundary = 'BC2'
value = 0.0
[../]
[./fixz2]
type = DirichletBC
variable = disp_z
boundary = 'BC2'
value = 0.0
[../]
[]
[Functions]
[./force_50e3]
type = PiecewiseLinear
x = '0.0 10.0'
y = '0.0 50000.0'
[../]
[./force_25e3]
type = PiecewiseLinear
x = '0.0 10.0'
y = '0.0 25000.0'
[../]
[]
[NodalKernels]
[./force_z2]
type = UserForcingFunctionNodalKernel
variable = disp_z
boundary = 'two'
function = force_50e3
[../]
[./force_z8]
type = UserForcingFunctionNodalKernel
variable = disp_z
boundary = 'eight'
function = force_50e3
[../]
[./force_z1]
type = UserForcingFunctionNodalKernel
variable = disp_z
boundary = 'one'
function = force_25e3
[../]
[./force_z9]
type = UserForcingFunctionNodalKernel
variable = disp_z
boundary = 'nine'
function = force_25e3
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = JFNK
line_search = 'none'
nl_max_its = 15
nl_rel_tol = 1e-06
nl_abs_tol = 1e-06
dt = 1.0
dtmin = 0.001
end_time = 10
[]
[Postprocessors]
[./disp_z1]
type = PointValue
point = '0.0 0.0 0.0'
variable = disp_z
[../]
[./disp_x1]
type = PointValue
point = '0.0 0.0 0.0'
variable = disp_x
[../]
[./disp_z2]
type = PointValue
point = '60.0 0.0 0.0'
variable = disp_z
[../]
[./disp_zBC1]
type = PointValue
point = '120.0 0.0 0.0'
variable = disp_z
[../]
[./disp_z5]
type = PointValue
point = '240.0 0.0 0.0'
variable = disp_z
[../]
[./disp_zBC2]
type = PointValue
point = '360.0 0.0 0.0'
variable = disp_z
[../]
[./disp_xBC2]
type = PointValue
point = '360.0 0.0 0.0'
variable = disp_x
[../]
[./disp_z8]
type = PointValue
point = '420.0 0.0 0.0'
variable = disp_z
[../]
[./disp_z9]
type = PointValue
point = '480.0 0.0 0.0'
variable = disp_z
[../]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
csv = true
exodus = false
[]
(modules/combined/examples/periodic_strain/global_strain_pfm_3D.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 20
ny = 20
nz = 20
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
[]
[./cnode]
input = gen
type = ExtraNodesetGenerator
coord = '0.0 0.0 0.0'
new_boundary = 100
[../]
[]
[Variables]
[./u_x]
[../]
[./u_y]
[../]
[./u_z]
[../]
[./global_strain]
order = SIXTH
family = SCALAR
[../]
[./c]
[./InitialCondition]
type = FunctionIC
function = 'sin(2*x*pi)*sin(2*y*pi)*sin(2*z*pi)*0.05+0.6'
[../]
[../]
[./w]
[../]
[]
[AuxVariables]
[./local_energy]
order = CONSTANT
family = MONOMIAL
[../]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./s00]
order = CONSTANT
family = MONOMIAL
[../]
[./s01]
order = CONSTANT
family = MONOMIAL
[../]
[./s10]
order = CONSTANT
family = MONOMIAL
[../]
[./s11]
order = CONSTANT
family = MONOMIAL
[../]
[./e00]
order = CONSTANT
family = MONOMIAL
[../]
[./e01]
order = CONSTANT
family = MONOMIAL
[../]
[./e10]
order = CONSTANT
family = MONOMIAL
[../]
[./e11]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./disp_x]
type = GlobalDisplacementAux
variable = disp_x
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 0
[../]
[./disp_y]
type = GlobalDisplacementAux
variable = disp_y
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 1
[../]
[./disp_z]
type = GlobalDisplacementAux
variable = disp_z
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
component = 2
[../]
[./local_free_energy]
type = TotalFreeEnergy
execute_on = 'initial LINEAR'
variable = local_energy
interfacial_vars = 'c'
kappa_names = 'kappa_c'
[../]
[./s00]
type = RankTwoAux
variable = s00
rank_two_tensor = stress
index_i = 0
index_j = 0
[../]
[./s01]
type = RankTwoAux
variable = s01
rank_two_tensor = stress
index_i = 0
index_j = 1
[../]
[./s10]
type = RankTwoAux
variable = s10
rank_two_tensor = stress
index_i = 1
index_j = 0
[../]
[./s11]
type = RankTwoAux
variable = s11
rank_two_tensor = stress
index_i = 1
index_j = 1
[../]
[./e00]
type = RankTwoAux
variable = e00
rank_two_tensor = total_strain
index_i = 0
index_j = 0
[../]
[./e01]
type = RankTwoAux
variable = e01
rank_two_tensor = total_strain
index_i = 0
index_j = 1
[../]
[./e10]
type = RankTwoAux
variable = e10
rank_two_tensor = total_strain
index_i = 1
index_j = 0
[../]
[./e11]
type = RankTwoAux
variable = e11
rank_two_tensor = total_strain
index_i = 1
index_j = 1
[../]
[]
[GlobalParams]
derivative_order = 2
enable_jit = true
displacements = 'u_x u_y u_z'
block = 0
[]
[Kernels]
[./TensorMechanics]
[../]
# Cahn-Hilliard kernels
[./c_dot]
type = CoupledTimeDerivative
variable = w
v = c
block = 0
[../]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
block = 0
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
block = 0
[../]
[]
[ScalarKernels]
[./global_strain]
type = GlobalStrain
variable = global_strain
global_strain_uo = global_strain_uo
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y z'
variable = 'c w u_x u_y u_z'
[../]
[../]
# fix center point location
[./centerfix_x]
type = DirichletBC
boundary = 100
variable = u_x
value = 0
[../]
[./centerfix_y]
type = DirichletBC
boundary = 100
variable = u_y
value = 0
[../]
[./centerfix_z]
type = DirichletBC
boundary = 100
variable = u_z
value = 0
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '0.2 0.01 '
[../]
[./shear1]
type = GenericConstantRankTwoTensor
tensor_values = '0 0 0 0.5 0.5 0.5'
tensor_name = shear1
[../]
[./shear2]
type = GenericConstantRankTwoTensor
tensor_values = '0 0 0 -0.5 -0.5 -0.5'
tensor_name = shear2
[../]
[./expand3]
type = GenericConstantRankTwoTensor
tensor_values = '1 1 1 0 0 0'
tensor_name = expand3
[../]
[./weight1]
type = DerivativeParsedMaterial
expression = '0.3*c^2'
property_name = weight1
coupled_variables = c
[../]
[./weight2]
type = DerivativeParsedMaterial
expression = '0.3*(1-c)^2'
property_name = weight2
coupled_variables = c
[../]
[./weight3]
type = DerivativeParsedMaterial
expression = '4*(0.5-c)^2'
property_name = weight3
coupled_variables = c
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1'
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
global_strain = global_strain
eigenstrain_names = eigenstrain
[../]
[./eigenstrain]
type = CompositeEigenstrain
tensors = 'shear1 shear2 expand3'
weights = 'weight1 weight2 weight3'
args = c
eigenstrain_name = eigenstrain
[../]
[./global_strain]
type = ComputeGlobalStrain
scalar_global_strain = global_strain
global_strain_uo = global_strain_uo
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
# chemical free energies
[./chemical_free_energy]
type = DerivativeParsedMaterial
property_name = Fc
expression = '4*c^2*(1-c)^2'
coupled_variables = 'c'
outputs = exodus
output_properties = Fc
[../]
# elastic free energies
[./elastic_free_energy]
type = ElasticEnergyMaterial
f_name = Fe
args = 'c'
outputs = exodus
output_properties = Fe
[../]
# free energy (chemical + elastic)
[./free_energy]
type = DerivativeSumMaterial
block = 0
property_name = F
sum_materials = 'Fc Fe'
coupled_variables = 'c'
[../]
[]
[UserObjects]
[./global_strain_uo]
type = GlobalStrainUserObject
execute_on = 'Initial Linear Nonlinear'
[../]
[]
[Postprocessors]
[./total_free_energy]
type = ElementIntegralVariablePostprocessor
execute_on = 'initial TIMESTEP_END'
variable = local_energy
[../]
[./total_solute]
type = ElementIntegralVariablePostprocessor
execute_on = 'initial TIMESTEP_END'
variable = c
[../]
[./min]
type = ElementExtremeValue
execute_on = 'initial TIMESTEP_END'
value_type = min
variable = c
[../]
[./max]
type = ElementExtremeValue
execute_on = 'initial TIMESTEP_END'
value_type = max
variable = c
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'PJFNK'
line_search = basic
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
l_max_its = 30
nl_max_its = 12
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-10
start_time = 0.0
end_time = 2.0
[./TimeStepper]
type = IterationAdaptiveDT
dt = 0.01
growth_factor = 1.5
cutback_factor = 0.8
optimal_iterations = 9
iteration_window = 2
[../]
[]
[Outputs]
execute_on = 'timestep_end'
print_linear_residuals = false
exodus = true
[./table]
type = CSV
delimiter = ' '
[../]
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_stab_jac_test.i)
[GlobalParams]
order = SECOND
integrate_p_by_parts = true
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
xmin = 0
xmax = 1.1
ymin = -1.1
ymax = 1.1
elem_type = QUAD9
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Problem]
coord_type = RZ
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = NEWTON
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1.1
[]
[Variables]
[./velocity]
family = LAGRANGE_VEC
[../]
[./p]
order = FIRST
[../]
[]
# Need to set a non-zero initial condition because we have a velocity norm in
# the denominator for the tau coefficient of the stabilization term
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
variable = velocity
[]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[mass_pspg]
type = INSADMassPSPG
variable = p
[]
[momentum_time]
type = INSADMomentumTimeDerivative
variable = velocity
[]
[momentum_advection]
type = INSADMomentumAdvection
variable = velocity
[]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
[../]
[momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[]
[]
[BCs]
[inlet]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom'
function_x = 0
function_y = 1
[../]
[wall]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'right'
function_x = 0
function_y = 0
[]
[axis]
type = ADVectorFunctionDirichletBC
variable = velocity
boundary = 'left'
set_y_comp = false
function_x = 0
[]
[outlet]
type = INSADMomentumNoBCBC
variable = velocity
pressure = p
boundary = 'top'
[]
# When the NoBCBC is applied on the outlet boundary then there is nothing
# constraining the pressure. Thus we must pin the pressure somewhere to ensure
# that the problem is not singular. If the below BC is not applied then
# -pc_type svd -pc_svd_monitor reveals a singular value
[p_corner]
type = DirichletBC
boundary = pinned_node
value = 0
variable = p
[]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1.1 1.1'
[../]
[ins_mat]
type = INSADTauMaterial
velocity = velocity
pressure = p
[]
[]
(modules/contact/test/tests/cohesive_zone_model/bilinear_mixed_compare.i)
[Mesh]
[base]
type = GeneratedMeshGenerator
dim = 2
xmax = 1.0
ymax = 1
xmin = -0.0
nx = 1
ny = 1
[]
[rename_base]
type = RenameBoundaryGenerator
input = base
old_boundary = 'top bottom left right'
new_boundary = 'top_base bottom_base left_base right_base'
[]
[base_id]
type = SubdomainIDGenerator
input = rename_base
subdomain_id = 1
[]
[top]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymin = 1
ymax = 2
nx = 1
ny = 1
[]
[rename_top]
type = RenameBoundaryGenerator
input = top
old_boundary = 'top bottom left right'
new_boundary = '100 101 102 103'
[]
[top_id]
type = SubdomainIDGenerator
input = rename_top
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'base_id top_id'
[]
[top_node]
type = ExtraNodesetGenerator
coord = '0 2 0'
input = combined
new_boundary = top_node
[]
[bottom_node]
type = ExtraNodesetGenerator
coord = '-0.0 0 0'
input = top_node
new_boundary = bottom_node
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10001
new_block_name = 'secondary_lower'
sidesets = 'top_base'
input = bottom_node
[]
[primary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10000
sidesets = '101'
new_block_name = 'primary_lower'
input = secondary
[]
patch_update_strategy = auto
patch_size = 20
allow_renumbering = false
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Modules]
[TensorMechanics]
[Master]
generate_output = 'stress_yy vonmises_stress stress_xy'
[all]
strain = FINITE
add_variables = true
use_automatic_differentiation = true
decomposition_method = TaylorExpansion
generate_output = 'vonmises_stress stress_yy stress_xy'
block = '1 2'
[]
[]
[]
[]
[BCs]
[fix_x]
type = DirichletBC
preset = true
value = 0.0
boundary = bottom_node
variable = disp_x
[]
[fix_top]
type = DirichletBC
preset = true
boundary = 100
variable = disp_x
value = 0
[]
[top]
type = FunctionDirichletBC
boundary = 100
variable = disp_y
function = 'if(t<=0.3,t,if(t<=0.6,0.3-(t-0.3),0.6-t))'
preset = true
[]
[bottom]
type = DirichletBC
boundary = bottom_base
variable = disp_y
value = 0
preset = true
[]
[]
[Materials]
[stress]
type = ADComputeFiniteStrainElasticStress
block = '1 2'
[]
[elasticity_tensor]
type = ADComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '1.684e5 0.176e5 0.176e5 1.684e5 0.176e5 1.684e5 0.754e5 0.754e5 0.754e5'
block = '1 2'
[]
[]
[Postprocessors]
[stress_yy]
type = ElementExtremeValue
variable = stress_yy
value_type = max
block = '1 2'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
# petsc_options = '-pc_svd_monitor -ksp_monitor_singular_values'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'svd superlu_dist'
automatic_scaling = true
l_max_its = 2
l_tol = 1e-14
nl_max_its = 150
nl_rel_tol = 1e-14
nl_abs_tol = 1e-12
start_time = 0.0
dt = 0.01
end_time = 0.85
dtmin = 0.01
[]
[Outputs]
exodus = true
csv = true
[]
[UserObjects]
[czm_uo]
type = BilinearMixedModeCohesiveZoneModel
primary_boundary = 101
secondary_boundary = 'top_base'
primary_subdomain = 10000
secondary_subdomain = 10001
correct_edge_dropping = true
disp_x = disp_x
disp_y = disp_y
friction_coefficient = 0.0 # with 2.0 works
secondary_variable = disp_x
penalty = 0e6
penalty_friction = 0e4
use_physical_gap = true
# bilinear parameters
normal_strength = 1e4
shear_strength = 1e3
penalty_stiffness = 1e6
power_law_parameter = 2.2
viscosity = 1.0e-3
GI_c = 1e3
GII_c = 1e2
displacements = 'disp_x disp_y'
[]
[]
[Constraints]
[c_x]
type = MortarGenericTraction
primary_boundary = 101
secondary_boundary = 'top_base'
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
cohesive_zone_uo = czm_uo
[]
[c_y]
type = MortarGenericTraction
primary_boundary = 101
secondary_boundary = 'top_base'
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
cohesive_zone_uo = czm_uo
[]
[]
(modules/solid_mechanics/test/tests/ad_anisotropic_creep/3d_bar_orthotropic_90deg_rotation_ad_creep_z.i)
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
xmin = 0
xmax = 2
ymin = 0
ymax = 10
zmin = 0
zmax = 2
nx = 1
ny = 1
nz = 1
elem_type = HEX8
[]
[corner]
type = ExtraNodesetGenerator
new_boundary = 101
coord = '0 0 0'
input = generated_mesh
[]
[side]
type = ExtraNodesetGenerator
new_boundary = 102
coord = '2 0 0'
input = corner
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
volumetric_locking_correction = true
use_automatic_differentiation = true
generate_output = 'elastic_strain_xx stress_xx creep_strain_xx'
[]
[]
[Materials]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "trial_creep"
max_iterations = 50
absolute_tolerance = 1e-18
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
hill_constants = "0.5 1.0 0.5 1.5 1.5 1.5"
use_large_rotation = true
[]
[trial_creep]
type = ADHillCreepStressUpdate
coefficient = 5e-14
n_exponent = 10
m_exponent = 0
activation_energy = 0
max_inelastic_increment = 0.00003
absolute_tolerance = 1e-18
relative_tolerance = 1e-18
# Force it to not use integration error
max_integration_error = 100.0
use_transformation = true
[]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 500
poissons_ratio = 0.0
[]
[]
[BCs]
[fix_z]
type = ADDirichletBC
variable = disp_z
boundary = bottom
value = 0
[]
[rot_y]
type = DisplacementAboutAxis
boundary = bottom
function = t
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 1
variable = disp_y
[]
#
[rot_x]
type = DisplacementAboutAxis
boundary = bottom
function = t
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 0
variable = disp_x
[]
[rot_y90]
type = DisplacementAboutAxis
boundary = bottom
function = 90
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 1
variable = disp_y
[]
#
[rot_x90]
type = DisplacementAboutAxis
boundary = bottom
function = 90
angle_units = degrees
axis_origin = '0. 0. 0.'
axis_direction = '0. 0. 1.'
component = 0
variable = disp_x
[]
[press]
boundary = top
function = '-1.0*(t-90)*0.1'
use_displaced_mesh = true
displacements = 'disp_x disp_y disp_z'
type = Pressure
variable = disp_x
[]
[]
[Postprocessors]
[creep_strain_xx]
type = ADElementAverageMaterialProperty
mat_prop = creep_strain_xx
[]
[]
[Controls]
[c1]
type = TimePeriod
enable_objects = 'BCs::rot_x BCs::rot_y'
disable_objects = 'BCs::rot_x90 BCs::rot_y90 BCs::press'
start_time = '0'
end_time = '90'
[]
[c190plus]
type = TimePeriod
enable_objects = 'BCs::rot_x90 BCs::rot_y90 BCs::press'
disable_objects = 'BCs::rot_x BCs::rot_y '
start_time = '90'
end_time = '390'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-ksp_gmres_restart'
petsc_options_value = '101'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
nl_max_its = 50
automatic_scaling = true
l_tol = 1e-4
l_max_its = 50
start_time = 0.0
dt = 0.1
dtmin = 0.1
num_steps = 1200
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = false
csv = true
[]
(modules/solid_mechanics/test/tests/uel/small_test.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
xmax = 10
ymax = 3
elem_type = TRI3
[]
[pin]
type = ExtraNodesetGenerator
nodes = 106
new_boundary = pin
input = gen
[]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[BCs]
[left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = pin
value = 0
[]
inactive = 'right_dirichlet'
[right_neumann]
type = FunctionNeumannBC
variable = disp_x
function = t
boundary = right
[]
[right_dirichlet]
type = FunctionDirichletBC
variable = disp_x
function = t/10
boundary = right
[]
[]
[UserObjects]
[uel]
type = AbaqusUserElement
variables = 'disp_x disp_y'
plugin = ../../../examples/uel_tri_tests/uel
use_displaced_mesh = false
num_state_vars = 6
constant_properties = '100 0.3' # E nu
extra_vector_tags = 'kernel_residual'
[]
[]
[Problem]
kernel_coverage_check = false
extra_tag_vectors = 'kernel_residual'
[]
[AuxVariables]
[res_x]
[]
[res_y]
[]
[]
[AuxKernels]
[res_x]
type = TagVectorAux
variable = res_x
v = disp_x
vector_tag = kernel_residual
[]
[res_y]
type = TagVectorAux
variable = res_y
v = disp_y
vector_tag = kernel_residual
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
dt = 1
num_steps = 15
[]
[Postprocessors]
[delta_l]
type = SideAverageValue
variable = disp_x
boundary = right
execute_on = 'INITIAL TIMESTEP_END'
[]
[V]
type = ElementIntegralMaterialProperty
mat_prop = 1
use_displaced_mesh = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/combined/test/tests/optimization/optimization_density_update/top_opt_2d.i)
vol_frac = 0.4
E0 = 1e5
Emin = 1e-4
power = 2
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 20
xmin = 0
xmax = 20
ymin = 0
ymax = 10
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = pull
nodes = 0
[]
[]
[AuxVariables]
[sensitivity]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[AuxKernel]
type = MaterialRealAux
variable = sensitivity
property = sensitivity
execute_on = LINEAR
[]
[]
[compliance]
family = MONOMIAL
order = CONSTANT
[]
[Dc]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = ${vol_frac}
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_y
boundary = right
value = 0.0
[]
[]
[NodalKernels]
[pull]
type = NodalGravity
variable = disp_y
boundary = pull
gravity_value = -1
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${E0}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
incremental = false
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[rad_avg]
type = RadialAverage
radius = 0.5
weights = constant
prop_name = sensitivity
execute_on = TIMESTEP_END
force_preaux = true
execution_order_group = -1
[]
[update]
type = DensityUpdate
density_sensitivity = Dc
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
[]
[calc_sense]
type = SensitivityFilter
density_sensitivity = Dc
design_density = mat_den
filter_UO = rad_avg
execute_on = TIMESTEP_END
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type '
petsc_options_value = 'lu'
nl_abs_tol = 1e-10
start_time = 0.0
dt = 1.0
num_steps = 50
[]
[Outputs]
[out]
type = Exodus
time_step_interval = 10
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/boussinesq/benchmark/benchmark.i)
rayleigh=1e3
hot_temp=${rayleigh}
temp_ref=${fparse hot_temp / 2.}
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 100
[]
[./bottom_left]
type = ExtraNodesetGenerator
new_boundary = corner
coord = '0 0'
input = gen
[../]
[]
[Preconditioning]
[./Newton_SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -ksp_gmres_restart'
petsc_options_value = 'bjacobi lu NONZERO 200'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[out]
type = Exodus
[]
[]
[Variables]
[velocity]
family = LAGRANGE_VEC
[]
[p][]
[temp]
initial_condition = 340
scaling = 1e-4
[]
[]
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
variable = velocity
[]
[]
[BCs]
[./velocity_dirichlet]
type = VectorDirichletBC
boundary = 'left right bottom top'
variable = velocity
# The third entry is to satisfy RealVectorValue
values = '0 0 0'
[../]
# Even though we are integrating by parts, because there are no integrated
# boundary conditions on the velocity p doesn't appear in the system of
# equations. Thus we must pin the pressure somewhere in order to ensure a
# unique solution
[./p_zero]
type = DirichletBC
boundary = corner
variable = p
value = 0
[../]
[./hot]
type = DirichletBC
variable = temp
boundary = left
value = ${hot_temp}
[../]
[./cold]
type = DirichletBC
variable = temp
boundary = right
value = 0
[../]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[mass_pspg]
type = INSADMassPSPG
variable = p
[]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[momentum_advection]
type = INSADMomentumAdvection
variable = velocity
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
[]
[./buoyancy]
type = INSADBoussinesqBodyForce
variable = velocity
temperature = temp
gravity = '0 -1 0'
[../]
[./gravity]
type = INSADGravityForce
variable = velocity
gravity = '0 -1 0'
[../]
[supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[]
[temp_advection]
type = INSADEnergyAdvection
variable = temp
[]
[temp_conduction]
type = ADHeatConduction
variable = temp
thermal_conductivity = 'k'
[../]
[temp_supg]
type = INSADEnergySUPG
variable = temp
velocity = velocity
[]
[]
[Materials]
[./ad_const]
type = ADGenericConstantMaterial
# alpha = coefficient of thermal expansion where rho = rho0 -alpha * rho0 * delta T
prop_names = 'mu rho alpha k cp'
prop_values = '1 1 1 1 1'
[../]
[./const]
type = GenericConstantMaterial
prop_names = 'temp_ref'
prop_values = '${temp_ref}'
[../]
[ins_mat]
type = INSADStabilized3Eqn
velocity = velocity
pressure = p
temperature = temp
[]
[]
(test/tests/mortar/ad_periodic_segmental_constraint/periodic_simple2d.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -1.0
xmax = 1.0
ymin = -1.0
ymax = 1.0
nx = 2
ny = 2
elem_type = QUAD9
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3'
new_boundary = '10 11 12 13'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[left]
type = LowerDBlockFromSidesetGenerator
input = left_block_id
sidesets = '13'
new_block_id = '10003'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '11'
new_block_id = '10001'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_top'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = top
[]
[]
[Variables]
[u]
order = SECOND
family = LAGRANGE
[]
[epsilon]
order = SECOND
family = SCALAR
[]
[./lm1]
order = FIRST
family = LAGRANGE
block = secondary_left
[../]
[./lm2]
order = FIRST
family = LAGRANGE
block = secondary_bottom
[../]
[]
[AuxVariables]
[sigma]
order = SECOND
family = SCALAR
[]
[]
[AuxScalarKernels]
[sigma]
type = FunctionScalarAux
variable = sigma
function = '1 2'
execute_on = initial #timestep_end
[]
[]
[Kernels]
[diff1]
type = Diffusion
variable = u
block = 1
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = EqualValueConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
variable = lm1
correct_edge_dropping = true
[]
[periodiclr]
type = ADPeriodicSegmentalConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
epsilon = epsilon
sigma = sigma
variable = lm1
correct_edge_dropping = true
[]
[mortarbt]
type = EqualValueConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
variable = lm2
correct_edge_dropping = true
[]
[periodicbt]
type = ADPeriodicSegmentalConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
epsilon = epsilon
sigma = sigma
variable = lm2
correct_edge_dropping = true
[]
[]
[Preconditioning]
[smp]
full = true
type = SMP
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
solve_type = NEWTON
[]
[Outputs]
# exodus = true
csv = true
[]
(modules/porous_flow/examples/tidal/atm_tides_open_hole.i)
# A 100m x 10m "slab" of height 100m is subjected to cyclic pressure at its top
# Assumptions:
# the boundaries are impermeable, except the top boundary
# only vertical displacement is allowed
# the atmospheric pressure sets the total stress at the top of the model
# at the slab left-hand side there is a borehole that taps into the base of the slab.
[Mesh]
[the_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 1
nz = 10
xmin = 0
xmax = 100
ymin = -5
ymax = 5
zmin = -100
zmax = 0
[]
[bh_back]
type = ExtraNodesetGenerator
coord = '0 -5 -100'
input = the_mesh
new_boundary = 11
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
PorousFlowDictator = dictator
block = 0
biot_coefficient = 0.6
multiply_by_density = false
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[porepressure]
scaling = 1E11
[]
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = '-10000*z' # this is only approximately correct
[]
[]
[Functions]
[ini_stress_zz]
type = ParsedFunction
expression = '(25000 - 0.6*10000)*z' # remember this is effective stress
[]
[cyclic_porepressure]
type = ParsedFunction
expression = 'if(t>0,5000 * sin(2 * pi * t / 3600.0 / 24.0),0)'
[]
[cyclic_porepressure_at_depth]
type = ParsedFunction
expression = '-10000*z + if(t>0,5000 * sin(2 * pi * t / 3600.0 / 24.0),0)'
[]
[neg_cyclic_porepressure]
type = ParsedFunction
expression = '-if(t>0,5000 * sin(2 * pi * t / 3600.0 / 24.0),0)'
[]
[]
[BCs]
# zmin is called 'back'
# zmax is called 'front'
# ymin is called 'bottom'
# ymax is called 'top'
# xmin is called 'left'
# xmax is called 'right'
[no_x_disp]
type = DirichletBC
variable = disp_x
value = 0
boundary = 'bottom top' # because of 1-element meshing, this fixes u_x=0 everywhere
[]
[no_y_disp]
type = DirichletBC
variable = disp_y
value = 0
boundary = 'bottom top' # because of 1-element meshing, this fixes u_y=0 everywhere
[]
[no_z_disp_at_bottom]
type = DirichletBC
variable = disp_z
value = 0
boundary = back
[]
[pp]
type = FunctionDirichletBC
variable = porepressure
function = cyclic_porepressure
boundary = front
[]
[pp_downhole]
type = FunctionDirichletBC
variable = porepressure
function = cyclic_porepressure_at_depth
boundary = 11
[]
[total_stress_at_top]
type = FunctionNeumannBC
variable = disp_z
function = neg_cyclic_porepressure
boundary = front
[]
[]
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 0.0
bulk_modulus = 2E9
viscosity = 1E-3
density0 = 1000.0
[]
[]
[PorousFlowBasicTHM]
coupling_type = HydroMechanical
displacements = 'disp_x disp_y disp_z'
porepressure = porepressure
gravity = '0 0 -10'
fp = the_simple_fluid
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
bulk_modulus = 10.0E9 # drained bulk modulus
poissons_ratio = 0.25
[]
[strain]
type = ComputeSmallStrain
eigenstrain_names = ini_stress
[]
[stress]
type = ComputeLinearElasticStress
[]
[ini_stress]
type = ComputeEigenstrainFromInitialStress
initial_stress = '0 0 0 0 0 0 0 0 ini_stress_zz'
eigenstrain_name = ini_stress
[]
[porosity]
type = PorousFlowPorosityConst # only the initial value of this is ever used
porosity = 0.1
[]
[biot_modulus]
type = PorousFlowConstantBiotModulus
solid_bulk_compliance = 1E-10
fluid_bulk_modulus = 2E9
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-14 0 0 0 1E-14 0 0 0 1E-14'
[]
[density]
type = GenericConstantMaterial
prop_names = density
prop_values = 2500.0
[]
[]
[Postprocessors]
[p0_0]
type = PointValue
outputs = csv
point = '0 0 0'
variable = porepressure
[]
[p100_0]
type = PointValue
outputs = csv
point = '100 0 0'
variable = porepressure
[]
[p0_100]
type = PointValue
outputs = csv
point = '0 0 -100'
variable = porepressure
[]
[p100_100]
type = PointValue
outputs = csv
point = '100 0 -100'
variable = porepressure
[]
[uz0]
type = PointValue
outputs = csv
point = '0 0 0'
variable = disp_z
[]
[uz100]
type = PointValue
outputs = csv
point = '100 0 0'
variable = disp_z
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = -3600
dt = 3600
end_time = 172800
nl_rel_tol = 1E-10
nl_abs_tol = 1E-5
[]
[Outputs]
print_linear_residuals = false
csv = true
[]
(modules/navier_stokes/test/tests/finite_volume/ins/lid-driven/transient-lid-driven-with-energy.i)
mu = 1
rho = 1
k = .01
cp = 1
velocity_interp_method = 'rc'
advected_interp_method = 'average'
[GlobalParams]
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
v = v
pressure = pressure
[]
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 32
ny = 32
[]
[pin]
type = ExtraNodesetGenerator
input = gen
new_boundary = 'pin'
nodes = '0'
[]
[]
[Variables]
[u]
type = INSFVVelocityVariable
[]
[v]
type = INSFVVelocityVariable
[]
[pressure]
type = INSFVPressureVariable
[]
[T]
type = INSFVEnergyVariable
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[ICs]
[T]
type = ConstantIC
variable = T
value = 1
[]
[]
[AuxVariables]
[U]
order = CONSTANT
family = MONOMIAL
fv = true
[]
[]
[AuxKernels]
[mag]
type = VectorMagnitudeAux
variable = U
x = u
y = v
[]
[]
[FVKernels]
[mass]
type = INSFVMassAdvection
variable = pressure
advected_interp_method = ${advected_interp_method}
velocity_interp_method = ${velocity_interp_method}
rho = ${rho}
[]
[mean_zero_pressure]
type = FVIntegralValueConstraint
variable = pressure
lambda = lambda
[]
[u_time]
type = INSFVMomentumTimeDerivative
variable = 'u'
rho = ${rho}
momentum_component = 'x'
[]
[u_advection]
type = INSFVMomentumAdvection
variable = u
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_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_time]
type = INSFVMomentumTimeDerivative
variable = v
rho = ${rho}
momentum_component = 'y'
[]
[v_advection]
type = INSFVMomentumAdvection
variable = v
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
rho = ${rho}
momentum_component = 'y'
[]
[v_viscosity]
type = INSFVMomentumDiffusion
variable = v
mu = ${mu}
momentum_component = 'y'
[]
[v_pressure]
type = INSFVMomentumPressure
variable = v
momentum_component = 'y'
pressure = pressure
[]
[temp_time]
type = INSFVEnergyTimeDerivative
variable = T
rho = ${rho}
dh_dt = dh_dt
[]
[temp_conduction]
type = FVDiffusion
coeff = 'k'
variable = T
[]
[temp_advection]
type = INSFVEnergyAdvection
variable = T
velocity_interp_method = ${velocity_interp_method}
advected_interp_method = ${advected_interp_method}
[]
[]
[FVBCs]
[top_x]
type = INSFVNoSlipWallBC
variable = u
boundary = 'top'
function = 'lid_function'
[]
[no_slip_x]
type = INSFVNoSlipWallBC
variable = u
boundary = 'left right bottom'
function = 0
[]
[no_slip_y]
type = INSFVNoSlipWallBC
variable = v
boundary = 'left right top bottom'
function = 0
[]
[T_hot]
type = FVDirichletBC
variable = T
boundary = 'bottom'
value = 1
[]
[T_cold]
type = FVDirichletBC
variable = T
boundary = 'top'
value = 0
[]
[]
[FunctorMaterials]
[functor_constants]
type = ADGenericFunctorMaterial
prop_names = 'cp k'
prop_values = '${cp} ${k}'
[]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
temperature = 'T'
rho = ${rho}
[]
[]
[Functions]
[lid_function]
type = ParsedFunction
expression = '4*x*(1-x)'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/cohesive_zone_model/bilinear_mixed_scale_strength.i)
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymax = 2
nx = 5
ny = 10
[]
[block1]
type = SubdomainBoundingBoxGenerator
input = 'msh'
bottom_left = '0 0 0'
top_right = '1 1 0'
block_id = 1
block_name = 'block1'
[]
[block2]
type = SubdomainBoundingBoxGenerator
input = 'block1'
bottom_left = '0 1 0'
top_right = '1 2 0'
block_id = 2
block_name = 'block2'
[]
[split]
type = BreakMeshByBlockGenerator
input = block2
[]
[top_node]
type = ExtraNodesetGenerator
coord = '0 2 0'
input = split
new_boundary = top_node
[]
[bottom_node]
type = ExtraNodesetGenerator
coord = '0 0 0'
input = top_node
new_boundary = bottom_node
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
generate_output = 'stress_yy'
[all]
strain = FINITE
add_variables = true
use_automatic_differentiation = true
decomposition_method = TaylorExpansion
[]
[]
[]
[]
[BCs]
[fix_x]
type = DirichletBC
preset = true
value = 0.0
boundary = bottom_node
variable = disp_x
[]
[fix_top]
type = DirichletBC
preset = true
boundary = top
variable = disp_x
value = 0
[]
[top]
type = FunctionDirichletBC
boundary = top
variable = disp_y
function = 'if(t<=0.3,t,if(t<=0.6,0.3-(t-0.3),0.6-t))'
preset = true
[]
[bottom]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0
preset = true
[]
[]
[AuxVariables]
[mode_mixity_ratio]
order = CONSTANT
family = MONOMIAL
[]
[damage]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[mode_mixity_ratio]
type = MaterialRealAux
variable = mode_mixity_ratio
property = mode_mixity_ratio
execute_on = timestep_end
boundary = interface
[]
[damage]
type = MaterialRealAux
variable = damage
property = damage
execute_on = timestep_end
boundary = interface
[]
[]
[Physics/SolidMechanics/CohesiveZone]
[czm_ik]
boundary = 'interface'
[]
[]
[Materials]
[stress]
type = ADComputeFiniteStrainElasticStress
[]
[elasticity_tensor]
type = ADComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '1.684e5 0.176e5 0.176e5 1.684e5 0.176e5 1.684e5 0.754e5 0.754e5 0.754e5'
[]
[normal_strength]
type = GenericFunctionMaterial
prop_names = 'N'
prop_values = 'if(x<0.5,1,100)*1e4'
[]
[czm]
type = BiLinearMixedModeTraction
boundary = 'interface'
penalty_stiffness = 1e6
GI_c = 1e3
GII_c = 1e2
normal_strength = N
shear_strength = 1e3
displacements = 'disp_x disp_y'
eta = 2.2
viscosity = 1e-3
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
line_search = none
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
l_max_its = 2
l_tol = 1e-14
nl_max_its = 30
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
start_time = 0.0
dt = 0.01
end_time = 0.05
dtmin = 0.01
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/ad_finite_strain_jacobian/3d_bar.i)
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
xmin = 0
xmax = 2
ymin = 0
ymax = 2
zmin = 0
zmax = 10
nx = 10
ny = 2
nz = 2
elem_type = HEX8
[]
[corner]
type = ExtraNodesetGenerator
new_boundary = 101
coord = '0 0 0'
input = generated_mesh
[]
[side]
type = ExtraNodesetGenerator
new_boundary = 102
coord = '2 0 0'
input = corner
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
use_finite_deform_jacobian = true
volumetric_locking_correction = false
use_automatic_differentiation = true
[]
[]
[Materials]
[stress]
type = ADComputeFiniteStrainElasticStress
[]
[elasticity_tensor]
type = ADComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '1.684e5 0.176e5 0.176e5 1.684e5 0.176e5 1.684e5 0.754e5 0.754e5 0.754e5'
[]
[]
[BCs]
[fix_corner_x]
type = ADDirichletBC
variable = disp_x
boundary = 101
value = 0
[]
[fix_corner_y]
type = ADDirichletBC
variable = disp_y
boundary = 101
value = 0
[]
[fix_side_y]
type = ADDirichletBC
variable = disp_y
boundary = 102
value = 0
[]
[fix_z]
type = ADDirichletBC
variable = disp_z
boundary = back
value = 0
[]
[move_z]
type = ADFunctionDirichletBC
variable = disp_z
boundary = front
function = 't'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-10
nl_max_its = 10
l_tol = 1e-4
l_max_its = 50
dt = 0.2
dtmin = 0.2
num_steps = 2
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/block-restriction/two-mats-two-eqn-sets.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 2
ymin = 0
ymax = 1
nx = 16
ny = 8
elem_type = QUAD9
[]
[./corner_node_0]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node_0'
coord = '0 0 0'
input = gen
[../]
[./corner_node_1]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node_1'
coord = '1 0 0'
input = corner_node_0
[../]
[./subdomain1]
input = corner_node_1
type = SubdomainBoundingBoxGenerator
bottom_left = '1 0 0'
top_right = '2 1 0'
block_id = 1
[../]
[./break_boundary]
input = subdomain1
type = BreakBoundaryOnSubdomainGenerator
[../]
[./interface0]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
primary_block = '0'
paired_block = '1'
new_boundary = 'interface0'
[../]
[./interface1]
type = SideSetsBetweenSubdomainsGenerator
input = interface0
primary_block = '1'
paired_block = '0'
new_boundary = 'interface1'
[../]
[]
[Variables]
[velocity0]
order = SECOND
family = LAGRANGE_VEC
block = 0
[]
[T0]
order = SECOND
[InitialCondition]
type = ConstantIC
value = 1.0
[]
block = 0
[]
[p0]
block = 0
[]
[velocity1]
order = SECOND
family = LAGRANGE_VEC
block = 1
[]
[T1]
order = SECOND
[InitialCondition]
type = ConstantIC
value = 1.0
[]
block = 1
[]
[p1]
block = 1
[]
[]
[Kernels]
[./mass0]
type = INSADMass
variable = p0
block = 0
[../]
[./momentum_time0]
type = INSADMomentumTimeDerivative
variable = velocity0
block = 0
[../]
[./momentum_convection0]
type = INSADMomentumAdvection
variable = velocity0
block = 0
[../]
[./momentum_viscous0]
type = INSADMomentumViscous
variable = velocity0
block = 0
[../]
[./momentum_pressure0]
type = INSADMomentumPressure
variable = velocity0
pressure = p0
integrate_p_by_parts = true
block = 0
[../]
[./temperature_time0]
type = INSADHeatConductionTimeDerivative
variable = T0
block = 0
[../]
[./temperature_advection0]
type = INSADEnergyAdvection
variable = T0
block = 0
[../]
[./temperature_conduction0]
type = ADHeatConduction
variable = T0
thermal_conductivity = 'k'
block = 0
[../]
[./mass1]
type = INSADMass
variable = p1
block = 1
[../]
[./momentum_time1]
type = INSADMomentumTimeDerivative
variable = velocity1
block = 1
[../]
[./momentum_convection1]
type = INSADMomentumAdvection
variable = velocity1
block = 1
[../]
[./momentum_viscous1]
type = INSADMomentumViscous
variable = velocity1
block = 1
[../]
[./momentum_pressure1]
type = INSADMomentumPressure
variable = velocity1
pressure = p1
integrate_p_by_parts = true
block = 1
[../]
[./temperature_time1]
type = INSADHeatConductionTimeDerivative
variable = T1
block = 1
[../]
[./temperature_advection1]
type = INSADEnergyAdvection
variable = T1
block = 1
[../]
[./temperature_conduction1]
type = ADHeatConduction
variable = T1
thermal_conductivity = 'k'
block = 1
[../]
[]
[BCs]
[./no_slip0]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'bottom_to_0 interface0 left'
[../]
[./lid0]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'top_to_0'
function_x = 'lid_function0'
[../]
[./T_hot0]
type = DirichletBC
variable = T0
boundary = 'bottom_to_0'
value = 1
[../]
[./T_cold0]
type = DirichletBC
variable = T0
boundary = 'top_to_0'
value = 0
[../]
[./pressure_pin0]
type = DirichletBC
variable = p0
boundary = 'pinned_node_0'
value = 0
[../]
[./no_slip1]
type = VectorFunctionDirichletBC
variable = velocity1
boundary = 'bottom_to_1 interface1 right'
[../]
[./lid1]
type = VectorFunctionDirichletBC
variable = velocity1
boundary = 'top_to_1'
function_x = 'lid_function1'
[../]
[./T_hot1]
type = DirichletBC
variable = T1
boundary = 'bottom_to_1'
value = 1
[../]
[./T_cold1]
type = DirichletBC
variable = T1
boundary = 'top_to_1'
value = 0
[../]
[./pressure_pin1]
type = DirichletBC
variable = p1
boundary = 'pinned_node_1'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat0]
type = INSAD3Eqn
velocity = velocity0
pressure = p0
temperature = T0
block = 0
[]
[ins_mat1]
type = INSAD3Eqn
velocity = velocity1
pressure = p1
temperature = T1
block = 1
[]
[]
[Functions]
# 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.
[./lid_function0]
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[./lid_function1]
type = ParsedFunction
expression = '4*(x-1)*(2-x)'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Transient
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_levels -sub_pc_factor_shift_type'
petsc_options_value = 'asm 2 ilu 4 NONZERO'
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
[]
(modules/navier_stokes/test/tests/finite_element/ins/velocity_channel/velocity_inletBC_no_parts.i)
# This input file tests outflow boundary conditions for the incompressible NS equations.
[GlobalParams]
gravity = '0 0 0'
integrate_p_by_parts = false
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 3.0
ymin = 0
ymax = 1.0
nx = 30
ny = 10
elem_type = QUAD9
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = top_right
coord = '3 1'
input = gen
[../]
[]
[Variables]
[./vel_x]
order = SECOND
family = LAGRANGE
[../]
[./vel_y]
order = SECOND
family = LAGRANGE
[../]
[./p]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./mass]
type = INSMass
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
[./x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./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 = 'top bottom'
value = 0.0
[../]
[./y_no_slip]
type = DirichletBC
variable = vel_y
boundary = 'left top bottom'
value = 0.0
[../]
[./x_inlet]
type = FunctionDirichletBC
variable = vel_x
boundary = 'left'
function = 'inlet_func'
[../]
[./p_corner]
# Since the pressure is not integrated by parts in this example,
# it is only specified up to a constant by the natural outflow BC.
# Therefore, we need to pin its value at a single location.
type = DirichletBC
boundary = top_right
value = 0
variable = p
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = NEWTON
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-ksp_gmres_restart -pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = '300 bjacobi ilu 4'
line_search = none
nl_rel_tol = 1e-12
nl_max_its = 6
l_tol = 1e-6
l_max_its = 300
[]
[Outputs]
[./out]
type = Exodus
[../]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * (y - 0.5)^2 + 1'
[../]
[]
(modules/combined/examples/optimization/2d_mbb.i)
vol_frac = 0.5
E0 = 1
Emin = 1e-8
power = 2
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 150
ny = 50
xmin = 0
xmax = 30
ymin = 0
ymax = 10
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = pull
nodes = 0
[]
[push]
type = ExtraNodesetGenerator
input = node
new_boundary = push
coord = '30 10 0'
[]
[]
[AuxVariables]
[Emin]
family = MONOMIAL
order = CONSTANT
initial_condition = ${Emin}
[]
[power]
family = MONOMIAL
order = CONSTANT
initial_condition = ${power}
[]
[E0]
family = MONOMIAL
order = CONSTANT
initial_condition = ${E0}
[]
[Dc]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = ${vol_frac}
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_y
boundary = pull
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[]
[NodalKernels]
[pull]
type = NodalGravity
variable = disp_y
boundary = push
gravity_value = -1
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'Emin mat_den power E0'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${E0}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
incremental = false
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[rad_avg]
type = RadialAverage
radius = 1.2
weights = linear
prop_name = sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
[update]
type = DensityUpdate
density_sensitivity = Dc
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
[]
[calc_sense]
type = SensitivityFilter
density_sensitivity = Dc
design_density = mat_den
filter_UO = rad_avg
execute_on = TIMESTEP_END
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-8
dt = 1.0
num_steps = 70
[]
[Outputs]
[out]
type = Exodus
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
(test/tests/mortar/periodic_segmental_constraint/penalty_periodic_aux.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -1.0
xmax = 1.0
ymin = -1.0
ymax = 1.0
nx = 2
ny = 2
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_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[left]
type = LowerDBlockFromSidesetGenerator
input = left_block_id
sidesets = '13'
new_block_id = '10003'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '11'
new_block_id = '10001'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_top'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = top
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[epsilon]
order = SECOND
family = SCALAR
[]
[sigma]
order = SECOND
family = SCALAR
[]
[]
[Kernels]
[diff1]
type = Diffusion
variable = u
block = 1
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = PenaltyEqualValueConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodiclr]
type = PenaltyPeriodicSegmentalConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[mortarbt]
type = PenaltyEqualValueConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodicbt]
type = PenaltyPeriodicSegmentalConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
csv = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/coupled-force/gravity-through-coupled-force.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./velocity]
family = LAGRANGE_VEC
[../]
[./p]
[../]
[u]
family = LAGRANGE_VEC
[]
[]
[AuxVariables]
[gravity]
family = LAGRANGE_VEC
[]
[]
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
variable = velocity
[]
[gravity]
type = VectorConstantIC
x_value = '0'
y_value = '-9.81'
variable = gravity
[]
[]
[Kernels]
inactive = 'momentum_coupled_forces_two_vars momentum_coupled_forces_two_funcs'
[./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_coupled_forces_var_and_func]
type = INSADMomentumCoupledForce
variable = velocity
coupled_vector_var = u
vector_function = 'vector_gravity_func'
[]
[momentum_coupled_forces_two_vars]
type = INSADMomentumCoupledForce
variable = velocity
coupled_vector_var = 'u gravity'
[]
[momentum_coupled_forces_two_funcs]
type = INSADMomentumCoupledForce
variable = velocity
vector_function = 'vector_func vector_gravity_func'
[]
[./momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[../]
[u_diff]
type = VectorDiffusion
variable = u
[]
[]
[BCs]
[./no_slip]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom right left top'
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[u_left]
type = VectorFunctionDirichletBC
variable = u
boundary = 'left'
function_x = 1
function_y = 1
[]
[u_right]
type = VectorFunctionDirichletBC
variable = u
boundary = 'right'
function_x = -1
function_y = -1
[]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[ins_mat]
type = INSADTauMaterial
velocity = velocity
pressure = p
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_factor_levels -ksp_gmres_restart'
petsc_options_value = 'asm 6 200'
line_search = 'none'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
[out]
type = Exodus
hide = 'gravity'
[]
[]
[Functions]
[vector_func]
type = ParsedVectorFunction
expression_x = '-2*x + 1'
expression_y = '-2*x + 1'
[]
[vector_gravity_func]
type = ParsedVectorFunction
expression_x = '0'
expression_y = '-9.81'
[]
[]
(test/tests/mortar/ad_periodic_segmental_constraint/penalty_periodic_simple3d.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 3
xmin = -3.0
xmax = 3.0
ymin = -3.0
ymax = 3.0
zmin = -3.0
zmax = 3.0
nx = 3
ny = 3
nz = 3
elem_type = HEX8
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3 4 5'
new_boundary = '10 11 12 13 14 15'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[left]
type = LowerDBlockFromSidesetGenerator
input = left_block_id
sidesets = '14'
new_block_id = '10004'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '15'
new_block_id = '10005'
new_block_name = 'primary_top'
[]
[back]
type = LowerDBlockFromSidesetGenerator
input = top
sidesets = '11'
new_block_id = '10001'
new_block_name = 'secondary_back'
[]
[front]
type = LowerDBlockFromSidesetGenerator
input = back
sidesets = '13'
new_block_id = '10003'
new_block_name = 'primary_front'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = front
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[epsilon]
order = THIRD
family = SCALAR
[]
[]
[AuxVariables]
[sigma]
order = THIRD
family = SCALAR
[]
[]
[AuxScalarKernels]
[sigma]
type = FunctionScalarAux
variable = sigma
function = '1 2 3'
execute_on = initial #timestep_end
[]
[]
[Kernels]
[diff1]
type = ADDiffusion
variable = u
block = 1
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = ADPenaltyEqualValueConstraint
primary_boundary = '12'
secondary_boundary = '14'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodiclr]
type = ADPenaltyPeriodicSegmentalConstraint
primary_boundary = '12'
secondary_boundary = '14'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[mortarbt]
type = ADPenaltyEqualValueConstraint
primary_boundary = '15'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodicbt]
type = ADPenaltyPeriodicSegmentalConstraint
primary_boundary = '15'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[mortarbf]
type = ADPenaltyEqualValueConstraint
primary_boundary = '13'
secondary_boundary = '11'
primary_subdomain = 'primary_front'
secondary_subdomain = 'secondary_back'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e2
[]
[periodicbf]
type = ADPenaltyPeriodicSegmentalConstraint
primary_boundary = '13'
secondary_boundary = '11'
primary_subdomain = 'primary_front'
secondary_subdomain = 'secondary_back'
secondary_variable = u
epsilon = epsilon
sigma = sigma
correct_edge_dropping = true
penalty_value = 1.e2
[]
[]
[Preconditioning]
[smp]
full = true
type = SMP
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
solve_type = NEWTON
[]
[Outputs]
# exodus = true
csv = true
[]
(modules/solid_mechanics/test/tests/anisotropic_plasticity/ad_aniso_plasticity_y.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
# Original verification nx = 2, ny = 10, nz = 2
nx = 2
ny = 10
nz = 2
xmin = 0.0
ymin = 0.0
zmin = 0.0
xmax = 1.0
ymax = 10.0
zmax = 1.0
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = '100'
nodes = '4 10'
input = gen
[]
[corner_node_2]
type = ExtraNodesetGenerator
new_boundary = '101'
nodes = '1 67'
input = corner_node
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[elastic_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[plasticity_strain_xx]
type = ADRankTwoAux
rank_two_tensor = trial_plasticity_plastic_strain
variable = plastic_strain_xx
index_i = 0
index_j = 0
[]
[plasticity_strain_xy]
type = ADRankTwoAux
rank_two_tensor = trial_plasticity_plastic_strain
variable = plastic_strain_xy
index_i = 0
index_j = 1
[]
[plasticity_strain_yy]
type = ADRankTwoAux
rank_two_tensor = trial_plasticity_plastic_strain
variable = plastic_strain_yy
index_i = 1
index_j = 1
[]
[elastic_strain_yy]
type = ADRankTwoAux
rank_two_tensor = elastic_strain
variable = elastic_strain_yy
index_i = 1
index_j = 1
[]
[sigma_yy]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1e1 1e8'
y = '0 -4e2 -4e2'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
use_automatic_differentiation = true
add_variables = true
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 70000
poissons_ratio = 0.25
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "trial_plasticity"
max_iterations = 50
absolute_tolerance = 1e-16
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
hill_constants = "0.5829856 0.364424 0.6342174 2.0691375 2.3492325 1.814589"
base_name = trial_plasticity
[]
[trial_plasticity]
type = ADHillPlasticityStressUpdate
hardening_constant = 2000.0
yield_stress = 0.001
absolute_tolerance = 1e-14
relative_tolerance = 1e-12
base_name = trial_plasticity
internal_solve_full_iteration_history = true
max_inelastic_increment = 2.0e-6
internal_solve_output_on = on_error
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = 101
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = 100
value = 0.0
[]
[Pressure]
[Side1]
boundary = top
function = pull
[]
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-11
nl_abs_tol = 1.0e-14
l_max_its = 90
num_steps = 25
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 30
iteration_window = 9
growth_factor = 1.05
cutback_factor = 0.5
timestep_limiting_postprocessor = matl_ts_min
dt = 1e-5
time_t = '0 3.2e-5 10'
time_dt = '1e-5 1.0e-7 1.0e-7'
[]
start_time = 0
automatic_scaling = true
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[num_lin]
type = NumLinearIterations
outputs = console
[]
[num_nonlin]
type = NumNonlinearIterations
outputs = console
[]
[plasticity_strain_yy]
type = ElementalVariableValue
variable = plastic_strain_yy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[elastic_strain_yy]
type = ElementalVariableValue
variable = elastic_strain_yy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[sigma_yy]
type = ElementalVariableValue
variable = stress_yy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/contact/test/tests/cohesive_zone_model/mortar_czm_analysis.i)
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymax = 1
nx = 5
ny = 5
boundary_name_prefix = bottom
[]
[msh_id]
type = SubdomainIDGenerator
input = msh
subdomain_id = 1
[]
[msh_two]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymin = 1
ymax = 2
nx = 5
ny = 5
boundary_name_prefix = top
boundary_id_offset = 10
[]
[msh_two_id]
type = SubdomainIDGenerator
input = msh_two
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'msh_id msh_two_id'
[]
[top_node]
type = ExtraNodesetGenerator
coord = '0 2 0'
input = combined
new_boundary = top_node
[]
[bottom_node]
type = ExtraNodesetGenerator
coord = '0 0 0'
input = top_node
new_boundary = bottom_node
[]
# Build subdomains
[secondary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10001
new_block_name = 'secondary_lower'
sidesets = 'bottom_top'
input = bottom_node
[]
[primary]
type = LowerDBlockFromSidesetGenerator
new_block_id = 10000
sidesets = 'top_bottom'
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Modules]
[TensorMechanics]
[Master]
generate_output = 'stress_yy'
[all]
strain = FINITE
add_variables = true
use_automatic_differentiation = true
decomposition_method = TaylorExpansion
block = '1 2'
[]
[]
[]
[]
[BCs]
[fix_x]
type = DirichletBC
preset = true
value = 0.0
boundary = bottom_node
variable = disp_x
[]
[lateral_top]
type = FunctionDirichletBC
boundary = top_top
variable = disp_x
function = 'if(t<=0.3,t,if(t<=0.6,0.3-(t-0.3),0.6-t))'
preset = true
[]
[top]
type = FunctionDirichletBC
boundary = top_top
variable = disp_y
function = 'if(t<=0.3,t,if(t<=0.6,0.3-(t-0.3),0.6-t))'
preset = true
[]
[bottom]
type = DirichletBC
boundary = bottom_bottom
variable = disp_y
value = 0
preset = true
[]
[]
[AuxVariables]
[mode_mixity_ratio]
[]
[damage]
[]
[local_normal_jump]
[]
[local_tangential_jump]
[]
[]
[AuxKernels]
[mode_mixity_ratio]
type = CohesiveZoneMortarUserObjectAux
variable = mode_mixity_ratio
user_object = czm_uo
cohesive_zone_quantity = mode_mixity_ratio
boundary = 'bottom_top'
[]
[cohesive_damage]
type = CohesiveZoneMortarUserObjectAux
variable = damage
user_object = czm_uo
cohesive_zone_quantity = cohesive_damage
boundary = 'bottom_top'
[]
[local_normal_jump]
type = CohesiveZoneMortarUserObjectAux
variable = local_normal_jump
user_object = czm_uo
cohesive_zone_quantity = local_normal_jump
boundary = 'bottom_top'
[]
[local_tangential_jump]
type = CohesiveZoneMortarUserObjectAux
variable = local_tangential_jump
user_object = czm_uo
cohesive_zone_quantity = local_tangential_jump
boundary = 'bottom_top'
[]
[]
[Materials]
[stress]
type = ADComputeFiniteStrainElasticStress
block = '1 2'
[]
[elasticity_tensor]
type = ADComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '1.684e5 0.176e5 0.176e5 1.684e5 0.176e5 1.684e5 0.754e5 0.754e5 0.754e5'
block = '1 2'
[]
[normal_strength]
type = GenericFunctionMaterial
prop_names = 'N'
prop_values = 'if(x<0.5,1,100)*1e4'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
line_search = none
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
l_max_its = 2
l_tol = 1e-14
nl_max_its = 30
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
start_time = 0.0
dt = 0.0005
end_time = 0.01
dtmin = 0.0001
[]
[Outputs]
exodus = true
[]
[UserObjects]
[czm_uo]
type = BilinearMixedModeCohesiveZoneModel
primary_boundary = 'top_bottom'
secondary_boundary = 'bottom_top'
primary_subdomain = 10000
secondary_subdomain = 10001
disp_x = disp_x
disp_y = disp_y
friction_coefficient = 0.1 # with 2.0 works
secondary_variable = disp_x
penalty = 0e6
penalty_friction = 1e4
use_physical_gap = true
correct_edge_dropping = true
normal_strength = N
shear_strength = 1e3
viscosity = 1e-3
penalty_stiffness = 1e6
mixed_mode_criterion = POWER_LAW
power_law_parameter = 2.2
GI_c = 1e3
GII_c = 1e2
displacements = 'disp_x disp_y'
[]
[]
[Constraints]
[x]
type = NormalMortarMechanicalContact
primary_boundary = 'top_bottom'
secondary_boundary = 'bottom_top'
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = czm_uo
correct_edge_dropping = true
[]
[y]
type = NormalMortarMechanicalContact
primary_boundary = 'top_bottom'
secondary_boundary = 'bottom_top'
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = czm_uo
correct_edge_dropping = true
[]
[c_x]
type = MortarGenericTraction
primary_boundary = 'top_bottom'
secondary_boundary = 'bottom_top'
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
cohesive_zone_uo = czm_uo
correct_edge_dropping = true
[]
[c_y]
type = MortarGenericTraction
primary_boundary = 'top_bottom'
secondary_boundary = 'bottom_top'
primary_subdomain = 10000
secondary_subdomain = 10001
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
cohesive_zone_uo = czm_uo
correct_edge_dropping = true
[]
[]
(modules/combined/examples/optimization/multi-load/square_subapp_one.i)
power = 1.0
E0 = 1.0
Emin = 1.0e-6
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[Bottom]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 100
xmin = 0
xmax = 150
ymin = 0
ymax = 150
[]
[left_load]
type = ExtraNodesetGenerator
input = Bottom
new_boundary = left_load
coord = '0 150 0'
[]
[right_load]
type = ExtraNodesetGenerator
input = left_load
new_boundary = right_load
coord = '150 150 0'
[]
[left_support]
type = ExtraNodesetGenerator
input = right_load
new_boundary = left_support
coord = '0 0 0'
[]
[right_support]
type = ExtraNodesetGenerator
input = left_support
new_boundary = right_support
coord = '150 0 0'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[Dc]
family = MONOMIAL
order = SECOND
initial_condition = -1.0
[]
[Cc]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = 0.25
[]
[sensitivity_var]
family = MONOMIAL
order = SECOND
initial_condition = -1.0
[]
[]
[AuxKernels]
[sensitivity_kernel]
type = MaterialRealAux
property = sensitivity
variable = sensitivity_var
check_boundary_restricted = false
execute_on = 'TIMESTEP_END'
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_y]
type = DirichletBC
variable = disp_y
boundary = left_support
value = 0.0
[]
[no_x]
type = DirichletBC
variable = disp_x
boundary = left_support
value = 0.0
[]
[no_y_right]
type = DirichletBC
variable = disp_y
boundary = right_support
value = 0.0
[]
[no_x_right]
type = DirichletBC
variable = disp_x
boundary = right_support
value = 0.0
[]
[]
[NodalKernels]
[push_left]
type = NodalGravity
variable = disp_y
boundary = left_load
gravity_value = -1e-3
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${E0}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
# We do averaging in subapps
[rad_avg]
type = RadialAverage
radius = 8
weights = linear
prop_name = sensitivity
force_preaux = true
execute_on = 'TIMESTEP_END'
[]
# Provides Dc
[calc_sense]
type = SensitivityFilter
density_sensitivity = Dc
design_density = mat_den
filter_UO = rad_avg
force_postaux = true
execute_on = 'TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-10
dt = 1.0
num_steps = 10
[]
[Outputs]
exodus = true
[out]
type = CSV
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[mesh_volume]
type = VolumePostprocessor
execute_on = 'initial timestep_end'
[]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[vol_frac]
type = ParsedPostprocessor
function = 'total_vol / mesh_volume'
pp_names = 'total_vol mesh_volume'
[]
[sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = sensitivity
execute_on = 'TIMESTEP_BEGIN TIMESTEP_END NONLINEAR'
[]
[objective]
type = ElementIntegralMaterialProperty
mat_prop = strain_energy_density
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
(modules/contact/test/tests/cohesive_zone_model/bilinear_mixed.i)
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymax = 2
nx = 1
ny = 2
[]
[block1]
type = SubdomainBoundingBoxGenerator
input = 'msh'
bottom_left = '0 0 0'
top_right = '1 1 0'
block_id = 1
block_name = 'block1'
[]
[block2]
type = SubdomainBoundingBoxGenerator
input = 'block1'
bottom_left = '0 1 0'
top_right = '1 2 0'
block_id = 2
block_name = 'block2'
[]
[split]
type = BreakMeshByBlockGenerator
input = block2
[]
[top_node]
type = ExtraNodesetGenerator
coord = '0 2 0'
input = split
new_boundary = top_node
[]
[bottom_node]
type = ExtraNodesetGenerator
coord = '0 0 0'
input = top_node
new_boundary = bottom_node
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Modules]
[TensorMechanics]
[Master]
generate_output = 'stress_yy stress_xy strain_xy'
[all]
strain = FINITE
add_variables = true
use_automatic_differentiation = true
decomposition_method = TaylorExpansion
[]
[]
[]
[]
[BCs]
[fix_x]
type = DirichletBC
preset = true
value = 0.0
boundary = bottom_node
variable = disp_x
[]
[fix_top]
type = DirichletBC
preset = true
boundary = top
variable = disp_x
value = 0
[]
[top]
type = FunctionDirichletBC
boundary = top
variable = disp_y
function = 'if(t<=0.3,t,if(t<=0.6,0.3-(t-0.3),0.6-t))'
preset = true
[]
[bottom]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0
preset = true
[]
[]
[Modules/TensorMechanics/CohesiveZoneMaster]
[czm_ik]
boundary = 'interface'
[]
[]
[Materials]
[stress]
type = ADComputeFiniteStrainElasticStress
[]
[elasticity_tensor]
type = ADComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '1.684e5 0.176e5 0.176e5 1.684e5 0.176e5 1.684e5 0.754e5 0.754e5 0.754e5'
[]
[czm]
type = BiLinearMixedModeTraction
boundary = 'interface'
penalty_stiffness = 1e6
GI_c = 1e3
GII_c = 1e2
normal_strength = 1e4
shear_strength = 1e3
displacements = 'disp_x disp_y'
eta = 2.2
viscosity = 1e-3
[]
[]
[Postprocessors]
[stress_yy]
type = ElementExtremeValue
variable = stress_yy
value_type = max
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
line_search = none
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
automatic_scaling = true
l_max_its = 2
l_tol = 1e-14
nl_max_its = 30
nl_rel_tol = 1e-50
nl_abs_tol = 1e-15
start_time = 0.0
dt = 0.01
end_time = 0.85
dtmin = 0.01
[]
[Outputs]
exodus = true
csv = true
[]
(modules/combined/examples/optimization/3d_mbb.i)
vol_frac = 0.5
E0 = 1
Emin = 1e-8
power = 2
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 3
nx = 60
ny = 20
nz = 20
xmin = 0
xmax = 30
ymin = 0
ymax = 10
zmin = 0
zmax = 10
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = hold_y
coord = '0 0 0; 0 0 10'
[]
[push]
type = ExtraNodesetGenerator
input = node
new_boundary = push
coord = '30 10 5'
[]
[]
[Variables]
[disp_z]
[]
[Dc]
initial_condition = -1.0
[]
[]
[AuxVariables]
[Emin]
family = MONOMIAL
order = CONSTANT
initial_condition = ${Emin}
[]
[power]
family = MONOMIAL
order = CONSTANT
initial_condition = ${power}
[]
[E0]
family = MONOMIAL
order = CONSTANT
initial_condition = ${E0}
[]
[sensitivity]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[AuxKernel]
type = MaterialRealAux
variable = sensitivity
property = sensitivity
execute_on = LINEAR
[]
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = ${vol_frac}
[]
[Dc_elem]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[AuxKernel]
type = SelfAux
variable = Dc_elem
v = Dc
execute_on = 'TIMESTEP_END'
[]
[]
[mat_den_nodal]
family = L2_LAGRANGE
order = FIRST
initial_condition = ${vol_frac}
[AuxKernel]
type = SelfAux
execute_on = TIMESTEP_END
variable = mat_den_nodal
v = mat_den
[]
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[Kernels]
[diffusion]
type = FunctionDiffusion
variable = Dc
function = 0.15 # radius coeff
[]
[potential]
type = Reaction
variable = Dc
[]
[source]
type = CoupledForce
variable = Dc
v = sensitivity
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_y
boundary = hold_y
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[boundary_penalty]
type = ADRobinBC
variable = Dc
boundary = 'left top front back'
coefficient = 10
[]
[boundary_penalty_right]
type = ADRobinBC
variable = Dc
boundary = 'right'
coefficient = 10
[]
[]
[NodalKernels]
[push]
type = NodalGravity
variable = disp_y
boundary = push
gravity_value = -1
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'Emin mat_den power E0'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${E0}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
incremental = false
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[update]
type = DensityUpdate
density_sensitivity = Dc_elem
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
line_search = none
nl_abs_tol = 1e-4
l_max_its = 200
start_time = 0.0
dt = 1.0
num_steps = 70
[]
[Outputs]
[out]
type = Exodus
execute_on = 'INITIAL TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Controls]
[first_period]
type = TimePeriod
start_time = 0.0
end_time = 10
enable_objects = 'BCs::boundary_penalty_right'
execute_on = 'initial timestep_begin'
[]
[]
(test/tests/transfers/multiapp_variable_value_sample_transfer/full_domain_primary.i)
[Mesh]
type = MeshGeneratorMesh
[cartesian_basic_mesh]
type = CartesianMeshGenerator
dim = 2
dx = '0.25 0.25 0.25 0.25'
ix = '1 1 1 1 '
dy = '0.25 0.25 0.25 0.25'
iy = '1 1 1 1'
subdomain_id = '1 2 2 2
1 1 2 2
1 1 2 2
1 1 1 2'
[]
[central_node]
type = ExtraNodesetGenerator
coord = '0.5 0.5'
input = cartesian_basic_mesh
new_boundary = 'central_node'
[]
[]
[Variables]
[to_subapp]
initial_condition = -1.0
[]
[]
[AuxKernels]
[discretize_to_subapp]
type = ParsedAux
variable = from_subapp_check
expression = 'to_subapp'
coupled_variables = 'to_subapp'
[]
[subapp_primary_diff]
type = ParsedAux
variable = subapp_primary_diff
expression = 'from_subapp_check - from_subapp'
coupled_variables = 'from_subapp_check from_subapp'
[]
[]
[AuxVariables]
[from_subapp]
family = MONOMIAL
order = CONSTANT
initial_condition = -2.0
[]
[from_subapp_check]
family = MONOMIAL
order = CONSTANT
initial_condition = -2.0
[]
[subapp_primary_diff]
family = MONOMIAL
order = CONSTANT
initial_condition = -2.0
[]
[array_var]
family = MONOMIAL
order = CONSTANT
components = 3
initial_condition = '-2 -1 0'
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = to_subapp
[]
[]
[BCs]
[edge]
type = DirichletBC
variable = to_subapp
boundary = 'top right left bottom'
value = 1
[]
[center]
type = DirichletBC
variable = to_subapp
boundary = 'central_node'
value = 0
[]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
num_steps = 3
dt = 1.0
nl_abs_tol = 1e-13
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
[MultiApps]
[sub]
type = CentroidMultiApp
input_files = subapp.i
[]
[]
[Transfers]
[from_primary_to_sub_pp]
type = MultiAppVariableValueSamplePostprocessorTransfer
to_multi_app = sub
source_variable = to_subapp
postprocessor = from_primary_pp
[]
[primary_average]
type = MultiAppVariableValueSamplePostprocessorTransfer
from_multi_app = sub
source_variable = from_subapp
postprocessor = to_primary_pp
[]
[array_var]
type = MultiAppVariableValueSamplePostprocessorTransfer
from_multi_app = sub
source_variable = array_var
source_variable_component = 2
postprocessor = to_primary_pp
[]
[]
(modules/solid_mechanics/test/tests/static_deformations/cosserat_tension.i)
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 2
zmax = 0.2
[]
[bottom_xline1]
type = ExtraNodesetGenerator
new_boundary = 101
coord = '0 0 0'
input = generated_mesh
[]
[bottom_xline2]
type = ExtraNodesetGenerator
new_boundary = 101
coord = '0.5 0 0'
input = bottom_xline1
[]
[bottom_xline3]
type = ExtraNodesetGenerator
new_boundary = 101
coord = '1 0 0'
input = bottom_xline2
[]
[bottom_zline1]
type = ExtraNodesetGenerator
new_boundary = 102
coord = '0 0 0.0'
input = bottom_xline3
[]
[bottom_zline2]
type = ExtraNodesetGenerator
new_boundary = 102
coord = '0 0 0.1'
input = bottom_zline1
[]
[bottom_zline3]
type = ExtraNodesetGenerator
new_boundary = 102
coord = '0 0 0.2'
input = bottom_zline2
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
Cosserat_rotations = 'wc_x wc_y wc_z'
[]
[Postprocessors]
[./disp_y_top]
type = PointValue
point = '0.5 1 0.1'
variable = disp_y
[../]
[./wc_z_top]
type = PointValue
point = '0.5 1 0.1'
variable = wc_z
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./wc_x]
[../]
[./wc_y]
[../]
[./wc_z]
[../]
[]
[Kernels]
[./cx_elastic]
type = CosseratStressDivergenceTensors
variable = disp_x
component = 0
[../]
[./cy_elastic]
type = CosseratStressDivergenceTensors
variable = disp_y
component = 1
[../]
[./cz_elastic]
type = CosseratStressDivergenceTensors
variable = disp_z
component = 2
[../]
[./x_couple]
type = StressDivergenceTensors
variable = wc_x
displacements = 'wc_x wc_y wc_z'
component = 0
base_name = couple
[../]
[./y_couple]
type = StressDivergenceTensors
variable = wc_y
displacements = 'wc_x wc_y wc_z'
component = 1
base_name = couple
[../]
[./z_couple]
type = StressDivergenceTensors
variable = wc_z
displacements = 'wc_x wc_y wc_z'
component = 2
base_name = couple
[../]
[./x_moment]
type = MomentBalancing
variable = wc_x
component = 0
[../]
[./y_moment]
type = MomentBalancing
variable = wc_y
component = 1
[../]
[./z_moment]
type = MomentBalancing
variable = wc_z
component = 2
[../]
[]
[BCs]
[./y_bottom]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[../]
[./x_line]
type = DirichletBC
variable = disp_z
boundary = 101
value = 0
[../]
[./z_line]
type = DirichletBC
variable = disp_x
boundary = 102
value = 0
[../]
[./wc_x_bottom]
type = DirichletBC
variable = wc_x
boundary = bottom
value = 0
[../]
[./wc_y_bottom]
type = DirichletBC
variable = wc_y
boundary = bottom
value = 0
[../]
[./wc_z_bottom]
type = DirichletBC
variable = wc_z
boundary = bottom
value = 0
[../]
[./top_force]
type = NeumannBC
variable = disp_y
boundary = top
value = 1
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeCosseratElasticityTensor
B_ijkl = 0.5
E_ijkl = '1 2 1.3333'
fill_method = 'general_isotropic'
[../]
[./strain]
type = ComputeCosseratSmallStrain
[../]
[./stress]
type = ComputeCosseratLinearElasticStress
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -ksp_atol -ksp_rtol'
petsc_options_value = 'gmres bjacobi 1E-10 1E-10 10 1E-15 1E-10'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
num_steps = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = cosserat_tension_out
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/block-restriction/two-mats-one-eqn-set.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 2
ymin = 0
ymax = 1
nx = 16
ny = 8
elem_type = QUAD9
[]
[./corner_node_0]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node_0'
coord = '0 0 0'
input = gen
[../]
[./corner_node_1]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node_1'
coord = '1 0 0'
input = corner_node_0
[../]
[./subdomain1]
input = corner_node_1
type = SubdomainBoundingBoxGenerator
bottom_left = '1 0 0'
top_right = '2 1 0'
block_id = 1
[../]
[./break_boundary]
input = subdomain1
type = BreakBoundaryOnSubdomainGenerator
[../]
[./interface0]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
primary_block = '0'
paired_block = '1'
new_boundary = 'interface0'
[../]
[./interface1]
type = SideSetsBetweenSubdomainsGenerator
input = interface0
primary_block = '1'
paired_block = '0'
new_boundary = 'interface1'
[../]
[]
[Variables]
[velocity0]
order = SECOND
family = LAGRANGE_VEC
[]
[T0]
order = SECOND
[InitialCondition]
type = ConstantIC
value = 1.0
[]
[]
[p0]
[]
[]
[Kernels]
[./mass0]
type = INSADMass
variable = p0
[../]
[./momentum_time0]
type = INSADMomentumTimeDerivative
variable = velocity0
[../]
[./momentum_convection0]
type = INSADMomentumAdvection
variable = velocity0
[../]
[./momentum_viscous0]
type = INSADMomentumViscous
variable = velocity0
[../]
[./momentum_pressure0]
type = INSADMomentumPressure
variable = velocity0
pressure = p0
integrate_p_by_parts = true
[../]
[./temperature_time0]
type = INSADHeatConductionTimeDerivative
variable = T0
[../]
[./temperature_advection0]
type = INSADEnergyAdvection
variable = T0
[../]
[./temperature_conduction0]
type = ADHeatConduction
variable = T0
thermal_conductivity = 'k'
[../]
[]
[BCs]
[./no_slip0]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'bottom_to_0 interface0 left'
[../]
[./lid0]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'top_to_0'
function_x = 'lid_function0'
[../]
[./T_hot0]
type = DirichletBC
variable = T0
boundary = 'bottom_to_0'
value = 1
[../]
[./T_cold0]
type = DirichletBC
variable = T0
boundary = 'top_to_0'
value = 0
[../]
[./pressure_pin0]
type = DirichletBC
variable = p0
boundary = 'pinned_node_0'
value = 0
[../]
[./no_slip1]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'bottom_to_1 interface1 right'
[../]
[./lid1]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'top_to_1'
function_x = 'lid_function1'
[../]
[./T_hot1]
type = DirichletBC
variable = T0
boundary = 'bottom_to_1'
value = 1
[../]
[./T_cold1]
type = DirichletBC
variable = T0
boundary = 'top_to_1'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat0]
type = INSAD3Eqn
velocity = velocity0
pressure = p0
temperature = T0
block = '0'
[]
[ins_mat1]
type = INSAD3Eqn
velocity = velocity0
pressure = p0
temperature = T0
block = '1'
[]
[]
[Functions]
# 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.
[./lid_function0]
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[./lid_function1]
type = ParsedFunction
expression = '4*(x-1)*(2-x)'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Transient
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_levels -sub_pc_factor_shift_type'
petsc_options_value = 'asm 2 ilu 4 NONZERO'
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
[]
(modules/solid_mechanics/test/tests/lagrangian/total/rates/rotation.i)
[Mesh]
[msh]
type = GeneratedMeshGenerator
dim = 2
nx = 1
ny = 1
[]
[bottom_left]
type = ExtraNodesetGenerator
input = msh
new_boundary = 'bottom_left'
coord = '0 0 0'
[]
[top_left]
type = ExtraNodesetGenerator
input = bottom_left
new_boundary = 'top_left'
coord = '0 1 0'
[]
[top_right]
type = ExtraNodesetGenerator
input = top_left
new_boundary = 'top_right'
coord = '1 1 0'
[]
[bottom_right]
type = ExtraNodesetGenerator
input = top_right
new_boundary = 'bottom_right'
coord = '1 0 0'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
large_kinematics = true
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[Kernels]
[sdx]
type = TotalLagrangianStressDivergence
variable = disp_x
component = 0
[]
[sdy]
type = TotalLagrangianStressDivergence
variable = disp_y
component = 1
[]
[]
[AuxVariables]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[AuxKernel]
type = RankTwoAux
rank_two_tensor = cauchy_stress
index_i = 0
index_j = 0
execute_on = TIMESTEP_END
[]
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[AuxKernel]
type = RankTwoAux
rank_two_tensor = cauchy_stress
index_i = 1
index_j = 1
execute_on = TIMESTEP_END
[]
[]
[]
[BCs]
[fix_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left'
value = 0
[]
[fix_x]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left'
value = 0
[]
[top_left_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 'top_left'
function = 'theta:=if(t<1,0,t-1); -sin(theta)'
[]
[top_left_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 'top_left'
function = 'theta:=if(t<1,0,t-1); cos(theta)-1'
[]
[bottom_right_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 'bottom_right'
function = 'theta:=if(t<1,0,t-1); if(t<1,t,2*cos(theta)-1)'
[]
[bottom_right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 'bottom_right'
function = 'theta:=if(t<1,0,t-1); if(t<1,0,2*sin(theta))'
[]
[top_right_x]
type = FunctionDirichletBC
variable = disp_x
boundary = 'top_right'
function = 'theta:=if(t<1,0,t-1); phi:=theta+atan(0.5); if(t<1,t,sqrt(5)*cos(phi)-1)'
[]
[top_right_y]
type = FunctionDirichletBC
variable = disp_y
boundary = 'top_right'
function = 'theta:=if(t<1,0,t-1); phi:=theta+atan(0.5); if(t<1,0,sqrt(5)*sin(phi)-1)'
[]
[]
[Materials]
[elastic_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e5
poissons_ratio = 0
[]
[stress]
type = ComputeLagrangianLinearElasticStress
[]
[strain]
type = ComputeLagrangianStrain
[]
[]
[Postprocessors]
[sxx]
type = ElementAverageValue
variable = stress_xx
execute_on = 'INITIAL TIMESTEP_END'
[]
[syy]
type = ElementAverageValue
variable = stress_yy
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
dt = 0.01
end_time = '${fparse pi/2+1}'
solve_type = NEWTON
line_search = none
petsc_options_iname = -pc_type
petsc_options_value = lu
automatic_scaling = true
nl_abs_tol = 1e-10
nl_rel_tol = 1e-10
[]
[Outputs]
csv = true
[]
(modules/combined/test/tests/optimization/compliance_sensitivity/2d_mmb_2material_cost.i)
vol_frac = 0.5
power = 3
E0 = 1.0e-6
E1 = 0.3
E2 = 1.0
rho0 = 1.0e-6
rho1 = 0.3
rho2 = 1.0
C0 = 1.0e-6
C1 = 0.5
C2 = 1.0
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 150
ny = 50
xmin = 0
xmax = 30
ymin = 0
ymax = 10
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = hold
nodes = 0
[]
[push]
type = ExtraNodesetGenerator
input = node
new_boundary = push
coord = '30 10 0'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[Dc]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = ${vol_frac}
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_y
boundary = hold
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[]
[NodalKernels]
[push]
type = NodalGravity
variable = disp_y
boundary = push
gravity_value = -1
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# ordered multimaterial simp
expression = "A1:=(${E0}-${E1})/(${rho0}^${power}-${rho1}^${power}); "
"B1:=${E0}-A1*${rho0}^${power}; E1:=A1*mat_den^${power}+B1; "
"A2:=(${E1}-${E2})/(${rho1}^${power}-${rho2}^${power}); "
"B2:=${E1}-A2*${rho1}^${power}; E2:=A2*mat_den^${power}+B2; "
"if(mat_den<${rho1},E1,E2)"
coupled_variables = 'mat_den'
property_name = E_phys
[]
[Cost]
type = DerivativeParsedMaterial
# ordered multimaterial simp
expression = "A1:=(${C0}-${C1})/(${rho0}^${power}-${rho1}^${power}); "
"B1:=${C0}-A1*${rho0}^${power}; C1:=A1*mat_den^${power}+B1; "
"A2:=(${C1}-${C2})/(${rho1}^${power}-${rho2}^${power}); "
"B2:=${C1}-A2*${rho1}^${power}; C2:=A2*mat_den^${power}+B2; "
"if(mat_den<${rho1},C1,C2)"
coupled_variables = 'mat_den'
property_name = Cost
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
[]
[cc]
type = CostSensitivity
design_density = mat_den
cost = Cost
outputs = 'exodus'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[rad_avg]
type = RadialAverage
radius = 1.2
weights = linear
prop_name = sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
[update]
type = DensityUpdate
density_sensitivity = Dc
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
[]
[calc_sense]
type = SensitivityFilter
density_sensitivity = Dc
design_density = mat_den
filter_UO = rad_avg
execute_on = TIMESTEP_END
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-8
dt = 1.0
num_steps = 70
[]
[Outputs]
exodus = true
[out]
type = CSV
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = sensitivity
[]
[]
(modules/combined/test/tests/optimization/compliance_sensitivity/three_materials_thermal.i)
vol_frac = 0.4
cost_frac = 0.4
power = 4
# Stiffness (not optimized in this test)
E0 = 1.0e-6
E1 = 0.2
E2 = 0.6
E3 = 1.0
# Densities
rho0 = 1.0e-6
rho1 = 0.4
rho2 = 0.7
rho3 = 1.0
# Costs
C0 = 1.0e-6
C1 = 0.5
C2 = 0.8
C3 = 1.0
# Thermal conductivity
TC0 = 1.0e-6
TC1 = 0.2
TC2 = 0.6
TC3 = 1.0
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 40
xmin = 0
xmax = 40
ymin = 0
ymax = 40
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = hold
nodes = 0
[]
[push_left]
type = ExtraNodesetGenerator
input = node
new_boundary = push_left
coord = '20 0 0'
[]
[push_center]
type = ExtraNodesetGenerator
input = push_left
new_boundary = push_center
coord = '40 0 0'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[temp]
initial_condition = 100.0
[]
[]
[AuxVariables]
[Dc]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[Cc]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[Tc]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[Cost]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = ${vol_frac}
[]
[]
# [ICs]
# [mat_den]
# type = RandomIC
# seed = 4
# variable = mat_den
# max = '${fparse vol_frac+0.25}'
# min = '${fparse vol_frac-0.25}'
# []
# []
[AuxKernels]
[Cost]
type = MaterialRealAux
variable = Cost
property = Cost_mat
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temp
diffusion_coefficient = thermal_cond
[]
[heat_source]
type = HeatSource
value = 1e-2 # W/m^3
variable = temp
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_y]
type = DirichletBC
variable = disp_y
boundary = hold
value = 0.0
[]
[no_x_symm]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[top]
type = DirichletBC
variable = temp
boundary = top
value = 0
[]
[bottom]
type = DirichletBC
variable = temp
boundary = bottom
value = 0
[]
[right]
type = DirichletBC
variable = temp
boundary = right
value = 0
[]
[left]
type = DirichletBC
variable = temp
boundary = left
value = 0
[]
[]
[NodalKernels]
[push_left]
type = NodalGravity
variable = disp_y
boundary = push_left
gravity_value = -1e-6 # -3
mass = 1
[]
[push_center]
type = NodalGravity
variable = disp_y
boundary = push_center
gravity_value = -1e-6 # -3
mass = 1
[]
[]
[Materials]
[thermal_cond]
type = DerivativeParsedMaterial
# ordered multimaterial simp
expression = "A1:=(${TC0}-${TC1})/(${rho0}^${power}-${rho1}^${power}); "
"B1:=${TC0}-A1*${rho0}^${power}; TC1:=A1*mat_den^${power}+B1; "
"A2:=(${TC1}-${TC2})/(${rho1}^${power}-${rho2}^${power}); "
"B2:=${TC1}-A2*${rho1}^${power}; TC2:=A2*mat_den^${power}+B2; "
"A3:=(${TC2}-${TC3})/(${rho2}^${power}-${rho3}^${power}); "
"B3:=${TC2}-A3*${rho2}^${power}; TC3:=A3*mat_den^${power}+B3; "
"if(mat_den<${rho1},TC1,if(mat_den<${rho2},TC2,TC3))"
coupled_variables = 'mat_den'
property_name = thermal_cond
outputs = 'exodus'
[]
[thermal_compliance]
type = ThermalCompliance
temperature = temp
thermal_conductivity = thermal_cond
outputs = 'exodus'
[]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# ordered multimaterial simp
expression = "A1:=(${E0}-${E1})/(${rho0}^${power}-${rho1}^${power}); "
"B1:=${E0}-A1*${rho0}^${power}; E1:=A1*mat_den^${power}+B1; "
"A2:=(${E1}-${E2})/(${rho1}^${power}-${rho2}^${power}); "
"B2:=${E1}-A2*${rho1}^${power}; E2:=A2*mat_den^${power}+B2; "
"A3:=(${E2}-${E3})/(${rho2}^${power}-${rho3}^${power}); "
"B3:=${E2}-A3*${rho2}^${power}; E3:=A3*mat_den^${power}+B3; "
"if(mat_den<${rho1},E1,if(mat_den<${rho2},E2,E3))"
coupled_variables = 'mat_den'
property_name = E_phys
[]
[Cost_mat]
type = DerivativeParsedMaterial
# ordered multimaterial simp
expression = "A1:=(${C0}-${C1})/(${rho0}^(1/${power})-${rho1}^(1/${power})); "
"B1:=${C0}-A1*${rho0}^(1/${power}); C1:=A1*mat_den^(1/${power})+B1; "
"A2:=(${C1}-${C2})/(${rho1}^(1/${power})-${rho2}^(1/${power})); "
"B2:=${C1}-A2*${rho1}^(1/${power}); C2:=A2*mat_den^(1/${power})+B2; "
"A3:=(${C2}-${C3})/(${rho2}^(1/${power})-${rho3}^(1/${power})); "
"B3:=${C2}-A3*${rho2}^(1/${power}); C3:=A3*mat_den^(1/${power})+B3; "
"if(mat_den<${rho1},C1,if(mat_den<${rho2},C2,C3))"
coupled_variables = 'mat_den'
property_name = Cost_mat
[]
[CostDensity]
type = ParsedMaterial
property_name = CostDensity
coupled_variables = 'mat_den Cost'
expression = 'mat_den*Cost'
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
[]
[cc]
type = CostSensitivity
design_density = mat_den
cost = Cost_mat
outputs = 'exodus'
[]
[tc]
type = ThermalSensitivity
design_density = mat_den
thermal_conductivity = thermal_cond
temperature = temp
outputs = 'exodus'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[rad_avg]
type = RadialAverage
radius = 4
weights = linear
prop_name = sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
[rad_avg_cost]
type = RadialAverage
radius = 4
weights = linear
prop_name = cost_sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
[rad_avg_thermal]
type = RadialAverage
radius = 4
weights = linear
prop_name = thermal_sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
[update]
type = DensityUpdateTwoConstraints
density_sensitivity = Dc
cost_density_sensitivity = Cc
cost = Cost
cost_fraction = ${cost_frac}
design_density = mat_den
volume_fraction = ${vol_frac}
bisection_lower_bound = 0
bisection_upper_bound = 1.0e12 # 100
use_thermal_compliance = true
thermal_sensitivity = Tc
# Only account for thermal optimizxation
weight_mechanical_thermal = '0 1'
relative_tolerance = 1.0e-8
bisection_move = 0.05
adaptive_move = false
execute_on = TIMESTEP_BEGIN
[]
# Provides Dc
[calc_sense]
type = SensitivityFilter
density_sensitivity = Dc
design_density = mat_den
filter_UO = rad_avg
execute_on = TIMESTEP_END
force_postaux = true
[]
# Provides Cc
[calc_sense_cost]
type = SensitivityFilter
density_sensitivity = Cc
design_density = mat_den
filter_UO = rad_avg_cost
execute_on = TIMESTEP_END
force_postaux = true
[]
# Provides Tc
[calc_sense_thermal]
type = SensitivityFilter
density_sensitivity = Tc
design_density = mat_den
filter_UO = rad_avg_thermal
execute_on = TIMESTEP_END
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-10
dt = 1.0
num_steps = 12
[]
[Outputs]
exodus = true
[out]
type = CSV
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[right_flux]
type = SideDiffusiveFluxAverage
variable = temp
boundary = right
diffusivity = 10
[]
[mesh_volume]
type = VolumePostprocessor
execute_on = 'initial timestep_end'
[]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[vol_frac]
type = ParsedPostprocessor
function = 'total_vol / mesh_volume'
pp_names = 'total_vol mesh_volume'
[]
[sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = sensitivity
[]
[cost_sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = cost_sensitivity
[]
[cost]
type = ElementIntegralMaterialProperty
mat_prop = CostDensity
[]
[cost_frac]
type = ParsedPostprocessor
function = 'cost / mesh_volume'
pp_names = 'cost mesh_volume'
[]
[objective]
type = ElementIntegralMaterialProperty
mat_prop = strain_energy_density
execute_on = 'INITIAL TIMESTEP_END'
[]
[objective_thermal]
type = ElementIntegralMaterialProperty
mat_prop = thermal_compliance
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
(modules/solid_mechanics/test/tests/uel/tensile_umat_moose_umat.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 1
nz = 1
elem_type = HEX8
[]
[extra_nodeset]
type = ExtraNodesetGenerator
input = mesh
new_boundary = 'master'
coord = '1.0 1.0 1.0'
[]
[]
[AuxVariables]
[temperature]
initial_condition = 500
[]
[state_var_one]
family = MONOMIAL
order = FIRST
[]
[state_var_two]
family = MONOMIAL
order = FIRST
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
generate_output = 'vonmises_stress'
strain = FINITE
[]
[]
[Functions]
[function_pull]
type = PiecewiseLinear
x = '0 100'
y = '0 0.1'
[]
[]
[AuxKernels]
[state_ker_one]
type = MaterialStdVectorAux
variable = state_var_one
property = 'state_var'
index = 0
execute_on = timestep_end
[]
[state_ker_two]
type = MaterialStdVectorAux
variable = state_var_two
property = 'state_var'
index = 1
execute_on = timestep_end
[]
[]
[Constraints]
[one]
type = LinearNodalConstraint
variable = disp_x
primary = '6'
secondary_node_ids = '1 2 5'
penalty = 1.0e8
formulation = kinematic
weights = '1'
[]
[two]
type = LinearNodalConstraint
variable = disp_z
primary = '6'
secondary_node_ids = '4 5 7'
penalty = 1.0e8
formulation = kinematic
weights = '1'
[]
[]
[BCs]
[symmy]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[]
[symmx]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[]
[symmz]
type = DirichletBC
variable = disp_z
boundary = back
value = 0
[]
# What's done below is to capture the weird constraints
[axial_load]
type = FunctionDirichletBC
variable = disp_y
boundary = 'top'
function = function_pull
[]
[]
# Something wrong in the input?
[Materials]
[umat]
type = AbaqusUMATStress
constant_properties = '190.0 28.0 3.0 1.0 6.0 0.0 0.0 23.0 25.0 26.0 0.0 0.0 0.0 0.0 0.0 0.0 0.0 '
'0.0 0.0 0.0 0.0 0.0 31700000.0 0.32 6.67e-06 1e-08 5000.0 4.0' # 27 properties
plugin = '../../../../tensor_mechanics/test/plugins/umat_hc40'
num_state_vars = 177 # 141 + 6*6
temperature = temperature
use_one_based_indexing = true
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
l_max_its = 100
l_tol = 1e-8
nl_max_its = 50
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
dtmin = 1
dt = 5
end_time = 100
[]
[Outputs]
exodus = true
[]
(modules/xfem/test/tests/checkpoint/checkpoint.i)
# This test is for two layer materials with different youngs modulus
# The global stress is determined by switching the stress based on level set values
# The material interface is marked by a level set function
# The two layer materials are glued together
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y'
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
[../]
[]
[Mesh]
displacements = 'disp_x disp_y'
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
xmin = 0.0
xmax = 5.
ymin = 0.0
ymax = 5.
elem_type = QUAD4
[]
[./left_bottom]
type = ExtraNodesetGenerator
new_boundary = 'left_bottom'
coord = '0.0 0.0'
input = gen
[../]
[./left_top]
type = ExtraNodesetGenerator
new_boundary = 'left_top'
coord = '0.0 5.'
input = left_bottom
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[Functions]
[./ls_func]
type = ParsedFunction
expression = 'y-2.5'
[../]
[]
[AuxVariables]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./a_strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./b_strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./TensorMechanics]
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = stress_xx
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = stress_yy
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 1
variable = stress_xy
[../]
[./a_strain_xx]
type = RankTwoAux
rank_two_tensor = A_total_strain
index_i = 0
index_j = 0
variable = a_strain_xx
[../]
[./a_strain_yy]
type = RankTwoAux
rank_two_tensor = A_total_strain
index_i = 1
index_j = 1
variable = a_strain_yy
[../]
[./a_strain_xy]
type = RankTwoAux
rank_two_tensor = A_total_strain
index_i = 0
index_j = 1
variable = a_strain_xy
[../]
[./b_strain_xx]
type = RankTwoAux
rank_two_tensor = B_total_strain
index_i = 0
index_j = 0
variable = b_strain_xx
[../]
[./b_strain_yy]
type = RankTwoAux
rank_two_tensor = B_total_strain
index_i = 1
index_j = 1
variable = b_strain_yy
[../]
[./b_strain_xy]
type = RankTwoAux
rank_two_tensor = B_total_strain
index_i = 0
index_j = 1
variable = b_strain_xy
[../]
[]
[Constraints]
[./dispx_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_x
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[./dispy_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = disp_y
alpha = 1e8
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[]
[BCs]
[./bottomx]
type = DirichletBC
boundary = bottom
variable = disp_x
value = 0.0
[../]
[./bottomy]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0.0
[../]
[./topx]
type = FunctionDirichletBC
boundary = top
variable = disp_x
function = 0.03*t
[../]
[./topy]
type = FunctionDirichletBC
boundary = top
variable = disp_y
function = '0.03*t'
[../]
[]
[Materials]
[./elasticity_tensor_A]
type = ComputeIsotropicElasticityTensor
base_name = A
youngs_modulus = 1e9
poissons_ratio = 0.3
[../]
[./strain_A]
type = ComputeSmallStrain
base_name = A
[../]
[./stress_A]
type = ComputeLinearElasticStress
base_name = A
[../]
[./elasticity_tensor_B]
type = ComputeIsotropicElasticityTensor
base_name = B
youngs_modulus = 1e5
poissons_ratio = 0.3
[../]
[./strain_B]
type = ComputeSmallStrain
base_name = B
[../]
[./stress_B]
type = ComputeLinearElasticStress
base_name = B
[../]
[./combined_stress]
type = LevelSetBiMaterialRankTwo
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = stress
[../]
[./combined_dstressdstrain]
type = LevelSetBiMaterialRankFour
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = Jacobian_mult
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
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 = 'bt'
# controls for linear iterations
l_max_its = 20
l_tol = 1e-3
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-14
nl_abs_tol = 1e-7
# time control
start_time = 0.0
dt = 0.1
num_steps = 2
max_xfem_update = 1
[]
[Outputs]
checkpoint = true
exodus = true
execute_on = timestep_end
csv = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/navier_stokes/test/tests/finite_element/ins/coupled-force/gravity-object.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./velocity]
family = LAGRANGE_VEC
[../]
[./p]
[../]
[u]
family = LAGRANGE_VEC
[]
[]
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
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_coupled_force]
type = INSADMomentumCoupledForce
variable = velocity
coupled_vector_var = u
[]
[gravity]
type = INSADGravityForce
variable = velocity
gravity = '0 -9.81 0'
[]
[./momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[../]
[u_diff]
type = VectorDiffusion
variable = u
[]
[]
[BCs]
[./no_slip]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom right left top'
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[u_left]
type = VectorFunctionDirichletBC
variable = u
boundary = 'left'
function_x = 1
function_y = 1
[]
[u_right]
type = VectorFunctionDirichletBC
variable = u
boundary = 'right'
function_x = -1
function_y = -1
[]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[ins_mat]
type = INSADTauMaterial
velocity = velocity
pressure = p
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_factor_levels -ksp_gmres_restart'
petsc_options_value = 'asm 6 200'
line_search = 'none'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
exodus = true
[]
(test/tests/mortar/periodic_segmental_constraint/testperiodicsole.i)
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 2
xmin = -1.0
xmax = 1.0
ymin = -1.0
ymax = 1.0
nx = 2
ny = 2
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_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[left]
type = LowerDBlockFromSidesetGenerator
input = left_block_id
sidesets = '13'
new_block_id = '10003'
new_block_name = 'secondary_left'
[]
[right]
type = LowerDBlockFromSidesetGenerator
input = left
sidesets = '11'
new_block_id = '10001'
new_block_name = 'primary_right'
[]
[bottom]
type = LowerDBlockFromSidesetGenerator
input = right
sidesets = '10'
new_block_id = '10000'
new_block_name = 'secondary_bottom'
[]
[top]
type = LowerDBlockFromSidesetGenerator
input = bottom
sidesets = '12'
new_block_id = '10002'
new_block_name = 'primary_top'
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = top
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[kappa_x]
order = FIRST
family = SCALAR
[]
[kappa_y]
order = FIRST
family = SCALAR
[]
[]
[AuxVariables]
[kappa_aux]
order = SECOND
family = SCALAR
[]
[./flux_x]
order = FIRST
family = MONOMIAL
[../]
[./flux_y]
order = FIRST
family = MONOMIAL
[../]
[]
[AuxScalarKernels]
[kappa]
type = FunctionScalarAux
variable = kappa_aux
function = '1 3'
execute_on = initial #timestep_end
[]
[]
[AuxKernels]
[./flux_x]
type = DiffusionFluxAux
diffusivity = 'conductivity'
variable = flux_x
diffusion_variable = u
component = x
block = 1
[../]
[./flux_y]
type = DiffusionFluxAux
diffusivity = 'conductivity'
variable = flux_y
diffusion_variable = u
component = y
block = 1
[../]
[]
[Kernels]
[diff1]
type = Diffusion
variable = u
block = 1
[]
[]
[Materials]
[k1]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 1.0
block = 1
[]
[]
[Problem]
kernel_coverage_check = false
error_on_jacobian_nonzero_reallocation = true
[]
[BCs]
[fix_right]
type = DirichletBC
variable = u
boundary = pinned_node
value = 0
[]
[]
[Constraints]
[mortarlr]
type = PenaltyEqualValueConstraint
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e3
[]
[periodiclrx]
type = TestPeriodicSole
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
kappa = kappa_x
kappa_aux = kappa_aux
component = 0
kappa_other = kappa_y
correct_edge_dropping = true
penalty_value = 1.e3
[]
[periodiclry]
type = TestPeriodicSole
primary_boundary = '11'
secondary_boundary = '13'
primary_subdomain = 'primary_right'
secondary_subdomain = 'secondary_left'
secondary_variable = u
kappa = kappa_y
kappa_aux = kappa_aux
component = 1
kappa_other = kappa_x
correct_edge_dropping = true
penalty_value = 1.e3
[]
[mortarbt]
type = PenaltyEqualValueConstraint
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
correct_edge_dropping = true
penalty_value = 1.e3
[]
[periodicbtx]
type = TestPeriodicSole
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
kappa = kappa_x
kappa_aux = kappa_aux
component = 0
kappa_other = kappa_y
correct_edge_dropping = true
penalty_value = 1.e3
[]
[periodicbty]
type = TestPeriodicSole
primary_boundary = '12'
secondary_boundary = '10'
primary_subdomain = 'primary_top'
secondary_subdomain = 'secondary_bottom'
secondary_variable = u
kappa = kappa_y
kappa_aux = kappa_aux
component = 1
kappa_other = kappa_x
correct_edge_dropping = true
compute_scalar_residuals = true
penalty_value = 1.e3
[]
[]
[Preconditioning]
[smp]
full = true
type = SMP
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
solve_type = NEWTON
[]
[Postprocessors]
[max]
type = ElementExtremeValue
variable = 'flux_x'
[]
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/anisotropic_plasticity/ad_aniso_plasticity_x.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 2
nz = 2
xmin = 0.0
ymin = 0.0
zmin = 0.0
xmax = 10.0
ymax = 1.0
zmax = 1.0
[]
[corner_node]
type = ExtraNodesetGenerator
new_boundary = '100'
nodes = '3 69'
input = gen
[]
[corner_node_2]
type = ExtraNodesetGenerator
new_boundary = '101'
nodes = '4 47'
input = corner_node
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[hydrostatic_stress]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[plastic_strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[elastic_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[hydrostatic_stress]
type = ADRankTwoScalarAux
variable = hydrostatic_stress
rank_two_tensor = stress
scalar_type = Hydrostatic
[]
[plasticity_strain_xx]
type = ADRankTwoAux
rank_two_tensor = trial_plasticity_plastic_strain
variable = plastic_strain_xx
index_i = 0
index_j = 0
[]
[plasticity_strain_xy]
type = ADRankTwoAux
rank_two_tensor = trial_plasticity_plastic_strain
variable = plastic_strain_xy
index_i = 0
index_j = 1
[]
[plasticity_strain_yy]
type = ADRankTwoAux
rank_two_tensor = trial_plasticity_plastic_strain
variable = plastic_strain_yy
index_i = 1
index_j = 1
[]
[plasticity_strain_zz]
type = ADRankTwoAux
rank_two_tensor = trial_plasticity_plastic_strain
variable = plastic_strain_zz
index_i = 2
index_j = 2
[]
[sigma_xx]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 1
index_j = 1
[]
[elastic_strain_yy]
type = ADRankTwoAux
rank_two_tensor = elastic_strain
variable = elastic_strain_yy
index_i = 1
index_j = 1
[]
[sigma_yy]
type = ADRankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[]
[Functions]
[pull]
type = PiecewiseLinear
x = '0 1e1 1e8'
y = '0 -4e2 -4e2'
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
generate_output = 'elastic_strain_xx stress_xx'
use_automatic_differentiation = true
add_variables = true
[]
[]
[Materials]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 70000
poissons_ratio = 0.25
[]
[elastic_strain]
type = ADComputeMultipleInelasticStress
inelastic_models = "trial_plasticity"
max_iterations = 50
absolute_tolerance = 1e-16
[]
[hill_tensor]
type = ADHillConstants
# F G H L M N
hill_constants = "0.5829856 0.364424 0.6342174 2.0691375 2.3492325 1.814589"
base_name = trial_plasticity
[]
[trial_plasticity]
type = ADHillPlasticityStressUpdate
hardening_constant = 2000.0
yield_stress = 0.001 # was 200 for verification
absolute_tolerance = 1e-14
relative_tolerance = 1e-12
base_name = trial_plasticity
internal_solve_full_iteration_history = true
max_inelastic_increment = 2.0e-6
internal_solve_output_on = on_error
[]
[]
[BCs]
[no_disp_x]
type = ADDirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[no_disp_y]
type = ADDirichletBC
variable = disp_y
boundary = 100
value = 0.0
[]
[no_disp_z]
type = ADDirichletBC
variable = disp_z
boundary = 101
value = 0.0
[]
[Pressure]
[Side1]
boundary = right
function = pull
[]
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-11
nl_abs_tol = 1.0e-14
l_max_its = 90
num_steps = 25
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 30
iteration_window = 9
growth_factor = 1.05
cutback_factor = 0.5
timestep_limiting_postprocessor = matl_ts_min
dt = 1.0e-5
time_t = '0 3.4e-5 10'
time_dt = '1.0e-5 1.0e-7 1.0e-7'
[]
start_time = 0
automatic_scaling = true
[]
[Postprocessors]
[matl_ts_min]
type = MaterialTimeStepPostprocessor
[]
[max_disp_x]
type = ElementExtremeValue
variable = disp_x
[]
[max_disp_y]
type = ElementExtremeValue
variable = disp_y
[]
[max_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[]
[dt]
type = TimestepSize
[]
[num_lin]
type = NumLinearIterations
outputs = console
[]
[num_nonlin]
type = NumNonlinearIterations
outputs = console
[]
[plasticity_strain_yy]
type = ElementalVariableValue
variable = plastic_strain_yy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[elastic_strain_yy]
type = ElementalVariableValue
variable = elastic_strain_yy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[sigma_yy]
type = ElementalVariableValue
variable = stress_yy
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[plasticity_strain_xx]
type = ElementalVariableValue
variable = plastic_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[elastic_strain_xx]
type = ElementalVariableValue
variable = elastic_strain_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[sigma_xx]
type = ElementalVariableValue
variable = stress_xx
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[plasticity_strain_zz]
type = ElementalVariableValue
variable = plastic_strain_zz
execute_on = 'TIMESTEP_END'
elementid = 39
[]
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/combined/examples/optimization/multi-load/single_subapp_two.i)
power = 2
E0 = 1.0
Emin = 1.0e-6
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[Bottom]
type = GeneratedMeshGenerator
dim = 2
nx = 80
ny = 40
xmin = 0
xmax = 150
ymin = 0
ymax = 75
[]
[left_load]
type = ExtraNodesetGenerator
input = Bottom
new_boundary = left_load
coord = '37.5 75 0'
[]
[right_load]
type = ExtraNodesetGenerator
input = left_load
new_boundary = right_load
coord = '112.5 75 0'
[]
[left_support]
type = ExtraNodesetGenerator
input = right_load
new_boundary = left_support
coord = '0 0 0'
[]
[right_support]
type = ExtraNodesetGenerator
input = left_support
new_boundary = right_support
coord = '150 0 0'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[Dc]
family = MONOMIAL
order = SECOND
initial_condition = -1.0
[]
[Cc]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = 0.1
[]
[sensitivity_var]
family = MONOMIAL
order = SECOND
initial_condition = -1.0
[]
[]
[AuxKernels]
[sensitivity_kernel]
type = MaterialRealAux
check_boundary_restricted = false
property = sensitivity
variable = sensitivity_var
execute_on = 'TIMESTEP_END'
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_y]
type = DirichletBC
variable = disp_y
boundary = left_support
value = 0.0
[]
[no_x]
type = DirichletBC
variable = disp_x
boundary = left_support
value = 0.0
[]
[no_y_right]
type = DirichletBC
variable = disp_y
boundary = right_support
value = 0.0
[]
[]
[NodalKernels]
[push_right]
type = NodalGravity
variable = disp_y
boundary = right_load
gravity_value = -1e-3
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${E0}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.0
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[rad_avg]
type = RadialAverage
radius = 3
weights = linear
prop_name = sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
# No SIMP optimization in subapp
[calc_sense]
type = SensitivityFilter
density_sensitivity = Dc
design_density = mat_den
filter_UO = rad_avg
execute_on = TIMESTEP_END
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-10
dt = 1.0
num_steps = 25
[]
[Outputs]
exodus = true
[out]
type = CSV
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[mesh_volume]
type = VolumePostprocessor
execute_on = 'initial timestep_end'
[]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[vol_frac]
type = ParsedPostprocessor
function = 'total_vol / mesh_volume'
pp_names = 'total_vol mesh_volume'
[]
[sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = sensitivity
execute_on = 'TIMESTEP_BEGIN TIMESTEP_END NONLINEAR'
[]
[objective]
type = ElementIntegralMaterialProperty
mat_prop = strain_energy_density
execute_on = 'INITIAL TIMESTEP_END'
[]
[]