- prop_namesThe names of the properties this material will have
C++ Type:std::vector<std::string>
Controllable:No
Description:The names of the properties this material will have
- prop_valuesThe values associated with the named properties
C++ Type:std::vector<double>
Controllable:Yes
Description:The values associated with the named properties
GenericConstantMaterial
Declares material properties based on names and values prescribed by input parameters.
This can be used to quickly create simple constant material properties, for testing, for initial survey of a problem or simply because the material properties do not vary much over the domain explored by the simulation.
Example Input File Syntax
In this example, we create an GenericConstantMaterial
for the diffusion coefficient for this fluid flow simulation.
[Materials]
[./k]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity'
prop_values = '10' # in W/mK
[../]
[]
(test/tests/auxkernels/diffusion_flux/diffusion_flux.i)Input Parameters
- blockThe list of blocks (ids or names) that this object will be applied
C++ Type:std::vector<SubdomainName>
Controllable:No
Description:The list of blocks (ids or names) that this object will be applied
- boundaryThe list of boundaries (ids or names) from the mesh where this object applies
C++ Type:std::vector<BoundaryName>
Controllable:No
Description:The list of boundaries (ids or names) from the mesh where this object applies
- computeTrueWhen false, MOOSE will not call compute methods on this material. The user must call computeProperties() after retrieving the MaterialBase via MaterialBasePropertyInterface::getMaterialBase(). Non-computed MaterialBases are not sorted for dependencies.
Default:True
C++ Type:bool
Controllable:No
Description:When false, MOOSE will not call compute methods on this material. The user must call computeProperties() after retrieving the MaterialBase via MaterialBasePropertyInterface::getMaterialBase(). Non-computed MaterialBases are not sorted for dependencies.
- constant_onSUBDOMAINWhen ELEMENT, MOOSE will only call computeQpProperties() for the 0th quadrature point, and then copy that value to the other qps.When SUBDOMAIN, MOOSE will only call computeQpProperties() for the 0th quadrature point, and then copy that value to the other qps. Evaluations on element qps will be skipped
Default:SUBDOMAIN
C++ Type:MooseEnum
Options:NONE, ELEMENT, SUBDOMAIN
Controllable:No
Description:When ELEMENT, MOOSE will only call computeQpProperties() for the 0th quadrature point, and then copy that value to the other qps.When SUBDOMAIN, MOOSE will only call computeQpProperties() for the 0th quadrature point, and then copy that value to the other qps. Evaluations on element qps will be skipped
- declare_suffixAn optional suffix parameter that can be appended to any declared properties. The suffix will be prepended with a '_' character.
C++ Type:MaterialPropertyName
Controllable:No
Description:An optional suffix parameter that can be appended to any declared properties. The suffix will be prepended with a '_' character.
- prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
C++ Type:MaterialPropertyName
Controllable:No
Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
- use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Default:False
C++ Type:bool
Controllable:No
Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Optional Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:Yes
Description:Set the enabled status of the MooseObject.
- implicitTrueDetermines whether this object is calculated using an implicit or explicit form
Default:True
C++ Type:bool
Controllable:No
Description:Determines whether this object is calculated using an implicit or explicit form
- seed0The seed for the master random number generator
Default:0
C++ Type:unsigned int
Controllable:No
Description:The seed for the master random number generator
- use_displaced_meshFalseWhether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Default:False
C++ Type:bool
Controllable:No
Description:Whether or not this object should use the displaced mesh for computation. Note that in the case this is true but no displacements are provided in the Mesh block the undisplaced mesh will still be used.
Advanced Parameters
- output_propertiesList of material properties, from this material, to output (outputs must also be defined to an output type)
C++ Type:std::vector<std::string>
Controllable:No
Description:List of material properties, from this material, to output (outputs must also be defined to an output type)
- outputsnone Vector of output names where you would like to restrict the output of variables(s) associated with this object
Default:none
C++ Type:std::vector<OutputName>
Controllable:No
Description:Vector of output names where you would like to restrict the output of variables(s) associated with this object
Outputs Parameters
Input Files
- (modules/thermal_hydraulics/test/tests/components/heat_structure_plate/by_materials.i)
- (modules/phase_field/test/tests/anisotropic_interfaces/kobayashi.i)
- (modules/heat_transfer/test/tests/code_verification/cylindrical_test_no3.i)
- (modules/thermal_hydraulics/test/tests/materials/ad_wall_htc_gnielinski_annular/ad_wall_htc_gnielinski_annular.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad-rz-displacements.i)
- (test/tests/materials/generic_materials/generic_constant_material.i)
- (test/tests/executioners/eigen_convergence/a.i)
- (modules/combined/test/tests/phase_field_fracture/void2d_iso.i)
- (test/tests/materials/derivative_material_interface/ad_const.i)
- (modules/thermal_hydraulics/test/tests/components/heat_source_from_power_density/phy.conservation_from_file_3d.i)
- (test/tests/userobjects/layered_side_integral/layered_side_diffusive_flux_average_fv.i)
- (modules/combined/test/tests/eigenstrain/variable_cahnhilliard.i)
- (modules/heat_transfer/test/tests/joule_heating/transient_ad_jouleheating.i)
- (modules/navier_stokes/test/tests/finite_element/ins/pressure_channel/open_bc_pressure_BC_fieldSplit.i)
- (modules/thermal_hydraulics/test/tests/materials/ad_wall_heat_transfer_coefficient_schad/schad_test.i)
- (modules/phase_field/test/tests/feature_volume_vpp_test/centroid.i)
- (modules/combined/test/tests/phase_field_fracture/crack2d_vol_dev.i)
- (modules/phase_field/test/tests/phase_field_kernels/nonuniform_barrier_coefficient.i)
- (modules/navier_stokes/test/tests/finite_element/ins/energy_source/steady-var.i)
- (modules/solid_mechanics/test/tests/critical_time_step/crit_time_solid_variable.i)
- (modules/phase_field/test/tests/MultiPhase/lagrangemult.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialAnisotropyAntitrap.i)
- (test/tests/materials/has_material/has_boundary_prop.i)
- (modules/phase_field/test/tests/MultiSmoothCircleIC/latticesmoothcircleIC_small_invalue_test.i)
- (modules/heat_transfer/test/tests/NAFEMS/transient/T3/nafems_t3_edge_template.i)
- (modules/contact/test/tests/explicit_dynamics/first_test.i)
- (test/tests/restrictable/boundary_api_test/boundary_restrictable.i)
- (modules/combined/test/tests/misc/re_init_face.i)
- (modules/phase_field/test/tests/KKS_system/kks_example.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_by_parts_traction_steady_stabilized.i)
- (modules/heat_transfer/test/tests/code_verification/cylindrical_test_no4.i)
- (modules/phase_field/test/tests/ADCHSoretDiffusion/simple_transient_diffusion_with_soret.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/hcp_single_crystal/hcp_volumetric_eigenstrain.i)
- (modules/chemical_reactions/test/tests/aqueous_equilibrium/2species_with_density.i)
- (modules/optimization/test/tests/optimizationreporter/constant_heat_source/forward.i)
- (modules/navier_stokes/test/tests/finite_element/ins/rz-x-axial-coord/pipe-flow-natural-bc.i)
- (modules/heat_transfer/test/tests/truss_heat_conduction/block_w_bar.i)
- (modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_structure_3d/test.i)
- (test/tests/materials/get_material_property_names/get_material_property_any_boundary_id.i)
- (modules/solid_mechanics/test/tests/central_difference/consistent/3D/3d_consistent_implicit.i)
- (modules/heat_transfer/test/tests/code_verification/cylindrical_test_no2.i)
- (modules/navier_stokes/test/tests/finite_element/ins/scalar_adr/supg/advection_error_testing.i)
- (modules/porous_flow/test/tests/actions/multiblock.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_les.i)
- (modules/stochastic_tools/test/tests/surrogates/nearest_point/sub_vector.i)
- (test/tests/materials/discrete/recompute2.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_by_parts.i)
- (modules/phase_field/test/tests/ADCHSplitChemicalPotential/simple_transient_diffusion.i)
- (test/tests/materials/derivative_material_interface/additional_derivatives.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/RZ_cone_no_parts.i)
- (tutorials/darcy_thermo_mech/step05_heat_conduction/tests/bcs/outflow/outflow.i)
- (modules/thermal_hydraulics/test/tests/materials/ad_wall_heat_transfer_coefficient_wolf_mccarthy/test.i)
- (modules/solid_mechanics/test/tests/shell/dynamics/shell_dynamics_bending_moment_free_orientation_inclined_hht.i)
- (modules/thermal_hydraulics/test/tests/components/hs_coupler_2d3d/hs_coupler_2d3d.i)
- (modules/phase_field/examples/anisotropic_interfaces/GrandPotentialTwophaseAnisotropy.i)
- (modules/heat_transfer/test/tests/sideset_heat_transfer/cfem_gap.i)
- (modules/stochastic_tools/test/tests/reporters/mapping/map_sub.i)
- (test/tests/auxkernels/advection_flux/normal_advection_flux_fe.i)
- (modules/thermal_hydraulics/test/tests/postprocessors/element_integral_material_property_rz/element_integral_material_property_rz.i)
- (modules/optimization/test/tests/optimizationreporter/general_opt/point_loads_gen_opt/forward.i)
- (modules/solid_mechanics/test/tests/central_difference/consistent/2D/2d_consistent_implicit.i)
- (modules/phase_field/examples/slkks/CrFe.i)
- (test/tests/mortar/ad_periodic_segmental_constraint/penalty_periodic_checker2d.i)
- (test/tests/controls/tag_based_naming_access/object_param.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_by_parts_steady_stabilized.i)
- (modules/heat_transfer/test/tests/truss_heat_conduction/line.i)
- (modules/phase_field/test/tests/rigidbodymotion/grain_motion.i)
- (modules/solid_mechanics/test/tests/dynamics/acceleration_bc/AccelerationBC_test_ti.i)
- (modules/thermal_hydraulics/test/tests/materials/ad_prandtl_number/test.i)
- (modules/phase_field/examples/multiphase/GrandPotential3Phase_AD.i)
- (test/tests/materials/discrete/recompute_no_calc.i)
- (modules/solid_mechanics/examples/coal_mining/cosserat_mc_wp.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_no_parts_steady_stabilized_second_order.i)
- (modules/navier_stokes/test/tests/finite_element/ins/energy-conservation/q1q1.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/mixed-transient-steady/mixed.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_by_parts_steady_stabilized_second_order.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/closed_gap_prescribed_pressure.i)
- (modules/chemical_reactions/test/tests/aqueous_equilibrium/co2_h2o.i)
- (modules/thermal_hydraulics/test/tests/components/heat_structure_from_file_3d/phy.standalone.i)
- (modules/solid_mechanics/test/tests/inertial_torque/simple.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/steady_vector_fsp.i)
- (modules/stochastic_tools/examples/parameter_study/diffusion_vector.i)
- (modules/phase_field/test/tests/MultiSmoothCircleIC/multismoothcircleIC_normal_test.i)
- (test/tests/kernels/ad_mat_diffusion/ad_2d_steady_state.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_3d/jac.1phase.i)
- (modules/thermal_hydraulics/test/tests/materials/ad_wall_heat_transfer_coefficient_3eqn_dittus_boelter/test.i)
- (modules/heat_transfer/test/tests/radiation_transfer_action/cavity_with_pillar_vf.i)
- (modules/phase_field/examples/cahn-hilliard/Parsed_CH.i)
- (modules/thermal_hydraulics/test/tests/materials/ad_convection_heat_flux/ad_convection_heat_flux.i)
- (modules/stochastic_tools/examples/surrogates/polynomial_regression/sub.i)
- (test/tests/vectorpostprocessors/material_vector_postprocessor/block-restrict-err.i)
- (modules/phase_field/examples/rigidbodymotion/grain_motion_GT.i)
- (modules/phase_field/test/tests/free_energy_material/MathEBFreeEnergy_split.i)
- (modules/phase_field/examples/cahn-hilliard/Parsed_SplitCH.i)
- (test/tests/mortar/displaced-gap-conductance-2d-bnd-coupling/gap-conductance-bnd-material.i)
- (tutorials/darcy_thermo_mech/step04_velocity_aux/tests/auxkernels/velocity_aux/velocity_aux.i)
- (modules/phase_field/test/tests/conserved_noise/integral.i)
- (modules/combined/test/tests/additive_manufacturing/check_stateful_properties.i)
- (modules/combined/examples/mortar/eigenstrain_action.i)
- (test/tests/vectorpostprocessors/extra_id_integral/extra_id_vpp.i)
- (modules/heat_transfer/test/tests/radiative_bcs/ad_radiative_bc_cyl.i)
- (test/tests/userobjects/mat_prop_user_object/mat_prop_user_object.i)
- (modules/contact/test/tests/mortar_dynamics/block-dynamics-reference.i)
- (test/tests/mortar/ad_periodic_segmental_constraint/testperiodicsole.i)
- (modules/navier_stokes/test/tests/finite_element/ins/coupled-force/steady-action.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_action.i)
- (modules/xfem/test/tests/moving_interface/moving_diffusion.i)
- (modules/electromagnetics/test/tests/interfacekernels/electrostatic_contact/analytic_solution_test_three_block.i)
- (modules/phase_field/test/tests/MultiPhase/acmultiinterface.i)
- (modules/solid_mechanics/test/tests/dynamics/wave_1D/wave_newmark.i)
- (modules/chemical_reactions/test/tests/exceptions/missing_sto2.i)
- (modules/optimization/test/tests/optimizationreporter/bc_load_linearFunction/forward_and_adjoint.i)
- (modules/combined/examples/phase_field-mechanics/kks_mechanics_KHS.i)
- (test/tests/controls/syntax_based_naming_access/param.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_htonly/gap_heat_transfer_htonly_test.i)
- (modules/heat_transfer/tutorials/introduction/therm_step03a.i)
- (modules/heat_transfer/test/tests/code_verification/cylindrical_test_no1.i)
- (test/tests/interfacekernels/hybrid/interface.i)
- (modules/heat_transfer/test/tests/code_verification/cartesian_test_no4.i)
- (test/tests/misc/line_source/line_source.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven_action.i)
- (modules/stochastic_tools/test/tests/userobjects/inverse_mapping/inverse_map.i)
- (modules/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-vel.i)
- (modules/solid_mechanics/test/tests/dynamics/wave_1D/wave_rayleigh_hht_ti.i)
- (modules/combined/test/tests/phase_field_fracture/crack2d_iso.i)
- (modules/chemical_reactions/test/tests/exceptions/missing_sto.i)
- (modules/phase_field/test/tests/actions/gpm_kernel.i)
- (tutorials/darcy_thermo_mech/step05_heat_conduction/problems/step5b_transient.i)
- (modules/navier_stokes/test/tests/finite_element/ins/coupled-force/steady-function.i)
- (modules/xfem/test/tests/moving_interface/verification/1D_rz_lsdep1mat.i)
- (test/tests/kernels/simple_transient_diffusion/ill_conditioned_simple_diffusion.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_by_parts_traction_steady_stabilized.i)
- (modules/optimization/test/tests/outputs/exodus_optimization_steady/forward_and_adjoint_iteration_output.i)
- (modules/phase_field/test/tests/MultiPhase/switchingfunctionmultiphasematerial.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_action_stabilized_steady.i)
- (test/tests/controls/output/controllable.i)
- (modules/combined/examples/optimization/three_materials.i)
- (modules/phase_field/examples/nucleation/refine.i)
- (modules/heat_transfer/test/tests/heat_conduction_ortho/heat_conduction_ortho.i)
- (test/tests/materials/material/adv_mat_couple_test2.i)
- (modules/navier_stokes/test/tests/finite_element/ins/block-restriction/one-mat-two-eqn-sets.i)
- (modules/thermal_hydraulics/test/tests/materials/ad_wall_heat_transfer_coefficient_gnielinski/gnielinski_test.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_stabilized.i)
- (modules/optimization/test/tests/optimizationreporter/bc_load_linearFunction/homogeneous_forward.i)
- (modules/navier_stokes/test/tests/finite_element/ins/rz-x-axial-coord/pipe-flow.i)
- (modules/optimization/test/tests/optimizationreporter/point_loads/forward.i)
- (modules/optimization/test/tests/optimizationreporter/general_opt/point_loads_gen_opt/forward_and_adjoint.i)
- (modules/combined/test/tests/surface_tension_KKS/surface_tension_KKS.i)
- (modules/fluid_properties/test/tests/materials/ad_surface_tension_material/ad_surface_tension_material.i)
- (modules/fsi/test/tests/2d-small-strain-transient/ad-fsi-flat-channel.i)
- (modules/xfem/test/tests/moving_interface/verification/1D_xy_discrete2mat.i)
- (modules/navier_stokes/test/tests/auxkernels/peclet-number-functor-aux/fe-thermal.i)
- (modules/phase_field/test/tests/rigidbodymotion/grain_forcesum.i)
- (test/tests/materials/boundary_material/elem_aux_bc_on_bnd.i)
- (test/tests/problems/verbose_setup/sample.i)
- (modules/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-wear.i)
- (test/tests/materials/derivative_material_interface/multiblock.i)
- (modules/heat_transfer/test/tests/verify_against_analytical/2d_steady_state.i)
- (modules/heat_transfer/test/tests/radiative_bcs/ad_function_radiative_bc.i)
- (modules/combined/test/tests/phase_field_fracture/crack2d_linear_fracture_energy.i)
- (modules/solid_mechanics/test/tests/critical_time_step/crit_time_solid_uniform.i)
- (modules/navier_stokes/test/tests/finite_element/ins/boussinesq/benchmark/benchmark.i)
- (modules/optimization/test/tests/optimizationreporter/general_opt/point_loads_gen_opt/adjoint.i)
- (modules/navier_stokes/test/tests/finite_element/ins/velocity_channel/velocity_inletBC_no_parts.i)
- (modules/solid_mechanics/test/tests/rom_stress_update/creep_ramp_sub_true.i)
- (tutorials/darcy_thermo_mech/step05_heat_conduction/problems/step5c_outflow.i)
- (modules/solid_mechanics/test/tests/central_difference/consistent/2D/2d_consistent_explicit.i)
- (modules/navier_stokes/test/tests/finite_element/ins/block-restriction/two-mats-two-eqn-sets.i)
- (test/tests/restrictable/block_api_test/block_restrictable.i)
- (modules/combined/examples/optimization/multi-load/square_subapp_one.i)
- (modules/stochastic_tools/examples/parameter_study/diffusion_time.i)
- (modules/optimization/test/tests/optimizationreporter/general_opt/point_loads_gen_opt/forward_and_adjoint_transfer_data.i)
- (test/tests/restrictable/check_error/check_error.i)
- (modules/heat_transfer/test/tests/truss_heat_conduction/rectangle_w_strip.i)
- (modules/thermal_hydraulics/test/tests/materials/prandtl_number/test.i)
- (test/tests/problems/no_material_dependency_check/no_material_coverage_check.i)
- (modules/phase_field/test/tests/initial_conditions/SpecifiedSmoothSuperellipsoidIC.i)
- (modules/navier_stokes/test/tests/finite_element/ins/wall_convection/steady-action.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/steady_fsp.i)
- (modules/phase_field/test/tests/phase_field_kernels/SimpleSplitCHWRes.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_htonly/gap_heat_transfer_htonly_it_plot_test.i)
- (test/tests/materials/declare_overlap/error.i)
- (modules/phase_field/test/tests/initial_conditions/SmoothCircleIC_3D.i)
- (modules/phase_field/test/tests/conserved_noise/normal.i)
- (modules/solid_mechanics/test/tests/jacobian_damper/block_restriction.i)
- (modules/phase_field/test/tests/MultiSmoothCircleIC/specifiedsmoothcircleIC_test.i)
- (modules/solid_mechanics/examples/bridge/bridge_large_strain.i)
- (modules/solid_mechanics/examples/cframe_iga/cframe_iga.i)
- (test/tests/meshgenerators/subdomain_bounding_box_generator/subdomain_bounding_box_generator_outside.i)
- (test/tests/mortar/periodic_segmental_constraint/testperiodicsole.i)
- (test/tests/outputs/debug/show_material_props_consumed.i)
- (test/tests/materials/material/three_coupled_mat_test.i)
- (modules/heat_transfer/test/tests/multiple_contact_pairs/multiple_contact_pairs.i)
- (test/tests/mesh/named_entities/named_entities_test_xda.i)
- (modules/stochastic_tools/test/tests/surrogates/poly_chaos/sub.i)
- (modules/xfem/test/tests/moving_interface/verification/2D_rz_homog1mat.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_radiation_test.i)
- (test/tests/userobjects/layered_side_integral/layered_side_diffusive_flux_average.i)
- (modules/solid_mechanics/test/tests/dynamics/wave_1D/wave_rayleigh_newmark.i)
- (modules/stochastic_tools/test/tests/functions/drl_reward/drl_reward.i)
- (modules/chemical_reactions/test/tests/aqueous_equilibrium/2species_without_action.i)
- (modules/solid_mechanics/test/tests/action/composite_eigenstrain.i)
- (modules/navier_stokes/test/tests/finite_element/ins/jeffery_hamel/wedge_natural.i)
- (modules/phase_field/test/tests/free_energy_material/MathEBFreeEnergy_split_name.i)
- (modules/phase_field/test/tests/rigidbodymotion/grain_maskedforce.i)
- (modules/xfem/test/tests/switching_material/one_cut_moving_using_mesh_cut.i)
- (modules/combined/examples/stochastic/graphite_ring_thermomechanics.i)
- (test/tests/materials/material/material_check_test.i)
- (modules/heat_transfer/test/tests/code_verification/spherical_test_no2.i)
- (modules/combined/examples/optimization/multi-load/square_main.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_by_parts_steady.i)
- (modules/stochastic_tools/examples/sobol/diffusion.i)
- (modules/combined/examples/publications/rapid_dev/fig7b.i)
- (modules/thermal_hydraulics/test/tests/components/heat_source_from_total_power/phy.conservation_from_file_3d.i)
- (modules/contact/test/tests/mortar_dynamics/block-dynamics-friction.i)
- (modules/xfem/test/tests/moving_interface/verification/1D_xy_lsdep1mat.i)
- (modules/phase_field/test/tests/GBType/GB_Type_Phase2.i)
- (modules/navier_stokes/test/tests/postprocessors/flow_rates/conservation_INSFE.i)
- (modules/solid_mechanics/test/tests/capped_weak_plane/push_and_shear.i)
- (modules/heat_transfer/test/tests/radiative_bcs/function_radiative_bc.i)
- (modules/phase_field/test/tests/SplitCH/split_math_test.i)
- (modules/chemical_reactions/test/tests/exceptions/missing_gamma2.i)
- (modules/phase_field/test/tests/phase_field_kernels/ADAllenCahn.i)
- (modules/combined/test/tests/optimization/compliance_sensitivity/paper_three_materials_test.i)
- (modules/chemical_reactions/test/tests/jacobian/2species_equilibrium.i)
- (modules/navier_stokes/test/tests/finite_element/ins/scalar_adr/supg/tauOpt.i)
- (modules/chemical_reactions/test/tests/exceptions/missing_gamma.i)
- (modules/combined/tutorials/introduction/thermal_mechanical/thermomech_step01.i)
- (modules/combined/test/tests/optimization/compliance_sensitivity/2d_mmb_2material.i)
- (modules/navier_stokes/test/tests/finite_element/ins/velocity_channel/ad-traction-supg.i)
- (modules/phase_field/test/tests/phase_field_kernels/AllenCahn.i)
- (modules/functional_expansion_tools/examples/2D_interface/main.i)
- (modules/functional_expansion_tools/examples/3D_volumetric_cylindrical_subapp_mesh_refine/main.i)
- (test/tests/problems/no_material_coverage_check/no_material_coverage_check.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/navier_stokes/test/tests/finite_element/ins/jacobian_test/jacobian_stabilized_test.i)
- (modules/solid_mechanics/test/tests/central_difference/consistent/3D/3d_consistent_explicit.i)
- (modules/phase_field/test/tests/SimpleACInterface/SimpleCoupledACInterface.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven_chorin.i)
- (modules/thermal_hydraulics/test/tests/closures/none_1phase/phy.test.i)
- (modules/navier_stokes/test/tests/finite_element/ins/boussinesq/boussinesq_square.i)
- (modules/solid_mechanics/test/tests/dynamics/wave_1D/wave_hht.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_stabilized_with_temp.i)
- (modules/combined/examples/xfem/xfem_thermomechanics_stress_growth.i)
- (modules/combined/test/tests/phase_field_fracture/crack2d_vi_solver.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_radiation/gap_heat_transfer_radiation_test.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_no_parts_steady_nobcbc.i)
- (modules/solid_mechanics/test/tests/critical_time_step/non-isotropic_error_test.i)
- (test/tests/controls/output/controllable_clear.i)
- (modules/functional_expansion_tools/examples/2D_interface_different_submesh/sub.i)
- (modules/navier_stokes/test/tests/finite_element/ins/mms/pspg/pspg_mms_test.i)
- (modules/solid_mechanics/test/tests/inertial_torque/residual.i)
- (modules/stochastic_tools/examples/parameter_study/diffusion.i)
- (modules/heat_transfer/test/tests/fvbcs/fv_thermal_resistance/test.i)
- (modules/porous_flow/test/tests/actions/addmaterials2.i)
- (test/tests/quadrature/order/material_with_order.i)
- (modules/combined/examples/optimization/2d_mbb_pde_amr.i)
- (modules/chemical_reactions/test/tests/aqueous_equilibrium/water_dissociation.i)
- (modules/thermal_hydraulics/test/tests/components/hs_boundary_ambient_convection/from_file_3d.i)
- (test/tests/constraints/overwrite_variables/test_balance.i)
- (test/tests/kernels/ad_mat_diffusion/ad_1D_transient.i)
- (modules/navier_stokes/test/tests/finite_element/ins/energy_source/steady.i)
- (modules/chemical_reactions/test/tests/solid_kinetics/calcite_precipitation.i)
- (modules/phase_field/test/tests/initial_conditions/SmoothSuperellipsoidIC.i)
- (modules/electromagnetics/test/tests/auxkernels/current_density/current_density.i)
- (modules/combined/test/tests/phase_field_fracture/crack2d_iso_wo_time.i)
- (modules/thermal_hydraulics/test/tests/materials/wall_friction_factor/churchill.i)
- (modules/heat_transfer/test/tests/code_verification/spherical_test_no3.i)
- (modules/contact/test/tests/explicit_dynamics/settlement.i)
- (modules/solid_mechanics/test/tests/gravity/gravity_test.i)
- (modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_dual_material.i)
- (test/tests/materials/discrete/recompute_boundary_error.i)
- (modules/thermal_hydraulics/test/tests/materials/ad_convective_heat_transfer_coefficient/test.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_no_parts_steady_nobcbc.i)
- (tutorials/darcy_thermo_mech/step05_heat_conduction/problems/step5a_steady.i)
- (modules/navier_stokes/test/tests/finite_element/ins/boussinesq/boussinesq_square_constant_names.i)
- (modules/solid_mechanics/test/tests/beam/dynamic/dyn_timoshenko_small.i)
- (modules/phase_field/test/tests/free_energy_material/MathFreeEnergy.i)
- (modules/porous_flow/examples/coal_mining/coarse_with_fluid.i)
- (modules/phase_field/test/tests/phase_field_kernels/SplitCahnHilliard.i)
- (modules/solid_mechanics/test/tests/critical_time_step/timoshenko_smallstrain_critstep.i)
- (modules/stochastic_tools/test/tests/surrogates/polynomial_regression/sub_vector.i)
- (test/tests/materials/derivative_material_interface/ad_multiblock.i)
- (test/tests/outputs/debug/show_material_props.i)
- (modules/chemical_reactions/test/tests/exceptions/extra_sto.i)
- (modules/chemical_reactions/test/tests/aqueous_equilibrium/1species_without_action.i)
- (modules/chemical_reactions/test/tests/jacobian/2species_equilibrium_with_density.i)
- (modules/xfem/test/tests/moving_interface/verification/1D_rz_homog1mat.i)
- (modules/functional_expansion_tools/examples/3D_volumetric_Cartesian_direct/main.i)
- (modules/chemical_reactions/test/tests/aqueous_equilibrium/2species_eqaux.i)
- (modules/combined/examples/thermomechanics/circle_thermal_expansion_stress.i)
- (modules/contact/test/tests/mortar_dynamics/frictional-mortar-3d-dynamics.i)
- (modules/combined/test/tests/phase_field_fracture/crack2d_aniso_cleavage_plane.i)
- (modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_single_material.i)
- (modules/solid_mechanics/examples/coal_mining/cosserat_mc_only.i)
- (modules/heat_transfer/test/tests/postprocessors/convective_ht_side_integral.i)
- (modules/combined/test/tests/optimization/optimization_density_update/top_opt_3d.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/steady_vector_fsp_elman.i)
- (test/tests/materials/has_material/has_block_prop.i)
- (test/tests/misc/check_error/missing_material_prop_test.i)
- (modules/solid_mechanics/test/tests/dynamics/prescribed_displacement/3D_QStatic_1_Ramped_Displacement_ti.i)
- (modules/heat_transfer/tutorials/introduction/therm_step03.i)
- (modules/thermal_hydraulics/test/tests/postprocessors/heat_rate_conduction_rz/heat_rate_conduction_rz.i)
- (modules/navier_stokes/test/tests/finite_element/ins/jeffery_hamel/wedge_dirichlet.i)
- (modules/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-fretting-wear-test-projection_angle.i)
- (modules/chemical_reactions/test/tests/aqueous_equilibrium/2species.i)
- (modules/stochastic_tools/test/tests/surrogates/pod_rb/internal/sub.i)
- (modules/phase_field/test/tests/mobility_derivative/mobility_derivative_direct_coupled_test.i)
- (modules/contact/test/tests/mortar_dynamics/frictional-mortar-3d-dynamics-light.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/transient_fsp.i)
- (modules/xfem/test/tests/switching_material/one_cut_moving.i)
- (modules/optimization/test/tests/executioners/constrained/inequality/forward_and_adjoint.i)
- (modules/heat_transfer/test/tests/thin_layer_heat_transfer/transient_3d.i)
- (modules/navier_stokes/test/tests/finite_element/ins/coupled-force/gravity-through-coupled-force-action.i)
- (modules/thermal_hydraulics/test/tests/materials/ad_material_function_product/ad_material_function_product.i)
- (modules/porous_flow/examples/tidal/atm_tides.i)
- (modules/solid_mechanics/test/tests/dynamics/prescribed_displacement/3D_QStatic_1_Ramped_Displacement.i)
- (modules/functional_expansion_tools/examples/3D_volumetric_Cartesian_different_submesh/main.i)
- (modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_single_material_insulated.i)
- (modules/solid_mechanics/test/tests/shell/dynamics/shell_dynamics_bending_moment.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/scalar_adr/supg/2d_advection_error_testing.i)
- (modules/phase_field/examples/anisotropic_interfaces/GrandPotentialSolidification.i)
- (test/tests/dgkernels/2d_diffusion_dg/dg_stateful.i)
- (modules/solid_mechanics/test/tests/dynamics/linear_constraint/disp_mid.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/porous-hllc.i)
- (modules/functional_expansion_tools/examples/2D_interface/sub.i)
- (modules/xfem/test/tests/moving_interface/verification/2D_rz_lsdep1mat.i)
- (test/tests/kernels/array_kernels/standard_save_in.i)
- (modules/phase_field/test/tests/anisotropic_mobility/split.i)
- (modules/phase_field/test/tests/rigidbodymotion/grain_appliedforcedensity.i)
- (modules/heat_transfer/test/tests/verify_against_analytical/1D_transient.i)
- (modules/heat_transfer/test/tests/NAFEMS/transient/T3/nafems_t3_hex_template.i)
- (test/tests/interfacekernels/1d_interface/coupled_value_coupled_flux_with_jump_material.i)
- (modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_transfer_from_heat_structure_3d/test.i)
- (modules/navier_stokes/test/tests/finite_volume/ins/boussinesq/wcnsfv.i)
- (test/tests/controls/tag_based_naming_access/system_object_param.i)
- (modules/thermal_hydraulics/test/tests/materials/ad_wall_heat_transfer_coefficient_lyon/lyon_test.i)
- (modules/navier_stokes/test/tests/finite_element/ins/boussinesq/boussinesq_stabilized_action.i)
- (modules/combined/test/tests/phase_field_fracture/crack2d_iso_with_pressure.i)
- (modules/chemical_reactions/test/tests/parser/kinetic_without_action.i)
- (modules/thermal_hydraulics/test/tests/materials/ad_wall_heat_transfer_coefficient_weisman/weisman_test.i)
- (modules/solid_mechanics/test/tests/dynamics/time_integration/hht_test_ti.i)
- (modules/heat_transfer/test/tests/sideset_heat_transfer/gap_thermal_ktemp_1D.i)
- (modules/phase_field/examples/rigidbodymotion/AC_CH_advection_constforce_rect.i)
- (test/tests/interfacekernels/1d_interface/coupled_value_coupled_flux.i)
- (modules/thermal_hydraulics/test/tests/materials/ad_reynolds_number/test.i)
- (modules/solid_mechanics/test/tests/dynamics/time_integration/newmark.i)
- (modules/xfem/test/tests/moving_interface/verification/2D_xy_lsdep1mat.i)
- (modules/porous_flow/test/tests/jacobian/linear_por.i)
- (modules/stochastic_tools/test/tests/transfers/libtorch_nn_transfer/libtorch_drl_control_sub.i)
- (modules/heat_transfer/test/tests/truss_heat_conduction/rectangle_w_line.i)
- (modules/chemical_reactions/test/tests/aqueous_equilibrium/1species.i)
- (test/tests/materials/discrete/recompute_warning.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_no_parts_steady_stabilized.i)
- (modules/combined/examples/periodic_strain/global_strain_pfm_3D.i)
- (modules/chemical_reactions/test/tests/parser/equilibrium_action.i)
- (modules/solid_mechanics/test/tests/central_difference/lumped/1D/1d_lumped_explicit.i)
- (test/tests/materials/discrete/reset_warning.i)
- (modules/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-fretting-wear-test.i)
- (modules/fsi/test/tests/2d-finite-strain-steady/thermal-me.i)
- (modules/contact/test/tests/mortar_dynamics/block-dynamics-friction-creep.i)
- (modules/chemical_reactions/test/tests/aqueous_equilibrium/calcium_bicarbonate.i)
- (modules/combined/test/tests/optimization/optimization_density_update/top_opt_2d.i)
- (modules/combined/examples/phase_field-mechanics/Conserved.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_by_parts_steady_nobcbc.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_htonly/gap_heat_transfer_htonly_rz_test.i)
- (modules/phase_field/examples/anisotropic_interfaces/GrandPotentialPlanarGrowth.i)
- (modules/solid_mechanics/test/tests/poro/vol_expansion.i)
- (modules/navier_stokes/test/tests/finite_element/ins/pressure_channel/open_bc_pressure_BC.i)
- (modules/fsi/test/tests/fsi_acoustics/1D_fluid_only/1D_fluid_only.i)
- (modules/electromagnetics/test/tests/interfacekernels/electrostatic_contact/contact_conductance_supplied.i)
- (modules/navier_stokes/test/tests/finite_element/ins/block-restriction/two-mats-one-eqn-set.i)
- (modules/phase_field/examples/anisotropic_interfaces/ad_snow.i)
- (modules/heat_transfer/test/tests/sideset_heat_transfer/gap_thermal_1D.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven_stabilized_action.i)
- (modules/solid_mechanics/examples/bridge/bridge.i)
- (modules/chemical_reactions/test/tests/desorption/langmuir_lumping_problem.i)
- (test/tests/controls/moose_base_naming_access/base_object_param.i)
- (modules/functional_expansion_tools/examples/3D_volumetric_Cartesian/main.i)
- (test/tests/controls/tag_based_naming_access/system_asterisk_param.i)
- (modules/misc/test/tests/dynamic_loading/dynamic_load_multiapp/phase_field_sub.i)
- (modules/stochastic_tools/examples/surrogates/gaussian_process/sub.i)
- (modules/combined/examples/phase_field-mechanics/kks_mechanics_VTS.i)
- (modules/heat_transfer/test/tests/semiconductor_linear_conductivity/steinhart-hart_linear.i)
- (modules/phase_field/test/tests/phase_field_kernels/CahnHilliard.i)
- (modules/combined/examples/phase_field-mechanics/Pattern1.i)
- (test/tests/misc/check_error/nodal_value_off_block.i)
- (modules/stochastic_tools/examples/surrogates/sub.i)
- (modules/solid_mechanics/test/tests/central_difference/consistent/3D/3d_consistent_explicit_mass_scaling.i)
- (modules/phase_field/test/tests/rigidbodymotion/update_orientation_verify.i)
- (modules/xfem/test/tests/moving_interface/verification/2D_xy_homog1mat.i)
- (modules/navier_stokes/examples/laser-welding/3d.i)
- (test/tests/misc/check_error/missing_coupled_mat_prop_test.i)
- (modules/phase_field/test/tests/initial_conditions/SmoothCircleIC.i)
- (modules/navier_stokes/test/tests/finite_element/ins/cg-dg-hybrid/mms/lid-driven-skewed/hybrid-skewed-vortex.i)
- (modules/misc/test/tests/dynamic_loading/dynamic_obj_registration/dynamic_objects.i)
- (modules/heat_transfer/test/tests/radiative_bcs/radiative_bc_cyl.i)
- (modules/navier_stokes/test/tests/finite_element/ins/wall_convection/steady.i)
- (test/tests/misc/check_error/missing_material_prop_test2.i)
- (modules/xfem/test/tests/switching_material/two_cuts_moving.i)
- (modules/contact/test/tests/mortar_dynamics/frictional-mortar-3d-dynamics-light-function.i)
- (modules/thermal_hydraulics/test/tests/materials/ad_wall_heat_transfer_coefficient_mikityuk/mikityuk_test.i)
- (test/tests/materials/derivative_material_interface/const.i)
- (modules/phase_field/examples/grain_growth/grain_growth_linearized_interface.i)
- (modules/xfem/test/tests/moving_interface/phase_transition_3d.i)
- (modules/porous_flow/examples/coal_mining/fine_with_fluid.i)
- (modules/electromagnetics/test/tests/interfacekernels/electrostatic_contact/analytic_solution_test_two_block.i)
- (modules/contact/test/tests/mortar_dynamics/block-dynamics.i)
- (modules/heat_transfer/test/tests/thin_layer_heat_transfer/steady_3d.i)
- (modules/combined/examples/publications/rapid_dev/fig7a.i)
- (modules/heat_transfer/test/tests/code_verification/spherical_test_no4.i)
- (modules/phase_field/examples/multiphase/GrandPotential3Phase_masscons.i)
- (modules/optimization/test/tests/optimizationreporter/point_loads/adjoint.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_stabilized_with_temp_transient.i)
- (modules/porous_flow/test/tests/actions/addmaterials.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/cp_eigenstrains/volumetric_eigenstrain_increase.i)
- (test/tests/materials/discrete/recompute_block_error.i)
- (modules/chemical_reactions/test/tests/solid_kinetics/2species.i)
- (modules/solid_mechanics/test/tests/rom_stress_update/creep_ramp_sub_false.i)
- (test/tests/interfacekernels/1d_interface/reaction_1D_transient.i)
- (modules/combined/test/tests/break_mesh_interface_contact/break_mesh_interface_contact.i)
- (modules/contact/test/tests/cohesive_zone_model/bilinear_mixed_mortar_only_czm.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven_split.i)
- (test/tests/materials/material/coupled_material_test.i)
- (modules/heat_transfer/test/tests/truss_heat_conduction/strip.i)
- (modules/phase_field/test/tests/MultiPhase/penalty.i)
- (test/tests/vectorpostprocessors/material_vector_postprocessor/boundary-err.i)
- (modules/optimization/test/tests/optimizationreporter/constant_heat_source/adjoint.i)
- (modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/creep.i)
- (test/tests/mortar/displaced-gap-conductance-2d-bnd-coupling/gap-conductance.i)
- (modules/stochastic_tools/test/tests/userobjects/inverse_mapping/sub.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven.i)
- (modules/navier_stokes/test/tests/finite_element/ins/stagnation/stagnation.i)
- (modules/fsi/test/tests/fsi_acoustics/wave_height_bc/wave_height_bc.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_htonly/gap_heat_transfer_htonly_syntax.i)
- (modules/fluid_properties/test/tests/materials/ad_saturation_temperature_material/ad_saturation_temperature_material.i)
- (modules/combined/test/tests/optimization/compliance_sensitivity/2d_mbb.i)
- (modules/solid_mechanics/test/tests/rom_stress_update/creep_ramp_sub_false_more_steps.i)
- (modules/phase_field/test/tests/free_energy_material/MathCTDFreeEnergy_split.i)
- (test/tests/materials/ad_material/ad_stateful_material.i)
- (test/tests/postprocessors/interface_value/interface_fv_variable_value_postprocessor.i)
- (test/tests/misc/rename-parameters/rename-mat-prop.i)
- (modules/chemical_reactions/test/tests/exceptions/extra_gamma.i)
- (modules/phase_field/test/tests/mobility_derivative/mobility_derivative_direct_test.i)
- (modules/chemical_reactions/test/tests/jacobian/coupled_diffreact.i)
- (modules/combined/examples/publications/rapid_dev/fig6.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_htonly/planar_xy.i)
- (modules/thermal_hydraulics/test/tests/jacobians/kernels/one_d_energy_wall_heating.i)
- (modules/navier_stokes/test/tests/finite_element/ins/cg-dg-hybrid/lid-driven/hybrid-cg-dg.i)
- (modules/phase_field/test/tests/initial_conditions/CrossIC.i)
- (modules/phase_field/test/tests/MultiPhase/acmultiinterface_aux.i)
- (test/tests/meshgenerators/subdomain_bounding_box_generator/subdomain_bounding_box_generator_inside.i)
- (modules/solid_mechanics/test/tests/dynamics/wave_1D/wave_rayleigh_hht.i)
- (modules/phase_field/examples/multiphase/DerivativeMultiPhaseMaterial.i)
- (modules/navier_stokes/test/tests/finite_element/ins/rz-x-axial-coord/hand-coded-jac-pipe-flow.i)
- (modules/combined/test/tests/optimization/invOpt_bc_convective/forward.i)
- (test/tests/auxkernels/diffusion_flux/diffusion_flux.i)
- (modules/combined/test/tests/phase_field_fracture/crack2d_computeCrackedStress_smallstrain.i)
- (modules/combined/examples/publications/rapid_dev/fig8.i)
- (modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_dual_material_insulated.i)
- (modules/combined/test/tests/phase_field_fracture/crack2d_computeCrackedStress_finitestrain_plastic.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/closed_gap_thermomechanical_mortar_contact.i)
- (modules/stochastic_tools/test/tests/surrogates/cross_validation/sub_vector.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_by_parts_steady_stabilized_second_order.i)
- (modules/solid_mechanics/test/tests/jacobian/inertial_torque.i)
- (modules/navier_stokes/test/tests/finite_element/ins/mms/supg/supg_adv_dominated_mms.i)
- (modules/stochastic_tools/test/tests/reporters/BFActiveLearning/sub.i)
- (modules/phase_field/examples/anisotropic_interfaces/snow.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_by_parts_steady_stabilized.i)
- (modules/navier_stokes/test/tests/finite_element/ins/pressure_channel/open_bc_pressure_BC_action.i)
- (test/tests/mesh/named_entities/named_entities_test.i)
- (modules/thermal_hydraulics/test/tests/auxkernels/convective_heat_flux_1phase/test.i)
- (test/tests/materials/get_material_property_names/get_material_property_any_block_id.i)
- (modules/thermal_hydraulics/test/tests/components/hs_boundary_heat_flux/from_file_3d.i)
- (modules/fsi/test/tests/2d-small-strain-transient/fsi_flat_channel.i)
- (modules/phase_field/test/tests/rigidbodymotion/polycrystal_action.i)
- (test/tests/controls/syntax_based_naming_access/object_param.i)
- (modules/chemical_reactions/test/tests/jacobian/primary_convection.i)
- (modules/solid_mechanics/test/tests/gravity/block-gravity-kinetic-energy.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_mean_zero_pressure.i)
- (modules/heat_transfer/test/tests/homogenization/homogenize_tc_hex.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/RZ_cone_stab_jac_test.i)
- (modules/phase_field/test/tests/MultiPhase/crosstermfreeenergy.i)
- (modules/navier_stokes/test/tests/finite_element/ins/jacobian_test/jacobian_test.i)
- (modules/electromagnetics/test/tests/auxkernels/current_density/error_test.i)
- (modules/navier_stokes/test/tests/finite_element/ins/cg-dg-hybrid/channel-flow/channel-hybrid.i)
- (modules/combined/examples/optimization/thermomechanical/thermal_sub.i)
- (modules/heat_transfer/test/tests/code_verification/spherical_test_no5.i)
- (modules/solid_mechanics/test/tests/poro/vol_expansion_action.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/small-2d/multi_component_mortar_thermal_conduction.i)
- (test/tests/dgkernels/adaptivity/adaptivity.i)
- (modules/combined/examples/optimization/multi-load/single_main.i)
- (modules/phase_field/examples/rigidbodymotion/AC_CH_Multigrain.i)
- (modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_structure_3d/steady_state.i)
- (modules/phase_field/test/tests/TotalFreeEnergy/TotalFreeEnergy_test.i)
- (test/tests/thewarehouse/test1.i)
- (modules/phase_field/test/tests/KKS_system/kks_multiphase.i)
- (modules/stochastic_tools/test/tests/variablemappings/pod_mapping/sub.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_no_parts.i)
- (modules/phase_field/test/tests/KKS_system/two_phase.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven.i)
- (modules/phase_field/test/tests/MultiPhase/derivativetwophasematerial.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_htonly/gap_heat_transfer_htonly_rspherical.i)
- (modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_offset_single_material_insulated.i)
- (modules/combined/test/tests/phase_field_fracture/crack2d_no_split.i)
- (modules/solid_mechanics/test/tests/capped_weak_plane/pull_and_shear.i)
- (test/tests/controls/tag_based_naming_access/param.i)
- (modules/combined/test/tests/surface_tension_KKS/surface_tension_VDWgas.i)
- (test/tests/postprocessors/side_diffusive_flux_integral/side_diffusive_flux_integral.i)
- (modules/heat_transfer/test/tests/verify_against_analytical/ad_1D_transient.i)
- (modules/phase_field/test/tests/MultiPhase/mixedswitchingfunctionmaterial.i)
- (modules/combined/examples/periodic_strain/global_strain_pfm.i)
- (modules/thermal_hydraulics/test/tests/materials/convective_heat_transfer_coefficient/test.i)
- (modules/stochastic_tools/test/tests/multiapps/batch_commandline_control/sub.i)
- (modules/misc/test/tests/dynamic_loading/dynamic_obj_registration/dynamic_wrong_lib.i)
- (modules/navier_stokes/test/tests/finite_element/ins/boussinesq/boussinesq_stabilized.i)
- (modules/xfem/test/tests/moving_interface/moving_ad_diffusion.i)
- (modules/phase_field/test/tests/initial_conditions/BimodalInverseSuperellipsoidsIC.i)
- (modules/stochastic_tools/test/tests/surrogates/load_store/sub.i)
- (modules/navier_stokes/test/tests/finite_element/ins/velocity_channel/traction-supg.i)
- (test/tests/kernels/material_coupled_force/material_coupled_force.i)
- (test/tests/mortar/displaced-gap-conductance-2d-non-conforming/gap-conductance.i)
- (modules/stochastic_tools/test/tests/surrogates/pod_rb/errors/sub.i)
- (modules/solid_mechanics/test/tests/crystal_plasticity/cp_eigenstrains/hcp_volumetric_eigenstrain_decrease.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_htonly/planar_xz.i)
- (test/tests/materials/functor_properties/traditional-mat-props.i)
- (modules/heat_transfer/test/tests/heat_source_bar/heat_source_bar.i)
- (modules/misc/test/tests/kernels/thermo_diffusion/thermo_diffusion.i)
- (test/tests/controls/moose_base_naming_access/base_param.i)
- (modules/contact/test/tests/mortar_dynamics/block-dynamics-action.i)
- (modules/phase_field/test/tests/slkks/full_solve.i)
- (modules/chemical_reactions/test/tests/jacobian/coupled_equilsub2.i)
- (test/tests/meshgenerators/patterned_mesh_generator/patterned_mesh_generator.i)
- (modules/thermal_hydraulics/test/tests/materials/average_wall_temperature_3eqn/average_wall_temperature_3eqn.i)
- (test/tests/misc/subdomain_setup/mat_prop_block.i)
- (modules/phase_field/test/tests/MultiSmoothCircleIC/latticesmoothcircleIC_normal_test.i)
- (modules/navier_stokes/test/tests/finite_element/ins/energy-conservation/q2q1.i)
- (modules/navier_stokes/test/tests/finite_element/ins/rz-x-axial-coord/hand-coded-jac-pipe-flow-natural-bc.i)
- (modules/solid_mechanics/test/tests/dynamics/rayleigh_damping/rayleigh_newmark.i)
- (test/tests/postprocessors/element_integral_material_property/element_integral_material_property.i)
- (modules/combined/test/tests/optimization/optimization_density_update/top_opt_3d_pde_filter.i)
- (modules/chemical_reactions/examples/calcium_bicarbonate/calcium_bicarbonate.i)
- (modules/phase_field/test/tests/mobility_derivative/mobility_derivative_split_coupled_test.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialMultiphase_AD.i)
- (modules/heat_transfer/test/tests/transient_heat/transient_heat.i)
- (modules/heat_transfer/test/tests/code_verification/cartesian_test_no3.i)
- (modules/fsi/test/tests/fsi_acoustics/3D_struc_acoustic/3D_struc_acoustic.i)
- (modules/navier_stokes/test/tests/postprocessors/pressure_drop/drop_insad.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_stabilized_action.i)
- (modules/contact/test/tests/explicit_dynamics/test_balance.i)
- (modules/optimization/test/tests/optimizationreporter/bc_load_linearFunction/adjoint.i)
- (modules/navier_stokes/test/tests/finite_element/ins/mms/supg/supg_pspg_adv_dominated_mms.i)
- (tutorials/darcy_thermo_mech/step03_darcy_material/tests/kernels/darcy_pressure/darcy_pressure.i)
- (test/tests/auxkernels/advection_flux/advection_flux_fe.i)
- (modules/functional_expansion_tools/examples/2D_interface_different_submesh/main.i)
- (modules/stochastic_tools/test/tests/surrogates/pod_rb/boundary/sub.i)
- (modules/electromagnetics/test/tests/interfacekernels/electrostatic_contact/contact_conductance_calculated.i)
- (modules/heat_transfer/test/tests/truss_heat_conduction/block_w_line.i)
- (modules/functional_expansion_tools/examples/1D_volumetric_Cartesian/main.i)
- (modules/heat_transfer/test/tests/code_verification/cartesian_test_no2.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_stab_jac_test.i)
- (modules/fluid_properties/test/tests/materials/saturation_pressure_material/saturation_pressure_material.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialMultiphase.i)
- (modules/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-fretting-wear-test-action.i)
- (modules/combined/test/tests/optimization/invOpt_bc_convective/adjoint.i)
- (modules/stochastic_tools/examples/surrogates/cross_validation/all_sub.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/heated-channel/transient-porous-kt-primitive.i)
- (modules/solid_mechanics/test/tests/dynamics/rayleigh_damping/rayleigh_newmark_material_dependent.i)
- (modules/thermal_hydraulics/test/tests/materials/ad_average_wall_temperature_3eqn/ad_average_wall_temperature_3eqn.i)
- (test/tests/materials/material/adv_mat_couple_test.i)
- (modules/optimization/test/tests/optimizationreporter/general_opt/point_loads_gen_opt/forward_homogeneous.i)
- (modules/combined/examples/optimization/2d_mbb.i)
- (modules/contact/test/tests/mortar_dynamics/block-dynamics-friction-action.i)
- (modules/phase_field/test/tests/KKS_system/kks_example_split.i)
- (modules/xfem/test/tests/switching_material/two_cuts_stationary.i)
- (modules/combined/examples/optimization/3d_mbb.i)
- (modules/phase_field/test/tests/new_initial_conditions/GrainGrowth_initial_from_file.i)
- (modules/chemical_reactions/test/tests/exceptions/missing_sto3.i)
- (modules/chemical_reactions/test/tests/solid_kinetics/calcite_dissolution.i)
- (modules/heat_transfer/test/tests/function_ellipsoid_heat_source/function_heat_source.i)
- (modules/heat_transfer/test/tests/heat_conduction/2d_quadrature_gap_heat_transfer/nonmatching.i)
- (modules/combined/test/tests/optimization/compliance_sensitivity/2d_mmb_2material_cost.i)
- (modules/stochastic_tools/examples/surrogates/pod_rb/2d_multireg/sub.i)
- (modules/chemical_reactions/test/tests/jacobian/coupled_equilsub.i)
- (modules/combined/test/tests/multiphase_mechanics/nonsplit_gradderiv.i)
- (modules/navier_stokes/test/tests/finite_element/ins/coupled-force/gravity-object.i)
- (modules/stochastic_tools/examples/libtorch_drl_control/libtorch_drl_control_sub.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_no_parts_steady_stabilized_second_order.i)
- (modules/combined/examples/optimization/multi-load/single_subapp_two.i)
- (test/tests/userobjects/domain-user-object/measure-conservation.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialAnisotropy.i)
- (modules/combined/test/tests/3d-mortar-projection-tolerancing/test.i)
- (test/tests/mortar/displaced-gap-conductance-2d-bnd-coupling/gap-conductance-bnd-aux-kernel.i)
- (modules/phase_field/test/tests/rigidbodymotion/grain_motion2.i)
- (modules/solid_mechanics/test/tests/central_difference/consistent/1D/1d_consistent_explicit.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/varied_pressure_thermomechanical_mortar.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/steady_fsp_diagonal_of_a_for_scaling.i)
- (test/tests/postprocessors/side_diffusive_flux_average/side_diffusive_flux_average.i)
- (modules/combined/examples/phase_field-mechanics/Nonconserved.i)
- (modules/solid_mechanics/test/tests/dynamics/wave_1D/wave_rayleigh_hht_AD.i)
- (modules/xfem/test/tests/moving_interface/verification/1D_xy_homog1mat.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_no_parts_steady.i)
- (test/tests/actions/get_actions/test_get_actions.i)
- (modules/thermal_hydraulics/test/tests/components/hs_boundary_external_app_heat_flux/main.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_by_parts_steady.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/small-2d/open_gap_pressure_dependent.i)
- (modules/combined/test/tests/optimization/compliance_sensitivity/2d_mbb_pde.i)
- (modules/thermal_hydraulics/test/tests/materials/wall_friction_cheng/cheng_ff_test.i)
- (modules/phase_field/test/tests/initial_conditions/RndSmoothCircleIC.i)
- (modules/stochastic_tools/test/tests/transfers/serialized_solution_transfer/sub.i)
- (modules/functional_expansion_tools/examples/2D_volumetric_Cartesian/main.i)
- (modules/heat_transfer/test/tests/heat_source_bar/ad_heat_source_bar.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_by_parts_steady_nobcbc.i)
- (modules/navier_stokes/test/tests/finite_volume/cns/scalar_advection/mass-frac-advection.i)
- (modules/solid_mechanics/examples/coal_mining/cosserat_elastic.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_htonly/planar_yz.i)
- (modules/heat_transfer/test/tests/NAFEMS/transient/T3/nafems_t3_quad_template.i)
- (modules/optimization/test/tests/optimizationreporter/point_loads/forward_and_adjoint.i)
- (test/tests/controls/syntax_based_naming_access/system_asterisk_param.i)
- (modules/phase_field/test/tests/SplitCH/forward_split_math_test.i)
- (modules/phase_field/test/tests/anisotropic_interfaces/adkobayashi.i)
- (modules/combined/examples/phase_field-mechanics/SimplePhaseTrans.i)
- (modules/stochastic_tools/test/tests/reporters/parallel_storage/sub.i)
- (test/tests/postprocessors/side_material.i)
- (modules/phase_field/test/tests/KKS_system/nonlinear.i)
- (test/tests/misc/boundary_variable_check/test.i)
- (modules/navier_stokes/test/tests/finite_element/ins/velocity_channel/velocity_inletBC_by_parts.i)
- (test/tests/materials/stateful_prop/implicit_stateful_ad.i)
- (modules/phase_field/test/tests/initial_conditions/SmoothSuperellipsoidIC_3D.i)
- (modules/navier_stokes/test/tests/finite_element/ins/mms/supg/supg_mms_test.i)
- (modules/phase_field/examples/kim-kim-suzuki/kks_example_ternary.i)
- (modules/navier_stokes/examples/laser-welding/2d.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/steady_vector_fsp_stokes.i)
- (modules/combined/examples/optimization/thermomechanical/thermomechanical_main.i)
- (modules/navier_stokes/test/tests/finite_element/ins/energy_source/steady-action.i)
- (modules/xfem/test/tests/moving_interface/ad_phase_transition_2d.i)
- (modules/heat_transfer/test/tests/joule_heating/transient_jouleheating.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_action_stabilized_transient.i)
- (test/tests/materials/get_material_property_names/get_material_property_block_names.i)
- (modules/stochastic_tools/test/tests/surrogates/gaussian_process/sub.i)
- (modules/combined/examples/optimization/helmholtz_multimat_nostrip.i)
- (modules/solid_mechanics/test/tests/shell/dynamics/shell_dynamics_bending_moment_free_orientation_inclined.i)
- (modules/stochastic_tools/test/tests/controls/libtorch_drl_control/libtorch_drl_control.i)
- (modules/combined/examples/optimization/helmholtz_multimat_strip.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_3d/phy.conservation_ss.i)
- (modules/solid_mechanics/test/tests/jacobian/poro01.i)
- (modules/optimization/test/tests/optimizationreporter/point_loads/forward_homogeneous.i)
- (modules/stochastic_tools/test/tests/reporters/ActiveLearningGP/sub.i)
- (modules/solid_mechanics/examples/coal_mining/cosserat_mc_wp_sticky.i)
- (modules/combined/test/tests/multiphase_mechanics/nonsplit_gradderiv_action.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven_stabilized.i)
- (test/tests/controls/time_periods/materials/material.i)
- (modules/phase_field/test/tests/MultiSmoothCircleIC/latticesmoothcircleIC_test.i)
- (test/tests/outputs/debug/show_material_props_debug.i)
- (modules/chemical_reactions/test/tests/jacobian/coupled_convreact2.i)
- (modules/combined/test/tests/phase_field_fracture/crack2d_aniso_hist_false.i)
- (modules/phase_field/test/tests/free_energy_material/MathEBFreeEnergy.i)
- (modules/phase_field/test/tests/phase_field_kernels/CoupledAllenCahn.i)
- (modules/phase_field/test/tests/rigidbodymotion/grain_motion_fauxGT.i)
- (modules/heat_transfer/test/tests/code_verification/cartesian_test_no5.i)
- (modules/solid_mechanics/examples/coal_mining/coarse.i)
- (modules/functional_expansion_tools/examples/3D_volumetric_cylindrical/main.i)
- (modules/phase_field/test/tests/rigidbodymotion/update_orientation.i)
- (modules/phase_field/examples/kim-kim-suzuki/kks_example_dirichlet.i)
- (test/tests/materials/boundary_material/bnd_coupling_vol.i)
- (modules/phase_field/test/tests/anisotropic_mobility/nonsplit.i)
- (modules/optimization/test/tests/optimizationreporter/bc_load_linearFunction/forward.i)
- (modules/phase_field/test/tests/rigidbodymotion/grain_forcedensity.i)
- (modules/heat_transfer/test/tests/postprocessors/ad_convective_ht_side_integral.i)
- (test/tests/materials/discrete/recompute.i)
- (modules/phase_field/test/tests/KKS_system/kks_example_nested.i)
- (modules/phase_field/test/tests/phase_field_kernels/SimpleCHInterface.i)
- (modules/phase_field/test/tests/SimpleACInterface/SimpleACInterface.i)
- (modules/navier_stokes/test/tests/finite_element/ins/jacobian_test/jacobian_traction_stabilized.i)
- (modules/solid_mechanics/test/tests/dynamics/time_integration/hht_test.i)
- (modules/navier_stokes/test/tests/finite_element/ins/coupled-force/steady.i)
- (modules/stochastic_tools/test/tests/reporters/BFActiveLearning/sub_lf.i)
- (modules/thermal_hydraulics/test/tests/components/hs_boundary_radiation/from_file_3d.i)
- (modules/solid_mechanics/examples/coal_mining/cosserat_wp_only.i)
- (test/tests/auxkernels/diffusion_flux/normal_diffusion_flux.i)
- (modules/combined/examples/phase_field-mechanics/LandauPhaseTrans.i)
- (modules/phase_field/test/tests/initial_conditions/RndBoundingBoxIC.i)
- (modules/navier_stokes/test/tests/finite_element/ins/energy_source/steady-var-action.i)
- (modules/heat_transfer/test/tests/interface_heating_mortar/transient_joule_heating_constraint.i)
- (modules/combined/examples/mortar/eigenstrain.i)
- (test/tests/executioners/eigen_convergence/b.i)
- (modules/heat_transfer/test/tests/physics/test_fe.i)
- (modules/phase_field/test/tests/initial_conditions/BimodalSuperellipsoidsIC.i)
- (modules/phase_field/test/tests/KKS_system/kks_example_offset.i)
- (modules/solid_mechanics/test/tests/dynamics/acceleration_bc/AccelerationBC_test.i)
- (test/tests/userobjects/element_subdomain_modifier/stateful_property.i)
- (modules/solid_mechanics/test/tests/dynamics/prescribed_displacement/3D_QStatic_1_Ramped_Displacement_with_gravity.i)
- (modules/chemical_reactions/test/tests/jacobian/2species.i)
- (modules/phase_field/test/tests/phase_field_kernels/SplitCHWRes.i)
- (modules/phase_field/examples/kim-kim-suzuki/kks_example_noflux.i)
- (test/tests/dirackernels/multiplicity/multiplicity.i)
- (modules/phase_field/test/tests/KKS_system/lagrange_multiplier.i)
- (test/tests/materials/stateful_prop/stateful_prop_on_bnd_only.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_3d/phy.conservation.i)
- (modules/heat_transfer/test/tests/code_verification/cylindrical_test_no5.i)
- (modules/solid_mechanics/test/tests/central_difference/lumped/3D/3d_lumped_explicit.i)
- (modules/phase_field/test/tests/free_energy_material/MathFreeEnergy_split.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_no_parts_steady.i)
- (modules/combined/examples/optimization/multi-load/single_subapp_one.i)
- (modules/thermal_hydraulics/test/tests/components/file_mesh_component/file_mesh_component.i)
- (modules/electromagnetics/test/tests/auxkernels/current_density/em_current_density.i)
- (modules/navier_stokes/test/tests/finite_element/ins/nonzero-malloc/test.i)
- (test/tests/vectorpostprocessors/1d_line_sampler/1d_line_sampler.i)
- (modules/solid_mechanics/examples/coal_mining/fine.i)
- (modules/phase_field/test/tests/conserved_noise/uniform.i)
- (modules/heat_transfer/test/tests/fvbcs/fv_radiative_heat_flux/test.i)
- (test/tests/controls/syntax_based_naming_access/system_object_param.i)
- (modules/heat_transfer/test/tests/parallel_element_pps_test/parallel_element_pps_test.i)
- (modules/stochastic_tools/test/tests/transfers/sampler_transfer_vector/sub.i)
- (modules/chemical_reactions/test/tests/parser/kinetic_action.i)
- (test/tests/materials/stateful_prop/implicit_stateful.i)
- (modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialPFM.i)
- (modules/solid_mechanics/test/tests/dynamics/rayleigh_damping/rayleigh_hht_ti.i)
- (modules/thermal_hydraulics/test/tests/materials/ad_convection_heat_flux_hs/ad_convection_heat_flux_hs.i)
- (test/tests/materials/multiple_materials/multiple_materials_test.i)
- (test/tests/bcs/vectorpostprocessor/vectorpostprocessor.i)
- (modules/navier_stokes/test/tests/finite_element/ins/cg-dg-hybrid/mms/lid-driven/hybrid-cg-dg-mms.i)
- (modules/navier_stokes/test/tests/finite_element/ins/hydrostatic/gravity.i)
- (modules/phase_field/examples/cahn-hilliard/Math_CH.i)
- (modules/thermal_hydraulics/test/tests/materials/ad_wall_heat_transfer_coefficient_kazimi/kazimi_test.i)
- (modules/solid_mechanics/test/tests/central_difference/lumped/2D/2d_lumped_explicit.i)
- (modules/thermal_hydraulics/test/tests/materials/wall_heat_transfer_coefficient_3eqn_dittus_boelter/test.i)
- (modules/combined/examples/optimization/2d_mbb_pde.i)
- (modules/chemical_reactions/test/tests/jacobian/coupled_convreact.i)
- (modules/solid_mechanics/test/tests/beam/dynamic/dyn_euler_small.i)
- (modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_transfer_from_heat_structure_3d/steady_state.i)
- (modules/phase_field/test/tests/MultiSmoothCircleIC/multismoothcircleIC_test.i)
- (test/tests/interfacekernels/1d_interface/reaction_1D_steady.i)
- (modules/combined/examples/optimization/thermomechanical/structural_sub.i)
- (modules/combined/test/tests/generalized_plane_strain_tm_contact/generalized_plane_strain_tm_contact.i)
- (modules/optimization/test/tests/misc/scaling_test/scaling_test.i)
- (modules/navier_stokes/test/tests/finite_element/ins/coupled-force/steady-action-function.i)
- (test/tests/interfacekernels/adaptivity/adaptivity.i)
- (modules/phase_field/test/tests/phase_field_kernels/ADnonuniform_barrier_coefficient.i)
- (modules/navier_stokes/test/tests/auxkernels/reynolds-number-functor-aux/fe.i)
- (modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/negative_porosity.i)
- (modules/chemical_reactions/test/tests/solid_kinetics/2species_without_action.i)
- (modules/chemical_reactions/test/tests/kinetic_rate/arrhenius.i)
- (modules/heat_transfer/test/tests/verify_against_analytical/ad_2d_steady_state.i)
- (modules/combined/test/tests/phase_field_fracture_viscoplastic/crack2d.i)
- (modules/thermal_hydraulics/test/tests/components/heat_structure_cylindrical/by_materials.i)
- (modules/solid_mechanics/test/tests/shell/dynamics/shell_dynamics_bending_moment_free.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/small-2d/closed_gap_pressure_dependent_thermal_contact.i)
- (modules/heat_transfer/test/tests/conjugate_heat_transfer/conjugate_heat_transfer.i)
- (test/tests/outputs/debug/show_execution_kernels_bcs.i)
- (modules/combined/examples/optimization/multi-load/square_subapp_two.i)
- (modules/solid_mechanics/test/tests/central_difference/consistent/1D/1d_consistent_implicit.i)
- (modules/solid_mechanics/examples/coal_mining/cosserat_mc_wp_sticky_longitudinal.i)
- (test/tests/materials/get_material_property_names/get_material_property_boundary_names.i)
- (modules/fsi/test/tests/fsi_acoustics/1D_struc_acoustic/1D_struc_acoustic.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/RZ_cone_high_reynolds.i)
- (modules/phase_field/test/tests/KKS_system/auxkernel.i)
- (modules/solid_mechanics/test/tests/beam/dynamic/dyn_euler_small_rayleigh_hht.i)
- (test/tests/mortar/periodic_segmental_constraint/periodic_checker2d.i)
- (test/tests/mortar/periodic_segmental_constraint/penalty_periodic_checker2d.i)
- (modules/heat_transfer/test/tests/code_verification/cartesian_test_no1.i)
- (modules/combined/test/tests/optimization/compliance_sensitivity/2d_mbb_pde_amr.i)
- (modules/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-wear-vel.i)
- (modules/phase_field/test/tests/initial_conditions/BoundingBoxIC.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_no_parts_steady_stabilized.i)
- (modules/rdg/test/tests/advection_1d/block_restrictable.i)
- (modules/chemical_reactions/test/tests/jacobian/coupled_diffreact2.i)
- (modules/phase_field/test/tests/phase_field_kernels/ADSplitCahnHilliard.i)
- (modules/phase_field/test/tests/actions/conserved_forward_split_1var.i)
- (test/tests/mortar/gap-conductance-2d-non-conforming/gap-conductance.i)
- (test/tests/mesh/patterned_mesh/mesh_tester.i)
- (modules/chemical_reactions/test/tests/parser/equilibrium_without_action.i)
- (modules/solid_mechanics/test/tests/gravity/ad_gravity_test.i)
- (modules/combined/test/tests/phase_field_fracture/crack2d_aniso.i)
- (modules/xfem/test/tests/switching_material/one_cut_stationary.i)
- (modules/phase_field/examples/rigidbodymotion/grain_forcedensity_ext.i)
- (modules/porous_flow/examples/tidal/atm_tides_open_hole.i)
- (modules/thermal_hydraulics/test/tests/materials/wall_friction_factor/churchill_ad.i)
- (modules/heat_transfer/test/tests/thin_layer_heat_transfer/transient_2d.i)
- (modules/navier_stokes/test/tests/finite_element/ins/coupled-force/gravity-through-coupled-force.i)
- (modules/phase_field/test/tests/mobility_derivative/mobility_derivative_test.i)
- (test/tests/interfacekernels/1d_interface/no-failed-point-inversions.i)
- (modules/phase_field/examples/measure_interface_energy/1Dinterface_energy.i)
- (modules/combined/test/tests/phase_field_fracture/crack2d_computeCrackedStress_finitestrain_elastic.i)
- (modules/xfem/test/tests/moving_interface/phase_transition_2d.i)
- (modules/heat_transfer/test/tests/thin_layer_heat_transfer/steady_2d.i)
- (modules/phase_field/examples/multiphase/GrandPotential3Phase.i)
- (modules/combined/test/tests/optimization/compliance_sensitivity/three_materials_thermal.i)
- (modules/chemical_reactions/test/tests/desorption/langmuir_jac2.i)
- (modules/heat_transfer/test/tests/code_verification/spherical_test_no1.i)
- (modules/solid_mechanics/test/tests/beam/dynamic/dyn_euler_small_rayleigh_hht_ti.i)
- (modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/RZ_cone_by_parts.i)
- (modules/phase_field/examples/nucleation/cahn_hilliard.i)
Child Objects
(test/tests/auxkernels/diffusion_flux/diffusion_flux.i)
[Mesh]
type = GeneratedMesh # Can generate simple lines, rectangles and rectangular prisms
dim = 2 # Dimension of the mesh
nx = 10 # Number of elements in the x direction
ny = 10 # Number of elements in the y direction
xmax = 1.0
ymax = 1.0
[]
[Variables]
[./T]
[../]
[]
[AuxVariables]
[./flux_x]
order = FIRST
family = MONOMIAL
[../]
[./flux_y]
order = FIRST
family = MONOMIAL
[../]
[]
[Kernels]
active = 'diff'
[./diff]
type = MatDiffusionTest # A Laplacian operator
variable = T
prop_name = 'thermal_conductivity'
[../]
[./diff_ad]
type = ADMatDiffusion # A Laplacian operator
variable = T
diffusivity = 'thermal_conductivity'
[../]
[]
[AuxKernels]
[./flux_x]
type = DiffusionFluxAux
diffusivity = 'thermal_conductivity'
variable = flux_x
diffusion_variable = T
component = x
[../]
[./flux_y]
type = DiffusionFluxAux
diffusivity = 'thermal_conductivity'
variable = flux_y
diffusion_variable = T
component = y
[../]
[]
[BCs]
[./inlet]
type = DirichletBC # Simple u=value BC
variable = T
boundary = left
value = 4000 # K
[../]
[./outlet]
type = DirichletBC
variable = T
boundary = right
value = 400 # K
[../]
[]
[Materials]
[./k]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity'
prop_values = '10' # in W/mK
[../]
[]
[VectorPostprocessors]
# avoid sampling an element variable on faces
[./line_sample]
type = LineValueSampler
variable = 'T flux_x flux_y'
start_point = '0.01 0.01 0'
end_point = '0.98 0.01 0'
num_points = 11
sort_by = id
[../]
[]
[Executioner]
type = Steady # Steady state problem
solve_type = PJFNK #Preconditioned Jacobian Free Newton Krylov
nl_rel_tol = 1e-12
petsc_options_iname = '-pc_type -pc_hypre_type' #Matches with the values below
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true # Output Exodus format
execute_on = 'initial timestep_end'
[]
(modules/thermal_hydraulics/test/tests/components/heat_structure_plate/by_materials.i)
!include part_base.i
[Materials]
[hs-mat]
type = ADGenericConstantMaterial
block = hs:blk
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1 1 1'
[]
[]
(modules/phase_field/test/tests/anisotropic_interfaces/kobayashi.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 32
ny = 32
xmax = 0.7
ymax = 0.7
[]
[Variables]
[./w]
[../]
[./T]
[../]
[]
[ICs]
[./wIC]
type = SmoothCircleIC
variable = w
int_width = 0.1
x1 = 0.35
y1 = 0.35
radius = 0.08
outvalue = 0
invalue = 1
[../]
[]
[Kernels]
[./w_dot]
type = TimeDerivative
variable = w
[../]
[./anisoACinterface1]
type = ACInterfaceKobayashi1
variable = w
mob_name = M
[../]
[./anisoACinterface2]
type = ACInterfaceKobayashi2
variable = w
mob_name = M
[../]
[./AllenCahn]
type = AllenCahn
variable = w
mob_name = M
f_name = fbulk
coupled_variables = 'T'
[../]
[./T_dot]
type = TimeDerivative
variable = T
[../]
[./CoefDiffusion]
type = Diffusion
variable = T
[../]
[./w_dot_T]
type = CoefCoupledTimeDerivative
variable = T
v = w
coef = -1.8 #This is -K from kobayashi's paper
[../]
[]
[Materials]
[./free_energy]
type = DerivativeParsedMaterial
property_name = fbulk
coupled_variables = 'w T'
constant_names = 'alpha gamma T_e pi'
constant_expressions = '0.9 10 1 4*atan(1)'
expression = 'm:=alpha/pi * atan(gamma * (T_e - T)); 1/4*w^4 - (1/2 - m/3) * w^3 + (1/4 - m/2) * w^2'
derivative_order = 2
outputs = exodus
[../]
[./material]
type = InterfaceOrientationMaterial
op = w
[../]
[./consts]
type = GenericConstantMaterial
prop_names = 'M'
prop_values = '3333.333'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
scheme = bdf2
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-08
l_tol = 1e-4
l_max_its = 30
dt = 0.001
num_steps = 6
[]
[Outputs]
exodus = true
perf_graph = true
execute_on = 'INITIAL FINAL'
[]
(modules/heat_transfer/test/tests/code_verification/cylindrical_test_no3.i)
# Problem II.3
#
# The thermal conductivity of an infinitely long hollow cylinder varies
# linearly with temperature: k = k0(1+beta*u). The tube inside radius is ri and
# outside radius is ro. It has a constant internal heat generation q and
# is exposed to the same constant temperature on both surfaces: u(ri) = u(ro) = uo.
#
# REFERENCE:
# A. Toptan, et al. (Mar.2020). Tech. rep. CASL-U-2020-1939-000, SAND2020-3887 R. DOI:10.2172/1614683.
[Mesh]
[./geom]
type = GeneratedMeshGenerator
dim = 1
elem_type = EDGE2
xmin = 0.2
nx = 4
[../]
[]
[Variables]
[./u]
order = FIRST
[../]
[]
[Problem]
coord_type = RZ
[]
[Functions]
[./exact]
type = ParsedFunction
symbol_names = 'q k0 ri ro beta u0'
symbol_values = '1200 1 0.2 1.0 1e-3 0'
expression = 'u0+(1/beta)*( ( 1 + 0.5*beta*((ro^2-x^2)-(ro^2-ri^2) * log(ro/x)/log(ro/ri))*q/k0 )^0.5 - 1)'
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = u
[../]
[./heatsource]
type = HeatSource
function = 1200
variable = u
[../]
[]
[BCs]
[./uo]
type = DirichletBC
boundary = 'left right'
variable = u
value = 0
[../]
[]
[Materials]
[./property]
type = GenericConstantMaterial
prop_names = 'density specific_heat'
prop_values = '1.0 1.0'
[../]
[./thermal_conductivity]
type = ParsedMaterial
property_name = 'thermal_conductivity'
coupled_variables = u
expression = '1 * (1 + 1e-3*u)'
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = exact
variable = u
[../]
[./h]
type = AverageElementSize
[]
[]
[Outputs]
csv = true
[]
(modules/thermal_hydraulics/test/tests/materials/ad_wall_htc_gnielinski_annular/ad_wall_htc_gnielinski_annular.i)
rho = 3.1176
vel = 100
k = 0.38220
mu = 4.8587e-05
cp = 5189.8
p = 100e3
T = 1073
T_wall = 1074
D_inner = 0.01
D_outer = 0.015
length = 0.5
[GlobalParams]
execute_on = 'INITIAL'
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Materials]
[props]
type = ADGenericConstantMaterial
prop_names = 'rho vel k mu cp p T T_wall'
prop_values = '${rho} ${vel} ${k} ${mu} ${cp} ${p} ${T} ${T_wall}'
[]
[test_material]
type = ADWallHTCGnielinskiAnnularMaterial
htc_wall = htc_wall
D_inner = ${D_inner}
D_outer = ${D_outer}
channel_length = ${length}
at_inner_wall = true
fluid_is_gas = true
gas_heating_correction_exponent = 0.15
fluid_properties = fp
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[htc_wall]
type = ADElementAverageMaterialProperty
mat_prop = htc_wall
[]
[]
[Outputs]
csv = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad-rz-displacements.i)
[GlobalParams]
order = FIRST
integrate_p_by_parts = true
use_displaced_mesh = true
[]
[Mesh]
file = '2d_cone.msh'
displacements = 'disp_x disp_y'
[]
[Problem]
coord_type = RZ
[]
[AuxVariables]
[vel_x][]
[vel_y][]
[disp_x]
order = SECOND
[]
[disp_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]
family = LAGRANGE_VEC
[]
[p]
[]
[]
# 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_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 = 'inlet_func'
[]
[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
[]
[]
[Functions]
[inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[]
[ins_mat]
type = INSADTauMaterial
velocity = velocity
pressure = p
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
csv = true
[out]
type = Exodus
hide = 'disp_x disp_y'
[]
[]
[Postprocessors]
[flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[]
[flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[]
[]
(test/tests/materials/generic_materials/generic_constant_material.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
ny = 3
[]
[Variables]
[./u]
[../]
[./v]
[../]
[]
[Kernels]
[./diff1]
type = DiffMKernel
variable = u
mat_prop = diff1
[../]
[./diff2]
type = DiffMKernel
variable = v
mat_prop = diff2
[../]
[]
[BCs]
[./left_u]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[./left_v]
type = DirichletBC
variable = v
boundary = 3
value = 1
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = 1
value = 0
[../]
[]
[Materials]
[./dm1]
type = GenericConstantMaterial
prop_names = 'diff1'
prop_values = '2'
[../]
[./dm2]
type = GenericConstantMaterial
prop_names = 'diff2'
prop_values = '4'
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(test/tests/executioners/eigen_convergence/a.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 160
ymin = 0
ymax = 160
nx = 8
ny = 8
[]
uniform_refine = 0
[]
[Variables]
[u]
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
diffusivity = diffusivity
variable = u
[]
[reaction]
type = CoefReaction
coefficient = 0.01
variable = u
[]
[rhs]
type = CoefReaction
extra_vector_tags = 'eigen'
coefficient = -0.01
variable = u
[]
[]
[BCs]
[robin]
type = VacuumBC
boundary = 'left bottom'
variable = u
[]
[]
[Materials]
[nm]
type = GenericConstantMaterial
block = 0
prop_names = 'diffusivity'
prop_values = 0.333333333333333333
[]
[]
[VectorPostprocessors]
[eigen]
type = Eigenvalues
inverse_eigenvalue = true
[]
[]
[Postprocessors]
[fluxintegral]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = linear
[]
[]
[Problem]
type = EigenProblem
[]
[Executioner]
type = Eigenvalue
solve_type = PJFNK
free_power_iterations = 4
nl_abs_tol = 2e-10
[]
[Outputs]
csv = true
[]
(modules/combined/test/tests/phase_field_fracture/void2d_iso.i)
[Mesh]
type = FileMesh
file = void2d_mesh.xda
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Modules]
[./TensorMechanics]
[./Master]
[./All]
add_variables = true
strain = SMALL
additional_generate_output = stress_yy
[../]
[../]
[../]
[./PhaseField]
[./Nonconserved]
[./c]
free_energy = F
mobility = L
kappa = kappa_op
[../]
[../]
[../]
[]
[Functions]
[./tfunc]
type = ParsedFunction
expression = t
[../]
[./void_prop_func]
type = ParsedFunction
expression = 'rad:=0.2;m:=50;r:=sqrt(x^2+y^2);1-exp(-(r/rad)^m)+1e-8'
[../]
[./gb_prop_func]
type = ParsedFunction
expression = 'rad:=0.2;thk:=0.05;m:=50;sgnx:=1-exp(-(x/rad)^m);v:=sgnx*exp(-(y/thk)^m);0.005*(1-v)+0.001*v'
[../]
[]
[Kernels]
[./solid_x]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_x
component = 0
c = c
[../]
[./solid_y]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_y
component = 1
c = c
[../]
[]
[BCs]
[./ydisp]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = tfunc
[../]
[./yfix]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[../]
[./xfix]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[]
[Materials]
[./pfbulkmat]
type = GenericConstantMaterial
prop_names = 'l visco'
prop_values = '0.01 0.1'
[../]
[./pfgc]
type = GenericFunctionMaterial
prop_names = 'gc_prop'
prop_values = 'gb_prop_func'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '120.0 80.0'
fill_method = symmetric_isotropic
elasticity_tensor_prefactor = void_prop_func
[../]
[./define_mobility]
type = ParsedMaterial
material_property_names = 'gc_prop visco'
property_name = L
expression = '1.0/(gc_prop * visco)'
[../]
[./define_kappa]
type = ParsedMaterial
material_property_names = 'gc_prop l'
property_name = kappa_op
expression = 'gc_prop * l'
[../]
[./damage_stress]
type = ComputeLinearElasticPFFractureStress
c = c
E_name = 'elastic_energy'
D_name = 'degradation'
F_name = 'fracture_energy'
decomposition_type = strain_spectral
[../]
[./degradation]
type = DerivativeParsedMaterial
property_name = degradation
coupled_variables = 'c'
expression = '(1.0-c)^2*(1.0 - eta) + eta'
constant_names = 'eta'
constant_expressions = '0.0'
derivative_order = 2
[../]
[./fracture_energy]
type = DerivativeParsedMaterial
property_name = fracture_energy
coupled_variables = 'c'
material_property_names = 'gc_prop l'
expression = 'c^2 * gc_prop / 2 / l'
derivative_order = 2
[../]
[./fracture_driving_energy]
type = DerivativeSumMaterial
coupled_variables = c
sum_materials = 'elastic_energy fracture_energy'
derivative_order = 2
property_name = F
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm lu 1'
nl_rel_tol = 1e-9
nl_max_its = 10
l_tol = 1e-4
l_max_its = 40
dt = 1e-4
num_steps = 2
[]
[Outputs]
exodus = true
[]
(test/tests/materials/derivative_material_interface/ad_const.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
[]
[AuxVariables]
[./dummy]
[../]
[]
[Materials]
[./provider]
type = ADDerivativeMaterialInterfaceTestProvider
block = 0
[../]
[./client]
type = ADDerivativeMaterialInterfaceTestClient
prop_name = prop
block = 0
outputs = exodus
[../]
[./client2]
type = ADDerivativeMaterialInterfaceTestClient
prop_name = 1.0
block = 0
outputs = exodus
[../]
[./dummy]
type = ADGenericConstantMaterial
prop_names = prop
block = 0
prop_values = 0
[../]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/components/heat_source_from_power_density/phy.conservation_from_file_3d.i)
t = 0.5
# these are the dimensions of rgn1 from box.e
width = 1.5
height = 5
depth = 2
density = 3
specific_heat_capacity = 1
conductivity = 5
power_density = 20
E_change = ${fparse power_density * width * height * depth * t}
[Functions]
[power_density_fn]
type = ConstantFunction
value = ${power_density}
[]
[]
[AuxVariables]
[power_density]
family = MONOMIAL
order = CONSTANT
block = 'heat_structure:rgn1'
[]
[]
[AuxKernels]
[mock_power_aux]
type = FunctionAux
variable = power_density
function = power_density_fn
[]
[]
[Materials]
[mat]
type = ADGenericConstantMaterial
block = 'heat_structure:rgn1 heat_structure:rgn2'
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '${density} ${specific_heat_capacity} ${conductivity}'
[]
[]
[Components]
[heat_structure]
type = HeatStructureFromFile3D
file = box.e
position = '0 0 0'
initial_T = 300
[]
[heat_generation]
type = HeatSourceFromPowerDensity
hs = heat_structure
regions = 'rgn1'
power_density = power_density
[]
[]
[Postprocessors]
[E_tot]
type = ADHeatStructureEnergy3D
block = 'heat_structure:rgn1 heat_structure:rgn2'
execute_on = 'initial timestep_end'
[]
[E_tot_change]
type = ChangeOverTimePostprocessor
change_with_respect_to_initial = true
postprocessor = E_tot
execute_on = 'initial timestep_end'
[]
[E_tot_change_rel_err]
type = RelativeDifferencePostprocessor
value1 = E_tot_change
value2 = ${E_change}
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'newton'
line_search = 'basic'
nl_rel_tol = 0
nl_abs_tol = 1e-6
nl_max_its = 15
l_tol = 1e-3
l_max_its = 10
start_time = 0.0
dt = 0.5
num_steps = 1
abort_on_solve_fail = true
[]
[Outputs]
csv = true
show = 'E_tot_change_rel_err'
execute_on = 'final'
[]
(test/tests/userobjects/layered_side_integral/layered_side_diffusive_flux_average_fv.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 6
ny = 6
nz = 6
[]
[Variables]
[./u]
order = CONSTANT
family = MONOMIAL
fv = true
[../]
[]
[AuxVariables]
[./layered_side_flux_average]
order = CONSTANT
family = MONOMIAL
[../]
[]
[FVKernels]
[./diff]
type = FVDiffusion
variable = u
coeff = 1
[../]
[]
[FVBCs]
[./bottom]
type = FVDirichletBC
variable = u
boundary = bottom
value = 0
[../]
[./top]
type = FVDirichletBC
variable = u
boundary = top
value = 1
[../]
[]
[AuxKernels]
[./lsfa]
type = SpatialUserObjectAux
variable = layered_side_flux_average
boundary = top
user_object = layered_side_flux_average
[../]
[]
[Materials]
[./gcm]
type = GenericConstantMaterial
prop_values = 2
prop_names = diffusivity
boundary = 'right top'
[../]
[]
[UserObjects]
[./layered_side_flux_average]
type = LayeredSideDiffusiveFluxAverage
direction = y
diffusivity = diffusivity
num_layers = 1
variable = u
execute_on = linear
boundary = top
[../]
[]
[Executioner]
type = Steady
nl_abs_tol = 1e-14
nl_rel_tol = 1e-14
l_abs_tol = 1e-14
l_tol = 1e-6
[]
[Outputs]
exodus = true
[]
[Debug]
show_material_props = true
[]
(modules/combined/test/tests/eigenstrain/variable_cahnhilliard.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 16
ny = 16
xmin = 0
xmax = 50
ymin = 0
ymax = 50
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 0
y1 = 0
radius = 25.0
invalue = 1.0
outvalue = 0.0
int_width = 50.0
[../]
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./TensorMechanics]
displacements = 'disp_x disp_y'
[../]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[]
[AuxVariables]
[./sigma11_aux]
order = CONSTANT
family = MONOMIAL
[../]
[./sigma22_aux]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./matl_sigma11]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = sigma11_aux
[../]
[./matl_sigma22]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = sigma22_aux
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1 5'
block = 0
[../]
[./chemical_free_energy]
type = DerivativeParsedMaterial
block = 0
property_name = Fc
coupled_variables = 'c'
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 1.0e-2'
expression = 16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2
enable_jit = true
derivative_order = 2
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
C_ijkl = '7 7'
fill_method = symmetric_isotropic
[../]
[./stress]
type = ComputeLinearElasticStress
block = 0
[../]
[./var_dependence]
type = DerivativeParsedMaterial
block = 0
expression = 0.1*c
coupled_variables = c
property_name = var_dep
enable_jit = true
derivative_order = 2
[../]
[./eigenstrain]
type = ComputeVariableEigenstrain
block = 0
eigen_base = '1 1 1 0 0 0'
prefactor = var_dep
args = 'c'
eigenstrain_name = eigenstrain
[../]
[./strain]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y'
eigenstrain_names = eigenstrain
[../]
[./elastic_free_energy]
type = ElasticEnergyMaterial
f_name = Fe
block = 0
args = 'c'
derivative_order = 2
[../]
[./free_energy]
type = DerivativeSumMaterial
block = 0
property_name = F
sum_materials = 'Fc Fe'
coupled_variables = 'c'
derivative_order = 2
[../]
[]
[BCs]
[./bottom_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0
[../]
[./top_y]
type = DirichletBC
variable = disp_y
boundary = 'top'
value = -5
[../]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 'left'
value = 0
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[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
num_steps = 2
dt = 1
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/joule_heating/transient_ad_jouleheating.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 5
ymax = 5
[]
[Variables]
[./T]
initial_condition = 293.0 #in K
[../]
[./elec]
[../]
[]
[Kernels]
[./HeatDiff]
type = ADHeatConduction
variable = T
[../]
[./HeatTdot]
type = ADHeatConductionTimeDerivative
variable = T
[../]
[./HeatSrc]
type = ADJouleHeatingSource
variable = T
elec = elec
[../]
[./electric]
type = ADHeatConduction
variable = elec
thermal_conductivity = electrical_conductivity
[../]
[]
[BCs]
[./lefttemp]
type = ADDirichletBC
boundary = left
variable = T
value = 293 #in K
[../]
[./elec_left]
type = ADDirichletBC
variable = elec
boundary = left
value = 1 #in V
[../]
[./elec_right]
type = ADDirichletBC
variable = elec
boundary = right
value = 0
[../]
[]
[Materials]
[./k]
type = ADGenericConstantMaterial
prop_names = 'thermal_conductivity'
prop_values = '397.48' #copper in W/(m K)
[../]
[./cp]
type = ADGenericConstantMaterial
prop_names = 'specific_heat'
prop_values = '385.0' #copper in J/(kg K)
[../]
[./rho]
type = ADGenericConstantMaterial
prop_names = 'density'
prop_values = '8920.0' #copper in kg/(m^3)
[../]
[./sigma] #copper is default material
type = ADElectricalConductivity
temperature = T
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'hypre'
dt = 1
end_time = 5
automatic_scaling = true
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/pressure_channel/open_bc_pressure_BC_fieldSplit.i)
# This input file tests Dirichlet pressure in/outflow boundary conditions for the incompressible NS equations.
[GlobalParams]
gravity = '0 0 0'
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 3.0
ymin = 0
ymax = 1.0
nx = 30
ny = 10
elem_type = QUAD9
[]
[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
integrate_p_by_parts = false
[../]
[./y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
integrate_p_by_parts = false
[../]
[]
[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
[../]
[./inlet_p]
type = DirichletBC
variable = p
boundary = left
value = 1.0
[../]
[./outlet_p]
type = DirichletBC
variable = p
boundary = right
value = 0.0
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[]
[Preconditioning]
active = FSP
[./FSP]
type = FSP
# It is the starting point of splitting
topsplit = 'up' # 'up' should match the following block name
[./up]
splitting = 'u p' # 'u' and 'p' are the names of subsolvers
splitting_type = schur
# Splitting type is set as schur, because the pressure part of Stokes-like systems
# is not diagonally dominant. CAN NOT use additive, multiplicative and etc.
# Original system:
# | A B | | u | = | f_u |
# | C 0 | | p | | f_v |
# is factorized into
# |I 0 | | A 0| | I A^{-1}B | | u | = | f_u |
# |CA^{-1} I | | 0 -S| | 0 I | | p | | f_v |
# S = CA^{-1}B
# The preconditioning is accomplished via the following steps
# (1) p^{(0)} = f_v - CA^{-1}f_u,
# (2) pressure = (-S)^{-1} p^{(0)}
# (3) u = A^{-1}(f_u-Bp)
petsc_options_iname = '-pc_fieldsplit_schur_fact_type -pc_fieldsplit_schur_precondition'
petsc_options_value = 'full selfp'
# Factorization type here is full, which means we approximate the original system
# exactly. There are three other options:
# diag:
# | A 0|
# | 0 -S|
# lower:
# |I 0 |
# |CA^{-1} -S |
# upper:
# | I A^{-1}B |
# | 0 -S |
# The preconditioning matrix is set as selfp, which means we explicitly form a
# matrix \hat{S} = C(diag(A))^{-1}B. We do not compute the inverse of A, but instead, we compute
# the inverse of diag(A).
[../]
[./u]
vars = 'vel_x vel_y'
# PETSc options for this subsolver
# A prefix will be applied, so just put the options for this subsolver only
petsc_options_iname = '-pc_type -ksp_type -ksp_rtol'
petsc_options_value = ' hypre gmres 1e-4'
# Specify options to solve A^{-1} in the steps (1), (2) and (3).
# Solvers for A^{-1} could be different in different steps. We could
# choose in the following pressure block.
[../]
[./p]
vars = 'p'
# PETSc options for this subsolver in the step (2)
petsc_options_iname = '-pc_type -ksp_type -ksp_rtol'
petsc_options_value = ' jacobi gmres 1e-4'
# Use -inner_ksp_type and -inner_pc_type to override A^{-1} in the step (2)
# Use -lower_ksp_type and -lower_pc_type to override A^{-1} in the step (1)
[../]
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
nl_rel_tol = 1e-12
nl_max_its = 6
l_tol = 1e-6
l_max_its = 300
[]
[Outputs]
file_base = open_bc_out_pressure_BC_fieldSplit
exodus = true
[]
(modules/thermal_hydraulics/test/tests/materials/ad_wall_heat_transfer_coefficient_schad/schad_test.i)
#liquid sodium properties at 773 K
rho = 762.90
vel = 0.1
k = 64.217
mu = 2.358e-4
cp = 1264.6
T = 773
T_wall = 774
D_h = 0.1
PoD = 1.1
[GlobalParams]
execute_on = 'initial'
[]
[Problem]
solve = false
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
allow_renumbering = false
[]
[AuxVariables]
[Hw]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[Hw_ak]
type = ADMaterialRealAux
variable = Hw
property = Hw
[]
[]
[Materials]
[props]
type = ADGenericConstantMaterial
prop_names = 'rho vel k mu cp T T_wall D_h'
prop_values = '${rho} ${vel} ${k} ${mu} ${cp} ${T} ${T_wall} ${D_h}'
[]
[Hw_material]
type = ADWallHeatTransferCoefficientSchadMaterial
PoD = ${PoD}
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[Hw]
type = ElementalVariableValue
elementid = 0
variable = Hw
[]
[]
[Outputs]
csv = true
file_base = 'schad_pe_above_150'
[]
(modules/phase_field/test/tests/feature_volume_vpp_test/centroid.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 15
nz = 0
xmax = 50
ymax = 25
zmax = 0
elem_type = QUAD4
[]
[Variables]
[c]
[]
[w]
[]
[eta]
[]
[]
[ICs]
[rect_c]
y2 = 20.0
y1 = 5.0
inside = 1.0
x2 = 30.0
variable = c
x1 = 10.0
type = BoundingBoxIC
[]
[rect_eta]
y2 = 20.0
y1 = 5.0
inside = 1.0
x2 = 30.0
variable = eta
x1 = 10.0
type = BoundingBoxIC
[]
[]
[Kernels]
[c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
coupled_variables = eta
[]
[w_res]
type = SplitCHWRes
variable = w
mob_name = M
[]
[time]
type = CoupledTimeDerivative
variable = w
v = c
[]
[eta_dot]
type = TimeDerivative
variable = eta
[]
[acint_eta]
type = ACInterface
variable = eta
mob_name = M
coupled_variables = c
kappa_name = kappa_eta
[]
[acbulk_eta]
type = AllenCahn
variable = eta
mob_name = M
f_name = F
coupled_variables = c
[]
[]
[Materials]
[pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c kappa_eta'
prop_values = '5.0 2.0 0.1'
[]
[free_energy]
type = DerivativeParsedMaterial
coupled_variables = 'c eta'
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 1.0e-2'
expression = 16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2+(c-eta)^2
derivative_order = 2
[]
[]
[Postprocessors]
[grain_center]
type = GrainTracker
variable = eta
outputs = none
compute_var_to_feature_map = true
execute_on = 'timestep_begin'
[]
[]
[VectorPostprocessors]
[grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_center
execute_on = 'timestep_begin'
output_centroids = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 0.2
num_steps = 4
[]
[Outputs]
csv = true
[]
(modules/combined/test/tests/phase_field_fracture/crack2d_vol_dev.i)
#This input uses PhaseField-Nonconserved Action to add phase field fracture bulk rate kernels
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
ymax = 0.5
[]
[./noncrack]
type = BoundingBoxNodeSetGenerator
new_boundary = noncrack
bottom_left = '0.5 0 0'
top_right = '1 0 0'
input = gen
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Modules]
[./PhaseField]
[./Nonconserved]
[./c]
free_energy = F
kappa = kappa_op
mobility = L
[../]
[../]
[../]
[./TensorMechanics]
[./Master]
[./mech]
add_variables = true
strain = SMALL
additional_generate_output = 'stress_yy'
save_in = 'resid_x resid_y'
[../]
[../]
[../]
[]
[AuxVariables]
[./resid_x]
[../]
[./resid_y]
[../]
[]
[Kernels]
[./solid_x]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_x
component = 0
c = c
[../]
[./solid_y]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_y
component = 1
c = c
[../]
[]
[BCs]
[./ydisp]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = 't'
[../]
[./yfix]
type = DirichletBC
variable = disp_y
boundary = noncrack
value = 0
[../]
[./xfix]
type = DirichletBC
variable = disp_x
boundary = top
value = 0
[../]
[]
[Materials]
[./pfbulkmat]
type = GenericConstantMaterial
prop_names = 'gc_prop l visco'
prop_values = '1e-3 0.04 1e-4'
[../]
[./define_mobility]
type = ParsedMaterial
material_property_names = 'gc_prop visco'
property_name = L
expression = '1.0/(gc_prop * visco)'
[../]
[./define_kappa]
type = ParsedMaterial
material_property_names = 'gc_prop l'
property_name = kappa_op
expression = 'gc_prop * l'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '120.0 80.0'
fill_method = symmetric_isotropic
[../]
[./damage_stress]
type = ComputeLinearElasticPFFractureStress
c = c
E_name = 'elastic_energy'
D_name = 'degradation'
F_name = 'local_fracture_energy'
decomposition_type = strain_vol_dev
[../]
[./degradation]
type = DerivativeParsedMaterial
property_name = degradation
coupled_variables = 'c'
expression = '(1.0-c)^2*(1.0 - eta) + eta'
constant_names = 'eta'
constant_expressions = '0.0'
derivative_order = 2
[../]
[./local_fracture_energy]
type = DerivativeParsedMaterial
property_name = local_fracture_energy
coupled_variables = 'c'
material_property_names = 'gc_prop l'
expression = 'c^2 * gc_prop / 2 / l'
derivative_order = 2
[../]
[./fracture_driving_energy]
type = DerivativeSumMaterial
coupled_variables = c
sum_materials = 'elastic_energy local_fracture_energy'
derivative_order = 2
property_name = F
[../]
[]
[Postprocessors]
[./resid_x]
type = NodalSum
variable = resid_x
boundary = 2
[../]
[./resid_y]
type = NodalSum
variable = resid_y
boundary = 2
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
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'
nl_rel_tol = 1e-8
l_max_its = 10
nl_max_its = 10
dt = 1e-4
dtmin = 1e-4
num_steps = 2
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/phase_field_kernels/nonuniform_barrier_coefficient.i)
# This material tests the kernels ACBarrierFunction and ACKappaFunction for a
# multiphase system.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmin = -200
xmax = 200
ymin = -200
ymax = 200
uniform_refine = 0
[]
[Variables]
[./gr0]
[../]
[./gr1]
[../]
[]
[ICs]
[./gr0_IC]
type = BoundingBoxIC
variable = gr0
x1 = -80
y1 = -80
x2 = 80
y2 = 80
inside = 0
outside = 1
[../]
[./gr1_IC]
type = BoundingBoxIC
variable = gr1
x1 = -80
y1 = -80
x2 = 80
y2 = 80
inside = 1
outside = 0
[../]
[]
[Materials]
[./constants]
type = GenericConstantMaterial
prop_names = 'L gamma E0 E1'
prop_values = '0.1 1.5 3 1'
[../]
[./h0]
type = DerivativeParsedMaterial
property_name = h0
coupled_variables = 'gr0 gr1'
expression = 'gr0^2 / (gr0^2 + gr1^2)'
derivative_order = 2
[../]
[./h1]
type = DerivativeParsedMaterial
property_name = h1
coupled_variables = 'gr0 gr1'
expression = 'gr1^2 / (gr0^2 + gr1^2)'
derivative_order = 2
[../]
[./mu]
type = DerivativeParsedMaterial
property_name = mu
coupled_variables = 'gr0 gr1'
constant_names = 'mag'
constant_expressions = '16'
expression = 'mag * (gr0^2 * gr1^2 + 0.1)'
derivative_order = 2
[../]
[./kappa]
type = DerivativeParsedMaterial
property_name = kappa
coupled_variables = 'gr0 gr1'
material_property_names = 'h0(gr0,gr1) h1(gr0,gr1)'
constant_names = 'mag0 mag1'
constant_expressions = '200 100'
expression = 'h0*mag0 + h1*mag1'
derivative_order = 2
[../]
[]
[Kernels]
[./gr0_time]
type = TimeDerivative
variable = gr0
[../]
[./gr0_interface]
type = ACInterface
variable = gr0
coupled_variables = 'gr1'
mob_name = L
kappa_name = 'kappa'
[../]
[./gr0_switching]
type = ACSwitching
variable = gr0
coupled_variables = 'gr1'
hj_names = 'h0 h1'
Fj_names = 'E0 E1'
mob_name = L
[../]
[./gr0_multi]
type = ACGrGrMulti
variable = gr0
v = 'gr1'
mob_name = L
gamma_names = 'gamma'
[../]
[./gr0_barrier]
type = ACBarrierFunction
variable = gr0
mob_name = L
gamma = gamma
v = 'gr1'
[../]
[./gr0_kappa]
type = ACKappaFunction
variable = gr0
mob_name = L
kappa_name = kappa
v = 'gr1'
[../]
[./gr1_time]
type = TimeDerivative
variable = gr1
[../]
[./gr1_interface]
type = ACInterface
variable = gr1
coupled_variables = 'gr0'
mob_name = L
kappa_name = 'kappa'
[../]
[./gr1_switching]
type = ACSwitching
variable = gr1
coupled_variables = 'gr0'
hj_names = 'h0 h1'
Fj_names = 'E0 E1'
mob_name = L
[../]
[./gr1_multi]
type = ACGrGrMulti
variable = gr1
v = 'gr0'
mob_name = L
gamma_names = 'gamma'
[../]
[./gr1_barrier]
type = ACBarrierFunction
variable = gr1
mob_name = L
gamma = gamma
v = 'gr0'
[../]
[./gr1_kappa]
type = ACKappaFunction
variable = gr1
mob_name = L
kappa_name = kappa
v = 'gr0'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type -sub_pc_type -pc_asm_overlap -ksp_gmres_restart -sub_ksp_type'
petsc_options_value = ' asm ilu 1 31 preonly'
nl_max_its = 20
l_max_its = 30
l_tol = 1e-4
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
start_time = 0
num_steps = 3
dt = 1
[]
[Outputs]
exodus = true
[]
(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/critical_time_step/crit_time_solid_variable.i)
[GlobalParams]
displacements = 'disp_x'
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 50
xmin = 0
xmax = 5
[]
[Variables]
[./disp_x]
[../]
[]
[Kernels]
[SolidMechanics]
[../]
[]
[BCs]
[./2_x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[]
[Functions]
[./prefac]
type = ParsedFunction
expression = '1+2*x'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
poissons_ratio = 0.1
youngs_modulus = 1e6
elasticity_tensor_prefactor = prefac
[../]
[./strain]
type = ComputeSmallStrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./density]
type = GenericConstantMaterial
prop_names = 'density'
prop_values = '8050.0'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
nl_abs_tol = 1e-4
l_max_its = 3
start_time = 0.0
dt = 0.1
num_steps = 1
end_time = 1.0
[]
[Postprocessors]
[./time_step]
type = CriticalTimeStep
[../]
[]
[Outputs]
csv = true
[]
(modules/phase_field/test/tests/MultiPhase/lagrangemult.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 14
ny = 10
nz = 0
xmin = 10
xmax = 40
ymin = 15
ymax = 35
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 25.0
y1 = 25.0
radius = 6.0
invalue = 0.9
outvalue = 0.1
int_width = 3.0
[../]
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[./eta1]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 30.0
y1 = 25.0
radius = 4.0
invalue = 0.9
outvalue = 0.1
int_width = 2.0
[../]
[../]
[./eta2]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[../]
[./lambda]
order = FIRST
family = LAGRANGE
initial_condition = 1.0
[../]
[]
[Kernels]
[./deta1dt]
type = TimeDerivative
variable = eta1
[../]
[./ACBulk1]
type = AllenCahn
variable = eta1
coupled_variables = 'c eta2'
f_name = F
[../]
[./ACInterface1]
type = ACInterface
variable = eta1
kappa_name = kappa_eta
[../]
[./lagrange1]
type = SwitchingFunctionConstraintEta
variable = eta1
h_name = h1
lambda = lambda
[../]
[./deta2dt]
type = TimeDerivative
variable = eta2
[../]
[./ACBulk2]
type = AllenCahn
variable = eta2
coupled_variables = 'c eta1'
f_name = F
[../]
[./ACInterface2]
type = ACInterface
variable = eta2
kappa_name = kappa_eta
[../]
[./lagrange2]
type = SwitchingFunctionConstraintEta
variable = eta2
h_name = h2
lambda = lambda
[../]
[./lagrange]
type = SwitchingFunctionConstraintLagrange
variable = lambda
etas = 'eta1 eta2'
h_names = 'h1 h2'
epsilon = 0
[../]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
coupled_variables = 'eta1 eta2'
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time1]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'L kappa_eta'
prop_values = '1 1 '
[../]
[./consts2]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1 1'
[../]
[./switching1]
type = SwitchingFunctionMaterial
function_name = h1
eta = eta1
h_order = SIMPLE
outputs = exodus
[../]
[./switching2]
type = SwitchingFunctionMaterial
function_name = h2
eta = eta2
h_order = SIMPLE
outputs = exodus
[../]
[./barrier]
type = MultiBarrierFunctionMaterial
etas = 'eta1 eta2'
[../]
[./free_energy_A]
type = DerivativeParsedMaterial
property_name = Fa
coupled_variables = 'c'
expression = '(c-0.1)^2'
derivative_order = 2
enable_jit = true
[../]
[./free_energy_B]
type = DerivativeParsedMaterial
property_name = Fb
coupled_variables = 'c'
expression = '(c-0.9)^2'
derivative_order = 2
enable_jit = true
[../]
[./free_energy]
type = DerivativeMultiPhaseMaterial
property_name = F
fi_names = 'Fa Fb'
hi_names = 'h1 h2'
etas = 'eta1 eta2'
coupled_variables = 'c'
derivative_order = 2
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
#petsc_options = '-snes_ksp -snes_ksp_ew'
#petsc_options = '-ksp_monitor_snes_lg-snes_ksp_ew'
#petsc_options_iname = '-ksp_gmres_restart'
#petsc_options_value = '1000 '
l_max_its = 15
l_tol = 1.0e-6
nl_max_its = 50
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-10
start_time = 0.0
num_steps = 1
dt = 0.01
dtmin = 0.01
[]
[Debug]
# show_var_residual_norms = true
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialAnisotropyAntitrap.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
xmin = -2
xmax = 2
ymin = -2
ymax = 2
[]
[GlobalParams]
radius = 1.0
int_width = 0.8
x1 = 0
y1 = 0
enable_jit = true
derivative_order = 2
[]
[Variables]
[./w]
[../]
[./etaa0]
[../]
[./etab0]
[../]
[]
[AuxVariables]
[./bnds]
[../]
[]
[AuxKernels]
[./bnds]
type = BndsCalcAux
variable = bnds
v = 'etaa0 etab0'
[../]
[]
[ICs]
[./w]
type = SmoothCircleIC
variable = w
outvalue = -4.0
invalue = 0.0
[../]
[./etaa0]
type = SmoothCircleIC
variable = etaa0
#Solid phase
outvalue = 0.0
invalue = 1.0
[../]
[./etab0]
type = SmoothCircleIC
variable = etab0
#Liquid phase
outvalue = 1.0
invalue = 0.0
[../]
[]
[Kernels]
# Order parameter eta_alpha0
[./ACa0_bulk]
type = ACGrGrMulti
variable = etaa0
v = 'etab0'
gamma_names = 'gab'
[../]
[./ACa0_sw]
type = ACSwitching
variable = etaa0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etab0 w'
[../]
[./ACa0_int1]
type = ACInterface2DMultiPhase1
variable = etaa0
etas = 'etab0'
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
d2kappadgrad_etaa_name = d2kappadgrad_etaa
[../]
[./ACa0_int2]
type = ACInterface2DMultiPhase2
variable = etaa0
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
[../]
[./ea0_dot]
type = TimeDerivative
variable = etaa0
[../]
# Order parameter eta_beta0
[./ACb0_bulk]
type = ACGrGrMulti
variable = etab0
v = 'etaa0'
gamma_names = 'gab'
[../]
[./ACb0_sw]
type = ACSwitching
variable = etab0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etaa0 w'
[../]
[./ACb0_int1]
type = ACInterface2DMultiPhase1
variable = etab0
etas = 'etaa0'
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
d2kappadgrad_etaa_name = d2kappadgrad_etab
[../]
[./ACb0_int2]
type = ACInterface2DMultiPhase2
variable = etab0
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
[../]
[./eb0_dot]
type = TimeDerivative
variable = etab0
[../]
#Chemical potential
[./w_dot]
type = SusceptibilityTimeDerivative
variable = w
f_name = chi
coupled_variables = '' # in this case chi (the susceptibility) is simply a constant
[../]
[./Diffusion]
type = MatDiffusion
variable = w
diffusivity = Dchi
args = ''
[../]
[./coupled_etaa0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etaa0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0'
[../]
[./coupled_etab0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etab0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0'
[../]
[./coupled_etaa0dot_int]
type = AntitrappingCurrent
variable = w
v = etaa0
f_name = rhodiff
[../]
[./coupled_etab0dot_int]
type = AntitrappingCurrent
variable = w
v = etab0
f_name = rhodiff
[../]
[]
[Materials]
[./ha]
type = SwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'etaa0 etab0'
phase_etas = 'etaa0'
[../]
[./hb]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etaa0 etab0'
phase_etas = 'etab0'
[../]
[./omegaa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegaa
material_property_names = 'Vm ka caeq'
expression = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
[../]
[./omegab]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegab
material_property_names = 'Vm kb cbeq'
expression = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq'
[../]
[./rhoa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhoa
material_property_names = 'Vm ka caeq'
expression = 'w/Vm^2/ka + caeq/Vm'
[../]
[./rhob]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhob
material_property_names = 'Vm kb cbeq'
expression = 'w/Vm^2/kb + cbeq/Vm'
[../]
[./int]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhodiff
material_property_names = 'rhoa rhob'
constant_names = 'int_width'
constant_expressions = '0.8'
expression = 'int_width*(rhob-rhoa)'
[../]
[./kappaa]
type = InterfaceOrientationMultiphaseMaterial
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
d2kappadgrad_etaa_name = d2kappadgrad_etaa
etaa = etaa0
etab = etab0
[../]
[./kappab]
type = InterfaceOrientationMultiphaseMaterial
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
d2kappadgrad_etaa_name = d2kappadgrad_etab
etaa = etab0
etab = etaa0
[../]
[./const]
type = GenericConstantMaterial
prop_names = 'L D chi Vm ka caeq kb cbeq gab mu'
prop_values = '1.0 1.0 0.1 1.0 10.0 0.1 10.0 0.9 4.5 10.0'
[../]
[./Mobility]
type = ParsedMaterial
property_name = Dchi
material_property_names = 'D chi'
expression = 'D*chi'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 lu 1'
l_tol = 1.0e-3
nl_rel_tol = 1.0e-8
nl_abs_tol = 1e-8
num_steps = 3
[./TimeStepper]
type = IterationAdaptiveDT
dt = 0.001
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/materials/has_material/has_boundary_prop.i)
[Mesh]
type = FileMesh
file = rectangle.e
[]
[Variables]
[./u]
[../]
[]
[Kernels]
active = 'u_diff'
[./u_diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[./right]
type = MatTestNeumannBC
variable = u
boundary = 2
mat_prop = 'right_bc'
has_check = true
[../]
[]
[Materials]
[./right_bc]
type = GenericConstantMaterial
boundary = 2
prop_names = 'right_bc'
prop_values = '2.0'
[../]
[./other]
type = GenericConstantMaterial
boundary = 1
prop_names = 'other_value'
prop_values = '1.0'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/phase_field/test/tests/MultiSmoothCircleIC/latticesmoothcircleIC_small_invalue_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 25
xmax = 50
ymax = 50
elem_type = QUAD4
[]
[Variables]
[./c]
order = THIRD
family = HERMITE
[../]
[]
[ICs]
[./c]
type = SpecifiedSmoothCircleIC
variable = c
invalue = -0.8
outvalue = 1
int_width = 5
x_positions = '25 32'
z_positions = '0 0'
y_positions = '25 32'
radii = '6 5'
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./CHSolid]
type = CHMath
variable = c
mob_name = M
[../]
[./CHInterface]
type = CHInterface
variable = c
kappa_name = kappa_c
mob_name = M
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./constant]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1.0 1.5'
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_max_its = 20
l_tol = 1.0e-5
nl_max_its = 40
nl_rel_tol = 5.0e-14
start_time = 0.0
num_steps = 1
dt = 5
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/NAFEMS/transient/T3/nafems_t3_edge_template.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 5
xmin = 0.0
xmax = 0.1
elem_type = EDGE2
[]
[Variables]
[./temp]
initial_condition = 0.0
[../]
[]
[BCs]
[./FixedTempLeft]
type = DirichletBC
variable = temp
boundary = left
value = 0.0
[../]
[./FunctionTempRight]
type = FunctionDirichletBC
variable = temp
boundary = right
function = '100.0 * sin(pi*t/40)'
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = temp
[../]
[./HeatTdot]
type = HeatConductionTimeDerivative
variable = temp
[../]
[]
[Materials]
[./density]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '35.0 440.5 7200.0'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
l_tol = 1e-5
nl_max_its = 50
nl_rel_tol = 1e-10
nl_abs_tol = 1e-12
dt = 1
end_time = 32.0
[]
[Postprocessors]
[./target_temp]
type = NodalVariableValue
variable = temp
nodeid = 4
[../]
[]
[Outputs]
csv = true
[]
(modules/contact/test/tests/explicit_dynamics/first_test.i)
# One element test to test the central difference time integrator in 3D.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[block_one]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 2
xmin = 4.5
xmax = 5.5
ymin = 4.5
ymax = 5.5
zmin = 0.0001
zmax = 1.0001
boundary_name_prefix = 'ball'
[]
[block_two]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 2
xmin = 0.0
xmax = 10
ymin = 0.0
ymax = 10
zmin = -2
zmax = 0
boundary_name_prefix = 'base'
boundary_id_offset = 10
[]
[block_one_id]
type = SubdomainIDGenerator
input = block_one
subdomain_id = 1
[]
[block_two_id]
type = SubdomainIDGenerator
input = block_two
subdomain_id = 2
[]
[combine]
type = MeshCollectionGenerator
inputs = ' block_one_id block_two_id'
[]
allow_renumbering = false
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[AuxVariables]
[vel_x]
[]
[accel_x]
[]
[vel_y]
[]
[accel_y]
[]
[vel_z]
[]
[accel_z]
[]
[]
[AuxKernels]
[accel_x]
type = TestNewmarkTI
variable = accel_x
displacement = disp_x
first = false
[]
[vel_x]
type = TestNewmarkTI
variable = vel_x
displacement = disp_x
[]
[accel_y]
type = TestNewmarkTI
variable = accel_y
displacement = disp_y
first = false
[]
[vel_y]
type = TestNewmarkTI
variable = vel_y
displacement = disp_x
[]
[accel_z]
type = TestNewmarkTI
variable = accel_z
displacement = disp_z
first = false
[]
[vel_z]
type = TestNewmarkTI
variable = vel_z
displacement = disp_z
[]
[]
[Kernels]
[DynamicTensorMechanics]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
stiffness_damping_coefficient = 0.04
#generate_output = 'stress_zz strain_zz'
[]
[inertia_x]
type = InertialForce
variable = disp_x
[]
[inertia_y]
type = InertialForce
variable = disp_y
[]
[inertia_z]
type = InertialForce
variable = disp_z
[]
[]
[Functions]
[dispz]
type = ParsedFunction
expression = if(t<1.0e3,-0.01*t,0)
[]
[push]
type = ParsedFunction
expression = if(t<10.0,0.01*t,0.1)
[]
[]
[BCs]
[z_front]
type = FunctionDirichletBC
variable = disp_z
boundary = 'ball_front'
function = dispz
preset = false
[]
[x_front]
type = DirichletBC
variable = disp_x
boundary = 'ball_front'
preset = false
value = 0.0
[]
[y_front]
type = DirichletBC
variable = disp_y
boundary = 'ball_front'
preset = false
value = 0.0
[]
[x_fixed]
type = DirichletBC
variable = disp_x
boundary = 'base_back'
preset = false
value = 0.0
[]
[y_fixed]
type = DirichletBC
variable = disp_y
boundary = 'base_back'
preset = false
value = 0.0
[]
[z_fixed]
type = DirichletBC
variable = disp_z
boundary = 'base_back'
preset = false
value = 0.0
[]
[]
[ExplicitDynamicsContact]
[my_contact]
model = frictionless
primary = base_front
secondary = ball_back
penalty = 1.0e3
[]
[]
[Materials]
[elasticity_tensor_block_one]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e3
poissons_ratio = 0.0
block = 1
[]
[elasticity_tensor_block_two]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.0
block = 2
[]
[strain_block]
type = ComputeIncrementalSmallStrain
displacements = 'disp_x disp_y disp_z'
implicit = false
[]
[stress_block]
type = ComputeFiniteStrainElasticStress
[]
[density]
type = GenericConstantMaterial
prop_names = density
prop_values = 1e4
[]
[wave_speed]
type = WaveSpeed
[]
[]
[Executioner]
type = Transient
start_time = -0.01
end_time = 0.25
dt = 0.005
timestep_tolerance = 1e-6
[TimeIntegrator]
type = CentralDifference
[]
[]
[Postprocessors]
[disp_58z]
type = NodalVariableValue
nodeid = 1
variable = disp_z
[]
[critical_time_step]
type = CriticalTimeStep
[]
[contact_pressure_max]
type = NodalExtremeValue
variable = contact_pressure
block = '1 2'
value_type = max
[]
[]
[Outputs]
exodus = true
csv = true
[]
(test/tests/restrictable/boundary_api_test/boundary_restrictable.i)
[Mesh]
type = FileMesh
file = rectangle.e
dim = 2
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = BndTestDirichletBC
variable = u
boundary = 1
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Materials]
[./mat0]
type = GenericConstantMaterial
boundary = 1
prop_names = 'a'
prop_values = '1'
[../]
[./mat1]
type = GenericConstantMaterial
boundary = 2
prop_names = 'a b'
prop_values = '10 20'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
(modules/combined/test/tests/misc/re_init_face.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 16
ny = 16
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Modules/TensorMechanics/Master]
[all]
use_automatic_differentiation = false
strain = FINITE
add_variables = true
[]
[]
[Variables]
[disp_x]
order = FIRST
[]
[disp_y]
order = FIRST
[]
[]
[Materials]
[elastic_tensor_cover]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 10
poissons_ratio = 0.3
use_displaced_mesh = true
[]
[stress]
type = ComputeFiniteStrainElasticStress
[]
[density]
type = GenericConstantMaterial
prop_names = 'density'
prop_values = '1'
[]
[]
[Executioner]
type = Transient
dt = 0.3
num_steps = 3
[]
[Postprocessors]
[side_average]
type = SideAverageValue
boundary = right
variable = disp_x
[]
[]
(modules/phase_field/test/tests/KKS_system/kks_example.i)
#
# KKS toy problem in the non-split form
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
nz = 0
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
# order parameter
[./eta]
order = THIRD
family = HERMITE
[../]
# hydrogen concentration
[./c]
order = THIRD
family = HERMITE
[../]
# hydrogen phase concentration (matrix)
[./cm]
order = THIRD
family = HERMITE
initial_condition = 0.0
[../]
# hydrogen phase concentration (delta phase)
[./cd]
order = THIRD
family = HERMITE
initial_condition = 0.0
[../]
[]
[ICs]
[./eta]
variable = eta
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 0.2
invalue = 0.2
outvalue = 0.1
int_width = 0.05
[../]
[./c]
variable = c
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 0.2
invalue = 0.6
outvalue = 0.4
int_width = 0.05
[../]
[]
[BCs]
[./Periodic]
[./all]
variable = 'eta c cm cd'
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
# Free energy of the matrix
[./fm]
type = DerivativeParsedMaterial
property_name = fm
coupled_variables = 'cm'
expression = '(0.1-cm)^2'
outputs = oversampling
[../]
# Free energy of the delta phase
[./fd]
type = DerivativeParsedMaterial
property_name = fd
coupled_variables = 'cd'
expression = '(0.9-cd)^2'
outputs = oversampling
[../]
# h(eta)
[./h_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta
outputs = oversampling
[../]
# g(eta)
[./g_eta]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta
outputs = oversampling
[../]
# constant properties
[./constants]
type = GenericConstantMaterial
prop_names = 'L '
prop_values = '0.7 '
[../]
[]
[Kernels]
# enforce c = (1-h(eta))*cm + h(eta)*cd
[./PhaseConc]
type = KKSPhaseConcentration
ca = cm
variable = cd
c = c
eta = eta
[../]
# enforce pointwise equality of chemical potentials
[./ChemPotVacancies]
type = KKSPhaseChemicalPotential
variable = cm
cb = cd
fa_name = fm
fb_name = fd
[../]
#
# Cahn-Hilliard Equation
#
[./CHBulk]
type = KKSCHBulk
variable = c
ca = cm
cb = cd
fa_name = fm
fb_name = fd
mob_name = 0.7
[../]
[./dcdt]
type = TimeDerivative
variable = c
[../]
#
# Allen-Cahn Equation
#
[./ACBulkF]
type = KKSACBulkF
variable = eta
fa_name = fm
fb_name = fd
coupled_variables = 'cm cd'
w = 0.4
[../]
[./ACBulkC]
type = KKSACBulkC
variable = eta
ca = cm
cb = cd
fa_name = fm
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = 0.4
[../]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pctype -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = ' asm lu nonzero'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-4
num_steps = 1
dt = 0.01
dtmin = 0.01
[]
[Preconditioning]
[./mydebug]
type = SMP
full = true
[../]
[]
[Outputs]
file_base = kks_example
[./oversampling]
type = Exodus
refinements = 3
[../]
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_by_parts_traction_steady_stabilized.i)
[GlobalParams]
order = FIRST
integrate_p_by_parts = true
viscous_form = 'traction'
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[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]
[../]
[]
# 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_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 = 'inlet_func'
[../]
[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
[]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[ins_mat]
type = INSADTauMaterial
velocity = velocity
pressure = p
[]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[../]
[]
(modules/heat_transfer/test/tests/code_verification/cylindrical_test_no4.i)
# Problem II.4
#
# An infinitely long hollow cylinder has thermal conductivity k and internal
# heat generation q. Its inner radius is ri and outer radius is ro.
# A constant heat flux is applied to the inside surface qin and
# the outside surface is exposed to a fluid temperature T and heat transfer
# coefficient h, which results in the convective boundary condition.
#
# REFERENCE:
# A. Toptan, et al. (Mar.2020). Tech. rep. CASL-U-2020-1939-000, SAND2020-3887 R. DOI:10.2172/1614683.
[Mesh]
[./geom]
type = GeneratedMeshGenerator
dim = 1
elem_type = EDGE2
xmin = 0.2
nx = 4
[../]
[]
[Variables]
[./u]
order = FIRST
[../]
[]
[Problem]
coord_type = RZ
[]
[Functions]
[./exact]
type = ParsedFunction
symbol_names = 'qin q k ri ro uf h'
symbol_values = '100 1200 1.0 0.2 1 100 10'
expression = 'uf+ (0.25*q/k) * ( 2*k*(ro^2-ri^2)/(h*ro) + ro^2-x^2 + 2*ri^2*log(x/ro)) + (k/(h*ro) - log(x/ro)) * qin * ri / k'
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = u
[../]
[./heatsource]
type = HeatSource
function = 1200
variable = u
[../]
[]
[BCs]
[./ui]
type = NeumannBC
boundary = left
variable = u
value = 100
[../]
[./uo]
type = CoupledConvectiveHeatFluxBC
boundary = right
variable = u
htc = 10.0
T_infinity = 100
[../]
[]
[Materials]
[./property]
type = GenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '1.0 1.0 1.0'
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = exact
variable = u
[../]
[./h]
type = AverageElementSize
[]
[]
[Outputs]
csv = true
[]
(modules/phase_field/test/tests/ADCHSoretDiffusion/simple_transient_diffusion_with_soret.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
[]
[Variables]
[./c]
[../]
[./mu]
[../]
[]
[AuxVariables]
[./T]
[./InitialCondition]
type = RampIC
value_left = 900
value_right = 1000
[../]
[../]
[]
[Kernels]
[./conc]
type = ADCHSplitConcentration
variable = c
chemical_potential_var = mu
mobility = chemical_mobility_prop
[../]
[./chempot]
type = ADCHSplitChemicalPotential
variable = mu
chemical_potential = mu_prop
[../]
[./soret]
type = ADCHSoretMobility
variable = c
T = T
mobility = thermal_mobility_prop
[../]
[./time]
type = ADTimeDerivative
variable = c
[../]
[]
[Materials]
[./chemical_potential]
type = ADPiecewiseLinearInterpolationMaterial
property = mu_prop
variable = c
x = '0 1'
y = '0 1'
[../]
[./chemical_mobility_prop]
type = ADGenericConstantMaterial
prop_names = chemical_mobility_prop
prop_values = 0.1
[../]
[./thermal_mobility_prop]
type = ADGenericConstantMaterial
prop_names = thermal_mobility_prop
prop_values = -20
[../]
[]
[BCs]
[./leftc]
type = DirichletBC
variable = c
boundary = left
value = 0
[../]
[./rightc]
type = DirichletBC
variable = c
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -ksp_grmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 2'
dt = 0.1
num_steps = 20
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/crystal_plasticity/hcp_single_crystal/hcp_volumetric_eigenstrain.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
ny = 2
nz = 2
elem_type = HEX8
[]
[AuxVariables]
[temperature]
order = FIRST
family = LAGRANGE
[]
[e_xtalpl_xx]
order = CONSTANT
family = MONOMIAL
[]
[e_xtalpl_yy]
order = CONSTANT
family = MONOMIAL
[]
[ev_zz]
order = CONSTANT
family = MONOMIAL
[]
[e_xtalpl_zz]
order = CONSTANT
family = MONOMIAL
[]
[fv_xx]
order = CONSTANT
family = MONOMIAL
[]
[fv_yy]
order = CONSTANT
family = MONOMIAL
[]
[fv_zz]
order = CONSTANT
family = MONOMIAL
[]
[fp_xx]
order = CONSTANT
family = MONOMIAL
[]
[fp_yy]
order = CONSTANT
family = MONOMIAL
[]
[fp_zz]
order = CONSTANT
family = MONOMIAL
[]
[f_xx]
order = CONSTANT
family = MONOMIAL
[]
[f_yy]
order = CONSTANT
family = MONOMIAL
[]
[f_zz]
order = CONSTANT
family = MONOMIAL
[]
[]
[Physics/SolidMechanics/QuasiStatic/all]
strain = FINITE
incremental = true
add_variables = true
additional_generate_output = 'stress_zz stress_xx stress_yy vonmises_stress l2norm_strain'
additional_material_output_order = FIRST
[]
[Functions]
[temperature_ramp]
type = ParsedFunction
expression = 'if(t<=1500.0, 600.0 + t/6.0, 850.0)'
[]
[]
[AuxKernels]
[temperature]
type = FunctionAux
variable = temperature
function = 'temperature_ramp'
execute_on = timestep_begin
[]
[e_xtalpl_xx]
type = RankTwoAux
variable = e_xtalpl_xx
rank_two_tensor = total_lagrangian_strain
index_j = 0
index_i = 0
execute_on = timestep_end
[]
[e_xtalpl_yy]
type = RankTwoAux
variable = e_xtalpl_yy
rank_two_tensor = total_lagrangian_strain
index_j = 1
index_i = 1
execute_on = timestep_end
[]
[ev_zz]
type = RankTwoAux
variable = ev_zz
rank_two_tensor = void_eigenstrain
index_j = 2
index_i = 2
execute_on = timestep_end
[]
[e_xtalpl_zz]
type = RankTwoAux
variable = e_xtalpl_zz
rank_two_tensor = total_lagrangian_strain
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[fv_xx]
type = RankTwoAux
variable = fv_xx
rank_two_tensor = volumetric_deformation_gradient
index_j = 0
index_i = 0
execute_on = timestep_end
[]
[fv_yy]
type = RankTwoAux
variable = fv_yy
rank_two_tensor = volumetric_deformation_gradient
index_j = 1
index_i = 1
execute_on = timestep_end
[]
[fv_zz]
type = RankTwoAux
variable = fv_zz
rank_two_tensor = volumetric_deformation_gradient
index_j = 2
index_i = 2
execute_on = timestep_end
[]
[fp_xx]
type = RankTwoAux
variable = fp_xx
rank_two_tensor = plastic_deformation_gradient
index_j = 0
index_i = 0
execute_on = timestep_end
[]
[fp_yy]
type = RankTwoAux
variable = fp_yy
rank_two_tensor = plastic_deformation_gradient
index_j = 1
index_i = 1
execute_on = timestep_end
[]
[fp_zz]
type = RankTwoAux
variable = fp_zz
rank_two_tensor = plastic_deformation_gradient
index_j = 2
index_i = 2
execute_on = timestep_end
[]
[f_xx]
type = RankTwoAux
variable = f_xx
rank_two_tensor = deformation_gradient
index_j = 0
index_i = 0
execute_on = timestep_end
[]
[f_yy]
type = RankTwoAux
variable = f_yy
rank_two_tensor = deformation_gradient
index_j = 1
index_i = 1
execute_on = timestep_end
[]
[f_zz]
type = RankTwoAux
variable = f_zz
rank_two_tensor = deformation_gradient
index_j = 2
index_i = 2
execute_on = timestep_end
[]
[]
[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
[]
[tdisp]
type = DirichletBC
variable = disp_z
boundary = front
value = 0
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeElasticityTensorCP
C_ijkl = '1.684e5 1.214e5 1.214e5 1.684e5 1.214e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
[]
[stress]
type = ComputeMultipleCrystalPlasticityStress
crystal_plasticity_models = 'trial_xtalpl'
eigenstrain_names = void_eigenstrain
tan_mod_type = exact
line_search_method = CUT_HALF
use_line_search = true
maximum_substep_iteration = 10
[]
[trial_xtalpl]
type = CrystalPlasticityHCPDislocationSlipBeyerleinUpdate
number_slip_systems = 15
slip_sys_file_name = hcp_aprismatic_capyramidal_slip_sys.txt
unit_cell_dimension = '2.934e-7 2.934e-7 4.657e-7' #Ti, in mm, https://materialsproject.org/materials/mp-46/
temperature = temperature
initial_forest_dislocation_density = 15.0e3
initial_substructure_density = 1.0e3
slip_system_modes = 2
number_slip_systems_per_mode = '3 12'
lattice_friction_per_mode = '9 22' #Knezevic et al MSEA 654 (2013)
effective_shear_modulus_per_mode = '4.7e2 4.7e2' #Ti, in MPa, https://materialsproject.org/materials/mp-46/
burgers_vector_per_mode = '2.934e-7 6.586e-7' #Ti, in mm, https://materialsproject.org/materials/mp-46/
slip_generation_coefficient_per_mode = '1.25e5 2.25e7' #from Beyerlein and Tome 2008 IJP
normalized_slip_activiation_energy_per_mode = '3.73e-3 3.2e-2' #from Beyerlein and Tome 2008 IJP
slip_energy_proportionality_factor_per_mode = '330 100' #from Beyerlein and Tome 2008 IJP
substructure_rate_coefficient_per_mode = '355 0.4' #from Capolungo et al MSEA (2009)
applied_strain_rate = 0.001
gamma_o = 1.0e-3
Hall_Petch_like_constant_per_mode = '0.2 0.2' #Estimated to match graph in Capolungo et al MSEA (2009), Figure 2
grain_size = 20.0e-3 #20 microns, Beyerlein and Tome IJP (2008)
[]
[void_eigenstrain]
type = ComputeCrystalPlasticityVolumetricEigenstrain
eigenstrain_name = void_eigenstrain
deformation_gradient_name = volumetric_deformation_gradient
mean_spherical_void_radius = void_radius
spherical_void_number_density = void_density
[]
[void_density]
type = ParsedMaterial
property_name = void_density
coupled_variables = temperature
expression = 'if(temperature<611.0, 0.0,
if(temperature<=835.0, 2.387e13 *(temperature - 611.0) / 1344.0, 0.0))' #1/mm^3, gives an eigenstrain of 1.0e-5 with radius=1.0e-6mm
# outputs = exodus
[]
[void_radius]
type = GenericConstantMaterial
prop_names = void_radius
prop_values = '1.0e-6' ##1 nm avg particle radius
[]
[]
[Postprocessors]
[stress_zz]
type = ElementAverageValue
variable = stress_zz
[]
[e_xtalpl_xx]
type = ElementAverageValue
variable = e_xtalpl_xx
[]
[e_xtalpl_yy]
type = ElementAverageValue
variable = e_xtalpl_yy
[]
[ev_zz]
type = ElementAverageValue
variable = ev_zz
[]
[e_xtalpl_zz]
type = ElementAverageValue
variable = e_xtalpl_zz
[]
[fv_xx]
type = ElementAverageValue
variable = fv_xx
[]
[fv_yy]
type = ElementAverageValue
variable = fv_yy
[]
[fv_zz]
type = ElementAverageValue
variable = fv_zz
[]
[temperature]
type = ElementAverageValue
variable = temperature
[]
[fp_xx]
type = ElementAverageValue
variable = fp_xx
[]
[fp_yy]
type = ElementAverageValue
variable = fp_yy
[]
[fp_zz]
type = ElementAverageValue
variable = fp_zz
[]
[f_xx]
type = ElementAverageValue
variable = f_xx
[]
[f_yy]
type = ElementAverageValue
variable = f_yy
[]
[f_zz]
type = ElementAverageValue
variable = f_zz
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
nl_abs_tol = 1e-10
nl_rel_tol = 1e-10
nl_abs_step_tol = 1e-10
dt = 10.0
dtmin = 1e-4
# end_time = 10
num_steps = 10
[]
[Outputs]
csv = true
[console]
type = Console
# max_rows = 5
[]
[]
(modules/chemical_reactions/test/tests/aqueous_equilibrium/2species_with_density.i)
# Simple equilibrium reaction example with fluid density and gravity included
# in calculation of the Darcy velocity. For details about reaction network,
# see documentation in 2species.i
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
[]
[Variables]
[./a]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[../]
[../]
[./b]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[../]
[../]
[./pressure]
order = FIRST
family = LAGRANGE
initial_condition = 1
[../]
[]
[ReactionNetwork]
[./AqueousEquilibriumReactions]
primary_species = 'a b'
reactions = '2a = pa2 2,
a + b = pab -2'
secondary_species = 'pa2 pab'
pressure = pressure
gravity = '-1 0 0'
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./a_diff]
type = PrimaryDiffusion
variable = a
[../]
[./a_conv]
type = PrimaryConvection
variable = a
p = pressure
gravity = '-1 0 0'
[../]
[./b_ie]
type = PrimaryTimeDerivative
variable = b
[../]
[./b_diff]
type = PrimaryDiffusion
variable = b
[../]
[./b_conv]
type = PrimaryConvection
variable = b
p = pressure
gravity = '-1 0 0'
[../]
[./p]
type = DarcyFluxPressure
variable = pressure
gravity = '-1 0 0'
[../]
[]
[BCs]
[./a_left]
type = DirichletBC
variable = a
preset = false
boundary = left
value = 1.0e-2
[../]
[./a_right]
type = ChemicalOutFlowBC
variable = a
boundary = right
[../]
[./b_left]
type = DirichletBC
variable = b
preset = false
boundary = left
value = 1.0e-2
[../]
[./b_right]
type = ChemicalOutFlowBC
variable = b
boundary = right
[../]
[./pleft]
type = DirichletBC
variable = pressure
preset = false
value = 2
boundary = left
[../]
[./pright]
type = DirichletBC
variable = pressure
preset = false
value = 1
boundary = right
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity density'
prop_values = '1e-4 1e-4 0.2 4'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_rel_tol = 1e-12
start_time = 0.0
end_time = 100
dt = 10.0
[]
[Outputs]
exodus = true
perf_graph = true
print_linear_residuals = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
(modules/optimization/test/tests/optimizationreporter/constant_heat_source/forward.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 2
ymax = 2
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = thermal_conductivity
[]
[heat_source]
type = BodyForce
function = volumetric_heat_func
variable = temperature
[]
[]
[BCs]
[left]
type = NeumannBC
variable = temperature
boundary = left
value = 0
[]
[right]
type = NeumannBC
variable = temperature
boundary = right
value = 0
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 200
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 100
[]
[]
[Functions]
[volumetric_heat_func]
type = ParsedOptimizationFunction
expression = q
param_symbol_names = 'q'
param_vector_name = 'params/q'
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-ksp_type -pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'preonly lu superlu_dist'
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
[]
[params]
type = ConstantReporter
real_vector_names = 'q'
real_vector_values = '0' # Dummy value
[]
[]
[Outputs]
console = false
file_base = 'forward'
[]
(modules/navier_stokes/test/tests/finite_element/ins/rz-x-axial-coord/pipe-flow-natural-bc.i)
mu=1
rho=1
pipe_length=10 # m
pipe_radius=1 # m
u_inlet=1
[GlobalParams]
integrate_p_by_parts = true
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = ${pipe_length}
ymin = 0
ymax = ${pipe_radius}
nx = 50
ny = 5
[]
coord_type = 'RZ'
rz_coord_axis = x
[]
[Variables]
[velocity]
family = LAGRANGE_VEC
[]
[p][]
[]
[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
[]
[momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[]
[]
[Functions]
[vel_x_inlet]
type = ParsedFunction
expression = '${u_inlet} * (${pipe_radius}^2 - y^2)'
[]
[]
[BCs]
[inlet]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'left'
function_x = vel_x_inlet
function_y = 0
[../]
[wall]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'top'
function_x = 0
function_y = 0
[]
[axis]
type = ADVectorFunctionDirichletBC
variable = velocity
boundary = 'bottom'
set_x_comp = false
function_y = 0
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[ins_mat]
type = INSADTauMaterial
velocity = velocity
pressure = p
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
line_search = 'none'
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/truss_heat_conduction/block_w_bar.i)
[Mesh]
[whole]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 50
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -1.25
ymax = 1.25
zmin = -0.04
zmax = 0.04
[]
[bar]
type = SubdomainBoundingBoxGenerator
input = whole
bottom_left = '-0.6 -0.05 -0.04'
top_right = '0.6 0.05 0.04'
block_id = 2
block_name = 'bar'
location = INSIDE
[]
[block]
type = SubdomainBoundingBoxGenerator
input = bar
bottom_left = '-0.6 -0.05 -0.04'
top_right = '0.6 0.05 0.04'
block_id = 1
block_name = 'block'
location = OUTSIDE
[]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[time_derivative]
type = HeatConductionTimeDerivative
variable = temperature
[]
[heat_conduction]
type = HeatConduction
variable = temperature
[]
[]
[Materials]
[block]
type = GenericConstantMaterial
block = 'block'
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[]
[line]
type = GenericConstantMaterial
block = 'bar'
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '10.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[]
[]
[BCs]
[right]
type = FunctionDirichletBC
variable = temperature
boundary = 'right'
function = '10*t'
[]
[]
[VectorPostprocessors]
[x_n0_25]
type = LineValueSampler
start_point = '-0.25 0 0'
end_point = '-0.25 1.25 0'
num_points = 100
variable = 'temperature'
sort_by = id
[]
[x_0_25]
type = LineValueSampler
start_point = '0.25 0 0'
end_point = '0.25 1.25 0'
num_points = 100
variable = 'temperature'
sort_by = id
[]
[]
[Executioner]
type = Transient
start_time = 0
dt = 1
end_time = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[csv]
type = CSV
file_base = 'csv/block_w_bar'
time_data = true
[]
[]
(modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_structure_3d/test.i)
[GlobalParams]
initial_from_file = 'steady_state_out.e'
[]
[Materials]
[mat]
type = ADGenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '16 356 6.5514e3'
[]
[]
[Functions]
[Ts_bc]
type = ParsedFunction
expression = '2*sin(x*pi/2)+2*sin(pi*y) +507'
[]
[]
[Components]
[blk]
type = HeatStructureFromFile3D
file = box.e
position = '0 0 0'
[]
[right_bnd]
type = HSBoundarySpecifiedTemperature
hs = blk
boundary = blk:right
T = Ts_bc
[]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 1
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-7
nl_abs_tol = 1e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
[]
[Outputs]
exodus = true
execute_on = 'initial'
[]
(test/tests/materials/get_material_property_names/get_material_property_any_boundary_id.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[./add_subdomain]
input = gen
type = SubdomainBoundingBoxGenerator
top_right = '1 1 0'
bottom_left = '0 0.5 0'
block_id = 100
block_name = 'top'
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Materials]
[./boundary]
type = GenericConstantMaterial
prop_names = boundary_prop
boundary = ANY_BOUNDARY_ID
prop_values = 54321
[../]
[]
[UserObjects]
[./get_material_boundary_names_test]
type = GetMaterialPropertyBoundaryBlockNamesTest
expected_names = 'ANY_BOUNDARY_ID'
property_name = 'boundary_prop'
test_type = 'boundary'
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
(modules/solid_mechanics/test/tests/central_difference/consistent/3D/3d_consistent_implicit.i)
# One element test for the Newmark-Beta time integrator.
[Mesh]
type = GeneratedMesh # Can generate simple lines, rectangles and rectangular prisms
dim = 3 # Dimension of the mesh
nx = 1 # Number of elements in the x direction
ny = 1 # Number of elements in the y direction
nz = 2 # Number of elements in the z direction
xmin = 0.0
xmax = 1
ymin = 0.0
ymax = 1
zmin = 0.0
zmax = 2
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[AuxVariables]
[./vel_x]
[../]
[./accel_x]
[../]
[./vel_y]
[../]
[./accel_y]
[../]
[./vel_z]
[../]
[./accel_z]
[../]
[]
[Kernels]
[./DynamicSolidMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
[./inertia_x]
type = InertialForce
variable = disp_x
[../]
[./inertia_y]
type = InertialForce
variable = disp_y
[../]
[./inertia_z]
type = InertialForce
variable = disp_z
[../]
[]
[AuxKernels]
[./accel_x]
type = TestNewmarkTI
variable = accel_x
displacement = disp_x
first = false
[../]
[./vel_x]
type = TestNewmarkTI
variable = vel_x
displacement = disp_x
[../]
[./accel_y]
type = TestNewmarkTI
variable = accel_y
displacement = disp_y
first = false
[../]
[./vel_y]
type = TestNewmarkTI
variable = vel_y
displacement = disp_y
[../]
[./accel_z]
type = TestNewmarkTI
variable = accel_z
displacement = disp_z
first = false
[../]
[./vel_z]
type = TestNewmarkTI
variable = vel_z
displacement = disp_z
[../]
[]
[BCs]
[./x_bot]
type = PresetDisplacement
boundary = 'back'
variable = disp_x
beta = 0.25
velocity = vel_x
acceleration = accel_x
function = dispx
[../]
[./y_bot]
type = PresetDisplacement
boundary = 'back'
variable = disp_y
beta = 0.25
velocity = vel_y
acceleration = accel_y
function = dispy
[../]
[./z_bot]
type = PresetDisplacement
boundary = 'back'
variable = disp_z
beta = 0.25
velocity = vel_z
acceleration = accel_z
function = dispz
[../]
[./Periodic]
[./x_dir]
variable = 'disp_x disp_y disp_z'
primary = 'left'
secondary = 'right'
translation = '1.0 0.0 0.0'
[../]
[./y_dir]
variable = 'disp_x disp_y disp_z'
primary = 'bottom'
secondary = 'top'
translation = '0.0 1.0 0.0'
[../]
[../]
[]
[Functions]
[./dispx]
type = PiecewiseLinear
x = '0.0 1.0 2.0 3.0 4.0' # time
y = '0.0 1.0 0.0 -1.0 0.0' # displacement
[../]
[./dispy]
type = ParsedFunction
expression = 0.1*t*t*sin(10*t)
[../]
[./dispz]
type = ParsedFunction
expression = 0.1*t*t*sin(20*t)
[../]
[]
[Materials]
[./elasticity_tensor_block]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.25
block = 0
[../]
[./strain_block]
type = ComputeIncrementalSmallStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[../]
[./stress_block]
type = ComputeFiniteStrainElasticStress
block = 0
[../]
[./density]
type = GenericConstantMaterial
block = 0
prop_names = density
prop_values = 1e4
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
nl_abs_tol = 1e-08
nl_rel_tol = 1e-08
timestep_tolerance = 1e-6
start_time = -0.01
end_time = 0.1
dt = 0.005
[./TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[../]
[]
[Postprocessors]
[./accel_6x]
type = NodalVariableValue
nodeid = 6
variable = accel_x
[../]
[]
[Outputs]
exodus = false
csv = true
[]
(modules/heat_transfer/test/tests/code_verification/cylindrical_test_no2.i)
# Problem II.2
#
# The thermal conductivity of an infinitely long hollow tube varies
# linearly with temperature. It is exposed on the inner
# and outer surfaces to constant temperatures.
#
# REFERENCE:
# A. Toptan, et al. (Mar.2020). Tech. rep. CASL-U-2020-1939-000, SAND2020-3887 R. DOI:10.2172/1614683.
[Mesh]
[./geom]
type = GeneratedMeshGenerator
dim = 1
elem_type = EDGE2
xmin = 0.2
nx = 4
[../]
[]
[Variables]
[./u]
order = FIRST
[../]
[]
[Problem]
coord_type = RZ
[]
[Functions]
[./exact]
type = ParsedFunction
symbol_names = 'ri ro beta ki ko ui uo'
symbol_values = '0.2 1.0 1e-3 5.3 5 300 0'
expression = 'uo+(ko/beta)* ( ( 1 + beta*(ki+ko)*(ui-uo)*( log(x/ro) / log(ri/ro) )/(ko^2))^0.5 -1 )'
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = u
[../]
[]
[BCs]
[./ui]
type = DirichletBC
boundary = left
variable = u
value = 300
[../]
[./uo]
type = DirichletBC
boundary = right
variable = u
value = 0
[../]
[]
[Materials]
[./property]
type = GenericConstantMaterial
prop_names = 'density specific_heat'
prop_values = '1.0 1.0'
[../]
[./thermal_conductivity]
type = ParsedMaterial
property_name = 'thermal_conductivity'
coupled_variables = u
expression = '5 + 1e-3 * (u-0)'
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = exact
variable = u
[../]
[./h]
type = AverageElementSize
[]
[]
[Outputs]
csv = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/scalar_adr/supg/advection_error_testing.i)
velocity=1
[GlobalParams]
u = ${velocity}
pressure = 0
tau_type = mod
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 4
xmax = 1
elem_type = EDGE2
[]
[Variables]
[./c]
family = LAGRANGE
order = FIRST
[../]
[]
[Kernels]
[./adv]
type = AdvectionSUPG
variable = c
forcing_func = 'ffn'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = c
boundary = left
value = 0
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'mu rho'
prop_values = '0 1'
[../]
[]
[Functions]
[./ffn]
type = ParsedFunction
expression = '1-x^2'
[../]
[./c_func]
type = ParsedFunction
expression = 'x-x^3/3'
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
[]
[Outputs]
[./exodus]
type = Exodus
[../]
[./csv]
type = CSV
[../]
[]
[Postprocessors]
[./L2c]
type = ElementL2Error
variable = c
function = c_func
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2cx]
type = ElementL2Error
variable = cx
function = ffn
outputs = 'console' execute_on = 'timestep_end'
[../]
[]
[AuxVariables]
[./cx]
family = MONOMIAL
order = FIRST
[../]
[]
[AuxKernels]
[./cx]
type = VariableGradientComponent
component = x
variable = cx
gradient_variable = c
[../]
[]
(modules/porous_flow/test/tests/actions/multiblock.i)
# This input file illustrates that PorousFlow can be block-restricted. That is, porous-flow physics acts only on some blocks (block = '0, 1', in this case), and different physics, in this case diffusion, acts on other blocks (block = 2, in this case).
# Here:
# - the Variable "pressure" exists everywhere, but is governed by PorousFlow only on block = '0 1', and diffusion on block = 2
# - the Variable "temp" exists only on block = '0 1', and is governed by PorousFlow there
# - the Variable "temp1" exists only on block = 2, and is governed by diffusion there
# Hence, the PorousFlow Materials only need to be defined on block = '0 1'
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmin = 0
xmax = 10
[]
[block1]
type = SubdomainBoundingBoxGenerator
input = gmg
block_id = 1
bottom_left = '3 -1 -1'
top_right = '6 1 1'
[]
[block2]
type = SubdomainBoundingBoxGenerator
input = block1
block_id = 2
bottom_left = '6 -1 -1'
top_right = '10 1 1'
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pressure temp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[Variables]
[pressure] # exists over the entire mesh: governed by PorousFlow on block=0, 1, and diffusion on block=2
[]
[temp]
block = '0 1' # only governed by PorousFlow
[]
[temp1]
block = 2 # only governed by diffusion
[]
[]
[Kernels]
[porous_flow_time_derivative]
type = PorousFlowMassTimeDerivative
block = '0 1'
variable = pressure
[]
[porous_flow_flux]
type = PorousFlowAdvectiveFlux
fluid_component = 0
gravity = '0 0 0'
variable = pressure
block = '0 1'
[]
[porous_flow_heat_time_derivative]
type = PorousFlowEnergyTimeDerivative
variable = temp
block = '0 1'
[]
[porous_flow_heat_advection]
type = PorousFlowHeatAdvection
gravity = '0 0 0'
variable = temp
block = '0 1'
[]
[diffusion_p]
type = Diffusion
variable = pressure
block = 2
[]
[diffusion_t1]
type = Diffusion
variable = temp1
block = 2
[]
[]
[AuxVariables]
[density]
family = MONOMIAL
order = CONSTANT
block = '0 1'
[]
[relperm]
family = MONOMIAL
order = CONSTANT
block = '0 1'
[]
[]
[AuxKernels]
[density]
type = PorousFlowPropertyAux
variable = density
property = density
[]
[relperm]
type = PorousFlowPropertyAux
variable = relperm
property = relperm
[]
[]
[Postprocessors]
[density1000]
type = PointValue
point = '0 0 0'
variable = density
[]
[density2000]
type = PointValue
point = '5 0 0'
variable = density
[]
[relperm0.25]
type = PointValue
point = '0 0 0'
variable = relperm
[]
[relperm0.5]
type = PointValue
point = '5 0 0'
variable = relperm
[]
[]
[FluidProperties]
[simple_fluid1000]
type = SimpleFluidProperties
[]
[simple_fluid2000]
type = SimpleFluidProperties
density0 = 2000
[]
[]
[Materials] # note these PorousFlow materials are all on block = '0 1'
[temperature]
type = PorousFlowTemperature
temperature = temp
block = '0 1'
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pressure
block = '0 1'
[]
[massfrac]
type = PorousFlowMassFraction
block = '0 1'
[]
[simple_fluid1000]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1000
phase = 0
block = 0
[]
[simple_fluid2000]
type = PorousFlowSingleComponentFluid
fp = simple_fluid2000
phase = 0
block = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
block = '0 1'
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-15 0 0 0 1E-15 0 0 0 1E-15'
block = '0 1'
[]
[relperm]
type = PorousFlowRelativePermeabilityConst
phase = 0
block = 0
kr = 0.25
[]
[relperm1]
type = PorousFlowRelativePermeabilityConst
phase = 0
block = 1
kr = 0.5
[]
[rock_heat]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 1
density = 1
block = '0 1'
[]
[dummy_material]
type = GenericConstantMaterial
block = 2
prop_names = dummy
prop_values = 0
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
csv = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_les.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[]
[Modules]
[IncompressibleNavierStokes]
equation_type = transient
velocity_boundary = 'bottom right top left'
velocity_function = '0 0 0 0 lid_function 0 0 0'
initial_velocity = '1e-15 1e-15 0'
add_standard_velocity_variables_for_ad = false
pressure_pinned_node = 0
density_name = rho
dynamic_viscosity_name = mu
use_ad = true
laplace = true
family = LAGRANGE
order = FIRST
supg = true
pspg = true
[]
[]
[Kernels]
[eddy_viscosity]
type = INSADSmagorinskyEddyViscosity
variable = velocity
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 0.001'
[]
[]
[Functions]
[lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
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-13
nl_max_its = 6
[]
[Outputs]
exodus = true
[]
(modules/stochastic_tools/test/tests/surrogates/nearest_point/sub_vector.i)
L = 1
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 100
xmax = ${L}
elem_type = EDGE3
[]
[]
[Variables]
[T]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = T
diffusivity = k
[]
[source]
type = BodyForce
variable = T
value = 10000
[]
[]
[Materials]
[conductivity]
type = GenericConstantMaterial
prop_names = k
prop_values = 2.0
[]
[]
[BCs]
[right]
type = DirichletBC
variable = T
boundary = right
value = 300
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[VectorPostprocessors]
[T_vec]
type = LineValueSampler
variable = T
start_point = '0 0 0'
end_point = '${L} 0 0'
num_points = 10
sort_by = x
[]
[]
(test/tests/materials/discrete/recompute2.i)
[Mesh]
[generator]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 1
[]
[left_domain]
type = SubdomainBoundingBoxGenerator
input = generator
bottom_left = '0 0 0'
top_right = '0.5 1 0'
block_id = 10
[]
[]
[Variables]
[./u]
initial_condition = 2
[../]
[]
[Kernels]
[./diff]
type = MatDiffusionTest
variable = u
prop_name = 'p'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 2
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 3
[../]
[]
[Materials]
[./recompute_props]
type = RecomputeMaterial
block = 0
f_name = 'f'
f_prime_name = 'f_prime'
p_name = 'p'
outputs = all
output_properties = 'f f_prime p'
constant = 3
compute = false # make this material "discrete"
[../]
[./newton]
type = NewtonMaterial
block = 0
outputs = all
f_name = 'f'
f_prime_name = 'f_prime'
p_name = 'p'
material = 'recompute_props'
[../]
[./left]
type = GenericConstantMaterial
prop_names = 'f f_prime p'
prop_values = '1 0.5 1.2345'
block = 10
outputs = all
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
print_linear_residuals = true
perf_graph = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_by_parts.i)
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[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
[../]
[./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
[../]
[]
[BCs]
[inlet]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom'
function_x = 0
function_y = 'inlet_func'
[../]
[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
[]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[ins_mat]
type = INSADMaterial
velocity = velocity
pressure = p
[]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Transient
dt = 0.005
dtmin = 0.005
num_steps = 5
l_max_its = 100
# Note: The Steady executioner can be used for this problem, if you
# drop the INSMomentumTimeDerivative kernels and use the following
# direct solver options.
# petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -ksp_type'
# petsc_options_value = 'lu NONZERO 1.e-10 preonly'
# Block Jacobi works well for this problem, as does "-pc_type asm
# -pc_asm_overlap 2", but an overlap of 1 does not work for some
# reason?
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
outputs = 'console' execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
outputs = 'console' execute_on = 'timestep_end'
[../]
[]
(modules/phase_field/test/tests/ADCHSplitChemicalPotential/simple_transient_diffusion.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
[]
[Variables]
[./c]
[../]
[./mu]
[../]
[]
[Kernels]
[./conc]
type = ADCHSplitConcentration
variable = c
chemical_potential_var = mu
mobility = mobility_prop
[../]
[./chempot]
type = ADCHSplitChemicalPotential
variable = mu
chemical_potential = mu_prop
[../]
[./time]
type = ADTimeDerivative
variable = c
[../]
[]
[Materials]
[./chemical_potential]
type = ADPiecewiseLinearInterpolationMaterial
property = mu_prop
variable = c
x = '0 1'
y = '0 1'
[../]
[./mobility_prop]
type = ADGenericConstantMaterial
prop_names = mobility_prop
prop_values = 0.1
[../]
[]
[BCs]
[./leftc]
type = DirichletBC
variable = c
boundary = left
value = 0
[../]
[./rightc]
type = DirichletBC
variable = c
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -ksp_grmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 2'
dt = 0.1
num_steps = 20
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/materials/derivative_material_interface/additional_derivatives.i)
#
# This test validates the correct application of the chain rule to coupled
# material properties within DerivativeParsedMaterials
#
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[a]
[]
[]
[Materials]
[term]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'a'
expression = '(a*b*d*e)^3'
material_property_names = 'b d:=c e'
derivative_order = 2
additional_derivative_symbols = 'e d'
outputs = exodus
[]
[const]
type = GenericConstantMaterial
prop_names = 'b c e'
prop_values = '1 2 3'
[]
[]
[Kernels]
[a]
type = Diffusion
variable = a
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
l_tol = 1e-03
[]
[Outputs]
execute_on = 'TIMESTEP_END'
exodus = true
print_linear_residuals = false
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/RZ_cone_no_parts.i)
# This input file tests several different things:
# .) The axisymmetric (RZ) form of the governing equations.
# .) An open boundary.
# .) Not integrating the pressure by parts, thereby requiring a pressure pin.
# .) Natural boundary condition at the outlet.
[GlobalParams]
integrate_p_by_parts = false
laplace = false
gravity = '0 0 0'
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = Newton
[../]
[]
[Executioner]
type = Transient
dt = 0.005
dtmin = 0.005
num_steps = 5
l_max_its = 100
# Note: The Steady executioner can be used for this problem, if you
# drop the INSMomentumTimeDerivative kernels and use the following
# direct solver options.
# petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -ksp_type'
# petsc_options_value = 'lu NONZERO 1.e-10 preonly'
# Block Jacobi works well for this problem, as does "-pc_type asm
# -pc_asm_overlap 2", but an overlap of 1 does not work for some
# reason?
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Variables]
[./vel_x]
# Velocity in radial (r) direction
family = LAGRANGE
order = SECOND
[../]
[./vel_y]
# Velocity in axial (z) direction
family = LAGRANGE
order = SECOND
[../]
[./p]
family = LAGRANGE
order = FIRST
[../]
[]
[BCs]
[./p_corner]
# This is required, because pressure term is *not* integrated by parts.
type = DirichletBC
boundary = top_right
value = 0
variable = p
[../]
[./u_out]
type = INSMomentumNoBCBCTractionForm
boundary = top
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./v_out]
type = INSMomentumNoBCBCTractionForm
boundary = top
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
[./u_in]
type = DirichletBC
boundary = bottom
variable = vel_x
value = 0
[../]
[./v_in]
type = FunctionDirichletBC
boundary = bottom
variable = vel_y
function = 'inlet_func'
[../]
[./u_axis_and_walls]
type = DirichletBC
boundary = 'left right'
variable = vel_x
value = 0
[../]
[./v_no_slip]
type = DirichletBC
boundary = 'right'
variable = vel_y
value = 0
[../]
[]
[Kernels]
[./x_momentum_time]
type = INSMomentumTimeDerivative
variable = vel_x
[../]
[./y_momentum_time]
type = INSMomentumTimeDerivative
variable = vel_y
[../]
[./mass]
type = INSMassRZ
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
[./x_momentum_space]
type = INSMomentumTractionFormRZ
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./y_momentum_space]
type = INSMomentumTractionFormRZ
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 'volume'
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
outputs = 'console' execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
outputs = 'console' execute_on = 'timestep_end'
[../]
[]
(tutorials/darcy_thermo_mech/step05_heat_conduction/tests/bcs/outflow/outflow.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 30
ny = 5
xmax = 0.304 # Length of test chamber
ymax = 0.0257 # Test chamber radius
[]
coord_type = RZ
rz_coord_axis = X
[]
[Variables]
[temperature]
initial_condition = 300 # Start at room temperature
[]
[]
[Kernels]
[heat_conduction]
type = ADHeatConduction
variable = temperature
[]
[heat_conduction_time_derivative]
type = ADHeatConductionTimeDerivative
variable = temperature
[]
[]
[BCs]
[inlet_temperature]
type = DirichletBC
variable = temperature
boundary = left
value = 350 # (K)
[]
[outlet_temperature]
type = HeatConductionOutflow
variable = temperature
boundary = right
[]
[]
[Materials]
[steel]
type = ADGenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '18 466 8000' # W/m*K, J/kg-K, kg/m^3 @ 296K
[]
[]
[Problem]
type = FEProblem
[]
[Executioner]
type = Transient
num_steps = 2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/materials/ad_wall_heat_transfer_coefficient_wolf_mccarthy/test.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
allow_renumbering = false
[]
[Problem]
solve = false
[]
[AuxVariables]
[Hw]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[Hw_ak]
type = ADMaterialRealAux
variable = Hw
property = Hw
[]
[]
[Materials]
[props]
type = ADGenericConstantMaterial
prop_names = 'rho vel k mu cp T T_wall D_h'
prop_values = '1000 0.1 0.001 0.1 12 300 310 0.1'
[]
[Hw_material]
type = ADWallHeatTransferCoefficientWolfMcCarthyMaterial
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[Hw]
type = ElementalVariableValue
elementid = 0
variable = Hw
[]
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(modules/solid_mechanics/test/tests/shell/dynamics/shell_dynamics_bending_moment_free_orientation_inclined_hht.i)
# Test to verify the fundamental natural frequency of a one element ADComputeShellStress
# BCs: Clamped on one end, free on others.
# Initial perturbation applied to edge of the beam. After that, the shell vibrates freely.
#
# Results have been compared for various thicknesses with the following approximate Results
# (Moose results were obtained with 8 elements along the length)
# Thickness = 0.1. Reference freq: 10.785 Hz, Moose freq: 10.612 Hz
# Thickness = 0.05. Reference freq: 5.393 Hz, Moose freq: 5.335 Hz
# Thickness = 0.025. Reference freq: 2.696 Hz, Moose freq: 2.660 Hz
#
# Reference values have been obtained from Robert Blevins, "Formulas for Dynamics, Acoustics and Vibration",
# Table 5.3 case 11. Formula looks like: f = lambda^2/(2*pi*a^2) * sqrt(E*h^2/(12*(1-nu*nu))), where lambda
# changes as a function of shell dimensions.
# This test uses one single element for speed reasons.
# Here, the shell, instead of being on the XY plane, is oriented at a 45 deg. angle
# with respect to the Y axis.
[Mesh]
type = FileMesh
file = shell_inclined.e
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./rot_x]
[../]
[./rot_y]
[../]
[]
[AuxVariables]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
# aux variables for dynamics
[./vel_x]
[../]
[./vel_y]
[../]
[./vel_z]
[../]
[./accel_x]
[../]
[./accel_y]
[../]
[./accel_z]
[../]
[./rot_vel_x]
[../]
[./rot_vel_y]
[../]
[./rot_accel_x]
[../]
[./rot_accel_y]
[../]
[]
[AuxKernels]
[./stress_yy]
type = RankTwoAux
variable = stress_yy
rank_two_tensor = global_stress_t_points_0
index_i = 1
index_j = 1
[../]
[./stress_yz]
type = RankTwoAux
variable = stress_yz
rank_two_tensor = global_stress_t_points_0
index_i = 1
index_j = 2
[../]
# Kernels for dynamics
[./accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = timestep_end
[../]
[./vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = timestep_end
[../]
[./accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = timestep_end
[../]
[./vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = timestep_end
[../]
[./accel_z]
type = NewmarkAccelAux
variable = accel_z
displacement = disp_z
velocity = vel_z
beta = 0.25
execute_on = timestep_end
[../]
[./vel_z]
type = NewmarkVelAux
variable = vel_z
acceleration = accel_z
gamma = 0.5
execute_on = timestep_end
[../]
[./rot_accel_x]
type = NewmarkAccelAux
variable = rot_accel_x
displacement = rot_x
velocity = rot_vel_x
beta = 0.25
execute_on = timestep_end
[../]
[./rot_vel_x]
type = NewmarkVelAux
variable = rot_vel_x
acceleration = rot_accel_x
gamma = 0.5
execute_on = timestep_end
[../]
[./rot_accel_y]
type = NewmarkAccelAux
variable = rot_accel_y
displacement = rot_y
velocity = rot_vel_y
beta = 0.25
execute_on = timestep_end
[../]
[./rot_vel_y]
type = NewmarkVelAux
variable = rot_vel_y
acceleration = rot_accel_y
gamma = 0.5
execute_on = timestep_end
[../]
[]
[BCs]
[./fixy1]
type = DirichletBC
variable = disp_y
boundary = '0'
value = 0.0
[../]
[./fixz1]
type = DirichletBC
variable = disp_z
boundary = '0'
value = 0.0
[../]
[./fixr1]
type = DirichletBC
variable = rot_x
boundary = '0'
value = 0.0
[../]
[./fixr2]
type = DirichletBC
variable = rot_y
boundary = '0'
value = 0.0
[../]
[./fixx1]
type = DirichletBC
variable = disp_x
boundary = '0'
value = 0.0
[../]
[]
[Functions]
[./force_function]
type = PiecewiseLinear
x = '0.0 0.01 0.15 10.0'
y = '0.0 0.01 0.0 0.0'
[../]
[]
[NodalKernels]
[./force_y2]
type = UserForcingFunctionNodalKernel
variable = disp_z
boundary = '2'
function = force_function
[../]
[]
[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
[../]
[./inertial_force_x]
type = ADInertialForceShell
use_displaced_mesh = true
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y'
rotational_accelerations = 'rot_accel_x rot_accel_y'
component = 0
variable = disp_x
thickness = 0.1
eta = 0.0
alpha = 0.0
[../]
[./inertial_force_y]
type = ADInertialForceShell
use_displaced_mesh = true
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y'
rotational_accelerations = 'rot_accel_x rot_accel_y'
component = 1
variable = disp_y
thickness = 0.1
eta = 0.0
alpha = 0.0
[../]
[./inertial_force_z]
type = ADInertialForceShell
use_displaced_mesh = true
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y'
rotational_accelerations = 'rot_accel_x rot_accel_y'
component = 2
variable = disp_z
thickness = 0.1
eta = 0.0
alpha = 0.0
[../]
[./inertial_force_rot_x]
type = ADInertialForceShell
use_displaced_mesh = true
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y'
rotational_accelerations = 'rot_accel_x rot_accel_y'
component = 3
variable = rot_x
thickness = 0.1
eta = 0.0
alpha = 0.0
[../]
[./inertial_force_rot_y]
type = ADInertialForceShell
use_displaced_mesh = true
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y'
rotational_accelerations = 'rot_accel_x rot_accel_y'
component = 4
variable = rot_y
thickness = 0.1
eta = 0.0
alpha = 0.0
[../]
[]
[Materials]
[./elasticity]
type = ADComputeIsotropicElasticityTensorShell
youngs_modulus = 2100000
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 = 0.1
through_thickness_order = SECOND
[../]
[./stress]
type = ADComputeShellStress
block = 0
through_thickness_order = SECOND
[../]
[./density]
type = GenericConstantMaterial
block = 0
prop_names = 'density'
prop_values = '1.0'
[../]
[]
[Postprocessors]
[./disp_z_tip]
type = PointValue
point = '0.0 1.06 1.06'
variable = disp_z
[../]
[./rot_x_tip]
type = PointValue
point = '0.0 1.06 1.06'
variable = rot_x
[../]
[./stress_yy_el_0]
type = ElementalVariableValue
elementid = 0
variable = stress_yy
[../]
[./stress_yy_el_1]
type = ElementalVariableValue
elementid = 1
variable = stress_yy
[../]
[./stress_yy_el_2]
type = ElementalVariableValue
elementid = 2
variable = stress_yy
[../]
[./stress_yy_el_3]
type = ElementalVariableValue
elementid = 3
variable = stress_yy
[../]
[./stress_yz_el_0]
type = ElementalVariableValue
elementid = 0
variable = stress_yz
[../]
[./stress_yz_el_1]
type = ElementalVariableValue
elementid = 1
variable = stress_yz
[../]
[./stress_yz_el_2]
type = ElementalVariableValue
elementid = 2
variable = stress_yz
[../]
[./stress_yz_el_3]
type = ElementalVariableValue
elementid = 3
variable = stress_yz
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
l_tol = 1e-11
nl_max_its = 15
nl_rel_tol = 1e-11
nl_abs_tol = 1e-10
l_max_its = 20
dt = 0.005
dtmin = 0.005
timestep_tolerance = 2e-13
end_time = 0.5
[./TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[../]
[]
[Outputs]
perf_graph = true
csv = true
[]
(modules/thermal_hydraulics/test/tests/components/hs_coupler_2d3d/hs_coupler_2d3d.i)
# Tests physics and energy conservation for HSCoupler2D3D.
R_pipe = 0.005
length_matrix = 0.5
length_extend = 0.6
n_elems_radial = 3
n_elems_axial_matrix = 10
n_elems_axial_extend = 12
[Materials]
[matrix_mat]
type = ADGenericConstantMaterial
block = 'hs3d:0 hs2d:pipe'
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '8000 500 15'
[]
[]
[Functions]
[initial_T_matrix_fn]
type = ParsedFunction
expression = '300 + 100*z - 1000*x'
[]
[]
[Components]
[hs3d]
type = HeatStructureFromFile3D
file = mesh/mesh.e
position = '0 0 0'
initial_T = initial_T_matrix_fn
[]
[hs2d]
type = HeatStructureCylindrical
orientation = '0 0 1'
position = '0 0 0'
length = '${length_matrix} ${length_extend}'
n_elems = '${n_elems_axial_matrix} ${n_elems_axial_extend}'
axial_region_names = 'matrix extend'
inner_radius = 0
widths = '${R_pipe}'
n_part_elems = '${n_elems_radial}'
names = 'pipe'
initial_T = 300
[]
[hs_coupler]
type = HSCoupler2D3D
heat_structure_2d = hs2d
heat_structure_3d = hs3d
boundary_2d = hs2d:matrix:outer
boundary_3d = hs3d:rmin
emissivity_2d = 0.4
emissivity_3d = 0.6
gap_thickness = 0.00001
gap_thermal_conductivity = 0.05
[]
[]
[Postprocessors]
[energy_hs3d]
type = ADHeatStructureEnergy3D
block = 'hs3d:0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_hs2d]
type = ADHeatStructureEnergyRZ
block = 'hs2d:pipe'
axis_dir = '0 0 1'
axis_point = '0 0 0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[total_energy]
type = SumPostprocessor
values = 'energy_hs3d energy_hs2d'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change]
type = ChangeOverTimePostprocessor
change_with_respect_to_initial = true
postprocessor = total_energy
compute_relative_change = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
dt = 0.1
num_steps = 10
solve_type = NEWTON
abort_on_solve_fail = true
nl_abs_tol = 1e-8
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
exodus = true
[]
(modules/phase_field/examples/anisotropic_interfaces/GrandPotentialTwophaseAnisotropy.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmin = -4
xmax = 4
ymin = -4
ymax = 4
uniform_refine = 2
[]
[GlobalParams]
radius = 0.5
int_width = 0.3
x1 = 0
y1 = 0
derivative_order = 2
[]
[Variables]
[./w]
[../]
[./etaa0]
[../]
[./etab0]
[../]
[]
[AuxVariables]
[./bnds]
[../]
[]
[AuxKernels]
[./bnds]
type = BndsCalcAux
variable = bnds
v = 'etaa0 etab0'
[../]
[]
[ICs]
[./w]
type = SmoothCircleIC
variable = w
# note w = A*(c-cleq), A = 1.0, cleq = 0.0 ,i.e., w = c (in the matrix/liquid phase)
outvalue = -4.0
invalue = 0.0
[../]
[./etaa0]
type = SmoothCircleIC
variable = etaa0
#Solid phase
outvalue = 0.0
invalue = 1.0
[../]
[./etab0]
type = SmoothCircleIC
variable = etab0
#Liquid phase
outvalue = 1.0
invalue = 0.0
[../]
[]
[BCs]
[./Periodic]
[./w]
variable = w
auto_direction = 'x y'
[../]
[./etaa0]
variable = etaa0
auto_direction = 'x y'
[../]
[./etab0]
variable = etab0
auto_direction = 'x y'
[../]
[../]
[]
[Kernels]
# Order parameter eta_alpha0
[./ACa0_bulk]
type = ACGrGrMulti
variable = etaa0
v = 'etab0'
gamma_names = 'gab'
[../]
[./ACa0_sw]
type = ACSwitching
variable = etaa0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etab0 w'
[../]
[./ACa0_int1]
type = ACInterface2DMultiPhase1
variable = etaa0
etas = 'etab0'
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
d2kappadgrad_etaa_name = d2kappadgrad_etaa
[../]
[./ACa0_int2]
type = ACInterface2DMultiPhase2
variable = etaa0
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
[../]
[./ea0_dot]
type = TimeDerivative
variable = etaa0
[../]
# Order parameter eta_beta0
[./ACb0_bulk]
type = ACGrGrMulti
variable = etab0
v = 'etaa0'
gamma_names = 'gab'
[../]
[./ACb0_sw]
type = ACSwitching
variable = etab0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etaa0 w'
[../]
[./ACb0_int1]
type = ACInterface2DMultiPhase1
variable = etab0
etas = 'etaa0'
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
d2kappadgrad_etaa_name = d2kappadgrad_etab
[../]
[./ACb0_int2]
type = ACInterface2DMultiPhase2
variable = etab0
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
[../]
[./eb0_dot]
type = TimeDerivative
variable = etab0
[../]
#Chemical potential
[./w_dot]
type = SusceptibilityTimeDerivative
variable = w
f_name = chi
[../]
[./Diffusion]
type = MatDiffusion
variable = w
diffusivity = Dchi
[../]
[./coupled_etaa0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etaa0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0'
[../]
[./coupled_etab0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etab0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0'
[../]
[]
[Materials]
[./ha]
type = SwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'etaa0 etab0'
phase_etas = 'etaa0'
[../]
[./hb]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etaa0 etab0'
phase_etas = 'etab0'
[../]
[./omegaa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegaa
material_property_names = 'Vm ka caeq'
expression = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
[../]
[./omegab]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegab
material_property_names = 'Vm kb cbeq'
expression = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq'
[../]
[./rhoa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhoa
material_property_names = 'Vm ka caeq'
expression = 'w/Vm^2/ka + caeq/Vm'
[../]
[./rhob]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhob
material_property_names = 'Vm kb cbeq'
expression = 'w/Vm^2/kb + cbeq/Vm'
[../]
[./kappaa]
type = InterfaceOrientationMultiphaseMaterial
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
d2kappadgrad_etaa_name = d2kappadgrad_etaa
etaa = etaa0
etab = etab0
outputs = exodus
output_properties = 'kappaa'
[../]
[./kappab]
type = InterfaceOrientationMultiphaseMaterial
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
d2kappadgrad_etaa_name = d2kappadgrad_etab
etaa = etab0
etab = etaa0
outputs = exodus
output_properties = 'kappab'
[../]
[./const]
type = GenericConstantMaterial
prop_names = 'L D chi Vm ka caeq kb cbeq gab mu'
prop_values = '1.0 1.0 0.1 1.0 10.0 0.1 10.0 0.9 4.5 10.0'
[../]
[./Mobility]
type = ParsedMaterial
property_name = Dchi
material_property_names = 'D chi'
expression = 'D*chi'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_tol = 1.0e-3
l_max_its = 30
nl_max_its = 15
nl_rel_tol = 1.0e-8
nl_abs_tol = 1e-8
end_time = 10.0
[./TimeStepper]
type = IterationAdaptiveDT
dt = 0.0005
cutback_factor = 0.7
growth_factor = 1.2
[../]
[]
[Adaptivity]
initial_steps = 5
max_h_level = 3
initial_marker = err_eta
marker = err_bnds
[./Markers]
[./err_eta]
type = ErrorFractionMarker
coarsen = 0.3
refine = 0.95
indicator = ind_eta
[../]
[./err_bnds]
type = ErrorFractionMarker
coarsen = 0.3
refine = 0.95
indicator = ind_bnds
[../]
[../]
[./Indicators]
[./ind_eta]
type = GradientJumpIndicator
variable = etaa0
[../]
[./ind_bnds]
type = GradientJumpIndicator
variable = bnds
[../]
[../]
[]
[Outputs]
time_step_interval = 10
exodus = true
[]
(modules/heat_transfer/test/tests/sideset_heat_transfer/cfem_gap.i)
[Mesh]
# Build 2-by-2 mesh
[mesh]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
[]
# Create blocs 0, 1, 2, 3
[block_1]
type = SubdomainBoundingBoxGenerator
input = mesh
block_id = 1
bottom_left = '1 0 0'
top_right = '2 1 0'
[]
[block_2]
type = SubdomainBoundingBoxGenerator
input = block_1
block_id = 2
bottom_left = '0 1 0'
top_right = '1 2 0'
[]
[block_3]
type = SubdomainBoundingBoxGenerator
input = block_2
block_id = 3
bottom_left = '1 1 0'
top_right = '2 2 0'
[]
# Create inner sidesets
[interface_01]
type = SideSetsBetweenSubdomainsGenerator
input = block_3
primary_block = 0
paired_block = 1
new_boundary = 'interface_01'
[]
[interface_13]
type = SideSetsBetweenSubdomainsGenerator
input = interface_01
primary_block = 1
paired_block = 3
new_boundary = 'interface_13'
[]
[interface_32]
type = SideSetsBetweenSubdomainsGenerator
input = interface_13
primary_block = 3
paired_block = 2
new_boundary = 'interface_32'
[]
[interface_20]
type = SideSetsBetweenSubdomainsGenerator
input = interface_32
primary_block = 2
paired_block = 0
new_boundary = 'interface_20'
[]
# Create outer boundaries
[boundary_left_0]
type = SideSetsAroundSubdomainGenerator
input = interface_20
block = 0
normal = '-1 0 0'
new_boundary = 'left_0'
[]
[boundary_bot_0]
type = SideSetsAroundSubdomainGenerator
input = boundary_left_0
block = 0
normal = '0 -1 0'
new_boundary = 'bot_0'
[]
[boundary_bot_1]
type = SideSetsAroundSubdomainGenerator
input = boundary_bot_0
block = 1
normal = '0 -1 0'
new_boundary = 'bot_1'
[]
[boundary_right_1]
type = SideSetsAroundSubdomainGenerator
input = boundary_bot_1
block = 1
normal = '1 0 0'
new_boundary = 'right_1'
[]
[boundary_right_3]
type = SideSetsAroundSubdomainGenerator
input = boundary_right_1
block = 3
normal = '1 0 0'
new_boundary = 'right_3'
[]
[boundary_top_3]
type = SideSetsAroundSubdomainGenerator
input = boundary_right_3
block = 3
normal = '0 1 0'
new_boundary = 'top_3'
[]
[boundary_top_2]
type = SideSetsAroundSubdomainGenerator
input = boundary_top_3
block = 2
normal = '0 1 0'
new_boundary = 'top_2'
[]
[boundary_left_2]
type = SideSetsAroundSubdomainGenerator
input = boundary_top_2
block = 2
normal = '-1 0 0'
new_boundary = 'left_2'
[]
uniform_refine = 4
[]
[Variables]
# Need to have variable for each block to allow discontinuity
[T0]
block = 0
[]
[T1]
block = 1
[]
[T2]
block = 2
[]
[T3]
block = 3
[]
[]
[Kernels]
# Diffusion kernel for each block's variable
[diff_0]
type = MatDiffusion
variable = T0
diffusivity = conductivity
block = 0
[]
[diff_1]
type = MatDiffusion
variable = T1
diffusivity = conductivity
block = 1
[]
[diff_2]
type = MatDiffusion
variable = T2
diffusivity = conductivity
block = 2
[]
[diff_3]
type = MatDiffusion
variable = T3
diffusivity = conductivity
block = 3
[]
# Source for two of the blocks
[source_0]
type = BodyForce
variable = T0
value = 5e5
block = '0'
[]
[source_3]
type = BodyForce
variable = T3
value = 5e5
block = '3'
[]
[]
[InterfaceKernels]
# Side set kernel to represent heat transfer across blocks
# Automatically uses the materials defined in SideSetHeatTransferMaterial
[gap_01]
type = SideSetHeatTransferKernel
# This variable defined on a given block must match the primary_block given when the side set was generated
variable = T0
# This variable defined on a given block must match the paired_block given when the side set was generated
neighbor_var = T1
boundary = 'interface_01'
[]
[gap_13]
type = SideSetHeatTransferKernel
variable = T1
neighbor_var = T3
boundary = 'interface_13'
[]
[gap_32]
type = SideSetHeatTransferKernel
variable = T3
neighbor_var = T2
boundary = 'interface_32'
[]
[gap_20]
type = SideSetHeatTransferKernel
variable = T2
neighbor_var = T0
boundary = 'interface_20'
[]
[]
# Creating auxiliary variable to combine block restricted solutions
# Ignores discontinuity though
[AuxVariables]
[T]
[]
[]
[AuxKernels]
[temp_0]
type = NormalizationAux
variable = T
source_variable = T0
block = 0
[]
[temp_1]
type = NormalizationAux
variable = T
source_variable = T1
block = 1
[]
[temp_2]
type = NormalizationAux
variable = T
source_variable = T2
block = 2
[]
[temp_3]
type = NormalizationAux
variable = T
source_variable = T3
block = 3
[]
[]
[BCs]
# Boundary condition for each block's outer surface
[bc_left_2]
type = DirichletBC
boundary = 'left_2'
variable = T2
value = 300.0
[]
[bc_left_0]
type = DirichletBC
boundary = 'left_0'
variable = T0
value = 300.0
[]
[bc_bot_0]
type = DirichletBC
boundary = 'bot_0'
variable = T0
value = 300.0
[]
[bc_bot_1]
type = DirichletBC
boundary = 'bot_1'
variable = T1
value = 300.0
[]
[./bc_top_2]
type = ConvectiveFluxFunction # (Robin BC)
variable = T2
boundary = 'top_2'
coefficient = 1e3 # W/K/m^2
T_infinity = 600.0
[../]
[./bc_top_3]
type = ConvectiveFluxFunction # (Robin BC)
variable = T3
boundary = 'top_3'
coefficient = 1e3 # W/K/m^2
T_infinity = 600.0
[../]
[./bc_right_3]
type = ConvectiveFluxFunction # (Robin BC)
variable = T3
boundary = 'right_3'
coefficient = 1e3 # W/K/m^2
T_infinity = 600.0
[../]
[./bc_right_1]
type = ConvectiveFluxFunction # (Robin BC)
variable = T1
boundary = 'right_1'
coefficient = 1e3 # W/K/m^2
T_infinity = 600.0
[../]
[]
[Materials]
[fuel]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 75
block = '0 3'
[]
[mod]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 7.5
block = '1 2'
[]
# Interface material used for SideSetHeatTransferKernel
# Heat transfer meachnisms ignored if certain properties are not supplied
[gap_mat]
type = SideSetHeatTransferMaterial
boundary = 'interface_01 interface_13 interface_32 interface_20'
conductivity = 0.41
gap_length = 0.002
Tbulk = 750
h_primary = 3000
h_neighbor = 3000
emissivity_primary = 0.85
emissivity_neighbor = 0.85
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
l_tol = 1e-8
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -ksp_gmres_restart'
petsc_options_value = 'lu superlu_dist 50'
[]
[Outputs]
exodus = true
[]
(modules/stochastic_tools/test/tests/reporters/mapping/map_sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmax = 10
[]
[Variables]
[u]
[]
[v]
[]
[]
[Kernels]
[diffusion_u]
type = MatDiffusion
variable = u
diffusivity = D_u
[]
[source_u]
type = BodyForce
variable = u
value = 1.0
[]
[diffusion_v]
type = MatDiffusion
variable = v
diffusivity = D_v
[]
[source_v]
type = BodyForce
variable = v
value = 1.0
[]
[]
[Materials]
[diffusivity_u]
type = GenericConstantMaterial
prop_names = D_u
prop_values = 2.0
[]
[diffusivity_v]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 4.0
[]
[]
[BCs]
[left_u]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right_u]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 0
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[]
[]
[VariableMappings]
inactive = pod
[pod]
type = PODMapping
filename = "map_training_data_pod_mapping.rd"
num_modes_to_compute = '5 5'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Reporters]
inactive = "pod_coeffs"
[solution_storage]
type = SolutionContainer
execute_on = 'FINAL'
[]
[pod_coeffs]
type = MappingReporter
mapping = pod
variables = "u v"
[]
[]
(test/tests/auxkernels/advection_flux/normal_advection_flux_fe.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '0.75 0.75 0.75'
dy = '0.75 0.75 0.75'
ix = '2 2 2'
iy = '2 2 2'
subdomain_id = '1 1 1
1 2 1
1 1 1'
[]
[add_inner_boundaries_top]
type = SideSetsAroundSubdomainGenerator
input = cmg
new_boundary = 'block_2_top'
block = 2
normal = '0 1 0'
[]
[add_inner_boundaries_bot]
type = SideSetsAroundSubdomainGenerator
input = add_inner_boundaries_top
new_boundary = 'block_2_bot'
block = 2
normal = '0 -1 0'
[]
[add_inner_boundaries_right]
type = SideSetsAroundSubdomainGenerator
input = add_inner_boundaries_bot
new_boundary = 'block_2_right'
block = 2
normal = '1 0 0'
[]
[add_inner_boundaries_left]
type = SideSetsAroundSubdomainGenerator
input = add_inner_boundaries_right
new_boundary = 'block_2_left'
block = 2
normal = '-1 0 0'
[]
[]
[Variables]
[u]
[]
[v]
[]
[]
[ICs]
[u_blob]
type = FunctionIC
variable = u
function = 'if(x<0.75,if(y<0.75,1,0),0)'
[]
[v_blob]
type = FunctionIC
variable = v
function = 'if(x<0.75,if(y<0.75,1,0),0)'
[]
[]
[Kernels]
[udot]
type = MassLumpedTimeDerivative
variable = u
[]
[u_advec]
type = ConservativeAdvection
variable = u
upwinding_type = full
velocity = '2 0 0'
[]
[vdot]
type = MassLumpedTimeDerivative
variable = v
[]
[v_advec]
type = ConservativeAdvection
variable = v
upwinding_type = full
velocity = '0 2 0'
[]
[]
[Materials]
[rho]
type = GenericConstantMaterial
prop_names = 'rho'
prop_values = '1'
[]
[]
[AuxVariables]
[flux_x]
order = FIRST
family = MONOMIAL
[]
[]
[AuxKernels]
[flux_x]
type = AdvectiveFluxAux
variable = flux_x
vel_x = u
vel_y = v
advected_mat_prop = 'rho'
component = normal
boundary = 'block_2_right block_2_left'
[]
[]
[Executioner]
type = Transient
solve_type = LINEAR
dt = 0.01
end_time = 0.02
l_tol = 1E-14
[]
[Postprocessors]
[flux_right]
type = SideIntegralVariablePostprocessor
variable = flux_x
boundary = 'block_2_right'
[]
[flux_right_exact]
type = SideAdvectiveFluxIntegral
boundary = 'block_2_right'
vel_x = u
vel_y = v
component = normal
advected_mat_prop = 'rho'
[]
[flux_left]
type = SideIntegralVariablePostprocessor
variable = flux_x
boundary = 'block_2_left'
[]
[flux_left_exact]
type = SideAdvectiveFluxIntegral
boundary = 'block_2_left'
vel_x = u
vel_y = v
component = normal
advected_mat_prop = 'rho'
[]
[]
[Outputs]
csv = true
[]
(modules/thermal_hydraulics/test/tests/postprocessors/element_integral_material_property_rz/element_integral_material_property_rz.i)
# Tests the ADElementIntegralMaterialPropertyRZ post-processor.
R_o = 0.2
thickness = 0.05
R_i = ${fparse R_o - thickness}
L = 3.0
V = ${fparse pi * (R_o^2 - R_i^2) * L}
rho_value = 5.0
mass = ${fparse rho_value * V}
[Materials]
[hs_mat]
type = ADGenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '${rho_value} 1.0 1.0'
[]
[]
[Components]
[heat_structure]
type = HeatStructureCylindrical
position = '1 2 3'
orientation = '1 1 1'
inner_radius = ${R_i}
length = ${L}
n_elems = 50
names = 'region1'
widths = '${thickness}'
n_part_elems = '5'
initial_T = 300
[]
[]
[Postprocessors]
[mass]
type = ADElementIntegralMaterialPropertyRZ
axis_point = '1 2 3'
axis_dir = '1 1 1'
mat_prop = density
execute_on = 'INITIAL'
[]
[mass_error]
type = RelativeDifferencePostprocessor
value1 = mass
value2 = ${mass}
execute_on = 'INITIAL'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
file_base = 'element_integral_material_property_rz'
[csv]
type = CSV
show = 'mass_error'
execute_on = 'INITIAL'
[]
[]
(modules/optimization/test/tests/optimizationreporter/general_opt/point_loads_gen_opt/forward.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmax = 1
ymax = 1.4
[]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = thermal_conductivity
[]
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = temperature
x_coord_name = 'point_source/x'
y_coord_name = 'point_source/y'
z_coord_name = 'point_source/z'
value_name = 'point_source/value'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temperature
boundary = left
value = 300
[]
[right]
type = DirichletBC
variable = temperature
boundary = right
value = 300
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 300
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 300
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-6
nl_rel_tol = 1e-8
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[VectorPostprocessors]
[point_source]
type = ConstantVectorPostprocessor
vector_names = 'x y z value'
value = '0.2 0.7 0.4;
0.2 0.56 1;
0 0 0;
-1000 120 500'
execute_on = LINEAR
[]
[vertical]
type = LineValueSampler
variable = 'temperature'
start_point = '0.5 0 0'
end_point = '0.5 1.4 0'
num_points = 21
sort_by = y
[]
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
objective_name = misfit_norm
measurement_points = ${measurement_points}
measurement_values = ${measurement_values}
[]
[]
[Outputs]
console = false
file_base = 'forward'
[]
(modules/solid_mechanics/test/tests/central_difference/consistent/2D/2d_consistent_implicit.i)
# Test for the central difference time integrator for a 2D mesh
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 2
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 2.0
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[AuxVariables]
[./vel_x]
[../]
[./accel_x]
[../]
[./vel_y]
[../]
[./accel_y]
[../]
[]
[Kernels]
[./DynamicSolidMechanics]
displacements = 'disp_x disp_y'
[../]
[./inertia_x]
type = InertialForce
variable = disp_x
[../]
[./inertia_y]
type = InertialForce
variable = disp_y
[../]
[]
[AuxKernels]
[./accel_x]
type = TestNewmarkTI
variable = accel_x
displacement = disp_x
first = false
[../]
[./vel_x]
type = TestNewmarkTI
variable = vel_x
displacement = disp_x
[../]
[./accel_y]
type = TestNewmarkTI
variable = accel_y
displacement = disp_y
first = false
[../]
[./vel_y]
type = TestNewmarkTI
variable = vel_y
displacement = disp_y
[../]
[]
[BCs]
[./y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./x_bot]
type = PresetDisplacement
boundary = bottom
variable = disp_x
beta = 0.25
velocity = vel_x
acceleration = accel_x
function = disp
[../]
[]
[Functions]
[./disp]
type = PiecewiseLinear
x = '0.0 1.0 2.0 3.0 4.0' # time
y = '0.0 1.0 0.0 -1.0 0.0' # displacement
[../]
[]
[Materials]
[./elasticity_tensor_block]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.25
block = 0
[../]
[./strain_block]
type = ComputeIncrementalSmallStrain
block = 0
displacements = 'disp_x disp_y'
[../]
[./stress_block]
type = ComputeFiniteStrainElasticStress
block = 0
[../]
[./density]
type = GenericConstantMaterial
block = 0
prop_names = density
prop_values = 1e4
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
nl_abs_tol = 1e-11
nl_rel_tol = 1e-11
start_time = -0.01
end_time = 0.1
dt = 0.005
timestep_tolerance = 1e-6
[./TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[../]
[]
[Postprocessors]
[./_dt]
type = TimestepSize
[../]
[./accel_2x]
type = PointValue
point = '1.0 2.0 0.0'
variable = accel_x
[../]
[./accel_2y]
type = PointValue
point = '1.0 2.0 0.0'
variable = accel_y
[../]
[]
[Outputs]
exodus = false
csv = true
[]
(modules/phase_field/examples/slkks/CrFe.i)
#
# SLKKS two phase example for the BCC and SIGMA phases. The sigma phase contains
# multiple sublattices. Free energy from
# Jacob, Aurelie, Erwin Povoden-Karadeniz, and Ernst Kozeschnik. "Revised thermodynamic
# description of the Fe-Cr system based on an improved sublattice model of the sigma phase."
# Calphad 60 (2018): 16-28.
#
# In this simulation we consider diffusion (Cahn-Hilliard) and phase transformation.
#
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 160
ny = 1
nz = 0
xmin = -25
xmax = 25
ymin = -2.5
ymax = 2.5
elem_type = QUAD4
[]
[]
[AuxVariables]
[Fglobal]
order = CONSTANT
family = MONOMIAL
[]
[]
[Functions]
[sigma_cr0]
type = PiecewiseLinear
data_file = CrFe_sigma_out_var_0001.csv
format = columns
x_index_in_file = 5
y_index_in_file = 2
xy_in_file_only = false
[]
[sigma_cr1]
type = PiecewiseLinear
data_file = CrFe_sigma_out_var_0001.csv
format = columns
x_index_in_file = 5
y_index_in_file = 3
xy_in_file_only = false
[]
[sigma_cr2]
type = PiecewiseLinear
data_file = CrFe_sigma_out_var_0001.csv
format = columns
x_index_in_file = 5
y_index_in_file = 4
xy_in_file_only = false
[]
[]
[Variables]
# order parameters
[eta1]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[]
[eta2]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[]
# solute concentration
[cCr]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = FunctionIC
function = '(x+25)/50*0.5+0.1'
[]
[]
# sublattice concentrations
[BCC_CR]
initial_condition = 0.45
[]
[SIGMA_0CR]
[InitialCondition]
type = CoupledValueFunctionIC
function = sigma_cr0
v = cCr
variable = SIGMA_0CR
[]
[]
[SIGMA_1CR]
[InitialCondition]
type = CoupledValueFunctionIC
function = sigma_cr1
v = cCr
variable = SIGMA_1CR
[]
[]
[SIGMA_2CR]
[InitialCondition]
type = CoupledValueFunctionIC
function = sigma_cr2
v = cCr
variable = SIGMA_2CR
[]
[]
# Lagrange multiplier
[lambda]
[]
[]
[Materials]
# CALPHAD free energies
[F_BCC_A2]
type = DerivativeParsedMaterial
property_name = F_BCC_A2
outputs = exodus
output_properties = F_BCC_A2
expression = 'BCC_FE:=1-BCC_CR; G := 8.3145*T*(1.0*if(BCC_CR > 1.0e-15,BCC_CR*log(BCC_CR),0) + '
'1.0*if(BCC_FE > 1.0e-15,BCC_FE*plog(BCC_FE,eps),0) + 3.0*if(BCC_VA > '
'1.0e-15,BCC_VA*log(BCC_VA),0))/(BCC_CR + BCC_FE) + 8.3145*T*if(T < '
'548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - 932.5*BCC_CR*BCC_FE*BCC_VA + '
'311.5*BCC_CR*BCC_VA - '
'1043.0*BCC_FE*BCC_VA,-8.13674105561218e-49*T^15/(0.525599232981783*BCC_CR*BCC_FE*BCC_'
'VA*(BCC_CR - BCC_FE) - 0.894055608820709*BCC_CR*BCC_FE*BCC_VA + '
'0.298657718120805*BCC_CR*BCC_VA - BCC_FE*BCC_VA + 9.58772770853308e-13)^15 - '
'4.65558036243985e-30*T^9/(0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA + 0.298657718120805*BCC_CR*BCC_VA - '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^9 - '
'1.3485349181899e-10*T^3/(0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA + 0.298657718120805*BCC_CR*BCC_VA - '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^3 + 1 - '
'0.905299382744392*(548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'932.5*BCC_CR*BCC_FE*BCC_VA + 311.5*BCC_CR*BCC_VA - 1043.0*BCC_FE*BCC_VA + '
'1.0e-9)/T,if(T < -548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'932.5*BCC_CR*BCC_FE*BCC_VA - 311.5*BCC_CR*BCC_VA + '
'1043.0*BCC_FE*BCC_VA,-8.13674105561218e-49*T^15/(-0.525599232981783*BCC_CR*BCC_FE*BCC'
'_VA*(BCC_CR - BCC_FE) + 0.894055608820709*BCC_CR*BCC_FE*BCC_VA - '
'0.298657718120805*BCC_CR*BCC_VA + BCC_FE*BCC_VA + 9.58772770853308e-13)^15 - '
'4.65558036243985e-30*T^9/(-0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) '
'+ 0.894055608820709*BCC_CR*BCC_FE*BCC_VA - 0.298657718120805*BCC_CR*BCC_VA + '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^9 - '
'1.3485349181899e-10*T^3/(-0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA - 0.298657718120805*BCC_CR*BCC_VA + '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^3 + 1 - '
'0.905299382744392*(-548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'932.5*BCC_CR*BCC_FE*BCC_VA - 311.5*BCC_CR*BCC_VA + 1043.0*BCC_FE*BCC_VA + '
'1.0e-9)/T,if(T > -548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'932.5*BCC_CR*BCC_FE*BCC_VA - 311.5*BCC_CR*BCC_VA + 1043.0*BCC_FE*BCC_VA & '
'548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - 932.5*BCC_CR*BCC_FE*BCC_VA + '
'311.5*BCC_CR*BCC_VA - 1043.0*BCC_FE*BCC_VA < '
'0,-79209031311018.7*(-0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA - 0.298657718120805*BCC_CR*BCC_VA + '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^5/T^5 - '
'3.83095660520737e+42*(-0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA - 0.298657718120805*BCC_CR*BCC_VA + '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^15/T^15 - '
'1.22565886734485e+72*(-0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA - 0.298657718120805*BCC_CR*BCC_VA + '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^25/T^25,if(T > '
'548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - 932.5*BCC_CR*BCC_FE*BCC_VA + '
'311.5*BCC_CR*BCC_VA - 1043.0*BCC_FE*BCC_VA & 548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - '
'BCC_FE) - 932.5*BCC_CR*BCC_FE*BCC_VA + 311.5*BCC_CR*BCC_VA - 1043.0*BCC_FE*BCC_VA > '
'0,-79209031311018.7*(0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA + 0.298657718120805*BCC_CR*BCC_VA - '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^5/T^5 - '
'3.83095660520737e+42*(0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA + 0.298657718120805*BCC_CR*BCC_VA - '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^15/T^15 - '
'1.22565886734485e+72*(0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA + 0.298657718120805*BCC_CR*BCC_VA - '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^25/T^25,0))))*log((2.15*BCC_CR*BCC_FE*BCC_VA - '
'0.008*BCC_CR*BCC_VA + 2.22*BCC_FE*BCC_VA)*if(2.15*BCC_CR*BCC_FE*BCC_VA - '
'0.008*BCC_CR*BCC_VA + 2.22*BCC_FE*BCC_VA <= 0,-1.0,1.0) + 1)/(BCC_CR + BCC_FE) + '
'1.0*(BCC_CR*BCC_VA*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + '
'BCC_FE*BCC_VA*if(T >= 298.15 & T < 1811.0,77358.5*1/T - 23.5143*T*log(T) + 124.134*T '
'- 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= 1811.0 & T < '
'6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - 25383.581,0)))/(BCC_CR '
'+ BCC_FE) + 1.0*(BCC_CR*BCC_FE*BCC_VA*(500.0 - 1.5*T)*(BCC_CR - BCC_FE) + '
'BCC_CR*BCC_FE*BCC_VA*(24600.0 - 14.98*T) + BCC_CR*BCC_FE*BCC_VA*(9.15*T - '
'14000.0)*(BCC_CR - BCC_FE)^2)/(BCC_CR + BCC_FE); G/100000'
coupled_variables = 'BCC_CR'
constant_names = 'BCC_VA T eps'
constant_expressions = '1 1000 0.01'
[]
[F_SIGMA]
type = DerivativeParsedMaterial
property_name = F_SIGMA
outputs = exodus
output_properties = F_SIGMA
expression = 'SIGMA_0FE := 1-SIGMA_0CR; SIGMA_1FE := 1-SIGMA_1CR; SIGMA_2FE := 1-SIGMA_2CR; G := '
'8.3145*T*(10.0*if(SIGMA_0CR > 1.0e-15,SIGMA_0CR*plog(SIGMA_0CR,eps),0) + '
'10.0*if(SIGMA_0FE > 1.0e-15,SIGMA_0FE*plog(SIGMA_0FE,eps),0) + 4.0*if(SIGMA_1CR > '
'1.0e-15,SIGMA_1CR*plog(SIGMA_1CR,eps),0) + 4.0*if(SIGMA_1FE > '
'1.0e-15,SIGMA_1FE*plog(SIGMA_1FE,eps),0) + 16.0*if(SIGMA_2CR > '
'1.0e-15,SIGMA_2CR*plog(SIGMA_2CR,eps),0) + 16.0*if(SIGMA_2FE > '
'1.0e-15,SIGMA_2FE*plog(SIGMA_2FE,eps),0))/(10.0*SIGMA_0CR + 10.0*SIGMA_0FE + '
'4.0*SIGMA_1CR + 4.0*SIGMA_1FE + 16.0*SIGMA_2CR + 16.0*SIGMA_2FE) + '
'(SIGMA_0FE*SIGMA_1CR*SIGMA_2CR*SIGMA_2FE*(-70.0*T - 170400.0) + '
'SIGMA_0FE*SIGMA_1FE*SIGMA_2CR*SIGMA_2FE*(-10.0*T - 330839.0))/(10.0*SIGMA_0CR + '
'10.0*SIGMA_0FE + 4.0*SIGMA_1CR + 4.0*SIGMA_1FE + 16.0*SIGMA_2CR + 16.0*SIGMA_2FE) + '
'(SIGMA_0CR*SIGMA_1CR*SIGMA_2CR*(30.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - '
'26.908*T*log(T) + 157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= '
'2180.0 & T < 6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) '
'+ 132000.0) + SIGMA_0CR*SIGMA_1CR*SIGMA_2FE*(-110.0*T + 16.0*if(T >= 298.15 & T < '
'1811.0,77358.5*1/T - 23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - '
'5.89269e-8*T^3.0 + 1225.7,if(T >= 1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - '
'46.0*T*log(T) + 299.31255*T - 25383.581,0)) + 14.0*if(T >= 298.15 & T < '
'2180.0,139250.0*1/T - 26.908*T*log(T) + 157.48*T + 0.00189435*T^2.0 - '
'1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < 6000.0,-2.88526e+32*T^(-9.0) - '
'50.0*T*log(T) + 344.18*T - 34869.344,0)) + 123500.0) + '
'SIGMA_0CR*SIGMA_1FE*SIGMA_2CR*(4.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 26.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + 140486.0) '
'+ SIGMA_0CR*SIGMA_1FE*SIGMA_2FE*(20.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 10.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + 148800.0) '
'+ SIGMA_0FE*SIGMA_1CR*SIGMA_2CR*(10.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 20.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + 56200.0) + '
'SIGMA_0FE*SIGMA_1CR*SIGMA_2FE*(26.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 4.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + 152700.0) '
'+ SIGMA_0FE*SIGMA_1FE*SIGMA_2CR*(14.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 16.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + 46200.0) + '
'SIGMA_0FE*SIGMA_1FE*SIGMA_2FE*(30.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 173333.0))/(10.0*SIGMA_0CR + 10.0*SIGMA_0FE + 4.0*SIGMA_1CR + '
'4.0*SIGMA_1FE + 16.0*SIGMA_2CR + 16.0*SIGMA_2FE); G/100000'
coupled_variables = 'SIGMA_0CR SIGMA_1CR SIGMA_2CR'
constant_names = 'T eps'
constant_expressions = '1000 0.01'
[]
# h(eta)
[h1]
type = SwitchingFunctionMaterial
function_name = h1
h_order = HIGH
eta = eta1
[]
[h2]
type = SwitchingFunctionMaterial
function_name = h2
h_order = HIGH
eta = eta2
[]
# g(eta)
[g1]
type = BarrierFunctionMaterial
function_name = g1
g_order = SIMPLE
eta = eta1
[]
[g2]
type = BarrierFunctionMaterial
function_name = g2
g_order = SIMPLE
eta = eta2
[]
# constant properties
[constants]
type = GenericConstantMaterial
prop_names = 'D L kappa'
prop_values = '10 1 0.1 '
[]
# Coefficients for diffusion equation
[Dh1]
type = DerivativeParsedMaterial
material_property_names = 'D h1(eta1)'
expression = D*h1
property_name = Dh1
coupled_variables = eta1
derivative_order = 1
[]
[Dh2a]
type = DerivativeParsedMaterial
material_property_names = 'D h2(eta2)'
expression = D*h2*10/30
property_name = Dh2a
coupled_variables = eta2
derivative_order = 1
[]
[Dh2b]
type = DerivativeParsedMaterial
material_property_names = 'D h2(eta2)'
expression = D*h2*4/30
property_name = Dh2b
coupled_variables = eta2
derivative_order = 1
[]
[Dh2c]
type = DerivativeParsedMaterial
material_property_names = 'D h2(eta2)'
expression = D*h2*16/30
property_name = Dh2c
coupled_variables = eta2
derivative_order = 1
[]
[]
[Kernels]
#Kernels for diffusion equation
[diff_time]
type = TimeDerivative
variable = cCr
[]
[diff_c1]
type = MatDiffusion
variable = cCr
diffusivity = Dh1
v = BCC_CR
coupled_variables = eta1
[]
[diff_c2a]
type = MatDiffusion
variable = cCr
diffusivity = Dh2a
v = SIGMA_0CR
coupled_variables = eta2
[]
[diff_c2b]
type = MatDiffusion
variable = cCr
diffusivity = Dh2b
v = SIGMA_1CR
coupled_variables = eta2
[]
[diff_c2c]
type = MatDiffusion
variable = cCr
diffusivity = Dh2c
v = SIGMA_2CR
coupled_variables = eta2
[]
# enforce pointwise equality of chemical potentials
[chempot1a2a]
# The BCC phase has only one sublattice
# we tie it to the first sublattice with site fraction 10/(10+4+16) in the sigma phase
type = KKSPhaseChemicalPotential
variable = BCC_CR
cb = SIGMA_0CR
kb = '${fparse 10/30}'
fa_name = F_BCC_A2
fb_name = F_SIGMA
args_b = 'SIGMA_1CR SIGMA_2CR'
[]
[chempot2a2b]
# This kernel ties the first two sublattices in the sigma phase together
type = SLKKSChemicalPotential
variable = SIGMA_0CR
a = 10
cs = SIGMA_1CR
as = 4
F = F_SIGMA
coupled_variables = 'SIGMA_2CR'
[]
[chempot2b2c]
# This kernel ties the remaining two sublattices in the sigma phase together
type = SLKKSChemicalPotential
variable = SIGMA_1CR
a = 4
cs = SIGMA_2CR
as = 16
F = F_SIGMA
coupled_variables = 'SIGMA_0CR'
[]
[phaseconcentration]
# This kernel ties the sum of the sublattice concentrations to the global concentration cCr
type = SLKKSMultiPhaseConcentration
variable = SIGMA_2CR
c = cCr
ns = '1 3'
as = '1 10 4 16'
cs = 'BCC_CR SIGMA_0CR SIGMA_1CR SIGMA_2CR'
h_names = 'h1 h2'
eta = 'eta1 eta2'
[]
# Kernels for Allen-Cahn equation for eta1
[deta1dt]
type = TimeDerivative
variable = eta1
[]
[ACBulkF1]
type = KKSMultiACBulkF
variable = eta1
Fj_names = 'F_BCC_A2 F_SIGMA'
hj_names = 'h1 h2'
gi_name = g1
eta_i = eta1
wi = 0.1
coupled_variables = 'BCC_CR SIGMA_0CR SIGMA_1CR SIGMA_2CR eta2'
[]
[ACBulkC1]
type = SLKKSMultiACBulkC
variable = eta1
F = F_BCC_A2
c = BCC_CR
ns = '1 3'
as = '1 10 4 16'
cs = 'BCC_CR SIGMA_0CR SIGMA_1CR SIGMA_2CR'
h_names = 'h1 h2'
eta = 'eta1 eta2'
[]
[ACInterface1]
type = ACInterface
variable = eta1
kappa_name = kappa
[]
[lagrange1]
type = SwitchingFunctionConstraintEta
variable = eta1
h_name = h1
lambda = lambda
coupled_variables = 'eta2'
[]
# Kernels for Allen-Cahn equation for eta1
[deta2dt]
type = TimeDerivative
variable = eta2
[]
[ACBulkF2]
type = KKSMultiACBulkF
variable = eta2
Fj_names = 'F_BCC_A2 F_SIGMA'
hj_names = 'h1 h2'
gi_name = g2
eta_i = eta2
wi = 0.1
coupled_variables = 'BCC_CR SIGMA_0CR SIGMA_1CR SIGMA_2CR eta1'
[]
[ACBulkC2]
type = SLKKSMultiACBulkC
variable = eta2
F = F_BCC_A2
c = BCC_CR
ns = '1 3'
as = '1 10 4 16'
cs = 'BCC_CR SIGMA_0CR SIGMA_1CR SIGMA_2CR'
h_names = 'h1 h2'
eta = 'eta1 eta2'
[]
[ACInterface2]
type = ACInterface
variable = eta2
kappa_name = kappa
[]
[lagrange2]
type = SwitchingFunctionConstraintEta
variable = eta2
h_name = h2
lambda = lambda
coupled_variables = 'eta1'
[]
# Lagrange-multiplier constraint kernel for lambda
[lagrange]
type = SwitchingFunctionConstraintLagrange
variable = lambda
h_names = 'h1 h2'
etas = 'eta1 eta2'
epsilon = 1e-6
[]
[]
[AuxKernels]
[GlobalFreeEnergy]
type = KKSMultiFreeEnergy
variable = Fglobal
Fj_names = 'F_BCC_A2 F_SIGMA'
hj_names = 'h1 h2'
gj_names = 'g1 g2'
interfacial_vars = 'eta1 eta2'
kappa_names = 'kappa kappa'
w = 0.1
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
line_search = none
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -ksp_gmres_restart'
petsc_options_value = 'asm lu nonzero 30'
l_max_its = 100
nl_max_its = 20
nl_abs_tol = 1e-10
end_time = 10000
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 12
iteration_window = 2
growth_factor = 1.5
cutback_factor = 0.7
dt = 0.1
[]
[]
[VectorPostprocessors]
[var]
type = LineValueSampler
start_point = '-25 0 0'
end_point = '25 0 0'
variable = 'cCr eta1 eta2 SIGMA_0CR SIGMA_1CR SIGMA_2CR'
num_points = 151
sort_by = id
execute_on = 'initial timestep_end'
[]
[mat]
type = LineMaterialRealSampler
start = '-25 0 0'
end = '25 0 0'
property = 'F_BCC_A2 F_SIGMA'
sort_by = id
execute_on = 'initial timestep_end'
[]
[]
[Postprocessors]
[F]
type = ElementIntegralVariablePostprocessor
variable = Fglobal
execute_on = 'initial timestep_end'
[]
[cmin]
type = NodalExtremeValue
value_type = min
variable = cCr
execute_on = 'initial timestep_end'
[]
[cmax]
type = NodalExtremeValue
value_type = max
variable = cCr
execute_on = 'initial timestep_end'
[]
[ctotal]
type = ElementIntegralVariablePostprocessor
variable = cCr
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
exodus = true
print_linear_residuals = false
csv = true
perf_graph = 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
[]
(test/tests/controls/tag_based_naming_access/object_param.i)
[Mesh]
type = GeneratedMesh
dim = 2
elem_type = QUAD4
# use odd numbers so points do not fall on element boundaries
nx = 31
ny = 31
[]
[Variables]
[./diffused]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = diffused
[../]
[]
[DiracKernels]
[./test_object]
type = MaterialPointSource
point = '0.5 0.5 0'
variable = diffused
control_tags = 'tag'
[../]
[]
[BCs]
[./bottom_diffused]
type = DirichletBC
variable = diffused
boundary = 'bottom'
value = 2
[../]
[./top_diffused]
type = DirichletBC
variable = diffused
boundary = 'top'
value = 0
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'matp'
prop_values = '1'
block = 0
[../]
[]
[Postprocessors]
[./test_object]
type = TestControlPointPP
function = '2*(x+y)'
point = '0.5 0.5 0'
control_tags = 'tag'
[../]
[./other_point_test_object]
type = TestControlPointPP
function = '3*(x+y)'
point = '0.5 0.5 0'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
[Controls]
[./point_control]
type = TestControl
test_type = 'point'
parameter = 'tag::*/point'
execute_on = 'initial'
[../]
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_by_parts_steady_stabilized.i)
# This input file tests several different things:
# .) The axisymmetric (RZ) form of the governing equations.
# .) An open boundary.
# .) Not integrating the pressure by parts, thereby requiring a pressure pin.
# .) Natural boundary condition at the outlet.
[GlobalParams]
integrate_p_by_parts = true
laplace = true
gravity = '0 0 0'
supg = true
pspg = true
order = FIRST
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = Newton
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Variables]
[./vel_x]
# Velocity in radial (r) direction
[../]
[./vel_y]
# Velocity in axial (z) direction
[../]
[./p]
[../]
[]
[BCs]
[./u_in]
type = DirichletBC
boundary = bottom
variable = vel_x
value = 0
[../]
[./v_in]
type = FunctionDirichletBC
boundary = bottom
variable = vel_y
function = 'inlet_func'
[../]
[./u_axis_and_walls]
type = DirichletBC
boundary = 'left right'
variable = vel_x
value = 0
[../]
[./v_no_slip]
type = DirichletBC
boundary = 'right'
variable = vel_y
value = 0
[../]
[]
[Kernels]
[./mass]
type = INSMassRZ
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
[./x_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./y_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 'volume'
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[../]
[]
(modules/heat_transfer/test/tests/truss_heat_conduction/line.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 0.5
xmin = -0.5
[]
[left_line]
type = SubdomainBoundingBoxGenerator
input = gmg
bottom_left = '-0.5 0 0'
top_right = '0 0 0'
block_id = 1
block_name = 'left_line'
location = INSIDE
[]
[right_line]
type = SubdomainBoundingBoxGenerator
input = left_line
bottom_left = '0 0 0'
top_right = '0.5 0 0'
block_id = 2
block_name = 'right_line'
location = INSIDE
[]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[time_derivative]
# type = HeatConductionTimeDerivative
type = TrussHeatConductionTimeDerivative
variable = temperature
area = area
[]
[heat_conduction]
# type = HeatConduction
type = TrussHeatConduction
variable = temperature
area = area
[]
[]
[AuxVariables]
[area]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[area]
type = ConstantAux
variable = area
value = 0.1
execute_on = 'initial timestep_begin'
[]
[]
[Materials]
[left_line]
type = GenericConstantMaterial
block = 'left_line'
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '0.1 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[]
[right_line]
type = GenericConstantMaterial
block = 'right_line'
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '5.0e-3 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[]
[]
[BCs]
[right]
type = FunctionDirichletBC
variable = temperature
boundary = 'right'
function = '10*t'
[]
[]
[VectorPostprocessors]
[center]
type = LineValueSampler
start_point = '-0.5 0 0'
end_point = '0.5 0 0'
num_points = 40
variable = 'temperature'
sort_by = id
[]
[]
[Executioner]
type = Transient
start_time = 0
dt = 1
end_time = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[csv]
type = CSV
file_base = 'csv/line'
time_data = true
[]
[]
(modules/phase_field/test/tests/rigidbodymotion/grain_motion.i)
# test file for applyting advection term and observing rigid body motion of grains
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 15
nz = 0
xmax = 50
ymax = 25
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[./eta]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
coupled_variables = eta
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./motion]
type = MultiGrainRigidBodyMotion
variable = w
c = c
v = eta
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
[../]
[./eta_dot]
type = TimeDerivative
variable = eta
[../]
[./vadv_eta]
type = SingleGrainRigidBodyMotion
variable = eta
c = c
v = eta
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
[../]
[./acint_eta]
type = ACInterface
variable = eta
mob_name = M
coupled_variables = c
kappa_name = kappa_eta
[../]
[./acbulk_eta]
type = AllenCahn
variable = eta
mob_name = M
f_name = F
coupled_variables = c
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c kappa_eta'
prop_values = '5.0 2.0 0.1'
[../]
[./free_energy]
type = DerivativeParsedMaterial
coupled_variables = 'c eta'
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 1.0e-2'
expression = 16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2+(c-eta)^2
derivative_order = 2
[../]
[]
[VectorPostprocessors]
[./forces]
type = GrainForcesPostprocessor
grain_force = grain_force
[../]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_center
execute_on = 'initial timestep_begin'
[../]
[]
[UserObjects]
[./grain_center]
type = GrainTracker
variable = eta
outputs = none
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
[../]
[./grain_force]
type = ConstantGrainForceAndTorque
execute_on = 'linear nonlinear'
force = '0.5 0.0 0.0 '
torque = '0.0 0.0 10.0 '
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
nl_max_its = 30
scheme = bdf2
solve_type = NEWTON
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
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
dt = 0.2
num_steps = 1
[]
[Outputs]
exodus = true
[]
[ICs]
[./rect_c]
y2 = 20.0
y1 = 5.0
inside = 1.0
x2 = 30.0
variable = c
x1 = 10.0
type = BoundingBoxIC
[../]
[./rect_eta]
y2 = 20.0
y1 = 5.0
inside = 1.0
x2 = 30.0
variable = eta
x1 = 10.0
type = BoundingBoxIC
[../]
[]
(modules/solid_mechanics/test/tests/dynamics/acceleration_bc/AccelerationBC_test_ti.i)
# Test for Acceleration boundary condition
# This test contains one brick element which is fixed in the y and z direction.
# Base acceleration is applied in the x direction to all nodes on the bottom surface (y=0).
# The PresetAcceleration converts the given acceleration to a displacement
# using Newmark time integration. This displacement is then prescribed on the boundary.
#
# Result: The acceleration at the bottom node should be same as the input acceleration
# which is a triangular function with peak at t = 0.2 in this case. Width of the triangular function
# is 0.2 s.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 0.0
xmax = 0.1
ymin = 0.0
ymax = 1.0
zmin = 0.0
zmax = 0.1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[AuxVariables]
[./vel_x]
[../]
[./accel_x]
[../]
[./vel_y]
[../]
[./accel_y]
[../]
[./vel_z]
[../]
[./accel_z]
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[SolidMechanics]
[../]
[./inertia_x]
type = InertialForce
variable = disp_x
[../]
[./inertia_y]
type = InertialForce
variable = disp_y
[../]
[./inertia_z]
type = InertialForce
variable = disp_z
[../]
[]
[AuxKernels]
[./accel_x] # These auxkernels are only to check output
type = TestNewmarkTI
displacement = disp_x
variable = accel_x
first = false
[../]
[./accel_y]
type = TestNewmarkTI
displacement = disp_y
variable = accel_y
first = false
[../]
[./accel_z]
type = TestNewmarkTI
displacement = disp_z
variable = accel_z
first = false
[../]
[./vel_x]
type = TestNewmarkTI
displacement = disp_x
variable = vel_x
[../]
[./vel_y]
type = TestNewmarkTI
displacement = disp_y
variable = vel_y
[../]
[./vel_z]
type = TestNewmarkTI
displacement = disp_z
variable = vel_z
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 0
index_j = 1
[../]
[./strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yy
index_i = 0
index_j = 1
[../]
[]
[Functions]
[./acceleration_bottom]
type = PiecewiseLinear
data_file = acceleration.csv
format = columns
[../]
[]
[BCs]
[./top_y]
type = DirichletBC
variable = disp_y
boundary = top
value=0.0
[../]
[./top_z]
type = DirichletBC
variable = disp_z
boundary = top
value=0.0
[../]
[./bottom_y]
type = DirichletBC
variable = disp_y
boundary = bottom
value=0.0
[../]
[./bottom_z]
type = DirichletBC
variable = disp_z
boundary = bottom
value=0.0
[../]
[./preset_accelertion]
type = PresetAcceleration
boundary = bottom
function = acceleration_bottom
variable = disp_x
beta = 0.25
acceleration = accel_x
velocity = vel_x
[../]
[]
[Materials]
[./Elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric_isotropic
C_ijkl = '210e9 0'
[../]
[./strain]
type = ComputeSmallStrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./density]
type = GenericConstantMaterial
prop_names = 'density'
prop_values = '7750'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 101'
start_time = 0
end_time = 2.0
dt = 0.01
dtmin = 0.01
nl_abs_tol = 1e-8
nl_rel_tol = 1e-8
l_tol = 1e-8
timestep_tolerance = 1e-8
# Time integrator scheme
schem = "newmark-beta"
[]
[Postprocessors]
[./_dt]
type = TimestepSize
[../]
[./disp]
type = NodalVariableValue
variable = disp_x
nodeid = 1
[../]
[./vel]
type = NodalVariableValue
variable = vel_x
nodeid = 1
[../]
[./accel]
type = NodalVariableValue
variable = accel_x
nodeid = 1
[../]
[]
[Outputs]
file_base = "AccelerationBC_test_out"
exodus = true
perf_graph = true
[]
(modules/thermal_hydraulics/test/tests/materials/ad_prandtl_number/test.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
allow_renumbering = false
[]
[Problem]
solve = false
[]
[Materials]
[props]
type = ADGenericConstantMaterial
prop_names = 'cp mu k'
prop_values = '1 2 4'
[]
[Pr_material]
type = ADPrandtlNumberMaterial
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[Pr]
type = ADElementAverageMaterialProperty
mat_prop = Pr
[]
[]
[Outputs]
csv = true
execute_on = 'TIMESTEP_END'
[]
(modules/phase_field/examples/multiphase/GrandPotential3Phase_AD.i)
# This is an example of implementation of the multi-phase, multi-order parameter
# grand potential based phase-field model described in Phys. Rev. E, 98, 023309
# (2018). It includes 3 phases with 1 grain of each phase. This example was used
# to generate the results shown in Fig. 3 of the paper.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 60
xmin = -15
xmax = 15
[]
[Variables]
[w]
[]
[etaa0]
[]
[etab0]
[]
[etad0]
[]
[]
[ICs]
[IC_etaa0]
type = FunctionIC
variable = etaa0
function = ic_func_etaa0
[]
[IC_etab0]
type = FunctionIC
variable = etab0
function = ic_func_etab0
[]
[IC_etad0]
type = ConstantIC
variable = etad0
value = 0.1
[]
[IC_w]
type = FunctionIC
variable = w
function = ic_func_w
[]
[]
[Functions]
[ic_func_etaa0]
type = ADParsedFunction
value = '0.9*0.5*(1.0-tanh((x)/sqrt(2.0)))'
[]
[ic_func_etab0]
type = ADParsedFunction
value = '0.9*0.5*(1.0+tanh((x)/sqrt(2.0)))'
[]
[ic_func_w]
type = ADParsedFunction
value = 0
[]
[]
[Kernels]
# Order parameter eta_alpha0
[ACa0_bulk]
type = ADACGrGrMulti
variable = etaa0
v = 'etab0 etad0'
gamma_names = 'gab gad'
[]
[ACa0_sw]
type = ADACSwitching
variable = etaa0
Fj_names = 'omegaa omegab omegad'
hj_names = 'ha hb hd'
[]
[ACa0_int]
type = ADACInterface
variable = etaa0
kappa_name = kappa
variable_L = false
[]
[ea0_dot]
type = ADTimeDerivative
variable = etaa0
[]
# Order parameter eta_beta0
[ACb0_bulk]
type = ADACGrGrMulti
variable = etab0
v = 'etaa0 etad0'
gamma_names = 'gab gbd'
[]
[ACb0_sw]
type = ADACSwitching
variable = etab0
Fj_names = 'omegaa omegab omegad'
hj_names = 'ha hb hd'
[]
[ACb0_int]
type = ADACInterface
variable = etab0
kappa_name = kappa
variable_L = false
[]
[eb0_dot]
type = ADTimeDerivative
variable = etab0
[]
# Order parameter eta_delta0
[ACd0_bulk]
type = ADACGrGrMulti
variable = etad0
v = 'etaa0 etab0'
gamma_names = 'gad gbd'
[]
[ACd0_sw]
type = ADACSwitching
variable = etad0
Fj_names = 'omegaa omegab omegad'
hj_names = 'ha hb hd'
[]
[ACd0_int]
type = ADACInterface
variable = etad0
kappa_name = kappa
variable_L = false
[]
[ed0_dot]
type = ADTimeDerivative
variable = etad0
[]
#Chemical potential
[w_dot]
type = ADSusceptibilityTimeDerivative
variable = w
f_name = chi
[]
[Diffusion]
type = ADMatDiffusion
variable = w
diffusivity = Dchi
[]
[coupled_etaa0dot]
type = ADCoupledSwitchingTimeDerivative
variable = w
v = etaa0
Fj_names = 'rhoa rhob rhod'
hj_names = 'ha hb hd'
args = 'etaa0 etab0 etad0'
[]
[coupled_etab0dot]
type = ADCoupledSwitchingTimeDerivative
variable = w
v = etab0
Fj_names = 'rhoa rhob rhod'
hj_names = 'ha hb hd'
args = 'etaa0 etab0 etad0'
[]
[coupled_etad0dot]
type = ADCoupledSwitchingTimeDerivative
variable = w
v = etad0
Fj_names = 'rhoa rhob rhod'
hj_names = 'ha hb hd'
args = 'etaa0 etab0 etad0'
[]
[]
[Materials]
[ha_test]
type = ADSwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'etaa0 etab0 etad0'
phase_etas = 'etaa0'
[]
[hb_test]
type = ADSwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etaa0 etab0 etad0'
phase_etas = 'etab0'
[]
[hd_test]
type = ADSwitchingFunctionMultiPhaseMaterial
h_name = hd
all_etas = 'etaa0 etab0 etad0'
phase_etas = 'etad0'
[]
[omegaa]
type = ADDerivativeParsedMaterial
args = 'w'
f_name = omegaa
material_property_names = 'Vm ka caeq'
function = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
derivative_order = 2
[]
[omegab]
type = ADDerivativeParsedMaterial
args = 'w'
f_name = omegab
material_property_names = 'Vm kb cbeq'
function = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq'
derivative_order = 2
[]
[omegad]
type = ADDerivativeParsedMaterial
args = 'w'
f_name = omegad
material_property_names = 'Vm kd cdeq'
function = '-0.5*w^2/Vm^2/kd-w/Vm*cdeq'
derivative_order = 2
[]
[rhoa]
type = ADDerivativeParsedMaterial
args = 'w'
f_name = rhoa
material_property_names = 'Vm ka caeq'
function = 'w/Vm^2/ka + caeq/Vm'
derivative_order = 2
[]
[rhob]
type = ADDerivativeParsedMaterial
args = 'w'
f_name = rhob
material_property_names = 'Vm kb cbeq'
function = 'w/Vm^2/kb + cbeq/Vm'
derivative_order = 2
[]
[rhod]
type = ADDerivativeParsedMaterial
args = 'w'
f_name = rhod
material_property_names = 'Vm kd cdeq'
function = 'w/Vm^2/kd + cdeq/Vm'
derivative_order = 2
[]
[c]
type = ADParsedMaterial
material_property_names = 'Vm rhoa rhob rhod ha hb hd'
function = 'Vm * (ha * rhoa + hb * rhob + hd * rhod)'
f_name = c
[]
[const]
type = ADGenericConstantMaterial
prop_names = 'kappa_c kappa L D Vm ka caeq kb cbeq kd cdeq gab gad gbd mu tgrad_corr_mult'
prop_values = '0 1 1.0 1.0 1.0 10.0 0.1 10.0 0.9 10.0 0.5 1.5 1.5 1.5 1.0 0.0'
[]
[Mobility]
type = ADDerivativeParsedMaterial
f_name = Dchi
material_property_names = 'D chi'
function = 'D*chi'
derivative_order = 2
[]
[chi]
type = ADDerivativeParsedMaterial
f_name = chi
material_property_names = 'Vm ha(etaa0,etab0,etad0) ka hb(etaa0,etab0,etad0) kb hd(etaa0,etab0,etad0) kd'
function = '(ha/ka + hb/kb + hd/kd) / Vm^2'
args = 'etaa0 etab0 etad0'
derivative_order = 2
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[etaa0]
type = LineValueSampler
variable = etaa0
start_point = '-15 0 0'
end_point = '15 0 0'
num_points = 61
sort_by = x
execute_on = 'initial timestep_end final'
[]
[etab0]
type = LineValueSampler
variable = etab0
start_point = '-15 0 0'
end_point = '15 0 0'
num_points = 61
sort_by = x
execute_on = 'initial timestep_end final'
[]
[etad0]
type = LineValueSampler
variable = etad0
start_point = '-15 0 0'
end_point = '15 0 0'
num_points = 61
sort_by = x
execute_on = 'initial timestep_end final'
[]
[]
[Executioner]
type = Transient
nl_max_its = 15
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = -pc_type
petsc_options_value = lu
l_max_its = 15
l_tol = 1.0e-3
nl_rel_tol = 1.0e-8
start_time = 0.0
num_steps = 20
nl_abs_tol = 1e-10
dt = 1.0
[]
[Outputs]
[exodus]
type = Exodus
execute_on = 'initial timestep_end final'
interval = 1
[]
[csv]
type = CSV
execute_on = 'initial timestep_end final'
interval = 1
[]
[]
(test/tests/materials/discrete/recompute_no_calc.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 1
[]
[./left_domain]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '0.5 1 0'
block_id = 10
[../]
[]
[Variables]
[./u]
initial_condition = 2
[../]
[]
[Kernels]
[./diff]
type = MatDiffusionTest
variable = u
prop_name = 'p'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 2
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 3
[../]
[]
[Materials]
[./recompute_props]
type = RecomputeMaterial
block = '0'
f_name = 'f'
f_prime_name = 'f_prime'
p_name = 'p'
outputs = all
output_properties = 'f f_prime p'
compute = false
[../]
[./newton]
type = NewtonMaterial
block = 0
outputs = all
f_name = 'f'
f_prime_name = 'f_prime'
p_name = 'p'
material = recompute_props
max_iterations = 0
[../]
[./left]
type = GenericConstantMaterial
prop_names = 'f f_prime p'
prop_values = '1 0.5 1.2345'
block = 10
outputs = all
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
print_linear_residuals = true
perf_graph = true
[]
(modules/solid_mechanics/examples/coal_mining/cosserat_mc_wp.i)
# Strata deformation and fracturing around a coal mine
#
# A 2D geometry is used that simulates a transverse section of
# the coal mine. The model is actually 3D, but the "x"
# dimension is only 10m long, meshed with 1 element, and
# there is no "x" displacement. The mine is 300m deep
# and just the roof is studied (0<=z<=300). The model sits
# between 0<=y<=450. The excavation sits in 0<=y<=150. This
# is a "half model": the boundary conditions are such that
# the model simulates an excavation sitting in -150<=y<=150
# inside a model of the region -450<=y<=450. The
# excavation height is 3m (ie, the excavation lies within
# 0<=z<=3). Mining is simulated by moving the excavation's
# roof down, until disp_z=-3 at t=1.
# Time is meaningless in this example
# as quasi-static solutions are sought at each timestep, but
# the number of timesteps controls the resolution of the
# process.
#
# The boundary conditions are:
# - disp_x = 0 everywhere
# - disp_y = 0 at y=0 and y=450
# - disp_z = 0 for y>150
# - disp_z = -3 at maximum, for 0<=y<=150. See excav function.
# That is, rollers on the sides, free at top, and prescribed at bottom.
#
# The small strain formulation is used.
#
# All stresses are measured in MPa. The initial stress is consistent with
# the weight force from density 2500 kg/m^3, ie, stress_zz = -0.025*(300-z) MPa
# where gravity = 10 m.s^-2 = 1E-5 MPa m^2/kg. The maximum and minimum
# principal horizontal stresses are assumed to be equal to 0.8*stress_zz.
#
# Material properties:
# Young's modulus = 8 GPa
# Poisson's ratio = 0.25
# Cosserat layer thickness = 1 m
# Cosserat-joint normal stiffness = large
# Cosserat-joint shear stiffness = 1 GPa
# MC cohesion = 3 MPa
# MC friction angle = 37 deg
# MC dilation angle = 8 deg
# MC tensile strength = 1 MPa
# MC compressive strength = 100 MPa, varying down to 1 MPa when tensile strain = 1
# WeakPlane cohesion = 0.1 MPa
# WeakPlane friction angle = 30 deg
# WeakPlane dilation angle = 10 deg
# WeakPlane tensile strength = 0.1 MPa
# WeakPlane compressive strength = 100 MPa softening to 1 MPa at strain = 1
#
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 1
xmin = -5
xmax = 5
nz = 40
zmin = 0
zmax = 400.0
bias_z = 1.1
ny = 30 # make this a multiple of 3, so y=150 is at a node
ymin = 0
ymax = 450
[]
[left]
type = SideSetsAroundSubdomainGenerator
new_boundary = 11
normal = '0 -1 0'
input = generated_mesh
[]
[right]
type = SideSetsAroundSubdomainGenerator
new_boundary = 12
normal = '0 1 0'
input = left
[]
[front]
type = SideSetsAroundSubdomainGenerator
new_boundary = 13
normal = '-1 0 0'
input = right
[]
[back]
type = SideSetsAroundSubdomainGenerator
new_boundary = 14
normal = '1 0 0'
input = front
[]
[top]
type = SideSetsAroundSubdomainGenerator
new_boundary = 15
normal = '0 0 1'
input = back
[]
[bottom]
type = SideSetsAroundSubdomainGenerator
new_boundary = 16
normal = '0 0 -1'
input = top
[]
[excav]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '-5 0 0'
top_right = '5 150 3'
input = bottom
[]
[roof]
type = SideSetsBetweenSubdomainsGenerator
new_boundary = 21
primary_block = 0
paired_block = 1
input = excav
[]
[hole]
type = BlockDeletionGenerator
block = 1
input = roof
[]
[]
[GlobalParams]
block = 0
perform_finite_strain_rotations = false
displacements = 'disp_x disp_y disp_z'
Cosserat_rotations = 'wc_x wc_y wc_z'
[]
[Variables]
[./disp_y]
[../]
[./disp_z]
[../]
[./wc_x]
[../]
[]
[Kernels]
[./cy_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_y
component = 1
[../]
[./cz_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_z
component = 2
[../]
[./x_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_x
displacements = 'wc_x wc_y wc_z'
component = 0
base_name = couple
[../]
[./x_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_x
component = 0
[../]
[./gravity]
type = Gravity
use_displaced_mesh = false
variable = disp_z
value = -10E-6
[../]
[]
[AuxVariables]
[./disp_x]
[../]
[./wc_y]
[../]
[./wc_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./mc_shear]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_internal_parameter
variable = mc_shear
[../]
[./mc_tensile]
type = MaterialStdVectorAux
index = 1
property = mc_plastic_internal_parameter
variable = mc_tensile
[../]
[./wp_shear]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_internal_parameter
variable = wp_shear
[../]
[./wp_tensile]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_internal_parameter
variable = wp_tensile
[../]
[./mc_shear_f]
type = MaterialStdVectorAux
index = 6
property = mc_plastic_yield_function
variable = mc_shear_f
[../]
[./mc_tensile_f]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_yield_function
variable = mc_tensile_f
[../]
[./wp_shear_f]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_yield_function
variable = wp_shear_f
[../]
[./wp_tensile_f]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_yield_function
variable = wp_tensile_f
[../]
[]
[BCs]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = '11 12 16 21' # note addition of 16 and 21
value = 0.0
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = '16'
value = 0.0
[../]
[./no_wc_x]
type = DirichletBC
variable = wc_x
boundary = '11 12'
value = 0.0
[../]
[./roof]
type = FunctionDirichletBC
variable = disp_z
boundary = 21
function = excav_sideways
[../]
[]
[Functions]
[./ini_xx]
type = ParsedFunction
expression = '-0.8*2500*10E-6*(400-z)'
[../]
[./ini_zz]
type = ParsedFunction
expression = '-2500*10E-6*(400-z)'
[../]
[./excav_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax e_h closure_dist'
symbol_values = '1.0 0 150.0 -3.0 15.0'
expression = 'e_h*max(min((min(t/end_t,1)*(ymax-ymin)+ymin-y)/closure_dist,1),0)'
[../]
[./excav_downwards]
type = ParsedFunction
symbol_names = 'end_t ymin ymax e_h closure_dist'
symbol_values = '1.0 0 150.0 -3.0 15.0'
expression = 'e_h*min(t/end_t,1)*max(min(((ymax-ymin)+ymin-y)/closure_dist,1),0)'
[../]
[]
[UserObjects]
[./mc_coh_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 2.99 # MPa
value_residual = 3.01 # MPa
rate = 1.0
[../]
[./mc_fric]
type = SolidMechanicsHardeningConstant
value = 0.65 # 37deg
[../]
[./mc_dil]
type = SolidMechanicsHardeningConstant
value = 0.15 # 8deg
[../]
[./mc_tensile_str_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 1.0 # MPa
value_residual = 1.0 # MPa
rate = 1.0
[../]
[./mc_compressive_str]
type = SolidMechanicsHardeningCubic
value_0 = 100 # Large!
value_residual = 100
internal_limit = 0.1
[../]
[./wp_coh_harden]
type = SolidMechanicsHardeningCubic
value_0 = 0.1
value_residual = 0.1
internal_limit = 10
[../]
[./wp_tan_fric]
type = SolidMechanicsHardeningConstant
value = 0.36 # 20deg
[../]
[./wp_tan_dil]
type = SolidMechanicsHardeningConstant
value = 0.18 # 10deg
[../]
[./wp_tensile_str_harden]
type = SolidMechanicsHardeningCubic
value_0 = 0.1
value_residual = 0.1
internal_limit = 10
[../]
[./wp_compressive_str_soften]
type = SolidMechanicsHardeningCubic
value_0 = 100
value_residual = 1
internal_limit = 1.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeLayeredCosseratElasticityTensor
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3
[../]
[./strain]
type = ComputeCosseratIncrementalSmallStrain
eigenstrain_names = ini_stress
[../]
[./ini_stress]
type = ComputeEigenstrainFromInitialStress
initial_stress = 'ini_xx 0 0 0 ini_xx 0 0 0 ini_zz'
eigenstrain_name = ini_stress
[../]
[./stress]
type = ComputeMultipleInelasticCosseratStress
block = 0
inelastic_models = 'mc wp'
cycle_models = true
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[../]
[./mc]
type = CappedMohrCoulombCosseratStressUpdate
block = 0
warn_about_precision_loss = false
host_youngs_modulus = 8E3
host_poissons_ratio = 0.25
base_name = mc
tensile_strength = mc_tensile_str_strong_harden
compressive_strength = mc_compressive_str
cohesion = mc_coh_strong_harden
friction_angle = mc_fric
dilation_angle = mc_dil
max_NR_iterations = 10000
smoothing_tol = 0.1 # MPa # Must be linked to cohesion
yield_function_tol = 1E-9 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0
[../]
[./wp]
type = CappedWeakPlaneCosseratStressUpdate
block = 0
warn_about_precision_loss = false
base_name = wp
cohesion = wp_coh_harden
tan_friction_angle = wp_tan_fric
tan_dilation_angle = wp_tan_dil
tensile_strength = wp_tensile_str_harden
compressive_strength = wp_compressive_str_soften
max_NR_iterations = 10000
tip_smoother = 0.1
smoothing_tol = 0.1 # MPa # Note, this must be tied to cohesion, otherwise get no possible return at cone apex
yield_function_tol = 1E-11 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0
[../]
[./density]
type = GenericConstantMaterial
prop_names = density
prop_values = 2500
[../]
[]
[Postprocessors]
[./subsidence]
type = PointValue
point = '0 0 400'
variable = disp_z
use_displaced_mesh = false
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
line_search = bt
nl_abs_tol = 1e-3
nl_rel_tol = 1e-5
l_max_its = 30
nl_max_its = 1000
start_time = 0.0
dt = 0.2
end_time = 0.2
[]
[Outputs]
file_base = cosserat_mc_wp
time_step_interval = 1
print_linear_residuals = false
csv = true
exodus = true
[./console]
type = Console
output_linear = false
[../]
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_no_parts_steady_stabilized_second_order.i)
# This input file tests several different things:
# .) The axisymmetric (RZ) form of the governing equations.
# .) An open boundary.
# .) Not integrating the pressure by parts, thereby requiring a pressure pin.
# .) Natural boundary condition at the outlet.
[GlobalParams]
integrate_p_by_parts = false
laplace = true
gravity = '0 0 0'
supg = true
pspg = true
order = SECOND
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = Newton
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Variables]
[./vel_x]
# Velocity in radial (r) direction
[../]
[./vel_y]
# Velocity in axial (z) direction
[../]
[./p]
order = FIRST
[../]
[]
[BCs]
[./p_corner]
# This is required, because pressure term is *not* integrated by parts.
type = DirichletBC
boundary = top_right
value = 0
variable = p
[../]
[./u_in]
type = DirichletBC
boundary = bottom
variable = vel_x
value = 0
[../]
[./v_in]
type = FunctionDirichletBC
boundary = bottom
variable = vel_y
function = 'inlet_func'
[../]
[./u_axis_and_walls]
type = DirichletBC
boundary = 'left right'
variable = vel_x
value = 0
[../]
[./v_no_slip]
type = DirichletBC
boundary = 'right'
variable = vel_y
value = 0
[../]
[]
[Kernels]
[./mass]
type = INSMassRZ
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
[./x_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./y_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 'volume'
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[../]
[]
(modules/navier_stokes/test/tests/finite_element/ins/energy-conservation/q1q1.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
nx = 10
ny = 10
dim = 2
[]
[subdomain]
type = SubdomainBoundingBoxGenerator
bottom_left = '0.5 0 0'
top_right = '1 1 0'
block_id = 1
input = gen
[]
[break_boundary]
input = subdomain
type = BreakBoundaryOnSubdomainGenerator
boundaries = 'bottom top'
[]
[sideset]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
primary_block = '1'
paired_block = '0'
new_boundary = 'fluid_left'
[]
coord_type = RZ
[]
[Variables]
[T][]
[velocity]
family = LAGRANGE_VEC
block = 1
[]
[pressure]
block = 1
[]
[]
[Kernels]
[mass]
type = INSADMass
variable = pressure
block = 1
[]
[pspg]
type = INSADMassPSPG
variable = pressure
block = 1
[]
[momentum_convection]
type = INSADMomentumAdvection
variable = velocity
block = 1
[]
[momentum_viscous]
type = INSADMomentumViscous
variable = velocity
block = 1
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = pressure
integrate_p_by_parts = true
block = 1
[]
[momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
block = 1
[]
[temperature_advection]
type = INSADEnergyAdvection
variable = T
block = 1
[]
[temperature_supg]
type = INSADEnergySUPG
variable = T
velocity = velocity
block = 1
[]
[temperature_conduction]
type = ADHeatConduction
variable = T
thermal_conductivity = 'k'
[]
[heat_source]
type = BodyForce
variable = T
block = 0
function = 'x + y'
[]
[]
[BCs]
[velocity_inlet]
type = VectorFunctionDirichletBC
variable = velocity
function_y = 1
boundary = 'bottom_to_1'
[]
[wall]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'fluid_left right'
[]
[convective_heat_transfer]
type = ConvectiveHeatFluxBC
variable = T
T_infinity = 0
heat_transfer_coefficient = 1
boundary = 'right'
[]
[]
[Materials]
[constant]
type = ADGenericConstantMaterial
prop_names = 'cp rho k mu'
prop_values = '1 1 1 1'
[]
[ins]
type = INSADStabilized3Eqn
pressure = pressure
velocity = velocity
temperature = T
block = 1
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
[]
[Outputs]
csv = true
[]
[Postprocessors]
[convective_heat_transfer]
type = ConvectiveHeatTransferSideIntegral
T_solid = T
T_fluid = 0
htc = 1
boundary = 'right'
[]
[advection]
type = INSADElementIntegralEnergyAdvection
temperature = T
velocity = velocity
cp = cp
rho = rho
block = 1
[]
[source]
type = FunctionElementIntegral
function = 'x + y'
block = 0
[]
[energy_balance]
type = ParsedPostprocessor
function = 'convective_heat_transfer + advection - source'
pp_names = 'convective_heat_transfer advection source'
[]
[]
(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/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_by_parts_steady_stabilized_second_order.i)
# This input file tests several different things:
# .) The axisymmetric (RZ) form of the governing equations.
# .) An open boundary.
# .) Not integrating the pressure by parts, thereby requiring a pressure pin.
# .) Natural boundary condition at the outlet.
[GlobalParams]
integrate_p_by_parts = true
laplace = true
gravity = '0 0 0'
supg = true
pspg = true
order = SECOND
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = Newton
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Variables]
[./vel_x]
# Velocity in radial (r) direction
[../]
[./vel_y]
# Velocity in axial (z) direction
[../]
[./p]
order = FIRST
[../]
[]
[BCs]
[./u_in]
type = DirichletBC
boundary = bottom
variable = vel_x
value = 0
[../]
[./v_in]
type = FunctionDirichletBC
boundary = bottom
variable = vel_y
function = 'inlet_func'
[../]
[./u_axis_and_walls]
type = DirichletBC
boundary = 'left right'
variable = vel_x
value = 0
[../]
[./v_no_slip]
type = DirichletBC
boundary = 'right'
variable = vel_y
value = 0
[../]
[]
[Kernels]
[./mass]
type = INSMassRZ
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
[./x_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./y_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 'volume'
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[../]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/closed_gap_prescribed_pressure.i)
## Units in the input file: m-Pa-s-K
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 10
xmax = 1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 10
xmin = 1
xmax = 2
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
[interface_secondary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'fixed_block_left'
new_block_id = 3
new_block_name = 'interface_secondary_subdomain'
input = block_rename
[]
[interface_primary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'moving_block_right'
new_block_id = 4
new_block_name = 'interface_primary_subdomain'
input = interface_secondary_subdomain
[]
[]
[Variables]
[temperature]
initial_condition = 525.0
[]
[temperature_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[AuxVariables]
[interface_normal_lm]
order = FIRST
family = LAGRANGE
block = 'interface_secondary_subdomain'
initial_condition = 100.0
[]
[]
[Kernels]
[HeatDiff_steel]
type = ADHeatConduction
variable = temperature
thermal_conductivity = steel_thermal_conductivity
block = 'left_block'
[]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
block = 'right_block'
[]
[]
[BCs]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 800
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 250
boundary = 'fixed_block_right'
[]
[]
[Constraints]
[thermal_contact]
type = ModularGapConductanceConstraint
variable = temperature_interface_lm
secondary_variable = temperature
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed'
[]
[]
[Materials]
[steel_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'steel_density steel_thermal_conductivity steel_hardness'
prop_values = '8e3 16.2 129' ## for stainless steel 304
block = 'left_block'
[]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_hardness'
prop_values = ' 2.7e3 210 15' #for 99% pure Al
block = 'right_block'
[]
[]
[UserObjects]
[closed]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_thermal_conductivity
secondary_conductivity = aluminum_thermal_conductivity
temperature = temperature
contact_pressure = interface_normal_lm
primary_hardness = steel_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[]
[Postprocessors]
[steel_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_primary_subdomain
[]
[aluminum_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_secondary_subdomain
[]
[interface_heat_flux_steel]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = moving_block_right
diffusivity = steel_thermal_conductivity
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
automatic_scaling = false
nl_rel_tol = 1e-14
nl_max_its = 20
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/chemical_reactions/test/tests/aqueous_equilibrium/co2_h2o.i)
# Batch CO2 - H2O equilibrium reaction at 25C
#
# Aqueous equilibrium reactions:
# a) H+ + HCO3- = CO2(aq), Keq = 10^(6.3447)
# b) HCO3- = H+ + CO3--, Keq = 10^(-10.3288)
# c) - H+ = OH-, Keq = 10^(-13.9951)
#
# The primary chemical species are h+ and hco3-, and the secondary equilibrium
# species are CO2(aq), CO3-- and OH-
[Mesh]
type = GeneratedMesh
dim = 2
[]
[AuxVariables]
[./ph]
[../]
[./total_h+]
[../]
[./total_hco3-]
[../]
[]
[AuxKernels]
[./ph]
type = PHAux
variable = ph
h_conc = h+
[../]
[./total_h+]
type = TotalConcentrationAux
variable = total_h+
primary_species = h+
v = 'oh- co3-- co2_aq'
sto_v = '-1 1 1'
[../]
[./total_hco3-]
type = TotalConcentrationAux
variable = total_hco3-
primary_species = hco3-
v = 'co2_aq co3--'
sto_v = '1 1'
[../]
[]
[Variables]
[./h+]
initial_condition = 1e-5
[../]
[./hco3-]
initial_condition = 1e-5
[../]
[]
[ReactionNetwork]
[./AqueousEquilibriumReactions]
primary_species = 'hco3- h+'
secondary_species = 'co2_aq co3-- oh-'
reactions = 'hco3- + h+ = co2_aq 6.3447,
hco3- - h+ = co3-- -10.3288,
- h+ = oh- -13.9951'
[../]
[]
[Kernels]
[./h+_ie]
type = PrimaryTimeDerivative
variable = h+
[../]
[./hco3-_ie]
type = PrimaryTimeDerivative
variable = hco3-
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity porosity conductivity'
prop_values = '1e-7 0.25 1.0'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
nl_abs_tol = 1e-12
end_time = 1
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
[./h+]
type = ElementIntegralVariablePostprocessor
variable = h+
execute_on = 'initial timestep_end'
[../]
[./hco3-]
type = ElementIntegralVariablePostprocessor
variable = hco3-
execute_on = 'initial timestep_end'
[../]
[./co2_aq]
type = ElementIntegralVariablePostprocessor
variable = co2_aq
execute_on = 'initial timestep_end'
[../]
[./co3--]
type = ElementIntegralVariablePostprocessor
variable = co3--
execute_on = 'initial timestep_end'
[../]
[./oh-]
type = ElementIntegralVariablePostprocessor
variable = oh-
execute_on = 'initial timestep_end'
[../]
[./ph]
type = ElementIntegralVariablePostprocessor
variable = ph
execute_on = 'initial timestep_end'
[../]
[./total_h+]
type = ElementIntegralVariablePostprocessor
variable = total_h+
execute_on = 'initial timestep_end'
[../]
[./total_hco3-]
type = ElementIntegralVariablePostprocessor
variable = total_hco3-
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
perf_graph = true
csv = true
[]
(modules/thermal_hydraulics/test/tests/components/heat_structure_from_file_3d/phy.standalone.i)
[Materials]
[mat]
type = ADGenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '1 1 1'
[]
[]
[Components]
[blk]
type = HeatStructureFromFile3D
file = box.e
position = '0 0 0'
initial_T = 300
[]
[left_bnd]
type = HSBoundarySpecifiedTemperature
hs = blk
boundary = blk:left
T = 300
[]
[right_bnd]
type = HSBoundarySpecifiedTemperature
hs = blk
boundary = blk:right
T = 310
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 1
abort_on_solve_fail = true
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/inertial_torque/simple.i)
# A single element is stretched.
#
# For all time:
# disp_x = 0
# disp_z = 3
#
# The velocities are initialised to zero
# The accelerations are initialised to
# accel_x = 0
# accel_y = 2
# accel_z = 0
#
# The only degree of freedom is disp_y.
# It is initialised to zero.
# The DE is the ZEROTH component of
# density * disp x accel = BodyForce
# (Choosing the zeroth component is unusual: this
# is to illustrate correct behaviour of the
# InertialTorque Kernel, rather than being
# relevant to any particular solid-mechanics problem.)
# The LHS = - density * disp_z * accel_y
# With density = 0.5 and BodyForce = -3 the solution is
# accel_y = 2, vel_y = 2 * t, and disp_y = t^2
[Mesh]
type = GeneratedMesh
dim = 3
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
gamma = 0.5
beta = 0.25
alpha = 0.0
eta = 0.0
[]
[Variables]
[./disp_y]
[../]
[]
[Kernels]
[./icm_x]
type = InertialTorque
component = 0
variable = disp_y
[../]
[./source_x]
type = BodyForce
variable = disp_y
function = -3
[../]
[]
[AuxVariables]
[./disp_x]
[../]
[./disp_z]
initial_condition = 3
[../]
[./vel_x]
[../]
[./vel_y]
[../]
[./vel_z]
[../]
[./accel_x]
[../]
[./accel_y]
initial_condition = 2
[../]
[./accel_z]
[../]
[]
[AuxKernels]
[./vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
execute_on = timestep_end
[../]
[./vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
execute_on = timestep_end
[../]
[./vel_z]
type = NewmarkVelAux
variable = vel_z
acceleration = accel_z
execute_on = timestep_end
[../]
[./accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
execute_on = timestep_end
[../]
[./accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
execute_on = timestep_end
[../]
[./accel_z]
type = NewmarkAccelAux
variable = accel_z
displacement = disp_z
velocity = vel_z
execute_on = timestep_end
[../]
[]
[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
[]
[Materials]
[./density]
type = GenericConstantMaterial
prop_names = density
prop_values = 0.5
[../]
[]
[Postprocessors]
[./y_disp]
type = PointValue
point = '0 0 0'
use_displaced_mesh = false
variable = disp_y
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'gmres bjacobi 1E-15 1E-10 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 1
num_steps = 10
[]
[Outputs]
csv = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/steady_vector_fsp.i)
rho=1
mu=1
U=1
l=1
prefactor=${fparse 1/(l/2)^2}
n=8
[Mesh]
[gen]
type = DistributedRectilinearMeshGenerator
dim = 2
xmin = 0
xmax = ${l}
ymin = 0
ymax = ${l}
nx = ${n}
ny = ${n}
elem_type = QUAD4
[]
second_order = true
parallel_type = distributed
[]
[Variables]
[vel]
order = SECOND
family = LAGRANGE_VEC
[]
[p]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[mass]
type = INSADMass
variable = p
[]
[mass_kernel]
type = MassMatrix
variable = p
matrix_tags = 'mass'
[]
[momentum_convection]
type = INSADMomentumAdvection
variable = vel
[]
[momentum_viscous]
type = INSADMomentumViscous
variable = vel
extra_matrix_tags = 'L'
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = vel
pressure = p
integrate_p_by_parts = true
[]
[]
[BCs]
[no_slip]
type = ADVectorFunctionDirichletBC
variable = vel
boundary = 'bottom right left'
extra_matrix_tags = 'L'
[]
[lid]
type = ADVectorFunctionDirichletBC
variable = vel
boundary = 'top'
function_x = 'lid_function'
extra_matrix_tags = 'L'
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[insad]
type = INSADMaterial
velocity = vel
pressure = p
[]
[]
[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 = '${prefactor}*${U}*x*(${l}-x)'
[]
[]
[Problem]
type = NavierStokesProblem
mass_matrix = 'mass'
extra_tag_matrices = 'mass L'
L_matrix = 'L'
commute_lsc = true
[]
[Preconditioning]
[FSP]
type = FSP
topsplit = 'up'
[up]
splitting = 'u p'
splitting_type = schur
petsc_options_iname = '-pc_fieldsplit_schur_fact_type -pc_fieldsplit_schur_precondition -ksp_gmres_restart -ksp_type -ksp_pc_side -ksp_rtol'
petsc_options_value = 'full self 300 fgmres right 1e-4'
[]
[u]
vars = 'vel'
# petsc_options = '-ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_type -ksp_rtol -ksp_gmres_restart -ksp_pc_side'
petsc_options_value = 'hypre boomeramg gmres 1e-2 300 right'
[]
[p]
vars = 'p'
petsc_options = '-ksp_converged_reason -pc_lsc_commute'
petsc_options_iname = '-ksp_type -ksp_gmres_restart -ksp_rtol -pc_type -ksp_pc_side -lsc_pc_type -lsc_pc_hypre_type -lsc_ksp_type -lsc_ksp_rtol -lsc_ksp_pc_side -lsc_ksp_gmres_restart -lsc_mass_pc_type -lsc_mass_pc_hypre_type -lsc_mass_ksp_rtol -lsc_mass_ksp_type'
petsc_options_value = 'fgmres 300 1e-2 lsc right hypre boomeramg fgmres 1e-1 right 300 hypre boomeramg 1e-1 gmres'
[]
[]
[]
[Postprocessors]
[pavg]
type = ElementAverageValue
variable = p
[]
[]
[UserObjects]
[set_pressure]
type = NSPressurePin
pin_type = 'average'
variable = p
pressure_average = 'pavg'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
print_linear_residuals = false
[exo]
type = Exodus
execute_on = 'final'
hide = 'pavg'
file_base = 'fsp_steady_low_Re_olshanskii'
[]
[]
(modules/stochastic_tools/examples/parameter_study/diffusion_vector.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables/T]
initial_condition = 300
[]
[Kernels]
[time]
type = ADTimeDerivative
variable = T
[]
[diff]
type = ADMatDiffusion
variable = T
diffusivity = diffusivity
[]
[source]
type = ADBodyForce
variable = T
value = 100
function = 1
[]
[]
[BCs]
[left]
type = ADDirichletBC
variable = T
boundary = left
value = 300
[]
[right]
type = ADNeumannBC
variable = T
boundary = right
value = -100
[]
[]
[Materials/constant]
type = ADGenericConstantMaterial
prop_names = 'diffusivity'
prop_values = 1
[]
[Executioner]
type = Transient
num_steps = 4
dt = 0.25
[]
[Postprocessors]
[T_avg]
type = ElementAverageValue
variable = T
execute_on = 'initial timestep_end'
[]
[q_left]
type = ADSideDiffusiveFluxAverage
variable = T
boundary = left
diffusivity = diffusivity
execute_on = 'initial timestep_end'
[]
[]
[Reporters]
[acc]
type = AccumulateReporter
reporters = 'T_avg/value q_left/value'
[]
[]
[Controls/stochastic]
type = SamplerReceiver
[]
[Outputs]
[]
(modules/phase_field/test/tests/MultiSmoothCircleIC/multismoothcircleIC_normal_test.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 15
ny = 15
nz = 15
xmin = 0
xmax = 100
ymin = 0
ymax = 100
zmin = 0
zmax = 100
elem_type = HEX8
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./c]
type = MultiSmoothCircleIC
variable = c
invalue = 1.0
outvalue = 0.0001
bubspac = 30.0 # This spacing is from bubble center to bubble center
numbub = 10
radius = 10.0
int_width = 12.0
rand_seed = 2000
radius_variation = 2 #This is the standard deviation
radius_variation_type = normal
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./diff]
type = MatDiffusion
variable = c
diffusivity = D_v
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y z'
[../]
[../]
[]
[Materials]
[./Dv]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 0.074802
[../]
[]
[Postprocessors]
[./bubbles]
type = FeatureFloodCount
variable = c
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart -mat_mffd_type'
petsc_options_value = 'hypre boomeramg 101 ds'
l_max_its = 20
l_tol = 1e-4
nl_max_its = 20
nl_rel_tol = 1e-9
nl_abs_tol = 1e-11
start_time = 0.0
num_steps = 1
dt = 100.0
[]
[Outputs]
exodus = true
[]
(test/tests/kernels/ad_mat_diffusion/ad_2d_steady_state.i)
# This test solves a 2D steady state heat equation
# The error is found by comparing to the analytical solution
# Note that the thermal conductivity, specific heat, and density in this problem
# Are set to 1, and need to be changed to the constants of the material being
# Analyzed
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
xmax = 2
ymax = 2
[]
[Variables]
[./T]
[../]
[]
[Kernels]
[./HeatDiff]
type = ADMatDiffusion
variable = T
diffusivity = diffusivity
[../]
[]
[BCs]
[./zero]
type = DirichletBC
variable = T
boundary = 'left right bottom'
value = 0
[../]
[./top]
type = ADFunctionDirichletBC
variable = T
boundary = top
function = '10*sin(pi*x*0.5)'
[../]
[]
[Materials]
[./k]
type = ADGenericConstantMaterial
prop_names = diffusivity
prop_values = 1
[../]
[]
[Postprocessors]
[./nodal_error]
type = NodalL2Error
function = '10/(sinh(pi))*sin(pi*x*0.5)*sinh(pi*y*0.5)'
variable = T
outputs = console
[../]
[./elemental_error]
type = ElementL2Error
function = '10/(sinh(pi))*sin(pi*x*0.5)*sinh(pi*y*0.5)'
variable = T
outputs = console
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_3d/jac.1phase.i)
[Materials]
[mat]
type = ADGenericConstantMaterial
block = 'blk:0'
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '1000 100 30'
[]
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Functions]
[T_init]
type = ParsedFunction
expression = '1000*y+300+30*z'
[]
[]
[GlobalParams]
scaling_factor_1phase = '1 1 1e-3'
gravity_vector = '0 0 0'
[]
[Components]
[fch]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
fp = fp
n_elems = 6
length = 1
initial_T = T_init
initial_p = 1.01e5
initial_vel = 0
closures = simple_closures
A = 0.00314159
D_h = 0.2
f = 0.01
[]
[in]
type = InletVelocityTemperature1Phase
input = 'fch:in'
vel = 1
T = 300
[]
[out]
type = Outlet1Phase
input = 'fch:out'
p = 1.01e5
[]
[blk]
type = HeatStructureFromFile3D
file = mesh.e
position = '0 0 0'
initial_T = T_init
[]
[ht]
type = HeatTransferFromHeatStructure3D1Phase
flow_channels = 'fch'
hs = blk
boundary = blk:rmin
Hw = 10000
P_hf = 0.1564344650402309
[]
[]
[Postprocessors]
[energy_hs]
type = ADHeatStructureEnergy3D
block = blk:0
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_fch]
type = ElementIntegralVariablePostprocessor
block = fch
variable = rhoEA
execute_on = 'INITIAL TIMESTEP_END'
[]
[total_energy]
type = SumPostprocessor
values = 'energy_fch energy_hs'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change]
type = ChangeOverTimePostprocessor
change_with_respect_to_initial = true
postprocessor = total_energy
compute_relative_change = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
petsc_options_iname = '-snes_test_err'
petsc_options_value = ' 1e-9'
[]
[]
[Executioner]
type = Transient
scheme = bdf2
dt = 0.1
num_steps = 1
solve_type = PJFNK
line_search = basic
abort_on_solve_fail = true
nl_abs_tol = 1e-8
[]
[Outputs]
file_base = 'phy.conservation'
csv = true
show = 'energy_change'
execute_on = 'final'
[]
(modules/thermal_hydraulics/test/tests/materials/ad_wall_heat_transfer_coefficient_3eqn_dittus_boelter/test.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
allow_renumbering = false
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = ADDiffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[AuxVariables]
[Hw]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[Hw_ak]
type = ADMaterialRealAux
variable = Hw
property = Hw
[]
[]
[Materials]
[props]
type = ADGenericConstantMaterial
prop_names = 'rho vel k mu cp T T_wall D_h'
prop_values = '1000 0.1 0.001 0.1 12 300 310 0.1'
[]
[Hw_material]
type = ADWallHeatTransferCoefficient3EqnDittusBoelterMaterial
rho = rho
vel = vel
D_h = D_h
k = k
mu = mu
cp = cp
T = T
T_wall = T_wall
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[Hw]
type = ElementalVariableValue
elementid = 0
variable = Hw
[]
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(modules/heat_transfer/test/tests/radiation_transfer_action/cavity_with_pillar_vf.i)
[Mesh]
[cartesian]
type = CartesianMeshGenerator
dim = 3
dx = '0.1 0.3 0.4 0.3 0.1'
ix = ' 1 3 4 3 1'
dy = '0.1 0.3 0.4 0.3 0.1'
iy = ' 1 3 4 3 1'
dz = '0.1 0.8 0.2 0.1'
iz = ' 1 8 2 1'
subdomain_id = '1 1 1 1 1
1 15 15 15 1
1 15 1 15 1
1 15 15 15 1
1 1 1 1 1
1 12 12 12 1
11 0 103 0 14
11 104 2 102 14
11 0 101 0 14
1 13 13 13 1
1 12 12 12 1
11 0 0 0 14
11 0 105 0 14
11 0 0 0 14
1 13 13 13 1
1 1 1 1 1
1 16 16 16 1
1 16 16 16 1
1 16 16 16 1
1 1 1 1 1'
[]
[left_interior]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 11
paired_block = '0 101 102 103 104 105'
new_boundary = left_interior_wall
input = cartesian
[]
[right_interior]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 14
paired_block = '0 101 102 103 104 105'
new_boundary = right_interior_wall
input = left_interior
[]
[bottom_interior]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 12
paired_block = '0 101 102 103 104 105'
new_boundary = bottom_interior_wall
input = right_interior
[]
[top_interior]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 13
paired_block = '0 101 102 103 104 105'
new_boundary = top_interior_wall
input = bottom_interior
[]
[front_interior]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 15
paired_block = '0 101 102 103 104 105'
new_boundary = front_interior_wall
input = top_interior
[]
[back_interior]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 16
paired_block = '0 101 102 103 104 105'
new_boundary = back_interior_wall
input = front_interior
[]
[pillar_left]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 2
paired_block = 104
new_boundary = pillar_left
input = 'back_interior'
[]
[pillar_right]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 2
paired_block = 102
new_boundary = pillar_right
input = 'pillar_left'
[]
[pillar_bottom]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 2
paired_block = 103
new_boundary = pillar_bottom
input = 'pillar_right'
[]
[pillar_top]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 2
paired_block = 101
new_boundary = pillar_top
input = 'pillar_bottom'
[]
[pillar_back]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 2
paired_block = 105
new_boundary = pillar_back
input = 'pillar_top'
[]
[rename_block]
type = RenameBlockGenerator
old_block = '2 11 12 13 14 15 16 101 102 103 104 105'
new_block = '2 1 1 1 1 1 1 0 0 0 0 0'
input = 'pillar_back'
[]
[]
[GrayDiffuseRadiation]
[cavity]
sidesets = '6 7 8 9 10 11 12 13 14 15 16'
emissivity = '0.8 0.8 0.8 0.8 0.8 eps_fn 0.8 0.8 0.8 0.8 0.8'
n_patches = '5 5 5 5 5 5 5 5 5 5 5'
partitioners = 'metis metis metis metis metis metis metis metis metis metis metis'
temperature = temperature
ray_tracing_face_order = SECOND
[]
[]
[Functions]
[eps_fn]
type = ConstantFunction
value = 0.8
[]
[]
[Variables]
[temperature]
initial_condition = 300
block = '1 2'
[]
[]
[Kernels]
[hc]
type = HeatConduction
variable = temperature
block = '1 2'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temperature
boundary = left
value = 500
[]
[front]
type = DirichletBC
variable = temperature
boundary = front
value = 300
[]
[]
[Materials]
[hcmat]
type = HeatConductionMaterial
thermal_conductivity = 25.0
specific_heat = 490.0
block = '1 2'
[]
[density]
type = GenericConstantMaterial
prop_names = 'density'
prop_values = '80'
block = '1 2'
[]
[]
[Executioner]
type = Steady
nl_abs_tol = 1e-8
nl_rel_tol = 1e-8
[]
[Outputs]
exodus = true
[]
(modules/phase_field/examples/cahn-hilliard/Parsed_CH.i)
#
# Example problem showing how to use the DerivativeParsedMaterial with CahnHilliard.
# The free energy is identical to that from CHMath, f_bulk = 1/4*(1-c)^2*(1+c)^2.
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 100
ny = 100
xmax = 60
ymax = 60
[]
[Modules]
[./PhaseField]
[./Conserved]
[./c]
free_energy = fbulk
mobility = M
kappa = kappa_c
solve_type = DIRECT
[../]
[../]
[../]
[]
[AuxVariables]
[./local_energy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[ICs]
[./cIC]
type = RandomIC
variable = c
min = -0.1
max = 0.1
[../]
[]
[AuxKernels]
[./local_energy]
type = TotalFreeEnergy
variable = local_energy
f_name = fbulk
interfacial_vars = c
kappa_names = kappa_c
execute_on = timestep_end
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1.0 0.5'
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = fbulk
coupled_variables = c
constant_names = W
constant_expressions = 1.0/2^2
expression = W*(1-c)^2*(1+c)^2
enable_jit = true
[../]
[]
[Postprocessors]
[./top]
type = SideIntegralVariablePostprocessor
variable = c
boundary = top
[../]
[./total_free_energy]
type = ElementIntegralVariablePostprocessor
variable = local_energy
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
scheme = bdf2
# Alternative preconditioning using the additive Schwartz method and LU decomposition
#petsc_options_iname = '-pc_type -sub_ksp_type -sub_pc_type'
#petsc_options_value = 'asm preonly lu '
# Preconditioning options using Hypre (algebraic multi-grid)
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
l_max_its = 30
l_tol = 1e-4
nl_max_its = 20
nl_rel_tol = 1e-9
dt = 2.0
end_time = 20.0
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/thermal_hydraulics/test/tests/materials/ad_convection_heat_flux/ad_convection_heat_flux.i)
# Gold value should be the following:
# q_wall = kappa * htc_wall * (T_wall - T)
# = 0.5 * 100 * (500 - 400)
# = 5000
[GlobalParams]
execute_on = 'initial'
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[AuxVariables]
[T_wall]
[]
[]
[AuxKernels]
[T_wall_ak]
type = ConstantAux
variable = T_wall
value = 500
[]
[]
[Materials]
[props]
type = ADGenericConstantMaterial
prop_names = 'T htc_wall kappa'
prop_values = '400 100 0.5'
[]
[q_wall_mat]
type = ADConvectionHeatFluxMaterial
q_wall = q_wall_prop
T = T
T_wall = T_wall
htc_wall = htc_wall
kappa = kappa
[]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[Postprocessors]
[q_wall_pp]
type = ADElementAverageMaterialProperty
mat_prop = q_wall_prop
[]
[]
[Outputs]
csv = true
[]
(modules/stochastic_tools/examples/surrogates/polynomial_regression/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 1
elem_type = EDGE3
[]
[Variables]
[T]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = T
diffusivity = k
[]
[source]
type = BodyForce
variable = T
value = 1.0
[]
[]
[Materials]
[conductivity]
type = GenericConstantMaterial
prop_names = k
prop_values = 2.0
[]
[]
[BCs]
[right]
type = DirichletBC
variable = T
boundary = right
value = 300
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[max]
type = NodalExtremeValue
variable = T
value_type = max
[]
[]
[Outputs]
[]
(test/tests/vectorpostprocessors/material_vector_postprocessor/block-restrict-err.i)
# check that the simulation terminates with an error when you try to use this
# on an element that isn't available/computed on a particular block.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'prop1 prop2 prop3'
prop_values = '1 2 42'
[../]
[]
[VectorPostprocessors]
[./vpp]
type = MaterialVectorPostprocessor
material = 'mat'
elem_ids = '2112'
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
execute_on = 'initial timestep_end'
csv = true
[]
(modules/phase_field/examples/rigidbodymotion/grain_motion_GT.i)
# example showing grain motion due to applied force density on grains
[GlobalParams]
var_name_base = eta
op_num = 4
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 80
ny = 40
nz = 0
xmin = 0.0
xmax = 40.0
ymin = 0.0
ymax = 20.0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./c]
[../]
[./w]
[../]
[./PolycrystalVariables]
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
coupled_variables = 'eta0 eta1 eta2 eta3'
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./motion]
type = MultiGrainRigidBodyMotion
variable = w
c = c
v = 'eta0 eta1 eta2 eta3'
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
[../]
[./RigidBodyMultiKernel]
# Creates all of the necessary Allen Cahn kernels automatically
c = c
f_name = F
mob_name = L
kappa_name = kappa_eta
grain_force = grain_force
grain_volumes = grain_volumes
grain_tracker_object = grain_center
[../]
[]
[Functions]
[./load_x]
# Defines the force on the grains in the x-direction
type = ParsedFunction
expression = 0.005*cos(x*pi/600)
[../]
[./load_y]
# Defines the force on the grains in the y-direction
type = ConstantFunction
value = 0.002
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M L kappa_c kappa_eta'
prop_values = '4.5 60 250 4000'
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
#coupled_variables = 'c eta0 eta1 eta2 eta3'
#constant_names = 'barr_height cv_eq'
#constant_expressions = '0.1 1.0e-2'
#function = '16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2
# +eta0*(1-eta0)*c+eta1*(1-eta1)*c
# +eta2*(1-eta2)*c+eta3*(1-eta3)*c'
constant_names = 'A B'
constant_expressions = '450 1.5'
coupled_variables = 'c eta0 eta1 eta2 eta3' #Must be changed as op_num changes. Copy/paste from line 4
expression = 'A*c^2*(1-c)^2+B*(c^2+6*(1-c)*(eta0^2+eta1^2+eta2^2+eta3^2)
-4*(2-c)*(eta0^3+eta1^3+eta2^3+eta3^3)
+3*(eta0^2+eta1^2+eta2^2+eta3^2)^2)'
derivative_order = 2
[../]
#[./force_density]
# type = ForceDensityMaterial
# c = c
# etas = 'eta0 eta1 eta2 eta3'
#[../]
[./force_density]
type = ExternalForceDensityMaterial
c = c
k = 10.0
etas = 'eta0 eta1 eta2 eta3'
force_x = load_x
force_y = load_y
[../]
[]
[AuxVariables]
[./bnds]
[../]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./var_indices]
order = CONSTANT
family = MONOMIAL
[../]
[./centroids]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./bnds]
type = BndsCalcAux
variable = bnds
#var_name_base = eta
#op_num = 4.0
v = 'eta0 eta1 eta2 eta3'
[../]
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
flood_counter = grain_center
field_display = UNIQUE_REGION
execute_on = timestep_begin
[../]
[./var_indices]
type = FeatureFloodCountAux
variable = var_indices
flood_counter = grain_center
field_display = VARIABLE_COLORING
execute_on = timestep_begin
[../]
[./centroids]
type = FeatureFloodCountAux
variable = centroids
execute_on = timestep_begin
field_display = CENTROID
flood_counter = grain_center
[../]
[]
[ICs]
[./ic_eta1]
x_positions = '32.5 24.0'
int_width = 1.0
z_positions = '0 0'
y_positions = '6.0 14.0'
radii = '4.0 4.0'
3D_spheres = false
outvalue = 0
variable = eta1
invalue = 1
type = SpecifiedSmoothCircleIC
block = 0
[../]
[./multip]
x_positions = '5.5 15.5 24.0 32.5 7.0 15.5 24.0 32.5'
int_width = 1.0
z_positions = '0 0'
y_positions = '6.0 6.0 6.0 6.0 14.5 14.5 14.0 14.5'
radii = '4.0 4.0 4.0 4.0 4.0 4.0 4.0 4.0'
3D_spheres = false
outvalue = 0.001
variable = c
invalue = 0.999
type = SpecifiedSmoothCircleIC
block = 0
[../]
[./ic_eta0]
x_positions = '5.5 15.5'
int_width = 1.0
z_positions = '0 0'
y_positions = '6.0 6.0'
radii = '4.0 4.0'
3D_spheres = false
outvalue = 0.0
variable = eta0
invalue = 1.0
type = SpecifiedSmoothCircleIC
block = 0
[../]
[./ic_eta2]
x_positions = '24.0 7.0'
int_width = 1.0
z_positions = '0 0'
y_positions = '6.0 14.5 '
radii = '4.0 4.0 '
3D_spheres = false
outvalue = 0.0
variable = eta2
invalue = 1.0
type = SpecifiedSmoothCircleIC
block = 0
[../]
[./ic_eta3]
x_positions = '15.5 32.5'
int_width = 1.0
z_positions = '0 0'
y_positions = '14.5 14.5'
radii = '4.0 4.0'
3D_spheres = false
outvalue = 0.0
variable = eta3
invalue = 1.0
type = SpecifiedSmoothCircleIC
block = 0
[../]
[]
[VectorPostprocessors]
[./forces]
type = GrainForcesPostprocessor
grain_force = grain_force
[../]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_center
execute_on = 'initial timestep_begin'
[../]
[]
[UserObjects]
[./grain_center]
type = GrainTracker
outputs = none
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
[../]
[./grain_force]
type = ComputeExternalGrainForceAndTorque
c = c
grain_data = grain_center
force_density = force_density_ext
etas = 'eta0 eta1 eta2 eta3'
execute_on = 'initial linear nonlinear'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
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
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 20
dt = 0.01
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/free_energy_material/MathEBFreeEnergy_split.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
xmin = 0.0
xmax = 30.0
ymin = 0.0
ymax = 30.0
elem_type = QUAD4
[]
[Variables]
[c]
[InitialCondition]
type = CrossIC
x1 = 0.0
x2 = 30.0
y1 = 0.0
y2 = 30.0
[]
[]
[w]
[]
[]
[Preconditioning]
active = 'SMP'
[PBP]
type = PBP
solve_order = 'w c'
preconditioner = 'AMG ASM'
off_diag_row = 'c '
off_diag_column = 'w '
[]
[SMP]
type = SMP
off_diag_row = 'w c'
off_diag_column = 'c w'
[]
[]
[Kernels]
[cres]
type = SplitCHParsed
variable = c
kappa_name = kappa_c
w = w
f_name = F
[]
[wres]
type = SplitCHWRes
variable = w
mob_name = M
[]
[time]
type = CoupledTimeDerivative
variable = w
v = c
[]
[]
[BCs]
[Periodic]
[top_bottom]
primary = 0
secondary = 2
translation = '0 30.0 0'
[]
[left_right]
primary = 1
secondary = 3
translation = '-30.0 0 0'
[]
[]
[]
[Materials]
[constant]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1.0 2.0'
[]
[free_energy]
type = MathEBFreeEnergy
property_name = F
c = c
[]
[]
[Executioner]
type = Transient
scheme = 'BDF2'
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
l_max_its = 30
l_tol = 1.0e-3
nl_max_its = 50
nl_rel_tol = 1.0e-10
dt = 10.0
num_steps = 2
[]
[Outputs]
exodus = true
[]
(modules/phase_field/examples/cahn-hilliard/Parsed_SplitCH.i)
#
# Example problem showing how to use the DerivativeParsedMaterial with SplitCHParsed.
# The free energy is identical to that from SplitCHMath, f_bulk = 1/4*(1-c)^2*(1+c)^2.
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 150
ny = 150
xmax = 60
ymax = 60
[]
[Modules]
[./PhaseField]
[./Conserved]
[./c]
free_energy = fbulk
mobility = M
kappa = kappa_c
solve_type = REVERSE_SPLIT
[../]
[../]
[../]
[]
[AuxVariables]
[./local_energy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[ICs]
[./cIC]
type = RandomIC
variable = c
min = -0.1
max = 0.1
[../]
[]
[AuxKernels]
[./local_energy]
type = TotalFreeEnergy
variable = local_energy
f_name = fbulk
interfacial_vars = c
kappa_names = kappa_c
execute_on = timestep_end
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1.0 0.5'
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = fbulk
coupled_variables = c
constant_names = W
constant_expressions = 1.0/2^2
expression = W*(1-c)^2*(1+c)^2
enable_jit = true
outputs = exodus
[../]
[]
[Postprocessors]
[./top]
type = SideIntegralVariablePostprocessor
variable = c
boundary = top
[../]
[./total_free_energy]
type = ElementIntegralVariablePostprocessor
variable = local_energy
[../]
[]
[Preconditioning]
[./cw_coupling]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
scheme = bdf2
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu '
l_max_its = 30
l_tol = 1e-4
nl_max_its = 20
nl_rel_tol = 1e-9
dt = 2.0
end_time = 20.0
[]
[Outputs]
exodus = true
perf_graph = true
[]
(test/tests/mortar/displaced-gap-conductance-2d-bnd-coupling/gap-conductance-bnd-material.i)
[Mesh]
displacements = 'disp_x disp_y'
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
# block 1: left
# block 2: right
[]
[./primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[../]
[./secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[../]
[]
[AuxVariables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[]
[AuxKernels]
[function_x]
type = FunctionAux
function = '.05 * t'
variable = 'disp_x'
block = '2'
[]
[function_y]
type = FunctionAux
function = '.05 * t'
variable = 'disp_y'
block = '2'
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[./T]
block = '1 2'
[../]
[./lambda]
block = '10'
family = LAGRANGE
order = FIRST
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = T
boundary = '5'
value = 0
[../]
[./right]
type = DirichletBC
variable = T
boundary = '8'
value = 1
[../]
[]
[Kernels]
[./conduction]
type = Diffusion
variable = T
block = '1 2'
[../]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[./mortar]
type = GapHeatConductanceMaterial
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
variable = lambda
secondary_variable = T
use_displaced_mesh = true
material_property = 'layer_modifier'
correct_edge_dropping = true
[../]
[]
[Materials]
[constant]
type = ADGenericConstantMaterial
prop_names = 'gap_conductance'
prop_values = '.03'
block = '1 2'
use_displaced_mesh = true
[]
[bnd_material_modifier]
type = ADGenericConstantMaterial
prop_names = 'layer_modifier'
prop_values = '5.0'
boundary = '1 2'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = NEWTON
type = Transient
num_steps = 5
petsc_options_iname = '-pc_type -snes_linesearch_type'
petsc_options_value = 'lu basic'
[]
[Outputs]
exodus = true
[dofmap]
type = DOFMap
execute_on = 'initial'
[]
[]
(tutorials/darcy_thermo_mech/step04_velocity_aux/tests/auxkernels/velocity_aux/velocity_aux.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
[]
coord_type = RZ
rz_coord_axis = X
[]
[Variables]
[pressure]
[]
[]
[AuxVariables]
[velocity]
order = CONSTANT
family = MONOMIAL_VEC
[]
[]
[AuxKernels]
[velocity]
type = DarcyVelocity
variable = velocity
execute_on = timestep_end
pressure = pressure
[]
[]
[Functions]
[pressure_ic_func]
type = ParsedFunction
expression = 2000*x*y*x*y
[]
[]
[ICs]
[pressure_ic]
type = FunctionIC
variable = pressure
function = pressure_ic_func
[]
[]
[Problem]
type = FEProblem
solve = false
[]
[Materials]
[pressure]
type = ADGenericConstantMaterial
prop_values = '0.8451e-9 7.98e-4'
prop_names = 'permeability viscosity'
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/conserved_noise/integral.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmin = 0.0
xmax = 10.0
ymin = 0.0
ymax = 10.0
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
initial_condition = 0.9
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[]
[Preconditioning]
active = 'SMP'
[./SMP]
type = SMP
off_diag_row = 'w c'
off_diag_column = 'c w'
[../]
[]
[Kernels]
[./cres]
type = SplitCHMath
variable = c
kappa_name = kappa_c
w = w
[../]
[./wres]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./conserved_langevin]
type = ConservedLangevinNoise
amplitude = 0.5
variable = w
noise = uniform_noise
[]
[]
[BCs]
[./Periodic]
[./all]
variable = 'c w'
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./constant]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1.0 2.0'
[../]
[]
[UserObjects]
[./uniform_noise]
type = ConservedUniformNoise
[../]
[]
[Postprocessors]
[./total_c]
type = ElementIntegralVariablePostprocessor
execute_on = 'initial timestep_end'
variable = c
[../]
[]
[Executioner]
type = Transient
scheme = 'BDF2'
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
l_max_its = 30
l_tol = 1.0e-3
nl_max_its = 30
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-10
dt = 10.0
num_steps = 10
[]
[Outputs]
file_base = integral
csv = true
console = true
[]
(modules/combined/test/tests/additive_manufacturing/check_stateful_properties.i)
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
xmin = 0
xmax = 10
ymin = 0
ymax = 10
zmin = 0
zmax = 0.5
nx = 20
ny = 20
nz = 1
[]
[left_domain]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '5 10 0.5'
block_id = 1
[]
[right_domain]
input = left_domain
type = SubdomainBoundingBoxGenerator
bottom_left = '5 0 0'
top_right = '10 10 0.5'
block_id = 2
[]
[sidesets]
input = right_domain
type = SideSetsAroundSubdomainGenerator
normal = '1 0 0'
block = 1
new_boundary = 'moving_interface'
[]
[]
[Variables]
[temp]
initial_condition = 300
block = '1'
[]
[]
# Output aux variables to check if stateful properties
# are initialized properly for newly added elements
[AuxVariables]
[density_aux]
order = CONSTANT
family = MONOMIAL
block = '1'
[]
[specific_heat_aux]
order = CONSTANT
family = MONOMIAL
block = '1'
[]
[thermal_conductivity_aux]
order = CONSTANT
family = MONOMIAL
block = '1'
[]
[]
[Kernels]
[null]
type = NullKernel
variable = temp
jacobian_fill = 1e-5
[]
[]
[AuxKernels]
[density]
type = ADMaterialRealAux
property = density
variable = density_aux
block = 1
[]
[specific_heat]
type = ADMaterialRealAux
property = specific_heat
variable = specific_heat_aux
block = 1
[]
[thermal_conductivity]
type = ADMaterialRealAux
property = thermal_conductivity
variable = thermal_conductivity_aux
block = 1
[]
[]
[Functions]
[fx]
type = ParsedFunction
expression = '5.25'
[]
[fy]
type = ParsedFunction
expression = '2.5*t'
[]
[fz]
type = ParsedFunction
expression = '0.25'
[]
[]
[Materials]
[density]
type = ADDensity
density = 4.43e-6
block = '1'
[]
[heat]
type = ADHeatConductionMaterial
specific_heat = 600
thermal_conductivity = 10e-3
block = '1'
[]
[volumetric_heat]
type = ADGenericConstantMaterial
prop_names = 'volumetric_heat'
prop_values = 100
block = '1'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
automatic_scaling = true
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
l_max_its = 10
nl_max_its = 20
nl_rel_tol = 1e-4
start_time = 0.0
end_time = 1.0
dt = 1e-1
dtmin = 1e-4
[]
[UserObjects]
[activated_elem_uo]
type = ActivateElementsByPath
execute_on = timestep_begin
function_x = fx
function_y = fy
function_z = fz
active_subdomain_id = 1
expand_boundary_name = 'moving_interface'
[]
[]
[Outputs]
exodus = 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 = ' '
[../]
[]
(test/tests/vectorpostprocessors/extra_id_integral/extra_id_vpp.i)
[Mesh]
[fmg]
type = FileMeshGenerator
file = 'extra_id_vpp.e'
use_for_exodus_restart = true
exodus_extra_element_integers = 'pin_id assembly_id'
[]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[AuxVariables]
[value1]
order = FIRST
initial_from_file_var = value1
[]
[value2]
order = FIRST
initial_from_file_var = value2
[]
[]
[Materials]
[mat1]
type = GenericConstantMaterial
prop_names = 'mat1'
prop_values = 1
[]
[mat2]
type = GenericConstantMaterial
prop_names = 'mat2'
prop_values = 2
[]
[]
[VectorPostprocessors]
[integral]
type = ExtraIDIntegralVectorPostprocessor
variable = 'value1'
id_name = 'assembly_id'
[]
[]
[Outputs]
exodus = false
csv = true
execute_on = timestep_end
[]
(modules/heat_transfer/test/tests/radiative_bcs/ad_radiative_bc_cyl.i)
#
# Thin cylindrical shell with very high thermal conductivity
# so that temperature is almost uniform at 500 K. Radiative
# boundary conditions is applied. Heat flux out of boundary
# 'right' should be 3723.36; this is approached as the mesh
# is refined
#
[Mesh]
type = MeshGeneratorMesh
[cartesian]
type = CartesianMeshGenerator
dim = 2
dx = '1 1'
ix = '1 10'
dy = '1 1'
subdomain_id = '1 2 1 2'
[]
[remove_1]
type = BlockDeletionGenerator
block = 1
input = cartesian
[]
[readd_left]
type = ParsedGenerateSideset
combinatorial_geometry = 'abs(x - 1) < 1e-4'
new_sideset_name = left
input = remove_1
[]
[]
[Problem]
coord_type = RZ
[]
[Variables]
[temp]
initial_condition = 800.0
[]
[]
[Kernels]
[heat]
type = ADHeatConduction
variable = temp
[]
[]
[BCs]
[lefttemp]
type = ADDirichletBC
boundary = left
variable = temp
value = 800
[]
[radiative_bc]
type = ADInfiniteCylinderRadiativeBC
boundary = right
variable = temp
boundary_radius = 2
boundary_emissivity = 0.2
cylinder_radius = 3
cylinder_emissivity = 0.7
Tinfinity = 500
[]
[]
[Materials]
[density]
type = ADGenericConstantMaterial
prop_names = 'density thermal_conductivity'
prop_values = '1 1.0e5'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
petsc_options = '-snes_converged_reason'
line_search = none
nl_rel_tol = 1e-6
nl_abs_tol = 1e-7
[]
[Postprocessors]
[right]
type = ADSideDiffusiveFluxAverage
variable = temp
boundary = right
diffusivity = thermal_conductivity
[]
[min_temp]
type = ElementExtremeValue
variable = temp
value_type = min
[]
[max_temp]
type = ElementExtremeValue
variable = temp
value_type = max
[]
[]
[Outputs]
csv = true
[]
(test/tests/userobjects/mat_prop_user_object/mat_prop_user_object.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./uo_e]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./uo_reporter]
type = MatPropUserObjectAux
variable = uo_e
material_user_object = uo
execute_on = timestep_end
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 'left'
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = 'right'
value = 2
[../]
[]
[Materials]
[./material]
block = 0
type = GenericConstantMaterial
prop_names = 'e'
prop_values = 2.718281828459
[../]
[]
[UserObjects]
[./uo]
type = MaterialPropertyUserObject
mat_prop = 'e'
execute_on = timestep_end
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
file_base = uo_material
exodus = true
[]
(modules/contact/test/tests/mortar_dynamics/block-dynamics-reference.i)
starting_point = 2e-1
offset = -0.19
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[normal_lm]
block = 3
use_dual = true
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[DynamicTensorMechanics]
displacements = 'disp_x disp_y'
generate_output = 'stress_xx stress_yy'
strain = FINITE
block = '1 2'
zeta = 1.0
alpha = 0.0
[]
[inertia_x]
type = InertialForce
variable = disp_x
velocity = vel_x
acceleration = accel_x
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[inertia_y]
type = InertialForce
variable = disp_y
velocity = vel_y
acceleration = accel_y
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[strain]
type = ComputeFiniteStrain
block = '1 2'
[]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '7750'
[]
[]
[AuxVariables]
[vel_x]
block = '1 2'
[]
[accel_x]
block = '1 2'
[]
[vel_y]
block = '1 2'
[]
[accel_y]
block = '1 2'
[]
[vel_z]
block = '1 2'
[]
[accel_z]
block = '1 2'
[]
[kinetic_energy]
order = CONSTANT
family = MONOMIAL
[]
[elastic_energy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = 'timestep_end'
[]
[vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = 'timestep_end'
[]
[accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = 'timestep_end'
[]
[vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = 'timestep_end'
[]
[kinetic_energy]
type = KineticEnergyAux
block = '1 2'
variable = kinetic_energy
newmark_velocity_x = vel_x
newmark_velocity_y = vel_y
newmark_velocity_z = 0.0
density = density
[]
[elastic_energy]
type = ElasticEnergyAux
variable = elastic_energy
block = '1 2'
[]
[]
# User object provides the contact force (e.g. LM)
# for the application of the generalized force
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
lm_variable = normal_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
# Not using 'dynamic' constraints results in poor enforcement of contact
# constraints and lack of kinetic and elastic energy conservation.
[weighted_gap_lm]
type = ComputeDynamicWeightedGapLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
disp_x = disp_x
disp_y = disp_y
newmark_beta = 0.25
newmark_gamma = 0.5
use_displaced_mesh = true
# Capture tolerance is important. If too small, stabilization takes longer
capture_tolerance = 1.0e-5
c = 1.0e6
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 4 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 30 # 50
function = '0' # '1e-2*t'
[]
[]
[Executioner]
type = Transient
end_time = 0.275 # 8.0
dt = 0.025
dtmin = .025
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu NONZERO 1e-15'
nl_max_its = 50
line_search = 'none'
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
checkpoint = true
csv = true
[]
[Postprocessors]
active = 'contact total_kinetic_energy total_elastic_energy'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[total_kinetic_energy]
type = ElementIntegralVariablePostprocessor
variable = kinetic_energy
block = '1 2'
[]
[total_elastic_energy]
type = ElementIntegralVariablePostprocessor
variable = elastic_energy
block = '1 2'
[]
[]
(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/navier_stokes/test/tests/finite_element/ins/coupled-force/steady-action.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[]
[Variables]
[u]
family = LAGRANGE_VEC
[]
[]
[Modules]
[IncompressibleNavierStokes]
equation_type = steady-state
velocity_boundary = 'bottom right top left'
velocity_function = '0 0 0 0 0 0 0 0'
add_standard_velocity_variables_for_ad = false
pressure_pinned_node = 0
density_name = rho
dynamic_viscosity_name = mu
use_ad = true
laplace = true
family = LAGRANGE
order = FIRST
supg = true
pspg = true
has_coupled_force = true
coupled_force_var = u
[]
[]
[Kernels]
[u_diff]
type = VectorDiffusion
variable = u
[]
[]
[BCs]
[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'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[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/lid_driven/ad_lid_driven_action.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
elem_type = QUAD9
[]
[]
[Modules]
[IncompressibleNavierStokes]
equation_type = transient
velocity_boundary = 'bottom right top left'
velocity_function = '0 0 0 0 lid_function 0 0 0'
pressure_pinned_node = 0
density_name = rho
dynamic_viscosity_name = mu
use_ad = true
laplace = true
family = LAGRANGE
order = SECOND
temperature_variable = 'T'
add_temperature_equation = true
initial_temperature = 1
fixed_temperature_boundary = 'bottom top'
temperature_function = '1 0'
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
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
[]
[]
[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_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]
type = Exodus
hide = 'velocity'
[]
perf_graph = true
[]
(modules/xfem/test/tests/moving_interface/moving_diffusion.i)
[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]
type = GeneratedMesh
dim = 2
nx = 5
ny = 3
xmin = 0.0
xmax = 1
ymin = 0.0
ymax = 1
elem_type = QUAD4
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Variables]
[./u]
[../]
[]
[Functions]
[./ls_func]
type = ParsedFunction
expression = 'x-0.76+0.21*t'
[../]
[]
[Kernels]
[./diff]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./time_deriv]
type = TimeDerivative
variable = u
[../]
[]
[Constraints]
[./u_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = u
jump = 0
use_penalty = true
alpha = 1e5
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[]
[BCs]
[./right_u]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./left_u]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Materials]
[./diffusivity_A]
type = GenericConstantMaterial
prop_names = A_diffusion_coefficient
prop_values = 5
[../]
[./diffusivity_B]
type = GenericConstantMaterial
prop_names = B_diffusion_coefficient
prop_values = 0.5
[../]
[./diff_combined]
type = LevelSetBiMaterialReal
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = diffusion_coefficient
[../]
[]
[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'
l_max_its = 20
l_tol = 1e-3
nl_max_its = 15
nl_rel_tol = 1e-6
nl_abs_tol = 1e-5
start_time = 0.0
dt = 1
end_time = 2
max_xfem_update = 1
[]
[Outputs]
exodus = true
execute_on = timestep_end
perf_graph = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/electromagnetics/test/tests/interfacekernels/electrostatic_contact/analytic_solution_test_three_block.i)
# Regression test for ElectrostaticContactCondition with analytic solution with
# three blocks
#
# dim = 1D
# X = [0,3]
# Interfaces at X = 1 and X = 2
#
# stainless_steel graphite stainless_steel
# +------------------+------------------+------------------+
#
# Left BC: Potential = 1
# Right BC: Potential = 0
# Left Interface: ElectrostaticContactCondition (primary = stainless_steel)
# Right Interface: ElectrostaticContactCondition (primary = graphite)
#
[Mesh]
[line]
type = GeneratedMeshGenerator
dim = 1
nx = 6
xmax = 3
[]
[break_center]
type = SubdomainBoundingBoxGenerator
input = line
block_id = 1
block_name = 'graphite'
bottom_left = '1 0 0'
top_right = '2 0 0'
[]
[break_right]
type = SubdomainBoundingBoxGenerator
input = break_center
block_id = 2
bottom_left = '2 0 0'
top_right = '3 0 0'
[]
[ssg_interface]
type = SideSetsBetweenSubdomainsGenerator
input = break_right
primary_block = 0
paired_block = 1
new_boundary = 'ssg_interface'
[]
[gss_interface]
type = SideSetsBetweenSubdomainsGenerator
input = ssg_interface
primary_block = 1
paired_block = 2
new_boundary = 'gss_interface'
[]
[block_rename]
type = RenameBlockGenerator
input = gss_interface
old_block = '0 2'
new_block = 'stainless_steel_left stainless_steel_right'
[]
[]
[Variables]
[potential_graphite]
block = graphite
[]
[potential_stainless_steel_left]
block = stainless_steel_left
[]
[potential_stainless_steel_right]
block = stainless_steel_right
[]
[]
[AuxVariables]
[analytic_potential_stainless_steel_left]
block = stainless_steel_left
[]
[analytic_potential_stainless_steel_right]
block = stainless_steel_right
[]
[analytic_potential_graphite]
block = graphite
[]
[]
[Kernels]
[electric_graphite]
type = ADMatDiffusion
variable = potential_graphite
diffusivity = electrical_conductivity
block = graphite
[]
[electric_stainless_steel_left]
type = ADMatDiffusion
variable = potential_stainless_steel_left
diffusivity = electrical_conductivity
block = stainless_steel_left
[]
[electric_stainless_steel_right]
type = ADMatDiffusion
variable = potential_stainless_steel_right
diffusivity = electrical_conductivity
block = stainless_steel_right
[]
[]
[AuxKernels]
[analytic_function_aux_stainless_steel_left]
type = FunctionAux
function = potential_fxn_stainless_steel_left
variable = analytic_potential_stainless_steel_left
block = stainless_steel_left
[]
[analytic_function_aux_stainless_steel_right]
type = FunctionAux
function = potential_fxn_stainless_steel_right
variable = analytic_potential_stainless_steel_right
block = stainless_steel_right
[]
[analytic_function_aux_graphite]
type = FunctionAux
function = potential_fxn_graphite
variable = analytic_potential_graphite
block = graphite
[]
[]
[BCs]
[elec_left]
type = ADDirichletBC
variable = potential_stainless_steel_left
boundary = left
value = 1
[]
[elec_right]
type = ADDirichletBC
variable = potential_stainless_steel_right
boundary = right
value = 0
[]
[]
[InterfaceKernels]
[electric_contact_conductance_ssg]
type = ElectrostaticContactCondition
variable = potential_stainless_steel_left
neighbor_var = potential_graphite
boundary = ssg_interface
mean_hardness = mean_hardness
mechanical_pressure = 3000
[]
[electric_contact_conductance_gss]
type = ElectrostaticContactCondition
variable = potential_graphite
neighbor_var = potential_stainless_steel_right
boundary = gss_interface
mean_hardness = mean_hardness
mechanical_pressure = 3000
[]
[]
[Materials]
#graphite (at 300 K)
[sigma_graphite]
type = ADGenericConstantMaterial
prop_names = electrical_conductivity
prop_values = 73069.2
block = graphite
[]
#stainless_steel (at 300 K)
[sigma_stainless_steel_left]
type = ADGenericConstantMaterial
prop_names = electrical_conductivity
prop_values = 1.41867e6
block = stainless_steel_left
[]
[sigma_stainless_steel_right]
type = ADGenericConstantMaterial
prop_names = electrical_conductivity
prop_values = 1.41867e6
block = stainless_steel_right
[]
# harmonic mean of graphite and stainless steel hardness
[mean_hardness]
type = ADGenericConstantMaterial
prop_names = mean_hardness
prop_values = 2.4797e9
[]
[]
[Functions]
[potential_fxn_stainless_steel_left]
type = ElectricalContactTestFunc
domain = stainless_steel
three_block = true
three_block_side = left
[]
[potential_fxn_stainless_steel_right]
type = ElectricalContactTestFunc
domain = stainless_steel
three_block = true
three_block_side = right
[]
[potential_fxn_graphite]
type = ElectricalContactTestFunc
domain = graphite
three_block = true
[]
[]
[Postprocessors]
[error_stainless_steel_left]
type = ElementL2Error
variable = potential_stainless_steel_left
function = potential_fxn_stainless_steel_left
block = stainless_steel_left
[]
[error_graphite]
type = ElementL2Error
variable = potential_graphite
function = potential_fxn_graphite
block = graphite
[]
[error_stainless_steel_right]
type = ElementL2Error
variable = potential_stainless_steel_right
function = potential_fxn_stainless_steel_right
block = stainless_steel_right
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
automatic_scaling = true
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/phase_field/test/tests/MultiPhase/acmultiinterface.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 10
nz = 0
xmin = -10
xmax = 10
ymin = -5
ymax = 5
elem_type = QUAD4
[]
[Variables]
[./eta1]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = -3.5
y1 = 0.0
radius = 4.0
invalue = 0.9
outvalue = 0.1
int_width = 2.0
[../]
[../]
[./eta2]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 3.5
y1 = 0.0
radius = 4.0
invalue = 0.9
outvalue = 0.1
int_width = 2.0
[../]
[../]
[./eta3]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SpecifiedSmoothCircleIC
x_positions = '-4.0 4.0'
y_positions = ' 0.0 0.0'
z_positions = ' 0.0 0.0'
radii = '4.0 4.0'
invalue = 0.1
outvalue = 0.9
int_width = 2.0
[../]
[../]
[./lambda]
order = FIRST
family = LAGRANGE
initial_condition = 1.0
[../]
[]
[Kernels]
[./deta1dt]
type = TimeDerivative
variable = eta1
[../]
[./ACBulk1]
type = AllenCahn
variable = eta1
coupled_variables = 'eta2 eta3'
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
[../]
[./deta2dt]
type = TimeDerivative
variable = eta2
[../]
[./ACBulk2]
type = AllenCahn
variable = eta2
coupled_variables = 'eta1 eta3'
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
[../]
[./deta3dt]
type = TimeDerivative
variable = eta3
[../]
[./ACBulk3]
type = AllenCahn
variable = eta3
coupled_variables = 'eta1 eta2'
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]
type = SwitchingFunctionConstraintLagrange
variable = lambda
etas = 'eta1 eta2 eta3'
h_names = 'h1 h2 h3'
epsilon = 0
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'Fx L1 L2 L3 kappa11 kappa12 kappa13 kappa21 kappa22 kappa23 kappa31 kappa32 kappa33'
prop_values = '0 1 1 1 1 1 1 1 1 1 1 1 1 '
[../]
[./etasummat]
type = ParsedMaterial
property_name = etasum
coupled_variables = 'eta1 eta2 eta3'
material_property_names = 'h1 h2 h3'
expression = 'h1+h2+h3'
[../]
[./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'
[../]
[./free_energy]
type = DerivativeMultiPhaseMaterial
property_name = F
# we use a constant free energy (GeneriConstantmaterial property Fx)
fi_names = 'Fx Fx Fx'
hi_names = 'h1 h2 h3'
etas = 'eta1 eta2 eta3'
# the free energy is given by the MultiBarrierFunctionMaterial only
W = 1
derivative_order = 2
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
#petsc_options = '-snes_ksp -snes_ksp_ew'
#petsc_options = '-ksp_monitor_snes_lg-snes_ksp_ew'
#petsc_options_iname = '-ksp_gmres_restart'
#petsc_options_value = '1000 '
l_max_its = 15
l_tol = 1.0e-6
nl_max_its = 50
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-10
start_time = 0.0
num_steps = 2
dt = 0.2
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/solid_mechanics/test/tests/dynamics/wave_1D/wave_newmark.i)
# Wave propogation in 1D using Newmark time integration
#
# The test is for an 1D bar element of length 4m fixed on one end
# with a sinusoidal pulse dirichlet boundary condition applied to the other end.
# beta and gamma are Newmark time integration parameters
# The equation of motion in terms of matrices is:
#
# M*accel + K*disp = 0
#
# Here M is the mass matrix, K is the stiffness matrix
#
# This equation is equivalent to:
#
# density*accel + Div Stress= 0
#
# The first term on the left is evaluated using the Inertial force kernel
# The last term on the left is evaluated using StressDivergenceTensors
#
# The displacement at the second, third and fourth node at t = 0.1 are
# -8.021501116638234119e-02, 2.073994362053969628e-02 and -5.045094181261772920e-03, respectively
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 4
nz = 1
xmin = 0.0
xmax = 0.1
ymin = 0.0
ymax = 4.0
zmin = 0.0
zmax = 0.1
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[AuxVariables]
[./vel_x]
[../]
[./accel_x]
[../]
[./vel_y]
[../]
[./accel_y]
[../]
[./vel_z]
[../]
[./accel_z]
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
[./inertia_x]
type = InertialForce
variable = disp_x
velocity = vel_x
acceleration = accel_x
beta = 0.3025
gamma = 0.6
eta=0.0
[../]
[./inertia_y]
type = InertialForce
variable = disp_y
velocity = vel_y
acceleration = accel_y
beta = 0.3025
gamma = 0.6
eta=0.0
[../]
[./inertia_z]
type = InertialForce
variable = disp_z
velocity = vel_z
acceleration = accel_z
beta = 0.3025
gamma = 0.6
eta = 0.0
[../]
[]
[AuxKernels]
[./accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.3025
execute_on = timestep_end
[../]
[./vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.6
execute_on = timestep_end
[../]
[./accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.3025
execute_on = timestep_end
[../]
[./vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.6
execute_on = timestep_end
[../]
[./accel_z]
type = NewmarkAccelAux
variable = accel_z
displacement = disp_z
velocity = vel_z
beta = 0.3025
execute_on = timestep_end
[../]
[./vel_z]
type = NewmarkVelAux
variable = vel_z
acceleration = accel_z
gamma = 0.6
execute_on = timestep_end
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 0
index_j = 1
[../]
[./strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yy
index_i = 0
index_j = 1
[../]
[]
[BCs]
[./top_y]
type = DirichletBC
variable = disp_y
boundary = top
value=0.0
[../]
[./top_x]
type = DirichletBC
variable = disp_x
boundary = top
value=0.0
[../]
[./top_z]
type = DirichletBC
variable = disp_z
boundary = top
value=0.0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = right
value=0.0
[../]
[./right_z]
type = DirichletBC
variable = disp_z
boundary = right
value=0.0
[../]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = left
value=0.0
[../]
[./left_z]
type = DirichletBC
variable = disp_z
boundary = left
value=0.0
[../]
[./front_x]
type = DirichletBC
variable = disp_x
boundary = front
value=0.0
[../]
[./front_z]
type = DirichletBC
variable = disp_z
boundary = front
value=0.0
[../]
[./back_x]
type = DirichletBC
variable = disp_x
boundary = back
value=0.0
[../]
[./back_z]
type = DirichletBC
variable = disp_z
boundary = back
value=0.0
[../]
[./bottom_x]
type = DirichletBC
variable = disp_x
boundary = bottom
value=0.0
[../]
[./bottom_z]
type = DirichletBC
variable = disp_z
boundary = bottom
value=0.0
[../]
[./bottom_y]
type = FunctionDirichletBC
variable = disp_y
boundary = bottom
function = displacement_bc
[../]
[]
[Materials]
[./Elasticity_tensor]
type = ComputeElasticityTensor
block = 0
fill_method = symmetric_isotropic
C_ijkl = '1 0'
[../]
[./strain]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[../]
[./stress]
type = ComputeLinearElasticStress
block = 0
[../]
[./density]
type = GenericConstantMaterial
block = 0
prop_names = 'density'
prop_values = '1'
[../]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 6.0
l_tol = 1e-12
nl_rel_tol = 1e-12
dt = 0.1
[]
[Functions]
[./displacement_bc]
type = PiecewiseLinear
data_file = 'sine_wave.csv'
format = columns
[../]
[]
[Postprocessors]
[./_dt]
type = TimestepSize
[../]
[./disp_1]
type = NodalVariableValue
nodeid = 1
variable = disp_y
[../]
[./disp_2]
type = NodalVariableValue
nodeid = 3
variable = disp_y
[../]
[./disp_3]
type = NodalVariableValue
nodeid = 10
variable = disp_y
[../]
[./disp_4]
type = NodalVariableValue
nodeid = 14
variable = disp_y
[../]
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/chemical_reactions/test/tests/exceptions/missing_sto2.i)
# Missing stoichiometric coefficient in CoupledBEEquilibriumSub Kernel
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Variables]
[./a]
[../]
[./b]
[../]
[./c]
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./b_ie]
type = PrimaryTimeDerivative
variable = b
[../]
[./c_ie]
type = PrimaryTimeDerivative
variable = c
[../]
[./aeq]
type = CoupledBEEquilibriumSub
variable = a
log_k = 1
weight = 2
sto_u = 2
v = 'b c'
sto_v = 1
gamma_v = '2 2'
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = porosity
prop_values = 0.2
[../]
[]
[Executioner]
type = Transient
end_time = 1
[]
(modules/optimization/test/tests/optimizationreporter/bc_load_linearFunction/forward_and_adjoint.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 20
xmax = 1
ymax = 2
bias_x = 1.1
bias_y = 1.1
[]
[]
[Problem]
nl_sys_names = 'nl0 adjoint'
kernel_coverage_check = false
[]
[Variables]
[temperature]
[]
[temperature_adjoint]
nl_sys = adjoint
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = thermal_conductivity
[]
[]
[BCs]
[left]
type = FunctionNeumannBC
variable = temperature
boundary = left
function = left_function
[]
[right]
type = FunctionNeumannBC
variable = temperature
boundary = right
function = right_function
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 200
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 100
[]
[]
[Functions]
[left_function]
type = ParsedOptimizationFunction
expression = 'a + b*y'
param_symbol_names = 'a b'
param_vector_name = 'params/left'
[]
[right_function]
type = ParsedOptimizationFunction
expression = 'a'
param_symbol_names = 'a'
param_vector_name = 'params/right'
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = SteadyAndAdjoint
forward_system = nl0
adjoint_system = adjoint
line_search = none
nl_rel_tol = 1e-12
l_tol = 1e-12
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = temperature_adjoint
x_coord_name = measure_data/measurement_xcoord
y_coord_name = measure_data/measurement_ycoord
z_coord_name = measure_data/measurement_zcoord
value_name = measure_data/misfit_values
weight_name = measure_data/weight
[]
[]
[VectorPostprocessors]
[grad_bc_left]
type = SideOptimizationNeumannFunctionInnerProduct
variable = temperature_adjoint
function = left_function
boundary = left
execute_on = ADJOINT_TIMESTEP_END
[]
[grad_bc_right]
type = SideOptimizationNeumannFunctionInnerProduct
variable = temperature_adjoint
function = right_function
boundary = right
execute_on = ADJOINT_TIMESTEP_END
[]
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
measurement_file = 'measurementData.csv'
file_xcoord = 'coordx'
file_ycoord ='y'
file_zcoord = 'z'
file_value = 'weightedMeasurement'
file_variable_weights = 'weight'
variable_weight_names = 'weight'
[]
[params]
type = ConstantReporter
real_vector_names = 'left right'
real_vector_values = '0 0; 0' # Dummy
[]
[vector_sqsum]
type = ParsedVectorRealReductionReporter
name = sqsum
reporter_name= 'measure_data/misfit_values'
initial_value = 0
expression = 'reduction_value+indexed_value*indexed_value'
outputs=none
[]
[obj_sum]
type = ParsedScalarReporter
name = value
reporter_names = 'vector_sqsum/sqsum'
reporter_symbols = 'a'
expression = '0.5*a'
[]
[]
[Outputs]
console = false
exodus = true
[]
(modules/combined/examples/phase_field-mechanics/kks_mechanics_KHS.i)
# KKS phase-field model coupled with elasticity using Khachaturyan's scheme as
# described in L.K. Aagesen et al., Computational Materials Science, 140, 10-21 (2017)
# Original run #170403a
[Mesh]
type = GeneratedMesh
dim = 3
nx = 640
ny = 1
nz = 1
xmin = -10
xmax = 10
ymin = 0
ymax = 0.03125
zmin = 0
zmax = 0.03125
elem_type = HEX8
[]
[Variables]
# order parameter
[./eta]
order = FIRST
family = LAGRANGE
[../]
# solute concentration
[./c]
order = FIRST
family = LAGRANGE
[../]
# chemical potential
[./w]
order = FIRST
family = LAGRANGE
[../]
# solute phase concentration (matrix)
[./cm]
order = FIRST
family = LAGRANGE
[../]
# solute phase concentration (precipitate)
[./cp]
order = FIRST
family = LAGRANGE
[../]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[./disp_z]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./eta_ic]
variable = eta
type = FunctionIC
function = ic_func_eta
block = 0
[../]
[./c_ic]
variable = c
type = FunctionIC
function = ic_func_c
block = 0
[../]
[./w_ic]
variable = w
type = ConstantIC
value = 0.00991
block = 0
[../]
[./cm_ic]
variable = cm
type = ConstantIC
value = 0.131
block = 0
[../]
[./cp_ic]
variable = cp
type = ConstantIC
value = 0.236
block = 0
[../]
[]
[Functions]
[./ic_func_eta]
type = ParsedFunction
expression = '0.5*(1.0+tanh((x)/delta_eta/sqrt(2.0)))'
symbol_names = 'delta_eta'
symbol_values = '0.8034'
[../]
[./ic_func_c]
type = ParsedFunction
expression = '0.2389*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^3*(6*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^2-15*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))+10)+0.1339*(1-(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^3*(6*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^2-15*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))+10))'
symbol_names = 'delta'
symbol_values = '0.8034'
[../]
[./psi_eq_int]
type = ParsedFunction
expression = 'volume*psi_alpha'
symbol_names = 'volume psi_alpha'
symbol_values = 'volume psi_alpha'
[../]
[./gamma]
type = ParsedFunction
expression = '(psi_int - psi_eq_int) / dy / dz'
symbol_names = 'psi_int psi_eq_int dy dz'
symbol_values = 'psi_int psi_eq_int 0.03125 0.03125'
[../]
[]
[AuxVariables]
[./sigma11]
order = CONSTANT
family = MONOMIAL
[../]
[./sigma22]
order = CONSTANT
family = MONOMIAL
[../]
[./sigma33]
order = CONSTANT
family = MONOMIAL
[../]
[./e11]
order = CONSTANT
family = MONOMIAL
[../]
[./e12]
order = CONSTANT
family = MONOMIAL
[../]
[./e22]
order = CONSTANT
family = MONOMIAL
[../]
[./e33]
order = CONSTANT
family = MONOMIAL
[../]
[./e_el11]
order = CONSTANT
family = MONOMIAL
[../]
[./e_el12]
order = CONSTANT
family = MONOMIAL
[../]
[./e_el22]
order = CONSTANT
family = MONOMIAL
[../]
[./f_el]
order = CONSTANT
family = MONOMIAL
[../]
[./eigen_strain00]
order = CONSTANT
family = MONOMIAL
[../]
[./Fglobal]
order = CONSTANT
family = MONOMIAL
[../]
[./psi]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./matl_sigma11]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = sigma11
[../]
[./matl_sigma22]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = sigma22
[../]
[./matl_sigma33]
type = RankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 2
variable = sigma33
[../]
[./matl_e11]
type = RankTwoAux
rank_two_tensor = total_strain
index_i = 0
index_j = 0
variable = e11
[../]
[./f_el]
type = MaterialRealAux
variable = f_el
property = f_el_mat
execute_on = timestep_end
[../]
[./GlobalFreeEnergy]
variable = Fglobal
type = KKSGlobalFreeEnergy
fa_name = fm
fb_name = fp
w = 0.0264
kappa_names = kappa
interfacial_vars = eta
[../]
[./psi_potential]
variable = psi
type = ParsedAux
coupled_variables = 'Fglobal w c f_el sigma11 e11'
expression = 'Fglobal - w*c + f_el - sigma11*e11'
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = right
value = 0
[../]
[./front_y]
type = DirichletBC
variable = disp_y
boundary = front
value = 0
[../]
[./back_y]
type = DirichletBC
variable = disp_y
boundary = back
value = 0
[../]
[./top_z]
type = DirichletBC
variable = disp_z
boundary = top
value = 0
[../]
[./bottom_z]
type = DirichletBC
variable = disp_z
boundary = bottom
value = 0
[../]
[]
[Materials]
# Chemical free energy of the matrix
[./fm]
type = DerivativeParsedMaterial
property_name = fm
coupled_variables = 'cm'
expression = '6.55*(cm-0.13)^2'
[../]
# Chemical Free energy of the precipitate phase
[./fp]
type = DerivativeParsedMaterial
property_name = fp
coupled_variables = 'cp'
expression = '6.55*(cp-0.235)^2'
[../]
# Elastic energy of the precipitate
[./elastic_free_energy_p]
type = ElasticEnergyMaterial
f_name = f_el_mat
args = 'eta'
outputs = exodus
[../]
# h(eta)
[./h_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta
[../]
# 1- h(eta), putting in function explicitly
[./one_minus_h_eta_explicit]
type = DerivativeParsedMaterial
property_name = one_minus_h_explicit
coupled_variables = eta
expression = 1-eta^3*(6*eta^2-15*eta+10)
outputs = exodus
[../]
# g(eta)
[./g_eta]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta
[../]
# constant properties
[./constants]
type = GenericConstantMaterial
prop_names = 'M L kappa misfit'
prop_values = '0.7 0.7 0.01704 0.00377'
[../]
#Mechanical properties
[./Stiffness_matrix]
type = ComputeElasticityTensor
base_name = C_matrix
C_ijkl = '103.3 74.25 74.25 103.3 74.25 103.3 46.75 46.75 46.75'
fill_method = symmetric9
[../]
[./Stiffness_ppt]
type = ComputeElasticityTensor
C_ijkl = '100.7 71.45 71.45 100.7 71.45 100.7 50.10 50.10 50.10'
base_name = C_ppt
fill_method = symmetric9
[../]
[./C]
type = CompositeElasticityTensor
args = eta
tensors = 'C_matrix C_ppt'
weights = 'one_minus_h_explicit h'
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./strain]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
eigenstrain_names = 'eigenstrain_ppt'
[../]
[./eigen_strain]
type = ComputeVariableEigenstrain
eigen_base = '0.00377 0.00377 0.00377 0 0 0'
prefactor = h
args = eta
eigenstrain_name = 'eigenstrain_ppt'
[../]
[]
[Kernels]
[./TensorMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
# enforce c = (1-h(eta))*cm + h(eta)*cp
[./PhaseConc]
type = KKSPhaseConcentration
ca = cm
variable = cp
c = c
eta = eta
[../]
# enforce pointwise equality of chemical potentials
[./ChemPotVacancies]
type = KKSPhaseChemicalPotential
variable = cm
cb = cp
fa_name = fm
fb_name = fp
[../]
#
# Cahn-Hilliard Equation
#
[./CHBulk]
type = KKSSplitCHCRes
variable = c
ca = cm
fa_name = fm
w = w
[../]
[./dcdt]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./ckernel]
type = SplitCHWRes
mob_name = M
variable = w
[../]
#
# Allen-Cahn Equation
#
[./ACBulkF]
type = KKSACBulkF
variable = eta
fa_name = fm
fb_name = fp
w = 0.0264
args = 'cp cm'
[../]
[./ACBulkC]
type = KKSACBulkC
variable = eta
ca = cm
cb = cp
fa_name = fm
[../]
[./ACBulk_el] #This adds df_el/deta for strain interpolation
type = AllenCahn
variable = eta
f_name = f_el_mat
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = kappa
[../]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm ilu nonzero'
l_max_its = 30
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-11
num_steps = 200
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.5
[../]
[]
[Postprocessors]
[./f_el_int]
type = ElementIntegralMaterialProperty
mat_prop = f_el_mat
[../]
[./c_alpha]
type = SideAverageValue
boundary = left
variable = c
[../]
[./c_beta]
type = SideAverageValue
boundary = right
variable = c
[../]
[./e11_alpha]
type = SideAverageValue
boundary = left
variable = e11
[../]
[./e11_beta]
type = SideAverageValue
boundary = right
variable = e11
[../]
[./s11_alpha]
type = SideAverageValue
boundary = left
variable = sigma11
[../]
[./s22_alpha]
type = SideAverageValue
boundary = left
variable = sigma22
[../]
[./s33_alpha]
type = SideAverageValue
boundary = left
variable = sigma33
[../]
[./s11_beta]
type = SideAverageValue
boundary = right
variable = sigma11
[../]
[./s22_beta]
type = SideAverageValue
boundary = right
variable = sigma22
[../]
[./s33_beta]
type = SideAverageValue
boundary = right
variable = sigma33
[../]
[./f_el_alpha]
type = SideAverageValue
boundary = left
variable = f_el
[../]
[./f_el_beta]
type = SideAverageValue
boundary = right
variable = f_el
[../]
[./f_c_alpha]
type = SideAverageValue
boundary = left
variable = Fglobal
[../]
[./f_c_beta]
type = SideAverageValue
boundary = right
variable = Fglobal
[../]
[./chem_pot_alpha]
type = SideAverageValue
boundary = left
variable = w
[../]
[./chem_pot_beta]
type = SideAverageValue
boundary = right
variable = w
[../]
[./psi_alpha]
type = SideAverageValue
boundary = left
variable = psi
[../]
[./psi_beta]
type = SideAverageValue
boundary = right
variable = psi
[../]
[./total_energy]
type = ElementIntegralVariablePostprocessor
variable = Fglobal
[../]
# Get simulation cell size from postprocessor
[./volume]
type = ElementIntegralMaterialProperty
mat_prop = 1
[../]
[./psi_eq_int]
type = FunctionValuePostprocessor
function = psi_eq_int
[../]
[./psi_int]
type = ElementIntegralVariablePostprocessor
variable = psi
[../]
[./gamma]
type = FunctionValuePostprocessor
function = gamma
[../]
[./int_position]
type = FindValueOnLine
start_point = '-10 0 0'
end_point = '10 0 0'
v = eta
target = 0.5
[../]
[]
#
# Precondition using handcoded off-diagonal terms
#
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[Outputs]
[./exodus]
type = Exodus
time_step_interval = 20
[../]
checkpoint = true
[./csv]
type = CSV
execute_on = 'final'
[../]
[]
(test/tests/controls/syntax_based_naming_access/param.i)
[Mesh]
type = GeneratedMesh
dim = 2
elem_type = QUAD4
# use odd numbers so points do not fall on element boundaries
nx = 31
ny = 31
[]
[Variables]
[./diffused]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = diffused
[../]
[]
[DiracKernels]
[./test_object]
type = MaterialPointSource
point = '0.5 0.5 0'
variable = diffused
[../]
[]
[BCs]
[./bottom_diffused]
type = DirichletBC
variable = diffused
boundary = 'bottom'
value = 2
[../]
[./top_diffused]
type = DirichletBC
variable = diffused
boundary = 'top'
value = 0
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'matp'
prop_values = '1'
block = 0
[../]
[]
[Postprocessors]
[./test_object]
type = TestControlPointPP
function = '2*(x+y)'
point = '0.5 0.5 0'
[../]
[./other_point_test_object]
type = TestControlPointPP
function = '3*(x+y)'
point = '0.5 0.5 0'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
[Controls]
[./point_control]
type = TestControl
test_type = 'point'
parameter = '*/*/point'
execute_on = 'initial'
[../]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_htonly/gap_heat_transfer_htonly_test.i)
#
# 1-D Gap Heat Transfer Test without mechanics
#
# This test exercises 1-D gap heat transfer for a constant conductivity gap.
#
# The mesh consists of two element blocks containing one element each. Each
# element is a unit cube. They sit next to one another with a unit between them.
#
# The conductivity of both blocks is set very large to achieve a uniform temperature
# across each block. The temperature of the far left boundary
# is ramped from 100 to 200 over one time unit. The temperature of the far right
# boundary is held fixed at 100.
#
# A simple analytical solution is possible for the heat flux between the blocks:
#
# Flux = (T_left - T_right) * (gapK/gap_width)
#
# The gap conductivity is specified as 1, thus
#
# gapK(Tavg) = 1.0*Tavg
#
#
# The heat flux across the gap at time = 1 is then:
#
# Flux(2) = 100 * (1.0/1.0) = 100
#
# For comparison, see results from the flux post processors
#
# This test has been augmented with a second scalar field that solves nearly
# the same problem. The conductivity has been changed to 10. Thus, the
# flux for the second field is 1000.
#
[Mesh]
file = gap_heat_transfer_htonly_test.e
[]
[Functions]
[./temp]
type = PiecewiseLinear
x = '0 1 2'
y = '100 200 200'
[../]
[]
[ThermalContact]
[./thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 3
secondary = 2
emissivity_primary = 0
emissivity_secondary = 0
[../]
[./awesomium_contact]
type = GapHeatTransfer
variable = awesomium
primary = 3
secondary = 2
emissivity_primary = 0
emissivity_secondary = 0
gap_conductivity = 10
appended_property_name = _awesomium
[../]
[]
[Variables]
[./temp]
order = FIRST
family = LAGRANGE
initial_condition = 100
[../]
[./awesomium]
order = FIRST
family = LAGRANGE
initial_condition = 100
[../]
[]
[AuxVariables]
[./gap_cond]
order = CONSTANT
family = MONOMIAL
[../]
[./gap_cond_awesomium]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = temp
[../]
[./awe]
type = HeatConduction
variable = awesomium
[../]
[]
[BCs]
[./temp_far_left]
type = FunctionDirichletBC
boundary = 1
variable = temp
function = temp
[../]
[./temp_far_right]
type = DirichletBC
boundary = 4
variable = temp
value = 100
[../]
[./awesomium_far_left]
type = FunctionDirichletBC
boundary = 1
variable = awesomium
function = temp
[../]
[./awesomium_far_right]
type = DirichletBC
boundary = 4
variable = awesomium
value = 100
[../]
[]
[AuxKernels]
[./conductance]
type = MaterialRealAux
property = gap_conductance
variable = gap_cond
boundary = 2
[../]
[./conductance_awe]
type = MaterialRealAux
property = gap_conductance_awesomium
variable = gap_cond_awesomium
boundary = 2
[../]
[]
[Materials]
[./heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 100000000.0
[../]
[./density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '1.0'
[../]
[]
[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 4'
line_search = 'none'
nl_rel_tol = 1e-12
l_tol = 1e-3
l_max_its = 100
dt = 1e-1
end_time = 1.0
[]
[Postprocessors]
[./temp_left]
type = SideAverageValue
boundary = 2
variable = temp
execute_on = 'initial timestep_end'
[../]
[./temp_right]
type = SideAverageValue
boundary = 3
variable = temp
execute_on = 'initial timestep_end'
[../]
[./flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[../]
[./flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[../]
[./awe_left]
type = SideAverageValue
boundary = 2
variable = awesomium
execute_on = 'initial timestep_end'
[../]
[./awe_right]
type = SideAverageValue
boundary = 3
variable = awesomium
execute_on = 'initial timestep_end'
[../]
[./awe_flux_left]
type = SideDiffusiveFluxIntegral
variable = awesomium
boundary = 2
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[../]
[./awe_flux_right]
type = SideDiffusiveFluxIntegral
variable = awesomium
boundary = 3
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/tutorials/introduction/therm_step03a.i)
#
# Single block thermal input with time derivative and volumetric heat source terms
# https://mooseframework.inl.gov/modules/heat_transfer/tutorials/introduction/therm_step03.html
#
[Mesh]
[generated]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmax = 2
ymax = 1
[]
[]
[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 = 1e4
[]
[]
[Materials]
[thermal]
type = HeatConductionMaterial
thermal_conductivity = 45.0
specific_heat = 0.5
[]
[density]
type = GenericConstantMaterial
prop_names = 'density'
prop_values = 8000.0
[]
[]
[BCs]
[t_left]
type = DirichletBC
variable = T
value = 300
boundary = 'left'
[]
[t_right]
type = FunctionDirichletBC
variable = T
function = '300+5*t'
boundary = 'right'
[]
[]
[Executioner]
type = Transient
end_time = 5
dt = 1
[]
[VectorPostprocessors]
[t_sampler]
type = LineValueSampler
variable = T
start_point = '0 0.5 0'
end_point = '2 0.5 0'
num_points = 20
sort_by = x
[]
[]
[Outputs]
exodus = true
[csv]
type = CSV
file_base = therm_step03a_out
execute_on = final
[]
[]
(modules/heat_transfer/test/tests/code_verification/cylindrical_test_no1.i)
# Problem II.1
#
# An infinitely long hollow cylinder has an inner radius ri and
# outer radius ro. It has a constant thermal conductivity k and
# internal heat generation q. It is allowed to reach thermal
# equilibrium while being exposed to constant temperatures on its
# inside and outside boundaries: u(ri) = ui and u(ro) = uo.
#
# REFERENCE:
# A. Toptan, et al. (Mar.2020). Tech. rep. CASL-U-2020-1939-000, SAND2020-3887 R. DOI:10.2172/1614683.
[Mesh]
[./geom]
type = GeneratedMeshGenerator
dim = 1
elem_type = EDGE2
xmin = 0.2
nx = 4
[../]
[]
[Variables]
[./u]
order = FIRST
[../]
[]
[Problem]
coord_type = RZ
[]
[Functions]
[./exact]
type = ParsedFunction
symbol_names = 'ri ro ui uo'
symbol_values = '0.2 1.0 300 0'
expression = '( uo * log(ri) - ui * log(ro) + (ui-uo) * log(x) ) / log(ri/ro)'
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = u
[../]
[]
[BCs]
[./ui]
type = DirichletBC
boundary = left
variable = u
value = 300
[../]
[./uo]
type = DirichletBC
boundary = right
variable = u
value = 0
[../]
[]
[Materials]
[./property]
type = GenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '1.0 1.0 5.0'
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = exact
variable = u
[../]
[./h]
type = AverageElementSize
[]
[]
[Outputs]
csv = true
[]
(test/tests/interfacekernels/hybrid/interface.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 40
xmax = 2
ny = 40
ymax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0.5 0.5 0'
top_right = '1.5 1.5 0'
block_id = 1
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '1'
paired_block = '0'
new_boundary = 'primary1_interface'
[]
[]
[Variables]
[u]
block = 0
[]
[v]
block = 1
[]
[]
[Kernels]
[diff_u]
type = MatDiffusion
variable = u
diffusivity = D
block = 0
[]
[diff_v]
type = MatDiffusion
variable = v
diffusivity = D
block = 1
[]
[source_u]
type = BodyForce
variable = u
value = 1
block = 0
[]
[source_v]
type = BodyForce
variable = v
value = 1
block = 1
[]
[]
[BCs]
[u]
type = VacuumBC
variable = u
boundary = 'left bottom right top'
[]
[interface_bc]
type = ADMatchedValueBC
variable = v
v = u
boundary = primary1_interface
[]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
[InterfaceKernels]
active = 'diffusion'
[./diffusion]
type = InterfaceDiffusion
variable = v
neighbor_var = u
boundary = primary1_interface
D = 'D'
D_neighbor = 'D'
[../]
[./penalty]
type = PenaltyInterfaceDiffusion
variable = v
neighbor_var = u
boundary = primary1_interface
penalty = 1e3
[../]
[]
[Materials]
[mat0]
type = GenericConstantMaterial
prop_names = 'D'
prop_values = '1'
block = 0
[]
[mat1]
type = GenericConstantMaterial
prop_names = 'D'
prop_values = '1'
block = 1
[]
[]
[AuxVariables]
[c][]
[]
[AuxKernels]
[u]
type = ParsedAux
variable = c
coupled_variables = 'u'
expression = 'u'
block = 0
[]
[v]
type = ParsedAux
variable = c
coupled_variables = 'v'
expression = 'v'
block = 1
[]
[]
(modules/heat_transfer/test/tests/code_verification/cartesian_test_no4.i)
# Problem I.4
#
# An infinite plate with constant thermal conductivity k and internal
# heat generation q. The left boundary is exposed to a constant heat flux q0.
# The right boundary is exposed to a fluid with constant temperature uf and
# heat transfer coefficient h, which results in the convective boundary condition.
#
# REFERENCE:
# A. Toptan, et al. (Mar.2020). Tech. rep. CASL-U-2020-1939-000, SAND2020-3887 R. DOI:10.2172/1614683.
[Mesh]
[./geom]
type = GeneratedMeshGenerator
dim = 1
elem_type = EDGE2
nx = 1
[../]
[]
[Variables]
[./u]
order = FIRST
[../]
[]
[Functions]
[./exact]
type = ParsedFunction
symbol_names = 'q q0 k L uf h'
symbol_values = '1200 200 1 1 100 10.0'
expression = 'uf + (q0 + L * q)/h + 0.5 * ( 2 * q0 + q * (L + x)) * (L-x) / k'
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = u
[../]
[./heatsource]
type = HeatSource
function = 1200
variable = u
[../]
[]
[BCs]
[./ui]
type = NeumannBC
boundary = left
variable = u
value = 200
[../]
[./uo]
type = CoupledConvectiveHeatFluxBC
boundary = right
variable = u
htc = 10.0
T_infinity = 100
[../]
[]
[Materials]
[./property]
type = GenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '1.0 1.0 1.0'
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = exact
variable = u
[../]
[./h]
type = AverageElementSize
[]
[]
[Outputs]
csv = true
[]
(test/tests/misc/line_source/line_source.i)
[Mesh]
type = FileMesh
file = line_source_cube.e
dim = 2
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
block = bulk
[../]
[./heating]
type = BodyForce
variable = u
function = 1
block = heater
[../]
[]
[BCs]
[./outside]
type = DirichletBC
variable = u
boundary = outside
value = 0
[../]
[]
[Materials]
[./diffusivity]
type = GenericConstantMaterial
block = 'bulk heater'
prop_names = diffusivity
prop_values = 1
[../]
[]
[Postprocessors]
[./total_flux]
type = SideDiffusiveFluxIntegral
variable = u
boundary = outside
diffusivity = diffusivity
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven_action.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
elem_type = QUAD9
[]
[]
[Modules]
[IncompressibleNavierStokes]
equation_type = transient
velocity_boundary = 'bottom right top left'
velocity_function = '0 0 0 0 lid_function 0 0 0'
pressure_pinned_node = 0
density_name = rho
dynamic_viscosity_name = mu
laplace = true
family = LAGRANGE
order = SECOND
add_temperature_equation = true
temperature_variable = T
initial_temperature = 1
thermal_conductivity_name = k
specific_heat_name = cp
natural_temperature_boundary = 'left right'
fixed_temperature_boundary = 'top bottom'
temperature_function = '0 1'
[]
[]
[Materials]
[const]
type = GenericConstantMaterial
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
[]
[]
[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_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/stochastic_tools/test/tests/userobjects/inverse_mapping/inverse_map.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmax = 10
[]
[Variables]
[v]
[]
[]
[AuxVariables]
[v_pod]
[]
[v_aux]
[]
[v_aux_pod]
[]
[]
[Kernels]
[diffusion_v]
type = MatDiffusion
variable = v
diffusivity = D_v
[]
[source_v]
type = BodyForce
variable = v
value = 1.0
[]
[]
[AuxKernels]
[func_aux]
type = FunctionAux
variable = v_aux
function = v_aux_func
[]
[]
[Functions]
[v_aux_func]
type = ParsedFunction
expression = 'S * x + D'
symbol_names = 'S D'
symbol_values = '2 5'
[]
[]
[Materials]
[diffusivity_v]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 2.0
[]
[]
[BCs]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 0
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 5
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[UserObjects]
[im]
type = InverseMapping
mapping = pod
surrogate = "polyreg_v polyreg_v_aux"
variable_to_fill = "v_pod v_aux_pod"
variable_to_reconstruct = "v v_aux"
parameters = '2 5'
execute_on = TIMESTEP_END
[]
[]
[Surrogates]
[polyreg_v]
type = PolynomialRegressionSurrogate
filename = "create_mapping_main_rom_polyreg_v.rd"
[]
[polyreg_v_aux]
type = PolynomialRegressionSurrogate
filename = "create_mapping_main_rom_polyreg_v_aux.rd"
[]
[]
[VariableMappings]
[pod]
type = PODMapping
filename = "create_mapping_main_mapping_pod_mapping.rd"
num_modes_to_compute = 2
[]
[]
[Postprocessors]
[error_v]
type = ElementL2Difference
variable = v
other_variable = v_pod
execute_on = FINAL
outputs = csv_errors
[]
[error_v_aux]
type = ElementL2Difference
variable = v_aux
other_variable = v_aux_pod
execute_on = FINAL
outputs = csv_errors
[]
[]
[Outputs]
exodus = true
execute_on = 'FINAL'
[csv_errors]
type = CSV
[]
[]
(modules/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-vel.i)
starting_point = 2e-1
offset = -0.19
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[normal_lm]
block = 3
use_dual = true
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[DynamicTensorMechanics]
displacements = 'disp_x disp_y'
generate_output = 'stress_xx stress_yy'
strain = FINITE
block = '1 2'
zeta = 1.0
alpha = 0.0
[]
[inertia_x]
type = InertialForce
variable = disp_x
velocity = vel_x
acceleration = accel_x
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[inertia_y]
type = InertialForce
variable = disp_y
velocity = vel_y
acceleration = accel_y
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[strain]
type = ComputeFiniteStrain
block = '1 2'
[]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '7750'
[]
[]
[AuxVariables]
[gap_vel]
block = '3'
[]
[vel_x]
block = '1 2'
[]
[accel_x]
block = '1 2'
[]
[vel_y]
block = '1 2'
[]
[accel_y]
block = '1 2'
[]
[vel_z]
block = '1 2'
[]
[accel_z]
block = '1 2'
[]
[]
[AuxKernels]
[gap_vel]
type = WeightedGapVelAux
variable = gap_vel
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
disp_x = disp_x
disp_y = disp_y
correct_edge_dropping = true
execute_on = 'TIMESTEP_END'
[]
[accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = 'linear timestep_end'
[]
[vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = 'linear timestep_end'
[]
[accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = 'linear timestep_end'
[]
[vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = 'linear timestep_end'
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
lm_variable = normal_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeDynamicWeightedGapLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
c = 1e4
capture_tolerance = 1.0e-5
newmark_beta = 0.25
newmark_gamma = 0.5
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 4 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 0.1
dt = 0.05
dtmin = 0.05
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err '
petsc_options_value = 'lu superlu_dist NONZERO 1e-15 1e-5'
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = false
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
checkpoint = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/solid_mechanics/test/tests/dynamics/wave_1D/wave_rayleigh_hht_ti.i)
# Wave propogation in 1D using HHT time integration in the presence of Rayleigh damping
#
# The test is for an 1D bar element of length 4m fixed on one end
# with a sinusoidal pulse dirichlet boundary condition applied to the other end.
# alpha, beta and gamma are HHT time integration parameters
# eta and zeta are mass dependent and stiffness dependent Rayleigh damping
# coefficients, respectively.
# The equation of motion in terms of matrices is:
#
# M*accel + (eta*M+zeta*K)*((1+alpha)*vel-alpha*vel_old)
# +(1+alpha)*K*disp-alpha*K*disp_old = 0
#
# Here M is the mass matrix, K is the stiffness matrix
#
# The displacement at the first, second, third and fourth node at t = 0.1 are
# -7.787499960311491942e-02, 1.955566679096475483e-02 and -4.634888180231294501e-03, respectively.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 4
nz = 1
xmin = 0.0
xmax = 0.1
ymin = 0.0
ymax = 4.0
zmin = 0.0
zmax = 0.1
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[AuxVariables]
[./vel_x]
[../]
[./accel_x]
[../]
[./vel_y]
[../]
[./accel_y]
[../]
[./vel_z]
[../]
[./accel_z]
[../]
[]
[Kernels]
[./DynamicSolidMechanics]
displacements = 'disp_x disp_y disp_z'
hht_alpha = -0.3
stiffness_damping_coefficient = 0.1
[../]
[./inertia_x]
type = InertialForce
variable = disp_x
eta=0.1
alpha = -0.3
[../]
[./inertia_y]
type = InertialForce
variable = disp_y
eta=0.1
alpha = -0.3
[../]
[./inertia_z]
type = InertialForce
variable = disp_z
eta = 0.1
alpha = -0.3
[../]
[]
[AuxKernels]
[./accel_x] # These auxkernels are only to check output
type = TestNewmarkTI
displacement = disp_x
variable = accel_x
first = false
[../]
[./accel_y]
type = TestNewmarkTI
displacement = disp_y
variable = accel_y
first = false
[../]
[./accel_z]
type = TestNewmarkTI
displacement = disp_z
variable = accel_z
first = false
[../]
[./vel_x]
type = TestNewmarkTI
displacement = disp_x
variable = vel_x
[../]
[./vel_y]
type = TestNewmarkTI
displacement = disp_y
variable = vel_y
[../]
[./vel_z]
type = TestNewmarkTI
displacement = disp_z
variable = vel_z
[../]
[]
[BCs]
[./top_y]
type = DirichletBC
variable = disp_y
boundary = top
value=0.0
[../]
[./top_x]
type = DirichletBC
variable = disp_x
boundary = top
value=0.0
[../]
[./top_z]
type = DirichletBC
variable = disp_z
boundary = top
value=0.0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = right
value=0.0
[../]
[./right_z]
type = DirichletBC
variable = disp_z
boundary = right
value=0.0
[../]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = left
value=0.0
[../]
[./left_z]
type = DirichletBC
variable = disp_z
boundary = left
value=0.0
[../]
[./front_x]
type = DirichletBC
variable = disp_x
boundary = front
value=0.0
[../]
[./front_z]
type = DirichletBC
variable = disp_z
boundary = front
value=0.0
[../]
[./back_x]
type = DirichletBC
variable = disp_x
boundary = back
value=0.0
[../]
[./back_z]
type = DirichletBC
variable = disp_z
boundary = back
value=0.0
[../]
[./bottom_x]
type = DirichletBC
variable = disp_x
boundary = bottom
value=0.0
[../]
[./bottom_z]
type = DirichletBC
variable = disp_z
boundary = bottom
value=0.0
[../]
[./bottom_y]
type = FunctionDirichletBC
variable = disp_y
boundary = bottom
function = displacement_bc
[../]
[]
[Materials]
[./Elasticity_tensor]
type = ComputeElasticityTensor
block = 0
fill_method = symmetric_isotropic
C_ijkl = '1 0'
[../]
[./strain]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[../]
[./stress]
type = ComputeLinearElasticStress
block = 0
[../]
[./density]
type = GenericConstantMaterial
block = 0
prop_names = 'density'
prop_values = '1'
[../]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 6.0
l_tol = 1e-12
nl_rel_tol = 1e-12
dt = 0.1
[./TimeIntegrator]
type = NewmarkBeta
beta = 0.422
gamma = 0.8
[../]
[]
[Functions]
[./displacement_bc]
type = PiecewiseLinear
data_file = 'sine_wave.csv'
format = columns
[../]
[]
[Postprocessors]
[./_dt]
type = TimestepSize
[../]
[./disp_1]
type = NodalVariableValue
nodeid = 1
variable = disp_y
[../]
[./disp_2]
type = NodalVariableValue
nodeid = 3
variable = disp_y
[../]
[./disp_3]
type = NodalVariableValue
nodeid = 10
variable = disp_y
[../]
[./disp_4]
type = NodalVariableValue
nodeid = 14
variable = disp_y
[../]
[]
[Outputs]
file_base = 'wave_rayleigh_hht_out'
exodus = true
perf_graph = true
[]
(modules/combined/test/tests/phase_field_fracture/crack2d_iso.i)
#This input uses PhaseField-Nonconserved Action to add phase field fracture bulk rate kernels
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
ymax = 0.5
[]
[./noncrack]
type = BoundingBoxNodeSetGenerator
new_boundary = noncrack
bottom_left = '0.5 0 0'
top_right = '1 0 0'
input = gen
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Modules]
[./PhaseField]
[./Nonconserved]
[./c]
free_energy = F
kappa = kappa_op
mobility = L
[../]
[../]
[../]
[./TensorMechanics]
[./Master]
[./mech]
add_variables = true
strain = SMALL
additional_generate_output = 'stress_yy'
save_in = 'resid_x resid_y'
[../]
[../]
[../]
[]
[AuxVariables]
[./resid_x]
[../]
[./resid_y]
[../]
[]
[Kernels]
[./solid_x]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_x
component = 0
c = c
[../]
[./solid_y]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_y
component = 1
c = c
[../]
[]
[BCs]
[./ydisp]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = 't'
[../]
[./yfix]
type = DirichletBC
variable = disp_y
boundary = noncrack
value = 0
[../]
[./xfix]
type = DirichletBC
variable = disp_x
boundary = top
value = 0
[../]
[]
[Materials]
[./pfbulkmat]
type = GenericConstantMaterial
prop_names = 'gc_prop l visco'
prop_values = '1e-3 0.04 1e-4'
[../]
[./define_mobility]
type = ParsedMaterial
material_property_names = 'gc_prop visco'
property_name = L
expression = '1.0/(gc_prop * visco)'
[../]
[./define_kappa]
type = ParsedMaterial
material_property_names = 'gc_prop l'
property_name = kappa_op
expression = 'gc_prop * l'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '120.0 80.0'
fill_method = symmetric_isotropic
[../]
[./damage_stress]
type = ComputeLinearElasticPFFractureStress
c = c
E_name = 'elastic_energy'
D_name = 'degradation'
F_name = 'local_fracture_energy'
decomposition_type = strain_spectral
[../]
[./degradation]
type = DerivativeParsedMaterial
property_name = degradation
coupled_variables = 'c'
expression = '(1.0-c)^2*(1.0 - eta) + eta'
constant_names = 'eta'
constant_expressions = '0.0'
derivative_order = 2
[../]
[./local_fracture_energy]
type = DerivativeParsedMaterial
property_name = local_fracture_energy
coupled_variables = 'c'
material_property_names = 'gc_prop l'
expression = 'c^2 * gc_prop / 2 / l'
derivative_order = 2
[../]
[./fracture_driving_energy]
type = DerivativeSumMaterial
coupled_variables = c
sum_materials = 'elastic_energy local_fracture_energy'
derivative_order = 2
property_name = F
[../]
[]
[Postprocessors]
[./resid_x]
type = NodalSum
variable = resid_x
boundary = 2
[../]
[./resid_y]
type = NodalSum
variable = resid_y
boundary = 2
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
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'
nl_rel_tol = 1e-8
l_max_its = 10
nl_max_its = 10
dt = 1e-4
dtmin = 1e-4
num_steps = 2
[]
[Outputs]
exodus = true
[]
(modules/chemical_reactions/test/tests/exceptions/missing_sto.i)
# Missing stoichiometric coefficient in AqueousEquilibriumRxnAux AuxKernel
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Variables]
[./a]
[../]
[./b]
[../]
[]
[AuxVariables]
[./c]
[../]
[./gamma_a]
[../]
[./gamma_b]
[../]
[]
[AuxKernels]
[./c]
type = AqueousEquilibriumRxnAux
variable = c
v = 'a b'
gamma_v = 'gamma_a gamma_b'
sto_v = 1
log_k = 1
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./a_diff]
type = PrimaryDiffusion
variable = a
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = porosity
prop_values = 0.2
[../]
[]
[Executioner]
type = Transient
end_time = 1
[]
(modules/phase_field/test/tests/actions/gpm_kernel.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmin = 0
xmax = 300
[]
[GlobalParams]
op_num = 1
var_name_base = eta
[]
[Variables]
[./w]
[../]
[./phi]
[../]
[./eta0]
[../]
[]
[AuxVariables]
[./bnds]
[../]
[]
[ICs]
[./IC_w]
type = BoundingBoxIC
variable = w
x1 = 150
x2 = 300
y1 = 0
y2 = 0
inside = 0.1
outside = 0
[../]
[./IC_phi]
type = BoundingBoxIC
variable = phi
x1 = 0
x2 = 150
y1 = 0
y2 = 0
inside = 1
outside = 0
[../]
[./IC_eta0]
type = BoundingBoxIC
variable = eta0
x1 = 150
x2 = 300
y1 = 0
y2 = 0
inside = 1
outside = 0
[../]
[]
[AuxKernels]
[./bnds_aux]
type = BndsCalcAux
variable = bnds
[../]
[]
[Modules]
[./PhaseField]
[./GrandPotential]
switching_function_names = 'hb hm'
chemical_potentials = 'w'
anisotropic = 'false'
mobilities = 'chiD'
susceptibilities = 'chi'
free_energies_w = 'rhob rhom'
gamma_gr = gamma
mobility_name_gr = L
kappa_gr = kappa
free_energies_gr = 'omegab omegam'
additional_ops = 'phi'
gamma_grxop = gamma
mobility_name_op = L_phi
kappa_op = kappa
free_energies_op = 'omegab omegam'
[../]
[../]
[]
[Materials]
#REFERENCES
[./constants]
type = GenericConstantMaterial
prop_names = 'Va cb_eq cm_eq kb km mu gamma L L_phi kappa kB'
prop_values = '0.04092 1.0 1e-5 1400 140 1.5 1.5 5.3e+3 2.3e+4 295.85 8.6173324e-5'
[../]
#SWITCHING FUNCTIONS
[./switchb]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'phi eta0'
phase_etas = 'phi'
[../]
[./switchm]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hm
all_etas = 'phi eta0'
phase_etas = 'eta0'
[../]
[./omegab]
type = DerivativeParsedMaterial
property_name = omegab
coupled_variables = 'w phi'
material_property_names = 'Va kb cb_eq'
expression = '-0.5*w^2/Va^2/kb - w/Va*cb_eq'
derivative_order = 2
[../]
[./omegam]
type = DerivativeParsedMaterial
property_name = omegam
coupled_variables = 'w eta0'
material_property_names = 'Va km cm_eq'
expression = '-0.5*w^2/Va^2/km - w/Va*cm_eq'
derivative_order = 2
[../]
[./chi]
type = DerivativeParsedMaterial
property_name = chi
coupled_variables = 'w'
material_property_names = 'Va hb hm kb km'
expression = '(hm/km + hb/kb)/Va^2'
derivative_order = 2
[../]
#DENSITIES/CONCENTRATION
[./rhob]
type = DerivativeParsedMaterial
property_name = rhob
coupled_variables = 'w'
material_property_names = 'Va kb cb_eq'
expression = 'w/Va^2/kb + cb_eq/Va'
derivative_order = 1
[../]
[./rhom]
type = DerivativeParsedMaterial
property_name = rhom
coupled_variables = 'w eta0'
material_property_names = 'Va km cm_eq(eta0)'
expression = 'w/Va^2/km + cm_eq/Va'
derivative_order = 1
[../]
[./concentration]
type = ParsedMaterial
property_name = c
material_property_names = 'rhom hm rhob hb Va'
expression = 'Va*(hm*rhom + hb*rhob)'
outputs = exodus
[../]
[./mobility]
type = DerivativeParsedMaterial
material_property_names = 'chi kB'
constant_names = 'T Em D0'
constant_expressions = '1400 2.4 1.25e2'
property_name = chiD
expression = 'chi*D0*exp(-Em/kB/T)'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type -sub_pc_type -pc_asm_overlap -ksp_gmres_restart -sub_ksp_type'
petsc_options_value = ' asm lu 1 31 preonly'
nl_max_its = 20
l_max_its = 30
l_tol = 1e-4
nl_rel_tol = 1e-7
nl_abs_tol = 1e-7
start_time = 0
dt = 2e-5
num_steps = 3
[]
[Outputs]
exodus = true
[]
(tutorials/darcy_thermo_mech/step05_heat_conduction/problems/step5b_transient.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmax = 0.304 # Length of test chamber
ymax = 0.0257 # Test chamber radius
[]
coord_type = RZ
rz_coord_axis = X
[]
[Variables]
[temperature]
initial_condition = 300 # Start at room temperature
[]
[]
[Kernels]
[heat_conduction]
type = ADHeatConduction
variable = temperature
[]
[heat_conduction_time_derivative]
type = ADHeatConductionTimeDerivative
variable = temperature
[]
[]
[BCs]
[inlet_temperature]
type = DirichletBC
variable = temperature
boundary = left
value = 350 # (K)
[]
[outlet_temperature]
type = DirichletBC
variable = temperature
boundary = right
value = 300 # (K)
[]
[]
[Materials]
[steel]
type = ADGenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '18 0.466 8000' # W/m*K, J/kg-K, kg/m^3 @ 296K
[]
[]
[Problem]
type = FEProblem
[]
[Executioner]
type = Transient
num_steps = 10
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(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/xfem/test/tests/moving_interface/verification/1D_rz_lsdep1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: quasi-1D
# Coordinate System: rz
# Material Numbers/Types: level set dep 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description:
# A simple transient heat transfer problem in cylindrical coordinates designed
# with the Method of Manufactured Solutions. This problem was developed to
# verify XFEM performance in the presence of a moving interface for linear
# element models that can be exactly evaluated by FEM/Moose. Both the
# temperature solution and level set function are designed to be linear to
# attempt to minimize error between the Moose/exact solution and XFEM results.
# Thermal conductivity is dependent upon the value of the level set function
# at each timestep.
# Results:
# The temperature at the left boundary (x=1) exhibits the largest difference
# between the FEM/Moose solution and XFEM results. We present the XFEM
# results at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 480.0008131
# 0.6 520 520.0038333
# 0.8 560 560.0088286
# 1.0 600 600.0131612
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Problem]
coord_type = RZ
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 1
xmin = 1.0
xmax = 2.0
ymin = 0.0
ymax = 0.5
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraint]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = '10*(-200*x+400) + (1/x)*(310*t - (10/1.02)*x*t - (1/1.02)*t^2)'
[../]
[./neumann_func]
type = ParsedFunction
expression = '((0.05/2.04)*(2.04-x-0.2*t) + 1.5)*200*t'
[../]
[./k_func]
type = ParsedFunction
expression = '(0.05/2.04)*(2.04-x-0.2*t) + 1.5'
[../]
[./ls_func]
type = ParsedFunction
expression = '2.04 - x -0.2*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericFunctionMaterial
prop_names = 'diffusion_coefficient'
prop_values = 'k_func'
[../]
[]
[BCs]
[./left_u]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 'right'
value = 400
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(test/tests/kernels/simple_transient_diffusion/ill_conditioned_simple_diffusion.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 2
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = MatDiffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
preset = false
boundary = left
value = 0
[../]
[./right]
type = FunctionDirichletBC
variable = u
preset = false
boundary = right
function = constant
[../]
[]
[Functions]
[constant]
type = ParsedFunction
expression = '1'
[]
[ramp]
type = ParsedFunction
expression = 't'
[]
[]
[Materials]
active = 'constant'
[constant]
type = GenericConstantMaterial
prop_names = 'D'
prop_values = '1e20'
[]
[function]
type = GenericFunctionMaterial
prop_names = 'D'
prop_values = '10^(t-1)'
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 2
dtmin = 2
solve_type = NEWTON
petsc_options = '-pc_svd_monitor -ksp_view_pmat -snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -snes_stol'
petsc_options_value = 'svd 0'
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_by_parts_traction_steady_stabilized.i)
# This input file tests several different things:
# .) The axisymmetric (RZ) form of the governing equations.
# .) An open boundary.
# .) Not integrating the pressure by parts, thereby requiring a pressure pin.
# .) Natural boundary condition at the outlet.
[GlobalParams]
integrate_p_by_parts = true
laplace = false
gravity = '0 0 0'
supg = true
pspg = true
order = FIRST
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
# Jacobian doesn't appear to be correct for RZ traction form
solve_type = PJFNK
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Variables]
[./vel_x]
# Velocity in radial (r) direction
[../]
[./vel_y]
# Velocity in axial (z) direction
[../]
[./p]
[../]
[]
[BCs]
[./u_in]
type = DirichletBC
boundary = bottom
variable = vel_x
value = 0
[../]
[./v_in]
type = FunctionDirichletBC
boundary = bottom
variable = vel_y
function = 'inlet_func'
[../]
[./u_axis_and_walls]
type = DirichletBC
boundary = 'left right'
variable = vel_x
value = 0
[../]
[./v_no_slip]
type = DirichletBC
boundary = 'right'
variable = vel_y
value = 0
[../]
[]
[Kernels]
[./mass]
type = INSMassRZ
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
[./x_momentum_space]
type = INSMomentumTractionFormRZ
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./y_momentum_space]
type = INSMomentumTractionFormRZ
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 'volume'
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[../]
[]
(modules/optimization/test/tests/outputs/exodus_optimization_steady/forward_and_adjoint_iteration_output.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmax = 1
ymax = 1.4
[]
[]
[Problem]
nl_sys_names = 'nl0 adjoint'
kernel_coverage_check = false
[]
[Variables]
[temperature]
[]
[temperature_adjoint]
nl_sys = adjoint
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = thermal_conductivity
[]
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = temperature
x_coord_name = 'point_source/x'
y_coord_name = 'point_source/y'
z_coord_name = 'point_source/z'
value_name = 'point_source/value'
[]
[misfit]
type = ReporterPointSource
variable = temperature_adjoint
x_coord_name = measure_data/measurement_xcoord
y_coord_name = measure_data/measurement_ycoord
z_coord_name = measure_data/measurement_zcoord
value_name = measure_data/misfit_values
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temperature
boundary = left
value = 300
[]
[right]
type = DirichletBC
variable = temperature
boundary = right
value = 300
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 300
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 300
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = SteadyAndAdjoint
forward_system = nl0
adjoint_system = adjoint
nl_rel_tol = 1e-12
l_tol = 1e-12
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[VectorPostprocessors]
[gradient]
type = PointValueSampler
points = '0.2 0.2 0
0.7 0.56 0
0.4 1 0'
variable = temperature_adjoint
sort_by = id
execute_on = ADJOINT_TIMESTEP_END
[]
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
[]
[point_source]
type = ConstantReporter
real_vector_names = 'x y z value'
real_vector_values = '0.2 0.7 0.4;
0.2 0.56 1;
'
' 0 0 0;
-1000 120 500'
[]
[]
[Outputs]
console = false
[exodus]
type = ExodusOptimizationSteady
execute_on = 'TIMESTEP_END'
[]
[]
(modules/phase_field/test/tests/MultiPhase/switchingfunctionmultiphasematerial.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
xmin = 0
xmax = 30
ymin = 0
ymax = 30
[]
[Variables]
[./c]
[../]
[./w]
[../]
[./eta1]
[../]
[./eta2]
[../]
[./eta3]
[../]
[./eta0]
[../]
[]
[ICs]
[./IC_eta2]
x1 = 0
y1 = 15
x2 = 30
y2 = 30
inside = 1.0
outside = 0.0
type = BoundingBoxIC
variable = eta2
int_width = 0
[../]
[./IC_eta3]
x1 = 15
y1 = 0
x2 = 30
y2 = 15
inside = 1.0
outside = 0.0
type = BoundingBoxIC
variable = eta3
int_width = 0
[../]
[./IC_eta4]
x1 = 0
y1 = 0
x2 = 15
y2 = 15
inside = 1.0
outside = 0.0
type = BoundingBoxIC
variable = eta0
int_width = 0
[../]
[./IC_c]
x1 = 15
y1 = 15
radius = 8.0
outvalue = 0.05
variable = c
invalue = 1.0
type = SmoothCircleIC
int_width = 3.0
[../]
[./IC_eta1]
x1 = 15
y1 = 15
radius = 8.0
outvalue = 0.0
variable = eta1
invalue = 1.0
type = SmoothCircleIC
int_width = 3.0
[../]
[]
# Not evalulating time evolution to improve test performance, since we are only testing
# the material property. However, the kernel and free energy are left in place to allow
# this test to be easily turned in to a working example
#[Kernels]
# [./c_dot]
# type = CoupledTimeDerivative
# variable = w
# v = c
# [../]
# [./c_res]
# type = SplitCHParsed
# variable = c
# f_name = F
# kappa_name = kappa_c
# w = w
# coupled_variables = 'eta1 eta2 eta3 eta0'
# [../]
# [./w_res]
# # coupled_variables = 'c'
# type = SplitCHWRes
# variable = w
# mob_name = M
# [../]
# [./AC1_bulk]
# type = AllenCahn
# variable = eta1
# f_name = F
# coupled_variables = 'c eta2 eta3 eta0'
# [../]
# [./AC1_int]
# type = ACInterface
# variable = eta1
# kappa_name = kappa_s
# [../]
# [./e1_dot]
# type = TimeDerivative
# variable = eta1
# [../]
# [./AC2_bulk]
# type = AllenCahn
# variable = eta2
# f_name = F
# coupled_variables = 'c eta1 eta3 eta0'
# [../]
# [./AC2_int]
# type = ACInterface
# variable = eta2
# [../]
# [./e2_dot]
# type = TimeDerivative
# variable = eta2
# [../]
# [./AC3_bulk]
# type = AllenCahn
# variable = eta3
# f_name = F
# coupled_variables = 'c eta2 eta1 eta0'
# [../]
# [./AC3_int]
# type = ACInterface
# variable = eta3
# [../]
# [./e3_dot]
# type = TimeDerivative
# variable = eta3
# [../]
# [./AC4_bulk]
# type = AllenCahn
# variable = eta0
# f_name = F
# coupled_variables = 'c eta2 eta3 eta1'
# [../]
# [./AC4_int]
# type = ACInterface
# variable = eta0
# [../]
# [./e4_dot]
# type = TimeDerivative
# variable = eta0
# [../]
#[]
[Materials]
[./ha_test]
type = SwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'eta0 eta1 eta2 eta3'
phase_etas = 'eta1'
outputs = exodus
[../]
[./hb_test]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'eta0 eta1 eta2 eta3'
phase_etas = 'eta0 eta2 eta3'
outputs = exodus
[../]
#[./ha]
# type = DerivativeParsedMaterial
# coupled_variables = 'eta1 eta2 eta3 eta0'
# property_name = ha_parsed
# expression = 'eta1^2/(eta1^2+eta2^2+eta3^2+eta0^2)'
# derivative_order = 2
# outputs = exodus
#[../]
#[./hb]
# type = DerivativeParsedMaterial
# coupled_variables = 'eta1 eta2 eta3 eta0'
# property_name = hb_parsed
# expression = '(eta2^2+eta3^2+eta0^2)/(eta1^2+eta2^2+eta3^2+eta0^2)'
# derivative_order = 2
# outputs = exodus
#[../]
#[./FreeEng]
# type = DerivativeParsedMaterial
# coupled_variables = 'c eta1 eta2 eta3 eta0'
# property_name = F
# constant_names = 'c1 c2 s g d e h z'
# constant_expressions = '1.0 0.0 1.5 1.5 1.0 1.0 1 1.0'
# material_property_names = 'ha(eta1,eta2,eta3,eta0) hb(eta1,eta2,eta3,eta0)'
# expression = 'a:=eta1^2/(eta1^2+eta2^2+eta3^2+eta0^2);f1:=ha*(c-c1)^2;b:=(eta2^2+eta3^2+eta0^2)/(eta1^2+eta2^2+eta3^2+eta0^2);f2:=hb*(c-c2)^2
# ;f3:=1/4*eta1^4-1/2*eta1^2+1/4*eta2^4-1/2*eta2^2+1/4*eta3^4-1/2*eta3^2+1/4*eta0^4-1/2*eta0^2
# ;f4:=z*s*(eta1^2*eta2^2+eta1^2*eta3^2+eta1^2*eta0^2)+g*(eta2^2*eta3^2+eta2^2*eta0^2+eta3^2*eta0^2);f:=1/4+e*f1+d*f2+h*(f3+f4);f'
# derivative_order = 2
#[../]
[./const]
type = GenericConstantMaterial
prop_names = 'kappa_c kappa_s kappa_op L M'
prop_values = '0 3 3 1.0 1.0'
outputs = exodus
[../]
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Problem]
solve = false
kernel_coverage_check = false
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_action_stabilized_steady.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[]
[Modules]
[IncompressibleNavierStokes]
equation_type = steady-state
velocity_boundary = 'bottom right top left'
velocity_function = '0 0 0 0 lid_function 0 0 0'
initial_velocity = '1e-15 1e-15 0'
add_standard_velocity_variables_for_ad = false
pressure_pinned_node = 0
density_name = rho
dynamic_viscosity_name = mu
use_ad = true
laplace = true
family = LAGRANGE
order = FIRST
add_temperature_equation = true
fixed_temperature_boundary = 'bottom top'
temperature_function = '1 0'
supg = true
pspg = true
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
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
[]
[]
[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/controls/output/controllable.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
elem_type = QUAD4
uniform_refine = 4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.1
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 3
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[DiracKernels]
[./test_object]
type = MaterialPointSource
point = '0.5 0.5 0'
variable = u
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'matp'
prop_values = '1'
block = 0
[../]
[]
[Postprocessors]
[./test_object]
type = FunctionValuePostprocessor
function = '2*(x+y)'
point = '0.5 0.5 0'
[../]
[./other_point_test_object]
type = FunctionValuePostprocessor
function = '3*(x+y)'
point = '0.5 0.5 0'
[../]
[]
[Outputs]
[./controls]
type = ControlOutput
clear_after_output = false
[../]
[]
[Controls]
[./point_control]
type = TestControl
test_type = 'point'
parameter = '*/*/point'
execute_on = 'initial'
[../]
[]
(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/phase_field/examples/nucleation/refine.i)
#
# Example derived from cahn_hilliard.i demonstrating the use of Adaptivity
# with the DiscreteNucleation system. The DiscreteNucleationMarker triggers
# mesh refinement for the nucleus geometry. It is up to the user to specify
# refinement for the physics. In this example this is done using a GradientJumpIndicator
# with a ValueThresholdMarker. The nucleation system marker and the physics marker
# must be combined using a ComboMarker to combine their effect.
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 500
ymax = 500
elem_type = QUAD
[]
[Modules]
[./PhaseField]
[./Conserved]
[./c]
free_energy = F
mobility = M
kappa = kappa_c
solve_type = REVERSE_SPLIT
[../]
[../]
[../]
[]
[ICs]
[./c_IC]
type = ConstantIC
variable = c
value = 0.2
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1 25'
[../]
[./chemical_free_energy]
# simple double well free energy
type = DerivativeParsedMaterial
property_name = Fc
coupled_variables = 'c'
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 0'
expression = 16*barr_height*c^2*(1-c)^2 # +0.01*(c*plog(c,0.005)+(1-c)*plog(1-c,0.005))
derivative_order = 2
outputs = exodus
[../]
[./probability]
# This is a made up toy nucleation rate it should be replaced by
# classical nucleation theory in a real simulation.
type = ParsedMaterial
property_name = P
coupled_variables = c
expression = 'if(c<0.21,c*1e-8,0)'
outputs = exodus
[../]
[./nucleation]
# The nucleation material is configured to insert nuclei into the free energy
# tht force the concentration to go to 0.95, and holds this enforcement for 500
# time units.
type = DiscreteNucleation
property_name = Fn
op_names = c
op_values = 0.90
penalty = 5
penalty_mode = MIN
map = map
outputs = exodus
[../]
[./free_energy]
# add the chemical and nucleation free energy contributions together
type = DerivativeSumMaterial
derivative_order = 2
coupled_variables = c
sum_materials = 'Fc Fn'
[../]
[]
[UserObjects]
[./inserter]
# The inserter runs at the end of each time step to add nucleation events
# that happened during the timestep (if it converged) to the list of nuclei
type = DiscreteNucleationInserter
hold_time = 50
probability = P
radius = 10
[../]
[./map]
# The map UO runs at the beginning of a timestep and generates a per-element/qp
# map of nucleus locations. The map is only regenerated if the mesh changed or
# the list of nuclei was modified.
# The map converts the nucleation points into finite area objects with a given radius.
type = DiscreteNucleationMap
periodic = c
inserter = inserter
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Postprocessors]
[./dt]
type = TimestepSize
[../]
[./ndof]
type = NumDOFs
[../]
[./rate]
type = DiscreteNucleationData
value = RATE
inserter = inserter
[../]
[./dtnuc]
type = DiscreteNucleationTimeStep
inserter = inserter
p2nucleus = 0.0005
dt_max = 10
[../]
[./update]
type = DiscreteNucleationData
value = UPDATE
inserter = inserter
[../]
[./count]
type = DiscreteNucleationData
value = COUNT
inserter = inserter
[../]
[]
[Adaptivity]
[./Indicators]
[./jump]
type = GradientJumpIndicator
variable = c
[../]
[../]
[./Markers]
[./nuc]
type = DiscreteNucleationMarker
map = map
[../]
[./grad]
type = ValueThresholdMarker
variable = jump
coarsen = 0.1
refine = 0.2
[../]
[./combo]
type = ComboMarker
markers = 'nuc grad'
[../]
[../]
marker = combo
cycles_per_step = 3
recompute_markers_during_cycles = true
max_h_level = 3
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu '
nl_max_its = 20
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-10
start_time = 0.0
num_steps = 120
[./TimeStepper]
type = IterationAdaptiveDT
dt = 10
growth_factor = 1.5
cutback_factor = 0.5
optimal_iterations = 8
iteration_window = 2
timestep_limiting_postprocessor = dtnuc
[../]
[]
[Outputs]
exodus = true
csv = true
print_linear_residuals = false
[]
(modules/heat_transfer/test/tests/heat_conduction_ortho/heat_conduction_ortho.i)
#
# Three independent cubes are thermally loaded, one in x, one in y, and one in z.
# Each direction has a different thermal conductivity, resulting in a different
# temperature at the side with the Neumann bc.
#
# For x: 100/1000 = 1e-1
# For y: 100/100 = 1e+0
# for z: 100/10 = 1e+1
#
[Mesh]
file = heat_conduction_ortho.e
[]
[Variables]
[./temperature]
[../]
[]
[Kernels]
[./heat]
type = AnisoHeatConduction
variable = temperature
[../]
[]
[BCs]
[./temperatures]
type = DirichletBC
variable = temperature
boundary = 1
value = 0
[../]
[./neum]
type = NeumannBC
variable = temperature
boundary = 2
value = 100
[../]
[]
[Materials]
[./heat]
type = AnisoHeatConductionMaterial
block = 1
specific_heat = 0.116
thermal_conductivity = '10.0 0 0 0 10.0 0 0 0 10.0'
temperature = temperature
[../]
[./density]
type = GenericConstantMaterial
block = 1
prop_names = 'density'
prop_values = 0.283
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -ksp_gmres_restart'
petsc_options_value = 'lu 101'
line_search = 'none'
nl_abs_tol = 1e-11
nl_rel_tol = 1e-10
l_max_its = 20
[]
[Outputs]
exodus = true
hide = 'tcx tcy tcz'
[]
[Postprocessors]
[./tcx]
type = FunctionValuePostprocessor
function = 1000
outputs = none
execute_on = 'initial timestep_end'
[../]
[./tcy]
type = FunctionValuePostprocessor
function = 100
outputs = none
execute_on = 'initial timestep_end'
[../]
[./tcz]
type = FunctionValuePostprocessor
function = 10
outputs = none
execute_on = 'initial timestep_end'
[../]
[]
(test/tests/materials/material/adv_mat_couple_test2.i)
[Mesh]
file = rectangle.e
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff body_force'
[./diff]
type = Diffusion
variable = u
[../]
[./body_force]
type = BodyForce
variable = u
block = 1
value = 10
[../]
[]
[BCs]
active = 'right'
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Materials]
[./mat_3]
type = GenericConstantMaterial
prop_names = 'prop3'
prop_values = '300'
block = '1 2'
[../]
[./mat_2]
type = CoupledMaterial
mat_prop = 'prop2'
coupled_mat_prop = 'prop3'
block = '1 2'
[../]
[./mat_1]
type = CoupledMaterial2
mat_prop = 'prop1'
coupled_mat_prop1 = 'prop2'
coupled_mat_prop2 = 'prop3'
block = '1 2'
[../]
[]
[Executioner]
type = Steady
# solve_type = 'PJFNK'
# preconditioner = 'ILU'
solve_type = 'PJFNK'
# petsc_options_iname = '-pc_type -pc_hypre_type'
# petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
file_base = out_adv_coupled2
exodus = true
[]
(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/thermal_hydraulics/test/tests/materials/ad_wall_heat_transfer_coefficient_gnielinski/gnielinski_test.i)
#Helium properties at 7.0 MPa and 1073 K
rho = 3.1176
vel = 1
k = 0.38220
mu = 4.8587e-05
cp = 5189.8
T = 1073
T_wall = 1074
D_h = 1
[GlobalParams]
execute_on = 'initial'
[]
[Problem]
solve = false
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
allow_renumbering = false
[]
[AuxVariables]
[Hw]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[Hw_ak]
type = ADMaterialRealAux
variable = Hw
property = Hw
[]
[]
[Materials]
[props]
type = ADGenericConstantMaterial
prop_names = 'rho vel k mu cp T T_wall D_h'
prop_values = '${rho} ${vel} ${k} ${mu} ${cp} ${T} ${T_wall} ${D_h}'
[]
[Hw_material]
type = ADWallHeatTransferCoefficientGnielinskiMaterial
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[Hw]
type = ElementalVariableValue
elementid = 0
variable = Hw
[]
[]
[Outputs]
csv = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_stabilized.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 64
ny = 64
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[AuxVariables]
[vel_x]
[]
[vel_y]
[]
[]
[AuxKernels]
[vel_x]
type = VectorVariableComponentAux
variable = vel_x
vector_variable = velocity
component = 'x'
[]
[vel_y]
type = VectorVariableComponentAux
variable = vel_y
vector_variable = velocity
component = 'y'
[]
[]
[Variables]
[./velocity]
family = LAGRANGE_VEC
[../]
[./p]
[../]
[]
[ICs]
[velocity]
type = VectorConstantIC
x_value = 0
y_value = 0
variable = velocity
[]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[./mass_pspg]
type = INSADMassPSPG
variable = p
[../]
[./momentum_convection]
type = INSADMomentumAdvection
variable = velocity
[../]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
[../]
[./momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[../]
[]
[BCs]
[./no_slip]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom right left'
[../]
[./lid]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'top'
function_x = 'lid_function'
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[ins_mat]
type = INSADTauMaterial
velocity = velocity
pressure = p
alpha = .1
[]
[]
[Functions]
[./lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
exodus = true
file_base = lid_driven_stabilized_out
[]
[Postprocessors]
[lin]
type = NumLinearIterations
[]
[nl]
type = NumNonlinearIterations
[]
[lin_tot]
type = CumulativeValuePostprocessor
postprocessor = 'lin'
[]
[nl_tot]
type = CumulativeValuePostprocessor
postprocessor = 'nl'
[]
[]
(modules/optimization/test/tests/optimizationreporter/bc_load_linearFunction/homogeneous_forward.i)
[Mesh]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = thermal_conductivity
[]
[]
[BCs]
[left]
type = FunctionNeumannBC
variable = temperature
boundary = left
function = left_function
[]
[right]
type = FunctionNeumannBC
variable = temperature
boundary = right
function = right_function
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 0
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 0
[]
[]
[Functions]
[left_function]
type = ParsedOptimizationFunction
expression = 'a + b*y'
param_symbol_names = 'a b'
param_vector_name = 'params_left/vals'
[]
[right_function]
type = ParsedOptimizationFunction
expression = 'a'
param_symbol_names = 'a'
param_vector_name = 'params_right/vals'
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = Steady
line_search = none
solve_type = NEWTON
nl_abs_tol = 1e-8
nl_rel_tol = 1e-8
petsc_options_iname = '-ksp_type -pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'preonly lu superlu_dist'
[]
[VectorPostprocessors]
[vertical_1]
type = LineValueSampler
variable = 'temperature'
start_point = '0.2 0.0 0'
end_point = '0.2 2.0 0'
num_points = 21
sort_by = y
[]
[vertical_2]
type = LineValueSampler
variable = 'temperature'
start_point = '0.8 0.0 0'
end_point = '0.8 2.0 0'
num_points = 21
sort_by = y
[]
[]
[Reporters]
[measure_data]
type = OptimizationData
variable_weight_names = weightForTemperature
variable = temperature
[]
[params_left]
type = ConstantReporter
real_vector_names = 'vals'
real_vector_values = '0 0' # Dummy
[]
[params_right]
type = ConstantReporter
real_vector_names = 'vals'
real_vector_values = '0' # Dummy
[]
[]
[Outputs]
console = false
exodus = false
file_base = 'homogenous'
[]
(modules/navier_stokes/test/tests/finite_element/ins/rz-x-axial-coord/pipe-flow.i)
mu=1
rho=1
pipe_length=10 # m
pipe_radius=1 # m
u_inlet=1
[GlobalParams]
integrate_p_by_parts = false
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = ${pipe_length}
ymin = 0
ymax = ${pipe_radius}
nx = 50
ny = 5
[]
coord_type = 'RZ'
rz_coord_axis = x
[]
[Variables]
[velocity]
family = LAGRANGE_VEC
[]
[p][]
[]
[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
[]
[momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[]
[]
[Functions]
[vel_x_inlet]
type = ParsedFunction
expression = '${u_inlet} * (${pipe_radius}^2 - y^2)'
[]
[]
[BCs]
[inlet]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'left'
function_x = vel_x_inlet
function_y = 0
[../]
[wall]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'top'
function_x = 0
function_y = 0
[]
[axis]
type = ADVectorFunctionDirichletBC
variable = velocity
boundary = 'bottom'
set_x_comp = false
function_y = 0
[]
# pressure is not integrated by parts so we cannot remove the nullspace through a natural condition
[p_corner]
type = DirichletBC
boundary = 'right'
value = 0
variable = p
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[ins_mat]
type = INSADTauMaterial
velocity = velocity
pressure = p
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
line_search = 'none'
[]
[Outputs]
exodus = true
[]
(modules/optimization/test/tests/optimizationreporter/point_loads/forward.i)
# DO NOT CHANGE THIS TEST
# this test is documented as an example in forceInv_pointLoads.md
# if this test is changed, the figures will need to be updated.
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmax = 1
ymax = 1.4
[]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = thermal_conductivity
[]
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = temperature
x_coord_name = 'point_source/x'
y_coord_name = 'point_source/y'
z_coord_name = 'point_source/z'
value_name = 'point_source/value'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temperature
boundary = left
value = 300
[]
[right]
type = DirichletBC
variable = temperature
boundary = right
value = 300
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 300
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 300
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-6
nl_rel_tol = 1e-8
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[VectorPostprocessors]
[point_source]
type = ConstantVectorPostprocessor
vector_names = 'x y z value'
value = '0.2 0.7 0.4;
0.2 0.56 1;
0 0 0;
-1000 120 500'
execute_on = LINEAR
[]
[vertical]
type = LineValueSampler
variable = 'temperature'
start_point = '0.5 0 0'
end_point = '0.5 1.4 0'
num_points = 21
sort_by = y
[]
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
[]
[]
[Outputs]
console = false
file_base = 'forward'
[]
(modules/optimization/test/tests/optimizationreporter/general_opt/point_loads_gen_opt/forward_and_adjoint.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmax = 1
ymax = 1.4
[]
[]
[Problem]
nl_sys_names = 'nl0 adjoint'
kernel_coverage_check = false
[]
[Variables]
[temperature]
[]
[temperature_adjoint]
nl_sys = adjoint
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = thermal_conductivity
[]
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = temperature
x_coord_name = 'point_source/x'
y_coord_name = 'point_source/y'
z_coord_name = 'point_source/z'
value_name = 'point_source/value'
[]
[misfit]
type = ReporterPointSource
variable = temperature_adjoint
x_coord_name = measure_data/measurement_xcoord
y_coord_name = measure_data/measurement_ycoord
z_coord_name = measure_data/measurement_zcoord
value_name = measure_data/misfit_values
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temperature
boundary = left
value = 300
[]
[right]
type = DirichletBC
variable = temperature
boundary = right
value = 300
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 300
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 300
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = SteadyAndAdjoint
forward_system = nl0
adjoint_system = adjoint
nl_rel_tol = 1e-12
l_tol = 1e-12
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[VectorPostprocessors]
[gradient]
type = PointValueSampler
points = '0.2 0.2 0
0.7 0.56 0
0.4 1 0'
variable = temperature_adjoint
sort_by = id
execute_on = ADJOINT_TIMESTEP_END
[]
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
measurement_points = '0.5 0.28 0
0.5 0.6 0
0.5 0.8 0
0.5 1.1 0'
measurement_values = '293 304 315 320'
objective_name = misfit_norm
[]
[point_source]
type = ConstantReporter
real_vector_names = 'x y z value'
real_vector_values = '0.2 0.7 0.4;
0.2 0.56 1;
0 0 0;
-1000 120 500'
[]
[]
[Outputs]
console = false
[]
(modules/combined/test/tests/surface_tension_KKS/surface_tension_KKS.i)
#
# KKS coupled with elasticity. Physical parameters for matrix and precipitate phases
# are gamma and gamma-prime phases, respectively, in the Ni-Al system.
# Parameterization is as described in L.K. Aagesen et al., Computational Materials
# Science, 140, 10-21 (2017), with isotropic elastic properties in both phases
# and without eigenstrain.
#
[Mesh]
type = GeneratedMesh
dim = 1
nx = 200
xmax = 200
[]
[Problem]
coord_type = RSPHERICAL
[]
[GlobalParams]
displacements = 'disp_x'
[]
[Variables]
# order parameter
[./eta]
order = FIRST
family = LAGRANGE
[../]
# solute concentration
[./c]
order = FIRST
family = LAGRANGE
[../]
# chemical potential
[./w]
order = FIRST
family = LAGRANGE
[../]
# solute phase concentration (matrix)
[./cm]
order = FIRST
family = LAGRANGE
initial_condition = 0.13
[../]
# solute phase concentration (precipitate)
[./cp]
order = FIRST
family = LAGRANGE
initial_condition = 0.235
[../]
[]
[AuxVariables]
[./energy_density]
family = MONOMIAL
[../]
[./extra_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./extra_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./extra_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_zz]
order = CONSTANT
family = MONOMIAL
[../]
[]
[ICs]
[./eta_ic]
variable = eta
type = FunctionIC
function = ic_func_eta
[../]
[./c_ic]
variable = c
type = FunctionIC
function = ic_func_c
[../]
[]
[Functions]
[./ic_func_eta]
type = ParsedFunction
expression = 'r:=sqrt(x^2+y^2+z^2);0.5*(1.0-tanh((r-r0)/delta_eta/sqrt(2.0)))'
symbol_names = 'delta_eta r0'
symbol_values = '6.431 100'
[../]
[./ic_func_c]
type = ParsedFunction
expression = 'r:=sqrt(x^2+y^2+z^2);eta_an:=0.5*(1.0-tanh((r-r0)/delta/sqrt(2.0)));0.235*eta_an^3*(6*eta_an^2-15*eta_an+10)+0.13*(1-eta_an^3*(6*eta_an^2-15*eta_an+10))'
symbol_names = 'delta r0'
symbol_values = '6.431 100'
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
add_variables = true
generate_output = 'hydrostatic_stress stress_xx stress_yy stress_zz'
[../]
[]
[Kernels]
# enforce c = (1-h(eta))*cm + h(eta)*cp
[./PhaseConc]
type = KKSPhaseConcentration
ca = cm
variable = cp
c = c
eta = eta
[../]
# enforce pointwise equality of chemical potentials
[./ChemPotVacancies]
type = KKSPhaseChemicalPotential
variable = cm
cb = cp
fa_name = f_total_matrix
fb_name = f_total_ppt
[../]
#
# Cahn-Hilliard Equation
#
[./CHBulk]
type = KKSSplitCHCRes
variable = c
ca = cm
fa_name = f_total_matrix
w = w
[../]
[./dcdt]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./ckernel]
type = SplitCHWRes
mob_name = M
variable = w
[../]
#
# Allen-Cahn Equation
#
[./ACBulkF]
type = KKSACBulkF
variable = eta
fa_name = f_total_matrix
fb_name = f_total_ppt
w = 0.0033
args = 'cp cm'
[../]
[./ACBulkC]
type = KKSACBulkC
variable = eta
ca = cm
cb = cp
fa_name = f_total_matrix
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = kappa
[../]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[]
[AuxKernels]
[./extra_xx]
type = RankTwoAux
rank_two_tensor = extra_stress
index_i = 0
index_j = 0
variable = extra_xx
[../]
[./extra_yy]
type = RankTwoAux
rank_two_tensor = extra_stress
index_i = 1
index_j = 1
variable = extra_yy
[../]
[./extra_zz]
type = RankTwoAux
rank_two_tensor = extra_stress
index_i = 2
index_j = 2
variable = extra_zz
[../]
[./strain_xx]
type = RankTwoAux
rank_two_tensor = mechanical_strain
index_i = 0
index_j = 0
variable = strain_xx
[../]
[./strain_yy]
type = RankTwoAux
rank_two_tensor = mechanical_strain
index_i = 1
index_j = 1
variable = strain_yy
[../]
[./strain_zz]
type = RankTwoAux
rank_two_tensor = mechanical_strain
index_i = 2
index_j = 2
variable = strain_zz
[../]
[]
[Materials]
# Chemical free energy of the matrix
[./fm]
type = DerivativeParsedMaterial
property_name = fm
coupled_variables = 'cm'
expression = '6.55*(cm-0.13)^2'
[../]
# Elastic energy of the matrix
[./elastic_free_energy_m]
type = ElasticEnergyMaterial
base_name = matrix
f_name = fe_m
args = ' '
[../]
# Total free energy of the matrix
[./Total_energy_matrix]
type = DerivativeSumMaterial
property_name = f_total_matrix
sum_materials = 'fm fe_m'
coupled_variables = 'cm'
[../]
# Free energy of the precipitate phase
[./fp]
type = DerivativeParsedMaterial
property_name = fp
coupled_variables = 'cp'
expression = '6.55*(cp-0.235)^2'
[../]
# Elastic energy of the precipitate
[./elastic_free_energy_p]
type = ElasticEnergyMaterial
base_name = ppt
f_name = fe_p
args = ' '
[../]
# Total free energy of the precipitate
[./Total_energy_ppt]
type = DerivativeSumMaterial
property_name = f_total_ppt
sum_materials = 'fp fe_p'
coupled_variables = 'cp'
[../]
# Total elastic energy
[./Total_elastic_energy]
type = DerivativeTwoPhaseMaterial
eta = eta
f_name = f_el_mat
fa_name = fe_m
fb_name = fe_p
outputs = exodus
W = 0
[../]
# h(eta)
[./h_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta
[../]
# g(eta)
[./g_eta]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta
outputs = exodus
[../]
# constant properties
[./constants]
type = GenericConstantMaterial
prop_names = 'M L kappa'
prop_values = '0.7 0.7 0.1365'
[../]
#Mechanical properties
[./Stiffness_matrix]
type = ComputeElasticityTensor
C_ijkl = '74.25 14.525'
base_name = matrix
fill_method = symmetric_isotropic
[../]
[./Stiffness_ppt]
type = ComputeElasticityTensor
C_ijkl = '74.25 14.525'
base_name = ppt
fill_method = symmetric_isotropic
[../]
[./strain_matrix]
type = ComputeRSphericalSmallStrain
base_name = matrix
[../]
[./strain_ppt]
type = ComputeRSphericalSmallStrain
base_name = ppt
[../]
[./stress_matrix]
type = ComputeLinearElasticStress
base_name = matrix
[../]
[./stress_ppt]
type = ComputeLinearElasticStress
base_name = ppt
[../]
[./global_stress]
type = TwoPhaseStressMaterial
base_A = matrix
base_B = ppt
[../]
[./interface_stress]
type = ComputeSurfaceTensionKKS
v = eta
kappa_name = kappa
w = 0.0033
[../]
[]
[BCs]
[./left_r]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[]
#
# Precondition using handcoded off-diagonal terms
#
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm lu nonzero'
l_max_its = 30
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-9
nl_abs_tol = 1.0e-10
num_steps = 2
dt = 0.5
[]
[Outputs]
exodus = true
[./csv]
type = CSV
execute_on = 'final'
[../]
[]
(modules/fluid_properties/test/tests/materials/ad_surface_tension_material/ad_surface_tension_material.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
xmin = 0
xmax = 1
[]
[FluidProperties]
[./fp_2phase]
type = StiffenedGasTwoPhaseFluidProperties
[../]
[]
[Materials]
[./T_mat]
type = ADGenericConstantMaterial
prop_names = 'T_test'
prop_values = '300'
[../]
[./sigma_mat]
type = ADSurfaceTensionMaterial
T = T_test
surface_tension = surface_tension_test
fp_2phase = fp_2phase
[../]
[]
[Postprocessors]
[./surface_tension_test_pp]
type = ADElementIntegralMaterialProperty
mat_prop = surface_tension_test
execute_on = 'INITIAL'
[../]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
execute_on = 'INITIAL'
[]
(modules/fsi/test/tests/2d-small-strain-transient/ad-fsi-flat-channel.i)
[GlobalParams]
displacements = 'disp_x disp_y'
order = FIRST
preset = false
use_displaced_mesh = true
[]
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 3.0
ymin = 0
ymax = 1.0
nx = 10
ny = 15
elem_type = QUAD4
[]
[subdomain1]
type = SubdomainBoundingBoxGenerator
bottom_left = '0.0 0.5 0'
block_id = 1
top_right = '3.0 1.0 0'
input = gmg
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'master0_interface'
input = subdomain1
[]
[break_boundary]
type = BreakBoundaryOnSubdomainGenerator
input = interface
[]
[]
[Variables]
[vel]
block = 0
family = LAGRANGE_VEC
[]
[p]
block = 0
order = FIRST
[]
[disp_x]
[]
[disp_y]
[]
[vel_x_solid]
block = 1
[]
[vel_y_solid]
block = 1
[]
[]
[Kernels]
[mass]
type = INSADMass
variable = p
block = 0
[]
[mass_pspg]
type = INSADMassPSPG
variable = p
block = 0
[]
[momentum_time]
type = INSADMomentumTimeDerivative
variable = vel
block = 0
[]
[momentum_convection]
type = INSADMomentumAdvection
variable = vel
block = 0
[]
[momentum_viscous]
type = INSADMomentumViscous
variable = vel
block = 0
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = vel
pressure = p
integrate_p_by_parts = true
block = 0
[]
[momentum_supg]
type = INSADMomentumSUPG
variable = vel
material_velocity = relative_velocity
block = 0
[]
[momentum_mesh]
type = INSADMomentumMeshAdvection
variable = vel
disp_x = 'disp_x'
disp_y = 'disp_y'
block = 0
[]
[disp_x_fluid]
type = Diffusion
variable = disp_x
block = 0
use_displaced_mesh = false
[]
[disp_y_fluid]
type = Diffusion
variable = disp_y
block = 0
use_displaced_mesh = false
[]
[accel_tensor_x]
type = CoupledTimeDerivative
variable = disp_x
v = vel_x_solid
block = 1
use_displaced_mesh = false
[]
[accel_tensor_y]
type = CoupledTimeDerivative
variable = disp_y
v = vel_y_solid
block = 1
use_displaced_mesh = false
[]
[vxs_time_derivative_term]
type = CoupledTimeDerivative
variable = vel_x_solid
v = disp_x
block = 1
use_displaced_mesh = false
[]
[vys_time_derivative_term]
type = CoupledTimeDerivative
variable = vel_y_solid
v = disp_y
block = 1
use_displaced_mesh = false
[]
[source_vxs]
type = MatReaction
variable = vel_x_solid
block = 1
mob_name = 1
use_displaced_mesh = false
[]
[source_vys]
type = MatReaction
variable = vel_y_solid
block = 1
mob_name = 1
use_displaced_mesh = false
[]
[]
[InterfaceKernels]
[penalty]
type = ADPenaltyVelocityContinuity
variable = vel
fluid_velocity = vel
displacements = 'disp_x disp_y'
solid_velocities = 'vel_x_solid vel_y_solid'
boundary = master0_interface
penalty = 1e6
[]
[]
[Modules/TensorMechanics/Master]
[solid_domain]
strain = SMALL
incremental = false
# generate_output = 'strain_xx strain_yy strain_zz' ## Not at all necessary, but nice
block = '1'
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e2
poissons_ratio = 0.3
block = '1'
use_displaced_mesh = false
[]
[small_stress]
type = ComputeLinearElasticStress
block = 1
[]
[const]
type = ADGenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '1 1'
[]
[ins_mat]
type = INSADTauMaterial
velocity = vel
pressure = p
block = 0
[]
[]
[BCs]
[fluid_bottom]
type = ADVectorFunctionDirichletBC
variable = vel
boundary = 'bottom'
function_x = 0
function_y = 0
[]
[fluid_left]
type = ADVectorFunctionDirichletBC
variable = vel
boundary = 'left_to_0'
function_x = 'inlet_func'
function_y = 0
# The displacements actually affect the result of the function evaluation so in order to eliminate the impact
# on the Jacobian we set 'use_displaced_mesh = false' here
use_displaced_mesh = false
[]
[no_disp_x]
type = DirichletBC
variable = disp_x
boundary = 'bottom top left_to_1 right_to_1 left_to_0 right_to_0'
value = 0
[]
[no_disp_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom top left_to_1 right_to_1 left_to_0 right_to_0'
value = 0
[]
[solid_x_no_slip]
type = DirichletBC
variable = vel_x_solid
boundary = 'top left_to_1 right_to_1'
value = 0.0
[]
[solid_y_no_slip]
type = DirichletBC
variable = vel_y_solid
boundary = 'top left_to_1 right_to_1'
value = 0.0
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
num_steps = 5
# num_steps = 60
dt = 0.1
dtmin = 0.1
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = none
nl_rel_tol = 1e-50
nl_abs_tol = 1e-10
[]
[Outputs]
exodus = true
[]
[Functions]
[inlet_func]
type = ParsedFunction
expression = '(-16 * (y - 0.25)^2 + 1) * (1 + cos(t))'
[]
[]
(modules/xfem/test/tests/moving_interface/verification/1D_xy_discrete2mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: quasi-1D
# Coordinate System: xy
# Material Numbers/Types:discrete homog 2 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description
# A transient heat transfer problem in Cartesian coordinates designed with
# the Method of Manufactured Solutions. This problem was developed to verify
# XFEM performance in the presence of a moving interface separating two
# discrete material regions for linear element models. Both the temperature
# solution and level set function are designed to be linear to attempt to
# minimize error between the exact solution and XFEM results. Thermal
# conductivity, density, and heat capacity are homogeneous in each material
# region with a discontinuous jump in thermal flux between the two material
# regions.
# Results:
# The temperature at the left boundary is determined by the analytical
# solution, so temperature at the right boundary (x=1) should exhibit the
# largest difference between the analytical solution and XFEM results. We
# present the analytical and XFEM results at the material interface position
# and right side boundary at various times.
# Interface:
# Time Expected Temperature XFEM Calculated Temperature
# 20 746.75 746.7235521
# 40 893.05 893.0379081
# 60 1040.15 1040.1527530
#
# Right Boundary (x=1):
# Time Expected Temperature XFEM Calculated Temperature
# 20 720 719.9708681
# 40 840 839.9913293
# 60 960 960.0100886
#
# IMPORTANT NOTE:
# When running this input file, add the --allow-test-objects tag!!!
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 1
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 0.5
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = phi
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./phi]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = 'diffusion_coefficient'
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = phi
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraint]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
jump_flux = jump_flux_func
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = 'phi:=(0.75-x-0.001*t);
i:=(0.75-0.001*t);
if (phi>=0,
10*(8-x),
(7/(1-i))*((i-2)*x + (8-7*i)) )'
[../]
[./right_du_func]
type = ParsedFunction
expression = 'i:=(0.75-0.001*t);
(2.0/(1-i))*(-5+5*i+i*t-2*t)'
[../]
[./exact_u_func]
type = ParsedFunction
expression = 'phi:=(0.75-x-0.001*t);
i:=(0.75-0.001*t);
if (phi>=0,
605 - 5*x + t*(8-x),
(1/(1-i))*((-5+5*i+i*t-2*t)*x + (605-605*i+8*t-7*t*i)) )'
[../]
[./jump_flux_func]
type = ParsedFunction
expression = 'i:=(0.75-0.001*t);
k_1:=(20.0);
k_2:=(2.0);
k_1*(5+t) + (k_2/(1-i))*(-5+5*i+i*t-2*t)'
[../]
[./ls_func]
type = ParsedFunction
expression = '0.75 - x - 0.001*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'A_rhoCp B_rhoCp'
prop_values = '10 7'
[../]
[./therm_cond_prop]
type = GenericConstantMaterial
prop_names = 'A_diffusion_coefficient B_diffusion_coefficient'
prop_values = '20.0 2.0'
[../]
[./combined_rhoCp]
type = LevelSetBiMaterialReal
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = phi
prop_name = rhoCp
[../]
[./combined_diffusion_coefficient]
type = LevelSetBiMaterialReal
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = phi
prop_name = diffusion_coefficient
[../]
[]
[BCs]
[./left_u]
type = FunctionDirichletBC
variable = u
boundary = 'left'
function = exact_u_func
[../]
[./right_du]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = right_du_func
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 600
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
# petsc_options_iname = '-pc_type -pc_hypre_type'
# petsc_options_value = 'hypre boomeramg'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 20
end_time = 60.0
max_xfem_update = 2
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = 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/phase_field/test/tests/rigidbodymotion/grain_forcesum.i)
# test file for showing summing forces and torques obtained from other userobjects
[GlobalParams]
var_name_base = eta
op_num = 2
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 3
nz = 0
xmax = 50
ymax = 25
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SpecifiedSmoothCircleIC
invalue = 1.0
outvalue = 0.1
int_width = 6.0
x_positions = '20.0 30.0 '
z_positions = '0.0 0.0 '
y_positions = '0.0 25.0 '
radii = '14.0 14.0'
3D_spheres = false
variable = c
[../]
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c kappa_eta'
prop_values = '5.0 2.0 0.1'
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = c
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 1.0e-2'
expression = 16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2
derivative_order = 2
[../]
[./force_density]
type = ForceDensityMaterial
c = c
etas ='eta0 eta1'
[../]
[]
[AuxVariables]
[./eta0]
[../]
[./eta1]
[../]
[./bnds]
[../]
[./df00]
order = CONSTANT
family = MONOMIAL
[../]
[./df01]
order = CONSTANT
family = MONOMIAL
[../]
[./df10]
order = CONSTANT
family = MONOMIAL
[../]
[./df11]
order = CONSTANT
family = MONOMIAL
[../]
[]
[ICs]
[./ic_eta0]
int_width = 6.0
x1 = 20.0
y1 = 0.0
radius = 14.0
outvalue = 0.0
variable = eta0
invalue = 1.0
type = SmoothCircleIC
[../]
[./IC_eta1]
int_width = 6.0
x1 = 30.0
y1 = 25.0
radius = 14.0
outvalue = 0.0
variable = eta1
invalue = 1.0
type = SmoothCircleIC
[../]
[]
[VectorPostprocessors]
[./forces_dns]
type = GrainForcesPostprocessor
grain_force = grain_force_dns
[../]
[./forces_cosnt]
type = GrainForcesPostprocessor
grain_force = grain_force_const
[../]
[./forces_total]
type = GrainForcesPostprocessor
grain_force = grain_force
[../]
[]
[UserObjects]
[./grain_center]
type = GrainTracker
outputs = none
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
[../]
[./grain_force_dns]
type = ComputeGrainForceAndTorque
c = c
etas = 'eta0 eta1'
execute_on = 'linear nonlinear'
grain_data = grain_center
force_density = force_density
[../]
[./grain_force_const]
type = ConstantGrainForceAndTorque
execute_on = 'linear nonlinear'
force = '2.0 0.0 0.0 0.0 0.0 0.0'
torque = '0.0 0.0 0.0 0.0 0.0 0.0'
[../]
[./grain_force]
type = GrainForceAndTorqueSum
execute_on = 'linear nonlinear'
grain_forces = 'grain_force_dns grain_force_const'
grain_num = 2
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
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 = 20
nl_max_its = 20
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 2
dt = 0.1
[]
[Outputs]
exodus = true
csv = true
[]
(test/tests/materials/boundary_material/elem_aux_bc_on_bnd.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
nx = 3
ymin = 0
ymax = 1
ny = 3
[]
[AuxVariables]
[./foo]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Variables]
[./temp]
initial_condition = 1
[../]
[]
[AuxKernels]
[./copy_bar]
type = MaterialRealAux
property = bar
variable = foo
boundary = right
execute_on = timestep_end
[../]
[]
[Kernels]
[./heat]
type = CoefDiffusion
variable = temp
coef = 1
[../]
[]
[BCs]
[./leftt]
type = DirichletBC
boundary = left
value = 2
variable = temp
[../]
[]
[Materials]
[./thermal_cond]
type = GenericConstantMaterial
prop_names = 'bar'
prop_values = '1'
block = 0
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
num_steps = 1
end_time = 1
[]
[Outputs]
exodus = true
[]
(test/tests/problems/verbose_setup/sample.i)
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Variables]
[u]
initial_condition = 3
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[AuxVariables]
[c]
[]
[]
[AuxKernels]
[copy]
type = ProjectionAux
v = u
variable = c
[]
[]
[Materials]
[unused]
type = GenericConstantMaterial
prop_names = 'f1'
prop_values = '2'
[]
[]
[Functions]
[f]
type = ConstantFunction
value = 1
[]
[]
[Problem]
type = FEProblem
solve = false
verbose_setup = true
[]
[Executioner]
type = Steady
[]
(modules/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-wear.i)
starting_point = 0.5e-1
offset = -0.05
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[normal_lm]
block = 3
use_dual = true
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[DynamicTensorMechanics]
displacements = 'disp_x disp_y'
generate_output = 'stress_xx stress_yy'
strain = FINITE
block = '1 2'
zeta = 1.0
hht_alpha = 0.0
[]
[inertia_x]
type = InertialForce
variable = disp_x
velocity = vel_x
acceleration = accel_x
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[inertia_y]
type = InertialForce
variable = disp_y
velocity = vel_y
acceleration = accel_y
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[strain]
type = ComputeFiniteStrain
block = '1 2'
[]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '7750'
[]
[]
[AuxVariables]
[worn_depth]
block = '3'
[]
[vel_x]
block = '1 2'
[]
[accel_x]
block = '1 2'
[]
[vel_y]
block = '1 2'
[]
[accel_y]
block = '1 2'
[]
[vel_z]
block = '1 2'
[]
[accel_z]
block = '1 2'
[]
[]
[AuxKernels]
[worn_depth]
type = MortarArchardsLawAux
variable = worn_depth
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
displacements = 'disp_x disp_y'
friction_coefficient = 0.5
energy_wear_coefficient = 1.0
normal_pressure = normal_lm
[]
[accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = 'linear timestep_end'
[]
[vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = 'linear timestep_end'
[]
[accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = 'linear timestep_end'
[]
[vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = 'linear timestep_end'
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
lm_variable = normal_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeDynamicWeightedGapLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
c = 1e4
capture_tolerance = 1.0e-5
newmark_beta = 0.25
newmark_gamma = 0.5
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(8.0 * pi / 4 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 0.675
dt = 0.075
dtmin = .075
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount '
petsc_options_value = 'lu superlu_dist NONZERO 1e-15'
nl_max_its = 30
line_search = 'l2'
snesmf_reuse_base = false
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
checkpoint = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(test/tests/materials/derivative_material_interface/multiblock.i)
[Mesh]
type = FileMesh
file = rectangle.e
[]
[Variables]
[./c]
[../]
[]
[Materials]
[./mat1]
type = DefaultMatPropConsumerMaterial
block = 1
[../]
[./mat2]
type = DefaultMatPropConsumerMaterial
block = 2
[../]
[./mat1b]
type = DefaultMatPropConsumerMaterial
mat_prop = prop2
block = 1
[../]
[./mat2b]
type = DefaultMatPropConsumerMaterial
mat_prop = prop2
block = 2
[../]
[./generic]
type = GenericConstantMaterial
block = '1 2'
prop_names = prop3
prop_values = 9
[../]
[./mat1c]
type = DefaultMatPropConsumerMaterial
mat_prop = prop3
block = 1
[../]
[./mat2c]
type = DefaultMatPropConsumerMaterial
mat_prop = prop3
block = 2
[../]
[]
[Kernels]
[./kern1]
type = DefaultMatPropConsumerKernel
variable = c
block = 1
[../]
[./kern2]
type = DefaultMatPropConsumerKernel
variable = c
block = 2
[../]
[./kern1b]
type = DefaultMatPropConsumerKernel
variable = c
mat_prop = prop3
block = 1
[../]
[./kern2b]
type = DefaultMatPropConsumerKernel
variable = c
mat_prop = prop3
block = 2
[../]
[]
[Executioner]
type = Steady
[]
[Debug]
show_material_props = true
[]
[Problem]
solve = false
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/verify_against_analytical/2d_steady_state.i)
# This test solves a 2D steady state heat equation
# The error is found by comparing to the analytical solution
# Note that the thermal conductivity, specific heat, and density in this problem
# Are set to 1, and need to be changed to the constants of the material being
# Analyzed
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
xmax = 2
ymax = 2
[]
[Variables]
[./T]
[../]
[]
[Kernels]
[./HeatDiff]
type = HeatConduction
variable = T
[../]
[]
[BCs]
[./zero]
type = DirichletBC
variable = T
boundary = 'left right bottom'
value = 0
[../]
[./top]
type = FunctionDirichletBC
variable = T
boundary = top
function = '10*sin(pi*x*0.5)'
[../]
[]
[Materials]
[./properties]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1 1 1'
[../]
[]
[Postprocessors]
[./nodal_error]
type = NodalL2Error
function = '10/(sinh(pi))*sin(pi*x*0.5)*sinh(pi*y*0.5)'
variable = T
[../]
[./elemental_error]
type = ElementL2Error
function = '10/(sinh(pi))*sin(pi*x*0.5)*sinh(pi*y*0.5)'
variable = T
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/radiative_bcs/ad_function_radiative_bc.i)
#
# If we assume that epsilon*sigma*(T_inf^4-T_s^4) is approximately equal to
# epsilon*sigma*4*T_inf^3*(T_inf-T_s), that form is equivalent to
# h*(T_inf-T_s), the convective flux bc. So, the radiative and convective
# flux bcs should give nearly the same answer if the leading terms are equal.
#
[Mesh]
[top]
type = GeneratedMeshGenerator
dim = 3
nx = 10
bias_x = 0.8
ymin = 1.2
ymax = 2.2
boundary_name_prefix = top
[]
[bottom]
type = GeneratedMeshGenerator
dim = 3
nx = 10
bias_x = 0.8
boundary_name_prefix = bot
boundary_id_offset = 6
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'top bottom'
[]
[]
[Variables]
[temp]
initial_condition = 600.0
[]
[]
[Kernels]
[heat_dt]
type = ADTimeDerivative
variable = temp
[]
[heat_conduction]
type = ADHeatConduction
variable = temp
[]
[]
[BCs]
[top_right]
type = ADConvectiveHeatFluxBC
variable = temp
boundary = top_right
T_infinity = 300.0
heat_transfer_coefficient = 3.0
[]
[bot_right]
type = ADFunctionRadiativeBC
variable = temp
boundary = bot_right
# htc/(stefan-boltzmann*4*T_inf^3)
emissivity_function = '3/(5.670367e-8*4*300*300*300)'
[]
[]
[Materials]
[thermal]
type = ADGenericConstantMaterial
prop_names = 'density thermal_conductivity specific_heat'
prop_values = '1 10 100'
[]
[]
[Postprocessors]
[top_left_temp]
type = SideAverageValue
variable = temp
boundary = top_left
execute_on = 'TIMESTEP_END initial'
[]
[bot_left_temp]
type = SideAverageValue
variable = temp
boundary = bot_left
execute_on = 'TIMESTEP_END initial'
[]
[top_right_temp]
type = SideAverageValue
variable = temp
boundary = top_right
[]
[bot_right_temp]
type = SideAverageValue
variable = temp
boundary = bot_right
[]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 1e1
nl_abs_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/phase_field_fracture/crack2d_linear_fracture_energy.i)
#This input uses PhaseField-Nonconserved Action to add phase field fracture bulk rate kernels
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
ymax = 0.5
[]
[./noncrack]
type = BoundingBoxNodeSetGenerator
new_boundary = noncrack
bottom_left = '0.5 0 0'
top_right = '1 0 0'
input = gen
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Modules]
[./PhaseField]
[./Nonconserved]
[./c]
free_energy = F
kappa = kappa_op
mobility = L
[../]
[../]
[../]
[./TensorMechanics]
[./Master]
[./mech]
add_variables = true
strain = SMALL
additional_generate_output = 'stress_yy'
save_in = 'resid_x resid_y'
[../]
[../]
[../]
[]
[AuxVariables]
[./resid_x]
[../]
[./resid_y]
[../]
[]
[Kernels]
[./solid_x]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_x
component = 0
c = c
[../]
[./solid_y]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_y
component = 1
c = c
[../]
[]
[BCs]
[./ydisp]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = 't'
[../]
[./yfix]
type = DirichletBC
variable = disp_y
boundary = noncrack
value = 0
[../]
[./xfix]
type = DirichletBC
variable = disp_x
boundary = top
value = 0
[../]
[]
[Materials]
[./pfbulkmat]
type = GenericConstantMaterial
prop_names = 'gc_prop l visco'
prop_values = '1e-3 0.04 1e-4'
[../]
[./define_mobility]
type = ParsedMaterial
material_property_names = 'gc_prop visco'
property_name = L
expression = '1.0/(gc_prop * visco)'
[../]
[./define_kappa]
type = ParsedMaterial
material_property_names = 'gc_prop l'
property_name = kappa_op
expression = 'gc_prop * l * 3 / 4'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '120.0 80.0'
fill_method = symmetric_isotropic
[../]
[./elastic]
type = ComputeLinearElasticPFFractureStress
c = c
E_name = 'elastic_energy'
D_name = 'degradation'
F_name = 'fracture_energy'
barrier_energy = 'barrier'
decomposition_type = strain_spectral
[../]
[./degradation]
type = DerivativeParsedMaterial
property_name = degradation
coupled_variables = 'c'
expression = '(1.0-c)^2*(1.0 - eta) + eta'
constant_names = 'eta'
constant_expressions = '0.0'
derivative_order = 2
[../]
[./fracture_energy]
type = DerivativeParsedMaterial
property_name = fracture_energy
coupled_variables = 'c'
material_property_names = 'gc_prop l'
expression = '3 * gc_prop / (8 * l) * c'
derivative_order = 2
[../]
[./fracture_driving_energy]
type = DerivativeSumMaterial
coupled_variables = c
sum_materials = 'elastic_energy fracture_energy'
derivative_order = 2
property_name = F
[../]
[./barrier_energy]
type = ParsedMaterial
property_name = barrier
material_property_names = 'gc_prop l'
expression = '3 * gc_prop / 16 / l'
[../]
[]
[Postprocessors]
[./resid_x]
type = NodalSum
variable = resid_x
boundary = 2
[../]
[./resid_y]
type = NodalSum
variable = resid_y
boundary = 2
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
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'
nl_rel_tol = 1e-8
l_max_its = 10
nl_max_its = 20
dt = 1e-4
dtmin = 1e-4
num_steps = 2
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/critical_time_step/crit_time_solid_uniform.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
ny = 10
nz = 15
xmin = 0
xmax = 2
ymin = 0
ymax = 2
zmin = 0
zmax = 1
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[Kernels]
[SolidMechanics]
[../]
[]
[BCs]
[./2_x]
type = DirichletBC
variable = disp_x
boundary = 3
value = 0.0
[../]
[./2_y]
type = DirichletBC
variable = disp_y
boundary = 3
value = 0.0
[../]
[./2_z]
type = DirichletBC
variable = disp_z
boundary = 3
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
poissons_ratio = 0.1
youngs_modulus = 1e6
[../]
[./strain]
type = ComputeSmallStrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./density]
type = GenericConstantMaterial
prop_names = 'density'
prop_values = '8050.0'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
nl_abs_tol = 1e-4
l_max_its = 3
start_time = 0.0
dt = 0.1
num_steps = 1
end_time = 1.0
[]
[Postprocessors]
[./time_step]
type = CriticalTimeStep
[../]
[]
[Outputs]
csv = true
[]
(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
[]
[]
(modules/optimization/test/tests/optimizationreporter/general_opt/point_loads_gen_opt/adjoint.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 1
ymax = 1.4
[]
[Variables]
[adjoint]
[]
[]
[Problem]
extra_tag_vectors = 'ref'
[]
[AuxVariables]
[residual_src]
[]
[]
[AuxKernels]
[residual_src]
type = TagVectorAux
vector_tag = 'ref'
v = 'adjoint'
variable = 'residual_src'
[]
[]
[Variables]
[adjoint]
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = adjoint
diffusivity = thermal_conductivity
[]
[]
#-----every adjoint problem should have these two
[DiracKernels]
[pt]
type = ReporterPointSource
variable = adjoint
x_coord_name = misfit/measurement_xcoord
y_coord_name = misfit/measurement_ycoord
z_coord_name = misfit/measurement_zcoord
value_name = misfit/misfit_values
extra_vector_tags = 'ref'
[]
[]
[Reporters]
[misfit]
type = OptimizationData
measurement_points = ${measurement_points}
measurement_values = ${measurement_values}
[]
[]
[BCs]
[left]
type = DirichletBC
variable = adjoint
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = adjoint
boundary = right
value = 0
[]
[bottom]
type = DirichletBC
variable = adjoint
boundary = bottom
value = 0
[]
[top]
type = DirichletBC
variable = adjoint
boundary = top
value = 0
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-6
nl_rel_tol = 1e-8
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[VectorPostprocessors]
[gradient]
type = PointValueSampler
points = '0.2 0.2 0
0.7 0.56 0
0.4 1 0'
variable = adjoint
sort_by = id
[]
[]
[Outputs]
console = false
exodus = false
file_base = 'adjoint'
[]
(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/solid_mechanics/test/tests/rom_stress_update/creep_ramp_sub_true.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[temperature]
initial_condition = 889
[]
[effective_inelastic_strain]
order = FIRST
family = MONOMIAL
[]
[cell_dislocations]
order = FIRST
family = MONOMIAL
[]
[wall_dislocations]
order = FIRST
family = MONOMIAL
[]
[number_of_substeps]
order = FIRST
family = MONOMIAL
[]
[]
[AuxKernels]
[effective_inelastic_strain]
type = MaterialRealAux
variable = effective_inelastic_strain
property = effective_creep_strain
[]
[cell_dislocations]
type = MaterialRealAux
variable = cell_dislocations
property = cell_dislocations
[]
[wall_dislocations]
type = MaterialRealAux
variable = wall_dislocations
property = wall_dislocations
[]
[number_of_substeps]
type = MaterialRealAux
variable = number_of_substeps
property = number_of_substeps
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
generate_output = 'vonmises_stress'
[]
[]
[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_x]
type = Pressure
variable = disp_x
boundary = right
factor = -0.5
function = shear_function
[]
[pressure_y]
type = Pressure
variable = disp_y
boundary = top
factor = -0.5
function = shear_function
[]
[pressure_z]
type = Pressure
variable = disp_z
boundary = front
factor = 0.5
function = shear_function
[]
[]
[Functions]
[shear_function]
type = ParsedFunction
expression = 'timeToDoubleInHours := 10;
if(t<=28*60*60, 15.0e6, 15.0e6*(t-28*3600)/3600/timeToDoubleInHours+15.0e6)'
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1.68e11
poissons_ratio = 0.31
[]
[stress]
type = ComputeMultipleInelasticStress
inelastic_models = rom_stress_prediction
[]
[mx_phase_fraction]
type = GenericConstantMaterial
prop_names = mx_phase_fraction
prop_values = 5.13e-2 #precipitation bounds: 6e-3, 1e-1
outputs = all
[]
[rom_stress_prediction]
type = SS316HLAROMANCEStressUpdateTest
temperature = temperature
initial_cell_dislocation_density = 6.0e12
initial_wall_dislocation_density = 4.4e11
# outputs = all
use_substepping = ERROR_BASED
substep_strain_tolerance = 1.0e-5
stress_input_window_low_failure = WARN
stress_input_window_high_failure = ERROR
cell_input_window_high_failure = ERROR
cell_input_window_low_failure = ERROR
wall_input_window_low_failure = ERROR
wall_input_window_high_failure = ERROR
temperature_input_window_high_failure = ERROR
temperature_input_window_low_failure = ERROR
environment_input_window_high_failure = ERROR
environment_input_window_low_failure = ERROR
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
nl_abs_tol = 1e-12
nl_rel_tol = 1e-4
automatic_scaling = true
compute_scaling_once = false
dtmin = 0.1
dtmax = 1e5
end_time = 136800
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.1 ## This model requires a tiny timestep at the onset for the first 10s
iteration_window = 4
optimal_iterations = 12
time_t = '100800'
time_dt = '1e5'
[]
[]
[Postprocessors]
[effective_strain_avg]
type = ElementAverageValue
variable = effective_inelastic_strain
[]
[temperature]
type = ElementAverageValue
variable = temperature
[]
[cell_dislocations]
type = ElementAverageValue
variable = cell_dislocations
[]
[wall_disloactions]
type = ElementAverageValue
variable = wall_dislocations
[]
[max_vonmises_stress]
type = ElementExtremeValue
variable = vonmises_stress
value_type = max
[]
[number_of_substeps]
type = ElementAverageValue
variable = number_of_substeps
[]
[]
[Outputs]
csv = true
[]
(tutorials/darcy_thermo_mech/step05_heat_conduction/problems/step5c_outflow.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmax = 0.304 # Length of test chamber
ymax = 0.0257 # Test chamber radius
[]
coord_type = RZ
rz_coord_axis = X
[]
[Variables]
[temperature]
initial_condition = 300 # Start at room temperature
[]
[]
[Kernels]
[heat_conduction]
type = ADHeatConduction
variable = temperature
[]
[heat_conduction_time_derivative]
type = ADHeatConductionTimeDerivative
variable = temperature
[]
[]
[BCs]
[inlet_temperature]
type = DirichletBC
variable = temperature
boundary = left
value = 350 # (K)
[]
[outlet_temperature]
type = HeatConductionOutflow
variable = temperature
boundary = right
[]
[]
[Materials]
[steel]
type = ADGenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '18 466 8000' # W/m*K, J/kg-K, kg/m^3 @ 296K
[]
[]
[Problem]
type = FEProblem
[]
[Executioner]
type = Transient
num_steps = 10
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/central_difference/consistent/2D/2d_consistent_explicit.i)
# Test for the central difference time integrator for a 2D mesh
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 2
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 2.0
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[AuxVariables]
[./vel_x]
[../]
[./accel_x]
[../]
[./vel_y]
[../]
[./accel_y]
[../]
[]
[Kernels]
[./DynamicSolidMechanics]
displacements = 'disp_x disp_y'
[../]
[./inertia_x]
type = InertialForce
variable = disp_x
[../]
[./inertia_y]
type = InertialForce
variable = disp_y
[../]
[]
[AuxKernels]
[./accel_x]
type = TestNewmarkTI
variable = accel_x
displacement = disp_x
first = false
[../]
[./vel_x]
type = TestNewmarkTI
variable = vel_x
displacement = disp_x
[../]
[./accel_y]
type = TestNewmarkTI
variable = accel_y
displacement = disp_y
first = false
[../]
[./vel_y]
type = TestNewmarkTI
variable = vel_y
displacement = disp_y
[../]
[]
[BCs]
[./y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./x_bot]
type = FunctionDirichletBC
boundary = bottom
variable = disp_x
function = disp
preset = false
[../]
[]
[Functions]
[./disp]
type = PiecewiseLinear
x = '0.0 1.0 2.0 3.0 4.0' # time
y = '0.0 1.0 0.0 -1.0 0.0' # displacement
[../]
[]
[Materials]
[./elasticity_tensor_block]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.25
block = 0
[../]
[./strain_block]
type = ComputeIncrementalSmallStrain
block = 0
displacements = 'disp_x disp_y'
implicit = false
[../]
[./stress_block]
type = ComputeFiniteStrainElasticStress
block = 0
[../]
[./density]
type = GenericConstantMaterial
block = 0
prop_names = density
prop_values = 1e4
[../]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 0.1
dt = 0.005
timestep_tolerance = 1e-6
[./TimeIntegrator]
type = CentralDifference
[../]
[]
[Postprocessors]
[./_dt]
type = TimestepSize
[../]
[./accel_2x]
type = PointValue
point = '1.0 2.0 0.0'
variable = accel_x
[../]
[./accel_2y]
type = PointValue
point = '1.0 2.0 0.0'
variable = accel_y
[../]
[]
[Outputs]
exodus = false
csv = 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
[]
(test/tests/restrictable/block_api_test/block_restrictable.i)
[Mesh]
type = FileMesh
file = rectangle.e
dim = 2
[]
[Variables]
[./u]
block = '1 2'
[../]
[]
[Kernels]
[./diff]
type = BlkResTestDiffusion
variable = u
block = '1 2'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Materials]
[./mat0]
type = GenericConstantMaterial
block = '1'
prop_names = 'a b'
prop_values = '1 2'
[../]
[./mat1]
type = GenericConstantMaterial
block = '2'
prop_names = 'a'
prop_values = '10'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = 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/stochastic_tools/examples/parameter_study/diffusion_time.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables/T]
initial_condition = 300
[]
[Kernels]
[time]
type = ADTimeDerivative
variable = T
[]
[diff]
type = ADMatDiffusion
variable = T
diffusivity = diffusivity
[]
[source]
type = ADBodyForce
variable = T
value = 100
function = 1
[]
[]
[BCs]
[left]
type = ADDirichletBC
variable = T
boundary = left
value = 300
[]
[right]
type = ADNeumannBC
variable = T
boundary = right
value = -100
[]
[]
[Materials/constant]
type = ADGenericConstantMaterial
prop_names = 'diffusivity'
prop_values = 1
[]
[Executioner]
type = Transient
num_steps = 4
dt = 0.25
[]
[Postprocessors]
[T_avg]
type = ElementAverageValue
variable = T
execute_on = 'initial timestep_end'
[]
[q_left]
type = ADSideDiffusiveFluxAverage
variable = T
boundary = left
diffusivity = diffusivity
execute_on = 'initial timestep_end'
[]
[]
[VectorPostprocessors]
[T_vec]
type = LineValueSampler
variable = T
start_point = '0 0.5 0'
end_point = '1 0.5 0'
num_points = 11
sort_by = x
execute_on = 'initial timestep_end'
[]
[]
[Controls/stochastic]
type = SamplerReceiver
[]
[Outputs]
[]
(modules/optimization/test/tests/optimizationreporter/general_opt/point_loads_gen_opt/forward_and_adjoint_transfer_data.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmax = 1
ymax = 1.4
[]
[]
[Problem]
nl_sys_names = 'nl0 adjoint'
kernel_coverage_check = false
[]
[Variables]
[temperature]
[]
[temperature_adjoint]
nl_sys = adjoint
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = thermal_conductivity
[]
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = temperature
x_coord_name = 'point_source/x'
y_coord_name = 'point_source/y'
z_coord_name = 'point_source/z'
value_name = 'point_source/value'
[]
[misfit]
type = ReporterPointSource
variable = temperature_adjoint
x_coord_name = measure_data/measurement_xcoord
y_coord_name = measure_data/measurement_ycoord
z_coord_name = measure_data/measurement_zcoord
value_name = measure_data/misfit_values
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temperature
boundary = left
value = 300
[]
[right]
type = DirichletBC
variable = temperature
boundary = right
value = 300
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 300
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 300
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = SteadyAndAdjoint
forward_system = nl0
adjoint_system = adjoint
nl_rel_tol = 1e-12
l_tol = 1e-12
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[VectorPostprocessors]
[gradient]
type = PointValueSampler
points = '0.2 0.2 0
0.7 0.56 0
0.4 1 0'
variable = temperature_adjoint
sort_by = id
execute_on = ADJOINT_TIMESTEP_END
[]
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
objective_name = misfit_norm
[]
[point_source]
type = ConstantReporter
real_vector_names = 'x y z value'
real_vector_values = '0.2 0.7 0.4;
0.2 0.56 1;
0 0 0;
-1000 120 500'
[]
[]
[Outputs]
console = false
[]
(test/tests/restrictable/check_error/check_error.i)
[Mesh]
type = FileMesh
file = rectangle.e
dim = 2
[]
[Variables]
[./u]
block = '1 2'
[../]
[]
[Kernels]
[./diff]
type = BlkResTestDiffusion
variable = u
block = '1 2'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Materials]
[./mat0]
type = GenericConstantMaterial
block = '1'
prop_names = 'a b'
prop_values = '1 2'
[../]
[./mat1]
type = GenericConstantMaterial
block = '2'
prop_names = 'a'
prop_values = '10'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
(modules/heat_transfer/test/tests/truss_heat_conduction/rectangle_w_strip.i)
[Mesh]
[rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 50
xmin = -0.5
xmax = 0.5
ymin = -1.25
ymax = 1.25
[]
[strip]
type = SubdomainBoundingBoxGenerator
input = rectangle
bottom_left = '-0.5 -0.05 0'
top_right = '0.5 0.05 0'
block_id = 2
block_name = 'strip'
location = INSIDE
[]
[top_bottom_layers]
type = SubdomainBoundingBoxGenerator
input = strip
bottom_left = '-0.5 -0.05 0'
top_right = '0.5 0.05 0'
block_id = 1
block_name = 'rectangle'
location = OUTSIDE
[]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[time_derivative]
type = HeatConductionTimeDerivative
variable = temperature
[]
[heat_conduction]
type = HeatConduction
variable = temperature
[]
[]
[Materials]
[block]
type = GenericConstantMaterial
block = 'rectangle'
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[]
[strip]
type = GenericConstantMaterial
block = 'strip'
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '10.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[]
[]
[BCs]
[right]
type = FunctionDirichletBC
variable = temperature
boundary = 'right'
function = '10*t'
[]
[]
[VectorPostprocessors]
[x_n0_25]
type = LineValueSampler
start_point = '-0.25 0 0'
end_point = '-0.25 1.25 0'
num_points = 100
variable = 'temperature'
sort_by = id
[]
[x_0_25]
type = LineValueSampler
start_point = '0.25 0 0'
end_point = '0.25 1.25 0'
num_points = 100
variable = 'temperature'
sort_by = id
[]
[]
[Executioner]
type = Transient
start_time = 0
dt = 1
end_time = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[csv]
type = CSV
file_base = 'csv/rectangle_w_strip'
time_data = true
[]
[]
(modules/thermal_hydraulics/test/tests/materials/prandtl_number/test.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
allow_renumbering = false
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[AuxVariables]
[Pr]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[RPr_ak]
type = MaterialRealAux
variable = Pr
property = Pr
[]
[]
[Materials]
[props]
type = GenericConstantMaterial
prop_names = 'cp mu k'
prop_values = '1 2 4'
[]
[Pr_material]
type = PrandtlNumberMaterial
cp = cp
k = k
mu = mu
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[Pr]
type = ElementalVariableValue
elementid = 0
variable = Pr
[]
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(test/tests/problems/no_material_dependency_check/no_material_coverage_check.i)
[Mesh]
[./gen]
type = GeneratedMeshGenerator
dim = 3
[../]
[]
[Problem]
material_dependency_check = false
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./body_force]
type = BodyForce
variable = u
value = 10
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Materials]
[./mat1]
type = GenericConstantMaterial
prop_names = 'diff1'
prop_values = '1'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/initial_conditions/SpecifiedSmoothSuperellipsoidIC.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 25
xmax = 50
ymax = 50
elem_type = QUAD4
[]
[Variables]
[./c]
order = THIRD
family = HERMITE
[../]
[]
[ICs]
[./c]
type = SpecifiedSmoothSuperellipsoidIC
variable = c
x_positions = '15 35'
y_positions = '25.0 25.0'
z_positions = '0 0'
as = '8.0 8.0'
bs = '12.0 8.0'
cs = '60.0 8.0'
ns = '3.5 2.0'
invalue = 1.0
outvalue = -0.8
int_width = 4.0
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./CHSolid]
type = CHMath
variable = c
mob_name = M
[../]
[./CHInterface]
type = CHInterface
variable = c
kappa_name = kappa_c
mob_name = M
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./constant]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1.0 1.0'
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_max_its = 20
l_tol = 1.0e-4
nl_max_its = 40
nl_rel_tol = 1e-9
start_time = 0.0
num_steps = 1
dt = 2.0
[]
[Outputs]
exodus = false
[./out]
type = Exodus
refinements = 2
[../]
[]
(modules/navier_stokes/test/tests/finite_element/ins/wall_convection/steady-action.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[]
[Variables]
active = ''
[temperature][]
[]
[Modules]
[IncompressibleNavierStokes]
equation_type = steady-state
velocity_boundary = 'bottom right top left'
velocity_function = '0 0 0 0 lid_function 0 0 0'
initial_velocity = '1e-15 1e-15 0'
add_standard_velocity_variables_for_ad = false
pressure_pinned_node = 0
density_name = rho
dynamic_viscosity_name = mu
use_ad = true
laplace = true
family = LAGRANGE
order = FIRST
add_temperature_equation = true
fixed_temperature_boundary = 'bottom top'
temperature_function = '1 0'
has_ambient_convection = true
ambient_convection_alpha = 1
ambient_temperature = 0.5
supg = true
pspg = true
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
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
[]
[]
[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/lid_driven/steady_fsp.i)
rho=1
mu=2e-3
U=1
l=1
prefactor=${fparse 1/(l/2)^2}
n=64
[GlobalParams]
gravity = '0 0 0'
[]
[Mesh]
[gen]
type = DistributedRectilinearMeshGenerator
dim = 2
xmin = 0
xmax = ${l}
ymin = 0
ymax = ${l}
nx = ${n}
ny = ${n}
elem_type = QUAD4
[]
second_order = true
parallel_type = distributed
[]
[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
[]
[momentum_x_mass]
type = MassMatrix
variable = vel_x
density = ${rho}
matrix_tags = 'mass'
[]
[y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[]
[momentum_y_mass]
type = MassMatrix
variable = vel_y
density = ${rho}
matrix_tags = 'mass'
[]
[]
[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
[]
[]
[Materials]
[const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[]
[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 = '${prefactor}*${U}*x*(${l}-x)'
[]
[]
[Problem]
type = NavierStokesProblem
mass_matrix = 'mass'
extra_tag_matrices = 'mass'
[]
[Preconditioning]
[FSP]
type = FSP
topsplit = 'up'
[up]
splitting = 'u p'
splitting_type = schur
petsc_options_iname = '-pc_fieldsplit_schur_fact_type -pc_fieldsplit_schur_precondition -ksp_gmres_restart -ksp_type -ksp_pc_side -ksp_rtol'
petsc_options_value = 'full self 300 fgmres right 1e-4'
[]
[u]
vars = 'vel_x vel_y'
# petsc_options = '-ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_type -ksp_rtol -ksp_gmres_restart -ksp_pc_side'
petsc_options_value = 'hypre boomeramg gmres 1e-2 300 right'
[]
[p]
vars = 'p'
petsc_options = '-pc_lsc_scale_diag -ksp_converged_reason'# -lsc_ksp_converged_reason -lsc_ksp_monitor_true_residual
petsc_options_iname = '-ksp_type -ksp_gmres_restart -ksp_rtol -pc_type -ksp_pc_side -lsc_pc_type -lsc_pc_hypre_type -lsc_ksp_type -lsc_ksp_rtol -lsc_ksp_pc_side -lsc_ksp_gmres_restart'
petsc_options_value = 'fgmres 300 1e-2 lsc right hypre boomeramg gmres 1e-1 right 300'
[]
[]
[]
[Postprocessors]
[pavg]
type = ElementAverageValue
variable = p
[]
[]
[UserObjects]
[set_pressure]
type = NSPressurePin
pin_type = 'average'
variable = p
pressure_average = 'pavg'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
[exo]
type = Exodus
execute_on = 'final'
hide = 'pavg'
[]
[]
(modules/phase_field/test/tests/phase_field_kernels/SimpleSplitCHWRes.i)
#
# Test the split parsed function free enery Cahn-Hilliard Bulk kernel
# The free energy used here has the same functional form as the SplitCHPoly kernel
# If everything works, the output of this test should replicate the output
# of marmot/tests/chpoly_test/CHPoly_Cu_Split_test.i (exodiff match)
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
nz = 0
xmin = 0
xmax = 250
ymin = 0
ymax = 250
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 125.0
y1 = 125.0
radius = 60.0
invalue = 1.0
outvalue = 0.1
int_width = 30.0
[../]
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
[../]
[./w_res]
type = SimpleSplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1e-3 0.1'
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'c'
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 1.0e-2'
expression = 16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2
derivative_order = 2
[../]
[]
[Preconditioning]
# active = ' '
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'NEWTON'
l_max_its = 30
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 6
dt = 10
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_htonly/gap_heat_transfer_htonly_it_plot_test.i)
#
# 1-D Gap Heat Transfer Test without mechanics
#
# This test exercises 1-D gap heat transfer for a constant conductivity gap.
#
# The mesh consists of two element blocks containing one element each. Each
# element is a unit cube. They sit next to one another with a unit between them.
#
# The conductivity of both blocks is set very large to achieve a uniform temperature
# across each block. The temperature of the far left boundary
# is ramped from 100 to 200 over one time unit, and then held fixed for an additional
# time unit. The temperature of the far right boundary is held fixed at 100.
#
# A simple analytical solution is possible for the heat flux between the blocks:
#
# Flux = (T_left - T_right) * (gapK/gap_width)
#
# The gap conductivity is specified as 1, thus
#
# gapK(Tavg) = 1.0*Tavg
#
#
# The heat flux across the gap at time = 2 is then:
#
# Flux(2) = 100 * (1.0/1.0) = 100
#
# For comparison, see results from the flux post processors
#
[Mesh]
file = gap_heat_transfer_htonly_test.e
[]
[Functions]
[./temp]
type = PiecewiseLinear
x = '0 1 2'
y = '100 200 200'
[../]
[]
[ThermalContact]
[./thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 3
secondary = 2
emissivity_primary = 0
emissivity_secondary = 0
[../]
[]
[Variables]
[./temp]
order = FIRST
family = LAGRANGE
initial_condition = 100
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = temp
[../]
[]
[BCs]
[./temp_far_left]
type = FunctionDirichletBC
boundary = 1
variable = temp
function = temp
[../]
[./temp_far_right]
type = DirichletBC
boundary = 4
variable = temp
value = 100
[../]
[]
[Materials]
[./heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 100000000.0
[../]
[./density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '1.0'
[../]
[]
[Executioner]
type = Transient
#Preconditioned JFNK (default)
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 4'
line_search = 'none'
nl_abs_tol = 1e-5
nl_rel_tol = 1e-12
l_tol = 1e-10
l_max_its = 100
start_time = 0.0
dt = 1e-1
end_time = 2.0
[]
[Postprocessors]
[./temp_left]
type = SideAverageValue
boundary = 2
variable = temp
[../]
[./temp_right]
type = SideAverageValue
boundary = 3
variable = temp
[../]
[./flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
[../]
[./flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
[../]
[]
[Outputs]
file_base = out_it_plot
[./exodus]
type = Exodus
execute_on = 'initial timestep_end nonlinear'
nonlinear_residual_dt_divisor = 100
[../]
[]
(test/tests/materials/declare_overlap/error.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 1
[]
[./left_domain]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '0.5 1 0'
block_id = 10
[../]
[]
[Variables]
[./u]
initial_condition = 2
[../]
[]
[Kernels]
[./diff]
type = MatDiffusionTest
variable = u
prop_name = 'p'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 2
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 3
[../]
[]
[Materials]
[./all]
type = GenericConstantMaterial
prop_names = 'f f_prime p'
prop_values = '2 2.5 2.468'
block = ANY_BLOCK_ID
outputs = all
[../]
[./left]
type = GenericConstantMaterial
prop_names = 'f f_prime p'
prop_values = '1 0.5 1.2345'
block = 10
outputs = all
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
print_linear_residuals = true
perf_graph = true
[]
(modules/phase_field/test/tests/initial_conditions/SmoothCircleIC_3D.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 15
ny = 15
nz = 15
xmax = 50
ymax = 50
zmax = 50
elem_type = HEX8
[]
[Variables]
[./c]
[../]
[]
[ICs]
[./c]
type = SmoothCircleIC
variable = c
x1 = 25.0
y1 = 25.0
radius = 12
invalue = 1.0
outvalue = 0
int_width = 12
3D_spheres = false
z1 = 25
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./Diffusion]
type = MatDiffusion
variable = c
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y z'
[../]
[../]
[]
[Materials]
[./Diffusivity]
type = GenericConstantMaterial
prop_names = D
prop_values = 1.0
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_max_its = 20
l_tol = 1.0e-5
nl_max_its = 40
nl_rel_tol = 5.0e-14
start_time = 0.0
num_steps = 1
dt = 2.0
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/conserved_noise/normal.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmin = 0.0
xmax = 10.0
ymin = 0.0
ymax = 10.0
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
initial_condition = 0.9
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[]
[Preconditioning]
active = 'SMP'
[./SMP]
type = SMP
off_diag_row = 'w c'
off_diag_column = 'c w'
[../]
[]
[Kernels]
[./cres]
type = SplitCHMath
variable = c
kappa_name = kappa_c
w = w
[../]
[./wres]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./conserved_langevin]
type = ConservedLangevinNoise
amplitude = 0.5
variable = w
noise = normal_noise
[]
[]
[BCs]
[./Periodic]
[./all]
variable = 'c w'
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./constant]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1.0 2.0'
[../]
[]
[UserObjects]
[./normal_noise]
type = ConservedNormalNoise
[../]
[]
[Postprocessors]
[./total_c]
type = ElementIntegralVariablePostprocessor
execute_on = 'initial timestep_end'
variable = c
[../]
[]
[Executioner]
type = Transient
scheme = 'BDF2'
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
l_max_its = 30
l_tol = 1.0e-3
nl_max_its = 30
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-10
dt = 10.0
num_steps = 4
[]
[Outputs]
file_base = normal
exodus = true
[./csv]
type = CSV
delimiter = ' '
[../]
[]
(modules/solid_mechanics/test/tests/jacobian_damper/block_restriction.i)
[Problem]
kernel_coverage_check = false
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 1
nz = 1
[]
[lower_d]
type = LowerDBlockFromSidesetGenerator
input = gmg
sidesets = left
new_block_id = 10
[]
[]
[Functions]
[top_pull]
type = PiecewiseLinear
x = '0 1 2'
y = '0 0.025 0.05'
[]
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[all]
strain = FINITE
add_variables = true
new_system = true
formulation = TOTAL
block = 0
[]
[]
[]
[]
[BCs]
[y_pull_function]
type = FunctionDirichletBC
variable = disp_y
boundary = 3
function = top_pull
preset = true
[]
[x_bot]
type = DirichletBC
variable = disp_x
boundary = 4
value = 0.0
[]
[y_bot]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[]
[z_bot]
type = DirichletBC
variable = disp_z
boundary = 0
value = 0.0
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
poissons_ratio = 0.3
youngs_modulus = 2e5
block = 0
[]
[stress]
type = ComputeLagrangianLinearElasticStress
large_kinematics = true
block = 0
[]
[dummy]
type = GenericConstantMaterial
prop_names = dummy
prop_values = 0
block = 10
[]
[]
[Dampers]
[ejd]
type = ReferenceElementJacobianDamper
max_increment = 0.002
displacements = 'disp_x disp_y disp_z'
block = 0
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
start_time = 0.0
end_time = 2
dt = 1
[]
[Outputs]
exodus = true
print_linear_residuals = false
[]
(modules/phase_field/test/tests/MultiSmoothCircleIC/specifiedsmoothcircleIC_test.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 5
ny = 5
nz = 5
xmin = 0
xmax = 100
ymin = 0
ymax = 100
zmin = 0
zmax = 100
elem_type = HEX8
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./diff]
type = MatDiffusion
variable = c
diffusivity = D_v
[../]
[]
[ICs]
[./c]
type = SpecifiedSmoothCircleIC
variable = c
x_positions = '10 50 90'
y_positions = '30 20 80'
z_positions = '30 50 75'
radii = '21 25 16'
invalue = 1.0
outvalue = 0.0001
int_width = 4
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./Dv]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 0.074802
[../]
[]
[Postprocessors]
[./bubbles]
type = FeatureFloodCount
variable = c
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart -mat_mffd_type'
petsc_options_value = 'hypre boomeramg 101 ds'
l_max_its = 20
l_tol = 1e-4
nl_max_its = 20
nl_rel_tol = 1e-9
nl_abs_tol = 1e-11
start_time = 0.0
num_steps = 1
dt = 100.0
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/examples/bridge/bridge_large_strain.i)
#
# Bridge linear elasticity example
#
# This example models a bridge using linear elasticity.
# It can be either steel or concrete.
# Gravity is applied
# A pressure of 0.5 MPa is also applied
#
[Mesh]
displacements = 'disp_x disp_y disp_z' #Define displacements for deformed mesh
type = FileMesh #Read in mesh from file
file = bridge.e
boundary_id = '1 2 3 4 5 6' #Assign names to boundaries to make things clearer
boundary_name = 'top left right bottom1 bottom2 bottom3'
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[./disp_z]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./gravity_y]
#Gravity is applied to bridge
type = Gravity
variable = disp_y
value = -9.81
[../]
[./SolidMechanics]
#Stress divergence kernels
displacements = 'disp_x disp_y disp_z'
[../]
[]
[AuxVariables]
[./von_mises]
#Dependent variable used to visualize the Von Mises stress
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./von_mises_kernel]
#Calculates the von mises stress and assigns it to von_mises
type = RankTwoScalarAux
variable = von_mises
rank_two_tensor = stress
execute_on = timestep_end
scalar_type = VonMisesStress
[../]
[]
[BCs]
[./Pressure]
[./load]
#Applies the pressure
boundary = top
factor = 5e5 # Pa
[../]
[../]
[./anchor_x]
#Anchors the bottom and sides against deformation in the x-direction
type = DirichletBC
variable = disp_x
boundary = 'left right bottom1 bottom2 bottom3'
value = 0.0
[../]
[./anchor_y]
#Anchors the bottom and sides against deformation in the y-direction
type = DirichletBC
variable = disp_y
boundary = 'left right bottom1 bottom2 bottom3'
value = 0.0
[../]
[./anchor_z]
#Anchors the bottom and sides against deformation in the z-direction
type = DirichletBC
variable = disp_z
boundary = 'left right bottom1 bottom2 bottom3'
value = 0.0
[../]
[]
[Materials]
active = 'density_steel stress strain elasticity_tensor_steel'
[./elasticity_tensor_steel]
#Creates the elasticity tensor using steel parameters
youngs_modulus = 210e9 #Pa
poissons_ratio = 0.3
type = ComputeIsotropicElasticityTensor
block = 1
[../]
[./elasticity_tensor_concrete]
#Creates the elasticity tensor using concrete parameters
youngs_modulus = 16.5e9 #Pa
poissons_ratio = 0.2
type = ComputeIsotropicElasticityTensor
block = 1
[../]
[./strain]
#Computes the strain, assuming small strains
type = ComputeFiniteStrain
block = 1
displacements = 'disp_x disp_y disp_z'
[../]
[./stress]
#Computes the stress, using linear elasticity
type = ComputeFiniteStrainElasticStress
block = 1
[../]
[./density_steel]
#Defines the density of steel
type = GenericConstantMaterial
block = 1
prop_names = density
prop_values = 7850 # kg/m^3
[../]
[./density_concrete]
#Defines the density of concrete
type = GenericConstantMaterial
block = 1
prop_names = density
prop_values = 2400 # kg/m^3
[../]
[]
[Preconditioning]
[./SMP]
#Creates the entire Jacobian, for the Newton solve
type = SMP
full = true
[../]
[]
[Executioner]
#We solve a steady state problem using Newton's iteration
type = Transient
solve_type = NEWTON
nl_rel_tol = 1e-9
l_max_its = 30
l_tol = 1e-4
nl_max_its = 10
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
dt = 0.1
num_steps = 1
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/solid_mechanics/examples/cframe_iga/cframe_iga.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[igafile]
type = FileMeshGenerator
file = cframe_iga_coarse.e
clear_spline_nodes = true
[]
[]
[Variables]
[disp_x]
order = SECOND
family = RATIONAL_BERNSTEIN
[]
[disp_y]
order = SECOND
family = RATIONAL_BERNSTEIN
[]
[disp_z]
order = SECOND
family = RATIONAL_BERNSTEIN
[]
[]
[Kernels]
[SolidMechanics]
#Stress divergence kernels
displacements = 'disp_x disp_y disp_z'
[]
[]
[AuxVariables]
[von_mises]
#Dependent variable used to visualize the von Mises stress
order = SECOND
family = MONOMIAL
[]
[Max_Princ]
#Dependent variable used to visualize the Hoop stress
order = SECOND
family = MONOMIAL
[]
[stress_xx]
order = SECOND
family = MONOMIAL
[]
[stress_yy]
order = SECOND
family = MONOMIAL
[]
[stress_zz]
order = SECOND
family = MONOMIAL
[]
[]
[AuxKernels]
[von_mises_kernel]
#Calculates the von mises stress and assigns it to von_mises
type = RankTwoScalarAux
variable = von_mises
rank_two_tensor = stress
scalar_type = VonMisesStress
[]
[MaxPrin]
type = RankTwoScalarAux
variable = Max_Princ
rank_two_tensor = stress
scalar_type = MaxPrincipal
[]
[stress_xx]
type = RankTwoAux
index_i = 0
index_j = 0
rank_two_tensor = stress
variable = stress_xx
[]
[stress_yy]
type = RankTwoAux
index_i = 1
index_j = 1
rank_two_tensor = stress
variable = stress_yy
[]
[stress_zz]
type = RankTwoAux
index_i = 2
index_j = 2
rank_two_tensor = stress
variable = stress_zz
[]
[]
[BCs]
[Pressure]
[load]
#Applies the pressure
boundary = '3'
factor = 2000 # psi
[]
[]
[anchor_x]
#Anchors the bottom and sides against deformation in the x-direction
type = DirichletBC
variable = disp_x
boundary = '2'
value = 0.0
[]
[anchor_y]
#Anchors the bottom and sides against deformation in the y-direction
type = DirichletBC
variable = disp_y
boundary = '2'
value = 0.0
[]
[anchor_z]
#Anchors the bottom and sides against deformation in the z-direction
type = DirichletBC
variable = disp_z
boundary = '2'
value = 0.0
[]
[]
[Materials]
[elasticity_tensor_AL]
#Creates the elasticity tensor using concrete parameters
youngs_modulus = 24e6 #psi
poissons_ratio = 0.33
type = ComputeIsotropicElasticityTensor
[]
[strain]
#Computes the strain, assuming small strains
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
[]
[stress]
#Computes the stress, using linear elasticity
type = ComputeLinearElasticStress
[]
[density_AL]
#Defines the density of steel
type = GenericConstantMaterial
prop_names = density
prop_values = 6.99e-4 # lbm/in^3
[]
[]
[Preconditioning]
[SMP]
#Creates the entire Jacobian, for the Newton solve
type = SMP
full = true
[]
[]
[Postprocessors]
[max_principal_stress]
type = PointValue
point = '0.000000 -1.500000 -4.3'
variable = Max_Princ
use_displaced_mesh = false
[]
[maxPrincStress]
type = ElementExtremeValue
variable = Max_Princ
[]
[]
[Executioner]
# We solve a steady state problem using Newton's iteration
type = Steady
solve_type = NEWTON
nl_rel_tol = 1e-9
l_max_its = 300
l_tol = 1e-4
nl_max_its = 30
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
[]
[Outputs]
vtk = true
[]
(test/tests/meshgenerators/subdomain_bounding_box_generator/subdomain_bounding_box_generator_outside.i)
[Mesh]
[./gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmax = 1
ymax = 1
#uniform_refine = 2
[]
[./subdomains]
type = SubdomainBoundingBoxGenerator
input = gmg
bottom_left = '0.1 0.1 0'
block_id = 1
top_right = '0.9 0.9 0'
location = OUTSIDE
[]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = MatCoefDiffusion
variable = u
conductivity = 'k'
block = '0 1'
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Materials]
[./outside]
type = GenericConstantMaterial
block = 0
prop_names = 'k'
prop_values = 1
[../]
[./inside]
type = GenericConstantMaterial
block = 1
prop_names = 'k'
prop_values = 0.1
[../]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[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
[]
(test/tests/outputs/debug/show_material_props_consumed.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[]
[Variables/u]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
[]
[diff2]
type = MatDiffusion
variable = u
diffusivity = 'andrew'
[]
[]
[Materials]
[block]
type = GenericConstantMaterial
block = '0'
prop_names = 'D andrew'
prop_values = '1 1980'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
[debug] # This is only a test, you should turn this on via [Debug] block
type = MaterialPropertyDebugOutput
[]
[]
(test/tests/materials/material/three_coupled_mat_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 10
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = MatDiffusionTest
variable = u
prop_name = a
[../]
[./conv]
type = MatConvection
variable = u
x = 1
y = 0
mat_prop = b
[../]
[]
[BCs]
[./right]
type = NeumannBC
variable = u
boundary = 1
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[]
[Materials]
[./matA]
type = CoupledMaterial
block = 0
mat_prop = 'a'
coupled_mat_prop = 'b'
[../]
[./matB]
type = CoupledMaterial
block = 0
mat_prop = 'b'
coupled_mat_prop = 'c'
[../]
[./matC]
type = CoupledMaterial
block = 0
mat_prop = 'c'
coupled_mat_prop = 'd'
[../]
[./matD]
type = GenericConstantMaterial
block = 0
prop_names = 'd'
prop_values = '2'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
file_base = out_three
exodus = true
[]
(modules/heat_transfer/test/tests/multiple_contact_pairs/multiple_contact_pairs.i)
[Mesh]
file = 3blk.e
[]
[Functions]
[temperature]
type = PiecewiseLinear
x = '0 1 2'
y = '100 300 300'
[]
[]
[ThermalContact]
[thermal_contact]
type = GapHeatTransfer
variable = temperature
primary = '101 201'
secondary = '100 200'
emissivity_primary = 0
emissivity_secondary = 0
gap_conductance = 1.0e9
[]
[]
[Variables]
[temperature]
order = FIRST
family = LAGRANGE
initial_condition = 100
[]
[]
[AuxVariables]
[gap_cond]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[heat]
type = HeatConduction
variable = temperature
[]
[]
[BCs]
[temp_far_left]
type = FunctionDirichletBC
boundary = '101 201'
variable = temperature
function = temperature
[]
[temp_far_right]
type = DirichletBC
boundary = 'left right'
variable = temperature
value = 100
[]
[]
[AuxKernels]
[conductance]
type = MaterialRealAux
property = gap_conductance
variable = gap_cond
boundary = 100
[]
[]
[Materials]
[heat1]
type = HeatConductionMaterial
block = '1 2 3'
specific_heat = 1.0
thermal_conductivity = 100000000.0
[]
[density]
type = GenericConstantMaterial
block = '1 2 3'
prop_names = 'density'
prop_values = '1.0'
[]
[]
[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 4'
line_search = 'none'
nl_rel_tol = 1e-8
l_tol = 1e-3
l_max_its = 100
dt = 1e-1
end_time = 1.0
[]
[Postprocessors]
[temp_left]
type = SideAverageValue
boundary = 100
variable = temperature
execute_on = 'initial timestep_end'
[]
[temp_right]
type = SideAverageValue
boundary = 200
variable = temperature
execute_on = 'initial timestep_end'
[]
[flux_left]
type = SideDiffusiveFluxIntegral
variable = temperature
boundary = 100
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[]
[flux_right]
type = SideDiffusiveFluxIntegral
variable = temperature
boundary = 200
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
exodus = false
csv = true
[]
(test/tests/mesh/named_entities/named_entities_test_xda.i)
[Mesh]
file = named_entities.xda
uniform_refine = 1
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
block = '1 center_block 3'
[./InitialCondition]
type = ConstantIC
value = 20
block = 'center_block 3'
[../]
[../]
[]
[AuxVariables]
[./reporter]
order = CONSTANT
family = MONOMIAL
block = 'left_block 3'
[../]
[]
[ICs]
[./reporter_ic]
type = ConstantIC
variable = reporter
value = 10
[../]
[]
[Kernels]
active = 'diff body_force'
[./diff]
type = Diffusion
variable = u
# Note we are using both names and numbers here
block = 'left_block 2 right_block'
[../]
[./body_force]
type = BodyForce
variable = u
block = 'center_block'
value = 10
[../]
[]
[AuxKernels]
[./hardness]
type = MaterialRealAux
variable = reporter
property = 'hardness'
block = 'left_block 3'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 'left_side'
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = 'right_side'
value = 1
[../]
[]
[Postprocessors]
[./elem_average]
type = ElementAverageValue
variable = u
block = 'center_block'
execute_on = 'initial timestep_end'
[../]
[./side_average]
type = SideAverageValue
variable = u
boundary = 'right_side'
execute_on = 'initial timestep_end'
[../]
[]
[Materials]
[./constant]
type = GenericConstantMaterial
prop_names = 'hardness'
prop_values = 10
block = '1 right_block'
[../]
[./empty]
type = MTMaterial
block = 'center_block'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
(modules/stochastic_tools/test/tests/surrogates/poly_chaos/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = u
diffusivity = D
[]
[absorption]
type = MaterialReaction
variable = u
coefficient = sig
[]
[source]
type = BodyForce
variable = u
value = 1.0
[]
[]
[Materials]
[diffusivity]
type = GenericConstantMaterial
prop_names = D
prop_values = 2.0
[]
[xs]
type = GenericConstantMaterial
prop_names = sig
prop_values = 2.0
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Postprocessors]
[avg]
type = AverageNodalVariableValue
variable = u
[]
[max]
type = NodalExtremeValue
variable = u
value_type = max
[]
[]
(modules/xfem/test/tests/moving_interface/verification/2D_rz_homog1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: 2D
# Coordinate System: rz
# Material Numbers/Types: homogeneous 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description:
# Transient 2D heat transfer problem in cylindrical coordinates designed with
# the Method of Manufactured Solutions. This problem was developed to verify
# XFEM performance on linear elements in the presence of a moving interface
# sweeping across the x-y coordinates of a system with homogeneous material
# properties. This problem can be exactly evaluated by FEM/Moose without the
# moving interface. Both the temperature and level set function are designed
# to be linear to attempt to minimize error between the Moose/exact solution
# and XFEM results.
# Results:
# The temperature at the bottom left boundary (x=1, y=1) exhibits the largest
# difference between the FEM/Moose solution and XFEM results. We present the
# XFEM results at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 479.9998745
# 0.6 520 519.9995067
# 0.8 560 559.9989409
# 1.0 600 599.9987054
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Problem]
coord_type = RZ
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
xmin = 1.0
xmax = 2.0
ymin = 1.0
ymax = 2.0
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraints]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = '10*(-100*x-100*y+400) + 100*1.5*t/x'
[../]
[./neumann_func]
type = ParsedFunction
expression = '1.5*100*t'
[../]
[./dirichlet_right_func]
type = ParsedFunction
expression = '(-100*y+200)*t+400'
[../]
[./dirichlet_top_func]
type = ParsedFunction
expression = '(-100*x+200)*t+400'
[../]
[./ls_func]
type = ParsedFunction
expression = '-0.5*(x+y) + 2.04 - 0.2*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericConstantMaterial
prop_names = 'diffusion_coefficient'
prop_values = 1.5
[../]
[]
[BCs]
[./left_du]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = FunctionDirichletBC
variable = u
boundary = 'right'
function = dirichlet_right_func
[../]
[./bottom_du]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = neumann_func
[../]
[./top_u]
type = FunctionDirichletBC
variable = u
boundary = 'top'
function = dirichlet_top_func
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_radiation_test.i)
#
# This test replicates the legacy heat transfter test
# gap_heat_transfer_radiation/gap_heat_transfer_radiation_test.i
# The flux post processors give 3.753945e+01
#
[Mesh]
[file]
type = FileMeshGenerator
file = gap_heat_transfer_radiation_test.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '200'
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '3'
new_block_id = '300'
new_block_name = 'primary_lower'
input = secondary
[]
[]
[Functions]
[temp]
type = PiecewiseLinear
x = '0 1'
y = '200 200'
[]
[]
[Variables]
[temp]
order = FIRST
family = LAGRANGE
initial_condition = 100
scaling = 1e-8
[]
[lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
scaling = 1e-1
[]
[]
[Kernels]
[heat]
type = HeatConduction
variable = temp
block = '1 2'
[]
[]
[BCs]
[temp_far_left]
type = FunctionDirichletBC
boundary = 1
variable = temp
function = temp
[]
[temp_far_right]
type = DirichletBC
boundary = 4
variable = temp
value = 100
[]
[]
[UserObjects]
[radiative]
type = GapFluxModelRadiative
secondary_emissivity = 0.5
primary_emissivity = 0.5
temperature = temp
boundary = 3
[]
[simple]
type = GapFluxModelSimple
k = 0.09187557
temperature = temp
boundary = 3
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
primary_boundary = 3
primary_subdomain = 300
secondary_boundary = 2
secondary_subdomain = 200
gap_flux_models = 'simple radiative'
[]
[]
[Materials]
[heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 10000000.0
[]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '1.0'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
end_time = 1.0
[]
[Postprocessors]
[temp_left]
type = SideAverageValue
boundary = 2
variable = temp
execute_on = 'initial timestep_end'
[]
[temp_right]
type = SideAverageValue
boundary = 3
variable = temp
execute_on = 'initial timestep_end'
[]
[flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
[]
[flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
[]
[]
[Outputs]
exodus = true
[]
(test/tests/userobjects/layered_side_integral/layered_side_diffusive_flux_average.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 6
ny = 6
nz = 6
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./layered_side_flux_average]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = u
boundary = bottom
value = 0
[../]
[./top]
type = DirichletBC
variable = u
boundary = top
value = 1
[../]
[]
[AuxKernels]
[./lsfa]
type = SpatialUserObjectAux
variable = layered_side_flux_average
boundary = top
user_object = layered_side_flux_average
[../]
[]
[Materials]
[./gcm]
type = GenericConstantMaterial
prop_values = 2
prop_names = diffusivity
boundary = 'right top'
[../]
[]
[UserObjects]
[./layered_side_flux_average]
type = LayeredSideDiffusiveFluxAverage
direction = y
diffusivity = diffusivity
num_layers = 1
variable = u
execute_on = linear
boundary = top
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
[Debug]
show_material_props = true
[]
(modules/solid_mechanics/test/tests/dynamics/wave_1D/wave_rayleigh_newmark.i)
# Wave propogation in 1D using Newmark time integration in the presence of Rayleigh damping
#
# The test is for an 1D bar element of length 4m fixed on one end
# with a sinusoidal pulse dirichlet boundary condition applied to the other end.
# beta and gamma are Newmark time integration parameters
# eta and zeta are mass dependent and stiffness dependent Rayleigh damping
# coefficients, respectively.
# The equation of motion in terms of matrices is:
#
# M*accel + (eta*M+zeta*K)*vel +K*disp = 0
#
# Here M is the mass matrix, K is the stiffness matrix
#
# The displacement at the second, third and fourth node at t = 0.1 are
# -7.776268399030435152e-02, 1.949967184623528985e-02 and -4.615737877580032046e-03, respectively
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 4
nz = 1
xmin = 0.0
xmax = 0.1
ymin = 0.0
ymax = 4.0
zmin = 0.0
zmax = 0.1
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[AuxVariables]
[./vel_x]
[../]
[./accel_x]
[../]
[./vel_y]
[../]
[./accel_y]
[../]
[./vel_z]
[../]
[./accel_z]
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./DynamicSolidMechanics]
displacements = 'disp_x disp_y disp_z'
stiffness_damping_coefficient = 0.1
[../]
[./inertia_x]
type = InertialForce
variable = disp_x
velocity = vel_x
acceleration = accel_x
beta = 0.3025
gamma = 0.6
eta=0.1
[../]
[./inertia_y]
type = InertialForce
variable = disp_y
velocity = vel_y
acceleration = accel_y
beta = 0.3025
gamma = 0.6
eta=0.1
[../]
[./inertia_z]
type = InertialForce
variable = disp_z
velocity = vel_z
acceleration = accel_z
beta = 0.3025
gamma = 0.6
eta = 0.1
[../]
[]
[AuxKernels]
[./accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.3025
execute_on = timestep_end
[../]
[./vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.6
execute_on = timestep_end
[../]
[./accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.3025
execute_on = timestep_end
[../]
[./vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.6
execute_on = timestep_end
[../]
[./accel_z]
type = NewmarkAccelAux
variable = accel_z
displacement = disp_z
velocity = vel_z
beta = 0.3025
execute_on = timestep_end
[../]
[./vel_z]
type = NewmarkVelAux
variable = vel_z
acceleration = accel_z
gamma = 0.6
execute_on = timestep_end
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 0
index_j = 1
[../]
[./strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yy
index_i = 0
index_j = 1
[../]
[]
[BCs]
[./top_y]
type = DirichletBC
variable = disp_y
boundary = top
value=0.0
[../]
[./top_x]
type = DirichletBC
variable = disp_x
boundary = top
value=0.0
[../]
[./top_z]
type = DirichletBC
variable = disp_z
boundary = top
value=0.0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = right
value=0.0
[../]
[./right_z]
type = DirichletBC
variable = disp_z
boundary = right
value=0.0
[../]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = left
value=0.0
[../]
[./left_z]
type = DirichletBC
variable = disp_z
boundary = left
value=0.0
[../]
[./front_x]
type = DirichletBC
variable = disp_x
boundary = front
value=0.0
[../]
[./front_z]
type = DirichletBC
variable = disp_z
boundary = front
value=0.0
[../]
[./back_x]
type = DirichletBC
variable = disp_x
boundary = back
value=0.0
[../]
[./back_z]
type = DirichletBC
variable = disp_z
boundary = back
value=0.0
[../]
[./bottom_x]
type = DirichletBC
variable = disp_x
boundary = bottom
value=0.0
[../]
[./bottom_z]
type = DirichletBC
variable = disp_z
boundary = bottom
value=0.0
[../]
[./bottom_y]
type = FunctionDirichletBC
variable = disp_y
boundary = bottom
function = displacement_bc
[../]
[]
[Materials]
[./Elasticity_tensor]
type = ComputeElasticityTensor
block = 0
fill_method = symmetric_isotropic
C_ijkl = '1 0'
[../]
[./strain]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[../]
[./stress]
type = ComputeLinearElasticStress
block = 0
[../]
[./density]
type = GenericConstantMaterial
block = 0
prop_names = 'density'
prop_values = '1'
[../]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 6.0
l_tol = 1e-12
nl_rel_tol = 1e-12
dt = 0.1
[]
[Functions]
[./displacement_bc]
type = PiecewiseLinear
data_file = 'sine_wave.csv'
format = columns
[../]
[]
[Postprocessors]
[./_dt]
type = TimestepSize
[../]
[./disp_1]
type = NodalVariableValue
nodeid = 1
variable = disp_y
[../]
[./disp_2]
type = NodalVariableValue
nodeid = 3
variable = disp_y
[../]
[./disp_3]
type = NodalVariableValue
nodeid = 10
variable = disp_y
[../]
[./disp_4]
type = NodalVariableValue
nodeid = 14
variable = disp_y
[../]
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/stochastic_tools/test/tests/functions/drl_reward/drl_reward.i)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
xmin = 0.0
xmax = 7.0
nx = 3
[]
[]
[Variables]
[temp]
initial_condition = 300
[]
[]
[Kernels]
[time]
type = CoefTimeDerivative
variable = temp
Coefficient = '${fparse 1.00630182*1.225}'
[]
[heat_conduc]
type = MatDiffusion
variable = temp
diffusivity = 'k'
[]
[]
[BCs]
[dirichlet]
type = FunctionDirichletBC
function = "200"
variable = temp
boundary = 'right'
[]
[]
[Functions]
[design_function]
type = ParsedFunction
value = 't/3600*297'
[]
[reward_function]
type = ScaledAbsDifferenceDRLRewardFunction
design_function = design_function
observed_value = center_temp_tend
c1 = 1
c2 = 10
[]
[]
[Materials]
[constant]
type = GenericConstantMaterial
prop_names = 'k'
prop_values = 26.53832364
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-8
start_time = 0.0
end_time = 3600
dt = 1800
[]
[Postprocessors]
[center_temp_tend]
type = PointValue
variable = temp
point = '3.5 0.0 0.0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[reward]
type = FunctionValuePostprocessor
function = reward_function
execute_on = 'INITIAL TIMESTEP_END'
indirect_dependencies = 'center_temp_tend'
[]
[]
[Outputs]
csv = true
[]
(modules/chemical_reactions/test/tests/aqueous_equilibrium/2species_without_action.i)
# Simple equilibrium reaction example to illustrate the use of the AqueousEquilibriumReactions
# action.
# In this example, two primary species a and b are transported by diffusion and convection
# from the left of the porous medium, reacting to form two equilibrium species pa2 and pab
# according to the equilibrium reaction specified in the AqueousEquilibriumReactions block as:
#
# reactions = '2a = pa2 2
# a + b = pab -2'
#
# where the 2 is the weight of the equilibrium species, the 2 on the RHS of the first reaction
# refers to the equilibrium constant (log10(Keq) = 2), and the -2 on the RHS of the second
# reaction equates to log10(Keq) = -2.
#
# This example is identical to 2species.i, except that it explicitly includes all AuxKernels
# and Kernels that are set up by the action in 2species.i
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
[]
[Variables]
[./a]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[../]
[../]
[./b]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[../]
[../]
[]
[AuxVariables]
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[./pa2]
[../]
[./pab]
[../]
[]
[AuxKernels]
[./pa2eq]
type = AqueousEquilibriumRxnAux
variable = pa2
v = a
sto_v = 2
log_k = 2
[../]
[./pabeq]
type = AqueousEquilibriumRxnAux
variable = pab
v = 'a b'
sto_v = '1 1'
log_k = -2
[../]
[]
[ICs]
[./pressure]
type = FunctionIC
variable = pressure
function = 2-x
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./a_diff]
type = PrimaryDiffusion
variable = a
[../]
[./a_conv]
type = PrimaryConvection
variable = a
p = pressure
[../]
[./b_ie]
type = PrimaryTimeDerivative
variable = b
[../]
[./b_diff]
type = PrimaryDiffusion
variable = b
[../]
[./b_conv]
type = PrimaryConvection
variable = b
p = pressure
[../]
[./a1eq]
type = CoupledBEEquilibriumSub
variable = a
log_k = 2
weight = 2
sto_u = 2
[../]
[./a1diff]
type = CoupledDiffusionReactionSub
variable = a
log_k = 2
weight = 2
sto_u = 2
[../]
[./a1conv]
type = CoupledConvectionReactionSub
variable = a
log_k = 2
weight = 2
sto_u = 2
p = pressure
[../]
[./a2eq]
type = CoupledBEEquilibriumSub
variable = a
v = b
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
[../]
[./a2diff]
type = CoupledDiffusionReactionSub
variable = a
v = b
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
[../]
[./a2conv]
type = CoupledConvectionReactionSub
variable = a
v = b
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
p = pressure
[../]
[./b2eq]
type = CoupledBEEquilibriumSub
variable = b
v = a
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
[../]
[./b2diff]
type = CoupledDiffusionReactionSub
variable = b
v = a
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
[../]
[./b2conv]
type = CoupledConvectionReactionSub
variable = b
v = a
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
p = pressure
[../]
[]
[BCs]
[./a_left]
type = DirichletBC
variable = a
boundary = left
value = 1.0e-2
[../]
[./a_right]
type = ChemicalOutFlowBC
variable = a
boundary = right
[../]
[./b_left]
type = DirichletBC
variable = b
boundary = left
value = 1.0e-2
[../]
[./b_right]
type = ChemicalOutFlowBC
variable = b
boundary = right
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity'
prop_values = '1e-4 1e-4 0.2'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-12
start_time = 0.0
end_time = 100
dt = 10.0
[]
[Outputs]
file_base = 2species_out
exodus = true
perf_graph = true
print_linear_residuals = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
(modules/solid_mechanics/test/tests/action/composite_eigenstrain.i)
# The primary purpose of this test is to verify that the ability to combine
# multiple eigenstrains works correctly. It should behave identically to the
# constant_expansion_coeff.i model in the thermal_expansion directory. Instead
# of having the eigenstrain names passed directly to the SolidMechanics QuasiStatic Physics,
# the QuasiStatic Physics should be able to extract the necessary eigenstrains and apply
# to their respective blocks without reduncacy.
# This test involves only thermal expansion strains on a 2x2x2 cube of approximate
# steel material. An initial temperature of 25 degrees C is given for the material,
# and an auxkernel is used to calculate the temperature in the entire cube to
# raise the temperature each time step. After the first timestep,in which the
# temperature jumps, the temperature increases by 6.25C each timestep.
# The thermal strain increment should therefore be
# 6.25 C * 1.3e-5 1/C = 8.125e-5 m/m.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
ny = 2
nz = 2
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[./temp]
[../]
[./c]
[../]
[]
[Problem]
solve = false
[]
[ICs]
[./InitialCondition]
type = ConstantIC
value = 1
variable = c
[../]
[]
[Functions]
[./temperature_load]
type = ParsedFunction
expression = t*(500.0)+300.0
[../]
[]
[Physics/SolidMechanics/QuasiStatic]
[./solid]
strain = SMALL
incremental = true
add_variables = true
automatic_eigenstrain_names = true
generate_output = 'strain_xx strain_yy strain_zz'
[../]
[]
[AuxKernels]
[./tempfuncaux]
type = FunctionAux
variable = temp
function = temperature_load
[../]
[]
[BCs]
[./x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./z_bot]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2.1e5
poissons_ratio = 0.3
[../]
[./small_stress]
type = ComputeFiniteStrainElasticStress
[../]
[./thermal_expansion_strain1]
type = ComputeThermalExpansionEigenstrain
stress_free_temperature = 298
thermal_expansion_coeff = 1.0e-5
temperature = temp
eigenstrain_name = eigenstrain1
[../]
[./thermal_expansion_strain2]
type = ComputeThermalExpansionEigenstrain
stress_free_temperature = 298
thermal_expansion_coeff = 0.3e-5
temperature = temp
eigenstrain_name = eigenstrain2
[../]
[./composite]
type = CompositeEigenstrain
tensors = ' eigenstrain1 eigenstrain2'
weights = 'weight1 weight2'
eigenstrain_name = 'eigenstrain'
coupled_variables = c
[../]
[./weights]
type = GenericConstantMaterial
prop_names = 'weight1 weight2'
prop_values = '1.0 1.0'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
l_max_its = 50
nl_max_its = 50
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
end_time = 0.075
dt = 0.0125
dtmin = 0.0001
[]
[Outputs]
exodus = true
checkpoint = true
[]
[Postprocessors]
[./strain_xx]
type = ElementAverageValue
variable = strain_xx
block = 0
[../]
[./strain_yy]
type = ElementAverageValue
variable = strain_yy
block = 0
[../]
[./strain_zz]
type = ElementAverageValue
variable = strain_zz
block = 0
[../]
[./temperature]
type = AverageNodalVariableValue
variable = temp
block = 0
[../]
[]
(modules/navier_stokes/test/tests/finite_element/ins/jeffery_hamel/wedge_natural.i)
# This input file solves the Jeffery-Hamel problem with the exact
# solution's outlet BC replaced by a natural BC. This problem does
# not converge to the analytical solution, although the flow at the
# outlet still "looks" reasonable.
[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 = wedge_8x12.e
[]
[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'
function = 'vel_x_exact'
[../]
[./vel_y_inlet]
type = FunctionDirichletBC
variable = vel_y
boundary = 'inlet'
function = 'vel_y_exact'
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 1
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[]
[Preconditioning]
[./SMP_NEWTON]
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=15deg, Re=30. Note: this introduces an input file
# ordering dependency: this Function must appear *before* the two
# function 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
[../]
[]
(modules/phase_field/test/tests/free_energy_material/MathEBFreeEnergy_split_name.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
xmin = 0.0
xmax = 30.0
ymin = 0.0
ymax = 30.0
elem_type = QUAD4
[]
[Variables]
[d]
[InitialCondition]
type = CrossIC
x1 = 0.0
x2 = 30.0
y1 = 0.0
y2 = 30.0
[]
[]
[w]
[]
[]
[AuxVariables]
[c]
[]
[]
[AuxKernels]
[c]
type = ProjectionAux
variable = c
v = d
execute_on = 'INITIAL TIMESTEP_END FINAL'
[]
[]
[Preconditioning]
active = 'SMP'
[PBP]
type = PBP
solve_order = 'w d'
preconditioner = 'AMG ASM'
off_diag_row = 'd '
off_diag_column = 'w '
[]
[SMP]
type = SMP
off_diag_row = 'w d'
off_diag_column = 'd w'
[]
[]
[Kernels]
[cres]
type = SplitCHParsed
variable = d
kappa_name = kappa_c
w = w
f_name = F
[]
[wres]
type = SplitCHWRes
variable = w
mob_name = M
[]
[time]
type = CoupledTimeDerivative
variable = w
v = d
[]
[]
[BCs]
[Periodic]
[top_bottom]
primary = 0
secondary = 2
translation = '0 30.0 0'
[]
[left_right]
primary = 1
secondary = 3
translation = '-30.0 0 0'
[]
[]
[]
[Materials]
[constant]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1.0 2.0'
[]
[free_energy]
type = MathEBFreeEnergy
property_name = F
c = d
[]
[]
[Executioner]
type = Transient
scheme = 'BDF2'
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
l_max_its = 30
l_tol = 1.0e-3
nl_max_its = 50
nl_rel_tol = 1.0e-10
dt = 10.0
num_steps = 2
[]
[Outputs]
exodus = true
hide = d
[]
(modules/phase_field/test/tests/rigidbodymotion/grain_maskedforce.i)
# test file for showing pinning of grains
[GlobalParams]
var_name_base = eta
op_num = 2
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 15
nz = 0
xmax = 50
ymax = 25
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SpecifiedSmoothCircleIC
invalue = 1.0
outvalue = 0.1
int_width = 4.0
x_positions = '20.0 30.0 '
z_positions = '0.0 0.0 '
y_positions = '0.0 25.0 '
radii = '10.0 10.0'
3D_spheres = false
variable = c
block = 0
[../]
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./motion]
type = MultiGrainRigidBodyMotion
c = c
variable = w
v = 'eta0 eta1'
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
block = 0
prop_names = 'M kappa_c kappa_eta'
prop_values = '5.0 2.0 0.1'
[../]
[./free_energy]
type = DerivativeParsedMaterial
block = 0
property_name = F
coupled_variables = c
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 1.0e-2'
expression = 16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2
derivative_order = 2
[../]
[]
[AuxVariables]
[./eta0]
[../]
[./eta1]
[../]
[./bnds]
[../]
[]
[AuxKernels]
[./bnds]
type = BndsCalcAux
variable = bnds
var_name_base = eta
op_num = 2
v = 'eta0 eta1'
block = 0
[../]
[]
[ICs]
[./ic_eta0]
int_width = 4.0
x1 = 20.0
y1 = 0.0
radius = 10.0
outvalue = 0.0
variable = eta0
invalue = 1.0
type = SmoothCircleIC
[../]
[./IC_eta1]
int_width = 4.0
x1 = 30.0
y1 = 25.0
radius = 10.0
outvalue = 0.0
variable = eta1
invalue = 1.0
type = SmoothCircleIC
[../]
[]
[VectorPostprocessors]
[./forces_cosnt]
type = GrainForcesPostprocessor
grain_force = grain_force_const
[../]
[./forces_total]
type = GrainForcesPostprocessor
grain_force = grain_force
[../]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_center
execute_on = 'initial timestep_begin'
[../]
[]
[UserObjects]
[./grain_center]
type = GrainTracker
outputs = none
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
[../]
[./grain_force_const]
type = ConstantGrainForceAndTorque
execute_on = 'linear nonlinear'
force = '5.0 10.0 0.0 1.0 0.0 0.0'
torque = '0.0 0.0 50.0 0.0 0.0 5.0'
[../]
[./grain_force]
type = MaskedGrainForceAndTorque
grain_force = grain_force_const
pinned_grains = 0
execute_on = 'linear nonlinear'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
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 = 20
nl_max_its = 20
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 1
dt = 1.0
[]
[Outputs]
exodus = true
csv = true
[]
(modules/xfem/test/tests/switching_material/one_cut_moving_using_mesh_cut.i)
[Problem]
solve = false
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[cut]
type = InterfaceMeshCut2DUserObject
mesh_file = line.e
interface_velocity_function = 1
negative_id = 1
positive_id = 33
heal_always = true
[]
[]
[Mesh]
[square]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
[]
[]
[AuxVariables]
[phi]
[]
[cut_id]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[cut_id]
type = CutSubdomainIDAux
variable = cut_id
cut = cut
[]
[]
[Materials]
[diffusivity_A]
type = GenericConstantMaterial
prop_names = 'A_D'
prop_values = '5'
[]
[diffusivity_B]
type = GenericConstantMaterial
prop_names = 'B_D'
prop_values = '0.5'
[]
[diff_combined]
type = XFEMCutSwitchingMaterialReal
cut_subdomain_ids = '1 33'
base_names = 'A B'
prop_name = D
geometric_cut_userobject = cut
outputs = 'exodus'
output_properties = 'D'
[]
[]
[Executioner]
type = Transient
dt = 0.25
num_steps = 2
max_xfem_update = 1
[]
[Outputs]
exodus = true
[]
(modules/combined/examples/stochastic/graphite_ring_thermomechanics.i)
# Generate 1/4 of a 2-ring disk and extrude it by half to obtain
# 1/8 of a 3D tube. Mirror boundary conditions will exist on the
# cut portions.
[Mesh]
[disk]
type = ConcentricCircleMeshGenerator
num_sectors = 10
radii = '1.0 1.1 1.2'
rings = '1 1 1'
has_outer_square = false
preserve_volumes = false
portion = top_right
[]
[ring]
type = BlockDeletionGenerator
input = disk
block = 1
new_boundary = 'inner'
[]
[cylinder]
type = MeshExtruderGenerator
input = ring
extrusion_vector = '0 0 1.5'
num_layers = 15
bottom_sideset = 'back'
top_sideset = 'front'
[]
[]
[Variables]
[T]
initial_condition = 300
[]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[Kernels]
[hc]
type = HeatConduction
variable = T
[]
[TensorMechanics]
displacements = 'disp_x disp_y disp_z'
[]
[]
[BCs]
[temp_inner]
type = FunctionNeumannBC
variable = T
boundary = 'inner'
function = surface_source
[]
[temp_front]
type = ConvectiveHeatFluxBC
variable = T
boundary = 'front'
T_infinity = 300
heat_transfer_coefficient = 10
[]
[temp_outer]
type = ConvectiveHeatFluxBC
variable = T
boundary = 'outer'
T_infinity = 300
heat_transfer_coefficient = 10
[]
# mirror boundary conditions.
[disp_x]
type = DirichletBC
variable = disp_x
boundary = 'left'
value = 0.0
[]
[disp_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0.0
[]
[disp_z]
type = DirichletBC
variable = disp_z
boundary = 'back'
value = 0.0
[]
[]
[Materials]
[cond_inner]
type = GenericConstantMaterial
block = 2
prop_names = thermal_conductivity
prop_values = 25
[]
[cond_outer]
type = GenericConstantMaterial
block = 3
prop_names = thermal_conductivity
prop_values = 100
[]
[elasticity_tensor_inner]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2.1e5
poissons_ratio = 0.3
block = 2
[]
[elasticity_tensor_outer]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 3.1e5
poissons_ratio = 0.2
block = 3
[]
[thermal_strain_inner]
type = ComputeThermalExpansionEigenstrain
thermal_expansion_coeff = 2e-6
temperature = T
stress_free_temperature = 300
eigenstrain_name = eigenstrain_inner
block = 2
[]
[thermal_strain_outer]
type = ComputeThermalExpansionEigenstrain
thermal_expansion_coeff = 1e-6
temperature = T
stress_free_temperature = 300
eigenstrain_name = eigenstrain_outer
block = 3
[]
[strain_inner] #We use small deformation mechanics
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
eigenstrain_names = 'eigenstrain_inner'
block = 2
[]
[strain_outer] #We use small deformation mechanics
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
eigenstrain_names = 'eigenstrain_outer'
block = 3
[]
[stress] #We use linear elasticity
type = ComputeLinearElasticStress
[]
[]
[Functions]
[surface_source]
type = ParsedFunction
expression = 'Q_t*pi/2.0/3.0 * cos(pi/3.0*z)'
symbol_names = 'Q_t'
symbol_values = heat_source
[]
[]
[Executioner]
type = Steady
#Preconditioned JFNK (default)
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 = 100
nl_abs_tol = 1e-9
l_tol = 1e-04
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[VectorPostprocessors]
[temp_center]
type = LineValueSampler
variable = T
start_point = '1 0 0'
end_point = '1.2 0 0'
num_points = 11
sort_by = 'x'
[]
[temp_end]
type = LineValueSampler
variable = T
start_point = '1 0 1.5'
end_point = '1.2 0 1.5'
num_points = 11
sort_by = 'x'
[]
[dispx_center]
type = LineValueSampler
variable = disp_x
start_point = '1 0 0'
end_point = '1.2 0 0'
num_points = 11
sort_by = 'x'
[]
[dispx_end]
type = LineValueSampler
variable = disp_x
start_point = '1 0 1.5'
end_point = '1.2 0 1.5'
num_points = 11
sort_by = 'x'
[]
[dispz_end]
type = LineValueSampler
variable = disp_z
start_point = '1 0 1.5'
end_point = '1.2 0 1.5'
num_points = 11
sort_by = 'x'
[]
[]
[Postprocessors]
[heat_source]
type = FunctionValuePostprocessor
function = 1
scale_factor = 10000
execute_on = linear
[]
[temp_center_inner]
type = PointValue
variable = T
point = '1 0 0'
[]
[temp_center_outer]
type = PointValue
variable = T
point = '1.2 0 0'
[]
[temp_end_inner]
type = PointValue
variable = T
point = '1 0 1.5'
[]
[temp_end_outer]
type = PointValue
variable = T
point = '1.2 0 1.5'
[]
[dispx_center_inner]
type = PointValue
variable = disp_x
point = '1 0 0'
[]
[dispx_center_outer]
type = PointValue
variable = disp_x
point = '1.2 0 0'
[]
[dispx_end_inner]
type = PointValue
variable = disp_x
point = '1 0 1.5'
[]
[dispx_end_outer]
type = PointValue
variable = disp_x
point = '1.2 0 1.5'
[]
[dispz_inner]
type = PointValue
variable = disp_z
point = '1 0 1.5'
[]
[dispz_outer]
type = PointValue
variable = disp_z
point = '1.2 0 1.5'
[]
[]
[Outputs]
exodus = false
csv = false
[]
(test/tests/materials/material/material_check_test.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 4
ny = 4
[]
[./block_1]
input = gen
type = SubdomainBoundingBoxGenerator
top_right = '0.5 0.5 0'
bottom_left = '0 0 0'
block_id = 1
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./mat]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./mat]
type = MaterialRealAux
variable = mat
property = prop
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 3
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
block = 1
prop_names = prop
prop_values = 1
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
[]
[Outputs]
file_base = out
[./exodus]
type = Exodus
elemental_as_nodal = true
[../]
[]
(modules/heat_transfer/test/tests/code_verification/spherical_test_no2.i)
# Problem III.2
#
# A spherical shell has a thermal conductivity that varies linearly
# with temperature. The inside and outside surfaces of the shell are
# exposed to constant temperatures.
#
# REFERENCE:
# A. Toptan, et al. (Mar.2020). Tech. rep. CASL-U-2020-1939-000, SAND2020-3887 R. DOI:10.2172/1614683.
[Mesh]
[./geom]
type = GeneratedMeshGenerator
dim = 1
elem_type = EDGE2
xmin = 0.2
nx = 4
[../]
[]
[Variables]
[./u]
order = FIRST
[../]
[]
[Problem]
coord_type = RSPHERICAL
[]
[Functions]
[./exact]
type = ParsedFunction
symbol_names = 'ri ro beta ki ko ui uo'
symbol_values = '0.2 1.0 1e-3 5.3 5 300 0'
expression = 'uo+(ko/beta)* ( ( 1 + beta*(ki+ko)*(ui-uo)*( (1/x-1/ro) / (1/ri-1/ro) )/(ko^2))^0.5 -1 )'
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = u
[../]
[]
[BCs]
[./ui]
type = DirichletBC
boundary = left
variable = u
value = 300
[../]
[./uo]
type = DirichletBC
boundary = right
variable = u
value = 0
[../]
[]
[Materials]
[./property]
type = GenericConstantMaterial
prop_names = 'density specific_heat'
prop_values = '1.0 1.0'
[../]
[./thermal_conductivity]
type = ParsedMaterial
property_name = 'thermal_conductivity'
coupled_variables = u
expression = '5 + 1e-3 * (u-0)'
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = exact
variable = u
[../]
[./h]
type = AverageElementSize
[]
[]
[Outputs]
csv = 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/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_by_parts_steady.i)
[GlobalParams]
integrate_p_by_parts = true
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[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
[../]
[./p]
[../]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[./momentum_convection]
type = INSADMomentumAdvection
variable = velocity
[../]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
[../]
[]
[BCs]
[inlet]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom'
function_x = 0
function_y = 'inlet_func'
[../]
[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
[]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[ins_mat]
type = INSADMaterial
velocity = velocity
pressure = p
[]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[../]
[]
(modules/stochastic_tools/examples/sobol/diffusion.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables/T]
initial_condition = 300
[]
[Kernels]
[time]
type = ADTimeDerivative
variable = T
[]
[diff]
type = ADMatDiffusion
variable = T
diffusivity = diffusivity
[]
[source]
type = ADBodyForce
variable = T
value = 100
function = 1
[]
[]
[BCs]
[left]
type = ADDirichletBC
variable = T
boundary = left
value = 300
[]
[right]
type = ADNeumannBC
variable = T
boundary = right
value = -100
[]
[]
[Materials/constant]
type = ADGenericConstantMaterial
prop_names = 'diffusivity'
prop_values = 1
[]
[Executioner]
type = Transient
solve_type = NEWTON
num_steps = 4
dt = 0.25
[]
[Postprocessors]
[T_avg]
type = ElementAverageValue
variable = T
execute_on = 'initial timestep_end'
[]
[q_left]
type = ADSideDiffusiveFluxAverage
variable = T
boundary = left
diffusivity = diffusivity
execute_on = 'initial timestep_end'
[]
[]
[Controls/stochastic]
type = SamplerReceiver
[]
[Outputs]
[]
(modules/combined/examples/publications/rapid_dev/fig7b.i)
#
# Fig. 7 input for 10.1016/j.commatsci.2017.02.017
# D. Schwen et al./Computational Materials Science 132 (2017) 36-45
# Dashed black curve (2)
# Eigenstrain is globally applied. Single global elastic free energies.
# Supply the RADIUS parameter (10-35) on the command line to generate data
# for all curves in the plot.
#
[Mesh]
type = GeneratedMesh
dim = 1
nx = 32
xmin = 0
xmax = 100
second_order = true
[]
[Problem]
coord_type = RSPHERICAL
[]
[GlobalParams]
displacements = 'disp_r'
[]
[Functions]
[./diff]
type = ParsedFunction
expression = '${RADIUS}-pos_c'
symbol_names = pos_c
symbol_values = pos_c
[../]
[]
# 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'
execute_on = 'INITIAL TIMESTEP_END'
[../]
[]
[Variables]
# Solute concentration variable
[./c]
[./InitialCondition]
type = SmoothCircleIC
invalue = 1
outvalue = 0
x1 = 0
y1 = 0
radius = ${RADIUS}
int_width = 3
[../]
[../]
[./w]
[../]
# Phase order parameter
[./eta]
[./InitialCondition]
type = SmoothCircleIC
invalue = 1
outvalue = 0
x1 = 0
y1 = 0
radius = ${RADIUS}
int_width = 3
[../]
[../]
[./Fe_fit]
order = SECOND
[../]
[]
[Modules/TensorMechanics/Master/all]
add_variables = true
eigenstrain_names = eigenstrain
[]
[Kernels]
# Split Cahn-Hilliard kernels
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
args = 'eta'
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
[./detadt]
type = TimeDerivative
variable = eta
[../]
[./ACBulk1]
type = AllenCahn
variable = eta
args = 'c'
mob_name = L
f_name = F
[../]
[./ACInterface]
type = ACInterface
variable = eta
mob_name = L
kappa_name = kappa_eta
[../]
[./Fe]
type = MaterialPropertyValue
prop_name = Fe
variable = Fe_fit
[../]
[./autoadjust]
type = MaskedBodyForce
variable = w
function = diff
mask = mask
[../]
[]
[Materials]
# declare a few constants, such as mobilities (L,M) and interface gradient prefactors (kappa*)
[./consts]
type = GenericConstantMaterial
prop_names = 'M L kappa_c kappa_eta'
prop_values = '1.0 1.0 0.5 1'
[../]
# forcing function mask
[./mask]
type = ParsedMaterial
property_name = mask
expression = grad/dt
material_property_names = 'grad dt'
[../]
[./grad]
type = VariableGradientMaterial
variable = c
prop = grad
[../]
[./time]
type = TimeStepMaterial
[../]
# global mechanical properties
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1'
fill_method = symmetric_isotropic
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
# eigenstrain as a function of phase
[./eigenstrain]
type = ComputeVariableEigenstrain
eigen_base = '0.05 0.05 0.05 0 0 0'
prefactor = h
args = eta
eigenstrain_name = eigenstrain
[../]
# switching functions
[./switching]
type = SwitchingFunctionMaterial
function_name = h
eta = eta
h_order = SIMPLE
[../]
[./barrier]
type = BarrierFunctionMaterial
eta = eta
[../]
# chemical free energies
[./chemical_free_energy_1]
type = DerivativeParsedMaterial
property_name = Fc1
expression = 'c^2'
coupled_variables = 'c'
derivative_order = 2
[../]
[./chemical_free_energy_2]
type = DerivativeParsedMaterial
property_name = Fc2
expression = '(1-c)^2'
coupled_variables = 'c'
derivative_order = 2
[../]
# global chemical free energy
[./chemical_free_energy]
type = DerivativeTwoPhaseMaterial
f_name = Fc
fa_name = Fc1
fb_name = Fc2
eta = eta
args = 'c'
W = 4
[../]
# global elastic free energy
[./elastic_free_energy]
type = ElasticEnergyMaterial
f_name = Fe
args = 'eta'
output_properties = Fe
derivative_order = 2
[../]
# free energy
[./free_energy]
type = DerivativeSumMaterial
property_name = F
sum_materials = 'Fc Fe'
coupled_variables = 'c eta'
derivative_order = 2
[../]
[]
[BCs]
[./left_r]
type = DirichletBC
variable = disp_r
boundary = 'left'
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'
outputs = 'table console'
[../]
[./total_solute]
type = ElementIntegralVariablePostprocessor
variable = c
execute_on = 'INITIAL TIMESTEP_END'
outputs = 'table console'
[../]
[./pos_c]
type = FindValueOnLine
start_point = '0 0 0'
end_point = '100 0 0'
v = c
target = 0.582
tol = 1e-8
execute_on = 'INITIAL TIMESTEP_END'
outputs = 'table console'
[../]
[./pos_eta]
type = FindValueOnLine
start_point = '0 0 0'
end_point = '100 0 0'
v = eta
target = 0.5
tol = 1e-8
execute_on = 'INITIAL TIMESTEP_END'
outputs = 'table console'
[../]
[./c_min]
type = ElementExtremeValue
value_type = min
variable = c
execute_on = 'INITIAL TIMESTEP_END'
outputs = 'table console'
[../]
[]
[VectorPostprocessors]
[./line]
type = LineValueSampler
variable = 'Fe_fit c w'
start_point = '0 0 0'
end_point = '100 0 0'
num_points = 5000
sort_by = x
outputs = vpp
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 = 15
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 2.0e-9
start_time = 0.0
end_time = 100000.0
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 8
iteration_window = 1
dt = 1
[../]
[./Adaptivity]
initial_adaptivity = 5
interval = 10
max_h_level = 5
refine_fraction = 0.9
coarsen_fraction = 0.1
[../]
[]
[Outputs]
print_linear_residuals = false
perf_graph = true
execute_on = 'INITIAL TIMESTEP_END'
[./table]
type = CSV
delimiter = ' '
file_base = radius_${RADIUS}/eigenstrain_pp
[../]
[./vpp]
type = CSV
delimiter = ' '
sync_times = '10 50 100 500 1000 5000 10000 50000 100000'
sync_only = true
time_data = true
file_base = radius_${RADIUS}/eigenstrain_vpp
[../]
[]
(modules/thermal_hydraulics/test/tests/components/heat_source_from_total_power/phy.conservation_from_file_3d.i)
# Tests energy conservation for HeatStructureFromFile3D in combination with HeatSourceFromTotalPower
power = 1e5
power_fraction = 0.3
t = 1
energy_change = ${fparse power_fraction * power * t}
[Functions]
[power_shape]
type = ConstantFunction
value = 0.4
[]
[]
[Materials]
[mat]
type = ADGenericConstantMaterial
block = 'heat_structure:rgn1 heat_structure:rgn2'
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '100 500 1e4'
[]
[]
[Components]
[heat_structure]
type = HeatStructureFromFile3D
file = box.e
position = '0 0 0'
initial_T = 300
[]
[heat_generation]
type = HeatSourceFromTotalPower
hs = heat_structure
regions = 'rgn1'
power = total_power
power_fraction = ${power_fraction}
[]
[total_power]
type = TotalPower
power = ${power}
[]
[]
[Postprocessors]
[E_tot]
type = ADHeatStructureEnergy3D
block = 'heat_structure:rgn1 heat_structure:rgn2'
execute_on = 'initial timestep_end'
[]
[E_tot_change]
type = ChangeOverTimePostprocessor
change_with_respect_to_initial = true
postprocessor = E_tot
execute_on = 'initial timestep_end'
[]
[E_tot_change_rel_err]
type = RelativeDifferencePostprocessor
value1 = E_tot_change
value2 = ${energy_change}
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
line_search = 'basic'
nl_rel_tol = 0
nl_abs_tol = 1e-6
nl_max_its = 15
l_tol = 1e-3
l_max_its = 10
start_time = 0.0
dt = ${t}
num_steps = 1
abort_on_solve_fail = true
[]
[Outputs]
csv = true
show = 'E_tot_change_rel_err'
execute_on = 'final'
[]
(modules/contact/test/tests/mortar_dynamics/block-dynamics-friction.i)
starting_point = 2e-1
offset = -0.19
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
allow_renumbering = false
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[mechanical_normal_lm]
block = 3
use_dual = true
[]
[mechanical_tangential_lm]
block = 3
use_dual = true
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[DynamicTensorMechanics]
displacements = 'disp_x disp_y'
generate_output = 'stress_xx stress_yy'
strain = FINITE
block = '1 2'
stiffness_damping_coefficient = 0.05
hht_alpha = 0.0
[]
[inertia_x]
type = InertialForce
variable = disp_x
velocity = vel_x
acceleration = accel_x
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[inertia_y]
type = InertialForce
variable = disp_y
velocity = vel_y
acceleration = accel_y
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[strain]
type = ComputeFiniteStrain
block = '1 2'
[]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '7750'
[]
[]
[AuxVariables]
[vel_x]
block = '1 2'
[]
[accel_x]
block = '1 2'
[]
[vel_y]
block = '1 2'
[]
[accel_y]
block = '1 2'
[]
[vel_z]
block = '1 2'
[]
[accel_z]
block = '1 2'
[]
[gap]
block = 3
[]
[]
[AuxKernels]
[gap]
type = WeightedGapAux
variable = gap
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
use_displaced_mesh = true
[]
[accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = 'LINEAR timestep_end'
[]
[vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = 'LINEAR timestep_end'
[]
[accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = 'LINEAR timestep_end'
[]
[vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = 'LINEAR timestep_end'
[]
[]
# User object provides the contact force (e.g. LM)
# for the application of the generalized force
[UserObjects]
[weighted_vel_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
lm_variable_normal = mechanical_normal_lm
lm_variable_tangential_one = mechanical_tangential_lm
secondary_variable = disp_x
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeDynamicFrictionalForceLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = mechanical_normal_lm
friction_lm = mechanical_tangential_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
c = 1e4
c_t = 1e4
mu = 0.5
newmark_beta = 0.25
newmark_gamma = 0.5
capture_tolerance = 1.0e-5
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = mechanical_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = mechanical_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = mechanical_tangential_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = mechanical_tangential_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 4 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 30 # 50
function = '0' # '1e-2*t'
[]
[]
[Executioner]
type = Transient
end_time = 75
dt = 0.05
dtmin = .005
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err '
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
nl_max_its = 50
line_search = 'none'
snesmf_reuse_base = false
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
csv = true
checkpoint = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[mechanical_tangential_lm]
type = NodalValueSampler
block = '3'
variable = mechanical_tangential_lm
sort_by = 'x'
execute_on = TIMESTEP_END
[]
[]
(modules/xfem/test/tests/moving_interface/verification/1D_xy_lsdep1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: quasi-1D
# Coordinate System: xy
# Material Numbers/Types: level set dep 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description:
# A simple transient heat transfer problem in Cartesian coordinates designed
# with the Method of Manufactured Solutions. This problem was developed to
# verify XFEM performance in the presence of a moving interface for linear
# element models that can be exactly evaluated by FEM/Moose. Both the
# temperature solution and level set function are designed to be linear to
# attempt to minimize error between the Moose/exact solution and XFEM results.
# Thermal conductivity is dependent upon the value of the level set function
# at each timestep.
# Results:
# The temperature at the left boundary (x=0) exhibits the largest difference
# between the FEM/Moose solution and XFEM results. We present the XFEM
# results at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 479.9999722
# 0.6 520 519.9998726
# 0.8 560 559.9997314
# 1.0 600 599.9996885
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 1
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 0.5
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraint]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = 'rhoCp*(-200*x+200)-(0.05*200*t/1.04)'
symbol_names = 'rhoCp'
symbol_values = 10
[../]
[./neumann_func]
type = ParsedFunction
expression = '((0.05/1.04)*(1-(x-0.04)-0.2*t) + 1.5)*200*t'
[../]
[./k_func]
type = ParsedFunction
expression = '(0.05/1.04)*(1-(x-0.04)-0.2*t) + 1.5'
[../]
[./ls_func]
type = ParsedFunction
expression = '1.04 - x - 0.2*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericFunctionMaterial
prop_names = 'diffusion_coefficient'
prop_values = 'k_func'
[../]
[]
[BCs]
[./left_u]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 'right'
value = 400
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/phase_field/test/tests/GBType/GB_Type_Phase2.i)
# MOOSE input file
# Written by Pierre-Clement Simon - Idaho National Laboratory
#
# Project:
# TRISO fuel fission gas transport: Silver diffusion in silicon carbide
#
# Published with:
# ---
#
# Phase Field Model: Isotropic diffusion equation
# type: Steady-State
# Grain structure: Bicrystal with heterogeneous diffusion (higher in GBs than within grains)
# BCs: Periodic for AEH, flux and fix for direct method
# System: Ag in SiC with bulk and Gb diffusion from LLS
#
#
# Info:
# - Dimentional input file for the diffusion of a solute in a complex
# polycrystal
#
#
# Updates from previous file:
#
#
# Units
# length: nm
# time: s
# energy: --
# quantity: --
[Mesh]
file = 'GB_Type_Phase1_out.e'
[]
[GlobalParams]
op_num = 6
var_name_base = gr
[]
[UserObjects]
[./initial_grains]
type = SolutionUserObject
mesh = 'GB_Type_Phase1_out.e'
timestep = LATEST
[../]
[./grain_tracker]
type = GrainTracker
threshold = 0.2
connecting_threshold = 0.08
compute_var_to_feature_map = true
flood_entity_type = ELEMENTAL
compute_halo_maps = true # For displaying HALO fields
[../]
[]
[Variables]
[./cx_AEH] #composition used for the x-component of the AEH solve
initial_condition = 0.5
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
variable = 'cx_AEH'
[../]
[../]
[]
[AuxVariables]
[./gr0]
order = FIRST
family = LAGRANGE
[../]
[./gr1]
order = FIRST
family = LAGRANGE
[../]
[./gr2]
order = FIRST
family = LAGRANGE
[../]
[./gr3]
order = FIRST
family = LAGRANGE
[../]
[./gr4]
order = FIRST
family = LAGRANGE
[../]
[./gr5]
order = FIRST
family = LAGRANGE
[../]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[./bnds_LAGB]
order = FIRST
family = LAGRANGE
[../]
[./bnds_HAGB]
order = FIRST
family = LAGRANGE
[../]
[./gb_type]
order = CONSTANT
family = MONOMIAL
[../]
[./EBSD_grain]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./init_grO]
type = SolutionAux
execute_on = INITIAL
variable = gr0
solution = initial_grains
from_variable = gr0
[../]
[./init_gr1]
type = SolutionAux
execute_on = INITIAL
variable = gr1
solution = initial_grains
from_variable = gr1
[../]
[./init_gr2]
type = SolutionAux
execute_on = INITIAL
variable = gr2
solution = initial_grains
from_variable = gr2
[../]
[./init_gr3]
type = SolutionAux
execute_on = INITIAL
variable = gr3
solution = initial_grains
from_variable = gr3
[../]
[./init_gr4]
type = SolutionAux
execute_on = INITIAL
variable = gr4
solution = initial_grains
from_variable = gr4
[../]
[./init_gr5]
type = SolutionAux
execute_on = INITIAL
variable = gr5
solution = initial_grains
from_variable = gr5
[../]
[./init_EBSD_grain]
type = SolutionAux
execute_on = INITIAL
variable = EBSD_grain
solution = initial_grains
from_variable = ebsd_numbers
[../]
[./gb_type]
type = SolutionAux
execute_on = 'INITIAL TIMESTEP_END'
variable = gb_type
solution = initial_grains
from_variable = gb_type
[../]
[./bnds_aux]
# AuxKernel that calculates the GB term
type = BndsCalcAux
variable = bnds
execute_on = 'INITIAL TIMESTEP_END'
[../]
[./bnds_LAGB]
# Calculate the bnds for specific GB type
type = SolutionAuxMisorientationBoundary
variable = bnds_LAGB
gb_type_order = 1
solution = initial_grains
from_variable = gb_type
execute_on = 'INITIAL TIMESTEP_END'
[../]
[./bnds_HAGB]
# Calculate the bnds for specific GB type
type = SolutionAuxMisorientationBoundary
variable = bnds_HAGB
gb_type_order = 2
solution = initial_grains
from_variable = gb_type
execute_on = 'INITIAL TIMESTEP_END'
[../]
[]
[Kernels]
[./Diff_x]
type = MatDiffusion
diffusivity = D_Scaling
variable = cx_AEH
args = 'bnds'
[../]
[]
[Materials]
#=========================================================== Generic Constants
[./consts]
type = GenericConstantMaterial
prop_names = 'R T '
prop_values = '8.3145 1450'
# unit J.mol-1.K-1 K
[../]
[./consts_expected]
type = GenericConstantMaterial
prop_names = 'Db Dgbl Dgbh'
prop_values = '0.007 0.302 821.672'
# unit nm^2/s nm^2/s nm^2/s
outputs = exodus
[../]
#===================================================== Interpolation functions
[./hgb] # equal to 1 in grain boundaries, 0 elsewhere in grains.
type = DerivativeParsedMaterial
coupled_variables = 'bnds'
constant_names = 'bnds_middle width tanh_cst_x2'
constant_expressions = '0.75 0.0596 2.1972245773362196'
expression = '1-0.5*(1.0+tanh(tanh_cst_x2*(bnds-bnds_middle)/width))'
property_name = 'hgb'
outputs = exodus
[../]
[./hgb_lagb] # equal to 1 in grain boundaries, 0 elsewhere in grains.
type = DerivativeParsedMaterial
coupled_variables = 'bnds_LAGB'
constant_names = 'bnds_middle width tanh_cst_x2'
constant_expressions = '0.75 0.0596 2.1972245773362196'
expression = '1-0.5*(1.0+tanh(tanh_cst_x2*(bnds_LAGB-bnds_middle)/width))'
property_name = 'hgb_lagb'
outputs = exodus
[../]
[./hgb_hagb] # equal to 1 in grain boundaries, 0 elsewhere in grains.
type = DerivativeParsedMaterial
coupled_variables = 'bnds_HAGB'
constant_names = 'bnds_middle width tanh_cst_x2'
constant_expressions = '0.75 0.0596 2.1972245773362196'
expression = '1-0.5*(1.0+tanh(tanh_cst_x2*(bnds_HAGB-bnds_middle)/width))'
property_name = 'hgb_hagb'
outputs = exodus
[../]
#====================================================== Diffusion coefficients
#====================== Diffusion coefficients - Basic values and coefficients
[./Grain_boundary_width] # size of grain boundaries in input polycrystal, as well as length scales for domain size
type = GenericConstantMaterial
prop_names = 'wGB_ref wGB L '
prop_values = '1 6 9000'
# unit -- -- -- --
[../]
#============================================ Corrected Diffusion coefficients
#========================================================= Analytical 1 - 1x1y
[./Diffusion_coefficient_D]
type = DerivativeParsedMaterial
property_name = 'D_Scaling'
coupled_variables = 'bnds'
material_property_names = 'Db Dgbh Dgbl hgb_lagb(bnds_LAGB) hgb_hagb(bnds_HAGB) hgb(bnds)'
expression = '(1-hgb)*Db+hgb*hgb_lagb/(hgb_lagb+hgb_hagb)*Dgbl+hgb*hgb_hagb/(hgb_lagb+hgb_hagb)*Dgbh'
outputs = exodus
derivative_order = 2
[../]
[]
# It converges faster if all the residuals are at the same magnitude
[Debug]
show_var_residual_norms = true
[../]
[Preconditioning]
[./SMP]
type = SMP
off_diag_row = 'cx_AEH'
off_diag_column = 'cx_AEH'
[../]
[]
[Executioner]
type = Steady
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_max_its = 50
nl_max_its = 50
l_tol = 1e-04
l_abs_tol = 1e-50
nl_abs_tol = 1e-10
nl_rel_tol = 1e-10
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/navier_stokes/test/tests/postprocessors/flow_rates/conservation_INSFE.i)
[Mesh]
second_order = true
inactive = 'mesh internal_boundary_bot internal_boundary_top'
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '1'
dy = '1 1 1'
ix = '5'
iy = '5 5 5'
subdomain_id = '1
2
3'
[]
[internal_boundary_bot]
type = SideSetsBetweenSubdomainsGenerator
input = mesh
new_boundary = 'internal_bot'
primary_block = 1
paired_block = 2
[]
[internal_boundary_top]
type = SideSetsBetweenSubdomainsGenerator
input = internal_boundary_bot
new_boundary = 'internal_top'
primary_block = 2
paired_block = 3
[]
[diverging_mesh]
type = FileMeshGenerator
file = 'expansion_quad.e'
[]
[]
[Modules]
[IncompressibleNavierStokes]
equation_type = steady-state
# no slip BCs
velocity_boundary = 'bottom right left'
velocity_function = '0 1 0 0 0 0'
pressure_boundary = 'top'
pressure_function = '1'
density_name = rho
dynamic_viscosity_name = mu
integrate_p_by_parts = false
order = SECOND
[]
[]
[Materials]
[const]
type = GenericConstantMaterial
block = '1 2 3'
prop_names = 'rho mu'
prop_values = '1 1'
[]
[]
[FunctorMaterials]
[ADconst]
type = ADGenericFunctorMaterial
block = '1 2 3'
prop_names = 'rho_ad'
prop_values = '1'
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
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
[]
[Postprocessors]
[inlet_mass_constant]
type = VolumetricFlowRate
boundary = bottom
vel_x = vel_x
vel_y = vel_y
advected_variable = 1
[]
[inlet_mass_matprop]
type = VolumetricFlowRate
boundary = bottom
vel_x = vel_x
vel_y = vel_y
advected_mat_prop = 'rho_ad'
[]
[mid1_mass]
type = VolumetricFlowRate
boundary = internal_bot
vel_x = vel_x
vel_y = vel_y
[]
[other_mid1_mass]
type = VolumetricFlowRate
boundary = internal_bot
vel_x = vel_x
vel_y = vel_y
advected_mat_prop = 'rho_ad'
[]
[mid2_mass]
type = VolumetricFlowRate
boundary = internal_top
vel_x = vel_x
vel_y = vel_y
[]
[outlet_mass]
type = VolumetricFlowRate
boundary = top
vel_x = vel_x
vel_y = vel_y
[]
[inlet_momentum_x]
type = VolumetricFlowRate
boundary = bottom
vel_x = vel_x
vel_y = vel_y
advected_variable = vel_x
[]
[mid1_momentum_x]
type = VolumetricFlowRate
boundary = internal_bot
vel_x = vel_x
vel_y = vel_y
advected_variable = vel_x
[]
[mid2_momentum_x]
type = VolumetricFlowRate
boundary = internal_top
vel_x = vel_x
vel_y = vel_y
advected_variable = vel_x
[]
[outlet_momentum_x]
type = VolumetricFlowRate
boundary = top
vel_x = vel_x
vel_y = vel_y
advected_variable = vel_x
[]
[inlet_momentum_y]
type = VolumetricFlowRate
boundary = bottom
vel_x = vel_x
vel_y = vel_y
advected_variable = vel_y
[]
[mid1_momentum_y]
type = VolumetricFlowRate
boundary = internal_bot
vel_x = vel_x
vel_y = vel_y
advected_variable = vel_y
[]
[mid2_momentum_y]
type = VolumetricFlowRate
boundary = internal_top
vel_x = vel_x
vel_y = vel_y
advected_variable = vel_y
[]
[outlet_momentum_y]
type = VolumetricFlowRate
boundary = top
vel_x = vel_x
vel_y = vel_y
advected_variable = vel_y
[]
[]
[Outputs]
exodus = false
csv = true
inactive = 'console_mass console_momentum_x console_momentum_y'
[console_mass]
type = Console
start_step = 1
show = 'inlet_mass_variable inlet_mass_constant inlet_mass_matprop mid1_mass mid2_mass outlet_mass'
[]
[console_momentum_x]
type = Console
start_step = 1
show = 'inlet_momentum_x mid1_momentum_x mid2_momentum_x outlet_momentum_x'
[]
[console_momentum_y]
type = Console
start_step = 1
show = 'inlet_momentum_y mid1_momentum_y mid2_momentum_y outlet_momentum_y'
[]
[]
(modules/solid_mechanics/test/tests/capped_weak_plane/push_and_shear.i)
# Dynamic problem with plasticity.
# A column of material (not subject to gravity) has the z-displacement
# of its sides fixed, but the centre of its bottom side is pushed
# upwards. This causes failure in the bottom elements.
#
# The problem utilises damping in the following way.
# The DynamicStressDivergenceTensors forms the residual
# integral grad(stress) + zeta*grad(stress-dot)
# = V/L * elasticity * (du/dx + zeta * dv/dx)
# where V is the elemental volume, and L is the length-scale,
# and u is the displacement, and v is the velocity.
# The InertialForce forms the residual
# integral density * (accel + eta * velocity)
# = V * density * (a + eta * v)
# where a is the acceleration.
# So, a damped oscillator description with both these
# kernels looks like
# 0 = V * (density * a + density * eta * v + elasticity * zeta * v / L^2 + elasticity / L^2 * u)
# Critical damping is when the coefficient of v is
# 2 * sqrt(density * elasticity / L^2)
# In the case at hand, density=1E4, elasticity~1E10 (Young is 16GPa),
# L~1 to 10 (in the horizontal or vertical direction), so this coefficient ~ 1E7 to 1E6.
# Choosing eta = 1E3 and zeta = 1E-2 gives approximate critical damping.
# If zeta is high then steady-state is achieved very quickly.
#
# In the case of plasticity, the effective stiffness of the elements
# is significantly less. Therefore, the above parameters give
# overdamping.
#
# This simulation is a nice example of the irreversable and non-uniqueness
# of simulations involving plasticity. The result depends on the damping
# parameters and the time stepping.
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 1
nz = 5
bias_z = 1.5
xmin = -10
xmax = 10
ymin = -10
ymax = 10
zmin = -100
zmax = 0
[]
[bottomz_middle]
type = BoundingBoxNodeSetGenerator
new_boundary = bottomz_middle
bottom_left = '-1 -1500 -105'
top_right = '1 1500 -95'
input = generated_mesh
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
beta = 0.25 # Newmark time integration
gamma = 0.5 # Newmark time integration
eta = 1E3 #0.3E4 # higher values mean more damping via density
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[Kernels]
[DynamicSolidMechanics] # zeta*K*vel + K * disp
displacements = 'disp_x disp_y disp_z'
stiffness_damping_coefficient = 1E-2 # higher values mean more damping via stiffness
hht_alpha = 0 # better nonlinear convergence than for alpha>0
[]
[inertia_x] # M*accel + eta*M*vel
type = InertialForce
use_displaced_mesh = false
variable = disp_x
velocity = vel_x
acceleration = accel_x
[]
[inertia_y]
type = InertialForce
use_displaced_mesh = false
variable = disp_y
velocity = vel_y
acceleration = accel_y
[]
[inertia_z]
type = InertialForce
use_displaced_mesh = false
variable = disp_z
velocity = vel_z
acceleration = accel_z
[]
[]
[BCs]
[no_x2]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[no_x1]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[no_y1]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[no_y2]
type = DirichletBC
variable = disp_y
boundary = top
value = 0.0
[]
[z_fixed_sides_xmin]
type = DirichletBC
variable = disp_z
boundary = left
value = 0
[]
[z_fixed_sides_xmax]
type = DirichletBC
variable = disp_z
boundary = right
value = 0
[]
[bottomz]
type = FunctionDirichletBC
variable = disp_z
boundary = bottomz_middle
function = min(10*t,1)
[]
[]
[AuxVariables]
[accel_x]
[]
[vel_x]
[]
[accel_y]
[]
[vel_y]
[]
[accel_z]
[]
[vel_z]
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xz]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_yz]
order = CONSTANT
family = MONOMIAL
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[strainp_xx]
order = CONSTANT
family = MONOMIAL
[]
[strainp_xy]
order = CONSTANT
family = MONOMIAL
[]
[strainp_xz]
order = CONSTANT
family = MONOMIAL
[]
[strainp_yy]
order = CONSTANT
family = MONOMIAL
[]
[strainp_yz]
order = CONSTANT
family = MONOMIAL
[]
[strainp_zz]
order = CONSTANT
family = MONOMIAL
[]
[straint_xx]
order = CONSTANT
family = MONOMIAL
[]
[straint_xy]
order = CONSTANT
family = MONOMIAL
[]
[straint_xz]
order = CONSTANT
family = MONOMIAL
[]
[straint_yy]
order = CONSTANT
family = MONOMIAL
[]
[straint_yz]
order = CONSTANT
family = MONOMIAL
[]
[straint_zz]
order = CONSTANT
family = MONOMIAL
[]
[f_shear]
order = CONSTANT
family = MONOMIAL
[]
[f_tensile]
order = CONSTANT
family = MONOMIAL
[]
[f_compressive]
order = CONSTANT
family = MONOMIAL
[]
[intnl_shear]
order = CONSTANT
family = MONOMIAL
[]
[intnl_tensile]
order = CONSTANT
family = MONOMIAL
[]
[iter]
order = CONSTANT
family = MONOMIAL
[]
[ls]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[accel_x] # Calculates and stores acceleration at the end of time step
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
execute_on = timestep_end
[]
[vel_x] # Calculates and stores velocity at the end of the time step
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
execute_on = timestep_end
[]
[accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
execute_on = timestep_end
[]
[vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
execute_on = timestep_end
[]
[accel_z]
type = NewmarkAccelAux
variable = accel_z
displacement = disp_z
velocity = vel_z
execute_on = timestep_end
[]
[vel_z]
type = NewmarkVelAux
variable = vel_z
acceleration = accel_z
execute_on = timestep_end
[]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[]
[stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[]
[stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[]
[strainp_xx]
type = RankTwoAux
rank_two_tensor = plastic_strain
variable = strainp_xx
index_i = 0
index_j = 0
[]
[strainp_xy]
type = RankTwoAux
rank_two_tensor = plastic_strain
variable = strainp_xy
index_i = 0
index_j = 1
[]
[strainp_xz]
type = RankTwoAux
rank_two_tensor = plastic_strain
variable = strainp_xz
index_i = 0
index_j = 2
[]
[strainp_yy]
type = RankTwoAux
rank_two_tensor = plastic_strain
variable = strainp_yy
index_i = 1
index_j = 1
[]
[strainp_yz]
type = RankTwoAux
rank_two_tensor = plastic_strain
variable = strainp_yz
index_i = 1
index_j = 2
[]
[strainp_zz]
type = RankTwoAux
rank_two_tensor = plastic_strain
variable = strainp_zz
index_i = 2
index_j = 2
[]
[straint_xx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = straint_xx
index_i = 0
index_j = 0
[]
[straint_xy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = straint_xy
index_i = 0
index_j = 1
[]
[straint_xz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = straint_xz
index_i = 0
index_j = 2
[]
[straint_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = straint_yy
index_i = 1
index_j = 1
[]
[straint_yz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = straint_yz
index_i = 1
index_j = 2
[]
[straint_zz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = straint_zz
index_i = 2
index_j = 2
[]
[f_shear]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 0
variable = f_shear
[]
[f_tensile]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 1
variable = f_tensile
[]
[f_compressive]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 2
variable = f_compressive
[]
[intnl_shear]
type = MaterialStdVectorAux
property = plastic_internal_parameter
index = 0
variable = intnl_shear
[]
[intnl_tensile]
type = MaterialStdVectorAux
property = plastic_internal_parameter
index = 1
variable = intnl_tensile
[]
[iter]
type = MaterialRealAux
property = plastic_NR_iterations
variable = iter
[]
[ls]
type = MaterialRealAux
property = plastic_linesearch_needed
variable = ls
[]
[]
[UserObjects]
[coh]
type = SolidMechanicsHardeningConstant
value = 1E6
[]
[tanphi]
type = SolidMechanicsHardeningConstant
value = 0.5
[]
[tanpsi]
type = SolidMechanicsHardeningConstant
value = 0.166666666667
[]
[t_strength]
type = SolidMechanicsHardeningConstant
value = 1E80
[]
[c_strength]
type = SolidMechanicsHardeningConstant
value = 0
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric_isotropic
C_ijkl = '6.4E9 6.4E9' # young 16MPa, Poisson 0.25
[]
[strain]
type = ComputeIncrementalSmallStrain
[]
[admissible]
type = ComputeMultipleInelasticStress
inelastic_models = stress
perform_finite_strain_rotations = false
[]
[stress]
type = CappedWeakPlaneStressUpdate
cohesion = coh
tan_friction_angle = tanphi
tan_dilation_angle = tanpsi
tensile_strength = t_strength
compressive_strength = c_strength
tip_smoother = 0.5E6
smoothing_tol = 0.5E6
yield_function_tol = 1E-2
[]
[density]
type = GenericConstantMaterial
block = 0
prop_names = density
prop_values = 1E4
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options = '-snes_converged_reason -snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
[]
[]
[Executioner]
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason'
line_search = bt
nl_abs_tol = 1E1
nl_rel_tol = 1e-5
l_tol = 1E-10
l_max_its = 100
nl_max_its = 100
end_time = 0.5
dt = 0.1
type = Transient
[]
[Outputs]
file_base = push_and_shear
exodus = true
csv = true
[]
(modules/heat_transfer/test/tests/radiative_bcs/function_radiative_bc.i)
#
# If we assume that epsilon*sigma*(T_inf^4-T_s^4) is approximately equal to
# epsilon*sigma*4*T_inf^3*(T_inf-T_s), that form is equivalent to
# h*(T_inf-T_s), the convective flux bc. So, the radiative and convective
# flux bcs should give nearly the same answer if the leading terms are equal.
#
[Mesh]
[top]
type = GeneratedMeshGenerator
dim = 3
nx = 10
bias_x = 0.8
ymin = 1.2
ymax = 2.2
boundary_name_prefix = top
[]
[bottom]
type = GeneratedMeshGenerator
dim = 3
nx = 10
bias_x = 0.8
boundary_name_prefix = bot
boundary_id_offset = 6
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'top bottom'
[]
[]
[Variables]
[temp]
initial_condition = 600.0
[]
[]
[Kernels]
[heat_dt]
type = TimeDerivative
variable = temp
[]
[heat_conduction]
type = HeatConduction
variable = temp
[]
[]
[BCs]
[./top_right]
type = ConvectiveHeatFluxBC
variable = temp
boundary = top_right
T_infinity = 300.0
heat_transfer_coefficient = 3.0
heat_transfer_coefficient_dT = 0
[../]
[./bot_right]
type = FunctionRadiativeBC
variable = temp
boundary = bot_right
# htc/(stefan-boltzmann*4*T_inf^3)
emissivity_function = '3/(5.670367e-8*4*300*300*300)'
[../]
[]
[Materials]
[./thermal]
type = GenericConstantMaterial
prop_names = 'density thermal_conductivity specific_heat'
prop_values = '1 10 100'
[../]
[]
[Postprocessors]
[./top_left_temp]
type = SideAverageValue
variable = temp
boundary = top_left
execute_on = 'TIMESTEP_END initial'
[../]
[./bot_left_temp]
type = SideAverageValue
variable = temp
boundary = bot_left
execute_on = 'TIMESTEP_END initial'
[../]
[./top_right_temp]
type = SideAverageValue
variable = temp
boundary = top_right
[../]
[./bot_right_temp]
type = SideAverageValue
variable = temp
boundary = bot_right
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 1e1
nl_abs_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/SplitCH/split_math_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
xmin = 0.0
xmax = 30.0
ymin = 0.0
ymax = 30.0
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = CrossIC
x1 = 0.0
x2 = 30.0
y1 = 0.0
y2 = 30.0
[../]
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[]
[Preconditioning]
active = 'SMP'
[./PBP]
type = PBP
solve_order = 'w c'
preconditioner = 'AMG ASM'
off_diag_row = 'c '
off_diag_column = 'w '
[../]
[./SMP]
type = SMP
coupled_groups = 'c,w'
[../]
[]
[Kernels]
[./cres]
type = SplitCHMath
variable = c
kappa_name = kappa_c
w = w
[../]
[./wres]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[]
[BCs]
[./Periodic]
[./top_bottom]
primary = 0
secondary = 2
translation = '0 30.0 0'
[../]
[./left_right]
primary = 1
secondary = 3
translation = '-30.0 0 0'
[../]
[../]
[]
[Materials]
[./constant]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1.0 2.0'
block = 0
[../]
[]
[Executioner]
type = Transient
scheme = 'BDF2'
#petsc_options = '-snes_mf'
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
l_max_its = 30
l_tol = 1.0e-3
nl_max_its = 50
nl_rel_tol = 1.0e-10
dt = 10.0
num_steps = 2
[]
[Outputs]
file_base = out
exodus = true
[]
(modules/chemical_reactions/test/tests/exceptions/missing_gamma2.i)
# Missing activity coefficient in CoupledBEEquilibriumSub Kernel
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Variables]
[./a]
[../]
[./b]
[../]
[./c]
[../]
[]
[AuxVariables]
[./gamma_a]
[../]
[./gamma_b]
[../]
[./gamma_c]
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./b_ie]
type = PrimaryTimeDerivative
variable = b
[../]
[./c_ie]
type = PrimaryTimeDerivative
variable = c
[../]
[./aeq]
type = CoupledBEEquilibriumSub
variable = a
log_k = 1
weight = 2
sto_u = 2
v = 'b c'
sto_v = '1 1'
gamma_v = gamma_b
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = porosity
prop_values = 0.2
[../]
[]
[Executioner]
type = Transient
end_time = 1
[]
(modules/phase_field/test/tests/phase_field_kernels/ADAllenCahn.i)
#
# Test the forward automatic differentiation Allen-Cahn Bulk kernel
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 12
ymax = 12
elem_type = QUAD4
[]
[Variables]
[./eta]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 6.0
invalue = 0.9
outvalue = 0.1
int_width = 3.0
[../]
[../]
[]
[Kernels]
[./detadt]
type = ADTimeDerivative
variable = eta
[../]
[./ACBulk]
type = ADAllenCahn
variable = eta
f_name = F
[../]
[./ACInterface]
type = ADACInterface
variable = eta
kappa_name = 1
variable_L = false
[../]
[]
[Materials]
[./consts]
type = ADGenericConstantMaterial
prop_names = 'L'
prop_values = '1'
[../]
[./free_energy]
type = ADTestDerivativeFunction
function = F1
f_name = F
op = 'eta'
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
num_steps = 2
dt = 0.5
[]
[Outputs]
exodus = true
[]
(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'
[]
[]
(modules/chemical_reactions/test/tests/jacobian/2species_equilibrium.i)
# Tests the Jacobian when equilibrium secondary species are present
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
ny = 3
[]
[Variables]
[./a]
order = FIRST
family = LAGRANGE
[../]
[./b]
order = FIRST
family = LAGRANGE
[../]
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./pressure]
type = RandomIC
variable = pressure
max = 5
min = 1
[../]
[./a]
type = RandomIC
variable = a
max = 1
min = 0
[../]
[./b]
type = RandomIC
variable = b
max = 1
min = 0
[../]
[]
[ReactionNetwork]
[./AqueousEquilibriumReactions]
primary_species = 'a b'
reactions = '2a = pa2 2
a + b = pab 2'
secondary_species = 'pa2 pab'
pressure = pressure
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./a_diff]
type = PrimaryDiffusion
variable = a
[../]
[./a_conv]
type = PrimaryConvection
variable = a
p = pressure
[../]
[./b_ie]
type = PrimaryTimeDerivative
variable = b
[../]
[./b_diff]
type = PrimaryDiffusion
variable = b
[../]
[./b_conv]
type = PrimaryConvection
variable = b
p = pressure
[../]
[./pressure]
type = DarcyFluxPressure
variable = pressure
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity'
prop_values = '1e-4 1e-4 0.2'
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 1
[]
[Outputs]
perf_graph = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
(modules/navier_stokes/test/tests/finite_element/ins/scalar_adr/supg/tauOpt.i)
velocity=1
[GlobalParams]
u = ${velocity}
pressure = 0
tau_type = opt
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 15
xmax = 15
[]
[Variables]
[./c]
[../]
[]
[Kernels]
[./adv]
type = AdvectionSUPG
variable = c
forcing_func = 'ffn'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = c
boundary = left
value = 0
[../]
[]
[Materials]
[./mat]
# These Materials are required by the INSBase class; we don't use them for anything.
type = GenericConstantMaterial
prop_names = 'mu rho'
prop_values = '0 1'
[../]
[]
[Functions]
[./ffn]
type = ParsedFunction
expression = 'if(x < 6, 1 - .25 * x, if(x < 8, -2 + .25 * x, 0))'
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(modules/chemical_reactions/test/tests/exceptions/missing_gamma.i)
# Missing activity coefficient in AqueousEquilibriumRxnAux AuxKernel
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Variables]
[./a]
[../]
[./b]
[../]
[]
[AuxVariables]
[./c]
[../]
[./gamma_a]
[../]
[]
[AuxKernels]
[./c]
type = AqueousEquilibriumRxnAux
variable = c
v = 'a b'
gamma_v = gamma_a
sto_v = '1 1'
log_k = 1
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./b_ie]
type = PrimaryTimeDerivative
variable = b
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = porosity
prop_values = 0.2
[../]
[]
[Executioner]
type = Transient
end_time = 1
[]
(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/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/navier_stokes/test/tests/finite_element/ins/velocity_channel/ad-traction-supg.i)
# This input file tests outflow boundary conditions for the incompressible NS equations.
[GlobalParams]
integrate_p_by_parts = true
viscous_form = traction
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 3.0
ymin = 0
ymax = 1.0
nx = 30
ny = 10
elem_type = QUAD9
[]
[Variables]
[vel]
order = SECOND
family = LAGRANGE_VEC
[]
[p]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[mass]
type = INSADMass
variable = p
[]
[momentum_convection]
type = INSADMomentumAdvection
variable = vel
[]
[momentum_viscous]
type = INSADMomentumViscous
variable = vel
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = vel
pressure = p
[]
[momentum_supg]
type = INSADMomentumSUPG
variable = vel
velocity = vel
[]
[]
[BCs]
[wall]
type = VectorFunctionDirichletBC
variable = vel
boundary = 'top bottom'
function_x = 0
function_y = 0
[]
[inlet]
type = VectorFunctionDirichletBC
variable = vel
boundary = 'left'
function_x = inlet_func
function_y = 0
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '1 1'
[]
[ins_mat]
type = INSADTauMaterial
velocity = vel
pressure = p
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
solve_type = NEWTON
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = none
nl_rel_tol = 1e-12
[]
[Outputs]
[out]
type = Exodus
[]
[]
[Functions]
[inlet_func]
type = ParsedFunction
expression = '-4 * (y - 0.5)^2 + 1'
[]
[]
(modules/phase_field/test/tests/phase_field_kernels/AllenCahn.i)
#
# Test the parsed function free enery Allen-Cahn Bulk kernel
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 12
ymax = 12
elem_type = QUAD4
[]
[Variables]
[./eta]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 6.0
invalue = 0.9
outvalue = 0.1
int_width = 3.0
[../]
[../]
[]
[Kernels]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[./ACBulk]
type = AllenCahn
variable = eta
f_name = F
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = 1
variable_L = false
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'L'
prop_values = '1'
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'eta'
expression = '2 * eta^2 * (1-eta)^2 - 0.2*eta'
derivative_order = 2
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
num_steps = 2
dt = 0.5
[]
[Outputs]
exodus = true
[]
(modules/functional_expansion_tools/examples/2D_interface/main.i)
# Basic example coupling a master and sub app at an interface in a 2D model.
# The master app provides a flux term to the sub app via Functional Expansions, which then performs
# its calculations. The sub app's interface conditions, both value and flux, are transferred back
# to the master app
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0.0
xmax = 0.4
nx = 6
ymin = 0.0
ymax = 10.0
ny = 20
[]
[Variables]
[./m]
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./source_m]
type = BodyForce
variable = m
value = 100
[../]
[]
[Materials]
[./Impervium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '0.00001 50.0 100.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
value = 2
variable = m
[../]
[]
[BCs]
[./interface_value]
type = FXValueBC
variable = m
boundary = right
function = FX_Basis_Value_Main
[../]
[./interface_flux]
type = FXFluxBC
boundary = right
variable = m
function = FX_Basis_Flux_Main
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '4'
physical_bounds = '0.0 10'
y = Legendre
[../]
[./FX_Basis_Flux_Main]
type = FunctionSeries
series_type = Cartesian
orders = '5'
physical_bounds = '0.0 10'
y = Legendre
[../]
[]
[UserObjects]
[./FX_Flux_UserObject_Main]
type = FXBoundaryFluxUserObject
function = FX_Basis_Flux_Main
variable = m
boundary = right
diffusivity = thermal_conductivity
[../]
[]
[Postprocessors]
[./average_interface_value]
type = SideAverageValue
variable = m
boundary = right
[../]
[./total_flux]
type = SideDiffusiveFluxIntegral
variable = m
boundary = right
diffusivity = thermal_conductivity
[../]
[./picard_iterations]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 1.0
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = sub.i
sub_cycling = true
[../]
[]
[Transfers]
[./FluxToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Flux_UserObject_Main
multi_app_object_name = FX_Basis_Flux_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[./FluxToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Flux_Main
multi_app_object_name = FX_Flux_UserObject_Sub
[../]
[]
(modules/functional_expansion_tools/examples/3D_volumetric_cylindrical_subapp_mesh_refine/main.i)
# Derived from the example '3D_volumetric_cylindrical' with the following differences:
#
# 1) The model mesh is refined in the MasterApp by 1
# 2) Mesh adaptivity is enabled for the SubApp
# 3) Output from the SubApp is enabled so that the mesh changes can be visualized
[Mesh]
type = FileMesh
file = cyl-tet.e
uniform_refine = 1
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./s_in] # Add in the contribution from the SubApp
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[Materials]
[./Unobtanium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'top bottom outside'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = CylindricalDuo
orders = '5 3' # Axial first, then (r, t) FX
physical_bounds = '-2.5 2.5 0 0 1' # z_min z_max x_center y_center radius
z = Legendre # Axial in z
disc = Zernike # (r, t) default to unit disc in x-y plane
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = sub.i
output_sub_cycles = true
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(test/tests/problems/no_material_coverage_check/no_material_coverage_check.i)
[Mesh]
file = rectangle.e
[]
[Problem]
material_coverage_check = false
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./body_force]
type = BodyForce
variable = u
block = 1
value = 10
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Materials]
[./mat1]
type = GenericConstantMaterial
block = 1
prop_names = 'diff1'
prop_values = '1'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
exodus = 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/navier_stokes/test/tests/finite_element/ins/jacobian_test/jacobian_stabilized_test.i)
# This input file tests the jacobians of many of the INS kernels
[GlobalParams]
gravity = '1.1 1.1 1.1'
u = vel_x
v = vel_y
w = vel_z
pressure = p
integrate_p_by_parts = true
laplace = true
pspg = true
supg = true
alpha = 1.1
[]
[Mesh]
type = GeneratedMesh
dim = 3
xmin = 0
xmax = 3.0
ymin = 0
ymax = 1.5
zmax = 1.1
nx = 1
ny = 1
nz = 1
elem_type = HEX27
[]
[Variables]
[./vel_x]
order = SECOND
family = LAGRANGE
[../]
[./vel_y]
order = SECOND
family = LAGRANGE
[../]
[./vel_z]
order = SECOND
family = LAGRANGE
[../]
[./p]
order = SECOND
family = LAGRANGE
[../]
[]
[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
[../]
[./z_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_z
component = 2
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '0.5 1.5'
[../]
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-snes_type'
petsc_options_value = 'test'
[]
[ICs]
[./p]
type = RandomIC
variable = p
min = 0.5
max = 1.5
[../]
[./vel_x]
type = RandomIC
variable = vel_x
min = 0.5
max = 1.5
[../]
[./vel_y]
type = RandomIC
variable = vel_y
min = 0.5
max = 1.5
[../]
[./vel_z]
type = RandomIC
variable = vel_z
min = 0.5
max = 1.5
[../]
[]
(modules/solid_mechanics/test/tests/central_difference/consistent/3D/3d_consistent_explicit.i)
# One element test to test the central difference time integrator in 3D.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 2
xmin = 0.0
xmax = 1
ymin = 0.0
ymax = 1
zmin = 0.0
zmax = 2
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[AuxVariables]
[./vel_x]
[../]
[./accel_x]
[../]
[./vel_y]
[../]
[./accel_y]
[../]
[./vel_z]
[../]
[./accel_z]
[../]
[]
[AuxKernels]
[./accel_x]
type = TestNewmarkTI
variable = accel_x
displacement = disp_x
first = false
[../]
[./vel_x]
type = TestNewmarkTI
variable = vel_x
displacement = disp_x
[../]
[./accel_y]
type = TestNewmarkTI
variable = accel_y
displacement = disp_y
first = false
[../]
[./vel_y]
type = TestNewmarkTI
variable = vel_y
displacement = disp_x
[../]
[./accel_z]
type = TestNewmarkTI
variable = accel_z
displacement = disp_z
first = false
[../]
[./vel_z]
type = TestNewmarkTI
variable = vel_z
displacement = disp_z
[../]
[]
[Kernels]
[./DynamicSolidMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
[./inertia_x]
type = InertialForce
variable = disp_x
[../]
[./inertia_y]
type = InertialForce
variable = disp_y
[../]
[./inertia_z]
type = InertialForce
variable = disp_z
[../]
[]
[BCs]
[./x_bot]
type = FunctionDirichletBC
variable = disp_x
boundary = 'back'
function = dispx
preset = false
[../]
[./y_bot]
type = FunctionDirichletBC
variable = disp_y
boundary = 'back'
function = dispy
preset = false
[../]
[./z_bot]
type = FunctionDirichletBC
variable = disp_z
boundary = 'back'
function = dispz
preset = false
[../]
[./Periodic]
[./x_dir]
variable = 'disp_x disp_y disp_z'
primary = 'left'
secondary = 'right'
translation = '1.0 0.0 0.0'
[../]
[./y_dir]
variable = 'disp_x disp_y disp_z'
primary = 'bottom'
secondary = 'top'
translation = '0.0 1.0 0.0'
[../]
[../]
[]
[Functions]
[./dispx]
type = PiecewiseLinear
x = '0.0 1.0 2.0 3.0 4.0' # time
y = '0.0 1.0 0.0 -1.0 0.0' # displacement
[../]
[./dispy]
type = ParsedFunction
expression = 0.1*t*t*sin(10*t)
[../]
[./dispz]
type = ParsedFunction
expression = 0.1*t*t*sin(20*t)
[../]
[]
[Materials]
[./elasticity_tensor_block]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.25
block = 0
[../]
[./strain_block]
type = ComputeIncrementalSmallStrain
block = 0
displacements = 'disp_x disp_y disp_z'
implicit = false
[../]
[./stress_block]
type = ComputeFiniteStrainElasticStress
block = 0
[../]
[./density]
type = GenericConstantMaterial
block = 0
prop_names = density
prop_values = 1e4
[../]
[]
[Executioner]
type = Transient
start_time = -0.01
end_time = 0.1
dt = 0.005
timestep_tolerance = 1e-6
[./TimeIntegrator]
type = CentralDifference
[../]
[]
[Postprocessors]
[./accel_6x]
type = NodalVariableValue
nodeid = 6
variable = accel_x
[../]
[]
[Outputs]
exodus = false
csv = true
[]
(modules/phase_field/test/tests/SimpleACInterface/SimpleCoupledACInterface.i)
#
# Test the coupled Allen-Cahn Bulk kernel
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
nz = 0
xmin = 0
xmax = 50
ymin = 0
ymax = 50
zmin = 0
zmax = 50
elem_type = QUAD4
uniform_refine = 1
[]
[Variables]
[./w]
[../]
[./eta]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 25.0
y1 = 25.0
radius = 6.0
invalue = 1.0
outvalue = 0.0
int_width = 5.0
[../]
[../]
[]
[Kernels]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[./ACBulk]
type = AllenCahn
variable = eta
f_name = F
[../]
[./CoupledBulk]
type = MatReaction
variable = eta
v = w
[../]
[./W]
type = Reaction
variable = w
[../]
[./CoupledACInterface]
type = SimpleCoupledACInterface
variable = w
v = eta
kappa_name = 1
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'L'
prop_values = '1'
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'eta'
expression = 'eta^2 * (1-eta)^2'
derivative_order = 2
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
l_max_its = 15
l_tol = 1.0e-4
nl_max_its = 10
nl_rel_tol = 1.0e-11
start_time = 0.0
num_steps = 2
dt = 2
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
hide = w
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/thermal_hydraulics/test/tests/closures/none_1phase/phy.test.i)
# Using no closure option and setting up custom materials that computes f_D and Hw.
# In this case, these custom materials are computing just constant values
[GlobalParams]
gravity_vector = '0 0 0'
scaling_factor_1phase = '1 1 1e-8'
initial_vel = 0
initial_p = 1e5
initial_T = 300
closures = no_closures
[]
[FluidProperties]
[water]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
[]
[]
[Closures]
[no_closures]
type = Closures1PhaseNone
[]
[]
[Materials]
[f_wall_mat]
type = ADGenericConstantMaterial
block = 'pipe'
prop_names = 'f_D'
prop_values = '0.123'
[]
[htc_wall_mat]
type = ADGenericConstantMaterial
block = 'pipe'
prop_names = 'Hw'
prop_values = '4.321'
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
fp = water
position = '0 0 0'
orientation = '1 0 0'
A = 1e-4
length = 1
n_elems = 10
[]
[inlet]
type = SolidWall1Phase
input = 'pipe:in'
[]
[outlet]
type = SolidWall1Phase
input = 'pipe:out'
[]
[ht]
type = HeatTransferFromSpecifiedTemperature1Phase
flow_channel = pipe
T_wall = 300
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
num_steps = 2
dt = 1e-6
abort_on_solve_fail = true
solve_type = 'PJFNK'
line_search = basic
nl_rel_tol = 1e-9
nl_abs_tol = 1e-8
nl_max_its = 5
l_tol = 1e-3
l_max_its = 10
[]
[Outputs]
[out]
type = Exodus
output_material_properties = true
show_material_properties = 'f_D Hw'
show = 'f_D Hw'
[]
[]
(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/solid_mechanics/test/tests/dynamics/wave_1D/wave_hht.i)
# Wave propogation in 1D using HHT time integration
#
# The test is for an 1D bar element of length 4m fixed on one end
# with a sinusoidal pulse dirichlet boundary condition applied to the other end.
# alpha, beta and gamma are Newmark time integration parameters
# The equation of motion in terms of matrices is:
#
# M*accel + K*((1+alpha)*disp-alpha*disp_old) = 0
#
# Here M is the mass matrix, K is the stiffness matrix
#
# The displacement at the second, third and fourth node at t = 0.1 are
# -8.097405701570538350e-02, 2.113131879547342634e-02 and -5.182787688751439893e-03, respectively.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 4
nz = 1
xmin = 0.0
xmax = 0.1
ymin = 0.0
ymax = 4.0
zmin = 0.0
zmax = 0.1
use_displaced_mesh = false
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics/SolidMechanics/Dynamic]
[all]
add_variables = true
hht_alpha = -0.3
newmark_beta = 0.3025
newmark_gamma = 0.6
[]
[]
[BCs]
[top_y]
type = DirichletBC
variable = disp_y
boundary = top
value = 0.0
[]
[top_x]
type = DirichletBC
variable = disp_x
boundary = top
value = 0.0
[]
[top_z]
type = DirichletBC
variable = disp_z
boundary = top
value = 0.0
[]
[right_x]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[right_z]
type = DirichletBC
variable = disp_z
boundary = right
value = 0.0
[]
[left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[left_z]
type = DirichletBC
variable = disp_z
boundary = left
value = 0.0
[]
[front_x]
type = DirichletBC
variable = disp_x
boundary = front
value = 0.0
[]
[front_z]
type = DirichletBC
variable = disp_z
boundary = front
value = 0.0
[]
[back_x]
type = DirichletBC
variable = disp_x
boundary = back
value = 0.0
[]
[back_z]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[]
[bottom_x]
type = DirichletBC
variable = disp_x
boundary = bottom
value = 0.0
[]
[bottom_z]
type = DirichletBC
variable = disp_z
boundary = bottom
value = 0.0
[]
[bottom_y]
type = FunctionDirichletBC
variable = disp_y
boundary = bottom
function = displacement_bc
[]
[]
[Materials]
[Elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric_isotropic
C_ijkl = '1 0'
[]
[stress]
type = ComputeLinearElasticStress
[]
[density]
type = GenericConstantMaterial
prop_names = 'density'
prop_values = '1'
[]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 6.0
l_tol = 1e-12
nl_rel_tol = 1e-12
dt = 0.1
[]
[Functions]
[displacement_bc]
type = PiecewiseLinear
data_file = 'sine_wave.csv'
format = columns
[]
[]
[Postprocessors]
[_dt]
type = TimestepSize
[]
[disp_1]
type = NodalVariableValue
nodeid = 1
variable = vel_y
[]
[disp_2]
type = NodalVariableValue
nodeid = 3
variable = vel_y
[]
[disp_3]
type = NodalVariableValue
nodeid = 10
variable = vel_y
[]
[disp_4]
type = NodalVariableValue
nodeid = 14
variable = vel_y
[]
[]
[Outputs]
exodus = true
perf_graph = 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/combined/examples/xfem/xfem_thermomechanics_stress_growth.i)
# This is a demonstration of a simple thermomechanics simulation using
# XFEM in which a single crack propagates based on a principal stress
# criterion.
#
# The top and bottom of the plate are fixed in the y direction, and the
# top of the plate is cooled down over time. The thermal contraction
# causes tensile stresses, which lead to crack propagation. The crack
# propagates in a curved path because of the changinging nature of
# the thermal gradient as a result of the crack. There is no heat
# conduction across the crack as soon as it forms.
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 11
ny = 11
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
elem_type = QUAD4
[]
[Variables]
# Solve for the temperature and the displacements
# Displacements are not specified because the TensorMechanics/Master Action sets them up
[./temp]
initial_condition = 300
[../]
[]
[XFEM]
geometric_cut_userobjects = 'line_seg_cut_uo'
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[./line_seg_cut_uo]
type = LineSegmentCutUserObject
cut_data = '1.0 0.5 0.8 0.5'
time_start_cut = 0.0
time_end_cut = 0.0
[../]
[./xfem_marker_uo]
type = XFEMRankTwoTensorMarkerUserObject
execute_on = timestep_end
tensor = stress
scalar_type = MaxPrincipal
threshold = 5e+1
average = true
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
strain = FINITE
planar_formulation = plane_strain
add_variables = true
eigenstrain_names = eigenstrain
[../]
[]
[Kernels]
[./htcond]
type = HeatConduction
variable = temp
[../]
[]
[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 = DirichletBC
boundary = top
variable = disp_x
value = 0.0
[../]
[./topy]
type = DirichletBC
boundary = top
variable = disp_y
value = 0.0
[../]
[./topt]
type = FunctionDirichletBC
boundary = top
variable = temp
function = 273-t*27.3
[../]
[./bott]
type = FunctionDirichletBC
boundary = bottom
variable = temp
function = 273
# value = 273.0
[../]
[]
[Materials]
[./thcond]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity'
prop_values = '5e-6'
[../]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.3
[../]
[./_elastic_strain]
type = ComputeFiniteStrainElasticStress
[../]
[./thermal_strain]
type= ComputeThermalExpansionEigenstrain
thermal_expansion_coeff = 10e-6
temperature = temp
stress_free_temperature = 273
eigenstrain_name = eigenstrain
[../]
[]
[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 = 'none'
[./Predictor]
type = SimplePredictor
scale = 1.0
[../]
# controls for linear iterations
l_max_its = 100
l_tol = 1e-2
# controls for nonlinear iterations
nl_max_its = 15
nl_rel_tol = 1e-14
nl_abs_tol = 1e-9
# time control
start_time = 0.0
dt = 1.0
end_time = 10.0
max_xfem_update = 5
[]
[Outputs]
exodus = true
execute_on = timestep_end
[./console]
type = Console
output_linear = true
[../]
[]
(modules/combined/test/tests/phase_field_fracture/crack2d_vi_solver.i)
#This input uses PhaseField-Nonconserved Action to add phase field fracture bulk rate kernels
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 20
xmax = 1
ymax = 1
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Modules]
[./PhaseField]
[./Nonconserved]
[./c]
free_energy = F
kappa = kappa_op
mobility = L
[../]
[../]
[../]
[./TensorMechanics]
[./Master]
[./mech]
add_variables = true
strain = SMALL
additional_generate_output = 'stress_yy'
save_in = 'resid_x resid_y'
[../]
[../]
[../]
[]
[ICs]
[./c_ic]
type = FunctionIC
function = ic
variable = c
[../]
[]
[Functions]
[./ic]
type = ParsedFunction
expression = 'if(x<0.5 & y < 0.55 & y > 0.45,1, 0)'
[../]
[]
[AuxVariables]
[./resid_x]
[../]
[./resid_y]
[../]
[./bounds_dummy]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./solid_x]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_x
component = 0
c = c
[../]
[./solid_y]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_y
component = 1
c = c
[../]
[]
[BCs]
[./ydisp]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = 't'
[../]
[./yfix]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0
[../]
[./xfix]
type = DirichletBC
variable = disp_x
boundary = 'top bottom'
value = 0
[../]
[]
[Materials]
[./pfbulkmat]
type = GenericConstantMaterial
prop_names = 'gc_prop l visco'
prop_values = '1e-3 0.04 1e-4'
[../]
[./define_mobility]
type = ParsedMaterial
material_property_names = 'gc_prop visco'
property_name = L
expression = '1.0/(gc_prop * visco)'
[../]
[./define_kappa]
type = ParsedMaterial
material_property_names = 'gc_prop l'
property_name = kappa_op
expression = 'gc_prop * l'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '120.0 80.0'
fill_method = symmetric_isotropic
[../]
[./damage_stress]
type = ComputeLinearElasticPFFractureStress
c = c
E_name = 'elastic_energy'
D_name = 'degradation'
F_name = 'local_fracture_energy'
decomposition_type = strain_spectral
use_snes_vi_solver = true
[../]
[./degradation]
type = DerivativeParsedMaterial
property_name = degradation
coupled_variables = 'c'
expression = '(1.0-c)^2*(1.0 - eta) + eta'
constant_names = 'eta'
constant_expressions = '0.0'
derivative_order = 2
[../]
[./local_fracture_energy]
type = DerivativeParsedMaterial
property_name = local_fracture_energy
coupled_variables = 'c'
material_property_names = 'gc_prop l'
expression = 'c^2 * gc_prop / 2 / l'
derivative_order = 2
[../]
[./fracture_driving_energy]
type = DerivativeSumMaterial
coupled_variables = c
sum_materials = 'elastic_energy local_fracture_energy'
derivative_order = 2
property_name = F
[../]
[]
[Postprocessors]
[./resid_x]
type = NodalSum
variable = resid_x
boundary = 2
[../]
[./resid_y]
type = NodalSum
variable = resid_y
boundary = 2
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Bounds]
[./c_upper_bound]
type = ConstantBounds
variable = bounds_dummy
bounded_variable = c
bound_type = upper
bound_value = 1.0
[../]
[./c_lower_bound]
type = VariableOldValueBounds
variable = bounds_dummy
bounded_variable = c
bound_type = lower
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -snes_type'
petsc_options_value = 'lu vinewtonrsls'
nl_rel_tol = 1e-8
l_max_its = 10
nl_max_its = 10
dt = 1e-4
dtmin = 1e-4
num_steps = 2
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_radiation/gap_heat_transfer_radiation_test.i)
#
# 1-D Gap Heat Transfer Test without mechanics
#
# This test exercises 1-D gap heat transfer for a helium-filled gap including radiation.
#
# The mesh consists of two element blocks containing one element each. Each
# element is a unit cube. They sit next to one another with a unit between them.
#
# The conductivity of both blocks is set very large to achieve a uniform temperature
# across each block. The temperature of the far left boundary
# is ramped from 100 to 200 over one time unit, and then held fixed for an additional
# time unit. The temperature of the far right boundary is held fixed at 100.
#
# A simple analytical solution is possible for the heat flux between the blocks:
#
# Flux = (T_left - T_right) * h_gap
#
# where h_gap = h_gas + h_cont + h_rad
#
# By setting the contact pressure, roughnesses, and jump distances to zero, the gap
# conductance simplifies to:
#
# h_gap = gapK/d_gap + sigma*Fe*(T_left^2 + T_right^2)*(T_left + T_right)
#
# where Fe = 1/(1/eps_left + 1/eps_right - 1)
# eps = emissivity
#
# For pure helium, BISON computes the gas conductivity as:
#
# gapK(Tavg) = 2.639e-3*Tavg^0.7085
#
# For the test, the final (t=2) average gas temperature is (200 +100)/2 = 150,
# giving gapK(150) = 0.09187557
#
# Assuming ems_left = ems_right = 0.5, Fe = 1/3
#
# The heat flux across the gap at that time is then:
#
# Flux(2) = 100 * ((0.09187557/1.0) + (5.669e-8/3)*(200^2 + 100^2)*(200 + 100))
# = 37.532557
#
# The flux post processors give 37.53255
#
[Mesh]
file = gap_heat_transfer_radiation_test.e
[]
[Functions]
[./temp]
type = PiecewiseLinear
x = '0 1'
y = '200 200'
[../]
[]
[Variables]
[./temp]
order = FIRST
family = LAGRANGE
initial_condition = 100
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = temp
[../]
[]
[BCs]
[./temp_far_left]
type = FunctionDirichletBC
boundary = 1
variable = temp
function = temp
[../]
[./temp_far_right]
type = DirichletBC
boundary = 4
variable = temp
value = 100
[../]
[]
[ThermalContact]
[./gap]
type = GapHeatTransfer
variable = temp
primary = 3
secondary = 2
gap_conductivity = 0.09187557
emissivity_primary = 0.5
emissivity_secondary = 0.5
[../]
[]
[Materials]
[./heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 10000000.0
[../]
[./density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '1.0'
[../]
[]
[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 4'
line_search = 'none'
nl_abs_tol = 1e-6
nl_rel_tol = 1e-10
l_tol = 1e-3
l_max_its = 100
start_time = 0.0
dt = 1
end_time = 1.0
[]
[Postprocessors]
[./temp_left]
type = SideAverageValue
boundary = 2
variable = temp
execute_on = 'initial timestep_end'
[../]
[./temp_right]
type = SideAverageValue
boundary = 3
variable = temp
execute_on = 'initial timestep_end'
[../]
[./flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
[../]
[./flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
[../]
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_no_parts_steady_nobcbc.i)
# This input file tests several different things:
# .) The axisymmetric (RZ) form of the governing equations.
# .) An open boundary.
# .) Not integrating the pressure by parts, thereby requiring a pressure pin.
# .) Natural boundary condition at the outlet.
[GlobalParams]
integrate_p_by_parts = false
laplace = true
gravity = '0 0 0'
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = Newton
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Variables]
[./vel_x]
# Velocity in radial (r) direction
family = LAGRANGE
order = SECOND
[../]
[./vel_y]
# Velocity in axial (z) direction
family = LAGRANGE
order = SECOND
[../]
[./p]
family = LAGRANGE
order = FIRST
[../]
[]
[BCs]
[./p_corner]
# This is required, because pressure term is *not* integrated by parts.
type = DirichletBC
boundary = top_right
value = 0
variable = p
[../]
[./u_in]
type = DirichletBC
boundary = bottom
variable = vel_x
value = 0
[../]
[./v_in]
type = FunctionDirichletBC
boundary = bottom
variable = vel_y
function = 'inlet_func'
[../]
[./u_axis_and_walls]
type = DirichletBC
boundary = 'left right'
variable = vel_x
value = 0
[../]
[./v_no_slip]
type = DirichletBC
boundary = 'right'
variable = vel_y
value = 0
[../]
[./u_out]
type = INSMomentumNoBCBCLaplaceForm
boundary = top
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./v_out]
type = INSMomentumNoBCBCLaplaceForm
boundary = top
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
[]
[Kernels]
[./mass]
type = INSMassRZ
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
[./x_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./y_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 'volume'
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[../]
[]
(modules/solid_mechanics/test/tests/critical_time_step/non-isotropic_error_test.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
type = GeneratedMesh
dim = 3
nx = 10
ny = 10
nz = 15
xmin = 0
xmax = 2
ymin = 0
ymax = 2
zmin = 0
zmax = 1
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[Kernels]
[SolidMechanics]
[../]
[]
[BCs]
[./2_x]
type = DirichletBC
variable = disp_x
boundary = 3
value = 0.0
[../]
[./2_y]
type = DirichletBC
variable = disp_y
boundary = 3
value = 0.0
[../]
[./2_z]
type = DirichletBC
variable = disp_z
boundary = 3
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1.684e5 0.176e5 0.176e5 1.684e5 0.176e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
[../]
[./strain]
type = ComputeSmallStrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./density]
type = GenericConstantMaterial
prop_names = 'density'
prop_values = '8050.0'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
nl_abs_tol = 1e-4
l_max_its = 3
start_time = 0.0
dt = 0.1
num_steps = 1
end_time = 1.0
[]
[Postprocessors]
[./time_step]
type = CriticalTimeStep
[../]
[]
[Outputs]
file_base = out
csv = true
[]
(test/tests/controls/output/controllable_clear.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
elem_type = QUAD4
uniform_refine = 4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.1
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 3
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[DiracKernels]
[./test_object]
type = MaterialPointSource
point = '0.5 0.5 0'
variable = u
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'matp'
prop_values = '1'
block = 0
[../]
[]
[Postprocessors]
[./test_object]
type = FunctionValuePostprocessor
function = '2*(x+y)'
point = '0.5 0.5 0'
[../]
[./other_point_test_object]
type = FunctionValuePostprocessor
function = '3*(x+y)'
point = '0.5 0.5 0'
[../]
[]
[Outputs]
controls = true
[]
[Controls]
[./point_control]
type = TestControl
test_type = 'point'
parameter = '*/*/point'
execute_on = 'initial'
[../]
[]
(modules/functional_expansion_tools/examples/2D_interface_different_submesh/sub.i)
# Derived from the example '2D_interface' with the following differences:
#
# 1) The number of y divisions in the sub app is not the same as the master app
# 2) The subapp mesh is skewed in y
# 3) The Functional Expansion order for the flux term was increased to 7
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0.4
xmax = 2.4
nx = 30
ymin = 0.0
ymax = 10.0
ny = 23
bias_y = 1.2
[]
[Variables]
[./s]
[../]
[]
[Kernels]
[./diff_s]
type = HeatConduction
variable = s
[../]
[./time_diff_s]
type = HeatConductionTimeDerivative
variable = s
[../]
[]
[Materials]
[./Unobtanium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_s]
type = ConstantIC
value = 2
variable = s
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = s
boundary = bottom
value = 0.1
[../]
[./interface_flux]
type = FXFluxBC
boundary = left
variable = s
function = FX_Basis_Flux_Sub
[../]
[]
[Functions]
[./FX_Basis_Value_Sub]
type = FunctionSeries
series_type = Cartesian
orders = '4'
physical_bounds = '0.0 10'
y = Legendre
[../]
[./FX_Basis_Flux_Sub]
type = FunctionSeries
series_type = Cartesian
orders = '7'
physical_bounds = '0.0 10'
y = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Sub]
type = FXBoundaryValueUserObject
function = FX_Basis_Value_Sub
variable = s
boundary = left
[../]
[./FX_Flux_UserObject_Sub]
type = FXBoundaryFluxUserObject
function = FX_Basis_Flux_Sub
variable = s
boundary = left
diffusivity = thermal_conductivity
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 1.0
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
(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/inertial_torque/residual.i)
# Checking that the InertialTorque calculates the correct residual.
# This input file does not have any physical meaning! It is simply checking
# the residual is computed correctly in a very simple setting.
#
# The following displacements are prescribed
# disp_x = 1+t
# disp_y = -2(1+t)
# disp_z = 2(1+t)
# along with the velocities (which don't follow from the displacements!)
# vel_x = -2(t+1)
# vel_y = -5(t+1)
# vel_z = t+1
# and accelerations
# accel_x = -t+2
# accel_y = -5t+2
# accel_z = t+2
#
# Using the Newmark + Damping parameters
# beta = 1/4
# gamma = 1/2
# eta = 1/4
# alpha = 1/2
# There give
# accel_x = 11.75
# accel_y = 11
# accel_z = 3
#
# The InertialTorque should compute
# Residual_0 = rho * eps_0jk * disp_j * accel_k
# = rho * (disp_y * accel_z - disp_z * accel_y)
# = -56 * rho
# Residual_1 = rho * eps_0jk * disp_j * accel_k
# = rho * (disp_z * accel_x - disp_x * accel_z)
# = 41 * rho
# Residual_2 = rho * eps_2jk * disp_j * accel_k
# = rho * (disp_x * accel_y - disp_y * accel_x)
# = 69 * rho
# These get integrated over the unit element to give (1/8)^th of these
# values at each node
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
beta = 0.25
gamma = 0.5
alpha = 0.5
eta = 0.25
[]
[Variables]
[./wc_x]
[../]
[./wc_y]
[../]
[./wc_z]
[../]
[]
[Kernels]
[./icm_x]
type = InertialTorque
component = 0
variable = wc_x
save_in = res_x
[../]
[./icm_y]
type = InertialTorque
component = 1
variable = wc_y
density = another_density
save_in = res_y
[../]
[./icm_z]
type = InertialTorque
component = 2
variable = wc_z
density = yet_another_density
save_in = res_z
[../]
[]
[AuxVariables]
[./res_x]
[../]
[./res_y]
[../]
[./res_z]
[../]
[./disp_x]
initial_condition = 1
[../]
[./disp_y]
initial_condition = -2
[../]
[./disp_z]
initial_condition = 2
[../]
[./vel_x]
initial_condition = -2
[../]
[./vel_y]
initial_condition = -5
[../]
[./vel_z]
initial_condition = 1
[../]
[./accel_x]
initial_condition = 2
[../]
[./accel_y]
initial_condition = 2
[../]
[./accel_z]
initial_condition = 2
[../]
[]
[AuxKernels]
[./disp_x]
type = FunctionAux
variable = disp_x
function = '1+t'
[../]
[./disp_y]
type = FunctionAux
variable = disp_y
function = '-2*(1+t)'
[../]
[./disp_z]
type = FunctionAux
variable = disp_z
function = '2*(1+t)'
[../]
[./vel_x]
type = FunctionAux
variable = vel_x
function = '-2*t'
[../]
[./vel_y]
type = FunctionAux
variable = vel_y
function = '-5*t'
[../]
[./vel_z]
type = FunctionAux
variable = vel_z
function = 't'
[../]
[./accel_x]
type = FunctionAux
variable = accel_x
function = '-t+2'
[../]
[./accel_y]
type = FunctionAux
variable = accel_y
function = '-5*t+2'
[../]
[./accel_z]
type = FunctionAux
variable = accel_z
function = 't+2'
[../]
[]
[Postprocessors]
[./res_x]
type = PointValue
point = '0 0 0'
variable = res_x
[../]
[./res_y]
type = PointValue
point = '0 0 0'
variable = res_y
[../]
[./res_z]
type = PointValue
point = '0 0 0'
variable = res_z
[../]
[]
[Materials]
[./density]
type = GenericConstantMaterial
prop_names = 'density another_density yet_another_density'
prop_values = '2.0 8.0 16.0'
[../]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 1
nl_abs_tol = 1E30 # large because there is no way of getting to residual=0 here
[]
[Outputs]
csv = true
[]
(modules/stochastic_tools/examples/parameter_study/diffusion.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables/T]
initial_condition = 300
[]
[Kernels]
[time]
type = ADTimeDerivative
variable = T
[]
[diff]
type = ADMatDiffusion
variable = T
diffusivity = diffusivity
[]
[source]
type = ADBodyForce
variable = T
value = 100
function = 1
[]
[]
[BCs]
[left]
type = ADDirichletBC
variable = T
boundary = left
value = 300
[]
[right]
type = ADNeumannBC
variable = T
boundary = right
value = -100
[]
[]
[Materials/constant]
type = ADGenericConstantMaterial
prop_names = 'diffusivity'
prop_values = 1
[]
[Executioner]
type = Transient
num_steps = 4
dt = 0.25
[]
[Postprocessors]
[T_avg]
type = ElementAverageValue
variable = T
execute_on = 'initial timestep_end'
[]
[q_left]
type = ADSideDiffusiveFluxAverage
variable = T
boundary = left
diffusivity = diffusivity
execute_on = 'initial timestep_end'
[]
[]
[Controls/stochastic]
type = SamplerReceiver
[]
[Outputs]
[]
(modules/heat_transfer/test/tests/fvbcs/fv_thermal_resistance/test.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
xmax = 2
[]
[]
[Variables]
[u]
type = MooseVariableFVReal
initial_condition = 0.5
[]
[]
[FVKernels]
[diff_left]
type = FVDiffusion
variable = u
coeff = 4
[]
[gradient_creating]
type = FVBodyForce
variable = u
[]
[]
[FVBCs]
[left]
type = FVThermalResistanceBC
geometry = 'cartesian'
variable = u
T_ambient = 10
htc = 'htc'
emissivity = 0.2
thermal_conductivities = '0.1 0.2 0.3'
conduction_thicknesses = '1 0.7 0.2'
boundary = 'left'
# Test setting iteration parameters
step_size = 0.02
max_iterations = 120
tolerance = 1e-4
[]
[top]
type = FVThermalResistanceBC
geometry = 'cartesian'
variable = u
# Test setting the temperature separately from the variable
temperature = 'u'
T_ambient = 14
htc = 'htc'
emissivity = 0
thermal_conductivities = '0.1 0.2 0.3'
conduction_thicknesses = '1 0.7 0.4'
boundary = 'top'
[]
[other]
type = FVDirichletBC
variable = u
boundary = 'right bottom'
value = 0
[]
[]
[Materials]
[cht]
type = ADGenericConstantMaterial
prop_names = 'htc'
prop_values = '1'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/test/tests/actions/addmaterials2.i)
# Test that the PorousFlowAddMaterialAction correctly handles the case where
# the at_nodes parameter isn't provided. In this case, only a single material
# is given, and the action must correctly identify if materials should be added
# at the nodes, qps, or even both
[Mesh]
type = GeneratedMesh
dim = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[pwater]
initial_condition = 1e6
[]
[sgas]
initial_condition = 0.3
[]
[temperature]
initial_condition = 50
[]
[]
[AuxVariables]
[x0]
initial_condition = 0.1
[]
[x1]
initial_condition = 0.5
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pwater
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = sgas
[]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pwater
[]
[flux1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = sgas
[]
[energy_dot]
type = PorousFlowEnergyTimeDerivative
variable = temperature
[]
[heat_advection]
type = PorousFlowHeatAdvection
variable = temperature
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pwater sgas temperature'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-5
pc_max = 1e7
sat_lr = 0.1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1e9
viscosity = 1e-3
density0 = 1000
thermal_expansion = 0
cv = 2
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 1e9
viscosity = 1e-4
density0 = 20
thermal_expansion = 0
cv = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = 50
[]
[ppss]
type = PorousFlow2PhasePS
phase0_porepressure = pwater
phase1_saturation = sgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'x0 x1'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-12 0 0 0 1e-12 0 0 0 1e-12'
[]
[relperm0]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
s_res = 0.1
sum_s_res = 0.11
[]
[relperm1]
type = PorousFlowRelativePermeabilityCorey
n = 3
phase = 1
s_res = 0.01
sum_s_res = 0.11
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[rock_heat]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 1.0
density = 125
[]
[unused]
type = GenericConstantMaterial
prop_names = unused
prop_values = 0
[]
[]
[Executioner]
type = Transient
end_time = 1
nl_abs_tol = 1e-14
[]
(test/tests/quadrature/order/material_with_order.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '1 1 1'
dy = ' 1 1 1'
subdomain_id = '1 2 3
4 5 6
7 8 9'
[]
[]
[Variables]
[u]
order = FIRST
family = L2_LAGRANGE
initial_condition = 1
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[forcing]
type = BodyForce
variable = u
[]
[]
[DGKernels]
[dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[]
[test]
type = MatDGKernel
variable = u
mat_prop = dummy
[]
[]
[BCs]
[bc]
type = PenaltyDirichletBC
variable = u
boundary = '0 1 2 3'
penalty = 1e4
value = 0
[]
[]
[Postprocessors]
[block1_qps]
type = NumElemQPs
block = 1
[]
[block5_qps]
type = NumElemQPs
block = 5
[]
[block6_qps]
type = NumElemQPs
block = 6
[]
[]
[Materials]
[dummy]
type = GenericConstantMaterial
block = '1 2 3 4 6 7 8 9'
prop_names = dummy
prop_values = 1
[]
[qordermaterial]
type = QuadratureMaterial
block = 5
property_name = dummy
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
execute_on = 'timestep_end'
csv = 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/chemical_reactions/test/tests/aqueous_equilibrium/water_dissociation.i)
# Dissociation of H2O at 25C
# The dissociation of water into H+ and OH- is given by
# the equilibrium reaction H20 = H+ + OH-
#
# This can be entered in the ReactionNetwork block using
# Aqueous equilibrium reaction: - H+ = OH-, Keq = 10^(-13.9951)
#
# Note that H2O does not need to be explicitly included.
#
# The primary chemical species is H+, and the secondary equilibrium
# species is OH-.
#
# The initial concentration of H+ is 10^-7, which is its value in neutral
# water. The pH of this water is therefore 7.
[Mesh]
type = GeneratedMesh
dim = 2
[]
[AuxVariables]
[./ph]
[../]
[]
[AuxKernels]
[./ph]
type = PHAux
h_conc = h+
variable = ph
[../]
[]
[Variables]
[./h+]
initial_condition = 1.0e-7
[../]
[]
[ReactionNetwork]
[./AqueousEquilibriumReactions]
primary_species = h+
secondary_species = oh-
reactions = '- h+ = oh- -13.9951'
[../]
[]
[Kernels]
[./h+_ie]
type = PrimaryTimeDerivative
variable = h+
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity porosity conductivity'
prop_values = '1e-7 0.25 1.0'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
end_time = 1
nl_abs_tol = 1e-12
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
[./h+]
type = ElementIntegralVariablePostprocessor
variable = h+
execute_on = 'initial timestep_end'
[../]
[./oh-]
type = ElementIntegralVariablePostprocessor
variable = oh-
execute_on = 'initial timestep_end'
[../]
[./ph]
type = ElementIntegralVariablePostprocessor
variable = ph
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
perf_graph = true
csv = true
[]
(modules/thermal_hydraulics/test/tests/components/hs_boundary_ambient_convection/from_file_3d.i)
T_hs = 300
T_ambient1 = 500
htc1 = 100
T_ambient2 = 400
htc2 = 300
t = 0.001
# dimensions of the side 'left'
height = 5
depth = 2
# SS 316
density = 8.0272e3
specific_heat_capacity = 502.1
conductivity = 16.26
A = ${fparse height * depth}
heat_flux_avg = ${fparse 0.5 * (htc1 * (T_ambient1 - T_hs) + htc2 * (T_ambient2 - T_hs))}
heat_flux_integral = ${fparse heat_flux_avg * A}
scale = 0.8
E_change = ${fparse scale * heat_flux_integral * t}
[Functions]
[T_ambient_fn]
type = PiecewiseConstant
axis = z
x = '-2.5 0'
y = '${T_ambient1} ${T_ambient2}'
[]
[htc_ambient_fn]
type = PiecewiseConstant
axis = z
x = '-2.5 0'
y = '${htc1} ${htc2}'
[]
[]
[Materials]
[mat]
type = ADGenericConstantMaterial
block = 'hs:brick'
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '${density} ${specific_heat_capacity} ${conductivity}'
[]
[]
[Components]
[hs]
type = HeatStructureFromFile3D
file = box.e
position = '0 0 0'
initial_T = ${T_hs}
[]
[ambient_convection]
type = HSBoundaryAmbientConvection
boundary = 'hs:left'
hs = hs
T_ambient = T_ambient_fn
htc_ambient = htc_ambient_fn
scale = ${scale}
[]
[]
[Postprocessors]
[E_hs]
type = ADHeatStructureEnergy3D
block = 'hs:brick'
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_hs_change]
type = ChangeOverTimePostprocessor
postprocessor = E_hs
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_change_relerr]
type = RelativeDifferencePostprocessor
value1 = E_hs_change
value2 = ${E_change}
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
[TimeIntegrator]
type = ActuallyExplicitEuler
solve_type = lumped
[]
dt = ${t}
num_steps = 1
abort_on_solve_fail = true
[]
[Outputs]
[out]
type = CSV
show = 'E_change_relerr'
execute_on = 'FINAL'
[]
[]
(test/tests/constraints/overwrite_variables/test_balance.i)
# Test to exemplify the use of overwriting of variables in the framework.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
diffusivity = 1e3
use_displaced_mesh = true
[]
[Mesh]
[block_one]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = 4.5
xmax = 5.5
ymin = 4.5
ymax = 5.5
zmin = 0.0001
zmax = 1.0001
boundary_name_prefix = 'ball'
[]
[block_two]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 2
xmin = 0.0
xmax = 10
ymin = 0.0
ymax = 10
zmin = -2
zmax = 0
boundary_name_prefix = 'base'
boundary_id_offset = 10
[]
[block_one_id]
type = SubdomainIDGenerator
input = block_one
subdomain_id = 1
[]
[block_two_id]
type = SubdomainIDGenerator
input = block_two
subdomain_id = 2
[]
[combine]
type = MeshCollectionGenerator
inputs = ' block_one_id block_two_id'
[]
allow_renumbering = false
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[AuxVariables]
[vel_x]
[]
[accel_x]
[]
[vel_y]
[]
[accel_y]
[]
[vel_z]
[]
[accel_z]
[]
[gap_rate]
[]
[]
[Kernels]
[disp_x]
type = MatDiffusion
variable = disp_x
[]
[disp_y]
type = MatDiffusion
variable = disp_y
[]
[disp_z]
type = MatDiffusion
variable = disp_z
[]
[vel_x]
type = TimeDerivative
variable = disp_x
[]
[vel_y]
type = TimeDerivative
variable = disp_y
[]
[vel_z]
type = TimeDerivative
variable = disp_z
[]
[source_m]
type = BodyForce
variable = disp_z
value = -100
[]
[]
[BCs]
[x_front]
type = DirichletBC
variable = disp_x
boundary = 'ball_front'
preset = false
value = 0.0
[]
[y_front]
type = DirichletBC
variable = disp_y
boundary = 'ball_front'
preset = false
value = 0.0
[]
[x_fixed]
type = DirichletBC
variable = disp_x
boundary = 'base_back'
value = 0.0
preset = true
[]
[y_fixed]
type = DirichletBC
variable = disp_y
boundary = 'base_back'
value = 0.0
preset = true
[]
[z_fixed]
type = DirichletBC
variable = disp_z
boundary = 'base_back'
value = 0.0
preset = true
[]
[z_fixed_front]
type = DirichletBC
variable = disp_z
boundary = 'base_front'
value = 0.0
preset = true
[]
[]
[Constraints]
[overwrite]
type = ExplicitDynamicsOverwrite
model = frictionless_balance
primary = base_front
secondary = ball_back
vel_x = 'vel_x'
vel_y = 'vel_y'
vel_z = 'vel_z'
primary_variable = disp_x
boundary = 'base_front'
component = 0
variable = disp_x
gap_rate = gap_rate
[]
[]
[Materials]
[density_one]
type = GenericConstantMaterial
prop_names = density
prop_values = 1e5
outputs = 'exodus'
output_properties = 'density'
block = '1'
[]
[density_two]
type = GenericConstantMaterial
prop_names = density
prop_values = 1e5
outputs = 'exodus'
output_properties = 'density'
block = '2'
[]
[]
[Executioner]
type = Transient
start_time = -0.01
end_time = -0.008
dt = 1.0e-5
timestep_tolerance = 1e-6
[TimeIntegrator]
type = CentralDifference
solve_type = lumped
[]
[]
[Outputs]
interval = 50
exodus = true
csv = true
[]
[Postprocessors]
[]
(test/tests/kernels/ad_mat_diffusion/ad_1D_transient.i)
# This test solves a 1D transient heat equation
# The error is caclulated by comparing to the analytical solution
# The problem setup and analytical solution are taken from "Advanced Engineering
# Mathematics, 10th edition" by Erwin Kreyszig.
# http://www.amazon.com/Advanced-Engineering-Mathematics-Erwin-Kreyszig/dp/0470458364
# It is Example 1 in section 12.6 on page 561
[Mesh]
type = GeneratedMesh
dim = 1
nx = 160
xmax = 80
[]
[Variables]
[./T]
[../]
[]
[ICs]
[./T_IC]
type = FunctionIC
variable = T
function = '100*sin(pi*x/80)'
[../]
[]
[Kernels]
[./diff]
type = ADMatDiffusion
variable = T
diffusivity = diffusivity
[../]
[./dt]
type = CoefTimeDerivative
variable = T
Coefficient = 0.82064
[../]
[]
[BCs]
[./sides]
type = DirichletBC
variable = T
boundary = 'left right'
value = 0
[../]
[]
[Materials]
[./k]
type = ADGenericConstantMaterial
prop_names = 'diffusivity'
prop_values = '0.95'
[../]
[]
[Executioner]
type = Transient
dt = 1e-2
end_time = 1
[]
[Postprocessors]
[./error]
type = NodalL2Error
function = '100*sin(pi*x/80)*exp(-0.95/(0.092*8.92)*pi^2/80^2*t)'
variable = T
outputs = console
[../]
[]
[Outputs]
exodus = 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/chemical_reactions/test/tests/solid_kinetics/calcite_precipitation.i)
# Example of batch reaction of calcium (Ca++) and bicarbonate (HCO3-) precipitation
# to form calcite (CaCO3).
#
# The reaction network considered is as follows:
# Aqueous equilibrium reactions:
# a) H+ + HCO3- = CO2(aq), Keq = 10^(6.341)
# b) HCO3- = H+ + CO3--, Keq = 10^(-10.325)
# c) Ca++ + HCO3- = H+ + CaCO3(aq), Keq = 10^(-7.009)
# d) Ca++ + HCO3- = CaHCO3+, Keq = 10^(-0.653)
# e) Ca++ = H+ + CaOh+, Keq = 10^(-12.85)
# f) - H+ = OH-, Keq = 10^(-13.991)
#
# Kinetic reactions
# g) Ca++ + HCO3- = H+ + CaCO3(s), A = 0.461 m^2/L, k = 6.456542e-2 mol/m^2 s,
# Keq = 10^(1.8487)
#
# The primary chemical species are H+, HCO3- and Ca++.
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Variables]
[./ca++]
initial_condition = 2.0e-2
[../]
[./h+]
initial_condition = 1.0e-8
[../]
[./hco3-]
initial_condition = 1.0e-2
[../]
[]
[AuxVariables]
[./caco3_s]
[../]
[./ph]
[../]
[]
[AuxKernels]
[./ph]
type = PHAux
h_conc = h+
variable = ph
[../]
[]
[ReactionNetwork]
[./AqueousEquilibriumReactions]
primary_species = 'ca++ hco3- h+'
secondary_species = 'co2_aq co3-- caco3_aq cahco3+ caoh+ oh-'
reactions = 'h+ + hco3- = co2_aq 6.3447,
hco3- - h+ = co3-- -10.3288,
ca++ + hco3- - h+ = caco3_aq -7.0017,
ca++ + hco3- = cahco3+ -1.0467,
ca++ - h+ = caoh+ -12.85,
- h+ = oh- -13.9951'
[../]
[./SolidKineticReactions]
primary_species = 'ca++ hco3- h+'
kin_reactions = 'ca++ + hco3- - h+ = caco3_s'
secondary_species = caco3_s
log10_keq = 1.8487
reference_temperature = 298.15
system_temperature = 298.15
gas_constant = 8.314
specific_reactive_surface_area = 0.1
kinetic_rate_constant = 1e-6
activation_energy = 1.5e4
[../]
[]
[Kernels]
[./ca++_ie]
type = PrimaryTimeDerivative
variable = ca++
[../]
[./h+_ie]
type = PrimaryTimeDerivative
variable = h+
[../]
[./hco3-_ie]
type = PrimaryTimeDerivative
variable = hco3-
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'porosity diffusivity conductivity'
prop_values = '0.25 1e-9 1.0'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
end_time = 100
dt = 10
nl_abs_tol = 1e-12
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
[./h+]
type = ElementIntegralVariablePostprocessor
variable = h+
execute_on = 'initial timestep_end'
[../]
[./ca++]
type = ElementIntegralVariablePostprocessor
variable = ca++
execute_on = 'initial timestep_end'
[../]
[./hco3-]
type = ElementIntegralVariablePostprocessor
variable = hco3-
execute_on = 'initial timestep_end'
[../]
[./co2_aq]
type = ElementIntegralVariablePostprocessor
variable = co2_aq
execute_on = 'initial timestep_end'
[../]
[./oh-]
type = ElementIntegralVariablePostprocessor
variable = oh-
execute_on = 'initial timestep_end'
[../]
[./co3--]
type = ElementIntegralVariablePostprocessor
variable = co3--
execute_on = 'initial timestep_end'
[../]
[./caco3_aq]
type = ElementIntegralVariablePostprocessor
variable = caco3_aq
execute_on = 'initial timestep_end'
[../]
[./caco3_s]
type = ElementIntegralVariablePostprocessor
variable = caco3_s
execute_on = 'initial timestep_end'
[../]
[./ph]
type = ElementIntegralVariablePostprocessor
variable = ph
execute_on = 'initial timestep_end'
[../]
[./calcite_vf]
type = TotalMineralVolumeFraction
variable = caco3_s
molar_volume = 36.934e-6
[../]
[]
[Outputs]
perf_graph = true
csv = true
[]
(modules/phase_field/test/tests/initial_conditions/SmoothSuperellipsoidIC.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 25
xmax = 50
ymax = 50
elem_type = QUAD4
[]
[Variables]
[./c]
order = THIRD
family = HERMITE
[../]
[]
[ICs]
[./c]
type = SmoothSuperellipsoidIC
variable = c
x1 = 25.0
y1 = 25.0
a = 8.0
b = 12.0
n = 3.5
invalue = 1.0
outvalue = -0.8
int_width = 4.0
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./CHSolid]
type = CHMath
variable = c
mob_name = M
[../]
[./CHInterface]
type = CHInterface
variable = c
kappa_name = kappa_c
mob_name = M
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./constant]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1.0 1.0'
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_max_its = 20
l_tol = 1.0e-4
nl_max_its = 40
nl_rel_tol = 1e-9
start_time = 0.0
num_steps = 1
dt = 2.0
[]
[Outputs]
exodus = false
[./out]
type = Exodus
refinements = 2
[../]
[]
(modules/electromagnetics/test/tests/auxkernels/current_density/current_density.i)
# This test creates a current density field in graphite running from the top left
# corner of the domain (powered with a potential of 1 V) into the bottom right
# corner (a slice has been taken from this corner to provide a grounded surface).
# Current flow should proceed from the powered surfaces to the grounded surface.
[Mesh]
[box]
type = GeneratedMeshGenerator
dim = 2
nx = 50
ny = 50
elem_type = TRI6
[]
[delete_corner]
type = PlaneDeletionGenerator
input = box
point = '0.9 0.1 0'
normal = '1 -1 0'
new_boundary = 'corner'
[]
[]
[Variables]
[potential]
family = LAGRANGE
order = FIRST
[]
[]
[AuxVariables]
[J]
family = NEDELEC_ONE
order = FIRST
[]
[]
[Kernels]
[poisson]
type = Diffusion
variable = potential
[]
[]
[BCs]
[driven]
type = DirichletBC
variable = potential
value = 1
boundary = 'top left'
[]
[grounded]
type = DirichletBC
variable = potential
value = 0
boundary = 'corner'
[]
[]
[AuxKernels]
[current_density]
type = ADCurrentDensity
variable = J
potential = potential
[]
[]
[Materials]
[conductivity] # Electrical conductivity for graphite at 293.15 K in S/m
type = ADGenericConstantMaterial # perpendicular to basal plane
prop_names = 'electrical_conductivity' # Citation: H. Pierson, "Handbook of carbon, graphite,
prop_values = 3.33e2 # diamond, and fullerenes: properties, processing,
[] # and applications," p. 61, William Andrew, 1993.
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
exodus = true
print_linear_converged_reason = false
print_nonlinear_converged_reason = false
[]
(modules/combined/test/tests/phase_field_fracture/crack2d_iso_wo_time.i)
#This input does not add time derivative kernel for phase field equation
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
ymax = 0.5
[]
[./noncrack]
type = BoundingBoxNodeSetGenerator
new_boundary = noncrack
bottom_left = '0.5 0 0'
top_right = '1 0 0'
input = gen
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Modules]
[./TensorMechanics]
[./Master]
[./mech]
add_variables = true
strain = SMALL
additional_generate_output = 'stress_yy'
save_in = 'resid_x resid_y'
[../]
[../]
[../]
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./resid_x]
[../]
[./resid_y]
[../]
[]
[Kernels]
[./solid_x]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_x
component = 0
c = c
[../]
[./solid_y]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_y
component = 1
c = c
[../]
[./ACBulk]
type = AllenCahn
variable = c
f_name = F
[../]
[./ACInterface]
type = ACInterface
variable = c
kappa_name = kappa_op
[../]
[]
[BCs]
[./ydisp]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = 't'
[../]
[./yfix]
type = DirichletBC
variable = disp_y
boundary = noncrack
value = 0
[../]
[./xfix]
type = DirichletBC
variable = disp_x
boundary = top
value = 0
[../]
[]
[Materials]
[./pfbulkmat]
type = GenericConstantMaterial
prop_names = 'gc_prop l visco'
prop_values = '1e-3 0.04 1e-4'
[../]
[./define_mobility]
type = ParsedMaterial
material_property_names = 'gc_prop visco'
property_name = L
expression = '1.0/(gc_prop * visco)'
[../]
[./define_kappa]
type = ParsedMaterial
material_property_names = 'gc_prop l'
property_name = kappa_op
expression = 'gc_prop * l'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '120.0 80.0'
fill_method = symmetric_isotropic
[../]
[./elastic]
type = ComputeLinearElasticPFFractureStress
c = c
E_name = 'elastic_energy'
D_name = 'degradation'
F_name = 'local_fracture_energy'
decomposition_type = strain_spectral
[../]
[./degradation]
type = DerivativeParsedMaterial
property_name = degradation
coupled_variables = 'c'
expression = '(1.0-c)^2*(1.0 - eta) + eta'
constant_names = 'eta'
constant_expressions = '0.0'
derivative_order = 2
[../]
[./local_fracture_energy]
type = DerivativeParsedMaterial
property_name = local_fracture_energy
coupled_variables = 'c'
material_property_names = 'gc_prop l'
expression = 'c^2 * gc_prop / 2 / l'
derivative_order = 2
[../]
[./fracture_driving_energy]
type = DerivativeSumMaterial
coupled_variables = c
sum_materials = 'elastic_energy local_fracture_energy'
derivative_order = 2
property_name = F
[../]
[]
[Postprocessors]
[./resid_x]
type = NodalSum
variable = resid_x
boundary = 2
[../]
[./resid_y]
type = NodalSum
variable = resid_y
boundary = 2
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
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'
nl_rel_tol = 1e-8
l_max_its = 10
nl_max_its = 10
dt = 1e-4
dtmin = 1e-4
num_steps = 2
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/materials/wall_friction_factor/churchill.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
allow_renumbering = false
[]
[Variables]
[rhoA]
[]
[rhouA]
[]
[rhoEA]
[]
[]
[Materials]
[props]
type = GenericConstantMaterial
prop_names = 'rho vel D_h mu '
prop_values = '1000 0.1 0.15 0.001'
[]
[fD_material]
type = WallFrictionChurchillMaterial
rho = rho
vel = vel
D_h = D_h
mu = mu
f_D = 'f_D'
rhoA = rhoA
rhouA = rhouA
rhoEA = rhoEA
roughness = 0.5
[]
[]
[Postprocessors]
[fD]
type = ElementAverageMaterialProperty
mat_prop = f_D
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
csv = true
execute_on = 'FINAL'
[]
(modules/heat_transfer/test/tests/code_verification/spherical_test_no3.i)
# Problem III.3
#
# The thermal conductivity of a spherical shell varies linearly with
# temperature: k = k0(1+beta* u). The inside radius is ri and the outside radius
# is ro. It has a constant internal heat generation q and is exposed to
# the same constant temperature on both surfaces: u(ri) = u(ro) = uo.
#
# REFERENCE:
# A. Toptan, et al. (Mar.2020). Tech. rep. CASL-U-2020-1939-000, SAND2020-3887 R. DOI:10.2172/1614683.
[Mesh]
[./geom]
type = GeneratedMeshGenerator
dim = 1
elem_type = EDGE2
nx = 4
xmin = 0.2
[../]
[]
[Variables]
[./u]
order = FIRST
[../]
[]
[Problem]
coord_type = RSPHERICAL
[]
[Functions]
[./exact]
type = ParsedFunction
symbol_names = 'q k0 ri ro beta u0'
symbol_values = '1200 1 0.2 1.0 1e-3 0'
expression = 'u0+(1/beta)*( ( 1 + (1/3)*beta*((ro^2-x^2)-(ro^2-ri^2) * (1/x-1/ro)/(1/ri-1/ro))*q/k0 )^0.5 - 1)'
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = u
[../]
[./heatsource]
type = HeatSource
function = 1200
variable = u
[../]
[]
[BCs]
[./uo]
type = DirichletBC
boundary = 'left right'
variable = u
value = 0
[../]
[]
[Materials]
[./property]
type = GenericConstantMaterial
prop_names = 'density specific_heat'
prop_values = '1.0 1.0'
[../]
[./thermal_conductivity]
type = ParsedMaterial
property_name = 'thermal_conductivity'
coupled_variables = u
expression = '1 * (1 + 1e-3*u)'
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = exact
variable = u
[../]
[./h]
type = AverageElementSize
[]
[]
[Outputs]
csv = true
[]
(modules/contact/test/tests/explicit_dynamics/settlement.i)
# One element test to test the central difference time integrator in 3D.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[Mesh]
[block_one]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = 4.5
xmax = 5.5
ymin = 4.5
ymax = 5.5
zmin = 0.0001
zmax = 1.0001
boundary_name_prefix = 'ball'
[]
[block_two]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 2
xmin = 0.0
xmax = 10
ymin = 0.0
ymax = 10
zmin = -2
zmax = 0
boundary_name_prefix = 'base'
boundary_id_offset = 10
[]
[block_one_id]
type = SubdomainIDGenerator
input = block_one
subdomain_id = 1
[]
[block_two_id]
type = SubdomainIDGenerator
input = block_two
subdomain_id = 2
[]
[combine]
type = MeshCollectionGenerator
inputs = ' block_one_id block_two_id'
[]
[]
[AuxVariables]
[penetration]
[]
[]
[AuxKernels]
[penetration]
type = PenetrationAux
variable = penetration
boundary = ball_back
paired_boundary = base_front
quantity = distance
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[AuxVariables]
[gap_rate]
[]
[vel_x]
[]
[accel_x]
[]
[vel_y]
[]
[accel_y]
[]
[vel_z]
[]
[accel_z]
[]
[stress_zz]
family = MONOMIAL
order = CONSTANT
[]
[strain_zz]
family = MONOMIAL
order = CONSTANT
[]
[kinetic_energy_one]
order = CONSTANT
family = MONOMIAL
[]
[elastic_energy_one]
order = CONSTANT
family = MONOMIAL
[]
[kinetic_energy_two]
order = CONSTANT
family = MONOMIAL
[]
[elastic_energy_two]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[stress_zz]
type = RankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 2
variable = stress_zz
execute_on = 'TIMESTEP_END'
[]
[strain_zz]
type = RankTwoAux
rank_two_tensor = mechanical_strain
index_i = 2
index_j = 2
variable = strain_zz
[]
[accel_x]
type = TestNewmarkTI
variable = accel_x
displacement = disp_x
first = false
execute_on = 'LINEAR TIMESTEP_BEGIN TIMESTEP_END'
[]
[vel_x]
type = TestNewmarkTI
variable = vel_x
displacement = disp_x
execute_on = 'LINEAR TIMESTEP_BEGIN TIMESTEP_END'
[]
[accel_y]
type = TestNewmarkTI
variable = accel_y
displacement = disp_y
first = false
execute_on = 'LINEAR TIMESTEP_BEGIN TIMESTEP_END'
[]
[vel_y]
type = TestNewmarkTI
variable = vel_y
displacement = disp_x
execute_on = 'LINEAR TIMESTEP_BEGIN TIMESTEP_END'
[]
[accel_z]
type = TestNewmarkTI
variable = accel_z
displacement = disp_z
first = false
execute_on = 'LINEAR TIMESTEP_BEGIN TIMESTEP_END'
[]
[vel_z]
type = TestNewmarkTI
variable = vel_z
displacement = disp_z
execute_on = 'LINEAR TIMESTEP_BEGIN TIMESTEP_END'
[]
[kinetic_energy_one]
type = KineticEnergyAux
block = '1'
variable = kinetic_energy_one
newmark_velocity_x = vel_x
newmark_velocity_y = vel_y
newmark_velocity_z = vel_z
density = density
[]
[elastic_energy_one]
type = ElasticEnergyAux
variable = elastic_energy_one
block = '1'
[]
[kinetic_energy_two]
type = KineticEnergyAux
block = '2'
variable = kinetic_energy_two
newmark_velocity_x = vel_x
newmark_velocity_y = vel_y
newmark_velocity_z = vel_z
density = density
[]
[elastic_energy_two]
type = ElasticEnergyAux
variable = elastic_energy_two
block = '2'
[]
[]
[Kernels]
[DynamicTensorMechanics]
displacements = 'disp_x disp_y disp_z'
stiffness_damping_coefficient = 1.0e-3
generate_output = 'stress_zz strain_zz'
[]
[inertia_x]
type = InertialForce
variable = disp_x
[]
[inertia_y]
type = InertialForce
variable = disp_y
[]
[inertia_z]
type = InertialForce
variable = disp_z
[]
[gravity]
type = Gravity
variable = disp_z
value = -98.10
[]
[]
[BCs]
[x_front]
type = DirichletBC
variable = disp_x
boundary = 'ball_front'
preset = false
value = 0.0
[]
[y_front]
type = DirichletBC
variable = disp_y
boundary = 'ball_front'
preset = false
value = 0.0
[]
[x_fixed]
type = DirichletBC
variable = disp_x
boundary = 'base_back'
preset = false
value = 0.0
[]
[y_fixed]
type = DirichletBC
variable = disp_y
boundary = 'base_back'
preset = false
value = 0.0
[]
[z_fixed]
type = DirichletBC
variable = disp_z
boundary = 'base_back'
preset = false
value = 0.0
[]
[z_fixed_front]
type = DirichletBC
variable = disp_z
boundary = 'base_front'
preset = false
value = 0.0
[]
[]
[ExplicitDynamicsContact]
[my_contact]
model = frictionless_balance
primary = base_front
secondary = ball_back
vel_x = 'vel_x'
vel_y = 'vel_y'
vel_z = 'vel_z'
[]
[]
[Materials]
[elasticity_tensor_block_one]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.0
block = 1
outputs = 'exodus'
output_properties = __all__
[]
[elasticity_tensor_block_two]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e10
poissons_ratio = 0.0
block = 2
outputs = 'exodus'
output_properties = __all__
[]
[strain_block]
type = ComputeFiniteStrain # ComputeIncrementalSmallStrain
displacements = 'disp_x disp_y disp_z'
implicit = false
[]
[stress_block]
type = ComputeFiniteStrainElasticStress
[]
[density_one]
type = GenericConstantMaterial
prop_names = density
prop_values = 1e1
outputs = 'exodus'
output_properties = 'density'
block = '1'
[]
[density_two]
type = GenericConstantMaterial
prop_names = density
prop_values = 1e6
outputs = 'exodus'
output_properties = 'density'
block = '2'
[]
[wave_speed]
type = WaveSpeed
outputs = 'exodus'
output_properties = 'wave_speed'
[]
[]
[Executioner]
type = Transient
start_time = -0.01
end_time = 0.04
dt = 1.0e-4
timestep_tolerance = 1e-6
[TimeIntegrator]
type = CentralDifference
solve_type = lumped
[]
[]
[Outputs]
interval = 1
exodus = true
csv = true
execute_on = 'TIMESTEP_END'
[]
[Postprocessors]
[accel_58z]
type = NodalVariableValue
nodeid = 1
variable = accel_z
[]
[vel_58z]
type = NodalVariableValue
nodeid = 1
variable = vel_z
[]
[critical_time_step]
type = CriticalTimeStep
[]
[contact_pressure_max]
type = NodalExtremeValue
variable = contact_pressure
block = '1 2'
value_type = max
[]
[penetration_max]
type = NodalExtremeValue
variable = penetration
block = '1 2'
value_type = max
[]
[total_kinetic_energy_one]
type = ElementIntegralVariablePostprocessor
variable = kinetic_energy_one
block = '1'
[]
[total_elastic_energy_one]
type = ElementIntegralVariablePostprocessor
variable = elastic_energy_one
block = '1'
[]
[total_kinetic_energy_two]
type = ElementIntegralVariablePostprocessor
variable = kinetic_energy_two
block = '2'
[]
[total_elastic_energy_two]
type = ElementIntegralVariablePostprocessor
variable = elastic_energy_two
block = '2'
[]
[]
(modules/solid_mechanics/test/tests/gravity/gravity_test.i)
#
# Gravity Test
#
# This test is designed to apply a gravity body force.
#
# The mesh is composed of one block with a single element.
# The bottom is fixed in all three directions. Poisson's ratio
# is zero and the density is 20/9.81
# which makes it trivial to check displacements.
#
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
type = GeneratedMesh
dim = 3
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
[]
[]
[Kernels]
[gravity_y]
type = Gravity
variable = disp_y
value = -9.81
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_x
boundary = bottom
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[no_z]
type = DirichletBC
variable = disp_z
boundary = bottom
value = 0.0
[]
[]
[Materials]
[Elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric_isotropic
C_ijkl = '0 0.5e6'
[]
[stress]
type = ComputeLinearElasticStress
[]
[density]
type = GenericConstantMaterial
prop_names = density
prop_values = 2.0387
[]
[]
[Executioner]
type = Steady
nl_abs_tol = 1e-10
l_max_its = 20
[]
[Outputs]
[out]
type = Exodus
elemental_as_nodal = true
[]
[]
(modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_dual_material.i)
## Units in the input file: m-Pa-s-K-V
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmax = 0.1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmin = 0.1
xmax = 0.2
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
[interface_secondary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'fixed_block_left'
new_block_id = 3
new_block_name = 'interface_secondary_subdomain'
input = block_rename
[]
[interface_primary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'moving_block_right'
new_block_id = 4
new_block_name = 'interface_primary_subdomain'
input = interface_secondary_subdomain
[]
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
[]
[Variables]
[temperature]
initial_condition = 300.0
[]
[temperature_interface_lm]
block = 'interface_secondary_subdomain'
[]
[potential]
[]
[potential_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[AuxVariables]
[interface_normal_lm]
order = FIRST
family = LAGRANGE
block = 'interface_secondary_subdomain'
initial_condition = 1.0
[]
[]
[Kernels]
[HeatDiff_steel]
type = ADHeatConduction
variable = temperature
thermal_conductivity = steel_thermal_conductivity
extra_vector_tags = 'ref'
block = 'left_block'
[]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
extra_vector_tags = 'ref'
block = 'right_block'
[]
[electric_steel]
type = ADMatDiffusion
variable = potential
diffusivity = steel_electrical_conductivity
extra_vector_tags = 'ref'
block = 'left_block'
[]
[electric_aluminum]
type = ADMatDiffusion
variable = potential
diffusivity = aluminum_electrical_conductivity
extra_vector_tags = 'ref'
block = 'right_block'
[]
[]
[BCs]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'fixed_block_right'
[]
[electric_left]
type = ADDirichletBC
variable = potential
value = 0.0
boundary = moving_block_left
[]
[electric_right]
type = ADDirichletBC
variable = potential
value = 3.0e-1
boundary = fixed_block_right
[]
[]
[Constraints]
[thermal_contact]
type = ModularGapConductanceConstraint
variable = temperature_interface_lm
secondary_variable = temperature
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_temperature'
[]
[electrical_contact]
type = ModularGapConductanceConstraint
variable = potential_interface_lm
secondary_variable = potential
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_electric'
[]
[interface_heating]
type = ADInterfaceJouleHeatingConstraint
potential_lagrange_multiplier = potential_interface_lm
secondary_variable = temperature
primary_electrical_conductivity = steel_electrical_conductivity
secondary_electrical_conductivity = aluminum_electrical_conductivity
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
[]
[]
[Materials]
[steel_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'steel_density steel_thermal_conductivity steel_heat_capacity steel_electrical_conductivity steel_hardness'
prop_values = '8e3 16.2 500.0 1.39e6 1.0' ## for stainless steel 304
block = 'left_block interface_secondary_subdomain'
[]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_electrical_conductivity aluminum_hardness'
prop_values = ' 2.7e3 210 900.0 3.7e7 1.0' #for 99% pure Al
block = 'left_block right_block interface_secondary_subdomain'
[]
[]
[UserObjects]
[closed_temperature]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_thermal_conductivity
secondary_conductivity = aluminum_thermal_conductivity
temperature = temperature
contact_pressure = interface_normal_lm
primary_hardness = steel_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[closed_electric]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_electrical_conductivity
secondary_conductivity = aluminum_electrical_conductivity
temperature = potential
contact_pressure = interface_normal_lm
primary_hardness = steel_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[]
[Postprocessors]
[steel_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_primary_subdomain
[]
[aluminum_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_secondary_subdomain
[]
[interface_heat_flux_steel]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = moving_block_right
diffusivity = steel_thermal_conductivity
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[interface_electrical_flux]
type = ADSideDiffusiveFluxAverage
variable = potential
boundary = fixed_block_left
diffusivity = aluminum_electrical_conductivity
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
nl_abs_tol = 1e-10
nl_rel_tol = 1e-6
nl_max_its = 100
nl_forced_its = 1
[]
[Outputs]
csv = true
perf_graph = true
[]
(test/tests/materials/discrete/recompute_boundary_error.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 1
[]
[left_domain]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '0.5 1 0'
block_id = 10
[]
[]
[Variables]
[u]
initial_condition = 2
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 2
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 3
[]
[]
[Materials]
[recompute_props]
type = RecomputeMaterial
boundary = 'left'
f_name = 'f'
f_prime_name = 'f_prime'
p_name = 'p'
outputs = all
output_properties = 'f f_prime p'
[]
[newton]
type = NewtonMaterial
boundary = 'left right'
outputs = all
f_name = 'f'
f_prime_name = 'f_prime'
p_name = 'p'
material = 'recompute_props'
[]
[left]
type = GenericConstantMaterial
prop_names = 'f f_prime'
prop_values = '1 0.5 '
block = '10 0'
outputs = all
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
print_linear_residuals = true
perf_graph = true
[]
(modules/thermal_hydraulics/test/tests/materials/ad_convective_heat_transfer_coefficient/test.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
allow_renumbering = false
[]
[Problem]
solve = false
[]
[Materials]
[props]
type = ADGenericConstantMaterial
prop_names = 'Nu k D_h'
prop_values = '1000 2 20'
[]
[Hw_material]
type = ADConvectiveHeatTransferCoefficientMaterial
Nu = Nu
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[Hw]
type = ADElementAverageMaterialProperty
mat_prop = Hw
[]
[]
[Outputs]
csv = true
execute_on = 'TIMESTEP_END'
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_no_parts_steady_nobcbc.i)
[GlobalParams]
integrate_p_by_parts = false
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[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
[../]
[./p]
[../]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[momentum_advection]
type = INSADMomentumAdvection
variable = velocity
[]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
[../]
[]
[BCs]
[p_corner]
type = DirichletBC
boundary = top_right
value = 0
variable = p
[]
[inlet]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom'
function_x = 0
function_y = 'inlet_func'
[../]
[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'
[]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[ins_mat]
type = INSADMaterial
velocity = velocity
pressure = p
[]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[../]
[]
(tutorials/darcy_thermo_mech/step05_heat_conduction/problems/step5a_steady.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmax = 0.304 # Length of test chamber
ymax = 0.0257 # Test chamber radius
[]
coord_type = RZ
rz_coord_axis = X
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[heat_conduction]
type = ADHeatConduction
variable = temperature
[]
[]
[BCs]
[inlet_temperature]
type = DirichletBC
variable = temperature
boundary = left
value = 350 # (K)
[]
[outlet_temperature]
type = DirichletBC
variable = temperature
boundary = right
value = 300 # (K)
[]
[]
[Materials]
[steel]
type = ADGenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 18 # K: (W/m*K) from wikipedia @296K
[]
[]
[Problem]
type = FEProblem
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = 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/beam/dynamic/dyn_timoshenko_small.i)
# Test for small strain Timoshenko beam vibration in y direction
# An impulse load is applied at the end of a cantilever beam of length 4m.
# The properties of the cantilever beam are as follows:
# Young's modulus (E) = 2e4
# Shear modulus (G) = 1e4
# Shear coefficient (k) = 1.0
# Cross-section area (A) = 1.0
# Iy = 1.0 = Iz
# Length (L)= 4 m
# density (rho) = 1.0
# For this beam, the dimensionless parameter alpha = kAGL^2/EI = 8
# Therefore, the beam behaves like a Timoshenko beam.
# The FEM solution for this beam with 100 elements give first natural period of 0.2731s with a time step of 0.005.
# The acceleration, velocity and displacement time histories obtained from MOOSE matches with those obtained from ABAQUS.
# Values from the first few time steps are as follows:
# time disp_y vel_y accel_y
# 0.0 0.0 0.0 0.0
# 0.005 2.5473249455812e-05 0.010189299782325 4.0757199129299
# 0.01 5.3012872677486e-05 0.00082654950634483 -7.8208200233219
# 0.015 5.8611622914354e-05 0.0014129505884026 8.055380456145
# 0.02 6.766113649781e-05 0.0022068548449798 -7.7378187535141
# 0.025 7.8981810558437e-05 0.0023214147792709 7.7836427272305
# Note that the theoretical first frequency of the beam using Euler-Bernoulli theory is:
# f1 = 1/(2 pi) * (3.5156/L^2) * sqrt(EI/rho) = 4.9455
# This implies that the corresponding time period of this beam (under Euler-Bernoulli assumption) is 0.2022s.
# This shows that Euler-Bernoulli beam theory under-predicts the time period of a thick beam. In other words, the Euler-Bernoulli beam theory predicts a more compliant beam than reality for a thick beam.
[Mesh]
type = GeneratedMesh
xmin = 0
xmax = 4.0
nx = 100
dim = 1
displacements = 'disp_x disp_y disp_z'
[]
[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
[../]
[./rot_z]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./vel_x]
order = FIRST
family = LAGRANGE
[../]
[./vel_y]
order = FIRST
family = LAGRANGE
[../]
[./vel_z]
order = FIRST
family = LAGRANGE
[../]
[./accel_x]
order = FIRST
family = LAGRANGE
[../]
[./accel_y]
order = FIRST
family = LAGRANGE
[../]
[./accel_z]
order = FIRST
family = LAGRANGE
[../]
[./rot_vel_x]
order = FIRST
family = LAGRANGE
[../]
[./rot_vel_y]
order = FIRST
family = LAGRANGE
[../]
[./rot_vel_z]
order = FIRST
family = LAGRANGE
[../]
[./rot_accel_x]
order = FIRST
family = LAGRANGE
[../]
[./rot_accel_y]
order = FIRST
family = LAGRANGE
[../]
[./rot_accel_z]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = timestep_end
[../]
[./vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = timestep_end
[../]
[./accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = timestep_end
[../]
[./vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = timestep_end
[../]
[./accel_z]
type = NewmarkAccelAux
variable = accel_z
displacement = disp_z
velocity = vel_z
beta = 0.25
execute_on = timestep_end
[../]
[./vel_z]
type = NewmarkVelAux
variable = vel_z
acceleration = accel_z
gamma = 0.5
execute_on = timestep_end
[../]
[./rot_accel_x]
type = NewmarkAccelAux
variable = rot_accel_x
displacement = rot_x
velocity = rot_vel_x
beta = 0.25
execute_on = timestep_end
[../]
[./rot_vel_x]
type = NewmarkVelAux
variable = rot_vel_x
acceleration = rot_accel_x
gamma = 0.5
execute_on = timestep_end
[../]
[./rot_accel_y]
type = NewmarkAccelAux
variable = rot_accel_y
displacement = rot_y
velocity = rot_vel_y
beta = 0.25
execute_on = timestep_end
[../]
[./rot_vel_y]
type = NewmarkVelAux
variable = rot_vel_y
acceleration = rot_accel_y
gamma = 0.5
execute_on = timestep_end
[../]
[./rot_accel_z]
type = NewmarkAccelAux
variable = rot_accel_z
displacement = rot_z
velocity = rot_vel_z
beta = 0.25
execute_on = timestep_end
[../]
[./rot_vel_z]
type = NewmarkVelAux
variable = rot_vel_z
acceleration = rot_accel_z
gamma = 0.5
execute_on = timestep_end
[../]
[]
[BCs]
[./fixx1]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./fixy1]
type = DirichletBC
variable = disp_y
boundary = left
value = 0.0
[../]
[./fixz1]
type = DirichletBC
variable = disp_z
boundary = left
value = 0.0
[../]
[./fixr1]
type = DirichletBC
variable = rot_x
boundary = left
value = 0.0
[../]
[./fixr2]
type = DirichletBC
variable = rot_y
boundary = left
value = 0.0
[../]
[./fixr3]
type = DirichletBC
variable = rot_z
boundary = left
value = 0.0
[../]
[]
[NodalKernels]
[./force_y2]
type = UserForcingFunctionNodalKernel
variable = disp_y
boundary = right
function = force
[../]
[]
[Functions]
[./force]
type = PiecewiseLinear
x = '0.0 0.005 0.01 1.0'
y = '0.0 1.0 0.0 0.0'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
line_search = 'none'
nl_rel_tol = 1e-11
nl_abs_tol = 1e-11
start_time = 0.0
dt = 0.005
end_time = 0.5
timestep_tolerance = 1e-6
[]
[Kernels]
[./solid_disp_x]
type = StressDivergenceBeam
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 0
variable = disp_x
[../]
[./solid_disp_y]
type = StressDivergenceBeam
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 1
variable = disp_y
[../]
[./solid_disp_z]
type = StressDivergenceBeam
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 2
variable = disp_z
[../]
[./solid_rot_x]
type = StressDivergenceBeam
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 3
variable = rot_x
[../]
[./solid_rot_y]
type = StressDivergenceBeam
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 4
variable = rot_y
[../]
[./solid_rot_z]
type = StressDivergenceBeam
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 5
variable = rot_z
[../]
[./inertial_force_x]
type = InertialForceBeam
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y rot_vel_z'
rotational_accelerations = 'rot_accel_x rot_accel_y rot_accel_z'
beta = 0.25
gamma = 0.5
area = 1.0
Iy = 1.0
Iz = 1.0
Ay = 0.0
Az = 0.0
component = 0
variable = disp_x
[../]
[./inertial_force_y]
type = InertialForceBeam
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y rot_vel_z'
rotational_accelerations = 'rot_accel_x rot_accel_y rot_accel_z'
beta = 0.25
gamma = 0.5
area = 1.0
Iy = 1.0
Iz = 1.0
Ay = 0.0
Az = 0.0
component = 1
variable = disp_y
[../]
[./inertial_force_z]
type = InertialForceBeam
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y rot_vel_z'
rotational_accelerations = 'rot_accel_x rot_accel_y rot_accel_z'
beta = 0.25
gamma = 0.5
area = 1.0
Iy = 1.0
Iz = 1.0
Ay = 0.0
Az = 0.0
component = 2
variable = disp_z
[../]
[./inertial_force_rot_x]
type = InertialForceBeam
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y rot_vel_z'
rotational_accelerations = 'rot_accel_x rot_accel_y rot_accel_z'
beta = 0.25
gamma = 0.5
area = 1.0
Iy = 1.0
Iz = 1.0
Ay = 0.0
Az = 0.0
component = 3
variable = rot_x
[../]
[./inertial_force_rot_y]
type = InertialForceBeam
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y rot_vel_z'
rotational_accelerations = 'rot_accel_x rot_accel_y rot_accel_z'
beta = 0.25
gamma = 0.5
area = 1.0
Iy = 1.0
Iz = 1.0
Ay = 0.0
Az = 0.0
component = 4
variable = rot_y
[../]
[./inertial_force_rot_z]
type = InertialForceBeam
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y rot_vel_z'
rotational_accelerations = 'rot_accel_x rot_accel_y rot_accel_z'
beta = 0.25
gamma = 0.5
area = 1.0
Iy = 1.0
Iz = 1.0
Ay = 0.0
Az = 0.0
component = 5
variable = rot_z
[../]
[]
[Materials]
[./elasticity]
type = ComputeElasticityBeam
youngs_modulus = 2e4
poissons_ratio = 0.0
shear_coefficient = 1.0
block = 0
[../]
[./strain]
type = ComputeIncrementalBeamStrain
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
area = 1.0
Ay = 0.0
Az = 0.0
Iy = 1.0
Iz = 1.0
y_orientation = '0.0 1.0 0.0'
[../]
[./stress]
type = ComputeBeamResultants
block = 0
[../]
[./density]
type = GenericConstantMaterial
block = 0
prop_names = 'density'
prop_values = '1.0'
[../]
[]
[Postprocessors]
[./disp_x]
type = PointValue
point = '4.0 0.0 0.0'
variable = disp_x
[../]
[./disp_y]
type = PointValue
point = '4.0 0.0 0.0'
variable = disp_y
[../]
[./vel_y]
type = PointValue
point = '4.0 0.0 0.0'
variable = vel_y
[../]
[./accel_y]
type = PointValue
point = '4.0 0.0 0.0'
variable = accel_y
[../]
[]
[Outputs]
exodus = true
csv = true
perf_graph = true
[]
(modules/phase_field/test/tests/free_energy_material/MathFreeEnergy.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 25
xmax = 50
ymax = 50
elem_type = QUAD4
[]
[Variables]
[./c]
order = THIRD
family = HERMITE
[../]
[]
[ICs]
[./c]
type = SmoothCircleIC
variable = c
x1 = 25.0
y1 = 25.0
radius = 6.0
invalue = 1.0
outvalue = -0.8
int_width = 4.0
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./CHSolid]
type = CahnHilliard
variable = c
mob_name = M
f_name = F
[../]
[./CHInterface]
type = CHInterface
variable = c
kappa_name = kappa_c
mob_name = M
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./constant]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1.0 1.0'
[../]
[./free_energy]
type = MathFreeEnergy
property_name = F
c = c
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_max_its = 20
l_tol = 1.0e-5
nl_max_its = 40
nl_rel_tol = 5.0e-14
start_time = 0.0
num_steps = 1
dt = 2.0
[]
[Outputs]
execute_on = 'timestep_end'
[./oversample]
type = Exodus
refinements = 2
[../]
[]
(modules/porous_flow/examples/coal_mining/coarse_with_fluid.i)
# Strata deformation and fluid flow aaround a coal mine - 3D model
#
# A "half model" is used. The mine is 400m deep and
# just the roof is studied (-400<=z<=0). The mining panel
# sits between 0<=x<=150, and 0<=y<=1000, so this simulates
# a coal panel that is 300m wide and 1000m long. The outer boundaries
# are 1km from the excavation boundaries.
#
# The excavation takes 0.5 years.
#
# The boundary conditions for this simulation are:
# - disp_x = 0 at x=0 and x=1150
# - disp_y = 0 at y=-1000 and y=1000
# - disp_z = 0 at z=-400, but there is a time-dependent
# Young modulus that simulates excavation
# - wc_x = 0 at y=-1000 and y=1000
# - wc_y = 0 at x=0 and x=1150
# - no flow at x=0, z=-400 and z=0
# - fixed porepressure at y=-1000, y=1000 and x=1150
# That is, rollers on the sides, free at top,
# and prescribed at bottom in the unexcavated portion.
#
# A single-phase unsaturated fluid is used.
#
# The small strain formulation is used.
#
# All stresses are measured in MPa, and time units are measured in years.
#
# The initial porepressure is hydrostatic with P=0 at z=0, so
# Porepressure ~ - 0.01*z MPa, where the fluid has density 1E3 kg/m^3 and
# gravity = = 10 m.s^-2 = 1E-5 MPa m^2/kg.
# To be more accurate, i use
# Porepressure = -bulk * log(1 + g*rho0*z/bulk)
# where bulk=2E3 MPa and rho0=1Ee kg/m^3.
# The initial stress is consistent with the weight force from undrained
# density 2500 kg/m^3, and fluid porepressure, and a Biot coefficient of 0.7, ie,
# stress_zz^effective = 0.025*z + 0.7 * initial_porepressure
# The maximum and minimum principal horizontal effective stresses are
# assumed to be equal to 0.8*stress_zz.
#
# Material properties:
# Young's modulus = 8 GPa
# Poisson's ratio = 0.25
# Cosserat layer thickness = 1 m
# Cosserat-joint normal stiffness = large
# Cosserat-joint shear stiffness = 1 GPa
# MC cohesion = 2 MPa
# MC friction angle = 35 deg
# MC dilation angle = 8 deg
# MC tensile strength = 1 MPa
# MC compressive strength = 100 MPa
# WeakPlane cohesion = 0.1 MPa
# WeakPlane friction angle = 30 deg
# WeakPlane dilation angle = 10 deg
# WeakPlane tensile strength = 0.1 MPa
# WeakPlane compressive strength = 100 MPa softening to 1 MPa at strain = 1
# Fluid density at zero porepressure = 1E3 kg/m^3
# Fluid bulk modulus = 2E3 MPa
# Fluid viscosity = 1.1E-3 Pa.s = 1.1E-9 MPa.s = 3.5E-17 MPa.year
#
[GlobalParams]
perform_finite_strain_rotations = false
displacements = 'disp_x disp_y disp_z'
Cosserat_rotations = 'wc_x wc_y wc_z'
PorousFlowDictator = dictator
biot_coefficient = 0.7
[]
[Mesh]
[file]
type = FileMeshGenerator
file = mesh/coarse.e
[]
[xmin]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
new_boundary = xmin
normal = '-1 0 0'
input = file
[]
[xmax]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
new_boundary = xmax
normal = '1 0 0'
input = xmin
[]
[ymin]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
new_boundary = ymin
normal = '0 -1 0'
input = xmax
[]
[ymax]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
new_boundary = ymax
normal = '0 1 0'
input = ymin
[]
[zmax]
type = SideSetsAroundSubdomainGenerator
block = 16
new_boundary = zmax
normal = '0 0 1'
input = ymax
[]
[zmin]
type = SideSetsAroundSubdomainGenerator
block = 2
new_boundary = zmin
normal = '0 0 -1'
input = zmax
[]
[excav]
type = SubdomainBoundingBoxGenerator
input = zmin
block_id = 1
bottom_left = '0 0 -400'
top_right = '150 1000 -397'
[]
[roof]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 3
paired_block = 1
input = excav
new_boundary = roof
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[wc_x]
[]
[wc_y]
[]
[porepressure]
scaling = 1E-5
[]
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = ini_pp
[]
[]
[Kernels]
[cx_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_x
component = 0
[]
[cy_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_y
component = 1
[]
[cz_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_z
component = 2
[]
[x_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_x
displacements = 'wc_x wc_y wc_z'
component = 0
base_name = couple
[]
[y_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_y
displacements = 'wc_x wc_y wc_z'
component = 1
base_name = couple
[]
[x_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_x
component = 0
[]
[y_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_y
component = 1
[]
[gravity]
type = Gravity
use_displaced_mesh = false
variable = disp_z
value = -10E-6 # remember this is in MPa
[]
[poro_x]
type = PorousFlowEffectiveStressCoupling
use_displaced_mesh = false
variable = disp_x
component = 0
[]
[poro_y]
type = PorousFlowEffectiveStressCoupling
use_displaced_mesh = false
variable = disp_y
component = 1
[]
[poro_z]
type = PorousFlowEffectiveStressCoupling
use_displaced_mesh = false
component = 2
variable = disp_z
[]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = porepressure
[]
[flux]
type = PorousFlowAdvectiveFlux
use_displaced_mesh = false
variable = porepressure
gravity = '0 0 -10E-6'
fluid_component = 0
[]
[poro_vol_exp]
type = PorousFlowMassVolumetricExpansion
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
variable = porepressure
fluid_component = 0
[]
[]
[AuxVariables]
[saturation]
order = CONSTANT
family = MONOMIAL
[]
[darcy_x]
order = CONSTANT
family = MONOMIAL
[]
[darcy_y]
order = CONSTANT
family = MONOMIAL
[]
[darcy_z]
order = CONSTANT
family = MONOMIAL
[]
[porosity]
order = CONSTANT
family = MONOMIAL
[]
[wc_z]
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xz]
order = CONSTANT
family = MONOMIAL
[]
[stress_yx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_yz]
order = CONSTANT
family = MONOMIAL
[]
[stress_zx]
order = CONSTANT
family = MONOMIAL
[]
[stress_zy]
order = CONSTANT
family = MONOMIAL
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_xz]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_yx]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_yz]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_zx]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_zy]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[perm_xx]
order = CONSTANT
family = MONOMIAL
[]
[perm_yy]
order = CONSTANT
family = MONOMIAL
[]
[perm_zz]
order = CONSTANT
family = MONOMIAL
[]
[mc_shear]
order = CONSTANT
family = MONOMIAL
[]
[mc_tensile]
order = CONSTANT
family = MONOMIAL
[]
[wp_shear]
order = CONSTANT
family = MONOMIAL
[]
[wp_tensile]
order = CONSTANT
family = MONOMIAL
[]
[wp_shear_f]
order = CONSTANT
family = MONOMIAL
[]
[wp_tensile_f]
order = CONSTANT
family = MONOMIAL
[]
[mc_shear_f]
order = CONSTANT
family = MONOMIAL
[]
[mc_tensile_f]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[saturation_water]
type = PorousFlowPropertyAux
variable = saturation
property = saturation
phase = 0
execute_on = timestep_end
[]
[darcy_x]
type = PorousFlowDarcyVelocityComponent
variable = darcy_x
gravity = '0 0 -10E-6'
component = x
[]
[darcy_y]
type = PorousFlowDarcyVelocityComponent
variable = darcy_y
gravity = '0 0 -10E-6'
component = y
[]
[darcy_z]
type = PorousFlowDarcyVelocityComponent
variable = darcy_z
gravity = '0 0 -10E-6'
component = z
[]
[porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
execute_on = timestep_end
[]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
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
[]
[stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
execute_on = timestep_end
[]
[stress_yx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yx
index_i = 1
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_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
execute_on = timestep_end
[]
[stress_zx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zx
index_i = 2
index_j = 0
execute_on = timestep_end
[]
[stress_zy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zy
index_i = 2
index_j = 1
execute_on = timestep_end
[]
[stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[total_strain_xx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[]
[total_strain_xy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_xy
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[total_strain_xz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_xz
index_i = 0
index_j = 2
execute_on = timestep_end
[]
[total_strain_yx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_yx
index_i = 1
index_j = 0
execute_on = timestep_end
[]
[total_strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[]
[total_strain_yz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_yz
index_i = 1
index_j = 2
execute_on = timestep_end
[]
[total_strain_zx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_zx
index_i = 2
index_j = 0
execute_on = timestep_end
[]
[total_strain_zy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_zy
index_i = 2
index_j = 1
execute_on = timestep_end
[]
[total_strain_zz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[perm_xx]
type = PorousFlowPropertyAux
property = permeability
variable = perm_xx
row = 0
column = 0
execute_on = timestep_end
[]
[perm_yy]
type = PorousFlowPropertyAux
property = permeability
variable = perm_yy
row = 1
column = 1
execute_on = timestep_end
[]
[perm_zz]
type = PorousFlowPropertyAux
property = permeability
variable = perm_zz
row = 2
column = 2
execute_on = timestep_end
[]
[mc_shear]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_internal_parameter
variable = mc_shear
execute_on = timestep_end
[]
[mc_tensile]
type = MaterialStdVectorAux
index = 1
property = mc_plastic_internal_parameter
variable = mc_tensile
execute_on = timestep_end
[]
[wp_shear]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_internal_parameter
variable = wp_shear
execute_on = timestep_end
[]
[wp_tensile]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_internal_parameter
variable = wp_tensile
execute_on = timestep_end
[]
[mc_shear_f]
type = MaterialStdVectorAux
index = 6
property = mc_plastic_yield_function
variable = mc_shear_f
execute_on = timestep_end
[]
[mc_tensile_f]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_yield_function
variable = mc_tensile_f
execute_on = timestep_end
[]
[wp_shear_f]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_yield_function
variable = wp_shear_f
execute_on = timestep_end
[]
[wp_tensile_f]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_yield_function
variable = wp_tensile_f
execute_on = timestep_end
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_x
boundary = 'xmin xmax'
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_y
boundary = 'ymin ymax'
value = 0.0
[]
[no_z]
type = DirichletBC
variable = disp_z
boundary = zmin
value = 0.0
[]
[no_wc_x]
type = DirichletBC
variable = wc_x
boundary = 'ymin ymax'
value = 0.0
[]
[no_wc_y]
type = DirichletBC
variable = wc_y
boundary = 'xmin xmax'
value = 0.0
[]
[fix_porepressure]
type = FunctionDirichletBC
variable = porepressure
boundary = 'ymin ymax xmax'
function = ini_pp
[]
[roof_porepressure]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
pt_vals = '-1E3 1E3'
multipliers = '-1 1'
fluid_phase = 0
flux_function = roof_conductance
boundary = roof
[]
[roof_bcs]
type = StickyBC
variable = disp_z
min_value = -3.0
boundary = roof
[]
[]
[Functions]
[ini_pp]
type = ParsedFunction
symbol_names = 'bulk p0 g rho0'
symbol_values = '2E3 0.0 1E-5 1E3'
expression = '-bulk*log(exp(-p0/bulk)+g*rho0*z/bulk)'
[]
[ini_xx]
type = ParsedFunction
symbol_names = 'bulk p0 g rho0 biot'
symbol_values = '2E3 0.0 1E-5 1E3 0.7'
expression = '0.8*(2500*10E-6*z+biot*(-bulk*log(exp(-p0/bulk)+g*rho0*z/bulk)))'
[]
[ini_zz]
type = ParsedFunction
symbol_names = 'bulk p0 g rho0 biot'
symbol_values = '2E3 0.0 1E-5 1E3 0.7'
expression = '2500*10E-6*z+biot*(-bulk*log(exp(-p0/bulk)+g*rho0*z/bulk))'
[]
[excav_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax minval maxval slope'
symbol_values = '0.5 0 1000.0 1E-9 1 60'
# excavation face at ymin+(ymax-ymin)*min(t/end_t,1)
# slope is the distance over which the modulus reduces from maxval to minval
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),minval,if(y<ymin+(ymax-ymin)*min(t/end_t,1)+slope,minval+(maxval-minval)*(y-(ymin+(ymax-ymin)*min(t/end_t,1)))/slope,maxval))'
[]
[density_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax minval maxval'
symbol_values = '0.5 0 1000.0 0 2500'
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),minval,maxval)'
[]
[roof_conductance]
type = ParsedFunction
symbol_names = 'end_t ymin ymax maxval minval'
symbol_values = '0.5 0 1000.0 1E7 0'
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),maxval,minval)'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1 # MPa^-1
[]
[mc_coh_strong_harden]
type = TensorMechanicsHardeningExponential
value_0 = 1.99 # MPa
value_residual = 2.01 # MPa
rate = 1.0
[]
[mc_fric]
type = TensorMechanicsHardeningConstant
value = 0.61 # 35deg
[]
[mc_dil]
type = TensorMechanicsHardeningConstant
value = 0.15 # 8deg
[]
[mc_tensile_str_strong_harden]
type = TensorMechanicsHardeningExponential
value_0 = 1.0 # MPa
value_residual = 1.0 # MPa
rate = 1.0
[]
[mc_compressive_str]
type = TensorMechanicsHardeningCubic
value_0 = 100 # Large!
value_residual = 100
internal_limit = 0.1
[]
[wp_coh_harden]
type = TensorMechanicsHardeningCubic
value_0 = 0.05
value_residual = 0.05
internal_limit = 10
[]
[wp_tan_fric]
type = TensorMechanicsHardeningConstant
value = 0.26 # 15deg
[]
[wp_tan_dil]
type = TensorMechanicsHardeningConstant
value = 0.18 # 10deg
[]
[wp_tensile_str_harden]
type = TensorMechanicsHardeningCubic
value_0 = 0.05
value_residual = 0.05
internal_limit = 10
[]
[wp_compressive_str_soften]
type = TensorMechanicsHardeningCubic
value_0 = 100
value_residual = 1
internal_limit = 1.0
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E3
density0 = 1000
thermal_expansion = 0
viscosity = 3.5E-17
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[vol_strain]
type = PorousFlowVolumetricStrain
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity_bulk]
type = PorousFlowPorosity
fluid = true
mechanical = true
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
ensure_positive = true
porosity_zero = 0.02
solid_bulk = 5.3333E3
[]
[porosity_excav]
type = PorousFlowPorosityConst
block = 1
porosity = 1.0
[]
[permeability_bulk]
type = PorousFlowPermeabilityKozenyCarman
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
poroperm_function = kozeny_carman_phi0
k0 = 1E-15
phi0 = 0.02
n = 2
m = 2
[]
[permeability_excav]
type = PorousFlowPermeabilityConst
block = 1
permeability = '0 0 0 0 0 0 0 0 0'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 4
s_res = 0.4
sum_s_res = 0.4
phase = 0
[]
[elasticity_tensor_0]
type = ComputeLayeredCosseratElasticityTensor
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
[]
[elasticity_tensor_1]
type = ComputeLayeredCosseratElasticityTensor
block = 1
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
elasticity_tensor_prefactor = excav_sideways
[]
[strain]
type = ComputeCosseratIncrementalSmallStrain
eigenstrain_names = ini_stress
[]
[ini_stress]
type = ComputeEigenstrainFromInitialStress
eigenstrain_name = ini_stress
initial_stress = 'ini_xx 0 0 0 ini_xx 0 0 0 ini_zz'
[]
[stress_0]
type = ComputeMultipleInelasticCosseratStress
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
inelastic_models = 'mc wp'
cycle_models = true
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[]
[stress_1]
type = ComputeMultipleInelasticCosseratStress
block = 1
inelastic_models = ''
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[]
[mc]
type = CappedMohrCoulombCosseratStressUpdate
warn_about_precision_loss = false
host_youngs_modulus = 8E3
host_poissons_ratio = 0.25
base_name = mc
tensile_strength = mc_tensile_str_strong_harden
compressive_strength = mc_compressive_str
cohesion = mc_coh_strong_harden
friction_angle = mc_fric
dilation_angle = mc_dil
max_NR_iterations = 100000
smoothing_tol = 0.1 # MPa # Must be linked to cohesion
yield_function_tol = 1E-9 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0
[]
[wp]
type = CappedWeakPlaneCosseratStressUpdate
warn_about_precision_loss = false
base_name = wp
cohesion = wp_coh_harden
tan_friction_angle = wp_tan_fric
tan_dilation_angle = wp_tan_dil
tensile_strength = wp_tensile_str_harden
compressive_strength = wp_compressive_str_soften
max_NR_iterations = 10000
tip_smoother = 0.05
smoothing_tol = 0.05 # MPa # Note, this must be tied to cohesion, otherwise get no possible return at cone apex
yield_function_tol = 1E-11 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0E-3
[]
[undrained_density_0]
type = GenericConstantMaterial
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
prop_names = density
prop_values = 2500
[]
[undrained_density_1]
type = GenericFunctionMaterial
block = 1
prop_names = density
prop_values = density_sideways
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Postprocessors]
[min_roof_disp]
type = NodalExtremeValue
boundary = roof
value_type = min
variable = disp_z
[]
[min_roof_pp]
type = NodalExtremeValue
boundary = roof
value_type = min
variable = porepressure
[]
[min_surface_disp]
type = NodalExtremeValue
boundary = zmax
value_type = min
variable = disp_z
[]
[min_surface_pp]
type = NodalExtremeValue
boundary = zmax
value_type = min
variable = porepressure
[]
[max_perm_zz]
type = ElementExtremeValue
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
variable = perm_zz
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason'
# best overall
# petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
# petsc_options_value = ' lu mumps'
# best if you do not have mumps:
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu superlu_dist'
# best if you do not have mumps or superlu_dist:
#petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
#petsc_options_value = ' asm 2 lu gmres 200'
# very basic:
#petsc_options_iname = '-pc_type -ksp_type -ksp_gmres_restart'
#petsc_options_value = ' bjacobi gmres 200'
line_search = bt
nl_abs_tol = 1e-3
nl_rel_tol = 1e-5
l_max_its = 200
nl_max_its = 30
start_time = 0.0
dt = 0.014706
end_time = 0.014706 #0.5
[]
[Outputs]
time_step_interval = 1
print_linear_residuals = true
exodus = true
csv = true
console = true
[]
(modules/phase_field/test/tests/phase_field_kernels/SplitCahnHilliard.i)
#
# Test the split parsed function free enery Cahn-Hilliard Bulk kernel
# The free energy used here has the same functional form as the SplitCHPoly kernel
# If everything works, the output of this test should replicate the output
# of marmot/tests/chpoly_test/CHPoly_Cu_Split_test.i (exodiff match)
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmin = 0
xmax = 60
ymin = 0
ymax = 60
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 0
y1 = 0
radius = 30.0
invalue = 1.0
outvalue = -0.5
int_width = 30.0
[../]
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '100 40'
[../]
[./free_energy]
# equivalent to `MathFreeEnergy`
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'c'
expression = '0.25*(1+c)^2*(1-c)^2'
derivative_order = 2
[../]
[]
[Preconditioning]
# active = ' '
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'NEWTON'
petsc_options_iname = -pc_type
petsc_options_value = lu
l_max_its = 30
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 2
dt = 1
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/critical_time_step/timoshenko_smallstrain_critstep.i)
# Test for small strain timoshenko beam bending in y direction
# A unit load is applied at the end of a cantilever beam of length 4m.
# The properties of the cantilever beam are as follows:
# Young's modulus (E) = 2.60072400269
# Shear modulus (G) = 1.00027846257
# Poisson's ratio (nu) = 0.3
# Shear coefficient (k) = 0.85
# Cross-section area (A) = 0.554256
# Iy = 0.0141889 = Iz
# Length = 4 m
# For this beam, the dimensionless parameter alpha = kAGL^2/EI = 204.3734
# The small deformation analytical deflection of the beam is given by
# delta = PL^3/3EI * (1 + 3.0 / alpha) = 5.868e-4 m
# Using 10 elements to discretize the beam element, the FEM solution is 5.852e-2m.
# This deflection matches the FEM solution given in Prathap and Bhashyam (1982).
# References:
# Prathap and Bhashyam (1982), International journal for numerical methods in engineering, vol. 18, 195-210.
# Note that the force is scaled by 1e-4 compared to the reference problem.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmin = 0.0
xmax = 4.0
displacements = 'disp_x disp_y disp_z'
[]
[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
[../]
[./rot_z]
order = FIRST
family = LAGRANGE
[../]
[]
[BCs]
[./fixx1]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./fixy1]
type = DirichletBC
variable = disp_y
boundary = left
value = 0.0
[../]
[./fixz1]
type = DirichletBC
variable = disp_z
boundary = left
value = 0.0
[../]
[./fixr1]
type = DirichletBC
variable = rot_x
boundary = left
value = 0.0
[../]
[./fixr2]
type = DirichletBC
variable = rot_y
boundary = left
value = 0.0
[../]
[./fixr3]
type = DirichletBC
variable = rot_z
boundary = left
value = 0.0
[../]
[]
[NodalKernels]
[./force_y2]
type = ConstantRate
variable = disp_y
boundary = right
rate = 1.0e-4
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
line_search = 'none'
nl_max_its = 15
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
dt = 1
dtmin = 1
end_time = 1
[]
[Kernels]
[./solid_disp_x]
type = StressDivergenceBeam
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 0
variable = disp_x
[../]
[./solid_disp_y]
type = StressDivergenceBeam
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 1
variable = disp_y
[../]
[./solid_disp_z]
type = StressDivergenceBeam
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 2
variable = disp_z
[../]
[./solid_rot_x]
type = StressDivergenceBeam
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 3
variable = rot_x
[../]
[./solid_rot_y]
type = StressDivergenceBeam
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 4
variable = rot_y
[../]
[./solid_rot_z]
type = StressDivergenceBeam
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 5
variable = rot_z
[../]
[]
[Materials]
[./elasticity]
type = ComputeElasticityBeam
youngs_modulus = 2.60072400269
poissons_ratio = 0.3
shear_coefficient = 0.85
block = 0
[../]
[./strain]
type = ComputeIncrementalBeamStrain
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
area = 0.554256
Ay = 0.0
Az = 0.0
Iy = 0.0141889
Iz = 0.0141889
y_orientation = '0.0 1.0 0.0'
[../]
[./stress]
type = ComputeBeamResultants
block = 0
[../]
[./density]
type = GenericConstantMaterial
prop_names = 'density'
prop_values = '8050.0'
[../]
[]
[Postprocessors]
[./disp_x]
type = PointValue
point = '4.0 0.0 0.0'
variable = disp_x
[../]
[./disp_y]
type = PointValue
point = '4.0 0.0 0.0'
variable = disp_y
[../]
[./time_step]
type = CriticalTimeStep
[../]
[]
[Outputs]
csv = true
[]
(modules/stochastic_tools/test/tests/surrogates/polynomial_regression/sub_vector.i)
L = 1
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 100
xmax = ${L}
elem_type = EDGE3
[]
[]
[Variables]
[T]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = T
diffusivity = k
[]
[source]
type = BodyForce
variable = T
value = 10000
[]
[]
[Materials]
[conductivity]
type = GenericConstantMaterial
prop_names = k
prop_values = 2.0
[]
[]
[BCs]
[right]
type = DirichletBC
variable = T
boundary = right
value = 300
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[VectorPostprocessors]
[T_vec]
type = LineValueSampler
variable = T
start_point = '0 0 0'
end_point = '${L} 0 0'
num_points = 10
sort_by = x
[]
[]
(test/tests/materials/derivative_material_interface/ad_multiblock.i)
[Mesh]
type = FileMesh
file = rectangle.e
[]
[Variables]
[./c]
[../]
[]
[Materials]
[./mat1]
type = ADDefaultMatPropConsumerMaterial
block = 1
[../]
[./mat2]
type = ADDefaultMatPropConsumerMaterial
block = 2
[../]
[./mat1b]
type = ADDefaultMatPropConsumerMaterial
mat_prop = prop2
block = 1
[../]
[./mat2b]
type = ADDefaultMatPropConsumerMaterial
mat_prop = prop2
block = 2
[../]
[./generic]
type = ADGenericConstantMaterial
block = '1 2'
prop_names = prop3
prop_values = 9
[../]
[./mat1c]
type = ADDefaultMatPropConsumerMaterial
mat_prop = prop3
block = 1
[../]
[./mat2c]
type = ADDefaultMatPropConsumerMaterial
mat_prop = prop3
block = 2
[../]
[]
[Kernels]
[./kern1]
type = ADDefaultMatPropConsumerKernel
variable = c
block = 1
[../]
[./kern2]
type = ADDefaultMatPropConsumerKernel
variable = c
block = 2
[../]
[./kern1b]
type = ADDefaultMatPropConsumerKernel
variable = c
mat_prop = prop3
block = 1
[../]
[./kern2b]
type = ADDefaultMatPropConsumerKernel
variable = c
mat_prop = prop3
block = 2
[../]
[]
[Executioner]
type = Steady
[]
[Debug]
show_material_props = true
[]
[Problem]
solve = false
[]
[Outputs]
exodus = true
[]
(test/tests/outputs/debug/show_material_props.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[./subdomains]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0.1 0.1 0'
block_id = 1
top_right = '0.9 0.9 0'
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Materials]
[./block]
type = GenericConstantMaterial
block = '0 1'
prop_names = 'property0 property1 property2 property3 property4 property5 property6 property7 property8 property9 property10'
prop_values = '0 1 2 3 4 5 6 7 8 9 10'
[../]
[./boundary]
type = GenericConstantMaterial
prop_names = bnd_prop
boundary = top
prop_values = 12345
[../]
[./restricted]
type = GenericConstantMaterial
block = 1
prop_names = 'restricted0 restricted1'
prop_values = '10 11'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
execute_on = 'timestep_end'
[./debug] # This is only a test, you should turn this on via [Debug] block
type = MaterialPropertyDebugOutput
[../]
[]
(modules/chemical_reactions/test/tests/exceptions/extra_sto.i)
# Additional stoichiometric coefficient in AqueousEquilibriumRxnAux AuxKernel
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Variables]
[./a]
[../]
[./b]
[../]
[]
[AuxVariables]
[./c]
[../]
[./gamma_a]
[../]
[./gamma_b]
[../]
[]
[AuxKernels]
[./c]
type = AqueousEquilibriumRxnAux
variable = c
v = 'a b'
gamma_v = 'gamma_a gamma_b'
sto_v = '1 2 3'
log_k = 1
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./a_diff]
type = PrimaryDiffusion
variable = a
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = porosity
prop_values = 0.2
[../]
[]
[Executioner]
type = Transient
end_time = 1
[]
(modules/chemical_reactions/test/tests/aqueous_equilibrium/1species_without_action.i)
# Simple equilibrium reaction example.
# This simulation is identical to 1species.i, but explicitly includes the AuxVariables,
# AuxKernels, and Kernels that the action in 1species.i adds
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
[]
[Variables]
[./a]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1e-2
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
variable = a
[../]
[../]
[]
[AuxVariables]
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[./pa2]
[../]
[]
[AuxKernels]
[./pa2eq]
type = AqueousEquilibriumRxnAux
variable = pa2
v = a
sto_v = 2
log_k = 1
[../]
[]
[ICs]
[./pressure]
type = FunctionIC
variable = pressure
function = 2-x
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./a_diff]
type = PrimaryDiffusion
variable = a
[../]
[./a_conv]
type = PrimaryConvection
variable = a
p = pressure
[../]
[./aeq]
type = CoupledBEEquilibriumSub
variable = a
log_k = 1
weight = 2
sto_u = 2
[../]
[./adiff]
type = CoupledDiffusionReactionSub
variable = a
log_k = 1
weight = 2
sto_u = 2
[../]
[./aconv]
type = CoupledConvectionReactionSub
variable = a
log_k = 1
weight = 2
sto_u = 2
p = pressure
[../]
[]
[BCs]
[./a_right]
type = ChemicalOutFlowBC
variable = a
boundary = right
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity'
prop_values = '1e-4 1e-4 0.2'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-12
start_time = 0.0
end_time = 100
dt = 10.0
[]
[Outputs]
file_base = 1species_out
exodus = true
perf_graph = true
print_linear_residuals = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
(modules/chemical_reactions/test/tests/jacobian/2species_equilibrium_with_density.i)
# Tests the Jacobian when equilibrium secondary species are present including density
# in flux calculation
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
ny = 3
[]
[Variables]
[./a]
order = FIRST
family = LAGRANGE
[../]
[./b]
order = FIRST
family = LAGRANGE
[../]
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./pressure]
type = RandomIC
variable = pressure
max = 5
min = 1
[../]
[./a]
type = RandomIC
variable = a
max = 1
min = 0
[../]
[./b]
type = RandomIC
variable = b
max = 1
min = 0
[../]
[]
[ReactionNetwork]
[./AqueousEquilibriumReactions]
primary_species = 'a b'
reactions = '2a = pa2 2
a + b = pab 2'
secondary_species = 'pa2 pab'
pressure = pressure
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./a_diff]
type = PrimaryDiffusion
variable = a
[../]
[./a_conv]
type = PrimaryConvection
variable = a
p = pressure
gravity = '0 -10 0'
[../]
[./b_ie]
type = PrimaryTimeDerivative
variable = b
[../]
[./b_diff]
type = PrimaryDiffusion
variable = b
[../]
[./b_conv]
type = PrimaryConvection
variable = b
p = pressure
gravity = '0 -10 0'
[../]
[./pressure]
type = DarcyFluxPressure
variable = pressure
gravity = '0 -10 0'
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity density'
prop_values = '1e-4 1e-4 0.2 10'
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 1
[]
[Outputs]
perf_graph = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
(modules/xfem/test/tests/moving_interface/verification/1D_rz_homog1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: quasi-1D
# Coordinate System: rz
# Material Numbers/Types: homogeneous 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description:
# A simple transient heat transfer problem in cylindrical coordinates designed
# with the Method of Manufactured Solutions. This problem was developed to
# verify XFEM performance in the presence of a moving interface for linear
# element models that can be exactly evaluated by FEM/Moose. Both the
# temperature solution and level set function are designed to be linear to
# attempt to minimize error between the Moose/exact solution and XFEM results.
# Thermal conductivity is a single, constant value at all points in the system.
# Results:
# The temperature at the left boundary (x=1) exhibits the largest difference
# between the FEM/Moose solution and XFEM results. We present the XFEM results
# at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 480.0008118
# 0.6 520 520.0038529
# 0.8 560 560.0089177
# 1.0 600 600.0133344
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Problem]
coord_type = RZ
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 1
xmin = 1.0
xmax = 2.0
ymin = 0.0
ymax = 0.5
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraint]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = '10*(-200*x+400) + 200*1.5*t/x'
[../]
[./neumann_func]
type = ParsedFunction
expression = '1.5*200*t'
[../]
[./ls_func]
type = ParsedFunction
expression = '2.04 - x - 0.2*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericConstantMaterial
prop_names = 'diffusion_coefficient'
prop_values = 1.5
[../]
[]
[BCs]
[./left_u]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 'right'
value = 400
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/functional_expansion_tools/examples/3D_volumetric_Cartesian_direct/main.i)
# Derived from the example '3D_volumetric_Cartesian' with the following differences:
#
# 1) The coupling is performed via BodyForce instead of the
# FunctionSeriesToAux+CoupledForce approach
[Mesh]
type = GeneratedMesh
dim = 3
xmin = 0.0
xmax = 10.0
nx = 15
ymin = 1.0
ymax = 11.0
ny = 25
zmin = 2.0
zmax = 12.0
nz = 35
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./s_in] # Add in the contribution from the SubApp
type = BodyForce
variable = m
function = FX_Basis_Value_Main
[../]
[]
[Materials]
[./Unobtanium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'top bottom left right front back'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3 4 5'
physical_bounds = '0.0 10.0 1.0 11.0 2.0 12.0'
x = Legendre
y = Legendre
z = Legendre
enable_cache = true
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/chemical_reactions/test/tests/aqueous_equilibrium/2species_eqaux.i)
# In this example, two primary species a and b are transported by diffusion and convection
# from the left of the porous medium, reacting to form two equilibrium species pa2 and pab
# according to the equilibrium reaction specified in the AqueousEquilibriumReactions block as:
#
# reactions = '2a = pa2 2
# a + b = pab -2'
#
# where the 2 is the weight of the equilibrium species, the 2 on the RHS of the first reaction
# refers to the equilibrium constant (log10(Keq) = 2), and the -2 on the RHS of the second
# reaction equates to log10(Keq) = -2.
#
# This example is identical to 2species.i, except that it explicitly includes all AuxKernels
# and Kernels that are set up by the action in 2species.i, and that the equilbrium constants
# are provided by AuxVariables
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
[]
[Variables]
[./a]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[../]
[../]
[./b]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[../]
[../]
[]
[AuxVariables]
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[./pa2]
[../]
[./pab]
[../]
[./pa2_logk]
initial_condition = 2
[../]
[./pab_logk]
initial_condition = -2
[../]
[]
[AuxKernels]
[./pa2eq]
type = AqueousEquilibriumRxnAux
variable = pa2
v = a
sto_v = 2
log_k = pa2_logk
[../]
[./pabeq]
type = AqueousEquilibriumRxnAux
variable = pab
v = 'a b'
sto_v = '1 1'
log_k = pab_logk
[../]
[]
[ICs]
[./pressure]
type = FunctionIC
variable = pressure
function = 2-x
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./a_diff]
type = PrimaryDiffusion
variable = a
[../]
[./a_conv]
type = PrimaryConvection
variable = a
p = pressure
[../]
[./b_ie]
type = PrimaryTimeDerivative
variable = b
[../]
[./b_diff]
type = PrimaryDiffusion
variable = b
[../]
[./b_conv]
type = PrimaryConvection
variable = b
p = pressure
[../]
[./a1eq]
type = CoupledBEEquilibriumSub
variable = a
log_k = pa2_logk
weight = 2
sto_u = 2
[../]
[./a1diff]
type = CoupledDiffusionReactionSub
variable = a
log_k = pa2_logk
weight = 2
sto_u = 2
[../]
[./a1conv]
type = CoupledConvectionReactionSub
variable = a
log_k = pa2_logk
weight = 2
sto_u = 2
p = pressure
[../]
[./a2eq]
type = CoupledBEEquilibriumSub
variable = a
v = b
log_k = pab_logk
weight = 1
sto_v = 1
sto_u = 1
[../]
[./a2diff]
type = CoupledDiffusionReactionSub
variable = a
v = b
log_k = pab_logk
weight = 1
sto_v = 1
sto_u = 1
[../]
[./a2conv]
type = CoupledConvectionReactionSub
variable = a
v = b
log_k = pab_logk
weight = 1
sto_v = 1
sto_u = 1
p = pressure
[../]
[./b2eq]
type = CoupledBEEquilibriumSub
variable = b
v = a
log_k = pab_logk
weight = 1
sto_v = 1
sto_u = 1
[../]
[./b2diff]
type = CoupledDiffusionReactionSub
variable = b
v = a
log_k = pab_logk
weight = 1
sto_v = 1
sto_u = 1
[../]
[./b2conv]
type = CoupledConvectionReactionSub
variable = b
v = a
log_k = pab_logk
weight = 1
sto_v = 1
sto_u = 1
p = pressure
[../]
[]
[BCs]
[./a_left]
type = DirichletBC
variable = a
boundary = left
value = 1.0e-2
[../]
[./a_right]
type = ChemicalOutFlowBC
variable = a
boundary = right
[../]
[./b_left]
type = DirichletBC
variable = b
boundary = left
value = 1.0e-2
[../]
[./b_right]
type = ChemicalOutFlowBC
variable = b
boundary = right
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity'
prop_values = '1e-4 1e-4 0.2'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-12
start_time = 0.0
end_time = 100
dt = 10.0
[]
[Outputs]
file_base = 2species_out
exodus = true
perf_graph = true
print_linear_residuals = true
hide = 'pa2_logk pab_logk'
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
(modules/combined/examples/thermomechanics/circle_thermal_expansion_stress.i)
# This example problem demonstrates coupling heat conduction with mechanics.
# A circular domain has as uniform heat source that increases with time
# and a fixed temperature on the outer boundary, resulting in a temperature gradient.
# This results in heterogeneous thermal expansion, where it is pinned in the center.
# Looking at the hoop stress demonstrates why fuel pellets have radial cracks
# that extend from the outer boundary to about halfway through the radius.
# The problem is run with length units of microns.
[Mesh]
#Circle mesh has a radius of 1000 units
type = FileMesh
file = circle.e
uniform_refine = 1
[]
[Variables]
# We solve for the temperature and the displacements
[./T]
initial_condition = 800
scaling = 1e7
[../]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[AuxVariables]
[./radial_stress]
order = CONSTANT
family = MONOMIAL
[../]
[./hoop_stress]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
active = 'TensorMechanics htcond Q_function'
[./htcond] #Heat conduction equation
type = HeatConduction
variable = T
[../]
[./TensorMechanics] #Action that creates equations for disp_x and disp_y
displacements = 'disp_x disp_y'
[../]
[./Q_function] #Heat generation term
type = BodyForce
variable = T
value = 1
function = 0.8e-9*t
[../]
[]
[AuxKernels]
[./radial_stress] #Calculates radial stress from cartesian
type = CylindricalRankTwoAux
variable = radial_stress
rank_two_tensor = stress
index_j = 0
index_i = 0
center_point = '0 0 0'
[../]
[./hoop_stress] #Calculates hoop stress from cartesian
type = CylindricalRankTwoAux
variable = hoop_stress
rank_two_tensor = stress
index_j = 1
index_i = 1
center_point = '0 0 0'
[../]
[]
[BCs]
[./outer_T] #Temperature on outer edge is fixed at 800K
type = DirichletBC
variable = T
boundary = 1
value = 800
[../]
[./outer_x] #Displacements in the x-direction are fixed in the center
type = DirichletBC
variable = disp_x
boundary = 2
value = 0
[../]
[./outer_y] #Displacements in the y-direction are fixed in the center
type = DirichletBC
variable = disp_y
boundary = 2
value = 0
[../]
[]
[Materials]
[./thcond] #Thermal conductivity is set to 5 W/mK
type = GenericConstantMaterial
block = 1
prop_names = 'thermal_conductivity'
prop_values = '5e-6'
[../]
[./iso_C] #Sets isotropic elastic constants
type = ComputeElasticityTensor
fill_method = symmetric_isotropic
C_ijkl = '2.15e5 0.74e5'
block = 1
[../]
[./strain] #We use small deformation mechanics
type = ComputeSmallStrain
displacements = 'disp_x disp_y'
block = 1
eigenstrain_names = eigenstrain
[../]
[./stress] #We use linear elasticity
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 = Transient
scheme = bdf2
num_steps = 10
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
l_tol = 1e-04
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/contact/test/tests/mortar_dynamics/frictional-mortar-3d-dynamics.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[mortar_tangent_x]
family = LAGRANGE
order = FIRST
[]
[mortar_tangent_y]
family = LAGRANGE
order = FIRST
[]
[mortar_tangent_z]
family = LAGRANGE
order = FIRST
[]
[]
[AuxKernels]
[friction_x_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_x
component = 0
boundary = 'top_bottom'
[]
[friction_y_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_y
component = 1
boundary = 'top_bottom'
[]
[friction_z_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_z
component = 2
boundary = 'top_bottom'
[]
[]
[Mesh]
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 10
nz = 2
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
uniform_refine = 0
allow_renumbering = false
[]
[Variables]
[mortar_normal_lm]
block = 'secondary_lower'
use_dual = true
[]
[mortar_tangential_lm]
block = 'secondary_lower'
use_dual = true
[]
[mortar_tangential_3d_lm]
block = 'secondary_lower'
use_dual = true
[]
[]
[Modules/TensorMechanics/DynamicMaster]
[all]
add_variables = true
hht_alpha = 0.0
newmark_beta = 0.25
newmark_gamma = 0.5
mass_damping_coefficient = 0.0
stiffness_damping_coefficient = 0.1
displacements = 'disp_x disp_y disp_z'
generate_output = 'stress_xx stress_xy stress_xz stress_yy stress_zz'
block = '1 2'
strain = FINITE
density = density
[]
[]
[Materials]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '1.0'
[]
[tensor]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1.0e4
poissons_ratio = 0.0
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[tensor_1000]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e5
poissons_ratio = 0.0
[]
[stress_1000]
type = ComputeFiniteStrainElasticStress
block = '2'
[]
[]
[UserObjects]
[weighted_vel_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
lm_variable_normal = mortar_normal_lm
lm_variable_tangential_one = mortar_tangential_lm
lm_variable_tangential_two = mortar_tangential_3d_lm
secondary_variable = disp_x
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[friction]
type = ComputeDynamicFrictionalForceLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
friction_lm = mortar_tangential_lm
friction_lm_dir = mortar_tangential_3d_lm
mu = 0.4
c = 1e4
c_t = 1.0e4
newmark_gamma = 0.5
newmark_beta = 0.25
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[normal_z]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_z]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_x]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_x
component = x
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_y]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_y
component = y
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_z]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_z
component = z
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Executioner]
type = Transient
end_time = .025
dt = .025
dtmin = .001
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu NONZERO 1e-14'
nl_rel_tol = 1e-11
nl_abs_tol = 1e-11
line_search = 'basic'
[TimeIntegrator]
type = NewmarkBeta
gamma = 0.5
beta = 0.25
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
csv = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'contact'
[contact]
type = ContactDOFSetSize
variable = mortar_normal_lm
subdomain = 'secondary_lower'
execute_on = 'nonlinear timestep_end'
[]
[]
[VectorPostprocessors]
[contact-pressure]
type = NodalValueSampler
block = secondary_lower
variable = mortar_normal_lm
sort_by = 'id'
execute_on = NONLINEAR
[]
[frictional-pressure]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangential_lm
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[frictional-pressure-3d]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangential_3d_lm
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[tangent_x]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangent_x
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[tangent_y]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangent_y
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[]
(modules/combined/test/tests/phase_field_fracture/crack2d_aniso_cleavage_plane.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 20
ymax = 0.5
[]
[./noncrack]
type = BoundingBoxNodeSetGenerator
new_boundary = noncrack
bottom_left = '0.5 0 0'
top_right = '1 0 0'
input = gen
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[./c]
family = LAGRANGE
order = FIRST
[../]
[]
[Modules]
[./TensorMechanics]
[./Master]
[./All]
add_variables = true
strain = SMALL
additional_generate_output = 'strain_yy stress_yy'
planar_formulation = PLANE_STRAIN
[../]
[../]
[../]
[]
[Kernels]
[./ACbulk]
type = AllenCahn
variable = c
f_name = F
[../]
[./ACInterfaceCleavageFracture]
type = ACInterfaceCleavageFracture
variable = c
beta_penalty = 1
cleavage_plane_normal = '-0.707 0.707 0.0'
[../]
[./dcdt]
type = TimeDerivative
variable = c
[../]
[./solid_x]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_x
component = 0
c = c
[../]
[./solid_y]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_y
component = 1
c = c
[../]
[./off_disp]
type = AllenCahnElasticEnergyOffDiag
variable = c
displacements = 'disp_x disp_y'
mob_name = L
[../]
[]
[BCs]
[./ydisp]
type = FunctionDirichletBC
preset = true
variable = disp_y
boundary = top
function = 't'
[../]
[./yfix]
type = DirichletBC
preset = true
variable = disp_y
boundary = noncrack
value = 0
[../]
[./xfix]
type = DirichletBC
preset = true
variable = disp_x
boundary = right
value = 0
[../]
[]
[Materials]
[./pfbulkmat]
type = GenericConstantMaterial
prop_names = 'gc_prop l visco'
prop_values = '1e-3 0.05 1e-6'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '127.0 70.8 70.8 127.0 70.8 127.0 73.55 73.55 73.55'
fill_method = symmetric9
euler_angle_1 = 30
euler_angle_2 = 0
euler_angle_3 = 0
[../]
[./define_mobility]
type = ParsedMaterial
material_property_names = 'gc_prop visco'
property_name = L
expression = '1.0/(gc_prop * visco)'
[../]
[./define_kappa]
type = ParsedMaterial
material_property_names = 'gc_prop l'
property_name = kappa_op
expression = 'gc_prop * l'
[../]
[./damage_stress]
type = ComputeLinearElasticPFFractureStress
c = c
E_name = 'elastic_energy'
D_name = 'degradation'
F_name = 'local_fracture_energy'
decomposition_type = stress_spectral
[../]
[./degradation]
type = DerivativeParsedMaterial
property_name = degradation
coupled_variables = 'c'
expression = '(1.0-c)^2*(1.0 - eta) + eta'
constant_names = 'eta'
constant_expressions = '1.0e-6'
derivative_order = 2
[../]
[./local_fracture_energy]
type = DerivativeParsedMaterial
property_name = local_fracture_energy
coupled_variables = 'c'
material_property_names = 'gc_prop l'
expression = 'c^2 * gc_prop / 2 / l'
derivative_order = 2
[../]
[./fracture_driving_energy]
type = DerivativeSumMaterial
coupled_variables = c
sum_materials = 'elastic_energy local_fracture_energy'
derivative_order = 2
property_name = F
[../]
[]
[Postprocessors]
[./av_stress_yy]
type = ElementAverageValue
variable = stress_yy
[../]
[./av_strain_yy]
type = SideAverageValue
variable = disp_y
boundary = top
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_factor_mat_solving_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-8
l_tol = 1e-4
l_max_its = 100
nl_max_its = 10
dt = 5e-5
num_steps = 5
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_single_material.i)
## Units in the input file: m-Pa-s-K-V
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmax = 0.1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmin = 0.1
xmax = 0.2
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
[interface_secondary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'fixed_block_left'
new_block_id = 3
new_block_name = 'interface_secondary_subdomain'
input = block_rename
[]
[interface_primary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'moving_block_right'
new_block_id = 4
new_block_name = 'interface_primary_subdomain'
input = interface_secondary_subdomain
[]
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
[]
[Variables]
[temperature]
initial_condition = 300.0
[]
[potential]
[]
[potential_interface_lm]
block = 'interface_secondary_subdomain'
[]
[temperature_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[AuxVariables]
[interface_normal_lm]
order = FIRST
family = LAGRANGE
block = 'interface_secondary_subdomain'
initial_condition = 1.0
[]
[]
[Kernels]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
extra_vector_tags = 'ref'
block = 'left_block right_block'
[]
[electric_aluminum]
type = ADMatDiffusion
variable = potential
diffusivity = aluminum_electrical_conductivity
extra_vector_tags = 'ref'
block = 'left_block right_block'
[]
[]
[BCs]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'fixed_block_right'
[]
[electric_left]
type = ADDirichletBC
variable = potential
value = 0.0
boundary = moving_block_left
[]
[electric_right]
type = ADDirichletBC
variable = potential
value = 3.0e-1
boundary = fixed_block_right
[]
[]
[Constraints]
[thermal_contact]
type = ModularGapConductanceConstraint
variable = temperature_interface_lm
secondary_variable = temperature
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_temperature'
[]
[electrical_contact]
type = ModularGapConductanceConstraint
variable = potential_interface_lm
secondary_variable = potential
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_electric'
[]
[interface_heating]
type = ADInterfaceJouleHeatingConstraint
potential_lagrange_multiplier = potential_interface_lm
secondary_variable = temperature
primary_electrical_conductivity = aluminum_electrical_conductivity
secondary_electrical_conductivity = aluminum_electrical_conductivity
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
[]
[]
[Materials]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_electrical_conductivity aluminum_hardness'
prop_values = ' 2.7e3 210 900.0 3.7e7 1.0' #for 99% pure Al
block = 'left_block right_block interface_secondary_subdomain'
[]
[]
[UserObjects]
[closed_temperature]
type = GapFluxModelPressureDependentConduction
primary_conductivity = aluminum_thermal_conductivity
secondary_conductivity = aluminum_thermal_conductivity
temperature = temperature
contact_pressure = interface_normal_lm
primary_hardness = aluminum_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[closed_electric]
type = GapFluxModelPressureDependentConduction
primary_conductivity = aluminum_electrical_conductivity
secondary_conductivity = aluminum_electrical_conductivity
temperature = potential
contact_pressure = interface_normal_lm
primary_hardness = aluminum_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[]
[Postprocessors]
[aluminum_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_secondary_subdomain
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[aluminum_interface_potential]
type = AverageNodalVariableValue
variable = potential
block = interface_secondary_subdomain
[]
[interface_electrical_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = potential
boundary = fixed_block_left
diffusivity = aluminum_electrical_conductivity
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
nl_abs_tol = 1e-10
nl_rel_tol = 1e-6
nl_max_its = 50
nl_forced_its = 1
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/solid_mechanics/examples/coal_mining/cosserat_mc_only.i)
# Strata deformation and fracturing around a coal mine
#
# A 2D geometry is used that simulates a transverse section of
# the coal mine. The model is actually 3D, but the "x"
# dimension is only 10m long, meshed with 1 element, and
# there is no "x" displacement. The mine is 300m deep
# and just the roof is studied (0<=z<=300). The model sits
# between 0<=y<=450. The excavation sits in 0<=y<=150. This
# is a "half model": the boundary conditions are such that
# the model simulates an excavation sitting in -150<=y<=150
# inside a model of the region -450<=y<=450. The
# excavation height is 3m (ie, the excavation lies within
# 0<=z<=3). Mining is simulated by moving the excavation's
# roof down, until disp_z=-3 at t=1.
# Time is meaningless in this example
# as quasi-static solutions are sought at each timestep, but
# the number of timesteps controls the resolution of the
# process.
#
# The boundary conditions are:
# - disp_x = 0 everywhere
# - disp_y = 0 at y=0 and y=450
# - disp_z = 0 for y>150
# - disp_z = -3 at maximum, for 0<=y<=150. See excav function.
# That is, rollers on the sides, free at top, and prescribed at bottom.
#
# The small strain formulation is used.
#
# All stresses are measured in MPa. The initial stress is consistent with
# the weight force from density 2500 kg/m^3, ie, stress_zz = -0.025*(300-z) MPa
# where gravity = 10 m.s^-2 = 1E-5 MPa m^2/kg. The maximum and minimum
# principal horizontal stresses are assumed to be equal to 0.8*stress_zz.
#
# Below you will see weak-plane parameters and AuxVariables, etc.
# These are not actally used in this example.
#
# Material properties:
# Young's modulus = 8 GPa
# Poisson's ratio = 0.25
# Cosserat layer thickness = 1 m
# Cosserat-joint normal stiffness = large
# Cosserat-joint shear stiffness = 1 GPa
# MC cohesion = 3 MPa
# MC friction angle = 37 deg
# MC dilation angle = 8 deg
# MC tensile strength = 1 MPa
# MC compressive strength = 100 MPa, varying down to 1 MPa when tensile strain = 1
#
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 1
xmin = -5
xmax = 5
nz = 40
zmin = 0
zmax = 400.0
bias_z = 1.1
ny = 30 # make this a multiple of 3, so y=150 is at a node
ymin = 0
ymax = 450
[]
[left]
type = SideSetsAroundSubdomainGenerator
new_boundary = 11
normal = '0 -1 0'
input = generated_mesh
[]
[right]
type = SideSetsAroundSubdomainGenerator
new_boundary = 12
normal = '0 1 0'
input = left
[]
[front]
type = SideSetsAroundSubdomainGenerator
new_boundary = 13
normal = '-1 0 0'
input = right
[]
[back]
type = SideSetsAroundSubdomainGenerator
new_boundary = 14
normal = '1 0 0'
input = front
[]
[top]
type = SideSetsAroundSubdomainGenerator
new_boundary = 15
normal = '0 0 1'
input = back
[]
[bottom]
type = SideSetsAroundSubdomainGenerator
new_boundary = 16
normal = '0 0 -1'
input = top
[]
[excav]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '-5 0 0'
top_right = '5 150 3'
input = bottom
[]
[roof]
type = SideSetsBetweenSubdomainsGenerator
new_boundary = 21
primary_block = 0
paired_block = 1
input = excav
[]
[hole]
type = BlockDeletionGenerator
block = 1
input = roof
[]
[]
[GlobalParams]
block = 0
perform_finite_strain_rotations = false
displacements = 'disp_x disp_y disp_z'
Cosserat_rotations = 'wc_x wc_y wc_z'
[]
[Variables]
[./disp_y]
[../]
[./disp_z]
[../]
[./wc_x]
[../]
[]
[Kernels]
[./cy_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_y
component = 1
[../]
[./cz_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_z
component = 2
[../]
[./x_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_x
displacements = 'wc_x wc_y wc_z'
component = 0
base_name = couple
[../]
[./x_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_x
component = 0
[../]
[./gravity]
type = Gravity
use_displaced_mesh = false
variable = disp_z
value = -10E-6
[../]
[]
[AuxVariables]
[./disp_x]
[../]
[./wc_y]
[../]
[./wc_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./mc_shear]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_internal_parameter
variable = mc_shear
[../]
[./mc_tensile]
type = MaterialStdVectorAux
index = 1
property = mc_plastic_internal_parameter
variable = mc_tensile
[../]
[./wp_shear]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_internal_parameter
variable = wp_shear
[../]
[./wp_tensile]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_internal_parameter
variable = wp_tensile
[../]
[./mc_shear_f]
type = MaterialStdVectorAux
index = 6
property = mc_plastic_yield_function
variable = mc_shear_f
[../]
[./mc_tensile_f]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_yield_function
variable = mc_tensile_f
[../]
[./wp_shear_f]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_yield_function
variable = wp_shear_f
[../]
[./wp_tensile_f]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_yield_function
variable = wp_tensile_f
[../]
[]
[BCs]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = '11 12 16 21' # note addition of 16 and 21
value = 0.0
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = '16'
value = 0.0
[../]
[./no_wc_x]
type = DirichletBC
variable = wc_x
boundary = '11 12'
value = 0.0
[../]
[./roof]
type = FunctionDirichletBC
variable = disp_z
boundary = 21
function = excav_sideways
[../]
[]
[Functions]
[./ini_xx]
type = ParsedFunction
expression = '-0.8*2500*10E-6*(400-z)'
[../]
[./ini_zz]
type = ParsedFunction
expression = '-2500*10E-6*(400-z)'
[../]
[./excav_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax e_h closure_dist'
symbol_values = '1.0 0 150.0 -3.0 15.0'
expression = 'e_h*max(min((t/end_t*(ymax-ymin)+ymin-y)/closure_dist,1),0)'
[../]
[./excav_downwards]
type = ParsedFunction
symbol_names = 'end_t ymin ymax e_h closure_dist'
symbol_values = '1.0 0 150.0 -3.0 15.0'
expression = 'e_h*t/end_t*max(min(((ymax-ymin)+ymin-y)/closure_dist,1),0)'
[../]
[]
[UserObjects]
[./mc_coh_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 2.99 # MPa
value_residual = 3.01 # MPa
rate = 1.0
[../]
[./mc_fric]
type = SolidMechanicsHardeningConstant
value = 0.65 # 37deg
[../]
[./mc_dil]
type = SolidMechanicsHardeningConstant
value = 0.15 # 8deg
[../]
[./mc_tensile_str_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 1.0 # MPa
value_residual = 1.0 # MPa
rate = 1.0
[../]
[./mc_compressive_str]
type = SolidMechanicsHardeningCubic
value_0 = 100 # Large!
value_residual = 100
internal_limit = 0.1
[../]
[./wp_coh_harden]
type = SolidMechanicsHardeningCubic
value_0 = 0.1
value_residual = 0.1
internal_limit = 10
[../]
[./wp_tan_fric]
type = SolidMechanicsHardeningConstant
value = 0.36 # 20deg
[../]
[./wp_tan_dil]
type = SolidMechanicsHardeningConstant
value = 0.18 # 10deg
[../]
[./wp_tensile_str_harden]
type = SolidMechanicsHardeningCubic
value_0 = 0.1
value_residual = 0.1
internal_limit = 10
[../]
[./wp_compressive_str_soften]
type = SolidMechanicsHardeningCubic
value_0 = 100
value_residual = 1.0
internal_limit = 1.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeLayeredCosseratElasticityTensor
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3
[../]
[./strain]
type = ComputeCosseratIncrementalSmallStrain
eigenstrain_names = ini_stress
[../]
[./ini_stress]
type = ComputeEigenstrainFromInitialStress
initial_stress = 'ini_xx 0 0 0 ini_xx 0 0 0 ini_zz'
eigenstrain_name = ini_stress
[../]
[./stress]
type = ComputeMultipleInelasticCosseratStress
block = 0
inelastic_models = mc
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[../]
[./mc]
type = CappedMohrCoulombCosseratStressUpdate
block = 0
warn_about_precision_loss = false
host_youngs_modulus = 8E3
host_poissons_ratio = 0.25
base_name = mc
tensile_strength = mc_tensile_str_strong_harden
compressive_strength = mc_compressive_str
cohesion = mc_coh_strong_harden
friction_angle = mc_fric
dilation_angle = mc_dil
max_NR_iterations = 100000
smoothing_tol = 0.1 # MPa # Must be linked to cohesion
yield_function_tol = 1E-9 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0
[../]
[./wp]
type = CappedWeakPlaneCosseratStressUpdate
block = 0
warn_about_precision_loss = false
base_name = wp
cohesion = wp_coh_harden
tan_friction_angle = wp_tan_fric
tan_dilation_angle = wp_tan_dil
tensile_strength = wp_tensile_str_harden
compressive_strength = wp_compressive_str_soften
max_NR_iterations = 10000
tip_smoother = 0.1
smoothing_tol = 0.1 # MPa # Note, this must be tied to cohesion, otherwise get no possible return at cone apex
yield_function_tol = 1E-11 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0E-3
[../]
[./density]
type = GenericConstantMaterial
prop_names = density
prop_values = 2500
[../]
[]
[Postprocessors]
[./subsidence]
type = PointValue
point = '0 0 400'
variable = disp_z
use_displaced_mesh = false
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
line_search = bt
nl_abs_tol = 1e-3
nl_rel_tol = 1e-5
l_max_its = 30
nl_max_its = 1000
start_time = 0.0
dt = 0.2
end_time = 0.2
[]
[Outputs]
file_base = cosserat_mc_only
time_step_interval = 1
print_linear_residuals = false
csv = true
exodus = true
[./console]
type = Console
output_linear = false
[../]
[]
(modules/heat_transfer/test/tests/postprocessors/convective_ht_side_integral.i)
[Mesh]
type = MeshGeneratorMesh
[./cartesian]
type = CartesianMeshGenerator
dim = 2
dx = '0.45 0.1 0.45'
ix = '5 1 5'
dy = '0.45 0.1 0.45'
iy = '5 1 5'
subdomain_id = '1 1 1
1 2 1
1 1 1'
[../]
[./add_iss_1]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
new_boundary = 'interface'
input = cartesian
[../]
[./block_deleter]
type = BlockDeletionGenerator
block = 2
input = add_iss_1
[../]
[]
[Variables]
[./temperature]
initial_condition = 300
[../]
[]
[AuxVariables]
[./channel_T]
family = MONOMIAL
order = CONSTANT
initial_condition = 400
[../]
[./channel_Hw]
family = MONOMIAL
order = CONSTANT
initial_condition = 1000
[../]
[]
[Kernels]
[./graphite_diffusion]
type = HeatConduction
variable = temperature
diffusion_coefficient = 'k_s'
[../]
[]
[BCs]
## boundary conditions for the thm channels in the reflector
[./channel_heat_transfer]
type = CoupledConvectiveHeatFluxBC
variable = temperature
htc = channel_Hw
T_infinity = channel_T
boundary = 'interface'
[../]
# hot boundary on the left
[./left]
type = DirichletBC
variable = temperature
value = 1000
boundary = 'left'
[../]
# cool boundary on the right
[./right]
type = DirichletBC
variable = temperature
value = 300
boundary = 'right'
[../]
[]
[Materials]
[./thermal]
type = GenericConstantMaterial
prop_names = 'k_s'
prop_values = '12'
[../]
[./htc_material]
type = GenericConstantMaterial
prop_names = 'alpha_wall'
prop_values = '1000'
[../]
[./tfluid_mat]
type = PiecewiseLinearInterpolationMaterial
property = tfluid_mat
variable = channel_T
x = '400 500'
y = '400 500'
[../]
[]
[Postprocessors]
[./Qw1]
type = ConvectiveHeatTransferSideIntegral
T_fluid_var = channel_T
htc_var = channel_Hw
T_solid = temperature
boundary = interface
[../]
[./Qw2]
type = ConvectiveHeatTransferSideIntegral
T_fluid_var = channel_T
htc = alpha_wall
T_solid = temperature
boundary = interface
[../]
[./Qw3]
type = ConvectiveHeatTransferSideIntegral
T_fluid = tfluid_mat
htc = alpha_wall
T_solid = temperature
boundary = interface
[../]
[]
[Executioner]
type = Steady
[]
[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/navier_stokes/test/tests/finite_element/ins/lid_driven/steady_vector_fsp_elman.i)
rho=1
mu=1
U=1
l=1
prefactor=${fparse 1/(l/2)^2}
n=8
[Mesh]
[gen]
type = DistributedRectilinearMeshGenerator
dim = 2
xmin = 0
xmax = ${l}
ymin = 0
ymax = ${l}
nx = ${n}
ny = ${n}
elem_type = QUAD4
[]
second_order = true
parallel_type = distributed
[]
[Variables]
[vel]
order = SECOND
family = LAGRANGE_VEC
[]
[p]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[mass]
type = INSADMass
variable = p
[]
[velocity_mass_kernel]
type = VectorMassMatrix
variable = vel
matrix_tags = 'mass'
[]
[momentum_convection]
type = INSADMomentumAdvection
variable = vel
[]
[momentum_viscous]
type = INSADMomentumViscous
variable = vel
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = vel
pressure = p
integrate_p_by_parts = true
[]
[]
[BCs]
[no_slip]
type = ADVectorFunctionDirichletBC
variable = vel
boundary = 'bottom right left'
[]
[lid]
type = ADVectorFunctionDirichletBC
variable = vel
boundary = 'top'
function_x = 'lid_function'
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[insad]
type = INSADMaterial
velocity = vel
pressure = p
[]
[]
[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 = '${prefactor}*${U}*x*(${l}-x)'
[]
[]
[Problem]
type = NavierStokesProblem
mass_matrix = 'mass'
extra_tag_matrices = 'mass'
[]
[Preconditioning]
[FSP]
type = FSP
topsplit = 'up'
[up]
splitting = 'u p'
splitting_type = schur
petsc_options_iname = '-pc_fieldsplit_schur_fact_type -pc_fieldsplit_schur_precondition -ksp_gmres_restart -ksp_type -ksp_pc_side -ksp_rtol'
petsc_options_value = 'full self 300 fgmres right 1e-4'
[]
[u]
vars = 'vel'
# petsc_options = '-ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_type -ksp_rtol -ksp_gmres_restart -ksp_pc_side'
petsc_options_value = 'hypre boomeramg gmres 1e-2 300 right'
[]
[p]
vars = 'p'
petsc_options = '-ksp_converged_reason -pc_lsc_scale_diag'
petsc_options_iname = '-ksp_type -ksp_gmres_restart -ksp_rtol -pc_type -ksp_pc_side -lsc_pc_type -lsc_pc_hypre_type -lsc_ksp_type -lsc_ksp_rtol -lsc_ksp_pc_side -lsc_ksp_gmres_restart'
petsc_options_value = 'fgmres 300 1e-2 lsc right hypre boomeramg gmres 1e-1 right 300'
[]
[]
[]
[Postprocessors]
[pavg]
type = ElementAverageValue
variable = p
[]
[]
[UserObjects]
[set_pressure]
type = NSPressurePin
pin_type = 'average'
variable = p
pressure_average = 'pavg'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
print_linear_residuals = false
[exo]
type = Exodus
execute_on = 'final'
hide = 'pavg'
[]
[]
(test/tests/materials/has_material/has_block_prop.i)
[Mesh]
type = FileMesh
file = rectangle.e
[]
[Variables]
[./u]
[../]
[]
[Kernels]
active = 'u_diff'
[./u_diff]
type = MatCoefDiffusion
variable = u
block = '1 2'
conductivity = k
[../]
[]
[BCs]
[./left]
type = NeumannBC
variable = u
boundary = 1
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 0
[../]
[]
[Materials]
[./right]
type = GenericConstantMaterial
block = 2
prop_names = 'k k_right'
prop_values = '1 2'
[../]
[./left]
type = GenericConstantMaterial
block = 1
prop_names = 'k'
prop_values = '0.1'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/misc/check_error/missing_material_prop_test.i)
[Mesh]
file = rectangle.e
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff body_force'
[./diff]
type = DiffMKernel
variable = u
mat_prop = diff1
[../]
[./body_force]
type = BodyForce
variable = u
block = 1
value = 10
[../]
[]
[BCs]
active = 'right'
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Materials]
[./mat1]
type = GenericConstantMaterial
block = 1
prop_names = 'diff1'
prop_values = '1'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
file_base = out
[]
(modules/solid_mechanics/test/tests/dynamics/prescribed_displacement/3D_QStatic_1_Ramped_Displacement_ti.i)
# One 3D element under ramped displacement loading.
#
# loading:
# time : 0.0 0.1 0.2 0.3
# disp : 0.0 0.0 -0.01 -0.01
# This displacement loading is applied using the PresetDisplacement boundary condition.
# Here, the given displacement time history is converted to an acceleration
# time history using Backward Euler time differentiation. Then, the resulting
# acceleration is integrated using Newmark time integration to obtain a
# displacement time history which is then applied to the boundary.
# This is done because if the displacement is applied using Dirichlet BC, the
# resulting acceleration is very noisy.
# Boundaries:
# x = 0 left
# x = 1 right
# y = 0 bottom
# y = 1 top
# z = 0 back
# z = 1 front
# Result: The displacement at the top node in the z direction should match
# the prescribed displacement. Also, the z acceleration should
# be two triangular pulses, one peaking at 0.1 and another peaking at
# 0.2.
[Mesh]
type = GeneratedMesh
dim = 3 # Dimension of the mesh
nx = 1 # Number of elements in the x direction
ny = 1 # Number of elements in the y direction
nz = 1 # Number of elements in the z direction
xmin = 0.0
xmax = 1
ymin = 0.0
ymax = 1
zmin = 0.0
zmax = 1
allow_renumbering = false # So NodalVariableValue can index by id
[]
[Variables] # variables that are solved
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[AuxVariables] # variables that are calculated for output
[./accel_x]
[../]
[./vel_x]
[../]
[./accel_y]
[../]
[./vel_y]
[../]
[./accel_z]
[../]
[./vel_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_zz]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./DynamicSolidMechanics] # zeta*K*vel + K * disp
displacements = 'disp_x disp_y disp_z'
stiffness_damping_coefficient = 0.000025
[../]
[./inertia_x] # M*accel + eta*M*vel
type = InertialForce
variable = disp_x
eta = 19.63
[../]
[./inertia_y]
type = InertialForce
variable = disp_y
eta = 19.63
[../]
[./inertia_z]
type = InertialForce
variable = disp_z
eta = 19.63
[../]
[]
[AuxKernels]
[./accel_x] # These auxkernels are only to check output
type = TestNewmarkTI
displacement = disp_x
variable = accel_x
first = false
[../]
[./accel_y]
type = TestNewmarkTI
displacement = disp_y
variable = accel_y
first = false
[../]
[./accel_z]
type = TestNewmarkTI
displacement = disp_z
variable = accel_z
first = false
[../]
[./vel_x]
type = TestNewmarkTI
displacement = disp_x
variable = vel_x
[../]
[./vel_y]
type = TestNewmarkTI
displacement = disp_y
variable = vel_y
[../]
[./vel_z]
type = TestNewmarkTI
displacement = disp_z
variable = vel_z
[../]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./strain_xx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xx
index_i = 0
index_j = 0
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yy
index_i = 1
index_j = 1
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./strain_zz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_zz
index_i = 2
index_j = 2
[../]
[]
[Functions]
[./displacement_front]
type = PiecewiseLinear
data_file = 'displacement.csv'
format = columns
[../]
[]
[BCs]
[./Preset_displacement]
type = PresetDisplacement
variable = disp_z
function = displacement_front
boundary = front
beta = 0.25
velocity = vel_z
acceleration = accel_z
[../]
[./anchor_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./anchor_y]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./anchor_z]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
youngs_modulus = 325e6 #Pa
poissons_ratio = 0.3
type = ComputeIsotropicElasticityTensor
block = 0
[../]
[./strain]
#Computes the strain, assuming small strains
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[../]
[./stress]
#Computes the stress, using linear elasticity
type = ComputeLinearElasticStress
block = 0
[../]
[./density]
type = GenericConstantMaterial
block = 0
prop_names = density
prop_values = 2000 #kg/m3
[../]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 3.0
l_tol = 1e-6
nl_rel_tol = 1e-6
nl_abs_tol = 1e-6
dt = 0.1
timestep_tolerance = 1e-6
# Time integrator scheme
scheme = "newmark-beta"
[]
[Postprocessors] # These quantites are printed to a csv file at every time step
[./_dt]
type = TimestepSize
[../]
[./accel_6x]
type = NodalVariableValue
nodeid = 6
variable = accel_x
[../]
[./accel_6y]
type = NodalVariableValue
nodeid = 6
variable = accel_y
[../]
[./accel_6z]
type = NodalVariableValue
nodeid = 6
variable = accel_z
[../]
[./vel_6x]
type = NodalVariableValue
nodeid = 6
variable = vel_x
[../]
[./vel_6y]
type = NodalVariableValue
nodeid = 6
variable = vel_y
[../]
[./vel_6z]
type = NodalVariableValue
nodeid = 6
variable = vel_z
[../]
[./disp_6x]
type = NodalVariableValue
nodeid = 6
variable = disp_x
[../]
[./disp_6y]
type = NodalVariableValue
nodeid = 6
variable = disp_y
[../]
[./disp_6z]
type = NodalVariableValue
nodeid = 6
variable = disp_z
[../]
[]
[Outputs]
file_base = "3D_QStatic_1_Ramped_Displacement_out"
exodus = true
perf_graph = true
[]
(modules/heat_transfer/tutorials/introduction/therm_step03.i)
#
# Single block thermal input with time derivative term
# https://mooseframework.inl.gov/modules/heat_transfer/tutorials/introduction/therm_step03.html
#
[Mesh]
[generated]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmax = 2
ymax = 1
[]
[]
[Variables]
[T]
initial_condition = 300.0
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = T
[]
[time_derivative]
type = HeatConductionTimeDerivative
variable = T
[]
[]
[Materials]
[thermal]
type = HeatConductionMaterial
thermal_conductivity = 45.0
specific_heat = 0.5
[]
[density]
type = GenericConstantMaterial
prop_names = 'density'
prop_values = 8000.0
[]
[]
[BCs]
[t_left]
type = DirichletBC
variable = T
value = 300
boundary = 'left'
[]
[t_right]
type = FunctionDirichletBC
variable = T
function = '300+5*t'
boundary = 'right'
[]
[]
[Executioner]
type = Transient
end_time = 5
dt = 1
[]
[VectorPostprocessors]
[t_sampler]
type = LineValueSampler
variable = T
start_point = '0 0.5 0'
end_point = '2 0.5 0'
num_points = 20
sort_by = x
[]
[]
[Outputs]
exodus = true
[csv]
type = CSV
file_base = therm_step03_out
execute_on = final
[]
[]
(modules/thermal_hydraulics/test/tests/postprocessors/heat_rate_conduction_rz/heat_rate_conduction_rz.i)
# Tests the HeatRateConductionRZ post-processor.
R_i = 0.1
thickness = 0.2
L = 3.0
R_o = ${fparse R_i + thickness}
S = ${fparse 2 * pi * R_o * L}
k = 20.0
T_i = 300.0
T_o = 500.0
dT_dr = ${fparse (T_o - T_i) / thickness}
Q_exact = ${fparse k * dT_dr * S}
[Materials]
[hs_mat]
type = ADGenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '1.0 1.0 ${k}'
[]
[]
[Functions]
[T_fn]
type = ParsedFunction
expression = '${T_i} + (y - ${R_i}) * ${dT_dr}'
[]
[]
[Components]
[heat_structure]
type = HeatStructureCylindrical
position = '0 0 0'
orientation = '1 0 0'
inner_radius = ${R_i}
length = ${L}
n_elems = 50
names = 'region1'
widths = '${thickness}'
n_part_elems = '5'
initial_T = T_fn
[]
[]
[Postprocessors]
[Q_pp]
type = HeatRateConductionRZ
boundary = heat_structure:outer
axis_point = '0 0 0'
axis_dir = '1 0 0'
temperature = T_solid
thermal_conductivity = thermal_conductivity
inward = true
execute_on = 'INITIAL'
[]
[Q_err]
type = RelativeDifferencePostprocessor
value1 = Q_pp
value2 = ${Q_exact}
execute_on = 'INITIAL'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
num_steps = 0
[]
[Outputs]
file_base = 'heat_rate_conduction_rz'
[csv]
type = CSV
show = 'Q_err'
execute_on = 'INITIAL'
[]
[]
(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/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-fretting-wear-test-projection_angle.i)
starting_point = 0.5e-1
offset = -0.045
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = long-bottom-block-1elem-blocks-multiple-projections-lowerd.e
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[normal_lm]
block = 3
use_dual = true
# scaling = 1.0e-5
[]
[frictional_lm]
block = 3
use_dual = true
# scaling = 1.0e-5
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[DynamicTensorMechanics]
displacements = 'disp_x disp_y'
generate_output = 'stress_xx stress_yy'
strain = FINITE
block = '1 2'
zeta = 1.0
hht_alpha = 0.0
[]
[inertia_x]
type = InertialForce
variable = disp_x
velocity = vel_x
acceleration = accel_x
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[inertia_y]
type = InertialForce
variable = disp_y
velocity = vel_y
acceleration = accel_y
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[strain]
type = ComputeFiniteStrain
block = '1 2'
[]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '7750'
[]
[]
[AuxVariables]
[worn_depth]
block = '3'
[]
[gap_vel]
block = '3'
[]
[vel_x]
block = '1 2'
[]
[accel_x]
block = '1 2'
[]
[vel_y]
block = '1 2'
[]
[accel_y]
block = '1 2'
[]
[vel_z]
block = '1 2'
[]
[accel_z]
block = '1 2'
[]
[]
[AuxKernels]
[gap_vel]
type = WeightedGapVelAux
variable = gap_vel
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
disp_x = disp_x
disp_y = disp_y
debug_mesh = true
minimum_projection_angle = 0.0
[]
[worn_depth]
type = MortarArchardsLawAux
variable = worn_depth
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
displacements = 'disp_x disp_y'
friction_coefficient = 0.5
energy_wear_coefficient = 1.0e-6
normal_pressure = normal_lm
execute_on = 'TIMESTEP_END'
debug_mesh = true
minimum_projection_angle = 0.0
[]
[accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = 'linear timestep_end'
[]
[vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = 'linear timestep_end'
[]
[accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = 'linear timestep_end'
[]
[vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = 'linear timestep_end'
[]
[]
[UserObjects]
[weighted_vel_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
secondary_variable = disp_x
lm_variable_normal = normal_lm
lm_variable_tangential_one = frictional_lm
disp_x = disp_x
disp_y = disp_y
debug_mesh = true
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeDynamicFrictionalForceLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
wear_depth = worn_depth
c = 1e6
c_t = 1e6
normalize_c = true
mu = 0.5
friction_lm = frictional_lm
capture_tolerance = 1.0e-5
newmark_beta = 0.25
newmark_gamma = 0.5
debug_mesh = true
minimum_projection_angle = 0.0
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
minimum_projection_angle = 0.0
weighted_gap_uo = weighted_vel_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
minimum_projection_angle = 0.0
weighted_gap_uo = weighted_vel_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
minimum_projection_angle = 0.0
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
debug_mesh = true
minimum_projection_angle = 0.0
weighted_velocities_uo = weighted_vel_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(4.0 * pi / 4 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * (cos(32.0 * pi / 4 * t) - 1.0)'
[]
[]
[Executioner]
type = Transient
end_time = 0.0
dt = 0.05
dtmin = .002
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15'
nl_max_its = 40
l_max_its = 15
line_search = 'l2'
snesmf_reuse_base = true
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
checkpoint = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/chemical_reactions/test/tests/aqueous_equilibrium/2species.i)
# Simple equilibrium reaction example to illustrate the use of the AqueousEquilibriumReactions
# action.
# In this example, two primary species a and b are transported by diffusion and convection
# from the left of the porous medium, reacting to form two equilibrium species pa2 and pab
# according to the equilibrium reaction specified in the AqueousEquilibriumReactions block as:
#
# reactions = '2a = pa2 2
# a + b = pab -2'
#
# where the 2 is the weight of the equilibrium species, the 2 on the RHS of the first reaction
# refers to the equilibrium constant (log10(Keq) = 2), and the -2 on the RHS of the second
# reaction equates to log10(Keq) = -2.
#
# The AqueousEquilibriumReactions action creates all the required kernels and auxkernels
# to compute the reaction given by the above equilibrium reaction equation.
#
# Specifically, it adds to following:
# * An AuxVariable named 'pa2' (given in the reactions equations)
# * An AuxVariable named 'pab' (given in the reactions equations)
# * A AqueousEquilibriumRxnAux AuxKernel for each AuxVariable with all parameters
# * A CoupledBEEquilibriumSub Kernel for each primary species with all parameters
# * A CoupledDiffusionReactionSub Kernel for each primary species with all parameters
# * A CoupledConvectionReactionSub Kernel for each primary species with all parameters if
# pressure is a coupled variable
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
[]
[Variables]
[./a]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[../]
[../]
[./b]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[../]
[../]
[]
[AuxVariables]
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./pressure]
type = FunctionIC
variable = pressure
function = 2-x
[../]
[]
[ReactionNetwork]
[./AqueousEquilibriumReactions]
primary_species = 'a b'
reactions = '2a = pa2 2,
a + b = pab -2'
secondary_species = 'pa2 pab'
pressure = pressure
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./a_diff]
type = PrimaryDiffusion
variable = a
[../]
[./a_conv]
type = PrimaryConvection
variable = a
p = pressure
[../]
[./b_ie]
type = PrimaryTimeDerivative
variable = b
[../]
[./b_diff]
type = PrimaryDiffusion
variable = b
[../]
[./b_conv]
type = PrimaryConvection
variable = b
p = pressure
[../]
[]
[BCs]
[./a_left]
type = DirichletBC
variable = a
boundary = left
value = 1.0e-2
[../]
[./a_right]
type = ChemicalOutFlowBC
variable = a
boundary = right
[../]
[./b_left]
type = DirichletBC
variable = b
boundary = left
value = 1.0e-2
[../]
[./b_right]
type = ChemicalOutFlowBC
variable = b
boundary = right
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity'
prop_values = '1e-4 1e-4 0.2'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-12
start_time = 0.0
end_time = 100
dt = 10.0
[]
[Outputs]
file_base = 2species_out
exodus = true
perf_graph = true
print_linear_residuals = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
(modules/stochastic_tools/test/tests/surrogates/pod_rb/internal/sub.i)
[Problem]
type = FEProblem
extra_tag_vectors = 'diff react bodyf'
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 15
xmax = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = u
diffusivity = k
extra_vector_tags = 'diff'
[]
[reaction]
type = MaterialReaction
variable = u
coefficient = alpha
extra_vector_tags = 'react'
[]
[source]
type = BodyForce
variable = u
value = 1.0
extra_vector_tags = 'bodyf'
[]
[]
[Materials]
[k]
type = GenericConstantMaterial
prop_names = k
prop_values = 1.0
[]
[alpha]
type = GenericConstantMaterial
prop_names = alpha
prop_values = 1.0
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
(modules/phase_field/test/tests/mobility_derivative/mobility_derivative_direct_coupled_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 30
ymax = 30
elem_type = QUAD4
[]
[Variables]
[./c]
family = HERMITE
order = THIRD
[../]
[./d]
[../]
[]
[ICs]
[./c_IC]
type = SmoothCircleIC
x1 = 15
y1 = 15
radius = 12
variable = c
int_width = 3
invalue = 1
outvalue = 0
[../]
[./d_IC]
type = BoundingBoxIC
x1 = 0
x2 = 15
y1 = 0
y2 = 30
inside = 1.0
outside = 0.0
variable = d
[../]
[]
[Kernels]
[./c_bulk]
type = CahnHilliard
variable = c
mob_name = M
f_name = F
coupled_variables = d
[../]
[./c_int]
type = CHInterface
variable = c
kappa_name = kappa_c
mob_name = M
coupled_variables = d
[../]
[./c_dot]
type = TimeDerivative
variable = c
[../]
[./d_dot]
type = TimeDerivative
variable = d
[../]
[./d_diff]
type = MatDiffusion
variable = d
diffusivity = diffusivity
[../]
[]
[Materials]
[./kappa]
type = GenericConstantMaterial
prop_names = kappa_c
prop_values = 2.0
[../]
[./mob]
type = DerivativeParsedMaterial
property_name = M
coupled_variables = 'c d'
expression = if(d>0.001,d,0.001)*if(c<0,0.5,if(c>1,0.5,1-0.5*c^2))
derivative_order = 2
[../]
[./free_energy]
type = MathEBFreeEnergy
property_name = F
c = c
[../]
[./d_diff]
type = GenericConstantMaterial
prop_names = diffusivity
prop_values = 1.0
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = BDF2
solve_type = NEWTON
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 lu 1'
l_max_its = 30
l_tol = 1.0e-4
nl_max_its = 50
nl_rel_tol = 1.0e-10
dt = 0.25
num_steps = 2
[]
[Outputs]
execute_on = 'timestep_end'
[./oversample]
refinements = 2
type = Exodus
[../]
[]
(modules/contact/test/tests/mortar_dynamics/frictional-mortar-3d-dynamics-light.i)
starting_point = 0.25
offset = 0.00
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[mortar_tangent_x]
family = LAGRANGE
order = FIRST
[]
[mortar_tangent_y]
family = LAGRANGE
order = FIRST
[]
[mortar_tangent_z]
family = LAGRANGE
order = FIRST
[]
[]
[AuxKernels]
[friction_x_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_x
component = 0
boundary = 'top_bottom'
[]
[friction_y_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_y
component = 1
boundary = 'top_bottom'
[]
[friction_z_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_z
component = 2
boundary = 'top_bottom'
[]
[]
[Mesh]
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 1
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 1
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
uniform_refine = 0
allow_renumbering = false
[]
[Variables]
[mortar_normal_lm]
block = 'secondary_lower'
use_dual = true
[]
[mortar_tangential_lm]
block = 'secondary_lower'
use_dual = true
[]
[mortar_tangential_3d_lm]
block = 'secondary_lower'
use_dual = true
[]
[]
[Modules/TensorMechanics/DynamicMaster]
[all]
add_variables = true
hht_alpha = 0.0
newmark_beta = 0.25
newmark_gamma = 0.5
mass_damping_coefficient = 0.0
stiffness_damping_coefficient = 0.1
displacements = 'disp_x disp_y disp_z'
generate_output = 'stress_xx stress_xy stress_xz stress_yy stress_zz'
block = '1 2'
strain = FINITE
density = density
[]
[]
[Materials]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '1.0'
[]
[tensor]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1.0e4
poissons_ratio = 0.0
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[tensor_1000]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e5
poissons_ratio = 0.0
[]
[stress_1000]
type = ComputeFiniteStrainElasticStress
block = '2'
[]
[]
[UserObjects]
[weighted_vel_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
lm_variable_normal = mortar_normal_lm
lm_variable_tangential_one = mortar_tangential_lm
lm_variable_tangential_two = mortar_tangential_3d_lm
secondary_variable = disp_x
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[friction]
type = ComputeDynamicFrictionalForceLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
friction_lm = mortar_tangential_lm
friction_lm_dir = mortar_tangential_3d_lm
mu = 0.4
c = 1e4
c_t = 1.0e4
newmark_beta = 0.25
newmark_gamma = 0.5
correct_edge_dropping = true
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
weighted_gap_uo = weighted_vel_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
weighted_gap_uo = weighted_vel_uo
[]
[normal_z]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
weighted_gap_uo = weighted_vel_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_z]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_x]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_x
component = x
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_y]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_y
component = y
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_z]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_z
component = z
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
correct_edge_dropping = true
weighted_velocities_uo = weighted_vel_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back'
value = 0.0
[]
[topx]
type = DirichletBC
variable = disp_x
boundary = 'top_top'
value = 0.0
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-${starting_point} * sin(2 * pi / 40 * t) + ${offset}'
[]
[]
[Executioner]
type = Transient
end_time = .025
dt = .025
dtmin = .001
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu NONZERO 1e-14'
nl_rel_tol = 1e-11
nl_abs_tol = 1e-11
line_search = 'basic'
[TimeIntegrator]
type = NewmarkBeta
gamma = 0.5
beta = 0.25
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
csv = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'contact'
[contact]
type = ContactDOFSetSize
variable = mortar_normal_lm
subdomain = 'secondary_lower'
execute_on = 'nonlinear timestep_end'
[]
[]
[VectorPostprocessors]
[contact-pressure]
type = NodalValueSampler
block = secondary_lower
variable = mortar_normal_lm
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[frictional-pressure]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangential_lm
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[frictional-pressure-3d]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangential_3d_lm
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[tangent_x]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangent_x
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[tangent_y]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangent_y
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/transient_fsp.i)
n=64
mu=2e-3
[GlobalParams]
gravity = '0 0 0'
preset = true
supg = false
[]
[Problem]
extra_tag_matrices = 'mass'
previous_nl_solution_required = true
type = NavierStokesProblem
mass_matrix = 'mass'
schur_fs_index = '1'
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = ${n}
ny = ${n}
elem_type = QUAD9
[]
[]
[Variables]
[vel_x]
order = SECOND
family = LAGRANGE
[]
[vel_y]
order = SECOND
family = LAGRANGE
[]
[p]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
# mass
[mass]
type = INSMass
variable = p
u = vel_x
v = vel_y
pressure = p
[]
[x_time]
type = INSMomentumTimeDerivative
variable = vel_x
[]
[x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[]
[x_mass]
type = MassMatrix
variable = vel_x
matrix_tags = 'mass'
[]
[y_time]
type = INSMomentumTimeDerivative
variable = vel_y
[]
[y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[]
[y_mass]
type = MassMatrix
variable = vel_y
matrix_tags = 'mass'
[]
[]
[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
[]
[]
[Materials]
[const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '1 ${mu}'
[]
[]
[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]
[FSP]
type = FSP
topsplit = 'by_diri_others'
[by_diri_others]
splitting = 'diri others'
splitting_type = additive
petsc_options_iname = '-ksp_type'
petsc_options_value = 'preonly'
[]
[diri]
sides = 'left right top bottom'
vars = 'vel_x vel_y'
petsc_options_iname = '-pc_type'
petsc_options_value = 'jacobi'
[]
[others]
splitting = 'u p'
splitting_type = schur
petsc_options_iname = '-pc_fieldsplit_schur_fact_type -pc_fieldsplit_schur_precondition -ksp_gmres_restart -ksp_rtol -ksp_type -ksp_atol'
petsc_options_value = 'full self 300 1e-5 fgmres 1e-9'
unside_by_var_boundary_name = 'left top right bottom left top right bottom'
unside_by_var_var_name = 'vel_x vel_x vel_x vel_x vel_y vel_y vel_y vel_y'
[]
[u]
vars = 'vel_x vel_y'
unside_by_var_boundary_name = 'left top right bottom left top right bottom'
unside_by_var_var_name = 'vel_x vel_x vel_x vel_x vel_y vel_y vel_y vel_y'
# petsc_options = '-ksp_converged_reason'
petsc_options_iname = '-pc_type -ksp_pc_side -ksp_type -ksp_rtol -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre right gmres 1e-2 boomeramg 300'
[]
[p]
vars = 'p'
petsc_options = '-pc_lsc_scale_diag -ksp_converged_reason'# -lsc_ksp_converged_reason -lsc_ksp_monitor_true_residual
petsc_options_iname = '-ksp_type -ksp_gmres_restart -ksp_rtol -pc_type -ksp_pc_side -lsc_pc_type -lsc_pc_hypre_type -lsc_ksp_type -lsc_ksp_rtol -lsc_ksp_pc_side -lsc_ksp_gmres_restart'
petsc_options_value = 'fgmres 300 1e-2 lsc right hypre boomeramg gmres 1e-1 right 300'
[]
[]
[]
[Postprocessors]
[pavg]
type = ElementAverageValue
variable = p
[]
[]
[UserObjects]
[set_pressure]
type = NSPressurePin
pin_type = 'average'
variable = p
pressure_average = 'pavg'
[]
[]
[Executioner]
solve_type = NEWTON
type = Transient
petsc_options_iname = '-snes_max_it'
petsc_options_value = '100'
line_search = 'none'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
abort_on_solve_fail = true
normalize_solution_diff_norm_by_dt = false
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 6
dt = 1e-2
[]
steady_state_detection = true
[]
[Outputs]
[exo]
type = Exodus
execute_on = 'final'
hide = 'pavg'
[]
[]
(modules/xfem/test/tests/switching_material/one_cut_moving.i)
[Problem]
solve = false
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[cut]
type = LevelSetCutUserObject
level_set_var = phi
negative_id = 1
positive_id = 33
heal_always = true
[]
[]
[Mesh]
[square]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
[]
[]
[AuxVariables]
[phi]
[]
[cut_id]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[phi]
type = FunctionAux
variable = phi
function = 'x-0.213-t'
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[cut_id]
type = CutSubdomainIDAux
variable = cut_id
cut = cut
[]
[]
[Materials]
[diffusivity_A]
type = GenericConstantMaterial
prop_names = 'A_D'
prop_values = '5'
[]
[diffusivity_B]
type = GenericConstantMaterial
prop_names = 'B_D'
prop_values = '0.5'
[]
[diff_combined]
type = XFEMCutSwitchingMaterialReal
cut_subdomain_ids = '1 33'
base_names = 'A B'
prop_name = D
geometric_cut_userobject = cut
outputs = 'exodus'
output_properties = 'D'
[]
[]
[Executioner]
type = Transient
dt = 0.25
num_steps = 2
max_xfem_update = 1
[]
[Outputs]
exodus = true
[]
(modules/optimization/test/tests/executioners/constrained/inequality/forward_and_adjoint.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 20
xmax = 1
ymax = 1
[]
[]
[Problem]
nl_sys_names = 'nl0 adjoint'
kernel_coverage_check = false
[]
[Variables]
[temperature]
[]
[temperature_adjoint]
nl_sys = adjoint
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = thermal_conductivity
[]
[]
[BCs]
[left]
type = FunctionNeumannBC
variable = temperature
boundary = left
function = left_function
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 200
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 100
[]
[]
[Functions]
[left_function]
type = ParsedOptimizationFunction
expression = 'a + b*y'
param_symbol_names = 'a b'
param_vector_name = 'params/left'
[]
[dc_db]
type = ParsedFunction
expression = 'y'
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = SteadyAndAdjoint
forward_system = nl0
adjoint_system = adjoint
line_search = none
nl_rel_tol = 1e-12
l_tol = 1e-12
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = temperature_adjoint
x_coord_name = measure_data/measurement_xcoord
y_coord_name = measure_data/measurement_ycoord
z_coord_name = measure_data/measurement_zcoord
value_name = measure_data/misfit_values
[]
[]
[VectorPostprocessors]
[grad_bc_left]
type = SideOptimizationNeumannFunctionInnerProduct
variable = temperature_adjoint
function = left_function
boundary = left
execute_on = ADJOINT_TIMESTEP_END
[]
[]
[Postprocessors]
[sum]
type = FunctionSideIntegral
boundary = left
function = left_function
[]
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
[]
[params]
type = ConstantReporter
real_vector_names = 'left'
real_vector_values = '0 0' # Dummy
execute_on = NONE
[]
[]
[Outputs]
console = false
exodus = false
json = true
[]
#---------Inequality constraints------------#
[VectorPostprocessors]
[gradient_c]
type = VectorOfPostprocessors
postprocessors = 'dc_da dc_db'
[]
[ineq]
type = VectorOfPostprocessors
postprocessors = 'constraint'
[]
[]
[Postprocessors]
[constraint]
type = ParsedPostprocessor
function = '150 - sum' # 150 is the constraint we want to satisfy
pp_names = sum
[]
[dc_da]
type = FunctionSideIntegral
boundary = left
function = -1
[]
[dc_db]
type = FunctionSideIntegral
boundary = left
function = '-y'
[]
[]
(modules/heat_transfer/test/tests/thin_layer_heat_transfer/transient_3d.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
nx = 10
ny = 10
nz = 2
zmax = 0.2
dim = 3
[]
[block1]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '0.5 1 0.2'
input = gen
[]
[block2]
type = SubdomainBoundingBoxGenerator
block_id = 2
bottom_left = '0.5 0 0'
top_right = '1 1 0.2'
input = block1
[]
[breakmesh]
input = block2
type = BreakMeshByBlockGenerator
block_pairs = '1 2'
split_interface = true
add_interface_on_two_sides = true
[]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[time]
type = HeatConductionTimeDerivative
variable = temperature
[]
[thermal_cond]
type = HeatConduction
variable = temperature
[]
[]
[InterfaceKernels]
[thin_layer]
type = ThinLayerHeatTransfer
thermal_conductivity = thermal_conductivity_layer
specific_heat = specific_heat_layer
density = density_layer
heat_source = heat_source_layer
thickness = 0.01
variable = temperature
neighbor_var = temperature
boundary = Block1_Block2
[]
[]
[BCs]
[left_temp]
type = DirichletBC
value = 0
variable = temperature
boundary = left
[]
[right_temp]
type = DirichletBC
value = 0
variable = temperature
boundary = right
[]
[]
[Materials]
[thermal_cond]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1 1 1'
[]
[thermal_cond_layer]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity_layer specific_heat_layer heat_source_layer density_layer'
prop_values = '0.05 1 10000 1'
boundary = Block1_Block2
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
dt = 0.05
num_steps = 2
[]
[Outputs]
print_linear_residuals = false
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/coupled-force/gravity-through-coupled-force-action.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[]
[Variables]
[u]
family = LAGRANGE_VEC
[]
[]
[AuxVariables]
[gravity]
family = LAGRANGE_VEC
[]
[]
[ICs]
[gravity]
type = VectorConstantIC
x_value = '0'
y_value = '-9.81'
variable = gravity
[]
[]
[Modules]
[IncompressibleNavierStokes]
equation_type = steady-state
velocity_boundary = 'bottom right top left'
velocity_function = '0 0 0 0 0 0 0 0'
add_standard_velocity_variables_for_ad = false
pressure_pinned_node = 0
density_name = rho
dynamic_viscosity_name = mu
use_ad = true
laplace = true
family = LAGRANGE
order = FIRST
supg = true
pspg = true
has_coupled_force = true
[]
[]
[Kernels]
[u_diff]
type = VectorDiffusion
variable = u
[]
[]
[BCs]
[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'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[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'
[]
[]
(modules/thermal_hydraulics/test/tests/materials/ad_material_function_product/ad_material_function_product.i)
# Gold value should be the following:
# product = scale * func
# = 0.5 * 100
# = 50
[GlobalParams]
execute_on = 'initial'
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[Functions]
[func]
type = ConstantFunction
value = 100
[]
[]
[Materials]
[scale_mat]
type = ADGenericConstantMaterial
prop_names = 'scale'
prop_values = '0.5'
[]
[product_mat]
type = ADMaterialFunctionProductMaterial
mat_prop_product = product
mat_prop_scale = scale
function = func
[]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[Postprocessors]
[product_pp]
type = ADElementAverageMaterialProperty
mat_prop = product
[]
[]
[Outputs]
csv = true
[]
(modules/porous_flow/examples/tidal/atm_tides.i)
# A 10m x 10m "column" 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
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 10
xmin = 0
xmax = 10
ymin = 0
ymax = 10
zmin = -100
zmax = 0
[]
[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' # 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)'
[]
[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
[]
[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-12 0 0 0 1E-12 0 0 0 1E-14'
[]
[density]
type = GenericConstantMaterial
prop_names = density
prop_values = 2500.0
[]
[]
[Postprocessors]
[p0]
type = PointValue
outputs = csv
point = '0 0 0'
variable = porepressure
[]
[uz0]
type = PointValue
outputs = csv
point = '0 0 0'
variable = disp_z
[]
[p100]
type = PointValue
outputs = csv
point = '0 0 -100'
variable = porepressure
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
start_time = -3600 # so postprocessors get recorded correctly at t=0
dt = 3600
end_time = 360000
nl_abs_tol = 5E-7
nl_rel_tol = 1E-10
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/dynamics/prescribed_displacement/3D_QStatic_1_Ramped_Displacement.i)
# One 3D element under ramped displacement loading.
#
# loading:
# time : 0.0 0.1 0.2 0.3
# disp : 0.0 0.0 -0.01 -0.01
# This displacement loading is applied using the PresetDisplacement boundary condition.
# Here, the given displacement time history is converted to an acceleration
# time history using Backward Euler time differentiation. Then, the resulting
# acceleration is integrated using Newmark time integration to obtain a
# displacement time history which is then applied to the boundary.
# This is done because if the displacement is applied using Dirichlet BC, the
# resulting acceleration is very noisy.
# Boundaries:
# x = 0 left
# x = 1 right
# y = 0 bottom
# y = 1 top
# z = 0 back
# z = 1 front
# Result: The displacement at the top node in the z direction should match
# the prescribed displacement. Also, the z acceleration should
# be two triangular pulses, one peaking at 0.1 and another peaking at
# 0.2.
[Mesh]
type = GeneratedMesh
dim = 3 # Dimension of the mesh
nx = 1 # Number of elements in the x direction
ny = 1 # Number of elements in the y direction
nz = 1 # Number of elements in the z direction
xmin = 0.0
xmax = 1
ymin = 0.0
ymax = 1
zmin = 0.0
zmax = 1
allow_renumbering = false # So NodalVariableValue can index by id
[]
[Variables] # variables that are solved
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[AuxVariables] # variables that are calculated for output
[./accel_x]
[../]
[./vel_x]
[../]
[./accel_y]
[../]
[./vel_y]
[../]
[./accel_z]
[../]
[./vel_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_zz]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./DynamicSolidMechanics] # zeta*K*vel + K * disp
displacements = 'disp_x disp_y disp_z'
stiffness_damping_coefficient = 0.000025
[../]
[./inertia_x] # M*accel + eta*M*vel
type = InertialForce
variable = disp_x
velocity = vel_x
acceleration = accel_x
beta = 0.25 # Newmark time integration
gamma = 0.5 # Newmark time integration
eta = 19.63
[../]
[./inertia_y]
type = InertialForce
variable = disp_y
velocity = vel_y
acceleration = accel_y
beta = 0.25
gamma = 0.5
eta = 19.63
[../]
[./inertia_z]
type = InertialForce
variable = disp_z
velocity = vel_z
acceleration = accel_z
beta = 0.25
gamma = 0.5
eta = 19.63
[../]
[]
[AuxKernels]
[./accel_x] # Calculates and stores acceleration at the end of time step
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = timestep_end
[../]
[./vel_x] # Calculates and stores velocity at the end of the time step
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = timestep_end
[../]
[./accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = timestep_end
[../]
[./vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = timestep_end
[../]
[./accel_z]
type = NewmarkAccelAux
variable = accel_z
displacement = disp_z
velocity = vel_z
beta = 0.25
execute_on = timestep_end
[../]
[./vel_z]
type = NewmarkVelAux
variable = vel_z
acceleration = accel_z
gamma = 0.5
execute_on = timestep_end
[../]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./strain_xx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xx
index_i = 0
index_j = 0
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yy
index_i = 1
index_j = 1
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./strain_zz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_zz
index_i = 2
index_j = 2
[../]
[]
[Functions]
[./displacement_front]
type = PiecewiseLinear
data_file = 'displacement.csv'
format = columns
[../]
[]
[BCs]
[./Preset_displacement]
type = PresetDisplacement
variable = disp_z
function = displacement_front
boundary = front
beta = 0.25
velocity = vel_z
acceleration = accel_z
[../]
[./anchor_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./anchor_y]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./anchor_z]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
youngs_modulus = 325e6 #Pa
poissons_ratio = 0.3
type = ComputeIsotropicElasticityTensor
block = 0
[../]
[./strain]
#Computes the strain, assuming small strains
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[../]
[./stress]
#Computes the stress, using linear elasticity
type = ComputeLinearElasticStress
block = 0
[../]
[./density]
type = GenericConstantMaterial
block = 0
prop_names = density
prop_values = 2000 #kg/m3
[../]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 3.0
l_tol = 1e-6
nl_rel_tol = 1e-6
nl_abs_tol = 1e-6
dt = 0.1
timestep_tolerance = 1e-6
[]
[Postprocessors] # These quantites are printed to a csv file at every time step
[./_dt]
type = TimestepSize
[../]
[./accel_6x]
type = NodalVariableValue
nodeid = 6
variable = accel_x
[../]
[./accel_6y]
type = NodalVariableValue
nodeid = 6
variable = accel_y
[../]
[./accel_6z]
type = NodalVariableValue
nodeid = 6
variable = accel_z
[../]
[./vel_6x]
type = NodalVariableValue
nodeid = 6
variable = vel_x
[../]
[./vel_6y]
type = NodalVariableValue
nodeid = 6
variable = vel_y
[../]
[./vel_6z]
type = NodalVariableValue
nodeid = 6
variable = vel_z
[../]
[./disp_6x]
type = NodalVariableValue
nodeid = 6
variable = disp_x
[../]
[./disp_6y]
type = NodalVariableValue
nodeid = 6
variable = disp_y
[../]
[./disp_6z]
type = NodalVariableValue
nodeid = 6
variable = disp_z
[../]
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/functional_expansion_tools/examples/3D_volumetric_Cartesian_different_submesh/main.i)
# Derived from the example '3D_volumetric_Cartesian' with the following differences:
#
# 1) The number of x and y divisions in the sub app is not the same as the master app
# 2) The subapp mesh is skewed in x and z
[Mesh]
type = GeneratedMesh
dim = 3
xmin = 0.0
xmax = 10.0
nx = 15
ymin = 1.0
ymax = 11.0
ny = 25
zmin = 2.0
zmax = 12.0
nz = 35
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./s_in] # Add in the contribution from the SubApp
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[Materials]
[./Unobtanium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'top bottom left right front back'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3 4 5'
physical_bounds = '0.0 10.0 1.0 11.0 2.0 12.0'
x = Legendre
y = Legendre
z = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_single_material_insulated.i)
## Units in the input file: m-Pa-s-K-V
# In this steady-state, symmetric simulation, the temperature at the interface between
# the two blocks of aluminum can be calculated through Fourier's law (see the documentation
# page for ADInterfaceJouleHeatingConstraint for the relevant formulas).
#
# With the prescribed 0.0 V (left) and 0.3V (right) potential boundary conditions, the
# electric potential drop is 9.25e6 [V * S / m^2]. From this current-density-like LM variable,
# the volumetric heat source at the interface is calculated as
# q = 1.15625e6 [W/m^3}
# Because of the 2D nature of this problem, the volumetric heat source is equal to
# the negative of the heat flux at the interface.
#
# Finally, the temperature at the interface is computed as a function of the block width,
# thermal conductivity, and specified temperature boundary condition (300K on both the
# left and right edges):
# T_{interface} = 850.5952K
# which matches the simulation result to the 6 decimal places shown.
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmax = 0.1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmin = 0.1
xmax = 0.2
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
[interface_secondary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'fixed_block_left'
new_block_id = 3
new_block_name = 'interface_secondary_subdomain'
input = block_rename
[]
[interface_primary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'moving_block_right'
new_block_id = 4
new_block_name = 'interface_primary_subdomain'
input = interface_secondary_subdomain
[]
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
[]
[Variables]
[temperature]
initial_condition = 300.0
[]
[potential]
[]
[potential_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[AuxVariables]
[interface_normal_lm]
order = FIRST
family = LAGRANGE
block = 'interface_secondary_subdomain'
initial_condition = 1.0
[]
[]
[Kernels]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
extra_vector_tags = 'ref'
block = 'left_block right_block'
[]
[electric_aluminum]
type = ADMatDiffusion
variable = potential
diffusivity = aluminum_electrical_conductivity
extra_vector_tags = 'ref'
block = 'left_block right_block'
[]
[]
[BCs]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'fixed_block_right'
[]
[electric_left]
type = ADDirichletBC
variable = potential
value = 0.0
boundary = moving_block_left
[]
[electric_right]
type = ADDirichletBC
variable = potential
value = 3.0e-1
boundary = fixed_block_right
[]
[]
[Constraints]
[electrical_contact]
type = ModularGapConductanceConstraint
variable = potential_interface_lm
secondary_variable = potential
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_electric'
[]
[interface_heating]
type = ADInterfaceJouleHeatingConstraint
potential_lagrange_multiplier = potential_interface_lm
secondary_variable = temperature
primary_electrical_conductivity = aluminum_electrical_conductivity
secondary_electrical_conductivity = aluminum_electrical_conductivity
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
[]
[]
[Materials]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_electrical_conductivity aluminum_hardness'
prop_values = ' 2.7e3 210 900.0 3.7e7 1.0' #for 99% pure Al
block = 'left_block right_block interface_secondary_subdomain'
[]
[]
[UserObjects]
[closed_electric]
type = GapFluxModelPressureDependentConduction
primary_conductivity = aluminum_electrical_conductivity
secondary_conductivity = aluminum_electrical_conductivity
temperature = potential
contact_pressure = interface_normal_lm
primary_hardness = aluminum_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[]
[Postprocessors]
[aluminum_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_secondary_subdomain
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[aluminum_interface_potential]
type = AverageNodalVariableValue
variable = potential
block = interface_secondary_subdomain
[]
[interface_electrical_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = potential
boundary = fixed_block_left
diffusivity = aluminum_electrical_conductivity
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
nl_abs_tol = 2e-10
nl_rel_tol = 1e-6
nl_max_its = 50
nl_forced_its = 1
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/solid_mechanics/test/tests/shell/dynamics/shell_dynamics_bending_moment.i)
# Test that models bending of a cantilever beam using shell elements
# A cantilever beam of length 10 m (in Y direction) and cross-section
# 1 m x 0.1 m is modeled using 4 shell elements placed along the length
# (Figure 6a from Dvorkin and Bathe, 1984). All displacements and
# X rotations are fixed on the bottom boundary. E = 2100000 and v = 0.0.
# A load of 0.5 N (in the Z direction) is applied at each node on the top
# boundary resulting in a total load of 1 N.
# The analytical solution for displacement at tip using small strain/rotations # is PL^3/3EI + PL/AG = 1.90485714 m
# The FEM solution using 4 shell elements is 1.875095 m with a relative error
# of 1.5%.
# Similarly, the analytical solution for slope at tip is PL^2/2EI = 0.285714286
# The FEM solution is 0.2857143 and the relative error is 5e-6%.
# The stress_yy for the four elements at z = -0.57735 * (t/2) (first qp below mid-surface of shell) are:
# 3031.089 Pa, 2165.064 Pa, 1299.038 Pa and 433.0127 Pa.
# Note the above values are the average stresses in each element.
# Analytically, stress_yy decreases linearly from y = 0 to y = 10 m.
# The maximum value of stress_yy at y = 0 is Mz/I = PL * 0.57735*(t/2)/I = 3464.1 Pa
# Therefore, the analytical value of stress at z = -0.57735 * (t/2) at the mid-point
# of the four elements are:
# 3031.0875 Pa, 2165.0625 Pa, 1299.0375 Pa ,433.0125 Pa
# The relative error in stress_yy is in the order of 5e-5%.
# The stress_yz at z = -0.57735 * (t/2) at all four elements from the simulation is 10 Pa.
# The analytical solution for the shear stress is: V/2/I *((t^2)/4 - z^2), where the shear force (V)
# is 1 N at any y along the length of the beam. Therefore, the analytical shear stress at
# z = -0.57735 * (t/2) is 10 Pa at any location along the length of the beam.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 4
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 10.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
[../]
[]
[AuxVariables]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
# aux variables for dynamics
[./vel_x]
order = FIRST
family = LAGRANGE
[../]
[./vel_y]
order = FIRST
family = LAGRANGE
[../]
[./vel_z]
order = FIRST
family = LAGRANGE
[../]
[./accel_x]
order = FIRST
family = LAGRANGE
[../]
[./accel_y]
order = FIRST
family = LAGRANGE
[../]
[./accel_z]
order = FIRST
family = LAGRANGE
[../]
[./rot_vel_x]
order = FIRST
family = LAGRANGE
[../]
[./rot_vel_y]
order = FIRST
family = LAGRANGE
[../]
[./rot_accel_x]
order = FIRST
family = LAGRANGE
[../]
[./rot_accel_y]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./stress_yy]
type = RankTwoAux
variable = stress_yy
rank_two_tensor = global_stress_t_points_0
index_i = 1
index_j = 1
[../]
[./stress_yz]
type = RankTwoAux
variable = stress_yz
rank_two_tensor = global_stress_t_points_0
index_i = 1
index_j = 2
[../]
# Kernels for dynamics
[./accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = timestep_end
[../]
[./vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = timestep_end
[../]
[./accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = timestep_end
[../]
[./vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = timestep_end
[../]
[./accel_z]
type = NewmarkAccelAux
variable = accel_z
displacement = disp_z
velocity = vel_z
beta = 0.25
execute_on = timestep_end
[../]
[./vel_z]
type = NewmarkVelAux
variable = vel_z
acceleration = accel_z
gamma = 0.5
execute_on = timestep_end
[../]
[./rot_accel_x]
type = NewmarkAccelAux
variable = rot_accel_x
displacement = rot_x
velocity = rot_vel_x
beta = 0.25
execute_on = timestep_end
[../]
[./rot_vel_x]
type = NewmarkVelAux
variable = rot_vel_x
acceleration = rot_accel_x
gamma = 0.5
execute_on = timestep_end
[../]
[./rot_accel_y]
type = NewmarkAccelAux
variable = rot_accel_y
displacement = rot_y
velocity = rot_vel_y
beta = 0.25
execute_on = timestep_end
[../]
[./rot_vel_y]
type = NewmarkVelAux
variable = rot_vel_y
acceleration = rot_accel_y
gamma = 0.5
execute_on = timestep_end
[../]
[]
[BCs]
[./fixy1]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0.0
[../]
[./fixz1]
type = DirichletBC
variable = disp_z
boundary = 'bottom'
value = 0.0
[../]
[./fixr1]
type = DirichletBC
variable = rot_x
boundary = 'bottom'
value = 0.0
[../]
[./fixr2]
type = DirichletBC
variable = rot_y
boundary = 'bottom'
value = 0.0
[../]
[./fixx1]
type = DirichletBC
variable = disp_x
boundary = 'bottom'
value = 0.0
[../]
[]
[Functions]
[./force_function]
type = PiecewiseLinear
x = '0.0 1.0'
y = '0.0 0.5'
[../]
[]
[NodalKernels]
[./force_y2]
type = UserForcingFunctionNodalKernel
variable = disp_z
boundary = 'top'
function = force_function
[../]
[]
[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
[../]
[./inertial_force_x]
type = ADInertialForceShell
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y'
rotational_accelerations = 'rot_accel_x rot_accel_y'
component = 0
variable = disp_x
thickness = 0.1
[../]
[./inertial_force_y]
type = ADInertialForceShell
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y'
rotational_accelerations = 'rot_accel_x rot_accel_y'
component = 1
variable = disp_y
thickness = 0.1
[../]
[./inertial_force_z]
type = ADInertialForceShell
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y'
rotational_accelerations = 'rot_accel_x rot_accel_y'
component = 2
variable = disp_z
thickness = 0.1
[../]
[./inertial_force_rot_x]
type = ADInertialForceShell
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y'
rotational_accelerations = 'rot_accel_x rot_accel_y'
component = 3
variable = rot_x
thickness = 0.1
[../]
[./inertial_force_rot_y]
type = ADInertialForceShell
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y'
rotational_accelerations = 'rot_accel_x rot_accel_y'
component = 4
variable = rot_y
thickness = 0.1
[../]
[]
[Materials]
[./elasticity]
type = ADComputeIsotropicElasticityTensorShell
youngs_modulus = 2100000
poissons_ratio = 0.0
block = 0
through_thickness_order = SECOND
[../]
[./strain]
type = ADComputeIncrementalShellStrain
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y'
thickness = 0.1
through_thickness_order = SECOND
[../]
[./stress]
type = ADComputeShellStress
block = 0
through_thickness_order = SECOND
[../]
[./density]
type = GenericConstantMaterial
block = 0
prop_names = 'density'
prop_values = '1.0'
[../]
[]
[Postprocessors]
[./disp_z_tip]
type = PointValue
point = '1.0 10.0 0.0'
variable = disp_z
[../]
[./rot_x_tip]
type = PointValue
point = '0.0 10.0 0.0'
variable = rot_x
[../]
[./stress_yy_el_0]
type = ElementalVariableValue
elementid = 0
variable = stress_yy
[../]
[./stress_yy_el_1]
type = ElementalVariableValue
elementid = 1
variable = stress_yy
[../]
[./stress_yy_el_2]
type = ElementalVariableValue
elementid = 2
variable = stress_yy
[../]
[./stress_yy_el_3]
type = ElementalVariableValue
elementid = 3
variable = stress_yy
[../]
[./stress_yz_el_0]
type = ElementalVariableValue
elementid = 0
variable = stress_yz
[../]
[./stress_yz_el_1]
type = ElementalVariableValue
elementid = 1
variable = stress_yz
[../]
[./stress_yz_el_2]
type = ElementalVariableValue
elementid = 2
variable = stress_yz
[../]
[./stress_yz_el_3]
type = ElementalVariableValue
elementid = 3
variable = stress_yz
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_max_its = 2
nl_rel_tol = 1e-10
nl_abs_tol = 5e-8
dt = 0.0005
dtmin = 0.0005
end_time = 1
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Outputs]
csv = 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/scalar_adr/supg/2d_advection_error_testing.i)
ax=1
ay=1
[GlobalParams]
u = ${ax}
v = ${ay}
pressure = 0
tau_type = mod
transient_term = true
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmax = 1
ymax = 1
elem_type = QUAD9
[]
[Variables]
[./c]
family = LAGRANGE
order = SECOND
[../]
[]
[Kernels]
[./adv]
type = AdvectionSUPG
variable = c
forcing_func = 'ffn'
[../]
[]
[BCs]
[./all]
type = FunctionDirichletBC
variable = c
boundary = 'left right top bottom'
function = 'c_func'
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'mu rho'
prop_values = '0 1'
[../]
[]
[Functions]
[./ffn]
type = ParsedFunction
expression = '${ax}*(0.14*pi*y*cos(0.2*pi*x*y) + 0.2*pi*cos(0.5*pi*x)) + ${ay}*(0.14*pi*x*cos(0.2*pi*x*y) + 0.4*pi*cos(pi*y))'
[../]
[./c_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'
[../]
[./cx_func]
type = ParsedFunction
expression = '0.14*pi*y*cos(0.2*pi*x*y) + 0.2*pi*cos(0.5*pi*x)'
[../]
[]
# [Executioner]
# type = Steady
# petsc_options_iname = '-pc_type -pc_factor_shift_type'
# petsc_options_value = 'lu NONZERO'
# []
[Executioner]
type = Transient
num_steps = 10
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
[./TimeStepper]
dt = .05
type = IterationAdaptiveDT
cutback_factor = 0.4
growth_factor = 1.2
optimal_iterations = 20
[../]
[]
[Outputs]
[./exodus]
type = Exodus
[../]
[./csv]
type = CSV
[../]
[]
[Postprocessors]
[./L2c]
type = ElementL2Error
variable = c
function = c_func
outputs = 'console' execute_on = 'timestep_end'
[../]
[./L2cx]
type = ElementL2Error
variable = cx
function = cx_func
outputs = 'console' execute_on = 'timestep_end'
[../]
[]
[AuxVariables]
[./cx]
family = MONOMIAL
order = FIRST
[../]
[]
[AuxKernels]
[./cx_aux]
type = VariableGradientComponent
component = x
variable = cx
gradient_variable = c
[../]
[]
(modules/phase_field/examples/anisotropic_interfaces/GrandPotentialSolidification.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 28
ny = 28
xmin = -7
xmax = 7
ymin = -7
ymax = 7
uniform_refine = 2
[]
[GlobalParams]
radius = 0.2
int_width = 0.1
x1 = 0.0
y1 = 0.0
derivative_order = 2
[]
[Variables]
[./w]
[../]
[./etaa0]
[../]
[./etab0]
[../]
[./T]
[../]
[]
[AuxVariables]
[./bnds]
[../]
[]
[AuxKernels]
[./bnds]
type = BndsCalcAux
variable = bnds
v = 'etaa0 etab0'
[../]
[]
[ICs]
[./w]
type = SmoothCircleIC
variable = w
# note w = A*(c-cleq), A = 1.0, cleq = 0.0 ,i.e., w = c (in the matrix/liquid phase)
outvalue = -4.0
invalue = 0.0
[../]
[./etaa0]
type = SmoothCircleIC
variable = etaa0
#Solid phase
outvalue = 0.0
invalue = 1.0
[../]
[./etab0]
type = SmoothCircleIC
variable = etab0
#Liquid phase
outvalue = 1.0
invalue = 0.0
[../]
[]
[Kernels]
# Order parameter eta_alpha0
[./ACa0_bulk]
type = ACGrGrMulti
variable = etaa0
v = 'etab0'
gamma_names = 'gab'
[../]
[./ACa0_sw]
type = ACSwitching
variable = etaa0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etab0 w T'
[../]
[./ACa0_int1]
type = ACInterface2DMultiPhase1
variable = etaa0
etas = 'etab0'
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
d2kappadgrad_etaa_name = d2kappadgrad_etaa
[../]
[./ACa0_int2]
type = ACInterface2DMultiPhase2
variable = etaa0
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
[../]
[./ea0_dot]
type = TimeDerivative
variable = etaa0
[../]
# Order parameter eta_beta0
[./ACb0_bulk]
type = ACGrGrMulti
variable = etab0
v = 'etaa0'
gamma_names = 'gab'
[../]
[./ACb0_sw]
type = ACSwitching
variable = etab0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etaa0 w T'
[../]
[./ACb0_int1]
type = ACInterface2DMultiPhase1
variable = etab0
etas = 'etaa0'
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
d2kappadgrad_etaa_name = d2kappadgrad_etab
[../]
[./ACb0_int2]
type = ACInterface2DMultiPhase2
variable = etab0
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
[../]
[./eb0_dot]
type = TimeDerivative
variable = etab0
[../]
#Chemical potential
[./w_dot]
type = SusceptibilityTimeDerivative
variable = w
f_name = chi
[../]
[./Diffusion]
type = MatDiffusion
variable = w
diffusivity = Dchi
[../]
[./coupled_etaa0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etaa0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0'
[../]
[./coupled_etab0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etab0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0'
[../]
[./T_dot]
type = TimeDerivative
variable = T
[../]
[./CoefDiffusion]
type = Diffusion
variable = T
[../]
[./etaa0_dot_T]
type = CoefCoupledTimeDerivative
variable = T
v = etaa0
coef = -5.0
[../]
[]
[Materials]
[./ha]
type = SwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'etaa0 etab0'
phase_etas = 'etaa0'
[../]
[./hb]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etaa0 etab0'
phase_etas = 'etab0'
[../]
[./omegaa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegaa
material_property_names = 'Vm ka caeq'
expression = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
[../]
[./omegab]
type = DerivativeParsedMaterial
coupled_variables = 'w T'
property_name = omegab
material_property_names = 'Vm kb cbeq S Tm'
expression = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq-S*(T-Tm)'
[../]
[./rhoa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhoa
material_property_names = 'Vm ka caeq'
expression = 'w/Vm^2/ka + caeq/Vm'
[../]
[./rhob]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhob
material_property_names = 'Vm kb cbeq'
expression = 'w/Vm^2/kb + cbeq/Vm'
[../]
[./kappaa]
type = InterfaceOrientationMultiphaseMaterial
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
d2kappadgrad_etaa_name = d2kappadgrad_etaa
etaa = etaa0
etab = etab0
anisotropy_strength = 0.05
kappa_bar = 0.05
outputs = exodus
output_properties = 'kappaa'
[../]
[./kappab]
type = InterfaceOrientationMultiphaseMaterial
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
d2kappadgrad_etaa_name = d2kappadgrad_etab
etaa = etab0
etab = etaa0
anisotropy_strength = 0.05
kappa_bar = 0.05
outputs = exodus
output_properties = 'kappab'
[../]
[./const]
type = GenericConstantMaterial
prop_names = 'L D chi Vm ka caeq kb cbeq gab mu S Tm'
prop_values = '33.33 1.0 0.1 1.0 10.0 0.1 10.0 0.9 4.5 10.0 1.0 5.0'
[../]
[./Mobility]
type = ParsedMaterial
property_name = Dchi
material_property_names = 'D chi'
expression = 'D*chi'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_tol = 1.0e-3
l_max_its = 30
nl_max_its = 15
nl_rel_tol = 1.0e-8
nl_abs_tol = 1e-10
end_time = 2.0
dtmax = 0.05
[./TimeStepper]
type = IterationAdaptiveDT
dt = 0.0005
cutback_factor = 0.7
growth_factor = 1.2
[../]
[]
[Adaptivity]
initial_steps = 5
max_h_level = 3
initial_marker = err_eta
marker = err_bnds
[./Markers]
[./err_eta]
type = ErrorFractionMarker
coarsen = 0.3
refine = 0.95
indicator = ind_eta
[../]
[./err_bnds]
type = ErrorFractionMarker
coarsen = 0.3
refine = 0.95
indicator = ind_bnds
[../]
[../]
[./Indicators]
[./ind_eta]
type = GradientJumpIndicator
variable = etaa0
[../]
[./ind_bnds]
type = GradientJumpIndicator
variable = bnds
[../]
[../]
[]
[Outputs]
time_step_interval = 5
exodus = true
[]
(test/tests/dgkernels/2d_diffusion_dg/dg_stateful.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[./InitialCondition]
type = ConstantIC
value = 1
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = 2*pow(e,-x-(y*y))*(1-2*y*y)
[../]
[./exact_fn]
type = ParsedGradFunction
expression = pow(e,-x-(y*y))
grad_x = -pow(e,-x-(y*y))
grad_y = -2*y*pow(e,-x-(y*y))
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./abs]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[DGKernels]
[./dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
[../]
[]
[BCs]
[./all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
epsilon = -1
sigma = 6
[../]
[]
[Materials]
[./stateful]
type = StatefulMaterial
initial_diffusivity = 1
boundary = 'left'
[../]
[./general]
type = GenericConstantMaterial
block = '0'
prop_names = 'dummy'
prop_values = '1'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-10
[]
(modules/solid_mechanics/test/tests/dynamics/linear_constraint/disp_mid.i)
# Constraining secondary nodes to move a linear combination of primary nodes
#
# The test consists of a 2D rectangular block divided into two Quad elements
# (along its height) which have different material properties.
# A displacement of 2 m is applied to the top surface of the block in x direction and the
# bottom surface is held fixed.
# The nodes of the interface between the two elements will tend to move as
# dictated by the material models of the two elements.
# LinearNodalConstraint forces the interface nodes to move as a linear combination
# of the nodes on the top and bottom of the block.
# primary node ids and the corresponding weights are taken as input by the LinearNodalConstraint
# along with the secondary node set or secondary node ids.
# The constraint can be applied using either penalty or kinematic formulation.
# In this example, the final x displacement of the top surface is 2m and bottom surface is 0m.
# Therefore, the final x displacement of the interface nodes would be 0.25*top+0.75*bottom = 0.5m
[Mesh]
file=rect_mid.e
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y'
[../]
[]
[BCs]
[./top_2x]
type = DirichletBC
variable = disp_x
boundary = 10
value = 2.0
[../]
[./top_2y]
type = DirichletBC
variable = disp_y
boundary = 10
value = 0.0
[../]
[./bottom_1]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[../]
[./bottom_2]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[]
[Materials]
[./Elasticity_tensor_1]
type = ComputeElasticityTensor
block = 1
fill_method = 'symmetric_isotropic'
C_ijkl = '400. 200.'
[../]
[./strain_1]
type = ComputeSmallStrain
block = 1
displacements = 'disp_x disp_y'
[../]
[./stress_1]
type = ComputeLinearElasticStress
block = 1
[../]
[./density_1]
type = GenericConstantMaterial
block = 1
prop_names = 'density'
prop_values = '10.'
[../]
[./Elasticity_tensor_2]
type = ComputeElasticityTensor
block = 2
fill_method = 'symmetric_isotropic'
C_ijkl = '1000. 500.'
[../]
[./strain_2]
type = ComputeSmallStrain
block = 2
displacements = 'disp_x disp_y'
[../]
[./stress_2]
type = ComputeLinearElasticStress
block = 2
[../]
[./density_2]
type = GenericConstantMaterial
block = 2
prop_names = 'density'
prop_values = '10.'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = ''
petsc_options_value = ''
line_search = 'none'
[]
[Constraints]
[./disp_x_1]
type = LinearNodalConstraint
variable = disp_x
primary = '0 5'
weights = '0.25 0.75'
# secondary_node_set = '2'
secondary_node_ids = '2 3'
penalty = 1e8
formulation = kinematic
[../]
[./disp_y_1]
type = LinearNodalConstraint
variable = disp_y
primary = '0 5'
weights = '0.25 0.75'
# secondary_node_set = '2'
secondary_node_ids = '2 3'
penalty = 1e8
formulation = kinematic
[../]
[]
[Postprocessors]
[./_dt]
type = TimestepSize
[../]
[./disp_1]
type = NodalVariableValue
nodeid = 0
variable = disp_x
[../]
[./disp_2]
type = NodalVariableValue
nodeid = 1
variable = disp_x
[../]
[./disp_3]
type = NodalVariableValue
nodeid = 2
variable = disp_x
[../]
[./disp_4]
type = NodalVariableValue
nodeid = 3
variable = disp_x
[../]
[./disp_5]
type = NodalVariableValue
nodeid = 4
variable = disp_x
[../]
[./disp_6]
type = NodalVariableValue
nodeid = 5
variable = disp_x
[../]
[]
[Outputs]
exodus = true
print_linear_residuals = true
perf_graph = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/navier_stokes/test/tests/finite_volume/cns/mms/1d-with-bcs/porous-hllc.i)
eps=0.9
[GlobalParams]
fp = fp
[]
[Mesh]
[cartesian]
type = GeneratedMeshGenerator
dim = 1
xmin = .1
xmax = 1.1
nx = 2
[]
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Variables]
[rho]
type = MooseVariableFVReal
[]
[rho_ud]
type = MooseVariableFVReal
[]
[rho_et]
type = MooseVariableFVReal
[]
[]
[ICs]
[rho]
type = FunctionIC
variable = rho
function = 'exact_rho'
[]
[rho_ud]
type = FunctionIC
variable = rho_ud
function = 'exact_rho_ud'
[]
[rho_et]
type = FunctionIC
variable = rho_et
function = 'exact_rho_et'
[]
[]
[FVKernels]
[mass_advection]
type = PCNSFVMassHLLC
variable = rho
fp = fp
[]
[mass_fn]
type = FVBodyForce
variable = rho
function = 'forcing_rho'
[]
[momentum_x_advection]
type = PCNSFVMomentumHLLC
variable = rho_ud
momentum_component = x
fp = fp
[]
[momentum_fn]
type = FVBodyForce
variable = rho_ud
function = 'forcing_rho_ud'
[]
[fluid_energy_advection]
type = PCNSFVFluidEnergyHLLC
variable = rho_et
fp = fp
[]
[energy_fn]
type = FVBodyForce
variable = rho_et
function = 'forcing_rho_et'
[]
[]
[FVBCs]
[mass_in]
variable = rho
type = PCNSFVHLLCSpecifiedMassFluxAndTemperatureMassBC
boundary = left
temperature = 'exact_T'
superficial_rhou = 'exact_rho_ud'
[]
[momentum_in]
variable = rho_ud
type = PCNSFVHLLCSpecifiedMassFluxAndTemperatureMomentumBC
boundary = left
temperature = 'exact_T'
superficial_rhou = 'exact_rho_ud'
momentum_component = 'x'
[]
[energy_in]
variable = rho_et
type = PCNSFVHLLCSpecifiedMassFluxAndTemperatureFluidEnergyBC
boundary = left
temperature = 'exact_T'
superficial_rhou = 'exact_rho_ud'
[]
[mass_out]
variable = rho
type = PCNSFVHLLCSpecifiedPressureMassBC
boundary = right
pressure = 'exact_p'
[]
[momentum_out]
variable = rho_ud
type = PCNSFVHLLCSpecifiedPressureMomentumBC
boundary = right
pressure = 'exact_p'
momentum_component = 'x'
[]
[energy_out]
variable = rho_et
type = PCNSFVHLLCSpecifiedPressureFluidEnergyBC
boundary = right
pressure = 'exact_p'
[]
[]
[Materials]
[var_mat]
type = PorousConservedVarMaterial
rho = rho
superficial_rhou = rho_ud
rho_et = rho_et
porosity = porosity
[]
[porosity]
type = GenericConstantMaterial
prop_names = 'porosity'
prop_values = '${eps}'
[]
[]
[Functions]
[exact_rho]
type = ParsedFunction
expression = '3.48788261470924*cos(x)'
[]
[forcing_rho]
type = ParsedFunction
expression = '-3.83667087618017*eps*sin(1.1*x)'
symbol_names = 'eps'
symbol_values = '${eps}'
[]
[exact_rho_ud]
type = ParsedFunction
expression = '3.48788261470924*eps*cos(1.1*x)'
symbol_names = 'eps'
symbol_values = '${eps}'
[]
[forcing_rho_ud]
type = ParsedFunction
expression = 'eps*(-(10.6975765229419*cos(1.2*x)/cos(x) - 0.697576522941849*cos(1.1*x)^2/cos(x)^2)*sin(x) + (10.6975765229419*sin(x)*cos(1.2*x)/cos(x)^2 - 1.3951530458837*sin(x)*cos(1.1*x)^2/cos(x)^3 + 1.53466835047207*sin(1.1*x)*cos(1.1*x)/cos(x)^2 - 12.8370918275302*sin(1.2*x)/cos(x))*cos(x)) + 3.48788261470924*eps*sin(x)*cos(1.1*x)^2/cos(x)^2 - 7.67334175236034*eps*sin(1.1*x)*cos(1.1*x)/cos(x)'
symbol_names = 'eps'
symbol_values = '${eps}'
[]
[exact_rho_et]
type = ParsedFunction
expression = '26.7439413073546*cos(1.2*x)'
[]
[forcing_rho_et]
type = ParsedFunction
expression = '1.0*eps*(3.48788261470924*(3.06706896551724*cos(1.2*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.2*x))*sin(x)*cos(1.1*x)/cos(x)^2 - 1.1*eps*(3.48788261470924*(3.06706896551724*cos(1.2*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x) + 26.7439413073546*cos(1.2*x))*sin(1.1*x)/cos(x) + 1.0*eps*(-(10.6975765229419*cos(1.2*x)/cos(x) - 0.697576522941849*cos(1.1*x)^2/cos(x)^2)*sin(x) + (10.6975765229419*sin(x)*cos(1.2*x)/cos(x)^2 - 1.3951530458837*sin(x)*cos(1.1*x)^2/cos(x)^3 + 1.53466835047207*sin(1.1*x)*cos(1.1*x)/cos(x)^2 - 12.8370918275302*sin(1.2*x)/cos(x))*cos(x) - 32.0927295688256*sin(1.2*x))*cos(1.1*x)/cos(x)'
symbol_names = 'eps'
symbol_values = '${eps}'
[]
[exact_T]
type = ParsedFunction
expression = '0.0106975765229418*cos(1.2*x)/cos(x) - 0.000697576522941848*cos(1.1*x)^2/cos(x)^2'
symbol_names = 'eps'
symbol_values = '${eps}'
[]
[exact_p]
type = ParsedFunction
expression = '3.48788261470924*(3.06706896551724*cos(1.2*x)/cos(x) - 0.2*cos(1.1*x)^2/cos(x)^2)*cos(x)'
symbol_names = 'eps'
symbol_values = '${eps}'
[]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_max_its = 50
line_search = none
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
[]
[Outputs]
exodus = true
csv = true
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[h]
type = AverageElementSize
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2rho]
type = ElementL2Error
variable = rho
function = exact_rho
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2rho_ud]
variable = rho_ud
function = exact_rho_ud
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[L2rho_et]
variable = rho_et
function = exact_rho_et
type = ElementL2Error
outputs = 'console csv'
execute_on = 'timestep_end'
[]
[]
(modules/functional_expansion_tools/examples/2D_interface/sub.i)
# Basic example coupling a master and sub app at an interface in a 2D model.
# The master app provides a flux term to the sub app via Functional Expansions, which then performs
# its calculations. The sub app's interface conditions, both value and flux, are transferred back
# to the master app
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0.4
xmax = 2.4
nx = 30
ymin = 0.0
ymax = 10.0
ny = 20
[]
[Variables]
[./s]
[../]
[]
[Kernels]
[./diff_s]
type = HeatConduction
variable = s
[../]
[./time_diff_s]
type = HeatConductionTimeDerivative
variable = s
[../]
[]
[Materials]
[./Unobtanium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_s]
type = ConstantIC
value = 2
variable = s
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = s
boundary = bottom
value = 0.1
[../]
[./interface_flux]
type = FXFluxBC
boundary = left
variable = s
function = FX_Basis_Flux_Sub
[../]
[]
[Functions]
[./FX_Basis_Value_Sub]
type = FunctionSeries
series_type = Cartesian
orders = '4'
physical_bounds = '0.0 10'
y = Legendre
[../]
[./FX_Basis_Flux_Sub]
type = FunctionSeries
series_type = Cartesian
orders = '5'
physical_bounds = '0.0 10'
y = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Sub]
type = FXBoundaryValueUserObject
function = FX_Basis_Value_Sub
variable = s
boundary = left
[../]
[./FX_Flux_UserObject_Sub]
type = FXBoundaryFluxUserObject
function = FX_Basis_Flux_Sub
variable = s
boundary = left
diffusivity = thermal_conductivity
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 1.0
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
(modules/xfem/test/tests/moving_interface/verification/2D_rz_lsdep1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: 2D
# Coordinate System: rz
# Material Numbers/Types: level set dep 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description:
# Transient 2D heat transfer problem in cylindrical coordinates designed with
# the Method of Manufactured Solutions. This problem was developed to verify
# XFEM performance on linear elements in the presence of a moving interface
# sweeping across the x-y coordinates of a system with thermal conductivity
# dependent upon the transient level set function. This problem can be
# exactly evaluated by FEM/Moose without the moving interface. Both the
# temperature and level set function are designed to be linear to attempt to
# minimize the error between the Moose/exact solution and XFEM results.
# Results:
# The temperature at the bottom left boundary (x=1, y=1) exhibits the largest
# difference between the FEM/Moose solution and XFEM results. We present the
# XFEM results at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 479.9998717
# 0.6 520 519.9994963
# 0.8 560 559.9989217
# 1.0 600 599.9986735
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Problem]
coord_type = RZ
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
xmin = 1.0
xmax = 2.0
ymin = 1.0
ymax = 2.0
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraint]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = '10*(-100*x-100*y+400) + t*(-2.5*y/(2.04*x) + 155/x - t/(2.04*x)
- 7.5/2.04)'
[../]
[./neumann_func]
type = ParsedFunction
expression = '((0.01/2.04)*(-2.5*x-2.5*y-t)+1.55)*100*t'
[../]
[./dirichlet_right_func]
type = ParsedFunction
expression = '(-100*y+200)*t+400'
[../]
[./dirichlet_top_func]
type = ParsedFunction
expression = '(-100*x+200)*t+400'
[../]
[./k_func]
type = ParsedFunction
expression = '(0.01/2.04)*(-2.5*x-2.5*y-t) + 1.55'
[../]
[./ls_func]
type = ParsedFunction
expression = '-0.5*(x+y) + 2.04 -0.2*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericFunctionMaterial
prop_names = 'diffusion_coefficient'
prop_values = 'k_func'
[../]
[]
[BCs]
[./left_du]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = FunctionDirichletBC
variable = u
boundary = 'right'
function = dirichlet_right_func
[../]
[./bottom_du]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = neumann_func
[../]
[./top_u]
type = FunctionDirichletBC
variable = u
boundary = 'top'
function = dirichlet_top_func
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(test/tests/kernels/array_kernels/standard_save_in.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 4
ny = 4
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0.5 0.5 0'
top_right = '1 1 0'
block_id = 1
[]
[]
[Variables]
[u_0]
order = FIRST
family = L2_LAGRANGE
[]
[u_1]
order = FIRST
family = L2_LAGRANGE
[]
[]
[AuxVariables]
[u_diff_save_in_0]
order = FIRST
family = L2_LAGRANGE
[]
[u_diff_save_in_1]
order = FIRST
family = L2_LAGRANGE
[]
[u_vacuum_save_in_0]
order = FIRST
family = L2_LAGRANGE
[]
[u_vacuum_save_in_1]
order = FIRST
family = L2_LAGRANGE
[]
[u_dg_save_in_0]
order = FIRST
family = L2_LAGRANGE
[]
[u_dg_save_in_1]
order = FIRST
family = L2_LAGRANGE
[]
[u_diff_diag_save_in_0]
order = FIRST
family = L2_LAGRANGE
[]
[u_diff_diag_save_in_1]
order = FIRST
family = L2_LAGRANGE
[]
[u_vacuum_diag_save_in_0]
order = FIRST
family = L2_LAGRANGE
[]
[u_vacuum_diag_save_in_1]
order = FIRST
family = L2_LAGRANGE
[]
[u_dg_diag_save_in_0]
order = FIRST
family = L2_LAGRANGE
[]
[u_dg_diag_save_in_1]
order = FIRST
family = L2_LAGRANGE
[]
[]
[Kernels]
[diff0]
type = MatCoefDiffusion
variable = u_0
conductivity = dc
save_in = u_diff_save_in_0
diag_save_in = u_diff_diag_save_in_0
[]
[diff1]
type = Diffusion
variable = u_1
save_in = u_diff_save_in_1
diag_save_in = u_diff_diag_save_in_1
[]
[reaction0]
type = CoefReaction
variable = u_0
[]
[reaction1]
type = CoefReaction
variable = u_1
[]
[reaction01]
type = CoupledForce
variable = u_1
v = u_0
coef = 0.1
[]
[]
[DGKernels]
[dgdiff0]
type = DGDiffusion
variable = u_0
diff = dc
sigma = 4
epsilon = 1
save_in = u_dg_save_in_0
diag_save_in = u_dg_diag_save_in_0
[]
[dgdiff1]
type = DGDiffusion
variable = u_1
sigma = 4
epsilon = 1
save_in = u_dg_save_in_1
diag_save_in = u_dg_diag_save_in_1
[]
[]
[BCs]
[left0]
type = VacuumBC
variable = u_0
boundary = 1
save_in = u_vacuum_save_in_0
diag_save_in = u_vacuum_diag_save_in_0
[]
[left1]
type = VacuumBC
variable = u_1
boundary = 1
save_in = u_vacuum_save_in_1
diag_save_in = u_vacuum_diag_save_in_1
[]
[right0]
type = PenaltyDirichletBC
variable = u_0
boundary = 2
value = 1
penalty = 4
[]
[right1]
type = PenaltyDirichletBC
variable = u_1
boundary = 2
value = 2
penalty = 4
[]
[]
[Materials]
[dc0]
type = GenericConstantMaterial
block = 0
prop_names = dc
prop_values = 1
[]
[dc1]
type = GenericConstantMaterial
block = 1
prop_names = dc
prop_values = 2
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[intu0]
type = ElementIntegralVariablePostprocessor
variable = u_0
[]
[intu1]
type = ElementIntegralVariablePostprocessor
variable = u_1
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
file_base = array_save_in_out
exodus = true
[]
(modules/phase_field/test/tests/anisotropic_mobility/split.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
xmax = 15.0
ymax = 15.0
[]
[Variables]
[./c]
[./InitialCondition]
type = CrossIC
x1 = 0.0
x2 = 30.0
y1 = 0.0
y2 = 30.0
[../]
[../]
[./w]
[../]
[]
[Kernels]
[./cres]
type = SplitCHParsed
variable = c
kappa_name = kappa_c
w = w
f_name = F
[../]
[./wres]
type = SplitCHWResAniso
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[]
[Materials]
[./kappa]
type = GenericConstantMaterial
prop_names = 'kappa_c'
prop_values = '2.0'
[../]
[./mob]
type = ConstantAnisotropicMobility
tensor = '0.1 0 0
0 1 0
0 0 0'
M_name = M
[../]
[./free_energy]
type = MathEBFreeEnergy
property_name = F
c = c
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'BDF2'
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 lu 1'
l_max_its = 30
l_tol = 1.0e-4
nl_max_its = 50
nl_rel_tol = 1.0e-10
dt = 10.0
num_steps = 2
[]
[Outputs]
exodus = true
print_linear_residuals = true
perf_graph = true
[]
(modules/phase_field/test/tests/rigidbodymotion/grain_appliedforcedensity.i)
# test file for showing grain motion due to applied force density on grains
[GlobalParams]
var_name_base = eta
op_num = 2
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 10
nz = 0
xmax = 50
ymax = 25
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SpecifiedSmoothCircleIC
invalue = 1.0
outvalue = 0.1
int_width = 6.0
x_positions = '20.0 30.0 '
z_positions = '0.0 0.0 '
y_positions = '0.0 25.0 '
radii = '14.0 14.0'
3D_spheres = false
variable = c
[../]
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./load]
type = ConstantFunction
value = 0.01
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./motion]
type = MultiGrainRigidBodyMotion
variable = w
c = c
v = 'eta0 eta1'
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c kappa_eta'
prop_values = '5.0 2.0 0.1'
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = c
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 1.0e-2'
expression = 16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2
derivative_order = 2
[../]
[./force_density_ext]
type = ExternalForceDensityMaterial
c = c
etas = 'eta0 eta1'
k = 1.0
force_y = load
[../]
[]
[AuxVariables]
[./eta0]
[../]
[./eta1]
[../]
[./bnds]
[../]
[]
[AuxKernels]
[./bnds]
type = BndsCalcAux
variable = bnds
var_name_base = eta
op_num = 2
v = 'eta0 eta1'
[../]
[]
[ICs]
[./ic_eta0]
int_width = 6.0
x1 = 20.0
y1 = 0.0
radius = 14.0
outvalue = 0.0
variable = eta0
invalue = 1.0
type = SmoothCircleIC
[../]
[./IC_eta1]
int_width = 6.0
x1 = 30.0
y1 = 25.0
radius = 14.0
outvalue = 0.0
variable = eta1
invalue = 1.0
type = SmoothCircleIC
[../]
[]
[VectorPostprocessors]
[./forces]
type = GrainForcesPostprocessor
grain_force = grain_force
[../]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_center
execute_on = 'initial timestep_begin'
[../]
[]
[UserObjects]
[./grain_center]
type = GrainTracker
outputs = none
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
[../]
[./grain_force]
type = ComputeExternalGrainForceAndTorque
execute_on = 'linear nonlinear'
grain_data = grain_center
c = c
etas = 'eta0 eta1'
force_density = force_density_ext
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
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
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 1
dt = 0.1
[]
[Outputs]
exodus = true
csv = true
[]
(modules/heat_transfer/test/tests/verify_against_analytical/1D_transient.i)
# This test solves a 1D transient heat equation
# The error is caclulated by comparing to the analytical solution
# The problem setup and analytical solution are taken from "Advanced Engineering
# Mathematics, 10th edition" by Erwin Kreyszig.
# http://www.amazon.com/Advanced-Engineering-Mathematics-Erwin-Kreyszig/dp/0470458364
# It is Example 1 in section 12.6 on page 561
[Mesh]
type = GeneratedMesh
dim = 1
nx = 160
xmax = 80
[]
[Variables]
[./T]
[../]
[]
[ICs]
[./T_IC]
type = FunctionIC
variable = T
function = '100*sin(pi*x/80)'
[../]
[]
[Kernels]
[./HeatDiff]
type = HeatConduction
variable = T
[../]
[./HeatTdot]
type = HeatConductionTimeDerivative
variable = T
[../]
[]
[BCs]
[./sides]
type = DirichletBC
variable = T
boundary = 'left right'
value = 0
[../]
[]
[Materials]
[./k]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity'
prop_values = '0.95' #copper in cal/(cm sec C)
[../]
[./cp]
type = GenericConstantMaterial
prop_names = 'specific_heat'
prop_values = '0.092' #copper in cal/(g C)
[../]
[./rho]
type = GenericConstantMaterial
prop_names = 'density'
prop_values = '8.92' #copper in g/(cm^3)
[../]
[]
[Postprocessors]
[./error]
type = NodalL2Error
function = '100*sin(pi*x/80)*exp(-0.95/(0.092*8.92)*pi^2/80^2*t)'
variable = T
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
l_tol = 1e-6
dt = 2
end_time = 100
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/NAFEMS/transient/T3/nafems_t3_hex_template.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 5
ny = 1
nz = 1
xmin = 0.0
xmax = 0.1
ymin = 0.0
ymax = 0.01
zmin = 0.0
zmax = 0.01
elem_type = HEX8
[]
[Variables]
[./temp]
initial_condition = 0.0
[../]
[]
[BCs]
[./FixedTempLeft]
type = DirichletBC
variable = temp
boundary = left
value = 0.0
[../]
[./FunctionTempRight]
type = FunctionDirichletBC
variable = temp
boundary = right
function = '100.0 * sin(pi*t/40)'
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = temp
[../]
[./HeatTdot]
type = HeatConductionTimeDerivative
variable = temp
[../]
[]
[Materials]
[./density]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '35.0 440.5 7200.0'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
l_tol = 1e-5
nl_max_its = 50
nl_rel_tol = 1e-10
nl_abs_tol = 1e-12
dt = 1
end_time = 32.0
[]
[Postprocessors]
[./target_temp]
type = NodalVariableValue
variable = temp
nodeid = 19
[../]
[]
[Outputs]
csv = true
[]
(test/tests/interfacekernels/1d_interface/coupled_value_coupled_flux_with_jump_material.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[./subdomain1]
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
input = gen
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = '0'
[../]
[./v]
order = FIRST
family = LAGRANGE
block = '1'
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 4
block = 0
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 1
[../]
[]
[InterfaceKernels]
[./penalty_interface]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
jump_prop_name = jump
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 'left'
value = 1
[../]
[./right]
type = DirichletBC
variable = v
boundary = 'right'
value = 0
[../]
[]
[Materials]
[./jump]
type = JumpInterfaceMaterial
var = u
neighbor_var = v
boundary = primary0_interface
[../]
[./stateful]
type = StatefulMaterial
initial_diffusivity = 1
boundary = primary0_interface
[../]
[./block0]
type = GenericConstantMaterial
block = '0'
prop_names = 'D'
prop_values = '4'
[../]
[./block1]
type = GenericConstantMaterial
block = '1'
prop_names = 'D'
prop_values = '2'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
[Debug]
show_var_residual_norms = true
[]
(modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_transfer_from_heat_structure_3d/test.i)
[GlobalParams]
scaling_factor_1phase = '1. 1.e-2 1.e-4'
scaling_factor_temperature = 1e-2
initial_from_file = 'steady_state_out.e'
closures = simple_closures
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
k = 0.5
mu = 281.8e-6
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Materials]
[mat]
type = ADGenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '16 356 6.5514e3'
[]
[]
[Functions]
[Ts_bc]
type = ParsedFunction
expression = '2*sin(x*pi/2)+2*sin(pi*y) +507'
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
fp = fp
# geometry
position = '-1 0 -2.5'
orientation = '1 0 0'
length = 2
n_elems = 2
A = 0.3
D_h = 0.1935483871
f = 0.1
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe:in'
m_dot = 0.1
T = 500
[]
[outlet]
type = Outlet1Phase
input = 'pipe:out'
p = 6e6
[]
[ht]
type = HeatTransferFromHeatStructure3D1Phase
flow_channels = 'pipe'
hs = blk
boundary = blk:right
P_hf = 3
Hw = 1000
[]
[blk]
type = HeatStructureFromFile3D
file = box.e
position = '0 0 0'
[]
[right_bnd]
type = HSBoundarySpecifiedTemperature
hs = blk
boundary = blk:bottom
T = Ts_bc
[]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 1
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-7
nl_abs_tol = 1e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
[]
[Outputs]
exodus = true
execute_on = 'initial'
[]
(modules/navier_stokes/test/tests/finite_volume/ins/boussinesq/wcnsfv.i)
mu = 1
rho = 'rho'
k = 1
cp = 1
alpha = 1
velocity_interp_method = 'rc'
advected_interp_method = 'average'
# rayleigh=1e3
cold_temp=300
hot_temp=310
[GlobalParams]
two_term_boundary_expansion = true
rhie_chow_user_object = 'rc'
[]
[UserObjects]
[rc]
type = INSFVRhieChowInterpolator
u = u
v = v
pressure = pressure
[]
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 10
nx = 64
ny = 64
[]
[]
[Variables]
[u]
type = INSFVVelocityVariable
initial_condition = 1e-15
[]
[v]
type = INSFVVelocityVariable
initial_condition = 1e-15
[]
[pressure]
type = INSFVPressureVariable
initial_condition = 1e5
[]
[T]
type = INSFVEnergyVariable
scaling = 1e-4
initial_condition = ${cold_temp}
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[AuxVariables]
[U]
order = CONSTANT
family = MONOMIAL
fv = true
[]
[vel_x]
order = FIRST
family = MONOMIAL
[]
[vel_y]
order = FIRST
family = MONOMIAL
[]
[viz_T]
order = FIRST
family = MONOMIAL
[]
[rho_out]
type = MooseVariableFVReal
[]
[]
[AuxKernels]
[mag]
type = VectorMagnitudeAux
variable = U
x = u
y = v
execute_on = 'initial timestep_end'
[]
[vel_x]
type = ParsedAux
variable = vel_x
expression = 'u'
execute_on = 'initial timestep_end'
coupled_variables = 'u'
[]
[vel_y]
type = ParsedAux
variable = vel_y
expression = 'v'
execute_on = 'initial timestep_end'
coupled_variables = 'v'
[]
[viz_T]
type = ParsedAux
variable = viz_T
expression = 'T'
execute_on = 'initial timestep_end'
coupled_variables = 'T'
[]
[rho_out]
type = FunctorAux
functor = 'rho'
variable = 'rho_out'
execute_on = 'initial timestep_end'
[]
[]
[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
phi0 = 1e5
[]
[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
[]
[u_gravity]
type = INSFVMomentumGravity
variable = u
gravity = '0 -1 0'
rho = ${rho}
momentum_component = 'x'
[]
[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
[]
[v_gravity]
type = INSFVMomentumGravity
variable = v
gravity = '0 -1 0'
rho = ${rho}
momentum_component = 'y'
[]
[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]
[no_slip_x]
type = INSFVNoSlipWallBC
variable = u
boundary = 'left right top bottom'
function = 0
[]
[no_slip_y]
type = INSFVNoSlipWallBC
variable = v
boundary = 'left right top bottom'
function = 0
[]
[T_hot]
type = FVDirichletBC
variable = T
boundary = left
value = ${hot_temp}
[]
[T_cold]
type = FVDirichletBC
variable = T
boundary = right
value = ${cold_temp}
[]
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'alpha'
prop_values = '${alpha}'
[]
[]
[FunctorMaterials]
[const_functor]
type = ADGenericFunctorMaterial
prop_names = 'cp k'
prop_values = '${cp} ${k}'
[]
[rho]
type = RhoFromPTFunctorMaterial
fp = fp
temperature = T
pressure = pressure
[]
[ins_fv]
type = INSFVEnthalpyFunctorMaterial
temperature = 'T'
rho = ${rho}
[]
[]
[Functions]
[lid_function]
type = ParsedFunction
expression = '4*x*(1-x)'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
[]
[Outputs]
exodus = true
[]
(test/tests/controls/tag_based_naming_access/system_object_param.i)
[Mesh]
type = GeneratedMesh
dim = 2
elem_type = QUAD4
# use odd numbers so points do not fall on element boundaries
nx = 31
ny = 31
[]
[Variables]
[./diffused]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = diffused
[../]
[]
[DiracKernels]
[./test_object]
type = MaterialPointSource
point = '0.5 0.5 0'
variable = diffused
control_tags = 'tag'
[../]
[]
[BCs]
[./bottom_diffused]
type = DirichletBC
variable = diffused
boundary = 'bottom'
value = 2
[../]
[./top_diffused]
type = DirichletBC
variable = diffused
boundary = 'top'
value = 0
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'matp'
prop_values = '1'
block = 0
[../]
[]
[Postprocessors]
[./test_object]
type = TestControlPointPP
function = '2*(x+y)'
point = '0.5 0.5 0'
[../]
[./other_point_test_object]
type = TestControlPointPP
function = '3*(x+y)'
point = '0.5 0.5 0'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
[Controls]
[./point_control]
type = TestControl
test_type = 'point'
parameter = 'tag/*/point'
execute_on = 'initial'
[../]
[]
(modules/thermal_hydraulics/test/tests/materials/ad_wall_heat_transfer_coefficient_lyon/lyon_test.i)
[GlobalParams]
execute_on = 'initial'
[]
[Problem]
solve = false
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
allow_renumbering = false
[]
[AuxVariables]
[Hw]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[Hw_ak]
type = ADMaterialRealAux
variable = Hw
property = Hw
[]
[]
[Materials]
[props]
#liquid sodium properties at 773 K
type = ADGenericConstantMaterial
prop_names = ' rho vel k mu cp T T_wall D_h'
prop_values = '762.90 0.1 64.217 2.358e-4 1264.6 773 774 0.1'
[]
[Hw_material]
type = ADWallHeatTransferCoefficientLyonMaterial
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[Hw]
type = ElementalVariableValue
elementid = 0
variable = Hw
[]
[]
[Outputs]
csv = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/boussinesq/boussinesq_stabilized_action.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmax = .05
ymax = .05
nx = 20
ny = 20
elem_type = QUAD9
[]
[]
[Preconditioning]
[Newton_SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
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]
file_base = boussinesq_stabilized_out
[out]
type = Exodus
execute_on = 'final'
[]
[]
[Modules]
[IncompressibleNavierStokes]
equation_type = steady-state
gravity = '0 -9.81 0'
velocity_boundary = 'bottom right top left'
velocity_function = '0 0 0 0 0 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
pressure_pinned_node = 0
density_name = rho
dynamic_viscosity_name = mu
initial_velocity = '1e-15 1e-15 0'
use_ad = true
add_standard_velocity_variables_for_ad = false
pspg = true
supg = true
family = LAGRANGE
order = FIRST
add_temperature_equation = true
temperature_variable = temp
temperature_scaling = 1e-4
initial_temperature = 340
thermal_conductivity_name = k
specific_heat_name = cp
natural_temperature_boundary = 'top bottom'
fixed_temperature_boundary = 'left right'
temperature_function = '300 400'
boussinesq_approximation = true
# material property for reference temperature does not need to be AD material property
reference_temperature_name = temp_ref
thermal_expansion_name = alpha
[]
[]
[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'
[]
[]
(modules/combined/test/tests/phase_field_fracture/crack2d_iso_with_pressure.i)
#This input uses PhaseField-Nonconserved Action to add phase field fracture bulk rate kernels
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
ymax = 0.5
[]
[./noncrack]
type = BoundingBoxNodeSetGenerator
new_boundary = noncrack
bottom_left = '0.5 0 0'
top_right = '1 0 0'
input = gen
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Modules]
[./PhaseField]
[./Nonconserved]
[./c]
free_energy = F
kappa = kappa_op
mobility = L
[../]
[../]
[../]
[./TensorMechanics]
[./Master]
[./mech]
add_variables = true
strain = SMALL
additional_generate_output = 'stress_yy'
save_in = 'resid_x resid_y'
[../]
[../]
[../]
[]
[AuxVariables]
[./resid_x]
[../]
[./resid_y]
[../]
[]
[Kernels]
[./solid_x]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_x
component = 0
c = c
[../]
[./solid_y]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_y
component = 1
c = c
[../]
[]
[BCs]
[./ydisp]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = 't'
[../]
[./yfix]
type = DirichletBC
variable = disp_y
boundary = noncrack
value = 0
[../]
[./xfix]
type = DirichletBC
variable = disp_x
boundary = top
value = 0
[../]
[]
[Materials]
[./pfbulkmat]
type = GenericConstantMaterial
prop_names = 'gc_prop l visco fracture_pressure'
prop_values = '1e-3 0.04 1e-4 1e-3'
[../]
[./define_mobility]
type = ParsedMaterial
material_property_names = 'gc_prop visco'
property_name = L
expression = '1.0/(gc_prop * visco)'
[../]
[./define_kappa]
type = ParsedMaterial
material_property_names = 'gc_prop l'
property_name = kappa_op
expression = 'gc_prop * l'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '120.0 80.0'
fill_method = symmetric_isotropic
[../]
[./damage_stress]
type = ComputeLinearElasticPFFractureStress
c = c
E_name = 'elastic_energy'
D_name = 'degradation'
I_name = 'indicator_function'
F_name = 'local_fracture_energy'
decomposition_type = strain_spectral
[../]
[./degradation]
type = DerivativeParsedMaterial
property_name = degradation
coupled_variables = 'c'
expression = '(1.0-c)^2*(1.0 - eta) + eta'
constant_names = 'eta'
constant_expressions = '0.0'
derivative_order = 2
[../]
[./indicator_function]
type = DerivativeParsedMaterial
property_name = indicator_function
coupled_variables = 'c'
expression = 'c'
derivative_order = 2
[../]
[./local_fracture_energy]
type = DerivativeParsedMaterial
property_name = local_fracture_energy
coupled_variables = 'c'
material_property_names = 'gc_prop l'
expression = 'c^2 * gc_prop / 2 / l'
derivative_order = 2
[../]
[./fracture_driving_energy]
type = DerivativeSumMaterial
coupled_variables = c
sum_materials = 'elastic_energy local_fracture_energy'
derivative_order = 2
property_name = F
[../]
[]
[Postprocessors]
[./resid_x]
type = NodalSum
variable = resid_x
boundary = 2
[../]
[./resid_y]
type = NodalSum
variable = resid_y
boundary = 2
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
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'
nl_rel_tol = 1e-8
l_max_its = 10
nl_max_its = 10
dt = 1e-4
dtmin = 1e-4
num_steps = 2
[]
[Outputs]
exodus = true
[]
(modules/chemical_reactions/test/tests/parser/kinetic_without_action.i)
# Explicitly adds all Kernels and AuxKernels. Used to check that the
# SolidKineticReactions parser is working correctly
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Variables]
[./a]
initial_condition = 0.1
[../]
[./b]
initial_condition = 0.1
[../]
[./c]
initial_condition = 0.1
[../]
[./d]
initial_condition = 0.1
[../]
[]
[AuxVariables]
[./m1]
[../]
[./m2]
[../]
[./m3]
[../]
[]
[AuxKernels]
[./m1]
type = KineticDisPreConcAux
variable = m1
v = 'a b'
sto_v = '1 1'
log_k = -8
r_area = 1
ref_kconst = 1e-8
e_act = 1e4
gas_const = 8.314
ref_temp = 298.15
sys_temp = 298.15
[../]
[./m2]
type = KineticDisPreConcAux
variable = m2
v = 'c d'
sto_v = '2 3'
log_k = -8
r_area = 2
ref_kconst = 2e-8
e_act = 2e4
gas_const = 8.314
ref_temp = 298.15
sys_temp = 298.15
[../]
[./m3]
type = KineticDisPreConcAux
variable = m3
v = 'a c'
sto_v = '1 -2'
log_k = -8
r_area = 3
ref_kconst = 3e-8
e_act = 3e4
gas_const = 8.314
ref_temp = 298.15
sys_temp = 298.15
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./b_ie]
type = PrimaryTimeDerivative
variable = b
[../]
[./c_ie]
type = PrimaryTimeDerivative
variable = c
[../]
[./d_ie]
type = PrimaryTimeDerivative
variable = d
[../]
[./a_kin]
type = CoupledBEKinetic
variable = a
v = 'm1 m3'
weight = '1 1'
[../]
[./b_kin]
type = CoupledBEKinetic
variable = b
v = m1
weight = 1
[../]
[./c_kin]
type = CoupledBEKinetic
variable = c
v = 'm2 m3'
weight = '2 -2'
[../]
[./d_kin]
type = CoupledBEKinetic
variable = d
v = m2
weight = 3
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = porosity
prop_values = 0.1
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
end_time = 1
l_tol = 1e-10
nl_rel_tol = 1e-10
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Outputs]
file_base = kinetic_out
exodus = true
perf_graph = true
print_linear_residuals = true
[]
(modules/thermal_hydraulics/test/tests/materials/ad_wall_heat_transfer_coefficient_weisman/weisman_test.i)
#Water properties 15.1 MPa and 573 k
rho = 726.06
vel = 0.1
k = 0.56361
mu = 8.84e-05
cp = 5468.3
T = 573
T_wall = 574
D_h = 0.1
PoD = 1.1
array = "Square"
file_base = "square_cooled"
[GlobalParams]
execute_on = 'initial'
[]
[Problem]
solve = false
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
allow_renumbering = false
[]
[AuxVariables]
[Hw]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[Hw_ak]
type = ADMaterialRealAux
variable = Hw
property = Hw
[]
[]
[Materials]
[props]
type = ADGenericConstantMaterial
prop_names = 'rho vel k mu cp T T_wall D_h'
prop_values = '${rho} ${vel} ${k} ${mu} ${cp} ${T} ${T_wall} ${D_h}'
[]
[Hw_material]
type = ADWallHeatTransferCoefficientWeismanMaterial
PoD = ${PoD}
bundle_array = ${array}
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[Hw]
type = ElementalVariableValue
elementid = 0
variable = Hw
[]
[]
[Outputs]
csv = true
file_base = ${file_base}
[]
(modules/solid_mechanics/test/tests/dynamics/time_integration/hht_test_ti.i)
# Test for HHT time integration
# The test is for an 1D bar element of unit length fixed on one end
# with a ramped pressure boundary condition applied to the other end.
# alpha, beta and gamma are HHT time integration parameters
# The equation of motion in terms of matrices is:
#
# M*accel + alpha*(K*disp - K*disp_old) + K*disp = P(t+alpha dt)*Area
#
# Here M is the mass matrix, K is the stiffness matrix, P is the applied pressure
#
# This equation is equivalent to:
#
# density*accel + alpha*(Div stress - Div stress_old) +Div Stress= P(t+alpha dt)
#
# The first term on the left is evaluated using the Inertial force kernel
# The next two terms on the left involving alpha are evaluated using the
# DynamicStressDivergenceTensors Kernel
# The residual due to Pressure is evaluated using Pressure boundary condition
#
# The system will come to steady state slowly after the pressure becomes constant.
# Alpha equal to zero will result in Newmark integration.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 0.0
xmax = 0.1
ymin = 0.0
ymax = 1.0
zmin = 0.0
zmax = 0.1
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[AuxVariables]
[./vel_x]
[../]
[./accel_x]
[../]
[./vel_y]
[../]
[./accel_y]
[../]
[./vel_z]
[../]
[./accel_z]
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./DynamicSolidMechanics]
displacements = 'disp_x disp_y disp_z'
hht_alpha = 0.11
[../]
[./inertia_x]
type = InertialForce
variable = disp_x
[../]
[./inertia_y]
type = InertialForce
variable = disp_y
[../]
[./inertia_z]
type = InertialForce
variable = disp_z
[../]
[]
[AuxKernels]
[./accel_x] # These auxkernls are only for checking output
type = TestNewmarkTI
displacement = disp_x
variable = accel_x
first = false
[../]
[./accel_y]
type = TestNewmarkTI
displacement = disp_y
variable = accel_y
first = false
[../]
[./accel_z]
type = TestNewmarkTI
displacement = disp_z
variable = accel_z
first = false
[../]
[./vel_x]
type = TestNewmarkTI
displacement = disp_x
variable = vel_x
[../]
[./vel_y]
type = TestNewmarkTI
displacement = disp_y
variable = vel_y
[../]
[./vel_z]
type = TestNewmarkTI
displacement = disp_z
variable = vel_z
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 0
index_j = 1
[../]
[./strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yy
index_i = 0
index_j = 1
[../]
[]
[BCs]
[./top_y]
type = DirichletBC
variable = disp_y
boundary = top
value=0.0
[../]
[./top_x]
type = DirichletBC
variable = disp_x
boundary = top
value=0.0
[../]
[./top_z]
type = DirichletBC
variable = disp_z
boundary = top
value=0.0
[../]
[./bottom_x]
type = DirichletBC
variable = disp_x
boundary = bottom
value=0.0
[../]
[./bottom_z]
type = DirichletBC
variable = disp_z
boundary = bottom
value=0.0
[../]
[./Pressure]
[./Side1]
boundary = bottom
function = pressure
displacements = 'disp_x disp_y disp_z'
factor = 1
alpha = 0.11
[../]
[../]
[]
[Materials]
[./Elasticity_tensor]
type = ComputeElasticityTensor
block = 0
fill_method = symmetric_isotropic
C_ijkl = '210e9 0'
[../]
[./strain]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[../]
[./stress]
type = ComputeLinearElasticStress
block = 0
[../]
[./density]
type = GenericConstantMaterial
block = 0
prop_names = 'density'
prop_values = '7750'
[../]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 2
dt = 0.1
# Time integration scheme
scheme = 'newmark-beta'
[]
[Functions]
[./pressure]
type = PiecewiseLinear
x = '0.0 0.1 0.2 1.0 2.0 5.0'
y = '0.0 0.1 0.2 1.0 1.0 1.0'
scale_factor = 1e9
[../]
[]
[Postprocessors]
[./_dt]
type = TimestepSize
[../]
[./disp]
type = NodalExtremeValue
variable = disp_y
boundary = bottom
[../]
[./vel]
type = NodalExtremeValue
variable = vel_y
boundary = bottom
[../]
[./accel]
type = NodalExtremeValue
variable = accel_y
boundary = bottom
[../]
[./stress_yy]
type = ElementAverageValue
variable = stress_yy
[../]
[./strain_yy]
type = ElementAverageValue
variable = strain_yy
[../]
[]
[Outputs]
file_base = 'hht_test_out'
exodus = true
perf_graph = true
[]
(modules/heat_transfer/test/tests/sideset_heat_transfer/gap_thermal_ktemp_1D.i)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
nx = 2
xmax = 2
[]
[split]
type = SubdomainBoundingBoxGenerator
input = mesh
block_id = 1
bottom_left = '1 0 0'
top_right = '2 0 0'
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = split
primary_block = 1
paired_block = 0
new_boundary = 'interface0'
[]
uniform_refine = 4
[]
[Variables]
[T]
order = FIRST
family = MONOMIAL
[]
[]
[AuxVariables]
[Tbulk]
order = FIRST
family = LAGRANGE
initial_condition = 300 # K
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = T
diffusivity = conductivity
[]
[source]
type = BodyForce
variable = T
value = 1.0
[]
[]
[DGKernels]
[dg_diff]
type = DGDiffusion
variable = T
epsilon = -1
sigma = 6
diff = conductivity
exclude_boundary = 'interface0'
[]
[]
[InterfaceKernels]
[gap_var]
type = SideSetHeatTransferKernel
variable = T
neighbor_var = T
boundary = 'interface0'
Tbulk_var = Tbulk
[]
[]
[Functions]
# Defining temperature dependent fucntion for conductivity across side set
[kgap]
type = ParsedFunction
expression = 't / 200'
[]
[bc_func]
type = ConstantFunction
value = 300
[]
[exact]
type = ParsedFunction
expression = '
A := if(x < 1, -0.5, -0.25);
B := if(x < 1, -0.293209850655001, 0.0545267662299068);
C := if(x < 1, 300.206790149345, 300.19547323377);
d := -1;
A * (x+d) * (x+d) + B * (x+d) + C'
[]
[]
[BCs]
[bc_left]
type = DGFunctionDiffusionDirichletBC
boundary = 'left'
variable = T
diff = 'conductivity'
epsilon = -1
sigma = 6
function = bc_func
[]
[bc_right]
type = DGFunctionDiffusionDirichletBC
boundary = 'right'
variable = T
diff = 'conductivity'
epsilon = -1
sigma = 6
function = bc_func
[]
[]
[Materials]
[k0]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 1.0
block = 0
[]
[k1]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 2.0
block = 1
[]
[gap_mat]
type = SideSetHeatTransferMaterial
boundary = 'interface0'
# Using temperature dependent function for gap conductivity
conductivity_temperature_function = kgap
# Variable to evaluate conductivity with
gap_temperature = Tbulk
gap_length = 1.0
h_primary = 1
h_neighbor = 1
emissivity_primary = 1
emissivity_neighbor = 1
[]
[]
[Postprocessors]
[error]
type = ElementL2Error
variable = T
function = exact
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(modules/phase_field/examples/rigidbodymotion/AC_CH_advection_constforce_rect.i)
#
# Tests the Rigid Body Motion of grains due to applied forces.
# Concenterated forces and torques have been applied and corresponding
# advection velocities are calculated.
# Grain motion kernels make the grains translate and rotate as a rigidbody,
# applicable to grain movement in porous media
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 50
ny = 25
nz = 0
xmax = 50
ymax = 25
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[./eta]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./vadvx]
order = CONSTANT
family = MONOMIAL
[../]
[./vadvy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
coupled_variables = eta
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./motion]
# advection kernel corrsponding to CH equation
type = MultiGrainRigidBodyMotion
variable = w
c = c
v = eta
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
[../]
[./eta_dot]
type = TimeDerivative
variable = eta
[../]
[./vadv_eta]
# advection kernel corrsponding to AC equation
type = SingleGrainRigidBodyMotion
variable = eta
c = c
v = eta
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
[../]
[./acint_eta]
type = ACInterface
variable = eta
mob_name = M
coupled_variables = c
kappa_name = kappa_eta
[../]
[./acbulk_eta]
type = AllenCahn
variable = eta
mob_name = M
f_name = F
coupled_variables = c
[../]
[]
[AuxKernels]
[./vadv_x]
type = GrainAdvectionAux
component = x
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
variable = vadvx
[../]
[./vadv_y]
type = GrainAdvectionAux
component = y
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
variable = vadvy
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c kappa_eta'
prop_values = '1.0 2.0 0.1'
[../]
[./free_energy]
type = DerivativeParsedMaterial
coupled_variables = 'c eta'
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 1.0e-2'
expression = 16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2+(c-eta)^2
derivative_order = 2
[../]
[]
[VectorPostprocessors]
[./forces]
# VectorPostprocessor for outputting grain forces and torques
type = GrainForcesPostprocessor
grain_force = grain_force
[../]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_center
execute_on = 'initial timestep_begin'
[../]
[]
[UserObjects]
[./grain_center]
type = GrainTracker
variable = eta
outputs = none
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
[../]
[./grain_force]
type = ConstantGrainForceAndTorque
execute_on = 'linear nonlinear'
force = '0.2 0.0 0.0 ' # size should be 3 * no. of grains
torque = '0.0 0.0 5.0 ' # size should be 3 * no. of grains
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
nl_max_its = 30
scheme = bdf2
solve_type = NEWTON
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
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
dt = 0.1
end_time = 10
[]
[Outputs]
exodus = true
[]
[ICs]
[./rect_c]
y2 = 20.0
y1 = 5.0
inside = 1.0
x2 = 30.0
variable = c
x1 = 10.0
type = BoundingBoxIC
[../]
[./rect_eta]
y2 = 20.0
y1 = 5.0
inside = 1.0
x2 = 30.0
variable = eta
x1 = 10.0
type = BoundingBoxIC
[../]
[]
(test/tests/interfacekernels/1d_interface/coupled_value_coupled_flux.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[../]
[./interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = '0'
[../]
[./v]
order = FIRST
family = LAGRANGE
block = '1'
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 4
block = 0
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 1
[../]
[]
[InterfaceKernels]
active = 'interface'
[./interface]
type = InterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
D = 'D'
D_neighbor = 'D'
[../]
[./penalty_interface]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
[../]
[]
[BCs]
active = 'left right middle'
[./left]
type = DirichletBC
variable = u
boundary = 'left'
value = 1
[../]
[./right]
type = DirichletBC
variable = v
boundary = 'right'
value = 0
[../]
[./middle]
type = MatchedValueBC
variable = v
boundary = 'primary0_interface'
v = u
[../]
[]
[Materials]
[./stateful]
type = StatefulMaterial
initial_diffusivity = 1
boundary = primary0_interface
[../]
[./block0]
type = GenericConstantMaterial
block = '0'
prop_names = 'D'
prop_values = '4'
[../]
[./block1]
type = GenericConstantMaterial
block = '1'
prop_names = 'D'
prop_values = '2'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
[Debug]
show_var_residual_norms = true
[]
(modules/thermal_hydraulics/test/tests/materials/ad_reynolds_number/test.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
allow_renumbering = false
[]
[Materials]
[const_mpropsat]
type = ADGenericConstantMaterial
prop_names = 'rho vel D_h mu'
prop_values = '1000 5 0.002 0.1'
[]
[Re_material]
type = ADReynoldsNumberMaterial
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[Re]
type = ADElementAverageMaterialProperty
mat_prop = Re
[]
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(modules/solid_mechanics/test/tests/dynamics/time_integration/newmark.i)
# Test for Newmark time integration
# The test is for an 1D bar element of unit length fixed on one end
# with a ramped pressure boundary condition applied to the other end.
# beta and gamma are Newmark time integration parameters
# The equation of motion in terms of matrices is:
#
# M*accel + K*disp = P*Area
#
# Here M is the mass matrix, K is the stiffness matrix, P is the applied pressure
#
# This equation is equivalent to:
#
# density*accel + Div Stress = P
#
# The first term on the left is evaluated using the Inertial force kernel
# The last term on the left is evaluated using StressDivergenceTensors
# The residual due to Pressure is evaluated using Pressure boundary condition
[Mesh]
type = GeneratedMesh
dim = 3
xmax = 0.1
ymax = 1.0
zmax = 0.1
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[AuxVariables]
[vel_x]
[]
[accel_x]
[]
[vel_y]
[]
[accel_y]
[]
[vel_z]
[]
[accel_z]
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[SolidMechanics]
displacements = 'disp_x disp_y disp_z'
[]
[inertia_x]
type = InertialForce
variable = disp_x
velocity = vel_x
acceleration = accel_x
beta = 0.25
gamma = 0.5
[]
[inertia_y]
type = InertialForce
variable = disp_y
velocity = vel_y
acceleration = accel_y
beta = 0.25
gamma = 0.5
[]
[inertia_z]
type = InertialForce
variable = disp_z
velocity = vel_z
acceleration = accel_z
beta = 0.25
gamma = 0.5
[]
[]
[AuxKernels]
[accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = timestep_end
[]
[vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = timestep_end
[]
[accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = timestep_end
[]
[vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = timestep_end
[]
[accel_z]
type = NewmarkAccelAux
variable = accel_z
displacement = disp_z
velocity = vel_z
beta = 0.25
execute_on = timestep_end
[]
[vel_z]
type = NewmarkVelAux
variable = vel_z
acceleration = accel_z
gamma = 0.5
execute_on = timestep_end
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yy
index_i = 1
index_j = 1
[]
[]
[BCs]
[top_x]
type = DirichletBC
variable = disp_x
boundary = top
value = 0.0
[]
[top_y]
type = DirichletBC
variable = disp_y
boundary = top
value = 0.0
[]
[top_z]
type = DirichletBC
variable = disp_z
boundary = top
value = 0.0
[]
[Pressure]
[Side1]
boundary = bottom
function = pressure
factor = 1
displacements = 'disp_x disp_y disp_z'
[]
[]
[]
[Materials]
[Elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric_isotropic
C_ijkl = '210 0'
[]
[strain]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
[]
[stress]
type = ComputeLinearElasticStress
[]
[density]
type = GenericConstantMaterial
prop_names = 'density'
prop_values = '7750'
[]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 2
dt = 0.1
[]
[Functions]
[pressure]
type = PiecewiseLinear
x = '0.0 0.2 1.0 5.0'
y = '0.0 0.2 1.0 1.0'
scale_factor = 1e3
[]
[]
[Postprocessors]
[dt]
type = TimestepSize
[]
[disp]
type = NodalExtremeValue
variable = disp_y
boundary = bottom
[]
[vel]
type = NodalExtremeValue
variable = vel_y
boundary = bottom
[]
[accel]
type = NodalExtremeValue
variable = accel_y
boundary = bottom
[]
[stress_yy]
type = ElementAverageValue
variable = stress_yy
[]
[strain_yy]
type = ElementAverageValue
variable = strain_yy
[]
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/xfem/test/tests/moving_interface/verification/2D_xy_lsdep1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: 2D
# Coordinate System: xy
# Material Numbers/Types: level set dep 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description:
# Transient 2D heat transfer problem in Cartesian coordinates designed with
# the Method of Manufactured Solutions. This problem was developed to verify
# XFEM performance on linear elements in the presence of a moving interface
# sweeping across the x-y coordinates of a system with thermal conductivity
# dependent upon the transient level set function. This problem can be
# exactly evaluated by FEM/Moose without the moving interface. Both the
# temperature and level set function are designed to be linear to attempt to
# minimize the error between the Moose/exact solution and XFEM results.
# Results:
# The temperature at the bottom left boundary (x=0, y=0) exhibits the largest
# difference between the FEM/Moose solution and XFEM results. We present the
# XFEM results at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 479.9998738
# 0.6 520 519.9995114
# 0.8 560 559.9989360
# 1.0 600 599.9983833
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraints]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = '10*(-100*x-100*y+200)-(5*t/1.04)'
[../]
[./neumann_func]
type = ParsedFunction
expression = '((0.01/1.04)*(-2.5*x-2.5*y-t)+1.55)*100*t'
[../]
[./dirichlet_right_func]
type = ParsedFunction
expression = '(-100*y+100)*t+400'
[../]
[./dirichlet_top_func]
type = ParsedFunction
expression = '(-100*x+100)*t+400'
[../]
[./k_func]
type = ParsedFunction
expression = '(0.01/1.04)*(-2.5*x-2.5*y-t)+1.55'
[../]
[./ls_func]
type = ParsedFunction
expression = '-0.5*(x+y) + 1.04 -0.2*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericFunctionMaterial
prop_names = 'diffusion_coefficient'
prop_values = 'k_func'
[../]
[]
[BCs]
[./left_du]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = FunctionDirichletBC
variable = u
boundary = 'right'
function = dirichlet_right_func
[../]
[./bottom_du]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = neumann_func
[../]
[./top_u]
type = FunctionDirichletBC
variable = u
boundary = 'top'
function = dirichlet_top_func
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/porous_flow/test/tests/jacobian/linear_por.i)
# Testing Jacobian resulting from PorousFlowPorosityLinear in a THM situation
[GlobalParams]
PorousFlowDictator = dictator
strain_at_nearest_qp = true
[]
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
[]
[]
[Variables]
[pp]
initial_condition = 1
[]
[T]
initial_condition = 2
[]
[disp]
[]
[]
[ICs]
[disp]
type = FunctionIC
variable = disp
function = '3 * x'
[]
[]
[BCs]
[disp]
type = FunctionDirichletBC
boundary = 'left right top bottom front back'
variable = disp
function = '3 * x'
[]
[]
[PorousFlowFullySaturated]
coupling_type = ThermoHydroMechanical
fp = simple_fluid
porepressure = pp
temperature = T
displacements = 'disp disp disp'
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
[]
[]
[Materials]
[porosity]
type = PorousFlowPorosityLinear
porosity_ref = 0.5
P_ref = 0.5
P_coeff = 1.0
T_ref = -3.0
T_coeff = 1.0
epv_ref = 2.5
epv_coeff = 1.0
[]
[perm]
type = PorousFlowPermeabilityConst
permeability = '0 0 0 0 0 0 0 0 0'
[]
[matrix_energy]
type = PorousFlowMatrixInternalEnergy
density = 0.0
specific_heat_capacity = 0.0
[]
[thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '0 0 0 0 0 0 0 0 0'
[]
[density]
type = GenericConstantMaterial
prop_names = density
prop_values = 0.0
[]
[elasticity]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1E-99
poissons_ratio = 0
[]
[strain]
type = ComputeSmallStrain
displacements = 'disp disp disp'
[]
[stress]
type = ComputeLinearElasticStress
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
num_steps = 1
# petsc_options = '-snes_test_jacobian -snes_force_iteration'
# petsc_options_iname = '-snes_type --ksp_type -pc_type -snes_convergence_test'
# petsc_options_value = ' ksponly preonly none skip'
[]
(modules/stochastic_tools/test/tests/transfers/libtorch_nn_transfer/libtorch_drl_control_sub.i)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
xmin = 0.0
xmax = 7.0
nx = 3
[]
[]
[Variables]
[temp]
initial_condition = 300
[]
[]
[Kernels]
[time]
type = CoefTimeDerivative
variable = temp
Coefficient = '${fparse 1.00630182*1.225}'
[]
[heat_conduc]
type = MatDiffusion
variable = temp
diffusivity = 'k'
[]
[]
[BCs]
[left_flux]
type = NeumannBC
value = 0.0
boundary = 'left'
variable = temp
[]
[dirichlet]
type = FunctionDirichletBC
function = temp_env
variable = temp
boundary = 'right'
[]
[]
[Functions]
[temp_env]
type = ParsedFunction
value = '15.0*sin(t/86400.0 *pi) + 273.0'
[]
[design_function]
type = ParsedFunction
value = '297'
[]
[reward_function]
type = ScaledAbsDifferenceDRLRewardFunction
design_function = design_function
observed_value = center_temp_tend
c1 = 1
c2 = 10
[]
[]
[Materials]
[constant]
type = GenericConstantMaterial
prop_names = 'k'
prop_values = 26.53832364
[]
[]
[Postprocessors]
[center_temp]
type = PointValue
variable = temp
point = '3.5 0.0 0.0'
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[center_temp_tend]
type = PointValue
variable = temp
point = '3.5 0.0 0.0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[env_temp]
type = FunctionValuePostprocessor
function = temp_env
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[reward]
type = FunctionValuePostprocessor
function = reward_function
execute_on = 'INITIAL TIMESTEP_END'
indirect_dependencies = 'center_temp_tend env_temp'
[]
[left_flux]
type = LibtorchControlValuePostprocessor
control_name = src_control
execute_on = 'INITIAL TIMESTEP_END'
[]
[log_prob_left_flux]
type = LibtorchDRLLogProbabilityPostprocessor
control_name = src_control
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Reporters]
[T_reporter]
type = AccumulateReporter
reporters = 'center_temp_tend/value env_temp/value reward/value left_flux/value log_prob_left_flux/value'
outputs = 'csv_out'
[]
[nn_parameters]
type = LibtorchArtificialNeuralNetParameters
control_name = src_control
outputs = json_out
[]
[]
[Controls]
[src_control]
type = LibtorchDRLControl
parameters = "BCs/left_flux/value"
responses = 'center_temp env_temp'
# keep consistent with LibtorchDRLControlTrainer
input_timesteps = 2
response_scaling_factors = '0.03 0.03'
response_shift_factors = '270 270'
action_standard_deviations = '0.1'
action_scaling_factors = 100
execute_on = 'TIMESTEP_BEGIN'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-8
start_time = 0.0
end_time = 86400
dt = 14400.0
[]
[Outputs]
[json_out]
type = JSON
execute_on = FINAL
execute_system_information_on = NONE
[]
[]
(modules/heat_transfer/test/tests/truss_heat_conduction/rectangle_w_line.i)
[Mesh]
parallel_type = 'replicated'
[rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 50
xmin = -0.5
xmax = 0.5
ymin = -1.25
ymax = 1.25
boundary_name_prefix = rectangle
[]
[rectangle_id]
type = SubdomainIDGenerator
input = rectangle
subdomain_id = 1
[]
[line]
type = GeneratedMeshGenerator
dim = 1
xmin = -0.5
xmax = 0.5
nx = 10
boundary_name_prefix = line
boundary_id_offset = 10
[]
[line_id]
type = SubdomainIDGenerator
input = line
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'rectangle_id line_id'
[]
[blcok_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'rectangle line'
[]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[time_derivative]
type = HeatConductionTimeDerivative
variable = temperature
block = 'rectangle'
[]
[heat_conduction]
type = HeatConduction
variable = temperature
block = 'rectangle'
[]
[time_derivative_line]
type = TrussHeatConductionTimeDerivative
variable = temperature
area = area
block = 'line'
[]
[heat_conduction_line]
type = TrussHeatConduction
variable = temperature
area = area
block = 'line'
[]
[]
[AuxVariables]
[area]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[area]
type = ConstantAux
variable = area
value = 0.1 # strip thickness
execute_on = 'initial timestep_begin'
[]
[]
[Constraints]
[equalvalue]
type = EqualValueEmbeddedConstraint
secondary = 'line'
primary = 'rectangle'
penalty = 1e6
formulation = kinematic
primary_variable = temperature
variable = temperature
[]
[]
[Materials]
[rectangle]
type = GenericConstantMaterial
block = 'rectangle'
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[]
[line]
type = GenericConstantMaterial
block = 'line'
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '10.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[]
[]
[BCs]
[right]
type = FunctionDirichletBC
variable = temperature
boundary = 'rectangle_right line_right'
function = '10*t'
[]
[]
[VectorPostprocessors]
[x_n0_25]
type = LineValueSampler
start_point = '-0.25 0 0'
end_point = '-0.25 1.25 0'
num_points = 100
variable = 'temperature'
sort_by = id
[]
[x_0_25]
type = LineValueSampler
start_point = '0.25 0 0'
end_point = '0.25 1.25 0'
num_points = 100
variable = 'temperature'
sort_by = id
[]
[]
[Executioner]
type = Transient
start_time = 0
dt = 1
end_time = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[csv]
type = CSV
file_base = 'csv/rectangle_w_line'
time_data = true
[]
[]
(modules/chemical_reactions/test/tests/aqueous_equilibrium/1species.i)
# Simple equilibrium reaction example to illustrate the use of the AqueousEquilibriumReactions
# action.
# In this example, a single primary species a is transported by diffusion and convection
# from the left of the porous medium, reacting to form an equilibrium species pa2 according to
# the equilibrium reaction specified in the AqueousEquilibriumReactions block as:
#
# reactions = '2a = pa2 1'
#
# where the 2 is the weight of the equilibrium species, and the 1 refers to the equilibrium
# constant (log10(Keq) = 1).
#
# The AqueousEquilibriumReactions action creates all the required kernels and auxkernels
# to compute the reaction given by the above equilibrium reaction equation.
#
# Specifically, it adds to following:
# * An AuxVariable named 'pa2' (given in the reactions equations)
# * A AqueousEquilibriumRxnAux AuxKernel for this AuxVariable with all parameters
# * A CoupledBEEquilibriumSub Kernel for each primary species with all parameters
# * A CoupledDiffusionReactionSub Kernel for each primary species with all parameters
# * A CoupledConvectionReactionSub Kernel for each primary species with all parameters if
# pressure is a coupled variable
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
[]
[Variables]
[./a]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = BoundingBoxIC
x1 = 0.0
y1 = 0.0
x2 = 1e-2
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
variable = a
[../]
[../]
[]
[AuxVariables]
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./pressure]
type = FunctionIC
variable = pressure
function = 2-x
[../]
[]
[ReactionNetwork]
[./AqueousEquilibriumReactions]
primary_species = a
reactions = '2a = pa2 1'
secondary_species = pa2
pressure = pressure
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./a_diff]
type = PrimaryDiffusion
variable = a
[../]
[./a_conv]
type = PrimaryConvection
variable = a
p = pressure
[../]
[]
[BCs]
[./a_right]
type = ChemicalOutFlowBC
variable = a
boundary = right
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity'
prop_values = '1e-4 1e-4 0.2'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-12
start_time = 0.0
end_time = 100
dt = 10.0
[]
[Outputs]
file_base = 1species_out
exodus = true
perf_graph = true
print_linear_residuals = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
(test/tests/materials/discrete/recompute_warning.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 1
[]
[./left_domain]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '0.5 1 0'
block_id = 10
[../]
[]
[Variables]
[./u]
initial_condition = 2
[../]
[]
[Kernels]
[./diff]
type = MatDiffusionTest
variable = u
prop_name = 'p'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 2
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 3
[../]
[]
[Materials]
[./recompute_props]
type = GenericConstantMaterial
prop_names = 'f f_prime'
prop_values = '22 24'
block = 0
compute = true # the default, but should trigger a warning because newton is calling getMaterial on this
[../]
[./newton]
type = NewtonMaterial
block = 0
outputs = all
f_name = 'f'
f_prime_name = 'f_prime'
p_name = 'p'
material = recompute_props
max_iterations = 0
[../]
[./left]
type = GenericConstantMaterial
prop_names = 'f f_prime p'
prop_values = '1 0.5 1.2345'
block = 10
outputs = all
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
print_linear_residuals = true
perf_graph = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_no_parts_steady_stabilized.i)
# This input file tests several different things:
# .) The axisymmetric (RZ) form of the governing equations.
# .) An open boundary.
# .) Not integrating the pressure by parts, thereby requiring a pressure pin.
# .) Natural boundary condition at the outlet.
[GlobalParams]
integrate_p_by_parts = false
laplace = true
gravity = '0 0 0'
supg = true
pspg = true
order = FIRST
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = Newton
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Variables]
[./vel_x]
# Velocity in radial (r) direction
[../]
[./vel_y]
# Velocity in axial (z) direction
[../]
[./p]
[../]
[]
[BCs]
[./p_corner]
# This is required, because pressure term is *not* integrated by parts.
type = DirichletBC
boundary = top_right
value = 0
variable = p
[../]
[./u_in]
type = DirichletBC
boundary = bottom
variable = vel_x
value = 0
[../]
[./v_in]
type = FunctionDirichletBC
boundary = bottom
variable = vel_y
function = 'inlet_func'
[../]
[./u_axis_and_walls]
type = DirichletBC
boundary = 'left right'
variable = vel_x
value = 0
[../]
[./v_no_slip]
type = DirichletBC
boundary = 'right'
variable = vel_y
value = 0
[../]
[]
[Kernels]
[./mass]
type = INSMassRZ
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
[./x_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./y_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 'volume'
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[../]
[]
(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/chemical_reactions/test/tests/parser/equilibrium_action.i)
# Test AqueousEquilibriumReactions parser
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Variables]
[./a]
[../]
[./b]
[../]
[]
[AuxVariables]
[./pressure]
[../]
[]
[ICs]
[./a]
type = BoundingBoxIC
variable = a
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[../]
[./b]
type = BoundingBoxIC
variable = b
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[../]
[./pressure]
type = FunctionIC
variable = pressure
function = 2-x
[../]
[]
[ReactionNetwork]
[./AqueousEquilibriumReactions]
primary_species = 'a b'
reactions = '2a = pa2 2,
(1.0)a + (1.0)b = pab -2'
secondary_species = 'pa2 pab'
pressure = pressure
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./a_diff]
type = PrimaryDiffusion
variable = a
[../]
[./a_conv]
type = PrimaryConvection
variable = a
p = pressure
[../]
[./b_ie]
type = PrimaryTimeDerivative
variable = b
[../]
[./b_diff]
type = PrimaryDiffusion
variable = b
[../]
[./b_conv]
type = PrimaryConvection
variable = b
p = pressure
[../]
[]
[BCs]
[./a_left]
type = DirichletBC
variable = a
boundary = left
value = 1.0e-2
[../]
[./a_right]
type = ChemicalOutFlowBC
variable = a
boundary = right
[../]
[./b_left]
type = DirichletBC
variable = b
boundary = left
value = 1.0e-2
[../]
[./b_right]
type = ChemicalOutFlowBC
variable = b
boundary = right
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity'
prop_values = '1e-4 1e-4 0.2'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
nl_abs_tol = 1e-12
end_time = 10
dt = 10
[]
[Outputs]
file_base = equilibrium_out
exodus = true
perf_graph = true
print_linear_residuals = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
(modules/solid_mechanics/test/tests/central_difference/lumped/1D/1d_lumped_explicit.i)
# Test for central difference integration for a 1D element
[Mesh]
[./generated_mesh]
type = GeneratedMeshGenerator
xmin = 0
xmax = 10
nx = 5
dim = 1
[../]
[]
[Variables]
[./disp_x]
[../]
[]
[AuxVariables]
[./accel_x]
[../]
[./vel_x]
[../]
[]
[AuxKernels]
[./accel_x]
type = TestNewmarkTI
variable = accel_x
displacement = disp_x
first = false
[../]
[./vel_x]
type = TestNewmarkTI
variable = vel_x
displacement = disp_x
[../]
[]
[Kernels]
[./DynamicSolidMechanics]
displacements = 'disp_x'
[../]
[./inertia_x]
type = InertialForce
variable = disp_x
[../]
[]
[NodalKernels]
[./force_x]
type = UserForcingFunctionNodalKernel
variable = disp_x
boundary = right
function = force_x
[../]
[]
[Functions]
[./force_x]
type = PiecewiseLinear
x = '0.0 1.0 2.0 3.0 4.0' # time
y = '0.0 1.0 0.0 -1.0 0.0' # force
scale_factor = 1e3
[../]
[]
[BCs]
[./fixx1]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor_block]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.25
block = 0
[../]
[./strain_block]
type = ComputeIncrementalSmallStrain
block = 0
displacements = 'disp_x'
implicit = false
[../]
[./stress_block]
type = ComputeFiniteStrainElasticStress
block = 0
[../]
[./density]
type = GenericConstantMaterial
block = 0
prop_names = density
prop_values = 2500
[../]
[]
[Executioner]
type = Transient
start_time = -0.01
end_time = 0.1
timestep_tolerance = 2e-10
dt = 0.005
[./TimeIntegrator]
type = CentralDifference
solve_type = lumped
[../]
[]
[Postprocessors]
[./accel_x]
type = PointValue
point = '10.0 0.0 0.0'
variable = accel_x
[../]
[]
[Outputs]
exodus = false
csv = true
[]
(test/tests/materials/discrete/reset_warning.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = MatDiffusionTest
variable = u
prop_name = 'prop'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'prop'
prop_values = 1
compute = false # testing that this produces warning because resetQpProperties is not re-defined
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-fretting-wear-test.i)
starting_point = 0.5e-1
offset = -0.045
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[normal_lm]
block = 3
use_dual = true
# scaling = 1.0e-5
[]
[frictional_lm]
block = 3
use_dual = true
scaling = 1.0e-5
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[DynamicTensorMechanics]
displacements = 'disp_x disp_y'
generate_output = 'stress_xx stress_yy'
strain = FINITE
block = '1 2'
zeta = 0.04
hht_alpha = 0.0
[]
[inertia_x]
type = InertialForce
variable = disp_x
velocity = vel_x
acceleration = accel_x
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[inertia_y]
type = InertialForce
variable = disp_y
velocity = vel_y
acceleration = accel_y
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[strain]
type = ComputeFiniteStrain
block = '1 2'
[]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '7750'
[]
[]
[AuxVariables]
[worn_depth]
block = '3'
[]
[gap_vel]
block = '3'
[]
[vel_x]
block = '1 2'
[]
[accel_x]
block = '1 2'
[]
[vel_y]
block = '1 2'
[]
[accel_y]
block = '1 2'
[]
[vel_z]
block = '1 2'
[]
[accel_z]
block = '1 2'
[]
[]
[AuxKernels]
[gap_vel]
type = WeightedGapVelAux
variable = gap_vel
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
disp_x = disp_x
disp_y = disp_y
[]
[worn_depth]
type = MortarArchardsLawAux
variable = worn_depth
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
displacements = 'disp_x disp_y'
friction_coefficient = 0.5
energy_wear_coefficient = 1.0e-6
normal_pressure = normal_lm
execute_on = 'TIMESTEP_END'
[]
[accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = 'linear timestep_end'
[]
[vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = 'linear timestep_end'
[]
[accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = 'linear timestep_end'
[]
[vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = 'linear timestep_end'
[]
[]
[UserObjects]
[weighted_vel_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
secondary_variable = disp_x
lm_variable_normal = normal_lm
lm_variable_tangential_one = frictional_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeDynamicFrictionalForceLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
wear_depth = worn_depth
c = 1e6
c_t = 1e6
normalize_c = true
mu = 0.5
friction_lm = frictional_lm
capture_tolerance = 1.0e-5
newmark_beta = 0.25
newmark_gamma = 0.5
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
weighted_gap_uo = weighted_vel_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(4.0 * pi / 4 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-5 * (cos(32.0 * pi / 4 * t) - 1.0)'
[]
[]
[Executioner]
type = Transient
end_time = 0.5
dt = 0.05
dtmin = .002
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15'
nl_max_its = 40
l_max_its = 15
line_search = none
snesmf_reuse_base = true
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'contact'
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/fsi/test/tests/2d-finite-strain-steady/thermal-me.i)
# Units: specific_heat_capacity--cp--J/(kg.K); density--rho--kg/(cm^3);
# dynamic_viscosity--mu--kg/(cm.s); thermal_conductivity--k--W/(cm.K);
# pressure--kg/(cm.s^2); force--kg.cm/s^2
outlet_pressure = 0
inlet_velocity = 150 # cm/s
ini_temp = 593 # K
heat_transfer_coefficient = 9 # W/(cm2.K)
g = -981 # cm/s2
alpha_fluid = 2e-4 # thermal expansion coefficient of fluid used in INSADBoussinesqBodyForce
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = '2layers_2d_midline.msh'
[]
[Variables]
[velocity]
family = LAGRANGE_VEC
order = FIRST
block = 'fluid'
[]
[p]
family = LAGRANGE
order = FIRST
block = 'fluid'
[]
[Tf]
family = LAGRANGE
order = FIRST
block = 'fluid'
[]
[Ts]
family = LAGRANGE
order = FIRST
block = 'solid'
[]
[disp_x]
family = LAGRANGE
order = FIRST
block = 'solid fluid'
[]
[disp_y]
family = LAGRANGE
order = FIRST
block = 'solid fluid'
[]
[]
[AuxVariables]
[heat_source]
family = MONOMIAL
order = FIRST
block = 'solid'
[]
[]
[ICs]
[initial_velocity]
type = VectorConstantIC
variable = velocity
x_value = 0
y_value = ${inlet_velocity}
z_value = 0
[]
[initial_p]
type = FunctionIC
variable = p
function = ini_p
[]
[initial_Tf]
type = ConstantIC
variable = Tf
value = ${ini_temp}
[]
[initial_Ts]
type = ConstantIC
variable = Ts
value = ${ini_temp}
[]
[]
[Kernels]
[fluid_mass]
type = INSADMass
variable = p
use_displaced_mesh = true
[]
[fluid_mass_pspg]
type = INSADMassPSPG
variable = p
use_displaced_mesh = true
[]
[fluid_momentum_time]
type = INSADMomentumTimeDerivative
variable = velocity
use_displaced_mesh = true
[]
[fluid_momentum_convection]
type = INSADMomentumAdvection
variable = velocity
use_displaced_mesh = true
[]
[fluid_momentum_viscous]
type = INSADMomentumViscous
variable = velocity
use_displaced_mesh = true
[]
[fluid_momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
use_displaced_mesh = true
[]
[fluid_momentum_gravity]
type = INSADGravityForce
variable = velocity
gravity = '0 ${g} 0'
use_displaced_mesh = true
[]
[fluid_momentum_buoyancy]
type = INSADBoussinesqBodyForce
variable = velocity
gravity = '0 ${g} 0'
alpha_name = 'alpha_fluid'
ref_temp = 'T_ref'
temperature = Tf
use_displaced_mesh = true
[]
[fluid_momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
use_displaced_mesh = true
[]
[fluid_temperature_time]
type = INSADHeatConductionTimeDerivative
variable = Tf
use_displaced_mesh = true
[]
[fluid_temperature_conduction]
type = ADHeatConduction
variable = Tf
thermal_conductivity = 'k'
use_displaced_mesh = true
[]
[fluid_temperature_advection]
type = INSADEnergyAdvection
variable = Tf
use_displaced_mesh = true
[]
[fluid_temperature_supg]
type = INSADEnergySUPG
variable = Tf
velocity = velocity
use_displaced_mesh = true
[]
[solid_temperature_time]
type = ADHeatConductionTimeDerivative
variable = Ts
density_name = 'rho'
specific_heat = 'cp'
block = 'solid'
use_displaced_mesh = true
[]
[solid_temperature_conduction]
type = ADHeatConduction
variable = Ts
thermal_conductivity = 'k'
block = 'solid'
use_displaced_mesh = true
[]
[heat_source]
type = ADCoupledForce
variable = Ts
v = heat_source
block = 'solid'
use_displaced_mesh = true
[]
[disp_x_smooth]
type = Diffusion
variable = disp_x
block = fluid
[]
[disp_y_smooth]
type = Diffusion
variable = disp_y
block = fluid
[]
[]
[Modules/TensorMechanics/Master]
strain = FINITE
material_output_order = FIRST
generate_output = 'vonmises_stress stress_xx stress_yy stress_zz strain_xx strain_yy strain_zz'
[solid]
block = 'solid'
temperature = Ts
automatic_eigenstrain_names = true
[]
[]
[InterfaceKernels]
[convection_heat_transfer]
type = ConjugateHeatTransfer
variable = Tf
T_fluid = Tf
neighbor_var = 'Ts'
boundary = 'solid_wall'
htc = 'htc'
use_displaced_mesh = true
[]
[]
[AuxKernels]
[heat_source_distribution_auxk]
type = FunctionAux
variable = heat_source
function = heat_source_distribution_function
block = 'solid'
use_displaced_mesh = true
[]
[]
[BCs]
[no_slip]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'solid_wall'
use_displaced_mesh = true
[]
[inlet_velocity]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'fluid_bottom'
function_y = ${inlet_velocity}
use_displaced_mesh = true
[]
[symmetry]
type = ADVectorFunctionDirichletBC
variable = velocity
boundary = 'fluid_wall'
function_x = 0
set_x_comp = true
set_y_comp = false
set_z_comp = false
use_displaced_mesh = true
[]
[outlet_p]
type = DirichletBC
variable = p
boundary = 'fluid_top'
value = ${outlet_pressure}
use_displaced_mesh = true
[]
[inlet_T]
type = DirichletBC
variable = Tf
boundary = 'fluid_bottom'
value = ${ini_temp}
use_displaced_mesh = true
[]
[pin1_y]
type = DirichletBC
variable = disp_y
boundary = 'pin1'
value = 0
use_displaced_mesh = true
[]
[pin1_x]
type = DirichletBC
variable = disp_x
boundary = 'pin1'
value = 0
use_displaced_mesh = true
[]
[top_and_bottom_y]
type = DirichletBC
variable = disp_y
boundary = 'solid_bottom solid_top fluid_top fluid_bottom'
value = 0
use_displaced_mesh = true
[]
[left_and_right_x]
type = DirichletBC
variable = disp_x
boundary = 'fluid_wall fluid_bottom'
value = 0
use_displaced_mesh = true
[]
[]
[Materials]
[rho_solid]
type = ADParsedMaterial
property_name = rho
expression = '0.0110876 * pow(9.9672e-1 + 1.179e-5 * Ts - 2.429e-9 * pow(Ts,2) + 1.219e-12 * pow(Ts,3),-3)'
coupled_variables = 'Ts'
block = 'solid'
use_displaced_mesh = true
[]
[cp_solid]
type = ADParsedMaterial
property_name = cp
expression = '0.76 * ((302.27 * pow((548.68 / Ts),2) * exp(548.68 / Ts)) / pow((exp(548.68 / Ts) - 1),2) + 2 * 8.463e-3 * Ts + 8.741e7 * 18531.7 * exp(-18531.7 / Ts) / pow(Ts,2)) + 0.24 * ((322.49 * pow((587.41/Ts),2) * exp(587.41 / Ts)) / pow((exp(587.41 / Ts) - 1),2) + 2 * 1.4679e-2 * Ts)'
coupled_variables = 'Ts'
block = 'solid'
use_displaced_mesh = true
[]
[k_solid]
type = ADParsedMaterial
property_name = k
expression = '1.158/(7.5408 + 17.692 * (Ts / 1000) + 3.6142 * pow((Ts/1000),2)) + 74.105 * pow((Ts / 1000),-2.5) * exp(-16.35 / (Ts / 1000))'
coupled_variables = 'Ts'
block = 'solid'
use_displaced_mesh = true
[]
[rho_fluid]
type = ADParsedMaterial
property_name = rho
expression = '(11096 - 1.3236 * Tf) * 1e-6'
coupled_variables = 'Tf'
block = 'fluid'
use_displaced_mesh = true
[]
[cp_fluid]
type = ADParsedMaterial
property_name = cp
expression = '159 - 2.72e-2 * Tf + 7.12e-6 * pow(Tf,2)'
coupled_variables = 'Tf'
block = 'fluid'
use_displaced_mesh = true
[]
[k_fluid]
type = ADParsedMaterial
property_name = k
expression = '(3.61 + 1.517e-2 * Tf - 1.741e-6 * pow(Tf,2)) * 1e-2'
coupled_variables = 'Tf'
block = 'fluid'
use_displaced_mesh = true
[]
[mu_fluid]
type = ADParsedMaterial
property_name = mu
expression = '4.94e-6 * exp(754.1/Tf)'
coupled_variables = 'Tf'
block = 'fluid'
use_displaced_mesh = true
[]
[buoyancy_thermal_expansion_coefficient_fluid]
type = ADGenericConstantMaterial
prop_names = 'alpha_fluid'
prop_values = '${alpha_fluid}'
block = 'fluid'
use_displaced_mesh = true
[]
[buoyancy_reference_temperature_fluid]
type = GenericConstantMaterial
prop_names = 'T_ref'
prop_values = '${ini_temp}'
block = 'fluid'
use_displaced_mesh = true
[]
[ins_mat_fluid]
type = INSADStabilized3Eqn
velocity = velocity
pressure = p
temperature = Tf
block = 'fluid'
use_displaced_mesh = true
[]
[htc]
type = ADGenericFunctionMaterial
prop_names = htc
prop_values = htc_function
use_displaced_mesh = true
[]
[elasticity_solid]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2e7
poissons_ratio = 0.32
block = 'solid'
use_displaced_mesh = true
[]
[thermal_expansion_solid]
type = ComputeThermalExpansionEigenstrain
temperature = Ts
thermal_expansion_coeff = 2e-4
stress_free_temperature = 593
eigenstrain_name = thermal_expansion
block = 'solid'
use_displaced_mesh = true
[]
[stress_solid]
type = ComputeFiniteStrainElasticStress
block = 'solid'
[]
[]
[Functions]
[htc_function]
type = ParsedFunction
expression = ${heat_transfer_coefficient}
[]
[ini_p]
type = ParsedFunction
expression = '0.010302 * 981 * (10 - y)'
[]
[heat_source_distribution_function]
type = ParsedFunction
expression = '300 * sin(pi * y / 10)'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
solve_type = 'PJFNK'
[]
[]
[Executioner]
type = Transient
end_time = 1e4
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
nl_max_its = 30
l_max_its = 100
automatic_scaling = true
compute_scaling_once = true
off_diagonals_in_auto_scaling = true
dtmin = 1
nl_abs_tol = 1e-12
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 6
growth_factor = 1.5
dt = 1
[]
[]
[Outputs]
[csv]
type = CSV
file_base = 'thermal-me'
execute_on = 'final'
[]
[]
[Postprocessors]
[average_solid_Ts]
type = ElementAverageValue
variable = Ts
block = 'solid'
use_displaced_mesh = true
[]
[average_fluid_Tf]
type = ElementAverageValue
variable = Tf
block = 'fluid'
use_displaced_mesh = true
[]
[max_solid_Ts]
type = ElementExtremeValue
variable = Ts
value_type = max
block = 'solid'
use_displaced_mesh = true
[]
[max_fluid_Tf]
type = ElementExtremeValue
variable = Tf
value_type = max
block = 'fluid'
use_displaced_mesh = true
[]
[min_solid_Ts]
type = ElementExtremeValue
variable = Ts
value_type = min
block = 'solid'
use_displaced_mesh = true
[]
[min_fluid_Tf]
type = ElementExtremeValue
variable = Tf
value_type = min
block = 'fluid'
use_displaced_mesh = true
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/contact/test/tests/mortar_dynamics/block-dynamics-friction-creep.i)
starting_point = 1e-1
offset = -0.095
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[normal_lm]
block = 3
use_dual = true
[]
[frictional_lm]
block = 3
use_dual = true
[]
[]
[AuxVariables]
[creep_strain_xx]
order = CONSTANT
family = MONOMIAL
block = '2'
[]
[creep_strain_yy]
order = CONSTANT
family = MONOMIAL
block = '2'
[]
[creep_strain_xy]
order = CONSTANT
family = MONOMIAL
block = '2'
[]
[]
[AuxKernels]
[creep_strain_xx]
type = RankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xx
index_i = 0
index_j = 0
block = '2'
[]
[creep_strain_yy]
type = RankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_yy
index_i = 1
index_j = 1
block = '2'
[]
[creep_strain_xy]
type = RankTwoAux
rank_two_tensor = creep_strain
variable = creep_strain_xy
index_i = 0
index_j = 1
block = '2'
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Modules/TensorMechanics/DynamicMaster]
[all]
add_variables = true
alpha = 0.0
newmark_beta = 0.25
newmark_gamma = 0.5
mass_damping_coefficient = 0.0
stiffness_damping_coefficient = 0.01
displacements = 'disp_x disp_y'
generate_output = 'stress_xx stress_yy'
block = '1 2'
strain = FINITE
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.3
[]
[multiple_inelastic]
type = ComputeMultipleInelasticStress
inelastic_models = 'creep'
block = '2'
[]
[creep]
type = PowerLawCreepStressUpdate
coefficient = 1.0e-23 # 10e-24
n_exponent = 4
activation_energy = 0
block = '2'
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '775'
[]
[]
# User object provides the contact force (e.g. LM)
# for the application of the generalized force
[UserObjects]
[weighted_vel_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
lm_variable_normal = normal_lm
lm_variable_tangential_one = frictional_lm
secondary_variable = disp_x
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeDynamicFrictionalForceLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
friction_lm = frictional_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
c = 1e4
c_t = 1e4
mu = 0.5
interpolate_normals = false
newmark_beta = 0.25
newmark_gamma = 0.5
capture_tolerance = 1e-04
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 4 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 30 # 50
function = '1e-2*t' #'0.1 *sin(2 * pi / 12 * t)'
[]
[]
[Executioner]
type = Transient
end_time = 0.25
dt = 0.05
dtmin = 0.05
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err '
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
nl_max_its = 50
line_search = 'none'
snesmf_reuse_base = false
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
checkpoint = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/chemical_reactions/test/tests/aqueous_equilibrium/calcium_bicarbonate.i)
# Calcium (Ca++) and bicarbonate (HCO3-) batch equilibrium reaction at 25C
#
# Aqueous equilibrium reactions:
# a) H+ + HCO3- = CO2(aq), Keq = 10^(6.3447)
# b) HCO3- = H+ + CO3--, Keq = 10^(-10.3288)
# c) Ca++ + HCO3- = H+ + CaCO3(aq), Keq = 10^(-7.0017)
# d) Ca++ + HCO3- = CaHCO3+, Keq = 10^(1.0467)
# e) Ca++ = H+ + CaOH+, Keq = 10^(-12.85)
# c) - H+ = OH-, Keq = 10^(-13.9951)
# d)
#
# The primary chemical species are Ca++, H+ and HCO3-, and the secondary equilibrium
# species are CO2(aq), CO3--, CaCO3(aq), CaHCO3+, CaOH+ and OH-
[Mesh]
type = GeneratedMesh
dim = 2
[]
[AuxVariables]
[./ph]
[../]
[./total_ca++]
[../]
[./total_h+]
[../]
[./total_hco3-]
[../]
[]
[AuxKernels]
[./ph]
type = PHAux
variable = ph
h_conc = h+
[../]
[./total_ca++]
type = TotalConcentrationAux
variable = total_ca++
primary_species = ca++
v = 'caco3_aq cahco3+ caoh+'
sto_v = '1 1 1'
[../]
[./total_h+]
type = TotalConcentrationAux
variable = total_h+
primary_species = h+
v = 'co2_aq co3-- caco3_aq oh-'
sto_v = '1 -1 -1 -1'
[../]
[./total_hco3-]
type = TotalConcentrationAux
variable = total_hco3-
primary_species = hco3-
v = 'co2_aq co3-- caco3_aq cahco3+'
sto_v = '1 1 1 1'
[../]
[]
[Variables]
[./ca++]
initial_condition = 1.0e-5
[../]
[./h+]
initial_condition = 1.0e-5
[../]
[./hco3-]
initial_condition = 3.0e-5
[../]
[]
[ReactionNetwork]
[./AqueousEquilibriumReactions]
primary_species = 'ca++ hco3- h+'
secondary_species = 'co2_aq co3-- caco3_aq cahco3+ caoh+ oh-'
reactions = 'h+ + hco3- = co2_aq 6.3447,
hco3- - h+ = co3-- -10.3288,
ca++ + hco3- - h+ = caco3_aq -7.0017,
ca++ + hco3- = cahco3+ 1.0467,
ca++ - h+ = caoh+ -12.85,
- h+ = oh- -13.9951'
[../]
[]
[Kernels]
[./ca++_ie]
type = PrimaryTimeDerivative
variable = ca++
[../]
[./h+_ie]
type = PrimaryTimeDerivative
variable = h+
[../]
[./hco3-_ie]
type = PrimaryTimeDerivative
variable = hco3-
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity porosity conductivity'
prop_values = '1e-7 0.25 1.0'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
nl_abs_tol = 1e-12
end_time = 1
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
[./ca++]
type = ElementIntegralVariablePostprocessor
variable = ca++
execute_on = 'initial timestep_end'
[../]
[./h+]
type = ElementIntegralVariablePostprocessor
variable = h+
execute_on = 'initial timestep_end'
[../]
[./hco3-]
type = ElementIntegralVariablePostprocessor
variable = hco3-
execute_on = 'initial timestep_end'
[../]
[./co2_aq]
type = ElementIntegralVariablePostprocessor
variable = co2_aq
execute_on = 'initial timestep_end'
[../]
[./co3--]
type = ElementIntegralVariablePostprocessor
variable = co3--
execute_on = 'initial timestep_end'
[../]
[./caco3_aq]
type = ElementIntegralVariablePostprocessor
variable = caco3_aq
execute_on = 'initial timestep_end'
[../]
[./cahco3+]
type = ElementIntegralVariablePostprocessor
variable = cahco3+
execute_on = 'initial timestep_end'
[../]
[./caoh+]
type = ElementIntegralVariablePostprocessor
variable = caoh+
execute_on = 'initial timestep_end'
[../]
[./oh-]
type = ElementIntegralVariablePostprocessor
variable = oh-
execute_on = 'initial timestep_end'
[../]
[./ph]
type = ElementIntegralVariablePostprocessor
variable = ph
execute_on = 'initial timestep_end'
[../]
[./total_ca++]
type = ElementIntegralVariablePostprocessor
variable = total_ca++
execute_on = 'initial timestep_end'
[../]
[./total_hco3-]
type = ElementIntegralVariablePostprocessor
variable = total_hco3-
execute_on = 'initial timestep_end'
[../]
[./total_h+]
type = ElementIntegralVariablePostprocessor
variable = total_h+
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
perf_graph = 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/combined/examples/phase_field-mechanics/Conserved.i)
#
# Example 1
# Illustrating the coupling between chemical and mechanical (elastic) driving forces.
# An oversized precipitate deforms under a uniaxial compressive stress
# Check the file below for comments and suggestions for parameter modifications.
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 40
nz = 0
xmin = 0
xmax = 50
ymin = 0
ymax = 50
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 0
y1 = 0
radius = 25.0
invalue = 1.0
outvalue = 0.0
int_width = 50.0
[../]
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./TensorMechanics]
displacements = 'disp_x disp_y'
[../]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[]
#
# The AuxVariables and AuxKernels below are added to visualize the xx and yy stress tensor components
#
[AuxVariables]
[./sigma11_aux]
order = CONSTANT
family = MONOMIAL
[../]
[./sigma22_aux]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./matl_sigma11]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = sigma11_aux
[../]
[./matl_sigma22]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = sigma22_aux
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1 5'
block = 0
#kappa = 0.1
#mob = 1e-3
[../]
# simple chemical free energy with a miscibility gap
[./chemical_free_energy]
type = DerivativeParsedMaterial
block = 0
property_name = Fc
coupled_variables = 'c'
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 1.0e-2'
expression = 16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2
enable_jit = true
derivative_order = 2
[../]
# undersized solute (voidlike)
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
# lambda, mu values
C_ijkl = '7 7'
# Stiffness tensor is created from lambda=7, mu=7 using symmetric_isotropic fill method
fill_method = symmetric_isotropic
# See RankFourTensor.h for details on fill methods
# '15 15' results in a high stiffness (the elastic free energy will dominate)
# '7 7' results in a low stiffness (the chemical free energy will dominate)
[../]
[./stress]
type = ComputeLinearElasticStress
block = 0
[../]
[./var_dependence]
type = DerivativeParsedMaterial
block = 0
# eigenstrain coefficient
# -0.1 will result in an undersized precipitate
# 0.1 will result in an oversized precipitate
expression = 0.1*c
coupled_variables = c
f_name = var_dep
enable_jit = true
derivative_order = 2
[../]
[./eigenstrain]
type = ComputeVariableEigenstrain
block = 0
eigen_base = '1 1 1 0 0 0'
prefactor = var_dep
#outputs = exodus
args = 'c'
eigenstrain_name = eigenstrain
[../]
[./strain]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y'
eigenstrain_names = eigenstrain
[../]
[./elastic_free_energy]
type = ElasticEnergyMaterial
f_name = Fe
block = 0
args = 'c'
derivative_order = 2
[../]
# Sum up chemical and elastic contributions
[./free_energy]
type = DerivativeSumMaterial
block = 0
property_name = F
sum_materials = 'Fc Fe'
coupled_variables = 'c'
derivative_order = 2
[../]
[]
[BCs]
[./bottom_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0
[../]
[./top_y]
type = DirichletBC
variable = disp_y
boundary = 'top'
# prescribed displacement
# -5 will result in a compressive stress
# 5 will result in a tensile stress
value = -5
[../]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 'left'
value = 0
[../]
[]
[Preconditioning]
# active = ' '
[./SMP]
type = SMP
full = true
[../]
[]
[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
num_steps = 200
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 1
[../]
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_by_parts_steady_nobcbc.i)
[GlobalParams]
integrate_p_by_parts = true
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[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
[../]
[./p]
[../]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[./momentum_convection]
type = INSADMomentumAdvection
variable = velocity
[../]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
[../]
[]
[BCs]
[inlet]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom'
function_x = 0
function_y = 'inlet_func'
[../]
[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 = top_right
value = 0
variable = p
[]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[ins_mat]
type = INSADMaterial
velocity = velocity
pressure = p
[]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[../]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_htonly/gap_heat_transfer_htonly_rz_test.i)
#
# 2-D RZ Gap Heat Transfer Test without mechanics
#
# This test exercises 1-D gap heat transfer for a constant conductivity gap.
#
# The mesh consists of two element blocks containing one element each. Each
# element is a unit cube. They sit next to one another with a unit between them.
#
# The conductivity of both blocks is set very large to achieve a uniform temperature
# across each block. The temperature of the far left boundary
# is ramped from 100 to 200 over one time unit, and then held fixed for an additional
# time unit. The temperature of the far right boundary is held fixed at 100.
#
# A simple analytical solution is possible for the heat flux between the blocks, or cylinders in the case of RZ.:
#
# Flux = (T_left - T_right) * (gapK/(r*ln(r2/r1)))
#
# For gapK = 1 (default value)
#
# The integrated heat flux across the gap at time 2 is then:
#
# 2*pi*h*k*delta_T/(ln(r2/r1))
# 2*pi*1*1*100/(ln(2/1)) = 906.5 watts
#
# For comparison, see results from the flux post processors.
#
# As a second test, use the rectilinear (parallel plate) form of the gap heat transfer.
#
# Flux = (T_left - T_right) * (gapK/gapL)
#
# For gapK = 1 (default value)
#
# The integrated heat flux across the gap at time 2 is then:
#
# 2*pi*h*k*delta_T/(1)
# 2*pi*1*1*100/(1) = 628.3 watts
#
# For comparison, see results from the flux post processors.
#
[Problem]
coord_type = RZ
rz_coord_axis = Y # this is modified through CLI args to test Z-R as opposed to R-Z
[]
[Mesh]
active = 'file'
[file]
type = FileMeshGenerator
file = gap_heat_transfer_htonly_rz_test.e
[]
[rotate]
type = TransformGenerator
transform = ROTATE
vector_value = '90 0 0'
input = file
[]
[]
[Functions]
[./ramp]
type = PiecewiseLinear
x = '0 1 2'
y = '100 200 200'
[../]
[]
[ThermalContact]
[./thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 3
secondary = 2
emissivity_primary = 0
emissivity_secondary = 0
[../]
[./thermal_contact2]
type = GapHeatTransfer
variable = temp2
primary = 3
secondary = 2
emissivity_primary = 0
emissivity_secondary = 0
gap_geometry_type = PLATE
appended_property_name = 2
[../]
[]
[Variables]
[./temp]
order = FIRST
family = LAGRANGE
initial_condition = 100
[../]
[./temp2]
order = FIRST
family = LAGRANGE
initial_condition = 100
[../]
[]
[AuxVariables]
[./gap_cond]
order = CONSTANT
family = MONOMIAL
[../]
[./gap_cond2]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = temp
[../]
[./heat2]
type = HeatConduction
variable = temp2
[../]
[]
[BCs]
[./temp_far_left]
type = FunctionDirichletBC
boundary = 1
variable = temp
function = ramp
[../]
[./temp_far_right]
type = DirichletBC
boundary = 4
variable = temp
value = 100
[../]
[./temp_far_left2]
type = FunctionDirichletBC
boundary = 1
variable = temp2
function = ramp
[../]
[./temp_far_right2]
type = DirichletBC
boundary = 4
variable = temp2
value = 100
[../]
[]
[AuxKernels]
[./conductance]
type = MaterialRealAux
property = gap_conductance
variable = gap_cond
boundary = 2
[../]
[./conductance2]
type = MaterialRealAux
property = gap_conductance
variable = gap_cond2
boundary = 2
[../]
[]
[Materials]
[./heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 1e6
[../]
[./density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '1.0'
[../]
[]
[Executioner]
type = Transient
# petsc_options = '-snes_mf_operator -ksp_monitor -snes_ksp_ew'
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
# petsc_options_iname = '-snes_type -snes_ls -snes_linesearch_type -ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
# petsc_options_value = 'ls basic basic 201 hypre boomeramg 4'
# petsc_options_iname = '-ksp_gmres_restart -pc_type -pc_hypre_type -pc_hypre_boomeramg_max_iter'
# petsc_options_value = '201 hypre boomeramg 4'
nl_abs_tol = 1e-3
nl_rel_tol = 1e-8
l_tol = 1e-6
l_max_its = 100
start_time = 0.0
dt = 1e-1
dtmin = 1e-1
end_time = 2.0
[]
[Postprocessors]
[./temp_left]
type = SideAverageValue
boundary = 2
variable = temp
execute_on = 'initial timestep_end'
[../]
[./temp_right]
type = SideAverageValue
boundary = 3
variable = temp
execute_on = 'initial timestep_end'
[../]
[./flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
[../]
[./flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
[../]
[./temp_left2]
type = SideAverageValue
boundary = 2
variable = temp2
execute_on = 'initial timestep_end'
[../]
[./temp_right2]
type = SideAverageValue
boundary = 3
variable = temp2
execute_on = 'initial timestep_end'
[../]
[./flux_left2]
type = SideDiffusiveFluxIntegral
variable = temp2
boundary = 2
diffusivity = thermal_conductivity
[../]
[./flux_right2]
type = SideDiffusiveFluxIntegral
variable = temp2
boundary = 3
diffusivity = thermal_conductivity
[../]
[]
[Outputs]
exodus = true
[]
(modules/phase_field/examples/anisotropic_interfaces/GrandPotentialPlanarGrowth.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmin = -2
xmax = 2
ymin = -2
ymax = 2
uniform_refine = 2
[]
[GlobalParams]
x1 = -2
y1 = -2
x2 = 2
y2 = -1.5
derivative_order = 2
[]
[Variables]
[./w]
[../]
[./etaa0]
[../]
[./etab0]
[../]
[]
[AuxVariables]
[./bnds]
[../]
#Temperature
[./T]
[../]
[]
[AuxKernels]
[./bnds]
type = BndsCalcAux
variable = bnds
v = 'etaa0 etab0'
[../]
[./T]
type = FunctionAux
function = 95.0+2.0*(y-1.0*t)
variable = T
execute_on = 'initial timestep_begin'
[../]
[]
[ICs]
[./w]
type = BoundingBoxIC
variable = w
# note w = A*(c-cleq), A = 1.0, cleq = 0.0 ,i.e., w = c (in the matrix/liquid phase)
outside = -4.0
inside = 0.0
[../]
[./etaa0]
type = BoundingBoxIC
variable = etaa0
#Solid phase
outside = 0.0
inside = 1.0
[../]
[./etab0]
type = BoundingBoxIC
variable = etab0
#Liquid phase
outside = 1.0
inside = 0.0
[../]
[]
[Kernels]
# Order parameter eta_alpha0
[./ACa0_bulk]
type = ACGrGrMulti
variable = etaa0
v = 'etab0'
gamma_names = 'gab'
[../]
[./ACa0_sw]
type = ACSwitching
variable = etaa0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etab0 w'
[../]
[./ACa0_int1]
type = ACInterface2DMultiPhase1
variable = etaa0
etas = 'etab0'
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
d2kappadgrad_etaa_name = d2kappadgrad_etaa
[../]
[./ACa0_int2]
type = ACInterface2DMultiPhase2
variable = etaa0
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
[../]
[./ea0_dot]
type = TimeDerivative
variable = etaa0
[../]
# Order parameter eta_beta0
[./ACb0_bulk]
type = ACGrGrMulti
variable = etab0
v = 'etaa0'
gamma_names = 'gab'
[../]
[./ACb0_sw]
type = ACSwitching
variable = etab0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etaa0 w'
[../]
[./ACb0_int1]
type = ACInterface2DMultiPhase1
variable = etab0
etas = 'etaa0'
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
d2kappadgrad_etaa_name = d2kappadgrad_etab
[../]
[./ACb0_int2]
type = ACInterface2DMultiPhase2
variable = etab0
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
[../]
[./eb0_dot]
type = TimeDerivative
variable = etab0
[../]
#Chemical potential
[./w_dot]
type = SusceptibilityTimeDerivative
variable = w
f_name = chi
[../]
[./Diffusion]
type = MatDiffusion
variable = w
diffusivity = Dchi
[../]
[./coupled_etaa0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etaa0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0'
[../]
[./coupled_etab0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etab0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0'
[../]
[]
[Materials]
[./ha]
type = SwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'etaa0 etab0'
phase_etas = 'etaa0'
[../]
[./hb]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etaa0 etab0'
phase_etas = 'etab0'
[../]
[./omegaa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegaa
material_property_names = 'Vm ka caeq'
expression = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
[../]
[./omegab]
type = DerivativeParsedMaterial
coupled_variables = 'w T'
property_name = omegab
material_property_names = 'Vm kb cbeq S Tm'
expression = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq-S*(T-Tm)'
[../]
[./rhoa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhoa
material_property_names = 'Vm ka caeq'
expression = 'w/Vm^2/ka + caeq/Vm'
[../]
[./rhob]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhob
material_property_names = 'Vm kb cbeq'
expression = 'w/Vm^2/kb + cbeq/Vm'
[../]
[./kappaa]
type = InterfaceOrientationMultiphaseMaterial
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
d2kappadgrad_etaa_name = d2kappadgrad_etaa
etaa = etaa0
etab = etab0
outputs = exodus
output_properties = 'kappaa'
[../]
[./kappab]
type = InterfaceOrientationMultiphaseMaterial
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
d2kappadgrad_etaa_name = d2kappadgrad_etab
etaa = etab0
etab = etaa0
outputs = exodus
output_properties = 'kappab'
[../]
[./const]
type = GenericConstantMaterial
prop_names = 'L D chi Vm ka caeq kb cbeq gab mu S Tm'
prop_values = '1.0 1.0 0.1 1.0 10.0 0.1 10.0 0.9 4.5 10.0 1.0 100.0'
[../]
[./Mobility]
type = ParsedMaterial
property_name = Dchi
material_property_names = 'D chi'
expression = 'D*chi'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_tol = 1.0e-3
l_max_its = 30
nl_max_its = 15
nl_rel_tol = 1.0e-8
nl_abs_tol = 1e-8
end_time = 2.0
[./TimeStepper]
type = IterationAdaptiveDT
dt = 0.0005
cutback_factor = 0.7
growth_factor = 1.2
[../]
[]
[Adaptivity]
initial_steps = 3
max_h_level = 3
initial_marker = err_eta
marker = err_bnds
[./Markers]
[./err_eta]
type = ErrorFractionMarker
coarsen = 0.3
refine = 0.95
indicator = ind_eta
[../]
[./err_bnds]
type = ErrorFractionMarker
coarsen = 0.3
refine = 0.95
indicator = ind_bnds
[../]
[../]
[./Indicators]
[./ind_eta]
type = GradientJumpIndicator
variable = etaa0
[../]
[./ind_bnds]
type = GradientJumpIndicator
variable = bnds
[../]
[../]
[]
[Outputs]
time_step_interval = 10
exodus = true
[]
(modules/solid_mechanics/test/tests/poro/vol_expansion.i)
# Apply an increasing porepressure, with zero mechanical forces,
# and observe the corresponding volumetric expansion
#
# P = t
# With the Biot coefficient being 2.0, the effective stresses should be
# stress_xx = stress_yy = stress_zz = 2t
# With bulk modulus = 1 then should have
# vol_strain = strain_xx + strain_yy + strain_zz = 2t.
# I use a single element lying 0<=x<=1, 0<=y<=1 and 0<=z<=1, and
# fix the left, bottom and back boundaries appropriately,
# so at the point x=y=z=1, the displacements should be
# disp_x = disp_y = disp_z = 2t/3 (small strain physics is used)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
block = 0
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./p]
[../]
[]
[BCs]
[./p]
type = FunctionDirichletBC
boundary = 'bottom top'
variable = p
function = t
[../]
[./xmin]
type = DirichletBC
boundary = left
variable = disp_x
value = 0
[../]
[./ymin]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0
[../]
[./zmin]
type = DirichletBC
boundary = back
variable = disp_z
value = 0
[../]
[]
[Kernels]
[./unimportant_p]
type = Diffusion
variable = p
[../]
[SolidMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
[./poro_x]
type = PoroMechanicsCoupling
variable = disp_x
porepressure = p
component = 0
[../]
[./poro_y]
type = PoroMechanicsCoupling
variable = disp_y
porepressure = p
component = 1
[../]
[./poro_z]
type = PoroMechanicsCoupling
variable = disp_z
porepressure = p
component = 2
[../]
[]
[AuxVariables]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[../]
[./stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[]
[Postprocessors]
[./corner_x]
type = PointValue
point = '1 1 1'
variable = disp_x
[../]
[./corner_y]
type = PointValue
point = '1 1 1'
variable = disp_y
[../]
[./corner_z]
type = PointValue
point = '1 1 1'
variable = disp_z
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
# bulk modulus = 1, poisson ratio = 0.2
C_ijkl = '0.5 0.75'
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./biot]
type = GenericConstantMaterial
prop_names = biot_coefficient
prop_values = 2.0
[../]
[]
[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
start_time = 0
dt = 0.1
end_time = 1
[]
[Outputs]
file_base = vol_expansion
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/pressure_channel/open_bc_pressure_BC.i)
# This input file tests Dirichlet pressure in/outflow boundary conditions for the incompressible NS equations.
[GlobalParams]
gravity = '0 0 0'
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 3.0
ymin = 0
ymax = 1.0
nx = 30
ny = 10
elem_type = QUAD9
[]
[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
integrate_p_by_parts = false
[../]
[./y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
integrate_p_by_parts = false
[../]
[]
[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
[../]
[./inlet_p]
type = DirichletBC
variable = p
boundary = left
value = 1.0
[../]
[./outlet_p]
type = DirichletBC
variable = p
boundary = right
value = 0.0
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = PJFNK
[../]
[]
[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]
file_base = open_bc_out_pressure_BC
exodus = true
[]
(modules/fsi/test/tests/fsi_acoustics/1D_fluid_only/1D_fluid_only.i)
# Test for `AcousticInertia` and `Diffusion` kernels with only the fluid domain. The
# domain is 1D with length 1m and is subjected to an initial condition composed of
# a combination of sine waves. Fluid pressure is recorded at the midpoint of the
# domain. The recorded fluid pressure should match with analytical results. Because
# this implementation is equivalent to solving a 1D wave equation, analytical results
# exist.
#
# Input parameters:
# Dimensions = 1
# Length = 1 meter
# Fluid speed of sound = 1 m/s
# Initial condition = sin(pi*x) + sin(3*pi*x) + sin(5*3.141*x) + sin(7*pi*x) + sin(9*pi*x)
# Fluid domain = true
# Fluid BCs = pressures are zero on both the boundaries
# Structural domain = false
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 500
xmax = 1
[]
[]
[GlobalParams]
[]
[Variables]
[./p]
[../]
[]
[Kernels]
[./diffusion]
type = Diffusion
variable = 'p'
[../]
[./inertia]
type = AcousticInertia
variable = p
[../]
[]
[BCs]
[./leftright_pressure]
type = DirichletBC
variable = p
boundary = 'left right'
value = 0
[../]
[]
[ICs]
[./u_ic]
type = FunctionIC
variable = 'p'
function = initial_cond
[../]
[]
[Functions]
[./initial_cond]
type = ParsedFunction
expression = 'sin(pi*x) + sin(3*pi*x) + sin(5*3.141*x) + sin(7*pi*x) + sin(9*pi*x)'
[../]
[]
[Materials]
[./co_sq]
type = GenericConstantMaterial
prop_names = inv_co_sq
prop_values = 1
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
start_time = 0.0
end_time = 1.0
dt = 0.005
dtmin = 0.00001
nl_abs_tol = 1e-12
nl_rel_tol = 1e-12
l_tol = 1e-12
l_max_its = 25
timestep_tolerance = 1e-8
automatic_scaling = true
[TimeIntegrator]
type = NewmarkBeta
[]
[]
[Postprocessors]
[./p1]
type = PointValue
point = '0.5 0.0 0.0'
variable = p
[../]
[]
[Outputs]
csv = true
perf_graph = true
print_linear_residuals = true
[]
(modules/electromagnetics/test/tests/interfacekernels/electrostatic_contact/contact_conductance_supplied.i)
[Mesh]
[box]
type = CartesianMeshGenerator
dim = 2
dx = '0.5 0.5'
dy = '0.25 0.5 0.25'
ix = '20 20'
iy = '10 20 10'
subdomain_id = '1 1
2 3
1 1'
[]
[rename_subdomains]
type = RenameBlockGenerator
input = box
old_block = '1 2'
new_block = 'stainless_steel graphite'
[]
[create_interface]
type = SideSetsBetweenSubdomainsGenerator
input = rename_subdomains
primary_block = stainless_steel
paired_block = graphite
new_boundary = 'ssg_interface'
[]
[delete_block]
type = BlockDeletionGenerator
input = create_interface
block = 3
[]
[]
[Problem]
coord_type = RZ
[]
[Variables]
[potential_graphite]
block = graphite
[]
[potential_stainless_steel]
block = stainless_steel
[]
[]
[Kernels]
[electric_graphite]
type = ADMatDiffusion
variable = potential_graphite
diffusivity = electrical_conductivity
block = graphite
[]
[electric_stainless_steel]
type = ADMatDiffusion
variable = potential_stainless_steel
diffusivity = electrical_conductivity
block = stainless_steel
[]
[]
[BCs]
[elec_top]
type = DirichletBC
variable = potential_stainless_steel
boundary = top
value = 1
[]
[elec_bottom]
type = DirichletBC
variable = potential_stainless_steel
boundary = bottom
value = 0
[]
[]
[InterfaceKernels]
[electrostatic_contact]
type = ElectrostaticContactCondition
variable = potential_stainless_steel
neighbor_var = potential_graphite
primary_conductivity = electrical_conductivity
secondary_conductivity = electrical_conductivity
boundary = ssg_interface
user_electrical_contact_conductance = 1.47e5 # as described in Cincotti et al (https://doi.org/10.1002/aic.11102)
[]
[]
[Materials]
#graphite
[sigma_graphite]
type = ADGenericConstantMaterial
prop_names = 'electrical_conductivity'
prop_values = 3.33e2
block = graphite
[]
#stainless_steel
[sigma_stainless_steel]
type = ADGenericConstantMaterial
prop_names = 'electrical_conductivity'
prop_values = 1.429e6
block = stainless_steel
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -ksp_grmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 101 preonly ilu 1'
automatic_scaling = true
nl_rel_tol = 1e-09
[]
[Outputs]
exodus = true
perf_graph = 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/phase_field/examples/anisotropic_interfaces/ad_snow.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 14
ny = 14
xmax = 9
ymax = 9
uniform_refine = 3
[]
[Variables]
[./w]
[../]
[./T]
[../]
[]
[ICs]
[./wIC]
type = SmoothCircleIC
variable = w
int_width = 0.1
x1 = 4.5
y1 = 4.5
radius = 0.07
outvalue = 0
invalue = 1
[../]
[]
[Kernels]
[./w_dot]
type = ADTimeDerivative
variable = w
[../]
[./anisoACinterface1]
type = ADACInterfaceKobayashi1
variable = w
mob_name = adM
[../]
[./anisoACinterface2]
type = ADACInterfaceKobayashi2
variable = w
mob_name = adM
[../]
[./AllenCahn]
type = AllenCahn
variable = w
mob_name = M
f_name = fbulk
coupled_variables = T
[../]
[./T_dot]
type = ADTimeDerivative
variable = T
[../]
[./CoefDiffusion]
type = ADDiffusion
variable = T
[../]
[./w_dot_T]
type = ADCoefCoupledTimeDerivative
variable = T
v = w
coef = -1.8
[../]
[]
[Materials]
[./free_energy]
type = DerivativeParsedMaterial
property_name = fbulk
coupled_variables = 'w T'
constant_names = pi
constant_expressions = 4*atan(1)
expression = 'm:=0.9 * atan(10 * (1 - T)) / pi; 1/4*w^4 - (1/2 - m/3) * w^3 + (1/4 - m/2) * w^2'
derivative_order = 2
outputs = exodus
[../]
[./material]
type = ADInterfaceOrientationMaterial
op = w
[../]
[./consts1]
type = ADGenericConstantMaterial
prop_names = 'adM'
prop_values = '3333.333'
[../]
[./consts2]
type = GenericConstantMaterial
prop_names = 'M'
prop_values = '3333.333'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu '
nl_abs_tol = 1e-10
nl_rel_tol = 1e-08
l_max_its = 30
end_time = 1
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 6
iteration_window = 2
dt = 0.0005
growth_factor = 1.1
cutback_factor = 0.75
[../]
[./Adaptivity]
initial_adaptivity = 3 # Number of times mesh is adapted to initial condition
refine_fraction = 0.7 # Fraction of high error that will be refined
coarsen_fraction = 0.1 # Fraction of low error that will coarsened
max_h_level = 5 # Max number of refinements used, starting from initial mesh (before uniform refinement)
weight_names = 'w T'
weight_values = '1 0.5'
[../]
[]
[Outputs]
time_step_interval = 5
exodus = true
[]
(modules/heat_transfer/test/tests/sideset_heat_transfer/gap_thermal_1D.i)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
nx = 2
xmax = 2
[]
[split]
type = SubdomainBoundingBoxGenerator
input = mesh
block_id = 1
bottom_left = '1 0 0'
top_right = '2 0 0'
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = split
primary_block = 1
paired_block = 0
new_boundary = 'interface0'
[]
uniform_refine = 4
[]
[Variables]
# Defining a DFEM variable to handle gap discontinuity
[T]
order = FIRST
family = MONOMIAL
[]
[]
[AuxVariables]
# Auxvariable containing bulk temperature of gap
[Tbulk]
order = FIRST
family = LAGRANGE
initial_condition = 300 # K
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = T
diffusivity = conductivity
[]
[source]
type = BodyForce
variable = T
value = 1.0
[]
[]
[DGKernels]
# DG kernel to represent diffusion accross element faces
[./dg_diff]
type = DGDiffusion
variable = T
epsilon = -1
sigma = 6
diff = conductivity
# Ignoring gap side set because no diffusion accross there
exclude_boundary = 'interface0'
[../]
[]
[InterfaceKernels]
active = 'gap'
# Heat transfer kernel using Tbulk as material
[gap]
type = SideSetHeatTransferKernel
variable = T
neighbor_var = T
boundary = 'interface0'
[]
# Heat transfer kernel using Tbulk as auxvariable
[gap_var]
type = SideSetHeatTransferKernel
variable = T
neighbor_var = T
boundary = 'interface0'
Tbulk_var = Tbulk
[]
[]
[Functions]
[bc_func]
type = ConstantFunction
value = 300
[]
[exact]
type = ParsedFunction
expression = '
A := if(x < 1, -0.5, -0.25);
B := if(x < 1, -0.293209850655001, 0.0545267662299068);
C := if(x < 1, 300.206790149345, 300.19547323377);
d := -1;
A * (x+d) * (x+d) + B * (x+d) + C'
[]
[]
[BCs]
[bc_left]
type = DGFunctionDiffusionDirichletBC
boundary = 'left'
variable = T
diff = 'conductivity'
epsilon = -1
sigma = 6
function = bc_func
[]
[bc_right]
type = DGFunctionDiffusionDirichletBC
boundary = 'right'
variable = T
diff = 'conductivity'
epsilon = -1
sigma = 6
function = bc_func
[]
[]
[Materials]
[k0]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 1.0
block = 0
[]
[k1]
type = GenericConstantMaterial
prop_names = 'conductivity'
prop_values = 2.0
block = 1
[]
[gap_mat]
type = SideSetHeatTransferMaterial
boundary = 'interface0'
conductivity = 1.5
gap_length = 1.0
h_primary = 1
h_neighbor = 1
Tbulk = 300
emissivity_primary = 1
emissivity_neighbor = 1
[]
[]
[Postprocessors]
[error]
type = ElementL2Error
variable = T
function = exact
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/lid_driven_stabilized_action.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 64
ny = 64
[]
[]
[Modules]
[IncompressibleNavierStokes]
equation_type = steady-state
block = 0
velocity_boundary = 'bottom right top left'
velocity_function = '0 0 0 0 lid_function 0 0 0'
pressure_pinned_node = 0
density_name = rho
dynamic_viscosity_name = mu
# There are multiple types of stabilization possible in incompressible
# Navier Stokes. The user can specify supg = true to apply streamline
# upwind petrov-galerkin stabilization to the momentum equations. This
# is most useful for high Reynolds numbers, e.g. when inertial effects
# dominate over viscous effects. The user can also specify pspg = true
# to apply pressure stabilized petrov-galerkin stabilization to the mass
# equation. PSPG is a form of Galerkin Least Squares. This stabilization
# allows equal order interpolations to be used for pressure and velocity.
# Finally, the alpha parameter controls the amount of stabilization.
# For PSPG, decreasing alpha leads to increased accuracy but may induce
# spurious oscillations in the pressure field. Some numerical experiments
# suggest that alpha between .1 and 1 may be optimal for accuracy and
# robustness.
supg = true
pspg = true
alpha = 1e-1
laplace = true
integrate_p_by_parts = true
gravity = '0 0 0'
family = LAGRANGE
order = FIRST
[]
[]
[Materials]
[const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '1 1'
[]
[]
[Functions]
[lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'asm 2 ilu 4'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
file_base = lid_driven_stabilized_out
exodus = true
[]
[Postprocessors]
[lin]
type = NumLinearIterations
[]
[nl]
type = NumNonlinearIterations
[]
[lin_tot]
type = CumulativeValuePostprocessor
postprocessor = 'lin'
[]
[nl_tot]
type = CumulativeValuePostprocessor
postprocessor = 'nl'
[]
[]
(modules/solid_mechanics/examples/bridge/bridge.i)
#
# Bridge linear elasticity example
#
# This example models a bridge using linear elasticity.
# It can be either steel or concrete.
# Gravity is applied
# A pressure of 0.5 MPa is also applied
#
[Mesh]
displacements = 'disp_x disp_y disp_z' #Define displacements for deformed mesh
type = FileMesh #Read in mesh from file
file = bridge.e
boundary_id = '1 2 3 4 5 6' #Assign names to boundaries to make things clearer
boundary_name = 'top left right bottom1 bottom2 bottom3'
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[./disp_z]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./gravity_y]
#Gravity is applied to bridge
type = Gravity
variable = disp_y
value = -9.81
[../]
[./TensorMechanics]
#Stress divergence kernels
displacements = 'disp_x disp_y disp_z'
[../]
[]
[AuxVariables]
[./von_mises]
#Dependent variable used to visualize the Von Mises stress
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./von_mises_kernel]
#Calculates the von mises stress and assigns it to von_mises
type = RankTwoScalarAux
variable = von_mises
rank_two_tensor = stress
execute_on = timestep_end
scalar_type = VonMisesStress
[../]
[]
[BCs]
[./Pressure]
[./load]
#Applies the pressure
boundary = top
factor = 5e5 # Pa
[../]
[../]
[./anchor_x]
#Anchors the bottom and sides against deformation in the x-direction
type = DirichletBC
variable = disp_x
boundary = 'left right bottom1 bottom2 bottom3'
value = 0.0
[../]
[./anchor_y]
#Anchors the bottom and sides against deformation in the y-direction
type = DirichletBC
variable = disp_y
boundary = 'left right bottom1 bottom2 bottom3'
value = 0.0
[../]
[./anchor_z]
#Anchors the bottom and sides against deformation in the z-direction
type = DirichletBC
variable = disp_z
boundary = 'left right bottom1 bottom2 bottom3'
value = 0.0
[../]
[]
[Materials]
active = 'density_concrete stress strain elasticity_tensor_concrete'
[./elasticity_tensor_steel]
#Creates the elasticity tensor using steel parameters
youngs_modulus = 210e9 #Pa
poissons_ratio = 0.3
type = ComputeIsotropicElasticityTensor
block = 1
[../]
[./elasticity_tensor_concrete]
#Creates the elasticity tensor using concrete parameters
youngs_modulus = 16.5e9 #Pa
poissons_ratio = 0.2
type = ComputeIsotropicElasticityTensor
block = 1
[../]
[./strain]
#Computes the strain, assuming small strains
type = ComputeSmallStrain
block = 1
displacements = 'disp_x disp_y disp_z'
[../]
[./stress]
#Computes the stress, using linear elasticity
type = ComputeLinearElasticStress
block = 1
[../]
[./density_steel]
#Defines the density of steel
type = GenericConstantMaterial
block = 1
prop_names = density
prop_values = 7850 # kg/m^3
[../]
[./density_concrete]
#Defines the density of concrete
type = GenericConstantMaterial
block = 1
prop_names = density
prop_values = 2400 # kg/m^3
[../]
[]
[Preconditioning]
[./SMP]
#Creates the entire Jacobian, for the Newton solve
type = SMP
full = true
[../]
[]
[Executioner]
#We solve a steady state problem using Newton's iteration
type = Steady
solve_type = NEWTON
nl_rel_tol = 1e-9
l_max_its = 30
l_tol = 1e-4
nl_max_its = 10
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/chemical_reactions/test/tests/desorption/langmuir_lumping_problem.i)
# exploring CONSTANT MONOMIAL
[Mesh]
type = FileMesh
file = three_eles.e
[]
[Variables]
[./pressure]
# try with and without the CONSTANT MONOMIAL to see that
# CONSTANT MONOMIAL yields the correct result that pressure(x=0) is unchanged
# but LINEAR LAGRANGE changes pressure(x=0) since pressure is not lumped at x=0
# (the x=0 eqn is a*dot(p0)+b*dot(p10)=0, and x=10 eqn a*dot(p10)+b*dot(p20)=desorption,
# and since dot(p10)>0, we get dot(p0)<0)
family = MONOMIAL
order = CONSTANT
[../]
[./conc]
family = MONOMIAL
order = CONSTANT
block = centre_block
[../]
[]
[ICs]
[./p_ic]
type = ConstantIC
variable = pressure
value = 1.0
[../]
[./conc_ic]
type = ConstantIC
variable = conc
value = 1.0
block = centre_block
[../]
[]
[Kernels]
[./c_dot]
type = TimeDerivative
block = centre_block
variable = conc
[../]
[./flow_from_matrix]
type = DesorptionFromMatrix
block = centre_block
variable = conc
pressure_var = pressure
[../]
[./rho_dot]
type = TimeDerivative
variable = pressure
[../]
[./flux_to_porespace]
type = DesorptionToPorespace
block = centre_block
variable = pressure
conc_var = conc
[../]
[]
[Materials]
[./rock]
type = GenericConstantMaterial
block = 'left_block centre_block right_block'
[../]
[./lang_stuff]
type = LangmuirMaterial
block = centre_block
mat_desorption_time_const = 0.1
mat_adsorption_time_const = 0.1
mat_langmuir_density = 1
mat_langmuir_pressure = 1
pressure_var = pressure
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
#petsc_options = '-snes_test_display'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
end_time = 1
[]
[Outputs]
file_base = langmuir_lumping_problem
[]
(test/tests/controls/moose_base_naming_access/base_object_param.i)
[Mesh]
type = GeneratedMesh
dim = 2
elem_type = QUAD4
# use odd numbers so points do not fall on element boundaries
nx = 31
ny = 31
[]
[Variables]
[./diffused]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = diffused
[../]
[]
[DiracKernels]
[./test_object]
type = MaterialPointSource
point = '0.5 0.5 0'
variable = diffused
[../]
[]
[BCs]
[./bottom_diffused]
type = DirichletBC
variable = diffused
boundary = 'bottom'
value = 2
[../]
[./top_diffused]
type = DirichletBC
variable = diffused
boundary = 'top'
value = 0
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'matp'
prop_values = '1'
block = 0
[../]
[]
[Postprocessors]
[./test_object]
type = FunctionValuePostprocessor
function = '2*(x+y)'
point = '0.5 0.5 0'
[../]
[./other_point_test_object]
type = FunctionValuePostprocessor
function = '3*(x+y)'
point = '0.5 0.5 0'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
[Controls]
[./point_control]
type = TestControl
test_type = 'point'
parameter = 'DiracKernel::test_object/point'
execute_on = 'initial'
[../]
[]
(modules/functional_expansion_tools/examples/3D_volumetric_Cartesian/main.i)
# Basic example coupling a master and sub app in a 3D Cartesian volume.
#
# The master app provides field values to the sub app via Functional Expansions, which then performs
# its calculations. The sub app's solution field values are then transferred back to the master app
# and coupled into the solution of the master app solution.
#
# This example couples Functional Expansions via AuxVariable.
#
# Note: this problem is not light, and may take a few minutes to solve.
[Mesh]
type = GeneratedMesh
dim = 3
xmin = 0.0
xmax = 10.0
nx = 15
ymin = 1.0
ymax = 11.0
ny = 25
zmin = 2.0
zmax = 12.0
nz = 35
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./s_in] # Add in the contribution from the SubApp
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[Materials]
[./Unobtanium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'top bottom left right front back'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3 4 5'
physical_bounds = '0.0 10.0 1.0 11.0 2.0 12.0'
x = Legendre
y = Legendre
z = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(test/tests/controls/tag_based_naming_access/system_asterisk_param.i)
[Mesh]
type = GeneratedMesh
dim = 2
elem_type = QUAD4
# use odd numbers so points do not fall on element boundaries
nx = 31
ny = 31
[]
[Variables]
[./diffused]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = diffused
[../]
[]
[DiracKernels]
[./test_object]
type = MaterialPointSource
point = '0.5 0.5 0'
variable = diffused
[../]
[]
[BCs]
[./bottom_diffused]
type = DirichletBC
variable = diffused
boundary = 'bottom'
value = 2
[../]
[./top_diffused]
type = DirichletBC
variable = diffused
boundary = 'top'
value = 0
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'matp'
prop_values = '1'
block = 0
[../]
[]
[Postprocessors]
[./test_object]
type = TestControlPointPP
function = '2*(x+y)'
point = '0.5 0.5 0'
control_tags = 'tag'
[../]
[./other_point_test_object]
type = TestControlPointPP
function = '3*(x+y)'
point = '0.5 0.5 0'
control_tags = 'tag'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
[Controls]
[./point_control]
type = TestControl
test_type = 'point'
parameter = 'tag/*/point'
execute_on = 'initial'
[../]
[]
(modules/misc/test/tests/dynamic_loading/dynamic_load_multiapp/phase_field_sub.i)
# This input file contains objects only available in phase_field
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 2
nz = 0
xmax = 50
ymax = 25
zmax = 0
elem_type = QUAD4
uniform_refine = 2
[]
[Variables]
[./c]
order = THIRD
family = HERMITE
[./InitialCondition]
type = BoundingBoxIC
x1 = 15.0
x2 = 35.0
y1 = 0.0
y2 = 25.0
inside = 1.0
outside = -0.8
variable = c
[../]
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./CHSolid]
type = CHMath
variable = c
mob_name = M
[../]
[./CHInterface]
type = CHInterface
variable = c
kappa_name = kappa_c
mob_name = M
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./constant]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1.0 1.0'
block = 0
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 101'
l_max_its = 15
nl_max_its = 10
start_time = 0.0
num_steps = 2
dt = 1.0
[]
[Outputs]
exodus = true
[]
(modules/stochastic_tools/examples/surrogates/gaussian_process/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 0.03
elem_type = EDGE3
[]
[Variables]
[T]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = T
diffusivity = k
[]
[source]
type = BodyForce
variable = T
value = 10000
[]
[]
[Materials]
[conductivity]
type = GenericConstantMaterial
prop_names = k
prop_values = 5.0
[]
[]
[BCs]
[right]
type = DirichletBC
variable = T
boundary = right
value = 300
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[avg]
type = AverageNodalVariableValue
variable = T
[]
[max]
type = NodalExtremeValue
variable = T
value_type = max
[]
[]
[Outputs]
[]
(modules/combined/examples/phase_field-mechanics/kks_mechanics_VTS.i)
# KKS phase-field model coupled with elasticity using the Voigt-Taylor scheme as
# described in L.K. Aagesen et al., Computational Materials Science, 140, 10-21 (2017)
# Original run #170329e
[Mesh]
type = GeneratedMesh
dim = 3
nx = 640
ny = 1
nz = 1
xmin = -10
xmax = 10
ymin = 0
ymax = 0.03125
zmin = 0
zmax = 0.03125
elem_type = HEX8
[]
[Variables]
# order parameter
[./eta]
order = FIRST
family = LAGRANGE
[../]
# solute concentration
[./c]
order = FIRST
family = LAGRANGE
[../]
# chemical potential
[./w]
order = FIRST
family = LAGRANGE
[../]
# solute phase concentration (matrix)
[./cm]
order = FIRST
family = LAGRANGE
[../]
# solute phase concentration (precipitate)
[./cp]
order = FIRST
family = LAGRANGE
[../]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[./disp_z]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./eta_ic]
variable = eta
type = FunctionIC
function = ic_func_eta
block = 0
[../]
[./c_ic]
variable = c
type = FunctionIC
function = ic_func_c
block = 0
[../]
[./w_ic]
variable = w
type = ConstantIC
value = 0.00991
block = 0
[../]
[./cm_ic]
variable = cm
type = ConstantIC
value = 0.131
block = 0
[../]
[./cp_ic]
variable = cp
type = ConstantIC
value = 0.236
block = 0
[../]
[]
[Functions]
[./ic_func_eta]
type = ParsedFunction
expression = '0.5*(1.0+tanh((x)/delta_eta/sqrt(2.0)))'
symbol_names = 'delta_eta'
symbol_values = '0.8034'
[../]
[./ic_func_c]
type = ParsedFunction
expression = '0.2388*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^3*(6*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^2-15*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))+10)+0.1338*(1-(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^3*(6*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))^2-15*(0.5*(1.0+tanh(x/delta/sqrt(2.0))))+10))'
symbol_names = 'delta'
symbol_values = '0.8034'
[../]
[./psi_eq_int]
type = ParsedFunction
expression = 'volume*psi_alpha'
symbol_names = 'volume psi_alpha'
symbol_values = 'volume psi_alpha'
[../]
[./gamma]
type = ParsedFunction
expression = '(psi_int - psi_eq_int) / dy / dz'
symbol_names = 'psi_int psi_eq_int dy dz'
symbol_values = 'psi_int psi_eq_int 0.03125 0.03125'
[../]
[]
[AuxVariables]
[./sigma11]
order = CONSTANT
family = MONOMIAL
[../]
[./sigma22]
order = CONSTANT
family = MONOMIAL
[../]
[./sigma33]
order = CONSTANT
family = MONOMIAL
[../]
[./e11]
order = CONSTANT
family = MONOMIAL
[../]
[./e12]
order = CONSTANT
family = MONOMIAL
[../]
[./e22]
order = CONSTANT
family = MONOMIAL
[../]
[./e33]
order = CONSTANT
family = MONOMIAL
[../]
[./e_el11]
order = CONSTANT
family = MONOMIAL
[../]
[./e_el12]
order = CONSTANT
family = MONOMIAL
[../]
[./e_el22]
order = CONSTANT
family = MONOMIAL
[../]
[./f_el]
order = CONSTANT
family = MONOMIAL
[../]
[./eigen_strain00]
order = CONSTANT
family = MONOMIAL
[../]
[./Fglobal]
order = CONSTANT
family = MONOMIAL
[../]
[./psi]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./matl_sigma11]
type = RankTwoAux
rank_two_tensor = stress
index_i = 0
index_j = 0
variable = sigma11
[../]
[./matl_sigma22]
type = RankTwoAux
rank_two_tensor = stress
index_i = 1
index_j = 1
variable = sigma22
[../]
[./matl_sigma33]
type = RankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 2
variable = sigma33
[../]
[./matl_e11]
type = RankTwoAux
rank_two_tensor = total_strain
index_i = 0
index_j = 0
variable = e11
[../]
[./matl_e12]
type = RankTwoAux
rank_two_tensor = total_strain
index_i = 0
index_j = 1
variable = e12
[../]
[./matl_e22]
type = RankTwoAux
rank_two_tensor = total_strain
index_i = 1
index_j = 1
variable = e22
[../]
[./matl_e33]
type = RankTwoAux
rank_two_tensor = total_strain
index_i = 2
index_j = 2
variable = e33
[../]
[./f_el]
type = MaterialRealAux
variable = f_el
property = f_el_mat
execute_on = timestep_end
[../]
[./GlobalFreeEnergy]
variable = Fglobal
type = KKSGlobalFreeEnergy
fa_name = fm
fb_name = fp
w = 0.0264
kappa_names = kappa
interfacial_vars = eta
[../]
[./psi_potential]
variable = psi
type = ParsedAux
coupled_variables = 'Fglobal w c f_el sigma11 e11'
expression = 'Fglobal - w*c + f_el - sigma11*e11'
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = right
value = 0
[../]
[./front_y]
type = DirichletBC
variable = disp_y
boundary = front
value = 0
[../]
[./back_y]
type = DirichletBC
variable = disp_y
boundary = back
value = 0
[../]
[./top_z]
type = DirichletBC
variable = disp_z
boundary = top
value = 0
[../]
[./bottom_z]
type = DirichletBC
variable = disp_z
boundary = bottom
value = 0
[../]
[]
[Materials]
# Chemical free energy of the matrix
[./fm]
type = DerivativeParsedMaterial
property_name = fm
coupled_variables = 'cm'
expression = '6.55*(cm-0.13)^2'
[../]
# Elastic energy of the matrix
[./elastic_free_energy_m]
type = ElasticEnergyMaterial
base_name = matrix
f_name = fe_m
args = ' '
outputs = exodus
[../]
# Total free energy of the matrix
[./Total_energy_matrix]
type = DerivativeSumMaterial
property_name = f_total_matrix
sum_materials = 'fm fe_m'
coupled_variables = 'cm'
[../]
# Free energy of the precipitate phase
[./fp]
type = DerivativeParsedMaterial
property_name = fp
coupled_variables = 'cp'
expression = '6.55*(cp-0.235)^2'
[../]
# Elastic energy of the precipitate
[./elastic_free_energy_p]
type = ElasticEnergyMaterial
base_name = ppt
f_name = fe_p
args = ' '
outputs = exodus
[../]
# Total free energy of the precipitate
[./Total_energy_ppt]
type = DerivativeSumMaterial
property_name = f_total_ppt
sum_materials = 'fp fe_p'
coupled_variables = 'cp'
[../]
# Total elastic energy
[./Total_elastic_energy]
type = DerivativeTwoPhaseMaterial
eta = eta
f_name = f_el_mat
fa_name = fe_m
fb_name = fe_p
outputs = exodus
W = 0
[../]
# h(eta)
[./h_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta
[../]
# g(eta)
[./g_eta]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta
[../]
# constant properties
[./constants]
type = GenericConstantMaterial
prop_names = 'M L kappa misfit'
prop_values = '0.7 0.7 0.01704 0.00377'
[../]
#Mechanical properties
[./Stiffness_matrix]
type = ComputeElasticityTensor
C_ijkl = '103.3 74.25 74.25 103.3 74.25 103.3 46.75 46.75 46.75'
base_name = matrix
fill_method = symmetric9
[../]
[./Stiffness_ppt]
type = ComputeElasticityTensor
C_ijkl = '100.7 71.45 71.45 100.7 71.45 100.7 50.10 50.10 50.10'
base_name = ppt
fill_method = symmetric9
[../]
[./stress_matrix]
type = ComputeLinearElasticStress
base_name = matrix
[../]
[./stress_ppt]
type = ComputeLinearElasticStress
base_name = ppt
[../]
[./strain_matrix]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
base_name = matrix
[../]
[./strain_ppt]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
base_name = ppt
eigenstrain_names = 'eigenstrain_ppt'
[../]
[./eigen_strain]
type = ComputeEigenstrain
base_name = ppt
eigen_base = '1 1 1 0 0 0'
prefactor = misfit
eigenstrain_name = 'eigenstrain_ppt'
[../]
[./global_stress]
type = TwoPhaseStressMaterial
base_A = matrix
base_B = ppt
[../]
[./global_strain]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
[../]
[]
[Kernels]
[./TensorMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
# enforce c = (1-h(eta))*cm + h(eta)*cp
[./PhaseConc]
type = KKSPhaseConcentration
ca = cm
variable = cp
c = c
eta = eta
[../]
# enforce pointwise equality of chemical potentials
[./ChemPotVacancies]
type = KKSPhaseChemicalPotential
variable = cm
cb = cp
fa_name = f_total_matrix
fb_name = f_total_ppt
[../]
#
# Cahn-Hilliard Equation
#
[./CHBulk]
type = KKSSplitCHCRes
variable = c
ca = cm
fa_name = f_total_matrix
w = w
[../]
[./dcdt]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./ckernel]
type = SplitCHWRes
mob_name = M
variable = w
[../]
#
# Allen-Cahn Equation
#
[./ACBulkF]
type = KKSACBulkF
variable = eta
fa_name = f_total_matrix
fb_name = f_total_ppt
w = 0.0264
args = 'cp cm'
[../]
[./ACBulkC]
type = KKSACBulkC
variable = eta
ca = cm
cb = cp
fa_name = f_total_matrix
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = kappa
[../]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm ilu nonzero'
l_max_its = 30
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-11
num_steps = 200
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.5
[../]
[]
[VectorPostprocessors]
#[./eta]
# type = LineValueSampler
# start_point = '-10 0 0'
# end_point = '10 0 0'
# variable = eta
# num_points = 321
# sort_by = id
#[../]
#[./eta_position]
# type = FindValueOnLineSample
# vectorpostprocessor = eta
# variable_name = eta
# search_value = 0.5
#[../]
# [./f_el]
# type = LineMaterialRealSampler
# start = '-20 0 0'
# end = '20 0 0'
# sort_by = id
# property = f_el
# [../]
# [./f_el_a]
# type = LineMaterialRealSampler
# start = '-20 0 0'
# end = '20 0 0'
# sort_by = id
# property = fe_m
# [../]
# [./f_el_b]
# type = LineMaterialRealSampler
# start = '-20 0 0'
# end = '20 0 0'
# sort_by = id
# property = fe_p
# [../]
# [./h_out]
# type = LineMaterialRealSampler
# start = '-20 0 0'
# end = '20 0 0'
# sort_by = id
# property = h
# [../]
# [./fm_out]
# type = LineMaterialRealSampler
# start = '-20 0 0'
# end = '20 0 0'
# sort_by = id
# property = fm
# [../]
[]
[Postprocessors]
[./f_el_int]
type = ElementIntegralMaterialProperty
mat_prop = f_el_mat
[../]
[./c_alpha]
type = SideAverageValue
boundary = left
variable = c
[../]
[./c_beta]
type = SideAverageValue
boundary = right
variable = c
[../]
[./e11_alpha]
type = SideAverageValue
boundary = left
variable = e11
[../]
[./e11_beta]
type = SideAverageValue
boundary = right
variable = e11
[../]
[./s11_alpha]
type = SideAverageValue
boundary = left
variable = sigma11
[../]
[./s22_alpha]
type = SideAverageValue
boundary = left
variable = sigma22
[../]
[./s33_alpha]
type = SideAverageValue
boundary = left
variable = sigma33
[../]
[./s11_beta]
type = SideAverageValue
boundary = right
variable = sigma11
[../]
[./s22_beta]
type = SideAverageValue
boundary = right
variable = sigma22
[../]
[./s33_beta]
type = SideAverageValue
boundary = right
variable = sigma33
[../]
[./f_el_alpha]
type = SideAverageValue
boundary = left
variable = f_el
[../]
[./f_el_beta]
type = SideAverageValue
boundary = right
variable = f_el
[../]
[./f_c_alpha]
type = SideAverageValue
boundary = left
variable = Fglobal
[../]
[./f_c_beta]
type = SideAverageValue
boundary = right
variable = Fglobal
[../]
[./chem_pot_alpha]
type = SideAverageValue
boundary = left
variable = w
[../]
[./chem_pot_beta]
type = SideAverageValue
boundary = right
variable = w
[../]
[./psi_alpha]
type = SideAverageValue
boundary = left
variable = psi
[../]
[./psi_beta]
type = SideAverageValue
boundary = right
variable = psi
[../]
[./total_energy]
type = ElementIntegralVariablePostprocessor
variable = Fglobal
[../]
# Get simulation cell size from postprocessor
[./volume]
type = ElementIntegralMaterialProperty
mat_prop = 1
[../]
[./psi_eq_int]
type = FunctionValuePostprocessor
function = psi_eq_int
[../]
[./psi_int]
type = ElementIntegralVariablePostprocessor
variable = psi
[../]
[./gamma]
type = FunctionValuePostprocessor
function = gamma
[../]
[]
#
# Precondition using handcoded off-diagonal terms
#
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[Outputs]
[./exodus]
type = Exodus
time_step_interval = 20
[../]
[./csv]
type = CSV
execute_on = 'final'
[../]
#[./console]
# type = Console
# output_file = true
# [../]
[]
(modules/heat_transfer/test/tests/semiconductor_linear_conductivity/steinhart-hart_linear.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 1.0
ymax = 1.0
[]
[Variables]
[./T]
initial_condition = 400.0 # unit in Kelvin only!!
[../]
[]
[AuxVariables]
[./elec_conduct]
order = FIRST
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = HeatConduction
variable = T
[../]
[]
[AuxKernels]
[./elec_conduct]
type = MaterialRealAux
variable = elec_conduct
property = electrical_conductivity
execute_on = timestep_end
[../]
[]
[BCs]
[./inlet]
type = DirichletBC
variable = T
boundary = left
value = 1000 # K
[../]
[./outlet]
type = DirichletBC
variable = T
boundary = right
value = 400 # K
[../]
[]
[Materials]
[./k]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity'
prop_values = '10' # in W/mK
[../]
[./sigma]
type = SemiconductorLinearConductivity
temp = T
sh_coeff_A = 0.002
sh_coeff_B = 0.001
[../]
[]
[VectorPostprocessors]
[./line_sample]
type = LineValueSampler
warn_discontinuous_face_values = false
variable = 'T elec_conduct'
start_point = '0 0. 0'
end_point = '1.0 0. 0'
num_points = 11
sort_by = id
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
nl_rel_tol = 1e-12
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
execute_on = 'initial timestep_end'
[]
(modules/phase_field/test/tests/phase_field_kernels/CahnHilliard.i)
#
# Test the non-split parsed function free enery Cahn-Hilliard Bulk kernel
# The free energy used here has the same functional form as the CHPoly kernel
# If everything works, the output of this test should replicate the output
# of marmot/tests/chpoly_test/CHPoly_test.i (exodiff match)
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 16
ny = 16
xmax = 50
ymax = 50
elem_type = QUAD4
[]
[Variables]
[./cv]
order = THIRD
family = HERMITE
[../]
[]
[ICs]
[./InitialCondition]
type = CrossIC
x1 = 5.0
y1 = 5.0
x2 = 45.0
y2 = 45.0
variable = cv
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = cv
[../]
[./CHSolid]
type = CahnHilliard
variable = cv
f_name = F
mob_name = M
[../]
[./CHInterface]
type = CHInterface
variable = cv
mob_name = M
kappa_name = kappa_c
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1 0.1'
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'cv'
expression = '(1-cv)^2 * (1+cv)^2'
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_max_its = 15
l_tol = 1.0e-4
nl_max_its = 10
nl_rel_tol = 1.0e-11
start_time = 0.0
num_steps = 2
dt = 0.7
[]
[Outputs]
[./out]
type = Exodus
refinements = 1
[../]
[]
(modules/combined/examples/phase_field-mechanics/Pattern1.i)
#
# Pattern example 1
#
# Phase changes driven by a combination mechanical (elastic) and chemical
# driving forces. In this three phase system a matrix phase, an oversized and
# an undersized precipitate phase compete. The chemical free energy favors a
# phase separation into either precipitate phase. A mix of both precipitate
# emerges to balance lattice expansion and contraction.
#
# This example demonstrates the use of
# * ACMultiInterface
# * SwitchingFunctionConstraintEta and SwitchingFunctionConstraintLagrange
# * DerivativeParsedMaterial
# * ElasticEnergyMaterial
# * DerivativeMultiPhaseMaterial
# * MultiPhaseStressMaterial
# which are the components to se up a phase field model with an arbitrary number
# of phases
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 80
ny = 80
nz = 0
xmin = -20
xmax = 20
ymin = -20
ymax = 20
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[GlobalParams]
# CahnHilliard needs the third derivatives
derivative_order = 3
enable_jit = true
displacements = 'disp_x disp_y'
[]
# 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
[../]
[./cross_terms]
type = CrossTermGradientFreeEnergy
variable = cross_energy
interfacial_vars = 'eta1 eta2 eta3'
kappa_names = 'kappa11 kappa12 kappa13
kappa21 kappa22 kappa23
kappa31 kappa32 kappa33'
[../]
[]
[Variables]
# Solute concentration variable
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = RandomIC
min = 0
max = 0.8
seed = 1235
[../]
[../]
# Order parameter for the Matrix
[./eta1]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[../]
# Order parameters for the 2 different inclusion orientations
[./eta2]
order = FIRST
family = LAGRANGE
initial_condition = 0.1
[../]
[./eta3]
order = FIRST
family = LAGRANGE
initial_condition = 0.1
[../]
# Mesh displacement
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
# Lagrange-multiplier
[./lambda]
order = FIRST
family = LAGRANGE
initial_condition = 1.0
[../]
[]
[Kernels]
# Set up stress divergence kernels
[./TensorMechanics]
[../]
# Cahn-Hilliard kernels
[./c_res]
type = CahnHilliard
variable = c
f_name = F
args = 'eta1 eta2 eta3'
[../]
[./time]
type = TimeDerivative
variable = 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
prop_names = 'M kappa_c L1 L2 L3 kappa11 kappa12 kappa13 kappa21 kappa22 kappa23 kappa31 kappa32 kappa33'
prop_values = '0.2 0 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
[../]
# matrix phase
[./elasticity_tensor_1]
type = ComputeElasticityTensor
base_name = phase1
C_ijkl = '3 3'
fill_method = symmetric_isotropic
[../]
[./strain_1]
type = ComputeSmallStrain
base_name = phase1
displacements = 'disp_x disp_y'
[../]
[./stress_1]
type = ComputeLinearElasticStress
base_name = phase1
[../]
# oversized phase
[./elasticity_tensor_2]
type = ComputeElasticityTensor
base_name = phase2
C_ijkl = '7 7'
fill_method = symmetric_isotropic
[../]
[./strain_2]
type = ComputeSmallStrain
base_name = phase2
displacements = 'disp_x disp_y'
eigenstrain_names = eigenstrain
[../]
[./stress_2]
type = ComputeLinearElasticStress
base_name = phase2
[../]
[./eigenstrain_2]
type = ComputeEigenstrain
base_name = phase2
eigen_base = '0.02'
eigenstrain_name = eigenstrain
[../]
# undersized phase
[./elasticity_tensor_3]
type = ComputeElasticityTensor
base_name = phase3
C_ijkl = '7 7'
fill_method = symmetric_isotropic
[../]
[./strain_3]
type = ComputeSmallStrain
base_name = phase3
displacements = 'disp_x disp_y'
eigenstrain_names = eigenstrain
[../]
[./stress_3]
type = ComputeLinearElasticStress
base_name = phase3
[../]
[./eigenstrain_3]
type = ComputeEigenstrain
base_name = phase3
eigen_base = '-0.05'
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
[../]
# elastic free energies
[./elastic_free_energy_1]
type = ElasticEnergyMaterial
base_name = phase1
f_name = Fe1
derivative_order = 2
args = 'c' # should be empty
[../]
[./elastic_free_energy_2]
type = ElasticEnergyMaterial
base_name = phase2
f_name = Fe2
derivative_order = 2
args = 'c' # should be empty
[../]
[./elastic_free_energy_3]
type = ElasticEnergyMaterial
base_name = phase3
f_name = Fe3
derivative_order = 2
args = 'c' # should be empty
[../]
# phase free energies (chemical + elastic)
[./phase_free_energy_1]
type = DerivativeSumMaterial
property_name = F1
sum_materials = 'Fc1 Fe1'
coupled_variables = 'c'
derivative_order = 2
[../]
[./phase_free_energy_2]
type = DerivativeSumMaterial
property_name = F2
sum_materials = 'Fc2 Fe2'
coupled_variables = 'c'
derivative_order = 2
[../]
[./phase_free_energy_3]
type = DerivativeSumMaterial
property_name = F3
sum_materials = 'Fc3 Fe3'
coupled_variables = 'c'
derivative_order = 2
[../]
# global free energy
[./free_energy]
type = DerivativeMultiPhaseMaterial
f_name = F
fi_names = 'F1 F2 F3'
hi_names = 'h1 h2 h3'
etas = 'eta1 eta2 eta3'
coupled_variables = 'c'
W = 3
[../]
# Generate the global stress from the phase stresses
[./global_stress]
type = MultiPhaseStressMaterial
phase_base = 'phase1 phase2 phase3'
h = 'h1 h2 h3'
[../]
[]
[BCs]
# the boundary conditions on the displacement enforce periodicity
# at zero total shear and constant volume
[./bottom_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0
[../]
[./top_y]
type = DirichletBC
variable = disp_y
boundary = 'top'
value = 0
[../]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 'left'
value = 0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = 'right'
value = 0
[../]
[./Periodic]
[./disp_x]
auto_direction = 'y'
[../]
[./disp_y]
auto_direction = 'x'
[../]
# all other phase field variables are fully periodic
[./c]
auto_direction = 'x y'
[../]
[./eta1]
auto_direction = 'x y'
[../]
[./eta2]
auto_direction = 'x y'
[../]
[./eta3]
auto_direction = 'x y'
[../]
[./lambda]
auto_direction = 'x y'
[../]
[../]
[]
[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
[../]
[./total_solute]
type = ElementIntegralVariablePostprocessor
variable = c
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm ilu'
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
num_steps = 200
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.1
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[./table]
type = CSV
delimiter = ' '
[../]
[]
[Debug]
# show_var_residual_norms = true
[]
(test/tests/misc/check_error/nodal_value_off_block.i)
[Mesh]
type = FileMesh
file = rectangle.e
dim = 2
# This test can only be run with renumering disabled, so the
# NodalVariableValue postprocessor's node id is well-defined.
allow_renumbering = false
[]
[Variables]
[./u]
block = '1 2'
[../]
[./v]
block = 2
[../]
[]
[Kernels]
[./diff]
type = BlkResTestDiffusion
variable = u
block = '1 2'
[../]
[./v_diff]
type = Diffusion
variable = v
block = 2
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Materials]
[./mat0]
type = GenericConstantMaterial
block = 1
prop_names = 'a b'
prop_values = '1 2'
[../]
[./mat1]
type = GenericConstantMaterial
block = 2
prop_names = a
prop_values = 10
[../]
[]
[Postprocessors]
[./off_block]
type = NodalVariableValue
variable = v
nodeid = 0
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
(modules/stochastic_tools/examples/surrogates/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 1
elem_type = EDGE3
[]
[Variables]
[T]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = T
diffusivity = k
[]
[source]
type = BodyForce
variable = T
value = 1.0
[]
[]
[Materials]
[conductivity]
type = GenericConstantMaterial
prop_names = k
prop_values = 2.0
[]
[]
[BCs]
[right]
type = DirichletBC
variable = T
boundary = right
value = 300
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[avg]
type = AverageNodalVariableValue
variable = T
[]
[max]
type = NodalExtremeValue
variable = T
value_type = max
[]
[]
[Outputs]
[]
(modules/solid_mechanics/test/tests/central_difference/consistent/3D/3d_consistent_explicit_mass_scaling.i)
# One element test to test the central difference time integrator in 3D.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 2
xmin = 0.0
xmax = 1
ymin = 0.0
ymax = 1
zmin = 0.0
zmax = 2
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[AuxVariables]
[vel_x]
[]
[accel_x]
[]
[vel_y]
[]
[accel_y]
[]
[vel_z]
[]
[accel_z]
[]
[]
[AuxKernels]
[accel_x]
type = TestNewmarkTI
variable = accel_x
displacement = disp_x
first = false
[]
[vel_x]
type = TestNewmarkTI
variable = vel_x
displacement = disp_x
[]
[accel_y]
type = TestNewmarkTI
variable = accel_y
displacement = disp_y
first = false
[]
[vel_y]
type = TestNewmarkTI
variable = vel_y
displacement = disp_x
[]
[accel_z]
type = TestNewmarkTI
variable = accel_z
displacement = disp_z
first = false
[]
[vel_z]
type = TestNewmarkTI
variable = vel_z
displacement = disp_z
[]
[]
[Kernels]
[DynamicSolidMechanics]
displacements = 'disp_x disp_y disp_z'
[]
[inertia_x]
type = InertialForce
variable = disp_x
[]
[inertia_y]
type = InertialForce
variable = disp_y
[]
[inertia_z]
type = InertialForce
variable = disp_z
[]
[]
[BCs]
[x_bot]
type = FunctionDirichletBC
variable = disp_x
boundary = 'back'
function = dispx
preset = false
[]
[y_bot]
type = FunctionDirichletBC
variable = disp_y
boundary = 'back'
function = dispy
preset = false
[]
[z_bot]
type = FunctionDirichletBC
variable = disp_z
boundary = 'back'
function = dispz
preset = false
[]
[Periodic]
[x_dir]
variable = 'disp_x disp_y disp_z'
primary = 'left'
secondary = 'right'
translation = '1.0 0.0 0.0'
[]
[y_dir]
variable = 'disp_x disp_y disp_z'
primary = 'bottom'
secondary = 'top'
translation = '0.0 1.0 0.0'
[]
[]
[]
[Functions]
[dispx]
type = PiecewiseLinear
x = '0.0 1.0 2.0 3.0 4.0' # time
y = '0.0 1.0 0.0 -1.0 0.0' # displacement
[]
[dispy]
type = ParsedFunction
value = 0.1*t*t*sin(10*t)
[]
[dispz]
type = ParsedFunction
value = 0.1*t*t*sin(20*t)
[]
[]
[Materials]
[elasticity_tensor_block]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.25
block = 0
[]
[strain_block]
type = ComputeIncrementalSmallStrain
block = 0
displacements = 'disp_x disp_y disp_z'
implicit = false
[]
[stress_block]
type = ComputeFiniteStrainElasticStress
block = 0
[]
[density]
type = GenericConstantMaterial
block = 0
prop_names = density
prop_values = 1e4
[]
[density_scaling]
type = DensityScaling
block = 0
density = density
desired_time_step = 0.06
output_properties = density_scaling
outputs = 'exodus'
factor = 0.5
[]
[]
[Executioner]
type = Transient
start_time = -0.01
end_time = 0.1
dt = 0.005
timestep_tolerance = 1e-6
[TimeIntegrator]
type = CentralDifference
use_constant_mass = false
solve_type = lumped
[]
[TimeStepper]
type = PostprocessorDT
postprocessor = time_step
[]
[]
[Postprocessors]
[accel_6x]
type = NodalVariableValue
nodeid = 6
variable = accel_x
[]
[time_step]
type = CriticalTimeStep
factor = 0.5
density = density
density_scaling = density_scaling
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/phase_field/test/tests/rigidbodymotion/update_orientation_verify.i)
# test file for applyting advection term and observing rigid body motion of grains
[Mesh]
type = GeneratedMesh
dim = 3
nx = 14
ny = 7
nz = 7
xmax = 40
ymax = 25
zmax = 25
elem_type = HEX8
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[./eta]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
coupled_variables = eta
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./motion]
type = MultiGrainRigidBodyMotion
variable = w
c = c
v = eta
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
[../]
[./eta_dot]
type = TimeDerivative
variable = eta
[../]
[./vadv_eta]
type = SingleGrainRigidBodyMotion
variable = eta
c = c
v = eta
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
[../]
[./acint_eta]
type = ACInterface
variable = eta
mob_name = M
coupled_variables = c
kappa_name = kappa_eta
[../]
[./acbulk_eta]
type = AllenCahn
variable = eta
mob_name = M
f_name = F
coupled_variables = c
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c kappa_eta'
prop_values = '5.0 2.0 0.1'
[../]
[./free_energy]
type = DerivativeParsedMaterial
coupled_variables = 'c eta'
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 1.0e-2'
expression = 16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2+(c-eta)^2
derivative_order = 2
[../]
[]
[AuxVariables]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./var_indices]
order = CONSTANT
family = MONOMIAL
[../]
[./centroids]
order = CONSTANT
family = MONOMIAL
[../]
[./vadv_x]
order = CONSTANT
family = MONOMIAL
[../]
[./vadv_y]
order = CONSTANT
family = MONOMIAL
[../]
[./angle_initial]
order = CONSTANT
family = MONOMIAL
[../]
[./euler_angle]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
flood_counter = grain_center
field_display = UNIQUE_REGION
execute_on = timestep_begin
[../]
[./var_indices]
type = FeatureFloodCountAux
variable = var_indices
flood_counter = grain_center
field_display = VARIABLE_COLORING
execute_on = timestep_begin
[../]
[./centroids]
type = FeatureFloodCountAux
variable = centroids
execute_on = timestep_begin
field_display = CENTROID
flood_counter = grain_center
[../]
[./vadv_x]
type = GrainAdvectionAux
grain_force = grain_force
grain_volumes = grain_volumes
grain_tracker_object = grain_center
execute_on = timestep_begin
component = x
variable = vadv_x
[../]
[./vadv_y]
type = GrainAdvectionAux
grain_force = grain_force
grain_volumes = grain_volumes
grain_tracker_object = grain_center
execute_on = timestep_begin
component = y
variable = vadv_y
[../]
[./angle_initial]
type = OutputEulerAngles
variable = angle_initial
euler_angle_provider = euler_angle_initial
grain_tracker = grain_center
output_euler_angle = phi2
execute_on = timestep_begin
[../]
[./angle]
type = OutputEulerAngles
variable = euler_angle
euler_angle_provider = euler_angle
grain_tracker = grain_center
output_euler_angle = phi2
execute_on = timestep_begin
[../]
[]
[VectorPostprocessors]
[./forces]
type = GrainForcesPostprocessor
grain_force = grain_force
[../]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_center
execute_on = 'initial timestep_begin'
[../]
[./angle_check]
type = EulerAngleUpdaterCheck
grain_tracker_object = grain_center
euler_angle_updater = euler_angle
grain_torques_object = grain_force
grain_volumes = grain_volumes
execute_on = timestep_begin
[../]
[]
[UserObjects]
[./grain_center]
type = GrainTracker
variable = eta
outputs = none
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
[../]
[./grain_force]
type = ConstantGrainForceAndTorque
execute_on = 'initial timestep_begin linear nonlinear'
force = '0.5 0.0 0.0 '
torque = '-200.0 -120.0 1000.0'
[../]
[./euler_angle_initial]
type = RandomEulerAngleProvider
grain_tracker_object = grain_center
seed = 12356
execute_on = 'initial timestep_begin'
[../]
[./euler_angle]
type = EulerAngleUpdater
grain_tracker_object = grain_center
euler_angle_provider = euler_angle_initial
grain_torques_object = grain_force
grain_volumes = grain_volumes
execute_on = timestep_begin
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
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'
nl_max_its = 30
l_max_its = 30
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
dt = 0.2
num_steps = 2
[]
[Outputs]
csv = true
exodus = true
[]
[ICs]
[./rect_c]
y2 = 20.0
y1 = 5.0
z1 = 5.0
z2 = 20.0
inside = 1.0
x2 = 30.0
variable = c
x1 = 10.0
type = BoundingBoxIC
[../]
[./rect_eta]
y2 = 20.0
y1 = 5.0
inside = 1.0
x2 = 30.0
variable = eta
x1 = 10.0
z1 = 5.0
z2 = 20.0
type = BoundingBoxIC
[../]
[]
(modules/xfem/test/tests/moving_interface/verification/2D_xy_homog1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: 2D
# Coordinate System: xy
# Material Numbers/Types: homogeneous 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed level set function
# Description:
# Transient 2D heat transfer problem in Cartesian coordinates designed with
# the Method of Manufactured Solutions. This problem was developed to verify
# XFEM performance on linear elements in the presence of a moving interface
# sweeping across the x-y coordinates of a system with homogeneous material
# properties. This problem can be exactly evaluated by FEM/Moose without the
# moving interface. Both the temperature and level set function are designed
# to be linear to attempt to minimize error between the Moose/exact solution
# and XFEM results.
# Results:
# The temperature at the bottom left boundary (x=0, y=0) exhibits the largest
# difference between the FEM/Moose solution and XFEM results. We present the
# XFEM results at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 479.9998791
# 0.6 520 519.9995307
# 0.8 560 559.9989724
# 1.0 600 599.9984541
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.0
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraints]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = '10*(-100*x-100*y+200)'
[../]
[./neumann_func]
type = ParsedFunction
expression = '1.5*100*t'
[../]
[./dirichlet_right_func]
type = ParsedFunction
expression = '(-100*y+100)*t+400'
[../]
[./dirichlet_top_func]
type = ParsedFunction
expression = '(-100*x+100)*t+400'
[../]
[./ls_func]
type = ParsedFunction
expression = '-0.5*(x+y) + 1.04 - 0.2*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericConstantMaterial
prop_names = 'diffusion_coefficient'
prop_values = 1.5
[../]
[]
[BCs]
[./left_du]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = FunctionDirichletBC
variable = u
boundary = 'right'
function = dirichlet_right_func
[../]
[./bottom_du]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = neumann_func
[../]
[./top_u]
type = FunctionDirichletBC
variable = u
boundary = 'top'
function = dirichlet_top_func
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/navier_stokes/examples/laser-welding/3d.i)
period=1.25e-3
endtime=${period}
timestep=1.25e-5
surfacetemp=300
sb=5.67e-8
[GlobalParams]
temperature = T
[]
[Mesh]
type = GeneratedMesh
dim = 3
xmin = -.35e-3
xmax = 0.35e-3
ymin = -.35e-3
ymax = .35e-3
zmin = -.7e-3
zmax = 0
nx = 2
ny = 2
nz = 2
displacements = 'disp_x disp_y disp_z'
uniform_refine = 2
[]
[Variables]
[vel]
family = LAGRANGE_VEC
[]
[T]
[]
[p]
[]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[ICs]
[T]
type = FunctionIC
variable = T
function = '(${surfacetemp} - 300) / .7e-3 * z + ${surfacetemp}'
[]
[]
[Kernels]
[disp_x]
type = Diffusion
variable = disp_x
[]
[disp_y]
type = Diffusion
variable = disp_y
[]
[disp_z]
type = Diffusion
variable = disp_z
[]
[mass]
type = INSADMass
variable = p
use_displaced_mesh = true
[]
[mass_pspg]
type = INSADMassPSPG
variable = p
use_displaced_mesh = true
[]
[momentum_time]
type = INSADMomentumTimeDerivative
variable = vel
use_displaced_mesh = true
[]
[momentum_advection]
type = INSADMomentumAdvection
variable = vel
use_displaced_mesh = true
[]
[momentum_mesh_advection]
type = INSADMomentumMeshAdvection
variable = vel
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
[]
[momentum_viscous]
type = INSADMomentumViscous
variable = vel
use_displaced_mesh = true
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = vel
pressure = p
integrate_p_by_parts = true
use_displaced_mesh = true
[]
[momentum_supg]
type = INSADMomentumSUPG
variable = vel
material_velocity = relative_velocity
use_displaced_mesh = true
[]
[temperature_time]
type = INSADHeatConductionTimeDerivative
variable = T
use_displaced_mesh = true
[]
[temperature_advection]
type = INSADEnergyAdvection
variable = T
use_displaced_mesh = true
[]
[temperature_mesh_advection]
type = INSADEnergyMeshAdvection
variable = T
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
[]
[temperature_conduction]
type = ADHeatConduction
variable = T
thermal_conductivity = 'k'
use_displaced_mesh = true
[]
[temperature_supg]
type = INSADEnergySUPG
variable = T
velocity = vel
use_displaced_mesh = true
[]
[]
[BCs]
[x_no_disp]
type = DirichletBC
variable = disp_x
boundary = 'back'
value = 0
[]
[y_no_disp]
type = DirichletBC
variable = disp_y
boundary = 'back'
value = 0
[]
[z_no_disp]
type = DirichletBC
variable = disp_z
boundary = 'back'
value = 0
[]
[no_slip]
type = ADVectorFunctionDirichletBC
variable = vel
boundary = 'bottom right left top back'
[]
[T_cold]
type = DirichletBC
variable = T
boundary = 'back'
value = 300
[]
[radiation_flux]
type = FunctionRadiativeBC
variable = T
boundary = 'front'
emissivity_function = '1'
Tinfinity = 300
stefan_boltzmann_constant = ${sb}
use_displaced_mesh = true
[]
[weld_flux]
type = GaussianEnergyFluxBC
variable = T
boundary = 'front'
P0 = 159.96989792079225
R = 1.8257418583505537e-4
x_beam_coord = '2e-4 * cos(t * 2 * pi / ${period})'
y_beam_coord = '2e-4 * sin(t * 2 * pi / ${period})'
z_beam_coord = 0
use_displaced_mesh = true
[]
[vapor_recoil]
type = INSADVaporRecoilPressureMomentumFluxBC
variable = vel
boundary = 'front'
use_displaced_mesh = true
[]
[displace_x_top]
type = INSADDisplaceBoundaryBC
boundary = 'front'
variable = 'disp_x'
velocity = 'vel'
component = 0
associated_subdomain = 0
[]
[displace_y_top]
type = INSADDisplaceBoundaryBC
boundary = 'front'
variable = 'disp_y'
velocity = 'vel'
component = 1
associated_subdomain = 0
[]
[displace_z_top]
type = INSADDisplaceBoundaryBC
boundary = 'front'
variable = 'disp_z'
velocity = 'vel'
component = 2
associated_subdomain = 0
[]
[displace_x_top_dummy]
type = INSADDummyDisplaceBoundaryIntegratedBC
boundary = 'front'
variable = 'disp_x'
velocity = 'vel'
component = 0
[]
[displace_y_top_dummy]
type = INSADDummyDisplaceBoundaryIntegratedBC
boundary = 'front'
variable = 'disp_y'
velocity = 'vel'
component = 1
[]
[displace_z_top_dummy]
type = INSADDummyDisplaceBoundaryIntegratedBC
boundary = 'front'
variable = 'disp_z'
velocity = 'vel'
component = 2
[]
[]
[Materials]
[ins_mat]
type = INSADStabilized3Eqn
velocity = vel
pressure = p
temperature = T
use_displaced_mesh = true
[]
[steel]
type = AriaLaserWeld304LStainlessSteel
temperature = T
beta = 1e7
use_displaced_mesh = true
[]
[steel_boundary]
type = AriaLaserWeld304LStainlessSteelBoundary
boundary = 'front'
temperature = T
use_displaced_mesh = true
[]
[const]
type = GenericConstantMaterial
prop_names = 'abs sb_constant'
prop_values = '1 ${sb}'
use_displaced_mesh = true
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu NONZERO strumpack'
[]
[]
[Executioner]
type = Transient
end_time = ${endtime}
dtmin = 1e-8
dtmax = ${timestep}
petsc_options = '-snes_converged_reason -ksp_converged_reason -options_left'
solve_type = 'NEWTON'
line_search = 'none'
nl_max_its = 12
l_max_its = 100
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 7
dt = ${timestep}
linear_iteration_ratio = 1e6
growth_factor = 1.5
[]
[]
[Outputs]
[exodus]
type = Exodus
output_material_properties = true
show_material_properties = 'mu'
[]
checkpoint = true
perf_graph = true
[]
[Debug]
show_var_residual_norms = true
[]
[Adaptivity]
marker = combo
max_h_level = 4
[Indicators]
[error_T]
type = GradientJumpIndicator
variable = T
[]
[error_dispz]
type = GradientJumpIndicator
variable = disp_z
[]
[]
[Markers]
[errorfrac_T]
type = ErrorFractionMarker
refine = 0.4
coarsen = 0.2
indicator = error_T
[]
[errorfrac_dispz]
type = ErrorFractionMarker
refine = 0.4
coarsen = 0.2
indicator = error_dispz
[]
[combo]
type = ComboMarker
markers = 'errorfrac_T errorfrac_dispz'
[]
[]
[]
[Postprocessors]
[num_dofs]
type = NumDOFs
system = 'NL'
[]
[nl]
type = NumNonlinearIterations
[]
[tot_nl]
type = CumulativeValuePostprocessor
postprocessor = 'nl'
[]
[]
(test/tests/misc/check_error/missing_coupled_mat_prop_test.i)
[Mesh]
file = rectangle.e
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff body_force'
[./diff]
type = Diffusion
variable = u
[../]
[./body_force]
type = BodyForce
variable = u
block = 1
value = 10
[../]
[]
[BCs]
active = 'right'
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Materials]
# This material is global and uses a coupled property
[./mat_global]
type = CoupledMaterial
mat_prop = 'some_prop'
coupled_mat_prop = 'mp1'
block = '1 2'
[../]
# This material supplies a value for block 1 ONLY
[./mat_0]
type = GenericConstantMaterial
block = 1
prop_names = 'mp1'
prop_values = 2
[../]
[]
[Executioner]
type = Steady
# solve_type = 'PJFNK'
# preconditioner = 'ILU'
solve_type = 'PJFNK'
# petsc_options_iname = '-pc_type -pc_hypre_type'
# petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
file_base = missing_mat_prop_test
[]
(modules/phase_field/test/tests/initial_conditions/SmoothCircleIC.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 25
xmax = 50
ymax = 50
elem_type = QUAD4
[]
[Variables]
[./c]
order = THIRD
family = HERMITE
[../]
[]
[ICs]
[./c]
type = SmoothCircleIC
variable = c
x1 = 25.0
y1 = 25.0
radius = 6.0
invalue = 1.0
outvalue = -0.8
int_width = 4.0
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./CHSolid]
type = CHMath
variable = c
mob_name = M
[../]
[./CHInterface]
type = CHInterface
variable = c
kappa_name = kappa_c
mob_name = M
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./constant]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1.0 1.0'
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_max_its = 20
l_tol = 1.0e-4
nl_max_its = 40
nl_rel_tol = 1e-9
start_time = 0.0
num_steps = 1
dt = 2.0
[]
[Outputs]
exodus = false
[./out]
type = Exodus
refinements = 2
[../]
[]
(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/misc/test/tests/dynamic_loading/dynamic_obj_registration/dynamic_objects.i)
# This input file contains objects only available in phase_field
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 2
xmax = 50
ymax = 25
elem_type = QUAD4
uniform_refine = 2
[]
[Variables]
[./c]
order = THIRD
family = HERMITE
[../]
[]
[ICs]
[./c_IC]
type = BoundingBoxIC
x1 = 15.0
x2 = 35.0
y1 = 0.0
y2 = 25.0
inside = 1.0
outside = -0.8
variable = c
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./CHSolid]
type = CHMath
variable = c
mob_name = M
[../]
[./CHInterface]
type = CHInterface
variable = c
kappa_name = kappa_c
mob_name = M
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./constant]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1.0 1.0'
block = 0
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_max_its = 15
nl_max_its = 10
start_time = 0.0
num_steps = 2
dt = 1.0
[]
[Outputs]
exodus = true
[]
[Problem]
register_objects_from = 'PhaseFieldApp'
library_path = '../../../../../phase_field/lib'
[]
(modules/heat_transfer/test/tests/radiative_bcs/radiative_bc_cyl.i)
#
# Thin cylindrical shell with very high thermal conductivity
# so that temperature is almost uniform at 500 K. Radiative
# boundary conditions is applied. Heat flux out of boundary
# 'right' should be 3723.36; this is approached as the mesh
# is refined
#
[Mesh]
type = MeshGeneratorMesh
[./cartesian]
type = CartesianMeshGenerator
dim = 2
dx = '1 1'
ix = '1 10'
dy = '1 1'
subdomain_id = '1 2 1 2'
[../]
[./remove_1]
type = BlockDeletionGenerator
block = 1
input = cartesian
[../]
[./readd_left]
type = ParsedGenerateSideset
combinatorial_geometry = 'abs(x - 1) < 1e-4'
new_sideset_name = left
input = remove_1
[../]
[]
[Problem]
coord_type = RZ
[]
[Variables]
[./temp]
initial_condition = 800.0
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = temp
[../]
[]
[BCs]
[./lefttemp]
type = DirichletBC
boundary = left
variable = temp
value = 800
[../]
[./radiative_bc]
type = InfiniteCylinderRadiativeBC
boundary = right
variable = temp
boundary_radius = 2
boundary_emissivity = 0.2
cylinder_radius = 3
cylinder_emissivity = 0.7
Tinfinity = 500
[../]
[]
[Materials]
[./density]
type = GenericConstantMaterial
prop_names = 'density thermal_conductivity'
prop_values = '1 1.0e5'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
petsc_options = '-snes_converged_reason'
line_search = none
nl_rel_tol = 1e-6
nl_abs_tol = 1e-7
[]
[Postprocessors]
[./right]
type = SideDiffusiveFluxAverage
variable = temp
boundary = right
diffusivity = thermal_conductivity
[../]
[./min_temp]
type = ElementExtremeValue
variable = temp
value_type = min
[../]
[./max_temp]
type = ElementExtremeValue
variable = temp
value_type = max
[../]
[]
[Outputs]
csv = true
[]
(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
[]
(test/tests/misc/check_error/missing_material_prop_test2.i)
[Mesh]
file = rectangle.e
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_km_kernel]
type = DiffMKernel
variable = u
mat_prop = diff1
[../]
[./body_force]
type = BodyForce
variable = u
block = 1
value = 10
[../]
[]
[BCs]
active = 'right'
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Materials]
[./mat11]
type = GenericConstantMaterial
block = 1
prop_names = 'diff1'
prop_values = '1'
[../]
[./mat12]
type = GenericConstantMaterial
block = 1
prop_names = 'diff2'
prop_values = '1'
[../]
[./mat22]
type = GenericConstantMaterial
block = 2
prop_names = 'diff2'
prop_values = '1'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
file_base = out
[]
[Debug]
show_material_props = true
[]
(modules/xfem/test/tests/switching_material/two_cuts_moving.i)
[Problem]
solve = false
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[cut1]
type = LevelSetCutUserObject
level_set_var = phi1
negative_id = 1
positive_id = 33
execute_on = NONE
[]
[cut2]
type = LevelSetCutUserObject
level_set_var = phi2
negative_id = 5
positive_id = 16
execute_on = NONE
[]
[combo]
type = ComboCutUserObject
geometric_cut_userobjects = 'cut1 cut2'
cut_subdomain_combinations = '1 5;
1 16;
33 5;
33 16'
cut_subdomains = '1 3 5 7'
heal_always = true
[]
[]
[Mesh]
[square]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
[]
[]
[AuxVariables]
[phi1]
[]
[phi2]
[]
[cut1_id]
order = CONSTANT
family = MONOMIAL
[]
[cut2_id]
order = CONSTANT
family = MONOMIAL
[]
[combo_id]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[phi1]
type = FunctionAux
variable = phi1
function = 'x-0.213-t'
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[phi2]
type = FunctionAux
variable = phi2
function = 'x-0.728+t'
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[cut1_id]
type = CutSubdomainIDAux
variable = cut1_id
cut = cut1
[]
[cut2_id]
type = CutSubdomainIDAux
variable = cut2_id
cut = cut2
[]
[combo_id]
type = CutSubdomainIDAux
variable = combo_id
cut = combo
[]
[]
[Materials]
[diffusivity_A]
type = GenericConstantMaterial
prop_names = 'A_D'
prop_values = '5'
[]
[diffusivity_B]
type = GenericConstantMaterial
prop_names = 'B_D'
prop_values = '0.5'
[]
[diffusivity_C]
type = GenericConstantMaterial
prop_names = 'C_D'
prop_values = '12'
[]
[diffusivity_D]
type = GenericConstantMaterial
prop_names = 'D_D'
prop_values = '9'
[]
[diff_combined]
type = XFEMCutSwitchingMaterialReal
cut_subdomain_ids = '1 3 5 7'
base_names = 'A B C D'
prop_name = D
geometric_cut_userobject = combo
outputs = 'exodus'
output_properties = 'D'
[]
[]
[Executioner]
type = Transient
dt = 0.05
num_steps = 2
max_xfem_update = 1
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/mortar_dynamics/frictional-mortar-3d-dynamics-light-function.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[AuxVariables]
[mortar_tangent_x]
family = LAGRANGE
order = FIRST
[]
[mortar_tangent_y]
family = LAGRANGE
order = FIRST
[]
[mortar_tangent_z]
family = LAGRANGE
order = FIRST
[]
[]
[AuxKernels]
[friction_x_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_x
component = 0
boundary = 'top_bottom'
[]
[friction_y_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_y
component = 1
boundary = 'top_bottom'
[]
[friction_z_component]
type = MortarFrictionalPressureVectorAux
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
tangent_one = mortar_tangential_lm
tangent_two = mortar_tangential_3d_lm
variable = mortar_tangent_z
component = 2
boundary = 'top_bottom'
[]
[]
[Mesh]
[top_block]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 1
xmin = -0.25
xmax = 0.25
ymin = -0.25
ymax = 0.25
zmin = -0.25
zmax = 0.25
elem_type = HEX8
[]
[rotate_top_block]
type = TransformGenerator
input = top_block
transform = ROTATE
vector_value = '0 0 0'
[]
[top_block_sidesets]
type = RenameBoundaryGenerator
input = rotate_top_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'top_bottom top_back top_right top_front top_left top_top'
[]
[top_block_id]
type = SubdomainIDGenerator
input = top_block_sidesets
subdomain_id = 1
[]
[bottom_block]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 1
xmin = -.5
xmax = .5
ymin = -.5
ymax = .5
zmin = -.3
zmax = -.25
elem_type = HEX8
[]
[bottom_block_id]
type = SubdomainIDGenerator
input = bottom_block
subdomain_id = 2
[]
[bottom_block_change_boundary_id]
type = RenameBoundaryGenerator
input = bottom_block_id
old_boundary = '0 1 2 3 4 5'
new_boundary = '100 101 102 103 104 105'
[]
[combined]
type = MeshCollectionGenerator
inputs = 'top_block_id bottom_block_change_boundary_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'top_block bottom_block'
[]
[bottom_right_sideset]
type = SideSetsAroundSubdomainGenerator
input = block_rename
new_boundary = bottom_right
block = bottom_block
normal = '1 0 0'
[]
[bottom_left_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_right_sideset
new_boundary = bottom_left
block = bottom_block
normal = '-1 0 0'
[]
[bottom_top_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_left_sideset
new_boundary = bottom_top
block = bottom_block
normal = '0 0 1'
[]
[bottom_bottom_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_top_sideset
new_boundary = bottom_bottom
block = bottom_block
normal = '0 0 -1'
[]
[bottom_front_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_bottom_sideset
new_boundary = bottom_front
block = bottom_block
normal = '0 1 0'
[]
[bottom_back_sideset]
type = SideSetsAroundSubdomainGenerator
input = bottom_front_sideset
new_boundary = bottom_back
block = bottom_block
normal = '0 -1 0'
[]
[secondary]
input = bottom_back_sideset
type = LowerDBlockFromSidesetGenerator
sidesets = 'top_bottom' # top_back top_left'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'bottom_top'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
uniform_refine = 0
[]
[Functions]
# x: Contact pressure
# y: Magnitude of tangential relative velocity
# z: Temperature (to be implemented)
[mu_function]
type = ParsedFunction
expression = '0.3 + 0.5 * 2.17^(-x/100) - 10.0 * y'
[]
[]
[Variables]
[mortar_normal_lm]
block = 'secondary_lower'
use_dual = true
scaling = 1e-3
[]
[mortar_tangential_lm]
block = 'secondary_lower'
use_dual = true
scaling = 1e-3
[]
[mortar_tangential_3d_lm]
block = 'secondary_lower'
use_dual = true
scaling = 1e-3
[]
[]
[Modules/TensorMechanics/DynamicMaster]
[all]
add_variables = true
hht_alpha = 0.0
newmark_beta = 0.25
newmark_gamma = 0.5
mass_damping_coefficient = 0.0
stiffness_damping_coefficient = 0.02
displacements = 'disp_x disp_y disp_z'
generate_output = 'stress_xx stress_xy stress_xz stress_yy stress_zz'
block = '1 2'
strain = FINITE
density = density
[]
[]
[Materials]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '1.0'
[]
[tensor]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1.0e4
poissons_ratio = 0.0
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1'
[]
[tensor_1000]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e5
poissons_ratio = 0.0
[]
[stress_1000]
type = ComputeFiniteStrainElasticStress
block = '2'
[]
[]
[UserObjects]
[weighted_vel_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
lm_variable_normal = mortar_normal_lm
lm_variable_tangential_one = mortar_tangential_lm
lm_variable_tangential_two = mortar_tangential_3d_lm
secondary_variable = disp_x
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[friction]
type = ComputeDynamicFrictionalForceLMMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
friction_lm = mortar_tangential_lm
friction_lm_dir = mortar_tangential_3d_lm
c = 1e5
c_t = 1.0e5
newmark_beta = 0.25
newmark_gamma = 0.5
interpolate_normals = false
correct_edge_dropping = true
capture_tolerance = 1e-04
function_friction = mu_function
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
interpolate_normals = false
correct_edge_dropping = true
weighted_gap_uo = weighted_vel_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
interpolate_normals = false
correct_edge_dropping = true
weighted_gap_uo = weighted_vel_uo
[]
[normal_z]
type = NormalMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_normal_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
interpolate_normals = false
correct_edge_dropping = true
weighted_gap_uo = weighted_vel_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
interpolate_normals = false
correct_edge_dropping = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
interpolate_normals = false
correct_edge_dropping = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_z]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_lm
secondary_variable = disp_z
component = z
use_displaced_mesh = true
compute_lm_residuals = false
interpolate_normals = false
correct_edge_dropping = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_x]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_x
component = x
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
interpolate_normals = false
correct_edge_dropping = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_y]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_y
component = y
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
interpolate_normals = false
correct_edge_dropping = true
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_dir_z]
type = TangentialMortarMechanicalContact
primary_boundary = 'bottom_top'
secondary_boundary = 'top_bottom'
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
variable = mortar_tangential_3d_lm
secondary_variable = disp_z
component = z
direction = direction_2
use_displaced_mesh = true
compute_lm_residuals = false
interpolate_normals = false
correct_edge_dropping = true
weighted_velocities_uo = weighted_vel_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 'bottom_left bottom_right bottom_front bottom_back bottom_top bottom_bottom'
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 'bottom_left bottom_right bottom_front bottom_back bottom_top bottom_bottom'
value = 0.0
[]
[botz]
type = DirichletBC
variable = disp_z
boundary = 'bottom_left bottom_right bottom_front bottom_back bottom_top bottom_bottom'
value = 0.0
[]
[topx]
type = FunctionDirichletBC
variable = disp_x
boundary = 'top_top'
function = '0.1*t'
[]
[topy]
type = DirichletBC
variable = disp_y
boundary = 'top_top'
value = 0.0
[]
[topz]
type = FunctionDirichletBC
variable = disp_z
boundary = 'top_top'
function = '-0.1*t'
[]
[]
[Executioner]
type = Transient
end_time = .04
dt = .02
dtmin = .001
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = ' lu NONZERO '
nl_rel_tol = 5e-13
nl_abs_tol = 5e-13
line_search = 'basic'
[TimeIntegrator]
type = NewmarkBeta
gamma = 0.5
beta = 0.25
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
csv = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'contact'
[contact]
type = ContactDOFSetSize
variable = mortar_normal_lm
subdomain = 'secondary_lower'
execute_on = 'nonlinear timestep_end'
[]
[]
[VectorPostprocessors]
[contact-pressure]
type = NodalValueSampler
block = secondary_lower
variable = mortar_normal_lm
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[frictional-pressure]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangential_lm
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[frictional-pressure-3d]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangential_3d_lm
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[tangent_x]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangent_x
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[tangent_y]
type = NodalValueSampler
block = secondary_lower
variable = mortar_tangent_y
sort_by = 'id'
execute_on = TIMESTEP_END
[]
[]
(modules/thermal_hydraulics/test/tests/materials/ad_wall_heat_transfer_coefficient_mikityuk/mikityuk_test.i)
#liquid sodium properties at 773 K
rho = 762.90
vel = 0.1
k = 64.217
mu = 2.358e-4
cp = 1264.6
T = 773
T_wall = 774
D_h = 0.1
PoD = 1.1
[GlobalParams]
execute_on = 'initial'
[]
[Problem]
solve = false
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
allow_renumbering = false
[]
[AuxVariables]
[Hw]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[Hw_ak]
type = ADMaterialRealAux
variable = Hw
property = Hw
[]
[]
[Materials]
[props]
type = ADGenericConstantMaterial
prop_names = 'rho vel k mu cp T T_wall D_h'
prop_values = '${rho} ${vel} ${k} ${mu} ${cp} ${T} ${T_wall} ${D_h}'
[]
[Hw_material]
type = ADWallHeatTransferCoefficientMikityukMaterial
PoD = ${PoD}
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[Hw]
type = ElementalVariableValue
elementid = 0
variable = Hw
[]
[]
[Outputs]
csv = true
[]
(test/tests/materials/derivative_material_interface/const.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
[]
[AuxVariables]
[./dummy]
[../]
[]
[Materials]
[./provider]
type = DerivativeMaterialInterfaceTestProvider
block = 0
[../]
[./client]
type = DerivativeMaterialInterfaceTestClient
prop_name = prop
block = 0
outputs = exodus
[../]
[./client2]
type = DerivativeMaterialInterfaceTestClient
prop_name = 1.0
block = 0
outputs = exodus
[../]
[./dummy]
type = GenericConstantMaterial
prop_names = prop
block = 0
prop_values = 0
[../]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[Outputs]
exodus = true
[]
(modules/phase_field/examples/grain_growth/grain_growth_linearized_interface.i)
[GlobalParams]
bound_value = 5.0
op_num = 8
var_name_base = phi
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmax = 1000
ymax = 1000
nx = 100
ny = 100
uniform_refine = 1
[]
[Modules]
[PhaseField]
[GrainGrowthLinearizedInterface]
op_name_base = gr
mobility = L
kappa = kappa_op
[]
[]
[]
[ICs]
[PolycrystalICs]
[PolycrystalColoringIC]
polycrystal_ic_uo = RandomVoronoi
nonlinear_preconditioning = true
[]
[]
[]
[UserObjects]
[RandomVoronoi]
type = PolycrystalVoronoi
grain_num = 60
int_width = 10
rand_seed = 103838
[]
[grain_tracker]
type = GrainTracker
threshold = -4.0
compute_halo_maps = true # Only necessary for displaying HALOS
[]
[]
[AuxVariables]
[unique_grains]
order = CONSTANT
family = MONOMIAL
[]
[var_indices]
order = CONSTANT
family = MONOMIAL
[]
[halos]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
flood_counter = grain_tracker
field_display = UNIQUE_REGION
execute_on = 'initial timestep_end'
[]
[var_indices]
type = FeatureFloodCountAux
variable = var_indices
flood_counter = grain_tracker
field_display = VARIABLE_COLORING
execute_on = 'initial timestep_end'
[]
[halos]
type = FeatureFloodCountAux
variable = halos
flood_counter = grain_tracker
field_display = HALOS
execute_on = 'initial timestep_end'
[]
[]
[Materials]
[properties]
type = GenericConstantMaterial
prop_names = 'gbmob gbenergy gbwidth gamma_asymm'
prop_values = '100 6 10 1.5'
[]
[kappa_op]
type = ParsedMaterial
material_property_names = 'gbenergy gbwidth'
property_name = kappa_op
expression = '3/4*gbenergy*gbwidth'
[]
[L]
type = ParsedMaterial
material_property_names = 'gbmob gbwidth'
property_name = L
expression = '4/3*gbmob/gbwidth'
[]
[mu]
type = ParsedMaterial
material_property_names = 'gbenergy gbwidth'
property_name = mu
expression = '6*gbenergy/gbwidth'
[]
[]
[Postprocessors]
[dt]
type = TimestepSize
execute_on = 'initial TIMESTEP_END'
[]
[]
[BCs]
[Periodic]
[All]
auto_direction = 'x y'
[]
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -snes_type'
petsc_options_value = 'hypre boomeramg vinewtonrsls'
l_tol = 1e-4
nl_max_its = 10
l_max_its = 45
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.02
optimal_iterations = 6
[]
end_time = 30
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/xfem/test/tests/moving_interface/phase_transition_3d.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 11
ny = 1
nz = 1
xmin = 0.0
xmax = 20.0
ymin = 0.0
ymax = 5.0
zmin = 0.0
zmax = 5.0
elem_type = HEX8
[]
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[velocity]
type = XFEMPhaseTransitionMovingInterfaceVelocity
diffusivity_at_positive_level_set = 5
diffusivity_at_negative_level_set = 1
equilibrium_concentration_jump = 1
value_at_interface_uo = value_uo
[]
[value_uo]
type = NodeValueAtXFEMInterface
variable = 'u'
interface_mesh_cut_userobject = 'cut_mesh'
execute_on = TIMESTEP_END
level_set_var = ls
[]
[cut_mesh]
type = InterfaceMeshCut3DUserObject
mesh_file = flat_interface_2d.e
interface_velocity_uo = velocity
heal_always = true
[]
[]
[Variables]
[u]
[]
[]
[ICs]
[ic_u]
type = FunctionIC
variable = u
function = 'if(x<5.01, 2, 1)'
[]
[]
[AuxVariables]
[ls]
order = FIRST
family = LAGRANGE
[]
[]
[Constraints]
[u_constraint]
type = XFEMEqualValueAtInterface
geometric_cut_userobject = 'cut_mesh'
use_displaced_mesh = false
variable = u
value = 2
alpha = 1e6
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[]
[time]
type = TimeDerivative
variable = u
[]
[]
[AuxKernels]
[ls]
type = MeshCutLevelSetAux
mesh_cut_user_object = cut_mesh
variable = ls
execute_on = 'TIMESTEP_BEGIN'
[]
[]
[Materials]
[diffusivity_A]
type = GenericConstantMaterial
prop_names = A_diffusion_coefficient
prop_values = 5
[]
[diffusivity_B]
type = GenericConstantMaterial
prop_names = B_diffusion_coefficient
prop_values = 1
[]
[diff_combined]
type = LevelSetBiMaterialReal
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = diffusion_coefficient
[]
[]
[BCs]
# Define boundary conditions
[left_u]
type = DirichletBC
variable = u
value = 2
boundary = left
[]
[right_u]
type = NeumannBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
l_tol = 1e-3
nl_max_its = 15
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
start_time = 0.0
dt = 1
num_steps = 5
max_xfem_update = 1
[]
[Outputs]
execute_on = timestep_end
exodus = true
perf_graph = true
[]
(modules/porous_flow/examples/coal_mining/fine_with_fluid.i)
#################################################################
#
# NOTE:
# The mesh for this model is too large for the MOOSE repository
# so is kept in the the large_media submodule
#
#################################################################
#
# Strata deformation and fluid flow aaround a coal mine - 3D model
#
# A "half model" is used. The mine is 400m deep and
# just the roof is studied (-400<=z<=0). The mining panel
# sits between 0<=x<=150, and 0<=y<=1000, so this simulates
# a coal panel that is 300m wide and 1000m long. The outer boundaries
# are 1km from the excavation boundaries.
#
# The excavation takes 0.5 years.
#
# The boundary conditions for this simulation are:
# - disp_x = 0 at x=0 and x=1150
# - disp_y = 0 at y=-1000 and y=1000
# - disp_z = 0 at z=-400, but there is a time-dependent
# Young modulus that simulates excavation
# - wc_x = 0 at y=-1000 and y=1000
# - wc_y = 0 at x=0 and x=1150
# - no flow at x=0, z=-400 and z=0
# - fixed porepressure at y=-1000, y=1000 and x=1150
# That is, rollers on the sides, free at top,
# and prescribed at bottom in the unexcavated portion.
#
# A single-phase unsaturated fluid is used.
#
# The small strain formulation is used.
#
# All stresses are measured in MPa, and time units are measured in years.
#
# The initial porepressure is hydrostatic with P=0 at z=0, so
# Porepressure ~ - 0.01*z MPa, where the fluid has density 1E3 kg/m^3 and
# gravity = = 10 m.s^-2 = 1E-5 MPa m^2/kg.
# To be more accurate, i use
# Porepressure = -bulk * log(1 + g*rho0*z/bulk)
# where bulk=2E3 MPa and rho0=1Ee kg/m^3.
# The initial stress is consistent with the weight force from undrained
# density 2500 kg/m^3, and fluid porepressure, and a Biot coefficient of 0.7, ie,
# stress_zz^effective = 0.025*z + 0.7 * initial_porepressure
# The maximum and minimum principal horizontal effective stresses are
# assumed to be equal to 0.8*stress_zz.
#
# Material properties:
# Young's modulus = 8 GPa
# Poisson's ratio = 0.25
# Cosserat layer thickness = 1 m
# Cosserat-joint normal stiffness = large
# Cosserat-joint shear stiffness = 1 GPa
# MC cohesion = 2 MPa
# MC friction angle = 35 deg
# MC dilation angle = 8 deg
# MC tensile strength = 1 MPa
# MC compressive strength = 100 MPa
# WeakPlane cohesion = 0.1 MPa
# WeakPlane friction angle = 30 deg
# WeakPlane dilation angle = 10 deg
# WeakPlane tensile strength = 0.1 MPa
# WeakPlane compressive strength = 100 MPa softening to 1 MPa at strain = 1
# Fluid density at zero porepressure = 1E3 kg/m^3
# Fluid bulk modulus = 2E3 MPa
# Fluid viscosity = 1.1E-3 Pa.s = 1.1E-9 MPa.s = 3.5E-17 MPa.year
#
[GlobalParams]
perform_finite_strain_rotations = false
displacements = 'disp_x disp_y disp_z'
Cosserat_rotations = 'wc_x wc_y wc_z'
PorousFlowDictator = dictator
biot_coefficient = 0.7
[]
[Mesh]
[file]
type = FileMeshGenerator
file = fine.e
[]
[xmin]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
new_boundary = xmin
normal = '-1 0 0'
input = file
[]
[xmax]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
new_boundary = xmax
normal = '1 0 0'
input = xmin
[]
[ymin]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
new_boundary = ymin
normal = '0 -1 0'
input = xmax
[]
[ymax]
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
new_boundary = ymax
normal = '0 1 0'
input = ymin
[]
[zmax]
type = SideSetsAroundSubdomainGenerator
block = 30
new_boundary = zmax
normal = '0 0 1'
input = ymax
[]
[zmin]
type = SideSetsAroundSubdomainGenerator
block = 2
new_boundary = zmin
normal = '0 0 -1'
input = zmax
[]
[excav]
type = SubdomainBoundingBoxGenerator
input = zmin
block_id = 1
bottom_left = '0 0 -400'
top_right = '150 1000 -397'
[]
[roof]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 3
paired_block = 1
input = excav
new_boundary = roof
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[wc_x]
[]
[wc_y]
[]
[porepressure]
scaling = 1E-5
[]
[]
[ICs]
[porepressure]
type = FunctionIC
variable = porepressure
function = ini_pp
[]
[]
[Kernels]
[cx_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_x
component = 0
[]
[cy_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_y
component = 1
[]
[cz_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_z
component = 2
[]
[x_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_x
displacements = 'wc_x wc_y wc_z'
component = 0
base_name = couple
[]
[y_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_y
displacements = 'wc_x wc_y wc_z'
component = 1
base_name = couple
[]
[x_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_x
component = 0
[]
[y_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_y
component = 1
[]
[gravity]
type = Gravity
use_displaced_mesh = false
variable = disp_z
value = -10E-6 # remember this is in MPa
[]
[poro_x]
type = PorousFlowEffectiveStressCoupling
use_displaced_mesh = false
variable = disp_x
component = 0
[]
[poro_y]
type = PorousFlowEffectiveStressCoupling
use_displaced_mesh = false
variable = disp_y
component = 1
[]
[poro_z]
type = PorousFlowEffectiveStressCoupling
use_displaced_mesh = false
component = 2
variable = disp_z
[]
[poro_vol_exp]
type = PorousFlowMassVolumetricExpansion
use_displaced_mesh = false
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
variable = porepressure
fluid_component = 0
[]
[mass0]
type = PorousFlowMassTimeDerivative
use_displaced_mesh = false
fluid_component = 0
variable = porepressure
[]
[flux]
type = PorousFlowAdvectiveFlux
use_displaced_mesh = false
variable = porepressure
gravity = '0 0 -10E-6'
fluid_component = 0
[]
[]
[AuxVariables]
[saturation]
order = CONSTANT
family = MONOMIAL
[]
[darcy_x]
order = CONSTANT
family = MONOMIAL
[]
[darcy_y]
order = CONSTANT
family = MONOMIAL
[]
[darcy_z]
order = CONSTANT
family = MONOMIAL
[]
[porosity]
order = CONSTANT
family = MONOMIAL
[]
[wc_z]
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xz]
order = CONSTANT
family = MONOMIAL
[]
[stress_yx]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_yz]
order = CONSTANT
family = MONOMIAL
[]
[stress_zx]
order = CONSTANT
family = MONOMIAL
[]
[stress_zy]
order = CONSTANT
family = MONOMIAL
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_xx]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_xy]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_xz]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_yx]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_yz]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_zx]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_zy]
order = CONSTANT
family = MONOMIAL
[]
[total_strain_zz]
order = CONSTANT
family = MONOMIAL
[]
[perm_xx]
order = CONSTANT
family = MONOMIAL
[]
[perm_yy]
order = CONSTANT
family = MONOMIAL
[]
[perm_zz]
order = CONSTANT
family = MONOMIAL
[]
[mc_shear]
order = CONSTANT
family = MONOMIAL
[]
[mc_tensile]
order = CONSTANT
family = MONOMIAL
[]
[wp_shear]
order = CONSTANT
family = MONOMIAL
[]
[wp_tensile]
order = CONSTANT
family = MONOMIAL
[]
[wp_shear_f]
order = CONSTANT
family = MONOMIAL
[]
[wp_tensile_f]
order = CONSTANT
family = MONOMIAL
[]
[mc_shear_f]
order = CONSTANT
family = MONOMIAL
[]
[mc_tensile_f]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[saturation_water]
type = PorousFlowPropertyAux
variable = saturation
property = saturation
phase = 0
execute_on = timestep_end
[]
[darcy_x]
type = PorousFlowDarcyVelocityComponent
variable = darcy_x
gravity = '0 0 -10E-6'
component = x
[]
[darcy_y]
type = PorousFlowDarcyVelocityComponent
variable = darcy_y
gravity = '0 0 -10E-6'
component = y
[]
[darcy_z]
type = PorousFlowDarcyVelocityComponent
variable = darcy_z
gravity = '0 0 -10E-6'
component = z
[]
[porosity]
type = PorousFlowPropertyAux
property = porosity
variable = porosity
execute_on = timestep_end
[]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
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
[]
[stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
execute_on = timestep_end
[]
[stress_yx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yx
index_i = 1
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_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
execute_on = timestep_end
[]
[stress_zx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zx
index_i = 2
index_j = 0
execute_on = timestep_end
[]
[stress_zy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zy
index_i = 2
index_j = 1
execute_on = timestep_end
[]
[stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[total_strain_xx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_xx
index_i = 0
index_j = 0
execute_on = timestep_end
[]
[total_strain_xy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_xy
index_i = 0
index_j = 1
execute_on = timestep_end
[]
[total_strain_xz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_xz
index_i = 0
index_j = 2
execute_on = timestep_end
[]
[total_strain_yx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_yx
index_i = 1
index_j = 0
execute_on = timestep_end
[]
[total_strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_yy
index_i = 1
index_j = 1
execute_on = timestep_end
[]
[total_strain_yz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_yz
index_i = 1
index_j = 2
execute_on = timestep_end
[]
[total_strain_zx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_zx
index_i = 2
index_j = 0
execute_on = timestep_end
[]
[total_strain_zy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_zy
index_i = 2
index_j = 1
execute_on = timestep_end
[]
[total_strain_zz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = total_strain_zz
index_i = 2
index_j = 2
execute_on = timestep_end
[]
[perm_xx]
type = PorousFlowPropertyAux
property = permeability
variable = perm_xx
row = 0
column = 0
execute_on = timestep_end
[]
[perm_yy]
type = PorousFlowPropertyAux
property = permeability
variable = perm_yy
row = 1
column = 1
execute_on = timestep_end
[]
[perm_zz]
type = PorousFlowPropertyAux
property = permeability
variable = perm_zz
row = 2
column = 2
execute_on = timestep_end
[]
[mc_shear]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_internal_parameter
variable = mc_shear
execute_on = timestep_end
[]
[mc_tensile]
type = MaterialStdVectorAux
index = 1
property = mc_plastic_internal_parameter
variable = mc_tensile
execute_on = timestep_end
[]
[wp_shear]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_internal_parameter
variable = wp_shear
execute_on = timestep_end
[]
[wp_tensile]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_internal_parameter
variable = wp_tensile
execute_on = timestep_end
[]
[mc_shear_f]
type = MaterialStdVectorAux
index = 6
property = mc_plastic_yield_function
variable = mc_shear_f
execute_on = timestep_end
[]
[mc_tensile_f]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_yield_function
variable = mc_tensile_f
execute_on = timestep_end
[]
[wp_shear_f]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_yield_function
variable = wp_shear_f
execute_on = timestep_end
[]
[wp_tensile_f]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_yield_function
variable = wp_tensile_f
execute_on = timestep_end
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_x
boundary = 'xmin xmax'
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_y
boundary = 'ymin ymax'
value = 0.0
[]
[no_z]
type = DirichletBC
variable = disp_z
boundary = zmin
value = 0.0
[]
[no_wc_x]
type = DirichletBC
variable = wc_x
boundary = 'ymin ymax'
value = 0.0
[]
[no_wc_y]
type = DirichletBC
variable = wc_y
boundary = 'xmin xmax'
value = 0.0
[]
[fix_porepressure]
type = FunctionDirichletBC
variable = porepressure
boundary = 'ymin ymax xmax'
function = ini_pp
[]
[roof_porepressure]
type = PorousFlowPiecewiseLinearSink
variable = porepressure
pt_vals = '-1E3 1E3'
multipliers = '-1 1'
fluid_phase = 0
flux_function = roof_conductance
boundary = roof
[]
[roof]
type = StickyBC
variable = disp_z
min_value = -3.0
boundary = roof
[]
[]
[Functions]
[ini_pp]
type = ParsedFunction
symbol_names = 'bulk p0 g rho0'
symbol_values = '2E3 0.0 1E-5 1E3'
expression = '-bulk*log(exp(-p0/bulk)+g*rho0*z/bulk)'
[]
[ini_xx]
type = ParsedFunction
symbol_names = 'bulk p0 g rho0 biot'
symbol_values = '2E3 0.0 1E-5 1E3 0.7'
expression = '0.8*(2500*10E-6*z+biot*(-bulk*log(exp(-p0/bulk)+g*rho0*z/bulk)))'
[]
[ini_zz]
type = ParsedFunction
symbol_names = 'bulk p0 g rho0 biot'
symbol_values = '2E3 0.0 1E-5 1E3 0.7'
expression = '2500*10E-6*z+biot*(-bulk*log(exp(-p0/bulk)+g*rho0*z/bulk))'
[]
[excav_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax minval maxval slope'
symbol_values = '0.5 0 1000.0 1E-9 1 10'
# excavation face at ymin+(ymax-ymin)*min(t/end_t,1)
# slope is the distance over which the modulus reduces from maxval to minval
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),minval,if(y<ymin+(ymax-ymin)*min(t/end_t,1)+slope,minval+(maxval-minval)*(y-(ymin+(ymax-ymin)*min(t/end_t,1)))/slope,maxval))'
[]
[density_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax minval maxval'
symbol_values = '0.5 0 1000.0 0 2500'
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),minval,maxval)'
[]
[roof_conductance]
type = ParsedFunction
symbol_names = 'end_t ymin ymax maxval minval'
symbol_values = '0.5 0 1000.0 1E7 0'
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),maxval,minval)'
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'porepressure disp_x disp_y disp_z'
number_fluid_phases = 1
number_fluid_components = 1
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1 # MPa^-1
[]
[mc_coh_strong_harden]
type = TensorMechanicsHardeningExponential
value_0 = 1.99 # MPa
value_residual = 2.01 # MPa
rate = 1.0
[]
[mc_fric]
type = TensorMechanicsHardeningConstant
value = 0.61 # 35deg
[]
[mc_dil]
type = TensorMechanicsHardeningConstant
value = 0.15 # 8deg
[]
[mc_tensile_str_strong_harden]
type = TensorMechanicsHardeningExponential
value_0 = 1.0 # MPa
value_residual = 1.0 # MPa
rate = 1.0
[]
[mc_compressive_str]
type = TensorMechanicsHardeningCubic
value_0 = 100 # Large!
value_residual = 100
internal_limit = 0.1
[]
[wp_coh_harden]
type = TensorMechanicsHardeningCubic
value_0 = 0.05
value_residual = 0.05
internal_limit = 10
[]
[wp_tan_fric]
type = TensorMechanicsHardeningConstant
value = 0.26 # 15deg
[]
[wp_tan_dil]
type = TensorMechanicsHardeningConstant
value = 0.18 # 10deg
[]
[wp_tensile_str_harden]
type = TensorMechanicsHardeningCubic
value_0 = 0.05
value_residual = 0.05
internal_limit = 10
[]
[wp_compressive_str_soften]
type = TensorMechanicsHardeningCubic
value_0 = 100
value_residual = 1
internal_limit = 1.0
[]
[]
[FluidProperties]
[simple_fluid]
type = SimpleFluidProperties
bulk_modulus = 2E3
density0 = 1000
thermal_expansion = 0
viscosity = 3.5E-17
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[eff_fluid_pressure]
type = PorousFlowEffectiveFluidPressure
[]
[vol_strain]
type = PorousFlowVolumetricStrain
[]
[ppss]
type = PorousFlow1PhaseP
porepressure = porepressure
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
fp = simple_fluid
phase = 0
[]
[porosity_for_aux]
type = PorousFlowPorosity
at_nodes = false
fluid = true
mechanical = true
ensure_positive = true
porosity_zero = 0.02
solid_bulk = 5.3333E3
[]
[porosity_bulk]
type = PorousFlowPorosity
fluid = true
mechanical = true
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
ensure_positive = true
porosity_zero = 0.02
solid_bulk = 5.3333E3
[]
[porosity_excav]
type = PorousFlowPorosityConst
block = 1
porosity = 1.0
[]
[permeability_bulk]
type = PorousFlowPermeabilityKozenyCarman
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
poroperm_function = kozeny_carman_phi0
k0 = 1E-15
phi0 = 0.02
n = 2
m = 2
[]
[permeability_excav]
type = PorousFlowPermeabilityConst
block = 1
permeability = '0 0 0 0 0 0 0 0 0'
[]
[relperm]
type = PorousFlowRelativePermeabilityCorey
n = 4
s_res = 0.4
sum_s_res = 0.4
phase = 0
[]
[elasticity_tensor_0]
type = ComputeLayeredCosseratElasticityTensor
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
[]
[elasticity_tensor_1]
type = ComputeLayeredCosseratElasticityTensor
block = 1
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
elasticity_tensor_prefactor = excav_sideways
[]
[strain]
type = ComputeCosseratIncrementalSmallStrain
eigenstrain_names = ini_stress
[]
[ini_stress]
type = ComputeEigenstrainFromInitialStress
eigenstrain_name = ini_stress
initial_stress = 'ini_xx 0 0 0 ini_xx 0 0 0 ini_zz'
[]
[stress_0]
type = ComputeMultipleInelasticCosseratStress
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
inelastic_models = 'mc wp'
cycle_models = true
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[]
[stress_1]
type = ComputeMultipleInelasticCosseratStress
block = 1
inelastic_models = ''
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[]
[mc]
type = CappedMohrCoulombCosseratStressUpdate
warn_about_precision_loss = false
host_youngs_modulus = 8E3
host_poissons_ratio = 0.25
base_name = mc
tensile_strength = mc_tensile_str_strong_harden
compressive_strength = mc_compressive_str
cohesion = mc_coh_strong_harden
friction_angle = mc_fric
dilation_angle = mc_dil
max_NR_iterations = 100000
smoothing_tol = 0.1 # MPa # Must be linked to cohesion
yield_function_tol = 1E-9 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0
[]
[wp]
type = CappedWeakPlaneCosseratStressUpdate
warn_about_precision_loss = false
base_name = wp
cohesion = wp_coh_harden
tan_friction_angle = wp_tan_fric
tan_dilation_angle = wp_tan_dil
tensile_strength = wp_tensile_str_harden
compressive_strength = wp_compressive_str_soften
max_NR_iterations = 10000
tip_smoother = 0.05
smoothing_tol = 0.05 # MPa # Note, this must be tied to cohesion, otherwise get no possible return at cone apex
yield_function_tol = 1E-11 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0E-3
[]
[undrained_density_0]
type = GenericConstantMaterial
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
prop_names = density
prop_values = 2500
[]
[undrained_density_1]
type = GenericFunctionMaterial
block = 1
prop_names = density
prop_values = density_sideways
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Postprocessors]
[min_roof_disp]
type = NodalExtremeValue
boundary = roof
value_type = min
variable = disp_z
[]
[min_roof_pp]
type = NodalExtremeValue
boundary = roof
value_type = min
variable = porepressure
[]
[min_surface_disp]
type = NodalExtremeValue
boundary = zmax
value_type = min
variable = disp_z
[]
[min_surface_pp]
type = NodalExtremeValue
boundary = zmax
value_type = min
variable = porepressure
[]
[max_perm_zz]
type = ElementExtremeValue
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
variable = perm_zz
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason'
# best overall
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu mumps'
# best if you don't have mumps:
#petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
#petsc_options_value = ' asm 2 lu gmres 200'
# very basic:
#petsc_options_iname = '-pc_type -ksp_type -ksp_gmres_restart'
#petsc_options_value = ' bjacobi gmres 200'
line_search = bt
nl_abs_tol = 1e-3
nl_rel_tol = 1e-5
l_max_its = 200
nl_max_its = 30
start_time = 0.0
dt = 0.0025
end_time = 0.5
[]
[Outputs]
time_step_interval = 1
print_linear_residuals = true
exodus = true
csv = true
console = true
[]
(modules/electromagnetics/test/tests/interfacekernels/electrostatic_contact/analytic_solution_test_two_block.i)
# Regression test for ElectrostaticContactCondition with analytic solution with
# two blocks
#
# dim = 1D
# X = [0,2]
# Interface at X = 1
#
# stainless_steel graphite
# +------------------+------------------+
#
# Left BC: Potential = 1
# Right BC: Potential = 0
# Center Interface: ElectrostaticContactCondition
#
[Mesh]
[line]
type = GeneratedMeshGenerator
dim = 1
nx = 4
xmax = 2
[]
[break]
type = SubdomainBoundingBoxGenerator
input = line
block_id = 1
block_name = 'graphite'
bottom_left = '1 0 0'
top_right = '2 0 0'
[]
[block_rename]
type = RenameBlockGenerator
input = break
old_block = 0
new_block = 'stainless_steel'
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
input = block_rename
primary_block = 'stainless_steel'
paired_block = 'graphite'
new_boundary = 'ssg_interface'
[]
[]
[Variables]
[potential_graphite]
block = graphite
[]
[potential_stainless_steel]
block = stainless_steel
[]
[]
[AuxVariables]
[analytic_potential_stainless_steel]
block = stainless_steel
[]
[analytic_potential_graphite]
block = graphite
[]
[]
[Kernels]
[electric_graphite]
type = ADMatDiffusion
variable = potential_graphite
diffusivity = electrical_conductivity
block = graphite
[]
[electric_stainless_steel]
type = ADMatDiffusion
variable = potential_stainless_steel
diffusivity = electrical_conductivity
block = stainless_steel
[]
[]
[AuxKernels]
[analytic_function_aux_stainless_steel]
type = FunctionAux
function = potential_fxn_stainless_steel
variable = analytic_potential_stainless_steel
block = stainless_steel
[]
[analytic_function_aux_graphite]
type = FunctionAux
function = potential_fxn_graphite
variable = analytic_potential_graphite
block = graphite
[]
[]
[BCs]
[elec_left]
type = ADDirichletBC
variable = potential_stainless_steel
boundary = left
value = 1
[]
[elec_right]
type = ADDirichletBC
variable = potential_graphite
boundary = right
value = 0
[]
[]
[InterfaceKernels]
[electric_contact_conductance_ssg]
type = ElectrostaticContactCondition
variable = potential_stainless_steel
neighbor_var = potential_graphite
boundary = ssg_interface
mean_hardness = mean_hardness
mechanical_pressure = 3000
[]
[]
[Materials]
#graphite (at 300 K)
[sigma_graphite]
type = ADGenericConstantMaterial
prop_names = electrical_conductivity
prop_values = 73069.2
block = graphite
[]
#stainless_steel (at 300 K)
[sigma_stainless_steel]
type = ADGenericConstantMaterial
prop_names = electrical_conductivity
prop_values = 1.41867e6
block = stainless_steel
[]
# harmonic mean of graphite and stainless steel hardness
[mean_hardness]
type = ADGenericConstantMaterial
prop_names = mean_hardness
prop_values = 2.4797e9
[]
[]
[Functions]
[potential_fxn_stainless_steel]
type = ElectricalContactTestFunc
domain = stainless_steel
[]
[potential_fxn_graphite]
type = ElectricalContactTestFunc
domain = graphite
[]
[]
[Postprocessors]
[error_stainless_steel]
type = ElementL2Error
variable = potential_stainless_steel
function = potential_fxn_stainless_steel
block = stainless_steel
[]
[error_graphite]
type = ElementL2Error
variable = potential_graphite
function = potential_fxn_graphite
block = graphite
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
automatic_scaling = true
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/contact/test/tests/mortar_dynamics/block-dynamics.i)
starting_point = 2e-1
offset = -0.19
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[normal_lm]
block = 3
use_dual = true
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[DynamicTensorMechanics]
displacements = 'disp_x disp_y'
generate_output = 'stress_xx stress_yy'
strain = FINITE
block = '1 2'
zeta = 1.0
alpha = 0.0
[]
[inertia_x]
type = InertialForce
variable = disp_x
velocity = vel_x
acceleration = accel_x
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[inertia_y]
type = InertialForce
variable = disp_y
velocity = vel_y
acceleration = accel_y
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[strain]
type = ComputeFiniteStrain
block = '1 2'
[]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '7750'
[]
[]
[AuxVariables]
[vel_x]
block = '1 2'
[]
[accel_x]
block = '1 2'
[]
[vel_y]
block = '1 2'
[]
[accel_y]
block = '1 2'
[]
[vel_z]
block = '1 2'
[]
[accel_z]
block = '1 2'
[]
[]
[AuxKernels]
[accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = 'LINEAR timestep_end'
[]
[vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = 'LINEAR timestep_end'
[]
[accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = 'LINEAR timestep_end'
[]
[vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = 'LINEAR timestep_end'
[]
[]
# User object provides the contact force (e.g. LM)
# for the application of the generalized force
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
lm_variable = normal_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeDynamicWeightedGapLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
c = 1e4
capture_tolerance = 1.0e-5
newmark_beta = 0.25
newmark_gamma = 0.5
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 4 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 75
dt = 0.05
dtmin = .05
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err '
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = false
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
checkpoint = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/heat_transfer/test/tests/thin_layer_heat_transfer/steady_3d.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
nx = 10
ny = 10
nz = 2
zmax = 0.2
dim = 3
[]
[block1]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '0.5 1 0.2'
input = gen
[]
[block2]
type = SubdomainBoundingBoxGenerator
block_id = 2
bottom_left = '0.5 0 0'
top_right = '1 1 0.2'
input = block1
[]
[breakmesh]
input = block2
type = BreakMeshByBlockGenerator
block_pairs = '1 2'
split_interface = true
add_interface_on_two_sides = true
[]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[thermal_cond]
type = HeatConduction
variable = temperature
[]
[]
[InterfaceKernels]
[thin_layer]
type = ThinLayerHeatTransfer
thermal_conductivity = thermal_conductivity_layer
thickness = 0.01
variable = temperature
neighbor_var = temperature
boundary = Block1_Block2
[]
[]
[BCs]
[left_temp]
type = DirichletBC
value = 100
variable = temperature
boundary = left
[]
[right_temp]
type = DirichletBC
value = 0
variable = temperature
boundary = right
[]
[]
[Materials]
[thermal_cond]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity'
prop_values = '1'
[]
[thermal_cond_layer]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity_layer'
prop_values = '0.05'
boundary = Block1_Block2
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
dt = 0.05
num_steps = 1
[]
[Outputs]
print_linear_residuals = false
exodus = true
[]
(modules/combined/examples/publications/rapid_dev/fig7a.i)
#
# Fig. 7 input for 10.1016/j.commatsci.2017.02.017
# D. Schwen et al./Computational Materials Science 132 (2017) 36-45
# Solid gray curve (1)
# Eigenstrain and elastic energies ar computed per phase and then interpolated.
# Supply the RADIUS parameter (10-35) on the command line to generate data
# for all curves in the plot.
#
[Mesh]
type = GeneratedMesh
dim = 1
nx = 32
xmin = 0
xmax = 100
second_order = true
[]
[Problem]
coord_type = RSPHERICAL
[]
[GlobalParams]
displacements = 'disp_r'
[]
[Functions]
[./diff]
type = ParsedFunction
expression = '${RADIUS}-pos_c'
symbol_names = pos_c
symbol_values = pos_c
[../]
[]
# 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'
execute_on = 'INITIAL TIMESTEP_END'
[../]
[]
[Variables]
# Solute concentration variable
[./c]
[./InitialCondition]
type = SmoothCircleIC
invalue = 1
outvalue = 0
x1 = 0
y1 = 0
radius = ${RADIUS}
int_width = 3
[../]
[../]
[./w]
[../]
# Phase order parameter
[./eta]
[./InitialCondition]
type = SmoothCircleIC
invalue = 1
outvalue = 0
x1 = 0
y1 = 0
radius = ${RADIUS}
int_width = 3
[../]
[../]
# Mesh displacement
[./disp_r]
order = SECOND
[../]
[./Fe_fit]
order = SECOND
[../]
[]
[Kernels]
# Set up stress divergence kernels
[./TensorMechanics]
[../]
# Split Cahn-Hilliard kernels
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
args = 'eta'
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
[./detadt]
type = TimeDerivative
variable = eta
[../]
[./ACBulk1]
type = AllenCahn
variable = eta
args = 'c'
mob_name = L
f_name = F
[../]
[./ACInterface]
type = ACInterface
variable = eta
mob_name = L
kappa_name = kappa_eta
[../]
[./Fe]
type = MaterialPropertyValue
prop_name = Fe
variable = Fe_fit
[../]
[./autoadjust]
type = MaskedBodyForce
variable = w
function = diff
mask = mask
[../]
[]
[Materials]
# declare a few constants, such as mobilities (L,M) and interface gradient prefactors (kappa*)
[./consts]
type = GenericConstantMaterial
prop_names = 'M L kappa_c kappa_eta'
prop_values = '1.0 1.0 0.5 1'
[../]
# forcing function mask
[./mask]
type = ParsedMaterial
property_name = mask
expression = grad/dt
material_property_names = 'grad dt'
[../]
[./grad]
type = VariableGradientMaterial
variable = c
prop = grad
[../]
[./time]
type = TimeStepMaterial
[../]
# global mechanical properties
[./elasticity_tensor_1]
type = ComputeElasticityTensor
C_ijkl = '1 1'
base_name = phase1
fill_method = symmetric_isotropic
[../]
[./elasticity_tensor_2]
type = ComputeElasticityTensor
C_ijkl = '1 1'
base_name = phase2
fill_method = symmetric_isotropic
[../]
[./strain_1]
type = ComputeRSphericalSmallStrain
base_name = phase1
[../]
[./strain_2]
type = ComputeRSphericalSmallStrain
base_name = phase2
eigenstrain_names = eigenstrain
[../]
[./stress_1]
type = ComputeLinearElasticStress
base_name = phase1
[../]
[./stress_2]
type = ComputeLinearElasticStress
base_name = phase2
[../]
# eigenstrain per phase
[./eigenstrain2]
type = ComputeEigenstrain
eigen_base = '0.05 0.05 0.05 0 0 0'
base_name = phase2
eigenstrain_name = eigenstrain
[../]
# switching functions
[./switching]
type = SwitchingFunctionMaterial
function_name = h
eta = eta
h_order = SIMPLE
[../]
[./barrier]
type = BarrierFunctionMaterial
eta = eta
[../]
# chemical free energies
[./chemical_free_energy_1]
type = DerivativeParsedMaterial
property_name = Fc1
expression = 'c^2'
coupled_variables = 'c'
derivative_order = 2
[../]
[./chemical_free_energy_2]
type = DerivativeParsedMaterial
property_name = Fc2
expression = '(1-c)^2'
coupled_variables = 'c'
derivative_order = 2
[../]
# elastic free energies
[./elastic_free_energy_1]
type = ElasticEnergyMaterial
f_name = Fe1
args = ''
base_name = phase1
derivative_order = 2
[../]
[./elastic_free_energy_2]
type = ElasticEnergyMaterial
f_name = Fe2
args = ''
base_name = phase2
derivative_order = 2
[../]
# per phase free energies
[./free_energy_1]
type = DerivativeSumMaterial
property_name = F1
sum_materials = 'Fc1 Fe1'
coupled_variables = 'c'
derivative_order = 2
[../]
[./free_energy_2]
type = DerivativeSumMaterial
property_name = F2
sum_materials = 'Fc2 Fe2'
coupled_variables = 'c'
derivative_order = 2
[../]
# global chemical free energy
[./global_free_energy]
type = DerivativeTwoPhaseMaterial
f_name = F
fa_name = F1
fb_name = F2
eta = eta
args = 'c'
W = 4
[../]
# global stress
[./global_stress]
type = TwoPhaseStressMaterial
base_A = phase1
base_B = phase2
[../]
[./elastic_free_energy]
type = DerivativeTwoPhaseMaterial
f_name = Fe
fa_name = Fe1
fb_name = Fe2
eta = eta
args = 'c'
W = 0
[../]
[]
[BCs]
[./left_r]
type = DirichletBC
variable = disp_r
boundary = 'left'
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'
outputs = 'table console'
[../]
[./total_solute]
type = ElementIntegralVariablePostprocessor
variable = c
execute_on = 'INITIAL TIMESTEP_END'
outputs = 'table console'
[../]
[./pos_c]
type = FindValueOnLine
start_point = '0 0 0'
end_point = '100 0 0'
v = c
target = 0.582
tol = 1e-8
execute_on = 'INITIAL TIMESTEP_END'
outputs = 'table console'
[../]
[./pos_eta]
type = FindValueOnLine
start_point = '0 0 0'
end_point = '100 0 0'
v = eta
target = 0.5
tol = 1e-8
execute_on = 'INITIAL TIMESTEP_END'
outputs = 'table console'
[../]
[./c_min]
type = ElementExtremeValue
value_type = min
variable = c
execute_on = 'INITIAL TIMESTEP_END'
outputs = 'table console'
[../]
[]
[VectorPostprocessors]
[./line]
type = LineValueSampler
variable = 'Fe_fit c w'
start_point = '0 0 0'
end_point = '100 0 0'
num_points = 5000
sort_by = x
outputs = vpp
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 = 15
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 2.0e-9
start_time = 0.0
end_time = 100000.0
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 7
iteration_window = 1
dt = 1
[../]
[./Adaptivity]
initial_adaptivity = 5
interval = 10
max_h_level = 5
refine_fraction = 0.9
coarsen_fraction = 0.1
[../]
[]
[Outputs]
print_linear_residuals = false
perf_graph = true
execute_on = 'INITIAL TIMESTEP_END'
[./table]
type = CSV
delimiter = ' '
file_base = radius_${RADIUS}/energy_pp
[../]
[./vpp]
type = CSV
delimiter = ' '
sync_times = '10 50 100 500 1000 5000 10000 50000 100000'
sync_only = true
time_data = true
file_base = radius_${RADIUS}/energy_vpp
[../]
[]
(modules/heat_transfer/test/tests/code_verification/spherical_test_no4.i)
# Problem III.4
#
# A spherical shell has thermal conductivity k and heat generation q.
# It has an inner radius ri and outer radius ro. A constant heat flux is
# applied to the inside surface qin and the outside surface is exposed
# to a fluid temperature uf and heat transfer coefficient h.
#
# REFERENCE:
# A. Toptan, et al. (Mar.2020). Tech. rep. CASL-U-2020-1939-000, SAND2020-3887 R. DOI:10.2172/1614683.
[Mesh]
[./geom]
type = GeneratedMeshGenerator
dim = 1
elem_type = EDGE2
xmin = 0.2
nx = 4
[../]
[]
[Variables]
[./u]
order = FIRST
[../]
[]
[Problem]
coord_type = RSPHERICAL
[]
[Functions]
[./exact]
type = ParsedFunction
symbol_names = 'qin q k ri ro uf h'
symbol_values = '100 1200 1.0 0.2 1 100 10'
expression = 'uf+ (q/(6*k)) * ( ro^2-x^2 + 2*k*(ro^3-ri^3)/(h*ro^2) + 2 * ri^3 * (1/ro-1/x) ) + (1/x-1/ro+k/(h*ro^2)) * qin * ri^2 / k'
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = u
[../]
[./heatsource]
type = HeatSource
function = 1200
variable = u
[../]
[]
[BCs]
[./ui]
type = NeumannBC
boundary = left
variable = u
value = 100
[../]
[./uo]
type = CoupledConvectiveHeatFluxBC
boundary = right
variable = u
htc = 10.0
T_infinity = 100
[../]
[]
[Materials]
[./property]
type = GenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '1.0 1.0 1.0'
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = exact
variable = u
[../]
[./h]
type = AverageElementSize
[]
[]
[Outputs]
csv = true
[]
(modules/phase_field/examples/multiphase/GrandPotential3Phase_masscons.i)
# This is an example of implementation of the multi-phase, multi-order parameter
# grand potential based phase-field model described in Phys. Rev. E, 98, 023309
# (2018). It includes 3 phases with 1 grain of each phase.
# This is a revised version of the model that eliminates small variations in mass
# that have been observed with the original formulation. In this version, rather
# than evolving the chemical potential as a field variable, we evolve the composition
# field using a normal Cahn-Hilliard equation, then relate chemical potential to
# composition using Eq. (22) from the paper (this relationship is derived from the
# grand potential functional and is valid only for parabolic free energies).
[Mesh]
type = GeneratedMesh
dim = 2
nx = 60
ny = 60
xmin = -15
xmax = 15
ymin = -15
ymax = 15
[]
[Variables]
[w]
[]
[c]
[]
[etaa0]
[]
[etab0]
[]
[etad0]
[]
[]
[ICs]
[IC_etaa0]
type = BoundingBoxIC
variable = etaa0
x1 = -10
y1 = -10
x2 = 10
y2 = 10
inside = 1.0
outside = 0.0
[]
[IC_etad0]
type = BoundingBoxIC
variable = etad0
x1 = -10
y1 = -10
x2 = 10
y2 = 10
inside = 0.0
outside = 1.0
[]
[IC_c]
type = BoundingBoxIC
variable = c
x1 = -10
y1 = -10
x2 = 10
y2 = 10
inside = 0.1
outside = 0.5
[]
[IC_w]
type = FunctionIC
variable = w
function = ic_func_w
[]
[]
[Functions]
[ic_func_w]
type = ConstantFunction
value = 0
[]
[]
[Kernels]
# Order parameter eta_alpha0
[ACa0_bulk]
type = ACGrGrMulti
variable = etaa0
v = 'etab0 etad0'
gamma_names = 'gab gad'
[]
[ACa0_sw]
type = ACSwitching
variable = etaa0
Fj_names = 'omegaa omegab omegad'
hj_names = 'ha hb hd'
coupled_variables = 'etab0 etad0 w'
[]
[ACa0_int]
type = ACInterface
variable = etaa0
kappa_name = kappa
[]
[ea0_dot]
type = TimeDerivative
variable = etaa0
[]
# Order parameter eta_beta0
[ACb0_bulk]
type = ACGrGrMulti
variable = etab0
v = 'etaa0 etad0'
gamma_names = 'gab gbd'
[]
[ACb0_sw]
type = ACSwitching
variable = etab0
Fj_names = 'omegaa omegab omegad'
hj_names = 'ha hb hd'
coupled_variables = 'etaa0 etad0 w'
[]
[ACb0_int]
type = ACInterface
variable = etab0
kappa_name = kappa
[]
[eb0_dot]
type = TimeDerivative
variable = etab0
[]
# Order parameter eta_delta0
[ACd0_bulk]
type = ACGrGrMulti
variable = etad0
v = 'etaa0 etab0'
gamma_names = 'gad gbd'
[]
[ACd0_sw]
type = ACSwitching
variable = etad0
Fj_names = 'omegaa omegab omegad'
hj_names = 'ha hb hd'
coupled_variables = 'etaa0 etab0 w'
[]
[ACd0_int]
type = ACInterface
variable = etad0
kappa_name = kappa
[]
[ed0_dot]
type = TimeDerivative
variable = etad0
[]
#Concentration
[c_dot]
type = TimeDerivative
variable = c
[]
[Diffusion]
type = MatDiffusion
variable = c
v = w
diffusivity = DchiVm
args = ''
[]
#The following relate chemical potential to composition using Eq. (22)
[w_rxn]
type = MatReaction
variable = w
v = c
mob_name = -1
[]
[ca_rxn]
type = MatReaction
variable = w
mob_name = 'hoverk_a'
args = 'etaa0 etab0 etad0'
[]
[ca_bodyforce]
type = MaskedBodyForce
variable = w
mask = ha
coupled_variables = 'etaa0 etab0 etad0'
value = 0.1 #caeq
[]
[cb_rxn]
type = MatReaction
variable = w
mob_name = 'hoverk_b'
args = 'etaa0 etab0 etad0'
[]
[cb_bodyforce]
type = MaskedBodyForce
variable = w
mask = hb
coupled_variables = 'etaa0 etab0 etad0'
value = 0.9 #cbeq
[]
[cd_rxn]
type = MatReaction
variable = w
mob_name = 'hoverk_d'
args = 'etaa0 etab0 etad0'
[]
[cd_bodyforce]
type = MaskedBodyForce
variable = w
mask = hd
coupled_variables = 'etaa0 etab0 etad0'
value = 0.5 #cdeq
[]
[]
[Materials]
[ha_test]
type = SwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'etaa0 etab0 etad0'
phase_etas = 'etaa0'
[]
[hb_test]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etaa0 etab0 etad0'
phase_etas = 'etab0'
[]
[hd_test]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hd
all_etas = 'etaa0 etab0 etad0'
phase_etas = 'etad0'
[]
[omegaa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegaa
material_property_names = 'Vm ka caeq'
expression = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
derivative_order = 2
[]
[omegab]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegab
material_property_names = 'Vm kb cbeq'
expression = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq'
derivative_order = 2
[]
[omegad]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegad
material_property_names = 'Vm kd cdeq'
expression = '-0.5*w^2/Vm^2/kd-w/Vm*cdeq'
derivative_order = 2
[]
[rhoa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhoa
material_property_names = 'Vm ka caeq'
expression = 'w/Vm^2/ka + caeq/Vm'
derivative_order = 2
[]
[rhob]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhob
material_property_names = 'Vm kb cbeq'
expression = 'w/Vm^2/kb + cbeq/Vm'
derivative_order = 2
[]
[rhod]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhod
material_property_names = 'Vm kd cdeq'
expression = 'w/Vm^2/kd + cdeq/Vm'
derivative_order = 2
[]
[const]
type = GenericConstantMaterial
prop_names = 'kappa_c kappa L D Vm ka caeq kb cbeq kd cdeq gab gad gbd mu tgrad_corr_mult'
prop_values = '0 1 1.0 1.0 1.0 10.0 0.1 10.0 0.9 10.0 0.5 1.5 1.5 1.5 1.0 0.0'
[]
[Mobility]
type = DerivativeParsedMaterial
property_name = DchiVm
material_property_names = 'D chi Vm' #Factor of Vm is needed to evolve c instead of rho
expression = 'D*chi*Vm'
derivative_order = 2
[]
[chi]
type = DerivativeParsedMaterial
property_name = chi
material_property_names = 'Vm ha(etaa0,etab0,etad0) ka hb(etaa0,etab0,etad0) kb hd(etaa0,etab0,etad0) kd'
expression = '(ha/ka + hb/kb + hd/kd) / Vm^2'
coupled_variables = 'etaa0 etab0 etad0'
derivative_order = 2
[]
[hoverk_a]
type = DerivativeParsedMaterial
material_property_names = 'ha(etaa0,etab0,etad0) Vm ka'
property_name = hoverk_a
expression = 'ha / Vm / ka'
[]
[hoverk_b]
type = DerivativeParsedMaterial
material_property_names = 'hb(etaa0,etab0,etad0) Vm kb'
property_name = hoverk_b
expression = 'hb / Vm / kb'
[]
[hoverk_d]
type = DerivativeParsedMaterial
material_property_names = 'hd(etaa0,etab0,etad0) Vm kd'
property_name = hoverk_d
expression = 'hd / Vm / kd'
[]
[]
[Postprocessors]
[c_total]
type = ElementIntegralVariablePostprocessor
variable = c
[]
[]
[Executioner]
type = Transient
nl_max_its = 15
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = -pc_type
petsc_options_value = asm
l_max_its = 15
l_tol = 1.0e-3
nl_rel_tol = 1.0e-8
start_time = 0.0
num_steps = 20
nl_abs_tol = 1e-10
dt = 1.0
[]
[Outputs]
csv = true
exodus = true
[]
(modules/optimization/test/tests/optimizationreporter/point_loads/adjoint.i)
# DO NOT CHANGE THIS TEST
# this test is documented as an example in forceInv_pointLoads.md
# if this test is changed, the figures will need to be updated.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 1
ymax = 1.4
[]
[Variables]
[adjoint]
[]
[]
[Problem]
extra_tag_vectors = 'ref'
[]
[AuxVariables]
[residual_src]
[]
[]
[AuxKernels]
[residual_src]
type = TagVectorAux
vector_tag = 'ref'
v = 'adjoint'
variable = 'residual_src'
[]
[]
[Variables]
[adjoint]
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = adjoint
diffusivity = thermal_conductivity
[]
[]
#-----every adjoint problem should have these two
[DiracKernels]
[pt]
type = ReporterPointSource
variable = adjoint
x_coord_name = misfit/measurement_xcoord
y_coord_name = misfit/measurement_ycoord
z_coord_name = misfit/measurement_zcoord
value_name = misfit/misfit_values
extra_vector_tags = 'ref'
[]
[]
[Reporters]
[misfit]
type = OptimizationData
[]
[]
[BCs]
[left]
type = DirichletBC
variable = adjoint
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = adjoint
boundary = right
value = 0
[]
[bottom]
type = DirichletBC
variable = adjoint
boundary = bottom
value = 0
[]
[top]
type = DirichletBC
variable = adjoint
boundary = top
value = 0
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-6
nl_rel_tol = 1e-8
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[VectorPostprocessors]
[gradient]
type = PointValueSampler
points = '0.2 0.2 0
0.7 0.56 0
0.4 1 0'
variable = adjoint
sort_by = id
[]
[]
[Outputs]
console = false
exodus = false
file_base = 'adjoint'
[]
(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/porous_flow/test/tests/actions/addmaterials.i)
# Test that the PorousFlowAddMaterialAction correctly handles the case where
# materials are added with the default add_nodes parameter, as well as
# at_nodes = true, to make sure that the action doesn't add a duplicate material
[Mesh]
type = GeneratedMesh
dim = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[pwater]
initial_condition = 1e6
[]
[sgas]
initial_condition = 0.3
[]
[temperature]
initial_condition = 50
[]
[]
[AuxVariables]
[x0]
initial_condition = 0.1
[]
[x1]
initial_condition = 0.5
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
fluid_component = 0
variable = pwater
[]
[mass1]
type = PorousFlowMassTimeDerivative
fluid_component = 1
variable = sgas
[]
[flux0]
type = PorousFlowAdvectiveFlux
fluid_component = 0
variable = pwater
[]
[flux1]
type = PorousFlowAdvectiveFlux
fluid_component = 1
variable = sgas
[]
[energy_dot]
type = PorousFlowEnergyTimeDerivative
variable = temperature
[]
[heat_advection]
type = PorousFlowHeatAdvection
variable = temperature
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pwater sgas temperature'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureVG
m = 0.5
alpha = 1e-5
pc_max = 1e7
sat_lr = 0.1
[]
[]
[FluidProperties]
[simple_fluid0]
type = SimpleFluidProperties
bulk_modulus = 1e9
viscosity = 1e-3
density0 = 1000
thermal_expansion = 0
cv = 2
[]
[simple_fluid1]
type = SimpleFluidProperties
bulk_modulus = 1e9
viscosity = 1e-4
density0 = 20
thermal_expansion = 0
cv = 1
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = 50
[]
[temperature_nodal]
type = PorousFlowTemperature
at_nodes = true
temperature = 50
[]
[ppss]
type = PorousFlow2PhasePS
phase0_porepressure = pwater
phase1_saturation = sgas
capillary_pressure = pc
[]
[ppss_nodal]
type = PorousFlow2PhasePS
at_nodes = true
phase0_porepressure = pwater
phase1_saturation = sgas
capillary_pressure = pc
[]
[massfrac]
type = PorousFlowMassFraction
mass_fraction_vars = 'x0 x1'
[]
[massfrac_nodal]
type = PorousFlowMassFraction
at_nodes = true
mass_fraction_vars = 'x0 x1'
[]
[simple_fluid0]
type = PorousFlowSingleComponentFluid
fp = simple_fluid0
phase = 0
[]
[simple_fluid0_nodal]
type = PorousFlowSingleComponentFluid
at_nodes = true
fp = simple_fluid0
phase = 0
[]
[simple_fluid1]
type = PorousFlowSingleComponentFluid
fp = simple_fluid1
phase = 1
[]
[simple_fluid1_nodal]
type = PorousFlowSingleComponentFluid
at_nodes = true
fp = simple_fluid1
phase = 1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-12 0 0 0 1e-12 0 0 0 1e-12'
[]
[relperm0]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
s_res = 0.1
sum_s_res = 0.11
[]
[relperm1]
type = PorousFlowRelativePermeabilityCorey
n = 3
phase = 1
s_res = 0.01
sum_s_res = 0.11
[]
[relperm0_nodal]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
at_nodes = true
[]
[relperm1_nodal]
type = PorousFlowRelativePermeabilityCorey
n = 3
phase = 1
at_nodes = true
[]
[porosity_nodal]
type = PorousFlowPorosityConst
porosity = 0.1
at_nodes = true
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[rock_heat]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 1.0
density = 125
[]
[unused]
type = GenericConstantMaterial
prop_names = unused
prop_values = 0
[]
[]
[Executioner]
type = Transient
end_time = 1
nl_abs_tol = 1e-14
[]
(modules/solid_mechanics/test/tests/crystal_plasticity/cp_eigenstrains/volumetric_eigenstrain_increase.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[cube]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 2
elem_type = HEX27
[]
[]
[AuxVariables]
[temperature]
order = FIRST
family = LAGRANGE
[]
[linear_void_strain]
order = CONSTANT
family = MONOMIAL
[]
[e_void_xx]
order = CONSTANT
family = MONOMIAL
[]
[e_void_yy]
order = CONSTANT
family = MONOMIAL
[]
[e_void_zz]
order = CONSTANT
family = MONOMIAL
[]
[f_void_zz]
order = CONSTANT
family = MONOMIAL
[]
[pk2_zz]
order = CONSTANT
family = MONOMIAL
[]
[fp_zz]
order = CONSTANT
family = MONOMIAL
[]
[tau_0]
order = FIRST
family = MONOMIAL
[]
[tau_10]
order = FIRST
family = MONOMIAL
[]
[]
[Physics/SolidMechanics/QuasiStatic/all]
strain = FINITE
incremental = true
add_variables = true
[]
[Functions]
[temperature_ramp]
type = ParsedFunction
expression = '600.0 + t'
[]
[]
[AuxKernels]
[temperature]
type = FunctionAux
variable = temperature
function = 'temperature_ramp'
execute_on = timestep_begin
[]
[linear_void_strain]
type = MaterialRealAux
variable = linear_void_strain
property = equivalent_linear_change
execute_on = timestep_end
[]
[e_void_xx]
type = RankTwoAux
variable = e_void_xx
rank_two_tensor = void_eigenstrain
index_j = 0
index_i = 0
execute_on = timestep_end
[]
[e_void_yy]
type = RankTwoAux
variable = e_void_yy
rank_two_tensor = void_eigenstrain
index_j = 1
index_i = 1
execute_on = timestep_end
[]
[e_void_zz]
type = RankTwoAux
variable = e_void_zz
rank_two_tensor = void_eigenstrain
index_j = 2
index_i = 2
execute_on = timestep_end
[]
[f_void_zz]
type = RankTwoAux
variable = f_void_zz
rank_two_tensor = volumetric_deformation_gradient
index_j = 2
index_i = 2
execute_on = timestep_end
[]
[pk2_zz]
type = RankTwoAux
variable = pk2_zz
rank_two_tensor = second_piola_kirchhoff_stress
index_j = 2
index_i = 2
execute_on = timestep_end
[]
[fp_zz]
type = RankTwoAux
variable = fp_zz
rank_two_tensor = plastic_deformation_gradient
index_j = 2
index_i = 2
execute_on = timestep_end
[]
[tau_0]
type = MaterialStdVectorAux
variable = tau_0
property = applied_shear_stress
index = 0
execute_on = timestep_end
[]
[tau_10]
type = MaterialStdVectorAux
variable = tau_10
property = applied_shear_stress
index = 10
execute_on = timestep_end
[]
[]
[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
[]
[hold_front]
type = DirichletBC
variable = disp_z
boundary = front
value = 0
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeElasticityTensorCP
C_ijkl = '1.98e5 1.25e5 1.25e5 1.98e5 1.25e5 1.98e5 1.22e5 1.22e5 1.22e5'
fill_method = symmetric9
[]
[stress]
type = ComputeMultipleCrystalPlasticityStress
crystal_plasticity_models = 'trial_xtalpl'
eigenstrain_names = void_eigenstrain
tan_mod_type = exact
line_search_method = CUT_HALF
use_line_search = true
maximum_substep_iteration = 5
[]
[trial_xtalpl]
type = CrystalPlasticityKalidindiUpdate
number_slip_systems = 12
slip_sys_file_name = input_slip_sys.txt
[]
[void_eigenstrain]
type = ComputeCrystalPlasticityVolumetricEigenstrain
eigenstrain_name = void_eigenstrain
deformation_gradient_name = volumetric_deformation_gradient
mean_spherical_void_radius = void_radius
spherical_void_number_density = void_density
[]
[void_density]
type = ParsedMaterial
property_name = void_density
coupled_variables = temperature
expression = '1.0e8 * (temperature - 600.0)'
[]
[void_radius]
type = GenericConstantMaterial
prop_names = void_radius
prop_values = '1.0e-6' ##1 nm avg particle radius
[]
[]
[Postprocessors]
[linear_void_strain]
type = ElementAverageValue
variable = linear_void_strain
[]
[e_void_xx]
type = ElementAverageValue
variable = e_void_xx
[]
[e_void_yy]
type = ElementAverageValue
variable = e_void_yy
[]
[e_void_zz]
type = ElementAverageValue
variable = e_void_zz
[]
[f_void_zz]
type = ElementAverageValue
variable = f_void_zz
[]
[density]
type = ElementAverageMaterialProperty
mat_prop = void_density
execute_on = TIMESTEP_END
[]
[radius]
type = ElementAverageMaterialProperty
mat_prop = void_radius
execute_on = TIMESTEP_END
[]
[pk2_zz]
type = ElementAverageValue
variable = pk2_zz
[]
[fp_zz]
type = ElementAverageValue
variable = fp_zz
[]
[tau_0]
type = ElementAverageValue
variable = tau_0
[]
[tau_10]
type = ElementAverageValue
variable = tau_10
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
line_search = 'none'
nl_abs_tol = 1e-12
nl_rel_tol = 1e-8
nl_forced_its = 1
dt = 1.0
dtmin = 0.1
end_time = 5.0
[]
[Outputs]
csv = true
perf_graph = true
[]
(test/tests/materials/discrete/recompute_block_error.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 1
[]
[./left_domain]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '0.5 1 0'
block_id = 10
[../]
[]
[Variables]
[./u]
initial_condition = 2
[../]
[]
[Kernels]
[./diff]
type = MatDiffusionTest
variable = u
prop_name = 'p'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 2
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 3
[../]
[]
[Materials]
[./recompute_props]
type = RecomputeMaterial
block = 0
f_name = 'f'
f_prime_name = 'f_prime'
p_name = 'p'
outputs = all
output_properties = 'f f_prime p'
compute = false # makes this material "discrete"
[../]
[./newton]
type = NewtonMaterial
block = '0 10'
outputs = all
f_name = 'f'
f_prime_name = 'f_prime'
p_name = 'p'
material = 'recompute_props'
[../]
[./left]
type = GenericConstantMaterial
prop_names = 'f f_prime'
prop_values = '1 0.5 '
block = 10
outputs = all
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
print_linear_residuals = true
perf_graph = true
[]
(modules/chemical_reactions/test/tests/solid_kinetics/2species.i)
# Simple reaction-diffusion example to illustrate the use of the SolidKineticReactions
# action.
# In this example, two primary species a and b diffuse towards each other from
# opposite ends of a porous medium, reacting when they meet to form a mineral
# precipitate. The kinetic reaction is specified in the SolidKineticReactions block as:
#
# kin_reactions = '(1.0)a+(1.0)b=mineral'
#
# where a and b are the primary species (reactants), mineral is the precipitate,
# and the values in the parentheses are the stoichiometric coefficients for each
# species in the kinetic reaction.
#
# The SolidKineticReactions action creates all the required kernels and auxkernels
# to compute the reaction given by the above kinetic reaction equation.
#
# Specifically, it adds to following:
# * An AuxVariable named 'mineral' (given in the RHS of the kinetic reaction)
# * A KineticDisPreConcAux AuxKernel for this AuxVariable with all parameters
# * A CoupledBEKinetic Kernel for each primary species with all parameters
[Mesh]
type = GeneratedMesh
dim = 2
xmax = 1
ymax = 1
nx = 40
[]
[Variables]
[./a]
order = FIRST
family = LAGRANGE
initial_condition = 0
[../]
[./b]
order = FIRST
family = LAGRANGE
initial_condition = 0
[../]
[]
[ReactionNetwork]
[./SolidKineticReactions]
primary_species = 'a b'
secondary_species = mineral
kin_reactions = 'a + b = mineral'
log10_keq = '-6'
specific_reactive_surface_area = '1.0'
kinetic_rate_constant = '1.0e-8'
activation_energy = '1.5e4'
gas_constant = 8.314
reference_temperature = '298.15'
system_temperature = '298.15'
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./a_pd]
type = PrimaryDiffusion
variable = a
[../]
[./b_ie]
type = PrimaryTimeDerivative
variable = b
[../]
[./b_pd]
type = PrimaryDiffusion
variable = b
[../]
[]
[BCs]
[./a_left]
type = DirichletBC
variable = a
preset = false
boundary = left
value = 1.0e-2
[../]
[./a_right]
type = DirichletBC
variable = a
preset = false
boundary = right
value = 0
[../]
[./b_left]
type = DirichletBC
variable = b
preset = false
boundary = left
value = 0
[../]
[./b_right]
type = DirichletBC
variable = b
preset = false
boundary = right
value = 1.0e-2
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity'
prop_values = '5e-4 4e-3 0.4'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
end_time = 50
dt = 5
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Outputs]
file_base = 2species_out
exodus = true
perf_graph = true
print_linear_residuals = true
[]
(modules/solid_mechanics/test/tests/rom_stress_update/creep_ramp_sub_false.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[temperature]
initial_condition = 889
[]
[effective_inelastic_strain]
order = FIRST
family = MONOMIAL
[]
[cell_dislocations]
order = FIRST
family = MONOMIAL
[]
[wall_dislocations]
order = FIRST
family = MONOMIAL
[]
[number_of_substeps]
order = FIRST
family = MONOMIAL
[]
[]
[AuxKernels]
[effective_inelastic_strain]
type = MaterialRealAux
variable = effective_inelastic_strain
property = effective_creep_strain
[]
[cell_dislocations]
type = MaterialRealAux
variable = cell_dislocations
property = cell_dislocations
[]
[wall_dislocations]
type = MaterialRealAux
variable = wall_dislocations
property = wall_dislocations
[]
[number_of_substeps]
type = MaterialRealAux
variable = number_of_substeps
property = number_of_substeps
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
generate_output = 'vonmises_stress'
[]
[]
[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_x]
type = Pressure
variable = disp_x
boundary = right
factor = -0.5
function = shear_function
[]
[pressure_y]
type = Pressure
variable = disp_y
boundary = top
factor = -0.5
function = shear_function
[]
[pressure_z]
type = Pressure
variable = disp_z
boundary = front
factor = 0.5
function = shear_function
[]
[]
[Functions]
[shear_function]
type = ParsedFunction
expression = 'timeToDoubleInHours := 10;
if(t<=28*60*60, 15.0e6, 15.0e6*(t-28*3600)/3600/timeToDoubleInHours+15.0e6)'
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1.68e11
poissons_ratio = 0.31
[]
[stress]
type = ComputeMultipleInelasticStress
inelastic_models = rom_stress_prediction
[]
[mx_phase_fraction]
type = GenericConstantMaterial
prop_names = mx_phase_fraction
prop_values = 5.13e-2 #precipitation bounds: 6e-3, 1e-1
outputs = all
[]
[rom_stress_prediction]
type = SS316HLAROMANCEStressUpdateTest
temperature = temperature
initial_cell_dislocation_density = 6.0e12
initial_wall_dislocation_density = 4.4e11
use_substepping = NONE
max_inelastic_increment = 0.0001
stress_input_window_low_failure = WARN
stress_input_window_high_failure = ERROR
cell_input_window_high_failure = ERROR
cell_input_window_low_failure = ERROR
wall_input_window_low_failure = ERROR
wall_input_window_high_failure = ERROR
temperature_input_window_high_failure = ERROR
temperature_input_window_low_failure = ERROR
environment_input_window_high_failure = ERROR
environment_input_window_low_failure = ERROR
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
nl_abs_tol = 1e-12
nl_rel_tol = 1e-4
automatic_scaling = true
compute_scaling_once = false
dtmin = 0.1
dtmax = 1e5
end_time = 136800
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.1 ## This model requires a tiny timestep at the onset for the first 10s
iteration_window = 4
optimal_iterations = 12
time_t = '100800'
time_dt = '1e5'
[]
[]
[Postprocessors]
[effective_strain_avg]
type = ElementAverageValue
variable = effective_inelastic_strain
[]
[temperature]
type = ElementAverageValue
variable = temperature
[]
[cell_dislocations]
type = ElementAverageValue
variable = cell_dislocations
[]
[wall_disloactions]
type = ElementAverageValue
variable = wall_dislocations
[]
[max_vonmises_stress]
type = ElementExtremeValue
variable = vonmises_stress
value_type = max
[]
[number_of_substeps]
type = ElementAverageValue
variable = number_of_substeps
[]
[]
[Outputs]
csv = true
[]
(test/tests/interfacekernels/1d_interface/reaction_1D_transient.i)
# Transient-state test for the InterfaceReaction kernel.
#
# Same to steady-state, except the following
#
# Natural BCs are applied (i.e. NewmannBC h=0 at left and right)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = 'subdomain1'
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = '0'
[../]
[./v]
order = FIRST
family = LAGRANGE
block = '1'
[../]
[]
[Kernels]
[./diff_u]
type = MatDiffusion
diffusivity = D
variable = u
block = '0'
[../]
[./diff_v]
type = MatDiffusion
diffusivity = D
variable = v
block = '1'
[../]
[./diff_u_dt]
type = TimeDerivative
variable = u
block = '0'
[../]
[./diff_v_dt]
type = TimeDerivative
variable = v
block = '1'
[../]
[./source_u]
type = BodyForce
variable = u
block = '0'
[../]
[]
[InterfaceKernels]
[./interface]
type = InterfaceDiffusion
variable = u
neighbor_var = 'v'
boundary = 'primary0_interface'
D = D
D_neighbor = D
[../]
[./interface_reaction]
type = InterfaceReaction
variable = u
neighbor_var = 'v'
boundary = 'primary0_interface'
kf = 1 # Forward reaction rate coefficient
kb = 2 # Backward reaction rate coefficient
[../]
[]
[Materials]
[./block0]
type = GenericConstantMaterial
block = '0'
prop_names = 'D'
prop_values = '4'
[../]
[./block1]
type = GenericConstantMaterial
block = '1'
prop_names = 'D'
prop_values = '2'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
[Debug]
show_var_residual_norms = true
[]
(modules/combined/test/tests/break_mesh_interface_contact/break_mesh_interface_contact.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
nx = 5
ny = 5
dim = 2
[]
[block1]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '0.5 1 0'
input = gen
[]
[block2]
type = SubdomainBoundingBoxGenerator
block_id = 2
bottom_left = '0.5 0 0'
top_right = '1 1 0'
input = block1
[]
[breakmesh]
input = block2
type = BreakMeshByBlockGenerator
block_pairs = '1 2'
split_interface = true
add_interface_on_two_sides = true
[]
[]
[Variables]
[temperature]
[]
[disp_x]
[]
[disp_y]
[]
[]
[Kernels]
[thermal_cond]
type = HeatConduction
variable = temperature
[]
[]
[Modules/TensorMechanics/Master]
generate_output = 'stress_xx stress_yy strain_xx strain_yy'
add_variables = true
strain = FINITE
incremental = true
[block1]
block = 1
[]
[block2]
block = 2
[]
[]
[ThermalContact]
[thermal_contact]
type = GapHeatTransfer
variable = temperature
primary = Block1_Block2
secondary = Block2_Block1
emissivity_primary = 0
emissivity_secondary = 0
quadrature = true
gap_conductivity = 1
[]
[]
[Contact]
[mechanical]
primary = Block1_Block2
secondary = Block2_Block1
penalty = 1000
model = coulomb
friction_coefficient = 0.5
formulation = tangential_penalty
tangential_tolerance = 0.1
[]
[]
[BCs]
[left_temp]
type = DirichletBC
value = 100
variable = temperature
boundary = left
[]
[right_temp]
type = DirichletBC
value = 0
variable = temperature
boundary = right
[]
[left_disp_x]
type = FunctionDirichletBC
variable = disp_x
boundary = left
function = 0
[]
[left_disp_y]
type = DirichletBC
variable = disp_y
boundary = left
value = 0.0
[]
[right_disp_x]
type = FunctionDirichletBC
variable = disp_x
boundary = right
function = '-t'
[]
[right_disp_y]
type = FunctionDirichletBC
variable = disp_y
boundary = right
function = '0'
[]
[]
[Materials]
[thermal_cond]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity'
prop_values = 1
[]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
poissons_ratio = 0.3
youngs_modulus = 100
[]
[stress]
type = ComputeFiniteStrainElasticStress
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Dampers]
[contact_slip]
type = ContactSlipDamper
secondary = Block1_Block2
primary = Block2_Block1
[]
[]
[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
nl_rel_tol = 1e-9
nl_abs_tol = 1e-9
l_tol = 1e-4
l_max_its = 50
nl_max_its = 20
start_time = 0.0
num_steps = 2
dtmin = 1e-8
dt = 1e-2
automatic_scaling = true
[]
[Outputs]
print_linear_residuals = false
time_step_interval = 1
csv = false
perf_graph = false
exodus = 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/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
[]
(test/tests/materials/material/coupled_material_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 10
ny = 10
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = MatDiffusionTest
variable = u
prop_name = mp1
[../]
[./conv]
type = MatConvection
variable = u
x = 1
y = 0
mat_prop = some_prop
[../]
[]
[BCs]
[./right]
type = NeumannBC
variable = u
boundary = 1
value = 1
[../]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[]
[Materials]
# order is switched intentionally, so we won't get luck and dep-resolver has to do its job
[./mat2]
type = CoupledMaterial
block = 0
mat_prop = 'some_prop'
coupled_mat_prop = 'mp1'
[../]
[./mat1]
type = GenericConstantMaterial
block = 0
prop_names = 'mp1'
prop_values = '2'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
file_base = out_coupled
exodus = true
[]
(modules/heat_transfer/test/tests/truss_heat_conduction/strip.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 1
xmax = 0.5
xmin = -0.5
ymin = -0.05
ymax = 0.05
[]
[left_line]
type = SubdomainBoundingBoxGenerator
input = gmg
bottom_left = '-0.5 0 0'
top_right = '0 0 0'
block_id = 1
block_name = 'left_strip'
location = INSIDE
[]
[right_line]
type = SubdomainBoundingBoxGenerator
input = left_line
bottom_left = '0 0 0'
top_right = '0.5 0 0'
block_id = 2
block_name = 'right_strip'
location = INSIDE
[]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[time_derivative]
type = HeatConductionTimeDerivative
variable = temperature
[]
[heat_conduction]
type = HeatConduction
variable = temperature
[]
[]
[Materials]
[left_strip]
type = GenericConstantMaterial
block = 'left_strip'
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '0.1 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[]
[right_strip]
type = GenericConstantMaterial
block = 'right_strip'
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '5.0e-3 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[]
[]
[BCs]
[right]
type = FunctionDirichletBC
variable = temperature
boundary = 'right'
function = '10*t'
[]
[]
[VectorPostprocessors]
[center]
type = LineValueSampler
start_point = '-0.5 0 0'
end_point = '0.5 0 0'
num_points = 40
variable = 'temperature'
sort_by = id
[]
[]
[Executioner]
type = Transient
start_time = 0
dt = 1
end_time = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[csv]
type = CSV
file_base = 'csv/strip'
time_data = true
[]
[]
(modules/phase_field/test/tests/MultiPhase/penalty.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 14
ny = 10
nz = 0
xmin = 10
xmax = 40
ymin = 15
ymax = 35
elem_type = QUAD4
[]
[GlobalParams]
penalty = 5
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 25.0
y1 = 25.0
radius = 6.0
invalue = 0.9
outvalue = 0.1
int_width = 3.0
[../]
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[./eta1]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 30.0
y1 = 25.0
radius = 4.0
invalue = 0.9
outvalue = 0.1
int_width = 2.0
[../]
[../]
[./eta2]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[../]
[]
[Kernels]
[./deta1dt]
type = TimeDerivative
variable = eta1
[../]
[./ACBulk1]
type = AllenCahn
variable = eta1
coupled_variables = 'c eta2'
f_name = F
[../]
[./ACInterface1]
type = ACInterface
variable = eta1
kappa_name = kappa_eta
[../]
[./penalty1]
type = SwitchingFunctionPenalty
variable = eta1
etas = 'eta1 eta2'
h_names = 'h1 h2'
[../]
[./deta2dt]
type = TimeDerivative
variable = eta2
[../]
[./ACBulk2]
type = AllenCahn
variable = eta2
coupled_variables = 'c eta1'
f_name = F
[../]
[./ACInterface2]
type = ACInterface
variable = eta2
kappa_name = kappa_eta
[../]
[./penalty2]
type = SwitchingFunctionPenalty
variable = eta2
etas = 'eta1 eta2'
h_names = 'h1 h2'
[../]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
coupled_variables = 'eta1 eta2'
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time1]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'L kappa_eta'
prop_values = '1 1 '
[../]
[./consts2]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1 1'
[../]
[./hsum]
type = ParsedMaterial
expression = h1+h2
property_name = hsum
material_property_names = 'h1 h2'
coupled_variables = 'c'
outputs = exodus
[../]
[./switching1]
type = SwitchingFunctionMaterial
function_name = h1
eta = eta1
h_order = SIMPLE
[../]
[./switching2]
type = SwitchingFunctionMaterial
function_name = h2
eta = eta2
h_order = SIMPLE
[../]
[./barrier]
type = MultiBarrierFunctionMaterial
etas = 'eta1 eta2'
[../]
[./free_energy_A]
type = DerivativeParsedMaterial
property_name = Fa
coupled_variables = 'c'
expression = '(c-0.1)^2'
derivative_order = 2
[../]
[./free_energy_B]
type = DerivativeParsedMaterial
property_name = Fb
coupled_variables = 'c'
expression = '(c-0.9)^2'
derivative_order = 2
[../]
[./free_energy]
type = DerivativeMultiPhaseMaterial
property_name = F
fi_names = 'Fa Fb'
hi_names = 'h1 h2'
etas = 'eta1 eta2'
coupled_variables = 'c'
derivative_order = 2
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu'
l_max_its = 15
l_tol = 1.0e-6
nl_max_its = 50
nl_rel_tol = 1.0e-7
nl_abs_tol = 1.0e-9
start_time = 0.0
num_steps = 2
dt = 0.05
dtmin = 0.01
[]
[Debug]
# show_var_residual_norms = true
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/vectorpostprocessors/material_vector_postprocessor/boundary-err.i)
# check that simulation terminates with an error when trying to use the
# postprocessor on a boundary material.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'prop1 prop2 prop3'
prop_values = '1 2 42'
boundary = 'left'
[../]
[]
[VectorPostprocessors]
[./vpp]
type = MaterialVectorPostprocessor
material = 'mat'
elem_ids = '3 4 7 42 88'
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
execute_on = 'initial timestep_end'
csv = true
[]
(modules/optimization/test/tests/optimizationreporter/constant_heat_source/adjoint.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 2
ymax = 2
[]
[Variables]
[adjoint_T]
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = adjoint_T
diffusivity = thermal_conductivity
[]
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = adjoint_T
x_coord_name = misfit/measurement_xcoord
y_coord_name = misfit/measurement_ycoord
z_coord_name = misfit/measurement_zcoord
value_name = misfit/misfit_values
[]
[]
[Reporters]
[misfit]
type = OptimizationData
[]
[params]
type = ConstantReporter
real_vector_names = 'q'
real_vector_values = '0' # Dummy value
[]
[]
[BCs]
[left]
type = NeumannBC
variable = adjoint_T
boundary = left
value = 0
[]
[right]
type = NeumannBC
variable = adjoint_T
boundary = right
value = 0
[]
[bottom]
type = DirichletBC
variable = adjoint_T
boundary = bottom
value = 0
[]
[top]
type = DirichletBC
variable = adjoint_T
boundary = top
value = 0
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
nl_abs_tol = 1e-8
nl_rel_tol = 1e-8
petsc_options_iname = '-ksp_type -pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'preonly lu superlu_dist'
[]
[Functions]
[volumetric_heat_func]
type = ParsedOptimizationFunction
expression = q
param_symbol_names = 'q'
param_vector_name = 'params/q'
[]
[]
[VectorPostprocessors]
[gradient_vpp]
type = ElementOptimizationSourceFunctionInnerProduct
variable = adjoint_T
function = volumetric_heat_func
[]
[]
[Outputs]
console = false
file_base = 'adjoint'
[]
(modules/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/creep.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
xmax = 0.002
ymax = 0.002
[]
[Physics/SolidMechanics/QuasiStatic/All]
strain = FINITE
add_variables = true
base_name = 'total'
generate_output = 'strain_xx strain_yy strain_xy hydrostatic_stress vonmises_stress'
use_automatic_differentiation = true
[]
[Functions]
[./pull]
type = PiecewiseLinear
x = '0 0.1'
y = '0 1e-5'
[../]
[]
[Materials]
active='elasticity_tensor porous_stress porosity creep'
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e10
poissons_ratio = 0.3
base_name = 'total'
[../]
[./porous_stress]
type = ADComputeMultipleInelasticStress
inelastic_models = creep
outputs = all
base_name = 'total'
[../]
[./regular_stress]
type = ADComputeMultipleInelasticStress
inelastic_models = creep
outputs = all
base_name = 'total'
[../]
[./porosity]
type = ADGenericConstantMaterial
prop_names = porosity
prop_values = 0.1
outputs = all
[../]
[./creep]
type = ADPowerLawCreepStressUpdate
activation_energy = 4e4
temperature = 1200
coefficient = 1e-18
gas_constant = 1.987
n_exponent = 3
base_name = 'creep'
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
[../]
[./pull_disp_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = top
function = pull
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 0.01
end_time = 0.12
[]
[Postprocessors]
[./disp_x]
type = SideAverageValue
variable = disp_x
boundary = right
[../]
[./disp_y]
type = SideAverageValue
variable = disp_y
boundary = top
[../]
[./avg_hydro]
type = ElementAverageValue
variable = total_hydrostatic_stress
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = total_vonmises_stress
[../]
[./dt]
type = TimestepSize
[../]
[./num_lin]
type = NumLinearIterations
outputs = console
[../]
[./num_nonlin]
type = NumNonlinearIterations
outputs = console
[../]
[./eff_creep_strain]
type = ElementAverageValue
variable = creep_effective_creep_strain
[../]
[./porosity]
type = ElementAverageValue
variable = porosity
[../]
[]
[Outputs]
csv = true
[]
(test/tests/mortar/displaced-gap-conductance-2d-bnd-coupling/gap-conductance.i)
[Mesh]
displacements = 'disp_x disp_y'
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
# block 1: left
# block 2: right
[]
[./primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[../]
[./secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[../]
[]
[AuxVariables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[aux_var]
[]
[]
[AuxKernels]
[function_x]
type = FunctionAux
function = '.05 * t'
variable = 'disp_x'
block = '2'
[]
[function_y]
type = FunctionAux
function = '.05 * t'
variable = 'disp_y'
block = '2'
[]
[flux_modifier]
type = StatefulAuxLowerD
variable = 'aux_var'
coupled_variable = 'lambda'
boundary = '1'
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[./T]
block = '1 2'
[../]
[./lambda]
block = '10'
family = MONOMIAL
order = CONSTANT
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = T
boundary = '5'
value = 0
[../]
[./right]
type = DirichletBC
variable = T
boundary = '8'
value = 1
[../]
[]
[Kernels]
[./conduction]
type = Diffusion
variable = T
block = '1 2'
[../]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[./mortar]
type = GapHeatConductanceAuxKernel
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
variable = lambda
secondary_variable = T
use_displaced_mesh = true
auxkernel_variable = 'aux_var'
correct_edge_dropping = true
[../]
[]
[Materials]
[constant]
type = ADGenericConstantMaterial
prop_names = 'gap_conductance'
prop_values = '.03'
block = '1 2'
use_displaced_mesh = true
[]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = NEWTON
type = Transient
num_steps = 5
petsc_options_iname = '-pc_type -snes_linesearch_type'
petsc_options_value = 'lu basic'
[]
[Outputs]
exodus = true
[dofmap]
type = DOFMap
execute_on = 'initial'
[]
[]
(modules/stochastic_tools/test/tests/userobjects/inverse_mapping/sub.i)
S = 10
D = 10
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
xmax = 10
[]
[Variables]
[v]
[]
[]
[AuxVariables]
[v_aux]
[]
[]
[Kernels]
[diffusion_v]
type = MatDiffusion
variable = v
diffusivity = D_v
[]
[source_v]
type = BodyForce
variable = v
value = 1.0
[]
[]
[AuxKernels]
[func_aux]
type = FunctionAux
variable = v_aux
function = v_aux_func
[]
[]
[Functions]
[v_aux_func]
type = ParsedFunction
expression = 'S * x + D'
symbol_names = 'S D'
symbol_values = '${S} ${D}'
[]
[]
[Materials]
[diffusivity_v]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 4.0
[]
[]
[BCs]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 0
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Reporters]
[solution_storage]
type = SolutionContainer
execute_on = 'FINAL'
[]
[solution_storage_aux]
type = SolutionContainer
execute_on = 'FINAL'
system = aux
[]
[]
(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/navier_stokes/test/tests/finite_element/ins/stagnation/stagnation.i)
[GlobalParams]
gravity = '0 0 0'
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 2.0
ymin = 0
ymax = 2.0
nx = 20
ny = 20
elem_type = QUAD9
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = Newton
[../]
[]
[Executioner]
type = Transient
dt = 1.0
dtmin = 1.e-6
num_steps = 5
l_max_its = 100
nl_max_its = 15
nl_rel_tol = 1.e-9
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_shift_type -ksp_gmres_restart'
petsc_options_value = 'asm 2 lu NONZERO 1000'
line_search = none
[]
[Variables]
[./vel_x]
family = LAGRANGE
order = SECOND
[../]
[./vel_y]
family = LAGRANGE
order = SECOND
[../]
[./p]
family = LAGRANGE
order = FIRST
[../]
[]
[BCs]
[./u_in]
type = FunctionDirichletBC
boundary = 'top'
variable = vel_x
function = vel_x_inlet
[../]
[./v_in]
type = FunctionDirichletBC
boundary = 'top'
variable = vel_y
function = vel_y_inlet
[../]
[./vel_x_no_slip]
type = DirichletBC
boundary = 'left bottom'
variable = vel_x
value = 0
[../]
[./vel_y_no_slip]
type = DirichletBC
boundary = 'bottom'
variable = vel_y
value = 0
[../]
# Note: setting INSMomentumNoBCBC on the outlet boundary causes the
# matrix to be singular. The natural BC, on the other hand, is
# sufficient to specify the value of the pressure without requiring
# a pressure pin.
[]
[Functions]
[./vel_x_inlet]
type = ParsedFunction
expression = 'k*x'
symbol_names = 'k'
symbol_values = '1'
[../]
[./vel_y_inlet]
type = ParsedFunction
expression = '-k*y'
symbol_names = 'k'
symbol_values = '1'
[../]
[]
[Kernels]
[./x_momentum_time]
type = INSMomentumTimeDerivative
variable = vel_x
[../]
[./y_momentum_time]
type = INSMomentumTimeDerivative
variable = vel_y
[../]
[./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
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '1 .01389' # 2/144
[../]
[]
[Outputs]
exodus = true
[./out]
type = CSV
execute_on = 'final'
[../]
[]
[VectorPostprocessors]
[./nodal_sample]
# Pick off the wall pressure values.
type = NodalValueSampler
variable = p
boundary = 'bottom'
sort_by = x
[../]
[]
(modules/fsi/test/tests/fsi_acoustics/wave_height_bc/wave_height_bc.i)
# Test for `FluidFreeSurfaceBC` BC with only the fluid domain. The domain is 3D with
# lengths 1 X 1 X 0.01 meters. It is subjected to a 2D Gaussian initial condition
# with the peak at the midpoint (0.5, 0.5, 0.01). Wave heights are recorded at the
# midpoint at different times. The recorded wave heights should match with the values
# that are provided.
# Input parameters:
# Dimensions = 3
# Lengths = 1 X 1 X 0.01 meters
# Fluid speed of sound = 1500 m/s
# Initial condition = 0.00001*exp(-((x-0.5)/0.1)^2-((y-0.5)/0.1)^2)
# Fluid domain = true
# Fluid BCs = pressures are zero on all the four edges of the domain and `FluidFreeSurfaceBC` is applied on the front
# Structural domain = false
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 15
ny = 15
nz = 1
xmax = 1
ymax = 1
zmax = 0.01
[]
[]
[GlobalParams]
[]
[Variables]
[./p]
[../]
[]
[AuxVariables]
[./Wave1]
[../]
[]
[Kernels]
[./diffusion]
type = Diffusion
variable = 'p'
[../]
[./inertia]
type = AcousticInertia
variable = p
[../]
[]
[AuxKernels]
[./waves]
type = WaveHeightAuxKernel
variable = 'Wave1'
pressure = p
density = 1e-6
gravity = 9.81
execute_on = timestep_end
[../]
[]
[BCs]
[./leftright_pressure]
type = DirichletBC
variable = p
boundary = 'left right top bottom'
value = 0
[../]
[./free]
type = FluidFreeSurfaceBC
variable = p
boundary = 'front'
alpha = '0.1'
[]
[]
[ICs]
[./u_ic]
type = FunctionIC
variable = 'p'
function = initial_cond
boundary = 'front'
[../]
[]
[Functions]
[./initial_cond]
type = ParsedFunction
expression = '0.00001*exp(-((x-0.5)/0.1)^2-((y-0.5)/0.1)^2)'
[../]
[]
[Materials]
[./co_sq]
type = GenericConstantMaterial
prop_names = inv_co_sq
prop_values = 4.44e-7
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
start_time = 0.0
end_time = 0.2
dt = 0.005
dtmin = 0.00001
nl_abs_tol = 1e-12
nl_rel_tol = 1e-12
l_tol = 1e-12
l_max_its = 25
timestep_tolerance = 1e-8
automatic_scaling = true
[TimeIntegrator]
type = NewmarkBeta
[]
[]
[Postprocessors]
[./W1]
type = PointValue
point = '0.5 0.5 0.01'
variable = Wave1
[../]
[]
[Outputs]
csv = true
perf_graph = true
print_linear_residuals = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_htonly/gap_heat_transfer_htonly_syntax.i)
#
# 1-D Gap Heat Transfer Test without mechanics
#
# This test exercises 1-D gap heat transfer for a constant conductivity gap.
#
# The mesh consists of two element blocks containing one element each. Each
# element is a unit cube. They sit next to one another with a unit between them.
#
# The conductivity of both blocks is set very large to achieve a uniform temperature
# across each block. The temperature of the far left boundary
# is ramped from 100 to 200 over one time unit. The temperature of the far right
# boundary is held fixed at 100.
#
# A simple analytical solution is possible for the heat flux between the blocks:
#
# Flux = (T_left - T_right) * (gapK/gap_width)
#
# The gap conductivity is specified as 1, thus
#
# gapK(Tavg) = 1.0*Tavg
#
#
# The heat flux across the gap at time = 1 is then:
#
# Flux(2) = 100 * (1.0/1.0) = 100
#
# For comparison, see results from the flux post processors
#
# This test has been augmented with a second scalar field that solves nearly
# the same problem. The conductivity has been changed to 10. Thus, the
# flux for the second field is 1000.
#
[Mesh]
file = gap_heat_transfer_htonly_test.e
[]
[Functions]
[./temp]
type = PiecewiseLinear
x = '0 1 2'
y = '100 200 200'
[../]
[]
[Modules/HeatTransfer/ThermalContact/BC]
[./thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 3
secondary = 2
emissivity_primary = 0
emissivity_secondary = 0
[../]
[./awesomium_contact]
type = GapHeatTransfer
variable = awesomium
primary = 3
secondary = 2
emissivity_primary = 0
emissivity_secondary = 0
gap_conductivity = 10
appended_property_name = _awesomium
[../]
[]
[Variables]
[./temp]
order = FIRST
family = LAGRANGE
initial_condition = 100
[../]
[./awesomium]
order = FIRST
family = LAGRANGE
initial_condition = 100
[../]
[]
[AuxVariables]
[./gap_cond]
order = CONSTANT
family = MONOMIAL
[../]
[./gap_cond_awesomium]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = temp
[../]
[./awe]
type = HeatConduction
variable = awesomium
[../]
[]
[BCs]
[./temp_far_left]
type = FunctionDirichletBC
boundary = 1
variable = temp
function = temp
[../]
[./temp_far_right]
type = DirichletBC
boundary = 4
variable = temp
value = 100
[../]
[./awesomium_far_left]
type = FunctionDirichletBC
boundary = 1
variable = awesomium
function = temp
[../]
[./awesomium_far_right]
type = DirichletBC
boundary = 4
variable = awesomium
value = 100
[../]
[]
[AuxKernels]
[./conductance]
type = MaterialRealAux
property = gap_conductance
variable = gap_cond
boundary = 2
[../]
[./conductance_awe]
type = MaterialRealAux
property = gap_conductance_awesomium
variable = gap_cond_awesomium
boundary = 2
[../]
[]
[Materials]
[./heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 100000000.0
[../]
[./density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '1.0'
[../]
[]
[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 4'
line_search = 'none'
nl_rel_tol = 1e-12
l_tol = 1e-3
l_max_its = 100
dt = 1e-1
end_time = 1.0
[]
[Postprocessors]
[./temp_left]
type = SideAverageValue
boundary = 2
variable = temp
execute_on = 'initial timestep_end'
[../]
[./temp_right]
type = SideAverageValue
boundary = 3
variable = temp
execute_on = 'initial timestep_end'
[../]
[./flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[../]
[./flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[../]
[./awe_left]
type = SideAverageValue
boundary = 2
variable = awesomium
execute_on = 'initial timestep_end'
[../]
[./awe_right]
type = SideAverageValue
boundary = 3
variable = awesomium
execute_on = 'initial timestep_end'
[../]
[./awe_flux_left]
type = SideDiffusiveFluxIntegral
variable = awesomium
boundary = 2
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[../]
[./awe_flux_right]
type = SideDiffusiveFluxIntegral
variable = awesomium
boundary = 3
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
exodus = true
[]
(modules/fluid_properties/test/tests/materials/ad_saturation_temperature_material/ad_saturation_temperature_material.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
xmin = 0
xmax = 1
[]
[FluidProperties]
[./fp_2phase]
type = StiffenedGasTwoPhaseFluidProperties
[../]
[]
[Materials]
[./p_mat]
type = ADGenericConstantMaterial
prop_names = 'p_test'
prop_values = '1e5'
[../]
[./T_sat_mat]
type = ADSaturationTemperatureMaterial
p = p_test
T_sat = T_sat_test
fp_2phase = fp_2phase
[../]
[]
[Postprocessors]
[./T_sat_pp]
type = ADElementIntegralMaterialProperty
mat_prop = T_sat_test
execute_on = 'INITIAL'
[../]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
execute_on = 'INITIAL'
[]
(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/solid_mechanics/test/tests/rom_stress_update/creep_ramp_sub_false_more_steps.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[AuxVariables]
[temperature]
initial_condition = 889
[]
[effective_inelastic_strain]
order = FIRST
family = MONOMIAL
[]
[cell_dislocations]
order = FIRST
family = MONOMIAL
[]
[wall_dislocations]
order = FIRST
family = MONOMIAL
[]
[number_of_substeps]
order = FIRST
family = MONOMIAL
[]
[]
[AuxKernels]
[effective_inelastic_strain]
type = MaterialRealAux
variable = effective_inelastic_strain
property = effective_creep_strain
[]
[cell_dislocations]
type = MaterialRealAux
variable = cell_dislocations
property = cell_dislocations
[]
[wall_dislocations]
type = MaterialRealAux
variable = wall_dislocations
property = wall_dislocations
[]
[number_of_substeps]
type = MaterialRealAux
variable = number_of_substeps
property = number_of_substeps
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
strain = FINITE
add_variables = true
generate_output = 'vonmises_stress'
[]
[]
[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_x]
type = Pressure
variable = disp_x
boundary = right
factor = -0.5
function = shear_function
[]
[pressure_y]
type = Pressure
variable = disp_y
boundary = top
factor = -0.5
function = shear_function
[]
[pressure_z]
type = Pressure
variable = disp_z
boundary = front
factor = 0.5
function = shear_function
[]
[]
[Functions]
[shear_function]
type = ParsedFunction
expression = 'timeToDoubleInHours := 10;
if(t<=28*60*60, 15.0e6, 15.0e6*(t-28*3600)/3600/timeToDoubleInHours+15.0e6)'
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1.68e11
poissons_ratio = 0.31
[]
[stress]
type = ComputeMultipleInelasticStress
inelastic_models = rom_stress_prediction
[]
[mx_phase_fraction]
type = GenericConstantMaterial
prop_names = mx_phase_fraction
prop_values = 5.13e-2 #precipitation bounds: 6e-3, 1e-1
outputs = all
[]
[rom_stress_prediction]
type = SS316HLAROMANCEStressUpdateTest
temperature = temperature
initial_cell_dislocation_density = 6.0e12
initial_wall_dislocation_density = 4.4e11
use_substepping = NONE
max_inelastic_increment = 0.0001
stress_input_window_low_failure = WARN
stress_input_window_high_failure = ERROR
cell_input_window_high_failure = ERROR
cell_input_window_low_failure = ERROR
wall_input_window_low_failure = ERROR
wall_input_window_high_failure = ERROR
temperature_input_window_high_failure = ERROR
temperature_input_window_low_failure = ERROR
environment_input_window_high_failure = ERROR
environment_input_window_low_failure = ERROR
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
nl_abs_tol = 1e-12
nl_rel_tol = 1e-4
automatic_scaling = true
compute_scaling_once = false
dtmin = 0.1
dtmax = 1e3
end_time = 136800
[TimeStepper]
type = IterationAdaptiveDT
dt = 0.1 ## This model requires a tiny timestep at the onset for the first 10s
iteration_window = 4
optimal_iterations = 12
time_t = '100800'
time_dt = '1e3'
[]
[]
[Postprocessors]
[effective_strain_avg]
type = ElementAverageValue
variable = effective_inelastic_strain
[]
[temperature]
type = ElementAverageValue
variable = temperature
[]
[cell_dislocations]
type = ElementAverageValue
variable = cell_dislocations
[]
[wall_disloactions]
type = ElementAverageValue
variable = wall_dislocations
[]
[max_vonmises_stress]
type = ElementExtremeValue
variable = vonmises_stress
value_type = max
[]
[number_of_substeps]
type = ElementAverageValue
variable = number_of_substeps
[]
[]
[Outputs]
csv = true
[]
(modules/phase_field/test/tests/free_energy_material/MathCTDFreeEnergy_split.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
xmin = 0.0
xmax = 30.0
ymin = 0.0
ymax = 30.0
elem_type = QUAD4
[]
[Variables]
[c]
[InitialCondition]
type = CrossIC
x1 = 0.0
x2 = 30.0
y1 = 0.0
y2 = 30.0
[]
[]
[w]
[]
[]
[Kernels]
[cres]
type = SplitCHParsed
variable = c
kappa_name = 2.0 # kappa_c - we are not using a mat prop here to support AD+nonAD
w = w
f_name = F
[]
[wres]
type = SplitCHWRes
variable = w
mob_name = M
[]
[time]
type = CoupledTimeDerivative
variable = w
v = c
[]
[]
[BCs]
[Periodic]
[all]
auto_direction = 'x y'
variable = 'c w'
[]
[]
[]
[Materials]
[constant]
type = GenericConstantMaterial
prop_names = 'M'
prop_values = '1.0'
[]
[free_energy]
type = MathCTDFreeEnergy
property_name = F
c = c
[]
[]
[Executioner]
type = Transient
scheme = BDF2
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
l_max_its = 30
l_tol = 1.0e-3
nl_max_its = 50
nl_rel_tol = 1.0e-10
dt = 10.0
num_steps = 2
[]
[Outputs]
exodus = true
[]
(test/tests/materials/ad_material/ad_stateful_material.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 2
[]
[Variables]
[./u]
initial_condition = 1
[../]
[]
[Kernels]
[./diff]
type = ADMatDiffusionTest
variable = u
prop_to_use = 'AdAd'
ad_mat_prop = 'diffusivity'
regular_mat_prop = 'unused_diffusivity'
[../]
[]
[Kernels]
[./force]
type = BodyForce
variable = u
value = 1
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Materials]
[./constant_material]
type = GenericConstantMaterial
prop_names = 'unused_diffusivity'
prop_values = '0'
[../]
[./ad_stateful]
type = ADStatefulMaterial
u = u
[../]
[]
[Executioner]
type = Transient
num_steps = 5
line_search = 'none'
solve_type = 'Newton'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
l_tol = 1e-10
nl_rel_tol = 1e-9
[]
[Outputs]
[./exodus]
type = Exodus
show_material_properties = 'diffusivity'
[../]
[]
(test/tests/postprocessors/interface_value/interface_fv_variable_value_postprocessor.i)
postprocessor_type = InterfaceAverageVariableValuePostprocessor
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 6
xmax = 3
ny = 9
ymax = 3
elem_type = QUAD4
[]
[./subdomain_id]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '2 1 0'
block_id = 1
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain_id
primary_block = '0'
paired_block = '1'
new_boundary = 'interface'
[../]
[]
[Functions]
[./fn_exact]
type = ParsedFunction
expression = 'x*x+y*y'
[../]
[./ffn]
type = ParsedFunction
expression = -4
[../]
[]
[Variables]
[./u]
family = MONOMIAL
order = CONSTANT
fv = true
[../]
[]
[FVKernels]
[./diff]
type = FVDiffusion
variable = u
coeff = 1
[../]
[./ffn]
type = FVBodyForce
variable = u
function = ffn
[../]
[]
[FVBCs]
[./all]
type = FVFunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = fn_exact
[../]
[]
[Materials]
[./stateful1]
type = GenericConstantMaterial
block = 0
prop_names = 'diffusivity'
prop_values = 10
[../]
[./stateful2]
type = GenericConstantMaterial
block = 1
prop_names = 'diffusivity'
prop_values = 4
[../]
[]
[AuxKernels]
[./diffusivity_1]
type = MaterialRealAux
property = diffusivity
variable = diffusivity_1
[]
[./diffusivity_2]
type = MaterialRealAux
property = diffusivity
variable = diffusivity_2
[]
[]
[AuxVariables]
[./diffusivity_1]
family = MONOMIAL
order = CONSTANT
[]
[./diffusivity_2]
family = MONOMIAL
order = CONSTANT
[]
[]
[Postprocessors]
[./diffusivity_average]
type = ${postprocessor_type}
interface_value_type = average
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_jump_primary_secondary]
type = ${postprocessor_type}
interface_value_type = jump_primary_minus_secondary
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_jump_secondary_primary]
type = ${postprocessor_type}
interface_value_type = jump_secondary_minus_primary
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_jump_abs]
type = ${postprocessor_type}
interface_value_type = jump_abs
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_primary]
type = ${postprocessor_type}
interface_value_type = primary
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_secondary]
type = ${postprocessor_type}
interface_value_type = secondary
variable = diffusivity_1
neighbor_variable = diffusivity_2
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[./diffusivity_single_variable]
type = ${postprocessor_type}
interface_value_type = primary
variable = diffusivity_1
execute_on = TIMESTEP_END
boundary = 'interface'
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
file_base = ${raw ${postprocessor_type} _fv}
exodus = true
[]
(test/tests/misc/rename-parameters/rename-mat-prop.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
nx = 20
dim = 1
[]
[]
[Variables]
[u][]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = 2
[]
[rxn]
type = RenamedMatReaction
variable = u
reaction_coefficient = 'rxn_coeff'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 1
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Materials]
[diff]
type = GenericConstantMaterial
prop_names = 'rxn_coeff'
prop_values = '-2'
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[avg_u]
type = ElementAverageValue
variable = u
[]
[]
[Outputs]
csv = true
[]
(modules/chemical_reactions/test/tests/exceptions/extra_gamma.i)
# Additional activity coefficient in AqueousEquilibriumRxnAux AuxKernel
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Variables]
[./a]
[../]
[./b]
[../]
[]
[AuxVariables]
[./c]
[../]
[./gamma_a]
[../]
[./gamma_b]
[../]
[./gamma_c]
[../]
[]
[AuxKernels]
[./c]
type = AqueousEquilibriumRxnAux
variable = c
v = 'a b'
gamma_v = 'gamma_a gamma_b gamma_c'
sto_v = '1 1'
log_k = 1
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./b_ie]
type = PrimaryTimeDerivative
variable = b
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = porosity
prop_values = 0.2
[../]
[]
[Executioner]
type = Transient
end_time = 1
[]
(modules/phase_field/test/tests/mobility_derivative/mobility_derivative_direct_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 12
ny = 12
xmax = 30
ymax = 30
elem_type = QUAD4
[]
[Variables]
[./c]
order = THIRD
family = HERMITE
[../]
[]
[ICs]
[./c_IC]
type = SmoothCircleIC
x1 = 15
y1 = 15
radius = 10
variable = c
int_width = 3
invalue = 1
outvalue = -1
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./CHSolid]
type = CHMath
variable = c
mob_name = M
[../]
[./CHInterface]
type = CHInterface
variable = c
kappa_name = kappa_c
mob_name = M
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./kappa]
type = GenericConstantMaterial
prop_names = 'kappa_c'
prop_values = '2.0'
[../]
[./mob]
type = DerivativeParsedMaterial
property_name = M
coupled_variables = c
expression = 'if(c<-1,0.1,if(c>1,0.1,1-.9*c^2))'
outputs = exodus
derivative_order = 2
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_max_its = 15
l_tol = 1.0e-4
nl_max_its = 10
nl_rel_tol = 1.0e-8
start_time = 0.0
num_steps = 2
dt = 0.9
[]
[Outputs]
exodus = true
[]
(modules/chemical_reactions/test/tests/jacobian/coupled_diffreact.i)
# Test the Jacobian terms for the CoupledDiffusionReactionSub Kernel
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
[]
[Variables]
[./a]
order = FIRST
family = LAGRANGE
[../]
[./b]
order = FIRST
family = LAGRANGE
[../]
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./pressure]
type = RandomIC
variable = pressure
min = 1
max = 5
[../]
[./a]
type = RandomIC
variable = a
max = 1
min = 0
[../]
[./b]
type = RandomIC
variable = b
max = 1
min = 0
[../]
[]
[Kernels]
[./diff]
type = DarcyFluxPressure
variable = pressure
[../]
[./diff_b]
type = Diffusion
variable = b
[../]
[./a1diff]
type = CoupledDiffusionReactionSub
variable = a
v = b
log_k = 2
weight = 2
sto_v = 1.5
sto_u = 2
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity'
prop_values = '1e-4 1e-4 0.2'
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
perf_graph = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
(modules/combined/examples/publications/rapid_dev/fig6.i)
#
# Fig. 6 input for 10.1016/j.commatsci.2017.02.017
# D. Schwen et al./Computational Materials Science 132 (2017) 36-45
# Three phase interface simulation demonstrating the interfacial stability
# w.r.t. formation of a tspurious third phase
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 120
ny = 120
nz = 0
xmin = 0
xmax = 40
ymin = 0
ymax = 40
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
# concentration
[./c]
[../]
# order parameter 1
[./eta1]
[../]
# order parameter 2
[./eta2]
[../]
# order parameter 3
[./eta3]
[../]
# phase concentration 1
[./c1]
initial_condition = 0.4
[../]
# phase concentration 2
[./c2]
initial_condition = 0.5
[../]
# phase concentration 3
[./c3]
initial_condition = 0.8
[../]
# Lagrange multiplier
[./lambda]
initial_condition = 0.0
[../]
[]
[AuxVariables]
[./T]
[./InitialCondition]
type = FunctionIC
function = 'x-10'
[../]
[../]
[]
[Functions]
[./ic_func_eta1]
type = ParsedFunction
expression = '0.5*(1.0+tanh((x-10)/sqrt(2.0))) * 0.5*(1.0+tanh((y-10)/sqrt(2.0)))'
[../]
[./ic_func_eta2]
type = ParsedFunction
expression = '0.5*(1.0-tanh((x-10)/sqrt(2.0)))'
[../]
[./ic_func_eta3]
type = ParsedFunction
expression = '1 - 0.5*(1.0-tanh((x-10)/sqrt(2.0)))
- 0.5*(1.0+tanh((x-10)/sqrt(2.0))) * 0.5*(1.0+tanh((y-10)/sqrt(2.0)))'
[../]
[./ic_func_c]
type = ParsedFunction
expression = '0.5 * 0.5*(1.0-tanh((x-10)/sqrt(2.0)))
+ 0.4 * 0.5*(1.0+tanh((x-10)/sqrt(2.0))) * 0.5*(1.0+tanh((y-10)/sqrt(2.0)))
+ 0.8 * (1 - 0.5*(1.0-tanh((x-10)/sqrt(2.0)))
- 0.5*(1.0+tanh((x-10)/sqrt(2.0))) * 0.5*(1.0+tanh((y-10)/sqrt(2.0))))'
[../]
[]
[ICs]
[./eta1]
variable = eta1
type = FunctionIC
function = ic_func_eta1
[../]
[./eta2]
variable = eta2
type = FunctionIC
function = ic_func_eta2
[../]
[./eta3]
variable = eta3
type = FunctionIC
function = ic_func_eta3
[../]
[./c]
variable = c
type = FunctionIC
function = ic_func_c
[../]
[]
[Materials]
# simple toy free energies
[./f1]
type = DerivativeParsedMaterial
property_name = F1
coupled_variables = 'c1'
expression = '20*(c1-0.4)^2'
[../]
[./f2]
type = DerivativeParsedMaterial
property_name = F2
coupled_variables = 'c2 T'
expression = '20*(c2-0.5)^2 + 0.01*T'
[../]
[./f3]
type = DerivativeParsedMaterial
property_name = F3
coupled_variables = 'c3'
expression = '20*(c3-0.8)^2'
[../]
# Switching functions for each phase
# h1(eta1, eta2, eta3)
[./h1]
type = SwitchingFunction3PhaseMaterial
eta_i = eta1
eta_j = eta2
eta_k = eta3
f_name = h1
[../]
# h2(eta1, eta2, eta3)
[./h2]
type = SwitchingFunction3PhaseMaterial
eta_i = eta2
eta_j = eta3
eta_k = eta1
f_name = h2
[../]
# h3(eta1, eta2, eta3)
[./h3]
type = SwitchingFunction3PhaseMaterial
eta_i = eta3
eta_j = eta1
eta_k = eta2
f_name = h3
[../]
# Coefficients for diffusion equation
[./Dh1]
type = DerivativeParsedMaterial
material_property_names = 'D h1'
expression = D*h1
property_name = Dh1
[../]
[./Dh2]
type = DerivativeParsedMaterial
material_property_names = 'D h2'
expression = D*h2
property_name = Dh2
[../]
[./Dh3]
type = DerivativeParsedMaterial
material_property_names = 'D h3'
expression = D*h3
property_name = Dh3
[../]
# Barrier functions for each phase
[./g1]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta1
function_name = g1
[../]
[./g2]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta2
function_name = g2
[../]
[./g3]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta3
function_name = g3
[../]
# constant properties
[./constants]
type = GenericConstantMaterial
prop_names = 'L kappa D'
prop_values = '1.0 1.0 1'
[../]
[]
[Kernels]
#Kernels for diffusion equation
[./diff_time]
type = TimeDerivative
variable = c
[../]
[./diff_c1]
type = MatDiffusion
variable = c
diffusivity = Dh1
v = c1
[../]
[./diff_c2]
type = MatDiffusion
variable = c
diffusivity = Dh2
v = c2
[../]
[./diff_c3]
type = MatDiffusion
variable = c
diffusivity = Dh3
v = c3
[../]
# Kernels for Allen-Cahn equation for eta1
[./deta1dt]
type = TimeDerivative
variable = eta1
[../]
[./ACBulkF1]
type = KKSMultiACBulkF
variable = eta1
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g1
eta_i = eta1
wi = 1.0
args = 'c1 c2 c3 eta2 eta3'
[../]
[./ACBulkC1]
type = KKSMultiACBulkC
variable = eta1
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta1
args = 'eta2 eta3'
[../]
[./ACInterface1]
type = ACInterface
variable = eta1
kappa_name = kappa
[../]
[./multipler1]
type = MatReaction
variable = eta1
v = lambda
mob_name = L
[../]
# Kernels for Allen-Cahn equation for eta2
[./deta2dt]
type = TimeDerivative
variable = eta2
[../]
[./ACBulkF2]
type = KKSMultiACBulkF
variable = eta2
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g2
eta_i = eta2
wi = 1.0
args = 'c1 c2 c3 eta1 eta3'
[../]
[./ACBulkC2]
type = KKSMultiACBulkC
variable = eta2
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta2
args = 'eta1 eta3'
[../]
[./ACInterface2]
type = ACInterface
variable = eta2
kappa_name = kappa
[../]
[./multipler2]
type = MatReaction
variable = eta2
v = lambda
mob_name = L
[../]
# Kernels for the Lagrange multiplier equation
[./mult_lambda]
type = MatReaction
variable = lambda
mob_name = 3
[../]
[./mult_ACBulkF_1]
type = KKSMultiACBulkF
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g1
eta_i = eta1
wi = 1.0
mob_name = 1
args = 'c1 c2 c3 eta2 eta3'
[../]
[./mult_ACBulkC_1]
type = KKSMultiACBulkC
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta1
args = 'eta2 eta3'
mob_name = 1
[../]
[./mult_CoupledACint_1]
type = SimpleCoupledACInterface
variable = lambda
v = eta1
kappa_name = kappa
mob_name = 1
[../]
[./mult_ACBulkF_2]
type = KKSMultiACBulkF
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g2
eta_i = eta2
wi = 1.0
mob_name = 1
args = 'c1 c2 c3 eta1 eta3'
[../]
[./mult_ACBulkC_2]
type = KKSMultiACBulkC
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta2
args = 'eta1 eta3'
mob_name = 1
[../]
[./mult_CoupledACint_2]
type = SimpleCoupledACInterface
variable = lambda
v = eta2
kappa_name = kappa
mob_name = 1
[../]
[./mult_ACBulkF_3]
type = KKSMultiACBulkF
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g3
eta_i = eta3
wi = 1.0
mob_name = 1
args = 'c1 c2 c3 eta1 eta2'
[../]
[./mult_ACBulkC_3]
type = KKSMultiACBulkC
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta3
args = 'eta1 eta2'
mob_name = 1
[../]
[./mult_CoupledACint_3]
type = SimpleCoupledACInterface
variable = lambda
v = eta3
kappa_name = kappa
mob_name = 1
[../]
# Kernels for constraint equation eta1 + eta2 + eta3 = 1
# eta3 is the nonlinear variable for the constraint equation
[./eta3reaction]
type = MatReaction
variable = eta3
mob_name = 1
[../]
[./eta1reaction]
type = MatReaction
variable = eta3
v = eta1
mob_name = 1
[../]
[./eta2reaction]
type = MatReaction
variable = eta3
v = eta2
mob_name = 1
[../]
[./one]
type = BodyForce
variable = eta3
value = -1.0
[../]
# Phase concentration constraints
[./chempot12]
type = KKSPhaseChemicalPotential
variable = c1
cb = c2
fa_name = F1
fb_name = F2
[../]
[./chempot23]
type = KKSPhaseChemicalPotential
variable = c2
cb = c3
fa_name = F2
fb_name = F3
[../]
[./phaseconcentration]
type = KKSMultiPhaseConcentration
variable = c3
cj = 'c1 c2 c3'
hj_names = 'h1 h2 h3'
etas = 'eta1 eta2 eta3'
c = c
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm ilu nonzero'
l_max_its = 30
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-11
num_steps = 1000
[./TimeStepper]
type = IterationAdaptiveDT
dt = 0.2
optimal_iterations = 10
iteration_window = 2
[../]
[]
[Preconditioning]
active = 'full'
[./full]
type = SMP
full = true
[../]
[./mydebug]
type = FDP
full = true
[../]
[]
[Outputs]
exodus = true
checkpoint = true
print_linear_residuals = false
[./csv]
type = CSV
execute_on = 'final'
[../]
[]
#[VectorPostprocessors]
# [./c]
# type = LineValueSampler
# start_point = '-25 0 0'
# end_point = '25 0 0'
# variable = c
# num_points = 151
# sort_by = id
# execute_on = timestep_end
# [../]
# [./eta1]
# type = LineValueSampler
# start_point = '-25 0 0'
# end_point = '25 0 0'
# variable = eta1
# num_points = 151
# sort_by = id
# execute_on = timestep_end
# [../]
# [./eta2]
# type = LineValueSampler
# start_point = '-25 0 0'
# end_point = '25 0 0'
# variable = eta2
# num_points = 151
# sort_by = id
# execute_on = timestep_end
# [../]
# [./eta3]
# type = LineValueSampler
# start_point = '-25 0 0'
# end_point = '25 0 0'
# variable = eta3
# num_points = 151
# sort_by = id
# execute_on = timestep_end
# [../]
#[]
(modules/heat_transfer/test/tests/gap_heat_transfer_htonly/planar_xy.i)
# 1-D Gap Heat Transfer Test without mechanics
#
# This test exercises 1-D gap heat transfer for a constant conductivity gap.
#
# The mesh consists of two element blocks in the x-y plane. Each element block
# is a square. They sit next to one another with a unit between them.
#
# The conductivity of both blocks is set very large to achieve a uniform temperature
# across each block. The temperature of the far bottom boundary
# is ramped from 100 to 200 over one time unit. The temperature of the far top
# boundary is held fixed at 100.
#
# A simple analytical solution is possible for the heat flux between the blocks:
#
# Flux = (T_left - T_right) * (gapK/gap_width)
#
# The gap conductivity is specified as 1, thus
#
# gapK(Tavg) = 1.0*Tavg
#
# The heat flux across the gap at time = 1 is then:
#
# Flux = 100 * (1.0/1.0) = 100
#
# For comparison, see results from the flux post processors. These results
# are the same as for the unit 1-D gap heat transfer between two unit cubes.
[Mesh]
file = simple_2D.e
[]
[Functions]
[./temp]
type = PiecewiseLinear
x = '0 1 2'
y = '100 200 200'
[../]
[]
[ThermalContact]
[./thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 3
secondary = 2
emissivity_primary = 0
emissivity_secondary = 0
[../]
[]
[Variables]
[./temp]
order = FIRST
family = LAGRANGE
initial_condition = 100
[../]
[]
[AuxVariables]
[./gap_cond]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = temp
[../]
[]
[BCs]
[./temp_far_bottom]
type = FunctionDirichletBC
boundary = 1
variable = temp
function = temp
[../]
[./temp_far_top]
type = DirichletBC
boundary = 4
variable = temp
value = 100
[../]
[]
[AuxKernels]
[./conductance]
type = MaterialRealAux
property = gap_conductance
variable = gap_cond
boundary = 2
[../]
[]
[Materials]
[./heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 100000000.0
[../]
[./density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '1.0'
[../]
[]
[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 4'
line_search = 'none'
nl_rel_tol = 1e-14
l_tol = 1e-3
l_max_its = 100
dt = 1e-1
end_time = 1.0
[]
[Postprocessors]
[./temp_bottom]
type = SideAverageValue
boundary = 2
variable = temp
execute_on = 'initial timestep_end'
[../]
[./temp_top]
type = SideAverageValue
boundary = 3
variable = temp
execute_on = 'initial timestep_end'
[../]
[./flux_bottom]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[../]
[./flux_top]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/jacobians/kernels/one_d_energy_wall_heating.i)
[JacobianTest1Phase]
A = 1
p = 1e6
T = 300
vel = 2
aux_variable_names = 'tw phf'
aux_variable_values = '310 1'
snes_test_err = 1e-9
fp_1phase = fp_1phase
[]
[FluidProperties]
[fp_1phase]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Materials]
[const_mat_props]
type = GenericConstantMaterial
prop_names = 'htc'
prop_values = '1e4'
[]
[]
[Kernels]
[mom_flux]
type = OneDEnergyWallHeating
variable = rhoEA
rhoA = rhoA
rhouA = rhouA
rhoEA = rhoEA
T_wall = tw
Hw = htc
P_hf = phf
T = T
[]
[]
(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/phase_field/test/tests/initial_conditions/CrossIC.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 25
xmax = 50
ymax = 50
elem_type = QUAD4
[]
[Variables]
[./c]
order = THIRD
family = HERMITE
[../]
[]
[ICs]
[./c_IC]
type = CrossIC
x1 = 0.0
x2 = 50.0
y1 = 0.0
y2 = 50.0
variable = c
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./CHSolid]
type = CHMath
variable = c
mob_name = M
[../]
[./CHInterface]
type = CHInterface
variable = c
kappa_name = kappa_c
mob_name = M
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./constant]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1.0 2.0'
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_max_its = 15
l_tol = 1.0e-4
nl_max_its = 10
nl_rel_tol = 1.0e-8
start_time = 0.0
num_steps = 2
dt = 20.0
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/MultiPhase/acmultiinterface_aux.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 10
nz = 0
xmin = -10
xmax = 10
ymin = -5
ymax = 5
elem_type = QUAD4
[]
[AuxVariables]
[./eta1]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = -3.5
y1 = 0.0
radius = 4.0
invalue = 0.9
outvalue = 0.1
int_width = 2.0
[../]
[../]
[]
[Variables]
[./eta2]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 3.5
y1 = 0.0
radius = 4.0
invalue = 0.9
outvalue = 0.1
int_width = 2.0
[../]
[../]
[./eta3]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SpecifiedSmoothCircleIC
x_positions = '-4.0 4.0'
y_positions = ' 0.0 0.0'
z_positions = ' 0.0 0.0'
radii = '4.0 4.0'
invalue = 0.1
outvalue = 0.9
int_width = 2.0
[../]
[../]
[./lambda]
order = FIRST
family = LAGRANGE
initial_condition = 1.0
[../]
[]
[Kernels]
[./deta2dt]
type = TimeDerivative
variable = eta2
[../]
[./ACBulk2]
type = AllenCahn
variable = eta2
coupled_variables = 'eta1 eta3'
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
[../]
[./deta3dt]
type = TimeDerivative
variable = eta3
[../]
[./ACBulk3]
type = AllenCahn
variable = eta3
coupled_variables = 'eta1 eta2'
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]
type = SwitchingFunctionConstraintLagrange
variable = lambda
etas = 'eta1 eta2 eta3'
h_names = 'h1 h2 h3'
epsilon = 0
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'Fx L1 L2 L3 kappa11 kappa12 kappa13 kappa21 kappa22 kappa23 kappa31 kappa32 kappa33'
prop_values = '0 1 1 1 1 1 1 1 1 1 1 1 1 '
[../]
[./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'
[../]
[./free_energy]
type = DerivativeMultiPhaseMaterial
property_name = F
# we use a constant free energy (GeneriConstantmaterial property Fx)
fi_names = 'Fx Fx Fx'
hi_names = 'h1 h2 h3'
etas = 'eta1 eta2 eta3'
# the free energy is given by the MultiBarrierFunctionMaterial only
W = 1
derivative_order = 2
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
#petsc_options = '-snes_ksp -snes_ksp_ew'
#petsc_options = '-ksp_monitor_snes_lg-snes_ksp_ew'
#petsc_options_iname = '-ksp_gmres_restart'
#petsc_options_value = '1000 '
l_max_its = 15
l_tol = 1.0e-6
nl_max_its = 50
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-10
start_time = 0.0
num_steps = 2
dt = 0.2
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/meshgenerators/subdomain_bounding_box_generator/subdomain_bounding_box_generator_inside.i)
[Mesh]
[./gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmax = 1
ymax = 1
#uniform_refine = 2
[]
[./subdomains]
type = SubdomainBoundingBoxGenerator
input = gmg
bottom_left = '0.1 0.1 0'
block_id = 1
top_right = '0.9 0.9 0'
[]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = MatCoefDiffusion
variable = u
conductivity = 'k'
block = '0 1'
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Materials]
[./outside]
type = GenericConstantMaterial
block = 0
prop_names = 'k'
prop_values = 1
[../]
[./inside]
type = GenericConstantMaterial
block = 1
prop_names = 'k'
prop_values = 0.1
[../]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/dynamics/wave_1D/wave_rayleigh_hht.i)
# Wave propogation in 1D using HHT time integration in the presence of Rayleigh damping
#
# The test is for an 1D bar element of length 4m fixed on one end
# with a sinusoidal pulse dirichlet boundary condition applied to the other end.
# alpha, beta and gamma are HHT time integration parameters
# eta and zeta are mass dependent and stiffness dependent Rayleigh damping
# coefficients, respectively.
# The equation of motion in terms of matrices is:
#
# M*accel + (eta*M+zeta*K)*((1+alpha)*vel-alpha*vel_old)
# +(1+alpha)*K*disp-alpha*K*disp_old = 0
#
# Here M is the mass matrix, K is the stiffness matrix
#
# The displacement at the first, second, third and fourth node at t = 0.1 are
# -7.787499960311491942e-02, 1.955566679096475483e-02 and -4.634888180231294501e-03, respectively.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 4
nz = 1
xmin = 0.0
xmax = 0.1
ymin = 0.0
ymax = 4.0
zmin = 0.0
zmax = 0.1
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[AuxVariables]
[./vel_x]
[../]
[./accel_x]
[../]
[./vel_y]
[../]
[./accel_y]
[../]
[./vel_z]
[../]
[./accel_z]
[../]
[]
[Kernels]
[./DynamicSolidMechanics]
displacements = 'disp_x disp_y disp_z'
hht_alpha = -0.3
stiffness_damping_coefficient = 0.1
[../]
[./inertia_x]
type = InertialForce
variable = disp_x
velocity = vel_x
acceleration = accel_x
beta = 0.422
gamma = 0.8
eta=0.1
alpha = -0.3
[../]
[./inertia_y]
type = InertialForce
variable = disp_y
velocity = vel_y
acceleration = accel_y
beta = 0.422
gamma = 0.8
eta=0.1
alpha = -0.3
[../]
[./inertia_z]
type = InertialForce
variable = disp_z
velocity = vel_z
acceleration = accel_z
beta = 0.422
gamma = 0.8
eta = 0.1
alpha = -0.3
[../]
[]
[AuxKernels]
[./accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.422
execute_on = timestep_end
[../]
[./vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.8
execute_on = timestep_end
[../]
[./accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.422
execute_on = timestep_end
[../]
[./vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.8
execute_on = timestep_end
[../]
[./accel_z]
type = NewmarkAccelAux
variable = accel_z
displacement = disp_z
velocity = vel_z
beta = 0.422
execute_on = timestep_end
[../]
[./vel_z]
type = NewmarkVelAux
variable = vel_z
acceleration = accel_z
gamma = 0.8
execute_on = timestep_end
[../]
[]
[BCs]
[./top_y]
type = DirichletBC
variable = disp_y
boundary = top
value=0.0
[../]
[./top_x]
type = DirichletBC
variable = disp_x
boundary = top
value=0.0
[../]
[./top_z]
type = DirichletBC
variable = disp_z
boundary = top
value=0.0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = right
value=0.0
[../]
[./right_z]
type = DirichletBC
variable = disp_z
boundary = right
value=0.0
[../]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = left
value=0.0
[../]
[./left_z]
type = DirichletBC
variable = disp_z
boundary = left
value=0.0
[../]
[./front_x]
type = DirichletBC
variable = disp_x
boundary = front
value=0.0
[../]
[./front_z]
type = DirichletBC
variable = disp_z
boundary = front
value=0.0
[../]
[./back_x]
type = DirichletBC
variable = disp_x
boundary = back
value=0.0
[../]
[./back_z]
type = DirichletBC
variable = disp_z
boundary = back
value=0.0
[../]
[./bottom_x]
type = DirichletBC
variable = disp_x
boundary = bottom
value=0.0
[../]
[./bottom_z]
type = DirichletBC
variable = disp_z
boundary = bottom
value=0.0
[../]
[./bottom_y]
type = FunctionDirichletBC
variable = disp_y
boundary = bottom
function = displacement_bc
[../]
[]
[Materials]
[./Elasticity_tensor]
type = ComputeElasticityTensor
block = 0
fill_method = symmetric_isotropic
C_ijkl = '1 0'
[../]
[./strain]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[../]
[./stress]
type = ComputeLinearElasticStress
block = 0
[../]
[./density]
type = GenericConstantMaterial
block = 0
prop_names = 'density'
prop_values = '1'
[../]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 6.0
l_tol = 1e-12
nl_rel_tol = 1e-12
dt = 0.1
[]
[Functions]
[./displacement_bc]
type = PiecewiseLinear
data_file = 'sine_wave.csv'
format = columns
[../]
[]
[Postprocessors]
[./_dt]
type = TimestepSize
[../]
[./disp_1]
type = NodalVariableValue
nodeid = 1
variable = disp_y
[../]
[./disp_2]
type = NodalVariableValue
nodeid = 3
variable = disp_y
[../]
[./disp_3]
type = NodalVariableValue
nodeid = 10
variable = disp_y
[../]
[./disp_4]
type = NodalVariableValue
nodeid = 14
variable = disp_y
[../]
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/phase_field/examples/multiphase/DerivativeMultiPhaseMaterial.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 40
nz = 0
xmin = -12
xmax = 12
ymin = -12
ymax = 12
elem_type = QUAD4
[]
[GlobalParams]
# let's output all material properties for demonstration purposes
outputs = exodus
# prefactor on the penalty function kernels. The higher this value is, the
# more rigorously the constraint is enforced
penalty = 1e3
[]
#
# These AuxVariables hold the directly calculated free energy density in the
# simulation cell. They are provided for visualization purposes.
#
[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
[../]
#
# Helper kernel to cpompute the gradient contribution from interfaces of order
# parameters evolved using the ACMultiInterface kernel
#
[./cross_terms]
type = CrossTermGradientFreeEnergy
variable = cross_energy
interfacial_vars = 'eta1 eta2 eta3'
#
# The interface coefficient matrix. This should be symmetrical!
#
kappa_names = 'kappa11 kappa12 kappa13
kappa21 kappa22 kappa23
kappa31 kappa32 kappa33'
[../]
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
#
# We set up a smooth cradial concentrtaion gradient
# The concentration will quickly change to adapt to the preset order
# parameters eta1, eta2, and eta3
#
[./InitialCondition]
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 5.0
invalue = 1.0
outvalue = 0.01
int_width = 10.0
[../]
[../]
[./eta1]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
#
# Note: this initial conditions sets up a _sharp_ interface. Ideally
# we should start with a smooth interface with a width consistent
# with the kappa parameter supplied for the given interface.
#
function = 'r:=sqrt(x^2+y^2);if(r<=4,1,0)'
[../]
[../]
[./eta2]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = 'r:=sqrt(x^2+y^2);if(r>4&r<=7,1,0)'
[../]
[../]
[./eta3]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = FunctionIC
function = 'r:=sqrt(x^2+y^2);if(r>7,1,0)'
[../]
[../]
[]
[Kernels]
#
# Cahn-Hilliard kernel for the concentration variable.
# Note that we are not using an interfcae kernel on this variable, but rather
# rely on the interface width enforced on the order parameters. This allows us
# to use a direct solve using the CahnHilliard kernel _despite_ only using first
# order elements.
#
[./c_res]
type = CahnHilliard
variable = c
f_name = F
coupled_variables = 'eta1 eta2 eta3'
[../]
[./time]
type = TimeDerivative
variable = c
[../]
#
# Order parameter eta1
# Each order parameter is acted on by 4 kernels:
# 1. The stock time derivative deta_i/dt kernel
# 2. The Allen-Cahn kernel that takes a Dervative Material for the free energy
# 3. A gradient interface kernel that includes cross terms
# see http://mooseframework.org/wiki/PhysicsModules/PhaseField/DevelopingModels/MultiPhaseModels/ACMultiInterface/
# 4. A penalty contribution that forces the interface contributions h(eta)
# to sum up to unity
#
[./deta1dt]
type = TimeDerivative
variable = eta1
[../]
[./ACBulk1]
type = AllenCahn
variable = eta1
coupled_variables = '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'
[../]
[./penalty1]
type = SwitchingFunctionPenalty
variable = eta1
etas = 'eta1 eta2 eta3'
h_names = 'h1 h2 h3'
[../]
#
# Order parameter eta2
#
[./deta2dt]
type = TimeDerivative
variable = eta2
[../]
[./ACBulk2]
type = AllenCahn
variable = eta2
coupled_variables = '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'
[../]
[./penalty2]
type = SwitchingFunctionPenalty
variable = eta2
etas = 'eta1 eta2 eta3'
h_names = 'h1 h2 h3'
[../]
#
# Order parameter eta3
#
[./deta3dt]
type = TimeDerivative
variable = eta3
[../]
[./ACBulk3]
type = AllenCahn
variable = eta3
coupled_variables = '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'
[../]
[./penalty3]
type = SwitchingFunctionPenalty
variable = eta3
etas = 'eta1 eta2 eta3'
h_names = 'h1 h2 h3'
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
# here we declare some of the model parameters: the mobilities and interface
# gradient prefactors. For this example we use arbitrary numbers. In an actual simulation
# physical mobilities would be used, and the interface gradient prefactors would
# be readjusted to the free energy magnitudes.
[./consts]
type = GenericConstantMaterial
prop_names = 'M kappa_c L1 L2 L3 kappa11 kappa12 kappa13 kappa21 kappa22 kappa23 kappa31 kappa32 kappa33'
prop_values = '0.2 0.75 1 1 1 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 0.75 '
[../]
# This material sums up the individual phase contributions. It is written to the output file
# (see GlobalParams section above) and can be used to check the constraint enforcement.
[./etasummat]
type = ParsedMaterial
property_name = etasum
material_property_names = 'h1 h2 h3'
expression = 'h1+h2+h3'
[../]
# The phase contribution factors for each material point are computed using the
# SwitchingFunctionMaterials. Each phase with an order parameter eta contributes h(eta)
# to the global free energy density. h is a function that switches smoothly from 0 to 1
[./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
[../]
# The barrier function adds a phase transformation energy barrier. It also
# Drives order parameters toward the [0:1] interval to avoid negative or larger than 1
# order parameters (these are set to 0 and 1 contribution by the switching functions
# above)
[./barrier]
type = MultiBarrierFunctionMaterial
etas = 'eta1 eta2 eta3'
[../]
# We use DerivativeParsedMaterials to specify three (very) simple free energy
# expressions for the three phases. All necessary derivatives are built automatically.
# In a real problem these expressions can be arbitrarily complex (or even provided
# by custom kernels).
[./phase_free_energy_1]
type = DerivativeParsedMaterial
property_name = F1
expression = '(c-1)^2'
coupled_variables = 'c'
[../]
[./phase_free_energy_2]
type = DerivativeParsedMaterial
property_name = F2
expression = '(c-0.5)^2'
coupled_variables = 'c'
[../]
[./phase_free_energy_3]
type = DerivativeParsedMaterial
property_name = F3
expression = 'c^2'
coupled_variables = 'c'
[../]
# The DerivativeMultiPhaseMaterial ties the phase free energies together into a global free energy.
# http://mooseframework.org/wiki/PhysicsModules/PhaseField/DevelopingModels/MultiPhaseModels/
[./free_energy]
type = DerivativeMultiPhaseMaterial
property_name = F
# we use a constant free energy (GeneriConstantmaterial property Fx)
fi_names = 'F1 F2 F3'
hi_names = 'h1 h2 h3'
etas = 'eta1 eta2 eta3'
coupled_variables = 'c'
W = 1
[../]
[]
[Postprocessors]
# The total free energy of the simulation cell to observe the energy reduction.
[./total_free_energy]
type = ElementIntegralVariablePostprocessor
variable = local_energy
[../]
# for testing we also monitor the total solute amount, which should be conserved.
[./total_solute]
type = ElementIntegralVariablePostprocessor
variable = c
[../]
[]
[Preconditioning]
# This preconditioner makes sure the Jacobian Matrix is fully populated. Our
# kernels compute all Jacobian matrix entries.
# This allows us to use the Newton solver below.
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
# Automatic differentiation provedes a _full_ Jacobian in this example
# so we can safely use NEWTON for a fast solve
solve_type = 'NEWTON'
l_max_its = 15
l_tol = 1.0e-6
nl_max_its = 50
nl_rel_tol = 1.0e-6
nl_abs_tol = 1.0e-6
start_time = 0.0
end_time = 150.0
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.1
[../]
[]
[Debug]
# show_var_residual_norms = true
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[./table]
type = CSV
delimiter = ' '
[../]
[]
(modules/navier_stokes/test/tests/finite_element/ins/rz-x-axial-coord/hand-coded-jac-pipe-flow.i)
mu=1
rho=1
pipe_length=10 # m
pipe_radius=1 # m
u_inlet=1
[GlobalParams]
integrate_p_by_parts = false
supg = true
pspg = true
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = ${pipe_length}
ymin = 0
ymax = ${pipe_radius}
nx = 50
ny = 5
[]
coord_type = 'RZ'
rz_coord_axis = x
[]
[Variables]
[velocity_x]
family = LAGRANGE
[]
[velocity_y]
family = LAGRANGE
[]
[p][]
[]
[Kernels]
[mass]
type = INSMassRZ
variable = p
u = velocity_x
v = velocity_y
pressure = p
[]
[x_momentum]
type = INSMomentumLaplaceFormRZ
variable = velocity_x
u = velocity_x
v = velocity_y
pressure = p
component = 0
[]
[y_momentum]
type = INSMomentumLaplaceFormRZ
variable = velocity_y
u = velocity_x
v = velocity_y
pressure = p
component = 1
[]
[]
[Functions]
[vel_x_inlet]
type = ParsedFunction
expression = '${u_inlet} * (${pipe_radius}^2 - y^2)'
[]
[]
[BCs]
[inlet_x]
type = FunctionDirichletBC
variable = velocity_x
boundary = 'left'
function = vel_x_inlet
[]
[zero_y]
type = FunctionDirichletBC
variable = velocity_y
boundary = 'left top bottom'
function = 0
[]
[zero_x]
type = FunctionDirichletBC
variable = velocity_x
boundary = 'top'
function = 0
[]
# pressure is not integrated by parts so we cannot remove the nullspace through a natural condition
[p_corner]
type = DirichletBC
boundary = 'right'
value = 0
variable = p
[]
[]
[Materials]
[const]
type = GenericConstantMaterial
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
line_search = 'none'
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/optimization/invOpt_bc_convective/forward.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 20
xmax = 1
ymax = 2
[]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[heat_conduction]
type = ADHeatConduction
variable = temperature
[]
[]
[BCs]
[left]
type = ConvectiveFluxFunction
variable = temperature
boundary = 'left'
T_infinity = 100.0
coefficient = function1
[]
[right]
type = NeumannBC
variable = temperature
boundary = right
value = -100
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 500
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 600
[]
[]
[Materials]
[steel]
type = ADGenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
nl_abs_tol = 1e-6
nl_rel_tol = 1e-8
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Functions]
[function1]
type = ParsedOptimizationFunction
expression = 'a'
param_symbol_names = 'a'
param_vector_name = 'params/vals'
[]
[]
[VectorPostprocessors]
[vertical]
type = LineValueSampler
variable = 'temperature'
start_point = '0.1 0.0 0.0'
end_point = '0.1 2.0 0.0'
num_points = 21
sort_by = id
[]
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
[]
[params]
type = ConstantReporter
real_vector_names = 'vals'
real_vector_values = '0' # Dummy value
[]
[]
[Outputs]
csv = true
exodus = false
console = false
file_base = 'forward'
[]
(test/tests/auxkernels/diffusion_flux/diffusion_flux.i)
[Mesh]
type = GeneratedMesh # Can generate simple lines, rectangles and rectangular prisms
dim = 2 # Dimension of the mesh
nx = 10 # Number of elements in the x direction
ny = 10 # Number of elements in the y direction
xmax = 1.0
ymax = 1.0
[]
[Variables]
[./T]
[../]
[]
[AuxVariables]
[./flux_x]
order = FIRST
family = MONOMIAL
[../]
[./flux_y]
order = FIRST
family = MONOMIAL
[../]
[]
[Kernels]
active = 'diff'
[./diff]
type = MatDiffusionTest # A Laplacian operator
variable = T
prop_name = 'thermal_conductivity'
[../]
[./diff_ad]
type = ADMatDiffusion # A Laplacian operator
variable = T
diffusivity = 'thermal_conductivity'
[../]
[]
[AuxKernels]
[./flux_x]
type = DiffusionFluxAux
diffusivity = 'thermal_conductivity'
variable = flux_x
diffusion_variable = T
component = x
[../]
[./flux_y]
type = DiffusionFluxAux
diffusivity = 'thermal_conductivity'
variable = flux_y
diffusion_variable = T
component = y
[../]
[]
[BCs]
[./inlet]
type = DirichletBC # Simple u=value BC
variable = T
boundary = left
value = 4000 # K
[../]
[./outlet]
type = DirichletBC
variable = T
boundary = right
value = 400 # K
[../]
[]
[Materials]
[./k]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity'
prop_values = '10' # in W/mK
[../]
[]
[VectorPostprocessors]
# avoid sampling an element variable on faces
[./line_sample]
type = LineValueSampler
variable = 'T flux_x flux_y'
start_point = '0.01 0.01 0'
end_point = '0.98 0.01 0'
num_points = 11
sort_by = id
[../]
[]
[Executioner]
type = Steady # Steady state problem
solve_type = PJFNK #Preconditioned Jacobian Free Newton Krylov
nl_rel_tol = 1e-12
petsc_options_iname = '-pc_type -pc_hypre_type' #Matches with the values below
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true # Output Exodus format
execute_on = 'initial timestep_end'
[]
(modules/combined/test/tests/phase_field_fracture/crack2d_computeCrackedStress_smallstrain.i)
#This input uses PhaseField-Nonconserved Action to add phase field fracture bulk rate kernels
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 20
ymax = 0.5
[]
[./noncrack]
type = BoundingBoxNodeSetGenerator
new_boundary = noncrack
bottom_left = '0.5 0 0'
top_right = '1 0 0'
input = gen
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[./strain_yy]
family = MONOMIAL
order = CONSTANT
[../]
[]
[Modules]
[./TensorMechanics]
[./Master]
[./All]
add_variables = true
strain = SMALL
planar_formulation = PLANE_STRAIN
additional_generate_output = 'stress_yy'
strain_base_name = uncracked
[../]
[../]
[../]
[./PhaseField]
[./Nonconserved]
[./c]
free_energy = E_el
kappa = kappa_op
mobility = L
[../]
[../]
[../]
[]
[Kernels]
[./solid_x]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_x
component = 0
c = c
[../]
[./solid_y]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_y
component = 1
c = c
[../]
[./off_disp]
type = AllenCahnElasticEnergyOffDiag
variable = c
displacements = 'disp_x disp_y'
mob_name = L
[../]
[]
[AuxKernels]
[./strain_yy]
type = RankTwoAux
variable = strain_yy
rank_two_tensor = uncracked_mechanical_strain
index_i = 1
index_j = 1
[../]
[]
[BCs]
[./ydisp]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = 't'
[../]
[./yfix]
type = DirichletBC
variable = disp_y
boundary = noncrack
value = 0
[../]
[./xfix]
type = DirichletBC
variable = disp_x
boundary = right
value = 0
[../]
[]
[Materials]
[./pfbulkmat]
type = GenericConstantMaterial
prop_names = 'gc_prop l visco'
prop_values = '1e-3 0.05 1e-6'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '127.0 70.8 70.8 127.0 70.8 127.0 73.55 73.55 73.55'
fill_method = symmetric9
base_name = uncracked
euler_angle_1 = 30
euler_angle_2 = 0
euler_angle_3 = 0
[../]
[./elastic]
type = ComputeLinearElasticStress
base_name = uncracked
[../]
[./cracked_stress]
type = ComputeCrackedStress
c = c
kdamage = 1e-6
F_name = E_el
use_current_history_variable = true
uncracked_base_name = uncracked
[../]
[]
[Postprocessors]
[./av_stress_yy]
type = ElementAverageValue
variable = stress_yy
[../]
[./av_strain_yy]
type = SideAverageValue
variable = disp_y
boundary = top
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_factor_mat_solving_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-8
l_tol = 1e-4
l_max_its = 100
nl_max_its = 10
dt = 5e-5
num_steps = 2
[]
[Outputs]
exodus = true
[]
(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/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_dual_material_insulated.i)
## Units in the input file: m-Pa-s-K-V
# Using the steady-state Fourier's law, the temperature at the interface in each block,
# in the case where thermal contact between the two blocks at the interface is not
# considered, (steel block on left, aluminum on right) is calculated as:
#
# T_{interface - steel} = 816.849K
# T_{interface - aluminum} = 339.871K
# which matches the simulation results to the 6 decimal places shown.
# As expected, the heat flux resulting from the volumetric Joule heating source is
# equivalent on both sides of the interface.
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmax = 0.1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmin = 0.1
xmax = 0.2
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
[interface_secondary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'fixed_block_left'
new_block_id = 3
new_block_name = 'interface_secondary_subdomain'
input = block_rename
[]
[interface_primary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'moving_block_right'
new_block_id = 4
new_block_name = 'interface_primary_subdomain'
input = interface_secondary_subdomain
[]
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
[]
[Variables]
[temperature]
initial_condition = 300.0
[]
[potential]
[]
[potential_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[AuxVariables]
[interface_normal_lm]
order = FIRST
family = LAGRANGE
block = 'interface_secondary_subdomain'
initial_condition = 1.0
[]
[]
[Kernels]
[HeatDiff_steel]
type = ADHeatConduction
variable = temperature
thermal_conductivity = steel_thermal_conductivity
extra_vector_tags = 'ref'
block = 'left_block'
[]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
extra_vector_tags = 'ref'
block = 'right_block'
[]
[electric_steel]
type = ADMatDiffusion
variable = potential
diffusivity = steel_electrical_conductivity
extra_vector_tags = 'ref'
block = 'left_block'
[]
[electric_aluminum]
type = ADMatDiffusion
variable = potential
diffusivity = aluminum_electrical_conductivity
extra_vector_tags = 'ref'
block = 'right_block'
[]
[]
[BCs]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'fixed_block_right'
[]
[electric_left]
type = ADDirichletBC
variable = potential
value = 0.0
boundary = moving_block_left
[]
[electric_right]
type = ADDirichletBC
variable = potential
value = 3.0e-1
boundary = fixed_block_right
[]
[]
[Constraints]
[electrical_contact]
type = ModularGapConductanceConstraint
variable = potential_interface_lm
secondary_variable = potential
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_electric'
[]
[interface_heating]
type = ADInterfaceJouleHeatingConstraint
potential_lagrange_multiplier = potential_interface_lm
secondary_variable = temperature
primary_electrical_conductivity = steel_electrical_conductivity
secondary_electrical_conductivity = aluminum_electrical_conductivity
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
[]
[]
[Materials]
[steel_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'steel_density steel_thermal_conductivity steel_heat_capacity steel_electrical_conductivity steel_hardness'
prop_values = '8e3 16.2 500.0 1.39e6 1.0' ## for stainless steel 304
block = 'left_block interface_secondary_subdomain'
[]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_electrical_conductivity aluminum_hardness'
prop_values = ' 2.7e3 210 900.0 3.7e7 1.0' #for 99% pure Al
block = 'left_block right_block interface_secondary_subdomain'
[]
[]
[UserObjects]
[closed_electric]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_electrical_conductivity
secondary_conductivity = aluminum_electrical_conductivity
temperature = potential
contact_pressure = interface_normal_lm
primary_hardness = steel_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[]
[Postprocessors]
[steel_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_primary_subdomain
[]
[aluminum_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_secondary_subdomain
[]
[interface_heat_flux_steel]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = moving_block_right
diffusivity = steel_thermal_conductivity
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[interface_electrical_flux]
type = ADSideDiffusiveFluxAverage
variable = potential
boundary = fixed_block_left
diffusivity = aluminum_electrical_conductivity
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
nl_abs_tol = 1e-10
nl_rel_tol = 1e-6
nl_max_its = 100
nl_forced_its = 1
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/combined/test/tests/phase_field_fracture/crack2d_computeCrackedStress_finitestrain_plastic.i)
#This input uses PhaseField-Nonconserved Action to add phase field fracture bulk rate kernels
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 20
ymax = 0.5
[]
[./noncrack]
type = BoundingBoxNodeSetGenerator
new_boundary = noncrack
bottom_left = '0.5 0 0'
top_right = '1 0 0'
input = gen
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[./strain_yy]
family = MONOMIAL
order = CONSTANT
[../]
[./elastic_strain_yy]
family = MONOMIAL
order = CONSTANT
[../]
[./plastic_strain_yy]
family = MONOMIAL
order = CONSTANT
[../]
[./uncracked_stress_yy]
family = MONOMIAL
order = CONSTANT
[../]
[]
[Modules]
[./TensorMechanics]
[./Master]
[./All]
add_variables = true
strain = FINITE
planar_formulation = PLANE_STRAIN
additional_generate_output = 'stress_yy vonmises_stress'
strain_base_name = uncracked
[../]
[../]
[../]
[./PhaseField]
[./Nonconserved]
[./c]
free_energy = E_el
kappa = kappa_op
mobility = L
[../]
[../]
[../]
[]
[Kernels]
[./solid_x]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_x
component = 0
c = c
[../]
[./solid_y]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_y
component = 1
c = c
[../]
[./off_disp]
type = AllenCahnElasticEnergyOffDiag
variable = c
displacements = 'disp_x disp_y'
mob_name = L
[../]
[]
[AuxKernels]
[./strain_yy]
type = RankTwoAux
variable = strain_yy
rank_two_tensor = uncracked_mechanical_strain
index_i = 1
index_j = 1
execute_on = TIMESTEP_END
[../]
[./elastic_strain_yy]
type = RankTwoAux
variable = elastic_strain_yy
rank_two_tensor = uncracked_elastic_strain
index_i = 1
index_j = 1
execute_on = TIMESTEP_END
[../]
[./plastic_strain_yy]
type = RankTwoAux
variable = plastic_strain_yy
rank_two_tensor = uncracked_plastic_strain
index_i = 1
index_j = 1
execute_on = TIMESTEP_END
[../]
[./uncracked_stress_yy]
type = RankTwoAux
variable = uncracked_stress_yy
rank_two_tensor = uncracked_stress
index_i = 1
index_j = 1
execute_on = TIMESTEP_END
[../]
[]
[BCs]
[./ydisp]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = 't'
[../]
[./yfix]
type = DirichletBC
variable = disp_y
boundary = noncrack
value = 0
[../]
[./xfix]
type = DirichletBC
variable = disp_x
boundary = right
value = 0
[../]
[]
[Functions]
[./hf]
type = PiecewiseLinear
x = '0 0.001 0.003 0.023'
y = '0.85 1.0 1.25 1.5'
[../]
[]
[Materials]
[./pfbulkmat]
type = GenericConstantMaterial
prop_names = 'gc_prop l visco'
prop_values = '1e-3 0.05 5e-3'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '120.0 80.0'
fill_method = symmetric_isotropic
base_name = uncracked
[../]
[./isotropic_plasticity]
type = IsotropicPlasticityStressUpdate
yield_stress = 0.85
hardening_function = hf
base_name = uncracked
[../]
[./radial_return_stress]
type = ComputeMultipleInelasticStress
tangent_operator = elastic
inelastic_models = 'isotropic_plasticity'
base_name = uncracked
[../]
[./cracked_stress]
type = ComputeCrackedStress
c = c
F_name = E_el
use_current_history_variable = true
uncracked_base_name = uncracked
finite_strain_model = true
[../]
[]
[Postprocessors]
[./av_stress_yy]
type = ElementAverageValue
variable = stress_yy
[../]
[./av_strain_yy]
type = SideAverageValue
variable = disp_y
boundary = top
[../]
[./av_uncracked_stress_yy]
type = ElementAverageValue
variable = uncracked_stress_yy
[../]
[./max_c]
type = ElementExtremeValue
variable = c
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_factor_mat_solving_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-8
l_tol = 1e-4
l_max_its = 100
nl_max_its = 10
dt = 2.0e-5
num_steps = 2
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/closed_gap_thermomechanical_mortar_contact.i)
## Units in the input file: m-Pa-s-K
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 10
xmax = 1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 10
xmin = 1
xmax = 2
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
patch_update_strategy = iteration
[]
[Variables]
[disp_x]
block = 'left_block right_block'
[]
[disp_y]
block = 'left_block right_block'
[]
[temperature]
initial_condition = 300.0
[]
[temperature_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[Modules]
[TensorMechanics/Master]
[steel]
strain = FINITE
add_variables = false
use_automatic_differentiation = true
generate_output = 'strain_xx strain_xy strain_yy stress_xx stress_xy stress_yy'
additional_generate_output = 'vonmises_stress'
additional_material_output_family = 'MONOMIAL'
additional_material_output_order = 'FIRST'
eigenstrain_names = steel_thermal_expansion
block = 'left_block'
[]
[aluminum]
strain = FINITE
add_variables = false
use_automatic_differentiation = true
generate_output = 'strain_xx strain_xy strain_yy stress_xx stress_xy stress_yy'
additional_generate_output = 'vonmises_stress'
additional_material_output_family = 'MONOMIAL'
additional_material_output_order = 'FIRST'
eigenstrain_names = aluminum_thermal_expansion
block = 'right_block'
[]
[]
[]
[Kernels]
[HeatDiff_steel]
type = ADHeatConduction
variable = temperature
thermal_conductivity = steel_thermal_conductivity
block = 'left_block'
[]
[HeatTdot_steel]
type = ADHeatConductionTimeDerivative
variable = temperature
specific_heat = steel_heat_capacity
density_name = steel_density
block = 'left_block'
[]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
block = 'right_block'
[]
[HeatTdot_aluminum]
type = ADHeatConductionTimeDerivative
variable = temperature
specific_heat = aluminum_heat_capacity
density_name = aluminum_density
block = 'right_block'
[]
[]
[BCs]
[fixed_bottom_edge]
type = ADDirichletBC
variable = disp_y
value = 0
boundary = 'moving_block_bottom fixed_block_bottom'
[]
[fixed_outer_edge]
type = ADDirichletBC
variable = disp_x
value = 0
boundary = 'fixed_block_right'
[]
[displacement_left_block]
type = ADFunctionDirichletBC
variable = disp_x
function = '2.0e-7*t'
boundary = 'moving_block_left'
[]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 800
boundary = 'fixed_block_right'
[]
[]
[Contact]
[interface]
primary = moving_block_right
secondary = fixed_block_left
model = frictionless
formulation = mortar
correct_edge_dropping = true
[]
[]
[Constraints]
[thermal_contact]
type = ModularGapConductanceConstraint
variable = temperature_interface_lm
secondary_variable = temperature
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed'
use_displaced_mesh = true
[]
[]
[Materials]
[steel_elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1.93e11 #in Pa, 193 GPa, stainless steel 304
poissons_ratio = 0.29
block = 'left_block'
[]
[steel_stress]
type = ADComputeFiniteStrainElasticStress
block = 'left_block'
[]
[steel_thermal_expansion]
type = ADComputeThermalExpansionEigenstrain
thermal_expansion_coeff = 17.3e-6 # stainless steel 304
stress_free_temperature = 300.0
temperature = temperature
eigenstrain_name = 'steel_thermal_expansion'
block = 'left_block'
[]
[steel_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'steel_density steel_thermal_conductivity steel_heat_capacity steel_hardness'
prop_values = ' 8e3 16.2 0.5 129' ## for stainless steel 304
block = 'left_block'
[]
[aluminum_elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 6.8e10 #in Pa, 68 GPa, aluminum
poissons_ratio = 0.36
block = 'right_block'
[]
[aluminum_stress]
type = ADComputeFiniteStrainElasticStress
block = 'right_block'
[]
[aluminum_thermal_expansion]
type = ADComputeThermalExpansionEigenstrain
thermal_expansion_coeff = 24.0e-6 # aluminum
stress_free_temperature = 300.0
temperature = temperature
eigenstrain_name = 'aluminum_thermal_expansion'
block = 'right_block'
[]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_hardness'
prop_values = ' 2.7e3 210 0.9 15' #for 99% pure Al
block = 'right_block'
[]
[]
[UserObjects]
[closed]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_thermal_conductivity
secondary_conductivity = aluminum_thermal_conductivity
temperature = temperature
contact_pressure = interface_normal_lm
primary_hardness = steel_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[]
[Postprocessors]
[steel_pt_interface_temperature]
type = NodalVariableValue
nodeid = 245
variable = temperature
[]
[aluminum_pt_interface_temperature]
type = NodalVariableValue
nodeid = 657
variable = temperature
[]
[steel_element_interface_stress]
type = ElementalVariableValue
variable = vonmises_stress
elementid = 199
[]
[aluminum_element_interface_stress]
type = ElementalVariableValue
variable = vonmises_stress
elementid = 560
[]
[interface_heat_flux_steel]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = moving_block_right
diffusivity = steel_thermal_conductivity
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
# mortar contact solver options
petsc_options = '-snes_converged_reason -pc_svd_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = ' lu superlu_dist'
snesmf_reuse_base = false
nl_rel_tol = 1e-8
nl_max_its = 20
l_max_its = 50
dt = 2
end_time = 10
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/stochastic_tools/test/tests/surrogates/cross_validation/sub_vector.i)
L = 1
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 100
xmax = ${L}
elem_type = EDGE3
[]
[]
[Variables]
[T]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = T
diffusivity = k
[]
[source]
type = BodyForce
variable = T
value = 10000
[]
[]
[Materials]
[conductivity]
type = GenericConstantMaterial
prop_names = k
prop_values = 2.0
[]
[]
[BCs]
[right]
type = DirichletBC
variable = T
boundary = right
value = 300
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[VectorPostprocessors]
[T_vec]
type = LineValueSampler
variable = T
start_point = '0 0 0'
end_point = '${L} 0 0'
num_points = 10
sort_by = x
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_by_parts_steady_stabilized_second_order.i)
[GlobalParams]
order = SECOND
integrate_p_by_parts = true
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[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]
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_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 = 'inlet_func'
[../]
[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
[]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[ins_mat]
type = INSADTauMaterial
velocity = velocity
pressure = p
[]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[../]
[]
(modules/solid_mechanics/test/tests/jacobian/inertial_torque.i)
# Check of the InertialTorque Jacobian
[Mesh]
type = GeneratedMesh
dim = 3
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
gamma = 0.4
beta = 0.4
alpha = 0.1
eta = 0.1
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[AuxVariables]
[./vel_x]
[../]
[./vel_y]
[../]
[./vel_z]
[../]
[./accel_x]
[../]
[./accel_y]
[../]
[./accel_z]
[../]
[]
[ICs]
[./disp_x]
type = RandomIC
variable = disp_x
[../]
[./disp_y]
type = RandomIC
variable = disp_y
[../]
[./disp_z]
type = RandomIC
variable = disp_z
[../]
[./vel_x]
type = RandomIC
variable = vel_x
[../]
[./vel_y]
type = RandomIC
variable = vel_y
[../]
[./vel_z]
type = RandomIC
variable = vel_z
[../]
[./accel_x]
type = RandomIC
variable = accel_x
[../]
[./accel_y]
type = RandomIC
variable = accel_y
[../]
[./accel_z]
type = RandomIC
variable = accel_z
[../]
[]
[Kernels]
[./icm_x]
type = InertialTorque
component = 0
variable = disp_x
[../]
[./icm_y]
type = InertialTorque
component = 1
variable = disp_y
[../]
[./icm_z]
type = InertialTorque
component = 2
variable = disp_z
[../]
[]
[AuxKernels]
[./vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
execute_on = timestep_end
[../]
[./vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
execute_on = timestep_end
[../]
[./vel_z]
type = NewmarkVelAux
variable = vel_z
acceleration = accel_z
execute_on = timestep_end
[../]
[./accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
execute_on = timestep_end
[../]
[./accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
execute_on = timestep_end
[../]
[./accel_z]
type = NewmarkAccelAux
variable = accel_z
displacement = disp_z
velocity = vel_z
execute_on = timestep_end
[../]
[]
[Materials]
[./density]
type = GenericConstantMaterial
prop_names = density
prop_values = 3.0
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-snes_type'
petsc_options_value = 'test'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
[]
(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
[../]
[]
(modules/stochastic_tools/test/tests/reporters/BFActiveLearning/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 0.13061533868990033
elem_type = EDGE3
[]
[Variables]
[T]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = T
diffusivity = k
[]
[source]
type = BodyForce
variable = T
value = 10951.864006672608
[]
[]
[Materials]
[conductivity]
type = GenericConstantMaterial
prop_names = k
prop_values = 10.320058433901163
[]
[]
[BCs]
[right]
type = DirichletBC
variable = T
boundary = right
value = 279.8173854189593
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[avg]
type = AverageNodalVariableValue
variable = T
[]
[max]
type = NodalExtremeValue
variable = T
value_type = max
[]
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Outputs]
[]
(modules/phase_field/examples/anisotropic_interfaces/snow.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 14
ny = 14
xmax = 9
ymax = 9
uniform_refine = 3
[]
[Variables]
[./w]
[../]
[./T]
[../]
[]
[ICs]
[./wIC]
type = SmoothCircleIC
variable = w
int_width = 0.1
x1 = 4.5
y1 = 4.5
radius = 0.07
outvalue = 0
invalue = 1
[../]
[]
[Kernels]
[./w_dot]
type = TimeDerivative
variable = w
[../]
[./anisoACinterface1]
type = ACInterfaceKobayashi1
variable = w
mob_name = M
[../]
[./anisoACinterface2]
type = ACInterfaceKobayashi2
variable = w
mob_name = M
[../]
[./AllenCahn]
type = AllenCahn
variable = w
mob_name = M
f_name = fbulk
coupled_variables = T
[../]
[./T_dot]
type = TimeDerivative
variable = T
[../]
[./CoefDiffusion]
type = Diffusion
variable = T
[../]
[./w_dot_T]
type = CoefCoupledTimeDerivative
variable = T
v = w
coef = -1.8
[../]
[]
[Materials]
[./free_energy]
type = DerivativeParsedMaterial
property_name = fbulk
coupled_variables = 'w T'
constant_names = pi
constant_expressions = 4*atan(1)
expression = 'm:=0.9 * atan(10 * (1 - T)) / pi; 1/4*w^4 - (1/2 - m/3) * w^3 + (1/4 - m/2) * w^2'
derivative_order = 2
outputs = exodus
[../]
[./material]
type = InterfaceOrientationMaterial
op = w
[../]
[./consts]
type = GenericConstantMaterial
prop_names = 'M'
prop_values = '3333.333'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
nl_abs_tol = 1e-10
nl_rel_tol = 1e-08
l_max_its = 30
end_time = 1
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 6
iteration_window = 2
dt = 0.0005
growth_factor = 1.1
cutback_factor = 0.75
[../]
[./Adaptivity]
initial_adaptivity = 3 # Number of times mesh is adapted to initial condition
refine_fraction = 0.7 # Fraction of high error that will be refined
coarsen_fraction = 0.1 # Fraction of low error that will coarsened
max_h_level = 5 # Max number of refinements used, starting from initial mesh (before uniform refinement)
weight_names = 'w T'
weight_values = '1 0.5'
[../]
[]
[Outputs]
time_step_interval = 5
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_by_parts_steady_stabilized.i)
[GlobalParams]
order = FIRST
integrate_p_by_parts = true
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[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]
[../]
[]
# 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_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 = 'inlet_func'
[../]
[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
[]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[ins_mat]
type = INSADTauMaterial
velocity = velocity
pressure = p
[]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[../]
[]
(modules/navier_stokes/test/tests/finite_element/ins/pressure_channel/open_bc_pressure_BC_action.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 3.0
ymin = 0
ymax = 1.0
nx = 30
ny = 10
elem_type = QUAD9
[]
[Modules]
[IncompressibleNavierStokes]
equation_type = steady-state
velocity_boundary = 'bottom top left'
velocity_function = '0 0 0 0 NA 0'
pressure_boundary = 'left right'
pressure_function = '1 0'
density_name = rho
dynamic_viscosity_name = mu
integrate_p_by_parts = false
order = SECOND
[]
[]
[Materials]
[const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '1 1'
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
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]
file_base = open_bc_out_pressure_BC
exodus = true
[]
(test/tests/mesh/named_entities/named_entities_test.i)
[Mesh]
file = named_entities.e
uniform_refine = 1
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
block = '1 center_block 3'
[./InitialCondition]
type = ConstantIC
value = 20
block = 'center_block 3'
[../]
[../]
[]
[AuxVariables]
[./reporter]
order = CONSTANT
family = MONOMIAL
block = 'left_block 3'
[../]
[]
[ICs]
[./reporter_ic]
type = ConstantIC
variable = reporter
value = 10
[../]
[]
[Kernels]
active = 'diff body_force'
[./diff]
type = Diffusion
variable = u
# Note we are using both names and numbers here
block = 'left_block 2 right_block'
[../]
[./body_force]
type = BodyForce
variable = u
block = 'center_block'
value = 10
[../]
[]
[AuxKernels]
[./hardness]
type = MaterialRealAux
variable = reporter
property = 'hardness'
block = 'left_block 3'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 'left_side'
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = 'right_side'
value = 1
[../]
[]
[Postprocessors]
[./elem_average]
type = ElementAverageValue
variable = u
block = 'center_block'
execute_on = 'initial timestep_end'
[../]
[./side_average]
type = SideAverageValue
variable = u
boundary = 'right_side'
execute_on = 'initial timestep_end'
[../]
[]
[Materials]
[./constant]
type = GenericConstantMaterial
prop_names = 'hardness'
prop_values = 10
block = '1 right_block'
[../]
[./empty]
type = MTMaterial
block = 'center_block'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/auxkernels/convective_heat_flux_1phase/test.i)
# The test computes convective heat flux for single phase flow according to:
#
# q = Hw * (T_wall - T_fluid)
#
# where Hw = 2, T_wall = 310 and T_fluid = 300. Thus, q = 20.
#
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
allow_renumbering = false
[]
[AuxVariables]
[q_wall]
family = MONOMIAL
order = CONSTANT
[]
[T_wall]
[]
[]
[ICs]
[T_wall_ic]
type = ConstantIC
variable = T_wall
value = 310
[]
[]
[AuxKernels]
[sound_speed_aux]
type = ConvectiveHeatFlux1PhaseAux
variable = q_wall
Hw = Hw
T_wall = T_wall
T = T
[]
[]
[Materials]
[mats]
type = GenericConstantMaterial
prop_names = 'T Hw'
prop_values = '300 2'
[]
[]
[Postprocessors]
[q_wall]
type = ElementalVariableValue
variable = q_wall
elementid = 0
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[bcs]
type = DirichletBC
variable = u
boundary = 'left right'
value = 1
[]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 1
abort_on_solve_fail = true
[]
[Outputs]
csv = true
execute_on = TIMESTEP_END
[]
(test/tests/materials/get_material_property_names/get_material_property_any_block_id.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[./add_subdomain]
input = gen
type = SubdomainBoundingBoxGenerator
top_right = '1 1 0'
bottom_left = '0 0.5 0'
block_id = 100
block_name = 'top'
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Materials]
[./block]
type = GenericConstantMaterial
prop_names = block_prop
block = ANY_BLOCK_ID
prop_values = 12345
[../]
[]
[UserObjects]
[./get_material_block_names_test]
type = GetMaterialPropertyBoundaryBlockNamesTest
expected_names = 'top 0'
property_name = 'block_prop'
test_type = 'block'
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
(modules/thermal_hydraulics/test/tests/components/hs_boundary_heat_flux/from_file_3d.i)
T_hs = 300
heat_flux = 1000
t = 0.001
# dimensions of the side 'left'
height = 5
depth = 2
# SS 316
density = 8.0272e3
specific_heat_capacity = 502.1
conductivity = 16.26
A = ${fparse height * depth}
scale = 0.8
E_change = ${fparse scale * heat_flux * A * t}
[Functions]
[q_fn]
type = ConstantFunction
value = ${heat_flux}
[]
[]
[Materials]
[mat]
type = ADGenericConstantMaterial
block = 'hs:brick'
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '${density} ${specific_heat_capacity} ${conductivity}'
[]
[]
[Components]
[hs]
type = HeatStructureFromFile3D
file = box.e
position = '0 0 0'
initial_T = ${T_hs}
[]
[heat_flux_boundary]
type = HSBoundaryHeatFlux
boundary = 'hs:left'
hs = hs
q = q_fn
scale = ${scale}
[]
[]
[Postprocessors]
[E_hs]
type = ADHeatStructureEnergy3D
block = 'hs:brick'
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_hs_change]
type = ChangeOverTimePostprocessor
postprocessor = E_hs
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_change_relerr]
type = RelativeDifferencePostprocessor
value1 = E_hs_change
value2 = ${E_change}
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
[TimeIntegrator]
type = ActuallyExplicitEuler
solve_type = lumped
[]
dt = ${t}
num_steps = 1
abort_on_solve_fail = true
[]
[Outputs]
[out]
type = CSV
show = 'E_change_relerr'
execute_on = 'FINAL'
[]
[]
(modules/fsi/test/tests/2d-small-strain-transient/fsi_flat_channel.i)
[GlobalParams]
gravity = '0 0 0'
integrate_p_by_parts = true
laplace = true
convective_term = true
transient_term = true
pspg = true
supg = true
displacements = 'disp_x disp_y'
preset = false
order = FIRST
use_displaced_mesh = true
[]
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 3.0
ymin = 0
ymax = 1.0
nx = 10
ny = 15
elem_type = QUAD4
[]
[subdomain1]
type = SubdomainBoundingBoxGenerator
bottom_left = '0.0 0.5 0'
block_id = 1
top_right = '3.0 1.0 0'
input = gmg
[]
[interface]
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'master0_interface'
input = subdomain1
[]
[break_boundary]
type = BreakBoundaryOnSubdomainGenerator
input = interface
[]
[]
[Variables]
[./vel_x]
block = 0
[../]
[./vel_y]
block = 0
[../]
[./p]
block = 0
[../]
[./disp_x]
[../]
[./disp_y]
[../]
[./vel_x_solid]
block = 1
[../]
[./vel_y_solid]
block = 1
[../]
[]
[Kernels]
[./vel_x_time]
type = INSMomentumTimeDerivative
variable = vel_x
block = 0
[../]
[./vel_y_time]
type = INSMomentumTimeDerivative
variable = vel_y
block = 0
[../]
[./mass]
type = INSMass
variable = p
u = vel_x
v = vel_y
pressure = p
block = 0
disp_x = disp_x
disp_y = disp_y
[../]
[./x_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
block = 0
disp_x = disp_x
disp_y = disp_y
[../]
[./y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
block = 0
disp_x = disp_x
disp_y = disp_y
[../]
[./vel_x_mesh]
type = ConvectedMesh
disp_x = disp_x
disp_y = disp_y
variable = vel_x
u = vel_x
v = vel_y
pressure = p
block = 0
[../]
[./vel_y_mesh]
type = ConvectedMesh
disp_x = disp_x
disp_y = disp_y
variable = vel_y
u = vel_x
v = vel_y
pressure = p
block = 0
[../]
[./p_mesh]
type = ConvectedMeshPSPG
disp_x = disp_x
disp_y = disp_y
variable = p
u = vel_x
v = vel_y
pressure = p
block = 0
[../]
[./disp_x_fluid]
type = Diffusion
variable = disp_x
block = 0
use_displaced_mesh = false
[../]
[./disp_y_fluid]
type = Diffusion
variable = disp_y
block = 0
use_displaced_mesh = false
[../]
[./accel_tensor_x]
type = CoupledTimeDerivative
variable = disp_x
v = vel_x_solid
block = 1
use_displaced_mesh = false
[../]
[./accel_tensor_y]
type = CoupledTimeDerivative
variable = disp_y
v = vel_y_solid
block = 1
use_displaced_mesh = false
[../]
[./vxs_time_derivative_term]
type = CoupledTimeDerivative
variable = vel_x_solid
v = disp_x
block = 1
use_displaced_mesh = false
[../]
[./vys_time_derivative_term]
type = CoupledTimeDerivative
variable = vel_y_solid
v = disp_y
block = 1
use_displaced_mesh = false
[../]
[./source_vxs]
type = MatReaction
variable = vel_x_solid
block = 1
mob_name = 1
use_displaced_mesh = false
[../]
[./source_vys]
type = MatReaction
variable = vel_y_solid
block = 1
mob_name = 1
use_displaced_mesh = false
[../]
[]
[InterfaceKernels]
[./penalty_interface_x]
type = CoupledPenaltyInterfaceDiffusion
variable = vel_x
neighbor_var = disp_x
secondary_coupled_var = vel_x_solid
boundary = master0_interface
penalty = 1e6
[../]
[./penalty_interface_y]
type = CoupledPenaltyInterfaceDiffusion
variable = vel_y
neighbor_var = disp_y
secondary_coupled_var = vel_y_solid
boundary = master0_interface
penalty = 1e6
[../]
[]
[Modules/TensorMechanics/Master]
[./solid_domain]
strain = SMALL
incremental = false
# generate_output = 'strain_xx strain_yy strain_zz' ## Not at all necessary, but nice
block = '1'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e2
poissons_ratio = 0.3
block = '1'
use_displaced_mesh = false
[../]
[./small_stress]
type = ComputeLinearElasticStress
block = 1
[../]
[./const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '1 1'
use_displaced_mesh = false
[../]
[]
[BCs]
[./fluid_x_no_slip]
type = DirichletBC
variable = vel_x
boundary = 'bottom'
value = 0.0
[../]
[./fluid_y_no_slip]
type = DirichletBC
variable = vel_y
boundary = 'bottom left_to_0'
value = 0.0
[../]
[./x_inlet]
type = FunctionDirichletBC
variable = vel_x
boundary = 'left_to_0'
function = 'inlet_func'
[../]
[./no_disp_x]
type = DirichletBC
variable = disp_x
boundary = 'bottom top left_to_1 right_to_1 left_to_0 right_to_0'
value = 0
[../]
[./no_disp_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom top left_to_1 right_to_1 left_to_0 right_to_0'
value = 0
[../]
[./solid_x_no_slip]
type = DirichletBC
variable = vel_x_solid
boundary = 'top left_to_1 right_to_1'
value = 0.0
[../]
[./solid_y_no_slip]
type = DirichletBC
variable = vel_y_solid
boundary = 'top left_to_1 right_to_1'
value = 0.0
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
num_steps = 5
# num_steps = 60
dt = 0.1
dtmin = 0.1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = none
nl_rel_tol = 1e-50
nl_abs_tol = 1e-10
[]
[Outputs]
[./out]
type = Exodus
[../]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '(-16 * (y - 0.25)^2 + 1) * (1 + cos(t))'
[../]
[]
(modules/phase_field/test/tests/rigidbodymotion/polycrystal_action.i)
# test file for showing reaction forces between particles
[GlobalParams]
var_name_base = eta
op_num = 2
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 5
nz = 0
xmax = 50
ymax = 25
zmax = 0
elem_type = QUAD4
uniform_refine = 1
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[./PolycrystalVariables]
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
coupled_variables = 'eta0 eta1'
w = w
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./motion]
type = MultiGrainRigidBodyMotion
variable = w
c = c
v = 'eta0 eta1'
grain_force = grain_force
grain_tracker_object = grain_center
grain_volumes = grain_volumes
[../]
[./RigidBodyMultiKernel]
# Creates all of the necessary Allen Cahn kernels automatically
c = c
f_name = F
mob_name = M
kappa_name = kappa_eta
grain_force = grain_force
grain_tracker_object = grain_center
grain_volumes = grain_volumes
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c kappa_eta'
prop_values = '1.0 0.5 0.5'
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'c eta0 eta1'
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 1.0e-2'
expression = 16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2+eta0*(1-eta0)*c+eta1*(1-eta1)*c
derivative_order = 2
[../]
[./force_density]
type = ForceDensityMaterial
c = c
etas ='eta0 eta1'
[../]
[]
[AuxVariables]
[./bnds]
[../]
[./MultiAuxVariables]
order = CONSTANT
family = MONOMIAL
variable_base = 'df'
data_type = 'RealGradient'
grain_num = 2
[../]
[./vadvx]
order = CONSTANT
family = MONOMIAL
[../]
[./vadvy]
order = CONSTANT
family = MONOMIAL
[../]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./var_indices]
order = CONSTANT
family = MONOMIAL
[../]
[./centroids]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./bnds]
type = BndsCalcAux
variable = bnds
var_name_base = eta
op_num = 2
v = 'eta0 eta1'
[../]
[./MaterialVectorGradAuxKernel]
variable_base = 'df'
grain_num = 2
property = 'force_density'
[../]
[./vadv_x]
type = GrainAdvectionAux
component = x
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
variable = vadvx
[../]
[./vadv_y]
type = GrainAdvectionAux
component = y
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
variable = vadvy
[../]
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
flood_counter = grain_center
field_display = UNIQUE_REGION
execute_on = timestep_begin
[../]
[./var_indices]
type = FeatureFloodCountAux
variable = var_indices
flood_counter = grain_center
field_display = VARIABLE_COLORING
execute_on = timestep_begin
[../]
[./centroids]
type = FeatureFloodCountAux
variable = centroids
execute_on = timestep_begin
field_display = CENTROID
flood_counter = grain_center
[../]
[]
[ICs]
[./ic_eta0]
int_width = 1.0
x1 = 20.0
y1 = 0.0
radius = 14.0
outvalue = 0.0
variable = eta0
invalue = 1.0
type = SmoothCircleIC
[../]
[./IC_eta1]
int_width = 1.0
x1 = 30.0
y1 = 25.0
radius = 14.0
outvalue = 0.0
variable = eta1
invalue = 1.0
type = SmoothCircleIC
[../]
[./ic_c]
type = SpecifiedSmoothCircleIC
invalue = 1.0
outvalue = 0.1
int_width = 1.0
x_positions = '20.0 30.0 '
z_positions = '0.0 0.0 '
y_positions = '0.0 25.0 '
radii = '14.0 14.0'
3D_spheres = false
variable = c
block = 0
[../]
[]
[VectorPostprocessors]
[./forces]
type = GrainForcesPostprocessor
grain_force = grain_force
[../]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_center
execute_on = 'initial timestep_begin'
[../]
[]
[UserObjects]
[./grain_center]
type = GrainTracker
outputs = none
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
[../]
[./grain_force]
type = ComputeGrainForceAndTorque
execute_on = 'initial linear nonlinear'
grain_data = grain_center
force_density = force_density
c = c
etas = 'eta0 eta1'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
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
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 1
dt = 0.1
[]
[Outputs]
exodus = true
csv = true
[]
(test/tests/controls/syntax_based_naming_access/object_param.i)
[Mesh]
type = GeneratedMesh
dim = 2
elem_type = QUAD4
# use odd numbers so points do not fall on element boundaries
nx = 31
ny = 31
[]
[Variables]
[./diffused]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = diffused
[../]
[]
[DiracKernels]
[./test_object]
type = MaterialPointSource
point = '0.5 0.5 0'
variable = diffused
[../]
[]
[BCs]
[./bottom_diffused]
type = DirichletBC
variable = diffused
boundary = 'bottom'
value = 2
[../]
[./top_diffused]
type = DirichletBC
variable = diffused
boundary = 'top'
value = 0
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'matp'
prop_values = '1'
block = 0
[../]
[]
[Postprocessors]
[./test_object]
type = TestControlPointPP
function = '2*(x+y)'
point = '0.5 0.5 0'
[../]
[./other_point_test_object]
type = TestControlPointPP
function = '3*(x+y)'
point = '0.5 0.5 0'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
[Controls]
[./point_control]
type = TestControl
test_type = 'point'
parameter = '*/test_object/point'
execute_on = 'initial'
[../]
[]
(modules/chemical_reactions/test/tests/jacobian/primary_convection.i)
# Test the Jacobian terms for the PrimaryConvection Kernel
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
[]
[Variables]
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[./a]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./pressure]
type = RandomIC
variable = pressure
min = 1
max = 5
[../]
[./a]
type = RandomIC
variable = a
max = 1
min = 0
[../]
[]
[Kernels]
[./diff]
type = DarcyFluxPressure
variable = pressure
[../]
[./conv]
type = PrimaryConvection
variable = a
p = pressure
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity'
prop_values = '1e-4 1e-4 0.2'
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
perf_graph = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
(modules/solid_mechanics/test/tests/gravity/block-gravity-kinetic-energy.i)
starting_point = 2e-1
offset = 1.0
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[]
[AuxVariables]
[pid]
order = CONSTANT
family = MONOMIAL
[]
[kinetic_energy]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[pid]
type = ProcessorIDAux
variable = pid
execute_on = 'initial timestep_end'
[]
[kinetic_energy]
type = KineticEnergyAux
block = '1 2'
variable = kinetic_energy
newmark_velocity_x = vel_x
newmark_velocity_y = vel_y
newmark_velocity_z = 0.0
density = density
[]
[]
[ICs]
[disp_y]
type = ConstantIC
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
[]
[]
[Physics/SolidMechanics/Dynamic]
[all]
add_variables = true
hht_alpha = 0.0
beta = 0.25
gamma = 0.5
mass_damping_coefficient = 0.0
stiffness_damping_coefficient = 0.0
displacements = 'disp_x disp_y'
generate_output = 'stress_xx stress_yy'
block = '1 2'
strain = FINITE
[]
[]
[Kernels]
[gravity]
type = Gravity
value = -9.81
variable = disp_y
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e4
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e7
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '7750'
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[]
[Executioner]
type = Transient
end_time = 0.5
dt = 0.01
dtmin = .05
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err '
'-ksp_gmres_restart'
petsc_options_value = 'lu NONZERO 1e-15 1e-5 100'
l_max_its = 100
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = false
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = false
csv = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'total_kinetic_energy'
[total_kinetic_energy]
type = ElementIntegralVariablePostprocessor
variable = kinetic_energy
block = '1 2'
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_mean_zero_pressure.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
elem_type = QUAD9
[]
[]
[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]
[../]
[./lambda]
family = SCALAR
order = FIRST
[../]
[]
[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'
[../]
[./mean_zero_pressure]
type = ScalarLagrangeMultiplier
variable = p
lambda = lambda
[../]
[]
[ScalarKernels]
[./mean_zero_pressure_lm]
type = AverageValueConstraint
variable = lambda
pp_name = pressure_integral
value = 0
[../]
[]
[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
[../]
[]
[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
[]
[]
[Postprocessors]
[./pressure_integral]
type = ElementIntegralVariablePostprocessor
variable = p
execute_on = linear
[../]
[]
[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 -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
perf_graph = true
[]
(modules/heat_transfer/test/tests/homogenization/homogenize_tc_hex.i)
[Mesh]
[fmg]
type = FileMeshGenerator
file = homogenize_tc_hex.e
[]
[]
[Variables]
[chi_x]
[]
[chi_y]
[]
[chi_z]
[]
[]
[Kernels]
[conduction_x]
type = HeatConduction
variable = chi_x
[]
[conduction_y]
type = HeatConduction
variable = chi_y
[]
[conduction_z]
type = HeatConduction
variable = chi_z
[]
[rhs_hom_x]
type = HomogenizedHeatConduction
variable = chi_x
component = 0
[]
[rhs_hom_y]
type = HomogenizedHeatConduction
variable = chi_y
component = 1
[]
[rhs_hom_z]
type = HomogenizedHeatConduction
variable = chi_z
component = 2
[]
[]
[Materials]
[thermal_conductivity1]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity'
prop_values = '20'
block = 'mat1'
[]
[thermal_conductivity2]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity'
prop_values = '10'
block = 'mat2'
[]
[thermal_conductivity3]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity'
prop_values = '4'
block = 'mat3 mat4 mat5'
[]
[thermal_conductivity4]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity'
prop_values = '100'
block = 'mat6 mat7'
[]
[thermal_conductivity5]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity'
prop_values = '0.001'
block = 'mat8'
[]
[thermal_conductivity6]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity'
prop_values = '12'
block = 'mat9'
[]
[]
[BCs]
[fix_chi_x]
type = DirichletBC
variable = chi_x
value = 0
boundary = fix_chi
[]
[fix_chi_y]
type = DirichletBC
variable = chi_y
value = 0
boundary = fix_chi
[]
[fix_chi_z]
type = DirichletBC
variable = chi_z
value = 0
boundary = fix_chi
[]
[Periodic]
[pair_1]
primary = pb_1a
secondary = pb_1b
translation = '0 7 0'
[]
F2F = 7
dx = ${fparse 3 * F2F / 2 / sqrt(3)}
[pair_2]
primary = pb_2a
secondary = pb_2b
translation = '${fparse -dx} ${fparse F2F / 2} 0'
[]
[pair_3]
primary = pb_3a
secondary = pb_3b
translation = '${fparse dx} ${fparse F2F / 2} 0'
[]
[pair_4]
primary = pb_4a
secondary = pb_4b
translation = '0 0 -2'
[]
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type -pc_hypre_boomeramg_strong_threshold -ksp_gmres_restart -pc_hypre_boomeramg_max_iter -pc_hypre_boomeramg_tol'
petsc_options_value = 'hypre boomeramg 0.7 100 30 1e-5'
[]
[Postprocessors]
[k_xx]
type = HomogenizedThermalConductivity
chi = 'chi_x chi_y chi_z'
row = 0
col = 0
execute_on = 'initial timestep_end'
[]
[k_xy]
type = HomogenizedThermalConductivity
chi = 'chi_x chi_y chi_z'
row = 0
col = 1
execute_on = 'initial timestep_end'
[]
[k_xz]
type = HomogenizedThermalConductivity
chi = 'chi_x chi_y chi_z'
row = 0
col = 2
execute_on = 'initial timestep_end'
[]
[k_yx]
type = HomogenizedThermalConductivity
chi = 'chi_x chi_y chi_z'
row = 1
col = 0
execute_on = 'initial timestep_end'
[]
[k_yy]
type = HomogenizedThermalConductivity
chi = 'chi_x chi_y chi_z'
row = 1
col = 1
execute_on = 'initial timestep_end'
[]
[k_yz]
type = HomogenizedThermalConductivity
chi = 'chi_x chi_y chi_z'
row = 1
col = 2
execute_on = 'initial timestep_end'
[]
[k_zx]
type = HomogenizedThermalConductivity
chi = 'chi_x chi_y chi_z'
row = 2
col = 0
execute_on = 'initial timestep_end'
[]
[k_zy]
type = HomogenizedThermalConductivity
chi = 'chi_x chi_y chi_z'
row = 2
col = 1
execute_on = 'initial timestep_end'
[]
[k_zz]
type = HomogenizedThermalConductivity
chi = 'chi_x chi_y chi_z'
row = 2
col = 2
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
[outp_csv]
type = CSV
# these are too small and will cause issues
hide = 'k_xz k_yz k_zx k_zy'
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/RZ_cone_stab_jac_test.i)
[GlobalParams]
gravity = '0 0 0'
laplace = true
transient_term = true
supg = true
pspg = true
family = LAGRANGE
order = SECOND
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
xmin = 0
xmax = 1.1
ymin = -1.1
ymax = 1.1
elem_type = QUAD9
[]
[Problem]
coord_type = RZ
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = NEWTON
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1.1
# petsc_options = '-snes_test_display'
petsc_options_iname = '-snes_type'
petsc_options_value = 'test'
[]
[Variables]
[./vel_x]
# Velocity in radial (r) direction
[../]
[./vel_y]
# Velocity in axial (z) direction
[../]
[./p]
order = FIRST
[../]
[]
[Kernels]
[./x_momentum_time]
type = INSMomentumTimeDerivative
variable = vel_x
[../]
[./y_momentum_time]
type = INSMomentumTimeDerivative
variable = vel_y
[../]
[./mass]
type = INSMassRZ
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
[./x_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./y_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1.1 1.1'
[../]
[]
[ICs]
[./vel_x]
type = RandomIC
variable = vel_x
min = 0.1
max = 0.9
[../]
[./vel_y]
type = RandomIC
variable = vel_y
min = 0.1
max = 0.9
[../]
[./p]
type = RandomIC
variable = p
min = 0.1
max = 0.9
[../]
[]
[Outputs]
dofmap = true
[]
(modules/phase_field/test/tests/MultiPhase/crosstermfreeenergy.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
nz = 0
xmin = -8
xmax = 8
ymin = -8
ymax = 8
elem_type = QUAD4
[]
[AuxVariables]
[./local_energy]
order = CONSTANT
family = MONOMIAL
[../]
[./cross_energy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./local_free_energy]
type = TotalFreeEnergy
f_name = F0
variable = local_energy
additional_free_energy = cross_energy
[../]
[./cross_terms]
type = CrossTermGradientFreeEnergy
variable = cross_energy
interfacial_vars = 'eta1 eta2 eta3'
kappa_names = 'kappa11 kappa12 kappa13
kappa21 kappa22 kappa23
kappa31 kappa32 kappa33'
[../]
[]
[Variables]
[./eta1]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 0.0
y1 = 5.0
radius = 5.0
invalue = 1.0
outvalue = 0.0
int_width = 10.0
[../]
[../]
[./eta2]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = -4.0
y1 = -2.0
radius = 5.0
invalue = 1.0
outvalue = 0.0
int_width = 10.0
[../]
[../]
[./eta3]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 4.0
y1 = -2.0
radius = 5.0
invalue = 1.0
outvalue = 0.0
int_width = 10.0
[../]
[../]
[]
[Kernels]
[./dummy_diff1]
type = Diffusion
variable = eta1
[../]
[./dummy_time1]
type = TimeDerivative
variable = eta1
[../]
[./dummy_diff2]
type = Diffusion
variable = eta2
[../]
[./dummy_time2]
type = TimeDerivative
variable = eta2
[../]
[./dummy_diff3]
type = Diffusion
variable = eta3
[../]
[./dummy_tim3]
type = TimeDerivative
variable = eta3
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'F0 kappa11 kappa12 kappa13 kappa21 kappa22 kappa23 kappa31 kappa32 kappa33'
prop_values = '0 11 12 13 12 22 23 13 23 33 '
[../]
[]
[Executioner]
type = Transient
dt = 0.001
num_steps = 1
[]
[Outputs]
execute_on = 'timestep_end'
[./out]
type = Exodus
hide = 'eta1 eta2 eta3 local_energy'
[../]
[]
(modules/navier_stokes/test/tests/finite_element/ins/jacobian_test/jacobian_test.i)
# This input file tests the jacobians of many of the INS kernels
[GlobalParams]
gravity = '0 0 0'
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 3.0
ymin = 0
ymax = 1.5
nx = 1
ny = 1
elem_type = QUAD9
[]
[Variables]
[./vel_x]
order = SECOND
family = LAGRANGE
[../]
[./vel_y]
order = SECOND
family = LAGRANGE
[../]
[./p]
order = FIRST
family = LAGRANGE
[../]
[./temp]
order = SECOND
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
integrate_p_by_parts = false
[../]
[./y_momentum_space]
type = INSMomentumLaplaceForm
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
integrate_p_by_parts = false
[../]
[./x_mom_time]
type = INSMomentumTimeDerivative
variable = vel_x
[../]
[./y_mom_time]
type = INSMomentumTimeDerivative
variable = vel_y
[../]
[./temp]
type = INSTemperature
variable = temp
u = vel_x
v = vel_y
[../]
[./temp_time_deriv]
type = INSTemperatureTimeDerivative
variable = temp
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu k cp'
prop_values = '0.5 1.5 0.7 1.3'
[../]
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = NEWTON
type = Transient
num_steps = 1
[]
[ICs]
[./p]
type = RandomIC
variable = p
min = 0.5
max = 1.5
[../]
[./vel_x]
type = RandomIC
variable = vel_x
min = 0.5
max = 1.5
[../]
[./vel_y]
type = RandomIC
variable = vel_y
min = 0.5
max = 1.5
[../]
[./temp]
type = RandomIC
variable = temp
min = 0.5
max = 1.5
[../]
[]
(modules/electromagnetics/test/tests/auxkernels/current_density/error_test.i)
# This input file is used to test error conditions for the CurrentDensity
# auxkernel. As written, this will fail (missing a coupled variable in that
# auxkernel)
[Mesh]
[box]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
elem_type = TRI6
[]
[]
[Variables]
[potential]
family = LAGRANGE
order = FIRST
[]
[electric_field]
family = NEDELEC_ONE
order = FIRST
[]
[]
[AuxVariables]
[J]
family = NEDELEC_ONE
order = FIRST
[]
[]
[Kernels]
[poisson]
type = Diffusion
variable = potential
[]
[EM_curl_curl]
type = CurlCurlField
variable = electric_field
[]
[]
[BCs]
# natural BCs for both (all variables = 0)
[]
[AuxKernels]
[current_density]
type = ADCurrentDensity
variable = J
[]
[]
[Materials]
[conductivity]
type = ADGenericConstantMaterial
prop_names = 'electrical_conductivity'
prop_values = 3.33e2 # electrical conductivity for graphite at 293.15 K
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
exodus = true
print_linear_converged_reason = false
print_nonlinear_converged_reason = false
[]
(modules/navier_stokes/test/tests/finite_element/ins/cg-dg-hybrid/channel-flow/channel-hybrid.i)
mu = 1.1
rho = 1.1
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 10
ymin = -1
ymax = 1
nx = 100
ny = 20
[]
[]
[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'
[]
[]
[Functions]
[v_inlet]
type = ParsedVectorFunction
expression_x = '1'
[]
[]
[BCs]
[u_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'bottom top'
variable = u
sigma = 6
epsilon = -1
function = '0'
diff = 'mu'
[]
[v_walls]
type = DGFunctionDiffusionDirichletBC
boundary = 'bottom top'
variable = v
sigma = 6
epsilon = -1
function = '0'
diff = 'mu'
[]
[u_in]
type = ADConservativeAdvectionBC
boundary = 'left'
variable = u
velocity_function = v_inlet
primal_dirichlet_value = 1
primal_coefficient = 'rho'
[]
[v_in]
type = ADConservativeAdvectionBC
boundary = 'left'
variable = v
velocity_function = v_inlet
primal_dirichlet_value = 0
primal_coefficient = 'rho'
[]
[p_in]
type = ADConservativeAdvectionBC
boundary = 'left'
variable = pressure
velocity_function = v_inlet
advected_quantity = -1
[]
[u_out]
type = ADConservativeAdvectionBC
boundary = 'right'
variable = u
velocity_mat_prop = 'velocity'
advected_quantity = 'rhou'
[]
[v_out]
type = ADConservativeAdvectionBC
boundary = 'right'
variable = v
velocity_mat_prop = 'velocity'
advected_quantity = 'rhov'
[]
[p_out]
type = DirichletBC
variable = pressure
boundary = 'right'
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'
[]
[]
[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
[]
(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/heat_transfer/test/tests/code_verification/spherical_test_no5.i)
# Problem III.5
#
# A solid sphere has a spatially dependent internal heating. It has a constant thermal
# conductivity. It is exposed to a constant temperature on its boundary.
#
# REFERENCE:
# A. Toptan, et al. (Mar.2020). Tech. rep. CASL-U-2020-1939-000, SAND2020-3887 R. DOI:10.2172/1614683.
[Mesh]
[./geom]
type = GeneratedMeshGenerator
dim = 1
elem_type = EDGE2
nx = 4
[../]
[]
[Variables]
[./u]
order = FIRST
[../]
[]
[Problem]
coord_type = RSPHERICAL
[]
[Functions]
[./volumetric_heat]
type = ParsedFunction
symbol_names = 'q ro beta'
symbol_values = '1200 1 0.1'
expression = 'q * (1-beta*(x/ro)^2)'
[../]
[./exact]
type = ParsedFunction
symbol_names = 'uf q k ro beta'
symbol_values = '300 1200 1 1 0.1'
expression = 'uf + (q*ro^2/(6*k)) * ( (1-(x/ro)^2) - 0.3*beta*(1-(x/ro)^4) )'
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = u
[../]
[./heatsource]
type = HeatSource
function = volumetric_heat
variable = u
[../]
[]
[BCs]
[./uo]
type = DirichletBC
boundary = 'right'
variable = u
value = 300
[../]
[]
[Materials]
[./property]
type = GenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '1.0 1.0 1.0'
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = exact
variable = u
[../]
[./h]
type = AverageElementSize
[]
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/poro/vol_expansion_action.i)
# This is identical to vol_expansion.i, but uses the PoroMechanics action
#
# Apply an increasing porepressure, with zero mechanical forces,
# and observe the corresponding volumetric expansion
#
# P = t
# With the Biot coefficient being 2.0, the effective stresses should be
# stress_xx = stress_yy = stress_zz = 2t
# With bulk modulus = 1 then should have
# vol_strain = strain_xx + strain_yy + strain_zz = 2t.
# I use a single element lying 0<=x<=1, 0<=y<=1 and 0<=z<=1, and
# fix the left, bottom and back boundaries appropriately,
# so at the point x=y=z=1, the displacements should be
# disp_x = disp_y = disp_z = 2t/3 (small strain physics is used)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 0
xmax = 1
ymin = 0
ymax = 1
zmin = 0
zmax = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
block = 0
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./p]
[../]
[]
[BCs]
[./p]
type = FunctionDirichletBC
boundary = 'bottom top'
variable = p
function = t
[../]
[./xmin]
type = DirichletBC
boundary = left
variable = disp_x
value = 0
[../]
[./ymin]
type = DirichletBC
boundary = bottom
variable = disp_y
value = 0
[../]
[./zmin]
type = DirichletBC
boundary = back
variable = disp_z
value = 0
[../]
[]
[Kernels]
[./PoroMechanics]
porepressure = p
displacements = 'disp_x disp_y disp_z'
[../]
[./unimportant_p]
type = Diffusion
variable = p
[../]
[]
[AuxVariables]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[../]
[./stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[]
[Postprocessors]
[./corner_x]
type = PointValue
point = '1 1 1'
variable = disp_x
[../]
[./corner_y]
type = PointValue
point = '1 1 1'
variable = disp_y
[../]
[./corner_z]
type = PointValue
point = '1 1 1'
variable = disp_z
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
# bulk modulus = 1, poisson ratio = 0.2
C_ijkl = '0.5 0.75'
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./biot]
type = GenericConstantMaterial
prop_names = biot_coefficient
prop_values = 2.0
[../]
[]
[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
start_time = 0
dt = 0.1
end_time = 1
[]
[Outputs]
file_base = vol_expansion_action
exodus = true
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/small-2d/multi_component_mortar_thermal_conduction.i)
## Units in the input file: m-Pa-s-K
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 10
xmax = 1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 10
xmin = 1.
xmax = 2.
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
patch_update_strategy = iteration
[]
[Variables]
[disp_x]
block = 'left_block right_block'
[]
[disp_y]
block = 'left_block right_block'
[]
[temperature]
initial_condition = 525.0
[]
[temperature_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[Modules]
[TensorMechanics/Master]
[steel]
strain = SMALL
add_variables = false
use_automatic_differentiation = true
additional_generate_output = 'vonmises_stress'
additional_material_output_family = 'MONOMIAL'
additional_material_output_order = 'FIRST'
block = 'left_block'
[]
[aluminum]
strain = SMALL
add_variables = false
use_automatic_differentiation = true
additional_generate_output = 'vonmises_stress'
additional_material_output_family = 'MONOMIAL'
additional_material_output_order = 'FIRST'
block = 'right_block'
[]
[]
[]
[Kernels]
[HeatDiff_steel]
type = ADHeatConduction
variable = temperature
thermal_conductivity = steel_thermal_conductivity
block = 'left_block'
[]
[HeatTdot_steel]
type = ADHeatConductionTimeDerivative
variable = temperature
specific_heat = steel_heat_capacity
density_name = steel_density
block = 'left_block'
[]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
block = 'right_block'
[]
[HeatTdot_aluminum]
type = ADHeatConductionTimeDerivative
variable = temperature
specific_heat = aluminum_heat_capacity
density_name = aluminum_density
block = 'right_block'
[]
[]
[BCs]
[fixed_bottom_edge]
type = ADDirichletBC
variable = disp_y
value = 0
boundary = 'moving_block_bottom fixed_block_bottom'
[]
[fixed_outer_edge]
type = ADDirichletBC
variable = disp_x
value = 0
boundary = 'fixed_block_right'
[]
[displacement_left_block]
type = ADFunctionDirichletBC
variable = disp_x
function = 'if(t<61, 2.0e-7, -2.0e-8*(t-60))'
boundary = 'moving_block_left'
[]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 800
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 250
boundary = 'fixed_block_right'
[]
[]
[Contact]
[interface]
primary = moving_block_right
secondary = fixed_block_left
model = frictionless
formulation = mortar
correct_edge_dropping = true
[]
[]
[Constraints]
[thermal_contact]
type = ModularGapConductanceConstraint
variable = temperature_interface_lm
secondary_variable = temperature
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'radiation closed'
use_displaced_mesh = true
[]
[]
[Materials]
[steel_elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1.93e11 #in Pa, 193 GPa, stainless steel 304
poissons_ratio = 0.29
block = 'left_block'
[]
[steel_stress]
type = ADComputeLinearElasticStress
block = 'left_block'
[]
[steel_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'steel_density steel_thermal_conductivity steel_heat_capacity'
prop_values = ' 8e3 16.2 0.5' ## for stainless steel 304
block = 'left_block'
[]
[aluminum_elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 6.8e10 #in Pa, 68 GPa, aluminum
poissons_ratio = 0.36
block = 'right_block'
[]
[aluminum_stress]
type = ADComputeLinearElasticStress
block = 'right_block'
[]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity'
prop_values = ' 2.7e3 210 0.9'
block = 'right_block'
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
secondary_emissivity = 0.25
primary_emissivity = 0.6
temperature = temperature
boundary = moving_block_right
[]
[closed]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_thermal_conductivity
secondary_conductivity = aluminum_thermal_conductivity
temperature = temperature
contact_pressure = interface_normal_lm
primary_hardness = 1.0
secondary_hardness = 1.0
boundary = moving_block_right
[]
[]
[Postprocessors]
[steel_pt_interface_temperature]
type = NodalVariableValue
nodeid = 245
variable = temperature
[]
[aluminum_pt_interface_temperature]
type = NodalVariableValue
nodeid = 657
variable = temperature
[]
[aluminum_element_interface_stress]
type = ElementalVariableValue
variable = vonmises_stress
elementid = 560
[]
[interface_heat_flux_steel]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = moving_block_right
diffusivity = steel_thermal_conductivity
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
# mortar contact solver options
petsc_options = '-snes_converged_reason -pc_svd_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = ' lu superlu_dist'
snesmf_reuse_base = false
nl_rel_tol = 1e-10
nl_max_its = 20
l_max_its = 50
dt = 60
end_time = 120
[]
[Outputs]
csv = true
perf_graph = true
[]
(test/tests/dgkernels/adaptivity/adaptivity.i)
# This input file is used for two tests:
# 1) Check that DGKernels work with mesh adaptivity
# 2) Error out when DGKernels are used with adaptivity
# and stateful material prpoerties
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
ny = 2
nz = 2
parallel_type = 'replicated'
[]
[Variables]
[./u]
order = FIRST
family = MONOMIAL
[./InitialCondition]
type = ConstantIC
value = 1
[../]
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = (x*x*x)-6.0*x
[../]
[./bc_fn]
type = ParsedFunction
expression = (x*x*x)
[../]
[]
[Kernels]
[./diff]
type = MatDiffusionTest
variable = u
prop_name = diffusivity
[../]
[./abs]
type = Reaction
variable = u
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
[../]
[]
[DGKernels]
[./dgdiff]
type = DGDiffusion
variable = u
sigma = 6
epsilon = -1.0
diff = diffusivity
[../]
[]
[BCs]
active = 'all'
[./all]
type = DGMDDBC
variable = u
boundary = '1 2 3 4'
function = bc_fn
prop_name = diffusivity
sigma = 6
epsilon = -1.0
[../]
[]
[Materials]
active = 'constant'
[./stateful]
type = StatefulTest
prop_names = 'diffusivity'
prop_values = '1'
[../]
[./constant]
type = GenericConstantMaterial
prop_names = 'diffusivity'
prop_values = '1'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Adaptivity]
marker = 'marker'
steps = 1
[./Indicators]
[./error]
type = GradientJumpIndicator
variable = u
[../]
[../]
[./Markers]
[./marker]
type = ErrorFractionMarker
coarsen = 0.5
indicator = error
refine = 0.5
[../]
[../]
[]
[Outputs]
exodus = 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/phase_field/examples/rigidbodymotion/AC_CH_Multigrain.i)
# Tests the rigid body motion due to applied force of multiple particles.
# ***COPY AND PASTE THESE AS NEEDED***
# 'gr0 gr1 gr2 gr3 gr4 gr5 gr6 gr7 gr8 gr9 gr10 gr11 gr12 gr13 gr14 gr15 gr16 gr17 gr18 gr19'
# (gr0^2+gr1^2+gr2^2+gr3^2+gr4^2+gr5^2+gr6^2+gr7^2+gr8^2+gr9^2+gr10^2+gr11^2+gr12^2+gr13^2+gr14^2+gr15^2+gr16^2+gr17^2+gr18^2+gr19^2)
# (gr0^3+gr1^3+gr2^3+gr3^3+gr4^3+gr5^3+gr6^3+gr7^3+gr8^3+gr9^3+gr10^3+gr11^3+gr12^3+gr13^3+gr14^3+gr15^3+gr16^3+gr17^3+gr18^3+gr19^3)
[GlobalParams]
op_num = 4
var_name_base = gr
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
xmin = 0
xmax = 600
ymin = 0
ymax = 600
elem_type = QUAD4
uniform_refine = 1
[]
[Variables]
[./c]
[../]
[./w]
[../]
[./PolycrystalVariables] # Automatically creates order parameter variables
[../]
[]
[AuxVariables]
[./bnds]
[../]
[./force]
order = CONSTANT
family = MONOMIAL
[../]
[./free_energy]
order = CONSTANT
family = MONOMIAL
[../]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./var_indices]
order = CONSTANT
family = MONOMIAL
[../]
[./centroids]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./load_x]
# Defines the force on the grains in the x-direction
type = ParsedFunction
expression = 0.005*cos(x*pi/600)
[../]
[./load_y]
# Defines the force on the grains in the y-direction
type = ConstantFunction
value = 0.002
[../]
[]
[Kernels]
[./RigidBodyMultiKernel]
# Creates all of the necessary Allen Cahn kernels automatically
c = c
f_name = f_loc
mob_name = L
kappa_name = kappa_gr
grain_force = grain_force
grain_volumes = grain_volumes
grain_tracker_object = grain_center
[../]
# Cahn Hilliard kernels
[./dt_w]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./CH_wres]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./CH_Parsed]
type = SplitCHParsed
variable = c
f_name = f_loc
w = w
kappa_name = kappa_c
coupled_variables = 'gr0 gr1 gr2 gr3' # Must be changed as op_num changes. Copy/paste from line 4
[../]
[./CH_RBM]
type = MultiGrainRigidBodyMotion
variable = w
c = c
v = 'gr0 gr1 gr2 gr3'
grain_force = grain_force
grain_volumes = grain_volumes
grain_tracker_object = grain_center
[../]
[]
[AuxKernels]
[./force_x]
type = FunctionAux
variable = force
function = load_x
[../]
[./force_y]
type = FunctionAux
variable = force
function = load_y
[../]
[./energy_density]
type = TotalFreeEnergy
variable = free_energy
f_name = f_loc
kappa_names = kappa_c
interfacial_vars = c
[../]
[./bnds]
type = BndsCalcAux
variable = bnds
[../]
[]
[BCs]
[./bcs]
#zero flux BC
type = NeumannBC
value = 0
variable = c
boundary = '0 1 2 3'
[../]
[]
[Materials]
[./constants]
type = GenericConstantMaterial
prop_names = 'kappa_gr kappa_c M L'
prop_values = '250 4000 4.5 60'
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = f_loc
constant_names = 'A B'
constant_expressions = '450 1.5'
coupled_variables = 'c gr0 gr1 gr2 gr3' #Must be changed as op_num changes. Copy/paste from line 4
expression = 'A*c^2*(1-c)^2+B*(c^2+6*(1-c)*(gr0^2+gr1^2+gr2^2+gr3^2)
-4*(2-c)*(gr0^3+gr1^3+gr2^3+gr3^3)
+3*(gr0^2+gr1^2+gr2^2+gr3^2)^2)'
#Copy/paste from lines 5-6
derivative_order = 2
[../]
[./force_density]
type = ExternalForceDensityMaterial
c = c
k = 10.0
force_x = load_x
force_y = load_y
[../]
[]
[Postprocessors]
[./total_energy]
type = ElementIntegralVariablePostprocessor
variable = free_energy
execute_on = 'initial timestep_end'
[../]
[]
[VectorPostprocessors]
[./forces]
type = GrainForcesPostprocessor
grain_force = grain_force
[../]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_center
execute_on = 'initial timestep_begin'
[../]
[]
[UserObjects]
[./grain_center]
type = GrainTracker
outputs = none
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
[../]
[./grain_force]
type = ComputeExternalGrainForceAndTorque
grain_data = grain_center
c = c
etas = 'gr0 gr1 gr2 gr3'
force_density = force_density_ext
execute_on = 'linear nonlinear'
[../]
[]
[Preconditioning]
[./coupled]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type
-sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly
ilu 2'
l_tol = 1e-05
nl_max_its = 30
l_max_its = 30
nl_rel_tol = 1e-07
nl_abs_tol = 1e-09
start_time = 0.0
end_time = 4
dt = 0.05
[]
[Outputs]
exodus = true
perf_graph = true
[./display]
type = Console
max_rows = 12
[../]
[]
[ICs]
[./concentration_IC]
type = SpecifiedSmoothCircleIC
x_positions = '150 450 150 450'
y_positions = '150 150 450 450'
z_positions = '0 0 0 0'
radii = '120 120 120 120'
variable = c
invalue = 1.0
outvalue = 0.0
int_width = 25
[../]
[./gr0_IC]
type = SmoothCircleIC
variable = gr0
x1 = 150
y1 = 150
radius = 120
invalue = 1.0
outvalue = 0.0
int_width = 25
[../]
[./gr1_IC]
type = SmoothCircleIC
variable = gr1
x1 = 450
y1 = 150
radius = 120
invalue = 1.0
outvalue = 0.0
int_width = 25
[../]
[./gr2_IC]
type = SmoothCircleIC
variable = gr2
x1 = 150
y1 = 450
radius = 120
invalue = 1.0
outvalue = 0.0
int_width = 25
[../]
[./gr3_IC]
type = SmoothCircleIC
variable = gr3
x1 = 450
y1 = 450
radius = 120
invalue = 1.0
outvalue = 0.0
int_width = 25
[../]
[]
(modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_structure_3d/steady_state.i)
[Materials]
[mat]
type = ADGenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '16 356 6.5514e3'
[]
[]
[Functions]
[Ts_init]
type = ParsedFunction
expression = '2*sin(x*pi/2)+2*sin(pi*y) +507'
[]
[]
[Components]
[blk]
type = HeatStructureFromFile3D
file = box.e
position = '0 0 0'
initial_T = Ts_init
[]
[right_bnd]
type = HSBoundarySpecifiedTemperature
hs = blk
boundary = blk:right
T = Ts_init
[]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 100
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-7
nl_abs_tol = 1e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
[]
[Outputs]
exodus = true
execute_on = 'initial final'
[]
(modules/phase_field/test/tests/TotalFreeEnergy/TotalFreeEnergy_test.i)
#
# Test the TotalFreeEnergy auxkernel, which outputs both the sum of the bulk and interfacial free energies. This test has only one variable.
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
nz = 0
xmin = 0
xmax = 250
ymin = 0
ymax = 250
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./c]
[../]
[./w]
[../]
[]
[AuxVariables]
[./local_free_energy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[ICs]
[./cIC]
type = SmoothCircleIC
variable = c
x1 = 125.0
y1 = 125.0
radius = 60.0
invalue = 1.0
outvalue = 0.1
int_width = 30.0
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[]
[AuxKernels]
[./local_free_energy]
type = TotalFreeEnergy
variable = local_free_energy
kappa_names = kappa_c
interfacial_vars = c
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1e-3 0.1'
[../]
[./free_energy]
type = DerivativeParsedMaterial
coupled_variables = c
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 1.0e-2'
expression = 16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2
derivative_order = 2
[../]
[]
[Postprocessors]
[./total_free_energy]
type = ElementIntegralVariablePostprocessor
variable = local_free_energy
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = -pc_type
petsc_options_value = lu
l_max_its = 30
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 6
dt = 200
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/thewarehouse/test1.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 100
[]
[manyblocks]
input = gen
type = ElemUniqueSubdomainsGenerator
[]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = CoefDiffusion
variable = u
coef = 0.1
[../]
[./time]
type = TimeDerivative
variable = u
[../]
[]
[Materials]
[mat_props]
type = GenericConstantMaterial
prop_names = diffusivity
prop_values = 2
[]
[]
[UserObjects]
[]
[Postprocessors]
[avg_flux_right]
# Computes -\int(exp(y)+1) from 0 to 1 which is -2.718281828
type = SideDiffusiveFluxAverage
variable = u
boundary = right
diffusivity = diffusivity
[]
[u1_avg]
type = ElementAverageValue
variable = u
execute_on = 'initial timestep_end'
[]
[u2_avg]
type = ElementAverageValue
variable = u
execute_on = 'initial timestep_end'
[]
[diff]
type = DifferencePostprocessor
value1 = u1_avg
value2 = u2_avg
execute_on = 'initial timestep_end'
[]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
(modules/phase_field/test/tests/KKS_system/kks_multiphase.i)
#
# This test is for the 3-phase KKS model
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
nz = 0
xmin = 0
xmax = 40
ymin = 0
ymax = 40
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[AuxVariables]
[./Energy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Variables]
# concentration
[./c]
order = FIRST
family = LAGRANGE
[../]
# order parameter 1
[./eta1]
order = FIRST
family = LAGRANGE
[../]
# order parameter 2
[./eta2]
order = FIRST
family = LAGRANGE
[../]
# order parameter 3
[./eta3]
order = FIRST
family = LAGRANGE
initial_condition = 0.0
[../]
# phase concentration 1
[./c1]
order = FIRST
family = LAGRANGE
initial_condition = 0.2
[../]
# phase concentration 2
[./c2]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[../]
# phase concentration 3
[./c3]
order = FIRST
family = LAGRANGE
initial_condition = 0.8
[../]
# Lagrange multiplier
[./lambda]
order = FIRST
family = LAGRANGE
initial_condition = 0.0
[../]
[]
[ICs]
[./eta1]
variable = eta1
type = SmoothCircleIC
x1 = 20.0
y1 = 20.0
radius = 10
invalue = 0.9
outvalue = 0.1
int_width = 4
[../]
[./eta2]
variable = eta2
type = SmoothCircleIC
x1 = 20.0
y1 = 20.0
radius = 10
invalue = 0.1
outvalue = 0.9
int_width = 4
[../]
[./c]
variable = c
type = SmoothCircleIC
x1 = 20.0
y1 = 20.0
radius = 10
invalue = 0.2
outvalue = 0.5
int_width = 2
[../]
[]
[Materials]
# simple toy free energies
[./f1]
type = DerivativeParsedMaterial
property_name = F1
coupled_variables = 'c1'
expression = '20*(c1-0.2)^2'
[../]
[./f2]
type = DerivativeParsedMaterial
property_name = F2
coupled_variables = 'c2'
expression = '20*(c2-0.5)^2'
[../]
[./f3]
type = DerivativeParsedMaterial
property_name = F3
coupled_variables = 'c3'
expression = '20*(c3-0.8)^2'
[../]
# Switching functions for each phase
# h1(eta1, eta2, eta3)
[./h1]
type = SwitchingFunction3PhaseMaterial
eta_i = eta1
eta_j = eta2
eta_k = eta3
property_name = h1
[../]
# h2(eta1, eta2, eta3)
[./h2]
type = SwitchingFunction3PhaseMaterial
eta_i = eta2
eta_j = eta3
eta_k = eta1
property_name = h2
[../]
# h3(eta1, eta2, eta3)
[./h3]
type = SwitchingFunction3PhaseMaterial
eta_i = eta3
eta_j = eta1
eta_k = eta2
property_name = h3
[../]
# Coefficients for diffusion equation
[./Dh1]
type = DerivativeParsedMaterial
material_property_names = 'D h1'
expression = D*h1
property_name = Dh1
[../]
[./Dh2]
type = DerivativeParsedMaterial
material_property_names = 'D h2'
expression = D*h2
property_name = Dh2
[../]
[./Dh3]
type = DerivativeParsedMaterial
material_property_names = 'D h3'
expression = D*h3
property_name = Dh3
[../]
# Barrier functions for each phase
[./g1]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta1
function_name = g1
[../]
[./g2]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta2
function_name = g2
[../]
[./g3]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta3
function_name = g3
[../]
# constant properties
[./constants]
type = GenericConstantMaterial
prop_names = 'L kappa D'
prop_values = '0.7 1.0 1'
[../]
[]
[Kernels]
#Kernels for diffusion equation
[./diff_time]
type = TimeDerivative
variable = c
[../]
[./diff_c1]
type = MatDiffusion
variable = c
diffusivity = Dh1
v = c1
[../]
[./diff_c2]
type = MatDiffusion
variable = c
diffusivity = Dh2
v = c2
[../]
[./diff_c3]
type = MatDiffusion
variable = c
diffusivity = Dh3
v = c3
[../]
# Kernels for Allen-Cahn equation for eta1
[./deta1dt]
type = TimeDerivative
variable = eta1
[../]
[./ACBulkF1]
type = KKSMultiACBulkF
variable = eta1
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g1
eta_i = eta1
wi = 1.0
coupled_variables = 'c1 c2 c3 eta2 eta3'
[../]
[./ACBulkC1]
type = KKSMultiACBulkC
variable = eta1
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta1
coupled_variables = 'eta2 eta3'
[../]
[./ACInterface1]
type = ACInterface
variable = eta1
kappa_name = kappa
[../]
[./multipler1]
type = MatReaction
variable = eta1
v = lambda
mob_name = L
[../]
# Kernels for Allen-Cahn equation for eta2
[./deta2dt]
type = TimeDerivative
variable = eta2
[../]
[./ACBulkF2]
type = KKSMultiACBulkF
variable = eta2
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g2
eta_i = eta2
wi = 1.0
coupled_variables = 'c1 c2 c3 eta1 eta3'
[../]
[./ACBulkC2]
type = KKSMultiACBulkC
variable = eta2
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta2
coupled_variables = 'eta1 eta3'
[../]
[./ACInterface2]
type = ACInterface
variable = eta2
kappa_name = kappa
[../]
[./multipler2]
type = MatReaction
variable = eta2
v = lambda
mob_name = L
[../]
# Kernels for the Lagrange multiplier equation
[./mult_lambda]
type = MatReaction
variable = lambda
mob_name = 3
[../]
[./mult_ACBulkF_1]
type = KKSMultiACBulkF
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g1
eta_i = eta1
wi = 1.0
mob_name = 1
coupled_variables = 'c1 c2 c3 eta2 eta3'
[../]
[./mult_ACBulkC_1]
type = KKSMultiACBulkC
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta1
coupled_variables = 'eta2 eta3'
mob_name = 1
[../]
[./mult_CoupledACint_1]
type = SimpleCoupledACInterface
variable = lambda
v = eta1
kappa_name = kappa
mob_name = 1
[../]
[./mult_ACBulkF_2]
type = KKSMultiACBulkF
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g2
eta_i = eta2
wi = 1.0
mob_name = 1
coupled_variables = 'c1 c2 c3 eta1 eta3'
[../]
[./mult_ACBulkC_2]
type = KKSMultiACBulkC
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta2
coupled_variables = 'eta1 eta3'
mob_name = 1
[../]
[./mult_CoupledACint_2]
type = SimpleCoupledACInterface
variable = lambda
v = eta2
kappa_name = kappa
mob_name = 1
[../]
[./mult_ACBulkF_3]
type = KKSMultiACBulkF
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gi_name = g3
eta_i = eta3
wi = 1.0
mob_name = 1
coupled_variables = 'c1 c2 c3 eta1 eta2'
[../]
[./mult_ACBulkC_3]
type = KKSMultiACBulkC
variable = lambda
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
cj_names = 'c1 c2 c3'
eta_i = eta3
coupled_variables = 'eta1 eta2'
mob_name = 1
[../]
[./mult_CoupledACint_3]
type = SimpleCoupledACInterface
variable = lambda
v = eta3
kappa_name = kappa
mob_name = 1
[../]
# Kernels for constraint equation eta1 + eta2 + eta3 = 1
# eta3 is the nonlinear variable for the constraint equation
[./eta3reaction]
type = MatReaction
variable = eta3
mob_name = 1
[../]
[./eta1reaction]
type = MatReaction
variable = eta3
v = eta1
mob_name = 1
[../]
[./eta2reaction]
type = MatReaction
variable = eta3
v = eta2
mob_name = 1
[../]
[./one]
type = BodyForce
variable = eta3
value = -1.0
[../]
# Phase concentration constraints
[./chempot12]
type = KKSPhaseChemicalPotential
variable = c1
cb = c2
fa_name = F1
fb_name = F2
[../]
[./chempot23]
type = KKSPhaseChemicalPotential
variable = c2
cb = c3
fa_name = F2
fb_name = F3
[../]
[./phaseconcentration]
type = KKSMultiPhaseConcentration
variable = c3
cj = 'c1 c2 c3'
hj_names = 'h1 h2 h3'
etas = 'eta1 eta2 eta3'
c = c
[../]
[]
[AuxKernels]
[./Energy_total]
type = KKSMultiFreeEnergy
Fj_names = 'F1 F2 F3'
hj_names = 'h1 h2 h3'
gj_names = 'g1 g2 g3'
variable = Energy
w = 1
interfacial_vars = 'eta1 eta2 eta3'
kappa_names = 'kappa kappa kappa'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm ilu nonzero'
l_max_its = 30
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-11
num_steps = 2
dt = 0.5
[]
[Preconditioning]
active = 'full'
[./full]
type = SMP
full = true
[../]
[./mydebug]
type = FDP
full = true
[../]
[]
[Outputs]
exodus = true
[]
(modules/stochastic_tools/test/tests/variablemappings/pod_mapping/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 6
xmax = 6
[]
[Variables]
[v]
[]
[]
[Kernels]
[diffusion_v]
type = MatDiffusion
variable = v
diffusivity = D_v
[]
[source_v]
type = BodyForce
variable = v
value = 1.0
[]
[]
[Materials]
[diffusivity_v]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 4.0
[]
[]
[BCs]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 0
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Reporters]
[solution_storage]
type = SolutionContainer
execute_on = 'FINAL'
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_no_parts.i)
[GlobalParams]
integrate_p_by_parts = false
viscous_form = 'traction'
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = Newton
[../]
[]
[Executioner]
type = Transient
dt = 0.005
dtmin = 0.005
num_steps = 5
l_max_its = 100
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[AuxVariables]
[./vel_x]
# Velocity in radial (r) direction
family = LAGRANGE
order = SECOND
[../]
[./vel_y]
# Velocity in axial (z) direction
family = LAGRANGE
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]
family = LAGRANGE_VEC
order = SECOND
[]
[./p]
family = LAGRANGE
order = FIRST
[../]
[]
[BCs]
[./p_corner]
# This is required because of the no bcs
type = DirichletBC
boundary = top_right
value = 0
variable = p
[../]
[./velocity_out]
type = INSADMomentumNoBCBC
boundary = top
variable = velocity
pressure = p
[../]
[./velocity_in]
type = VectorFunctionDirichletBC
boundary = bottom
variable = velocity
function_x = 0
function_y = 'inlet_func'
[../]
[./wall]
type = VectorFunctionDirichletBC
boundary = 'right'
variable = velocity
function_x = 0
function_y = 0
[../]
[./axis]
type = ADVectorFunctionDirichletBC
boundary = 'left'
variable = velocity
set_y_comp = false
function_x = 0
[../]
[]
[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
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[ins_mat]
type = INSADMaterial
velocity = velocity
pressure = p
[]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
outputs = 'console' execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
outputs = 'console' execute_on = 'timestep_end'
[../]
[]
(modules/phase_field/test/tests/KKS_system/two_phase.i)
#
# This test ensures that the equilibrium solution using the dedicated two phase
# formulation is identical to the two order parameters with a Lagrange multiplier
# constraint in lagrange_multiplier.i
#
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmax = 5
[]
[AuxVariables]
[Fglobal]
order = CONSTANT
family = MONOMIAL
[]
[]
[Variables]
# order parameter
[eta]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[]
# hydrogen concentration
[c]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = FunctionIC
function = x/5
[]
[]
# chemical potential
[w]
order = FIRST
family = LAGRANGE
[]
# hydrogen phase concentration (matrix)
[cm]
order = FIRST
family = LAGRANGE
initial_condition = 0.2
[]
# hydrogen phase concentration (delta phase)
[cd]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[]
[]
[Materials]
# Free energy of the matrix
[fm]
type = DerivativeParsedMaterial
property_name = fm
coupled_variables = 'cm'
expression = '(0.1-cm)^2'
[]
# Free energy of the delta phase
[fd]
type = DerivativeParsedMaterial
property_name = fd
coupled_variables = 'cd'
expression = '(0.9-cd)^2'
[]
# h(eta)
[h_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta
[]
# g(eta)
[g_eta]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta
[]
# constant properties
[constants]
type = GenericConstantMaterial
prop_names = 'M L kappa'
prop_values = '0.7 0.7 0.4 '
[]
[]
[Kernels]
# full transient
active = 'PhaseConc ChemPotVacancies CHBulk ACBulkF ACBulkC ACInterface dcdt detadt ckernel'
# enforce c = (1-h(eta))*cm + h(eta)*cd
[PhaseConc]
type = KKSPhaseConcentration
ca = cm
variable = cd
c = c
eta = eta
[]
# enforce pointwise equality of chemical potentials
[ChemPotVacancies]
type = KKSPhaseChemicalPotential
variable = cm
cb = cd
fa_name = fm
fb_name = fd
[]
#
# Cahn-Hilliard Equation
#
[CHBulk]
type = KKSSplitCHCRes
variable = c
ca = cm
fa_name = fm
w = w
[]
[dcdt]
type = CoupledTimeDerivative
variable = w
v = c
[]
[ckernel]
type = SplitCHWRes
mob_name = M
variable = w
[]
#
# Allen-Cahn Equation
#
[ACBulkF]
type = KKSACBulkF
variable = eta
fa_name = fm
fb_name = fd
coupled_variables = 'cm cd'
w = 0.4
[]
[ACBulkC]
type = KKSACBulkC
variable = eta
ca = cm
cb = cd
fa_name = fm
mob_name = L
[]
[ACInterface]
type = ACInterface
variable = eta
kappa_name = kappa
mob_name = L
[]
[detadt]
type = TimeDerivative
variable = eta
[]
[]
[AuxKernels]
[GlobalFreeEnergy]
variable = Fglobal
type = KKSGlobalFreeEnergy
fa_name = fm
fb_name = fd
w = 0.4
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pctype -sub_pc_type -sub_pc_factor_shift_type -pc_factor_shift_type'
petsc_options_value = ' asm lu nonzero nonzero'
l_max_its = 30
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-11
num_steps = 35
dt = 10
[]
#
# Precondition using handcoded off-diagonal terms
#
[Preconditioning]
[full]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[c]
type = LineValueSampler
variable = c
start_point = '0 0 0'
end_point = '5 0 0'
num_points = 21
sort_by = x
[]
[]
[Outputs]
csv = true
execute_on = FINAL
[]
(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/phase_field/test/tests/MultiPhase/derivativetwophasematerial.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 14
ny = 10
nz = 0
xmin = 10
xmax = 40
ymin = 15
ymax = 35
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 25.0
y1 = 25.0
radius = 6.0
invalue = 0.9
outvalue = 0.1
int_width = 3.0
[../]
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[./eta]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 30.0
y1 = 25.0
radius = 4.0
invalue = 0.9
outvalue = 0.1
int_width = 2.0
[../]
[../]
[]
[Kernels]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[./ACBulk]
type = AllenCahn
variable = eta
coupled_variables = c
f_name = F
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = kappa_eta
[../]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
coupled_variables = 'eta'
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'L kappa_eta'
prop_values = '1 1 '
[../]
[./consts2]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1 1'
[../]
[./switching]
type = SwitchingFunctionMaterial
eta = eta
h_order = SIMPLE
[../]
[./barrier]
type = BarrierFunctionMaterial
eta = eta
g_order = SIMPLE
[../]
[./free_energy_A]
type = DerivativeParsedMaterial
property_name = Fa
coupled_variables = 'c'
expression = '(c-0.1)^2*(c-1)^2 + c*0.01'
derivative_order = 2
enable_jit = true
[../]
[./free_energy_B]
type = DerivativeParsedMaterial
property_name = Fb
coupled_variables = 'c'
expression = 'c^2*(c-0.9)^2 + (1-c)*0.01'
derivative_order = 2
enable_jit = true
[../]
[./free_energy]
type = DerivativeTwoPhaseMaterial
property_name = F
fa_name = Fa
fb_name = Fb
coupled_variables = 'c'
eta = eta
derivative_order = 2
outputs = exodus
output_properties = 'F dF/dc dF/deta d^2F/dc^2 d^2F/dcdeta d^2F/deta^2'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
l_max_its = 15
l_tol = 1.0e-4
nl_max_its = 10
nl_rel_tol = 1.0e-11
start_time = 0.0
num_steps = 1
dt = 0.1
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_htonly/gap_heat_transfer_htonly_rspherical.i)
#
# 1-D spherical Gap Heat Transfer Test
#
# This test exercises 1-D gap heat transfer for a constant conductivity gap.
#
# The mesh consists of two "blocks" with a mesh biased toward the gap
# between them. Each block is unit length. The gap between them is one
# unit in length.
#
# The conductivity of both blocks is set very large to achieve a uniform temperature
# across each block. The temperature of the far left boundary
# is ramped from 100 to 200 over one time unit, and then held fixed for an additional
# time unit. The temperature of the far right boundary is held fixed at 100.
#
# A simple analytical solution is possible for the heat flux between the blocks, or spheres in the case of RSPHERICAL.:
#
# Flux = (T_left - T_right) * (gapK/(r^2*((1/r1)-(1/r2))))
#
# For gapK = 1 (default value)
#
# The area is taken as the area of the secondary (inner) surface:
#
# Area = 4 * pi * 1 * 1
#
# The integrated heat flux across the gap at time 2 is then:
#
# 4*pi*k*delta_T/((1/r1)-(1/r2))
# 4*pi*1*100/((1/1) - (1/2)) = 2513.3 watts
#
# For comparison, see results from the flux post processors.
#
#
[Problem]
coord_type = RSPHERICAL
[]
[Mesh]
file = gap_heat_transfer_htonly_rspherical.e
construct_side_list_from_node_list = true
[]
[Functions]
[./temp]
type = PiecewiseLinear
x = '0 1 2'
y = '100 200 200'
[../]
[]
[ThermalContact]
[./thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 3
secondary = 2
emissivity_primary = 0
emissivity_secondary = 0
gap_geometry_type = sphere
[../]
[]
[Variables]
[./temp]
order = FIRST
family = LAGRANGE
initial_condition = 100
[../]
[]
[AuxVariables]
[./gap_cond]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = temp
[../]
[]
[BCs]
[./temp_far_left]
type = FunctionDirichletBC
boundary = 1
variable = temp
function = temp
[../]
[./temp_far_right]
type = DirichletBC
boundary = 4
variable = temp
value = 100
[../]
[]
[AuxKernels]
[./conductance]
type = MaterialRealAux
property = gap_conductance
variable = gap_cond
boundary = 2
[../]
[]
[Materials]
[./heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 1e6
[../]
[./density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '1.0'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
# I don't know enough about this test to say why it needs such a
# loose nl_abs_tol... after timestep 10 the residual basically can't
# be reduced much beyond the initial residual. The test probably
# needs to be revisited to determine why.
nl_abs_tol = 1e-3
nl_rel_tol = 1e-10
l_tol = 1e-6
l_max_its = 100
line_search = 'none'
nl_max_its = 10
dt = 1e-1
dtmin = 1e-1
end_time = 2.0
[]
[Postprocessors]
[./temp_left]
type = SideAverageValue
boundary = 2
variable = temp
execute_on = 'initial timestep_end'
[../]
[./temp_right]
type = SideAverageValue
boundary = 3
variable = temp
execute_on = 'initial timestep_end'
[../]
[./flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
[../]
[./flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
[../]
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_offset_single_material_insulated.i)
## Units in the input file: m-Pa-s-K-V
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 100
xmax = 0.1
ymin = 0.1
ymax = 0.35
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 100
xmin = 0.1
xmax = 0.2
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
[interface_secondary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'fixed_block_left'
new_block_id = 3
new_block_name = 'interface_secondary_subdomain'
input = block_rename
[]
[interface_primary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'moving_block_right'
new_block_id = 4
new_block_name = 'interface_primary_subdomain'
input = interface_secondary_subdomain
[]
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
[]
[Variables]
[temperature]
initial_condition = 300.0
[]
[potential]
[]
[potential_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[AuxVariables]
[interface_normal_lm]
order = FIRST
family = LAGRANGE
block = 'interface_secondary_subdomain'
initial_condition = 1.0
[]
[]
[Kernels]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
extra_vector_tags = 'ref'
block = 'left_block right_block'
[]
[electric_aluminum]
type = ADMatDiffusion
variable = potential
diffusivity = aluminum_electrical_conductivity
extra_vector_tags = 'ref'
block = 'left_block right_block'
[]
[]
[BCs]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'fixed_block_right'
[]
[electric_left]
type = ADDirichletBC
variable = potential
value = 0.0
boundary = moving_block_left
[]
[electric_right]
type = ADDirichletBC
variable = potential
value = 3.0e-1
boundary = fixed_block_right
[]
[]
[Constraints]
[electrical_contact]
type = ModularGapConductanceConstraint
variable = potential_interface_lm
secondary_variable = potential
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_electric'
correct_edge_dropping = true
[]
[interface_heating]
type = ADInterfaceJouleHeatingConstraint
potential_lagrange_multiplier = potential_interface_lm
secondary_variable = temperature
primary_electrical_conductivity = aluminum_electrical_conductivity
secondary_electrical_conductivity = aluminum_electrical_conductivity
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
[]
[]
[Materials]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_electrical_conductivity aluminum_hardness'
prop_values = ' 2.7e3 210 900.0 3.7e7 1.0' #for 99% pure Al
block = 'left_block right_block interface_secondary_subdomain'
[]
[]
[UserObjects]
[closed_electric]
type = GapFluxModelPressureDependentConduction
primary_conductivity = aluminum_electrical_conductivity
secondary_conductivity = aluminum_electrical_conductivity
temperature = potential
contact_pressure = interface_normal_lm
primary_hardness = aluminum_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[]
[Postprocessors]
[interface_heat_flux_large_block]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[interface_heat_flux_small_block]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = moving_block_right
diffusivity = aluminum_thermal_conductivity
[]
[interface_electrical_flux_large_block]
type = ADSideDiffusiveFluxAverage
variable = potential
boundary = fixed_block_left
diffusivity = aluminum_electrical_conductivity
[]
[interface_electrical_flux_small_block]
type = ADSideDiffusiveFluxAverage
variable = potential
boundary = moving_block_right
diffusivity = aluminum_electrical_conductivity
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
nl_abs_tol = 2e-10
nl_rel_tol = 1e-6
nl_max_its = 50
nl_forced_its = 1
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/combined/test/tests/phase_field_fracture/crack2d_no_split.i)
#This input uses PhaseField-Nonconserved Action to add phase field fracture bulk rate kernels
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
ymax = 0.5
[]
[./noncrack]
type = BoundingBoxNodeSetGenerator
new_boundary = noncrack
bottom_left = '0.5 0 0'
top_right = '1 0 0'
input = gen
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Modules]
[./PhaseField]
[./Nonconserved]
[./c]
free_energy = F
kappa = kappa_op
mobility = L
[../]
[../]
[../]
[./TensorMechanics]
[./Master]
[./mech]
add_variables = true
strain = SMALL
additional_generate_output = 'stress_yy'
save_in = 'resid_x resid_y'
[../]
[../]
[../]
[]
[AuxVariables]
[./resid_x]
[../]
[./resid_y]
[../]
[]
[Kernels]
[./solid_x]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_x
component = 0
c = c
[../]
[./solid_y]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_y
component = 1
c = c
[../]
[]
[BCs]
[./ydisp]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = 't'
[../]
[./yfix]
type = DirichletBC
variable = disp_y
boundary = noncrack
value = 0
[../]
[./xfix]
type = DirichletBC
variable = disp_x
boundary = top
value = 0
[../]
[]
[Materials]
[./pfbulkmat]
type = GenericConstantMaterial
prop_names = 'gc_prop l visco'
prop_values = '1e-3 0.04 1e-4'
[../]
[./define_mobility]
type = ParsedMaterial
material_property_names = 'gc_prop visco'
property_name = L
expression = '1.0/(gc_prop * visco)'
[../]
[./define_kappa]
type = ParsedMaterial
material_property_names = 'gc_prop l'
property_name = kappa_op
expression = 'gc_prop * l'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '120.0 80.0'
fill_method = symmetric_isotropic
[../]
[./damage_stress]
type = ComputeLinearElasticPFFractureStress
c = c
E_name = 'elastic_energy'
D_name = 'degradation'
F_name = 'local_fracture_energy'
decomposition_type = none
[../]
[./degradation]
type = DerivativeParsedMaterial
property_name = degradation
coupled_variables = 'c'
expression = '(1.0-c)^2*(1.0 - eta) + eta'
constant_names = 'eta'
constant_expressions = '0.0'
derivative_order = 2
[../]
[./local_fracture_energy]
type = DerivativeParsedMaterial
property_name = local_fracture_energy
coupled_variables = 'c'
material_property_names = 'gc_prop l'
expression = 'c^2 * gc_prop / 2 / l'
derivative_order = 2
[../]
[./fracture_driving_energy]
type = DerivativeSumMaterial
coupled_variables = c
sum_materials = 'elastic_energy local_fracture_energy'
derivative_order = 2
property_name = F
[../]
[]
[Postprocessors]
[./resid_x]
type = NodalSum
variable = resid_x
boundary = 2
[../]
[./resid_y]
type = NodalSum
variable = resid_y
boundary = 2
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
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'
nl_rel_tol = 1e-8
l_max_its = 10
nl_max_its = 10
dt = 1e-4
dtmin = 1e-4
num_steps = 2
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/capped_weak_plane/pull_and_shear.i)
# Dynamic problem with plasticity.
# A column of material (not subject to gravity) has the z-displacement
# of its sides fixed, but the centre of its bottom side is pulled
# downwards. This causes failure in the bottom elements.
#
# The problem utilises damping in the following way.
# The DynamicStressDivergenceTensors forms the residual
# integral grad(stress) + zeta*grad(stress-dot)
# = V/L * elasticity * (du/dx + zeta * dv/dx)
# where V is the elemental volume, and L is the length-scale,
# and u is the displacement, and v is the velocity.
# The InertialForce forms the residual
# integral density * (accel + eta * velocity)
# = V * density * (a + eta * v)
# where a is the acceleration.
# So, a damped oscillator description with both these
# kernels looks like
# 0 = V * (density * a + density * eta * v + elasticity * zeta * v / L^2 + elasticity / L^2 * u)
# Critical damping is when the coefficient of v is
# 2 * sqrt(density * elasticity / L^2)
# In the case at hand, density=1E4, elasticity~1E10 (Young is 16GPa),
# L~1 to 10 (in the horizontal or vertical direction), so this coefficient ~ 1E7 to 1E6.
# Choosing eta = 1E3 and zeta = 1E-2 gives approximate critical damping.
# If zeta is high then steady-state is achieved very quickly.
#
# In the case of plasticity, the effective stiffness of the elements
# is significantly less. Therefore, the above parameters give
# overdamping.
#
# This simulation is a nice example of the irreversable and non-uniqueness
# of simulations involving plasticity. The result depends on the damping
# parameters and the time stepping.
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 10
ny = 1
nz = 5
bias_z = 1.5
xmin = -10
xmax = 10
ymin = -10
ymax = 10
zmin = -100
zmax = 0
[]
[bottomz_middle]
type = BoundingBoxNodeSetGenerator
new_boundary = bottomz_middle
bottom_left = '-1 -1500 -105'
top_right = '1 1500 -95'
input = generated_mesh
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
beta = 0.25 # Newmark time integration
gamma = 0.5 # Newmark time integration
eta = 1E3 #0.3E4 # higher values mean more damping via density
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[Kernels]
[DynamicSolidMechanics] # zeta*K*vel + K * disp
stiffness_damping_coefficient = 1E-2 # higher values mean more damping via stiffness
hht_alpha = 0 # better nonlinear convergence than for alpha>0
[]
[inertia_x] # M*accel + eta*M*vel
type = InertialForce
use_displaced_mesh = false
variable = disp_x
velocity = vel_x
acceleration = accel_x
[]
[inertia_y]
type = InertialForce
use_displaced_mesh = false
variable = disp_y
velocity = vel_y
acceleration = accel_y
[]
[inertia_z]
type = InertialForce
use_displaced_mesh = false
variable = disp_z
velocity = vel_z
acceleration = accel_z
[]
[]
[BCs]
[no_x2]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[no_x1]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[]
[no_y1]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[no_y2]
type = DirichletBC
variable = disp_y
boundary = top
value = 0.0
[]
[z_fixed_sides_xmin]
type = DirichletBC
variable = disp_z
boundary = left
value = 0
[]
[z_fixed_sides_xmax]
type = DirichletBC
variable = disp_z
boundary = right
value = 0
[]
[bottomz]
type = FunctionDirichletBC
variable = disp_z
boundary = bottomz_middle
function = max(-10*t,-10)
[]
[]
[AuxVariables]
[accel_x]
[]
[vel_x]
[]
[accel_y]
[]
[vel_y]
[]
[accel_z]
[]
[vel_z]
[]
[stress_xx]
order = CONSTANT
family = MONOMIAL
[]
[stress_xy]
order = CONSTANT
family = MONOMIAL
[]
[stress_xz]
order = CONSTANT
family = MONOMIAL
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[stress_yz]
order = CONSTANT
family = MONOMIAL
[]
[stress_zz]
order = CONSTANT
family = MONOMIAL
[]
[strainp_xx]
order = CONSTANT
family = MONOMIAL
[]
[strainp_xy]
order = CONSTANT
family = MONOMIAL
[]
[strainp_xz]
order = CONSTANT
family = MONOMIAL
[]
[strainp_yy]
order = CONSTANT
family = MONOMIAL
[]
[strainp_yz]
order = CONSTANT
family = MONOMIAL
[]
[strainp_zz]
order = CONSTANT
family = MONOMIAL
[]
[straint_xx]
order = CONSTANT
family = MONOMIAL
[]
[straint_xy]
order = CONSTANT
family = MONOMIAL
[]
[straint_xz]
order = CONSTANT
family = MONOMIAL
[]
[straint_yy]
order = CONSTANT
family = MONOMIAL
[]
[straint_yz]
order = CONSTANT
family = MONOMIAL
[]
[straint_zz]
order = CONSTANT
family = MONOMIAL
[]
[f_shear]
order = CONSTANT
family = MONOMIAL
[]
[f_tensile]
order = CONSTANT
family = MONOMIAL
[]
[f_compressive]
order = CONSTANT
family = MONOMIAL
[]
[intnl_shear]
order = CONSTANT
family = MONOMIAL
[]
[intnl_tensile]
order = CONSTANT
family = MONOMIAL
[]
[iter]
order = CONSTANT
family = MONOMIAL
[]
[ls]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[accel_x] # Calculates and stores acceleration at the end of time step
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
execute_on = timestep_end
[]
[vel_x] # Calculates and stores velocity at the end of the time step
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
execute_on = timestep_end
[]
[accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
execute_on = timestep_end
[]
[vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
execute_on = timestep_end
[]
[accel_z]
type = NewmarkAccelAux
variable = accel_z
displacement = disp_z
velocity = vel_z
execute_on = timestep_end
[]
[vel_z]
type = NewmarkVelAux
variable = vel_z
acceleration = accel_z
execute_on = timestep_end
[]
[stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[]
[stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[]
[stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[]
[stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[]
[strainp_xx]
type = RankTwoAux
rank_two_tensor = plastic_strain
variable = strainp_xx
index_i = 0
index_j = 0
[]
[strainp_xy]
type = RankTwoAux
rank_two_tensor = plastic_strain
variable = strainp_xy
index_i = 0
index_j = 1
[]
[strainp_xz]
type = RankTwoAux
rank_two_tensor = plastic_strain
variable = strainp_xz
index_i = 0
index_j = 2
[]
[strainp_yy]
type = RankTwoAux
rank_two_tensor = plastic_strain
variable = strainp_yy
index_i = 1
index_j = 1
[]
[strainp_yz]
type = RankTwoAux
rank_two_tensor = plastic_strain
variable = strainp_yz
index_i = 1
index_j = 2
[]
[strainp_zz]
type = RankTwoAux
rank_two_tensor = plastic_strain
variable = strainp_zz
index_i = 2
index_j = 2
[]
[straint_xx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = straint_xx
index_i = 0
index_j = 0
[]
[straint_xy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = straint_xy
index_i = 0
index_j = 1
[]
[straint_xz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = straint_xz
index_i = 0
index_j = 2
[]
[straint_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = straint_yy
index_i = 1
index_j = 1
[]
[straint_yz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = straint_yz
index_i = 1
index_j = 2
[]
[straint_zz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = straint_zz
index_i = 2
index_j = 2
[]
[f_shear]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 0
variable = f_shear
[]
[f_tensile]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 1
variable = f_tensile
[]
[f_compressive]
type = MaterialStdVectorAux
property = plastic_yield_function
index = 2
variable = f_compressive
[]
[intnl_shear]
type = MaterialStdVectorAux
property = plastic_internal_parameter
index = 0
variable = intnl_shear
[]
[intnl_tensile]
type = MaterialStdVectorAux
property = plastic_internal_parameter
index = 1
variable = intnl_tensile
[]
[iter]
type = MaterialRealAux
property = plastic_NR_iterations
variable = iter
[]
[ls]
type = MaterialRealAux
property = plastic_linesearch_needed
variable = ls
[]
[]
[UserObjects]
[coh]
type = SolidMechanicsHardeningConstant
value = 1E6
[]
[tanphi]
type = SolidMechanicsHardeningConstant
value = 0.5
[]
[tanpsi]
type = SolidMechanicsHardeningConstant
value = 0.166666666667
[]
[t_strength]
type = SolidMechanicsHardeningConstant
value = 0
[]
[c_strength]
type = SolidMechanicsHardeningConstant
value = 1E80
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric_isotropic
C_ijkl = '6.4E9 6.4E9' # young 16MPa, Poisson 0.25
[]
[strain]
type = ComputeIncrementalSmallStrain
[]
[admissible]
type = ComputeMultipleInelasticStress
inelastic_models = stress
perform_finite_strain_rotations = false
[]
[stress]
type = CappedWeakPlaneStressUpdate
cohesion = coh
tan_friction_angle = tanphi
tan_dilation_angle = tanpsi
tensile_strength = t_strength
compressive_strength = c_strength
tip_smoother = 1E6
smoothing_tol = 0.5E6
yield_function_tol = 1E-2
[]
[density]
type = GenericConstantMaterial
block = 0
prop_names = density
prop_values = 1E4
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
petsc_options = '-snes_converged_reason -snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
[]
[]
[Executioner]
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason'
line_search = bt
nl_abs_tol = 1E1
nl_rel_tol = 1e-5
l_tol = 1E-10
l_max_its = 100
nl_max_its = 100
num_steps = 8
dt = 0.1
type = Transient
[]
[Outputs]
file_base = pull_and_shear
exodus = true
csv = true
[]
(test/tests/controls/tag_based_naming_access/param.i)
[Mesh]
type = GeneratedMesh
dim = 2
elem_type = QUAD4
# use odd numbers so points do not fall on element boundaries
nx = 31
ny = 31
[]
[Variables]
[./diffused]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = diffused
[../]
[]
[DiracKernels]
[./test_object]
type = MaterialPointSource
point = '0.5 0.5 0'
variable = diffused
control_tags = 'tag'
[../]
[]
[BCs]
[./bottom_diffused]
type = DirichletBC
variable = diffused
boundary = 'bottom'
value = 2
[../]
[./top_diffused]
type = DirichletBC
variable = diffused
boundary = 'top'
value = 0
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'matp'
prop_values = '1'
block = 0
[../]
[]
[Postprocessors]
[./test_object]
type = TestControlPointPP
function = '2*(x+y)'
point = '0.5 0.5 0'
control_tags = 'tag'
[../]
[./other_point_test_object]
type = TestControlPointPP
function = '3*(x+y)'
point = '0.5 0.5 0'
control_tags = 'tag'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
[Controls]
[./point_control]
type = TestControl
test_type = 'point'
parameter = 'tag/*/point'
execute_on = 'initial'
[../]
[]
(modules/combined/test/tests/surface_tension_KKS/surface_tension_VDWgas.i)
# Test for ComputeExtraStressVDWGas
# Gas bubble with r = 15 nm in a solid matrix
# The gas pressure is counterbalanced by the surface tension of the solid-gas interface,
# which is included with ComputeSurfaceTensionKKS
[Mesh]
type = GeneratedMesh
dim = 1
nx = 300
xmin = 0
xmax = 30
[]
[Problem]
coord_type = RSPHERICAL
[]
[GlobalParams]
displacements = 'disp_x'
[]
[Variables]
# order parameter
[./eta]
order = FIRST
family = LAGRANGE
[../]
# gas concentration
[./cg]
order = FIRST
family = LAGRANGE
[../]
# vacancy concentration
[./cv]
order = FIRST
family = LAGRANGE
[../]
# gas chemical potential
[./wg]
order = FIRST
family = LAGRANGE
[../]
# vacancy chemical potential
[./wv]
order = FIRST
family = LAGRANGE
[../]
# Matrix phase gas concentration
[./cgm]
order = FIRST
family = LAGRANGE
initial_condition = 1.01e-31
[../]
# Matrix phase vacancy concentration
[./cvm]
order = FIRST
family = LAGRANGE
initial_condition = 2.25e-11
[../]
# Bubble phase gas concentration
[./cgb]
order = FIRST
family = LAGRANGE
initial_condition = 0.2714
[../]
# Bubble phase vacancy concentration
[./cvb]
order = FIRST
family = LAGRANGE
initial_condition = 0.7286
[../]
[]
[ICs]
[./eta_ic]
variable = eta
type = FunctionIC
function = ic_func_eta
[../]
[./cv_ic]
variable = cv
type = FunctionIC
function = ic_func_cv
[../]
[./cg_ic]
variable = cg
type = FunctionIC
function = ic_func_cg
[../]
[]
[Functions]
[./ic_func_eta]
type = ParsedFunction
expression = 'r:=sqrt(x^2+y^2+z^2);0.5*(1.0-tanh((r-r0)/delta_eta/sqrt(2.0)))'
symbol_names = 'delta_eta r0'
symbol_values = '0.321 15'
[../]
[./ic_func_cv]
type = ParsedFunction
expression = 'r:=sqrt(x^2+y^2+z^2);eta_an:=0.5*(1.0-tanh((r-r0)/delta/sqrt(2.0)));cvbubinit*eta_an^3*(6*eta_an^2-15*eta_an+10)+cvmatrixinit*(1-eta_an^3*(6*eta_an^2-15*eta_an+10))'
symbol_names = 'delta r0 cvbubinit cvmatrixinit'
symbol_values = '0.321 15 0.7286 2.25e-11'
[../]
[./ic_func_cg]
type = ParsedFunction
expression = 'r:=sqrt(x^2+y^2+z^2);eta_an:=0.5*(1.0-tanh((r-r0)/delta/sqrt(2.0)));cgbubinit*eta_an^3*(6*eta_an^2-15*eta_an+10)+cgmatrixinit*(1-eta_an^3*(6*eta_an^2-15*eta_an+10))'
symbol_names = 'delta r0 cgbubinit cgmatrixinit'
symbol_values = '0.321 15 0.2714 1.01e-31'
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
add_variables = true
generate_output = 'hydrostatic_stress stress_xx stress_yy stress_zz'
[../]
[]
[Kernels]
# enforce cg = (1-h(eta))*cgm + h(eta)*cgb
[./PhaseConc_g]
type = KKSPhaseConcentration
ca = cgm
variable = cgb
c = cg
eta = eta
[../]
# enforce cv = (1-h(eta))*cvm + h(eta)*cvb
[./PhaseConc_v]
type = KKSPhaseConcentration
ca = cvm
variable = cvb
c = cv
eta = eta
[../]
# enforce pointwise equality of chemical potentials
[./ChemPotVacancies]
type = KKSPhaseChemicalPotential
variable = cvm
cb = cvb
fa_name = f_total_matrix
fb_name = f_total_bub
args_a = 'cgm'
args_b = 'cgb'
[../]
[./ChemPotGas]
type = KKSPhaseChemicalPotential
variable = cgm
cb = cgb
fa_name = f_total_matrix
fb_name = f_total_bub
args_a = 'cvm'
args_b = 'cvb'
[../]
#
# Cahn-Hilliard Equations
#
[./CHBulk_g]
type = KKSSplitCHCRes
variable = cg
ca = cgm
fa_name = f_total_matrix
w = wg
args_a = 'cvm'
[../]
[./CHBulk_v]
type = KKSSplitCHCRes
variable = cv
ca = cvm
fa_name = f_total_matrix
w = wv
args_a = 'cgm'
[../]
[./dcgdt]
type = CoupledTimeDerivative
variable = wg
v = cg
[../]
[./dcvdt]
type = CoupledTimeDerivative
variable = wv
v = cv
[../]
[./wgkernel]
type = SplitCHWRes
mob_name = M
variable = wg
[../]
[./wvkernel]
type = SplitCHWRes
mob_name = M
variable = wv
[../]
#
# Allen-Cahn Equation
#
[./ACBulkF]
type = KKSACBulkF
variable = eta
fa_name = f_total_matrix
fb_name = f_total_bub
w = 0.356
args = 'cvm cvb cgm cgb'
[../]
[./ACBulkCv]
type = KKSACBulkC
variable = eta
ca = cvm
cb = cvb
fa_name = f_total_matrix
args = 'cgm'
[../]
[./ACBulkCg]
type = KKSACBulkC
variable = eta
ca = cgm
cb = cgb
fa_name = f_total_matrix
args = 'cvm'
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = kappa
[../]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[]
[Materials]
# Chemical free energy of the matrix
[./fm]
type = DerivativeParsedMaterial
property_name = fm
coupled_variables = 'cvm cgm'
material_property_names = 'kvmatrix kgmatrix cvmatrixeq cgmatrixeq'
expression = '0.5*kvmatrix*(cvm-cvmatrixeq)^2 + 0.5*kgmatrix*(cgm-cgmatrixeq)^2'
[../]
# Elastic energy of the matrix
[./elastic_free_energy_m]
type = ElasticEnergyMaterial
base_name = matrix
f_name = fe_m
args = ' '
[../]
# Total free energy of the matrix
[./Total_energy_matrix]
type = DerivativeSumMaterial
property_name = f_total_matrix
sum_materials = 'fm fe_m'
coupled_variables = 'cvm cgm'
[../]
# Free energy of the bubble phase
[./fb]
type = DerivativeParsedMaterial
property_name = fb
coupled_variables = 'cvb cgb'
material_property_names = 'kToverV nQ Va b f0 kpen kgbub kvbub cvbubeq cgbubeq'
expression = '0.5*kgbub*(cvb-cvbubeq)^2 + 0.5*kvbub*(cgb-cgbubeq)^2'
[../]
# Elastic energy of the bubble
[./elastic_free_energy_p]
type = ElasticEnergyMaterial
base_name = bub
f_name = fe_b
args = ' '
[../]
# Total free energy of the bubble
[./Total_energy_bub]
type = DerivativeSumMaterial
property_name = f_total_bub
sum_materials = 'fb fe_b'
# sum_materials = 'fb'
coupled_variables = 'cvb cgb'
[../]
# h(eta)
[./h_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta
[../]
# g(eta)
[./g_eta]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta
[../]
# constant properties
[./constants]
type = GenericConstantMaterial
prop_names = 'M L kappa Va kvmatrix kgmatrix kgbub kvbub f0 kpen cvbubeq cgbubeq b T'
prop_values = '0.7 0.7 0.0368 0.03629 223.16 223.16 2.23 2.23 0.0224 1.0 0.6076 0.3924 0.085 800'
[../]
[./cvmatrixeq]
type = ParsedMaterial
property_name = cvmatrixeq
material_property_names = 'T'
constant_names = 'kB Efv'
constant_expressions = '8.6173324e-5 1.69'
expression = 'exp(-Efv/(kB*T))'
[../]
[./cgmatrixeq]
type = ParsedMaterial
property_name = cgmatrixeq
material_property_names = 'T'
constant_names = 'kB Efg'
constant_expressions = '8.6173324e-5 4.92'
expression = 'exp(-Efg/(kB*T))'
[../]
[./kToverV]
type = ParsedMaterial
property_name = kToverV
material_property_names = 'T Va'
constant_names = 'k C44dim' #k in J/K and dimensional C44 in J/m^3
constant_expressions = '1.38e-23 63e9'
expression = 'k*T*1e27/Va/C44dim'
[../]
[./nQ]
type = ParsedMaterial
property_name = nQ
material_property_names = 'T'
constant_names = 'k Pi M hbar' #k in J/K, M is Xe atomic mass in kg, hbar in J s
constant_expressions = '1.38e-23 3.14159 2.18e-25 1.05459e-34'
expression = '(M*k*T/2/Pi/hbar^2)^1.5 * 1e-27' #1e-27 converts from #/m^3 to #/nm^3
[../]
#Mechanical properties
[./Stiffness_matrix]
type = ComputeElasticityTensor
C_ijkl = '0.778 0.7935'
fill_method = symmetric_isotropic
base_name = matrix
[../]
[./Stiffness_bub]
type = ComputeElasticityTensor
C_ijkl = '0.0778 0.07935'
fill_method = symmetric_isotropic
base_name = bub
[../]
[./strain_matrix]
type = ComputeRSphericalSmallStrain
base_name = matrix
[../]
[./strain_bub]
type = ComputeRSphericalSmallStrain
base_name = bub
[../]
[./stress_matrix]
type = ComputeLinearElasticStress
base_name = matrix
[../]
[./stress_bub]
type = ComputeLinearElasticStress
base_name = bub
[../]
[./global_stress]
type = TwoPhaseStressMaterial
base_A = matrix
base_B = bub
[../]
[./surface_tension]
type = ComputeSurfaceTensionKKS
v = eta
kappa_name = kappa
w = 0.356
[../]
[./gas_pressure]
type = ComputeExtraStressVDWGas
T = T
b = b
cg = cgb
Va = Va
nondim_factor = 63e9
base_name = bub
outputs = exodus
[../]
[]
[BCs]
[./left_r]
type = DirichletBC
variable = disp_x
boundary = left
value = 0
[../]
[]
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm lu nonzero'
l_max_its = 30
nl_max_its = 15
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
nl_abs_tol = 1e-11
num_steps = 2
dt = 0.5
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/side_diffusive_flux_integral/side_diffusive_flux_integral.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Functions]
[./right_bc]
# Flux BC for computing the analytical solution in the postprocessor
type = ParsedFunction
expression = exp(y)+1
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = FunctionNeumannBC
variable = u
boundary = right
function = right_bc
[../]
[]
[Materials]
[./mat_props]
type = GenericConstantMaterial
block = 0
prop_names = diffusivity
prop_values = 2
[../]
[./mat_props_bnd]
type = GenericConstantMaterial
boundary = right
prop_names = diffusivity
prop_values = 1
[../]
[./mat_props_vector]
type = GenericConstantVectorMaterial
boundary = 'right top'
prop_names = diffusivity_vec
prop_values = '1 1.5 1'
[../]
[]
[Postprocessors]
inactive = 'avg_flux_top'
[./avg_flux_right]
# Computes -\int(exp(y)+1) from 0 to 1 which is -2.718281828
type = SideDiffusiveFluxIntegral
variable = u
boundary = right
diffusivity = diffusivity
[../]
[./avg_flux_top]
type = SideVectorDiffusivityFluxIntegral
variable = u
boundary = top
diffusivity = diffusivity_vec
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/verify_against_analytical/ad_1D_transient.i)
# This test solves a 1D transient heat equation
# The error is caclulated by comparing to the analytical solution
# The problem setup and analytical solution are taken from "Advanced Engineering
# Mathematics, 10th edition" by Erwin Kreyszig.
# http://www.amazon.com/Advanced-Engineering-Mathematics-Erwin-Kreyszig/dp/0470458364
# It is Example 1 in section 12.6 on page 561
[Mesh]
type = GeneratedMesh
dim = 1
nx = 160
xmax = 80
[]
[Variables]
[./T]
[../]
[]
[ICs]
[./T_IC]
type = FunctionIC
variable = T
function = '100*sin(pi*x/80)'
[../]
[]
[Kernels]
[./HeatDiff]
type = ADHeatConduction
variable = T
[../]
[./HeatTdot]
type = ADHeatConductionTimeDerivative
variable = T
[../]
[]
[BCs]
[./sides]
type = DirichletBC
variable = T
boundary = 'left right'
value = 0
[../]
[]
[Materials]
[./k]
type = ADGenericConstantMaterial
prop_names = 'thermal_conductivity'
prop_values = '0.95' #copper in cal/(cm sec C)
[../]
[./cp]
type = ADGenericConstantMaterial
prop_names = 'specific_heat'
prop_values = '0.092' #copper in cal/(g C)
[../]
[./rho]
type = ADGenericConstantMaterial
prop_names = 'density'
prop_values = '8.92' #copper in g/(cm^3)
[../]
[]
[Postprocessors]
[./error]
type = NodalL2Error
function = '100*sin(pi*x/80)*exp(-0.95/(0.092*8.92)*pi^2/80^2*t)'
variable = T
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
l_tol = 1e-6
dt = 2
end_time = 100
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/MultiPhase/mixedswitchingfunctionmaterial.i)
# This is a test of the MixedSwitchingfunctionmaterial
# Several mixed type of switching function with ajustable weight parameter
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmin = 0
xmax = 20
ymin = 0
ymax = 20
elem_type = QUAD4
[]
[Variables]
[./eta]
[../]
[]
[ICs]
[./IC_eta]
type = SmoothCircleIC
variable = eta
x1 = 10
y1 = 10
radius = 5
invalue = 1
outvalue = 0
int_width = 1
[../]
[]
[Kernels]
[./eta_bulk]
type = AllenCahn
variable = eta
f_name = F
[../]
[./eta_interface]
type = ACInterface
variable = eta
kappa_name = kappa_eta
[../]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'L kappa_eta'
prop_values = '1.0 1.0'
[../]
[./switching]
type = MixedSwitchingFunctionMaterial
function_name = h
eta = eta
h_order = MIX234
weight = 1.0
[../]
[./barrier]
type = BarrierFunctionMaterial
eta = eta
g_order = SIMPLE
[../]
# Total free energy: F = Fa*(1-h) + Fb*h
[./free_energy]
type = DerivativeTwoPhaseMaterial
property_name = F
fa_name = '0'
fb_name = '-1'
eta = eta
W = 3.1
derivative_order = 2
outputs = exodus
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'PJFNK'
l_max_its = 30
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-12
start_time = 0.0
num_steps = 2
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 9
iteration_window = 2
growth_factor = 1.1
cutback_factor = 0.75
dt = 0.3
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = 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/thermal_hydraulics/test/tests/materials/convective_heat_transfer_coefficient/test.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
allow_renumbering = false
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[AuxVariables]
[Hw]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[Hw_ak]
type = MaterialRealAux
variable = Hw
property = Hw
[]
[]
[Materials]
[props]
type = GenericConstantMaterial
prop_names = 'Nu k D_h'
prop_values = '1000 2 20'
[]
[Hw_material]
type = ConvectiveHeatTransferCoefficientMaterial
Nu = Nu
D_h = D_h
k = k
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[Hw]
type = ElementalVariableValue
elementid = 0
variable = Hw
[]
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(modules/stochastic_tools/test/tests/multiapps/batch_commandline_control/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
[]
[Variables]
[u]
initial_condition = 1980
[]
[]
[Problem]
type = FEProblem
solve = false
[]
[Executioner]
type = Steady
[]
[Materials]
[const]
type = GenericConstantMaterial
prop_names = 'A B C D'
prop_values = '1.0 2.0 3.0 4.0'
[]
[]
[Postprocessors]
[size]
type = AverageElementSize
execute_on = 'initial'
[]
[prop_A]
type = ElementAverageMaterialProperty
mat_prop = A
execute_on = 'initial'
[]
[prop_B]
type = ElementAverageMaterialProperty
mat_prop = B
execute_on = 'initial'
[]
[prop_C]
type = ElementAverageMaterialProperty
mat_prop = C
execute_on = 'initial'
[]
[prop_D]
type = ElementAverageMaterialProperty
mat_prop = D
execute_on = 'initial'
[]
[]
(modules/misc/test/tests/dynamic_loading/dynamic_obj_registration/dynamic_wrong_lib.i)
# This input file contains objects only available in solid_mechanics
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 2
nz = 0
xmax = 50
ymax = 25
zmax = 0
elem_type = QUAD4
uniform_refine = 2
[]
[Variables]
[c]
order = THIRD
family = HERMITE
[InitialCondition]
type = BoundingBoxIC
x1 = 15.0
x2 = 35.0
y1 = 0.0
y2 = 25.0
inside = 1.0
outside = -0.8
variable = c
[]
[]
[]
[Kernels]
[ie_c]
type = TimeDerivative
variable = c
[]
[CHSolid]
type = CHMath
variable = c
mob_name = M
[]
[CHInterface]
type = CHInterface
variable = c
kappa_name = kappa_c
mob_name = M
[]
[]
[BCs]
[Periodic]
[all]
auto_direction = 'x y'
[]
[]
[]
[Materials]
[constant]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1.0 1.0'
block = 0
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 101'
l_max_its = 15
nl_max_its = 10
start_time = 0.0
num_steps = 2
dt = 1.0
[]
[Outputs]
exodus = true
[]
# Here we'll load the wrong library and check for the correct error condition
[Problem]
register_objects_from = 'SolidMechanicsApp'
library_path = '../../../../../solid_mechanics/lib'
[]
(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/xfem/test/tests/moving_interface/moving_ad_diffusion.i)
[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]
type = GeneratedMesh
dim = 2
nx = 5
ny = 3
xmin = 0.0
xmax = 1
ymin = 0.0
ymax = 1
elem_type = QUAD4
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Variables]
[./u]
[../]
[]
[Functions]
[./ls_func]
type = ParsedFunction
expression = 'x-0.76+0.21*t'
[../]
[]
[Kernels]
[./diff]
type = ADMatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./time_deriv]
type = ADTimeDerivative
variable = u
[../]
[]
[Constraints]
[./u_constraint]
type = XFEMSingleVariableConstraint
use_displaced_mesh = false
variable = u
jump = 0
use_penalty = true
alpha = 1e5
geometric_cut_userobject = 'level_set_cut_uo'
[../]
[]
[BCs]
[./right_u]
type = ADDirichletBC
variable = u
boundary = left
value = 0
[../]
[./left_u]
type = ADDirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Materials]
[./diffusivity_A]
type = ADGenericConstantMaterial
prop_names = A_diffusion_coefficient
prop_values = 5
[../]
[./diffusivity_B]
type = ADGenericConstantMaterial
prop_names = B_diffusion_coefficient
prop_values = 0.5
[../]
[./diff_combined]
type = ADLevelSetBiMaterialReal
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = diffusion_coefficient
[../]
[]
[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'
l_max_its = 20
l_tol = 1e-8
nl_max_its = 15
nl_rel_tol = 2e-12
nl_abs_tol = 1e-50
start_time = 0.0
dt = 1
end_time = 2
max_xfem_update = 1
[]
[Outputs]
exodus = true
execute_on = timestep_end
file_base = moving_diffusion_out
perf_graph = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/phase_field/test/tests/initial_conditions/BimodalInverseSuperellipsoidsIC.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 25
xmax = 50
ymax = 50
elem_type = QUAD4
[]
[Variables]
[./c]
order = THIRD
family = HERMITE
[../]
[]
[ICs]
[./c]
type = BimodalInverseSuperellipsoidsIC
variable = c
x_positions = '25.0'
y_positions = '25.0'
z_positions = '0.0'
as = '20.0'
bs = '20.0'
cs = '1'
ns = '3.5'
npart = 8
invalue = 1.0
outvalue = -0.8
nestedvalue = -1.5
int_width = 0.0
large_spac = 5
small_spac = 2
small_a = 3
small_b = 3
small_c = 3
small_n = 2
size_variation_type = none
numtries = 10000
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./CHSolid]
type = CHMath
variable = c
mob_name = M
[../]
[./CHInterface]
type = CHInterface
variable = c
kappa_name = kappa_c
mob_name = M
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./constant]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1.0 1.0'
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_max_its = 20
l_tol = 1.0e-4
nl_max_its = 40
nl_rel_tol = 1e-9
start_time = 0.0
num_steps = 1
dt = 2.0
[]
[Outputs]
exodus = false
[./out]
type = Exodus
refinements = 2
[../]
[]
(modules/stochastic_tools/test/tests/surrogates/load_store/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = u
diffusivity = D
[]
[absorption]
type = MaterialReaction
variable = u
coefficient = sig
[]
[source]
type = BodyForce
variable = u
value = 1.0
[]
[]
[Materials]
[diffusivity]
type = GenericConstantMaterial
prop_names = D
prop_values = 2.0
[]
[xs]
type = GenericConstantMaterial
prop_names = sig
prop_values = 2.0
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Postprocessors]
[avg]
type = AverageNodalVariableValue
variable = u
[]
[max]
type = NodalExtremeValue
variable = u
value_type = max
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/velocity_channel/traction-supg.i)
# This input file tests outflow boundary conditions for the incompressible NS equations.
[GlobalParams]
gravity = '0 0 0'
integrate_p_by_parts = true
supg = true
preset = false
laplace = false
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 3.0
ymin = 0
ymax = 1.0
nx = 30
ny = 10
elem_type = QUAD9
[]
[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 = INSMomentumTractionForm
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[]
[y_momentum_space]
type = INSMomentumTractionForm
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'
[]
[]
[Materials]
[const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '1 1'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
solve_type = NEWTON
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = none
nl_rel_tol = 1e-12
[]
[Outputs]
[out]
type = Exodus
[]
[]
[Functions]
[inlet_func]
type = ParsedFunction
expression = '-4 * (y - 0.5)^2 + 1'
[]
[]
(test/tests/kernels/material_coupled_force/material_coupled_force.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
nx = 10
ymin = 0
ymax = 2
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./v1]
initial_condition = 3
[../]
[./v2]
[../]
[]
[ICs]
[./v2_ic]
type = FunctionIC
variable = v2
function = v2_func
[../]
[]
[Functions]
[./v2_func]
type = ParsedFunction
expression = 'x + 2 * y'
[../]
[./reference]
type = ParsedFunction
expression = '3 * (-1) * 3.5 + (x + 2 * y) * 15 * 1.2'
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'm1 m2'
prop_values = '-1 15'
[../]
[]
[Kernels]
[./reaction]
type = Reaction
variable = u
[../]
[./coupled]
type = MatCoupledForce
variable = u
v = 'v1 v2'
coef = '3.5 1.2'
material_properties = 'm1 m2'
[../]
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = reference
variable = u
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(test/tests/mortar/displaced-gap-conductance-2d-non-conforming/gap-conductance.i)
[Mesh]
displacements = 'disp_x disp_y'
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
# block 1: left
# block 2: right
[]
[./primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[../]
[./secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[../]
[]
[AuxVariables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[]
[AuxKernels]
[function_x]
type = FunctionAux
function = '.05 * t'
variable = 'disp_x'
block = '2'
[]
[function_y]
type = FunctionAux
function = '.05 * t'
variable = 'disp_y'
block = '2'
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[./T]
block = '1 2'
[../]
[./lambda]
block = '10'
family = MONOMIAL
order = CONSTANT
[../]
[]
[BCs]
[./left]
type = ADDirichletBC
variable = T
boundary = '5'
value = 0
[../]
[./right]
type = ADDirichletBC
variable = T
boundary = '8'
value = 1
[../]
[]
[Kernels]
[./conduction]
type = ADDiffusion
variable = T
block = '1 2'
[../]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[./mortar]
type = GapHeatConductanceTest
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
variable = lambda
secondary_variable = T
use_displaced_mesh = true
correct_edge_dropping = true
[../]
[]
[Materials]
[constant]
type = ADGenericConstantMaterial
prop_names = 'gap_conductance'
prop_values = '.03'
block = '1 2'
use_displaced_mesh = true
[]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = NEWTON
type = Transient
num_steps = 5
petsc_options_iname = '-pc_type -snes_linesearch_type'
petsc_options_value = 'lu basic'
[]
[Outputs]
exodus = true
[dofmap]
type = DOFMap
execute_on = 'initial'
[]
[]
(modules/stochastic_tools/test/tests/surrogates/pod_rb/errors/sub.i)
[Problem]
type = FEProblem
extra_tag_vectors = 'diff react bodyf'
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 15
xmax = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = u
diffusivity = k
extra_vector_tags = 'diff'
[]
[reaction]
type = MaterialReaction
variable = u
coefficient = alpha
extra_vector_tags = 'react'
[]
[source]
type = BodyForce
variable = u
value = 1.0
extra_vector_tags = 'bodyf'
[]
[]
[Materials]
[k]
type = GenericConstantMaterial
prop_names = k
prop_values = 1.0
[]
[alpha]
type = GenericConstantMaterial
prop_names = alpha
prop_values = 1.0
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
(modules/solid_mechanics/test/tests/crystal_plasticity/cp_eigenstrains/hcp_volumetric_eigenstrain_decrease.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
type = GeneratedMesh
dim = 3
nx = 2
ny = 2
nz = 2
elem_type = HEX8
[]
[AuxVariables]
[temperature]
order = FIRST
family = LAGRANGE
[]
[e_void_xx]
order = CONSTANT
family = MONOMIAL
[]
[e_void_yy]
order = CONSTANT
family = MONOMIAL
[]
[e_void_zz]
order = CONSTANT
family = MONOMIAL
[]
[f_void_zz]
order = CONSTANT
family = MONOMIAL
[]
[fp_zz]
order = CONSTANT
family = MONOMIAL
[]
[resolved_shear_stress_3]
order = CONSTANT
family = MONOMIAL
[]
[resolved_shear_stress_4]
order = CONSTANT
family = MONOMIAL
[]
[resolved_shear_stress_9]
order = CONSTANT
family = MONOMIAL
[]
[resolved_shear_stress_14]
order = CONSTANT
family = MONOMIAL
[]
[]
[Physics/SolidMechanics/QuasiStatic/all]
strain = FINITE
incremental = true
add_variables = true
[]
[AuxKernels]
[temperature]
type = FunctionAux
variable = temperature
function = '300+400*t' # temperature increases at a constant rate
execute_on = timestep_begin
[]
[e_void_xx]
type = RankTwoAux
variable = e_void_xx
rank_two_tensor = void_eigenstrain
index_j = 0
index_i = 0
execute_on = timestep_end
[]
[e_void_yy]
type = RankTwoAux
variable = e_void_yy
rank_two_tensor = void_eigenstrain
index_j = 1
index_i = 1
execute_on = timestep_end
[]
[e_void_zz]
type = RankTwoAux
variable = e_void_zz
rank_two_tensor = void_eigenstrain
index_j = 2
index_i = 2
execute_on = timestep_end
[]
[f_void_zz]
type = RankTwoAux
variable = f_void_zz
rank_two_tensor = volumetric_deformation_gradient
index_j = 2
index_i = 2
execute_on = timestep_end
[]
[fp_zz]
type = RankTwoAux
variable = fp_zz
rank_two_tensor = plastic_deformation_gradient
index_j = 2
index_i = 2
execute_on = timestep_end
[]
[tau_3]
type = MaterialStdVectorAux
variable = resolved_shear_stress_3
property = applied_shear_stress
index = 3
execute_on = timestep_end
[]
[tau_4]
type = MaterialStdVectorAux
variable = resolved_shear_stress_4
property = applied_shear_stress
index = 4
execute_on = timestep_end
[]
[tau_9]
type = MaterialStdVectorAux
variable = resolved_shear_stress_9
property = applied_shear_stress
index = 9
execute_on = timestep_end
[]
[tau_14]
type = MaterialStdVectorAux
variable = resolved_shear_stress_14
property = applied_shear_stress
index = 14
execute_on = timestep_end
[]
[]
[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
[]
[tdisp]
type = DirichletBC
variable = disp_z
boundary = front
value = 0
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeElasticityTensorCP
C_ijkl = '1.684e5 1.214e5 1.214e5 1.684e5 1.214e5 1.684e5 0.754e5 0.754e5 0.754e5'
fill_method = symmetric9
[]
[stress]
type = ComputeMultipleCrystalPlasticityStress
crystal_plasticity_models = 'trial_xtalpl'
eigenstrain_names = void_eigenstrain
tan_mod_type = exact
maximum_substep_iteration = 5
[]
[trial_xtalpl]
type = CrystalPlasticityHCPDislocationSlipBeyerleinUpdate
number_slip_systems = 15
slip_sys_file_name = hcp_aprismatic_capyramidal_slip_sys.txt
unit_cell_dimension = '2.934e-7 2.934e-7 4.657e-7' #Ti, in mm, https://materialsproject.org/materials/mp-46/
temperature = temperature
initial_forest_dislocation_density = 15.0e3
initial_substructure_density = 1.0e3
slip_system_modes = 2
number_slip_systems_per_mode = '3 12'
lattice_friction_per_mode = '9 22' #Knezevic et al MSEA 654 (2013)
effective_shear_modulus_per_mode = '4.7e2 4.7e2' #Ti, in MPa, https://materialsproject.org/materials/mp-46/
burgers_vector_per_mode = '2.934e-7 6.586e-7' #Ti, in mm, https://materialsproject.org/materials/mp-46/
slip_generation_coefficient_per_mode = '1.25e5 2.25e7' #from Beyerlein and Tome 2008 IJP
normalized_slip_activiation_energy_per_mode = '3.73e-3 3.2e-2' #from Beyerlein and Tome 2008 IJP
slip_energy_proportionality_factor_per_mode = '330 100' #from Beyerlein and Tome 2008 IJP
substructure_rate_coefficient_per_mode = '355 0.4' #from Capolungo et al MSEA (2009)
applied_strain_rate = 0.001
gamma_o = 1.0e-3
Hall_Petch_like_constant_per_mode = '0.2 0.2' #Estimated to match graph in Capolungo et al MSEA (2009), Figure 2
grain_size = 20.0e-3 #20 microns, Beyerlein and Tome IJP (2008)
[]
[void_eigenstrain]
type = ComputeCrystalPlasticityVolumetricEigenstrain
eigenstrain_name = void_eigenstrain
deformation_gradient_name = volumetric_deformation_gradient
mean_spherical_void_radius = void_radius
spherical_void_number_density = void_density
[]
[void_radius]
type = ParsedMaterial
property_name = void_radius
coupled_variables = temperature
expression = 'if(temperature<321.0, 1.0e-5, (1.0e-5 - 5.0e-8 * (temperature - 320)))' #mm
[]
[void_density]
type = GenericConstantMaterial
prop_names = void_density
prop_values = '1.0e8' ###1/mm^3
[]
[]
[Postprocessors]
[e_void_xx]
type = ElementAverageValue
variable = e_void_xx
[]
[e_void_yy]
type = ElementAverageValue
variable = e_void_yy
[]
[e_void_zz]
type = ElementAverageValue
variable = e_void_zz
[]
[f_void_zz]
type = ElementAverageValue
variable = f_void_zz
[]
[void_density]
type = ElementAverageMaterialProperty
mat_prop = void_density
execute_on = TIMESTEP_END
[]
[void_radius]
type = ElementAverageMaterialProperty
mat_prop = void_radius
execute_on = TIMESTEP_END
[]
[fp_zz]
type = ElementAverageValue
variable = fp_zz
[]
[tau_3]
type = ElementAverageValue
variable = resolved_shear_stress_3
[]
[tau_4]
type = ElementAverageValue
variable = resolved_shear_stress_4
[]
[tau_9]
type = ElementAverageValue
variable = resolved_shear_stress_9
[]
[tau_14]
type = ElementAverageValue
variable = resolved_shear_stress_14
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
nl_abs_tol = 1e-10
nl_rel_tol = 1e-8
nl_abs_step_tol = 1e-10
dt = 0.05
dtmin = 1e-4
num_steps = 10
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_htonly/planar_xz.i)
# 1-D Gap Heat Transfer Test without mechanics
#
# This test exercises 1-D gap heat transfer for a constant conductivity gap.
#
# The mesh consists of two element blocks in the x-z plane. Each element block
# is a square. They sit next to one another with a unit between them.
#
# The conductivity of both blocks is set very large to achieve a uniform temperature
# across each block. The temperature of the far bottom boundary
# is ramped from 100 to 200 over one time unit. The temperature of the far top
# boundary is held fixed at 100.
#
# A simple analytical solution is possible for the heat flux between the blocks:
#
# Flux = (T_left - T_right) * (gapK/gap_width)
#
# The gap conductivity is specified as 1, thus
#
# gapK(Tavg) = 1.0*Tavg
#
# The heat flux across the gap at time = 1 is then:
#
# Flux = 100 * (1.0/1.0) = 100
#
# For comparison, see results from the flux post processors. These results
# are the same as for the unit 1-D gap heat transfer between two unit cubes.
[Mesh]
[file]
type = FileMeshGenerator
file = simple_2D.e
[]
[./rotate]
type = TransformGenerator
transform = ROTATE
vector_value = '0 90 0'
input = file
[../]
[]
[Functions]
[./temp]
type = PiecewiseLinear
x = '0 1 2'
y = '100 200 200'
[../]
[]
[ThermalContact]
[./thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 3
secondary = 2
emissivity_primary = 0
emissivity_secondary = 0
[../]
[]
[Variables]
[./temp]
order = FIRST
family = LAGRANGE
initial_condition = 100
[../]
[]
[AuxVariables]
[./gap_cond]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = temp
[../]
[]
[BCs]
[./temp_far_bottom]
type = FunctionDirichletBC
boundary = 1
variable = temp
function = temp
[../]
[./temp_far_top]
type = DirichletBC
boundary = 4
variable = temp
value = 100
[../]
[]
[AuxKernels]
[./conductance]
type = MaterialRealAux
property = gap_conductance
variable = gap_cond
boundary = 2
[../]
[]
[Materials]
[./heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 100000000.0
[../]
[./density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '1.0'
[../]
[]
[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 4'
line_search = 'none'
nl_rel_tol = 1e-12
l_tol = 1e-3
l_max_its = 100
dt = 1e-1
end_time = 1.0
[]
[Postprocessors]
[./temp_bottom]
type = SideAverageValue
boundary = 2
variable = temp
execute_on = 'initial timestep_end'
[../]
[./temp_top]
type = SideAverageValue
boundary = 3
variable = temp
execute_on = 'initial timestep_end'
[../]
[./flux_bottom]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[../]
[./flux_top]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/materials/functor_properties/traditional-mat-props.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[diff_u]
type = MatDiffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = 'left'
value = 1
[]
[right]
type = DirichletBC
variable = u
boundary = 'right'
value = 0
[]
[]
[Materials]
[block0]
type = GenericConstantMaterial
block = '0'
prop_names = 'D'
prop_values = '4'
[]
[block1]
type = GenericConstantMaterial
block = '1'
prop_names = 'D'
prop_values = '2'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/heat_source_bar/heat_source_bar.i)
# This is a simple 1D test of the volumetric heat source with material properties
# of a representative ceramic material. A bar is uniformly heated, and a temperature
# boundary condition is applied to the left side of the bar.
# Important properties of problem:
# Length: 0.01 m
# Thermal conductivity = 3.0 W/(mK)
# Specific heat = 300.0 J/K
# density = 10431.0 kg/m^3
# Prescribed temperature on left side: 600 K
# When it has reached steady state, the temperature as a function of position is:
# T = -q/(2*k) (x^2 - 2*x*length) + 600
# or
# T = -6.3333e+7 * (x^2 - 0.02*x) + 600
# on left side: T=600, on right side, T=6933.3
[Mesh]
type = GeneratedMesh
dim = 1
xmax = 0.01
nx = 20
[]
[Variables]
[./temp]
initial_condition = 300.0
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = temp
[../]
[./heatsource]
type = HeatSource
function = volumetric_heat
variable = temp
[../]
[]
[BCs]
[./lefttemp]
type = DirichletBC
boundary = left
variable = temp
value = 600
[../]
[]
[Materials]
[./density]
type = GenericConstantMaterial
prop_names = 'density thermal_conductivity'
prop_values = '10431.0 3.0'
[../]
[]
[Functions]
[./volumetric_heat]
type = ParsedFunction
expression = 3.8e+8
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./right]
type = SideAverageValue
variable = temp
boundary = right
[../]
[./error]
type = NodalL2Error
function = '-3.8e+8/(2*3) * (x^2 - 2*x*0.01) + 600'
variable = temp
[../]
[]
[Outputs]
execute_on = FINAL
exodus = true
[]
(modules/misc/test/tests/kernels/thermo_diffusion/thermo_diffusion.i)
# Steady-state test for the ThermoDiffusion kernel.
#
# This test applies a constant temperature gradient to drive thermo-diffusion
# in the variable u. At steady state, the thermo-diffusion is balanced by
# diffusion due to Fick's Law, so the total flux is
#
# J = -D ( grad(u) - ( Qstar u / R ) grad(1/T) )
#
# If there are no fluxes at the boundaries, then there is no background flux and
# these two terms must balance each other everywhere:
#
# grad(u) = ( Qstar u / R ) grad(1/T)
#
# The dx can be eliminated to give
#
# d(ln u) / d(1/T) = Qstar / R
#
# This can be solved to give the profile for u as a function of temperature:
#
# u = A exp( Qstar / R T )
#
# Here, we are using simple heat conduction with Dirichlet boundaries on 0 <= x <= 1
# to give a linear profile for temperature: T = x + 1. We also need to apply one
# boundary condition on u, which is u(x=0) = 1. These conditions give:
#
# u = exp( -(Qstar/R) (x/(x+1)) )
#
# This analytical result is tracked by the aux variable "correct_u".
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
[]
[Variables]
[./u]
initial_condition = 1
[../]
[./temp]
initial_condition = 1
[../]
[]
[Kernels]
[./soret]
type = ThermoDiffusion
variable = u
temp = temp
gas_constant = 1
[../]
[./diffC]
type = Diffusion
variable = u
[../]
# Heat diffusion gives a linear temperature profile to drive the Soret diffusion.
[./diffT]
type = Diffusion
variable = temp
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
preset = false
boundary = left
value = 1
[../]
[./leftt]
type = DirichletBC
variable = temp
preset = false
boundary = left
value = 1
[../]
[./rightt]
type = DirichletBC
variable = temp
preset = false
boundary = right
value = 2
[../]
[]
[Materials]
[./fake_material]
type = GenericConstantMaterial
block = 0
prop_names = 'mass_diffusivity heat_of_transport'
prop_values = '1 1'
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./error]
type = NodalL2Error
variable = u
function = 'exp(-x/(x+1))'
[../]
[]
[Outputs]
execute_on = FINAL
exodus = true
[]
(test/tests/controls/moose_base_naming_access/base_param.i)
[Mesh]
type = GeneratedMesh
dim = 2
elem_type = QUAD4
# use odd numbers so points do not fall on element boundaries
nx = 31
ny = 31
[]
[Variables]
[./diffused]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = diffused
[../]
[]
[DiracKernels]
[./test_object]
type = MaterialPointSource
point = '0.5 0.5 0'
variable = diffused
[../]
[]
[BCs]
[./bottom_diffused]
type = DirichletBC
variable = diffused
boundary = 'bottom'
value = 2
[../]
[./top_diffused]
type = DirichletBC
variable = diffused
boundary = 'top'
value = 0
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'matp'
prop_values = '1'
block = 0
[../]
[]
[Postprocessors]
[./test_object]
type = TestControlPointPP
function = '2*(x+y)'
point = '0.5 0.5 0'
[../]
[./other_point_test_object]
type = TestControlPointPP
function = '3*(x+y)'
point = '0.5 0.5 0'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
[Controls]
[./point_control]
type = TestControl
test_type = 'point'
parameter = 'Postprocessor::*/point'
execute_on = 'initial'
[../]
[]
(modules/contact/test/tests/mortar_dynamics/block-dynamics-action.i)
starting_point = 2e-1
offset = -0.19
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = long-bottom-block-no-lower-d.e
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[DynamicTensorMechanics]
displacements = 'disp_x disp_y'
generate_output = 'stress_xx stress_yy'
strain = FINITE
block = '1 2'
stiffness_damping_coefficient = 1.0
hht_alpha = 0.0
[]
[inertia_x]
type = InertialForce
variable = disp_x
velocity = vel_x
acceleration = accel_x
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[inertia_y]
type = InertialForce
variable = disp_y
velocity = vel_y
acceleration = accel_y
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[strain]
type = ComputeFiniteStrain
block = '1 2'
[]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '7750'
[]
[]
[AuxVariables]
[vel_x]
block = '1 2'
[]
[accel_x]
block = '1 2'
[]
[vel_y]
block = '1 2'
[]
[accel_y]
block = '1 2'
[]
[vel_z]
block = '1 2'
[]
[accel_z]
block = '1 2'
[]
[]
[AuxKernels]
[accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = 'LINEAR timestep_end'
[]
[vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = 'LINEAR timestep_end'
[]
[accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = 'LINEAR timestep_end'
[]
[vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = 'LINEAR timestep_end'
[]
[]
[Contact]
[mechanical]
primary = 20
secondary = 10
formulation = mortar
model = frictionless
c_normal = 1e4
capture_tolerance = 1.0e-5
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 4 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 75
dt = 0.05
dtmin = .05
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err '
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
nl_max_its = 20
line_search = 'none'
snesmf_reuse_base = false
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
checkpoint = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = ''
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[]
(modules/phase_field/test/tests/slkks/full_solve.i)
#
# SLKKS two phase example for the BCC and SIGMA phases. The sigma phase contains
# multiple sublattices. Free energy from
# Jacob, Aurelie, Erwin Povoden-Karadeniz, and Ernst Kozeschnik. "Revised thermodynamic
# description of the Fe-Cr system based on an improved sublattice model of the sigma phase."
# Calphad 60 (2018): 16-28.
#
# In this simulation we consider diffusion (Cahn-Hilliard) and phase transformation.
#
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 30
ny = 1
xmin = -25
xmax = 25
[]
[]
[AuxVariables]
[Fglobal]
order = CONSTANT
family = MONOMIAL
[]
[]
[Variables]
# order parameters
[eta1]
initial_condition = 0.5
[]
[eta2]
initial_condition = 0.5
[]
# solute concentration
[cCr]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = FunctionIC
function = '(x+25)/50*0.5+0.1'
[]
[]
# sublattice concentrations (good guesses are needed here! - they can be obtained
# form a static solve like in sublattice_concentrations.i)
[BCC_CR]
[InitialCondition]
type = FunctionIC
function = '(x+25)/50*0.5+0.1'
[]
[]
[SIGMA_0CR]
[InitialCondition]
type = FunctionIC
function = '(x+25)/50*0.17+0.01'
[]
[]
[SIGMA_1CR]
[InitialCondition]
type = FunctionIC
function = '(x+25)/50*0.36+0.02'
[]
[]
[SIGMA_2CR]
[InitialCondition]
type = FunctionIC
function = '(x+25)/50*0.33+0.20'
[]
[]
# Lagrange multiplier
[lambda]
[]
[]
[Materials]
# CALPHAD free energies
[F_BCC_A2]
type = DerivativeParsedMaterial
property_name = F_BCC_A2
outputs = exodus
output_properties = F_BCC_A2
expression = 'BCC_FE:=1-BCC_CR; G := 8.3145*T*(1.0*if(BCC_CR > 1.0e-15,BCC_CR*log(BCC_CR),0) + '
'1.0*if(BCC_FE > 1.0e-15,BCC_FE*plog(BCC_FE,eps),0) + 3.0*if(BCC_VA > '
'1.0e-15,BCC_VA*log(BCC_VA),0))/(BCC_CR + BCC_FE) + 8.3145*T*if(T < '
'548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - 932.5*BCC_CR*BCC_FE*BCC_VA + '
'311.5*BCC_CR*BCC_VA - '
'1043.0*BCC_FE*BCC_VA,-8.13674105561218e-49*T^15/(0.525599232981783*BCC_CR*BCC_FE*BCC_'
'VA*(BCC_CR - BCC_FE) - 0.894055608820709*BCC_CR*BCC_FE*BCC_VA + '
'0.298657718120805*BCC_CR*BCC_VA - BCC_FE*BCC_VA + 9.58772770853308e-13)^15 - '
'4.65558036243985e-30*T^9/(0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA + 0.298657718120805*BCC_CR*BCC_VA - '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^9 - '
'1.3485349181899e-10*T^3/(0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA + 0.298657718120805*BCC_CR*BCC_VA - '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^3 + 1 - '
'0.905299382744392*(548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'932.5*BCC_CR*BCC_FE*BCC_VA + 311.5*BCC_CR*BCC_VA - 1043.0*BCC_FE*BCC_VA + '
'1.0e-9)/T,if(T < -548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'932.5*BCC_CR*BCC_FE*BCC_VA - 311.5*BCC_CR*BCC_VA + '
'1043.0*BCC_FE*BCC_VA,-8.13674105561218e-49*T^15/(-0.525599232981783*BCC_CR*BCC_FE*BCC'
'_VA*(BCC_CR - BCC_FE) + 0.894055608820709*BCC_CR*BCC_FE*BCC_VA - '
'0.298657718120805*BCC_CR*BCC_VA + BCC_FE*BCC_VA + 9.58772770853308e-13)^15 - '
'4.65558036243985e-30*T^9/(-0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) '
'+ 0.894055608820709*BCC_CR*BCC_FE*BCC_VA - 0.298657718120805*BCC_CR*BCC_VA + '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^9 - '
'1.3485349181899e-10*T^3/(-0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA - 0.298657718120805*BCC_CR*BCC_VA + '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^3 + 1 - '
'0.905299382744392*(-548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'932.5*BCC_CR*BCC_FE*BCC_VA - 311.5*BCC_CR*BCC_VA + 1043.0*BCC_FE*BCC_VA + '
'1.0e-9)/T,if(T > -548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'932.5*BCC_CR*BCC_FE*BCC_VA - 311.5*BCC_CR*BCC_VA + 1043.0*BCC_FE*BCC_VA & '
'548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - 932.5*BCC_CR*BCC_FE*BCC_VA + '
'311.5*BCC_CR*BCC_VA - 1043.0*BCC_FE*BCC_VA < '
'0,-79209031311018.7*(-0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA - 0.298657718120805*BCC_CR*BCC_VA + '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^5/T^5 - '
'3.83095660520737e+42*(-0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA - 0.298657718120805*BCC_CR*BCC_VA + '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^15/T^15 - '
'1.22565886734485e+72*(-0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) + '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA - 0.298657718120805*BCC_CR*BCC_VA + '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^25/T^25,if(T > '
'548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - 932.5*BCC_CR*BCC_FE*BCC_VA + '
'311.5*BCC_CR*BCC_VA - 1043.0*BCC_FE*BCC_VA & 548.2*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - '
'BCC_FE) - 932.5*BCC_CR*BCC_FE*BCC_VA + 311.5*BCC_CR*BCC_VA - 1043.0*BCC_FE*BCC_VA > '
'0,-79209031311018.7*(0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA + 0.298657718120805*BCC_CR*BCC_VA - '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^5/T^5 - '
'3.83095660520737e+42*(0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA + 0.298657718120805*BCC_CR*BCC_VA - '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^15/T^15 - '
'1.22565886734485e+72*(0.525599232981783*BCC_CR*BCC_FE*BCC_VA*(BCC_CR - BCC_FE) - '
'0.894055608820709*BCC_CR*BCC_FE*BCC_VA + 0.298657718120805*BCC_CR*BCC_VA - '
'BCC_FE*BCC_VA + 9.58772770853308e-13)^25/T^25,0))))*log((2.15*BCC_CR*BCC_FE*BCC_VA - '
'0.008*BCC_CR*BCC_VA + 2.22*BCC_FE*BCC_VA)*if(2.15*BCC_CR*BCC_FE*BCC_VA - '
'0.008*BCC_CR*BCC_VA + 2.22*BCC_FE*BCC_VA <= 0,-1.0,1.0) + 1)/(BCC_CR + BCC_FE) + '
'1.0*(BCC_CR*BCC_VA*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + '
'BCC_FE*BCC_VA*if(T >= 298.15 & T < 1811.0,77358.5*1/T - 23.5143*T*log(T) + 124.134*T '
'- 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= 1811.0 & T < '
'6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - 25383.581,0)))/(BCC_CR '
'+ BCC_FE) + 1.0*(BCC_CR*BCC_FE*BCC_VA*(500.0 - 1.5*T)*(BCC_CR - BCC_FE) + '
'BCC_CR*BCC_FE*BCC_VA*(24600.0 - 14.98*T) + BCC_CR*BCC_FE*BCC_VA*(9.15*T - '
'14000.0)*(BCC_CR - BCC_FE)^2)/(BCC_CR + BCC_FE); G/100000'
coupled_variables = 'BCC_CR'
constant_names = 'BCC_VA T eps'
constant_expressions = '1 1000 0.01'
[]
[F_SIGMA]
type = DerivativeParsedMaterial
property_name = F_SIGMA
outputs = exodus
output_properties = F_SIGMA
expression = 'SIGMA_0FE := 1-SIGMA_0CR; SIGMA_1FE := 1-SIGMA_1CR; SIGMA_2FE := 1-SIGMA_2CR; G := '
'8.3145*T*(10.0*if(SIGMA_0CR > 1.0e-15,SIGMA_0CR*plog(SIGMA_0CR,eps),0) + '
'10.0*if(SIGMA_0FE > 1.0e-15,SIGMA_0FE*plog(SIGMA_0FE,eps),0) + 4.0*if(SIGMA_1CR > '
'1.0e-15,SIGMA_1CR*plog(SIGMA_1CR,eps),0) + 4.0*if(SIGMA_1FE > '
'1.0e-15,SIGMA_1FE*plog(SIGMA_1FE,eps),0) + 16.0*if(SIGMA_2CR > '
'1.0e-15,SIGMA_2CR*plog(SIGMA_2CR,eps),0) + 16.0*if(SIGMA_2FE > '
'1.0e-15,SIGMA_2FE*plog(SIGMA_2FE,eps),0))/(10.0*SIGMA_0CR + 10.0*SIGMA_0FE + '
'4.0*SIGMA_1CR + 4.0*SIGMA_1FE + 16.0*SIGMA_2CR + 16.0*SIGMA_2FE) + '
'(SIGMA_0FE*SIGMA_1CR*SIGMA_2CR*SIGMA_2FE*(-70.0*T - 170400.0) + '
'SIGMA_0FE*SIGMA_1FE*SIGMA_2CR*SIGMA_2FE*(-10.0*T - 330839.0))/(10.0*SIGMA_0CR + '
'10.0*SIGMA_0FE + 4.0*SIGMA_1CR + 4.0*SIGMA_1FE + 16.0*SIGMA_2CR + 16.0*SIGMA_2FE) + '
'(SIGMA_0CR*SIGMA_1CR*SIGMA_2CR*(30.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - '
'26.908*T*log(T) + 157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= '
'2180.0 & T < 6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) '
'+ 132000.0) + SIGMA_0CR*SIGMA_1CR*SIGMA_2FE*(-110.0*T + 16.0*if(T >= 298.15 & T < '
'1811.0,77358.5*1/T - 23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - '
'5.89269e-8*T^3.0 + 1225.7,if(T >= 1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - '
'46.0*T*log(T) + 299.31255*T - 25383.581,0)) + 14.0*if(T >= 298.15 & T < '
'2180.0,139250.0*1/T - 26.908*T*log(T) + 157.48*T + 0.00189435*T^2.0 - '
'1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < 6000.0,-2.88526e+32*T^(-9.0) - '
'50.0*T*log(T) + 344.18*T - 34869.344,0)) + 123500.0) + '
'SIGMA_0CR*SIGMA_1FE*SIGMA_2CR*(4.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 26.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + 140486.0) '
'+ SIGMA_0CR*SIGMA_1FE*SIGMA_2FE*(20.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 10.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + 148800.0) '
'+ SIGMA_0FE*SIGMA_1CR*SIGMA_2CR*(10.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 20.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + 56200.0) + '
'SIGMA_0FE*SIGMA_1CR*SIGMA_2FE*(26.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 4.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + 152700.0) '
'+ SIGMA_0FE*SIGMA_1FE*SIGMA_2CR*(14.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 16.0*if(T >= 298.15 & T < 2180.0,139250.0*1/T - 26.908*T*log(T) + '
'157.48*T + 0.00189435*T^2.0 - 1.47721e-6*T^3.0 - 8856.94,if(T >= 2180.0 & T < '
'6000.0,-2.88526e+32*T^(-9.0) - 50.0*T*log(T) + 344.18*T - 34869.344,0)) + 46200.0) + '
'SIGMA_0FE*SIGMA_1FE*SIGMA_2FE*(30.0*if(T >= 298.15 & T < 1811.0,77358.5*1/T - '
'23.5143*T*log(T) + 124.134*T - 0.00439752*T^2.0 - 5.89269e-8*T^3.0 + 1225.7,if(T >= '
'1811.0 & T < 6000.0,2.2960305e+31*T^(-9.0) - 46.0*T*log(T) + 299.31255*T - '
'25383.581,0)) + 173333.0))/(10.0*SIGMA_0CR + 10.0*SIGMA_0FE + 4.0*SIGMA_1CR + '
'4.0*SIGMA_1FE + 16.0*SIGMA_2CR + 16.0*SIGMA_2FE); G/100000'
coupled_variables = 'SIGMA_0CR SIGMA_1CR SIGMA_2CR'
constant_names = 'T eps'
constant_expressions = '1000 0.01'
[]
# h(eta)
[h1]
type = SwitchingFunctionMaterial
function_name = h1
h_order = HIGH
eta = eta1
[]
[h2]
type = SwitchingFunctionMaterial
function_name = h2
h_order = HIGH
eta = eta2
[]
# g(eta)
[g1]
type = BarrierFunctionMaterial
function_name = g1
g_order = SIMPLE
eta = eta1
[]
[g2]
type = BarrierFunctionMaterial
function_name = g2
g_order = SIMPLE
eta = eta2
[]
# constant properties
[constants]
type = GenericConstantMaterial
prop_names = 'D L kappa'
prop_values = '10 1 0.1 '
[]
# Coefficients for diffusion equation
[Dh1]
type = DerivativeParsedMaterial
material_property_names = 'D h1(eta1)'
expression = D*h1
property_name = Dh1
coupled_variables = eta1
derivative_order = 1
[]
[Dh2a]
type = DerivativeParsedMaterial
material_property_names = 'D h2(eta2)'
expression = D*h2*10/30
property_name = Dh2a
coupled_variables = eta2
derivative_order = 1
[]
[Dh2b]
type = DerivativeParsedMaterial
material_property_names = 'D h2(eta2)'
expression = D*h2*4/30
property_name = Dh2b
coupled_variables = eta2
derivative_order = 1
[]
[Dh2c]
type = DerivativeParsedMaterial
material_property_names = 'D h2(eta2)'
expression = D*h2*16/30
property_name = Dh2c
coupled_variables = eta2
derivative_order = 1
[]
[]
[Kernels]
#Kernels for diffusion equation
[diff_time]
type = TimeDerivative
variable = cCr
[]
[diff_c1]
type = MatDiffusion
variable = cCr
diffusivity = Dh1
v = BCC_CR
args = eta1
[]
[diff_c2a]
type = MatDiffusion
variable = cCr
diffusivity = Dh2a
v = SIGMA_0CR
args = eta2
[]
[diff_c2b]
type = MatDiffusion
variable = cCr
diffusivity = Dh2b
v = SIGMA_1CR
args = eta2
[]
[diff_c2c]
type = MatDiffusion
variable = cCr
diffusivity = Dh2c
v = SIGMA_2CR
args = eta2
[]
# enforce pointwise equality of chemical potentials
[chempot1a2a]
# The BCC phase has only one sublattice
# we tie it to the first sublattice with site fraction 10/(10+4+16) in the sigma phase
type = KKSPhaseChemicalPotential
variable = BCC_CR
cb = SIGMA_0CR
kb = '${fparse 10/30}'
fa_name = F_BCC_A2
fb_name = F_SIGMA
args_b = 'SIGMA_1CR SIGMA_2CR'
[]
[chempot2a2b]
# This kernel ties the first two sublattices in the sigma phase together
type = SLKKSChemicalPotential
variable = SIGMA_0CR
a = 10
cs = SIGMA_1CR
as = 4
F = F_SIGMA
coupled_variables = 'SIGMA_2CR'
[]
[chempot2b2c]
# This kernel ties the remaining two sublattices in the sigma phase together
type = SLKKSChemicalPotential
variable = SIGMA_1CR
a = 4
cs = SIGMA_2CR
as = 16
F = F_SIGMA
coupled_variables = 'SIGMA_0CR'
[]
[phaseconcentration]
# This kernel ties the sum of the sublattice concentrations to the global concentration cCr
type = SLKKSMultiPhaseConcentration
variable = SIGMA_2CR
c = cCr
ns = '1 3'
as = '1 10 4 16'
cs = 'BCC_CR SIGMA_0CR SIGMA_1CR SIGMA_2CR'
h_names = 'h1 h2'
eta = 'eta1 eta2'
[]
# Kernels for Allen-Cahn equation for eta1
[deta1dt]
type = TimeDerivative
variable = eta1
[]
[ACBulkF1]
type = KKSMultiACBulkF
variable = eta1
Fj_names = 'F_BCC_A2 F_SIGMA'
hj_names = 'h1 h2'
gi_name = g1
eta_i = eta1
wi = 0.1
coupled_variables = 'BCC_CR SIGMA_0CR SIGMA_1CR SIGMA_2CR eta2'
[]
[ACBulkC1]
type = SLKKSMultiACBulkC
variable = eta1
F = F_BCC_A2
c = BCC_CR
ns = '1 3'
as = '1 10 4 16'
cs = 'BCC_CR SIGMA_0CR SIGMA_1CR SIGMA_2CR'
h_names = 'h1 h2'
eta = 'eta1 eta2'
[]
[ACInterface1]
type = ACInterface
variable = eta1
kappa_name = kappa
[]
[lagrange1]
type = SwitchingFunctionConstraintEta
variable = eta1
h_name = h1
lambda = lambda
coupled_variables = 'eta2'
[]
# Kernels for Allen-Cahn equation for eta1
[deta2dt]
type = TimeDerivative
variable = eta2
[]
[ACBulkF2]
type = KKSMultiACBulkF
variable = eta2
Fj_names = 'F_BCC_A2 F_SIGMA'
hj_names = 'h1 h2'
gi_name = g2
eta_i = eta2
wi = 0.1
coupled_variables = 'BCC_CR SIGMA_0CR SIGMA_1CR SIGMA_2CR eta1'
[]
[ACBulkC2]
type = SLKKSMultiACBulkC
variable = eta2
F = F_BCC_A2
c = BCC_CR
ns = '1 3'
as = '1 10 4 16'
cs = 'BCC_CR SIGMA_0CR SIGMA_1CR SIGMA_2CR'
h_names = 'h1 h2'
eta = 'eta1 eta2'
[]
[ACInterface2]
type = ACInterface
variable = eta2
kappa_name = kappa
[]
[lagrange2]
type = SwitchingFunctionConstraintEta
variable = eta2
h_name = h2
lambda = lambda
coupled_variables = 'eta1'
[]
# Lagrange-multiplier constraint kernel for lambda
[lagrange]
type = SwitchingFunctionConstraintLagrange
variable = lambda
h_names = 'h1 h2'
etas = 'eta1 eta2'
epsilon = 1e-6
[]
[]
[AuxKernels]
[GlobalFreeEnergy]
type = KKSMultiFreeEnergy
variable = Fglobal
Fj_names = 'F_BCC_A2 F_SIGMA'
hj_names = 'h1 h2'
gj_names = 'g1 g2'
interfacial_vars = 'eta1 eta2'
kappa_names = 'kappa kappa'
w = 0.1
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
line_search = none
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -ksp_gmres_restart'
petsc_options_value = 'asm lu nonzero 30'
l_max_its = 100
nl_max_its = 20
nl_abs_tol = 1e-10
end_time = 1000
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 12
iteration_window = 2
growth_factor = 2
cutback_factor = 0.5
dt = 0.1
[]
[]
[Postprocessors]
[F]
type = ElementIntegralVariablePostprocessor
variable = Fglobal
[]
[cmin]
type = NodalExtremeValue
value_type = min
variable = cCr
[]
[cmax]
type = NodalExtremeValue
value_type = max
variable = cCr
[]
[]
[Outputs]
exodus = true
print_linear_residuals = false
# exclude lagrange multiplier from output, it can diff more easily
hide = lambda
[]
(modules/chemical_reactions/test/tests/jacobian/coupled_equilsub2.i)
# Test the Jacobian terms for the CoupledBEEquilibriumSub Kernel using
# activity coefficients not equal to unity
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
[]
[Variables]
[./a]
order = FIRST
family = LAGRANGE
[../]
[./b]
order = FIRST
family = LAGRANGE
[../]
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./pressure]
type = RandomIC
variable = pressure
min = 1
max = 5
[../]
[./a]
type = RandomIC
variable = a
max = 1
min = 0
[../]
[./b]
type = RandomIC
variable = b
max = 1
min = 0
[../]
[]
[Kernels]
[./diff]
type = DarcyFluxPressure
variable = pressure
[../]
[./diff_b]
type = Diffusion
variable = b
[../]
[./a]
type = CoupledBEEquilibriumSub
variable = a
v = b
log_k = 2
weight = 2
sto_v = 1.5
sto_u = 2
gamma_eq = 2
gamma_u = 2.5
gamma_v = 1.5
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity'
prop_values = '1e-4 1e-4 0.2'
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 1
[]
[Outputs]
perf_graph = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
(test/tests/meshgenerators/patterned_mesh_generator/patterned_mesh_generator.i)
[Mesh]
[./fmg]
type = FileMeshGenerator
file = quad_mesh.e
[]
[./fmg2]
type = FileMeshGenerator
file = tri_mesh.e
[]
[./pmg]
type = PatternedMeshGenerator
inputs = 'fmg fmg2'
pattern = '0 0 0 0 0 0 0 0 0 0 0 0 0 0 ;
0 1 1 0 0 0 0 0 0 0 0 1 1 0 ;
0 1 1 1 0 0 0 0 0 0 1 1 1 0 ;
0 1 0 1 1 0 0 0 0 1 1 0 1 0 ;
0 1 0 0 1 1 0 0 1 1 0 0 1 0 ;
0 1 0 0 0 1 1 1 1 0 0 0 1 0 ;
0 1 0 0 0 0 1 1 0 0 0 0 1 0 ;
0 1 0 0 0 0 0 0 0 0 0 0 1 0 ;
0 1 0 0 0 0 0 0 0 0 0 0 1 0 ;
0 1 0 0 0 0 0 0 0 0 0 0 1 0 ;
0 1 0 0 0 0 0 0 0 0 0 0 1 0 ;
0 0 0 0 0 0 0 0 0 0 0 0 0 0'
bottom_boundary = 1
right_boundary = 2
top_boundary = 3
left_boundary = 4
[]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = MatCoefDiffusion
variable = u
conductivity = conductivity
[../]
[]
[BCs]
[./top]
type = DirichletBC
variable = u
boundary = 3
value = 1
[../]
[./bottom]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[]
[Materials]
[./mat1]
type = GenericConstantMaterial
block = 1
prop_names = conductivity
prop_values = 100
[../]
[./mat2]
type = GenericConstantMaterial
block = 2
prop_names = conductivity
prop_values = 1e-4
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/materials/average_wall_temperature_3eqn/average_wall_temperature_3eqn.i)
# Tests the average wall temperature aux for 1-phase flow. With the following
# inputs, the value should be equal to 1.25:
#
# i h_wall T_wall P_hf
# --------------------------
# 1 10 26/10 1
# 2 6 1/2 3
#
# T_fluid = 1/4
#
# With these values,
# P_tot = 1 + 3 = 4
# h_wall_avg = (1 * 10 + 3 * 6) / 4 = 28 / 4 = 7
# denominator = P_tot * h_wall_avg = 4 * 7 = 28
# numerator = 10 * (26/10 - 1/4) * 1 + 6 * (1/2 - 1/4) * 3 = 28
# T_wall_avg = T_fluid + numerator / denominator = 1/4 + 1
#
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
allow_renumbering = false
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[AuxVariables]
[Hw_avg]
family = MONOMIAL
order = CONSTANT
[]
[T_wall_avg]
family = MONOMIAL
order = CONSTANT
[]
[T_wall1]
family = MONOMIAL
order = CONSTANT
[]
[T_wall2]
family = MONOMIAL
order = CONSTANT
[]
[P_hf1]
family = MONOMIAL
order = CONSTANT
[]
[P_hf2]
family = MONOMIAL
order = CONSTANT
[]
[P_hf_total]
family = MONOMIAL
order = CONSTANT
[]
[T_fluid]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[T_wall_avg_auxkernel]
type = MaterialRealAux
variable = T_wall_avg
property = T_wall
[]
[T_wall1_auxkernel]
type = ConstantAux
variable = T_wall1
value = 2.6
[]
[T_wall2_auxkernel]
type = ConstantAux
variable = T_wall2
value = 0.5
[]
[P_hf_total_auxkernel]
type = SumAux
variable = P_hf_total
values = 'P_hf1 P_hf2'
[]
[P_hf1_auxkernel]
type = ConstantAux
variable = P_hf1
value = 1
[]
[P_hf2_auxkernel]
type = ConstantAux
variable = P_hf2
value = 3
[]
[T_fluid_auxkernel]
type = ConstantAux
variable = T_fluid
value = 0.25
[]
[]
[Materials]
[const_materials]
type = GenericConstantMaterial
prop_names = 'Hw1 Hw2'
prop_values = '10 6'
[]
[Hw_avg_material]
type = WeightedAverageMaterial
prop_name = Hw_avg
values = 'Hw1 Hw2'
weights = 'P_hf1 P_hf2'
[]
[T_wall_avg_material]
type = AverageWallTemperature3EqnMaterial
T_wall_sources = 'T_wall1 T_wall2'
Hw_sources = 'Hw1 Hw2'
P_hf_sources = 'P_hf1 P_hf2'
T_fluid = T_fluid
Hw_average = Hw_avg
P_hf_total = P_hf_total
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[T_wall_avg_pp]
type = ElementalVariableValue
elementid = 0
variable = T_wall_avg
[]
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(test/tests/misc/subdomain_setup/mat_prop_block.i)
[Mesh]
[./generator]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
[../]
[./subdomain1]
type = SubdomainBoundingBoxGenerator
input = generator
bottom_left = '0 0 0'
top_right = '0.5 0.5 0'
block_id = 1
[../]
[./subdomain2]
type = SubdomainBoundingBoxGenerator
input = subdomain1
bottom_left = '0.5 0 0'
top_right = '1 0.5 0'
block_id = 2
[../]
[./subdomain3]
type = SubdomainBoundingBoxGenerator
input = subdomain2
bottom_left = '0 0.5 0'
top_right = '0.5 1 0'
block_id = 3
[../]
[./subdomain4]
type = SubdomainBoundingBoxGenerator
input = subdomain3
bottom_left = '0.5 0.5 0'
top_right = '1 1 0'
block_id = 4
[../]
[]
[Debug]
show_material_props = true
[]
[Variables]
[./dummy]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./dummy]
type = Diffusion
variable = dummy
[../]
[]
[BCs]
[./dummy_left]
type = DirichletBC
variable = dummy
boundary = left
value = 0
[../]
[./dummy_right]
type = DirichletBC
variable = dummy
boundary = right
value = 1
[../]
[]
[AuxVariables]
[./var1]
family = MONOMIAL
order = CONSTANT
[../]
[./var2]
family = MONOMIAL
order = CONSTANT
[../]
[./var3]
family = MONOMIAL
order = CONSTANT
[../]
[../]
[AuxKernels]
[./var1]
variable = var1
type = MaterialPropertyBlockAux
mat_prop_name = prop1
[../]
[./var2]
variable = var2
type = MaterialPropertyBlockAux
mat_prop_name = prop2
[../]
[./var3]
variable = var3
type = MaterialRealAux
property = prop3
block = '2 3 4'
[../]
[]
[Materials]
[./mat1]
type = GenericConstantMaterial
block = '1 2 4'
prop_names = 'prop1'
prop_values = '0'
[../]
[./mat2]
type = GenericConstantMaterial
block = '2 3 4'
prop_names = 'prop2'
prop_values = '0'
[../]
[./mat3]
type = SubdomainConstantMaterial
block = '2 3 4'
mat_prop_name = 'prop3'
values = '4 2 1'
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/MultiSmoothCircleIC/latticesmoothcircleIC_normal_test.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 22
ny = 22
nz = 22
xmin = 0
xmax = 100
ymin = 0
ymax = 100
zmin = 0
zmax = 100
elem_type = HEX8
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./c]
type = LatticeSmoothCircleIC
variable = c
invalue = 1.0
outvalue = 0.0001
circles_per_side = '3 3 3'
pos_variation = 10.0
radius = 10.0
int_width = 12.0
radius_variation = 2
radius_variation_type = normal
[../]
[]
[Kernels]
active = 'ie_c diff'
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./diff]
type = MatDiffusion
variable = c
diffusivity = D_v
[../]
[]
[BCs]
[]
[Materials]
active = 'Dv'
[./Dv]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 0.074802
[../]
[]
[Postprocessors]
active = 'bubbles'
[./bubbles]
type = FeatureFloodCount
variable = c
execute_on = 'initial timestep_end'
flood_entity_type = NODAL
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart -mat_mffd_type'
petsc_options_value = 'hypre boomeramg 101 ds'
l_max_its = 20
l_tol = 1e-4
nl_max_its = 20
nl_rel_tol = 1e-9
nl_abs_tol = 1e-11
start_time = 0.0
num_steps =1
dt = 100.0
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/energy-conservation/q2q1.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
nx = 10
ny = 10
dim = 2
[]
[subdomain]
type = SubdomainBoundingBoxGenerator
bottom_left = '0.5 0 0'
top_right = '1 1 0'
block_id = 1
input = gen
[]
[break_boundary]
input = subdomain
type = BreakBoundaryOnSubdomainGenerator
boundaries = 'bottom top'
[]
[sideset]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
primary_block = '1'
paired_block = '0'
new_boundary = 'fluid_left'
[]
coord_type = RZ
second_order = true
[]
[Variables]
[T]
order = SECOND
[]
[velocity]
family = LAGRANGE_VEC
order = SECOND
block = 1
[]
[pressure]
block = 1
[]
[]
[Kernels]
[mass]
type = INSADMass
variable = pressure
block = 1
[]
[momentum_convection]
type = INSADMomentumAdvection
variable = velocity
block = 1
[]
[momentum_viscous]
type = INSADMomentumViscous
variable = velocity
block = 1
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = pressure
integrate_p_by_parts = true
block = 1
[]
[momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
block = 1
[]
[temperature_advection]
type = INSADEnergyAdvection
variable = T
block = 1
[]
[temperature_supg]
type = INSADEnergySUPG
variable = T
velocity = velocity
block = 1
[]
[temperature_conduction]
type = ADHeatConduction
variable = T
thermal_conductivity = 'k'
[]
[heat_source]
type = BodyForce
variable = T
block = 0
function = 'x + y'
[]
[]
[BCs]
[velocity_inlet]
type = VectorFunctionDirichletBC
variable = velocity
function_y = 1
boundary = 'bottom_to_1'
[]
[wall]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'fluid_left right'
[]
[convective_heat_transfer]
type = ConvectiveHeatFluxBC
variable = T
T_infinity = 0
heat_transfer_coefficient = 1
boundary = 'right'
[]
[]
[Materials]
[constant]
type = ADGenericConstantMaterial
prop_names = 'cp rho k mu'
prop_values = '1 1 1 1'
[]
[ins]
type = INSADStabilized3Eqn
pressure = pressure
velocity = velocity
temperature = T
block = 1
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
[]
[Outputs]
csv = true
[]
[Postprocessors]
[convective_heat_transfer]
type = ConvectiveHeatTransferSideIntegral
T_solid = T
T_fluid = 0
htc = 1
boundary = 'right'
[]
[advection]
type = INSADElementIntegralEnergyAdvection
temperature = T
velocity = velocity
cp = cp
rho = rho
block = 1
[]
[source]
type = FunctionElementIntegral
function = 'x + y'
block = 0
[]
[energy_balance]
type = ParsedPostprocessor
function = 'convective_heat_transfer + advection - source'
pp_names = 'convective_heat_transfer advection source'
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/rz-x-axial-coord/hand-coded-jac-pipe-flow-natural-bc.i)
mu=1
rho=1
pipe_length=10 # m
pipe_radius=1 # m
u_inlet=1
[GlobalParams]
integrate_p_by_parts = true
supg = true
pspg = true
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = ${pipe_length}
ymin = 0
ymax = ${pipe_radius}
nx = 50
ny = 5
[]
coord_type = 'RZ'
rz_coord_axis = x
[]
[Variables]
[velocity_x]
family = LAGRANGE
[]
[velocity_y]
family = LAGRANGE
[]
[p][]
[]
[Kernels]
[mass]
type = INSMassRZ
variable = p
u = velocity_x
v = velocity_y
pressure = p
[]
[x_momentum]
type = INSMomentumLaplaceFormRZ
variable = velocity_x
u = velocity_x
v = velocity_y
pressure = p
component = 0
[]
[y_momentum]
type = INSMomentumLaplaceFormRZ
variable = velocity_y
u = velocity_x
v = velocity_y
pressure = p
component = 1
[]
[]
[Functions]
[vel_x_inlet]
type = ParsedFunction
expression = '${u_inlet} * (${pipe_radius}^2 - y^2)'
[]
[]
[BCs]
[inlet_x]
type = FunctionDirichletBC
variable = velocity_x
boundary = 'left'
function = vel_x_inlet
[]
[zero_y]
type = FunctionDirichletBC
variable = velocity_y
boundary = 'left top bottom'
function = 0
[]
[zero_x]
type = FunctionDirichletBC
variable = velocity_x
boundary = 'top'
function = 0
[]
[]
[Materials]
[const]
type = GenericConstantMaterial
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
line_search = 'none'
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/dynamics/rayleigh_damping/rayleigh_newmark.i)
# Test for rayleigh damping implemented using Newmark time integration
# The test is for an 1D bar element of unit length fixed on one end
# with a ramped pressure boundary condition applied to the other end.
# zeta and eta correspond to the stiffness and mass proportional rayleigh damping
# beta and gamma are Newmark time integration parameters
# The equation of motion in terms of matrices is:
#
# M*accel + eta*M*vel + zeta*K*vel + K*disp = P*Area
#
# Here M is the mass matrix, K is the stiffness matrix, P is the applied pressure
#
# This equation is equivalent to:
#
# density*accel + eta*density*vel + zeta*d/dt(Div stress) + Div stress = P
#
# The first two terms on the left are evaluated using the Inertial force kernel
# The next two terms on the left involving zeta are evaluated using the
# DynamicStressDivergenceTensors Kernel
# The residual due to Pressure is evaluated using Pressure boundary condition
#
# The system will come to steady state slowly after the pressure becomes constant.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 0.0
xmax = 0.1
ymin = 0.0
ymax = 1.0
zmin = 0.0
zmax = 0.1
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[AuxVariables]
[vel_x]
[]
[accel_x]
[]
[vel_y]
[]
[accel_y]
[]
[vel_z]
[]
[accel_z]
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[DynamicSolidMechanics]
displacements = 'disp_x disp_y disp_z'
stiffness_damping_coefficient = 0.1
[]
[inertia_x]
type = InertialForce
variable = disp_x
velocity = vel_x
acceleration = accel_x
beta = 0.25
gamma = 0.5
eta = 0.1
[]
[inertia_y]
type = InertialForce
variable = disp_y
velocity = vel_y
acceleration = accel_y
beta = 0.25
gamma = 0.5
eta = 0.1
[]
[inertia_z]
type = InertialForce
variable = disp_z
velocity = vel_z
acceleration = accel_z
beta = 0.25
gamma = 0.5
eta = 0.1
[]
[]
[AuxKernels]
[accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = timestep_end
[]
[vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = timestep_end
[]
[accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = timestep_end
[]
[vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = timestep_end
[]
[accel_z]
type = NewmarkAccelAux
variable = accel_z
displacement = disp_z
velocity = vel_z
beta = 0.25
execute_on = timestep_end
[]
[vel_z]
type = NewmarkVelAux
variable = vel_z
acceleration = accel_z
gamma = 0.5
execute_on = timestep_end
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yy
index_i = 1
index_j = 1
[]
[]
[BCs]
[top_y]
type = DirichletBC
variable = disp_y
boundary = top
value = 0.0
[]
[top_x]
type = DirichletBC
variable = disp_x
boundary = top
value = 0.0
[]
[top_z]
type = DirichletBC
variable = disp_z
boundary = top
value = 0.0
[]
[bottom_x]
type = DirichletBC
variable = disp_x
boundary = bottom
value = 0.0
[]
[bottom_z]
type = DirichletBC
variable = disp_z
boundary = bottom
value = 0.0
[]
[Pressure]
[Side1]
boundary = bottom
function = pressure
factor = 1
displacements = 'disp_x disp_y disp_z'
[]
[]
[]
[Materials]
[Elasticity_tensor]
type = ComputeElasticityTensor
block = 0
fill_method = symmetric_isotropic
C_ijkl = '210e9 0'
[]
[strain]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[]
[stress]
type = ComputeLinearElasticStress
block = 0
[]
[density]
type = GenericConstantMaterial
block = 0
prop_names = 'density'
prop_values = '7750'
[]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 2
dt = 0.1
[]
[Functions]
[pressure]
type = PiecewiseLinear
x = '0.0 0.1 0.2 1.0 2.0 5.0'
y = '0.0 0.1 0.2 1.0 1.0 1.0'
scale_factor = 1e9
[]
[]
[Postprocessors]
[_dt]
type = TimestepSize
[]
[disp]
type = NodalExtremeValue
variable = disp_y
boundary = bottom
[]
[vel]
type = NodalExtremeValue
variable = vel_y
boundary = bottom
[]
[accel]
type = NodalExtremeValue
variable = accel_y
boundary = bottom
[]
[stress_yy]
type = ElementAverageValue
variable = stress_yy
[]
[strain_yy]
type = ElementAverageValue
variable = strain_yy
[]
[]
[Outputs]
exodus = true
perf_graph = true
[]
(test/tests/postprocessors/element_integral_material_property/element_integral_material_property.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 2
ymax = 2
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
block = 0
prop_names = prop
prop_values = 2.0
[../]
[]
[Postprocessors]
[./prop_integral]
type = ElementIntegralMaterialProperty
mat_prop = prop
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(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/chemical_reactions/examples/calcium_bicarbonate/calcium_bicarbonate.i)
# Example of reactive transport model with precipitation and dissolution.
# Calcium (ca2) and bicarbonate (hco3) reaction to form calcite (CaCO3).
# Models bicarbonate injection following calcium injection, so that a
# moving reaction front forms a calcite precipitation zone. As the front moves,
# the upstream side of the front continues to form calcite via precipitation,
# while at the downstream side, dissolution of the solid calcite occurs.
#
# The reaction network considered is as follows:
# Aqueous equilibrium reactions:
# a) h+ + hco3- = CO2(aq), Keq = 10^(6.341)
# b) hco3- = h+ + CO23-, Keq = 10^(-10.325)
# c) ca2+ + hco3- = h+ + CaCO3(aq), Keq = 10^(-7.009)
# d) ca2+ + hco3- = cahco3+, Keq = 10^(-0.653)
# e) ca2+ = h+ + CaOh+, Keq = 10^(-12.85)
# f) - h+ = oh-, Keq = 10^(-13.991)
#
# Kinetic reactions
# g) ca2+ + hco3- = h+ + CaCO3(s), A = 0.461 m^2/L, k = 6.456542e-2 mol/m^2 s,
# Keq = 10^(1.8487)
#
# The primary chemical species are h+, hco3- and ca2+. The pressure gradient is fixed,
# and a conservative tracer is also included.
#
# This example is taken from:
# Guo et al, A parallel, fully coupled, fully implicit solution to reactive
# transport in porous media using the preconditioned Jacobian-Free Newton-Krylov
# Method, Advances in Water Resources, 53, 101-108 (2013).
[Mesh]
type = GeneratedMesh
dim = 2
nx = 100
xmax = 1
ymax = 0.25
[]
[Variables]
[./tracer]
[../]
[./ca2+]
[../]
[./h+]
initial_condition = 1.0e-7
scaling = 1e6
[../]
[./hco3-]
[../]
[]
[AuxVariables]
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./pressure_ic]
type = FunctionIC
variable = pressure
function = pic
[../]
[./hco3_ic]
type = BoundingBoxIC
variable = hco3-
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 0.25
inside = 5.0e-2
outside = 1.0e-6
[../]
[./ca2_ic]
type = BoundingBoxIC
variable = ca2+
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 0.25
inside = 1.0e-6
outside = 5.0e-2
[../]
[./tracer_ic]
type = BoundingBoxIC
variable = tracer
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 0.25
inside = 1.0
outside = 0.0
[../]
[]
[Functions]
[./pic]
type = ParsedFunction
expression = 60-50*x
[../]
[]
[ReactionNetwork]
[./AqueousEquilibriumReactions]
primary_species = 'ca2+ hco3- h+'
secondary_species = 'co2_aq co32- caco3_aq cahco3+ caoh+ oh-'
pressure = pressure
reactions = 'h+ + hco3- = co2_aq 6.341,
hco3- - h+ = co32- -10.325,
ca2+ + hco3- - h+ = caco3_aq -7.009,
ca2+ + hco3- = cahco3+ -0.653,
ca2+ - h+ = caoh+ -12.85,
- h+ = oh- -13.991'
[../]
[./SolidKineticReactions]
primary_species = 'ca2+ hco3- h+'
kin_reactions = 'ca2+ + hco3- - h+ = caco3_s'
secondary_species = caco3_s
log10_keq = 1.8487
reference_temperature = 298.15
system_temperature = 298.15
gas_constant = 8.314
specific_reactive_surface_area = 4.61e-4
kinetic_rate_constant = 6.456542e-7
activation_energy = 1.5e4
[../]
[]
[Kernels]
[./tracer_ie]
type = PrimaryTimeDerivative
variable = tracer
[../]
[./tracer_pd]
type = PrimaryDiffusion
variable = tracer
[../]
[./tracer_conv]
type = PrimaryConvection
variable = tracer
p = pressure
[../]
[./ca2+_ie]
type = PrimaryTimeDerivative
variable = ca2+
[../]
[./ca2+_pd]
type = PrimaryDiffusion
variable = ca2+
[../]
[./ca2+_conv]
type = PrimaryConvection
variable = ca2+
p = pressure
[../]
[./h+_ie]
type = PrimaryTimeDerivative
variable = h+
[../]
[./h+_pd]
type = PrimaryDiffusion
variable = h+
[../]
[./h+_conv]
type = PrimaryConvection
variable = h+
p = pressure
[../]
[./hco3-_ie]
type = PrimaryTimeDerivative
variable = hco3-
[../]
[./hco3-_pd]
type = PrimaryDiffusion
variable = hco3-
[../]
[./hco3-_conv]
type = PrimaryConvection
variable = hco3-
p = pressure
[../]
[]
[BCs]
[./tracer_left]
type = DirichletBC
variable = tracer
boundary = left
value = 1.0
[../]
[./tracer_right]
type = ChemicalOutFlowBC
variable = tracer
boundary = right
[../]
[./ca2+_left]
type = SinDirichletBC
variable = ca2+
boundary = left
initial = 5.0e-2
final = 1.0e-6
duration = 1
[../]
[./ca2+_right]
type = ChemicalOutFlowBC
variable = ca2+
boundary = right
[../]
[./hco3-_left]
type = SinDirichletBC
variable = hco3-
boundary = left
initial = 1.0e-6
final = 5.0e-2
duration = 1
[../]
[./hco3-_right]
type = ChemicalOutFlowBC
variable = hco3-
boundary = right
[../]
[./h+_left]
type = DirichletBC
variable = h+
boundary = left
value = 1.0e-7
[../]
[./h+_right]
type = ChemicalOutFlowBC
variable = h+
boundary = right
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity'
prop_values = '1e-7 2e-4 0.2'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
l_max_its = 50
l_tol = 1e-5
nl_max_its = 10
nl_rel_tol = 1e-5
end_time = 10
[./TimeStepper]
type = ConstantDT
dt = 0.1
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Outputs]
perf_graph = true
exodus = true
[]
(modules/phase_field/test/tests/mobility_derivative/mobility_derivative_split_coupled_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
xmax = 30.0
ymax = 30.0
elem_type = QUAD4
[]
[Variables]
[./c]
[../]
[./w]
[../]
[./d]
[../]
[]
[ICs]
[./c_IC]
type = CrossIC
x1 = 0.0
x2 = 30.0
y1 = 0.0
y2 = 30.0
variable = c
[../]
[./d_IC]
type = BoundingBoxIC
x1 = 0.0
x2 = 15.0
y1 = 0.0
y2 = 30.0
inside = 1.0
outside = 0.0
variable = d
[../]
[]
[Kernels]
[./cres]
type = SplitCHParsed
variable = c
kappa_name = kappa_c
w = w
f_name = F
[../]
[./wres]
type = SplitCHWRes
variable = w
mob_name = M
coupled_variables = 'c d'
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./d_dot]
type = TimeDerivative
variable = d
[../]
[./d_diff]
type = MatDiffusion
variable = d
diffusivity = diffusivity
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./kappa]
type = GenericConstantMaterial
prop_names = 'kappa_c'
prop_values = '2.0'
[../]
[./mob]
type = DerivativeParsedMaterial
property_name = M
coupled_variables = 'c d'
expression = 'if(d>0.001,d,0.001)*(1-0.5*c^2)'
outputs = exodus
derivative_order = 1
[../]
[./free_energy]
type = MathEBFreeEnergy
property_name = F
c = c
[../]
[./d_diff]
type = GenericConstantMaterial
prop_names = diffusivity
prop_values = 0.1
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'BDF2'
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 lu 1'
l_max_its = 30
l_tol = 1.0e-4
nl_max_its = 50
nl_rel_tol = 1.0e-10
dt = 10.0
num_steps = 2
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialMultiphase_AD.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmin = -20
xmax = 20
ymin = -20
ymax = 20
[]
[GlobalParams]
op_num = 2
var_name_base = etab
[]
[Variables]
[w]
[]
[etaa0]
[]
[etab0]
[]
[etab1]
[]
[]
[AuxVariables]
[bnds]
order = FIRST
family = LAGRANGE
[]
[]
[ICs]
[IC_etaa0]
type = FunctionIC
variable = etaa0
function = ic_func_etaa0
[]
[IC_etab0]
type = FunctionIC
variable = etab0
function = ic_func_etab0
[]
[IC_etab1]
type = FunctionIC
variable = etab1
function = ic_func_etab1
[]
[IC_w]
type = ConstantIC
value = -0.05
variable = w
[]
[]
[Functions]
[ic_func_etaa0]
type = ADParsedFunction
value = 'r:=sqrt(x^2+y^2);0.5*(1.0-tanh((r-10.0)/sqrt(2.0)))'
[]
[ic_func_etab0]
type = ADParsedFunction
value = 'r:=sqrt(x^2+y^2);0.5*(1.0+tanh((r-10)/sqrt(2.0)))*0.5*(1.0+tanh((y)/sqrt(2.0)))'
[]
[ic_func_etab1]
type = ADParsedFunction
value = 'r:=sqrt(x^2+y^2);0.5*(1.0+tanh((r-10)/sqrt(2.0)))*0.5*(1.0-tanh((y)/sqrt(2.0)))'
[]
[]
[BCs]
[]
[Kernels]
# Order parameter eta_alpha0
[ACa0_bulk]
type = ADACGrGrMulti
variable = etaa0
v = 'etab0 etab1'
gamma_names = 'gab gab'
[]
[ACa0_sw]
type = ADACSwitching
variable = etaa0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
[]
[ACa0_int]
type = ADACInterface
variable = etaa0
kappa_name = kappa
variable_L = false
[]
[ea0_dot]
type = ADTimeDerivative
variable = etaa0
[]
# Order parameter eta_beta0
[ACb0_bulk]
type = ADACGrGrMulti
variable = etab0
v = 'etaa0 etab1'
gamma_names = 'gab gbb'
[]
[ACb0_sw]
type = ADACSwitching
variable = etab0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
[]
[ACb0_int]
type = ADACInterface
variable = etab0
kappa_name = kappa
variable_L = false
[]
[eb0_dot]
type = ADTimeDerivative
variable = etab0
[]
# Order parameter eta_beta1
[ACb1_bulk]
type = ADACGrGrMulti
variable = etab1
v = 'etaa0 etab0'
gamma_names = 'gab gbb'
[]
[ACb1_sw]
type = ADACSwitching
variable = etab1
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
[]
[ACb1_int]
type = ADACInterface
variable = etab1
kappa_name = kappa
variable_L = false
[]
[eb1_dot]
type = ADTimeDerivative
variable = etab1
[]
#Chemical potential
[w_dot]
type = ADSusceptibilityTimeDerivative
variable = w
f_name = chi
[]
[Diffusion]
type = ADMatDiffusion
variable = w
diffusivity = Dchi
[]
[coupled_etaa0dot]
type = ADCoupledSwitchingTimeDerivative
variable = w
v = etaa0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
args = 'etaa0 etab0 etab1'
[]
[coupled_etab0dot]
type = ADCoupledSwitchingTimeDerivative
variable = w
v = etab0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
args = 'etaa0 etab0 etab1'
[]
[coupled_etab1dot]
type = ADCoupledSwitchingTimeDerivative
variable = w
v = etab1
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
args = 'etaa0 etab0 etab1'
[]
[]
[AuxKernels]
[BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[]
[]
# enable_jit set to false in many materials to make this test start up faster.
# It is recommended to set enable_jit = true or just remove these lines for
# production runs with this model
[Materials]
[ha]
type = ADSwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'etaa0 etab0 etab1'
phase_etas = 'etaa0'
[]
[hb]
type = ADSwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etaa0 etab0 etab1'
phase_etas = 'etab0 etab1'
[]
[omegaa]
type = ADDerivativeParsedMaterial
args = 'w'
f_name = omegaa
material_property_names = 'Vm ka caeq'
expression = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
derivative_order = 2
[]
[omegab]
type = ADDerivativeParsedMaterial
args = 'w'
f_name = omegab
material_property_names = 'Vm kb cbeq'
expression = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq'
derivative_order = 2
[]
[rhoa]
type = ADDerivativeParsedMaterial
args = 'w'
f_name = rhoa
material_property_names = 'Vm ka caeq'
expression = 'w/Vm^2/ka + caeq/Vm'
derivative_order = 2
[]
[rhob]
type = ADDerivativeParsedMaterial
args = 'w'
f_name = rhob
material_property_names = 'Vm kb cbeq'
expression = 'w/Vm^2/kb + cbeq/Vm'
derivative_order = 2
[]
[const]
type = ADGenericConstantMaterial
prop_names = 'kappa_c kappa L D chi Vm ka caeq kb cbeq gab gbb mu'
prop_values = '0 1 1.0 1.0 1.0 1.0 10.0 0.1 10.0 0.9 4.5 1.5 1.0'
[]
[Mobility]
type = ADDerivativeParsedMaterial
f_name = Dchi
material_property_names = 'D chi'
expression = 'D*chi'
derivative_order = 2
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type '
petsc_options_value = 'lu '
l_tol = 1.0e-3
nl_rel_tol = 1.0e-8
nl_abs_tol = 1e-8
num_steps = 2
[TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.1
[]
[]
[Outputs]
exodus = true
file_base = GrandPotentialMultiphase_out
[]
(modules/heat_transfer/test/tests/transient_heat/transient_heat.i)
[Mesh]
file = cube.e
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = u
[../]
[./ie]
type = SpecificHeatConductionTimeDerivative
variable = u
[../]
[]
[BCs]
[./bottom]
type = DirichletBC
variable = u
boundary = 1
value = 0.0
[../]
[./top]
type = DirichletBC
variable = u
boundary = 2
value = 1.0
[../]
[]
[Materials]
[./constant]
type = HeatConductionMaterial
block = 1
thermal_conductivity = 1
specific_heat = 1
[../]
[./density]
type = GenericConstantMaterial
block = 1
prop_names = density
prop_values = 1
[../]
[]
[Executioner]
type = Transient
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = .1
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/code_verification/cartesian_test_no3.i)
# Problem I.3
#
# The thermal conductivity of an infinite plate varies linearly with
# temperature: k = ko(1+beta*u). It has a constant internal heat generation q,
# and has the boundary conditions du/dx = 0 at x= L and u(L) = uo.
#
# REFERENCE:
# A. Toptan, et al. (Mar.2020). Tech. rep. CASL-U-2020-1939-000, SAND2020-3887 R. DOI:10.2172/1614683.
[Mesh]
[./geom]
type = GeneratedMeshGenerator
dim = 1
elem_type = EDGE2
nx = 4
[../]
[]
[Variables]
[./u]
order = FIRST
[../]
[]
[Functions]
[./exact]
type = ParsedFunction
symbol_names = 'q L beta uo ko'
symbol_values = '1200 1 1e-3 0 1'
expression = 'uo+(1/beta)*( ( 1 + (1-(x/L)^2) * (beta*q*L^2) / ko )^0.5 - 1)'
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = u
[../]
[./heatsource]
type = HeatSource
function = 1200
variable = u
[../]
[]
[BCs]
[./ui]
type = NeumannBC
boundary = left
variable = u
value = 0
[../]
[./uo]
type = DirichletBC
boundary = right
variable = u
value = 0
[../]
[]
[Materials]
[./property]
type = GenericConstantMaterial
prop_names = 'density specific_heat'
prop_values = '1.0 1.0'
[../]
[./thermal_conductivity]
type = ParsedMaterial
property_name = 'thermal_conductivity'
coupled_variables = u
expression = '1 * (1 + 1e-3*u)'
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = exact
variable = u
[../]
[./h]
type = AverageElementSize
[]
[]
[Outputs]
csv = true
[]
(modules/fsi/test/tests/fsi_acoustics/3D_struc_acoustic/3D_struc_acoustic.i)
# Test for `StructureAcousticInterface` interface kernel. The domain is 3D with lengths
# 10 X 0.1 X 0.1 meters. The fluid domain is on the right and the structural domain
# is on the left. Fluid end is subjected to a 250Hz sine wave with a single peak.
# Structural domain has the same material properties as the fluid. Interface between
# structure and fluid is located at 5.0m in the x-direction. Fluid pressure is recorded
# at (5, 0.05, 0.05). Structural stress is also recorded at the same location. Fluid
# pressure and structural stress should be almost equal and opposite to each other.
#
# Input parameters:
# Dimensions = 3
# Lengths = 10 X 0.1 X 0.1 meters
# Fluid speed of sound = 1500 m/s
# Fluid density = 1e-6 Giga kg/m^3
# Structural bulk modulus = 2.25 GPa
# Structural shear modulus = 0 GPa
# Structural density = 1e-6 Giga kg/m^3
# Fluid domain = true
# Fluid BC = single peak sine wave applied as a pressure on the fluid end
# Structural domain = true
# Structural BC = Neumann BC with value zero applied on the structural end.
# Fluid-structure interface location = 5.0m along the x-direction
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 100
ny = 1
nz = 1
xmax = 10
ymax = 0.1
zmax = 0.1
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '5.0 0.0 0.0'
block_id = 1
top_right = '10.0 0.1 0.1'
[../]
[./interface1]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = 1
paired_block = 0
new_boundary = 'interface1'
[../]
[]
[GlobalParams]
[]
[Variables]
[./p]
block = 1
[../]
[./disp_x]
block = 0
[../]
[./disp_y]
block = 0
[../]
[./disp_z]
block = 0
[../]
[]
[AuxVariables]
[./vel_x]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./accel_x]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./vel_y]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./accel_y]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./vel_z]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./accel_z]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./stress_xz]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[]
[Kernels]
[./diffusion]
type = Diffusion
variable = 'p'
block = 1
[../]
[./inertia]
type = AcousticInertia
variable = p
block = 1
[../]
[./DynamicTensorMechanics]
displacements = 'disp_x disp_y disp_z'
block = 0
[../]
[./inertia_x]
type = InertialForce
variable = disp_x
block = 0
[../]
[./inertia_y]
type = InertialForce
variable = disp_y
block = 0
[../]
[./inertia_z]
type = InertialForce
variable = disp_z
block = 0
[../]
[]
[AuxKernels]
[./accel_x]
type = TestNewmarkTI
displacement = disp_x
variable = accel_x
first = false
block = 0
[../]
[./vel_x]
type = TestNewmarkTI
displacement = disp_x
variable = vel_x
block = 0
[../]
[./accel_y]
type = TestNewmarkTI
displacement = disp_y
variable = accel_y
first = false
block = 0
[../]
[./vel_y]
type = TestNewmarkTI
displacement = disp_y
variable = vel_y
block = 0
[../]
[./accel_z]
type = TestNewmarkTI
displacement = disp_z
variable = accel_z
first = false
block = 0
[../]
[./vel_z]
type = TestNewmarkTI
displacement = disp_z
variable = vel_z
block = 0
[../]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
block = 0
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
block = 0
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
block = 0
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
block = 0
[../]
[./stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
block = 0
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
block = 0
[../]
[]
[InterfaceKernels]
[./interface1]
type = StructureAcousticInterface
variable = p
neighbor_var = disp_x
boundary = 'interface1'
D = 1e-6
component = 0
[../]
[./interface2]
type = StructureAcousticInterface
variable = p
neighbor_var = disp_y
boundary = 'interface1'
D = 1e-6
component = 1
[../]
[./interface3]
type = StructureAcousticInterface
variable = p
neighbor_var = disp_z
boundary = 'interface1'
D = 1e-6
component = 2
[../]
[]
[BCs]
[./bottom_accel]
type = FunctionDirichletBC
variable = p
boundary = 'right'
function = accel_bottom
[../]
[./disp_x1]
type = NeumannBC
boundary = 'left'
variable = disp_x
value = 0.0
[../]
[./disp_y1]
type = NeumannBC
boundary = 'left'
variable = disp_y
value = 0.0
[../]
[./disp_z1]
type = NeumannBC
boundary = 'left'
variable = disp_z
value = 0.0
[../]
[]
[Functions]
[./accel_bottom]
type = PiecewiseLinear
data_file = ../1D_struc_acoustic/Input_1Peak_highF.csv
scale_factor = 1e-2
format = 'columns'
[../]
[]
[Materials]
[./co_sq]
type = GenericConstantMaterial
prop_names = inv_co_sq
prop_values = 4.44e-7
block = '1'
[../]
[./density0]
type = GenericConstantMaterial
block = 0
prop_names = density
prop_values = 1e-6
[../]
[./elasticity_base]
type = ComputeIsotropicElasticityTensor
bulk_modulus = 2.25
shear_modulus = 0.0
block = 0
[../]
[./strain]
type = ComputeFiniteStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = 0
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
start_time = 0.0
end_time = 0.005
dt = 0.0001
dtmin = 0.00001
nl_abs_tol = 1e-8
nl_rel_tol = 1e-8
l_tol = 1e-8
l_max_its = 25
timestep_tolerance = 1e-8
automatic_scaling = true
[TimeIntegrator]
type = NewmarkBeta
[]
[]
[Postprocessors]
[./p1]
type = PointValue
point = '5.0 0.05 0.05'
variable = p
[../]
[./stress_xx]
type = PointValue
point = '5.0 0.05 0.05'
variable = stress_xx
[../]
[]
[Outputs]
csv = true
perf_graph = true
print_linear_residuals = true
[]
(modules/navier_stokes/test/tests/postprocessors/pressure_drop/drop_insad.i)
[Mesh]
second_order = true
inactive = 'mesh internal_boundary_bot internal_boundary_top'
[mesh]
type = CartesianMeshGenerator
dim = 2
dx = '1'
dy = '1 1 1'
ix = '5'
iy = '5 5 5'
subdomain_id = '1
2
3'
[]
[internal_boundary_bot]
type = SideSetsBetweenSubdomainsGenerator
input = mesh
new_boundary = 'internal_bot'
primary_block = 1
paired_block = 2
[]
[internal_boundary_top]
type = SideSetsBetweenSubdomainsGenerator
input = internal_boundary_bot
new_boundary = 'internal_top'
primary_block = 2
paired_block = 3
[]
[diverging_mesh]
type = FileMeshGenerator
file = 'expansion_quad.e'
[]
[]
[Modules]
[IncompressibleNavierStokes]
equation_type = steady-state
# no slip BCs
velocity_boundary = 'bottom right left'
velocity_function = '0 1 0 0 0 0'
pressure_boundary = 'top'
pressure_function = '1'
density_name = rho
dynamic_viscosity_name = mu
integrate_p_by_parts = false
order = SECOND
[]
[]
[Materials]
[const]
type = GenericConstantMaterial
block = '1 2 3'
prop_names = 'rho mu'
prop_values = '1 1'
[]
[]
[FunctorMaterials]
[ADconst]
type = ADGenericFunctorMaterial
block = '1 2 3'
prop_names = 'rho_ad'
prop_values = '1'
[]
[vel_functor]
type = ADGenericVectorFunctorMaterial
prop_names = 'velocity'
prop_values = 'vel_x vel_y 0'
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
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
[]
[Postprocessors]
[pdrop_total]
type = PressureDrop
pressure = p
upstream_boundary = 'bottom'
downstream_boundary = 'top'
boundary = 'top bottom'
[]
[pdrop_mid1]
type = PressureDrop
pressure = p
upstream_boundary = 'bottom'
downstream_boundary = 'internal_bot'
boundary = 'bottom internal_bot'
[]
[pdrop_mid2]
type = PressureDrop
pressure = p
upstream_boundary = 'internal_bot'
downstream_boundary = 'internal_top'
boundary = 'internal_top internal_bot'
[]
[pdrop_mid3]
type = PressureDrop
pressure = p
upstream_boundary = 'internal_top'
downstream_boundary = 'top'
boundary = 'top internal_top'
[]
[sum_drops]
type = ParsedPostprocessor
function = 'pdrop_mid1 + pdrop_mid2 + pdrop_mid3'
pp_names = 'pdrop_mid1 pdrop_mid2 pdrop_mid3'
[]
[p_upstream]
type = SideAverageValue
variable = p
boundary = 'bottom'
[]
[p_downstream]
type = SideAverageValue
variable = p
boundary = 'top'
[]
[]
[Outputs]
exodus = false
csv = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_stabilized_action.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 64
ny = 64
[]
[]
[Modules]
[IncompressibleNavierStokes]
equation_type = steady-state
velocity_boundary = 'bottom right top left'
velocity_function = '0 0 0 0 lid_function 0 0 0'
pressure_pinned_node = 0
density_name = rho
dynamic_viscosity_name = mu
initial_velocity = '1e-15 1e-15 0'
use_ad = true
pspg = true
supg = true
alpha = 0.1
family = LAGRANGE
order = FIRST
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[]
[]
[Functions]
[lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
exodus = true
file_base = lid_driven_stabilized_out
[]
[Postprocessors]
[lin]
type = NumLinearIterations
[]
[nl]
type = NumNonlinearIterations
[]
[lin_tot]
type = CumulativeValuePostprocessor
postprocessor = 'lin'
[]
[nl_tot]
type = CumulativeValuePostprocessor
postprocessor = 'nl'
[]
[]
(modules/contact/test/tests/explicit_dynamics/test_balance.i)
# One element test to test the central difference time integrator in 3D.
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
[]
[Mesh]
[block_one]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 3
nz = 3
xmin = 4.5
xmax = 5.5
ymin = 4.5
ymax = 5.5
zmin = 0.0001
zmax = 1.0001
boundary_name_prefix = 'ball'
[]
[block_two]
type = GeneratedMeshGenerator
dim = 3
nx = 2
ny = 2
nz = 2
xmin = 0.0
xmax = 10
ymin = 0.0
ymax = 10
zmin = -2
zmax = 0
boundary_name_prefix = 'base'
boundary_id_offset = 10
[]
[block_one_id]
type = SubdomainIDGenerator
input = block_one
subdomain_id = 1
[]
[block_two_id]
type = SubdomainIDGenerator
input = block_two
subdomain_id = 2
[]
[combine]
type = MeshCollectionGenerator
inputs = ' block_one_id block_two_id'
[]
allow_renumbering = false
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[AuxVariables]
[gap_rate]
[]
[vel_x]
[]
[accel_x]
[]
[vel_y]
[]
[accel_y]
[]
[vel_z]
[]
[accel_z]
[]
[stress_zz]
family = MONOMIAL
order = CONSTANT
[]
[strain_zz]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[stress_zz]
type = RankTwoAux
rank_two_tensor = stress
index_i = 2
index_j = 2
variable = stress_zz
execute_on = 'TIMESTEP_END'
[]
[strain_zz]
type = RankTwoAux
rank_two_tensor = mechanical_strain
index_i = 2
index_j = 2
variable = strain_zz
[]
[accel_x]
type = TestNewmarkTI
variable = accel_x
displacement = disp_x
first = false
execute_on = 'LINEAR TIMESTEP_BEGIN TIMESTEP_END'
[]
[vel_x]
type = TestNewmarkTI
variable = vel_x
displacement = disp_x
execute_on = 'LINEAR TIMESTEP_BEGIN TIMESTEP_END'
[]
[accel_y]
type = TestNewmarkTI
variable = accel_y
displacement = disp_y
first = false
execute_on = 'LINEAR TIMESTEP_BEGIN TIMESTEP_END'
[]
[vel_y]
type = TestNewmarkTI
variable = vel_y
displacement = disp_x
execute_on = 'LINEAR TIMESTEP_BEGIN TIMESTEP_END'
[]
[accel_z]
type = TestNewmarkTI
variable = accel_z
displacement = disp_z
first = false
execute_on = 'LINEAR TIMESTEP_BEGIN TIMESTEP_END'
[]
[vel_z]
type = TestNewmarkTI
variable = vel_z
displacement = disp_z
execute_on = 'LINEAR TIMESTEP_BEGIN TIMESTEP_END'
[]
[]
[Kernels]
[DynamicTensorMechanics]
displacements = 'disp_x disp_y disp_z'
volumetric_locking_correction = true
stiffness_damping_coefficient = 0.001
generate_output = 'stress_zz strain_zz'
[]
[inertia_x]
type = InertialForce
variable = disp_x
[]
[inertia_y]
type = InertialForce
variable = disp_y
[]
[inertia_z]
type = InertialForce
variable = disp_z
[]
[]
[Kernels]
[gravity]
type = Gravity
variable = disp_z
value = -981.0
[]
[]
[BCs]
[x_front]
type = DirichletBC
variable = disp_x
boundary = 'ball_front'
preset = false
value = 0.0
[]
[y_front]
type = DirichletBC
variable = disp_y
boundary = 'ball_front'
preset = false
value = 0.0
[]
[x_fixed]
type = DirichletBC
variable = disp_x
boundary = 'base_back'
preset = false
value = 0.0
[]
[y_fixed]
type = DirichletBC
variable = disp_y
boundary = 'base_back'
preset = false
value = 0.0
[]
[z_fixed]
type = DirichletBC
variable = disp_z
boundary = 'base_back'
preset = false
value = 0.0
[]
[z_fixed_front]
type = DirichletBC
variable = disp_z
boundary = 'base_front'
preset = false
value = 0.0
[]
[]
[ExplicitDynamicsContact]
[my_contact]
model = frictionless_balance
primary = base_front
secondary = ball_back
vel_x = 'vel_x'
vel_y = 'vel_y'
vel_z = 'vel_z'
[]
[]
[Materials]
[elasticity_tensor_block_one]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.0
block = 1
outputs = 'exodus'
output_properties = __all__
[]
[elasticity_tensor_block_two]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e10
poissons_ratio = 0.0
block = 2
outputs = 'exodus'
output_properties = __all__
[]
[strain_block]
type = ComputeFiniteStrain
displacements = 'disp_x disp_y disp_z'
implicit = false
[]
[stress_block]
type = ComputeFiniteStrainElasticStress
[]
[density_one]
type = GenericConstantMaterial
prop_names = density
prop_values = 1e1
outputs = 'exodus'
output_properties = 'density'
block = '1'
[]
[density_two]
type = GenericConstantMaterial
prop_names = density
prop_values = 1e6
outputs = 'exodus'
output_properties = 'density'
block = '2'
[]
[wave_speed]
type = WaveSpeed
outputs = 'exodus'
output_properties = 'wave_speed'
[]
[]
[Executioner]
type = Transient
start_time = -0.01
end_time = -0.0075 # 10
dt = 0.00001
timestep_tolerance = 1e-6
[TimeIntegrator]
type = CentralDifference
solve_type = lumped
[]
[]
[Outputs]
interval = 50
exodus = true
csv = true
[]
[Postprocessors]
[accel_58z]
type = NodalVariableValue
nodeid = 1
variable = accel_z
[]
[vel_58z]
type = NodalVariableValue
nodeid = 1
variable = vel_z
[]
[disp_58z]
type = NodalVariableValue
nodeid = 1
variable = disp_z
[]
[critical_time_step]
type = CriticalTimeStep
[]
[contact_pressure_max]
type = NodalExtremeValue
variable = contact_pressure
block = '1 2'
value_type = max
[]
[]
(modules/optimization/test/tests/optimizationreporter/bc_load_linearFunction/adjoint.i)
[Mesh]
[]
[Variables]
[adjoint_T]
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = adjoint_T
diffusivity = thermal_conductivity
[]
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = adjoint_T
x_coord_name = misfit/measurement_xcoord
y_coord_name = misfit/measurement_ycoord
z_coord_name = misfit/measurement_zcoord
value_name = misfit/misfit_values
weight_name = misfit/weight
[]
[]
[Reporters]
[misfit]
type = OptimizationData
variable_weight_names = 'weight'
[]
[params_left]
type = ConstantReporter
real_vector_names = 'vals'
real_vector_values = '0 0' # Dummy
[]
[params_right]
type = ConstantReporter
real_vector_names = 'vals'
real_vector_values = '0' # Dummy
[]
[]
[BCs]
[left]
type = NeumannBC
variable = adjoint_T
boundary = left
value = 0
[]
[right]
type = NeumannBC
variable = adjoint_T
boundary = right
value = 0
[]
[bottom]
type = DirichletBC
variable = adjoint_T
boundary = bottom
value = 0
[]
[top]
type = DirichletBC
variable = adjoint_T
boundary = top
value = 0
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
line_search = none
nl_abs_tol = 1e-8
nl_rel_tol = 1e-8
petsc_options_iname = '-ksp_type -pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'preonly lu superlu_dist'
[]
[Functions]
[left_function]
type = ParsedOptimizationFunction
expression = 'a + b*y'
param_symbol_names = 'a b'
param_vector_name = 'params_left/vals'
[]
[right_function]
type = ParsedOptimizationFunction
expression = 'a'
param_symbol_names = 'a'
param_vector_name = 'params_right/vals'
[]
[]
[VectorPostprocessors]
[grad_bc_left]
type = SideOptimizationNeumannFunctionInnerProduct
variable = adjoint_T
function = left_function
boundary = left
[]
[grad_bc_right]
type = SideOptimizationNeumannFunctionInnerProduct
variable = adjoint_T
function = right_function
boundary = right
[]
[]
[Outputs]
console = false
exodus = false
file_base = 'adjoint'
[]
(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
[../]
[]
(tutorials/darcy_thermo_mech/step03_darcy_material/tests/kernels/darcy_pressure/darcy_pressure.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmax = 0.304 # Length of test chamber
ymax = 0.0257 # Test chamber radius
[]
coord_type = RZ
rz_coord_axis = X
[]
[Variables]
[pressure]
[]
[]
[Kernels]
[darcy_pressure]
type = DarcyPressure
variable = pressure
[]
[]
[BCs]
[inlet]
type = DirichletBC
variable = pressure
boundary = left
value = 4000 # (Pa) From Figure 2 from paper. First dot for 1mm spheres.
[]
[outlet]
type = DirichletBC
variable = pressure
boundary = right
value = 0 # (Pa) Gives the correct pressure drop from Figure 2 for 1mm spheres
[]
[]
[Materials]
[pressure]
type = ADGenericConstantMaterial
prop_values = '0.8451e-9 7.98e-4'
prop_names = 'permeability viscosity'
[]
[]
[Problem]
type = FEProblem
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/auxkernels/advection_flux/advection_flux_fe.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '0.75 0.75 0.75'
dy = '0.75 0.75 0.75'
ix = '2 2 2'
iy = '2 2 2'
subdomain_id = '1 1 1
1 2 1
1 1 1'
[]
[add_inner_boundaries_top]
type = SideSetsAroundSubdomainGenerator
input = cmg
new_boundary = 'block_2_top'
block = 2
normal = '0 1 0'
[]
[add_inner_boundaries_bot]
type = SideSetsAroundSubdomainGenerator
input = add_inner_boundaries_top
new_boundary = 'block_2_bot'
block = 2
normal = '0 -1 0'
[]
[add_inner_boundaries_right]
type = SideSetsAroundSubdomainGenerator
input = add_inner_boundaries_bot
new_boundary = 'block_2_right'
block = 2
normal = '1 0 0'
[]
[add_inner_boundaries_left]
type = SideSetsAroundSubdomainGenerator
input = add_inner_boundaries_right
new_boundary = 'block_2_left'
block = 2
normal = '-1 0 0'
[]
[]
[Variables]
[u]
[]
[v]
[]
[]
[ICs]
[u_blob]
type = FunctionIC
variable = u
function = 'if(x<0.75,if(y<0.75,1,0),0)'
[]
[v_blob]
type = FunctionIC
variable = v
function = 'if(x<0.75,if(y<0.75,1,0),0)'
[]
[]
[Kernels]
[udot]
type = MassLumpedTimeDerivative
variable = u
[]
[u_advec]
type = ConservativeAdvection
variable = u
upwinding_type = full
velocity = '2 0 0'
[]
[vdot]
type = MassLumpedTimeDerivative
variable = v
[]
[v_advec]
type = ConservativeAdvection
variable = v
upwinding_type = full
velocity = '0 2 0'
[]
[]
[Materials]
[rho]
type = GenericConstantMaterial
prop_names = 'rho'
prop_values = '1'
[]
[]
[AuxVariables]
[flux_x]
order = FIRST
family = MONOMIAL
[]
[]
[AuxKernels]
[flux_x]
type = AdvectiveFluxAux
variable = flux_x
vel_x = u
vel_y = v
advected_mat_prop = 'rho'
component = x
boundary = 'block_2_right block_2_left'
[]
[]
[Executioner]
type = Transient
solve_type = LINEAR
dt = 0.01
end_time = 0.02
l_tol = 1E-14
[]
[Postprocessors]
[flux_right]
type = SideIntegralVariablePostprocessor
variable = flux_x
boundary = 'block_2_right'
[]
[flux_right_exact]
type = SideAdvectiveFluxIntegral
boundary = 'block_2_right'
vel_x = u
vel_y = v
component = x
advected_mat_prop = 'rho'
[]
[flux_left]
type = SideIntegralVariablePostprocessor
variable = flux_x
boundary = 'block_2_left'
[]
[flux_left_exact]
type = SideAdvectiveFluxIntegral
boundary = 'block_2_left'
vel_x = u
vel_y = v
component = x
advected_mat_prop = 'rho'
[]
[]
[Outputs]
csv = true
[]
(modules/functional_expansion_tools/examples/2D_interface_different_submesh/main.i)
# Derived from the example '2D_interface' with the following differences:
#
# 1) The number of y divisions in the sub app is not the same as the master app
# 2) The subapp mesh is skewed in y
# 3) The Functional Expansion order for the flux term was increased to 7
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0.0
xmax = 0.4
nx = 6
ymin = 0.0
ymax = 10.0
ny = 20
[]
[Variables]
[./m]
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./source_m]
type = BodyForce
variable = m
value = 100
[../]
[]
[Materials]
[./Impervium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '0.00001 50.0 100.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
value = 2
variable = m
[../]
[]
[BCs]
[./interface_value]
type = FXValueBC
variable = m
boundary = right
function = FX_Basis_Value_Main
[../]
[./interface_flux]
type = FXFluxBC
boundary = right
variable = m
function = FX_Basis_Flux_Main
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '4'
physical_bounds = '0.0 10'
y = Legendre
[../]
[./FX_Basis_Flux_Main]
type = FunctionSeries
series_type = Cartesian
orders = '7'
physical_bounds = '0.0 10'
y = Legendre
[../]
[]
[UserObjects]
[./FX_Flux_UserObject_Main]
type = FXBoundaryFluxUserObject
function = FX_Basis_Flux_Main
variable = m
boundary = right
diffusivity = thermal_conductivity
[../]
[]
[Postprocessors]
[./average_interface_value]
type = SideAverageValue
variable = m
boundary = right
[../]
[./total_flux]
type = SideDiffusiveFluxIntegral
variable = m
boundary = right
diffusivity = thermal_conductivity
[../]
[./picard_iterations]
type = NumFixedPointIterations
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 1.0
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = sub.i
sub_cycling = true
[../]
[]
[Transfers]
[./FluxToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Flux_UserObject_Main
multi_app_object_name = FX_Basis_Flux_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[./FluxToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Flux_Main
multi_app_object_name = FX_Flux_UserObject_Sub
[../]
[]
(modules/stochastic_tools/test/tests/surrogates/pod_rb/boundary/sub.i)
[Problem]
type = FEProblem
extra_tag_vectors = 'diff react bodyf dir_src dir_imp'
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 15
xmax = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = u
diffusivity = k
extra_vector_tags = 'diff'
[]
[reaction]
type = MaterialReaction
variable = u
coefficient = alpha
extra_vector_tags = 'react'
[]
[source]
type = BodyForce
variable = u
value = 1.0
extra_vector_tags = 'bodyf'
[]
[]
[Materials]
[k]
type = GenericConstantMaterial
prop_names = k
prop_values = 1.0
[]
[alpha]
type = GenericConstantMaterial
prop_names = alpha
prop_values = 1.0
[]
[]
[BCs]
[dummy_1]
type = DirichletBC
variable = u
boundary = left
value = 0
extra_vector_tags = 'dir_imp'
[]
[dummy_2]
type = DirichletBCModifier
variable = u
boundary = left
value = 1
extra_vector_tags = 'dir_src'
[]
[left]
type = DirichletBC
variable = u
boundary = left
value = 1
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
(modules/electromagnetics/test/tests/interfacekernels/electrostatic_contact/contact_conductance_calculated.i)
[Mesh]
[box]
type = CartesianMeshGenerator
dim = 2
dx = '0.5 0.5'
dy = '0.25 0.5 0.25'
ix = '20 20'
iy = '10 20 10'
subdomain_id = '1 1
2 3
1 1'
[]
[rename_subdomains]
type = RenameBlockGenerator
input = box
old_block = '1 2'
new_block = 'stainless_steel graphite'
[]
[create_interface]
type = SideSetsBetweenSubdomainsGenerator
input = rename_subdomains
primary_block = stainless_steel
paired_block = graphite
new_boundary = 'ssg_interface'
[]
[delete_block]
type = BlockDeletionGenerator
input = create_interface
block = 3
[]
[]
[Problem]
coord_type = RZ
[]
[Variables]
[potential_graphite]
block = graphite
[]
[potential_stainless_steel]
block = stainless_steel
[]
[]
[Kernels]
[electric_graphite]
type = ADMatDiffusion
variable = potential_graphite
diffusivity = electrical_conductivity
block = graphite
[]
[electric_stainless_steel]
type = ADMatDiffusion
variable = potential_stainless_steel
diffusivity = electrical_conductivity
block = stainless_steel
[]
[]
[BCs]
[elec_top]
type = DirichletBC
variable = potential_stainless_steel
boundary = top
value = 1
[]
[elec_bottom]
type = DirichletBC
variable = potential_stainless_steel
boundary = bottom
value = 0
[]
[]
[InterfaceKernels]
[electrostatic_contact]
type = ElectrostaticContactCondition
variable = potential_stainless_steel
neighbor_var = potential_graphite
boundary = ssg_interface
primary_conductivity = electrical_conductivity
secondary_conductivity = electrical_conductivity
mean_hardness = mean_hardness
mechanical_pressure = 8.52842e10 # resulting contact conductance should be ~1.47e5 as described in Cincotti et al (https://doi.org/10.1002/aic.11102)
[]
[]
[Materials]
#graphite
[sigma_graphite]
type = ADGenericConstantMaterial
prop_names = 'electrical_conductivity'
prop_values = 3.33e2
block = graphite
[]
#stainless_steel
[sigma_stainless_steel]
type = ADGenericConstantMaterial
prop_names = 'electrical_conductivity'
prop_values = 1.429e6
block = stainless_steel
[]
#mean hardness
[harmonic_mean_hardness]
type = ADGenericConstantMaterial
prop_names = 'mean_hardness'
prop_values = 2.4797e9
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
nl_rel_tol = 1e-09
petsc_options_iname = '-pc_type -ksp_grmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 101 preonly ilu 1'
automatic_scaling = true
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/heat_transfer/test/tests/truss_heat_conduction/block_w_line.i)
[Mesh]
parallel_type = 'replicated'
[block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 50
nz = 1
xmin = -0.5
xmax = 0.5
ymin = -1.25
ymax = 1.25
zmin = -0.04
zmax = 0.04
boundary_name_prefix = block
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 1
[]
[line]
type = GeneratedMeshGenerator
dim = 1
xmin = -0.5
xmax = 0.5
nx = 10
boundary_name_prefix = line
boundary_id_offset = 10
[]
[line_id]
type = SubdomainIDGenerator
input = line
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'block_id line_id'
[]
[line_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'block line'
[]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[time_derivative]
type = HeatConductionTimeDerivative
variable = temperature
block = 'block'
[]
[heat_conduction]
type = HeatConduction
variable = temperature
block = 'block'
[]
[time_derivative_line]
type = TrussHeatConductionTimeDerivative
variable = temperature
area = area
block = 'line'
[]
[heat_conduction_line]
type = TrussHeatConduction
variable = temperature
area = area
block = 'line'
[]
[]
[AuxVariables]
[area]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[area]
type = ConstantAux
variable = area
value = 0.008
execute_on = 'initial timestep_begin'
[]
[]
[Constraints]
[equalvalue]
type = EqualValueEmbeddedConstraint
secondary = 'line'
primary = 'block'
penalty = 1e6
formulation = kinematic
primary_variable = temperature
variable = temperature
[]
[]
[Materials]
[block]
type = GenericConstantMaterial
block = 'block'
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[]
[line]
type = GenericConstantMaterial
block = 'line'
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '10.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[]
[]
[BCs]
[right]
type = FunctionDirichletBC
variable = temperature
boundary = 'block_right line_right'
function = '10*t'
[]
[]
[VectorPostprocessors]
[x_n0_25]
type = LineValueSampler
start_point = '-0.25 0 0'
end_point = '-0.25 1.25 0'
num_points = 100
variable = 'temperature'
sort_by = id
[]
[x_0_25]
type = LineValueSampler
start_point = '0.25 0 0'
end_point = '0.25 1.25 0'
num_points = 100
variable = 'temperature'
sort_by = id
[]
[]
[Executioner]
type = Transient
start_time = 0
dt = 1
end_time = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-12
[]
[Outputs]
exodus = true
[csv]
type = CSV
file_base = 'csv/block_w_line'
time_data = true
[]
[]
(modules/functional_expansion_tools/examples/1D_volumetric_Cartesian/main.i)
# Basic example coupling a master and sub app in a 1D Cartesian volume.
#
# The master app provides field values to the sub app via Functional Expansions, which then performs
# its calculations. The sub app's solution field values are then transferred back to the master app
# and coupled into the solution of the master app solution.
#
# This example couples Functional Expansions via AuxVariable.
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0.0
xmax = 10.0
nx = 15
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./s_in] # Add in the contribution from the SubApp
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[Materials]
[./Unobtanium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3'
physical_bounds = '0.0 10.0'
x = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/heat_transfer/test/tests/code_verification/cartesian_test_no2.i)
# Problem I.2
#
# An infinite plate with a thermal conductivity that varies linearly with
# temperature. Each boundary is exposed to a constant temperature.
#
# REFERENCE:
# A. Toptan, et al. (Mar.2020). Tech. rep. CASL-U-2020-1939-000, SAND2020-3887 R. DOI:10.2172/1614683.
[Mesh]
[./geom]
type = GeneratedMeshGenerator
dim = 1
elem_type = EDGE2
nx = 1
[../]
[]
[Variables]
[./u]
order = FIRST
[../]
[]
[Functions]
[./exact]
type = ParsedFunction
symbol_names = 'L beta ki ko ui uo'
symbol_values = '1 1e-3 5.3 5 300 0'
expression = 'uo+(ko/beta)* ( (1 + L*beta*(ki+ko)*(ui-uo)*((L-x)/(ko*L)^2) )^0.5 - 1)'
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = u
[../]
[]
[BCs]
[./ui]
type = DirichletBC
boundary = left
variable = u
value = 300
[../]
[./uo]
type = DirichletBC
boundary = right
variable = u
value = 0
[../]
[]
[Materials]
[./property]
type = GenericConstantMaterial
prop_names = 'density specific_heat'
prop_values = '1.0 1.0'
[../]
[./thermal_conductivity]
type = ParsedMaterial
property_name = 'thermal_conductivity'
coupled_variables = u
expression = '5 + 1e-3 * (u-0)'
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = exact
variable = u
[../]
[./h]
type = AverageElementSize
[]
[]
[Outputs]
csv = true
[]
(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/fluid_properties/test/tests/materials/saturation_pressure_material/saturation_pressure_material.i)
# This tests SaturationPressureMaterial, which computes a saturation pressure material
# property from a temperature material property and a TwoPhaseFluidProperties object.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
xmin = 0
xmax = 1
[]
[FluidProperties]
[fp_2phase]
type = StiffenedGasTwoPhaseFluidProperties
[]
[]
[Materials]
[T_mat]
type = ADGenericConstantMaterial
prop_names = 'T'
prop_values = '400'
[]
[p_sat_mat]
type = ADSaturationPressureMaterial
T = T
p_sat = p_sat
fp_2phase = fp_2phase
[]
[]
[Postprocessors]
[p_sat_pp]
type = ADElementAverageMaterialProperty
mat_prop = p_sat
execute_on = 'INITIAL'
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
execute_on = 'INITIAL'
[]
(modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialMultiphase.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmin = -20
xmax = 20
ymin = -20
ymax = 20
[]
[GlobalParams]
op_num = 2
var_name_base = etab
[]
[Variables]
[./w]
[../]
[./etaa0]
[../]
[./etab0]
[../]
[./etab1]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./IC_etaa0]
type = FunctionIC
variable = etaa0
function = ic_func_etaa0
[../]
[./IC_etab0]
type = FunctionIC
variable = etab0
function = ic_func_etab0
[../]
[./IC_etab1]
type = FunctionIC
variable = etab1
function = ic_func_etab1
[../]
[./IC_w]
type = ConstantIC
value = -0.05
variable = w
[../]
[]
[Functions]
[./ic_func_etaa0]
type = ParsedFunction
expression = 'r:=sqrt(x^2+y^2);0.5*(1.0-tanh((r-10.0)/sqrt(2.0)))'
[../]
[./ic_func_etab0]
type = ParsedFunction
expression = 'r:=sqrt(x^2+y^2);0.5*(1.0+tanh((r-10)/sqrt(2.0)))*0.5*(1.0+tanh((y)/sqrt(2.0)))'
[../]
[./ic_func_etab1]
type = ParsedFunction
expression = 'r:=sqrt(x^2+y^2);0.5*(1.0+tanh((r-10)/sqrt(2.0)))*0.5*(1.0-tanh((y)/sqrt(2.0)))'
[../]
[]
[BCs]
[]
[Kernels]
# Order parameter eta_alpha0
[./ACa0_bulk]
type = ACGrGrMulti
variable = etaa0
v = 'etab0 etab1'
gamma_names = 'gab gab'
[../]
[./ACa0_sw]
type = ACSwitching
variable = etaa0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etab0 etab1 w'
[../]
[./ACa0_int]
type = ACInterface
variable = etaa0
kappa_name = kappa
[../]
[./ea0_dot]
type = TimeDerivative
variable = etaa0
[../]
# Order parameter eta_beta0
[./ACb0_bulk]
type = ACGrGrMulti
variable = etab0
v = 'etaa0 etab1'
gamma_names = 'gab gbb'
[../]
[./ACb0_sw]
type = ACSwitching
variable = etab0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab1 w'
[../]
[./ACb0_int]
type = ACInterface
variable = etab0
kappa_name = kappa
[../]
[./eb0_dot]
type = TimeDerivative
variable = etab0
[../]
# Order parameter eta_beta1
[./ACb1_bulk]
type = ACGrGrMulti
variable = etab1
v = 'etaa0 etab0'
gamma_names = 'gab gbb'
[../]
[./ACb1_sw]
type = ACSwitching
variable = etab1
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0 w'
[../]
[./ACb1_int]
type = ACInterface
variable = etab1
kappa_name = kappa
[../]
[./eb1_dot]
type = TimeDerivative
variable = etab1
[../]
#Chemical potential
[./w_dot]
type = SusceptibilityTimeDerivative
variable = w
f_name = chi
coupled_variables = '' # in this case chi (the susceptibility) is simply a constant
[../]
[./Diffusion]
type = MatDiffusion
variable = w
diffusivity = Dchi
args = ''
[../]
[./coupled_etaa0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etaa0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0 etab1'
[../]
[./coupled_etab0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etab0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0 etab1'
[../]
[./coupled_etab1dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etab1
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0 etab1'
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[../]
[]
# enable_jit set to false in many materials to make this test start up faster.
# It is recommended to set enable_jit = true or just remove these lines for
# production runs with this model
[Materials]
[./ha]
type = SwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'etaa0 etab0 etab1'
phase_etas = 'etaa0'
[../]
[./hb]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etaa0 etab0 etab1'
phase_etas = 'etab0 etab1'
[../]
[./omegaa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegaa
material_property_names = 'Vm ka caeq'
expression = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
derivative_order = 2
enable_jit = false
[../]
[./omegab]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegab
material_property_names = 'Vm kb cbeq'
expression = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq'
derivative_order = 2
enable_jit = false
[../]
[./rhoa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhoa
material_property_names = 'Vm ka caeq'
expression = 'w/Vm^2/ka + caeq/Vm'
derivative_order = 2
enable_jit = false
[../]
[./rhob]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhob
material_property_names = 'Vm kb cbeq'
expression = 'w/Vm^2/kb + cbeq/Vm'
derivative_order = 2
enable_jit = false
[../]
[./const]
type = GenericConstantMaterial
prop_names = 'kappa_c kappa L D chi Vm ka caeq kb cbeq gab gbb mu'
prop_values = '0 1 1.0 1.0 1.0 1.0 10.0 0.1 10.0 0.9 4.5 1.5 1.0'
[../]
[./Mobility]
type = DerivativeParsedMaterial
property_name = Dchi
material_property_names = 'D chi'
expression = 'D*chi'
derivative_order = 2
enable_jit = false
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 lu 1'
l_tol = 1.0e-3
nl_rel_tol = 1.0e-8
nl_abs_tol = 1e-8
num_steps = 2
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.1
[../]
[]
[Outputs]
exodus = true
[]
(modules/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-fretting-wear-test-action.i)
starting_point = 0.5e-1
offset = -0.045
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = long-bottom-block-1elem-blocks.e
[]
[remote]
type = BlockDeletionGenerator
input = file
block = '3 4'
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[]
[Problem]
material_coverage_check = false
kernel_coverage_check = false
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Modules/TensorMechanics/DynamicMaster]
[all]
add_variables = true
hht_alpha = 0.0
newmark_beta = 0.25
newmark_gamma = 0.5
mass_damping_coefficient = 0.0
stiffness_damping_coefficient = 1.0
generate_output = 'stress_xx stress_yy'
block = '1 2'
strain = FINITE
density = density
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '7750'
[]
[]
[AuxVariables]
[worn_depth]
block = 'normal_secondary_subdomain'
[]
[gap_vel]
block = 'normal_secondary_subdomain'
[]
[]
[AuxKernels]
[gap_vel]
type = WeightedGapVelAux
variable = gap_vel
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = normal_primary_subdomain
secondary_subdomain = normal_secondary_subdomain
disp_x = disp_x
disp_y = disp_y
[]
[worn_depth]
type = MortarArchardsLawAux
variable = worn_depth
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = normal_primary_subdomain
secondary_subdomain = normal_secondary_subdomain
displacements = 'disp_x disp_y'
friction_coefficient = 0.5
energy_wear_coefficient = 1.0e-6
normal_pressure = normal_normal_lm
execute_on = 'TIMESTEP_END'
[]
[]
[Contact]
[normal]
formulation = mortar
model = coulomb
primary = 20
secondary = 10
c_normal = 1e+06
c_tangential = 1.0e+6
capture_tolerance = 1.0e-5
newmark_beta = 0.25
newmark_gamma = 0.5
mortar_dynamics = true
wear_depth = worn_depth
friction_coefficient = 0.5
normalize_c = true
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(4.0 * pi / 4 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * (cos(32.0 * pi / 4 * t) - 1.0)'
[]
[]
[Executioner]
type = Transient
end_time = 0.5
dt = 0.05
dtmin = .002
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15'
nl_max_its = 40
l_max_its = 15
line_search = 'l2'
snesmf_reuse_base = true
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
checkpoint = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'num_nl cumulative contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = normal_normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/combined/test/tests/optimization/invOpt_bc_convective/adjoint.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 20
xmax = 1
ymax = 2
[]
[]
[AuxVariables]
[temperature_forward]
[]
[T2]
[]
[]
[AuxKernels]
[TT]
type = ParsedAux
args = 'temperature temperature_forward'
variable = T2
function = 'temperature*(100-temperature_forward)'
[]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[heat_conduction]
type = ADHeatConduction
variable = temperature
[]
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = temperature
x_coord_name = misfit/measurement_xcoord
y_coord_name = misfit/measurement_ycoord
z_coord_name = misfit/measurement_zcoord
value_name = misfit/misfit_values
[]
[]
[Reporters]
[misfit]
type = OptimizationData
[]
[params]
type = ConstantReporter
real_vector_names = 'vals'
real_vector_values = '0' # Dummy value
[]
[]
[BCs]
[left]
type = ConvectiveFluxFunction
variable = temperature
boundary = 'left'
T_infinity = 0.0
coefficient = function1
[]
[right]
type = NeumannBC
variable = temperature
boundary = right
value = 0
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 0
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 0
[]
[]
[Materials]
[steel]
type = ADGenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
nl_abs_tol = 1e-6
nl_rel_tol = 1e-8
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Functions]
[function1]
type = ParsedOptimizationFunction
expression = 'a'
param_symbol_names = 'a'
param_vector_name = 'params/vals'
[]
[]
[VectorPostprocessors]
[adjoint_pt]
type = SideOptimizationNeumannFunctionInnerProduct
variable = T2
function = function1
boundary = left
[]
[]
[Outputs]
console = false
exodus = false
file_base = 'adjoint'
[]
(modules/stochastic_tools/examples/surrogates/cross_validation/all_sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 0.03
elem_type = EDGE3
[]
[Variables]
[T]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = T
diffusivity = k
[]
[source]
type = BodyForce
variable = T
value = 10000
[]
[]
[Materials]
[conductivity]
type = GenericConstantMaterial
prop_names = k
prop_values = 2.0
[]
[]
[BCs]
[right]
type = DirichletBC
variable = T
boundary = right
value = 300
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[max]
type = NodalExtremeValue
variable = T
value_type = max
[]
[]
[Outputs]
[]
(modules/navier_stokes/test/tests/finite_volume/cns/heated-channel/transient-porous-kt-primitive.i)
p_initial=1.01e5
T=273.15
u_in=10
eps=1
superficial_vel_in=${fparse u_in * eps}
[GlobalParams]
fp = fp
limiter = 'vanLeer'
two_term_boundary_expansion = true
[]
[Mesh]
[cartesian]
type = GeneratedMeshGenerator
dim = 1
xmin = 0
xmax = 10
nx = 100
[]
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Problem]
fv_bcs_integrity_check = false
[]
[Variables]
[pressure]
type = MooseVariableFVReal
initial_condition = ${p_initial}
[]
[superficial_vel_x]
type = MooseVariableFVReal
initial_condition = ${superficial_vel_in}
[]
[temperature]
type = MooseVariableFVReal
initial_condition = ${T}
[]
[]
[AuxVariables]
[rho]
type = MooseVariableFVReal
[]
[superficial_rhou]
type = MooseVariableFVReal
[]
[]
[AuxKernels]
[rho]
type = ADMaterialRealAux
variable = rho
property = rho
execute_on = 'timestep_end'
[]
[superficial_rhou]
type = ADMaterialRealAux
variable = superficial_rhou
property = superficial_rhou
execute_on = 'timestep_end'
[]
[]
[FVKernels]
[mass_time]
type = FVMatPropTimeKernel
mat_prop_time_derivative = 'dsuperficial_rho_dt'
variable = pressure
[]
[mass_advection]
type = PCNSFVKT
variable = pressure
eqn = "mass"
[]
[momentum_time]
type = FVMatPropTimeKernel
mat_prop_time_derivative = 'dsuperficial_rhou_dt'
variable = superficial_vel_x
[]
[momentum_advection]
type = PCNSFVKT
variable = superficial_vel_x
eqn = "momentum"
momentum_component = 'x'
[]
[energy_time]
type = FVMatPropTimeKernel
mat_prop_time_derivative = 'dsuperficial_rho_et_dt'
variable = temperature
[]
[energy_advection]
type = PCNSFVKT
variable = temperature
eqn = "energy"
[]
[heat]
type = FVBodyForce
variable = temperature
value = 1e6
[]
[]
[FVBCs]
[rho_left]
type = PCNSFVStrongBC
boundary = 'left'
variable = pressure
superficial_velocity = 'superficial_vel_in'
T_fluid = ${T}
eqn = 'mass'
[]
[rhou_left]
type = PCNSFVStrongBC
boundary = 'left'
variable = superficial_vel_x
superficial_velocity = 'superficial_vel_in'
T_fluid = ${T}
eqn = 'momentum'
momentum_component = 'x'
[]
[rho_et_left]
type = PCNSFVStrongBC
boundary = 'left'
variable = temperature
superficial_velocity = 'superficial_vel_in'
T_fluid = ${T}
eqn = 'energy'
[]
[rho_right]
type = PCNSFVStrongBC
boundary = 'right'
variable = pressure
pressure = ${p_initial}
eqn = 'mass'
[]
[rhou_right]
type = PCNSFVStrongBC
boundary = 'right'
variable = superficial_vel_x
pressure = ${p_initial}
eqn = 'momentum'
momentum_component = 'x'
[]
[rho_et_right]
type = PCNSFVStrongBC
boundary = 'right'
variable = temperature
pressure = ${p_initial}
eqn = 'energy'
[]
# Use these to help create more accurate cell centered gradients for cells adjacent to boundaries
[T_left]
type = FVDirichletBC
variable = temperature
value = ${T}
boundary = 'left'
[]
[sup_vel_left]
type = FVDirichletBC
variable = superficial_vel_x
value = ${superficial_vel_in}
boundary = 'left'
[]
[p_right]
type = FVDirichletBC
variable = pressure
value = ${p_initial}
boundary = 'right'
[]
[]
[Functions]
[superficial_vel_in]
type = ParsedVectorFunction
expression_x = '${superficial_vel_in}'
[]
[]
[Materials]
[var_mat]
type = PorousPrimitiveVarMaterial
pressure = pressure
T_fluid = temperature
superficial_vel_x = superficial_vel_x
fp = fp
porosity = porosity
[]
[fluid_only]
type = GenericConstantMaterial
prop_names = 'porosity'
prop_values = '${eps}'
[]
[]
[Executioner]
solve_type = NEWTON
type = Transient
nl_max_its = 20
[TimeStepper]
type = IterationAdaptiveDT
dt = 5e-5
optimal_iterations = 10
[]
steady_state_detection = false
steady_state_tolerance = 1e-12
abort_on_solve_fail = false
end_time = 100
nl_abs_tol = 1e-8
dtmin = 5e-5
automatic_scaling = true
compute_scaling_once = false
verbose = true
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -snes_linesearch_minlambda'
petsc_options_value = 'lu mumps NONZERO 1e-3 '
[]
[Outputs]
[exo]
type = Exodus
execute_on = 'final'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
checkpoint = true
[]
[Debug]
show_var_residual_norms = true
[]
(modules/solid_mechanics/test/tests/dynamics/rayleigh_damping/rayleigh_newmark_material_dependent.i)
# Test for rayleigh damping implemented using Newmark time integration
# The test is for an 1D bar element of unit length fixed on one end
# with a ramped pressure boundary condition applied to the other end.
# zeta and eta correspond to the stiffness and mass proportional rayleigh damping
# beta and gamma are Newmark time integration parameters
# The equation of motion in terms of matrices is:
#
# M*accel + eta*M*vel + zeta*K*vel + K*disp = P*Area
#
# Here M is the mass matrix, K is the stiffness matrix, P is the applied pressure
#
# This equation is equivalent to:
#
# density*accel + eta*density*vel + zeta*d/dt(Div stress) + Div stress = P
#
# The first two terms on the left are evaluated using the Inertial force kernel
# The next two terms on the left involving zeta are evaluated using the
# DynamicStressDivergenceTensors Kernel
# The residual due to Pressure is evaluated using Pressure boundary condition
#
# The system will come to steady state slowly after the pressure becomes constant.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 0.0
xmax = 0.1
ymin = 0.0
ymax = 1.0
zmin = 0.0
zmax = 0.1
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[AuxVariables]
[vel_x]
[]
[accel_x]
[]
[vel_y]
[]
[accel_y]
[]
[vel_z]
[]
[accel_z]
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[DynamicSolidMechanics]
displacements = 'disp_x disp_y disp_z'
stiffness_damping_coefficient = 'zeta_rayleigh'
[]
[inertia_x]
type = InertialForce
variable = disp_x
velocity = vel_x
acceleration = accel_x
beta = 0.25
gamma = 0.5
eta = 'eta_rayleigh'
[]
[inertia_y]
type = InertialForce
variable = disp_y
velocity = vel_y
acceleration = accel_y
beta = 0.25
gamma = 0.5
eta = 'eta_rayleigh'
[]
[inertia_z]
type = InertialForce
variable = disp_z
velocity = vel_z
acceleration = accel_z
beta = 0.25
gamma = 0.5
eta = 'eta_rayleigh'
[]
[]
[AuxKernels]
[accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = timestep_end
[]
[vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = timestep_end
[]
[accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = timestep_end
[]
[vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = timestep_end
[]
[accel_z]
type = NewmarkAccelAux
variable = accel_z
displacement = disp_z
velocity = vel_z
beta = 0.25
execute_on = timestep_end
[]
[vel_z]
type = NewmarkVelAux
variable = vel_z
acceleration = accel_z
gamma = 0.5
execute_on = timestep_end
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yy
index_i = 1
index_j = 1
[]
[]
[BCs]
[top_y]
type = DirichletBC
variable = disp_y
boundary = top
value = 0.0
[]
[top_x]
type = DirichletBC
variable = disp_x
boundary = top
value = 0.0
[]
[top_z]
type = DirichletBC
variable = disp_z
boundary = top
value = 0.0
[]
[bottom_x]
type = DirichletBC
variable = disp_x
boundary = bottom
value = 0.0
[]
[bottom_z]
type = DirichletBC
variable = disp_z
boundary = bottom
value = 0.0
[]
[Pressure]
[Side1]
boundary = bottom
function = pressure
displacements = 'disp_x disp_y disp_z'
factor = 1
[]
[]
[]
[Materials]
[Elasticity_tensor]
type = ComputeElasticityTensor
block = 0
fill_method = symmetric_isotropic
C_ijkl = '210e9 0'
[]
[strain]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[]
[stress]
type = ComputeLinearElasticStress
block = 0
[]
[density]
type = GenericConstantMaterial
block = 0
prop_names = 'density'
prop_values = '7750'
[]
[material_zeta]
type = GenericConstantMaterial
block = 0
prop_names = 'zeta_rayleigh'
prop_values = '0.1'
[]
[material_eta]
type = GenericConstantMaterial
block = 0
prop_names = 'eta_rayleigh'
prop_values = '0.1'
[]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 2
dt = 0.1
[]
[Functions]
[pressure]
type = PiecewiseLinear
x = '0.0 0.1 0.2 1.0 2.0 5.0'
y = '0.0 0.1 0.2 1.0 1.0 1.0'
scale_factor = 1e9
[]
[]
[Postprocessors]
[_dt]
type = TimestepSize
[]
[disp]
type = NodalExtremeValue
variable = disp_y
boundary = bottom
[]
[vel]
type = NodalExtremeValue
variable = vel_y
boundary = bottom
[]
[accel]
type = NodalExtremeValue
variable = accel_y
boundary = bottom
[]
[stress_yy]
type = ElementAverageValue
variable = stress_yy
[]
[strain_yy]
type = ElementAverageValue
variable = strain_yy
[]
[]
[Outputs]
file_base = 'rayleigh_newmark_out'
exodus = true
perf_graph = true
[]
(modules/thermal_hydraulics/test/tests/materials/ad_average_wall_temperature_3eqn/ad_average_wall_temperature_3eqn.i)
# Tests the average wall temperature aux for 1-phase flow. With the following
# inputs, the value should be equal to 1.25:
#
# i h_wall T_wall P_hf
# --------------------------
# 1 10 26/10 1
# 2 6 1/2 3
#
# T_fluid = 1/4
#
# With these values,
# P_tot = 1 + 3 = 4
# h_wall_avg = (1 * 10 + 3 * 6) / 4 = 28 / 4 = 7
# denominator = P_tot * h_wall_avg = 4 * 7 = 28
# numerator = 10 * (26/10 - 1/4) * 1 + 6 * (1/2 - 1/4) * 3 = 28
# T_wall_avg = T_fluid + numerator / denominator = 1/4 + 1
#
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
allow_renumbering = false
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = ADDiffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[AuxVariables]
[Hw_avg]
family = MONOMIAL
order = CONSTANT
[]
[T_wall_avg]
family = MONOMIAL
order = CONSTANT
[]
[T_wall1]
family = MONOMIAL
order = CONSTANT
[]
[T_wall2]
family = MONOMIAL
order = CONSTANT
[]
[P_hf1]
family = MONOMIAL
order = CONSTANT
[]
[P_hf2]
family = MONOMIAL
order = CONSTANT
[]
[P_hf_total]
family = MONOMIAL
order = CONSTANT
[]
[T_fluid]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[T_wall_avg_auxkernel]
type = ADMaterialRealAux
variable = T_wall_avg
property = T_wall
[]
[T_wall1_auxkernel]
type = ConstantAux
variable = T_wall1
value = 2.6
[]
[T_wall2_auxkernel]
type = ConstantAux
variable = T_wall2
value = 0.5
[]
[P_hf_total_auxkernel]
type = SumAux
variable = P_hf_total
values = 'P_hf1 P_hf2'
[]
[P_hf1_auxkernel]
type = ConstantAux
variable = P_hf1
value = 1
[]
[P_hf2_auxkernel]
type = ConstantAux
variable = P_hf2
value = 3
[]
[T_fluid_auxkernel]
type = ConstantAux
variable = T_fluid
value = 0.25
[]
[]
[Materials]
[const_materials]
type = ADGenericConstantMaterial
prop_names = 'Hw1 Hw2'
prop_values = '10 6'
[]
[Hw_avg_material]
type = ADWeightedAverageMaterial
prop_name = Hw_avg
values = 'Hw1 Hw2'
weights = 'P_hf1 P_hf2'
[]
[T_wall_avg_material]
type = ADAverageWallTemperature3EqnMaterial
T_wall_sources = 'T_wall1 T_wall2'
Hw_sources = 'Hw1 Hw2'
P_hf_sources = 'P_hf1 P_hf2'
T_fluid = T_fluid
Hw_average = Hw_avg
P_hf_total = P_hf_total
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[T_wall_avg_pp]
type = ElementalVariableValue
elementid = 0
variable = T_wall_avg
[]
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(test/tests/materials/material/adv_mat_couple_test.i)
[Mesh]
file = rectangle.e
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff body_force'
[./diff]
type = Diffusion
variable = u
[../]
[./body_force]
type = BodyForce
variable = u
block = 1
value = 10
[../]
[]
[BCs]
active = 'right'
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Materials]
# This material is global and uses a coupled property
[./mat_global]
type = CoupledMaterial
mat_prop = 'some_prop'
coupled_mat_prop = 'mp1'
block = '1 2'
[../]
# This material supplies a value for block 1 ONLY
[./mat_0]
type = GenericConstantMaterial
block = 1
prop_names = 'mp1'
prop_values = 2
[../]
# This material supplies a value for block 2 ONLY
[./mat_1]
type = GenericConstantMaterial
block = 2
prop_names = 'mp1'
prop_values = 200
[../]
[]
[Executioner]
type = Steady
# solve_type = 'PJFNK'
# preconditioner = 'ILU'
solve_type = 'PJFNK'
# petsc_options_iname = '-pc_type -pc_hypre_type'
# petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
file_base = out_adv_coupled
exodus = true
[]
[Debug]
show_material_props = true
[]
(modules/optimization/test/tests/optimizationreporter/general_opt/point_loads_gen_opt/forward_homogeneous.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmax = 1
ymax = 1.4
[]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = thermal_conductivity
[]
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = temperature
x_coord_name = 'point_source/x'
y_coord_name = 'point_source/y'
z_coord_name = 'point_source/z'
value_name = 'point_source/value'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temperature
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = temperature
boundary = right
value = 0
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 0
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 0
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-6
nl_rel_tol = 1e-8
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[VectorPostprocessors]
[point_source]
type = ConstantVectorPostprocessor
vector_names = 'x y z value'
value = '0.2 0.7 0.4;
0.2 0.56 1;
0 0 0;
-1000 120 500'
execute_on = LINEAR
[]
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
measurement_points = ${measurement_points}
measurement_values = ${measurement_values}
[]
[]
[Outputs]
console = false
file_base = 'forward_homo'
[]
(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'
[]
[]
(modules/contact/test/tests/mortar_dynamics/block-dynamics-friction-action.i)
starting_point = 2e-1
offset = -0.19
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = long-bottom-block-no-lower-d.e
[]
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[DynamicTensorMechanics]
displacements = 'disp_x disp_y'
generate_output = 'stress_xx stress_yy'
strain = FINITE
block = '1 2'
zeta = 0.05
alpha = 0.0
[]
[inertia_x]
type = InertialForce
variable = disp_x
velocity = vel_x
acceleration = accel_x
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[inertia_y]
type = InertialForce
variable = disp_y
velocity = vel_y
acceleration = accel_y
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[strain]
type = ComputeFiniteStrain
block = '1 2'
[]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '7750'
[]
[]
[AuxVariables]
[vel_x]
block = '1 2'
[]
[accel_x]
block = '1 2'
[]
[vel_y]
block = '1 2'
[]
[accel_y]
block = '1 2'
[]
[vel_z]
block = '1 2'
[]
[accel_z]
block = '1 2'
[]
[]
[AuxKernels]
[accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = 'LINEAR timestep_end'
[]
[vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = 'LINEAR timestep_end'
[]
[accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = 'LINEAR timestep_end'
[]
[vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = 'LINEAR timestep_end'
[]
[]
[Contact]
[mechanical]
formulation = mortar
model = coulomb
primary = 20
secondary = 10
friction_coefficient = 0.5
c_normal = 1.0e4
c_tangential = 1.0e4
mortar_dynamics = true
newmark_beta = 0.25
newmark_gamma = 0.5
capture_tolerance = 1.0e-5
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(2 * pi / 4 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 30 # 50
function = '0' # '1e-2*t'
[]
[]
[Executioner]
type = Transient
end_time = 75
dt = 0.05
dtmin = .005
solve_type = 'PJFNK'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -mat_mffd_err '
petsc_options_value = 'lu NONZERO 1e-15 1e-5'
nl_max_its = 50
line_search = 'none'
snesmf_reuse_base = false
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
[]
[VectorPostprocessors]
[mechanical_tangential_lm]
type = NodalValueSampler
block = 'mechanical_secondary_subdomain'
variable = mechanical_tangential_lm
sort_by = 'x'
execute_on = TIMESTEP_END
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
(modules/phase_field/test/tests/KKS_system/kks_example_split.i)
#
# KKS toy problem in the split form
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
nz = 0
xmin = -2.5
xmax = 2.5
ymin = -2.5
ymax = 2.5
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[AuxVariables]
[./Fglobal]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Variables]
# order parameter
[./eta]
order = FIRST
family = LAGRANGE
[../]
# hydrogen concentration
[./c]
order = FIRST
family = LAGRANGE
[../]
# chemical potential
[./w]
order = FIRST
family = LAGRANGE
[../]
# hydrogen phase concentration (matrix)
[./cm]
order = FIRST
family = LAGRANGE
initial_condition = 0.0
[../]
# hydrogen phase concentration (delta phase)
[./cd]
order = FIRST
family = LAGRANGE
initial_condition = 0.0
[../]
[]
[ICs]
[./eta]
variable = eta
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 1.5
invalue = 0.2
outvalue = 0.1
int_width = 0.75
[../]
[./c]
variable = c
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 1.5
invalue = 0.6
outvalue = 0.4
int_width = 0.75
[../]
[]
[BCs]
[./Periodic]
[./all]
variable = 'eta w c cm cd'
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
# Free energy of the matrix
[./fm]
type = DerivativeParsedMaterial
property_name = fm
coupled_variables = 'cm'
expression = '(0.1-cm)^2'
[../]
# Free energy of the delta phase
[./fd]
type = DerivativeParsedMaterial
property_name = fd
coupled_variables = 'cd'
expression = '(0.9-cd)^2'
[../]
# h(eta)
[./h_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta
[../]
# g(eta)
[./g_eta]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta
[../]
# constant properties
[./constants]
type = GenericConstantMaterial
prop_names = 'M L kappa'
prop_values = '0.7 0.7 0.4 '
[../]
[]
[Kernels]
# full transient
active = 'PhaseConc ChemPotVacancies CHBulk ACBulkF ACBulkC ACInterface dcdt detadt ckernel'
# enforce c = (1-h(eta))*cm + h(eta)*cd
[./PhaseConc]
type = KKSPhaseConcentration
ca = cm
variable = cd
c = c
eta = eta
[../]
# enforce pointwise equality of chemical potentials
[./ChemPotVacancies]
type = KKSPhaseChemicalPotential
variable = cm
cb = cd
fa_name = fm
fb_name = fd
[../]
#
# Cahn-Hilliard Equation
#
[./CHBulk]
type = KKSSplitCHCRes
variable = c
ca = cm
fa_name = fm
w = w
[../]
[./dcdt]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./ckernel]
type = SplitCHWRes
mob_name = M
variable = w
[../]
#
# Allen-Cahn Equation
#
[./ACBulkF]
type = KKSACBulkF
variable = eta
fa_name = fm
fb_name = fd
coupled_variables = 'cm cd'
w = 0.4
[../]
[./ACBulkC]
type = KKSACBulkC
variable = eta
ca = cm
cb = cd
fa_name = fm
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = kappa
[../]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[]
[AuxKernels]
[./GlobalFreeEnergy]
variable = Fglobal
type = KKSGlobalFreeEnergy
fa_name = fm
fb_name = fd
w = 0.4
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pctype -sub_pc_type -sub_pc_factor_shift_type -pc_factor_shift_type'
petsc_options_value = ' asm lu nonzero nonzero'
l_max_its = 100
nl_max_its = 100
num_steps = 3
dt = 0.1
[]
#
# Precondition using handcoded off-diagonal terms
#
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[Outputs]
file_base = kks_example_split
exodus = true
[]
(modules/xfem/test/tests/switching_material/two_cuts_stationary.i)
[Problem]
solve = false
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[cut1]
type = LevelSetCutUserObject
level_set_var = phi1
negative_id = 1
positive_id = 33
execute_on = NONE
[]
[cut2]
type = LevelSetCutUserObject
level_set_var = phi2
negative_id = 5
positive_id = 16
execute_on = NONE
[]
[combo]
type = ComboCutUserObject
geometric_cut_userobjects = 'cut1 cut2'
cut_subdomain_combinations = '1 5;
1 16;
33 5;
33 16'
cut_subdomains = '1 3 5 7'
[]
[]
[Mesh]
[square]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
[]
[]
[AuxVariables]
[phi1]
[InitialCondition]
type = FunctionIC
function = 'x-0.213'
[]
[]
[phi2]
[InitialCondition]
type = FunctionIC
function = 'x-0.728'
[]
[]
[cut1_id]
order = CONSTANT
family = MONOMIAL
[]
[cut2_id]
order = CONSTANT
family = MONOMIAL
[]
[combo_id]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[cut1_id]
type = CutSubdomainIDAux
variable = cut1_id
cut = cut1
[]
[cut2_id]
type = CutSubdomainIDAux
variable = cut2_id
cut = cut2
[]
[combo_id]
type = CutSubdomainIDAux
variable = combo_id
cut = combo
[]
[]
[Materials]
[diffusivity_A]
type = GenericConstantMaterial
prop_names = 'A_D'
prop_values = '5'
[]
[diffusivity_B]
type = GenericConstantMaterial
prop_names = 'B_D'
prop_values = '0.5'
[]
[diffusivity_C]
type = GenericConstantMaterial
prop_names = 'C_D'
prop_values = '12'
[]
[diffusivity_D]
type = GenericConstantMaterial
prop_names = 'D_D'
prop_values = '9'
[]
[diff_combined]
type = XFEMCutSwitchingMaterialReal
cut_subdomain_ids = '1 3 5 7'
base_names = 'A B C D'
prop_name = D
geometric_cut_userobject = combo
outputs = 'exodus'
output_properties = 'D'
[]
[]
[Executioner]
type = Transient
num_steps = 1
max_xfem_update = 1
[]
[Outputs]
exodus = 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'
[]
[]
(modules/phase_field/test/tests/new_initial_conditions/GrainGrowth_initial_from_file.i)
[Mesh]
file = prepare_mesh_out.e
[]
[Modules]
[./PhaseField]
[./GrainGrowth]
op_num = 4
var_name_base = gr
initial_from_file = true
variable_mobility = false
[../]
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
prop_names = 'L mu gamma_asymm kappa_op'
prop_values = '0 0 0 0'
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 2
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[Outputs]
exodus = true
execute_on = FINAL
hide = bnds
[]
(modules/chemical_reactions/test/tests/exceptions/missing_sto3.i)
# Missing stoichiometric coefficient in AqueousEquilibriumRxnAux AuxKernel
# Simple reaction-diffusion example without using the action.
# In this example, two primary species a and b diffuse towards each other from
# opposite ends of a porous medium, reacting when they meet to form a mineral
# precipitate
# This simulation is identical to 2species.i, but explicitly includes the AuxVariables,
# AuxKernels, and Kernels that the action in 2species.i adds
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Variables]
[./a]
[../]
[./b]
[../]
[]
[AuxVariables]
[./mineral]
[../]
[]
[AuxKernels]
[./mineral_conc]
type = KineticDisPreConcAux
variable = mineral
sto_v = 1
v = 'a b'
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./b_ie]
type = PrimaryTimeDerivative
variable = b
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = porosity
prop_values = 0.2
[../]
[]
[Executioner]
type = Transient
end_time = 1
[]
(modules/chemical_reactions/test/tests/solid_kinetics/calcite_dissolution.i)
# Example of batch reaction of calcite (CaCO3) dissolution to form calcium (Ca++)
# and bicarbonate (HCO3-).
#
# The reaction network considered is as follows:
# Aqueous equilibrium reactions:
# a) H+ + HCO3- = CO2(aq), Keq = 10^(6.341)
# b) HCO3- = H+ + CO3--, Keq = 10^(-10.325)
# c) Ca++ + HCO3- = H+ + CaCO3(aq), Keq = 10^(-7.009)
# d) Ca++ + HCO3- = CaHCO3+, Keq = 10^(-0.653)
# e) Ca++ = H+ + CaOh+, Keq = 10^(-12.85)
# f) - H+ = OH-, Keq = 10^(-13.991)
#
# Kinetic reactions
# g) Ca++ + HCO3- = H+ + CaCO3(s), A = 0.461 m^2/L, k = 6.456542e-2 mol/m^2 s,
# Keq = 10^(1.8487)
#
# The primary chemical species are H+, HCO3- and Ca++.
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Variables]
[./ca++]
initial_condition = 1.0e-5
[../]
[./h+]
initial_condition = 1.0e-6
[../]
[./hco3-]
initial_condition = 1.0e-5
[../]
[]
[AuxVariables]
[./caco3_s]
initial_condition = 0.05
[../]
[./ph]
[../]
[]
[AuxKernels]
[./ph]
type = PHAux
h_conc = h+
variable = ph
[../]
[]
[ReactionNetwork]
[./AqueousEquilibriumReactions]
primary_species = 'ca++ hco3- h+'
secondary_species = 'co2_aq co3-- caco3_aq cahco3+ caoh+ oh-'
reactions = 'h+ + hco3- = co2_aq 6.3447,
hco3- - h+ = co3-- -10.3288,
ca++ + hco3- - h+ = caco3_aq -7.0017,
ca++ + hco3- = cahco3+ -1.0467,
ca++ - h+ = caoh+ -12.85,
- h+ = oh- -13.9951'
[../]
[./SolidKineticReactions]
primary_species = 'ca++ hco3- h+'
kin_reactions = 'ca++ + hco3- - h+ = caco3_s'
secondary_species = caco3_s
log10_keq = 1.8487
reference_temperature = 298.15
system_temperature = 298.15
gas_constant = 8.314
specific_reactive_surface_area = 0.1
kinetic_rate_constant = 6.456542e-7
activation_energy = 1.5e4
[../]
[]
[Kernels]
[./ca++_ie]
type = PrimaryTimeDerivative
variable = ca++
[../]
[./h+_ie]
type = PrimaryTimeDerivative
variable = h+
[../]
[./hco3-_ie]
type = PrimaryTimeDerivative
variable = hco3-
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'porosity diffusivity conductivity'
prop_values = '0.25 1e-9 1.0'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
end_time = 100
dt = 10
nl_abs_tol = 1e-12
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
[./h+]
type = ElementIntegralVariablePostprocessor
variable = h+
execute_on = 'initial timestep_end'
[../]
[./ca++]
type = ElementIntegralVariablePostprocessor
variable = ca++
execute_on = 'initial timestep_end'
[../]
[./hco3-]
type = ElementIntegralVariablePostprocessor
variable = hco3-
execute_on = 'initial timestep_end'
[../]
[./co2_aq]
type = ElementIntegralVariablePostprocessor
variable = co2_aq
execute_on = 'initial timestep_end'
[../]
[./oh-]
type = ElementIntegralVariablePostprocessor
variable = oh-
execute_on = 'initial timestep_end'
[../]
[./co3--]
type = ElementIntegralVariablePostprocessor
variable = co3--
execute_on = 'initial timestep_end'
[../]
[./caco3_aq]
type = ElementIntegralVariablePostprocessor
variable = caco3_aq
execute_on = 'initial timestep_end'
[../]
[./caco3_s]
type = ElementIntegralVariablePostprocessor
variable = caco3_s
execute_on = 'initial timestep_end'
[../]
[./ph]
type = ElementIntegralVariablePostprocessor
variable = ph
execute_on = 'initial timestep_end'
[../]
[./calcite_vf]
type = TotalMineralVolumeFraction
variable = caco3_s
molar_volume = 36.934e-6
[../]
[]
[Outputs]
perf_graph = true
csv = true
[]
(modules/heat_transfer/test/tests/function_ellipsoid_heat_source/function_heat_source.i)
[Mesh]
type = GeneratedMesh
dim = 3
xmin = -5.0
xmax = 5.0
nx = 10
ymin = -5.0
ymax = 5.0
ny = 10
zmin = 0.0
zmax = 1.0
nz = 1
[]
[Variables]
[./temp]
initial_condition = 300
[../]
[]
[Kernels]
[./time]
type = ADHeatConductionTimeDerivative
variable = temp
[../]
[./heat_conduct]
type = ADHeatConduction
variable = temp
thermal_conductivity = thermal_conductivity
[../]
[./heat_source]
type = ADMatHeatSource
material_property = volumetric_heat
variable = temp
[../]
[]
[BCs]
[./temp_bottom_fix]
type = ADDirichletBC
variable = temp
boundary = 1
value = 300
[../]
[]
[Materials]
[./heat]
type = ADHeatConductionMaterial
specific_heat = 603
thermal_conductivity = 10e-2
[../]
[./density]
type = ADGenericConstantMaterial
prop_names = 'density'
prop_values = '4.43e-6'
[../]
[./volumetric_heat]
type = FunctionPathEllipsoidHeatSource
rx = 1
ry = 1
rz = 1
power = 1000
efficiency = 0.5
factor = 2
function_x= path_x
function_y= path_y
function_z= path_z
[../]
[]
[Functions]
[./path_x]
type = ParsedFunction
expression = 2*cos(2.0*pi*t)
[../]
[./path_y]
type = ParsedFunction
expression = 2*sin(2.0*pi*t)
[../]
[./path_z]
type = ParsedFunction
expression = 1.0
[../]
[]
[Postprocessors]
[temp_max]
type = ElementExtremeValue
variable = temp
[]
[temp_min]
type = ElementExtremeValue
variable = temp
value_type = min
[]
[temp_avg]
type = ElementAverageValue
variable = temp
[]
[]
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
nl_rel_tol = 1e-6
nl_abs_tol = 1e-6
petsc_options_iname = '-ksp_type -pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'preonly lu superlu_dist'
l_max_its = 100
end_time = 1
dt = 0.1
dtmin = 1e-4
[]
[Outputs]
csv = true
[]
(modules/heat_transfer/test/tests/heat_conduction/2d_quadrature_gap_heat_transfer/nonmatching.i)
[Mesh]
file = nonmatching.e
[]
[Variables]
[./temp]
[../]
[]
[Kernels]
[./hc]
type = HeatConduction
variable = temp
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = temp
boundary = leftleft
value = 1000
[../]
[./right]
type = DirichletBC
variable = temp
boundary = rightright
value = 400
[../]
[]
[ThermalContact]
[./left_to_right]
emissivity_primary = 0
emissivity_secondary = 0
secondary = leftright
quadrature = true
primary = rightleft
variable = temp
type = GapHeatTransfer
[../]
[]
[Materials]
[./hcm]
type = HeatConductionMaterial
block = 'left right'
specific_heat = 1
thermal_conductivity = 1
[../]
[./gap_conductance]
type = GenericConstantMaterial
prop_names = 'gap_conductance gap_conductance_dT'
boundary = 'leftright rightleft'
prop_values = '1 0'
[../]
[]
[Postprocessors]
[./left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = leftright
diffusivity = thermal_conductivity
[../]
[./right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = rightleft
diffusivity = thermal_conductivity
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = 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/stochastic_tools/examples/surrogates/pod_rb/2d_multireg/sub.i)
halfa = 10
fulla = 20
[Problem]
type = FEProblem
extra_tag_vectors = 'diff0 diff1 diff2 diff3 abs0 abs1 abs2 abs3 src0 src1 src2'
[]
[Mesh]
[msh]
type = CartesianMeshGenerator
dim = 2
dx = '10 20 20 20 20 20 20 20 20'
dy = '10 20 20 20 20 20 20 20 20'
ix = '${halfa} ${fulla} ${fulla} ${fulla} ${fulla} ${fulla} ${fulla} ${fulla} ${fulla}'
iy = '${halfa} ${fulla} ${fulla} ${fulla} ${fulla} ${fulla} ${fulla} ${fulla} ${fulla}'
subdomain_id = '1 0 0 0 1 0 0 2 3
0 0 0 0 0 0 0 2 3
0 0 1 0 0 0 2 2 3
0 0 0 0 0 0 2 3 3
1 0 0 0 1 2 2 3 3
0 0 0 0 2 2 3 3 3
0 0 2 2 2 3 3 3 3
2 2 2 3 3 3 3 3 3
3 3 3 3 3 3 3 3 3'
[]
[]
[Variables]
[psi]
[]
[]
[Kernels]
[diff0]
type = MatDiffusion
variable = psi
diffusivity = D0
extra_vector_tags = 'diff0'
block = 0
[]
[diff1]
type = MatDiffusion
variable = psi
diffusivity = D1
extra_vector_tags = 'diff1'
block = 1
[]
[diff2]
type = MatDiffusion
variable = psi
diffusivity = D2
extra_vector_tags = 'diff2'
block = 2
[]
[diff3]
type = MatDiffusion
variable = psi
diffusivity = D3
extra_vector_tags = 'diff3'
block = 3
[]
[abs0]
type = MaterialReaction
variable = psi
coefficient = absxs0
extra_vector_tags = 'abs0'
block = 0
[]
[abs1]
type = MaterialReaction
variable = psi
coefficient = absxs1
extra_vector_tags = 'abs1'
block = 1
[]
[abs2]
type = MaterialReaction
variable = psi
coefficient = absxs2
extra_vector_tags = 'abs2'
block = 2
[]
[abs3]
type = MaterialReaction
variable = psi
coefficient = absxs3
extra_vector_tags = 'abs3'
block = 3
[]
[src0]
type = BodyForce
variable = psi
value = 1
extra_vector_tags = 'src0'
block = 0
[]
[src1]
type = BodyForce
variable = psi
value = 1
extra_vector_tags = 'src1'
block = 1
[]
[src2]
type = BodyForce
variable = psi
value = 1
extra_vector_tags = 'src2'
block = 2
[]
[]
[Materials]
[D0]
type = GenericConstantMaterial
prop_names = D0
prop_values = 1
block = 0
[]
[D1]
type = GenericConstantMaterial
prop_names = D1
prop_values = 1
block = 1
[]
[D2]
type = GenericConstantMaterial
prop_names = D2
prop_values = 1
block = 2
[]
[D3]
type = GenericConstantMaterial
prop_names = D3
prop_values = 1
block = 3
[]
[absxs0]
type = GenericConstantMaterial
prop_names = absxs0
prop_values = 1
block = 0
[]
[absxs1]
type = GenericConstantMaterial
prop_names = absxs1
prop_values = 1
block = 1
[]
[absxs2]
type = GenericConstantMaterial
prop_names = absxs2
prop_values = 1
block = 2
[]
[absxs3]
type = GenericConstantMaterial
prop_names = absxs3
prop_values = 1
block = 3
[]
[]
[BCs]
[left]
type = NeumannBC
variable = psi
boundary = left
value = 0
[]
[bottom]
type = NeumannBC
variable = psi
boundary = bottom
value = 0
[]
[top]
type = DirichletBC
variable = psi
boundary = top
value = 0
[]
[right]
type = DirichletBC
variable = psi
boundary = right
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = linear
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Postprocessors]
[nodal_l2]
type = NodalL2Norm
variable = psi
[]
[]
[Outputs]
[]
(modules/chemical_reactions/test/tests/jacobian/coupled_equilsub.i)
# Test the Jacobian terms for the CoupledBEEquilibriumSub Kernel
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
[]
[Variables]
[./a]
order = FIRST
family = LAGRANGE
[../]
[./b]
order = FIRST
family = LAGRANGE
[../]
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./pressure]
type = RandomIC
variable = pressure
min = 1
max = 5
[../]
[./a]
type = RandomIC
variable = a
max = 1
min = 0
[../]
[./b]
type = RandomIC
variable = b
max = 1
min = 0
[../]
[]
[Kernels]
[./diff]
type = DarcyFluxPressure
variable = pressure
[../]
[./diff_b]
type = Diffusion
variable = b
[../]
[./a]
type = CoupledBEEquilibriumSub
variable = a
v = b
log_k = 2
weight = 2
sto_v = 1.5
sto_u = 2
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity'
prop_values = '1e-4 1e-4 0.2'
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 1
[]
[Outputs]
perf_graph = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
(modules/combined/test/tests/multiphase_mechanics/nonsplit_gradderiv.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 5
xmax = 10
ymax = 10
[]
[GlobalParams]
displacements = 'disp_x disp_y'
displacement_gradients = 'gxx gxy gyx gyy'
[]
[AuxVariables]
[./disp_x]
[./InitialCondition]
type = FunctionIC
function = '0.1*sin(2*x/10*3.14159265359)'
[../]
[../]
[./disp_y]
[./InitialCondition]
type = FunctionIC
function = '0.1*sin(1*y/10*3.14159265359)'
[../]
[../]
[]
[Variables]
[./c]
order = THIRD
family = HERMITE
initial_condition = 0
[../]
[./gxx]
[../]
[./gxy]
[../]
[./gyx]
[../]
[./gyy]
[../]
[]
[Kernels]
[./dt]
type = TimeDerivative
variable = c
[../]
[./bulk]
type = CahnHilliard
variable = c
mob_name = M
f_name = F
[../]
[./int]
type = CHInterface
variable = c
mob_name = M
kappa_name = kappa_c
[../]
[./gxx]
type = GradientComponent
variable = gxx
v = disp_x
component = 0
[../]
[./gxy]
type = GradientComponent
variable = gxy
v = disp_x
component = 1
[../]
[./gyx]
type = GradientComponent
variable = gyx
v = disp_y
component = 0
[../]
[./gyy]
type = GradientComponent
variable = gyy
v = disp_y
component = 1
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1 0.1'
[../]
[./straingradderiv]
type = StrainGradDispDerivatives
[../]
[./elasticity_tensor]
type = ComputeConcentrationDependentElasticityTensor
c = c
C0_ijkl = '1.0 1.0'
C1_ijkl = '3.0 3.0'
fill_method0 = symmetric_isotropic
fill_method1 = symmetric_isotropic
[../]
[./smallstrain]
type = ComputeSmallStrain
[../]
[./linearelastic_a]
type = ComputeLinearElasticStress
[../]
[./elastic_free_energy]
type = ElasticEnergyMaterial
f_name = F
args = 'c'
derivative_order = 3
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = NEWTON
l_max_its = 30
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-7
nl_abs_tol = 1.0e-10
num_steps = 2
dt = 1
[]
[Outputs]
perf_graph = true
exodus = 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
[]
(modules/stochastic_tools/examples/libtorch_drl_control/libtorch_drl_control_sub.i)
air_density = 1.184 # kg/m3
air_cp = 1000 # J/(kg K)
air_effective_k = 0.5 # W/(m K)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.0
xmax = 7.0
ymin = 0.0
ymax = 5.0
nx = 35
ny = 25
[]
[]
[Variables]
[T]
initial_condition = 297
[]
[]
[Kernels]
[time_derivative]
type = CoefTimeDerivative
variable = T
Coefficient = '${fparse air_density*air_cp}'
[]
[heat_conduction]
type = MatDiffusion
variable = T
diffusivity = 'k'
[]
[]
[BCs]
[top_flux]
type = NeumannBC
value = 0.0
boundary = 'top'
variable = T
[]
[dirichlet]
type = FunctionDirichletBC
function = temp_env
variable = T
boundary = 'left right'
[]
[]
[Functions]
[temp_env]
type = ParsedFunction
value = '15.0*sin(t/86400.0*pi) + 273.0'
[]
[design_function]
type = ParsedFunction
value = '297'
[]
[reward_function]
type = ScaledAbsDifferenceDRLRewardFunction
design_function = design_function
observed_value = center_temp_tend
c1 = 1
c2 = 10
[]
[]
[Materials]
[constant]
type = GenericConstantMaterial
prop_names = 'k'
prop_values = ${air_effective_k}
[]
[]
[Postprocessors]
[center_temp]
type = PointValue
variable = T
point = '3.5 2.5 0.0'
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[center_temp_tend]
type = PointValue
variable = T
point = '3.5 2.5 0.0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[env_temp]
type = FunctionValuePostprocessor
function = temp_env
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[reward]
type = FunctionValuePostprocessor
function = reward_function
execute_on = 'INITIAL TIMESTEP_END'
indirect_dependencies = 'center_temp_tend env_temp'
[]
[top_flux]
type = LibtorchControlValuePostprocessor
control_name = src_control
[]
[log_prob_top_flux]
type = LibtorchDRLLogProbabilityPostprocessor
control_name = src_control
[]
[]
[Reporters]
[T_reporter]
type = AccumulateReporter
reporters = 'center_temp_tend/value env_temp/value reward/value top_flux/value log_prob_top_flux/value'
[]
[]
[Controls]
inactive = 'src_control_final'
[src_control]
type = LibtorchDRLControl
parameters = "BCs/top_flux/value"
responses = 'center_temp_tend env_temp'
# keep consistent with LibtorchDRLControlTrainer
input_timesteps = 2
response_scaling_factors = '0.03 0.03'
response_shift_factors = '290 290'
action_standard_deviations = '0.02'
action_scaling_factors = 200
execute_on = 'TIMESTEP_BEGIN'
[]
[src_control_final]
type = LibtorchNeuralNetControl
filename = 'mynet_control.net'
num_neurons_per_layer = '16 6'
activation_function = 'relu'
parameters = "BCs/top_flux/value"
responses = 'center_temp_tend env_temp'
# keep consistent with LibtorchDRLControlTrainer
input_timesteps = 2
response_scaling_factors = '0.03 0.03'
response_shift_factors = '290 290'
action_standard_deviations = '0.02'
action_scaling_factors = 200
execute_on = 'TIMESTEP_BEGIN'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-7
start_time = 0.0
end_time = 86400
dt = 900.0
[]
[Outputs]
console = false
[c]
type = CSV
execute_on = FINAL
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_no_parts_steady_stabilized_second_order.i)
[GlobalParams]
order = SECOND
integrate_p_by_parts = false
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[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]
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_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]
[p_corner]
type = DirichletBC
boundary = top_right
value = 0
variable = p
[]
[inlet]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom'
function_x = 0
function_y = 'inlet_func'
[../]
[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
[]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[ins_mat]
type = INSADTauMaterial
velocity = velocity
pressure = p
[]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[../]
[]
(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'
[]
[]
(test/tests/userobjects/domain-user-object/measure-conservation.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 10
[]
[Variables]
[u]
order = FIRST
family = MONOMIAL
[]
[]
[UserObjects]
[test]
type = DGDiffusionDomainUserObject
function = 'x'
epsilon = -1
sigma = 6
u = u
diff = 'diff'
ad_diff = 'ad_diff'
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = 'diff'
[]
[]
[DGKernels]
[dg_diff]
type = DGDiffusion
variable = u
epsilon = -1
sigma = 6
diff = 'diff'
[]
[]
[BCs]
[all]
type = DGFunctionDiffusionDirichletBC
variable = u
boundary = 'left right'
function = 'x'
epsilon = -1
sigma = 6
diff = 'diff'
[]
[]
[Materials]
[constant]
type = GenericConstantMaterial
prop_names = 'diff'
prop_values = '2'
[]
[ad_constant]
type = ADGenericConstantMaterial
prop_names = 'ad_diff'
prop_values = '2'
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-14
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialAnisotropy.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
xmin = -2
xmax = 2
ymin = -2
ymax = 2
[]
# enable_jit set to false in many materials to make this test start up faster.
# It is recommended to set enable_jit = true or just remove these lines for
# production runs with this model
[GlobalParams]
radius = 1.0
int_width = 0.8
x1 = 0
y1 = 0
derivative_order = 2
enable_jit = false
[]
[Variables]
[./w]
[../]
[./etaa0]
[../]
[./etab0]
[../]
[]
[AuxVariables]
[./bnds]
[../]
[]
[AuxKernels]
[./bnds]
type = BndsCalcAux
variable = bnds
v = 'etaa0 etab0'
[../]
[]
[ICs]
[./w]
type = SmoothCircleIC
variable = w
# note w = A*(c-cleq), A = 1.0, cleq = 0.0 ,i.e., w = c (in the matrix/liquid phase)
outvalue = -4.0
invalue = 0.0
[../]
[./etaa0]
type = SmoothCircleIC
variable = etaa0
#Solid phase
outvalue = 0.0
invalue = 1.0
[../]
[./etab0]
type = SmoothCircleIC
variable = etab0
#Liquid phase
outvalue = 1.0
invalue = 0.0
[../]
[]
[BCs]
[./Periodic]
[./w]
variable = w
auto_direction = 'x y'
[../]
[./etaa0]
variable = etaa0
auto_direction = 'x y'
[../]
[./etab0]
variable = etab0
auto_direction = 'x y'
[../]
[../]
[]
[Kernels]
# Order parameter eta_alpha0
[./ACa0_bulk]
type = ACGrGrMulti
variable = etaa0
v = 'etab0'
gamma_names = 'gab'
[../]
[./ACa0_sw]
type = ACSwitching
variable = etaa0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etab0 w'
[../]
[./ACa0_int1]
type = ACInterface2DMultiPhase1
variable = etaa0
etas = 'etab0'
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
d2kappadgrad_etaa_name = d2kappadgrad_etaa
[../]
[./ACa0_int2]
type = ACInterface2DMultiPhase2
variable = etaa0
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
[../]
[./ea0_dot]
type = TimeDerivative
variable = etaa0
[../]
# Order parameter eta_beta0
[./ACb0_bulk]
type = ACGrGrMulti
variable = etab0
v = 'etaa0'
gamma_names = 'gab'
[../]
[./ACb0_sw]
type = ACSwitching
variable = etab0
Fj_names = 'omegaa omegab'
hj_names = 'ha hb'
coupled_variables = 'etaa0 w'
[../]
[./ACb0_int1]
type = ACInterface2DMultiPhase1
variable = etab0
etas = 'etaa0'
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
d2kappadgrad_etaa_name = d2kappadgrad_etab
[../]
[./ACb0_int2]
type = ACInterface2DMultiPhase2
variable = etab0
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
[../]
[./eb0_dot]
type = TimeDerivative
variable = etab0
[../]
#Chemical potential
[./w_dot]
type = SusceptibilityTimeDerivative
variable = w
f_name = chi
[../]
[./Diffusion]
type = MatDiffusion
variable = w
diffusivity = Dchi
[../]
[./coupled_etaa0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etaa0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0'
[../]
[./coupled_etab0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etab0
Fj_names = 'rhoa rhob'
hj_names = 'ha hb'
coupled_variables = 'etaa0 etab0'
[../]
[]
[Materials]
[./ha]
type = SwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'etaa0 etab0'
phase_etas = 'etaa0'
[../]
[./hb]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etaa0 etab0'
phase_etas = 'etab0'
[../]
[./omegaa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegaa
material_property_names = 'Vm ka caeq'
expression = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
[../]
[./omegab]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegab
material_property_names = 'Vm kb cbeq'
expression = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq'
[../]
[./rhoa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhoa
material_property_names = 'Vm ka caeq'
expression = 'w/Vm^2/ka + caeq/Vm'
[../]
[./rhob]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhob
material_property_names = 'Vm kb cbeq'
expression = 'w/Vm^2/kb + cbeq/Vm'
[../]
[./kappaa]
type = InterfaceOrientationMultiphaseMaterial
kappa_name = kappaa
dkappadgrad_etaa_name = dkappadgrad_etaa
d2kappadgrad_etaa_name = d2kappadgrad_etaa
etaa = etaa0
etab = etab0
outputs = exodus
output_properties = 'kappaa dkappadgrad_etaa'
[../]
[./kappab]
type = InterfaceOrientationMultiphaseMaterial
kappa_name = kappab
dkappadgrad_etaa_name = dkappadgrad_etab
d2kappadgrad_etaa_name = d2kappadgrad_etab
etaa = etab0
etab = etaa0
outputs = exodus
output_properties = 'kappab dkappadgrad_etab'
[../]
[./const]
type = GenericConstantMaterial
prop_names = 'L D chi Vm ka caeq kb cbeq gab mu'
prop_values = '1.0 1.0 0.1 1.0 10.0 0.1 10.0 0.9 4.5 10.0'
[../]
[./Mobility]
type = ParsedMaterial
property_name = Dchi
material_property_names = 'D chi'
expression = 'D*chi'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
l_tol = 1.0e-5
nl_rel_tol = 1.0e-10
nl_abs_tol = 1e-12
num_steps = 2
dt = 0.001
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/3d-mortar-projection-tolerancing/test.i)
stress_free_temperature = 300
thermal_expansion_coeff = 6.66e-6
[Problem]
type = FEProblem
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
temperature = T_K
[]
[Mesh]
patch_update_strategy = iteration
use_displaced_mesh = true
patch_size = 40
[ori]
type = FileMeshGenerator
file = 'test.msh'
[]
[]
[Variables]
[disp_x]
block = 'pellet_inner pellet_outer'
[]
[disp_y]
block = 'pellet_inner pellet_outer'
[]
[disp_z]
block = 'pellet_inner pellet_outer'
[]
[T_K]
[InitialCondition]
type = ConstantIC
value = 300.0
[]
[]
[lm_pellet]
block = 'pellet_secondary_subdomain'
[]
[]
[Kernels]
[solid_x]
type = ADStressDivergenceTensors
variable = disp_x
component = 0
block = 'pellet_inner pellet_outer'
use_displaced_mesh = false
[]
[solid_y]
type = ADStressDivergenceTensors
variable = disp_y
component = 1
block = 'pellet_inner pellet_outer'
use_displaced_mesh = false
[]
[solid_z]
type = ADStressDivergenceTensors
variable = disp_z
component = 2
block = 'pellet_inner pellet_outer'
use_displaced_mesh = false
[]
[timeder]
type = ADHeatConductionTimeDerivative
variable = 'T_K'
density_name = density
specific_heat = specific_heat
block = 'pellet_inner pellet_outer'
use_displaced_mesh = true
[]
[diff]
type = ADHeatConduction
variable = 'T_K'
thermal_conductivity = thermal_conductivity
block = 'pellet_inner pellet_outer'
use_displaced_mesh = true
[]
[heatsource]
type = ADMatHeatSource
variable = 'T_K'
material_property = radial_source
block = 'pellet_inner pellet_outer'
use_displaced_mesh = true
[]
[]
[Debug]
show_var_residual_norms = TRUE
[]
[BCs]
[mirror_z]
type = ADDirichletBC
variable = disp_z
boundary = 'mirror_innerp mirror_outerp'
value = 0
[]
[mirror_x]
type = ADDirichletBC
variable = disp_x
boundary = 'mirror_innerp mirror_outerp'
value = 0
[]
[mirror_y]
type = ADDirichletBC
variable = disp_y
boundary = 'mirror_innerp mirror_outerp'
value = 0
[]
[]
[Materials]
[pellet_properties]
type = ADGenericConstantMaterial
prop_names = 'density thermal_conductivity specific_heat'
prop_values = '3.3112e3 34 1.2217e3'
block = 'pellet_inner pellet_outer'
[]
[pulse_shape_linear]
type = ADGenericFunctionMaterial
prop_values = '5e10*max(11455*(t)/7,1e-9)'
prop_names = 'radial_source'
output_properties = 'radial_source'
block = 'pellet_inner pellet_outer'
use_displaced_mesh = false
[]
[strain]
type = ADComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
eigenstrain_names = eigenstrain #nameS!
block = 'pellet_inner pellet_outer'
[]
[thermal_strain]
type = ADComputeThermalExpansionEigenstrain
stress_free_temperature = ${stress_free_temperature}
thermal_expansion_coeff = ${thermal_expansion_coeff}
eigenstrain_name = eigenstrain
block = 'pellet_inner pellet_outer'
[]
[elasticity]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 3.306e11
poissons_ratio = 0.329
[]
[stress]
type = ADComputeLinearElasticStress
block = 'pellet_inner pellet_outer'
[]
[]
[Contact]
[pellet]
primary = void_pellet_0
secondary = void_pellet_1
model = frictionless
formulation = mortar
c_normal = 1e6
correct_edge_dropping = true
[]
[]
[UserObjects]
[conduction]
type = GapFluxModelConduction
temperature = T_K
boundary = 'void_pellet_0 void_pellet_1'
gap_conductivity = 0.4
use_displaced_mesh = true
[]
[rad_pellet]
type = GapFluxModelRadiation
temperature = T_K
boundary = void_pellet_0
primary_emissivity = 0.37
secondary_emissivity = 0.37
use_displaced_mesh = true
[]
[]
[Constraints]
[gap_pellet]
type = ModularGapConductanceConstraint
variable = lm_pellet
secondary_variable = T_K
primary_boundary = 'void_pellet_0'
primary_subdomain = pellet_primary_subdomain
secondary_boundary = 'void_pellet_1'
secondary_subdomain = pellet_secondary_subdomain
gap_flux_models = 'conduction rad_pellet' #closed_pellet
gap_geometry_type = 'CYLINDER'
cylinder_axis_point_1 = '0 0 0'
cylinder_axis_point_2 = '0 0 1'
use_displaced_mesh = true
quadrature = SECOND
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -pc_factor_shift_type'
petsc_options_value = 'lu superlu_dist NONZERO'
automatic_scaling = true
line_search = none
ignore_variables_for_autoscaling = 'pellet_normal_lm'
compute_scaling_once = true
scaling_group_variables = 'disp_x disp_y disp_z; T_K'
nl_rel_tol = 1e-50
nl_abs_tol = 1e-8
nl_max_its = 20
dtmin = 1e-3
dt = 1e-3
start_time = 0e-3
end_time = 1
[]
[Outputs]
[exodus]
type = Exodus
file_base = constMat
[]
print_linear_residuals = false
[]
(test/tests/mortar/displaced-gap-conductance-2d-bnd-coupling/gap-conductance-bnd-aux-kernel.i)
[Mesh]
displacements = 'disp_x disp_y'
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
# block 1: left
# block 2: right
[]
[./primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[../]
[./secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[../]
[]
[AuxVariables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[aux_var]
[]
[]
[AuxKernels]
[function_x]
type = FunctionAux
function = '.05 * t'
variable = 'disp_x'
block = '2'
[]
[function_y]
type = FunctionAux
function = '.05 * t'
variable = 'disp_y'
block = '2'
[]
[flux_modifier]
type = StatefulAuxLowerD
variable = 'aux_var'
coupled_variable = 'lambda'
boundary = '1'
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[./T]
block = '1 2'
[../]
[./lambda]
block = '10'
family = LAGRANGE
order = FIRST
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = T
boundary = '5'
value = 0
[../]
[./right]
type = DirichletBC
variable = T
boundary = '8'
value = 1
[../]
[]
[Kernels]
[./conduction]
type = Diffusion
variable = T
block = '1 2'
[../]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[./mortar]
type = GapHeatConductanceAuxKernel
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
variable = lambda
secondary_variable = T
use_displaced_mesh = true
auxkernel_variable = 'aux_var'
correct_edge_dropping = true
[../]
[]
[Materials]
[constant]
type = ADGenericConstantMaterial
prop_names = 'gap_conductance'
prop_values = '.03'
block = '1 2'
use_displaced_mesh = true
[]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = NEWTON
type = Transient
num_steps = 5
petsc_options_iname = '-pc_type -snes_linesearch_type'
petsc_options_value = 'lu basic'
[]
[Outputs]
exodus = true
[dofmap]
type = DOFMap
execute_on = 'initial'
[]
[]
(modules/phase_field/test/tests/rigidbodymotion/grain_motion2.i)
# test file for applyting advection term and observing rigid body motion of grains
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 15
nz = 0
xmax = 50
ymax = 25
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[./eta]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./vadvx]
order = CONSTANT
family = MONOMIAL
[../]
[./vadvy]
order = CONSTANT
family = MONOMIAL
[../]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./centroids]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
coupled_variables = eta
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./motion]
type = MultiGrainRigidBodyMotion
variable = w
c = c
v = eta
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
[../]
[./eta_dot]
type = TimeDerivative
variable = eta
[../]
[./vadv_eta]
type = SingleGrainRigidBodyMotion
variable = eta
c = c
v = eta
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
[../]
[./acint_eta]
type = ACInterface
variable = eta
mob_name = M
coupled_variables = c
kappa_name = kappa_eta
[../]
[./acbulk_eta]
type = AllenCahn
variable = eta
mob_name = M
f_name = F
coupled_variables = c
[../]
[]
[AuxKernels]
[./vadv_x]
type = GrainAdvectionAux
component = x
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
variable = vadvx
[../]
[./vadv_y]
type = GrainAdvectionAux
component = y
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
variable = vadvy
[../]
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
flood_counter = grain_center
field_display = UNIQUE_REGION
execute_on = 'initial timestep_begin'
[../]
[./centroids]
type = FeatureFloodCountAux
variable = centroids
execute_on = 'initial timestep_begin'
field_display = CENTROID
flood_counter = grain_center
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c kappa_eta'
prop_values = '5.0 2.0 0.1'
[../]
[./free_energy]
type = DerivativeParsedMaterial
coupled_variables = 'c eta'
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 1.0e-2'
expression = 16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2+(c-eta)^2
derivative_order = 2
[../]
[]
[VectorPostprocessors]
[./forces]
type = GrainForcesPostprocessor
grain_force = grain_force
[../]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_center
execute_on = 'initial timestep_begin'
[../]
[]
[UserObjects]
[./grain_center]
type = FauxGrainTracker
variable = eta
outputs = none
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
[../]
[./grain_force]
type = ConstantGrainForceAndTorque
execute_on = 'initial linear nonlinear'
force = '0.5 0.0 0.0 '
torque = '0.0 0.0 10.0 '
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
nl_max_its = 30
scheme = bdf2
solve_type = NEWTON
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
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
dt = 0.5
num_steps = 1
[]
[Outputs]
exodus = true
[]
[ICs]
[./rect_c]
y2 = 20.0
y1 = 5.0
inside = 1.0
x2 = 30.0
variable = c
x1 = 10.0
type = BoundingBoxIC
[../]
[./rect_eta]
y2 = 20.0
y1 = 5.0
inside = 1.0
x2 = 30.0
variable = eta
x1 = 10.0
type = BoundingBoxIC
[../]
[]
(modules/solid_mechanics/test/tests/central_difference/consistent/1D/1d_consistent_explicit.i)
# Test for central difference integration for a 1D element
# Consistent mass matrix
[Mesh]
type = GeneratedMesh
xmin = 0
xmax = 10
nx = 5
dim = 1
[]
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./accel_x]
[../]
[./vel_x]
[../]
[]
[AuxKernels]
[./accel_x]
type = TestNewmarkTI
variable = accel_x
displacement = disp_x
first = false
[../]
[./vel_x]
type = TestNewmarkTI
variable = vel_x
displacement = disp_x
[../]
[]
[Kernels]
[./DynamicSolidMechanics]
displacements = 'disp_x'
[../]
[./inertia_x]
type = InertialForce
variable = disp_x
[../]
[]
[NodalKernels]
[./force_x]
type = UserForcingFunctionNodalKernel
variable = disp_x
boundary = right
function = force_x
[../]
[]
[Functions]
[./force_x]
type = PiecewiseLinear
x = '0.0 1.0 2.0 3.0 4.0' # time
y = '0.0 1.0 0.0 -1.0 0.0' # force
scale_factor = 1e3
[../]
[]
[BCs]
[./fixx1]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor_block]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.25
block = 0
[../]
[./strain_block]
type = ComputeIncrementalSmallStrain
block = 0
displacements = 'disp_x'
implicit = false
[../]
[./stress_block]
type = ComputeFiniteStrainElasticStress
block = 0
[../]
[./density]
type = GenericConstantMaterial
block = 0
prop_names = density
prop_values = 2500
[../]
[]
[Executioner]
type = Transient
start_time = -0.005
end_time = 0.1
dt = 0.005
timestep_tolerance = 1e-6
l_tol = 1e-10
[./TimeIntegrator]
type = CentralDifference
[../]
[]
[Postprocessors]
[./disp_x]
type = NodalVariableValue
nodeid = 1
variable = disp_x
[../]
[./vel_x]
type = NodalVariableValue
nodeid = 1
variable = vel_x
[../]
[./accel_x]
type = NodalVariableValue
nodeid = 1
variable = accel_x
[../]
[]
[Outputs]
exodus = false
csv = true
perf_graph = false
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/varied_pressure_thermomechanical_mortar.i)
## Units in the input file: m-Pa-s-K
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
xmax = 0.25
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 13
xmin = 0.25
xmax = 0.5
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
patch_update_strategy = iteration
[]
[Variables]
[disp_x]
block = 'left_block right_block'
[]
[disp_y]
block = 'left_block right_block'
[]
[temperature]
initial_condition = 300.0
[]
[temperature_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[Modules]
[TensorMechanics/Master]
[steel]
strain = FINITE
add_variables = false
use_automatic_differentiation = true
generate_output = 'strain_xx strain_xy strain_yy stress_xx stress_xy stress_yy'
additional_generate_output = 'vonmises_stress'
additional_material_output_family = 'MONOMIAL'
additional_material_output_order = 'FIRST'
block = 'left_block'
[]
[aluminum]
strain = FINITE
add_variables = false
use_automatic_differentiation = true
generate_output = 'strain_xx strain_xy strain_yy stress_xx stress_xy stress_yy'
additional_generate_output = 'vonmises_stress'
additional_material_output_family = 'MONOMIAL'
additional_material_output_order = 'FIRST'
block = 'right_block'
[]
[]
[]
[Kernels]
[HeatDiff_steel]
type = ADHeatConduction
variable = temperature
thermal_conductivity = steel_thermal_conductivity
block = 'left_block'
[]
[HeatTdot_steel]
type = ADHeatConductionTimeDerivative
variable = temperature
specific_heat = steel_heat_capacity
density_name = steel_density
block = 'left_block'
[]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
block = 'right_block'
[]
[HeatTdot_aluminum]
type = ADHeatConductionTimeDerivative
variable = temperature
specific_heat = aluminum_heat_capacity
density_name = aluminum_density
block = 'right_block'
[]
[]
[BCs]
[fixed_bottom_edge]
type = ADDirichletBC
variable = disp_y
value = 0
boundary = 'moving_block_bottom fixed_block_bottom'
[]
[fixed_outer_edge]
type = ADDirichletBC
variable = disp_x
value = 0
boundary = 'fixed_block_right'
[]
[pressure_left_block]
type = ADPressure
variable = disp_x
component = 0
boundary = 'moving_block_left'
function = '1e4*t*y'
[]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 800
boundary = 'fixed_block_right'
[]
[]
[Contact]
[interface]
primary = moving_block_right
secondary = fixed_block_left
model = frictionless
formulation = mortar
correct_edge_dropping = true
[]
[]
[Constraints]
[thermal_contact]
type = ModularGapConductanceConstraint
variable = temperature_interface_lm
secondary_variable = temperature
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed'
use_displaced_mesh = true
[]
[]
[Materials]
[steel_elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1.93e11 #in Pa, 193 GPa, stainless steel 304
poissons_ratio = 0.29
block = 'left_block'
[]
[steel_stress]
type = ADComputeFiniteStrainElasticStress
block = 'left_block'
[]
[steel_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'steel_density steel_thermal_conductivity steel_heat_capacity steel_hardness'
prop_values = ' 8e3 16.2 0.5 129' ## for stainless steel 304
block = 'left_block'
[]
[aluminum_elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 6.8e10 #in Pa, 68 GPa, aluminum
poissons_ratio = 0.36
block = 'right_block'
[]
[aluminum_stress]
type = ADComputeFiniteStrainElasticStress
block = 'right_block'
[]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_hardness'
prop_values = ' 2.7e3 210 0.9 15' #for 99% pure Al
block = 'right_block'
[]
[]
[UserObjects]
[closed]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_thermal_conductivity
secondary_conductivity = aluminum_thermal_conductivity
temperature = temperature
contact_pressure = interface_normal_lm
primary_hardness = steel_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[]
[Postprocessors]
[contact_pressure_max]
type = NodalExtremeValue
variable = interface_normal_lm
block = interface_secondary_subdomain
value_type = max
[]
[contact_pressure_average]
type = AverageNodalVariableValue
variable = interface_normal_lm
block = interface_secondary_subdomain
[]
[contact_pressure_min]
type = NodalExtremeValue
variable = interface_normal_lm
block = interface_secondary_subdomain
value_type = min
[]
[interface_temperature_max]
type = NodalExtremeValue
variable = temperature
block = interface_secondary_subdomain
value_type = max
[]
[interface_temperature_average]
type = AverageNodalVariableValue
variable = temperature
block = interface_secondary_subdomain
[]
[interface_temperature_min]
type = NodalExtremeValue
variable = temperature
block = interface_secondary_subdomain
value_type = min
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
# mortar contact solver options
petsc_options = '-snes_converged_reason -pc_svd_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = ' lu superlu_dist'
snesmf_reuse_base = false
nl_rel_tol = 1e-7
nl_max_its = 20
l_max_its = 50
dt = 0.125
end_time = 1
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/steady_fsp_diagonal_of_a_for_scaling.i)
rho=1
mu=2e-3
U=1
l=1
prefactor=${fparse 1/(l/2)^2}
n=64
[GlobalParams]
gravity = '0 0 0'
[]
[Mesh]
[gen]
type = DistributedRectilinearMeshGenerator
dim = 2
xmin = 0
xmax = ${l}
ymin = 0
ymax = ${l}
nx = ${n}
ny = ${n}
elem_type = QUAD4
[]
second_order = true
parallel_type = distributed
[]
[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 = '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
[]
[]
[Materials]
[const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[]
[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 = '${prefactor}*${U}*x*(${l}-x)'
[]
[]
[Problem]
type = NavierStokesProblem
[]
[Preconditioning]
[FSP]
type = FSP
topsplit = 'up'
[up]
splitting = 'u p'
splitting_type = schur
petsc_options_iname = '-pc_fieldsplit_schur_fact_type -pc_fieldsplit_schur_precondition -ksp_gmres_restart -ksp_type -ksp_pc_side -ksp_rtol'
petsc_options_value = 'full self 300 fgmres right 1e-4'
[]
[u]
vars = 'vel_x vel_y'
# petsc_options = '-ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_type -ksp_rtol -ksp_gmres_restart -ksp_pc_side'
petsc_options_value = 'hypre boomeramg gmres 1e-2 300 right'
[]
[p]
vars = 'p'
petsc_options = '-pc_lsc_scale_diag -ksp_converged_reason'# -lsc_ksp_converged_reason -lsc_ksp_monitor_true_residual
petsc_options_iname = '-ksp_type -ksp_gmres_restart -ksp_rtol -pc_type -ksp_pc_side -lsc_pc_type -lsc_pc_hypre_type -lsc_ksp_type -lsc_ksp_rtol -lsc_ksp_pc_side -lsc_ksp_gmres_restart'
petsc_options_value = 'fgmres 300 1e-2 lsc right hypre boomeramg gmres 1e-1 right 300'
[]
[]
[]
[Postprocessors]
[pavg]
type = ElementAverageValue
variable = p
[]
[]
[UserObjects]
[set_pressure]
type = NSPressurePin
pin_type = 'average'
variable = p
pressure_average = 'pavg'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
[exo]
type = Exodus
execute_on = 'final'
hide = 'pavg'
[]
[]
(test/tests/postprocessors/side_diffusive_flux_average/side_diffusive_flux_average.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Functions]
[./right_bc]
# Flux BC for computing the analytical solution in the postprocessor
type = ParsedFunction
expression = exp(y)+1
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = FunctionNeumannBC
variable = u
boundary = right
function = right_bc
[../]
[]
[Materials]
[./mat_props]
type = GenericConstantMaterial
block = 0
prop_names = diffusivity
prop_values = 2
[../]
[./mat_props_bnd]
type = GenericConstantMaterial
boundary = right
prop_names = diffusivity
prop_values = 1
[../]
[]
[Postprocessors]
[./avg_flux_right]
# Computes -\int(exp(y)+1) from 0 to 1 which is -2.718281828
type = SideDiffusiveFluxAverage
variable = u
boundary = right
diffusivity = diffusivity
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/combined/examples/phase_field-mechanics/Nonconserved.i)
#
# Example 2
# Phase change driven by a mechanical (elastic) driving force.
# An oversized phase inclusion grows under a uniaxial tensile stress.
# Check the file below for comments and suggestions for parameter modifications.
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 40
nz = 0
xmin = 0
xmax = 50
ymin = 0
ymax = 50
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./eta]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 0
y1 = 0
radius = 30.0
invalue = 1.0
outvalue = 0.0
int_width = 10.0
[../]
[../]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./TensorMechanics]
displacements = 'disp_x disp_y'
[../]
[./eta_bulk]
type = AllenCahn
variable = eta
f_name = F
[../]
[./eta_interface]
type = ACInterface
variable = eta
kappa_name = 1
[../]
[./time]
type = TimeDerivative
variable = eta
[../]
[]
#
# Try visualizing the stress tensor components as done in Conserved.i
#
[Materials]
[./consts]
type = GenericConstantMaterial
block = 0
prop_names = 'L'
prop_values = '1'
[../]
# matrix phase
[./stiffness_a]
type = ComputeElasticityTensor
base_name = phasea
block = 0
# lambda, mu values
C_ijkl = '7 7'
# Stiffness tensor is created from lambda=7, mu=7 for symmetric_isotropic fill method
fill_method = symmetric_isotropic
# See RankFourTensor.h for details on fill methods
[../]
[./strain_a]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y'
base_name = phasea
[../]
[./stress_a]
type = ComputeLinearElasticStress
block = 0
base_name = phasea
[../]
[./elastic_free_energy_a]
type = ElasticEnergyMaterial
base_name = phasea
f_name = Fea
block = 0
args = ''
[../]
# oversized precipitate phase (simulated using thermal expansion)
[./stiffness_b]
type = ComputeElasticityTensor
base_name = phaseb
block = 0
# Stiffness tensor lambda, mu values
# Note that the two phases could have different stiffnesses.
# Try reducing the precipitate stiffness (to '1 1') rather than making it oversized
C_ijkl = '7 7'
fill_method = symmetric_isotropic
[../]
[./strain_b]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y'
base_name = phaseb
eigenstrain_names = eigenstrain
[../]
[./eigenstrain_b]
type = ComputeEigenstrain
base_name = phaseb
eigen_base = '0.1 0.1 0.1'
eigenstrain_name = eigenstrain
[../]
[./stress_b]
type = ComputeLinearElasticStress
block = 0
base_name = phaseb
[../]
[./elastic_free_energy_b]
type = ElasticEnergyMaterial
base_name = phaseb
f_name = Feb
block = 0
args = ''
[../]
# Generate the global free energy from the phase free energies
[./switching]
type = SwitchingFunctionMaterial
block = 0
eta = eta
h_order = SIMPLE
[../]
[./barrier]
type = BarrierFunctionMaterial
block = 0
eta = eta
g_order = SIMPLE
[../]
[./free_energy]
type = DerivativeTwoPhaseMaterial
block = 0
f_name = F
fa_name = Fea
fb_name = Feb
eta = eta
args = ''
W = 0.1
derivative_order = 2
[../]
# Generate the global stress from the phase stresses
[./global_stress]
type = TwoPhaseStressMaterial
block = 0
base_A = phasea
base_B = phaseb
[../]
[]
[BCs]
[./bottom_y]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0
[../]
[./top_y]
type = DirichletBC
variable = disp_y
boundary = 'top'
value = 5
[../]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 'left'
value = 0
[../]
[]
[Preconditioning]
# active = ' '
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
# this gives best performance on 4 cores
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
num_steps = 200
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.2
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/solid_mechanics/test/tests/dynamics/wave_1D/wave_rayleigh_hht_AD.i)
# Wave propogation in 1D using HHT time integration in the presence of Rayleigh damping
#
# The test is for an 1D bar element of length 4m fixed on one end
# with a sinusoidal pulse dirichlet boundary condition applied to the other end.
# alpha, beta and gamma are HHT time integration parameters
# eta and zeta are mass dependent and stiffness dependent Rayleigh damping
# coefficients, respectively.
# The equation of motion in terms of matrices is:
#
# M*accel + (eta*M+zeta*K)*((1+alpha)*vel-alpha*vel_old)
# +(1+alpha)*K*disp-alpha*K*disp_old = 0
#
# Here M is the mass matrix, K is the stiffness matrix
#
# The displacement at the first, second, third and fourth node at t = 0.1 are
# -7.787499960311491942e-02, 1.955566679096475483e-02 and -4.634888180231294501e-03, respectively.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 4
nz = 1
xmin = 0.0
xmax = 0.1
ymin = 0.0
ymax = 4.0
zmin = 0.0
zmax = 0.1
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[AuxVariables]
[./vel_x]
[../]
[./accel_x]
[../]
[./vel_y]
[../]
[./accel_y]
[../]
[./vel_z]
[../]
[./accel_z]
[../]
[]
[Kernels]
[./DynamicSolidMechanics]
displacements = 'disp_x disp_y disp_z'
hht_alpha = -0.3
stiffness_damping_coefficient = 0.1
use_automatic_differentiation = true
[../]
[./inertia_x]
type = InertialForce
variable = disp_x
velocity = vel_x
acceleration = accel_x
beta = 0.422
gamma = 0.8
eta=0.1
alpha = -0.3
[../]
[./inertia_y]
type = InertialForce
variable = disp_y
velocity = vel_y
acceleration = accel_y
beta = 0.422
gamma = 0.8
eta=0.1
alpha = -0.3
[../]
[./inertia_z]
type = InertialForce
variable = disp_z
velocity = vel_z
acceleration = accel_z
beta = 0.422
gamma = 0.8
eta = 0.1
alpha = -0.3
[../]
[]
[AuxKernels]
[./accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.422
execute_on = timestep_end
[../]
[./vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.8
execute_on = timestep_end
[../]
[./accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.422
execute_on = timestep_end
[../]
[./vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.8
execute_on = timestep_end
[../]
[./accel_z]
type = NewmarkAccelAux
variable = accel_z
displacement = disp_z
velocity = vel_z
beta = 0.422
execute_on = timestep_end
[../]
[./vel_z]
type = NewmarkVelAux
variable = vel_z
acceleration = accel_z
gamma = 0.8
execute_on = timestep_end
[../]
[]
[BCs]
[./top_y]
type = DirichletBC
variable = disp_y
boundary = top
value=0.0
[../]
[./top_x]
type = DirichletBC
variable = disp_x
boundary = top
value=0.0
[../]
[./top_z]
type = DirichletBC
variable = disp_z
boundary = top
value=0.0
[../]
[./right_x]
type = DirichletBC
variable = disp_x
boundary = right
value=0.0
[../]
[./right_z]
type = DirichletBC
variable = disp_z
boundary = right
value=0.0
[../]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = left
value=0.0
[../]
[./left_z]
type = DirichletBC
variable = disp_z
boundary = left
value=0.0
[../]
[./front_x]
type = DirichletBC
variable = disp_x
boundary = front
value=0.0
[../]
[./front_z]
type = DirichletBC
variable = disp_z
boundary = front
value=0.0
[../]
[./back_x]
type = DirichletBC
variable = disp_x
boundary = back
value=0.0
[../]
[./back_z]
type = DirichletBC
variable = disp_z
boundary = back
value=0.0
[../]
[./bottom_x]
type = DirichletBC
variable = disp_x
boundary = bottom
value=0.0
[../]
[./bottom_z]
type = DirichletBC
variable = disp_z
boundary = bottom
value=0.0
[../]
[./bottom_y]
type = FunctionDirichletBC
variable = disp_y
boundary = bottom
function = displacement_bc
[../]
[]
[Materials]
[./Elasticity_tensor]
type = ADComputeElasticityTensor
block = 0
fill_method = symmetric_isotropic
C_ijkl = '1 0'
[../]
[./strain]
type = ADComputeSmallStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[../]
[./stress]
type = ADComputeLinearElasticStress
block = 0
[../]
[./density]
type = GenericConstantMaterial
block = 0
prop_names = 'density'
prop_values = '1'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
start_time = 0
end_time = 6.0
l_tol = 1e-12
nl_rel_tol = 1e-12
dt = 0.1
[]
[Functions]
[./displacement_bc]
type = PiecewiseLinear
data_file = 'sine_wave.csv'
format = columns
[../]
[]
[Postprocessors]
[./_dt]
type = TimestepSize
[../]
[./disp_1]
type = NodalVariableValue
nodeid = 1
variable = disp_y
[../]
[./disp_2]
type = NodalVariableValue
nodeid = 3
variable = disp_y
[../]
[./disp_3]
type = NodalVariableValue
nodeid = 10
variable = disp_y
[../]
[./disp_4]
type = NodalVariableValue
nodeid = 14
variable = disp_y
[../]
[]
[Outputs]
file_base = 'wave_rayleigh_hht_out'
exodus = true
perf_graph = true
[]
(modules/xfem/test/tests/moving_interface/verification/1D_xy_homog1mat.i)
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
# XFEM Moving Interface Verification Problem
# Dimensionality: quasi-1D
# Coordinate System: xy
# Material Numbers/Types: homogeneous 1 material, 2 region
# Element Order: 1st
# Interface Characteristics: u independent, prescribed linear level set function
# Description:
# A simple transient heat transfer problem in Cartesian coordinates designed
# with the Method of Manufactured Solutions. This problem was developed to
# verify XFEM performance in the presence of a moving interface for linear
# element models that can be exactly evaluated by FEM/Moose. Both the
# temperature solution and level set function are designed to be linear to
# attempt to minimize error between the Moose/exact solution and XFEM results.
# Thermal conductivity is a single, constant value at all points in the system.
# Results:
# The temperature at the left boundary (x=0) exhibits the largest difference
# between the FEM/Moose solution and XFEM results. We present the XFEM results
# at this location with 10 digits of precision:
# Time Expected Temperature XFEM Calculated Temperature
# 0.2 440 440
# 0.4 480 480.0000064
# 0.6 520 520.0000323
# 0.8 560 560.0000896
# 1.0 600 600.0001870
# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ #
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 1
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 0.5
elem_type = QUAD4
[]
[XFEM]
qrule = moment_fitting
output_cut_plane = true
[]
[UserObjects]
[./level_set_cut_uo]
type = LevelSetCutUserObject
level_set_var = ls
heal_always = true
[../]
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./ls]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat_cond]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[../]
[./vol_heat_src]
type = BodyForce
variable = u
function = src_func
[../]
[./mat_time_deriv]
type = TestMatTimeDerivative
variable = u
mat_prop_value = rhoCp
[../]
[]
[AuxKernels]
[./ls_function]
type = FunctionAux
variable = ls
function = ls_func
[../]
[]
[Constraints]
[./xfem_constraint]
type = XFEMSingleVariableConstraint
variable = u
geometric_cut_userobject = 'level_set_cut_uo'
use_penalty = true
alpha = 1e5
[../]
[]
[Functions]
[./src_func]
type = ParsedFunction
expression = '10*(-200*x+200)'
[../]
[./ls_func]
type = ParsedFunction
expression = '1-(x-0.04)-0.2*t'
[../]
[./neumann_func]
type = ParsedFunction
expression = '1.5*200*t'
[../]
[]
[Materials]
[./mat_time_deriv_prop]
type = GenericConstantMaterial
prop_names = 'rhoCp'
prop_values = 10
[../]
[./therm_cond_prop]
type = GenericConstantMaterial
prop_names = 'diffusion_coefficient'
prop_values = 1.5
[../]
[]
[BCs]
[./left_du]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = neumann_func
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 'right'
value = 400
[../]
[]
[ICs]
[./u_ic]
type = ConstantIC
value = 400
variable = u
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
line_search = 'none'
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-9
start_time = 0.0
dt = 0.2
end_time = 1.0
max_xfem_update = 1
[]
[Outputs]
time_step_interval = 1
execute_on = 'initial timestep_end'
exodus = true
[./console]
type = Console
output_linear = true
[../]
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_no_parts_steady.i)
[GlobalParams]
integrate_p_by_parts = false
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[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
[../]
[./p]
[../]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[momentum_advection]
type = INSADMomentumAdvection
variable = velocity
[]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
[../]
[]
[BCs]
[p_corner]
type = DirichletBC
boundary = top_right
value = 0
variable = p
[]
[inlet]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom'
function_x = 0
function_y = 'inlet_func'
[../]
[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
[]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[ins_mat]
type = INSADMaterial
velocity = velocity
pressure = p
[]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[../]
[]
(test/tests/actions/get_actions/test_get_actions.i)
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
uniform_refine = 4
[]
[TestGetActions]
[]
[Variables]
[./convected]
[../]
[./diffused]
[../]
[]
[Kernels]
# intentionally give a name the same as material names
[./mat1]
type = Diffusion
variable = convected
[../]
[./diff_u]
type = Diffusion
variable = diffused
[../]
[]
[BCs]
active = 'left_convected right_convected left_diffused right_diffused'
[./left_convected]
type = DirichletBC
variable = convected
boundary = '1'
value = 0
[../]
[./right_convected]
type = DirichletBC
variable = convected
boundary = '2'
value = 1
[../]
[./left_diffused]
type = DirichletBC
variable = diffused
boundary = '1'
value = 0
[../]
[./right_diffused]
type = DirichletBC
variable = diffused
boundary = '2'
value = 1
[../]
[]
[Materials]
[./mat4]
type = RandomMaterial
block = 0
[../]
[./mat3]
type = MTMaterial
block = 0
[../]
[./mat1]
type = GenericConstantMaterial
prop_names = prop1
prop_values = 1.0
block = 0
[../]
[./mat2]
type = CoupledMaterial
mat_prop = prop2
coupled_mat_prop = prop1
block = 0
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
execute_on = 'timestep_end'
[]
(modules/thermal_hydraulics/test/tests/components/hs_boundary_external_app_heat_flux/main.i)
# Main input file.
#
# Run mesh.i first to produce a mesh file that this input uses:
#
# thermal_hydraulics-opt -i mesh.i --mesh-only mesh.e
length = 5.0
n_elems_axial = 10
rho_name = density
cp_name = specific_heat
k_name = thermal_conductivity
rho = 8000.0
cp = 500.0
k = 15.0
T_initial = 500.0
power = 1000.0
[Mesh]
type = FileMesh
file = mesh.e
[]
[Variables]
[T_solid]
[]
[]
[ICs]
[T_ic]
type = ConstantIC
variable = T_solid
value = ${T_initial}
[]
[]
[Kernels]
[time_derivative]
type = ADHeatConductionTimeDerivative
variable = T_solid
density_name = ${rho_name}
specific_heat = ${cp_name}
[]
[heat_conduction]
type = ADHeatConduction
variable = T_solid
thermal_conductivity = ${k_name}
[]
[]
[BCs]
[bc]
type = FunctorNeumannBC
variable = T_solid
boundary = 'inner'
functor = heat_flux_fn
flux_is_inward = false
[]
[]
[Materials]
[ad_constant_mat]
type = ADGenericConstantMaterial
prop_names = '${rho_name} ${cp_name} ${k_name}'
prop_values = '${rho} ${cp} ${k}'
[]
[]
[Functions]
[heat_flux_fn]
type = ParsedFunction
symbol_names = 'S'
symbol_values = 'inner_surface_area'
expression = '${power} / S'
[]
[]
[Postprocessors]
[inner_surface_area]
type = AreaPostprocessor
boundary = 'inner'
execute_on = 'INITIAL'
[]
[inner_perimeter]
type = ParsedPostprocessor
pp_names = 'inner_surface_area'
function = 'inner_surface_area / ${length}'
execute_on = 'INITIAL'
[]
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = ThermalHydraulicsApp
input_files = 'sub.i'
positions = '0 0 0'
max_procs_per_app = 1
output_in_position = true
execute_on = 'TIMESTEP_END'
[]
[]
[UserObjects]
[layered_average_heat_flux]
type = NearestPointLayeredSideAverageFunctor
direction = z
points='0 0 0'
num_layers = ${n_elems_axial}
functor = heat_flux_fn
boundary = 'inner'
execute_on = 'TIMESTEP_END'
[]
[]
[Transfers]
[heat_flux_transfer]
type = MultiAppGeneralFieldUserObjectTransfer
to_multi_app = sub
source_user_object = layered_average_heat_flux
variable = q_ext
error_on_miss = true
[]
[perimeter_transfer]
type = MultiAppPostprocessorTransfer
to_multi_app = sub
from_postprocessor = inner_perimeter
to_postprocessor = P_ext
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
dt = 10.0
num_steps = 1
abort_on_solve_fail = true
solve_type = NEWTON
nl_abs_tol = 1e-10
nl_rel_tol = 1e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 10
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_by_parts_steady.i)
# This input file tests several different things:
# .) The axisymmetric (RZ) form of the governing equations.
# .) An open boundary.
# .) Not integrating the pressure by parts, thereby requiring a pressure pin.
# .) Natural boundary condition at the outlet.
[GlobalParams]
integrate_p_by_parts = true
laplace = true
gravity = '0 0 0'
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = Newton
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Variables]
[./vel_x]
# Velocity in radial (r) direction
family = LAGRANGE
order = SECOND
[../]
[./vel_y]
# Velocity in axial (z) direction
family = LAGRANGE
order = SECOND
[../]
[./p]
family = LAGRANGE
order = FIRST
[../]
[]
[BCs]
[./u_in]
type = DirichletBC
boundary = bottom
variable = vel_x
value = 0
[../]
[./v_in]
type = FunctionDirichletBC
boundary = bottom
variable = vel_y
function = 'inlet_func'
[../]
[./u_axis_and_walls]
type = DirichletBC
boundary = 'left right'
variable = vel_x
value = 0
[../]
[./v_no_slip]
type = DirichletBC
boundary = 'right'
variable = vel_y
value = 0
[../]
[]
[Kernels]
[./mass]
type = INSMassRZ
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
[./x_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./y_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 'volume'
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[../]
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/small-2d/open_gap_pressure_dependent.i)
## Units in the input file: m-Pa-s-K
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 10
xmax = 1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 10
xmin = 1.0001
xmax = 2.0001
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
[]
[Variables]
[disp_x]
block = 'left_block right_block'
[]
[disp_y]
block = 'left_block right_block'
[]
[temperature]
initial_condition = 525.0
[]
[temperature_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[Modules]
[TensorMechanics/Master]
[steel]
strain = SMALL
add_variables = false
use_automatic_differentiation = true
additional_generate_output = 'vonmises_stress'
additional_material_output_family = 'MONOMIAL'
additional_material_output_order = 'FIRST'
block = 'left_block'
[]
[aluminum]
strain = SMALL
add_variables = false
use_automatic_differentiation = true
additional_generate_output = 'vonmises_stress'
additional_material_output_family = 'MONOMIAL'
additional_material_output_order = 'FIRST'
block = 'right_block'
[]
[]
[]
[Kernels]
[HeatDiff_steel]
type = ADHeatConduction
variable = temperature
thermal_conductivity = steel_thermal_conductivity
block = 'left_block'
[]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
block = 'right_block'
[]
[]
[BCs]
[fixed_bottom_edge]
type = ADDirichletBC
variable = disp_y
value = 0
boundary = 'moving_block_bottom fixed_block_bottom'
[]
[fixed_outer_edge]
type = ADDirichletBC
variable = disp_x
value = 0
boundary = 'fixed_block_right'
[]
[pressure_left_block]
type = ADPressure
variable = disp_x
boundary = 'moving_block_left'
component = 0
function = 1*t
[]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 800
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 250
boundary = 'fixed_block_right'
[]
[]
[Contact]
[interface]
primary = moving_block_right
secondary = fixed_block_left
model = frictionless
formulation = mortar
correct_edge_dropping = true
[]
[]
[Constraints]
[thermal_contact]
type = ModularGapConductanceConstraint
variable = temperature_interface_lm
secondary_variable = temperature
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed'
use_displaced_mesh = true
[]
[]
[Materials]
[steel_elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1.93e11 #in Pa, 193 GPa, stainless steel 304
poissons_ratio = 0.29
block = 'left_block'
[]
[steel_stress]
type = ADComputeLinearElasticStress
block = 'left_block'
[]
[steel_density]
type = ADGenericConstantMaterial
prop_names = 'steel_density'
prop_values = 8e3 #in kg/m^3, stainless steel 304
block = 'left_block'
[]
[steel_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'steel_thermal_conductivity steel_heat_capacity steel_emissivity'
prop_values = '16.2 0.5 0.6' ## for stainless steel 304
block = 'left_block'
[]
[aluminum_elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 6.8e10 #in Pa, 68 GPa, aluminum
poissons_ratio = 0.36
block = 'right_block'
[]
[aluminum_stress]
type = ADComputeLinearElasticStress
block = 'right_block'
[]
[aluminum_density]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density'
prop_values = 2.7e3 #in kg/m^3, stainless steel 304
block = 'right_block'
[]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_thermal_conductivity aluminum_heat_capacity aluminum_emissivity'
prop_values = '210 0.9 0.25'
block = 'right_block'
[]
[]
[UserObjects]
[closed]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_thermal_conductivity
secondary_conductivity = aluminum_thermal_conductivity
temperature = temperature
primary_hardness = 1.0
secondary_hardness = 1.0
boundary = moving_block_right
contact_pressure = interface_normal_lm
[]
[]
[Postprocessors]
[steel_pt_interface_temperature]
type = NodalVariableValue
nodeid = 245
variable = temperature
[]
[aluminum_pt_interface_temperature]
type = NodalVariableValue
nodeid = 657
variable = temperature
[]
[interface_heat_flux_steel]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = moving_block_right
diffusivity = steel_thermal_conductivity
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[steel_element_interface_stress]
type = ElementalVariableValue
variable = vonmises_stress
elementid = 199
[]
[aluminum_element_interface_stress]
type = ElementalVariableValue
variable = vonmises_stress
elementid = 560
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
csv = 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/thermal_hydraulics/test/tests/materials/wall_friction_cheng/cheng_ff_test.i)
#Fluid Properties:
rho = 2000
vel = 1
mu = 1
#Geometric Parameters
Dh = 1
PoD = 1.10
[GlobalParams]
execute_on = 'initial'
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
allow_renumbering = false
[]
[Materials]
[props]
type = ADGenericConstantMaterial
prop_names = 'rho vel mu D_h'
prop_values = '${rho} ${vel} ${mu} ${Dh}'
[]
[turb]
type = ADGenericConstantMaterial
prop_names = 'rho_turb'
prop_values = '2200'
[]
[warnings]
type = ADWallFrictionChengMaterial
f_D = "warnings"
PoD = ${PoD}
bundle_array = SQUARE
subchannel_type = INTERIOR
[]
[PoD_105_interior_sqr_lam]
type = ADWallFrictionChengMaterial
f_D = "PoD_105_interior_sqr_lam"
PoD = 1.05
bundle_array = SQUARE
subchannel_type = INTERIOR
[]
[PoD_105_edge_sqr_lam]
type = ADWallFrictionChengMaterial
f_D = "PoD_105_edge_sqr_lam"
PoD = 1.05
bundle_array = SQUARE
subchannel_type = EDGE
[]
[PoD_105_corner_sqr_lam]
type = ADWallFrictionChengMaterial
f_D = "PoD_105_corner_sqr_lam"
PoD = 1.05
bundle_array = SQUARE
subchannel_type = CORNER
[]
[PoD_110_interior_sqr_lam]
type = ADWallFrictionChengMaterial
f_D = "PoD_110_interior_sqr_lam"
PoD = 1.10
bundle_array = SQUARE
subchannel_type = INTERIOR
[]
[PoD_110_edge_sqr_lam]
type = ADWallFrictionChengMaterial
f_D = "PoD_110_edge_sqr_lam"
PoD = 1.10
bundle_array = SQUARE
subchannel_type = EDGE
[]
[PoD_110_corner_sqr_lam]
type = ADWallFrictionChengMaterial
f_D = "PoD_110_corner_sqr_lam"
PoD = 1.10
bundle_array = SQUARE
subchannel_type = CORNER
[]
[PoD_105_interior_sqr_turb]
type = ADWallFrictionChengMaterial
f_D = "PoD_105_interior_sqr_turb"
PoD = 1.05
bundle_array = SQUARE
subchannel_type = INTERIOR
rho = rho_turb
[]
[PoD_105_edge_sqr_turb]
type = ADWallFrictionChengMaterial
f_D = "PoD_105_edge_sqr_turb"
PoD = 1.05
bundle_array = SQUARE
subchannel_type = EDGE
rho = rho_turb
[]
[PoD_105_corner_sqr_turb]
type = ADWallFrictionChengMaterial
f_D = "PoD_105_corner_sqr_turb"
PoD = 1.05
bundle_array = SQUARE
subchannel_type = CORNER
rho = rho_turb
[]
[PoD_110_interior_sqr_turb]
type = ADWallFrictionChengMaterial
f_D = "PoD_110_interior_sqr_turb"
PoD = 1.10
bundle_array = SQUARE
subchannel_type = INTERIOR
rho = rho_turb
[]
[PoD_110_edge_sqr_turb]
type = ADWallFrictionChengMaterial
f_D = "PoD_110_edge_sqr_turb"
PoD = 1.10
bundle_array = SQUARE
subchannel_type = EDGE
rho = rho_turb
[]
[PoD_110_corner_sqr_turb]
type = ADWallFrictionChengMaterial
f_D = "PoD_110_corner_sqr_turb"
PoD = 1.10
bundle_array = SQUARE
subchannel_type = CORNER
rho = rho_turb
[]
[PoD_105_interior_hex_lam]
type = ADWallFrictionChengMaterial
f_D = "PoD_105_interior_hex_lam"
PoD = 1.05
bundle_array = HEXAGONAL
subchannel_type = INTERIOR
[]
[PoD_105_edge_hex_lam]
type = ADWallFrictionChengMaterial
f_D = "PoD_105_edge_hex_lam"
PoD = 1.05
bundle_array = HEXAGONAL
subchannel_type = EDGE
[]
[PoD_105_corner_hex_lam]
type = ADWallFrictionChengMaterial
f_D = "PoD_105_corner_hex_lam"
PoD = 1.05
bundle_array = HEXAGONAL
subchannel_type = CORNER
[]
[PoD_110_interior_hex_lam]
type = ADWallFrictionChengMaterial
f_D = "PoD_110_interior_hex_lam"
PoD = 1.10
bundle_array = HEXAGONAL
subchannel_type = INTERIOR
[]
[PoD_110_edge_hex_lam]
type = ADWallFrictionChengMaterial
f_D = "PoD_110_edge_hex_lam"
PoD = 1.10
bundle_array = HEXAGONAL
subchannel_type = EDGE
[]
[PoD_110_corner_hex_lam]
type = ADWallFrictionChengMaterial
f_D = "PoD_110_corner_hex_lam"
PoD = 1.10
bundle_array = HEXAGONAL
subchannel_type = CORNER
[]
[PoD_105_interior_hex_turb]
type = ADWallFrictionChengMaterial
f_D = "PoD_105_interior_hex_turb"
PoD = 1.05
bundle_array = HEXAGONAL
subchannel_type = INTERIOR
rho = rho_turb
[]
[PoD_105_edge_hex_turb]
type = ADWallFrictionChengMaterial
f_D = "PoD_105_edge_hex_turb"
PoD = 1.05
bundle_array = HEXAGONAL
subchannel_type = EDGE
rho = rho_turb
[]
[PoD_105_corner_hex_turb]
type = ADWallFrictionChengMaterial
f_D = "PoD_105_corner_hex_turb"
PoD = 1.05
bundle_array = HEXAGONAL
subchannel_type = CORNER
rho = rho_turb
[]
[PoD_110_interior_hex_turb]
type = ADWallFrictionChengMaterial
f_D = "PoD_110_interior_hex_turb"
PoD = 1.10
bundle_array = HEXAGONAL
subchannel_type = INTERIOR
rho = rho_turb
[]
[PoD_110_edge_hex_turb]
type = ADWallFrictionChengMaterial
f_D = "PoD_110_edge_hex_turb"
PoD = 1.10
bundle_array = HEXAGONAL
subchannel_type = EDGE
rho = rho_turb
[]
[PoD_110_corner_hex_turb]
type = ADWallFrictionChengMaterial
f_D = "PoD_110_corner_hex_turb"
PoD = 1.10
bundle_array = HEXAGONAL
subchannel_type = CORNER
rho = rho_turb
[]
[]
[Postprocessors]
[PoD_105_interior_sqr_lam]
type = ADElementAverageMaterialProperty
mat_prop = PoD_105_interior_sqr_lam
[]
[PoD_105_edge_sqr_lam]
type = ADElementAverageMaterialProperty
mat_prop = PoD_105_edge_sqr_lam
[]
[PoD_105_corner_sqr_lam]
type = ADElementAverageMaterialProperty
mat_prop = PoD_105_corner_sqr_lam
[]
[PoD_110_interior_sqr_lam]
type = ADElementAverageMaterialProperty
mat_prop = PoD_110_interior_sqr_lam
[]
[PoD_110_edge_sqr_lam]
type = ADElementAverageMaterialProperty
mat_prop = PoD_110_edge_sqr_lam
[]
[PoD_110_corner_sqr_lam]
type = ADElementAverageMaterialProperty
mat_prop = PoD_110_corner_sqr_lam
[]
[PoD_105_interior_sqr_turb]
type = ADElementAverageMaterialProperty
mat_prop = PoD_105_interior_sqr_turb
[]
[PoD_105_edge_sqr_turb]
type = ADElementAverageMaterialProperty
mat_prop = PoD_105_edge_sqr_turb
[]
[PoD_105_corner_sqr_turb]
type = ADElementAverageMaterialProperty
mat_prop = PoD_105_corner_sqr_turb
[]
[PoD_110_interior_sqr_turb]
type = ADElementAverageMaterialProperty
mat_prop = PoD_110_interior_sqr_turb
[]
[PoD_110_edge_sqr_turb]
type = ADElementAverageMaterialProperty
mat_prop = PoD_110_edge_sqr_turb
[]
[PoD_110_corner_sqr_turb]
type = ADElementAverageMaterialProperty
mat_prop = PoD_110_corner_sqr_turb
[]
[PoD_105_interior_hex_lam]
type = ADElementAverageMaterialProperty
mat_prop = PoD_105_interior_hex_lam
[]
[PoD_105_edge_hex_lam]
type = ADElementAverageMaterialProperty
mat_prop = PoD_105_edge_hex_lam
[]
[PoD_105_corner_hex_lam]
type = ADElementAverageMaterialProperty
mat_prop = PoD_105_corner_hex_lam
[]
[PoD_110_interior_hex_lam]
type = ADElementAverageMaterialProperty
mat_prop = PoD_110_interior_hex_lam
[]
[PoD_110_edge_hex_lam]
type = ADElementAverageMaterialProperty
mat_prop = PoD_110_edge_hex_lam
[]
[PoD_110_corner_hex_lam]
type = ADElementAverageMaterialProperty
mat_prop = PoD_110_corner_hex_lam
[]
[PoD_105_interior_hex_turb]
type = ADElementAverageMaterialProperty
mat_prop = PoD_105_interior_hex_turb
[]
[PoD_105_edge_hex_turb]
type = ADElementAverageMaterialProperty
mat_prop = PoD_105_edge_hex_turb
[]
[PoD_105_corner_hex_turb]
type = ADElementAverageMaterialProperty
mat_prop = PoD_105_corner_hex_turb
[]
[PoD_110_interior_hex_turb]
type = ADElementAverageMaterialProperty
mat_prop = PoD_110_interior_hex_turb
[]
[PoD_110_edge_hex_turb]
type = ADElementAverageMaterialProperty
mat_prop = PoD_110_edge_hex_turb
[]
[PoD_110_corner_hex_turb]
type = ADElementAverageMaterialProperty
mat_prop = PoD_110_corner_hex_turb
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(modules/phase_field/test/tests/initial_conditions/RndSmoothCircleIC.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 25
xmax = 50
ymax = 50
elem_type = QUAD4
[]
[Variables]
[./c]
order = THIRD
family = HERMITE
[../]
[]
[ICs]
[./c]
variable = c
type = RndSmoothCircleIC
x1 = 25.0
y1 = 25.0
radius = 6.0
invalue = 1.0
variation_invalue = 0.0
outvalue = -0.8
variation_outvalue = 0.2
int_width = 5
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./CHSolid]
type = CHMath
variable = c
mob_name = M
[../]
[./CHInterface]
type = CHInterface
variable = c
kappa_name = kappa_c
mob_name = M
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./constant]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1.0 1.0'
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_max_its = 10
l_tol = 1.0e-4
nl_max_its = 10
start_time = 0.0
num_steps = 1
dt = 20.0
[]
[Outputs]
exodus = true
[]
(modules/stochastic_tools/test/tests/transfers/serialized_solution_transfer/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 6
xmax = 6
[]
[Variables]
[u]
[]
[v]
[]
[]
[Kernels]
[diffusion_u]
type = MatDiffusion
variable = u
diffusivity = D_u
[]
[source_u]
type = BodyForce
variable = u
value = 1.0
[]
[diffusion_v]
type = MatDiffusion
variable = v
diffusivity = D_v
[]
[source_v]
type = BodyForce
variable = v
value = 1.0
[]
[]
[Materials]
[diffusivity_u]
type = GenericConstantMaterial
prop_names = D_u
prop_values = 2.0
[]
[diffusivity_v]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 4.0
[]
[]
[BCs]
[left_u]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right_u]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 0
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Reporters]
[solution_storage]
type = SolutionContainer
execute_on = 'FINAL'
[]
[]
(modules/functional_expansion_tools/examples/2D_volumetric_Cartesian/main.i)
# Basic example coupling a master and sub app in a 2D Cartesian volume.
#
# The master app provides field values to the sub app via Functional Expansions, which then performs
# its calculations. The sub app's solution field values are then transferred back to the master app
# and coupled into the solution of the master app solution.
#
# This example couples Functional Expansions via AuxVariable.
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0.0
xmax = 10.0
nx = 15
ymin = 1.0
ymax = 11.0
ny = 25
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./s_in] # Add in the contribution from the SubApp
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[Materials]
[./Unobtanium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'top bottom left right'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = Cartesian
orders = '3 4'
physical_bounds = '0.0 10.0 1.0 11.0'
x = Legendre
y = Legendre
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/heat_transfer/test/tests/heat_source_bar/ad_heat_source_bar.i)
# This is a simple 1D test of the volumetric heat source with material properties
# of a representative ceramic material. A bar is uniformly heated, and a temperature
# boundary condition is applied to the left side of the bar.
# Important properties of problem:
# Length: 0.01 m
# Thermal conductivity = 3.0 W/(mK)
# Specific heat = 300.0 J/K
# density = 10431.0 kg/m^3
# Prescribed temperature on left side: 600 K
# When it has reached steady state, the temperature as a function of position is:
# T = -q/(2*k) (x^2 - 2*x*length) + 600
# or
# T = -6.3333e+7 * (x^2 - 0.02*x) + 600
# on left side: T=600, on right side, T=6933.3
[Mesh]
type = GeneratedMesh
dim = 1
xmax = 0.01
nx = 20
[]
[Variables]
[./temp]
initial_condition = 300.0
[../]
[]
[Kernels]
[./heat]
type = ADHeatConduction
variable = temp
thermal_conductivity = thermal_conductivity
[../]
[./heatsource]
type = ADMatHeatSource
material_property = volumetric_heat
variable = temp
scalar = 10
[../]
[]
[BCs]
[./lefttemp]
type = DirichletBC
boundary = left
variable = temp
value = 600
[../]
[]
[Materials]
[./density]
type = ADGenericConstantMaterial
prop_names = 'density thermal_conductivity volumetric_heat '
prop_values = '10431.0 3.0 3.8e7'
[../]
[]
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./right]
type = SideAverageValue
variable = temp
boundary = right
[../]
[./error]
type = NodalL2Error
function = '-3.8e+8/(2*3) * (x^2 - 2*x*0.01) + 600'
variable = temp
[../]
[]
[Outputs]
execute_on = FINAL
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_by_parts_steady_nobcbc.i)
# This input file tests several different things:
# .) The axisymmetric (RZ) form of the governing equations.
# .) An open boundary.
# .) Not integrating the pressure by parts, thereby requiring a pressure pin.
# .) Natural boundary condition at the outlet.
[GlobalParams]
integrate_p_by_parts = true
laplace = true
gravity = '0 0 0'
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = Newton
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Variables]
[./vel_x]
# Velocity in radial (r) direction
family = LAGRANGE
order = SECOND
[../]
[./vel_y]
# Velocity in axial (z) direction
family = LAGRANGE
order = SECOND
[../]
[./p]
family = LAGRANGE
order = FIRST
[../]
[]
[BCs]
[./u_in]
type = DirichletBC
boundary = bottom
variable = vel_x
value = 0
[../]
[./v_in]
type = FunctionDirichletBC
boundary = bottom
variable = vel_y
function = 'inlet_func'
[../]
[./u_axis_and_walls]
type = DirichletBC
boundary = 'left right'
variable = vel_x
value = 0
[../]
[./v_no_slip]
type = DirichletBC
boundary = 'right'
variable = vel_y
value = 0
[../]
[./u_out]
type = INSMomentumNoBCBCLaplaceForm
boundary = top
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./v_out]
type = INSMomentumNoBCBCLaplaceForm
boundary = top
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
# 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 = top_right
value = 0
variable = p
[]
[]
[Kernels]
[./mass]
type = INSMassRZ
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
[./x_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./y_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 'volume'
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[../]
[]
(modules/navier_stokes/test/tests/finite_volume/cns/scalar_advection/mass-frac-advection.i)
rho_initial=1.29
p_initial=1.01e5
T=273.15
gamma=1.4
e_initial=${fparse p_initial / (gamma - 1) / rho_initial}
et_initial=${e_initial}
rho_et_initial=${fparse rho_initial * et_initial}
v_in=1
[GlobalParams]
fp = fp
# retain behavior at time of test creation
two_term_boundary_expansion = false
[]
[Mesh]
[cartesian]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
nx = 2
ymin = 0
ymax = 10
ny = 20
[]
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Variables]
[rho]
type = MooseVariableFVReal
initial_condition = ${rho_initial}
[]
[rho_u]
type = MooseVariableFVReal
initial_condition = 1e-15
[]
[rho_v]
type = MooseVariableFVReal
initial_condition = 1e-15
[]
[rho_et]
type = MooseVariableFVReal
initial_condition = ${rho_et_initial}
scaling = 1e-5
[]
[mass_frac]
type = MooseVariableFVReal
initial_condition = 1e-15
[]
[]
[AuxVariables]
[U_x]
type = MooseVariableFVReal
[]
[U_y]
type = MooseVariableFVReal
[]
[pressure]
type = MooseVariableFVReal
[]
[temperature]
type = MooseVariableFVReal
[]
[courant]
type = MooseVariableFVReal
[]
[]
[AuxKernels]
[U_x]
type = ADMaterialRealAux
variable = U_x
property = vel_x
execute_on = 'timestep_end'
[]
[U_y]
type = ADMaterialRealAux
variable = U_y
property = vel_y
execute_on = 'timestep_end'
[]
[pressure]
type = ADMaterialRealAux
variable = pressure
property = pressure
execute_on = 'timestep_end'
[]
[temperature]
type = ADMaterialRealAux
variable = temperature
property = T_fluid
execute_on = 'timestep_end'
[]
[courant]
type = Courant
variable = courant
u = U_x
v = U_y
[]
[]
[FVKernels]
[mass_time]
type = FVPorosityTimeDerivative
variable = rho
[]
[mass_advection]
type = PCNSFVKT
variable = rho
eqn = "mass"
[]
[momentum_time_x]
type = FVTimeKernel
variable = rho_u
[]
[momentum_advection_and_pressure_x]
type = PCNSFVKT
variable = rho_u
eqn = "momentum"
momentum_component = 'x'
[]
[momentum_time_y]
type = FVTimeKernel
variable = rho_v
[]
[momentum_advection_and_pressure_y]
type = PCNSFVKT
variable = rho_v
eqn = "momentum"
momentum_component = 'y'
[]
[energy_time]
type = FVPorosityTimeDerivative
variable = rho_et
[]
[energy_advection]
type = PCNSFVKT
variable = rho_et
eqn = "energy"
[]
[mass_frac_time]
type = PCNSFVDensityTimeDerivative
variable = mass_frac
rho = rho
[]
[mass_frac_advection]
type = PCNSFVKT
variable = mass_frac
eqn = "scalar"
[]
[]
[Functions]
[ud_in]
type = ParsedVectorFunction
expression_x = '0'
expression_y = '${v_in}'
[]
[]
[FVBCs]
[rho_bottom]
type = PCNSFVStrongBC
boundary = 'bottom'
variable = rho
superficial_velocity = 'ud_in'
T_fluid = ${T}
eqn = 'mass'
[]
[rho_u_bottom]
type = PCNSFVStrongBC
boundary = 'bottom'
variable = rho_u
superficial_velocity = 'ud_in'
T_fluid = ${T}
eqn = 'momentum'
momentum_component = 'x'
[]
[rho_v_bottom]
type = PCNSFVStrongBC
boundary = 'bottom'
variable = rho_v
superficial_velocity = 'ud_in'
T_fluid = ${T}
eqn = 'momentum'
momentum_component = 'y'
[]
[rho_et_bottom]
type = PCNSFVStrongBC
boundary = 'bottom'
variable = rho_et
superficial_velocity = 'ud_in'
T_fluid = ${T}
eqn = 'energy'
[]
[mass_frac_bottom]
type = PCNSFVStrongBC
boundary = 'bottom'
variable = mass_frac
superficial_velocity = 'ud_in'
T_fluid = ${T}
scalar = 1
eqn = 'scalar'
[]
[rho_top]
type = PCNSFVStrongBC
boundary = 'top'
variable = rho
pressure = ${p_initial}
eqn = 'mass'
[]
[rho_u_top]
type = PCNSFVStrongBC
boundary = 'top'
variable = rho_u
pressure = ${p_initial}
eqn = 'momentum'
momentum_component = 'x'
[]
[rho_v_top]
type = PCNSFVStrongBC
boundary = 'top'
variable = rho_v
pressure = ${p_initial}
eqn = 'momentum'
momentum_component = 'y'
[]
[rho_et_top]
type = PCNSFVStrongBC
boundary = 'top'
variable = rho_et
pressure = ${p_initial}
eqn = 'energy'
[]
[mass_frac_top]
type = PCNSFVStrongBC
boundary = 'top'
variable = mass_frac
pressure = ${p_initial}
eqn = 'scalar'
[]
[momentum_x_walls]
type = PCNSFVImplicitMomentumPressureBC
variable = rho_u
boundary = 'left right'
momentum_component = 'x'
[]
[momentum_y_walls]
type = PCNSFVImplicitMomentumPressureBC
variable = rho_v
boundary = 'left right'
momentum_component = 'y'
[]
[]
[Materials]
[var_mat]
type = PorousConservedVarMaterial
rho = rho
rho_et = rho_et
superficial_rhou = rho_u
superficial_rhov = rho_v
fp = fp
porosity = porosity
[]
[porosity]
type = GenericConstantMaterial
prop_names = 'porosity'
prop_values = '1'
[]
[]
[Executioner]
type = Transient
[TimeIntegrator]
type = ActuallyExplicitEuler
[]
steady_state_detection = true
steady_state_tolerance = 1e-12
abort_on_solve_fail = true
dt = 5e-4
num_steps = 25
[]
[Outputs]
[out]
type = Exodus
execute_on = 'initial timestep_end'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/solid_mechanics/examples/coal_mining/cosserat_elastic.i)
# Strata deformation and fracturing around a coal mine
#
# A 2D geometry is used that simulates a transverse section of
# the coal mine. The model is actually 3D, but the "x"
# dimension is only 10m long, meshed with 1 element, and
# there is no "x" displacement. The mine is 400m deep
# and just the roof is studied (0<=z<=400). The model sits
# between 0<=y<=450. The excavation sits in 0<=y<=150. This
# is a "half model": the boundary conditions are such that
# the model simulates an excavation sitting in -150<=y<=150
# inside a model of the region -450<=y<=450. The
# excavation height is 3m (ie, the excavation lies within
# 0<=z<=3).
#
# Time is meaningless in this example
# as quasi-static solutions are sought at each timestep, but
# the number of timesteps controls the resolution of the
# process.
#
# The boundary conditions for this elastic simulation are:
# - disp_x = 0 everywhere
# - disp_y = 0 at y=0 and y=450
# - disp_z = 0 for y>150
# - wc_x = 0 at y=0 and y=450.
# That is, rollers on the sides, free at top,
# and prescribed at bottom in the unexcavated portion.
#
# The small strain formulation is used.
#
# All stresses are measured in MPa. The initial stress is consistent with
# the weight force from density 2500 kg/m^3, ie, stress_zz = -0.025*(300-z) MPa
# where gravity = 10 m.s^-2 = 1E-5 MPa m^2/kg. The maximum and minimum
# principal horizontal stresses are assumed to be equal to 0.8*stress_zz.
#
# This is an elastic simulation, but the weak-plane and Drucker-Prager
# parameters and AuxVariables may be found below. They are irrelevant
# in this simulation. The weak-plane and Drucker-Prager cohesions,
# tensile strengths and compressive strengths have been set very high
#
# Material properties:
# Young's modulus = 8 GPa
# Poisson's ratio = 0.25
# Cosserat layer thickness = 1 m
# Cosserat-joint normal stiffness = large
# Cosserat-joint shear stiffness = 1 GPa
#
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 1
xmin = -5
xmax = 5
nz = 40
zmin = 0
zmax = 403.003
bias_z = 1.1
ny = 30 # make this a multiple of 3, so y=150 is at a node
ymin = 0
ymax = 450
[]
[left]
type = SideSetsAroundSubdomainGenerator
new_boundary = 11
normal = '0 -1 0'
input = generated_mesh
[]
[right]
type = SideSetsAroundSubdomainGenerator
new_boundary = 12
normal = '0 1 0'
input = left
[]
[front]
type = SideSetsAroundSubdomainGenerator
new_boundary = 13
normal = '-1 0 0'
input = right
[]
[back]
type = SideSetsAroundSubdomainGenerator
new_boundary = 14
normal = '1 0 0'
input = front
[]
[top]
type = SideSetsAroundSubdomainGenerator
new_boundary = 15
normal = '0 0 1'
input = back
[]
[bottom]
type = SideSetsAroundSubdomainGenerator
new_boundary = 16
normal = '0 0 -1'
input = top
[]
[excav]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '-5 0 0'
top_right = '5 150 3'
input = bottom
[]
[roof]
type = SideSetsBetweenSubdomainsGenerator
new_boundary = 21
primary_block = 0
paired_block = 1
input = excav
[]
[hole]
type = BlockDeletionGenerator
block = 1
input = roof
[]
[]
[GlobalParams]
block = 0
perform_finite_strain_rotations = false
displacements = 'disp_x disp_y disp_z'
Cosserat_rotations = 'wc_x wc_y wc_z'
[]
[Variables]
[./disp_y]
[../]
[./disp_z]
[../]
[./wc_x]
[../]
[]
[Kernels]
[./cy_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_y
component = 1
[../]
[./cz_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_z
component = 2
[../]
[./x_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_x
displacements = 'wc_x wc_y wc_z'
component = 0
base_name = couple
[../]
[./x_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_x
component = 0
[../]
[./gravity]
type = Gravity
use_displaced_mesh = false
variable = disp_z
value = -10E-6 # remember this is in MPa
[../]
[]
[AuxVariables]
[./disp_x]
[../]
[./wc_y]
[../]
[./wc_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./dp_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./dp_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[./dp_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./dp_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[../]
[./stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[../]
[./stress_yx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yx
index_i = 1
index_j = 0
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[../]
[./stress_zx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zx
index_i = 2
index_j = 0
[../]
[./stress_zy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zy
index_i = 2
index_j = 1
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./dp_shear]
type = MaterialStdVectorAux
index = 0
property = dp_plastic_internal_parameter
variable = dp_shear
[../]
[./dp_tensile]
type = MaterialStdVectorAux
index = 1
property = dp_plastic_internal_parameter
variable = dp_tensile
[../]
[./wp_shear]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_internal_parameter
variable = wp_shear
[../]
[./wp_tensile]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_internal_parameter
variable = wp_tensile
[../]
[./dp_shear_f]
type = MaterialStdVectorAux
index = 0
property = dp_plastic_yield_function
variable = dp_shear_f
[../]
[./dp_tensile_f]
type = MaterialStdVectorAux
index = 1
property = dp_plastic_yield_function
variable = dp_tensile_f
[../]
[./wp_shear_f]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_yield_function
variable = wp_shear_f
[../]
[./wp_tensile_f]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_yield_function
variable = wp_tensile_f
[../]
[]
[BCs]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = '11 12'
value = 0.0
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = '16'
value = 0.0
[../]
[./no_wc_x]
type = DirichletBC
variable = wc_x
boundary = '11 12'
value = 0.0
[../]
[]
[Functions]
[./ini_xx]
type = ParsedFunction
expression = '-0.8*2500*10E-6*(403.003-z)'
[../]
[./ini_zz]
type = ParsedFunction
expression = '-2500*10E-6*(403.003-z)'
[../]
[]
[UserObjects]
[./dp_coh_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 2.9 # MPa
value_residual = 3.1 # MPa
rate = 1.0
[../]
[./dp_fric]
type = SolidMechanicsHardeningConstant
value = 0.65 # 37deg
[../]
[./dp_dil]
type = SolidMechanicsHardeningConstant
value = 0.65
[../]
[./dp_tensile_str_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 1.0 # MPa
value_residual = 1.4 # MPa
rate = 1.0
[../]
[./dp_compressive_str]
type = SolidMechanicsHardeningConstant
value = 1.0E3 # Large!
[../]
[./drucker_prager_model]
type = SolidMechanicsPlasticDruckerPrager
mc_cohesion = dp_coh_strong_harden
mc_friction_angle = dp_fric
mc_dilation_angle = dp_dil
internal_constraint_tolerance = 1 # irrelevant here
yield_function_tolerance = 1 # irrelevant here
[../]
[./wp_coh]
type = SolidMechanicsHardeningConstant
value = 1E12
[../]
[./wp_tan_fric]
type = SolidMechanicsHardeningConstant
value = 0.36 # 20deg
[../]
[./wp_tan_dil]
type = SolidMechanicsHardeningConstant
value = 0.18 # 10deg
[../]
[./wp_tensile_str]
type = SolidMechanicsHardeningConstant
value = 1E12
[../]
[./wp_compressive_str]
type = SolidMechanicsHardeningConstant
value = 1E12
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeLayeredCosseratElasticityTensor
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
[../]
[./strain]
type = ComputeCosseratIncrementalSmallStrain
eigenstrain_names = ini_stress
[../]
[./ini_stress]
type = ComputeEigenstrainFromInitialStress
initial_stress = 'ini_xx 0 0 0 ini_xx 0 0 0 ini_zz'
eigenstrain_name = ini_stress
[../]
[./stress]
# this is needed so as to correctly apply the initial stress
type = ComputeMultipleInelasticCosseratStress
block = 0
inelastic_models = ''
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[../]
[./dp]
type = CappedDruckerPragerCosseratStressUpdate
block = 0
warn_about_precision_loss = false
host_youngs_modulus = 8E3
host_poissons_ratio = 0.25
base_name = dp
DP_model = drucker_prager_model
tensile_strength = dp_tensile_str_strong_harden
compressive_strength = dp_compressive_str
max_NR_iterations = 100000
tip_smoother = 0.1E1
smoothing_tol = 0.1E1 # MPa # Must be linked to cohesion
yield_function_tol = 1E-11 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0
[../]
[./wp]
type = CappedWeakPlaneCosseratStressUpdate
block = 0
warn_about_precision_loss = false
base_name = wp
cohesion = wp_coh
tan_friction_angle = wp_tan_fric
tan_dilation_angle = wp_tan_dil
tensile_strength = wp_tensile_str
compressive_strength = wp_compressive_str
max_NR_iterations = 10000
tip_smoother = 0.1
smoothing_tol = 0.1 # MPa # Note, this must be tied to cohesion, otherwise get no possible return at cone apex
yield_function_tol = 1E-11 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0E-3
[../]
[./density]
type = GenericConstantMaterial
prop_names = density
prop_values = 2500
[../]
[]
[Postprocessors]
[./subs_max]
type = PointValue
point = '0 0 403.003'
variable = disp_z
use_displaced_mesh = false
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'Linear'
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
line_search = bt
nl_abs_tol = 1e-3
nl_rel_tol = 1e-5
l_max_its = 30
nl_max_its = 1000
start_time = 0.0
dt = 1.0
end_time = 1.0
[]
[Outputs]
file_base = cosserat_elastic
time_step_interval = 1
print_linear_residuals = false
exodus = true
csv = true
console = true
#[./console]
# type = Console
# output_linear = false
#[../]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_htonly/planar_yz.i)
# 1-D Gap Heat Transfer Test without mechanics
#
# This test exercises 1-D gap heat transfer for a constant conductivity gap.
#
# The mesh consists of two element blocks in the y-z plane. Each element block
# is a square. They sit next to one another with a unit between them.
#
# The conductivity of both blocks is set very large to achieve a uniform temperature
# across each block. The temperature of the far bottom boundary
# is ramped from 100 to 200 over one time unit. The temperature of the far top
# boundary is held fixed at 100.
#
# A simple analytical solution is possible for the heat flux between the blocks:
#
# Flux = (T_left - T_right) * (gapK/gap_width)
#
# The gap conductivity is specified as 1, thus
#
# gapK(Tavg) = 1.0*Tavg
#
# The heat flux across the gap at time = 1 is then:
#
# Flux = 100 * (1.0/1.0) = 100
#
# For comparison, see results from the flux post processors. These results
# are the same as for the unit 1-D gap heat transfer between two unit cubes.
[Mesh]
[file]
type = FileMeshGenerator
file = simple_2D.e
[]
[./rotate]
type = TransformGenerator
transform = ROTATE
vector_value = '0 90 90'
input = file
[../]
[]
[Functions]
[./temp]
type = PiecewiseLinear
x = '0 1 2'
y = '100 200 200'
[../]
[]
[ThermalContact]
[./thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 3
secondary = 2
emissivity_primary = 0
emissivity_secondary = 0
[../]
[]
[Variables]
[./temp]
order = FIRST
family = LAGRANGE
initial_condition = 100
[../]
[]
[AuxVariables]
[./gap_cond]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = temp
[../]
[]
[BCs]
[./temp_far_bottom]
type = FunctionDirichletBC
boundary = 1
variable = temp
function = temp
[../]
[./temp_far_top]
type = DirichletBC
boundary = 4
variable = temp
value = 100
[../]
[]
[AuxKernels]
[./conductance]
type = MaterialRealAux
property = gap_conductance
variable = gap_cond
boundary = 2
[../]
[]
[Materials]
[./heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 100000000.0
[../]
[./density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '1.0'
[../]
[]
[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 4'
line_search = 'none'
nl_rel_tol = 1e-12
l_tol = 1e-3
l_max_its = 100
dt = 1e-1
end_time = 1.0
[]
[Postprocessors]
[./temp_bottom]
type = SideAverageValue
boundary = 2
variable = temp
execute_on = 'initial timestep_end'
[../]
[./temp_top]
type = SideAverageValue
boundary = 3
variable = temp
execute_on = 'initial timestep_end'
[../]
[./flux_bottom]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 2
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[../]
[./flux_top]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 3
diffusivity = thermal_conductivity
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/NAFEMS/transient/T3/nafems_t3_quad_template.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 1
xmin = 0.0
xmax = 0.1
ymin = 0.0
ymax = 0.01
elem_type = QUAD4
[]
[Variables]
[./temp]
initial_condition = 0.0
[../]
[]
[BCs]
[./FixedTempLeft]
type = DirichletBC
variable = temp
boundary = left
value = 0.0
[../]
[./FunctionTempRight]
type = FunctionDirichletBC
variable = temp
boundary = right
function = '100.0 * sin(pi*t/40)'
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = temp
[../]
[./HeatTdot]
type = HeatConductionTimeDerivative
variable = temp
[../]
[]
[Materials]
[./density]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '35.0 440.5 7200.0'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
l_tol = 1e-5
nl_max_its = 50
nl_rel_tol = 1e-10
nl_abs_tol = 1e-12
dt = 1
end_time = 32.0
[]
[Postprocessors]
[./target_temp]
type = NodalVariableValue
variable = temp
nodeid = 9
[../]
[]
[Outputs]
csv = true
[]
(modules/optimization/test/tests/optimizationreporter/point_loads/forward_and_adjoint.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmax = 1
ymax = 1.4
[]
[]
[Problem]
nl_sys_names = 'nl0 adjoint'
kernel_coverage_check = false
[]
[Variables]
[temperature]
[]
[temperature_adjoint]
nl_sys = adjoint
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = thermal_conductivity
[]
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = temperature
x_coord_name = 'point_source/x'
y_coord_name = 'point_source/y'
z_coord_name = 'point_source/z'
value_name = 'point_source/value'
[]
[misfit]
type = ReporterPointSource
variable = temperature_adjoint
x_coord_name = measure_data/measurement_xcoord
y_coord_name = measure_data/measurement_ycoord
z_coord_name = measure_data/measurement_zcoord
value_name = measure_data/misfit_values
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temperature
boundary = left
value = 300
[]
[right]
type = DirichletBC
variable = temperature
boundary = right
value = 300
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 300
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 300
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = SteadyAndAdjoint
forward_system = nl0
adjoint_system = adjoint
nl_rel_tol = 1e-12
l_tol = 1e-12
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[VectorPostprocessors]
[gradient]
type = PointValueSampler
points = '0.2 0.2 0
0.7 0.56 0
0.4 1 0'
variable = temperature_adjoint
sort_by = id
execute_on = ADJOINT_TIMESTEP_END
[]
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
[]
[point_source]
type = ConstantReporter
real_vector_names = 'x y z value'
real_vector_values = '0.2 0.7 0.4;
0.2 0.56 1;
0 0 0;
-1000 120 500'
[]
[]
[Outputs]
console = false
[]
(test/tests/controls/syntax_based_naming_access/system_asterisk_param.i)
[Mesh]
type = GeneratedMesh
dim = 2
elem_type = QUAD4
# use odd numbers so points do not fall on element boundaries
nx = 31
ny = 31
[]
[Variables]
[./diffused]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = diffused
[../]
[]
[DiracKernels]
[./test_object]
type = MaterialPointSource
point = '0.5 0.5 0'
variable = diffused
[../]
[]
[BCs]
[./bottom_diffused]
type = DirichletBC
variable = diffused
boundary = 'bottom'
value = 2
[../]
[./top_diffused]
type = DirichletBC
variable = diffused
boundary = 'top'
value = 0
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'matp'
prop_values = '1'
block = 0
[../]
[]
[Postprocessors]
[./test_object]
type = TestControlPointPP
function = '2*(x+y)'
point = '0.5 0.5 0'
[../]
[./other_point_test_object]
type = TestControlPointPP
function = '3*(x+y)'
point = '0.5 0.5 0'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
[Controls]
[./point_control]
type = TestControl
test_type = 'point'
parameter = 'Postprocessors/*/point'
execute_on = 'initial'
[../]
[]
(modules/phase_field/test/tests/SplitCH/forward_split_math_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
xmax = 25.0
ymax = 25.0
elem_type = QUAD
[]
[Variables]
[./c]
[../]
[./w]
[../]
[]
[ICs]
[./c_IC]
type = CrossIC
variable = c
x1 = 0
x2 = 25
y1 = 0
y2 = 25
[../]
[]
[Kernels]
[./cdot]
type = TimeDerivative
variable = c
[../]
[./grad_w]
type = MatDiffusion
variable = c
v = w
diffusivity = 1.0
[../]
[./grad_c]
type = MatDiffusion
variable = w
v = c
diffusivity = 2.0
[../]
[./w2]
type = CoupledMaterialDerivative
variable = w
v = c
f_name = F
[../]
[./w3]
type = CoefReaction
variable = w
coefficient = -1.0
[../]
[]
[AuxVariables]
[./local_energy]
family = MONOMIAL
order = CONSTANT
[../]
[]
[AuxKernels]
[./local_energy]
type = TotalFreeEnergy
variable = local_energy
f_name = F
kappa_names = kappa_c
interfacial_vars = c
[../]
[]
[Materials]
[./kappa_c]
type = GenericConstantMaterial
prop_names = kappa_c
prop_values = 2.0
[../]
[./free_energy]
type = DerivativeParsedMaterial
coupled_variables = c
expression = '(1 - c)^2 * (1 + c)^2'
property_name = F
[../]
[]
[Postprocessors]
[./total_free_energy]
type = ElementIntegralVariablePostprocessor
variable = local_energy
[../]
[./total_c]
type = ElementIntegralVariablePostprocessor
variable = c
execute_on = 'initial TIMESTEP_END'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
l_max_its = 30
l_tol = 1.0e-4
nl_max_its = 10
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 5
dt = 0.7
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/anisotropic_interfaces/adkobayashi.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 32
ny = 32
xmax = 0.7
ymax = 0.7
[]
[Variables]
[w]
[]
[T]
[]
[]
[ICs]
[wIC]
type = SmoothCircleIC
variable = w
int_width = 0.1
x1 = 0.35
y1 = 0.35
radius = 0.08
outvalue = 0
invalue = 1
[]
[]
[Kernels]
[w_dot]
type = TimeDerivative
variable = w
[]
[anisoACinterface1]
type = ADACInterfaceKobayashi1
variable = w
mob_name = M
[]
[anisoACinterface2]
type = ADACInterfaceKobayashi2
variable = w
mob_name = M
[]
[AllenCahn]
type = ADAllenCahn
variable = w
mob_name = M
f_name = fbulk
[]
[T_dot]
type = ADTimeDerivative
variable = T
[]
[CoefDiffusion]
type = ADDiffusion
variable = T
[]
[w_dot_T]
type = ADCoefCoupledTimeDerivative
variable = T
v = w
coef = -1.8 #This is -K from kobayashi's paper
[]
[]
[Materials]
[free_energy]
type = ADDerivativeParsedMaterial
property_name = fbulk
coupled_variables = 'w T'
constant_names = 'alpha gamma T_e pi'
constant_expressions = '0.9 10 1 4*atan(1)'
expression = 'm:=alpha/pi * atan(gamma * (T_e - T)); 1/4*w^4 - (1/2 - m/3) * w^3 + (1/4 - m/2) * '
'w^2'
derivative_order = 1
outputs = exodus
[]
[material]
type = ADInterfaceOrientationMaterial
op = w
[]
[consts]
type = ADGenericConstantMaterial
prop_names = 'M'
prop_values = '3333.333'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
scheme = bdf2
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu '
nl_rel_tol = 1e-08
l_tol = 1e-4
l_max_its = 30
dt = 0.001
num_steps = 6
[]
[Outputs]
exodus = true
perf_graph = true
execute_on = 'INITIAL FINAL'
[]
(modules/combined/examples/phase_field-mechanics/SimplePhaseTrans.i)
#
# Martensitic transformation
# One structural order parameter (SOP) governed by AllenCahn Eqn.
# Chemical driving force described by Landau Polynomial
# Coupled with elasticity (Mechanics)
# Eigenstrain as a function of SOP
#
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 100
ny = 100
xmin = 0
xmax = 100
ymin = 0
ymax = 100
elem_type = QUAD4
[]
[Variables]
[./eta]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 50
y1 = 50
radius = 10.0
invalue = 1.0
outvalue = 0.0
int_width = 5.0
[../]
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
add_variables = true
generate_output = 'stress_xx stress_yy'
eigenstrain_names = 'eigenstrain'
[../]
[]
[Kernels]
[./eta_bulk]
type = AllenCahn
variable = eta
f_name = F
[../]
[./eta_interface]
type = ACInterface
variable = eta
kappa_name = kappa_eta
[../]
[./time]
type = TimeDerivative
variable = eta
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'L kappa_eta'
prop_values = '1 1'
[../]
[./chemical_free_energy]
type = DerivativeParsedMaterial
property_name = Fc
coupled_variables = 'eta'
constant_names = 'A2 A3 A4'
constant_expressions = '0.2 -12.6 12.4'
expression = A2/2*eta^2+A3/3*eta^3+A4/4*eta^4
enable_jit = true
derivative_order = 2
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '70 30 30 70 30 70 30 30 30'
fill_method = symmetric9
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./var_dependence]
type = DerivativeParsedMaterial
expression = eta
coupled_variables = 'eta'
property_name = var_dep
enable_jit = true
derivative_order = 2
[../]
[./eigenstrain]
type = ComputeVariableEigenstrain
eigen_base = '0.1 0.1 0 0 0 0'
prefactor = var_dep
#outputs = exodus
args = 'eta'
eigenstrain_name = eigenstrain
[../]
[./elastic_free_energy]
type = ElasticEnergyMaterial
f_name = Fe
args = 'eta'
derivative_order = 2
[../]
[./free_energy]
type = DerivativeSumMaterial
property_name = F
sum_materials = 'Fc Fe'
coupled_variables = 'eta'
derivative_order = 2
[../]
[]
[BCs]
[./all_y]
type = DirichletBC
variable = disp_y
boundary = 'top bottom left right'
value = 0
[../]
[./all_x]
type = DirichletBC
variable = disp_x
boundary = 'top bottom left right'
value = 0
[../]
[]
[Preconditioning]
# active = ' '
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
# this gives best performance on 4 cores
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
num_steps = 10
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 9
iteration_window = 2
growth_factor = 1.1
cutback_factor = 0.75
dt = 0.3
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/stochastic_tools/test/tests/reporters/parallel_storage/sub.i)
S = 10
D = 10
[Mesh]
type = GeneratedMesh
dim = 1
nx = 6
xmax = 6
[]
[Variables]
[u]
[]
[v]
[]
[]
[AuxVariables]
[u_aux]
[]
[]
[Kernels]
[diffusion_u]
type = MatDiffusion
variable = u
diffusivity = D_u
[]
[source_u]
type = BodyForce
variable = u
value = 1.0
[]
[diffusion_v]
type = MatDiffusion
variable = v
diffusivity = D_v
[]
[source_v]
type = BodyForce
variable = v
value = 1.0
[]
[]
[AuxKernels]
[func_aux]
type = FunctionAux
variable = u_aux
function = u_aux_func
[]
[]
[Functions]
[u_aux_func]
type = ParsedFunction
expression = 'S * pow(x, D/10)'
symbol_names = 'S D'
symbol_values = '${S} ${D}'
[]
[]
[Materials]
[diffusivity_u]
type = GenericConstantMaterial
prop_names = D_u
prop_values = 2.0
[]
[diffusivity_v]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 4.0
[]
[]
[BCs]
[left_u]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right_u]
type = DirichletBC
variable = u
boundary = right
value = 0
[]
[left_v]
type = DirichletBC
variable = v
boundary = left
value = 0
[]
[right_v]
type = DirichletBC
variable = v
boundary = right
value = 0
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Reporters]
[solution_storage]
type = SolutionContainer
execute_on = 'FINAL'
[]
[solution_storage_aux]
type = SolutionContainer
execute_on = 'FINAL'
system = aux
[]
[]
(test/tests/postprocessors/side_material.i)
#
# Common input for side_integral_material_property.i and
# side_average_material_property.i
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 2
xmax = 4
ymax = 1
[]
[Variables]
[u]
[]
[]
[Problem]
kernel_coverage_check = false
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Materials]
active = 'types'
[types]
type = TypesMaterial
std_vec_prop_entry1 = 1.1
[]
# while TypeMaterial supplies the types below as well, we're providing custom
# ones to ensure that the average stays the same and we can use a single CSV
# gold file for the test
[real]
type = GenericConstantMaterial
prop_names = prop
prop_values = 1.1
[]
[realvector]
type = GenericConstantVectorMaterial
prop_names = prop
prop_values = '2.2 1.1 3.3'
[]
[ranktwo]
type = GenericConstantRankTwoTensor
tensor_name = prop
tensor_values = '3.3 2.2 1.1 4.4 5.5 6.6'
[]
[]
[Outputs]
csv = true
[]
(modules/phase_field/test/tests/KKS_system/nonlinear.i)
#
# This test checks if the thwo phase and lagrange multiplier solutions can be replicated
# with a two order parameter approach, where the second order parameter eta2 is a
# nonlinear variable that is set as eta2 := 1 - eta1 (using Reaction, CoupledForce, and BodyForce)
# The solution is reproduced.
#
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmax = 5
[]
[AuxVariables]
[Fglobal]
order = CONSTANT
family = MONOMIAL
[]
[]
[Variables]
# concentration
[c]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = FunctionIC
function = x/5
[]
[]
# order parameter 1
[eta1]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[]
# order parameter 2
[eta2]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[]
# phase concentration 1
[c1]
order = FIRST
family = LAGRANGE
initial_condition = 0.9
[]
# phase concentration 2
[c2]
order = FIRST
family = LAGRANGE
initial_condition = 0.1
[]
[]
[Materials]
# simple toy free energies
[f1] # = fd
type = DerivativeParsedMaterial
property_name = F1
coupled_variables = 'c1'
expression = '(0.9-c1)^2'
[]
[f2] # = fm
type = DerivativeParsedMaterial
property_name = F2
coupled_variables = 'c2'
expression = '(0.1-c2)^2'
[]
# Switching functions for each phase
[h1_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta1
function_name = h1
[]
[h2_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta2
function_name = h2
[]
# Coefficients for diffusion equation
[Dh1]
type = DerivativeParsedMaterial
material_property_names = 'D h1(eta1)'
expression = D*h1
property_name = Dh1
coupled_variables = eta1
[]
[Dh2]
type = DerivativeParsedMaterial
material_property_names = 'D h2(eta2)'
expression = D*h2
property_name = Dh2
coupled_variables = eta2
[]
# Barrier functions for each phase
[g1]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta1
function_name = g1
[]
[g2]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta2
function_name = g2
[]
# constant properties
[constants]
type = GenericConstantMaterial
prop_names = 'D L kappa'
prop_values = '0.7 0.7 0.2'
[]
[]
[Kernels]
#Kernels for diffusion equation
[diff_time]
type = TimeDerivative
variable = c
[]
[diff_c1]
type = MatDiffusion
variable = c
diffusivity = Dh1
v = c1
args = 'eta1'
[]
[diff_c2]
type = MatDiffusion
variable = c
diffusivity = Dh2
v = c2
args = 'eta2'
[]
# Kernels for Allen-Cahn equation for eta1
[deta1dt]
type = TimeDerivative
variable = eta1
[]
[ACBulkF1]
type = KKSMultiACBulkF
variable = eta1
Fj_names = 'F1 F2 '
hj_names = 'h1 h2 '
gi_name = g1
eta_i = eta1
wi = 0.2
coupled_variables = 'c1 c2 eta2'
[]
[ACBulkC1]
type = KKSMultiACBulkC
variable = eta1
Fj_names = 'F1 F2'
hj_names = 'h1 h2'
cj_names = 'c1 c2'
eta_i = eta1
coupled_variables = 'eta2'
[]
[ACInterface1]
type = ACInterface
variable = eta1
kappa_name = kappa
[]
# Phase concentration constraints
[chempot12]
type = KKSPhaseChemicalPotential
variable = c1
cb = c2
fa_name = F1
fb_name = F2
[]
[phaseconcentration]
type = KKSMultiPhaseConcentration
variable = c2
cj = 'c1 c2'
hj_names = 'h1 h2'
etas = 'eta1 eta2'
c = c
[]
# equation for eta2 = 1 - eta1
# 0 = eta2 + eta1 -1
[constraint_eta1] # eta2
type = Reaction
variable = eta2
[]
[constraint_eta2] # + eta1
type = CoupledForce
variable = eta2
coef = -1
v = eta1
[]
[constraint_one] # - 1
type = BodyForce
variable = eta2
[]
[]
[AuxKernels]
[Fglobal_total]
type = KKSMultiFreeEnergy
Fj_names = 'F1 F2 '
hj_names = 'h1 h2 '
gj_names = 'g1 g2 '
variable = Fglobal
w = 0.2
interfacial_vars = 'eta1 eta2 '
kappa_names = 'kappa kappa'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'lu nonzero'
l_max_its = 30
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-11
end_time = 350
dt = 10
[]
[VectorPostprocessors]
[c]
type = LineValueSampler
variable = c
start_point = '0 0 0'
end_point = '5 0 0'
num_points = 21
sort_by = x
[]
[]
[Outputs]
csv = true
execute_on = FINAL
[]
(test/tests/misc/boundary_variable_check/test.i)
[Problem]
boundary_restricted_elem_integrity_check = true
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[]
[]
[AuxVariables]
[dummy][]
[dummy2]
family = MONOMIAL
order = CONSTANT
block = 1
[]
[dummy3]
family = MONOMIAL
order = CONSTANT
block = 0
[]
[]
[AuxKernels]
active = 'bad'
[bad]
type = ProjectionAux
variable = dummy
v = v
boundary = 'left'
[]
[bad_elemental]
type = ProjectionAux
variable = dummy3
v = dummy2
boundary = 'left'
[]
[]
[Variables]
[u]
block = '0'
[]
[v]
block = '1'
[]
[]
[Kernels]
[diff_u]
type = CoeffParamDiffusion
variable = u
D = 4
block = 0
[]
[diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 1
[]
[]
[InterfaceKernels]
active = 'interface'
[interface]
type = InterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
D = 'D'
D_neighbor = 'D'
[]
[penalty_interface]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
[]
[]
[BCs]
active = 'left right middle'
[left]
type = DirichletBC
variable = u
boundary = 'left'
value = 1
[]
[bad]
type = MatchedValueBC
variable = u
boundary = 'left'
v = v
[]
[bad_integrated]
type = CoupledVarNeumannBC
variable = u
boundary = 'left'
v = v
[]
[right]
type = DirichletBC
variable = v
boundary = 'right'
value = 0
[]
[middle]
type = MatchedValueBC
variable = v
boundary = 'primary0_interface'
v = u
[]
[]
[Materials]
[stateful]
type = StatefulMaterial
initial_diffusivity = 1
boundary = primary0_interface
[]
[block0]
type = GenericConstantMaterial
block = '0'
prop_names = 'D'
prop_values = '4'
[]
[block1]
type = GenericConstantMaterial
block = '1'
prop_names = 'D'
prop_values = '2'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
[Postprocessors]
active = ''
[bad]
type = NodalExtremeValue
boundary = 'left'
variable = v
[]
[bad_side]
type = SideDiffusiveFluxIntegral
variable = v
diffusivity = 1
boundary = 'left'
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/velocity_channel/velocity_inletBC_by_parts.i)
# This input file tests outflow boundary conditions for the incompressible NS equations.
[GlobalParams]
gravity = '0 0 0'
integrate_p_by_parts = true
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 3.0
ymin = 0
ymax = 1.0
nx = 30
ny = 10
elem_type = QUAD9
[]
[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'
[../]
[]
[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'
[../]
[]
(test/tests/materials/stateful_prop/implicit_stateful_ad.i)
# This test checks that material property for which the old state has been
# received first can still be delcared as AD
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 1
nx = 10
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[Variables]
[u]
[]
[]
[Materials]
[stateful1]
type = BadStatefulMaterial
[]
[mat]
type = ADGenericConstantMaterial
prop_names = 'nonexistingpropertyname'
prop_values = '42'
[]
[]
[Executioner]
type = Steady
[]
(modules/phase_field/test/tests/initial_conditions/SmoothSuperellipsoidIC_3D.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 15
ny = 15
nz = 15
xmax = 50
ymax = 50
zmax = 50
elem_type = HEX8
[]
[Variables]
[./c]
[../]
[]
[ICs]
[./c]
type = SmoothSuperellipsoidIC
variable = c
x1 = 25.0
y1 = 25.0
z1 = 25.0
a = 8
b = 12
c = 16
n = 3.5
invalue = 1.0
outvalue = 0
int_width = 4.0
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./Diffusion]
type = MatDiffusion
variable = c
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y z'
[../]
[../]
[]
[Materials]
[./Diffusivity]
type = GenericConstantMaterial
prop_names = D
prop_values = 1.0
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_max_its = 20
l_tol = 1.0e-5
nl_max_its = 40
nl_rel_tol = 5.0e-14
start_time = 0.0
num_steps = 1
dt = 2.0
[]
[Outputs]
exodus = 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/phase_field/examples/kim-kim-suzuki/kks_example_ternary.i)
#
# KKS ternary (3 chemical component) system example in the split form
# We track c1 and c2 only, since c1 + c2 + c3 = 1
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 150
ny = 15
nz = 0
xmin = -25
xmax = 25
ymin = -2.5
ymax = 2.5
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[AuxVariables]
[./Fglobal]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Variables]
# order parameter
[./eta]
order = FIRST
family = LAGRANGE
[../]
# solute 1 concentration
[./c1]
order = FIRST
family = LAGRANGE
[../]
# solute 2 concentration
[./c2]
order = FIRST
family = LAGRANGE
[../]
# chemical potential solute 1
[./w1]
order = FIRST
family = LAGRANGE
[../]
# chemical potential solute 2
[./w2]
order = FIRST
family = LAGRANGE
[../]
# Liquid phase solute 1 concentration
[./c1l]
order = FIRST
family = LAGRANGE
initial_condition = 0.1
[../]
# Liquid phase solute 2 concentration
[./c2l]
order = FIRST
family = LAGRANGE
initial_condition = 0.05
[../]
# Solid phase solute 1 concentration
[./c1s]
order = FIRST
family = LAGRANGE
initial_condition = 0.8
[../]
# Solid phase solute 2 concentration
[./c2s]
order = FIRST
family = LAGRANGE
initial_condition = 0.1
[../]
[]
[Functions]
[./ic_func_eta]
type = ParsedFunction
expression = '0.5*(1.0-tanh((x)/sqrt(2.0)))'
[../]
[./ic_func_c1]
type = ParsedFunction
expression = '0.8*(0.5*(1.0-tanh(x/sqrt(2.0))))^3*(6*(0.5*(1.0-tanh(x/sqrt(2.0))))^2-15*(0.5*(1.0-tanh(x/sqrt(2.0))))+10)+0.1*(1-(0.5*(1.0-tanh(x/sqrt(2.0))))^3*(6*(0.5*(1.0-tanh(x/sqrt(2.0))))^2-15*(0.5*(1.0-tanh(x/sqrt(2.0))))+10))'
[../]
[./ic_func_c2]
type = ParsedFunction
expression = '0.1*(0.5*(1.0-tanh(x/sqrt(2.0))))^3*(6*(0.5*(1.0-tanh(x/sqrt(2.0))))^2-15*(0.5*(1.0-tanh(x/sqrt(2.0))))+10)+0.05*(1-(0.5*(1.0-tanh(x/sqrt(2.0))))^3*(6*(0.5*(1.0-tanh(x/sqrt(2.0))))^2-15*(0.5*(1.0-tanh(x/sqrt(2.0))))+10))'
[../]
[]
[ICs]
[./eta]
variable = eta
type = FunctionIC
function = ic_func_eta
[../]
[./c1]
variable = c1
type = FunctionIC
function = ic_func_c1
[../]
[./c2]
variable = c2
type = FunctionIC
function = ic_func_c2
[../]
[]
[Materials]
# Free energy of the liquid
[./fl]
type = DerivativeParsedMaterial
property_name = fl
coupled_variables = 'c1l c2l'
expression = '(0.1-c1l)^2+(0.05-c2l)^2'
[../]
# Free energy of the solid
[./fs]
type = DerivativeParsedMaterial
property_name = fs
coupled_variables = 'c1s c2s'
expression = '(0.8-c1s)^2+(0.1-c2s)^2'
[../]
# h(eta)
[./h_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta
[../]
# g(eta)
[./g_eta]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta
[../]
# constant properties
[./constants]
type = GenericConstantMaterial
prop_names = 'M L eps_sq'
prop_values = '0.7 0.7 1.0 '
[../]
[]
[Kernels]
# enforce c1 = (1-h(eta))*c1l + h(eta)*c1s
[./PhaseConc1]
type = KKSPhaseConcentration
ca = c1l
variable = c1s
c = c1
eta = eta
[../]
# enforce c2 = (1-h(eta))*c2l + h(eta)*c2s
[./PhaseConc2]
type = KKSPhaseConcentration
ca = c2l
variable = c2s
c = c2
eta = eta
[../]
# enforce pointwise equality of chemical potentials
[./ChemPotSolute1]
type = KKSPhaseChemicalPotential
variable = c1l
cb = c1s
fa_name = fl
fb_name = fs
args_a = 'c2l'
args_b = 'c2s'
[../]
[./ChemPotSolute2]
type = KKSPhaseChemicalPotential
variable = c2l
cb = c2s
fa_name = fl
fb_name = fs
args_a = 'c1l'
args_b = 'c1s'
[../]
#
# Cahn-Hilliard Equations
#
[./CHBulk1]
type = KKSSplitCHCRes
variable = c1
ca = c1l
fa_name = fl
w = w1
args_a = 'c2l'
[../]
[./CHBulk2]
type = KKSSplitCHCRes
variable = c2
ca = c2l
fa_name = fl
w = w2
args_a = 'c1l'
[../]
[./dc1dt]
type = CoupledTimeDerivative
variable = w1
v = c1
[../]
[./dc2dt]
type = CoupledTimeDerivative
variable = w2
v = c2
[../]
[./w1kernel]
type = SplitCHWRes
mob_name = M
variable = w1
[../]
[./w2kernel]
type = SplitCHWRes
mob_name = M
variable = w2
[../]
#
# Allen-Cahn Equation
#
[./ACBulkF]
type = KKSACBulkF
variable = eta
fa_name = fl
fb_name = fs
w = 1.0
coupled_variables = 'c1l c1s c2l c2s'
[../]
[./ACBulkC1]
type = KKSACBulkC
variable = eta
ca = c1l
cb = c1s
fa_name = fl
coupled_variables = 'c2l'
[../]
[./ACBulkC2]
type = KKSACBulkC
variable = eta
ca = c2l
cb = c2s
fa_name = fl
coupled_variables = 'c1l'
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = eps_sq
[../]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[]
[AuxKernels]
[./GlobalFreeEnergy]
variable = Fglobal
type = KKSGlobalFreeEnergy
fa_name = fl
fb_name = fs
w = 1.0
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm ilu nonzero'
l_max_its = 100
nl_max_its = 100
num_steps = 50
dt = 0.1
[]
#
# Precondition using handcoded off-diagonal terms
#
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/examples/laser-welding/2d.i)
endtime=5e-4 # s
timestep=${fparse endtime/100} # s
surfacetemp=300 # K
power=190 # W
R=1.8257418583505537e-4 # m
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -.45e-3 # m
xmax = 0.45e-3 # m
ymin = -.9e-4 # m
ymax = 0
nx = 25
ny = 5
displacements = 'disp_x disp_y'
[]
[GlobalParams]
temperature = T
[]
[Variables]
[vel]
family = LAGRANGE_VEC
[]
[T]
[]
[p]
[]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[vel_x_aux]
[InitialCondition]
type = ConstantIC
value = 1e-15
[]
[]
[vel_y_aux]
[InitialCondition]
type = ConstantIC
value = 1e-15
[]
[]
[]
[AuxKernels]
[vel_x_value]
type = VectorVariableComponentAux
variable = vel_x_aux
vector_variable = vel
component = x
[]
[vel_y_value]
type = VectorVariableComponentAux
variable = vel_y_aux
vector_variable = vel
component = y
[]
[]
[ICs]
[T]
type = FunctionIC
variable = T
function = '(${surfacetemp} - 300) / .7e-3 * y + ${surfacetemp}'
[]
[]
[Kernels]
[disp_x]
type = Diffusion
variable = disp_x
[]
[disp_y]
type = Diffusion
variable = disp_y
[]
[mass]
type = INSADMass
variable = p
use_displaced_mesh = true
[]
[mass_pspg]
type = INSADMassPSPG
variable = p
use_displaced_mesh = true
[]
[momentum_time]
type = INSADMomentumTimeDerivative
variable = vel
use_displaced_mesh = true
[]
[momentum_advection]
type = INSADMomentumAdvection
variable = vel
use_displaced_mesh = true
[]
[momentum_mesh_advection]
type = INSADMomentumMeshAdvection
variable = vel
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
[]
[momentum_viscous]
type = INSADMomentumViscous
variable = vel
use_displaced_mesh = true
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = vel
pressure = p
integrate_p_by_parts = true
use_displaced_mesh = true
[]
[momentum_supg]
type = INSADMomentumSUPG
variable = vel
material_velocity = relative_velocity
use_displaced_mesh = true
[]
[temperature_time]
type = INSADHeatConductionTimeDerivative
variable = T
use_displaced_mesh = true
[]
[temperature_advection]
type = INSADEnergyAdvection
variable = T
use_displaced_mesh = true
[]
[temperature_mesh_advection]
type = INSADEnergyMeshAdvection
variable = T
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
[]
[temperature_conduction]
type = ADHeatConduction
variable = T
thermal_conductivity = 'k'
use_displaced_mesh = true
[]
[temperature_supg]
type = INSADEnergySUPG
variable = T
velocity = vel
use_displaced_mesh = true
[]
[]
[BCs]
[x_no_disp]
type = DirichletBC
variable = disp_x
boundary = 'bottom'
value = 0
[]
[y_no_disp]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0
[]
[no_slip]
type = ADVectorFunctionDirichletBC
variable = vel
boundary = 'bottom right left'
[]
[T_cold]
type = DirichletBC
variable = T
boundary = 'bottom'
value = 300
[]
[radiation_flux]
type = FunctionRadiativeBC
variable = T
boundary = 'top'
emissivity_function = '1'
Tinfinity = 300
stefan_boltzmann_constant = 5.67e-8
use_displaced_mesh = true
[]
[weld_flux]
type = GaussianEnergyFluxBC
variable = T
boundary = 'top'
P0 = ${power}
R = ${R}
x_beam_coord = '-0.35e-3 +0.7e-3*t/${endtime}'
y_beam_coord = '0'
use_displaced_mesh = true
[]
[vapor_recoil]
type = INSADVaporRecoilPressureMomentumFluxBC
variable = vel
boundary = 'top'
use_displaced_mesh = true
[]
[displace_x_top]
type = INSADDisplaceBoundaryBC
boundary = 'top'
variable = 'disp_x'
velocity = 'vel'
component = 0
associated_subdomain = 0
[]
[displace_y_top]
type = INSADDisplaceBoundaryBC
boundary = 'top'
variable = 'disp_y'
velocity = 'vel'
component = 1
associated_subdomain = 0
[]
[displace_x_top_dummy]
type = INSADDummyDisplaceBoundaryIntegratedBC
boundary = 'top'
variable = 'disp_x'
velocity = 'vel'
component = 0
[]
[displace_y_top_dummy]
type = INSADDummyDisplaceBoundaryIntegratedBC
boundary = 'top'
variable = 'disp_y'
velocity = 'vel'
component = 1
[]
[]
[Materials]
[ins_mat]
type = INSADStabilized3Eqn
velocity = vel
pressure = p
temperature = T
use_displaced_mesh = true
[]
[steel]
type = AriaLaserWeld304LStainlessSteel
temperature = T
beta = 1e7
use_displaced_mesh = true
[]
[steel_boundary]
type = AriaLaserWeld304LStainlessSteelBoundary
boundary = 'top'
temperature = T
use_displaced_mesh = true
[]
[const]
type = GenericConstantMaterial
prop_names = 'abs sb_constant'
prop_values = '1 5.67e-8'
use_displaced_mesh = true
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu NONZERO strumpack'
[]
[]
[Executioner]
type = Transient
end_time = ${endtime}
dtmin = 1e-8
dtmax = ${timestep}
petsc_options = '-snes_converged_reason -ksp_converged_reason -options_left'
solve_type = 'NEWTON'
line_search = 'none'
nl_max_its = 12
l_max_its = 100
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 7
dt = ${timestep}
linear_iteration_ratio = 1e6
growth_factor = 1.5
[]
[]
[Outputs]
[exodus]
type = Exodus
output_material_properties = true
show_material_properties = 'mu'
[]
checkpoint = true
perf_graph = true
[]
[Debug]
show_var_residual_norms = true
[]
[Adaptivity]
marker = combo
max_h_level = 4
[Indicators]
[error_T]
type = GradientJumpIndicator
variable = T
[]
[error_dispz]
type = GradientJumpIndicator
variable = disp_y
[]
[]
[Markers]
[errorfrac_T]
type = ErrorFractionMarker
refine = 0.4
coarsen = 0.2
indicator = error_T
[]
[errorfrac_dispz]
type = ErrorFractionMarker
refine = 0.4
coarsen = 0.2
indicator = error_dispz
[]
[combo]
type = ComboMarker
markers = 'errorfrac_T errorfrac_dispz'
[]
[]
[]
[Postprocessors]
[num_dofs]
type = NumDOFs
system = 'NL'
[]
[nl]
type = NumNonlinearIterations
[]
[tot_nl]
type = CumulativeValuePostprocessor
postprocessor = 'nl'
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/steady_vector_fsp_stokes.i)
rho=1
mu=1
U=1
l=1
prefactor=${fparse 1/(l/2)^2}
n=8
[Mesh]
[gen]
type = DistributedRectilinearMeshGenerator
dim = 2
xmin = 0
xmax = ${l}
ymin = 0
ymax = ${l}
nx = ${n}
ny = ${n}
elem_type = QUAD4
[]
second_order = true
parallel_type = distributed
[]
[Variables]
[vel]
order = SECOND
family = LAGRANGE_VEC
[]
[p]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[mass]
type = INSADMass
variable = p
[]
[mass_kernel]
type = MassMatrix
variable = p
matrix_tags = 'mass'
[]
[momentum_viscous]
type = INSADMomentumViscous
variable = vel
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = vel
pressure = p
integrate_p_by_parts = true
[]
[]
[BCs]
[no_slip]
type = ADVectorFunctionDirichletBC
variable = vel
boundary = 'bottom right left'
[]
[lid]
type = ADVectorFunctionDirichletBC
variable = vel
boundary = 'top'
function_x = 'lid_function'
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '${rho} ${mu}'
[]
[insad]
type = INSADMaterial
velocity = vel
pressure = p
[]
[]
[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 = '${prefactor}*${U}*x*(${l}-x)'
[]
[]
[Problem]
type = NavierStokesProblem
mass_matrix = 'mass'
extra_tag_matrices = 'mass'
use_pressure_mass_matrix = true
[]
[Preconditioning]
[FSP]
type = FSP
topsplit = 'up'
[up]
splitting = 'u p'
splitting_type = schur
petsc_options_iname = '-pc_fieldsplit_schur_fact_type -pc_fieldsplit_schur_precondition -ksp_gmres_restart -ksp_type -ksp_pc_side -ksp_rtol'
petsc_options_value = 'full self 300 fgmres right 1e-4'
[]
[u]
vars = 'vel'
# petsc_options = '-ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_type -ksp_rtol -ksp_gmres_restart -ksp_pc_side'
petsc_options_value = 'hypre boomeramg gmres 1e-2 300 right'
[]
[p]
vars = 'p'
petsc_options = '-ksp_converged_reason'
petsc_options_iname = '-ksp_type -ksp_gmres_restart -ksp_rtol -pc_type -ksp_pc_side -pc_hypre_type'
petsc_options_value = 'fgmres 300 1e-2 hypre right boomeramg'
[]
[]
[]
[Postprocessors]
[pavg]
type = ElementAverageValue
variable = p
[]
[]
[UserObjects]
[set_pressure]
type = NSPressurePin
pin_type = 'average'
variable = p
pressure_average = 'pavg'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_rel_tol = 1e-12
[]
[Outputs]
print_linear_residuals = false
[exo]
type = Exodus
execute_on = 'final'
hide = 'pavg'
[]
[]
(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/navier_stokes/test/tests/finite_element/ins/energy_source/steady-action.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[]
[Modules]
[IncompressibleNavierStokes]
equation_type = steady-state
velocity_boundary = 'bottom right top left'
velocity_function = '0 0 0 0 lid_function 0 0 0'
initial_velocity = '1e-15 1e-15 0'
add_standard_velocity_variables_for_ad = false
pressure_pinned_node = 0
density_name = rho
dynamic_viscosity_name = mu
use_ad = true
laplace = true
family = LAGRANGE
order = FIRST
add_temperature_equation = true
fixed_temperature_boundary = 'bottom top'
temperature_function = '1 0'
has_heat_source = true
heat_source_function = 1
supg = true
pspg = true
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
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
[]
[]
[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/xfem/test/tests/moving_interface/ad_phase_transition_2d.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 11
ny = 1
xmin = 0.0
xmax = 20.0
ymin = 0.0
ymax = 5.0
elem_type = QUAD4
[]
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[velocity]
type = XFEMPhaseTransitionMovingInterfaceVelocity
diffusivity_at_positive_level_set = 5
diffusivity_at_negative_level_set = 1
equilibrium_concentration_jump = 1
value_at_interface_uo = value_uo
[]
[value_uo]
type = NodeValueAtXFEMInterface
variable = 'u'
interface_mesh_cut_userobject = 'cut_mesh'
execute_on = TIMESTEP_END
level_set_var = ls
[]
[cut_mesh]
type = InterfaceMeshCut2DUserObject
mesh_file = flat_interface_1d.e
interface_velocity_uo = velocity
heal_always = true
[]
[]
[Variables]
[u]
[]
[]
[ICs]
[ic_u]
type = FunctionIC
variable = u
function = 'if(x<5.01, 2, 1)'
[]
[]
[AuxVariables]
[ls]
order = FIRST
family = LAGRANGE
[]
[]
[Constraints]
[u_constraint]
type = XFEMEqualValueAtInterface
geometric_cut_userobject = 'cut_mesh'
use_displaced_mesh = false
variable = u
value = 2
alpha = 1e6
[]
[]
[Kernels]
[diff]
type = ADMatDiffusion
variable = u
diffusivity = diffusion_coefficient
[]
[time]
type = ADTimeDerivative
variable = u
[]
[]
[AuxKernels]
[ls]
type = MeshCutLevelSetAux
mesh_cut_user_object = cut_mesh
variable = ls
execute_on = 'TIMESTEP_BEGIN'
[]
[]
[Materials]
[diffusivity_A]
type = ADGenericConstantMaterial
prop_names = A_diffusion_coefficient
prop_values = 5
[]
[diffusivity_B]
type = ADGenericConstantMaterial
prop_names = B_diffusion_coefficient
prop_values = 1
[]
[diff_combined]
type = ADLevelSetBiMaterialReal
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = diffusion_coefficient
[]
[]
[BCs]
# Define boundary conditions
[left_u]
type = ADDirichletBC
variable = u
value = 2
boundary = left
[]
[right_u]
type = ADNeumannBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
l_tol = 1e-3
nl_max_its = 15
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
start_time = 0.0
dt = 1
num_steps = 5
max_xfem_update = 1
[]
[Outputs]
file_base = phase_transition_2d_out
execute_on = timestep_end
exodus = true
perf_graph = true
[]
(modules/heat_transfer/test/tests/joule_heating/transient_jouleheating.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 5
ymax = 5
[]
[Variables]
[./T]
initial_condition = 293.0 #in K
[../]
[./elec]
[../]
[]
[Kernels]
[./HeatDiff]
type = HeatConduction
variable = T
[../]
[./HeatTdot]
type = HeatConductionTimeDerivative
variable = T
[../]
[./HeatSrc]
type = JouleHeatingSource
variable = T
elec = elec
[../]
[./electric]
type = HeatConduction
variable = elec
diffusion_coefficient = electrical_conductivity
[../]
[]
[BCs]
[./lefttemp]
type = DirichletBC
boundary = left
variable = T
value = 293 #in K
[../]
[./elec_left]
type = DirichletBC
variable = elec
boundary = left
value = 1 #in V
[../]
[./elec_right]
type = DirichletBC
variable = elec
boundary = right
value = 0
[../]
[]
[Materials]
[./k]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity'
prop_values = '397.48' #copper in W/(m K)
block = 0
[../]
[./cp]
type = GenericConstantMaterial
prop_names = 'specific_heat'
prop_values = '385.0' #copper in J/(kg K)
block = 0
[../]
[./rho]
type = GenericConstantMaterial
prop_names = 'density'
prop_values = '8920.0' #copper in kg/(m^3)
block = 0
[../]
[./sigma] #copper is default material
type = ElectricalConductivity
temperature = T
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -ksp_grmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 101 preonly ilu 1'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-10
l_tol = 1e-4
dt = 1
end_time = 5
automatic_scaling = true
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_action_stabilized_transient.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[]
[Modules]
[IncompressibleNavierStokes]
equation_type = transient
velocity_boundary = 'bottom right top left'
velocity_function = '0 0 0 0 lid_function 0 0 0'
initial_velocity = '1e-15 1e-15 0'
add_standard_velocity_variables_for_ad = false
pressure_pinned_node = 0
density_name = rho
dynamic_viscosity_name = mu
use_ad = true
laplace = true
family = LAGRANGE
order = FIRST
add_temperature_equation = true
initial_temperature = 1
fixed_temperature_boundary = 'bottom top'
temperature_function = '1 0'
supg = true
pspg = true
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
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
[]
[]
[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-13
nl_max_its = 6
[]
[Outputs]
exodus = true
[]
(test/tests/materials/get_material_property_names/get_material_property_block_names.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[./add_subdomain]
input = gen
type = SubdomainBoundingBoxGenerator
top_right = '1 1 0'
bottom_left = '0 0.5 0'
block_id = 100
block_name = 'top'
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Materials]
[./material]
type = GenericConstantMaterial
prop_names = combo
block = 100
prop_values = 12345
[../]
[./top]
type = GenericConstantMaterial
prop_names = combo
block = 0
prop_values = 99999
[../]
[]
[UserObjects]
[./get_material_block_names_test]
type = GetMaterialPropertyBoundaryBlockNamesTest
expected_names = 'top 0'
property_name = combo
test_type = 'block'
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
(modules/stochastic_tools/test/tests/surrogates/gaussian_process/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 1
elem_type = EDGE3
[]
[Variables]
[T]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = T
diffusivity = k
[]
[source]
type = BodyForce
variable = T
value = 1.0
[]
[]
[Materials]
[conductivity]
type = GenericConstantMaterial
prop_names = k
prop_values = 2.0
[]
[]
[BCs]
[right]
type = DirichletBC
variable = T
boundary = right
value = 300
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[avg]
type = AverageNodalVariableValue
variable = T
[]
[]
(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/solid_mechanics/test/tests/shell/dynamics/shell_dynamics_bending_moment_free_orientation_inclined.i)
# Test to verify the fundamental natural frequency of a one element ADComputeShellStress
# BCs: Clamped on one end, free on others.
# Initial perturbation applied to edge of the beam. After that, the shell vibrates freely.
#
# Results have been compared for various thicknesses with the following approximate Results
# (Moose results were obtained with 8 elements along the length)
# Thickness = 0.1. Reference freq: 10.785 Hz, Moose freq: 10.612 Hz
# Thickness = 0.05. Reference freq: 5.393 Hz, Moose freq: 5.335 Hz
# Thickness = 0.025. Reference freq: 2.696 Hz, Moose freq: 2.660 Hz
#
# Reference values have been obtained from Robert Blevins, "Formulas for Dynamics, Acoustics and Vibration",
# Table 5.3 case 11. Formula looks like: f = lambda^2/(2*pi*a^2) * sqrt(E*h^2/(12*(1-nu*nu))), where lambda
# changes as a function of shell dimensions.
# This test uses one single element for speed reasons.
# Here, the shell, instead of being on the XY plane, is oriented at a 45 deg. angle
# with respect to the Y axis.
[Mesh]
type = FileMesh
file = shell_inclined.e
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./rot_x]
[../]
[./rot_y]
[../]
[]
[AuxVariables]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
# aux variables for dynamics
[./vel_x]
[../]
[./vel_y]
[../]
[./vel_z]
[../]
[./accel_x]
[../]
[./accel_y]
[../]
[./accel_z]
[../]
[./rot_vel_x]
[../]
[./rot_vel_y]
[../]
[./rot_accel_x]
[../]
[./rot_accel_y]
[../]
[]
[AuxKernels]
[./stress_yy]
type = RankTwoAux
variable = stress_yy
rank_two_tensor = global_stress_t_points_0
index_i = 1
index_j = 1
[../]
[./stress_yz]
type = RankTwoAux
variable = stress_yz
rank_two_tensor = global_stress_t_points_0
index_i = 1
index_j = 2
[../]
# Kernels for dynamics
[./accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = timestep_end
[../]
[./vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = timestep_end
[../]
[./accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = timestep_end
[../]
[./vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = timestep_end
[../]
[./accel_z]
type = NewmarkAccelAux
variable = accel_z
displacement = disp_z
velocity = vel_z
beta = 0.25
execute_on = timestep_end
[../]
[./vel_z]
type = NewmarkVelAux
variable = vel_z
acceleration = accel_z
gamma = 0.5
execute_on = timestep_end
[../]
[./rot_accel_x]
type = NewmarkAccelAux
variable = rot_accel_x
displacement = rot_x
velocity = rot_vel_x
beta = 0.25
execute_on = timestep_end
[../]
[./rot_vel_x]
type = NewmarkVelAux
variable = rot_vel_x
acceleration = rot_accel_x
gamma = 0.5
execute_on = timestep_end
[../]
[./rot_accel_y]
type = NewmarkAccelAux
variable = rot_accel_y
displacement = rot_y
velocity = rot_vel_y
beta = 0.25
execute_on = timestep_end
[../]
[./rot_vel_y]
type = NewmarkVelAux
variable = rot_vel_y
acceleration = rot_accel_y
gamma = 0.5
execute_on = timestep_end
[../]
[]
[BCs]
[./fixy1]
type = DirichletBC
variable = disp_y
boundary = '0'
value = 0.0
[../]
[./fixz1]
type = DirichletBC
variable = disp_z
boundary = '0'
value = 0.0
[../]
[./fixr1]
type = DirichletBC
variable = rot_x
boundary = '0'
value = 0.0
[../]
[./fixr2]
type = DirichletBC
variable = rot_y
boundary = '0'
value = 0.0
[../]
[./fixx1]
type = DirichletBC
variable = disp_x
boundary = '0'
value = 0.0
[../]
[]
[Functions]
[./force_function]
type = PiecewiseLinear
x = '0.0 0.01 0.15 10.0'
y = '0.0 0.01 0.0 0.0'
[../]
[]
[NodalKernels]
[./force_y2]
type = UserForcingFunctionNodalKernel
variable = disp_z
boundary = '2'
function = force_function
[../]
[]
[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
[../]
[./inertial_force_x]
type = ADInertialForceShell
use_displaced_mesh = true
eta = 0.0
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y'
rotational_accelerations = 'rot_accel_x rot_accel_y'
component = 0
variable = disp_x
thickness = 0.1
[../]
[./inertial_force_y]
type = ADInertialForceShell
use_displaced_mesh = true
eta = 0.0
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y'
rotational_accelerations = 'rot_accel_x rot_accel_y'
component = 1
variable = disp_y
thickness = 0.1
[../]
[./inertial_force_z]
type = ADInertialForceShell
use_displaced_mesh = true
eta = 0.0
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y'
rotational_accelerations = 'rot_accel_x rot_accel_y'
component = 2
variable = disp_z
thickness = 0.1
[../]
[./inertial_force_rot_x]
type = ADInertialForceShell
use_displaced_mesh = true
eta = 0.0
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y'
rotational_accelerations = 'rot_accel_x rot_accel_y'
component = 3
variable = rot_x
thickness = 0.1
[../]
[./inertial_force_rot_y]
type = ADInertialForceShell
use_displaced_mesh = true
eta = 0.0
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y'
rotational_accelerations = 'rot_accel_x rot_accel_y'
component = 4
variable = rot_y
thickness = 0.1
[../]
[]
[Materials]
[./elasticity]
type = ADComputeIsotropicElasticityTensorShell
youngs_modulus = 2100000
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 = 0.1
through_thickness_order = SECOND
[../]
[./stress]
type = ADComputeShellStress
block = 0
through_thickness_order = SECOND
[../]
[./density]
type = GenericConstantMaterial
block = 0
prop_names = 'density'
prop_values = '1.0'
[../]
[]
[Postprocessors]
[./disp_z_tip]
type = PointValue
point = '0.0 1.06 1.06'
variable = disp_z
[../]
[./rot_x_tip]
type = PointValue
point = '0.0 1.06 1.06'
variable = rot_x
[../]
[./stress_yy_el_0]
type = ElementalVariableValue
elementid = 0
variable = stress_yy
[../]
[./stress_yy_el_1]
type = ElementalVariableValue
elementid = 1
variable = stress_yy
[../]
[./stress_yy_el_2]
type = ElementalVariableValue
elementid = 2
variable = stress_yy
[../]
[./stress_yy_el_3]
type = ElementalVariableValue
elementid = 3
variable = stress_yy
[../]
[./stress_yz_el_0]
type = ElementalVariableValue
elementid = 0
variable = stress_yz
[../]
[./stress_yz_el_1]
type = ElementalVariableValue
elementid = 1
variable = stress_yz
[../]
[./stress_yz_el_2]
type = ElementalVariableValue
elementid = 2
variable = stress_yz
[../]
[./stress_yz_el_3]
type = ElementalVariableValue
elementid = 3
variable = stress_yz
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
l_tol = 1e-11
nl_max_its = 15
nl_rel_tol = 1e-11
nl_abs_tol = 1e-10
l_max_its = 20
dt = 0.005
dtmin = 0.005
timestep_tolerance = 2e-13
end_time = 0.5
[./TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[../]
[]
[Outputs]
perf_graph = true
csv = true
[]
(modules/stochastic_tools/test/tests/controls/libtorch_drl_control/libtorch_drl_control.i)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 1
xmin = 0.0
xmax = 7.0
nx = 20
[]
[]
[Variables]
[temp]
initial_condition = 300
[]
[]
[Kernels]
[time]
type = CoefTimeDerivative
variable = temp
Coefficient = '${fparse 1.00630182*1.225}'
[]
[heat_conduc]
type = MatDiffusion
variable = temp
diffusivity = 'k'
[]
[]
[BCs]
[left_flux]
type = NeumannBC
value = 0.0
boundary = 'left'
variable = temp
[]
[dirichlet]
type = FunctionDirichletBC
function = temp_env
variable = temp
boundary = 'right'
[]
[]
[Functions]
[temp_env]
type = ParsedFunction
value = '15.0*sin(t/86400.0 *pi) + 273.0'
[]
[]
[Materials]
[constant]
type = GenericConstantMaterial
prop_names = 'k'
prop_values = 26.53832364
[]
[]
[Postprocessors]
[center_temp]
type = PointValue
variable = temp
point = '3.5 0.0 0.0'
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[center_temp_tend]
type = PointValue
variable = temp
point = '3.5 0.0 0.0'
execute_on = 'INITIAL TIMESTEP_END'
[]
[env_temp]
type = FunctionValuePostprocessor
function = temp_env
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[left_flux]
type = LibtorchControlValuePostprocessor
control_name = src_control
execute_on = 'INITIAL TIMESTEP_END'
[]
[log_prob_left_flux]
type = LibtorchDRLLogProbabilityPostprocessor
control_name = src_control
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Controls]
inactive = src_control_empty
[src_control]
seed = 11
type = LibtorchDRLControl
parameters = "BCs/left_flux/value"
responses = 'center_temp env_temp'
input_timesteps = 2
response_scaling_factors = '0.03 0.03'
response_shift_factors = '270 270'
action_standard_deviations = '0.1'
action_scaling_factors = 200
filename = 'mynet_control.net'
torch_script_format = false
num_neurons_per_layer = '16 6'
activation_function = 'relu'
execute_on = 'TIMESTEP_BEGIN'
[]
[src_control_empty]
type = LibtorchDRLControl
parameters = "BCs/left_flux/value"
responses = 'center_temp env_temp'
input_timesteps = 2
response_scaling_factors = '0.03 0.03'
response_shift_factors = '270 270'
action_standard_deviations = '0.1'
action_scaling_factors = 100
execute_on = 'TIMESTEP_BEGIN'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
nl_rel_tol = 1e-8
start_time = 0.0
end_time = 18000
dt = 1800.0
[]
[Outputs]
csv = true
[]
(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/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_3d/phy.conservation_ss.i)
# Testing energy conservation at steady state
P_hf = ${fparse 0.6 * sin (pi/24)}
[GlobalParams]
scaling_factor_1phase = '1 1 1e-3'
gravity_vector = '0 0 0'
[]
[Materials]
[mat]
type = ADGenericConstantMaterial
block = 'blk:0'
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '1000 10 30'
[]
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[in1]
type = InletVelocityTemperature1Phase
input = 'fch1:in'
vel = 1
T = 300
[]
[fch1]
type = FlowChannel1Phase
position = '0.15 0 0'
orientation = '0 0 1'
fp = fp
n_elems = 10
length = 1
initial_T = 300
initial_p = 1.01e5
initial_vel = 1
closures = simple_closures
A = 0.00314159
f = 0.0
[]
[out1]
type = Outlet1Phase
input = 'fch1:out'
p = 1.01e5
[]
[in2]
type = InletVelocityTemperature1Phase
input = 'fch2:in'
vel = 1
T = 350
[]
[fch2]
type = FlowChannel1Phase
position = '0 0.15 0'
orientation = '0 0 1'
fp = fp
n_elems = 10
length = 1
initial_T = 350
initial_p = 1.01e5
initial_vel = 1
closures = simple_closures
A = 0.00314159
f = 0
[]
[out2]
type = Outlet1Phase
input = 'fch2:out'
p = 1.01e5
[]
[blk]
type = HeatStructureFromFile3D
file = mesh.e
position = '0 0 0'
initial_T = 325
[]
[ht]
type = HeatTransferFromHeatStructure3D1Phase
flow_channels = 'fch1 fch2'
hs = blk
boundary = blk:rmin
Hw = 10000
P_hf = ${P_hf}
[]
[]
[Postprocessors]
[E_in1]
type = ADFlowBoundaryFlux1Phase
boundary = in1
equation = energy
execute_on = 'initial timestep_end'
[]
[E_out1]
type = ADFlowBoundaryFlux1Phase
boundary = out1
equation = energy
execute_on = 'initial timestep_end'
[]
[hf_pipe1]
type = ADHeatRateConvection1Phase
block = fch1
T_wall = T_wall
T = T
Hw = Hw
P_hf = ${P_hf}
execute_on = 'initial timestep_end'
[]
[E_diff1]
type = DifferencePostprocessor
value1 = E_in1
value2 = E_out1
execute_on = 'initial timestep_end'
[]
[E_conservation1]
type = SumPostprocessor
values = 'E_diff1 hf_pipe1'
[]
[E_in2]
type = ADFlowBoundaryFlux1Phase
boundary = in2
equation = energy
execute_on = 'initial timestep_end'
[]
[E_out2]
type = ADFlowBoundaryFlux1Phase
boundary = out2
equation = energy
execute_on = 'initial timestep_end'
[]
[hf_pipe2]
type = ADHeatRateConvection1Phase
block = fch2
T_wall = T_wall
T = T
Hw = Hw
P_hf = ${P_hf}
execute_on = 'initial timestep_end'
[]
[E_diff2]
type = DifferencePostprocessor
value1 = E_in2
value2 = E_out2
execute_on = 'initial timestep_end'
[]
[E_conservation2]
type = SumPostprocessor
values = 'E_diff2 hf_pipe2'
[]
[E_conservation_hs]
type = SumPostprocessor
values = 'hf_pipe1 hf_pipe2'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
dt = 5
end_time = 100
solve_type = NEWTON
line_search = basic
abort_on_solve_fail = true
nl_abs_tol = 1e-8
[]
[Outputs]
file_base = 'phy.conservation_ss'
[csv]
type = CSV
show = 'E_conservation1 E_conservation2 E_conservation_hs'
execute_on = 'FINAL'
[]
[]
(modules/solid_mechanics/test/tests/jacobian/poro01.i)
# tests of the poroelasticity kernel, PoroMechanicsCoupling
# in conjunction with the usual StressDivergenceTensors Kernel
[Mesh]
type = GeneratedMesh
dim = 3
[]
[GlobalParams]
block = 0
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./p]
[../]
[]
[ICs]
[./disp_x]
type = RandomIC
variable = disp_x
min = -1
max = 1
[../]
[./disp_y]
type = RandomIC
variable = disp_y
min = -1
max = 1
[../]
[./disp_z]
type = RandomIC
variable = disp_z
min = -1
max = 1
[../]
[./p]
type = RandomIC
variable = p
min = -1
max = 1
[../]
[]
[Kernels]
[./unimportant_p]
type = TimeDerivative
variable = p
[../]
[./grad_stress_x]
type = StressDivergenceTensors
displacements = 'disp_x disp_y disp_z'
variable = disp_x
component = 0
[../]
[./grad_stress_y]
type = StressDivergenceTensors
variable = disp_y
displacements = 'disp_x disp_y disp_z'
component = 1
[../]
[./grad_stress_z]
type = StressDivergenceTensors
variable = disp_z
displacements = 'disp_x disp_y disp_z'
component = 2
[../]
[./poro_x]
type = PoroMechanicsCoupling
variable = disp_x
porepressure = p
component = 0
[../]
[./poro_y]
type = PoroMechanicsCoupling
variable = disp_y
porepressure = p
component = 1
[../]
[./poro_z]
type = PoroMechanicsCoupling
variable = disp_z
porepressure = p
component = 2
[../]
[./This_is_not_poroelasticity._It_is_checking_diagonal_jacobian]
type = PoroMechanicsCoupling
variable = disp_x
porepressure = disp_x
component = 0
[../]
[./This_is_not_poroelasticity._It_is_checking_diagonal_jacobian_again]
type = PoroMechanicsCoupling
variable = disp_x
porepressure = disp_x
component = 1
[../]
[./This_is_not_poroelasticity._It_is_checking_offdiagonal_jacobian_for_disps]
type = PoroMechanicsCoupling
variable = disp_x
porepressure = disp_y
component = 2
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '1 1'
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./biot]
type = GenericConstantMaterial
prop_names = biot_coefficient
prop_values = 0.54
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000 test'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
[]
(modules/optimization/test/tests/optimizationreporter/point_loads/forward_homogeneous.i)
# DO NOT CHANGE THIS TEST
# this test is documented as an example in forceInv_pointLoads.md
# if this test is changed, the figures will need to be updated.
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmax = 1
ymax = 1.4
[]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = thermal_conductivity
[]
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = temperature
x_coord_name = 'point_source/x'
y_coord_name = 'point_source/y'
z_coord_name = 'point_source/z'
value_name = 'point_source/value'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temperature
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = temperature
boundary = right
value = 0
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 0
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 0
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-6
nl_rel_tol = 1e-8
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[VectorPostprocessors]
[point_source]
type = ConstantVectorPostprocessor
vector_names = 'x y z value'
value = '0.2 0.7 0.4;
0.2 0.56 1;
0 0 0;
-1000 120 500'
execute_on = LINEAR
[]
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
[]
[]
[Outputs]
console = false
file_base = 'forward_homo'
[]
(modules/stochastic_tools/test/tests/reporters/ActiveLearningGP/sub.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 0.13061533868990033
elem_type = EDGE3
[]
[Variables]
[T]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = T
diffusivity = k
[]
[source]
type = BodyForce
variable = T
value = 10951.864006672608
[]
[]
[Materials]
[conductivity]
type = GenericConstantMaterial
prop_names = k
prop_values = 10.320058433901163
[]
[]
[BCs]
[right]
type = DirichletBC
variable = T
boundary = right
value = 279.8173854189593
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[avg]
type = AverageNodalVariableValue
variable = T
[]
[max]
type = NodalExtremeValue
variable = T
value_type = max
[]
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Outputs]
[]
(modules/solid_mechanics/examples/coal_mining/cosserat_mc_wp_sticky.i)
# Strata deformation and fracturing around a coal mine
#
# A 2D geometry is used that simulates a transverse section of
# the coal mine. The model is actually 3D, but the "x"
# dimension is only 10m long, meshed with 1 element, and
# there is no "x" displacement. The mine is 400m deep
# and just the roof is studied (0<=z<=400). The model sits
# between 0<=y<=450. The excavation sits in 0<=y<=150. This
# is a "half model": the boundary conditions are such that
# the model simulates an excavation sitting in -150<=y<=150
# inside a model of the region -450<=y<=450. The
# excavation height is 3m (ie, the excavation lies within
# 0<=z<=3).
#
# Time is meaningless in this example
# as quasi-static solutions are sought at each timestep, but
# the number of timesteps controls the resolution of the
# process.
#
# The boundary conditions for this elastic simulation are:
# - disp_x = 0 everywhere
# - disp_y = 0 at y=0 and y=450
# - disp_z = 0 at z=0, but there is a time-dependent
# Young's modulus that simulates excavation
# - wc_x = 0 at y=0 and y=450.
# That is, rollers on the sides, free at top,
# and prescribed at bottom in the unexcavated portion.
#
# The small strain formulation is used.
#
# All stresses are measured in MPa. The initial stress is consistent with
# the weight force from density 2500 kg/m^3, ie, stress_zz = -0.025*(300-z) MPa
# where gravity = 10 m.s^-2 = 1E-5 MPa m^2/kg. The maximum and minimum
# principal horizontal stresses are assumed to be equal to 0.8*stress_zz.
#
# Material properties:
# Young's modulus = 8 GPa
# Poisson's ratio = 0.25
# Cosserat layer thickness = 1 m
# Cosserat-joint normal stiffness = large
# Cosserat-joint shear stiffness = 1 GPa
# MC cohesion = 3 MPa
# MC friction angle = 37 deg
# MC dilation angle = 8 deg
# MC tensile strength = 1 MPa
# MC compressive strength = 100 MPa, varying down to 1 MPa when tensile strain = 1
# WeakPlane cohesion = 0.1 MPa
# WeakPlane friction angle = 30 deg
# WeakPlane dilation angle = 10 deg
# WeakPlane tensile strength = 0.1 MPa
# WeakPlane compressive strength = 100 MPa softening to 1 MPa at strain = 1
#
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 1
xmin = -5
xmax = 5
nz = 40
zmin = 0
zmax = 403.003
bias_z = 1.1
ny = 30 # make this a multiple of 3, so y=150 is at a node
ymin = 0
ymax = 450
[]
[left]
type = SideSetsAroundSubdomainGenerator
block = 0
new_boundary = 11
normal = '0 -1 0'
input = generated_mesh
[]
[right]
type = SideSetsAroundSubdomainGenerator
block = 0
new_boundary = 12
normal = '0 1 0'
input = left
[]
[front]
type = SideSetsAroundSubdomainGenerator
block = 0
new_boundary = 13
normal = '-1 0 0'
input = right
[]
[back]
type = SideSetsAroundSubdomainGenerator
block = 0
new_boundary = 14
normal = '1 0 0'
input = front
[]
[top]
type = SideSetsAroundSubdomainGenerator
block = 0
new_boundary = 15
normal = '0 0 1'
input = back
[]
[bottom]
type = SideSetsAroundSubdomainGenerator
block = 0
new_boundary = 16
normal = '0 0 -1'
input = top
[]
[excav]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '-5 0 0'
top_right = '5 150 3'
input = bottom
[]
[roof]
type = SideSetsAroundSubdomainGenerator
block = 1
new_boundary = 18
normal = '0 0 1'
input = excav
[]
[]
[GlobalParams]
perform_finite_strain_rotations = false
displacements = 'disp_x disp_y disp_z'
Cosserat_rotations = 'wc_x wc_y wc_z'
[]
[Variables]
[./disp_y]
[../]
[./disp_z]
[../]
[./wc_x]
[../]
[]
[Kernels]
[./cy_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_y
component = 1
[../]
[./cz_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_z
component = 2
[../]
[./x_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_x
displacements = 'wc_x wc_y wc_z'
component = 0
base_name = couple
[../]
[./x_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_x
component = 0
[../]
[./gravity]
type = Gravity
use_displaced_mesh = false
variable = disp_z
value = -10E-6 # remember this is in MPa
[../]
[]
[AuxVariables]
[./disp_x]
[../]
[./wc_y]
[../]
[./wc_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[../]
[./stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[../]
[./stress_yx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yx
index_i = 1
index_j = 0
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[../]
[./stress_zx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zx
index_i = 2
index_j = 0
[../]
[./stress_zy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zy
index_i = 2
index_j = 1
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./mc_shear]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_internal_parameter
variable = mc_shear
[../]
[./mc_tensile]
type = MaterialStdVectorAux
index = 1
property = mc_plastic_internal_parameter
variable = mc_tensile
[../]
[./wp_shear]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_internal_parameter
variable = wp_shear
[../]
[./wp_tensile]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_internal_parameter
variable = wp_tensile
[../]
[./mc_shear_f]
type = MaterialStdVectorAux
index = 6
property = mc_plastic_yield_function
variable = mc_shear_f
[../]
[./mc_tensile_f]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_yield_function
variable = mc_tensile_f
[../]
[./wp_shear_f]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_yield_function
variable = wp_shear_f
[../]
[./wp_tensile_f]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_yield_function
variable = wp_tensile_f
[../]
[]
[BCs]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = '11 12'
value = 0.0
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = '16'
value = 0.0
[../]
[./no_wc_x]
type = DirichletBC
variable = wc_x
boundary = '11 12'
value = 0.0
[../]
[./roof]
type = StickyBC
variable = disp_z
min_value = -3.0
boundary = '18'
[../]
[]
[Functions]
[./ini_xx]
type = ParsedFunction
expression = '-0.8*2500*10E-6*(403.003-z)'
[../]
[./ini_zz]
type = ParsedFunction
expression = '-2500*10E-6*(403.003-z)'
[../]
[./excav_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax minval maxval slope'
symbol_values = '1.0 0 150.0 1E-9 1 15'
# excavation face at ymin+(ymax-ymin)*min(t/end_t,1)
# slope is the distance over which the modulus reduces from maxval to minval
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),minval,if(y<ymin+(ymax-ymin)*min(t/end_t,1)+slope,minval+(maxval-minval)*(y-(ymin+(ymax-ymin)*min(t/end_t,1)))/slope,maxval))'
[../]
[./density_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax minval maxval'
symbol_values = '1.0 0 150.0 0 2500'
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),minval,maxval)'
[../]
[]
[UserObjects]
[./mc_coh_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 2.99 # MPa
value_residual = 3.01 # MPa
rate = 1.0
[../]
[./mc_fric]
type = SolidMechanicsHardeningConstant
value = 0.65 # 37deg
[../]
[./mc_dil]
type = SolidMechanicsHardeningConstant
value = 0.15 # 8deg
[../]
[./mc_tensile_str_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 1.0 # MPa
value_residual = 1.0 # MPa
rate = 1.0
[../]
[./mc_compressive_str]
type = SolidMechanicsHardeningCubic
value_0 = 100 # Large!
value_residual = 100
internal_limit = 0.1
[../]
[./wp_coh_harden]
type = SolidMechanicsHardeningCubic
value_0 = 0.1
value_residual = 0.1
internal_limit = 10
[../]
[./wp_tan_fric]
type = SolidMechanicsHardeningConstant
value = 0.36 # 20deg
[../]
[./wp_tan_dil]
type = SolidMechanicsHardeningConstant
value = 0.18 # 10deg
[../]
[./wp_tensile_str_harden]
type = SolidMechanicsHardeningCubic
value_0 = 0.1
value_residual = 0.1
internal_limit = 10
[../]
[./wp_compressive_str_soften]
type = SolidMechanicsHardeningCubic
value_0 = 100
value_residual = 1
internal_limit = 1.0
[../]
[]
[Materials]
[./elasticity_tensor_0]
type = ComputeLayeredCosseratElasticityTensor
block = 0
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
[../]
[./elasticity_tensor_1]
type = ComputeLayeredCosseratElasticityTensor
block = 1
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
elasticity_tensor_prefactor = excav_sideways
[../]
[./strain]
type = ComputeCosseratIncrementalSmallStrain
eigenstrain_names = ini_stress
[../]
[./ini_stress]
type = ComputeEigenstrainFromInitialStress
eigenstrain_name = ini_stress
initial_stress = 'ini_xx 0 0 0 ini_xx 0 0 0 ini_zz'
[../]
[./stress_0]
# this is needed so as to correctly apply the initial stress
type = ComputeMultipleInelasticCosseratStress
block = 0
inelastic_models = 'mc wp'
cycle_models = true
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[../]
[./stress_1]
type = ComputeMultipleInelasticCosseratStress
block = 1
inelastic_models = ''
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[../]
[./mc]
type = CappedMohrCoulombCosseratStressUpdate
warn_about_precision_loss = false
host_youngs_modulus = 8E3
host_poissons_ratio = 0.25
base_name = mc
tensile_strength = mc_tensile_str_strong_harden
compressive_strength = mc_compressive_str
cohesion = mc_coh_strong_harden
friction_angle = mc_fric
dilation_angle = mc_dil
max_NR_iterations = 100000
smoothing_tol = 0.1 # MPa # Must be linked to cohesion
yield_function_tol = 1E-9 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0
[../]
[./wp]
type = CappedWeakPlaneCosseratStressUpdate
warn_about_precision_loss = false
base_name = wp
cohesion = wp_coh_harden
tan_friction_angle = wp_tan_fric
tan_dilation_angle = wp_tan_dil
tensile_strength = wp_tensile_str_harden
compressive_strength = wp_compressive_str_soften
max_NR_iterations = 10000
tip_smoother = 0.1
smoothing_tol = 0.1 # MPa # Note, this must be tied to cohesion, otherwise get no possible return at cone apex
yield_function_tol = 1E-11 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0E-3
[../]
[./density_0]
type = GenericConstantMaterial
block = 0
prop_names = density
prop_values = 2500
[../]
[./density_1]
type = GenericFunctionMaterial
block = 1
prop_names = density
prop_values = density_sideways
[../]
[]
[Postprocessors]
[./subs_max]
type = PointValue
point = '0 0 403.003'
variable = disp_z
use_displaced_mesh = false
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
line_search = bt
nl_abs_tol = 1e-8
nl_rel_tol = 1e-8
l_max_its = 30
nl_max_its = 1000
start_time = 0.0
dt = 0.01
end_time = 1.0
[]
[Outputs]
file_base = cosserat_mc_wp_sticky
time_step_interval = 1
print_linear_residuals = false
exodus = true
csv = true
console = true
[]
(modules/combined/test/tests/multiphase_mechanics/nonsplit_gradderiv_action.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 5
xmax = 10
ymax = 10
[]
[GlobalParams]
displacements = 'disp_x disp_y'
displacement_gradients = 'gxx gxy gyx gyy'
[]
[Modules]
[./PhaseField]
[./DisplacementGradients]
[../]
[../]
[]
[AuxVariables]
[./disp_x]
[./InitialCondition]
type = FunctionIC
function = '0.1*sin(2*x/10*3.14159265359)'
[../]
[../]
[./disp_y]
[./InitialCondition]
type = FunctionIC
function = '0.1*sin(1*y/10*3.14159265359)'
[../]
[../]
[]
[Variables]
[./c]
order = THIRD
family = HERMITE
initial_condition = 0
[../]
[]
[Kernels]
[./dt]
type = TimeDerivative
variable = c
[../]
[./bulk]
type = CahnHilliard
variable = c
mob_name = M
f_name = F
[../]
[./int]
type = CHInterface
variable = c
mob_name = M
kappa_name = kappa_c
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1 0.1'
[../]
[./elasticity_tensor]
type = ComputeConcentrationDependentElasticityTensor
c = c
C0_ijkl = '1.0 1.0'
C1_ijkl = '3.0 3.0'
fill_method0 = symmetric_isotropic
fill_method1 = symmetric_isotropic
[../]
[./smallstrain]
type = ComputeSmallStrain
[../]
[./linearelastic_a]
type = ComputeLinearElasticStress
[../]
[./elastic_free_energy]
type = ElasticEnergyMaterial
f_name = F
args = 'c'
derivative_order = 3
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = NEWTON
l_max_its = 30
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-7
nl_abs_tol = 1.0e-10
num_steps = 2
dt = 1
[]
[Outputs]
perf_graph = true
file_base = nonsplit_gradderiv_out
exodus = true
[]
(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'
[]
[]
(test/tests/controls/time_periods/materials/material.i)
[Mesh/gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[AuxVariables/aux]
family = MONOMIAL
[]
[AuxKernels/mat]
type = MaterialRealAux
variable = aux
property = prop
[]
[Problem]
solve = false
material_dependency_check = false
[]
[Materials]
[prop0]
type = GenericConstantMaterial
prop_names = "prop"
prop_values = "1"
[]
[prop1]
type = GenericConstantMaterial
prop_names = "prop"
prop_values = "2"
enable = false
[]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
[]
[Outputs]
csv = true
[]
[Postprocessors/avg]
type = ElementAverageValue
variable = aux
[]
[Controls/mat_control]
type = TimePeriod
enable_objects = '*/prop1'
disable_objects = '*/prop0'
start_time = 0.5
end_time = 1
execute_on = 'INITIAL TIMESTEP_END'
[]
(modules/phase_field/test/tests/MultiSmoothCircleIC/latticesmoothcircleIC_test.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 22
ny = 22
nz = 22
xmin = 0
xmax = 100
ymin = 0
ymax = 100
zmin = 0
zmax = 100
elem_type = HEX8
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./c]
type = LatticeSmoothCircleIC
variable = c
invalue = 1.0
outvalue = 0.0001
circles_per_side = '3 3 3'
pos_variation = 0.0
radius = 10.0
int_width = 12.0
radius_variation = 0.2
radius_variation_type = uniform
[../]
[]
[Kernels]
active = 'ie_c diff'
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./diff]
type = MatDiffusion
variable = c
diffusivity = D_v
[../]
[]
[BCs]
[]
[Materials]
active = 'Dv'
[./Dv]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 0.074802
[../]
[]
[Postprocessors]
active = 'bubbles'
[./bubbles]
type = FeatureFloodCount
variable = c
execute_on = 'initial timestep_end'
flood_entity_type = NODAL
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart -mat_mffd_type'
petsc_options_value = 'hypre boomeramg 101 ds'
l_max_its = 20
l_tol = 1e-4
nl_max_its = 20
nl_rel_tol = 1e-9
nl_abs_tol = 1e-11
start_time = 0.0
num_steps =1
dt = 100.0
[]
[Outputs]
exodus = true
[]
(test/tests/outputs/debug/show_material_props_debug.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
[]
[./subdomains]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0.1 0.1 0'
block_id = 1
top_right = '0.9 0.9 0'
[../]
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Materials]
[./block]
type = GenericConstantMaterial
block = '0 1'
prop_names = 'property0 property1 property2 property3 property4 property5 property6 property7 property8 property9 property10'
prop_values = '0 1 2 3 4 5 6 7 8 9 10'
[../]
[./boundary]
type = GenericConstantMaterial
prop_names = bnd_prop
boundary = top
prop_values = 12345
[../]
[./restricted]
type = GenericConstantMaterial
block = 1
prop_names = 'restricted0 restricted1'
prop_values = '10 11'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
execute_on = 'timestep_end'
[]
[Debug]
show_material_props = true
[]
(modules/chemical_reactions/test/tests/jacobian/coupled_convreact2.i)
# Test the Jacobian terms for the CoupledConvectionReactionSub Kernel using
# activity coefficients not equal to unity
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
[]
[Variables]
[./a]
order = FIRST
family = LAGRANGE
[../]
[./b]
order = FIRST
family = LAGRANGE
[../]
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./pressure]
type = RandomIC
variable = pressure
min = 1
max = 5
[../]
[./a]
type = RandomIC
variable = a
max = 1
min = 0
[../]
[./b]
type = RandomIC
variable = b
max = 1
min = 0
[../]
[]
[Kernels]
[./diff]
type = DarcyFluxPressure
variable = pressure
[../]
[./diff_b]
type = Diffusion
variable = b
[../]
[./a1conv]
type = CoupledConvectionReactionSub
variable = a
v = b
log_k = 2
weight = 1
sto_v = 2.5
sto_u = 2
p = pressure
gamma_eq = 2
gamma_u = 2.5
gamma_v = 1.5
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity'
prop_values = '1e-4 1e-4 0.2'
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
perf_graph = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
(modules/combined/test/tests/phase_field_fracture/crack2d_aniso_hist_false.i)
#This input uses PhaseField-Nonconserved Action to add phase field fracture bulk rate kernels
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 20
ymax = 0.5
[]
[./noncrack]
type = BoundingBoxNodeSetGenerator
new_boundary = noncrack
bottom_left = '0.5 0 0'
top_right = '1 0 0'
input = gen
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Modules]
[./TensorMechanics]
[./Master]
[./All]
add_variables = true
strain = SMALL
additional_generate_output = 'strain_yy stress_yy'
planar_formulation = PLANE_STRAIN
[../]
[../]
[../]
[./PhaseField]
[./Nonconserved]
[./c]
free_energy = F
kappa = kappa_op
mobility = L
[../]
[../]
[../]
[]
[Kernels]
[./solid_x]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_x
component = 0
c = c
[../]
[./solid_y]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_y
component = 1
c = c
[../]
[]
[BCs]
[./ydisp]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = 't'
[../]
[./yfix]
type = DirichletBC
variable = disp_y
boundary = noncrack
value = 0
[../]
[./xfix]
type = DirichletBC
variable = disp_x
boundary = right
value = 0
[../]
[]
[Materials]
[./pfbulkmat]
type = GenericConstantMaterial
prop_names = 'gc_prop l visco'
prop_values = '1e-3 0.05 1e-6'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '127.0 70.8 70.8 127.0 70.8 127.0 73.55 73.55 73.55'
fill_method = symmetric9
euler_angle_1 = 30
euler_angle_2 = 0
euler_angle_3 = 0
[../]
[./define_mobility]
type = ParsedMaterial
material_property_names = 'gc_prop visco'
property_name = L
expression = '1.0/(gc_prop * visco)'
[../]
[./define_kappa]
type = ParsedMaterial
material_property_names = 'gc_prop l'
property_name = kappa_op
expression = 'gc_prop * l'
[../]
[./damage_stress]
type = ComputeLinearElasticPFFractureStress
c = c
E_name = 'elastic_energy'
D_name = 'degradation'
F_name = 'local_fracture_energy'
decomposition_type = stress_spectral
[../]
[./degradation]
type = DerivativeParsedMaterial
property_name = degradation
coupled_variables = 'c'
expression = '(1.0-c)^2*(1.0 - eta) + eta'
constant_names = 'eta'
constant_expressions = '1.0e-6'
derivative_order = 2
[../]
[./local_fracture_energy]
type = DerivativeParsedMaterial
property_name = local_fracture_energy
coupled_variables = 'c'
material_property_names = 'gc_prop l'
expression = 'c^2 * gc_prop / 2 / l'
derivative_order = 2
[../]
[./fracture_driving_energy]
type = DerivativeSumMaterial
coupled_variables = c
sum_materials = 'elastic_energy local_fracture_energy'
derivative_order = 2
property_name = F
[../]
[]
[Postprocessors]
[./av_stress_yy]
type = ElementAverageValue
variable = stress_yy
[../]
[./av_strain_yy]
type = SideAverageValue
variable = disp_y
boundary = top
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_factor_mat_solving_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-8
l_tol = 1e-4
l_max_its = 100
nl_max_its = 10
dt = 2e-6
num_steps = 5
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/free_energy_material/MathEBFreeEnergy.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 25
xmax = 50
ymax = 50
elem_type = QUAD4
[]
[Variables]
[./c]
order = THIRD
family = HERMITE
[../]
[]
[ICs]
[./c]
type = SmoothCircleIC
variable = c
x1 = 25.0
y1 = 25.0
radius = 6.0
invalue = 1.0
outvalue = -0.8
int_width = 4.0
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./CHSolid]
type = CahnHilliard
variable = c
mob_name = M
f_name = F
[../]
[./CHInterface]
type = CHInterface
variable = c
kappa_name = kappa_c
mob_name = M
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./constant]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1.0 1.0'
[../]
[./free_energy]
type = MathEBFreeEnergy
property_name = F
c = c
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_max_its = 20
l_tol = 1.0e-5
nl_max_its = 40
nl_rel_tol = 5.0e-14
start_time = 0.0
num_steps = 1
dt = 2.0
[]
[Outputs]
execute_on = 'timestep_end'
[./oversample]
type = Exodus
refinements = 2
[../]
[]
(modules/phase_field/test/tests/phase_field_kernels/CoupledAllenCahn.i)
#
# Test the coupled Allen-Cahn Bulk kernel
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 12
ymax = 12
elem_type = QUAD4
[]
[Variables]
[./w]
[../]
[./eta]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 6.0
invalue = 0.9
outvalue = 0.1
int_width = 3.0
[../]
[../]
[]
[Kernels]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[./ACBulk]
type = CoupledAllenCahn
variable = w
v = eta
f_name = F
[../]
[./W]
type = Reaction
variable = w
[../]
[./CoupledBulk]
type = MatReaction
variable = eta
v = w
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = 1
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'L'
prop_values = '1'
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'eta'
expression = '2 * eta^2 * (1-eta)^2 - 0.2*eta'
derivative_order = 2
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
l_max_its = 15
l_tol = 1.0e-4
nl_max_its = 10
nl_rel_tol = 1.0e-11
start_time = 0.0
num_steps = 2
dt = 0.5
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
hide = w
file_base = AllenCahn_out
exodus = true
[]
(modules/phase_field/test/tests/rigidbodymotion/grain_motion_fauxGT.i)
# test file for showing reaction forces between particles
[GlobalParams]
var_name_base = eta
op_num = 2
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 5
nz = 0
xmax = 50
ymax = 25
zmax = 0
elem_type = QUAD4
uniform_refine = 1
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[./eta0]
[../]
[./eta1]
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
coupled_variables = 'eta0 eta1'
w = w
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./motion]
type = MultiGrainRigidBodyMotion
variable = w
c = c
v = 'eta0 eta1'
grain_force = grain_force
grain_tracker_object = grain_center
grain_volumes = grain_volumes
[../]
[./eta0_dot]
type = TimeDerivative
variable = eta0
[../]
[./vadv_eta]
type = SingleGrainRigidBodyMotion
variable = eta0
c = c
v = 'eta0 eta1'
grain_force = grain_force
grain_tracker_object = grain_center
grain_volumes = grain_volumes
op_index = 0
[../]
[./acint_eta0]
type = ACInterface
variable = eta0
mob_name = M
#coupled_variables = c
kappa_name = kappa_eta
[../]
[./acbulk_eta0]
type = AllenCahn
variable = eta0
mob_name = M
f_name = F
coupled_variables = 'c eta1'
[../]
[./eta1_dot]
type = TimeDerivative
variable = eta1
[../]
[./vadv_eta1]
type = SingleGrainRigidBodyMotion
variable = eta1
c = c
v = 'eta0 eta1'
op_index = 1
grain_force = grain_force
grain_tracker_object = grain_center
grain_volumes = grain_volumes
[../]
[./acint_eta1]
type = ACInterface
variable = eta1
mob_name = M
#coupled_variables = c
kappa_name = kappa_eta
[../]
[./acbulk_eta1]
type = AllenCahn
variable = eta1
mob_name = M
f_name = F
coupled_variables = 'c eta0'
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c kappa_eta'
prop_values = '1.0 0.5 0.5'
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'c eta0 eta1'
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 1.0e-2'
expression = 16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2+eta0*(1-eta0)*c+eta1*(1-eta1)*c
derivative_order = 2
[../]
[./force_density]
type = ForceDensityMaterial
c = c
etas ='eta0 eta1'
[../]
[]
[AuxVariables]
[./bnds]
[../]
[./df00]
order = CONSTANT
family = MONOMIAL
[../]
[./df01]
order = CONSTANT
family = MONOMIAL
[../]
[./df10]
order = CONSTANT
family = MONOMIAL
[../]
[./df11]
order = CONSTANT
family = MONOMIAL
[../]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./var_indices]
order = CONSTANT
family = MONOMIAL
[../]
[./centroids]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./bnds]
type = BndsCalcAux
variable = bnds
var_name_base = eta
op_num = 2
v = 'eta0 eta1'
[../]
[./df01]
type = MaterialStdVectorRealGradientAux
variable = df01
index = 0
component = 1
property = force_density
[../]
[./df11]
type = MaterialStdVectorRealGradientAux
variable = df11
index = 1
component = 1
property = force_density
[../]
[./df00]
type = MaterialStdVectorRealGradientAux
variable = df00
index = 0
component = 0
property = force_density
[../]
[./df10]
type = MaterialStdVectorRealGradientAux
variable = df10
index = 1
component = 0
property = force_density
[../]
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
flood_counter = grain_center
field_display = UNIQUE_REGION
execute_on = 'initial timestep_end'
[../]
[./var_indices]
type = FeatureFloodCountAux
variable = var_indices
flood_counter = grain_center
field_display = VARIABLE_COLORING
execute_on = 'initial timestep_end'
[../]
[./centroids]
type = FeatureFloodCountAux
variable = centroids
execute_on = 'initial timestep_end'
field_display = CENTROID
flood_counter = grain_center
[../]
[]
[ICs]
[./ic_eta0]
int_width = 1.0
x1 = 20.0
y1 = 0.0
radius = 14.0
outvalue = 0.0
variable = eta0
invalue = 1.0
type = SmoothCircleIC
[../]
[./IC_eta1]
int_width = 1.0
x1 = 30.0
y1 = 25.0
radius = 14.0
outvalue = 0.0
variable = eta1
invalue = 1.0
type = SmoothCircleIC
[../]
[./ic_c]
type = SpecifiedSmoothCircleIC
invalue = 1.0
outvalue = 0.1
int_width = 1.0
x_positions = '20.0 30.0 '
z_positions = '0.0 0.0 '
y_positions = '0.0 25.0 '
radii = '14.0 14.0'
3D_spheres = false
variable = c
block = 0
[../]
[]
[VectorPostprocessors]
[./forces]
type = GrainForcesPostprocessor
grain_force = grain_force
[../]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_center
execute_on = 'initial timestep_begin'
[../]
[]
[UserObjects]
[./grain_center]
type = FauxGrainTracker
outputs = none
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
variable = 'eta0 eta1'
[../]
[./grain_force]
type = ComputeGrainForceAndTorque
execute_on = 'linear nonlinear'
grain_data = grain_center
force_density = force_density
c = c
etas = 'eta0 eta1'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
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
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 1
dt = 0.1
[]
[Outputs]
exodus = true
csv = true
[]
(modules/heat_transfer/test/tests/code_verification/cartesian_test_no5.i)
# Problem I.5
#
# The volumetric heat generation in an infinite plate varies linearly
# with spatial location. It has constant thermal conductivity.
# It is insulated on the left boundary and exposed to a
# constant temperature on the right.
#
# REFERENCE:
# A. Toptan, et al. (Mar.2020). Tech. rep. CASL-U-2020-1939-000, SAND2020-3887 R. DOI:10.2172/1614683.
[Mesh]
[./geom]
type = GeneratedMeshGenerator
dim = 1
elem_type = EDGE2
nx = 1
[../]
[]
[Variables]
[./u]
order = FIRST
[../]
[]
[Functions]
[./volumetric_heat]
type = ParsedFunction
symbol_names = 'q L beta'
symbol_values = '1200 1 0.1'
expression = 'q * (1-beta*x/L)'
[../]
[./exact]
type = ParsedFunction
symbol_names = 'uo q k L beta'
symbol_values = '300 1200 1 1 0.1'
expression = 'uo + (0.5*q*L^2/k) * ( (1-(x/L)^2) - (1-(x/L)^3) * beta/3 )'
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = u
[../]
[./heatsource]
type = HeatSource
function = volumetric_heat
variable = u
[../]
[]
[BCs]
[./uo]
type = DirichletBC
boundary = right
variable = u
value = 300
[../]
[]
[Materials]
[./property]
type = GenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '1.0 1.0 1.0'
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = exact
variable = u
[../]
[./h]
type = AverageElementSize
[]
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/examples/coal_mining/coarse.i)
# Strata deformation and fracturing around a coal mine - 3D model
#
# A "half model" is used. The mine is 400m deep and
# just the roof is studied (-400<=z<=0). The mining panel
# sits between 0<=x<=150, and 0<=y<=1000, so this simulates
# a coal panel that is 300m wide and 1000m long. The outer boundaries
# are 1km from the excavation boundaries.
#
# Time is meaningless in this example
# as quasi-static solutions are sought at each timestep, but
# the number of timesteps controls the resolution of the
# process.
#
# The boundary conditions for this simulation are:
# - disp_x = 0 at x=0 and x=1150
# - disp_y = 0 at y=-1000 and y=1000
# - disp_z = 0 at z=-400, but there is a time-dependent
# Young's modulus that simulates excavation
# - wc_x = 0 at y=-1000 and y=1000
# - wc_y = 0 at x=0 and x=1150
# That is, rollers on the sides, free at top,
# and prescribed at bottom in the unexcavated portion.
#
# The small strain formulation is used.
#
# All stresses are measured in MPa. The initial stress is consistent with
# the weight force from density 2500 kg/m^3, ie, stress_zz = 0.025*z MPa
# where gravity = 10 m.s^-2 = 1E-5 MPa m^2/kg. The maximum and minimum
# principal horizontal stresses are assumed to be equal to 0.8*stress_zz.
#
# Material properties:
# Young's modulus = 8 GPa
# Poisson's ratio = 0.25
# Cosserat layer thickness = 1 m
# Cosserat-joint normal stiffness = large
# Cosserat-joint shear stiffness = 1 GPa
# MC cohesion = 3 MPa
# MC friction angle = 37 deg
# MC dilation angle = 8 deg
# MC tensile strength = 1 MPa
# MC compressive strength = 100 MPa
# WeakPlane cohesion = 0.1 MPa
# WeakPlane friction angle = 30 deg
# WeakPlane dilation angle = 10 deg
# WeakPlane tensile strength = 0.1 MPa
# WeakPlane compressive strength = 100 MPa softening to 1 MPa at strain = 1
#
[Mesh]
[file]
type = FileMeshGenerator
file = mesh/coarse.e
[]
[./xmin]
input = file
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
new_boundary = xmin
normal = '-1 0 0'
[../]
[./xmax]
input = xmin
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
new_boundary = xmax
normal = '1 0 0'
[../]
[./ymin]
input = xmax
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
new_boundary = ymin
normal = '0 -1 0'
[../]
[./ymax]
input = ymin
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
new_boundary = ymax
normal = '0 1 0'
[../]
[./zmax]
input = ymax
type = SideSetsAroundSubdomainGenerator
block = 16
new_boundary = zmax
normal = '0 0 1'
[../]
[./zmin]
input = zmax
type = SideSetsAroundSubdomainGenerator
block = 2
new_boundary = zmin
normal = '0 0 -1'
[../]
[./excav]
type = SubdomainBoundingBoxGenerator
input = zmin
block_id = 1
bottom_left = '0 0 -400'
top_right = '150 1000 -397'
[../]
[./roof]
type = SideSetsAroundSubdomainGenerator
block = 1
input = excav
new_boundary = roof
normal = '0 0 1'
[../]
[]
[GlobalParams]
perform_finite_strain_rotations = false
displacements = 'disp_x disp_y disp_z'
Cosserat_rotations = 'wc_x wc_y wc_z'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./wc_x]
[../]
[./wc_y]
[../]
[]
[Kernels]
[./cx_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_x
component = 0
[../]
[./cy_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_y
component = 1
[../]
[./cz_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_z
component = 2
[../]
[./x_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_x
displacements = 'wc_x wc_y wc_z'
component = 0
base_name = couple
[../]
[./y_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_y
displacements = 'wc_x wc_y wc_z'
component = 1
base_name = couple
[../]
[./x_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_x
component = 0
[../]
[./y_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_y
component = 1
[../]
[./gravity]
type = Gravity
use_displaced_mesh = false
variable = disp_z
value = -10E-6 # remember this is in MPa
[../]
[]
[AuxVariables]
[./wc_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[../]
[./stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[../]
[./stress_yx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yx
index_i = 1
index_j = 0
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[../]
[./stress_zx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zx
index_i = 2
index_j = 0
[../]
[./stress_zy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zy
index_i = 2
index_j = 1
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./mc_shear]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_internal_parameter
variable = mc_shear
[../]
[./mc_tensile]
type = MaterialStdVectorAux
index = 1
property = mc_plastic_internal_parameter
variable = mc_tensile
[../]
[./wp_shear]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_internal_parameter
variable = wp_shear
[../]
[./wp_tensile]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_internal_parameter
variable = wp_tensile
[../]
[./mc_shear_f]
type = MaterialStdVectorAux
index = 6
property = mc_plastic_yield_function
variable = mc_shear_f
[../]
[./mc_tensile_f]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_yield_function
variable = mc_tensile_f
[../]
[./wp_shear_f]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_yield_function
variable = wp_shear_f
[../]
[./wp_tensile_f]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_yield_function
variable = wp_tensile_f
[../]
[]
[BCs]
[./no_x]
type = DirichletBC
variable = disp_x
boundary = 'xmin xmax'
value = 0.0
[../]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = 'ymin ymax'
value = 0.0
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = zmin
value = 0.0
[../]
[./no_wc_x]
type = DirichletBC
variable = wc_x
boundary = 'ymin ymax'
value = 0.0
[../]
[./no_wc_y]
type = DirichletBC
variable = wc_y
boundary = 'xmin xmax'
value = 0.0
[../]
[./roof]
type = StickyBC
variable = disp_z
min_value = -3.0
boundary = roof
[../]
[]
[Functions]
[./ini_xx]
type = ParsedFunction
expression = '0.8*2500*10E-6*z'
[../]
[./ini_zz]
type = ParsedFunction
expression = '2500*10E-6*z'
[../]
[./excav_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax minval maxval slope'
symbol_values = '17.0 0 1000.0 1E-9 1 60'
# excavation face at ymin+(ymax-ymin)*min(t/end_t,1)
# slope is the distance over which the modulus reduces from maxval to minval
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),minval,if(y<ymin+(ymax-ymin)*min(t/end_t,1)+slope,minval+(maxval-minval)*(y-(ymin+(ymax-ymin)*min(t/end_t,1)))/slope,maxval))'
[../]
[./density_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax minval maxval'
symbol_values = '17.0 0 1000.0 0 2500'
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),minval,maxval)'
[../]
[]
[UserObjects]
[./mc_coh_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 2.99 # MPa
value_residual = 3.01 # MPa
rate = 1.0
[../]
[./mc_fric]
type = SolidMechanicsHardeningConstant
value = 0.65 # 37deg
[../]
[./mc_dil]
type = SolidMechanicsHardeningConstant
value = 0.15 # 8deg
[../]
[./mc_tensile_str_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 1.0 # MPa
value_residual = 1.0 # MPa
rate = 1.0
[../]
[./mc_compressive_str]
type = SolidMechanicsHardeningCubic
value_0 = 100 # Large!
value_residual = 100
internal_limit = 0.1
[../]
[./wp_coh_harden]
type = SolidMechanicsHardeningCubic
value_0 = 0.1
value_residual = 0.1
internal_limit = 10
[../]
[./wp_tan_fric]
type = SolidMechanicsHardeningConstant
value = 0.36 # 20deg
[../]
[./wp_tan_dil]
type = SolidMechanicsHardeningConstant
value = 0.18 # 10deg
[../]
[./wp_tensile_str_harden]
type = SolidMechanicsHardeningCubic
value_0 = 0.1
value_residual = 0.1
internal_limit = 10
[../]
[./wp_compressive_str_soften]
type = SolidMechanicsHardeningCubic
value_0 = 100
value_residual = 1
internal_limit = 1.0
[../]
[]
[Materials]
[./elasticity_tensor_0]
type = ComputeLayeredCosseratElasticityTensor
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
[../]
[./elasticity_tensor_1]
type = ComputeLayeredCosseratElasticityTensor
block = 1
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
elasticity_tensor_prefactor = excav_sideways
[../]
[./strain]
type = ComputeCosseratIncrementalSmallStrain
eigenstrain_names = ini_stress
[../]
[./ini_stress]
type = ComputeEigenstrainFromInitialStress
eigenstrain_name = ini_stress
initial_stress = 'ini_xx 0 0 0 ini_xx 0 0 0 ini_zz'
[../]
[./stress_0]
type = ComputeMultipleInelasticCosseratStress
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
inelastic_models = 'mc wp'
cycle_models = true
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[../]
[./stress_1]
type = ComputeMultipleInelasticCosseratStress
block = 1
inelastic_models = ''
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[../]
[./mc]
type = CappedMohrCoulombCosseratStressUpdate
warn_about_precision_loss = false
host_youngs_modulus = 8E3
host_poissons_ratio = 0.25
base_name = mc
tensile_strength = mc_tensile_str_strong_harden
compressive_strength = mc_compressive_str
cohesion = mc_coh_strong_harden
friction_angle = mc_fric
dilation_angle = mc_dil
max_NR_iterations = 100000
smoothing_tol = 0.1 # MPa # Must be linked to cohesion
yield_function_tol = 1E-9 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0
[../]
[./wp]
type = CappedWeakPlaneCosseratStressUpdate
warn_about_precision_loss = false
base_name = wp
cohesion = wp_coh_harden
tan_friction_angle = wp_tan_fric
tan_dilation_angle = wp_tan_dil
tensile_strength = wp_tensile_str_harden
compressive_strength = wp_compressive_str_soften
max_NR_iterations = 10000
tip_smoother = 0.1
smoothing_tol = 0.1 # MPa # Note, this must be tied to cohesion, otherwise get no possible return at cone apex
yield_function_tol = 1E-11 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0E-3
[../]
[./density_0]
type = GenericConstantMaterial
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16'
prop_names = density
prop_values = 2500
[../]
[./density_1]
type = GenericFunctionMaterial
block = 1
prop_names = density
prop_values = density_sideways
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[]
[]
[Postprocessors]
[./min_roof_disp]
type = NodalExtremeValue
boundary = roof
value_type = min
variable = disp_z
[../]
[./min_surface_disp]
type = NodalExtremeValue
boundary = zmax
value_type = min
variable = disp_z
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' bjacobi gmres 200'
line_search = bt
nl_abs_tol = 1e-3
nl_rel_tol = 1e-5
l_max_its = 30
nl_max_its = 1000
start_time = 0.0
dt = 0.5 # this gives min(disp_z)=-4.3, use dt=0.0625 if you want to restrict disp_z>=-3.2
end_time = 17.0
[]
[Outputs]
time_step_interval = 1
print_linear_residuals = false
exodus = true
csv = true
console = true
[]
(modules/functional_expansion_tools/examples/3D_volumetric_cylindrical/main.i)
# Basic example coupling a master and sub app in a 3D cylindrical mesh from an input file
#
# The master app provides field values to the sub app via Functional Expansions, which then performs
# its calculations. The sub app's solution field values are then transferred back to the master app
# and coupled into the solution of the master app solution.
#
# This example couples Functional Expansions via AuxVariable, the recommended approach.
#
# Note: this problem is not light, and may take a few minutes to solve.
[Mesh]
type = FileMesh
file = cyl-tet.e
[]
[Variables]
[./m]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./s_in]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_m]
type = HeatConduction
variable = m
[../]
[./time_diff_m]
type = HeatConductionTimeDerivative
variable = m
[../]
[./s_in] # Add in the contribution from the SubApp
type = CoupledForce
variable = m
v = s_in
[../]
[]
[AuxKernels]
[./reconstruct_s_in]
type = FunctionSeriesToAux
variable = s_in
function = FX_Basis_Value_Main
[../]
[]
[Materials]
[./Unobtanium]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0' # W/(cm K), J/(g K), g/cm^3
[../]
[]
[ICs]
[./start_m]
type = ConstantIC
variable = m
value = 1
[../]
[]
[BCs]
[./surround]
type = DirichletBC
variable = m
value = 1
boundary = 'top bottom outside'
[../]
[]
[Functions]
[./FX_Basis_Value_Main]
type = FunctionSeries
series_type = CylindricalDuo
orders = '5 3' # Axial first, then (r, t) FX
physical_bounds = '-2.5 2.5 0 0 1' # z_min z_max x_center y_center radius
z = Legendre # Axial in z
disc = Zernike # (r, t) default to unit disc in x-y plane
[../]
[]
[UserObjects]
[./FX_Value_UserObject_Main]
type = FXVolumeUserObject
function = FX_Basis_Value_Main
variable = m
[../]
[]
[Postprocessors]
[./average_value]
type = ElementAverageValue
variable = m
[../]
[./peak_value]
type = ElementExtremeValue
value_type = max
variable = m
[../]
[./picard_iterations]
type = NumFixedPointIterations
[../]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
fixed_point_max_its = 30
nl_rel_tol = 1e-8
nl_abs_tol = 1e-9
fixed_point_rel_tol = 1e-8
fixed_point_abs_tol = 1e-9
[]
[Outputs]
exodus = true
[]
[MultiApps]
[./FXTransferApp]
type = TransientMultiApp
input_files = sub.i
[../]
[]
[Transfers]
[./ValueToSub]
type = MultiAppFXTransfer
to_multi_app = FXTransferApp
this_app_object_name = FX_Value_UserObject_Main
multi_app_object_name = FX_Basis_Value_Sub
[../]
[./ValueToMe]
type = MultiAppFXTransfer
from_multi_app = FXTransferApp
this_app_object_name = FX_Basis_Value_Main
multi_app_object_name = FX_Value_UserObject_Sub
[../]
[]
(modules/phase_field/test/tests/rigidbodymotion/update_orientation.i)
# test file for applyting advection term and observing rigid body motion of grains
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 15
nz = 0
xmax = 50
ymax = 25
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[./eta]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
coupled_variables = eta
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./motion]
type = MultiGrainRigidBodyMotion
variable = w
c = c
v = eta
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
[../]
[./eta_dot]
type = TimeDerivative
variable = eta
[../]
[./vadv_eta]
type = SingleGrainRigidBodyMotion
variable = eta
c = c
v = eta
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
[../]
[./acint_eta]
type = ACInterface
variable = eta
mob_name = M
coupled_variables = c
kappa_name = kappa_eta
[../]
[./acbulk_eta]
type = AllenCahn
variable = eta
mob_name = M
f_name = F
coupled_variables = c
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c kappa_eta'
prop_values = '5.0 2.0 0.1'
[../]
[./free_energy]
type = DerivativeParsedMaterial
coupled_variables = 'c eta'
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 1.0e-2'
expression = 16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2+(c-eta)^2
derivative_order = 2
[../]
[]
[AuxVariables]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./var_indices]
order = CONSTANT
family = MONOMIAL
[../]
[./centroids]
order = CONSTANT
family = MONOMIAL
[../]
[./vadv_x]
order = CONSTANT
family = MONOMIAL
[../]
[./vadv_y]
order = CONSTANT
family = MONOMIAL
[../]
[./angle_initial]
order = CONSTANT
family = MONOMIAL
[../]
[./euler_angle]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
flood_counter = grain_center
field_display = UNIQUE_REGION
execute_on = timestep_begin
[../]
[./var_indices]
type = FeatureFloodCountAux
variable = var_indices
flood_counter = grain_center
field_display = VARIABLE_COLORING
execute_on = timestep_begin
[../]
[./centroids]
type = FeatureFloodCountAux
variable = centroids
execute_on = timestep_begin
field_display = CENTROID
flood_counter = grain_center
[../]
[./vadv_x]
type = GrainAdvectionAux
grain_force = grain_force
grain_volumes = grain_volumes
grain_tracker_object = grain_center
execute_on = timestep_begin
component = x
variable = vadv_x
[../]
[./vadv_y]
type = GrainAdvectionAux
grain_force = grain_force
grain_volumes = grain_volumes
grain_tracker_object = grain_center
execute_on = timestep_begin
component = y
variable = vadv_y
[../]
[./angle_initial]
type = OutputEulerAngles
variable = angle_initial
euler_angle_provider = euler_angle_initial
grain_tracker = grain_center
output_euler_angle = phi2
execute_on = timestep_begin
[../]
[./angle]
type = OutputEulerAngles
variable = euler_angle
euler_angle_provider = euler_angle
grain_tracker = grain_center
output_euler_angle = phi2
execute_on = timestep_begin
[../]
[]
[VectorPostprocessors]
[./forces]
type = GrainForcesPostprocessor
grain_force = grain_force
[../]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_center
execute_on = 'initial timestep_begin'
[../]
[]
[UserObjects]
[./grain_center]
type = GrainTracker
variable = eta
outputs = none
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
[../]
[./grain_force]
type = ConstantGrainForceAndTorque
execute_on = 'initial timestep_begin linear nonlinear'
force = '0.5 0.0 0.0 '
torque = '0.0 0.0 10.0'
[../]
[./euler_angle_initial]
type = RandomEulerAngleProvider
grain_tracker_object = grain_center
execute_on = 'initial timestep_begin'
[../]
[./euler_angle]
type = EulerAngleUpdater
grain_tracker_object = grain_center
euler_angle_provider = euler_angle_initial
grain_torques_object = grain_force
grain_volumes = grain_volumes
execute_on = timestep_begin
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
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'
nl_max_its = 30
l_max_its = 30
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
dt = 0.2
num_steps = 5
[]
[Outputs]
exodus = true
[]
[ICs]
[./rect_c]
y2 = 20.0
y1 = 5.0
inside = 1.0
x2 = 30.0
variable = c
x1 = 10.0
type = BoundingBoxIC
[../]
[./rect_eta]
y2 = 20.0
y1 = 5.0
inside = 1.0
x2 = 30.0
variable = eta
x1 = 10.0
type = BoundingBoxIC
[../]
[]
(modules/phase_field/examples/kim-kim-suzuki/kks_example_dirichlet.i)
#
# KKS simple example in the split form
#
[Mesh]
type = GeneratedMesh
dim = 2
elem_type = QUAD4
nx = 50
ny = 2
nz = 0
xmin = 0
xmax = 20
ymin = 0
ymax = 0.4
zmin = 0
zmax = 0
[]
[AuxVariables]
[./Fglobal]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Variables]
# order parameter
[./eta]
order = FIRST
family = LAGRANGE
[../]
# hydrogen concentration
[./c]
order = FIRST
family = LAGRANGE
[../]
# chemical potential
[./w]
order = FIRST
family = LAGRANGE
[../]
# Liquid phase solute concentration
[./cl]
order = FIRST
family = LAGRANGE
initial_condition = 0.1
[../]
# Solid phase solute concentration
[./cs]
order = FIRST
family = LAGRANGE
initial_condition = 0.9
[../]
[]
[Functions]
[./ic_func_eta]
type = ParsedFunction
expression = 0.5*(1.0-tanh((x)/sqrt(2.0)))
[../]
[./ic_func_c]
type = ParsedFunction
expression = '0.9*(0.5*(1.0-tanh(x/sqrt(2.0))))^3*(6*(0.5*(1.0-tanh(x/sqrt(2.0))))^2-15*(0.5*(1.0-tanh(x/sqrt(2.0))))+10)+0.1*(1-(0.5*(1.0-tanh(x/sqrt(2.0))))^3*(6*(0.5*(1.0-tanh(x/sqrt(2.0))))^2-15*(0.5*(1.0-tanh(x/sqrt(2.0))))+10))'
[../]
[]
[ICs]
[./eta]
variable = eta
type = FunctionIC
function = ic_func_eta
[../]
[./c]
variable = c
type = FunctionIC
function = ic_func_c
[../]
[]
[BCs]
[./left_c]
type = DirichletBC
variable = 'c'
boundary = 'left'
value = 0.5
[../]
[./left_eta]
type = DirichletBC
variable = 'eta'
boundary = 'left'
value = 0.5
[../]
[]
[Materials]
# Free energy of the liquid
[./fl]
type = DerivativeParsedMaterial
property_name = fl
coupled_variables = 'cl'
expression = '(0.1-cl)^2'
[../]
# Free energy of the solid
[./fs]
type = DerivativeParsedMaterial
property_name = fs
coupled_variables = 'cs'
expression = '(0.9-cs)^2'
[../]
# h(eta)
[./h_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta
[../]
# g(eta)
[./g_eta]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta
[../]
# constant properties
[./constants]
type = GenericConstantMaterial
prop_names = 'M L eps_sq'
prop_values = '0.7 0.7 1.0 '
[../]
[]
[Kernels]
# enforce c = (1-h(eta))*cl + h(eta)*cs
[./PhaseConc]
type = KKSPhaseConcentration
ca = cl
variable = cs
c = c
eta = eta
[../]
# enforce pointwise equality of chemical potentials
[./ChemPotSolute]
type = KKSPhaseChemicalPotential
variable = cl
cb = cs
fa_name = fl
fb_name = fs
[../]
#
# Cahn-Hilliard Equation
#
[./CHBulk]
type = KKSSplitCHCRes
variable = c
ca = cl
fa_name = fl
w = w
[../]
[./dcdt]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./ckernel]
type = SplitCHWRes
mob_name = M
variable = w
[../]
#
# Allen-Cahn Equation
#
[./ACBulkF]
type = KKSACBulkF
variable = eta
fa_name = fl
fb_name = fs
w = 1.0
coupled_variables = 'cl cs'
[../]
[./ACBulkC]
type = KKSACBulkC
variable = eta
ca = cl
cb = cs
fa_name = fl
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = eps_sq
[../]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[]
[AuxKernels]
[./GlobalFreeEnergy]
variable = Fglobal
type = KKSGlobalFreeEnergy
fa_name = fl
fb_name = fs
w = 1.0
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm ilu nonzero'
l_max_its = 100
nl_max_its = 100
nl_abs_tol = 1e-10
end_time = 800
dt = 4.0
[]
#
# Precondition using handcoded off-diagonal terms
#
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[Postprocessors]
[./dofs]
type = NumDOFs
[../]
[./integral]
type = ElementL2Error
variable = eta
function = ic_func_eta
[../]
[]
[Outputs]
exodus = true
console = true
gnuplot = true
[]
(test/tests/materials/boundary_material/bnd_coupling_vol.i)
#
# Coupling volumetric material property inside boundary restricted material
# Also bringing boundary restricted material inside another boundary restricted
# material
#
# Solving: k \Laplace u + u - f = 0
#
# u = x^2 + y^2
# k = 3, but is decomposed as k3vol = k1vol + k2vol, where k1vol = 1 and k2vol = 2
#
# Boundary material property is computed as k3bnd = k1vol + k2bnd
#
# The material properties with suffix `vol` are volumetric, the ones with suffix `bnd`
# are boundary restricted
#
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 4
ny = 4
elem_type = QUAD9
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = x*x+y*y
[../]
[./f_fn]
type = ParsedFunction
expression = -4*3+x*x+y*y
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = SECOND
[../]
[]
[Kernels]
[./diff]
type = DiffMKernel
variable = u
offset = 0
mat_prop = k3vol
[../]
[./r]
type = Reaction
variable = u
[../]
[./ffn]
type = BodyForce
variable = u
function = f_fn
[../]
[]
[BCs]
[./all]
type = MatDivergenceBC
variable = u
prop_name = k3bnd
boundary = 'left right top bottom'
[../]
[]
[Materials]
[./k1vol]
type = GenericConstantMaterial
prop_names = 'k1vol'
prop_values = 1
block = 0
[../]
[./k2vol]
type = GenericConstantMaterial
prop_names = 'k2vol'
prop_values = 2
block = 0
[../]
[./k2bnd]
type = GenericConstantMaterial
prop_names = 'k2bnd'
prop_values = 2
boundary = 'left right top bottom'
[../]
[./k3vol]
type = SumMaterial
sum_prop_name = k3vol
mp1 = k1vol
mp2 = k2vol
block = 0
val1 = 1
val2 = 2
[../]
[./k3bnd]
type = SumMaterial
sum_prop_name = 'k3bnd'
mp1 = k1vol
mp2 = k2bnd
boundary = 'left right top bottom'
val1 = 1
val2 = 2
[../]
[]
[Postprocessors]
[./l2err]
type = ElementL2Error
variable = u
function = exact_fn
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/phase_field/test/tests/anisotropic_mobility/nonsplit.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
xmax = 15.0
ymax = 15.0
[]
[Variables]
[./c]
order = THIRD
family = HERMITE
[./InitialCondition]
type = CrossIC
x1 = 0.0
x2 = 30.0
y1 = 0.0
y2 = 30.0
[../]
[../]
[]
[Kernels]
[./cres]
type = CahnHilliardAniso
variable = c
mob_name = M
f_name = F
[../]
[./int]
type = CHInterfaceAniso
variable = c
kappa_name = kappa_c
mob_name = M
[../]
[./time]
type = TimeDerivative
variable = c
[../]
[]
[Materials]
[./kappa]
type = GenericConstantMaterial
prop_names = 'kappa_c'
prop_values = '2.0'
[../]
[./mob]
type = ConstantAnisotropicMobility
tensor = '0.1 0 0
0 1 0
0 0 0'
M_name = M
[../]
[./free_energy]
type = MathEBFreeEnergy
property_name = F
c = c
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'BDF2'
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 lu 1'
l_max_its = 30
l_tol = 1.0e-4
nl_max_its = 50
nl_rel_tol = 1.0e-10
dt = 10.0
num_steps = 2
[]
[Outputs]
exodus = true
print_linear_residuals = true
perf_graph = true
[]
(modules/optimization/test/tests/optimizationreporter/bc_load_linearFunction/forward.i)
[Mesh]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = temperature
diffusivity = thermal_conductivity
[]
[]
[BCs]
[left]
type = FunctionNeumannBC
variable = temperature
boundary = left
function = left_function
[]
[right]
type = FunctionNeumannBC
variable = temperature
boundary = right
function = right_function
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 200
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 100
[]
[]
[Functions]
[left_function]
type = ParsedOptimizationFunction
expression = 'a + b*y'
param_symbol_names = 'a b'
param_vector_name = 'params_left/vals'
[]
[right_function]
type = ParsedOptimizationFunction
expression = 'a'
param_symbol_names = 'a'
param_vector_name = 'params_right/vals'
[]
[]
[Materials]
[steel]
type = GenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
line_search = none
nl_abs_tol = 1e-8
nl_rel_tol = 1e-8
petsc_options_iname = '-ksp_type -pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'preonly lu superlu_dist'
[]
[VectorPostprocessors]
[vertical_1]
type = LineValueSampler
variable = 'temperature'
start_point = '0.2 0.0 0'
end_point = '0.2 2.0 0'
num_points = 21
sort_by = y
[]
[vertical_2]
type = LineValueSampler
variable = 'temperature'
start_point = '0.8 0.0 0'
end_point = '0.8 2.0 0'
num_points = 21
sort_by = y
[]
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
variable_weight_names = weightForTemperature
[]
[params_left]
type = ConstantReporter
real_vector_names = 'vals'
real_vector_values = '0 0' # Dummy
[]
[params_right]
type = ConstantReporter
real_vector_names = 'vals'
real_vector_values = '0' # Dummy
[]
[]
[Outputs]
console = false
exodus = false
file_base = 'forward'
[]
(modules/phase_field/test/tests/rigidbodymotion/grain_forcedensity.i)
# test file for showing reaction forces between particles
[GlobalParams]
var_name_base = eta
op_num = 2
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 5
nz = 0
xmax = 50
ymax = 25
zmax = 0
elem_type = QUAD4
uniform_refine = 1
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[./eta0]
[../]
[./eta1]
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
coupled_variables = 'eta0 eta1'
w = w
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./motion]
type = MultiGrainRigidBodyMotion
variable = w
c = c
v = 'eta0 eta1'
grain_force = grain_force
grain_tracker_object = grain_center
grain_volumes = grain_volumes
[../]
[./eta0_dot]
type = TimeDerivative
variable = eta0
[../]
[./vadv_eta]
type = SingleGrainRigidBodyMotion
variable = eta0
c = c
v = 'eta0 eta1'
grain_force = grain_force
grain_tracker_object = grain_center
grain_volumes = grain_volumes
op_index = 0
[../]
[./acint_eta0]
type = ACInterface
variable = eta0
mob_name = M
#coupled_variables = c
kappa_name = kappa_eta
[../]
[./acbulk_eta0]
type = AllenCahn
variable = eta0
mob_name = M
f_name = F
coupled_variables = 'c eta1'
[../]
[./eta1_dot]
type = TimeDerivative
variable = eta1
[../]
[./vadv_eta1]
type = SingleGrainRigidBodyMotion
variable = eta1
c = c
v = 'eta0 eta1'
op_index = 1
grain_force = grain_force
grain_tracker_object = grain_center
grain_volumes = grain_volumes
[../]
[./acint_eta1]
type = ACInterface
variable = eta1
mob_name = M
#coupled_variables = c
kappa_name = kappa_eta
[../]
[./acbulk_eta1]
type = AllenCahn
variable = eta1
mob_name = M
f_name = F
coupled_variables = 'c eta0'
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c kappa_eta'
prop_values = '1.0 0.5 0.5'
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'c eta0 eta1'
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 1.0e-2'
expression = 16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2+eta0*(1-eta0)*c+eta1*(1-eta1)*c
derivative_order = 2
[../]
[./force_density]
type = ForceDensityMaterial
c = c
etas ='eta0 eta1'
[../]
[]
[AuxVariables]
[./bnds]
[../]
[./df00]
order = CONSTANT
family = MONOMIAL
[../]
[./df01]
order = CONSTANT
family = MONOMIAL
[../]
[./df10]
order = CONSTANT
family = MONOMIAL
[../]
[./df11]
order = CONSTANT
family = MONOMIAL
[../]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./var_indices]
order = CONSTANT
family = MONOMIAL
[../]
[./centroids]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./bnds]
type = BndsCalcAux
variable = bnds
var_name_base = eta
op_num = 2
v = 'eta0 eta1'
[../]
[./df01]
type = MaterialStdVectorRealGradientAux
variable = df01
index = 0
component = 1
property = force_density
[../]
[./df11]
type = MaterialStdVectorRealGradientAux
variable = df11
index = 1
component = 1
property = force_density
[../]
[./df00]
type = MaterialStdVectorRealGradientAux
variable = df00
index = 0
component = 0
property = force_density
[../]
[./df10]
type = MaterialStdVectorRealGradientAux
variable = df10
index = 1
component = 0
property = force_density
[../]
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
flood_counter = grain_center
field_display = UNIQUE_REGION
execute_on = timestep_begin
[../]
[./var_indices]
type = FeatureFloodCountAux
variable = var_indices
flood_counter = grain_center
field_display = VARIABLE_COLORING
execute_on = timestep_begin
[../]
[./centroids]
type = FeatureFloodCountAux
variable = centroids
execute_on = timestep_begin
field_display = CENTROID
flood_counter = grain_center
[../]
[]
[ICs]
[./ic_eta0]
int_width = 1.0
x1 = 20.0
y1 = 0.0
radius = 14.0
outvalue = 0.0
variable = eta0
invalue = 1.0
type = SmoothCircleIC
[../]
[./IC_eta1]
int_width = 1.0
x1 = 30.0
y1 = 25.0
radius = 14.0
outvalue = 0.0
variable = eta1
invalue = 1.0
type = SmoothCircleIC
[../]
[./ic_c]
type = SpecifiedSmoothCircleIC
invalue = 1.0
outvalue = 0.1
int_width = 1.0
x_positions = '20.0 30.0 '
z_positions = '0.0 0.0 '
y_positions = '0.0 25.0 '
radii = '14.0 14.0'
3D_spheres = false
variable = c
block = 0
[../]
[]
[VectorPostprocessors]
[./forces]
type = GrainForcesPostprocessor
grain_force = grain_force
[../]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_center
execute_on = 'initial timestep_begin'
[../]
[]
[UserObjects]
[./grain_center]
type = GrainTracker
outputs = none
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
[../]
[./grain_force]
type = ComputeGrainForceAndTorque
execute_on = 'linear nonlinear'
grain_data = grain_center
force_density = force_density
c = c
etas = 'eta0 eta1'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
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
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 1
dt = 0.1
[]
[Outputs]
exodus = true
csv = true
[]
(modules/heat_transfer/test/tests/postprocessors/ad_convective_ht_side_integral.i)
[Mesh]
[./cartesian]
type = CartesianMeshGenerator
dim = 2
dx = '0.45 0.1 0.45'
ix = '5 1 5'
dy = '0.45 0.1 0.45'
iy = '5 1 5'
subdomain_id = '1 1 1
1 2 1
1 1 1'
[../]
[./add_iss_1]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
new_boundary = 'interface'
input = cartesian
[../]
[./block_deleter]
type = BlockDeletionGenerator
block = 2
input = add_iss_1
[../]
[]
[Variables]
[./temperature]
initial_condition = 300
[../]
[]
[AuxVariables]
[./channel_T]
family = MONOMIAL
order = CONSTANT
initial_condition = 400
[../]
[./channel_Hw]
family = MONOMIAL
order = CONSTANT
initial_condition = 1000
[../]
[]
[Kernels]
[./graphite_diffusion]
type = ADHeatConduction
variable = temperature
thermal_conductivity = 'thermal_conductivity'
[../]
[]
[BCs]
## boundary conditions for the thm channels in the reflector
[./channel_heat_transfer]
type = CoupledConvectiveHeatFluxBC
variable = temperature
htc = channel_Hw
T_infinity = channel_T
boundary = 'interface'
[../]
# hot boundary on the left
[./left]
type = DirichletBC
variable = temperature
value = 1000
boundary = 'left'
[../]
# cool boundary on the right
[./right]
type = DirichletBC
variable = temperature
value = 300
boundary = 'right'
[../]
[]
[Materials]
[./pronghorn_solid_material]
type = ADHeatConductionMaterial
temp = temperature
thermal_conductivity = 25
specific_heat = 1000
[../]
[./htc_material]
type = ADGenericConstantMaterial
prop_names = 'alpha_wall'
prop_values = '1000'
[../]
[./tfluid_mat]
type = ADPiecewiseLinearInterpolationMaterial
property = tfluid_mat
variable = channel_T
x = '400 500'
y = '400 500'
[../]
[]
[Postprocessors]
[./Qw1]
type = ADConvectiveHeatTransferSideIntegral
T_fluid_var = channel_T
htc_var = channel_Hw
T_solid = temperature
boundary = interface
[../]
[./Qw2]
type = ADConvectiveHeatTransferSideIntegral
T_fluid_var = channel_T
htc = alpha_wall
T_solid = temperature
boundary = interface
[../]
[./Qw3]
type = ADConvectiveHeatTransferSideIntegral
T_fluid = tfluid_mat
htc = alpha_wall
T_solid = temperature
boundary = interface
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(test/tests/materials/discrete/recompute.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 1
[]
[./left_domain]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '0.5 1 0'
block_id = 10
[../]
[]
[Variables]
[./u]
initial_condition = 2
[../]
[]
[Kernels]
[./diff]
type = MatDiffusionTest
variable = u
prop_name = 'p'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 2
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 3
[../]
[]
[Materials]
[./recompute_props]
type = RecomputeMaterial
block = 0
f_name = 'f'
f_prime_name = 'f_prime'
p_name = 'p'
outputs = all
output_properties = 'f f_prime p'
compute = false # make this material "discrete"
[../]
[./newton]
type = NewtonMaterial
block = 0
outputs = all
f_name = 'f'
f_prime_name = 'f_prime'
p_name = 'p'
material = 'recompute_props'
[../]
[./left]
type = GenericConstantMaterial
prop_names = 'f f_prime p'
prop_values = '1 0.5 1.2345'
block = 10
outputs = all
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
print_linear_residuals = true
perf_graph = true
[]
(modules/phase_field/test/tests/KKS_system/kks_example_nested.i)
#
# KKS toy problem in the split form
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
nz = 0
xmin = -2.5
xmax = 2.5
ymin = -2.5
ymax = 2.5
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[AuxVariables]
[./Fglobal]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Variables]
# order parameter
[./eta]
order = FIRST
family = LAGRANGE
[../]
# hydrogen concentration
[./c]
order = FIRST
family = LAGRANGE
[../]
# chemical potential
[./w]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./eta]
variable = eta
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 1.5
invalue = 0.2
outvalue = 0.1
int_width = 0.75
[../]
[./c]
variable = c
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 1.5
invalue = 0.6
outvalue = 0.4
int_width = 0.75
[../]
[]
[BCs]
[./Periodic]
[./all]
variable = 'eta w c'
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
# Free energy of the matrix
[./fm]
type = DerivativeParsedMaterial
f_name = fm
function = '(0.1-cm)^2'
material_property_names = 'cm'
additional_derivative_symbols = 'cm'
compute = false
[../]
# Free energy of the delta phase
[./fd]
type = DerivativeParsedMaterial
f_name = fd
function = '(0.9-cd)^2'
material_property_names = 'cd'
additional_derivative_symbols = 'cd'
compute = false
[../]
# Compute phase concentrations
[./PhaseConcentrationMaterial]
type = KKSPhaseConcentrationMaterial
global_cs = 'c'
ci_names = 'cm cd'
ci_IC = '0 0'
fa_name = fm
fb_name = fd
h_name = h
min_iterations = 1
max_iterations = 100
absolute_tolerance = 1e-9
relative_tolerance = 1e-9
nested_iterations = iter
outputs = exodus
[../]
# Compute chain rule terms
[./PhaseConcentrationDerivatives]
type = KKSPhaseConcentrationDerivatives
global_cs = 'c'
eta = eta
ci_names = 'cm cd'
fa_name = fm
fb_name = fd
h_name = h
[../]
# h(eta)
[./h_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta
[../]
# g(eta)
[./g_eta]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta
[../]
# constant properties
[./constants]
type = GenericConstantMaterial
prop_names = 'M L kappa'
prop_values = '0.7 0.7 0.4 '
[../]
[]
[Kernels]
# full transient
active = 'CHBulk ACBulkF ACBulkC ACInterface dcdt detadt ckernel'
#
# Cahn-Hilliard Equation
#
[./CHBulk]
type = NestedKKSSplitCHCRes
variable = c
global_cs = 'c'
w = w
all_etas = eta
ca_names = 'cm cd'
fa_name = fm
args = 'eta w'
[../]
[./dcdt]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./ckernel]
type = SplitCHWRes
mob_name = M
variable = w
[../]
#
# Allen-Cahn Equation
#
[./ACBulkF]
type = NestedKKSACBulkF
variable = eta
global_cs = 'c'
ci_names = 'cm cd'
fa_name = fm
fb_name = fd
g_name = g
h_name = h
mob_name = L
w = 0.4
args = 'c'
[../]
[./ACBulkC]
type = NestedKKSACBulkC
variable = eta
global_cs = 'c'
ci_names = 'cm cd'
fa_name = fm
h_name = h
mob_name = L
args = 'c'
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = kappa
[../]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[]
[AuxKernels]
[./GlobalFreeEnergy]
variable = Fglobal
type = KKSGlobalFreeEnergy
fa_name = fm
fb_name = fd
w = 0.4
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pctype -sub_pc_type -sub_pc_factor_shift_type -pc_factor_shift_type'
petsc_options_value = ' asm lu nonzero nonzero'
l_max_its = 100
nl_max_its = 100
num_steps = 3
dt = 0.1
[]
#
# Precondition using handcoded off-diagonal terms
#
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[Outputs]
file_base = kks_example_nested
exodus = true
[]
(modules/phase_field/test/tests/phase_field_kernels/SimpleCHInterface.i)
#
# Test the non-split parsed function free enery Cahn-Hilliard kernel
# The free energy used here has the same functional form as the CHPoly kernel
# If everything works, the output of this test should replicate the output
# of marmot/tests/chpoly_test/CHPoly_test.i (exodiff match)
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 16
ny = 16
xmax = 50
ymax = 50
elem_type = QUAD4
[]
[Variables]
[./cv]
order = THIRD
family = HERMITE
[../]
[]
[ICs]
[./InitialCondition]
type = CrossIC
x1 = 5.0
y1 = 5.0
x2 = 45.0
y2 = 45.0
variable = cv
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = cv
[../]
[./CHSolid]
type = CahnHilliard
variable = cv
f_name = F
mob_name = M
[../]
[./CHInterface]
type = SimpleCHInterface
variable = cv
mob_name = M
kappa_name = kappa_c
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1 0.1'
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'cv'
expression = '(1-cv)^2 * (1+cv)^2'
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_max_its = 15
l_tol = 1.0e-4
nl_max_its = 10
nl_rel_tol = 1.0e-11
start_time = 0.0
num_steps = 2
dt = 0.7
[]
[Outputs]
[./out]
type = Exodus
refinements = 1
[../]
[]
(modules/phase_field/test/tests/SimpleACInterface/SimpleACInterface.i)
#
# Test the parsed function free enery Allen-Cahn Bulk kernel
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
nz = 0
xmin = 0
xmax = 50
ymin = 0
ymax = 50
zmin = 0
zmax = 50
elem_type = QUAD4
uniform_refine = 1
[]
[Variables]
[./eta]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 25.0
y1 = 25.0
radius = 6.0
invalue = 0.9
outvalue = 0.1
int_width = 3.0
[../]
[../]
[]
[Kernels]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[./ACBulk]
type = AllenCahn
variable = eta
f_name = F
[../]
[./ACInterface]
type = SimpleACInterface
variable = eta
kappa_name = 1
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
block = 0
prop_names = 'L'
prop_values = '1'
[../]
[./free_energy]
type = DerivativeParsedMaterial
block = 0
property_name = F
coupled_variables = 'eta'
expression = '2 * eta^2 * (1-eta)^2 - 0.2*eta'
derivative_order = 2
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'PJFNK'
l_max_its = 15
l_tol = 1.0e-4
nl_max_its = 10
nl_rel_tol = 1.0e-11
start_time = 0.0
num_steps = 2
dt = 0.5
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/jacobian_test/jacobian_traction_stabilized.i)
# This input file tests the jacobians of many of the INS kernels
[GlobalParams]
gravity = '1.1 1.1 1.1'
u = vel_x
v = vel_y
w = vel_z
pressure = p
integrate_p_by_parts = false
laplace = false
supg = true
pspg = true
alpha = 1.1
[]
[Mesh]
type = GeneratedMesh
dim = 3
xmin = 0
xmax = 3.0
ymin = 0
ymax = 1.5
zmax = 1.1
nx = 1
ny = 1
nz = 1
elem_type = HEX27
[]
[Variables]
[./vel_x]
order = SECOND
family = LAGRANGE
[../]
[./vel_y]
order = SECOND
family = LAGRANGE
[../]
[./vel_z]
order = SECOND
family = LAGRANGE
[../]
[./p]
order = SECOND
family = LAGRANGE
[../]
[]
[Kernels]
[./mass]
type = INSMass
variable = p
[../]
[./x_momentum_space]
type = INSMomentumTractionForm
variable = vel_x
component = 0
[../]
[./y_momentum_space]
type = INSMomentumTractionForm
variable = vel_y
component = 1
[../]
[./z_momentum_space]
type = INSMomentumTractionForm
variable = vel_z
component = 2
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 0
prop_names = 'rho mu'
prop_values = '0.5 1.5'
[../]
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-snes_type'
petsc_options_value = 'test'
[]
[ICs]
[./p]
type = RandomIC
variable = p
min = 0.5
max = 1.5
[../]
[./vel_x]
type = RandomIC
variable = vel_x
min = 0.5
max = 1.5
[../]
[./vel_y]
type = RandomIC
variable = vel_y
min = 0.5
max = 1.5
[../]
[./vel_z]
type = RandomIC
variable = vel_z
min = 0.5
max = 1.5
[../]
[]
(modules/solid_mechanics/test/tests/dynamics/time_integration/hht_test.i)
# Test for HHT time integration
# The test is for an 1D bar element of unit length fixed on one end
# with a ramped pressure boundary condition applied to the other end.
# alpha, beta and gamma are HHT time integration parameters
# The equation of motion in terms of matrices is:
#
# M*accel + alpha*(K*disp - K*disp_old) + K*disp = P(t+alpha dt)*Area
#
# Here M is the mass matrix, K is the stiffness matrix, P is the applied pressure
#
# This equation is equivalent to:
#
# density*accel + alpha*(Div stress - Div stress_old) +Div Stress= P(t+alpha dt)
#
# The first term on the left is evaluated using the Inertial force kernel
# The next two terms on the left involving alpha are evaluated using the
# DynamicStressDivergenceTensors Kernel
# The residual due to Pressure is evaluated using Pressure boundary condition
#
# The system will come to steady state slowly after the pressure becomes constant.
# Alpha equal to zero will result in Newmark integration.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 0.0
xmax = 0.1
ymin = 0.0
ymax = 1.0
zmin = 0.0
zmax = 0.1
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[AuxVariables]
[./vel_x]
[../]
[./accel_x]
[../]
[./vel_y]
[../]
[./accel_y]
[../]
[./vel_z]
[../]
[./accel_z]
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./DynamicSolidMechanics]
displacements = 'disp_x disp_y disp_z'
hht_alpha = 0.11
[../]
[./inertia_x]
type = InertialForce
variable = disp_x
velocity = vel_x
acceleration = accel_x
beta = 0.25
gamma = 0.5
[../]
[./inertia_y]
type = InertialForce
variable = disp_y
velocity = vel_y
acceleration = accel_y
beta = 0.25
gamma = 0.5
[../]
[./inertia_z]
type = InertialForce
variable = disp_z
velocity = vel_z
acceleration = accel_z
beta = 0.25
gamma = 0.5
[../]
[]
[AuxKernels]
[./accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = timestep_end
[../]
[./vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = timestep_end
[../]
[./accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = timestep_end
[../]
[./vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = timestep_end
[../]
[./accel_z]
type = NewmarkAccelAux
variable = accel_z
displacement = disp_z
velocity = vel_z
beta = 0.25
execute_on = timestep_end
[../]
[./vel_z]
type = NewmarkVelAux
variable = vel_z
acceleration = accel_z
gamma = 0.5
execute_on = timestep_end
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 0
index_j = 1
[../]
[./strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yy
index_i = 0
index_j = 1
[../]
[]
[BCs]
[./top_y]
type = DirichletBC
variable = disp_y
boundary = top
value=0.0
[../]
[./top_x]
type = DirichletBC
variable = disp_x
boundary = top
value=0.0
[../]
[./top_z]
type = DirichletBC
variable = disp_z
boundary = top
value=0.0
[../]
[./bottom_x]
type = DirichletBC
variable = disp_x
boundary = bottom
value=0.0
[../]
[./bottom_z]
type = DirichletBC
variable = disp_z
boundary = bottom
value=0.0
[../]
[./Pressure]
[./Side1]
boundary = bottom
function = pressure
factor = 1
hht_alpha = 0.11
displacements = 'disp_x disp_y disp_z'
[../]
[../]
[]
[Materials]
[./Elasticity_tensor]
type = ComputeElasticityTensor
block = 0
fill_method = symmetric_isotropic
C_ijkl = '210e9 0'
[../]
[./strain]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[../]
[./stress]
type = ComputeLinearElasticStress
block = 0
[../]
[./density]
type = GenericConstantMaterial
block = 0
prop_names = 'density'
prop_values = '7750'
[../]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 2
dt = 0.1
[]
[Functions]
[./pressure]
type = PiecewiseLinear
x = '0.0 0.1 0.2 1.0 2.0 5.0'
y = '0.0 0.1 0.2 1.0 1.0 1.0'
scale_factor = 1e9
[../]
[]
[Postprocessors]
[./_dt]
type = TimestepSize
[../]
[./disp]
type = NodalExtremeValue
variable = disp_y
boundary = bottom
[../]
[./vel]
type = NodalExtremeValue
variable = vel_y
boundary = bottom
[../]
[./accel]
type = NodalExtremeValue
variable = accel_y
boundary = bottom
[../]
[./stress_yy]
type = ElementAverageValue
variable = stress_yy
[../]
[./strain_yy]
type = ElementAverageValue
variable = strain_yy
[../]
[]
[Outputs]
exodus = true
perf_graph = 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/stochastic_tools/test/tests/reporters/BFActiveLearning/sub_lf.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 5
xmax = 0.09
elem_type = EDGE3
[]
[Variables]
[T]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
variable = T
diffusivity = k
[]
[source]
type = BodyForce
variable = T
value = 10951.864006672608
[]
[]
[Materials]
[conductivity]
type = GenericConstantMaterial
prop_names = k
prop_values = 10.320058433901163
[]
[]
[BCs]
[right]
type = DirichletBC
variable = T
boundary = right
value = 279.8173854189593
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[avg]
type = AverageNodalVariableValue
variable = T
[]
[max]
type = NodalExtremeValue
variable = T
value_type = max
[]
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Outputs]
[]
(modules/thermal_hydraulics/test/tests/components/hs_boundary_radiation/from_file_3d.i)
T_hs = 1200
T_ambient = 1500
emissivity = 0.3
view_factor = 0.6
t = 5.0
# dimensions of the side 'left'
height = 5
depth = 2
# SS 316
density = 8.0272e3
specific_heat_capacity = 502.1
conductivity = 16.26
stefan_boltzmann = 5.670367e-8
A = ${fparse height * depth}
heat_flux = ${fparse stefan_boltzmann * emissivity * view_factor * (T_ambient^4 - T_hs^4)}
scale = 0.8
E_change = ${fparse scale * heat_flux * A * t}
[Materials]
[mat]
type = ADGenericConstantMaterial
block = 'hs:brick'
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '${density} ${specific_heat_capacity} ${conductivity}'
[]
[]
[Components]
[hs]
type = HeatStructureFromFile3D
file = box.e
position = '0 0 0'
initial_T = ${T_hs}
[]
[hs_boundary]
type = HSBoundaryRadiation
boundary = 'hs:left'
hs = hs
T_ambient = ${T_ambient}
emissivity = ${emissivity}
view_factor = ${view_factor}
scale = ${scale}
[]
[]
[Postprocessors]
[E_hs]
type = ADHeatStructureEnergy3D
block = 'hs:brick'
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_hs_change]
type = ChangeOverTimePostprocessor
postprocessor = E_hs
execute_on = 'INITIAL TIMESTEP_END'
[]
[E_change_relerr]
type = RelativeDifferencePostprocessor
value1 = E_hs_change
value2 = ${E_change}
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
[TimeIntegrator]
type = ActuallyExplicitEuler
[]
dt = ${t}
num_steps = 1
abort_on_solve_fail = true
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
[out]
type = CSV
show = 'E_change_relerr'
execute_on = 'FINAL'
[]
[]
(modules/solid_mechanics/examples/coal_mining/cosserat_wp_only.i)
# Strata deformation and fracturing around a coal mine
#
# A 2D geometry is used that simulates a transverse section of
# the coal mine. The model is actually 3D, but the "x"
# dimension is only 10m long, meshed with 1 element, and
# there is no "x" displacement. The mine is 300m deep
# and just the roof is studied (0<=z<=300). The model sits
# between 0<=y<=450. The excavation sits in 0<=y<=150. This
# is a "half model": the boundary conditions are such that
# the model simulates an excavation sitting in -150<=y<=150
# inside a model of the region -450<=y<=450. The
# excavation height is 3m (ie, the excavation lies within
# 0<=z<=3). Mining is simulated by moving the excavation's
# roof down, until disp_z=-3 at t=1.
# Time is meaningless in this example
# as quasi-static solutions are sought at each timestep, but
# the number of timesteps controls the resolution of the
# process.
#
# The boundary conditions are:
# - disp_x = 0 everywhere
# - disp_y = 0 at y=0 and y=450
# - disp_z = 0 for y>150
# - disp_z = -3 at maximum, for 0<=y<=150. See excav function.
# That is, rollers on the sides, free at top, and prescribed at bottom.
#
# The small strain formulation is used.
#
# All stresses are measured in MPa. The initial stress is consistent with
# the weight force from density 2500 kg/m^3, ie, stress_zz = -0.025*(300-z) MPa
# where gravity = 10 m.s^-2 = 1E-5 MPa m^2/kg. The maximum and minimum
# principal horizontal stresses are assumed to be equal to 0.8*stress_zz.
#
# Below you will see Drucker-Prager parameters and AuxVariables, etc.
# These are not actally used in this example.
#
# Material properties:
# Young's modulus = 8 GPa
# Poisson's ratio = 0.25
# Cosserat layer thickness = 1 m
# Cosserat-joint normal stiffness = large
# Cosserat-joint shear stiffness = 1 GPa
# Weak-plane cohesion = 0.1 MPa
# Weak-plane friction angle = 20 deg
# Weak-plane dilation angle = 10 deg
# Weak-plane tensile strength = 0.1 MPa
# Weak-plane compressive strength = 100 MPa, varying down to 1 MPa when tensile strain = 1
#
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 1
xmin = -5
xmax = 5
nz = 40
zmin = 0
zmax = 400
bias_z = 1.1
ny = 30 # make this a multiple of 3, so y=150 is at a node
ymin = 0
ymax = 450
[]
[left]
type = SideSetsAroundSubdomainGenerator
new_boundary = 11
normal = '0 -1 0'
input = generated_mesh
[]
[right]
type = SideSetsAroundSubdomainGenerator
new_boundary = 12
normal = '0 1 0'
input = left
[]
[front]
type = SideSetsAroundSubdomainGenerator
new_boundary = 13
normal = '-1 0 0'
input = right
[]
[back]
type = SideSetsAroundSubdomainGenerator
new_boundary = 14
normal = '1 0 0'
input = front
[]
[top]
type = SideSetsAroundSubdomainGenerator
new_boundary = 15
normal = '0 0 1'
input = back
[]
[bottom]
type = SideSetsAroundSubdomainGenerator
new_boundary = 16
normal = '0 0 -1'
input = top
[]
[excav]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '-5 0 0'
top_right = '5 150 3'
input = bottom
[]
[roof]
type = SideSetsBetweenSubdomainsGenerator
new_boundary = 21
primary_block = 0
paired_block = 1
input = excav
[]
[hole]
type = BlockDeletionGenerator
block = 1
input = roof
[]
[]
[GlobalParams]
block = 0
perform_finite_strain_rotations = false
displacements = 'disp_x disp_y disp_z'
Cosserat_rotations = 'wc_x wc_y wc_z'
[]
[Variables]
[./disp_y]
[../]
[./disp_z]
[../]
[./wc_x]
[../]
[]
[Kernels]
[./cy_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_y
component = 1
[../]
[./cz_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_z
component = 2
[../]
[./x_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_x
displacements = 'wc_x wc_y wc_z'
component = 0
base_name = couple
[../]
[./x_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_x
component = 0
[../]
[./gravity]
type = Gravity
use_displaced_mesh = false
variable = disp_z
value = -10E-6
[../]
[]
[AuxVariables]
[./disp_x]
[../]
[./wc_y]
[../]
[./wc_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./dp_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./dp_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[./dp_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./dp_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./dp_shear]
type = MaterialStdVectorAux
index = 0
property = dp_plastic_internal_parameter
variable = dp_shear
[../]
[./dp_tensile]
type = MaterialStdVectorAux
index = 1
property = dp_plastic_internal_parameter
variable = dp_tensile
[../]
[./wp_shear]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_internal_parameter
variable = wp_shear
[../]
[./wp_tensile]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_internal_parameter
variable = wp_tensile
[../]
[./dp_shear_f]
type = MaterialStdVectorAux
index = 0
property = dp_plastic_yield_function
variable = dp_shear_f
[../]
[./dp_tensile_f]
type = MaterialStdVectorAux
index = 1
property = dp_plastic_yield_function
variable = dp_tensile_f
[../]
[./wp_shear_f]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_yield_function
variable = wp_shear_f
[../]
[./wp_tensile_f]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_yield_function
variable = wp_tensile_f
[../]
[]
[BCs]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = '11 12 16 21' # note addition of 16 and 21
value = 0.0
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = '16'
value = 0.0
[../]
[./no_wc_x]
type = DirichletBC
variable = wc_x
boundary = '11 12'
value = 0.0
[../]
[./roof]
type = FunctionDirichletBC
variable = disp_z
boundary = 21
function = excav_sideways
[../]
[]
[Functions]
[./ini_xx]
type = ParsedFunction
expression = '-0.8*2500*10E-6*(400-z)'
[../]
[./ini_zz]
type = ParsedFunction
expression = '-2500*10E-6*(400-z)'
[../]
[./excav_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax e_h closure_dist'
symbol_values = '1.0 0 150.0 -3.0 15.0'
expression = 'e_h*max(min((t/end_t*(ymax-ymin)+ymin-y)/closure_dist,1),0)'
[../]
[./excav_downwards]
type = ParsedFunction
symbol_names = 'end_t ymin ymax e_h closure_dist'
symbol_values = '1.0 0 150.0 -3.0 15.0'
expression = 'e_h*t/end_t*max(min(((ymax-ymin)+ymin-y)/closure_dist,1),0)'
[../]
[]
[UserObjects]
[./dp_coh_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 2.9 # MPa
value_residual = 3.1 # MPa
rate = 1.0
[../]
[./dp_fric]
type = SolidMechanicsHardeningConstant
value = 0.65 # 37deg
[../]
[./dp_dil]
type = SolidMechanicsHardeningConstant
value = 0.65
[../]
[./dp_tensile_str_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 1.0 # MPa
value_residual = 1.4 # MPa
rate = 1.0
[../]
[./dp_compressive_str]
type = SolidMechanicsHardeningConstant
value = 1.0E3 # Large!
[../]
[./drucker_prager_model]
type = SolidMechanicsPlasticDruckerPrager
mc_cohesion = dp_coh_strong_harden
mc_friction_angle = dp_fric
mc_dilation_angle = dp_dil
internal_constraint_tolerance = 1 # irrelevant here
yield_function_tolerance = 1 # irrelevant here
[../]
[./wp_coh_harden]
type = SolidMechanicsHardeningCubic
value_0 = 0.1
value_residual = 0.1
internal_limit = 10
[../]
[./wp_tan_fric]
type = SolidMechanicsHardeningConstant
value = 0.36 # 20deg
[../]
[./wp_tan_dil]
type = SolidMechanicsHardeningConstant
value = 0.18 # 10deg
[../]
[./wp_tensile_str_harden]
type = SolidMechanicsHardeningCubic
value_0 = 0.1
value_residual = 0.1
internal_limit = 10
[../]
[./wp_compressive_str_soften]
type = SolidMechanicsHardeningCubic
value_0 = 100
value_residual = 1.0
internal_limit = 1.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ComputeLayeredCosseratElasticityTensor
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3
[../]
[./strain]
type = ComputeCosseratIncrementalSmallStrain
eigenstrain_names = ini_stress
[../]
[./ini_stress]
type = ComputeEigenstrainFromInitialStress
initial_stress = 'ini_xx 0 0 0 ini_xx 0 0 0 ini_zz'
eigenstrain_name = ini_stress
[../]
[./stress]
type = ComputeMultipleInelasticCosseratStress
block = 0
inelastic_models = 'wp'
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[../]
[./dp]
type = CappedDruckerPragerCosseratStressUpdate
block = 0
warn_about_precision_loss = false
host_youngs_modulus = 8E3
host_poissons_ratio = 0.25
base_name = dp
DP_model = drucker_prager_model
tensile_strength = dp_tensile_str_strong_harden
compressive_strength = dp_compressive_str
max_NR_iterations = 100000
tip_smoother = 0.1E1
smoothing_tol = 0.1E1 # MPa # Must be linked to cohesion
yield_function_tol = 1E-11 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0
[../]
[./wp]
type = CappedWeakPlaneCosseratStressUpdate
block = 0
warn_about_precision_loss = false
base_name = wp
cohesion = wp_coh_harden
tan_friction_angle = wp_tan_fric
tan_dilation_angle = wp_tan_dil
tensile_strength = wp_tensile_str_harden
compressive_strength = wp_compressive_str_soften
max_NR_iterations = 10000
tip_smoother = 0.1
smoothing_tol = 0.1 # MPa # Note, this must be tied to cohesion, otherwise get no possible return at cone apex
yield_function_tol = 1E-11 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0E-3
[../]
[./density]
type = GenericConstantMaterial
prop_names = density
prop_values = 2500
[../]
[]
[Postprocessors]
[./subsidence]
type = PointValue
point = '0 0 400'
variable = disp_z
use_displaced_mesh = false
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
line_search = bt
nl_abs_tol = 1e-3
nl_rel_tol = 1e-5
l_max_its = 30
nl_max_its = 1000
start_time = 0.0
dt = 0.2
end_time = 0.2
[]
[Outputs]
file_base = cosserat_wp_only
time_step_interval = 1
print_linear_residuals = false
csv = true
exodus = true
[./console]
type = Console
output_linear = false
[../]
[]
(test/tests/auxkernels/diffusion_flux/normal_diffusion_flux.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 1.0
ymax = 1.0
[]
[Variables]
[./dummy]
[../]
[]
[AuxVariables]
[./T]
[../]
[./flux_n]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Functions]
[./T]
type = ParsedFunction
expression = 'x*x*y*y+1'
[../]
[]
[ICs]
[./T]
type = FunctionIC
variable = T
function = T
[../]
[]
[Kernels]
[./dummy]
type = Diffusion
variable = dummy
[../]
[]
[AuxKernels]
[./flux_n]
type = DiffusionFluxAux
diffusivity = 'thermal_conductivity'
variable = flux_n
diffusion_variable = T
component = normal
boundary = 'left right'
check_boundary_restricted = false
[../]
[]
[Materials]
[./k]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity'
prop_values = '10'
[../]
[]
[Postprocessors]
[flux_right]
type = SideIntegralVariablePostprocessor
variable = flux_n
boundary = 'right'
[]
[flux_right_exact]
type = SideFluxIntegral
variable = T
diffusivity = 'thermal_conductivity'
boundary = 'right'
[]
[flux_left]
type = SideIntegralVariablePostprocessor
variable = flux_n
boundary = 'left'
[]
[flux_left_exact]
type = SideFluxIntegral
variable = T
diffusivity = 'thermal_conductivity'
boundary = 'left'
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
nl_rel_tol = 1e-12
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
hide = 'dummy'
[]
(modules/combined/examples/phase_field-mechanics/LandauPhaseTrans.i)
#
# Martensitic transformation
# Chemical driving force described by Landau Polynomial
# Coupled with elasticity (Mechanics)
#
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 100
ny = 100
xmin = 0
xmax = 100
ymin = 0
ymax = 100
elem_type = QUAD4
[]
[Variables]
[./eta1]
[./InitialCondition]
type = RandomIC
min = 0
max = 0.1
[../]
[../]
[./eta2]
[./InitialCondition]
type = RandomIC
min = 0
max = 0.1
[../]
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
add_variables = true
generate_output = 'stress_xx stress_yy'
eigenstrain_names = 'eigenstrain1 eigenstrain2'
[../]
[]
[Kernels]
[./eta_bulk1]
type = AllenCahn
variable = eta1
args = 'eta2'
f_name = F
[../]
[./eta_bulk2]
type = AllenCahn
variable = eta2
args = 'eta1'
f_name = F
[../]
[./eta_interface1]
type = ACInterface
variable = eta1
kappa_name = kappa_eta
[../]
[./eta_interface2]
type = ACInterface
variable = eta2
kappa_name = kappa_eta
[../]
[./deta1dt]
type = TimeDerivative
variable = eta1
[../]
[./deta2dt]
type = TimeDerivative
variable = eta2
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'L kappa_eta'
prop_values = '1 1'
[../]
[./chemical_free_energy]
type = DerivativeParsedMaterial
property_name = Fc
coupled_variables = 'eta1 eta2'
constant_names = 'A2 A3 A4'
constant_expressions = '0.2 -12.6 12.4'
expression = 'A2/2*(eta1^2+eta2^2) + A3/3*(eta1^3+eta2^3) + A4/4*(eta1^2+eta2^2)^2'
enable_jit = true
derivative_order = 2
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '700 300 300 700 300 700 300 300 300'
fill_method = symmetric9
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./var_dependence1]
type = DerivativeParsedMaterial
property_name = var_dep1
coupled_variables = 'eta1'
expression = eta1
enable_jit = true
derivative_order = 2
[../]
[./var_dependence2]
type = DerivativeParsedMaterial
property_name = var_dep2
coupled_variables = 'eta2'
expression = eta2
enable_jit = true
derivative_order = 2
[../]
[./eigenstrain1]
type = ComputeVariableEigenstrain
eigen_base = '0.1 -0.1 0 0 0 0'
prefactor = var_dep1
args = 'eta1'
eigenstrain_name = eigenstrain1
[../]
[./eigenstrain2]
type = ComputeVariableEigenstrain
eigen_base = '-0.1 0.1 0 0 0 0'
prefactor = var_dep2
args = 'eta2'
eigenstrain_name = eigenstrain2
[../]
[./elastic_free_energy]
type = ElasticEnergyMaterial
f_name = Fe
args = 'eta1 eta2'
derivative_order = 2
[../]
[./totol_free_energy]
type = DerivativeSumMaterial
property_name = F
sum_materials = 'Fc Fe'
coupled_variables = 'eta1 eta2'
derivative_order = 2
[../]
[]
[BCs]
[./all_y]
type = DirichletBC
variable = disp_y
boundary = 'top bottom left right'
value = 0
[../]
[./all_x]
type = DirichletBC
variable = disp_x
boundary = 'top bottom left right'
value = 0
[../]
[]
[Preconditioning]
# active = ' '
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
# this gives best performance on 4 cores
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
num_steps = 10
[./TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 9
iteration_window = 2
growth_factor = 1.1
cutback_factor = 0.75
dt = 0.3
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/phase_field/test/tests/initial_conditions/RndBoundingBoxIC.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 8
xmax = 50
ymax = 25
elem_type = QUAD4
[]
[Variables]
[./c]
order = THIRD
family = HERMITE
[../]
[]
[ICs]
[./InitialCondition]
type = RndBoundingBoxIC
x1 = 15.0
x2 = 35.0
y1 = 0.0
y2 = 25.0
mx_invalue = 1.0
mn_invalue = 0.9
mx_outvalue = -0.7
mn_outvalue = -0.8
variable = c
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./CHSolid]
type = CHMath
variable = c
mob_name = M
[../]
[./CHInterface]
type = CHInterface
variable = c
kappa_name = kappa_c
mob_name = M
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./constant]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1.0 1.0'
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_max_its = 15
nl_max_its = 10
start_time = 0.0
num_steps = 4
dt = 5.0
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/energy_source/steady-var-action.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[]
[AuxVariables]
[u]
initial_condition = 1
[]
[]
[Modules]
[IncompressibleNavierStokes]
equation_type = steady-state
velocity_boundary = 'bottom right top left'
velocity_function = '0 0 0 0 lid_function 0 0 0'
initial_velocity = '1e-15 1e-15 0'
add_standard_velocity_variables_for_ad = false
pressure_pinned_node = 0
density_name = rho
dynamic_viscosity_name = mu
use_ad = true
laplace = true
family = LAGRANGE
order = FIRST
add_temperature_equation = true
fixed_temperature_boundary = 'bottom top'
temperature_function = '1 0'
has_heat_source = true
heat_source_var = u
supg = true
pspg = true
[]
[]
[Materials]
[const]
type = ADGenericConstantMaterial
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
[]
[]
[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/heat_transfer/test/tests/interface_heating_mortar/transient_joule_heating_constraint.i)
## Units in the input file: m-Pa-s-K-V
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmax = 0.1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmin = 0.1
xmax = 0.2
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
[interface_secondary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'fixed_block_left'
new_block_id = 3
new_block_name = 'interface_secondary_subdomain'
input = block_rename
[]
[interface_primary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'moving_block_right'
new_block_id = 4
new_block_name = 'interface_primary_subdomain'
input = interface_secondary_subdomain
[]
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
[]
[Variables]
[temperature]
initial_condition = 300.0
[]
[temperature_interface_lm]
block = 'interface_secondary_subdomain'
[]
[potential]
[]
[potential_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[AuxVariables]
[interface_normal_lm]
order = FIRST
family = LAGRANGE
block = 'interface_secondary_subdomain'
initial_condition = 1.0
[]
[]
[Kernels]
[HeatDiff_steel]
type = ADHeatConduction
variable = temperature
thermal_conductivity = steel_thermal_conductivity
extra_vector_tags = 'ref'
block = 'left_block'
[]
[HeatTdot_steel]
type = ADHeatConductionTimeDerivative
variable = temperature
specific_heat = steel_heat_capacity #use parsed material property
density_name = steel_density
extra_vector_tags = 'ref'
block = 'left_block'
[]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
extra_vector_tags = 'ref'
block = 'right_block'
[]
[HeatTdot_aluminum]
type = ADHeatConductionTimeDerivative
variable = temperature
specific_heat = aluminum_heat_capacity #use parsed material property
density_name = aluminum_density
extra_vector_tags = 'ref'
block = 'right_block'
[]
[electric_steel]
type = ADMatDiffusion
variable = potential
diffusivity = steel_electrical_conductivity
extra_vector_tags = 'ref'
block = 'left_block'
[]
[electric_aluminum]
type = ADMatDiffusion
variable = potential
diffusivity = aluminum_electrical_conductivity
extra_vector_tags = 'ref'
block = 'right_block'
[]
[]
[BCs]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'fixed_block_right'
[]
[electric_left]
type = ADDirichletBC
variable = potential
value = 0.0
boundary = moving_block_left
[]
[electric_right]
type = ADDirichletBC
variable = potential
value = 3.0e-1
boundary = fixed_block_right
[]
[]
[Constraints]
[thermal_contact]
type = ModularGapConductanceConstraint
variable = temperature_interface_lm
secondary_variable = temperature
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_temperature'
[]
[electrical_contact]
type = ModularGapConductanceConstraint
variable = potential_interface_lm
secondary_variable = potential
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_electric'
[]
[interface_heating]
type = ADInterfaceJouleHeatingConstraint
potential_lagrange_multiplier = potential_interface_lm
secondary_variable = temperature
primary_electrical_conductivity = steel_electrical_conductivity
secondary_electrical_conductivity = aluminum_electrical_conductivity
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
[]
[]
[Materials]
[steel_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'steel_density steel_thermal_conductivity steel_heat_capacity steel_electrical_conductivity steel_hardness'
prop_values = '8e3 16.2 500.0 1.39e6 1.0' ## for stainless steel 304
block = 'left_block interface_secondary_subdomain'
[]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_electrical_conductivity aluminum_hardness'
prop_values = ' 2.7e3 210 900.0 3.7e7 1.0' #for 99% pure Al
block = 'left_block right_block interface_secondary_subdomain'
[]
[]
[UserObjects]
[closed_temperature]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_thermal_conductivity
secondary_conductivity = aluminum_thermal_conductivity
temperature = temperature
contact_pressure = interface_normal_lm
primary_hardness = steel_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[closed_electric]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_electrical_conductivity
secondary_conductivity = aluminum_electrical_conductivity
temperature = potential
contact_pressure = interface_normal_lm
primary_hardness = steel_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[]
[Postprocessors]
[steel_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_primary_subdomain
[]
[aluminum_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_secondary_subdomain
[]
[interface_heat_flux_steel]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = moving_block_right
diffusivity = steel_thermal_conductivity
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[interface_electrical_flux]
type = ADSideDiffusiveFluxAverage
variable = potential
boundary = fixed_block_left
diffusivity = aluminum_electrical_conductivity
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
nl_abs_tol = 1e-8
nl_rel_tol = 1e-4
nl_max_its = 100
nl_forced_its = 1
dt = 1200.0
dtmin = 1200.0
num_steps = 8
[]
[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 = ' '
[../]
[]
(test/tests/executioners/eigen_convergence/b.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 160
ymin = 0
ymax = 160
nx = 8
ny = 8
[]
uniform_refine = 0
[]
[Variables]
[u]
[]
[]
[Kernels]
[diffusion]
type = MatDiffusion
diffusivity = diffusivity
variable = u
[]
[reaction]
type = CoefReaction
coefficient = 0.01
variable = u
[]
[rhs]
type = MassEigenKernel
coefficient = 0.01
variable = u
[]
[]
[BCs]
[robin]
type = VacuumBC
boundary = 'left bottom'
variable = u
[]
[]
[Materials]
[nm]
type = GenericConstantMaterial
block = 0
prop_names = 'diffusivity'
prop_values = 0.333333333333333333
[]
[]
[Postprocessors]
[fluxintegral]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = linear
[]
[]
[Executioner]
type = NonlinearEigen
bx_norm = fluxintegral
solve_type = PJFNK
free_power_iterations = 4
nl_abs_tol = 2e-10
output_after_power_iterations = false
[]
[Outputs]
csv = true
[]
(modules/heat_transfer/test/tests/physics/test_fe.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = 10
dy = 10
[]
[]
[Physics]
[HeatConduction]
[FiniteElement]
[h1]
temperature_name = 'T'
heat_source_var = 'Q'
# Thermal properties
thermal_conductivity = 'k0'
# Boundary conditions
heat_flux_boundaries = 'left right'
boundary_heat_fluxes = '0 500'
insulated_boundaries = 'top'
fixed_temperature_boundaries = 'bottom'
boundary_temperatures = '300'
[]
[]
[]
[]
[Executioner]
type = Steady
verbose = true
[]
[AuxVariables]
[Q]
initial_condition = 100
[]
[]
[Materials]
[mat_k]
type = ADGenericConstantMaterial
prop_names = 'k0'
prop_values = '1'
[]
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/initial_conditions/BimodalSuperellipsoidsIC.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 25
ny = 25
xmax = 50
ymax = 50
elem_type = QUAD4
[]
[Variables]
[./c]
order = THIRD
family = HERMITE
[../]
[]
[ICs]
[./c]
type = BimodalSuperellipsoidsIC
variable = c
x_positions = '10.0 40.0'
y_positions = '25.0 25.0'
z_positions = '0.0 0.0'
as = '8.0 8.0'
bs = '8.0 8.0'
cs = '1 1'
ns = '3.5 3.5'
npart = 5
invalue = 1.0
outvalue = -0.8
int_width = 4.0
large_spac = 5
small_spac = 2
small_a = 5
small_b = 5
small_c = 5
small_n = 2
size_variation_type = normal
size_variation = 0.5
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./CHSolid]
type = CHMath
variable = c
mob_name = M
[../]
[./CHInterface]
type = CHInterface
variable = c
kappa_name = kappa_c
mob_name = M
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./constant]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1.0 1.0'
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_max_its = 20
l_tol = 1.0e-4
nl_max_its = 40
nl_rel_tol = 1e-9
start_time = 0.0
num_steps = 1
dt = 2.0
[]
[Outputs]
exodus = false
[./out]
type = Exodus
refinements = 2
[../]
[]
(modules/phase_field/test/tests/KKS_system/kks_example_offset.i)
#
# KKS toy problem in the split form
# This has an offset in the minima of the free energies so there will be a shift
# in equilibrium composition
[Mesh]
type = GeneratedMesh
dim = 2
nx = 15
ny = 15
nz = 0
xmin = -2.5
xmax = 2.5
ymin = -2.5
ymax = 2.5
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[AuxVariables]
[./Fglobal]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Variables]
# order parameter
[./eta]
order = FIRST
family = LAGRANGE
[../]
# hydrogen concentration
[./c]
order = FIRST
family = LAGRANGE
[../]
# chemical potential
[./w]
order = FIRST
family = LAGRANGE
[../]
# hydrogen phase concentration (matrix)
[./cm]
order = FIRST
family = LAGRANGE
initial_condition = 0.0
[../]
# hydrogen phase concentration (delta phase)
[./cd]
order = FIRST
family = LAGRANGE
initial_condition = 0.0
[../]
[]
[ICs]
[./eta]
variable = eta
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 1.5
invalue = 0.2
outvalue = 0.1
int_width = 0.75
[../]
[./c]
variable = c
type = SmoothCircleIC
x1 = 0.0
y1 = 0.0
radius = 1.5
invalue = 0.6
outvalue = 0.4
int_width = 0.75
[../]
[]
[BCs]
[./Periodic]
[./all]
variable = 'eta w c cm cd'
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
# Free energy of the matrix
[./fm]
type = DerivativeParsedMaterial
property_name = fm
coupled_variables = 'cm'
expression = '(0.1-cm)^2'
[../]
# Free energy of the delta phase
[./fd]
type = DerivativeParsedMaterial
property_name = fd
coupled_variables = 'cd'
expression = '(0.9-cd)^2+0.5'
[../]
# h(eta)
[./h_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta
[../]
# g(eta)
[./g_eta]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta
[../]
# constant properties
[./constants]
type = GenericConstantMaterial
prop_names = 'M L kappa'
prop_values = '0.7 0.7 0.4 '
[../]
[]
[Kernels]
# full transient
active = 'PhaseConc ChemPotVacancies CHBulk ACBulkF ACBulkC ACInterface dcdt detadt ckernel'
# enforce c = (1-h(eta))*cm + h(eta)*cd
[./PhaseConc]
type = KKSPhaseConcentration
ca = cm
variable = cd
c = c
eta = eta
[../]
# enforce pointwise equality of chemical potentials
[./ChemPotVacancies]
type = KKSPhaseChemicalPotential
variable = cm
cb = cd
fa_name = fm
fb_name = fd
[../]
#
# Cahn-Hilliard Equation
#
[./CHBulk]
type = KKSSplitCHCRes
variable = c
ca = cm
fa_name = fm
w = w
[../]
[./dcdt]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./ckernel]
type = SplitCHWRes
mob_name = M
variable = w
[../]
#
# Allen-Cahn Equation
#
[./ACBulkF]
type = KKSACBulkF
variable = eta
fa_name = fm
fb_name = fd
coupled_variables = 'cm cd'
w = 0.4
[../]
[./ACBulkC]
type = KKSACBulkC
variable = eta
ca = cm
cb = cd
fa_name = fm
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = kappa
[../]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[]
[AuxKernels]
[./GlobalFreeEnergy]
variable = Fglobal
type = KKSGlobalFreeEnergy
fa_name = fm
fb_name = fd
w = 0.4
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pctype -sub_pc_type -sub_pc_factor_shift_type -pc_factor_shift_type'
petsc_options_value = ' asm lu nonzero nonzero'
l_max_its = 100
nl_max_its = 100
num_steps = 3
dt = 0.1
[]
#
# Precondition using handcoded off-diagonal terms
#
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[Outputs]
file_base = kks_example_offset
exodus = true
[]
(modules/solid_mechanics/test/tests/dynamics/acceleration_bc/AccelerationBC_test.i)
# Test for Acceleration boundary condition
# This test contains one brick element which is fixed in the y and z direction.
# Base acceleration is applied in the x direction to all nodes on the bottom surface (y=0).
# The PresetAcceleration converts the given acceleration to a displacement
# using Newmark time integration. This displacement is then prescribed on the boundary.
#
# Result: The acceleration at the bottom node should be same as the input acceleration
# which is a triangular function with peak at t = 0.2 in this case. Width of the triangular function
# is 0.2 s.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 0.0
xmax = 0.1
ymin = 0.0
ymax = 1.0
zmin = 0.0
zmax = 0.1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[AuxVariables]
[./vel_x]
[../]
[./accel_x]
[../]
[./vel_y]
[../]
[./accel_y]
[../]
[./vel_z]
[../]
[./accel_z]
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[SolidMechanics]
[../]
[./inertia_x]
type = InertialForce
variable = disp_x
velocity = vel_x
acceleration = accel_x
beta = 0.25
gamma = 0.5
[../]
[./inertia_y]
type = InertialForce
variable = disp_y
velocity = vel_y
acceleration = accel_y
beta = 0.25
gamma = 0.5
[../]
[./inertia_z]
type = InertialForce
variable = disp_z
velocity = vel_z
acceleration = accel_z
beta = 0.25
gamma = 0.5
[../]
[]
[AuxKernels]
[./accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = timestep_end
[../]
[./vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = timestep_end
[../]
[./accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = timestep_end
[../]
[./vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = timestep_end
[../]
[./accel_z]
type = NewmarkAccelAux
variable = accel_z
displacement = disp_z
velocity = vel_z
beta = 0.25
execute_on = timestep_end
[../]
[./vel_z]
type = NewmarkVelAux
variable = vel_z
acceleration = accel_z
gamma = 0.5
execute_on = timestep_end
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 0
index_j = 1
[../]
[./strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yy
index_i = 0
index_j = 1
[../]
[]
[Functions]
[./acceleration_bottom]
type = PiecewiseLinear
data_file = acceleration.csv
format = columns
[../]
[]
[BCs]
[./top_y]
type = DirichletBC
variable = disp_y
boundary = top
value=0.0
[../]
[./top_z]
type = DirichletBC
variable = disp_z
boundary = top
value=0.0
[../]
[./bottom_y]
type = DirichletBC
variable = disp_y
boundary = bottom
value=0.0
[../]
[./bottom_z]
type = DirichletBC
variable = disp_z
boundary = bottom
value=0.0
[../]
[./preset_accelertion]
type = PresetAcceleration
boundary = bottom
function = acceleration_bottom
variable = disp_x
beta = 0.25
acceleration = accel_x
velocity = vel_x
[../]
[]
[Materials]
[./Elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric_isotropic
C_ijkl = '210e9 0'
[../]
[./strain]
type = ComputeSmallStrain
[../]
[./stress]
type = ComputeLinearElasticStress
[../]
[./density]
type = GenericConstantMaterial
prop_names = 'density'
prop_values = '7750'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 101'
start_time = 0
end_time = 2.0
dt = 0.01
dtmin = 0.01
nl_abs_tol = 1e-8
nl_rel_tol = 1e-8
l_tol = 1e-8
timestep_tolerance = 1e-8
[]
[Postprocessors]
[./_dt]
type = TimestepSize
[../]
[./disp]
type = NodalVariableValue
variable = disp_x
nodeid = 1
[../]
[./vel]
type = NodalVariableValue
variable = vel_x
nodeid = 1
[../]
[./accel]
type = NodalVariableValue
variable = accel_x
nodeid = 1
[../]
[]
[Outputs]
exodus = true
perf_graph = true
[]
(test/tests/userobjects/element_subdomain_modifier/stateful_property.i)
[Problem]
solve = false
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 16
ny = 16
[]
[left]
type = SubdomainBoundingBoxGenerator
input = 'gen'
block_id = 1
bottom_left = '0 0 0'
top_right = '0.25 1 1'
[]
[right]
type = SubdomainBoundingBoxGenerator
input = 'left'
block_id = 2
bottom_left = '0.25 0 0'
top_right = '1 1 1'
[]
[]
[UserObjects]
[moving_circle]
type = CoupledVarThresholdElementSubdomainModifier
coupled_var = 'phi'
block = 2
criterion_type = BELOW
threshold = 0
subdomain_id = 1
moving_boundary_name = moving_boundary
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[Functions]
[moving_circle]
type = ParsedFunction
expression = '(x-t)^2+(y)^2-0.5^2'
[]
[]
[AuxVariables]
[phi]
[]
[]
[AuxKernels]
[phi]
type = FunctionAux
variable = phi
function = moving_circle
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[Materials]
[stateful]
type = StatefulMaterial
initial_diffusivity = 0.5
multiplier = 2
block = 1
outputs = exodus
[]
[non_stateful]
type = GenericConstantMaterial
prop_names = 'diffusivity'
prop_values = '0.5'
block = 2
outputs = exodus
[]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 3
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/dynamics/prescribed_displacement/3D_QStatic_1_Ramped_Displacement_with_gravity.i)
# One 3D element under ramped displacement loading.
#
# loading in z direction:
# time : 0.0 0.1 0.2 0.3
# disp : 0.0 0.0 -0.01 -0.01
# Gravity is applied in y direction. To equilibrate the system
# under gravity, a static analysis is run in the first time step
# by turning off the inertial terms. (see controls block and
# DynamicSolidMechanics block).
# Result: The displacement at the top node in the z direction should match
# the prescribed displacement. Also, the z acceleration should
# be two triangular pulses, one peaking at 0.1 and another peaking at
# 0.2.
# The y displacement would be offset by the gravity displacement.
# Also the y acceleration and velocity should be zero until the loading in
# the z direction starts (i.e, until 0.1s)
# Note: The time step used in the displacement data file should match
# the simulation time step (dt and dtmin in the Executioner block).
[Mesh]
type = GeneratedMesh
dim = 3 # Dimension of the mesh
nx = 1 # Number of elements in the x direction
ny = 1 # Number of elements in the y direction
nz = 1 # Number of elements in the z direction
xmin = 0.0
xmax = 1
ymin = 0.0
ymax = 1
zmin = 0.0
zmax = 1
allow_renumbering = false # So NodalVariableValue can index by id
[]
[Variables] # variables that are solved
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[AuxVariables] # variables that are calculated for output
[./accel_x]
[../]
[./vel_x]
[../]
[./accel_y]
[../]
[./vel_y]
[../]
[./accel_z]
[../]
[./vel_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_zz]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./DynamicSolidMechanics] # zeta*K*vel + K * disp
displacements = 'disp_x disp_y disp_z'
stiffness_damping_coefficient = 0.000025
static_initialization = true #turns off rayliegh damping for the first time step to stabilize system under gravity
[../]
[./inertia_x] # M*accel + eta*M*vel
type = InertialForce
variable = disp_x
velocity = vel_x
acceleration = accel_x
beta = 0.25 # Newmark time integration
gamma = 0.5 # Newmark time integration
eta = 19.63
[../]
[./inertia_y]
type = InertialForce
variable = disp_y
velocity = vel_y
acceleration = accel_y
beta = 0.25
gamma = 0.5
eta = 19.63
[../]
[./inertia_z]
type = InertialForce
variable = disp_z
velocity = vel_z
acceleration = accel_z
beta = 0.25
gamma = 0.5
eta = 19.63
[../]
[./gravity]
type = Gravity
variable = disp_y
value = -9.81
[../]
[]
[AuxKernels]
[./accel_x] # Calculates and stores acceleration at the end of time step
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = timestep_end
[../]
[./vel_x] # Calculates and stores velocity at the end of the time step
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = timestep_end
[../]
[./accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = timestep_end
[../]
[./vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = timestep_end
[../]
[./accel_z]
type = NewmarkAccelAux
variable = accel_z
displacement = disp_z
velocity = vel_z
beta = 0.25
execute_on = timestep_end
[../]
[./vel_z]
type = NewmarkVelAux
variable = vel_z
acceleration = accel_z
gamma = 0.5
execute_on = timestep_end
[../]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./strain_xx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xx
index_i = 0
index_j = 0
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yy
index_i = 1
index_j = 1
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./strain_zz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_zz
index_i = 2
index_j = 2
[../]
[]
[Functions]
[./displacement_front]
type = PiecewiseLinear
data_file = 'displacement.csv'
format = columns
[../]
[]
[BCs]
[./prescribed_displacement]
type = PresetDisplacement
variable = disp_z
velocity = vel_z
acceleration = accel_z
beta = 0.25
boundary = front
function = displacement_front
[../]
[./anchor_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./anchor_y]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./anchor_z]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor]
youngs_modulus = 325e6 #Pa
poissons_ratio = 0.3
type = ComputeIsotropicElasticityTensor
block = 0
[../]
[./strain]
#Computes the strain, assuming small strains
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[../]
[./stress]
#Computes the stress, using linear elasticity
type = ComputeLinearElasticStress
block = 0
[../]
[./density]
type = GenericConstantMaterial
block = 0
prop_names = density
prop_values = 2000 #kg/m3
[../]
[]
[Controls] # turns off inertial terms for the first time step
[./period0]
type = TimePeriod
disable_objects = '*/vel_x */vel_y */vel_z */accel_x */accel_y */accel_z */inertia_x */inertia_y */inertia_z'
start_time = 0.0
end_time = 0.1 # dt used in the simulation
[../]
[../]
[Executioner]
type = Transient
start_time = 0
end_time = 3.0
l_tol = 1e-6
nl_rel_tol = 1e-6
nl_abs_tol = 1e-6
dt = 0.1
timestep_tolerance = 1e-6
[]
[Postprocessors] # These quantites are printed to a csv file at every time step
[./_dt]
type = TimestepSize
[../]
[./accel_6x]
type = NodalVariableValue
nodeid = 6
variable = accel_x
[../]
[./accel_6y]
type = NodalVariableValue
nodeid = 6
variable = accel_y
[../]
[./accel_6z]
type = NodalVariableValue
nodeid = 6
variable = accel_z
[../]
[./vel_6x]
type = NodalVariableValue
nodeid = 6
variable = vel_x
[../]
[./vel_6y]
type = NodalVariableValue
nodeid = 6
variable = vel_y
[../]
[./vel_6z]
type = NodalVariableValue
nodeid = 6
variable = vel_z
[../]
[./disp_6x]
type = NodalVariableValue
nodeid = 6
variable = disp_x
[../]
[./disp_6y]
type = NodalVariableValue
nodeid = 6
variable = disp_y
[../]
[./disp_6z]
type = NodalVariableValue
nodeid = 6
variable = disp_z
[../]
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/chemical_reactions/test/tests/jacobian/2species.i)
# Tests the Jacobian when no secondary species are present
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
[]
[Variables]
[./a]
order = FIRST
family = LAGRANGE
[../]
[./b]
order = FIRST
family = LAGRANGE
[../]
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./pressure]
type = RandomIC
variable = pressure
max = 10
min = 1
[../]
[./a]
type = RandomIC
variable = a
max = 1
min = 0
[../]
[./b]
type = RandomIC
variable = b
max = 1
min = 0
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./a_diff]
type = PrimaryDiffusion
variable = a
[../]
[./a_conv]
type = PrimaryConvection
variable = a
p = pressure
[../]
[./b_ie]
type = PrimaryTimeDerivative
variable = b
[../]
[./b_diff]
type = PrimaryDiffusion
variable = b
[../]
[./b_conv]
type = PrimaryConvection
variable = b
p = pressure
[../]
[./pressure]
type = DarcyFluxPressure
variable = pressure
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity'
prop_values = '1e-4 1e-4 0.2'
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
end_time = 1
[]
[Outputs]
perf_graph = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
(modules/phase_field/test/tests/phase_field_kernels/SplitCHWRes.i)
#
# Test the split parsed function free enery Cahn-Hilliard Bulk kernel
# with two concentration variables and coupling through off-diagonal Onsager
# matrix coefficients
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmin = 0
xmax = 60
ymin = 0
ymax = 60
elem_type = QUAD4
[]
[Variables]
[./c1]
[./InitialCondition]
type = FunctionIC
function = 'cos(x/60*pi)'
[../]
[../]
[./c2]
[./InitialCondition]
type = FunctionIC
function = 'cos(y/60*pi)'
[../]
[../]
[./w1]
[../]
[./w2]
[../]
[]
[Kernels]
[./c1_res]
type = SplitCHParsed
variable = c1
f_name = F
kappa_name = kappa_c
w = w1
[../]
[./w11_res]
type = SplitCHWRes
variable = w1
mob_name = M11
[../]
[./w12_res]
type = SplitCHWRes
variable = w1
w = w2
mob_name = M12
[../]
[./c2_res]
type = SplitCHParsed
variable = c2
f_name = F
kappa_name = kappa_c
w = w2
[../]
[./w22_res]
type = SplitCHWRes
variable = w2
mob_name = M22
[../]
[./w21_res]
type = SplitCHWRes
variable = w2
w = w1
mob_name = M21
[../]
[./time1]
type = CoupledTimeDerivative
variable = w1
v = c1
[../]
[./time2]
type = CoupledTimeDerivative
variable = w2
v = c2
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M11 M12 M21 M22 kappa_c'
prop_values = '10 2.5 20 5 40'
[../]
[./free_energy]
# equivalent to `MathFreeEnergy`
type = DerivativeParsedMaterial
property_name = F
coupled_variables = 'c1 c2'
expression = '0.25*(1+c1)^2*(1-c1)^2 + 0.25*(1+c2)^2*(1-c2)^2'
derivative_order = 2
[../]
[]
[Preconditioning]
# active = ' '
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'NEWTON'
petsc_options_iname = -pc_type
petsc_options_value = lu
l_max_its = 30
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 2
dt = 10
[]
[Outputs]
exodus = true
[]
(modules/phase_field/examples/kim-kim-suzuki/kks_example_noflux.i)
#
# KKS simple example in the split form
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 150
ny = 15
nz = 0
xmin = -25
xmax = 25
ymin = -2.5
ymax = 2.5
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[AuxVariables]
[./Fglobal]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Variables]
# order parameter
[./eta]
order = FIRST
family = LAGRANGE
[../]
# solute concentration
[./c]
order = FIRST
family = LAGRANGE
[../]
# chemical potential
[./w]
order = FIRST
family = LAGRANGE
[../]
# Liquid phase solute concentration
[./cl]
order = FIRST
family = LAGRANGE
initial_condition = 0.1
[../]
# Solid phase solute concentration
[./cs]
order = FIRST
family = LAGRANGE
initial_condition = 0.9
[../]
[]
[Functions]
[./ic_func_eta]
type = ParsedFunction
expression = '0.5*(1.0-tanh((x)/sqrt(2.0)))'
[../]
[./ic_func_c]
type = ParsedFunction
expression = '0.9*(0.5*(1.0-tanh(x/sqrt(2.0))))^3*(6*(0.5*(1.0-tanh(x/sqrt(2.0))))^2-15*(0.5*(1.0-tanh(x/sqrt(2.0))))+10)+0.1*(1-(0.5*(1.0-tanh(x/sqrt(2.0))))^3*(6*(0.5*(1.0-tanh(x/sqrt(2.0))))^2-15*(0.5*(1.0-tanh(x/sqrt(2.0))))+10))'
[../]
[]
[ICs]
[./eta]
variable = eta
type = FunctionIC
function = ic_func_eta
[../]
[./c]
variable = c
type = FunctionIC
function = ic_func_c
[../]
[]
[Materials]
# Free energy of the liquid
[./fl]
type = DerivativeParsedMaterial
property_name = fl
coupled_variables = 'cl'
expression = '(0.1-cl)^2'
[../]
# Free energy of the solid
[./fs]
type = DerivativeParsedMaterial
property_name = fs
coupled_variables = 'cs'
expression = '(0.9-cs)^2'
[../]
# h(eta)
[./h_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta
[../]
# g(eta)
[./g_eta]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta
[../]
# constant properties
[./constants]
type = GenericConstantMaterial
prop_names = 'M L eps_sq'
prop_values = '0.7 0.7 1.0 '
[../]
[]
[Kernels]
active = 'PhaseConc ChemPotSolute CHBulk ACBulkF ACBulkC ACInterface dcdt detadt ckernel'
# enforce c = (1-h(eta))*cl + h(eta)*cs
[./PhaseConc]
type = KKSPhaseConcentration
ca = cl
variable = cs
c = c
eta = eta
[../]
# enforce pointwise equality of chemical potentials
[./ChemPotSolute]
type = KKSPhaseChemicalPotential
variable = cl
cb = cs
fa_name = fl
fb_name = fs
[../]
#
# Cahn-Hilliard Equation
#
[./CHBulk]
type = KKSSplitCHCRes
variable = c
ca = cl
fa_name = fl
w = w
[../]
[./dcdt]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./ckernel]
type = SplitCHWRes
mob_name = M
variable = w
[../]
#
# Allen-Cahn Equation
#
[./ACBulkF]
type = KKSACBulkF
variable = eta
fa_name = fl
fb_name = fs
w = 1.0
coupled_variables = 'cl cs'
[../]
[./ACBulkC]
type = KKSACBulkC
variable = eta
ca = cl
cb = cs
fa_name = fl
[../]
[./ACInterface]
type = ACInterface
variable = eta
kappa_name = eps_sq
[../]
[./detadt]
type = TimeDerivative
variable = eta
[../]
[]
[AuxKernels]
[./GlobalFreeEnergy]
variable = Fglobal
type = KKSGlobalFreeEnergy
fa_name = fl
fb_name = fs
w = 1.0
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'asm ilu nonzero'
l_max_its = 100
nl_max_its = 100
num_steps = 50
dt = 0.1
[]
#
# Precondition using handcoded off-diagonal terms
#
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[VectorPostprocessors]
[./c]
type = LineValueSampler
start_point = '-25 0 0'
end_point = '25 0 0'
variable = c
num_points = 151
sort_by = id
execute_on = timestep_end
[../]
[./eta]
type = LineValueSampler
start_point = '-25 0 0'
end_point = '25 0 0'
variable = eta
num_points = 151
sort_by = id
execute_on = timestep_end
[../]
[]
[Outputs]
exodus = true
[./csv]
type = CSV
execute_on = final
[../]
[]
(test/tests/dirackernels/multiplicity/multiplicity.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 2
ny = 2
elem_type = QUAD4
uniform_refine = 2
[]
[Variables]
[./u1]
[../]
[./u2]
[../]
[./u3]
[../]
[]
[Kernels]
[./diff1]
type = Diffusion
variable = u1
[../]
[./diff2]
type = Diffusion
variable = u2
[../]
[./diff3]
type = Diffusion
variable = u3
[../]
[./dt1]
type = TimeDerivative
variable = u1
[../]
[./dt2]
type = TimeDerivative
variable = u2
[../]
[./dt3]
type = TimeDerivative
variable = u3
[../]
[]
[DiracKernels]
[./material_source1]
type = MaterialMultiPointSource
variable = u1
points = '0.2 0.3 0.0
0.7 0.5 0.0'
[../]
[./material_source2]
type = MaterialMultiPointSource
variable = u2
points = '0.2 0.3 0.0
0.2 0.3 0.0'
[../]
[./material_source3]
type = MaterialMultiPointSource
variable = u3
drop_duplicate_points = false
points = '0.2 0.3 0.0
0.2 0.3 0.0'
[../]
[]
[Postprocessors]
[./u1]
type = ElementIntegralVariablePostprocessor
variable = u1
[../]
[./u2]
type = ElementIntegralVariablePostprocessor
variable = u2
[../]
[./u3]
type = ElementIntegralVariablePostprocessor
variable = u3
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
prop_names = matp
prop_values = 1.0
[../]
[]
[Executioner]
type = Transient
dt = 0.1
num_steps = 1
[]
[Outputs]
csv = true
print_linear_residuals = false
[]
(modules/phase_field/test/tests/KKS_system/lagrange_multiplier.i)
#
# This test ensures that the equilibrium solution using two order parameters with a
# Lagrange multiplier constraint is identical to the dedicated two phase formulation
# in two_phase.i
#
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmax = 5
[]
[AuxVariables]
[Fglobal]
order = CONSTANT
family = MONOMIAL
[]
[]
[Variables]
# concentration
[c]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = FunctionIC
function = x/5
[]
[]
# order parameter 1
[eta1]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[]
# order parameter 2
[eta2]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[]
# phase concentration 1
[c1]
order = FIRST
family = LAGRANGE
initial_condition = 0.2
[]
# phase concentration 2
[c2]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[]
# Lagrange multiplier
[lambda]
order = FIRST
family = LAGRANGE
initial_condition = 0.0
[]
[]
[Materials]
# simple toy free energies
[f1] # = fd
type = DerivativeParsedMaterial
property_name = F1
coupled_variables = 'c1'
expression = '(0.9-c1)^2'
[]
[f2] # = fm
type = DerivativeParsedMaterial
property_name = F2
coupled_variables = 'c2'
expression = '(0.1-c2)^2'
[]
# Switching functions for each phase
[h1_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta1
function_name = h1
[]
[h2_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta2
function_name = h2
[]
# Coefficients for diffusion equation
[Dh1]
type = DerivativeParsedMaterial
material_property_names = 'D h1'
expression = D*h1
property_name = Dh1
[]
[Dh2]
type = DerivativeParsedMaterial
material_property_names = 'D h2'
expression = D*h2
property_name = Dh2
[]
# Barrier functions for each phase
[g1]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta1
function_name = g1
[]
[g2]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta2
function_name = g2
[]
# constant properties
[constants]
type = GenericConstantMaterial
prop_names = 'D L kappa'
prop_values = '0.7 0.7 0.2'
[]
[]
[Kernels]
#Kernels for diffusion equation
[diff_time]
type = TimeDerivative
variable = c
[]
[diff_c1]
type = MatDiffusion
variable = c
diffusivity = Dh1
v = c1
[]
[diff_c2]
type = MatDiffusion
variable = c
diffusivity = Dh2
v = c2
[]
# Kernels for Allen-Cahn equation for eta1
[deta1dt]
type = TimeDerivative
variable = eta1
[]
[ACBulkF1]
type = KKSMultiACBulkF
variable = eta1
Fj_names = 'F1 F2 '
hj_names = 'h1 h2 '
gi_name = g1
eta_i = eta1
wi = 0.2
coupled_variables = 'c1 c2 eta2'
[]
[ACBulkC1]
type = KKSMultiACBulkC
variable = eta1
Fj_names = 'F1 F2'
hj_names = 'h1 h2'
cj_names = 'c1 c2'
eta_i = eta1
coupled_variables = 'eta2'
[]
[ACInterface1]
type = ACInterface
variable = eta1
kappa_name = kappa
[]
[multipler1]
type = MatReaction
variable = eta1
v = lambda
mob_name = L
[]
# Kernels for the Lagrange multiplier equation
[mult_lambda]
type = MatReaction
variable = lambda
mob_name = 2
[]
[mult_ACBulkF_1]
type = KKSMultiACBulkF
variable = lambda
Fj_names = 'F1 F2 '
hj_names = 'h1 h2 '
gi_name = g1
eta_i = eta1
wi = 0.2
mob_name = 1
coupled_variables = 'c1 c2 eta2 '
[]
[mult_ACBulkC_1]
type = KKSMultiACBulkC
variable = lambda
Fj_names = 'F1 F2'
hj_names = 'h1 h2'
cj_names = 'c1 c2'
eta_i = eta1
coupled_variables = 'eta2 '
mob_name = 1
[]
[mult_CoupledACint_1]
type = SimpleCoupledACInterface
variable = lambda
v = eta1
kappa_name = kappa
mob_name = 1
[]
[mult_ACBulkF_2]
type = KKSMultiACBulkF
variable = lambda
Fj_names = 'F1 F2 '
hj_names = 'h1 h2 '
gi_name = g2
eta_i = eta2
wi = 0.2
mob_name = 1
coupled_variables = 'c1 c2 eta1 '
[]
[mult_ACBulkC_2]
type = KKSMultiACBulkC
variable = lambda
Fj_names = 'F1 F2'
hj_names = 'h1 h2'
cj_names = 'c1 c2'
eta_i = eta2
coupled_variables = 'eta1 '
mob_name = 1
[]
[mult_CoupledACint_2]
type = SimpleCoupledACInterface
variable = lambda
v = eta2
kappa_name = kappa
mob_name = 1
[]
# Kernels for constraint equation eta1 + eta2 = 1
# eta2 is the nonlinear variable for the constraint equation
[eta2reaction]
type = MatReaction
variable = eta2
mob_name = 1
[]
[eta1reaction]
type = MatReaction
variable = eta2
v = eta1
mob_name = 1
[]
[one]
type = BodyForce
variable = eta2
value = -1.0
[]
# Phase concentration constraints
[chempot12]
type = KKSPhaseChemicalPotential
variable = c1
cb = c2
fa_name = F1
fb_name = F2
[]
[phaseconcentration]
type = KKSMultiPhaseConcentration
variable = c2
cj = 'c1 c2'
hj_names = 'h1 h2'
etas = 'eta1 eta2'
c = c
[]
[]
[AuxKernels]
[Fglobal_total]
type = KKSMultiFreeEnergy
Fj_names = 'F1 F2 '
hj_names = 'h1 h2 '
gj_names = 'g1 g2 '
variable = Fglobal
w = 0.2
interfacial_vars = 'eta1 eta2 '
kappa_names = 'kappa kappa'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -sub_pc_factor_shift_type'
petsc_options_value = 'lu nonzero'
l_max_its = 30
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-11
num_steps = 35
dt = 10
[]
[VectorPostprocessors]
[c]
type = LineValueSampler
variable = c
start_point = '0 0 0'
end_point = '5 0 0'
num_points = 21
sort_by = x
[]
[]
[Outputs]
csv = true
execute_on = FINAL
[]
(test/tests/materials/stateful_prop/stateful_prop_on_bnd_only.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 10
nx = 10
ny = 10
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./heat]
type = MatDiffusionTest
variable = u
prop_name = thermal_conductivity
[../]
[./ie]
type = TimeDerivative
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0.0
[../]
[./right]
type = MTBC
variable = u
boundary = right
grad = 1.0
prop_name = thermal_conductivity
[../]
[]
[Materials]
[./volatile]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity'
prop_values = 10
block = 0
[../]
[./stateful_on_boundary]
type = StatefulSpatialTest
boundary = right
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = .1
[]
[Outputs]
file_base = out_bnd_only
exodus = true
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_3d/phy.conservation.i)
# Testing energy conservation with fluid at rest
P_hf = ${fparse 0.6 * sin (pi/24)}
[GlobalParams]
gravity_vector = '0 0 0'
[]
[Materials]
[mat]
type = ADGenericConstantMaterial
block = 'blk:0'
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '1000 100 30'
[]
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Functions]
[T_init]
type = ParsedFunction
expression = '1000*y+300+30*z'
[]
[]
[Components]
[in1]
type = SolidWall1Phase
input = 'fch1:in'
[]
[fch1]
type = FlowChannel1Phase
position = '0.15 0 0'
orientation = '0 0 1'
fp = fp
n_elems = 10
length = 1
initial_T = 300
initial_p = 1.01e5
initial_vel = 0
closures = simple_closures
A = 0.00314159
f = 0.0
[]
[out1]
type = SolidWall1Phase
input = 'fch1:out'
[]
[in2]
type = SolidWall1Phase
input = 'fch2:in'
[]
[fch2]
type = FlowChannel1Phase
position = '0 0.15 0'
orientation = '0 0 1'
fp = fp
n_elems = 10
length = 1
initial_T = 350
initial_p = 1.01e5
initial_vel = 0
closures = simple_closures
A = 0.00314159
f = 0.0
[]
[out2]
type = SolidWall1Phase
input = 'fch2:out'
[]
[blk]
type = HeatStructureFromFile3D
file = mesh.e
position = '0 0 0'
initial_T = T_init
[]
[ht]
type = HeatTransferFromHeatStructure3D1Phase
flow_channels = 'fch1 fch2'
hs = blk
boundary = blk:rmin
Hw = 10000
P_hf = ${P_hf}
[]
[]
[Postprocessors]
[energy_hs]
type = ADHeatStructureEnergy3D
block = blk:0
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_fch1]
type = ElementIntegralVariablePostprocessor
block = fch1
variable = rhoEA
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_fch2]
type = ElementIntegralVariablePostprocessor
block = fch2
variable = rhoEA
execute_on = 'INITIAL TIMESTEP_END'
[]
[total_energy]
type = SumPostprocessor
values = 'energy_fch1 energy_fch2 energy_hs'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change]
type = ChangeOverTimePostprocessor
change_with_respect_to_initial = true
postprocessor = total_energy
compute_relative_change = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
dt = 0.1
num_steps = 10
solve_type = NEWTON
line_search = basic
abort_on_solve_fail = true
nl_abs_tol = 1e-8
[]
[Outputs]
file_base = 'phy.conservation'
[csv]
type = CSV
show = 'energy_change'
execute_on = 'FINAL'
[]
[]
(modules/heat_transfer/test/tests/code_verification/cylindrical_test_no5.i)
# Problem II.5
#
# The volumetric heat generation in an infinitely long solid cylinder
# varies with spatial location. It has a constant thermal conductivity.
#
# REFERENCE:
# A. Toptan, et al. (Mar.2020). Tech. rep. CASL-U-2020-1939-000, SAND2020-3887 R. DOI:10.2172/1614683.
[Mesh]
[./geom]
type = GeneratedMeshGenerator
dim = 1
elem_type = EDGE2
nx = 1
[../]
[]
[Variables]
[./u]
order = FIRST
[../]
[]
[Problem]
coord_type = RZ
[]
[Functions]
[./volumetric_heat]
type = ParsedFunction
symbol_names = 'q ro beta'
symbol_values = '1200 1 0.1'
expression = 'q * (1-beta*x/ro)'
[../]
[./exact]
type = ParsedFunction
symbol_names = 'uo q k ro beta'
symbol_values = '300 1200 1 1 0.1'
expression = 'uo + (0.25*q*ro^2/k) * ( (1-(x/ro)^2) - (1-(x/ro)^3) * beta * 4/9 )'
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = u
[../]
[./heatsource]
type = HeatSource
function = volumetric_heat
variable = u
[../]
[]
[BCs]
[./uo]
type = DirichletBC
boundary = right
variable = u
value = 300
[../]
[]
[Materials]
[./property]
type = GenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '1.0 1.0 1.0'
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = exact
variable = u
[../]
[./h]
type = AverageElementSize
[]
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/central_difference/lumped/3D/3d_lumped_explicit.i)
# Test for the central difference time integrator in 3D.
[Mesh]
[./generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 1
ny = 1
nz = 2
xmin = 0.0
xmax = 1
ymin = 0.0
ymax = 1
zmin = 0.0
zmax = 2
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[]
[AuxVariables]
[./vel_x]
[../]
[./accel_x]
[../]
[./vel_y]
[../]
[./accel_y]
[../]
[./vel_z]
[../]
[./accel_z]
[../]
[]
[AuxKernels]
[./accel_x]
type = TestNewmarkTI
variable = accel_x
displacement = disp_x
first = false
[../]
[./vel_x]
type = TestNewmarkTI
variable = vel_x
displacement = disp_x
[../]
[./accel_y]
type = TestNewmarkTI
variable = accel_y
displacement = disp_y
first = false
[../]
[./vel_y]
type = TestNewmarkTI
variable = vel_y
displacement = disp_x
[../]
[./accel_z]
type = TestNewmarkTI
variable = accel_z
displacement = disp_z
first = false
[../]
[./vel_z]
type = TestNewmarkTI
variable = vel_z
displacement = disp_z
[../]
[]
[Kernels]
[./DynamicSolidMechanics]
displacements = 'disp_x disp_y disp_z'
[../]
[./inertia_x]
type = InertialForce
variable = disp_x
[../]
[./inertia_y]
type = InertialForce
variable = disp_y
[../]
[./inertia_z]
type = InertialForce
variable = disp_z
[../]
[]
[BCs]
[./x_bot]
type = FunctionDirichletBC
variable = disp_x
boundary = 'back'
function = dispx
preset = false
[../]
[./y_bot]
type = FunctionDirichletBC
variable = disp_y
boundary = 'back'
function = dispy
preset = false
[../]
[./z_bot]
type = FunctionDirichletBC
variable = disp_z
boundary = 'back'
function = dispz
preset = false
[../]
[]
[Functions]
[./dispx]
type = PiecewiseLinear
x = '0.0 1.0 2.0 3.0 4.0' # time
y = '0.0 1.0 0.0 -1.0 0.0' # displacement
[../]
[./dispy]
type = ParsedFunction
expression = 0.1*t*t*sin(10*t)
[../]
[./dispz]
type = ParsedFunction
expression = 0.1*t*t*sin(20*t)
[../]
[]
[Materials]
[./elasticity_tensor_block]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.25
block = 0
[../]
[./strain_block]
type = ComputeIncrementalSmallStrain
block = 0
displacements = 'disp_x disp_y disp_z'
implicit = false
[../]
[./stress_block]
type = ComputeFiniteStrainElasticStress
block = 0
[../]
[./density]
type = GenericConstantMaterial
block = 0
prop_names = density
prop_values = 1e4
[../]
[wave_speed]
type = WaveSpeed
[]
[]
[Executioner]
type = Transient
start_time = -0.01
end_time = 0.1
dt = 0.005
timestep_tolerance = 1e-6
[./TimeIntegrator]
type = CentralDifference
solve_type = lumped
[../]
[]
[Postprocessors]
[./accel_10x]
type = NodalVariableValue
nodeid = 10
variable = accel_x
[../]
[]
[Outputs]
exodus = false
csv = true
[]
(modules/phase_field/test/tests/free_energy_material/MathFreeEnergy_split.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
xmin = 0.0
xmax = 30.0
ymin = 0.0
ymax = 30.0
elem_type = QUAD4
[]
[Variables]
[./c]
[./InitialCondition]
type = CrossIC
x1 = 0.0
x2 = 30.0
y1 = 0.0
y2 = 30.0
[../]
[../]
[./w]
[../]
[]
[Preconditioning]
active = 'SMP'
[./PBP]
type = PBP
solve_order = 'w c'
preconditioner = 'AMG ASM'
off_diag_row = 'c '
off_diag_column = 'w '
[../]
[./SMP]
type = SMP
coupled_groups = 'c,w'
[../]
[]
[Kernels]
[./cres]
type = SplitCHParsed
variable = c
kappa_name = kappa_c
w = w
f_name = F
[../]
[./wres]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[]
[BCs]
[./Periodic]
[./top_bottom]
primary = 0
secondary = 2
translation = '0 30.0 0'
[../]
[./left_right]
primary = 1
secondary = 3
translation = '-30.0 0 0'
[../]
[../]
[]
[Materials]
[./constant]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1.0 2.0'
[../]
[./free_energy]
type = MathFreeEnergy
property_name = F
c = c
derivative_order = 2
[../]
[]
[Executioner]
type = Transient
scheme = 'BDF2'
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
l_max_its = 30
l_tol = 1.0e-3
nl_max_its = 50
nl_rel_tol = 1.0e-10
dt = 10.0
num_steps = 2
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/rz_cone_no_parts_steady.i)
# This input file tests several different things:
# .) The axisymmetric (RZ) form of the governing equations.
# .) An open boundary.
# .) Not integrating the pressure by parts, thereby requiring a pressure pin.
# .) Natural boundary condition at the outlet.
[GlobalParams]
integrate_p_by_parts = false
laplace = true
gravity = '0 0 0'
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = Newton
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Variables]
[./vel_x]
# Velocity in radial (r) direction
family = LAGRANGE
order = SECOND
[../]
[./vel_y]
# Velocity in axial (z) direction
family = LAGRANGE
order = SECOND
[../]
[./p]
family = LAGRANGE
order = FIRST
[../]
[]
[BCs]
[./p_corner]
# This is required, because pressure term is *not* integrated by parts.
type = DirichletBC
boundary = top_right
value = 0
variable = p
[../]
[./u_in]
type = DirichletBC
boundary = bottom
variable = vel_x
value = 0
[../]
[./v_in]
type = FunctionDirichletBC
boundary = bottom
variable = vel_y
function = 'inlet_func'
[../]
[./u_axis_and_walls]
type = DirichletBC
boundary = 'left right'
variable = vel_x
value = 0
[../]
[./v_no_slip]
type = DirichletBC
boundary = 'right'
variable = vel_y
value = 0
[../]
[]
[Kernels]
[./mass]
type = INSMassRZ
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
[./x_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./y_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 'volume'
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[../]
[]
(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/thermal_hydraulics/test/tests/components/file_mesh_component/file_mesh_component.i)
# This test solves two identical heat conduction problems, one created with THM
# components, and one with the constituent lower-level objects and FileMeshComponent.
rho = 8000
cp = 500
k = 15
initial_T = 1000
T_left = 1005
T_right = 300
htc_right = 1000
[Variables]
[T_moose]
block = 'hs_external:block_a'
initial_condition = ${initial_T}
[]
[]
[Kernels]
[time_derivative]
type = ADHeatConductionTimeDerivative
variable = T_moose
block = 'hs_external:block_a'
density_name = density
specific_heat = specific_heat
[]
[heat_conduction]
type = ADHeatConduction
variable = T_moose
block = 'hs_external:block_a'
thermal_conductivity = thermal_conductivity
[]
[]
[BCs]
[dirichlet_bc]
type = ADFunctionDirichletBC
variable = T_moose
boundary = 'hs_external:left'
function = ${T_left}
[]
[convection_bc]
type = ADConvectionHeatTransferBC
variable = T_moose
boundary = 'hs_external:right'
T_ambient = ${T_right}
htc_ambient = ${htc_right}
[]
[]
[Materials]
[prop_mat]
type = ADGenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '${rho} ${cp} ${k}'
[]
[]
[Components]
[hs_external]
type = FileMeshComponent
file = 'mesh_in.e'
position = '0 0 0'
[]
[hs]
type = HeatStructurePlate
position = '0 0 0'
orientation = '1 0 0'
length = 5.0
n_elems = 10
names = 'blk'
widths = '1.0'
n_part_elems = '2'
depth = 1.0
initial_T = ${initial_T}
[]
[start]
type = HSBoundarySpecifiedTemperature
hs = hs
boundary = 'hs:start'
T = ${T_left}
[]
[end]
type = HSBoundaryAmbientConvection
hs = hs
boundary = 'hs:end'
T_ambient = ${T_right}
htc_ambient = ${htc_right}
[]
[]
# Currently, there is no way to have a variable of the same name created in THM
# as one in MOOSE, even though they are on different blocks. Thus, we create a
# common variable name here and copy both variables into it for output.
[AuxVariables]
[T]
[]
[]
[AuxKernels]
[T_moose_ak]
type = CopyValueAux
variable = T
block = 'hs_external:block_a'
source = T_moose
execute_on = 'INITIAL TIMESTEP_END'
[]
[T_thm_ak]
type = CopyValueAux
variable = T
block = 'hs:blk'
source = T_solid
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 1.0
num_steps = 5
abort_on_solve_fail = true
solve_type = 'NEWTON'
[]
[Outputs]
[exodus]
type = Exodus
file_base = 'file_mesh_component'
show = 'T'
[]
[]
(modules/electromagnetics/test/tests/auxkernels/current_density/em_current_density.i)
# This test is a modification of the vector_helmholtz.vector_kernels test
# to verify functionality of the current density auxkernel for the case of
# a vector field variable in electromagnetic mode.
# Manufactured solution: u = y * x_hat - x * y_hat
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmin = -1
ymin = -1
elem_type = QUAD9
[]
[]
[Variables]
[u]
family = NEDELEC_ONE
order = FIRST
[]
[]
[AuxVariables]
[J]
family = NEDELEC_ONE
order = FIRST
[]
[]
[Kernels]
[curl_curl]
type = CurlCurlField
variable = u
[]
[coeff]
type = VectorFunctionReaction
variable = u
[]
[rhs]
type = VectorBodyForce
variable = u
function_x = 'y'
function_y = '-x'
[]
[]
[BCs]
[sides]
type = VectorCurlPenaltyDirichletBC
variable = u
function_x = 'y'
function_y = '-x'
penalty = 1e8
boundary = 'left right top bottom'
[]
[]
[AuxKernels]
[current_density]
type = ADCurrentDensity
variable = J
electrostatic = false
electric_field = u
[]
[]
[Materials] # THIS MATERIAL IS ONLY USED TO TEST THE CURRENT DENSITY CALCULATION
[conductivity] # Electrical conductivity for graphite at 293.15 K in S/m
type = ADGenericConstantMaterial # perpendicular to basal plane
prop_names = 'electrical_conductivity' # Citation: H. Pierson, "Handbook of carbon, graphite,
prop_values = 3.33e2 # diamond, and fullerenes: properties, processing,
[] # and applications," p. 61, William Andrew, 1993.
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
exodus = true
[]
(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
[]
(test/tests/vectorpostprocessors/1d_line_sampler/1d_line_sampler.i)
# Tests the ability of a line sampler to correctly sample a coincident line. In
# 1-D, it was found that sometimes only the first few elements would be found,
# due to floating point precision error in equality tests for the points. This
# test uses a mesh configuration for which this has occurred and ensures that
# the output CSV file contains all points for the LineMaterialRealSampler vector
# postprocessor.
my_xmax = 1.2
[Mesh]
type = GeneratedMesh
parallel_type = replicated # Until RayTracing.C is fixed
dim = 1
nx = 10
xmin = 0
xmax = ${my_xmax}
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Materials]
[./my_mat]
type = GenericConstantMaterial
prop_names = 'my_prop'
prop_values = 5
[../]
[]
[VectorPostprocessors]
[./my_vpp]
type = LineMaterialRealSampler
property = my_prop
start = '0 0 0'
end = '${my_xmax} 0 0'
sort_by = x
[../]
[]
[Outputs]
[./out]
type = CSV
execute_vector_postprocessors_on = 'timestep_end'
show = 'my_vpp'
precision = 5
[../]
[]
(modules/solid_mechanics/examples/coal_mining/fine.i)
# Strata deformation and fracturing around a coal mine - 3D model
#
# A "half model" is used. The mine is 400m deep and
# just the roof is studied (-400<=z<=0). The mining panel
# sits between 0<=x<=150, and 0<=y<=1000, so this simulates
# a coal panel that is 300m wide and 1000m long. The outer boundaries
# are 1km from the excavation boundaries.
#
# Time is meaningless in this example
# as quasi-static solutions are sought at each timestep, but
# the number of timesteps controls the resolution of the
# process.
#
# The boundary conditions for this simulation are:
# - disp_x = 0 at x=0 and x=1150
# - disp_y = 0 at y=-1000 and y=1000
# - disp_z = 0 at z=-400, but there is a time-dependent
# Young's modulus that simulates excavation
# - wc_x = 0 at y=-1000 and y=1000
# - wc_y = 0 at x=0 and x=1150
# That is, rollers on the sides, free at top,
# and prescribed at bottom in the unexcavated portion.
#
# The small strain formulation is used.
#
# All stresses are measured in MPa. The initial stress is consistent with
# the weight force from density 2500 kg/m^3, ie, stress_zz = 0.025*z MPa
# where gravity = 10 m.s^-2 = 1E-5 MPa m^2/kg. The maximum and minimum
# principal horizontal stresses are assumed to be equal to 0.8*stress_zz.
#
# Material properties:
# Young's modulus = 8 GPa
# Poisson's ratio = 0.25
# Cosserat layer thickness = 1 m
# Cosserat-joint normal stiffness = large
# Cosserat-joint shear stiffness = 1 GPa
# MC cohesion = 3 MPa
# MC friction angle = 37 deg
# MC dilation angle = 8 deg
# MC tensile strength = 1 MPa
# MC compressive strength = 100 MPa
# WeakPlane cohesion = 0.1 MPa
# WeakPlane friction angle = 30 deg
# WeakPlane dilation angle = 10 deg
# WeakPlane tensile strength = 0.1 MPa
# WeakPlane compressive strength = 100 MPa softening to 1 MPa at strain = 1
#
[Mesh]
[file]
type = FileMeshGenerator
file = mesh/fine.e
[]
[./xmin]
input = file
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
new_boundary = xmin
normal = '-1 0 0'
[../]
[./xmax]
input = xmin
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
new_boundary = xmax
normal = '1 0 0'
[../]
[./ymin]
input = xmax
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
new_boundary = ymin
normal = '0 -1 0'
[../]
[./ymax]
input = ymin
type = SideSetsAroundSubdomainGenerator
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
new_boundary = ymax
normal = '0 1 0'
[../]
[./zmax]
input = ymax
type = SideSetsAroundSubdomainGenerator
block = 30
new_boundary = zmax
normal = '0 0 1'
[../]
[./zmin]
input = zmax
type = SideSetsAroundSubdomainGenerator
block = 2
new_boundary = zmin
normal = '0 0 -1'
[../]
[./excav]
type = SubdomainBoundingBoxGenerator
input = zmin
block_id = 1
bottom_left = '0 0 -400'
top_right = '150 1000 -397'
[../]
[./roof]
type = SideSetsAroundSubdomainGenerator
block = 1
input = excav
new_boundary = roof
normal = '0 0 1'
[../]
[]
[GlobalParams]
perform_finite_strain_rotations = false
displacements = 'disp_x disp_y disp_z'
Cosserat_rotations = 'wc_x wc_y wc_z'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./wc_x]
[../]
[./wc_y]
[../]
[]
[Kernels]
[./cx_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_x
component = 0
[../]
[./cy_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_y
component = 1
[../]
[./cz_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_z
component = 2
[../]
[./x_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_x
displacements = 'wc_x wc_y wc_z'
component = 0
base_name = couple
[../]
[./y_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_y
displacements = 'wc_x wc_y wc_z'
component = 1
base_name = couple
[../]
[./x_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_x
component = 0
[../]
[./y_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_y
component = 1
[../]
[./gravity]
type = Gravity
use_displaced_mesh = false
variable = disp_z
value = -10E-6 # remember this is in MPa
[../]
[]
[AuxVariables]
[./wc_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[../]
[./stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[../]
[./stress_yx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yx
index_i = 1
index_j = 0
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[../]
[./stress_zx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zx
index_i = 2
index_j = 0
[../]
[./stress_zy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zy
index_i = 2
index_j = 1
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./mc_shear]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_internal_parameter
variable = mc_shear
[../]
[./mc_tensile]
type = MaterialStdVectorAux
index = 1
property = mc_plastic_internal_parameter
variable = mc_tensile
[../]
[./wp_shear]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_internal_parameter
variable = wp_shear
[../]
[./wp_tensile]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_internal_parameter
variable = wp_tensile
[../]
[./mc_shear_f]
type = MaterialStdVectorAux
index = 6
property = mc_plastic_yield_function
variable = mc_shear_f
[../]
[./mc_tensile_f]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_yield_function
variable = mc_tensile_f
[../]
[./wp_shear_f]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_yield_function
variable = wp_shear_f
[../]
[./wp_tensile_f]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_yield_function
variable = wp_tensile_f
[../]
[]
[BCs]
[./no_x]
type = DirichletBC
variable = disp_x
boundary = 'xmin xmax'
value = 0.0
[../]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = 'ymin ymax'
value = 0.0
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = zmin
value = 0.0
[../]
[./no_wc_x]
type = DirichletBC
variable = wc_x
boundary = 'ymin ymax'
value = 0.0
[../]
[./no_wc_y]
type = DirichletBC
variable = wc_y
boundary = 'xmin xmax'
value = 0.0
[../]
[./roof]
type = StickyBC
variable = disp_z
min_value = -3.0
boundary = roof
[../]
[]
[Functions]
[./ini_xx]
type = ParsedFunction
expression = '0.8*2500*10E-6*z'
[../]
[./ini_zz]
type = ParsedFunction
expression = '2500*10E-6*z'
[../]
[./excav_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax minval maxval slope'
symbol_values = '100.0 0 1000.0 1E-9 1 10'
# excavation face at ymin+(ymax-ymin)*min(t/end_t,1)
# slope is the distance over which the modulus reduces from maxval to minval
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),minval,if(y<ymin+(ymax-ymin)*min(t/end_t,1)+slope,minval+(maxval-minval)*(y-(ymin+(ymax-ymin)*min(t/end_t,1)))/slope,maxval))'
[../]
[./density_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax minval maxval'
symbol_values = '100.0 0 1000.0 0 2500'
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),minval,maxval)'
[../]
[]
[UserObjects]
[./mc_coh_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 2.99 # MPa
value_residual = 3.01 # MPa
rate = 1.0
[../]
[./mc_fric]
type = SolidMechanicsHardeningConstant
value = 0.65 # 37deg
[../]
[./mc_dil]
type = SolidMechanicsHardeningConstant
value = 0.15 # 8deg
[../]
[./mc_tensile_str_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 1.0 # MPa
value_residual = 1.0 # MPa
rate = 1.0
[../]
[./mc_compressive_str]
type = SolidMechanicsHardeningCubic
value_0 = 100 # Large!
value_residual = 100
internal_limit = 0.1
[../]
[./wp_coh_harden]
type = SolidMechanicsHardeningCubic
value_0 = 0.1
value_residual = 0.1
internal_limit = 10
[../]
[./wp_tan_fric]
type = SolidMechanicsHardeningConstant
value = 0.36 # 20deg
[../]
[./wp_tan_dil]
type = SolidMechanicsHardeningConstant
value = 0.18 # 10deg
[../]
[./wp_tensile_str_harden]
type = SolidMechanicsHardeningCubic
value_0 = 0.1
value_residual = 0.1
internal_limit = 10
[../]
[./wp_compressive_str_soften]
type = SolidMechanicsHardeningCubic
value_0 = 100
value_residual = 1
internal_limit = 1.0
[../]
[]
[Materials]
[./elasticity_tensor_0]
type = ComputeLayeredCosseratElasticityTensor
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
[../]
[./elasticity_tensor_1]
type = ComputeLayeredCosseratElasticityTensor
block = 1
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
elasticity_tensor_prefactor = excav_sideways
[../]
[./strain]
type = ComputeCosseratIncrementalSmallStrain
eigenstrain_names = ini_stress
[../]
[./ini_stress]
type = ComputeEigenstrainFromInitialStress
eigenstrain_name = ini_stress
initial_stress = 'ini_xx 0 0 0 ini_xx 0 0 0 ini_zz'
[../]
[./stress_0]
type = ComputeMultipleInelasticCosseratStress
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
inelastic_models = 'mc wp'
cycle_models = true
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[../]
[./stress_1]
type = ComputeMultipleInelasticCosseratStress
block = 1
inelastic_models = ''
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[../]
[./mc]
type = CappedMohrCoulombCosseratStressUpdate
warn_about_precision_loss = false
host_youngs_modulus = 8E3
host_poissons_ratio = 0.25
base_name = mc
tensile_strength = mc_tensile_str_strong_harden
compressive_strength = mc_compressive_str
cohesion = mc_coh_strong_harden
friction_angle = mc_fric
dilation_angle = mc_dil
max_NR_iterations = 100000
smoothing_tol = 0.1 # MPa # Must be linked to cohesion
yield_function_tol = 1E-9 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0
[../]
[./wp]
type = CappedWeakPlaneCosseratStressUpdate
warn_about_precision_loss = false
base_name = wp
cohesion = wp_coh_harden
tan_friction_angle = wp_tan_fric
tan_dilation_angle = wp_tan_dil
tensile_strength = wp_tensile_str_harden
compressive_strength = wp_compressive_str_soften
max_NR_iterations = 10000
tip_smoother = 0.1
smoothing_tol = 0.1 # MPa # Note, this must be tied to cohesion, otherwise get no possible return at cone apex
yield_function_tol = 1E-11 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0E-3
[../]
[./density_0]
type = GenericConstantMaterial
block = '2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30'
prop_names = density
prop_values = 2500
[../]
[./density_1]
type = GenericFunctionMaterial
block = 1
prop_names = density
prop_values = density_sideways
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[]
[]
[Postprocessors]
[./min_roof_disp]
type = NodalExtremeValue
boundary = roof
value_type = min
variable = disp_z
[../]
[./min_surface_disp]
type = NodalExtremeValue
boundary = zmax
value_type = min
variable = disp_z
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' bjacobi gmres 200'
line_search = bt
nl_abs_tol = 1e-3
nl_rel_tol = 1e-5
l_max_its = 30
nl_max_its = 1000
start_time = 0.0
dt = 0.5
end_time = 100.0
[]
[Outputs]
time_step_interval = 1
print_linear_residuals = false
exodus = true
csv = true
console = true
[]
(modules/phase_field/test/tests/conserved_noise/uniform.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmin = 0.0
xmax = 10.0
ymin = 0.0
ymax = 10.0
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
initial_condition = 0.9
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[]
[Preconditioning]
active = 'SMP'
[./SMP]
type = SMP
off_diag_row = 'w c'
off_diag_column = 'c w'
[../]
[]
[Kernels]
[./cres]
type = SplitCHMath
variable = c
kappa_name = kappa_c
w = w
[../]
[./wres]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./conserved_langevin]
type = ConservedLangevinNoise
amplitude = 0.5
variable = w
noise = uniform_noise
[]
[]
[BCs]
[./Periodic]
[./all]
variable = 'c w'
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./constant]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1.0 2.0'
[../]
[]
[UserObjects]
[./uniform_noise]
type = ConservedUniformNoise
[../]
[]
[Postprocessors]
[./total_c]
type = ElementIntegralVariablePostprocessor
execute_on = 'initial timestep_end'
variable = c
[../]
[]
[Executioner]
type = Transient
scheme = 'BDF2'
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
l_max_its = 30
l_tol = 1.0e-3
nl_max_its = 30
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-10
dt = 10.0
num_steps = 4
[]
[Outputs]
file_base = uniform
exodus = true
[./csv]
type = CSV
delimiter = ' '
[../]
[]
(modules/heat_transfer/test/tests/fvbcs/fv_radiative_heat_flux/test.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 5
ny = 5
xmax = 2
[]
[]
[Variables]
[u]
type = MooseVariableFVReal
initial_condition = 0.5
[]
[]
[FVKernels]
[diff_left]
type = FVDiffusion
variable = u
coeff = 4
[]
[gradient_creating]
type = FVBodyForce
variable = u
[]
[]
[FVBCs]
[left]
type = FVInfiniteCylinderRadiativeBC
variable = u
boundary = 'left'
boundary_radius = 1
cylinder_radius = 12
cylinder_emissivity = 0.4
[]
[top]
type = FVInfiniteCylinderRadiativeBC
variable = u
# Test setting it separately
temperature = 'u'
boundary = 'top'
boundary_radius = 1
cylinder_radius = 12
cylinder_emissivity = 0.4
[]
[other]
type = FVDirichletBC
variable = u
boundary = 'right bottom'
value = 0
[]
[]
[Materials]
[cht]
type = ADGenericConstantMaterial
prop_names = 'htc'
prop_values = '1'
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(test/tests/controls/syntax_based_naming_access/system_object_param.i)
[Mesh]
type = GeneratedMesh
dim = 2
elem_type = QUAD4
# use odd numbers so points do not fall on element boundaries
nx = 31
ny = 31
[]
[Variables]
[./diffused]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = diffused
[../]
[]
[DiracKernels]
[./test_object]
type = MaterialPointSource
point = '0.5 0.5 0'
variable = diffused
[../]
[]
[BCs]
[./bottom_diffused]
type = DirichletBC
variable = diffused
boundary = 'bottom'
value = 2
[../]
[./top_diffused]
type = DirichletBC
variable = diffused
boundary = 'top'
value = 0
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'matp'
prop_values = '1'
block = 0
[../]
[]
[Postprocessors]
[./test_object]
type = TestControlPointPP
function = '2*(x+y)'
point = '0.5 0.5 0'
[../]
[./other_point_test_object]
type = TestControlPointPP
function = '3*(x+y)'
point = '0.5 0.5 0'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
[Controls]
[./point_control]
type = TestControl
test_type = 'point'
parameter = 'DiracKernels/test_object/point'
execute_on = 'initial'
[../]
[]
(modules/heat_transfer/test/tests/parallel_element_pps_test/parallel_element_pps_test.i)
[Mesh]
file = block_map.e
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'heat ie'
[./heat]
type = HeatConduction
variable = u
[../]
[./ie]
type = SpecificHeatConductionTimeDerivative
variable = u
[../]
[]
[BCs]
active = 'bottom top'
[./bottom]
type = DirichletBC
variable = u
boundary = 1
value = 0.0
[../]
[./top]
type = DirichletBC
variable = u
boundary = 2
value = 1.0
[../]
[]
[Postprocessors]
active = 'p_1 p_2 p_3 p_all'
[./p_1]
type = ElementIntegralVariablePostprocessor
variable = u
block = '1'
[../]
[./p_2]
type = ElementIntegralVariablePostprocessor
variable = u
block = '2'
[../]
[./p_3]
type = ElementIntegralVariablePostprocessor
variable = u
block = '3'
[../]
[./p_all]
type = ElementIntegralVariablePostprocessor
variable = u
block = '1 2 3'
[../]
[]
[Materials]
[./constant]
type = GenericConstantMaterial
block = 1
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.0 1.0 1.0'
[../]
[./constant2]
type = GenericConstantMaterial
block = 2
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '0.8 0.8 0.8'
[../]
[./constant3]
type = GenericConstantMaterial
block = 3
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '5 5 5'
[../]
[]
[Executioner]
type = Transient
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 5
dt = .1
[]
[Outputs]
file_base = out
exodus = true
[]
(modules/stochastic_tools/test/tests/transfers/sampler_transfer_vector/sub.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 1
nx = 10
[]
# Give the far left element a block so that we can
# grab its value
[left_elem_block]
type = ParsedSubdomainMeshGenerator
input = gmg
combinatorial_geometry = 'x < 0.1'
block_id = 1
[]
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[prop_a]
family = MONOMIAL
order = CONSTANT
[]
[prop_b]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[prop_a]
type = MaterialRealAux
variable = prop_a
property = prop_a
[]
[prop_b]
type = MaterialRealAux
variable = prop_b
property = prop_b
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[time]
type = TimeDerivative
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.01
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Materials]
[mat]
type = GenericConstantMaterial
prop_names = 'prop_a prop_b'
prop_values = '100 200'
[]
[mat2]
type = GenericConstantMaterial
prop_names = 'prop_c prop_d prop_e'
prop_values = '300 400 500'
[]
[]
[Controls]
[stochastic]
type = SamplerReceiver
[]
[]
[Postprocessors]
[left_bc]
type = PointValue
point = '0 0 0'
variable = u
[]
[right_bc]
type = PointValue
point = '1 0 0'
variable = u
[]
[prop_a]
type = ElementAverageValue
variable = prop_a
block = 1
[]
[prop_b]
type = ElementAverageValue
variable = prop_b
block = 1
[]
[]
[Outputs]
csv = true
[]
(modules/chemical_reactions/test/tests/parser/kinetic_action.i)
# Test SolidKineticReactions parser
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Variables]
[./a]
initial_condition = 0.1
[../]
[./b]
initial_condition = 0.1
[../]
[./c]
initial_condition = 0.1
[../]
[./d]
initial_condition = 0.1
[../]
[]
[ReactionNetwork]
[./SolidKineticReactions]
primary_species = 'a b c d'
secondary_species = 'm1 m2 m3'
kin_reactions = '(1.0)a + (1.0)b = m1,
2c + 3d = m2,
a - 2c = m3'
log10_keq = '-8 -8 -8'
specific_reactive_surface_area = '1 2 3'
kinetic_rate_constant = '1e-8 2e-8 3e-8'
activation_energy = '1e4 2e4 3e4'
gas_constant = 8.314
reference_temperature = '298.15 298.15 298.15'
system_temperature = '298.15 298.15 298.15'
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./b_ie]
type = PrimaryTimeDerivative
variable = b
[../]
[./c_ie]
type = PrimaryTimeDerivative
variable = c
[../]
[./d_ie]
type = PrimaryTimeDerivative
variable = d
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = porosity
prop_values = 0.1
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
end_time = 1
l_tol = 1e-10
nl_rel_tol = 1e-10
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Outputs]
file_base = kinetic_out
exodus = true
perf_graph = true
print_linear_residuals = true
[]
(test/tests/materials/stateful_prop/implicit_stateful.i)
# This test checks that material properties are correctly implicitly be
# promoted to "stateful" when a stateful old or older value is requested for
# them even when the properties were never explicitly declared with old/older
# support. So the ImplicitStateful material simply requests stateful
# old/older values from a generic constant material that doesn't declare its
# material property with old/older support. This material adds the current
# simulation time to that to calculate its own material property. A second
# implicit stateful material requests the older value of the firsts stateful
# material - also not declared to support old/older as its material property
# value. The sequence of material properties generated by the second implicit
# stateful material should be delayed by the first's by one time step.
[Mesh]
type = GeneratedMesh
dim = 1
xmin = 0
xmax = 1
nx = 10
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxVariables]
[./prop1]
order = CONSTANT
family = MONOMIAL
[../]
[./prop2]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./prop1_output]
type = MaterialRealAux
variable = prop1
property = s1
[../]
[./prop2_output]
type = MaterialRealAux
variable = prop2
property = s2
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 'left'
value = 1.0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 'right'
value = 1.0
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'a'
prop_values = '.42'
[../]
[./stateful1]
type = ImplicitStateful
prop_name = 's1'
coupled_prop_name = 'a'
add_time = true
older = false
[../]
[./stateful2]
type = ImplicitStateful
prop_name = 's2'
coupled_prop_name = 's1'
add_time = false
older = false
[../]
[]
[Postprocessors]
[./integ1]
type = ElementAverageValue
variable = prop1
execute_on = 'initial timestep_end'
[../]
[./integ2]
type = ElementAverageValue
variable = prop2
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
start_time = 0
num_steps = 10
dt = 1
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/GrandPotentialPFM/GrandPotentialPFM.i)
# this input file test the implementation of the grand-potential phase-field model based on M.Plapp PRE 84,031601(2011)
# in this simple example, the liquid and solid free energies are parabola with the same curvature and the material properties are constant
# Note that this example also test The SusceptibilityTimeDerivative kernels
[Mesh]
type = GeneratedMesh
dim = 2
nx = 16
ny = 16
xmax = 32
ymax = 32
[]
[GlobalParams]
radius = 20.0
int_width = 4.0
x1 = 0
y1 = 0
[]
[Variables]
[./w]
[../]
[./eta]
[../]
[]
[ICs]
[./w]
type = SmoothCircleIC
variable = w
# note w = A*(c-cleq), A = 1.0, cleq = 0.0 ,i.e., w = c (in the matrix/liquid phase)
outvalue = -0.2
invalue = 0.2
[../]
[./eta]
type = SmoothCircleIC
variable = eta
outvalue = 0.0
invalue = 1.0
[../]
[]
[Kernels]
[./w_dot]
type = SusceptibilityTimeDerivative
variable = w
f_name = chi
coupled_variables = '' # in this case chi (the susceptibility) is simply a constant
[../]
[./Diffusion]
type = MatDiffusion
variable = w
diffusivity = D
args = ''
[../]
[./coupled_etadot]
type = CoupledSusceptibilityTimeDerivative
variable = w
v = eta
f_name = ft
coupled_variables = 'eta'
[../]
[./AC_bulk]
type = AllenCahn
variable = eta
f_name = F
coupled_variables = 'w'
[../]
[./AC_int]
type = ACInterface
variable = eta
[../]
[./e_dot]
type = TimeDerivative
variable = eta
[../]
[]
[Materials]
[./constants]
type = GenericConstantMaterial
prop_names = 'kappa_op D L chi cseq cleq A'
prop_values = '4.0 1.0 1.0 1.0 0.0 1.0 1.0'
[../]
[./liquid_GrandPotential]
type = DerivativeParsedMaterial
expression = '-0.5 * w^2/A - cleq * w'
coupled_variables = 'w'
property_name = f1
material_property_names = 'cleq A'
[../]
[./solid_GrandPotential]
type = DerivativeParsedMaterial
expression = '-0.5 * w^2/A - cseq * w'
coupled_variables = 'w'
property_name = f2
material_property_names = 'cseq A'
[../]
[./switching_function]
type = SwitchingFunctionMaterial
eta = eta
h_order = HIGH
[../]
[./barrier_function]
type = BarrierFunctionMaterial
eta = eta
[../]
[./cs]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = cs
material_property_names = 'A cseq'
expression = 'w/A + cseq' # since w = A*(c-cseq)
derivative_order = 2
[../]
[./cl]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = cl
material_property_names = 'A cleq'
expression = 'w/A + cleq' # since w = A*(c-cleq)
derivative_order = 2
[../]
[./total_GrandPotential]
type = DerivativeTwoPhaseMaterial
coupled_variables = 'w'
eta = eta
fa_name = f1
fb_name = f2
derivative_order = 2
W = 1.0
[../]
[./coupled_eta_function]
type = DerivativeParsedMaterial
expression = '(cs - cl) * dh'
coupled_variables = 'eta w'
property_name = ft
material_property_names = 'cs cl dh:=D[h,eta]'
derivative_order = 1
outputs = exodus
[../]
[./concentration]
type = ParsedMaterial
property_name = c
material_property_names = 'dF:=D[F,w]'
expression = '-dF'
outputs = exodus
[../]
[]
[Postprocessors]
[./C]
type = ElementIntegralMaterialProperty
mat_prop = c
execute_on = 'initial timestep_end'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
l_max_its = 15
l_tol = 1e-3
nl_max_its = 15
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
num_steps = 5
dt = 10.0
[]
[Outputs]
exodus = true
csv = true
execute_on = 'TIMESTEP_END'
[]
(modules/solid_mechanics/test/tests/dynamics/rayleigh_damping/rayleigh_hht_ti.i)
# Test for rayleigh damping implemented using HHT time integration
#
# The test is for an 1D bar element of unit length fixed on one end
# with a ramped pressure boundary condition applied to the other end.
# zeta and eta correspond to the stiffness and mass proportional rayleigh damping
# alpha, beta and gamma are HHT time integration parameters
# The equation of motion in terms of matrices is:
#
# M*accel + (eta*M+zeta*K)*[(1+alpha)vel-alpha vel_old]
# + alpha*(K*disp - K*disp_old) + K*disp = P(t+alpha dt)*Area
#
# Here M is the mass matrix, K is the stiffness matrix, P is the applied pressure
#
# This equation is equivalent to:
#
# density*accel + eta*density*[(1+alpha)vel-alpha vel_old]
# + zeta*[(1+alpha)*d/dt(Div stress)- alpha*d/dt(Div stress_old)]
# + alpha *(Div stress - Div stress_old) +Div Stress= P(t+alpha dt)
#
# The first two terms on the left are evaluated using the Inertial force kernel
# The next three terms on the left involving zeta and alpha are evaluated using
# the DynamicStressDivergenceTensors Kernel
# The residual due to Pressure is evaluated using Pressure boundary condition
#
# The system will come to steady state slowly after the pressure becomes constant.
# Alpha equal to zero will result in Newmark integration.
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
xmin = 0.0
xmax = 0.1
ymin = 0.0
ymax = 1.0
zmin = 0.0
zmax = 0.1
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[AuxVariables]
[vel_x]
[]
[accel_x]
[]
[vel_y]
[]
[accel_y]
[]
[vel_z]
[]
[accel_z]
[]
[stress_yy]
order = CONSTANT
family = MONOMIAL
[]
[strain_yy]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[DynamicSolidMechanics]
displacements = 'disp_x disp_y disp_z'
stiffness_damping_coefficient = 0.1
hht_alpha = 0.11
[]
[inertia_x]
type = InertialForce
variable = disp_x
eta = 0.1
alpha = 0.11
[]
[inertia_y]
type = InertialForce
variable = disp_y
eta = 0.1
alpha = 0.11
[]
[inertia_z]
type = InertialForce
variable = disp_z
eta = 0.1
alpha = 0.11
[]
[]
[AuxKernels]
[accel_x] # These auxkernels are only to check output
type = TestNewmarkTI
displacement = disp_x
variable = accel_x
first = false
[]
[accel_y]
type = TestNewmarkTI
displacement = disp_y
variable = accel_y
first = false
[]
[accel_z]
type = TestNewmarkTI
displacement = disp_z
variable = accel_z
first = false
[]
[vel_x]
type = TestNewmarkTI
displacement = disp_x
variable = vel_x
[]
[vel_y]
type = TestNewmarkTI
displacement = disp_y
variable = vel_y
[]
[vel_z]
type = TestNewmarkTI
displacement = disp_z
variable = vel_z
[]
[stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[]
[strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yy
index_i = 1
index_j = 1
[]
[]
[BCs]
[top_y]
type = DirichletBC
variable = disp_y
boundary = top
value = 0.0
[]
[top_x]
type = DirichletBC
variable = disp_x
boundary = top
value = 0.0
[]
[top_z]
type = DirichletBC
variable = disp_z
boundary = top
value = 0.0
[]
[bottom_x]
type = DirichletBC
variable = disp_x
boundary = bottom
value = 0.0
[]
[bottom_z]
type = DirichletBC
variable = disp_z
boundary = bottom
value = 0.0
[]
[Pressure]
[Side1]
boundary = bottom
function = pressure
displacements = 'disp_x disp_y disp_z'
factor = 1
hht_alpha = 0.11
[]
[]
[]
[Materials]
[Elasticity_tensor]
type = ComputeElasticityTensor
block = 0
fill_method = symmetric_isotropic
C_ijkl = '210e9 0'
[]
[strain]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y disp_z'
[]
[stress]
type = ComputeLinearElasticStress
block = 0
[]
[density]
type = GenericConstantMaterial
block = 0
prop_names = 'density'
prop_values = '7750'
[]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 2
dt = 0.1
# Time integrator scheme
scheme = "newmark-beta"
[]
[Functions]
[pressure]
type = PiecewiseLinear
x = '0.0 0.1 0.2 1.0 2.0 5.0'
y = '0.0 0.1 0.2 1.0 1.0 1.0'
scale_factor = 1e9
[]
[]
[Postprocessors]
[_dt]
type = TimestepSize
[]
[disp]
type = NodalExtremeValue
variable = disp_y
boundary = bottom
[]
[vel]
type = NodalExtremeValue
variable = vel_y
boundary = bottom
[]
[accel]
type = NodalExtremeValue
variable = accel_y
boundary = bottom
[]
[stress_yy]
type = ElementAverageValue
variable = stress_yy
[]
[strain_yy]
type = ElementAverageValue
variable = strain_yy
[]
[]
[Outputs]
file_base = 'rayleigh_hht_out'
exodus = true
perf_graph = true
[]
(modules/thermal_hydraulics/test/tests/materials/ad_convection_heat_flux_hs/ad_convection_heat_flux_hs.i)
# Gold value should be the following:
# q_wall = kappa * htc_wall * (T_wall - T)
# = 0.5 * 100 * (500 - 400)
# = 5000
[GlobalParams]
execute_on = 'initial'
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[Materials]
[props]
type = ADGenericConstantMaterial
prop_names = 'T T_wall htc_wall kappa'
prop_values = '400 500 100 0.5'
[]
[q_wall_mat]
type = ADConvectionHeatFluxHSMaterial
q_wall = q_wall_prop
T = T
T_wall = T_wall
htc_wall = htc_wall
kappa = kappa
[]
[]
[Executioner]
type = Steady
[]
[Problem]
solve = false
[]
[Postprocessors]
[q_wall_pp]
type = ADElementAverageMaterialProperty
mat_prop = q_wall_prop
[]
[]
[Outputs]
csv = true
[]
(test/tests/materials/multiple_materials/multiple_materials_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
ny = 3
nz = 0
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[Variables]
active = 'u v'
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./diff1]
order = CONSTANT
family = MONOMIAL
[../]
[./diff2]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff1]
type = DiffMKernel
variable = u
mat_prop = diff1
[../]
[./diff2]
type = DiffMKernel
variable = v
mat_prop = diff2
[../]
[]
[AuxKernels]
[./diff1]
type = MaterialRealAux
variable = diff1
property = diff1
[../]
[./diff2]
type = MaterialRealAux
variable = diff2
property = diff2
[../]
[]
[BCs]
# Mesh Generation produces boundaries in counter-clockwise fashion
[./left_u]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[./left_v]
type = DirichletBC
variable = v
boundary = 3
value = 1
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = 1
value = 0
[../]
[]
[Materials]
[./dm1]
type = GenericConstantMaterial
block = 0
prop_names = 'diff1'
prop_values = '2'
[../]
[./dm2]
type = GenericConstantMaterial
block = 0
prop_names = 'diff2'
prop_values = '4'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
file_base = out
[./exodus]
type = Exodus
elemental_as_nodal = true
[../]
[]
(test/tests/bcs/vectorpostprocessor/vectorpostprocessor.i)
[Mesh]
type = GeneratedMesh
nx = 10
ny = 10
xmax = 1
ymax = 1
dim = 2
[]
[Variables]
[./u]
[../]
[./v]
[../]
[]
[Kernels]
[./conv]
type = ConservativeAdvection
variable = u
velocity = '0 1 0'
[../]
[./diff]
type = Diffusion
variable = u
[../]
[./src]
type = BodyForce
variable = u
function = ffn
[../]
[./diffv]
type = Diffusion
variable = v
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = bottom
value = 2
[../]
[./right]
type = ChannelGradientBC
variable = u
boundary = right
channel_gradient_pps = channel_gradient
axis = y
h_name = h
[../]
[./top]
type = OutflowBC
variable = u
boundary = top
velocity = '0 1 0'
[../]
[./leftv]
type = DirichletBC
variable = v
boundary = left
value = 0
[../]
[./rightv]
type = DirichletBC
variable = v
boundary = right
value = 1
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'h'
#Nu = 4
#k = 1
#half_channel_length = 0.5
#h=Nu*k/half_channel_length
prop_values = '8'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
exodus = true
[]
[VectorPostprocessors]
[./lv1]
num_points = 30
start_point = '0 0 0'
end_point = '0 1 0'
sort_by = 'y'
variable = u
type = LineValueSampler
execute_on = 'timestep_begin nonlinear timestep_end linear'
[../]
[./lv2]
num_points = 30
start_point = '1 0 0'
end_point = '1 1 0'
sort_by = 'y'
variable = v
type = LineValueSampler
execute_on = 'timestep_begin nonlinear timestep_end linear'
[../]
[./channel_gradient]
lv1 = lv1
lv2 = lv2
var1 = u
var2 = v
axis = y
type = ChannelGradientVectorPostprocessor
execute_on = 'timestep_begin nonlinear timestep_end linear'
[../]
[]
[Functions]
[./ffn]
type = ParsedFunction
expression = '1'
[../]
[]
(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/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
[]
(modules/phase_field/examples/cahn-hilliard/Math_CH.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 100
ny = 100
xmax = 60
ymax = 60
[]
[Variables]
[./c]
order = THIRD
family = HERMITE
[./InitialCondition]
type = RandomIC
min = -0.1
max = 0.1
[../]
[../]
[]
[Kernels]
[./c_dot]
type = TimeDerivative
variable = c
[../]
[./CHbulk]
type = CHMath
variable = c
[../]
[./CHint]
type = CHInterface
variable = c
mob_name = M
kappa_name = kappa_c
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./mat]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1.0 0.5'
[../]
[]
[Postprocessors]
[./top]
type = SideIntegralVariablePostprocessor
variable = c
boundary = top
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
scheme = bdf2
# Preconditioning using the additive Schwartz method and LU decomposition
petsc_options_iname = '-pc_type -sub_ksp_type -sub_pc_type'
petsc_options_value = 'asm preonly lu '
# Alternative preconditioning options using Hypre (algebraic multi-grid)
#petsc_options_iname = '-pc_type -pc_hypre_type'
#petsc_options_value = 'hypre boomeramg'
l_tol = 1e-4
l_max_its = 30
dt = 2.0
end_time = 80.0
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/thermal_hydraulics/test/tests/materials/ad_wall_heat_transfer_coefficient_kazimi/kazimi_test.i)
#liquid sodium properties at 773 K
rho = 762.90
vel = 0.1
k = 64.217
mu = 2.358e-4
cp = 1264.6
T = 773
T_wall = 774
D_h = 0.1
PoD = 1.1
[GlobalParams]
execute_on = 'initial'
[]
[Problem]
solve = false
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
allow_renumbering = false
[]
[AuxVariables]
[Hw]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[Hw_ak]
type = ADMaterialRealAux
variable = Hw
property = Hw
[]
[]
[Materials]
[props]
type = ADGenericConstantMaterial
prop_names = 'rho vel k mu cp T T_wall D_h'
prop_values = '${rho} ${vel} ${k} ${mu} ${cp} ${T} ${T_wall} ${D_h}'
[]
[Hw_material]
type = ADWallHeatTransferCoefficientKazimiMaterial
PoD = ${PoD}
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[Hw]
type = ElementalVariableValue
elementid = 0
variable = Hw
[]
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/central_difference/lumped/2D/2d_lumped_explicit.i)
# Tests for the central difference time integrator for 2D elements
[Mesh]
[./generated_mesh]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 2
nx = 1
ny = 2
[../]
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[AuxVariables]
[./accel_x]
[../]
[./vel_x]
[../]
[./accel_y]
[../]
[./vel_y]
[../]
[]
[AuxKernels]
[./accel_x]
type = TestNewmarkTI
variable = accel_x
displacement = disp_x
first = false
[../]
[./vel_x]
type = TestNewmarkTI
variable = vel_x
displacement = disp_x
[../]
[./accel_y]
type = TestNewmarkTI
variable = accel_y
displacement = disp_y
first = false
[../]
[./vel_y]
type = TestNewmarkTI
variable = vel_y
displacement = disp_y
[../]
[]
[Kernels]
[./DynamicSolidMechanics]
displacements = 'disp_x disp_y'
[../]
[./inertia_x]
type = InertialForce
variable = disp_x
[../]
[./inertia_y]
type = InertialForce
variable = disp_y
[../]
[]
[BCs]
[./y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./x_bot]
type = FunctionDirichletBC
boundary = bottom
variable = disp_x
function = disp
preset = false
[../]
[]
[Functions]
[./disp]
type = PiecewiseLinear
x = '0.0 1.0 2.0 3.0 4.0' # time
y = '0.0 1.0 0.0 -1.0 0.0' # displacement
[../]
[]
[Materials]
[./elasticity_tensor_block]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.25
block = 0
[../]
[./strain_block]
type = ComputeIncrementalSmallStrain
block = 0
displacements = 'disp_x disp_y'
implicit = false
[../]
[./stress_block]
type = ComputeFiniteStrainElasticStress
block = 0
[../]
[./density]
type = GenericConstantMaterial
block = 0
prop_names = density
prop_values = 1e4
[../]
[]
[Executioner]
type = Transient
start_time = 0
end_time = 0.1
dt = 0.005
timestep_tolerance = 1e-6
[./TimeIntegrator]
type = CentralDifference
solve_type = lumped
[../]
[]
[Postprocessors]
[./accel_2x]
type = PointValue
point = '1.0 2.0 0.0'
variable = accel_x
[../]
[]
[Outputs]
exodus = false
csv = true
[]
(modules/thermal_hydraulics/test/tests/materials/wall_heat_transfer_coefficient_3eqn_dittus_boelter/test.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
allow_renumbering = false
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[AuxVariables]
[Hw]
family = MONOMIAL
order = CONSTANT
[]
[]
[AuxKernels]
[Hw_ak]
type = MaterialRealAux
variable = Hw
property = Hw
[]
[]
[Materials]
[props]
type = GenericConstantMaterial
prop_names = 'rho vel D_h k mu cp T T_wall'
prop_values = '1000 0.1 0.1 0.001 0.1 12 300 310'
[]
[Hw_material]
type = WallHeatTransferCoefficient3EqnDittusBoelterMaterial
rho = rho
vel = vel
D_h = D_h
k = k
mu = mu
cp = cp
T = T
T_wall = T_wall
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[Hw]
type = ElementalVariableValue
elementid = 0
variable = Hw
[]
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(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/chemical_reactions/test/tests/jacobian/coupled_convreact.i)
# Test the Jacobian terms for the CoupledConvectionReactionSub Kernel
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
[]
[Variables]
[./a]
order = FIRST
family = LAGRANGE
[../]
[./b]
order = FIRST
family = LAGRANGE
[../]
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./pressure]
type = RandomIC
variable = pressure
min = 1
max = 5
[../]
[./a]
type = RandomIC
variable = a
max = 1
min = 0
[../]
[./b]
type = RandomIC
variable = b
max = 1
min = 0
[../]
[]
[Kernels]
[./diff]
type = DarcyFluxPressure
variable = pressure
[../]
[./diff_b]
type = Diffusion
variable = b
[../]
[./a1conv]
type = CoupledConvectionReactionSub
variable = a
v = b
log_k = 2
weight = 1
sto_v = 2.5
sto_u = 2
p = pressure
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity'
prop_values = '1e-4 1e-4 0.2'
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
perf_graph = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
(modules/solid_mechanics/test/tests/beam/dynamic/dyn_euler_small.i)
# Test for small strain euler beam vibration in y direction
# An impulse load is applied at the end of a cantilever beam of length 4m.
# The properties of the cantilever beam are as follows:
# Young's modulus (E) = 1e4
# Shear modulus (G) = 4e7
# Shear coefficient (k) = 1.0
# Cross-section area (A) = 0.01
# Iy = 1e-4 = Iz
# Length (L)= 4 m
# density (rho) = 1.0
# For this beam, the dimensionless parameter alpha = kAGL^2/EI = 6.4e6
# Therefore, the beam behaves like a Euler-Bernoulli beam.
# The theoretical first and third frequencies of this beam are:
# f1 = 1/(2 pi) * (3.5156/L^2) * sqrt(EI/rho)
# f2 = 6.268 f1
# This implies that the corresponding time period of this beam are 2.858 s and 0.455s
# The FEM solution for this beam with 10 element gives time periods of 2.856 s and 0.4505s with a time step of 0.01.
# A smaller time step is required to obtain a closer match for the lower time periods/higher frequencies.
# A higher time step of 0.05 is used in this test to reduce testing time.
# The time history from this analysis matches with that obtained from Abaqus.
# Values from the first few time steps are as follows:
# time disp_y vel_y accel_y
# 0 0.0 0.0 0.0
# 0.05 0.0016523559162602 0.066094236650407 2.6437694660163
# 0.1 0.0051691308901533 0.07457676230532 -2.3044684398197
# 0.15 0.0078956772343372 0.03448509146203 4.7008016060883
# 0.2 0.0096592517031463 0.03605788729033 -0.63788977295649
# 0.25 0.011069233444348 0.020341382357756 0.0092295756535376
[Mesh]
type = GeneratedMesh
xmin = 0.0
xmax = 4.0
dim = 1
nx = 10
displacements = 'disp_x disp_y disp_z'
[]
[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
[../]
[./rot_z]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./vel_x]
order = FIRST
family = LAGRANGE
[../]
[./vel_y]
order = FIRST
family = LAGRANGE
[../]
[./vel_z]
order = FIRST
family = LAGRANGE
[../]
[./accel_x]
order = FIRST
family = LAGRANGE
[../]
[./accel_y]
order = FIRST
family = LAGRANGE
[../]
[./accel_z]
order = FIRST
family = LAGRANGE
[../]
[./rot_vel_x]
order = FIRST
family = LAGRANGE
[../]
[./rot_vel_y]
order = FIRST
family = LAGRANGE
[../]
[./rot_vel_z]
order = FIRST
family = LAGRANGE
[../]
[./rot_accel_x]
order = FIRST
family = LAGRANGE
[../]
[./rot_accel_y]
order = FIRST
family = LAGRANGE
[../]
[./rot_accel_z]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = timestep_end
[../]
[./vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = timestep_end
[../]
[./accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = timestep_end
[../]
[./vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = timestep_end
[../]
[./accel_z]
type = NewmarkAccelAux
variable = accel_z
displacement = disp_z
velocity = vel_z
beta = 0.25
execute_on = timestep_end
[../]
[./vel_z]
type = NewmarkVelAux
variable = vel_z
acceleration = accel_z
gamma = 0.5
execute_on = timestep_end
[../]
[./rot_accel_x]
type = NewmarkAccelAux
variable = rot_accel_x
displacement = rot_x
velocity = rot_vel_x
beta = 0.25
execute_on = timestep_end
[../]
[./rot_vel_x]
type = NewmarkVelAux
variable = rot_vel_x
acceleration = rot_accel_x
gamma = 0.5
execute_on = timestep_end
[../]
[./rot_accel_y]
type = NewmarkAccelAux
variable = rot_accel_y
displacement = rot_y
velocity = rot_vel_y
beta = 0.25
execute_on = timestep_end
[../]
[./rot_vel_y]
type = NewmarkVelAux
variable = rot_vel_y
acceleration = rot_accel_y
gamma = 0.5
execute_on = timestep_end
[../]
[./rot_accel_z]
type = NewmarkAccelAux
variable = rot_accel_z
displacement = rot_z
velocity = rot_vel_z
beta = 0.25
execute_on = timestep_end
[../]
[./rot_vel_z]
type = NewmarkVelAux
variable = rot_vel_z
acceleration = rot_accel_z
gamma = 0.5
execute_on = timestep_end
[../]
[]
[BCs]
[./fixx1]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./fixy1]
type = DirichletBC
variable = disp_y
boundary = left
value = 0.0
[../]
[./fixz1]
type = DirichletBC
variable = disp_z
boundary = left
value = 0.0
[../]
[./fixr1]
type = DirichletBC
variable = rot_x
boundary = left
value = 0.0
[../]
[./fixr2]
type = DirichletBC
variable = rot_y
boundary = left
value = 0.0
[../]
[./fixr3]
type = DirichletBC
variable = rot_z
boundary = left
value = 0.0
[../]
[]
[NodalKernels]
[./force_y2]
type = UserForcingFunctionNodalKernel
variable = disp_y
boundary = right
function = force
[../]
[]
[Functions]
[./force]
type = PiecewiseLinear
x = '0.0 0.05 0.1 10.0'
y = '0.0 0.01 0.0 0.0'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 0.05
end_time = 5.0
timestep_tolerance = 1e-6
[]
[Kernels]
[./solid_disp_x]
type = StressDivergenceBeam
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 0
variable = disp_x
[../]
[./solid_disp_y]
type = StressDivergenceBeam
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 1
variable = disp_y
[../]
[./solid_disp_z]
type = StressDivergenceBeam
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 2
variable = disp_z
[../]
[./solid_rot_x]
type = StressDivergenceBeam
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 3
variable = rot_x
[../]
[./solid_rot_y]
type = StressDivergenceBeam
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 4
variable = rot_y
[../]
[./solid_rot_z]
type = StressDivergenceBeam
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 5
variable = rot_z
[../]
[./inertial_force_x]
type = InertialForceBeam
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y rot_vel_z'
rotational_accelerations = 'rot_accel_x rot_accel_y rot_accel_z'
beta = 0.25
gamma = 0.5
area = 0.01
Iy = 1e-4
Iz = 1e-4
Ay = 0.0
Az = 0.0
component = 0
variable = disp_x
[../]
[./inertial_force_y]
type = InertialForceBeam
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y rot_vel_z'
rotational_accelerations = 'rot_accel_x rot_accel_y rot_accel_z'
beta = 0.25
gamma = 0.5
area = 0.01
Iy = 1e-4
Iz = 1e-4
Ay = 0.0
Az = 0.0
component = 1
variable = disp_y
[../]
[./inertial_force_z]
type = InertialForceBeam
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y rot_vel_z'
rotational_accelerations = 'rot_accel_x rot_accel_y rot_accel_z'
beta = 0.25
gamma = 0.5
area = 0.01
Iy = 1e-4
Iz = 1e-4
Ay = 0.0
Az = 0.0
component = 2
variable = disp_z
[../]
[./inertial_force_rot_x]
type = InertialForceBeam
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y rot_vel_z'
rotational_accelerations = 'rot_accel_x rot_accel_y rot_accel_z'
beta = 0.25
gamma = 0.5
area = 0.01
Iy = 1e-4
Iz = 1e-4
Ay = 0.0
Az = 0.0
component = 3
variable = rot_x
[../]
[./inertial_force_rot_y]
type = InertialForceBeam
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y rot_vel_z'
rotational_accelerations = 'rot_accel_x rot_accel_y rot_accel_z'
beta = 0.25
gamma = 0.5
area = 0.01
Iy = 1e-4
Iz = 1e-4
Ay = 0.0
Az = 0.0
component = 4
variable = rot_y
[../]
[./inertial_force_rot_z]
type = InertialForceBeam
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y rot_vel_z'
rotational_accelerations = 'rot_accel_x rot_accel_y rot_accel_z'
beta = 0.25
gamma = 0.5
area = 0.01
Iy = 1e-4
Iz = 1e-4
Ay = 0.0
Az = 0.0
component = 5
variable = rot_z
[../]
[]
[Materials]
[./elasticity]
type = ComputeElasticityBeam
youngs_modulus = 1.0e4
poissons_ratio = -0.999875
shear_coefficient = 1.0
block = 0
[../]
[./strain]
type = ComputeIncrementalBeamStrain
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
area = 0.01
Ay = 0.0
Az = 0.0
Iy = 1.0e-4
Iz = 1.0e-4
y_orientation = '0.0 1.0 0.0'
[../]
[./stress]
type = ComputeBeamResultants
block = 0
[../]
[./density]
type = GenericConstantMaterial
block = 0
prop_names = 'density'
prop_values = '1.0'
[../]
[]
[Postprocessors]
[./disp_x]
type = PointValue
point = '4.0 0.0 0.0'
variable = disp_x
[../]
[./disp_y]
type = PointValue
point = '4.0 0.0 0.0'
variable = disp_y
[../]
[./vel_y]
type = PointValue
point = '4.0 0.0 0.0'
variable = vel_y
[../]
[./accel_y]
type = PointValue
point = '4.0 0.0 0.0'
variable = accel_y
[../]
[]
[Outputs]
exodus = true
csv = true
perf_graph = true
[]
(modules/thermal_hydraulics/test/tests/misc/initial_from_file/heat_transfer_from_heat_structure_3d/steady_state.i)
[GlobalParams]
scaling_factor_1phase = '1. 1.e-2 1.e-4'
scaling_factor_temperature = 1e-2
initial_T = 500
initial_p = 6.e6
initial_vel = 0
closures = simple_closures
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
k = 0.5
mu = 281.8e-6
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Materials]
[mat]
type = ADGenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '16 356 6.5514e3'
[]
[]
[Functions]
[Ts_init]
type = ParsedFunction
expression = '2*sin(x*pi/2)+2*sin(pi*y) +507'
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
fp = fp
# geometry
position = '-1 0 -2.5'
orientation = '1 0 0'
length = 2
n_elems = 2
A = 0.3
D_h = 0.1935483871
f = 0.1
[]
[inlet]
type = InletMassFlowRateTemperature1Phase
input = 'pipe:in'
m_dot = 0.1
T = 500
[]
[outlet]
type = Outlet1Phase
input = 'pipe:out'
p = 6e6
[]
[ht]
type = HeatTransferFromHeatStructure3D1Phase
flow_channels = 'pipe'
hs = blk
boundary = blk:right
P_hf = 3
Hw = 1000
[]
[blk]
type = HeatStructureFromFile3D
file = box.e
position = '0 0 0'
initial_T = Ts_init
[]
[right_bnd]
type = HSBoundarySpecifiedTemperature
hs = blk
boundary = blk:bottom
T = Ts_init
[]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 100
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-7
nl_abs_tol = 1e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 100
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu'
[]
[Outputs]
exodus = true
execute_on = 'initial final'
[]
(modules/phase_field/test/tests/MultiSmoothCircleIC/multismoothcircleIC_test.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 15
ny = 15
nz = 15
xmin = 0
xmax = 100
ymin = 0
ymax = 100
zmin = 0
zmax = 100
elem_type = HEX8
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./c]
type = MultiSmoothCircleIC
variable = c
invalue = 1.0
outvalue = 0.0001
bubspac = 30.0 # This spacing is from bubble center to bubble center
numbub = 6
radius = 10.0
int_width = 12.0
radius_variation = 0.2
radius_variation_type = uniform
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./diff]
type = MatDiffusion
variable = c
diffusivity = D_v
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y z'
[../]
[../]
[]
[Materials]
[./Dv]
type = GenericConstantMaterial
prop_names = D_v
prop_values = 0.074802
[../]
[]
[Postprocessors]
[./bubbles]
type = FeatureFloodCount
variable = c
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart -mat_mffd_type'
petsc_options_value = 'hypre boomeramg 101 ds'
l_max_its = 20
l_tol = 1e-4
nl_max_its = 20
nl_rel_tol = 1e-9
nl_abs_tol = 1e-11
start_time = 0.0
num_steps = 1
dt = 100.0
[./Adaptivity]
refine_fraction = .5
[../]
[]
[Outputs]
exodus = true
[]
(test/tests/interfacekernels/1d_interface/reaction_1D_steady.i)
# Steady-state test for the InterfaceReaction kernel.
#
# Specie M transport from domain 1 (0<=x<=1) to domain 2 (1<x<=2),
# u and v are concentrations in domain 1 and domain 2.
#
# Diffusion in both domains can be described by Ficks law and diffusion
# kernel is applied.
#
# Specie M has different diffusity in different domains, here set as D1=4, D2=2.
#
# Dirichlet boundary conditions are applied, i.e., u(0)=1, v(2)=0
#
# At the interface consider the following
#
# (a) Fluxes are matched from both domains (InterfaceDiffusion kernel)
#
# (b) First-order reaction is R = kf*u - kb*v
#
# Analytical solution is
# u = -0.2*u+1, 0<=u<=1
# v = -0.4*v+0.8, 1<v<=2
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = 'subdomain1'
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
block = '0'
[../]
[./v]
order = FIRST
family = LAGRANGE
block = '1'
[../]
[]
[Kernels]
[./diff_u]
type = MatDiffusion
variable = u
block = '0'
diffusivity = D
[../]
[./diff_v]
type = MatDiffusion
variable = v
block = '1'
diffusivity = D
[../]
[]
[InterfaceKernels]
[./interface]
type = InterfaceDiffusion
variable = u
neighbor_var = 'v'
boundary = 'primary0_interface'
D = D
D_neighbor = D
[../]
[./interface_reaction]
type = InterfaceReaction
variable = u
neighbor_var = 'v'
boundary = 'primary0_interface'
kf = 1 # Forward reaction rate coefficient
kb = 2 # Backward reaction rate coefficient
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 'left'
value = 1
[../]
[./right]
type = DirichletBC
variable = v
boundary = 'right'
value = 0
[../]
[]
[Materials]
[./block0]
type = GenericConstantMaterial
block = '0'
prop_names = 'D'
prop_values = '4'
[../]
[./block1]
type = GenericConstantMaterial
block = '1'
prop_names = 'D'
prop_values = '2'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
nl_rel_tol = 1e-10
[]
[Outputs]
print_linear_residuals = true
execute_on = 'FINAL'
exodus = true
csv = true
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[./elemental_error_u]
type = ElementL2Error
function = -0.2*x+1
variable = 'u'
block = '0'
[../]
[./elemental_error_v]
type = ElementL2Error
function = -0.4*x+0.8
variable = 'v'
block = '1'
[../]
[]
(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/combined/test/tests/generalized_plane_strain_tm_contact/generalized_plane_strain_tm_contact.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
displacements = 'disp_x disp_y'
scalar_out_of_plane_strain = scalar_strain_zz
temperature = temp
[]
[Mesh]
file = 2squares.e
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./temp]
[../]
[./scalar_strain_zz]
order = FIRST
family = SCALAR
[../]
[]
[AuxVariables]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./strain_zz]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Postprocessors]
[./react_z]
type = MaterialTensorIntegral
rank_two_tensor = stress
index_i = 2
index_j = 2
[../]
[]
[Kernels]
[./TensorMechanics]
use_displaced_mesh = true
[../]
[./heat]
type = HeatConduction
variable = temp
[../]
[]
[Modules]
[./TensorMechanics]
[./GeneralizedPlaneStrain]
[./gps]
use_displaced_mesh = true
[../]
[../]
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./strain_xx]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xx
index_i = 0
index_j = 0
[../]
[./strain_xy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_xy
index_i = 0
index_j = 1
[../]
[./strain_yy]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_yy
index_i = 1
index_j = 1
[../]
[./strain_zz]
type = RankTwoAux
rank_two_tensor = total_strain
variable = strain_zz
index_i = 2
index_j = 2
[../]
[]
[Functions]
[./tempramp]
type = ParsedFunction
expression = 't'
[../]
[]
[BCs]
[./x]
type = DirichletBC
boundary = '4 6'
variable = disp_x
value = 0.0
[../]
[./y]
type = DirichletBC
boundary = '4 6'
variable = disp_y
value = 0.0
[../]
[./t]
type = DirichletBC
boundary = '4'
variable = temp
value = 0.0
[../]
[./tramp]
type = FunctionDirichletBC
variable = temp
boundary = '6'
function = tempramp
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
off_diag_row = 'disp_x disp_y'
off_diag_column = 'disp_y disp_x'
[../]
[]
[Contact]
[./mech]
primary = 8
secondary = 2
penalty = 1e+10
normalize_penalty = true
tangential_tolerance = .1
normal_smoothing_distance = .1
model = frictionless
formulation = kinematic
[../]
[]
[ThermalContact]
[./thermal]
type = GapHeatTransfer
primary = 8
secondary = 2
emissivity_primary = 0
emissivity_secondary = 0
variable = temp
tangential_tolerance = .1
normal_smoothing_distance = .1
gap_conductivity = 0.01
min_gap = 0.001
quadrature = true
[../]
[]
[Materials]
[./elastic_tensor]
type = ComputeIsotropicElasticityTensor
poissons_ratio = 0.3
youngs_modulus = 1e6
block = '1 2'
[../]
[./strain]
type = ComputePlaneSmallStrain
eigenstrain_names = eigenstrain
block = '1 2'
[../]
[./thermal_strain]
type = ComputeThermalExpansionEigenstrain
temperature = temp
thermal_expansion_coeff = 0.02
stress_free_temperature = 0.0
eigenstrain_name = eigenstrain
block = '1 2'
[../]
[./stress]
type = ComputeLinearElasticStress
block = '1 2'
[../]
[./heatcond]
type = HeatConductionMaterial
thermal_conductivity = 3.0
specific_heat = 300.0
block = '1 2'
[../]
[./density]
type = GenericConstantMaterial
prop_names = 'density'
prop_values = '1'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
line_search = none
petsc_options_iname = '-pc_type -ps_sub_type -pc_factor_mat_solver_package'
petsc_options_value = 'asm lu superlu_dist'
# controls for linear iterations
l_max_its = 100
l_tol = 1e-4
# controls for nonlinear iterations
nl_max_its = 20
nl_rel_tol = 1e-9
nl_abs_tol = 1e-10
# time control
start_time = 0.0
dt = 0.2
dtmin = 0.2
end_time = 2.0
[]
[Outputs]
exodus = true
[]
(modules/optimization/test/tests/misc/scaling_test/scaling_test.i)
[Problem]
nl_sys_names = 'nl0 adjoint'
kernel_coverage_check = false
[]
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 4
ny = 2
nz = 1
xmin = 9.4615
xmax = 92.0115
ymin = 3.175
ymax = 22.225
zmin = 0.489
zmax = 0.755
[]
[]
[Variables]
[T]
scaling = 10
[]
[lam_T]
nl_sys = adjoint
scaling = 1e3
[]
[]
[Kernels]
[heat_conduction]
type = ADMatDiffusion
variable = T
diffusivity = thermal_conductivity
[]
[heat_source]
type = ADBodyForce
function = src_fuel_function
variable = T
[]
[]
[BCs]
[dir_BC_front]
type = NeumannBC
variable = T
boundary = front
value = 2
[]
[dir_BC_back]
type = DirichletBC
variable = T
boundary = back
value = 300
[]
[]
[Materials]
# fuel properties
[fuel_thermal]
type = ADGenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 17.6e3
[]
[]
[Executioner]
type = SteadyAndAdjoint
forward_system = nl0
adjoint_system = adjoint
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu mumps'
line_search = 'none'
nl_rel_tol = 1e-6
nl_abs_tol = 1e-30
nl_max_its = 10
l_max_its = 10
[]
##---------Forward Optimization stuff------------------#
[Reporters]
[measure_data]
type = ConstantReporter
real_vector_names = 'x y z u weight'
real_vector_values = '0.2 0.2 0.0; 0.3 0.8 0.0; 0 0 0; 5 5 5; 1 1 1'
[]
[params_fuel]
type = ConstantReporter
real_vector_names = 'source'
real_vector_values = '5e7' # Dummy
[]
[]
[Functions]
[src_fuel_function]
type = ParsedOptimizationFunction
expression = q
param_symbol_names = 'q'
param_vector_name = 'params_fuel/source'
[]
[]
##---------Adjoint Optimization stuff------------------#
[DiracKernels]
[adjointLoad_T]
type = ReporterPointSource
variable = lam_T
x_coord_name = measure_data/x
y_coord_name = measure_data/y
z_coord_name = measure_data/z
value_name = measure_data/u
[]
[]
##--------- Outputs ------------------#
[Debug]
show_var_residual_norms = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/coupled-force/steady-action-function.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[]
[Variables]
[u]
family = LAGRANGE_VEC
[]
[]
[Modules]
[IncompressibleNavierStokes]
equation_type = steady-state
velocity_boundary = 'bottom right top left'
velocity_function = '0 0 0 0 0 0 0 0'
add_standard_velocity_variables_for_ad = false
pressure_pinned_node = 0
density_name = rho
dynamic_viscosity_name = mu
use_ad = true
laplace = true
family = LAGRANGE
order = FIRST
supg = true
pspg = true
has_coupled_force = true
coupled_force_vector_function = 'vector_func'
[]
[]
[Kernels]
[u_diff]
type = VectorDiffusion
variable = u
[]
[]
[BCs]
[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'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[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'
[]
[]
(test/tests/interfacekernels/adaptivity/adaptivity.i)
# This input file is used for two tests:
# 1) Check that InterfaceKernels work with mesh adaptivity
# 2) Error out when InterfaceKernels are used with adaptivity
# and stateful material prpoerties
[Mesh]
parallel_type = 'replicated'
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0.5 0 0'
top_right = '1 1 0'
block_id = 1
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[./break_boundary]
input = interface
type = BreakBoundaryOnSubdomainGenerator
[../]
[]
[Variables]
[./u]
[./InitialCondition]
type = ConstantIC
value = 1
[../]
block = 0
[../]
[./u_neighbor]
[./InitialCondition]
type = ConstantIC
value = 1
[../]
block = 1
[../]
[]
[Functions]
[./forcing_fn]
type = ParsedFunction
expression = (x*x*x)-6.0*x
[../]
[./bc_fn]
type = ParsedFunction
expression = (x*x*x)
[../]
[]
[Kernels]
[./diff]
type = MatDiffusionTest
variable = u
prop_name = diffusivity
block = 0
[../]
[./abs]
type = Reaction
variable = u
block = 0
[../]
[./forcing]
type = BodyForce
variable = u
function = forcing_fn
block = 0
[../]
[./diffn]
type = MatDiffusionTest
variable = u_neighbor
prop_name = diffusivity
block = 1
[../]
[./absn]
type = Reaction
variable = u_neighbor
block = 1
[../]
[./forcingn]
type = BodyForce
variable = u_neighbor
function = forcing_fn
block = 1
[../]
[]
[InterfaceKernels]
[./flux_match]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = u_neighbor
boundary = primary0_interface
penalty = 1e6
[../]
[]
[BCs]
[./u]
type = FunctionDirichletBC
variable = u
boundary = 'left'
function = bc_fn
[../]
[./u_neighbor]
type = FunctionDirichletBC
variable = u_neighbor
boundary = 'right'
function = bc_fn
[../]
[]
[Materials]
active = 'constant'
[./stateful]
type = StatefulTest
prop_names = 'diffusivity'
prop_values = '1'
block = '0 1'
[../]
[./constant]
type = GenericConstantMaterial
prop_names = 'diffusivity'
prop_values = '1'
block = '0 1'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Adaptivity]
marker = 'marker'
steps = 1
[./Markers]
[./marker]
type = BoxMarker
bottom_left = '0 0 0'
top_right = '1 1 0'
inside = refine
outside = coarsen
[../]
[../]
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/phase_field_kernels/ADnonuniform_barrier_coefficient.i)
# This material tests the kernels ACBarrierFunction and ACKappaFunction for a
# multiphase system.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmin = -200
xmax = 200
ymin = -200
ymax = 200
uniform_refine = 0
[]
[Variables]
[./gr0]
[../]
[./gr1]
[../]
[]
[ICs]
[./gr0_IC]
type = BoundingBoxIC
variable = gr0
x1 = -80
y1 = -80
x2 = 80
y2 = 80
inside = 0
outside = 1
[../]
[./gr1_IC]
type = BoundingBoxIC
variable = gr1
x1 = -80
y1 = -80
x2 = 80
y2 = 80
inside = 1
outside = 0
[../]
[]
[Materials]
[./constants]
type = ADGenericConstantMaterial
prop_names = 'L gamma E0 E1'
prop_values = '0.1 1.5 3 1'
[../]
[./h0]
type = ADDerivativeParsedMaterial
f_name = h0
args = 'gr0 gr1'
function = 'gr0^2 / (gr0^2 + gr1^2)'
derivative_order = 2
[../]
[./h1]
type = ADDerivativeParsedMaterial
f_name = h1
args = 'gr0 gr1'
function = 'gr1^2 / (gr0^2 + gr1^2)'
derivative_order = 2
[../]
[./mu]
type = ADDerivativeParsedMaterial
f_name = mu
args = 'gr0 gr1'
constant_names = 'mag'
constant_expressions = '16'
function = 'mag * (gr0^2 * gr1^2 + 0.1)'
derivative_order = 2
[../]
[./kappa]
type = ADDerivativeParsedMaterial
f_name = kappa
args = 'gr0 gr1'
material_property_names = 'h0(gr0,gr1) h1(gr0,gr1)'
constant_names = 'mag0 mag1'
constant_expressions = '200 100'
function = 'h0*mag0 + h1*mag1'
derivative_order = 2
[../]
[]
[Kernels]
[./gr0_time]
type = ADTimeDerivative
variable = gr0
[../]
[./gr0_interface]
type = ADACInterface
variable = gr0
args = 'gr1'
mob_name = L
kappa_name = 'kappa'
variable_L = false
[../]
[./gr0_switching]
type = ADACSwitching
variable = gr0
hj_names = 'h0 h1'
Fj_names = 'E0 E1'
mob_name = L
[../]
[./gr0_multi]
type = ADACGrGrMulti
variable = gr0
v = 'gr1'
mob_name = L
gamma_names = 'gamma'
[../]
[./gr0_barrier]
type = ADACBarrierFunction
variable = gr0
mob_name = L
gamma = gamma
v = 'gr1'
[../]
[./gr0_kappa]
type = ADACKappaFunction
variable = gr0
mob_name = L
kappa_name = kappa
v = 'gr1'
[../]
[./gr1_time]
type = ADTimeDerivative
variable = gr1
[../]
[./gr1_interface]
type = ADACInterface
variable = gr1
args = 'gr0'
mob_name = L
kappa_name = 'kappa'
variable_L = false
[../]
[./gr1_switching]
type = ADACSwitching
variable = gr1
hj_names = 'h0 h1'
Fj_names = 'E0 E1'
mob_name = L
[../]
[./gr1_multi]
type = ADACGrGrMulti
variable = gr1
v = 'gr0'
mob_name = L
gamma_names = 'gamma'
[../]
[./gr1_barrier]
type = ADACBarrierFunction
variable = gr1
mob_name = L
gamma = gamma
v = 'gr0'
[../]
[./gr1_kappa]
type = ADACKappaFunction
variable = gr1
mob_name = L
kappa_name = kappa
v = 'gr0'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type '
petsc_options_value = ' lu '
nl_max_its = 20
l_max_its = 30
l_tol = 1e-4
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
start_time = 0
num_steps = 3
dt = 1
[]
[Outputs]
exodus = true
file_base = nonuniform_barrier_coefficient_out
[]
(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/solid_mechanics/test/tests/ad_viscoplasticity_stress_update/negative_porosity.i)
# This test provides an example of an individual LPS viscoplasticity model
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
xmax = 0.002
ymax = 0.002
[]
[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]
[./pull]
type = PiecewiseLinear
x = '0 0.1'
y = '0 1e-5'
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1e10
poissons_ratio = 0.3
[../]
[./stress]
type = ADComputeMultipleInelasticStress
inelastic_models = lps
outputs = all
[../]
[./porosity]
type = ADGenericConstantMaterial
prop_names = 'porosity'
prop_values = '-0.1'
outputs = 'all'
[../]
[./lps]
type = ADViscoplasticityStressUpdate
coefficient = 'coef'
power = 3
outputs = all
relative_tolerance = 1e-11
initial_porosity = 0.1
negative_behavior = ZERO
[../]
[./coef]
type = ADParsedMaterial
property_name = coef
# Example of creep power law
expression = '1e-18 * exp(-4e4 / 1.987 / 1200)'
[../]
[]
[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
[../]
[./pull_disp_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = top
function = pull
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 0.01
end_time = 0.12
[]
[Postprocessors]
[./disp_x]
type = SideAverageValue
variable = disp_x
boundary = right
[../]
[./disp_y]
type = SideAverageValue
variable = disp_y
boundary = top
[../]
[./avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
[../]
[./avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
[../]
[./dt]
type = TimestepSize
[../]
[./num_lin]
type = NumLinearIterations
outputs = console
[../]
[./num_nonlin]
type = NumNonlinearIterations
outputs = console
[../]
[./eff_creep_strain]
type = ElementAverageValue
variable = effective_viscoplasticity
[../]
[./porosity]
type = ElementAverageValue
variable = porosity
[../]
[]
[Outputs]
csv = true
[]
(modules/chemical_reactions/test/tests/solid_kinetics/2species_without_action.i)
# Simple reaction-diffusion example without using the action.
# In this example, two primary species a and b diffuse towards each other from
# opposite ends of a porous medium, reacting when they meet to form a mineral
# precipitate
# This simulation is identical to 2species.i, but explicitly includes the AuxVariables,
# AuxKernels, and Kernels that the action in 2species.i adds
[Mesh]
type = GeneratedMesh
dim = 2
xmax = 1
ymax = 1
nx = 40
[]
[Variables]
[./a]
order = FIRST
family = LAGRANGE
initial_condition = 0
[../]
[./b]
order = FIRST
family = LAGRANGE
initial_condition = 0
[../]
[]
[AuxVariables]
[./mineral]
[../]
[]
[AuxKernels]
[./mineral_conc]
type = KineticDisPreConcAux
variable = mineral
e_act = 1.5e4
r_area = 1
log_k = -6
ref_kconst = 1e-8
gas_const = 8.314
ref_temp = 298.15
sys_temp = 298.15
sto_v = '1 1'
v = 'a b'
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./a_pd]
type = PrimaryDiffusion
variable = a
[../]
[./b_ie]
type = PrimaryTimeDerivative
variable = b
[../]
[./b_pd]
type = PrimaryDiffusion
variable = b
[../]
[./a_r]
type = CoupledBEKinetic
variable = a
v = mineral
weight = 1
[../]
[./b_r]
type = CoupledBEKinetic
variable = b
v = mineral
weight = 1
[../]
[]
[BCs]
[./a_left]
type = DirichletBC
variable = a
preset = false
boundary = left
value = 1.0e-2
[../]
[./a_right]
type = DirichletBC
variable = a
preset = false
boundary = right
value = 0
[../]
[./b_left]
type = DirichletBC
variable = b
preset = false
boundary = left
value = 0
[../]
[./b_right]
type = DirichletBC
variable = b
preset = false
boundary = right
value = 1.0e-2
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity'
prop_values = '5e-4 4e-3 0.4'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
end_time = 50
dt = 5
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Outputs]
file_base = 2species_out
exodus = true
perf_graph = true
print_linear_residuals = true
[]
(modules/chemical_reactions/test/tests/kinetic_rate/arrhenius.i)
# Check the correct temperature dependence of the kinetic rate constant using
# the Arrhenius equation. Two kinetic reactions take place at different system
# temperatures. The Arrhenius equation states that the kinetic rate increases
# with temperature, so more mineral should be precipitated for the higher system
# temperature. In this case, the AuxVariables kinetic_rate1 and mineral1 should
# be larger than kinetic_rate0 and mineral0.
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Variables]
[./a0]
initial_condition = 0.1
[../]
[./b0]
initial_condition = 0.1
[../]
[./a1]
initial_condition = 0.1
[../]
[./b1]
initial_condition = 0.1
[../]
[]
[AuxVariables]
[./mineral0]
[../]
[./mineral1]
[../]
[./kinetic_rate0]
[../]
[./kinetic_rate1]
[../]
[]
[AuxKernels]
[./kinetic_rate0]
type = KineticDisPreRateAux
variable = kinetic_rate0
e_act = 1.5e4
r_area = 1
log_k = -6
ref_kconst = 1e-8
gas_const = 8.31434
ref_temp = 298.15
sys_temp = 298.15
sto_v = '1 1'
v = 'a0 b0'
[../]
[./kinetic_rate1]
type = KineticDisPreRateAux
variable = kinetic_rate1
e_act = 1.5e4
r_area = 1
log_k = -6
ref_kconst = 1e-8
gas_const = 8.31434
ref_temp = 298.15
sys_temp = 323.15
sto_v = '1 1'
v = 'a1 b1'
[../]
[./mineral0_conc]
type = KineticDisPreConcAux
variable = mineral0
e_act = 1.5e4
r_area = 1
log_k = -6
ref_kconst = 1e-8
gas_const = 8.31434
ref_temp = 298.15
sys_temp = 298.15
sto_v = '1 1'
v = 'a0 b0'
[../]
[./mineral1_conc]
type = KineticDisPreConcAux
variable = mineral1
e_act = 1.5e4
r_area = 1
log_k = -6
ref_kconst = 1e-8
gas_const = 8.31434
ref_temp = 298.15
sys_temp = 323.15
sto_v = '1 1'
v = 'a1 b1'
[../]
[]
[Kernels]
[./a0_ie]
type = PrimaryTimeDerivative
variable = a0
[../]
[./b0_ie]
type = PrimaryTimeDerivative
variable = b0
[../]
[./a0_r]
type = CoupledBEKinetic
variable = a0
v = mineral0
weight = 1
[../]
[./b0_r]
type = CoupledBEKinetic
variable = b0
v = mineral0
weight = 1
[../]
[./a1_ie]
type = PrimaryTimeDerivative
variable = a1
[../]
[./b1_ie]
type = PrimaryTimeDerivative
variable = b1
[../]
[./a1_r]
type = CoupledBEKinetic
variable = a1
v = mineral1
weight = 1
[../]
[./b1_r]
type = CoupledBEKinetic
variable = b1
v = mineral1
weight = 1
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = porosity
prop_values = 0.2
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
end_time = 1
dt = 1
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Outputs]
exodus = true
perf_graph = true
print_linear_residuals = true
[]
(modules/heat_transfer/test/tests/verify_against_analytical/ad_2d_steady_state.i)
# This test solves a 2D steady state heat equation
# The error is found by comparing to the analytical solution
# Note that the thermal conductivity, specific heat, and density in this problem
# Are set to 1, and need to be changed to the constants of the material being
# Analyzed
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
xmax = 2
ymax = 2
[]
[Variables]
[./T]
[../]
[]
[Kernels]
[./HeatDiff]
type = ADHeatConduction
variable = T
[../]
[]
[BCs]
[./zero]
type = DirichletBC
variable = T
boundary = 'right bottom left'
value = 0
[../]
[./top]
type = ADFunctionDirichletBC
variable = T
boundary = top
function = '10*sin(pi*x*0.5)'
[../]
[]
[Materials]
[./properties]
type = ADGenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1 1 1'
[../]
[]
[Postprocessors]
[./nodal_error]
type = NodalL2Error
function = '10/(sinh(pi))*sin(pi*x*0.5)*sinh(pi*y*0.5)'
variable = T
[../]
[./elemental_error]
type = ElementL2Error
function = '10/(sinh(pi))*sin(pi*x*0.5)*sinh(pi*y*0.5)'
variable = T
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/phase_field_fracture_viscoplastic/crack2d.i)
[Mesh]
type = FileMesh
file = crack_mesh.e
[]
[GlobalParams]
displacements = 'disp_x disp_y'
volumetric_locking_correction = true
[]
[Modules]
[./TensorMechanics]
[./Master]
[./All]
add_variables = true
strain = Finite
additional_generate_output = stress_yy
save_in = 'resid_x resid_y'
[../]
[../]
[../]
[./PhaseField]
[./Nonconserved]
[./c]
free_energy = E_el
mobility = L
kappa = kappa_op
[../]
[../]
[../]
[]
[AuxVariables]
[./resid_x]
[../]
[./resid_y]
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./peeq]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./solid_x]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_x
component = 0
c = c
use_displaced_mesh = true
[../]
[./solid_y]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_y
component = 1
c = c
use_displaced_mesh = true
[../]
[]
[AuxKernels]
[./stress_yy]
type = RankTwoAux
variable = stress_yy
rank_two_tensor = stress
index_j = 1
index_i = 1
execute_on = timestep_end
[../]
[./peeq]
type = MaterialRealAux
variable = peeq
property = ep_eqv
execute_on = timestep_end
[../]
[]
[BCs]
[./ydisp]
type = FunctionDirichletBC
variable = disp_y
boundary = 2
function = '0.0001*t'
[../]
[./yfix]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0
[../]
[./xfix]
type = DirichletBC
variable = disp_x
boundary = '1 2'
value = 0
[../]
[]
[UserObjects]
[./flowstress]
type = HEVPLinearHardening
yield_stress = 300
slope = 1000
intvar_prop_name = ep_eqv
[../]
[./flowrate]
type = HEVPFlowRatePowerLawJ2
reference_flow_rate = 0.0001
flow_rate_exponent = 10.0
flow_rate_tol = 1
strength_prop_name = flowstress
[../]
[./ep_eqv]
type = HEVPEqvPlasticStrain
intvar_rate_prop_name = ep_eqv_rate
[../]
[./ep_eqv_rate]
type = HEVPEqvPlasticStrainRate
flow_rate_prop_name = flowrate
[../]
[]
[Materials]
[./pfbulkmat]
type = GenericConstantMaterial
prop_names = 'l visco'
prop_values = '0.08 1'
[../]
[./pfgc]
type = GenericFunctionMaterial
prop_names = 'gc_prop'
prop_values = '1.0e-3'
[../]
[./define_mobility]
type = ParsedMaterial
material_property_names = 'gc_prop visco'
property_name = L
expression = '1/(gc_prop * visco)'
[../]
[./define_kappa]
type = ParsedMaterial
material_property_names = 'gc_prop l'
property_name = kappa_op
expression = 'gc_prop * l'
[../]
[./viscop_damage]
type = HyperElasticPhaseFieldIsoDamage
resid_abs_tol = 1e-18
resid_rel_tol = 1e-8
maxiters = 50
max_substep_iteration = 5
flow_rate_user_objects = 'flowrate'
strength_user_objects = 'flowstress'
internal_var_user_objects = 'ep_eqv'
internal_var_rate_user_objects = 'ep_eqv_rate'
numerical_stiffness = false
damage_stiffness = 1e-8
c = c
F_name = E_el
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '120.0 80.0'
fill_method = symmetric_isotropic
[../]
[]
[Postprocessors]
[./resid_x]
type = NodalSum
variable = resid_x
boundary = 2
[../]
[./resid_y]
type = NodalSum
variable = resid_y
boundary = 2
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -ksp_grmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly lu 1'
nl_rel_tol = 1e-8
l_max_its = 10
nl_max_its = 10
dt = 1
dtmin = 1e-4
num_steps = 2
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/components/heat_structure_cylindrical/by_materials.i)
# Tests that cylindrical heat structure thermal properties can be defined in the Materials block
!include part_base.i
[SolidProperties]
[function_sp]
type = ThermalFunctionSolidProperties
rho = 6.6e1
cp = 321.384
k = 16.48672
[]
[]
[Materials]
[fuel-mat]
type = ADGenericConstantMaterial
block = hs:FUEL
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '3.65 288.734 1.0412e2'
[]
[gap-mat]
type = ADGenericConstantMaterial
block = hs:GAP
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1.084498 1.0 1.0'
[]
[clad-mat]
type = ADConstantDensityThermalSolidPropertiesMaterial
block = hs:CLAD
sp = function_sp
temperature = T_solid
T_ref = 300
[]
[]
(modules/solid_mechanics/test/tests/shell/dynamics/shell_dynamics_bending_moment_free.i)
# Test to verify the fundamental natural frequency of a one element ADComputeShellStress
# BCs: Clamped on one end, free on others.
# Initial perturbation applied to edge of the beam. After that, the shell vibrates freely.
#
# Results have been compared for various thicknesses with the following approximate Results
# (Moose results were obtained with 8 elements along the length)
# Thickness = 0.1. Reference freq: 10.785 Hz, Moose freq: 10.612 Hz
# Thickness = 0.05. Reference freq: 5.393 Hz, Moose freq: 5.335 Hz
# Thickness = 0.025. Reference freq: 2.696 Hz, Moose freq: 2.660 Hz
#
# Reference values have been obtained from Robert Blevins, "Formulas for Dynamics, Acoustics and Vibration",
# Table 5.3 case 11. Formula looks like: f = lambda^2/(2*pi*a^2) * sqrt(E*h^2/(12*(1-nu*nu))), where lambda
# changes as a function of shell dimensions.
# This test uses one single element for speed reasons.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1 # 1
ny = 1# 4
xmin = 0.0
xmax = 1.0
ymin = 0.0
ymax = 1.5
displacements = 'disp_x disp_y disp_z'
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./rot_x]
[../]
[./rot_y]
[../]
[]
[AuxVariables]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
# aux variables for dynamics
[./vel_x]
[../]
[./vel_y]
[../]
[./vel_z]
[../]
[./accel_x]
[../]
[./accel_y]
[../]
[./accel_z]
[../]
[./rot_vel_x]
[../]
[./rot_vel_y]
[../]
[./rot_accel_x]
[../]
[./rot_accel_y]
[../]
[]
[AuxKernels]
[./stress_yy]
type = RankTwoAux
variable = stress_yy
rank_two_tensor = global_stress_t_points_0
index_i = 1
index_j = 1
[../]
[./stress_yz]
type = RankTwoAux
variable = stress_yz
rank_two_tensor = global_stress_t_points_0
index_i = 1
index_j = 2
[../]
# Kernels for dynamics
[./accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = timestep_end
[../]
[./vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = timestep_end
[../]
[./accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = timestep_end
[../]
[./vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = timestep_end
[../]
[./accel_z]
type = NewmarkAccelAux
variable = accel_z
displacement = disp_z
velocity = vel_z
beta = 0.25
execute_on = timestep_end
[../]
[./vel_z]
type = NewmarkVelAux
variable = vel_z
acceleration = accel_z
gamma = 0.5
execute_on = timestep_end
[../]
[./rot_accel_x]
type = NewmarkAccelAux
variable = rot_accel_x
displacement = rot_x
velocity = rot_vel_x
beta = 0.25
execute_on = timestep_end
[../]
[./rot_vel_x]
type = NewmarkVelAux
variable = rot_vel_x
acceleration = rot_accel_x
gamma = 0.5
execute_on = timestep_end
[../]
[./rot_accel_y]
type = NewmarkAccelAux
variable = rot_accel_y
displacement = rot_y
velocity = rot_vel_y
beta = 0.25
execute_on = timestep_end
[../]
[./rot_vel_y]
type = NewmarkVelAux
variable = rot_vel_y
acceleration = rot_accel_y
gamma = 0.5
execute_on = timestep_end
[../]
[]
[BCs]
[./fixy1]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0.0
[../]
[./fixz1]
type = DirichletBC
variable = disp_z
boundary = 'bottom'
value = 0.0
[../]
[./fixr1]
type = DirichletBC
variable = rot_x
boundary = 'bottom'
value = 0.0
[../]
[./fixr2]
type = DirichletBC
variable = rot_y
boundary = 'bottom'
value = 0.0
[../]
[./fixx1]
type = DirichletBC
variable = disp_x
boundary = 'bottom'
value = 0.0
[../]
[]
[Functions]
[./force_function]
type = PiecewiseLinear
x = '0.0 0.01 0.15 10.0'
y = '0.0 0.01 0.0 0.0'
[../]
[]
[NodalKernels]
[./force_z2]
type = UserForcingFunctionNodalKernel
variable = disp_z
boundary = 'top'
function = force_function
[../]
[]
[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
[../]
[./inertial_force_x]
type = ADInertialForceShell
# use_displaced_mesh = true
eta = 0.0
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y'
rotational_accelerations = 'rot_accel_x rot_accel_y'
component = 0
variable = disp_x
thickness = 0.1
[../]
[./inertial_force_y]
type = ADInertialForceShell
eta = 0.0
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y'
rotational_accelerations = 'rot_accel_x rot_accel_y'
component = 1
variable = disp_y
thickness = 0.1
[../]
[./inertial_force_z]
type = ADInertialForceShell
eta = 0.0
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y'
rotational_accelerations = 'rot_accel_x rot_accel_y'
component = 2
variable = disp_z
thickness = 0.1
[../]
[./inertial_force_rot_x]
type = ADInertialForceShell
eta = 0.0
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y'
rotational_accelerations = 'rot_accel_x rot_accel_y'
component = 3
variable = rot_x
thickness = 0.1
[../]
[./inertial_force_rot_y]
type = ADInertialForceShell
eta = 0.0
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y'
rotational_accelerations = 'rot_accel_x rot_accel_y'
component = 4
variable = rot_y
thickness = 0.1
[../]
[]
[Materials]
[./elasticity]
type = ADComputeIsotropicElasticityTensorShell
youngs_modulus = 2100000
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 = 0.1
through_thickness_order = SECOND
[../]
[./stress]
type = ADComputeShellStress
block = 0
through_thickness_order = SECOND
[../]
[./density]
type = GenericConstantMaterial
block = 0
prop_names = 'density'
prop_values = '1.0'
[../]
[]
[Postprocessors]
[./disp_z_tip]
type = PointValue
point = '1.0 1.0 0.0'
variable = disp_z
[../]
[./rot_x_tip]
type = PointValue
point = '0.0 1.0 0.0'
variable = rot_x
[../]
[./stress_yy_el_0]
type = ElementalVariableValue
elementid = 0
variable = stress_yy
[../]
[./stress_yy_el_1]
type = ElementalVariableValue
elementid = 1
variable = stress_yy
[../]
[./stress_yy_el_2]
type = ElementalVariableValue
elementid = 2
variable = stress_yy
[../]
[./stress_yy_el_3]
type = ElementalVariableValue
elementid = 3
variable = stress_yy
[../]
[./stress_yz_el_0]
type = ElementalVariableValue
elementid = 0
variable = stress_yz
[../]
[./stress_yz_el_1]
type = ElementalVariableValue
elementid = 1
variable = stress_yz
[../]
[./stress_yz_el_2]
type = ElementalVariableValue
elementid = 2
variable = stress_yz
[../]
[./stress_yz_el_3]
type = ElementalVariableValue
elementid = 3
variable = stress_yz
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
l_tol = 1e-11
nl_max_its = 15
nl_rel_tol = 1e-11
nl_abs_tol = 1e-10
l_max_its = 20
dt = 0.005
dtmin = 0.005
timestep_tolerance = 2e-13
end_time = 0.5
[./TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[../]
[]
[Outputs]
perf_graph = true
csv = true
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/small-2d/closed_gap_pressure_dependent_thermal_contact.i)
## Units in the input file: m-Pa-s-K
# The analytical solution for a steady state thermal contact and a mechanical
# contact pressure of 1Pa, the temperature of the steel block at the interface
# is calcaluated as
#
# T^s_{int} = \frac{T^a_{BC}C_T k_a + T^s_{BC} k_s \left(k_a +C_T \right)}{k_s (k_a + C_T) + k_a C_T}
# T^s_{int} = 460K
#
# with the boundary conditions and thermal conductivity values specified in the
# input file below. Similarly, the temperature of the aluminum block (cold block)
# is calculated as
#
# T^a_{int} = \frac{T^s_{int} C_T + T^a_{BC} k_a}{k_a + C_T}
# T^a_{int} = 276K
#
# The values predicted by the simulation at the interface converge towards these
# temperature values, and are within a few degrees by 240s. A smaller timestep
# than is practical for the regression test application further reduces the difference
# between the analytical solution and the simulation result.
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 10
xmax = 1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 10
xmin = 1
xmax = 2
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
[]
[Variables]
[disp_x]
block = 'left_block right_block'
[]
[disp_y]
block = 'left_block right_block'
[]
[temperature]
initial_condition = 525.0
[]
[temperature_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[Modules]
[TensorMechanics/Master]
[steel]
strain = SMALL
add_variables = false
use_automatic_differentiation = true
additional_generate_output = 'vonmises_stress'
additional_material_output_family = 'MONOMIAL'
additional_material_output_order = 'FIRST'
block = 'left_block'
[]
[aluminum]
strain = SMALL
add_variables = false
use_automatic_differentiation = true
additional_generate_output = 'vonmises_stress'
additional_material_output_family = 'MONOMIAL'
additional_material_output_order = 'FIRST'
block = 'right_block'
[]
[]
[]
[Kernels]
[HeatDiff_steel]
type = ADHeatConduction
variable = temperature
thermal_conductivity = steel_thermal_conductivity
block = 'left_block'
[]
[HeatTdot_steel]
type = ADHeatConductionTimeDerivative
variable = temperature
specific_heat = steel_heat_capacity
density_name = steel_density
block = 'left_block'
[]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
block = 'right_block'
[]
[HeatTdot_aluminum]
type = ADHeatConductionTimeDerivative
variable = temperature
specific_heat = aluminum_heat_capacity
density_name = aluminum_density
block = 'right_block'
[]
[]
[BCs]
[fixed_bottom_edge]
type = ADDirichletBC
variable = disp_y
value = 0
boundary = 'moving_block_bottom fixed_block_bottom'
[]
[fixed_outer_edge]
type = ADDirichletBC
variable = disp_x
value = 0
boundary = 'fixed_block_right'
[]
[displacement_left_block]
type = ADDirichletBC
variable = disp_x
value = 1.8e-11
boundary = 'moving_block_left'
[]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 800
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 250
boundary = 'fixed_block_right'
[]
[]
[Contact]
[interface]
primary = moving_block_right
secondary = fixed_block_left
model = frictionless
formulation = mortar
correct_edge_dropping = true
[]
[]
[Constraints]
[thermal_contact]
type = ModularGapConductanceConstraint
variable = temperature_interface_lm
secondary_variable = temperature
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed'
use_displaced_mesh = true
[]
[]
[Materials]
[steel_elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1.93e11 #in Pa, 193 GPa, stainless steel 304
poissons_ratio = 0.29
block = 'left_block'
[]
[steel_stress]
type = ADComputeLinearElasticStress
block = 'left_block'
[]
[steel_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'steel_density steel_thermal_conductivity steel_heat_capacity'
prop_values = '8e3 16.2 0.5' ## for stainless steel 304
block = 'left_block'
[]
[aluminum_elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 6.8e10 #in Pa, 68 GPa, aluminum
poissons_ratio = 0.36
block = 'right_block'
[]
[aluminum_stress]
type = ADComputeLinearElasticStress
block = 'right_block'
[]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity'
prop_values = ' 2.7e3 210 0.9'
block = 'right_block'
[]
[]
[UserObjects]
[closed]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_thermal_conductivity
secondary_conductivity = aluminum_thermal_conductivity
temperature = temperature
contact_pressure = interface_normal_lm
primary_hardness = 1.0
secondary_hardness = 1.0
boundary = moving_block_right
[]
[]
[Postprocessors]
[steel_pt_interface_temperature]
type = NodalVariableValue
nodeid = 245
variable = temperature
[]
[aluminum_pt_interface_temperature]
type = NodalVariableValue
nodeid = 657
variable = temperature
[]
[interface_heat_flux_steel]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = moving_block_right
diffusivity = steel_thermal_conductivity
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
# mortar contact solver options
petsc_options = '-snes_converged_reason -pc_svd_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = ' lu superlu_dist'
snesmf_reuse_base = false
nl_rel_tol = 1e-10
nl_max_its = 20
l_max_its = 50
dt = 60
end_time = 240
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/heat_transfer/test/tests/conjugate_heat_transfer/conjugate_heat_transfer.i)
[Mesh]
type = FileMesh
file = simple_pb.e
[]
[Variables]
[./temp_wall]
block = 'left right'
[../]
[./temp_fluid]
block = 'center'
[../]
[]
[Kernels]
[./wall_conduction]
type = ADHeatConduction
variable = temp_wall
[../]
[./heat_source]
type = HeatSource
value = 1e3 # W/m^3
variable = temp_fluid
block = 'center'
[../]
[./center_conduction]
type = ADHeatConduction
variable = temp_fluid
block = 'center'
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = temp_wall
boundary = 'right'
value = 300
[../]
[./left]
type = DirichletBC
variable = temp_wall
boundary = 'left'
value = 100
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
[]
[Outputs]
exodus = true
[]
[Materials]
[./walls]
type = ADHeatConductionMaterial
thermal_conductivity = 10 # W/m k
block = 'left right'
specific_heat = .49e3 # J/kg k
[../]
[./pb]
type = ADHeatConductionMaterial
thermal_conductivity = 1
specific_heat = .49e3 # J/kg K
block = 'center'
[../]
[./alpha_wall]
type = ADGenericConstantMaterial
prop_names = 'alpha_wall'
prop_values = '1'
block = 'center'
[../]
[]
[InterfaceKernels]
[./left_center_wrt_center]
type = ConjugateHeatTransfer
variable = temp_fluid
T_fluid = temp_fluid
neighbor_var = 'temp_wall'
boundary = 'left_center_wrt_center'
htc = 'alpha_wall'
[../]
[./right_center_wrt_center]
type = ConjugateHeatTransfer
variable = temp_fluid
T_fluid = temp_fluid
neighbor_var = 'temp_wall'
boundary = 'right_center_wrt_center'
htc = 'alpha_wall'
[../]
[]
[Preconditioning]
[./Hypre]
type = SMP
petsc_options_value = 'lu hypre'
full = true
petsc_options_iname = '-pc_type -pc_hypre_type'
[../]
[]
(test/tests/outputs/debug/show_execution_kernels_bcs.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 10
ny = 10
elem_type = QUAD9
[]
[left]
type = ParsedSubdomainMeshGenerator
input = 'gmg'
combinatorial_geometry = 'x < 0.5'
block_id = '2'
[]
[middle_boundary]
type = SideSetsBetweenSubdomainsGenerator
input = 'left'
primary_block = '0'
paired_block = '2'
new_boundary = 'middle'
[]
[]
[Functions]
[forcing_fnu]
type = ParsedFunction
expression = -5.8*(x+y)+x*x*x-x+y*y*y-y
[]
[forcing_fnv]
type = ParsedFunction
expression = -4
[]
[slnu]
type = ParsedGradFunction
expression = x*x*x-x+y*y*y-y
grad_x = 3*x*x-1
grad_y = 3*y*y-1
[]
[slnv]
type = ParsedGradFunction
expression = x*x+y*y
grad_x = 2*x
grad_y = 2*y
[]
# NeumannBC functions
[bc_fnut]
type = ParsedFunction
expression = 3*y*y-1
[]
[bc_fnub]
type = ParsedFunction
expression = -3*y*y+1
[]
[bc_fnul]
type = ParsedFunction
expression = -3*x*x+1
[]
[bc_fnur]
type = ParsedFunction
expression = 3*x*x-1
[]
[]
[Variables]
[u]
order = THIRD
family = HIERARCHIC
[]
[v]
order = SECOND
family = LAGRANGE
[]
[]
[Kernels]
[diff1]
type = Diffusion
variable = u
[]
[test1]
type = CoupledConvection
variable = u
velocity_vector = v
[]
[diff2]
type = Diffusion
variable = v
[]
[react]
type = Reaction
variable = u
[]
[forceu]
type = BodyForce
variable = u
function = forcing_fnu
[]
[forcev]
type = BodyForce
variable = v
function = forcing_fnv
[]
[]
[BCs]
[bc_v]
type = FunctionDirichletBC
variable = v
function = slnv
boundary = 'left right top bottom'
[]
[bc_u_tb]
type = CoupledKernelGradBC
variable = u
var2 = v
vel = '0.1 0.1'
boundary = 'top bottom left right'
[]
[bc_ul]
type = FunctionNeumannBC
variable = u
function = bc_fnul
boundary = 'left'
[]
[bc_ur]
type = FunctionNeumannBC
variable = u
function = bc_fnur
boundary = 'right'
[]
[bc_ut]
type = FunctionNeumannBC
variable = u
function = bc_fnut
boundary = 'top'
[]
[bc_ub]
type = FunctionNeumannBC
variable = u
function = bc_fnub
boundary = 'bottom'
[]
[]
[Dampers]
active = ''
[limit_v]
type = BoundingValueElementDamper
variable = v
max_value = 1.5
min_value = -20
[]
[limit_u]
type = BoundingValueElementDamper
variable = u
max_value = 1.5
min_value = -20
[]
[]
[InterfaceKernels]
[diff_ik_2]
type = InterfaceDiffusion
variable = 'u'
neighbor_var = 'v'
boundary = 'middle'
[]
[diff_ik_1]
type = InterfaceDiffusion
variable = 'v'
neighbor_var = 'u'
boundary = 'middle'
[]
[]
[DGKernels]
[diff_dg_2]
type = DGDiffusion
variable = 'u'
epsilon = -1
sigma = 6
[]
[diff_dg_1]
type = DGDiffusion
variable = 'u'
epsilon = -1
sigma = 6
[]
[]
[DiracKernels]
[source_2]
type = FunctionDiracSource
variable = 'u'
point = '0.1 0.1 0'
function = 'x + y'
[]
[source_1]
type = FunctionDiracSource
variable = 'u'
point = '0.1 0.1 0'
function = 'x + y'
block = '2'
[]
[source_0]
type = FunctionDiracSource
variable = 'u'
# in block 0, but since it's not block restricted it shows up as active in
# block 2 as well
point = '0.6 0.5 0'
function = 'x + y'
[]
[]
[Materials]
[diff]
type = GenericConstantMaterial
prop_names = 'D D_neighbor'
prop_values = '0 0'
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-15
nl_abs_tol = 1e-13
[]
[Debug]
show_execution_order = 'NONE ALWAYS INITIAL NONLINEAR LINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
[]
(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/solid_mechanics/test/tests/central_difference/consistent/1D/1d_consistent_implicit.i)
# Test for Newmark Beta integration for a 1D element
# Consistent mass matrix
[Mesh]
type = GeneratedMesh
xmin = 0
xmax = 10
nx = 5
dim = 1
[]
[Variables]
[./disp_x]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./accel_x]
[../]
[./vel_x]
[../]
[]
[AuxKernels]
[./accel_x]
type = TestNewmarkTI
variable = accel_x
displacement = disp_x
first = false
[../]
[./vel_x]
type = TestNewmarkTI
variable = vel_x
displacement = disp_x
[../]
[]
[Kernels]
[./DynamicSolidMechanics]
displacements = 'disp_x'
[../]
[./inertia_x]
type = InertialForce
variable = disp_x
[../]
[]
[NodalKernels]
[./force_x]
type = UserForcingFunctionNodalKernel
variable = disp_x
boundary = right
function = force_x
[../]
[]
[Functions]
[./force_x]
type = PiecewiseLinear
x = '0.0 1.0 2.0 3.0 4.0' # time
y = '0.0 1.0 0.0 -1.0 0.0' # force
scale_factor = 1e3
[../]
[]
[BCs]
[./fixx1]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[]
[Materials]
[./elasticity_tensor_block]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 1e6
poissons_ratio = 0.25
block = 0
[../]
[./strain_block]
type = ComputeIncrementalSmallStrain
block = 0
displacements = 'disp_x'
[../]
[./stress_block]
type = ComputeFiniteStrainElasticStress
block = 0
[../]
[./density]
type = GenericConstantMaterial
block = 0
prop_names = density
prop_values = 2500
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
dtmin = 1e-4
timestep_tolerance = 1e-6
start_time = -0.005
end_time = 0.1
dt = 0.005
[./TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[../]
[]
[Postprocessors]
[./disp_x]
type = NodalVariableValue
nodeid = 1
variable = disp_x
[../]
[./vel_x]
type = NodalVariableValue
nodeid = 1
variable = vel_x
[../]
[./accel_x]
type = NodalVariableValue
nodeid = 1
variable = accel_x
[../]
[]
[Outputs]
exodus = false
csv = true
perf_graph = false
[]
(modules/solid_mechanics/examples/coal_mining/cosserat_mc_wp_sticky_longitudinal.i)
# Strata deformation and fracturing around a coal mine
#
# A 2D geometry is used that simulates a longitudinal section of
# the coal mine. The model is actually 3D, but the "x"
# dimension is only 10m long, meshed with 1 element, and
# there is no "x" displacement. The mine is 400m deep
# and just the roof is studied (0<=z<=400). The model sits
# between -300<=y<=1800. The excavation sits in 0<=y<=1500. The
# excavation height is 3m (ie, the excavation lies within
# 0<=z<=3).
#
# Time is meaningless in this example
# as quasi-static solutions are sought at each timestep, but
# the number of timesteps controls the resolution of the
# process.
#
# The boundary conditions for this elastic simulation are:
# - disp_x = 0 everywhere
# - disp_y = 0 at y=-300 and y=1800
# - disp_z = 0 at z=0, but there is a time-dependent
# Young's modulus that simulates excavation
# - wc_x = 0 at y=300 and y=1800.
# That is, rollers on the sides, free at top,
# and prescribed at bottom in the unexcavated portion.
#
# The small strain formulation is used.
#
# All stresses are measured in MPa. The initial stress is consistent with
# the weight force from density 2500 kg/m^3, ie, stress_zz = -0.025*(300-z) MPa
# where gravity = 10 m.s^-2 = 1E-5 MPa m^2/kg. The maximum and minimum
# principal horizontal stresses are assumed to be equal to 0.8*stress_zz.
#
# Material properties:
# Young's modulus = 8 GPa
# Poisson's ratio = 0.25
# Cosserat layer thickness = 1 m
# Cosserat-joint normal stiffness = large
# Cosserat-joint shear stiffness = 1 GPa
# MC cohesion = 3 MPa
# MC friction angle = 37 deg
# MC dilation angle = 8 deg
# MC tensile strength = 1 MPa
# MC compressive strength = 100 MPa
#
[Mesh]
[generated_mesh]
type = GeneratedMeshGenerator
dim = 3
nx = 1
xmin = -5
xmax = 5
nz = 40
zmin = 0
zmax = 400
bias_z = 1.1
ny = 140 # 15m elements
ymin = -300
ymax = 1800
[]
[left]
type = SideSetsAroundSubdomainGenerator
block = 0
new_boundary = 11
normal = '0 -1 0'
input = generated_mesh
[]
[right]
type = SideSetsAroundSubdomainGenerator
block = 0
new_boundary = 12
normal = '0 1 0'
input = left
[]
[front]
type = SideSetsAroundSubdomainGenerator
block = 0
new_boundary = 13
normal = '-1 0 0'
input = right
[]
[back]
type = SideSetsAroundSubdomainGenerator
block = 0
new_boundary = 14
normal = '1 0 0'
input = front
[]
[top]
type = SideSetsAroundSubdomainGenerator
block = 0
new_boundary = 15
normal = '0 0 1'
input = back
[]
[bottom]
type = SideSetsAroundSubdomainGenerator
block = 0
new_boundary = 16
normal = '0 0 -1'
input = top
[]
[excav]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '-5 0 0'
top_right = '5 1500 3'
input = bottom
[]
[roof]
type = SideSetsAroundSubdomainGenerator
block = 1
new_boundary = 18
normal = '0 0 1'
input = excav
[]
[]
[GlobalParams]
perform_finite_strain_rotations = false
displacements = 'disp_x disp_y disp_z'
Cosserat_rotations = 'wc_x wc_y wc_z'
[]
[Variables]
[./disp_y]
[../]
[./disp_z]
[../]
[./wc_x]
[../]
[]
[Kernels]
[./cy_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_y
component = 1
[../]
[./cz_elastic]
type = CosseratStressDivergenceTensors
use_displaced_mesh = false
variable = disp_z
component = 2
[../]
[./x_couple]
type = StressDivergenceTensors
use_displaced_mesh = false
variable = wc_x
displacements = 'wc_x wc_y wc_z'
component = 0
base_name = couple
[../]
[./x_moment]
type = MomentBalancing
use_displaced_mesh = false
variable = wc_x
component = 0
[../]
[./gravity]
type = Gravity
use_displaced_mesh = false
variable = disp_z
value = -10E-6 # remember this is in MPa
[../]
[]
[AuxVariables]
[./disp_x]
[../]
[./wc_y]
[../]
[./wc_z]
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_xz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_yz]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zx]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zy]
order = CONSTANT
family = MONOMIAL
[../]
[./stress_zz]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./wp_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_shear_f]
order = CONSTANT
family = MONOMIAL
[../]
[./mc_tensile_f]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
[../]
[./stress_xy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xy
index_i = 0
index_j = 1
[../]
[./stress_xz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xz
index_i = 0
index_j = 2
[../]
[./stress_yx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yx
index_i = 1
index_j = 0
[../]
[./stress_yy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yy
index_i = 1
index_j = 1
[../]
[./stress_yz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_yz
index_i = 1
index_j = 2
[../]
[./stress_zx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zx
index_i = 2
index_j = 0
[../]
[./stress_zy]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zy
index_i = 2
index_j = 1
[../]
[./stress_zz]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_zz
index_i = 2
index_j = 2
[../]
[./mc_shear]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_internal_parameter
variable = mc_shear
[../]
[./mc_tensile]
type = MaterialStdVectorAux
index = 1
property = mc_plastic_internal_parameter
variable = mc_tensile
[../]
[./wp_shear]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_internal_parameter
variable = wp_shear
[../]
[./wp_tensile]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_internal_parameter
variable = wp_tensile
[../]
[./mc_shear_f]
type = MaterialStdVectorAux
index = 6
property = mc_plastic_yield_function
variable = mc_shear_f
[../]
[./mc_tensile_f]
type = MaterialStdVectorAux
index = 0
property = mc_plastic_yield_function
variable = mc_tensile_f
[../]
[./wp_shear_f]
type = MaterialStdVectorAux
index = 0
property = wp_plastic_yield_function
variable = wp_shear_f
[../]
[./wp_tensile_f]
type = MaterialStdVectorAux
index = 1
property = wp_plastic_yield_function
variable = wp_tensile_f
[../]
[]
[BCs]
[./no_y]
type = DirichletBC
variable = disp_y
boundary = '11 12'
value = 0.0
[../]
[./no_z]
type = DirichletBC
variable = disp_z
boundary = '16'
value = 0.0
[../]
[./no_wc_x]
type = DirichletBC
variable = wc_x
boundary = '11 12'
value = 0.0
[../]
[./roof]
type = StickyBC
variable = disp_z
min_value = -3.0
boundary = '18'
[../]
[]
[Functions]
[./ini_xx]
type = ParsedFunction
expression = '-0.8*2500*10E-6*(400-z)'
[../]
[./ini_zz]
type = ParsedFunction
expression = '-2500*10E-6*(400-z)'
[../]
[./excav_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax minval maxval slope'
symbol_values = '1.0 0 1500.0 1E-9 1 15'
# excavation face at ymin+(ymax-ymin)*min(t/end_t,1)
# slope is the distance over which the modulus reduces from maxval to minval
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),minval,if(y<ymin+(ymax-ymin)*min(t/end_t,1)+slope,minval+(maxval-minval)*(y-(ymin+(ymax-ymin)*min(t/end_t,1)))/slope,maxval))'
[../]
[./density_sideways]
type = ParsedFunction
symbol_names = 'end_t ymin ymax minval maxval'
symbol_values = '1.0 0 1500.0 0 2500'
expression = 'if(y<ymin+(ymax-ymin)*min(t/end_t,1),minval,maxval)'
[../]
[]
[UserObjects]
[./mc_coh_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 2.99 # MPa
value_residual = 3.01 # MPa
rate = 1.0
[../]
[./mc_fric]
type = SolidMechanicsHardeningConstant
value = 0.65 # 37deg
[../]
[./mc_dil]
type = SolidMechanicsHardeningConstant
value = 0.15 # 8deg
[../]
[./mc_tensile_str_strong_harden]
type = SolidMechanicsHardeningExponential
value_0 = 1.0 # MPa
value_residual = 1.0 # MPa
rate = 1.0
[../]
[./mc_compressive_str]
type = SolidMechanicsHardeningCubic
value_0 = 100 # Large!
value_residual = 100
internal_limit = 0.1
[../]
[./wp_coh_harden]
type = SolidMechanicsHardeningCubic
value_0 = 0.1
value_residual = 0.1
internal_limit = 10
[../]
[./wp_tan_fric]
type = SolidMechanicsHardeningConstant
value = 0.36 # 20deg
[../]
[./wp_tan_dil]
type = SolidMechanicsHardeningConstant
value = 0.18 # 10deg
[../]
[./wp_tensile_str_harden]
type = SolidMechanicsHardeningCubic
value_0 = 0.1
value_residual = 0.1
internal_limit = 10
[../]
[./wp_compressive_str_soften]
type = SolidMechanicsHardeningCubic
value_0 = 100
value_residual = 1.0
internal_limit = 1.0
[../]
[]
[Materials]
[./elasticity_tensor_0]
type = ComputeLayeredCosseratElasticityTensor
block = 0
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
[../]
[./elasticity_tensor_1]
type = ComputeLayeredCosseratElasticityTensor
block = 1
young = 8E3 # MPa
poisson = 0.25
layer_thickness = 1.0
joint_normal_stiffness = 1E9 # huge
joint_shear_stiffness = 1E3 # MPa
elasticity_tensor_prefactor = excav_sideways
[../]
[./strain]
type = ComputeCosseratIncrementalSmallStrain
eigenstrain_names = ini_stress
[../]
[./ini_stress]
type = ComputeEigenstrainFromInitialStress
eigenstrain_name = ini_stress
initial_stress = 'ini_xx 0 0 0 ini_xx 0 0 0 ini_zz'
[../]
[./stress_0]
type = ComputeMultipleInelasticCosseratStress
block = 0
inelastic_models = 'mc wp'
cycle_models = true
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[../]
[./stress_1]
# this is needed so as to correctly apply the initial stress
type = ComputeMultipleInelasticCosseratStress
block = 1
inelastic_models = ''
relative_tolerance = 2.0
absolute_tolerance = 1E6
max_iterations = 1
tangent_operator = nonlinear
perform_finite_strain_rotations = false
[../]
[./mc]
type = CappedMohrCoulombCosseratStressUpdate
warn_about_precision_loss = false
host_youngs_modulus = 8E3
host_poissons_ratio = 0.25
base_name = mc
tensile_strength = mc_tensile_str_strong_harden
compressive_strength = mc_compressive_str
cohesion = mc_coh_strong_harden
friction_angle = mc_fric
dilation_angle = mc_dil
max_NR_iterations = 100000
smoothing_tol = 0.1 # MPa # Must be linked to cohesion
yield_function_tol = 1E-9 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0
[../]
[./wp]
type = CappedWeakPlaneCosseratStressUpdate
warn_about_precision_loss = false
base_name = wp
cohesion = wp_coh_harden
tan_friction_angle = wp_tan_fric
tan_dilation_angle = wp_tan_dil
tensile_strength = wp_tensile_str_harden
compressive_strength = wp_compressive_str_soften
max_NR_iterations = 10000
tip_smoother = 0.1
smoothing_tol = 0.1 # MPa # Note, this must be tied to cohesion, otherwise get no possible return at cone apex
yield_function_tol = 1E-11 # MPa. this is essentially the lowest possible without lots of precision loss
perfect_guess = true
min_step_size = 1.0E-3
[../]
[./density_0]
type = GenericConstantMaterial
block = 0
prop_names = density
prop_values = 2500
[../]
[./density_1]
type = GenericFunctionMaterial
block = 1
prop_names = density
prop_values = density_sideways
[../]
[]
[Postprocessors]
[./subs]
type = PointValue
point = '0 0 400'
variable = disp_z
use_displaced_mesh = false
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason'
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -ksp_type -ksp_gmres_restart'
petsc_options_value = ' asm 2 lu gmres 200'
line_search = bt
nl_abs_tol = 1e-3
nl_rel_tol = 1e-5
l_max_its = 30
nl_max_its = 100
start_time = 0.0
dt = 0.01 # 1 element per step
end_time = 1.0
[]
[Outputs]
file_base = cosserat_mc_wp_sticky_longitudinal
time_step_interval = 1
print_linear_residuals = false
exodus = true
csv = true
console = true
#[./console]
# type = Console
# output_linear = false
#[../]
[]
(test/tests/materials/get_material_property_names/get_material_property_boundary_names.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Materials]
[./material]
type = GenericConstantMaterial
prop_names = combo
boundary = 'left right'
prop_values = 12345
[../]
[]
[UserObjects]
[./get_material_boundary_names_test]
type = GetMaterialPropertyBoundaryBlockNamesTest
expected_names = 'left right'
property_name = combo
test_type = 'boundary'
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
(modules/fsi/test/tests/fsi_acoustics/1D_struc_acoustic/1D_struc_acoustic.i)
# Test for `StructureAcousticInterface` interface kernel. The domain is 1D with 20m
# length. The fluid domain is on the right and the structural domain is on the left.
# Fluid end is subjected to a 250Hz sine wave with a single peak of amplitude unity.
# Structural domain is 4 times as dense as the fluid domain with all other material
# properties being the same. Fluid pressure is recorded at the midpoint in the fluid
# domain (i.e., at 15m). Structural stress is recorded at the midpoint in the structural
# domain (i.e., at 5m). The recorded pressure and stress amplitudes should match
# with theoretical values.
#
# Input parameters:
# Dimensions = 1
# Length = 20 meters
# Fluid speed of sound = 1500 m/s
# Fluid density = 1e-6 Giga kg/m^3
# Structural bulk modulus = 2.25 GPa
# Structural shear modulus = 0 GPa
# Structural density = 4e-6 Giga kg/m^3
# Fluid domain = true
# Fluid BC = single peak sine wave applied as a pressure on the fluid end
# Structural domain = true
# Structural BC = Neumann BC with value zero applied on the structural end.
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 50
xmax = 20
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '10.0 0 0'
block_id = 1
top_right = '20.0 0.0 0'
[../]
[./interface1]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '1'
paired_block = 0
new_boundary = 'interface1'
[../]
[]
[GlobalParams]
[]
[Variables]
[./p]
block = 1
[../]
[./disp_x]
block = 0
[../]
[]
[AuxVariables]
[./vel_x]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./accel_x]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./stress_xx]
order = CONSTANT
family = MONOMIAL
block = 0
[../]
[]
[Kernels]
[./diffusion]
type = Diffusion
variable = 'p'
block = 1
[../]
[./inertia]
type = AcousticInertia
variable = p
block = 1
[../]
[./DynamicTensorMechanics]
displacements = 'disp_x'
block = 0
[../]
[./inertia_x1]
type = InertialForce
variable = disp_x
block = 0
[../]
[]
[AuxKernels]
[./accel_x]
type = TestNewmarkTI
displacement = disp_x
variable = accel_x
first = false
block = 0
[../]
[./vel_x]
type = TestNewmarkTI
displacement = disp_x
variable = vel_x
block = 0
[../]
[./stress_xx]
type = RankTwoAux
rank_two_tensor = stress
variable = stress_xx
index_i = 0
index_j = 0
block = 0
[../]
[]
[InterfaceKernels]
[./interface1]
type = StructureAcousticInterface
variable = p
neighbor_var = disp_x
boundary = 'interface1'
D = 1e-6
component = 0
[../]
[]
[BCs]
[./bottom_accel]
type = FunctionDirichletBC
variable = p
boundary = 'right'
function = accel_bottom
[../]
[./disp_x1]
type = NeumannBC
boundary = 'left'
variable = disp_x
value = 0.0
[../]
[]
[Functions]
[./accel_bottom]
type = PiecewiseLinear
data_file = Input_1Peak_highF.csv
scale_factor = 1e-2
format = 'columns'
[../]
[]
[Materials]
[./co_sq]
type = GenericConstantMaterial
prop_names = inv_co_sq
prop_values = 4.44e-7
block = '1'
[../]
[./density0]
type = GenericConstantMaterial
block = 0
prop_names = density
prop_values = 4e-6
[../]
[./elasticity_base]
type = ComputeIsotropicElasticityTensor
bulk_modulus = 2.25
shear_modulus = 0.0
block = 0
[../]
[./strain]
type = ComputeFiniteStrain
block = 0
displacements = 'disp_x'
[../]
[./stress]
type = ComputeFiniteStrainElasticStress
block = 0
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
start_time = 0.0
end_time = 0.01
dt = 0.0001
dtmin = 0.00001
nl_abs_tol = 1e-12
nl_rel_tol = 1e-12
l_tol = 1e-12
l_max_its = 25
timestep_tolerance = 1e-8
automatic_scaling = true
[TimeIntegrator]
type = NewmarkBeta
[]
[]
[Postprocessors]
[./p1]
type = PointValue
point = '10.0 0.0 0.0'
variable = p
[../]
[./stress1]
type = PointValue
point = '10.0 0.0 0.0'
variable = stress_xx
[../]
[]
[Outputs]
csv = true
perf_graph = true
print_linear_residuals = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/RZ_cone_high_reynolds.i)
[GlobalParams]
gravity = '0 0 0'
laplace = true
transient_term = false
supg = true
pspg = true
family = LAGRANGE
order = FIRST
[]
[Mesh]
file = 'cone_linear_alltri.e'
[]
[Problem]
coord_type = RZ
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = NEWTON
[../]
[]
[Executioner]
# type = Transient
# dt = 0.005
# dtmin = 0.005
# num_steps = 5
# l_max_its = 100
# Block Jacobi works well for this problem, as does "-pc_type asm
# -pc_asm_overlap 2", but an overlap of 1 does not work for some
# reason?
# petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
# petsc_options_value = 'bjacobi ilu 4'
# Note: The Steady executioner can be used for this problem, if you
# drop the INSMomentumTimeDerivative kernels and use the following
# direct solver options.
type = Steady
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-12
nl_max_its = 20
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Variables]
[./vel_x]
# Velocity in radial (r) direction
[../]
[./vel_y]
# Velocity in axial (z) direction
[../]
[./p]
order = FIRST
[../]
[]
[BCs]
[./u_in]
type = DirichletBC
boundary = bottom
variable = vel_x
value = 0
[../]
[./v_in]
type = FunctionDirichletBC
boundary = bottom
variable = vel_y
function = 'inlet_func'
[../]
[./u_axis_and_walls]
type = DirichletBC
boundary = 'left right'
variable = vel_x
value = 0
[../]
[./v_no_slip]
type = DirichletBC
boundary = 'right'
variable = vel_y
value = 0
[../]
[]
[Kernels]
# [./x_momentum_time]
# type = INSMomentumTimeDerivative
# variable = vel_x
# [../]
# [./y_momentum_time]
# type = INSMomentumTimeDerivative
# variable = vel_y
# [../]
[./mass]
type = INSMassRZ
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
[./x_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./y_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 1
prop_names = 'rho mu'
prop_values = '1 1e-3'
[../]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
outputs = 'console' execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
outputs = 'console' execute_on = 'timestep_end'
[../]
[]
(modules/phase_field/test/tests/KKS_system/auxkernel.i)
#
# This test checks if the two phase and lagrange multiplier solutions can be replicated
# with a two order parameter approach, where the second order parameter eta2 is an
# auxiliary variable that is set as eta2 := 1 - eta1
# The solution is reproduced, but convergence is suboptimal, as important Jacobian
# terms for eta1 (that should come indirectly from eta2) are missing.
#
[Mesh]
type = GeneratedMesh
dim = 1
nx = 20
xmax = 5
[]
[AuxVariables]
[Fglobal]
order = CONSTANT
family = MONOMIAL
[]
# order parameter 2
[eta2]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[]
[]
#
# With this approach the derivative w.r.t. eta1 is lost in all terms depending on
# eta2 a potential fix would be to make eta2 a material property with derivatives.
# This would require a major rewrite of the phase field kernels, though.
#
[AuxKernels]
[eta2]
type = ParsedAux
variable = eta2
expression = '1-eta1'
coupled_variables = eta1
[]
[]
[Variables]
# concentration
[c]
order = FIRST
family = LAGRANGE
[InitialCondition]
type = FunctionIC
function = x/5
[]
[]
# order parameter 1
[eta1]
order = FIRST
family = LAGRANGE
initial_condition = 0.5
[]
# phase concentration 1
[c1]
order = FIRST
family = LAGRANGE
initial_condition = 0.9
[]
# phase concentration 2
[c2]
order = FIRST
family = LAGRANGE
initial_condition = 0.1
[]
[]
[Materials]
# simple toy free energies
[f1] # = fd
type = DerivativeParsedMaterial
property_name = F1
coupled_variables = 'c1'
expression = '(0.9-c1)^2'
[]
[f2] # = fm
type = DerivativeParsedMaterial
property_name = F2
coupled_variables = 'c2'
expression = '(0.1-c2)^2'
[]
# Switching functions for each phase
[h1_eta]
type = SwitchingFunctionMaterial
h_order = HIGH
eta = eta1
function_name = h1
[]
[h2_eta]
type = DerivativeParsedMaterial
material_property_names = 'h1(eta1)'
expression = '1-h1'
property_name = h2
coupled_variables = eta1
[]
# Coefficients for diffusion equation
[Dh1]
type = DerivativeParsedMaterial
material_property_names = 'D h1(eta1)'
expression = D*h1
property_name = Dh1
coupled_variables = eta1
[]
[Dh2]
type = DerivativeParsedMaterial
material_property_names = 'D h2(eta1)'
expression = 'D*h2'
property_name = Dh2
coupled_variables = eta1
[]
# Barrier functions for each phase
[g1]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta1
function_name = g1
[]
[g2]
type = BarrierFunctionMaterial
g_order = SIMPLE
eta = eta2
function_name = g2
[]
# constant properties
[constants]
type = GenericConstantMaterial
prop_names = 'D L kappa'
prop_values = '0.7 0.7 0.2'
[]
[]
[Kernels]
#Kernels for diffusion equation
[diff_time]
type = TimeDerivative
variable = c
[]
[diff_c1]
type = MatDiffusion
variable = c
diffusivity = Dh1
v = c1
args = eta1
[]
[diff_c2]
type = MatDiffusion
variable = c
diffusivity = Dh2
v = c2
args = eta1
[]
# Kernels for Allen-Cahn equation for eta1
[deta1dt]
type = TimeDerivative
variable = eta1
[]
[ACBulkF1]
type = KKSMultiACBulkF
variable = eta1
Fj_names = 'F1 F2'
hj_names = 'h1 h2'
gi_name = g1
eta_i = eta1
wi = 0.2
coupled_variables = 'c1 c2 eta2'
[]
[ACBulkC1]
type = KKSMultiACBulkC
variable = eta1
Fj_names = 'F1 F2'
hj_names = 'h1 h2'
cj_names = 'c1 c2'
eta_i = eta1
coupled_variables = 'eta2'
[]
[ACInterface1]
type = ACInterface
variable = eta1
kappa_name = kappa
[]
# Phase concentration constraints
[chempot12]
type = KKSPhaseChemicalPotential
variable = c1
cb = c2
fa_name = F1
fb_name = F2
[]
[phaseconcentration]
type = KKSMultiPhaseConcentration
variable = c2
cj = 'c1 c2'
hj_names = 'h1 h2'
etas = 'eta1 eta2'
c = c
[]
[]
[AuxKernels]
[Fglobal_total]
type = KKSMultiFreeEnergy
Fj_names = 'F1 F2 '
hj_names = 'h1 h2 '
gj_names = 'g1 g2 '
variable = Fglobal
w = 0.2
interfacial_vars = 'eta1 eta2 '
kappa_names = 'kappa kappa'
[]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu '
l_max_its = 30
nl_max_its = 10
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-11
end_time = 350
dt = 10
[]
[Preconditioning]
[full]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[c]
type = LineValueSampler
variable = c
start_point = '0 0 0'
end_point = '5 0 0'
num_points = 21
sort_by = x
[]
[]
[Outputs]
csv = true
execute_on = FINAL
[]
(modules/solid_mechanics/test/tests/beam/dynamic/dyn_euler_small_rayleigh_hht.i)
# Test for damped small strain euler beam vibration in y direction
# An impulse load is applied at the end of a cantilever beam of length 4m.
# The properties of the cantilever beam are as follows:
# Young's modulus (E) = 1e4
# Shear modulus (G) = 4e7
# Shear coefficient (k) = 1.0
# Cross-section area (A) = 0.01
# Iy = 1e-4 = Iz
# Length (L)= 4 m
# density (rho) = 1.0
# mass proportional rayleigh damping(eta) = 0.1
# stiffness proportional rayleigh damping(eta) = 0.1
# HHT time integration parameter (alpha) = -0.3
# Corresponding Newmark beta time integration parameters beta = 0.4225 and gamma = 0.8
# For this beam, the dimensionless parameter alpha = kAGL^2/EI = 6.4e6
# Therefore, the behaves like a Euler-Bernoulli beam.
# The displacement time history from this analysis matches with that obtained from Abaqus.
# Values from the first few time steps are as follows:
# time disp_y vel_y accel_y
# 0.0 0.0 0.0 0.0
# 0.2 0.019898364318588 0.18838688112273 1.1774180070171
# 0.4 0.045577003505278 0.087329917525455 -0.92596052423724
# 0.6 0.063767907208218 0.084330765885995 0.21274543331268
# 0.8 0.073602908614573 0.020029576220975 -0.45506879373455
# 1.0 0.06841704414745 -0.071840076837194 -0.46041813317992
[Mesh]
type = GeneratedMesh
nx = 10
dim = 1
xmin = 0.0
xmax = 4.0
displacements = 'disp_x disp_y disp_z'
[]
[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
[../]
[./rot_z]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./vel_x]
order = FIRST
family = LAGRANGE
[../]
[./vel_y]
order = FIRST
family = LAGRANGE
[../]
[./vel_z]
order = FIRST
family = LAGRANGE
[../]
[./accel_x]
order = FIRST
family = LAGRANGE
[../]
[./accel_y]
order = FIRST
family = LAGRANGE
[../]
[./accel_z]
order = FIRST
family = LAGRANGE
[../]
[./rot_vel_x]
order = FIRST
family = LAGRANGE
[../]
[./rot_vel_y]
order = FIRST
family = LAGRANGE
[../]
[./rot_vel_z]
order = FIRST
family = LAGRANGE
[../]
[./rot_accel_x]
order = FIRST
family = LAGRANGE
[../]
[./rot_accel_y]
order = FIRST
family = LAGRANGE
[../]
[./rot_accel_z]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.4225
execute_on = timestep_end
[../]
[./vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.8
execute_on = timestep_end
[../]
[./accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.4225
execute_on = timestep_end
[../]
[./vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.8
execute_on = timestep_end
[../]
[./accel_z]
type = NewmarkAccelAux
variable = accel_z
displacement = disp_z
velocity = vel_z
beta = 0.4225
execute_on = timestep_end
[../]
[./vel_z]
type = NewmarkVelAux
variable = vel_z
acceleration = accel_z
gamma = 0.8
execute_on = timestep_end
[../]
[./rot_accel_x]
type = NewmarkAccelAux
variable = rot_accel_x
displacement = rot_x
velocity = rot_vel_x
beta = 0.4225
execute_on = timestep_end
[../]
[./rot_vel_x]
type = NewmarkVelAux
variable = rot_vel_x
acceleration = rot_accel_x
gamma = 0.8
execute_on = timestep_end
[../]
[./rot_accel_y]
type = NewmarkAccelAux
variable = rot_accel_y
displacement = rot_y
velocity = rot_vel_y
beta = 0.4225
execute_on = timestep_end
[../]
[./rot_vel_y]
type = NewmarkVelAux
variable = rot_vel_y
acceleration = rot_accel_y
gamma = 0.8
execute_on = timestep_end
[../]
[./rot_accel_z]
type = NewmarkAccelAux
variable = rot_accel_z
displacement = rot_z
velocity = rot_vel_z
beta = 0.4225
execute_on = timestep_end
[../]
[./rot_vel_z]
type = NewmarkVelAux
variable = rot_vel_z
acceleration = rot_accel_z
gamma = 0.8
execute_on = timestep_end
[../]
[]
[BCs]
[./fixx1]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./fixy1]
type = DirichletBC
variable = disp_y
boundary = left
value = 0.0
[../]
[./fixz1]
type = DirichletBC
variable = disp_z
boundary = left
value = 0.0
[../]
[./fixr1]
type = DirichletBC
variable = rot_x
boundary = left
value = 0.0
[../]
[./fixr2]
type = DirichletBC
variable = rot_y
boundary = left
value = 0.0
[../]
[./fixr3]
type = DirichletBC
variable = rot_z
boundary = left
value = 0.0
[../]
[]
[NodalKernels]
[./force_y2]
type = UserForcingFunctionNodalKernel
variable = disp_y
boundary = right
function = force
[../]
[]
[Functions]
[./force]
type = PiecewiseLinear
x = '0.0 0.2 0.4 10.0'
y = '0.0 0.01 0.0 0.0'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
l_tol = 1e-11
nl_max_its = 15
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
start_time = 0.0
dt = 0.2
end_time = 5.0
timestep_tolerance = 1e-6
[]
[Kernels]
[./solid_disp_x]
type = StressDivergenceBeam
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 0
variable = disp_x
zeta = 0.1
alpha = -0.3
[../]
[./solid_disp_y]
type = StressDivergenceBeam
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 1
variable = disp_y
zeta = 0.1
alpha = -0.3
[../]
[./solid_disp_z]
type = StressDivergenceBeam
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 2
variable = disp_z
zeta = 0.1
alpha = -0.3
[../]
[./solid_rot_x]
type = StressDivergenceBeam
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 3
variable = rot_x
zeta = 0.1
alpha = -0.3
[../]
[./solid_rot_y]
type = StressDivergenceBeam
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 4
variable = rot_y
zeta = 0.1
alpha = -0.3
[../]
[./solid_rot_z]
type = StressDivergenceBeam
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 5
variable = rot_z
zeta = 0.1
alpha = -0.3
[../]
[./inertial_force_x]
type = InertialForceBeam
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y rot_vel_z'
rotational_accelerations = 'rot_accel_x rot_accel_y rot_accel_z'
beta = 0.4225
gamma = 0.8
eta = 0.1
area = 0.01
Iy = 1e-4
Iz = 1e-4
Ay = 0.0
Az = 0.0
component = 0
variable = disp_x
alpha = -0.3
[../]
[./inertial_force_y]
type = InertialForceBeam
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y rot_vel_z'
rotational_accelerations = 'rot_accel_x rot_accel_y rot_accel_z'
beta = 0.4225
gamma = 0.8
eta = 0.1
area = 0.01
Iy = 1e-4
Iz = 1e-4
Ay = 0.0
Az = 0.0
component = 1
variable = disp_y
alpha = -0.3
[../]
[./inertial_force_z]
type = InertialForceBeam
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y rot_vel_z'
rotational_accelerations = 'rot_accel_x rot_accel_y rot_accel_z'
beta = 0.4225
gamma = 0.8
eta = 0.1
area = 0.01
Iy = 1e-4
Iz = 1e-4
Ay = 0.0
Az = 0.0
component = 2
variable = disp_z
alpha = -0.3
[../]
[./inertial_force_rot_x]
type = InertialForceBeam
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y rot_vel_z'
rotational_accelerations = 'rot_accel_x rot_accel_y rot_accel_z'
beta = 0.4225
gamma = 0.8
eta = 0.1
area = 0.01
Iy = 1e-4
Iz = 1e-4
Ay = 0.0
Az = 0.0
component = 3
variable = rot_x
alpha = -0.3
[../]
[./inertial_force_rot_y]
type = InertialForceBeam
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y rot_vel_z'
rotational_accelerations = 'rot_accel_x rot_accel_y rot_accel_z'
beta = 0.4225
gamma = 0.8
eta = 0.1
area = 0.01
Iy = 1e-4
Iz = 1e-4
Ay = 0.0
Az = 0.0
component = 4
variable = rot_y
alpha = -0.3
[../]
[./inertial_force_rot_z]
type = InertialForceBeam
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
velocities = 'vel_x vel_y vel_z'
accelerations = 'accel_x accel_y accel_z'
rotational_velocities = 'rot_vel_x rot_vel_y rot_vel_z'
rotational_accelerations = 'rot_accel_x rot_accel_y rot_accel_z'
beta = 0.4225
gamma = 0.8
eta = 0.1
area = 0.01
Iy = 1e-4
Iz = 1e-4
Ay = 0.0
Az = 0.0
component = 5
variable = rot_z
alpha = -0.3
[../]
[]
[Materials]
[./elasticity]
type = ComputeElasticityBeam
youngs_modulus = 1.0e4
poissons_ratio = -0.999875
shear_coefficient = 1.0
block = 0
[../]
[./strain]
type = ComputeIncrementalBeamStrain
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
area = 0.01
Ay = 0.0
Az = 0.0
Iy = 1.0e-4
Iz = 1.0e-4
y_orientation = '0.0 1.0 0.0'
[../]
[./stress]
type = ComputeBeamResultants
block = 0
[../]
[./density]
type = GenericConstantMaterial
block = 0
prop_names = 'density'
prop_values = '1.0'
[../]
[]
[Postprocessors]
[./disp_x]
type = PointValue
point = '4.0 0.0 0.0'
variable = disp_x
[../]
[./disp_y]
type = PointValue
point = '4.0 0.0 0.0'
variable = disp_y
[../]
[./vel_y]
type = PointValue
point = '4.0 0.0 0.0'
variable = vel_y
[../]
[./accel_y]
type = PointValue
point = '4.0 0.0 0.0'
variable = accel_y
[../]
[]
[Outputs]
exodus = true
csv = true
perf_graph = 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
[]
(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/heat_transfer/test/tests/code_verification/cartesian_test_no1.i)
# Problem I.1
#
# An infinite plate with constant thermal conductivity k and
# internal heat generation q. It is exposed on each boundary
# to a constant temperature: u(0) = ui and u(L) = uo.
#
# REFERENCE:
# A. Toptan, et al. (Mar.2020). Tech. rep. CASL-U-2020-1939-000, SAND2020-3887 R. DOI:10.2172/1614683.
[Mesh]
[./geom]
type = GeneratedMeshGenerator
dim = 1
elem_type = EDGE2
nx = 1
[../]
[]
[Variables]
[./u]
order = FIRST
[../]
[]
[Functions]
[./exact]
type = ParsedFunction
symbol_names = 'q L k ui uo'
symbol_values = '1200 1 12 100 0'
expression = 'ui + (uo-ui)*x/L + (q/k) * x * (L-x) / 2'
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = u
[../]
[./heatsource]
type = HeatSource
function = 1200
variable = u
[../]
[]
[BCs]
[./ui]
type = DirichletBC
boundary = left
variable = u
value = 100
[../]
[./uo]
type = DirichletBC
boundary = right
variable = u
value = 0
[../]
[]
[Materials]
[./property]
type = GenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '1.0 1.0 12.0'
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = exact
variable = u
[../]
[./h]
type = AverageElementSize
[]
[]
[Outputs]
csv = 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/contact/test/tests/mortar_aux_kernels/block-dynamics-aux-wear-vel.i)
starting_point = 0.5e-1
offset = -0.05
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = long-bottom-block-1elem-blocks.e
[]
[Variables]
[disp_x]
block = '1 2'
[]
[disp_y]
block = '1 2'
[]
[normal_lm]
block = 3
use_dual = true
scaling = 1.0e3
[]
[frictional_lm]
block = 3
use_dual = true
[]
[]
[ICs]
[disp_y]
block = 2
variable = disp_y
value = '${fparse starting_point + offset}'
type = ConstantIC
[]
[]
[Kernels]
[DynamicTensorMechanics]
displacements = 'disp_x disp_y'
generate_output = 'stress_xx stress_yy'
strain = FINITE
block = '1 2'
zeta = 1.0
hht_alpha = 0.0
[]
[inertia_x]
type = InertialForce
variable = disp_x
velocity = vel_x
acceleration = accel_x
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[inertia_y]
type = InertialForce
variable = disp_y
velocity = vel_y
acceleration = accel_y
beta = 0.25
gamma = 0.5
alpha = 0
eta = 0.0
block = '1 2'
[]
[]
[Materials]
[elasticity_2]
type = ComputeIsotropicElasticityTensor
block = '2'
youngs_modulus = 1e6
poissons_ratio = 0.3
[]
[elasticity_1]
type = ComputeIsotropicElasticityTensor
block = '1'
youngs_modulus = 1e8
poissons_ratio = 0.3
[]
[stress]
type = ComputeFiniteStrainElasticStress
block = '1 2'
[]
[strain]
type = ComputeFiniteStrain
block = '1 2'
[]
[density]
type = GenericConstantMaterial
block = '1 2'
prop_names = 'density'
prop_values = '7750'
[]
[]
[AuxVariables]
[worn_depth]
block = '3'
[]
[gap_vel]
block = '3'
[]
[vel_x]
block = '1 2'
[]
[accel_x]
block = '1 2'
[]
[vel_y]
block = '1 2'
[]
[accel_y]
block = '1 2'
[]
[vel_z]
block = '1 2'
[]
[accel_z]
block = '1 2'
[]
[]
[AuxKernels]
[gap_vel]
type = WeightedGapVelAux
variable = gap_vel
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
disp_x = disp_x
disp_y = disp_y
[]
[worn_depth]
type = MortarArchardsLawAux
variable = worn_depth
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
displacements = 'disp_x disp_y'
friction_coefficient = 0.5
energy_wear_coefficient = 1.0
normal_pressure = normal_lm
[]
[accel_x]
type = NewmarkAccelAux
variable = accel_x
displacement = disp_x
velocity = vel_x
beta = 0.25
execute_on = 'linear timestep_end'
[]
[vel_x]
type = NewmarkVelAux
variable = vel_x
acceleration = accel_x
gamma = 0.5
execute_on = 'linear timestep_end'
[]
[accel_y]
type = NewmarkAccelAux
variable = accel_y
displacement = disp_y
velocity = vel_y
beta = 0.25
execute_on = 'linear timestep_end'
[]
[vel_y]
type = NewmarkVelAux
variable = vel_y
acceleration = accel_y
gamma = 0.5
execute_on = 'linear timestep_end'
[]
[]
[UserObjects]
[weighted_vel_uo]
type = LMWeightedVelocitiesUserObject
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
secondary_variable = disp_x
lm_variable_normal = normal_lm
lm_variable_tangential_one = frictional_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeDynamicFrictionalForceLMMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
c = 1e4
c_t = 1e6
mu = 0.15
friction_lm = frictional_lm
capture_tolerance = 1.0e-5
newmark_beta = 0.25
newmark_gamma = 0.5
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_vel_uo
[]
[tangential_x]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[tangential_y]
type = TangentialMortarMechanicalContact
primary_boundary = 20
secondary_boundary = 10
primary_subdomain = 4
secondary_subdomain = 3
variable = frictional_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_velocities_uo = weighted_vel_uo
[]
[]
[BCs]
[botx]
type = DirichletBC
variable = disp_x
boundary = 40
value = 0.0
[]
[boty]
type = DirichletBC
variable = disp_y
boundary = 40
value = 0.0
[]
[topy]
type = FunctionDirichletBC
variable = disp_y
boundary = 30
function = '${starting_point} * cos(16.0 * pi / 4 * t) + ${offset}'
[]
[leftx]
type = FunctionDirichletBC
variable = disp_x
boundary = 50
function = '1e-2 * t'
[]
[]
[Executioner]
type = Transient
end_time = 0.3
dt = 0.03
dtmin = .002
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -pc_svd_monitor '
'-snes_linesearch_monitor -snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = 'lu superlu_dist NONZERO 1e-15'
nl_max_its = 40
nl_abs_tol = 1.0e-11
nl_rel_tol = 1.0e-11
line_search = 'none'
snesmf_reuse_base = true
[TimeIntegrator]
type = NewmarkBeta
beta = 0.25
gamma = 0.5
[]
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
exodus = true
checkpoint = true
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
active = 'contact'
[num_nl]
type = NumNonlinearIterations
[]
[cumulative]
type = CumulativeValuePostprocessor
postprocessor = num_nl
[]
[contact]
type = ContactDOFSetSize
variable = normal_lm
subdomain = '3'
execute_on = 'nonlinear timestep_end'
[]
[]
(modules/phase_field/test/tests/initial_conditions/BoundingBoxIC.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 2
xmax = 50
ymax = 25
elem_type = QUAD4
uniform_refine = 2
[]
[Variables]
[./c]
order = THIRD
family = HERMITE
[../]
[]
[ICs]
[./c_IC]
type = BoundingBoxIC
x1 = 15.0
x2 = 35.0
y1 = 0.0
y2 = 25.0
inside = 1.0
outside = -0.8
variable = c
[../]
[]
[Kernels]
[./ie_c]
type = TimeDerivative
variable = c
[../]
[./CHSolid]
type = CHMath
variable = c
mob_name = M
[../]
[./CHInterface]
type = CHInterface
variable = c
kappa_name = kappa_c
mob_name = M
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./constant]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1.0 1.0'
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_max_its = 15
nl_max_its = 10
start_time = 0.0
num_steps = 2
dt = 1.0
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/ad_rz_cone_no_parts_steady_stabilized.i)
[GlobalParams]
order = FIRST
integrate_p_by_parts = false
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[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]
[../]
[]
# 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_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]
[p_corner]
type = DirichletBC
boundary = top_right
value = 0
variable = p
[]
[inlet]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom'
function_x = 0
function_y = 'inlet_func'
[../]
[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
[]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[ins_mat]
type = INSADTauMaterial
velocity = velocity
pressure = p
[]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
execute_on = 'timestep_end'
[../]
[]
(modules/rdg/test/tests/advection_1d/block_restrictable.i)
############################################################
[GlobalParams]
order = CONSTANT
family = MONOMIAL
u = u
slope_limiting = lslope
implicit = false
[]
############################################################
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
xmin = 0
xmax = 1
nx = 100
[]
[./subdomain1]
type = SubdomainBoundingBoxGenerator
bottom_left = '0.5 0 0'
block_id = 1
top_right = '1.0 1.0 0'
input = gen
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
input = subdomain1
[../]
[./interface_again]
type = SideSetsBetweenSubdomainsGenerator
primary_block = '1'
paired_block = '0'
new_boundary = 'primary1_interface'
input = interface
[../]
[]
############################################################
[Functions]
[./ic_u]
type = PiecewiseConstant
axis = x
direction = right
xy_data = '0.1 0.5
0.4 1.0
0.5 0.5'
[../]
[]
############################################################
[UserObjects]
[./lslope]
type = AEFVSlopeLimitingOneD
execute_on = 'linear'
scheme = 'superbee' #none | minmod | mc | superbee
block = 0
[../]
[./internal_side_flux]
type = AEFVUpwindInternalSideFlux
execute_on = 'linear'
[../]
[./free_outflow_bc]
type = AEFVFreeOutflowBoundaryFlux
execute_on = 'linear'
[../]
[]
############################################################
[Variables]
[./u]
block = 0
[../]
[./v]
block = 1
family = LAGRANGE
order = FIRST
[../]
[]
############################################################
[ICs]
[./u_ic]
type = FunctionIC
variable = 'u'
function = ic_u
[../]
[]
############################################################
[Kernels]
[./time_u]
implicit = true
type = TimeDerivative
variable = u
block = 0
[../]
[./diff_v]
implicit = true
type = Diffusion
variable = v
block = 1
[../]
[./time_v]
implicit = true
type = TimeDerivative
variable = v
block = 1
[../]
[]
############################################################
[DGKernels]
[./concentration]
type = AEFVKernel
variable = u
component = 'concentration'
flux = internal_side_flux
block = 0
[../]
[]
############################################################
[BCs]
[./concentration]
type = AEFVBC
boundary = 'left primary0_interface'
variable = u
component = 'concentration'
flux = free_outflow_bc
[../]
[./v_left]
type = DirichletBC
boundary = 'primary1_interface'
variable = v
value = 1
[../]
[./v_right]
type = DirichletBC
boundary = 'right'
variable = v
value = 0
[../]
[]
############################################################
[Materials]
[./aefv]
type = AEFVMaterial
block = 0
[../]
[./dummy_1]
type = GenericConstantMaterial
block = 1
prop_names = ''
prop_values = ''
[../]
[]
############################################################
[Executioner]
type = Transient
[./TimeIntegrator]
type = ExplicitMidpoint
[../]
solve_type = 'LINEAR'
l_tol = 1e-4
nl_rel_tol = 1e-20
nl_abs_tol = 1e-8
nl_max_its = 60
start_time = 0.0
num_steps = 4 # 4 | 400 for complete run
dt = 5e-4
dtmin = 1e-6
[]
[Outputs]
[./out]
type = Exodus
time_step_interval = 2
[../]
perf_graph = true
[]
(modules/chemical_reactions/test/tests/jacobian/coupled_diffreact2.i)
# Test the Jacobian terms for the CoupledDiffusionReactionSub Kernel using
# activity coefficients not equal to unity
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
[]
[Variables]
[./a]
order = FIRST
family = LAGRANGE
[../]
[./b]
order = FIRST
family = LAGRANGE
[../]
[./pressure]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./pressure]
type = RandomIC
variable = pressure
min = 1
max = 5
[../]
[./a]
type = RandomIC
variable = a
max = 1
min = 0
[../]
[./b]
type = RandomIC
variable = b
max = 1
min = 0
[../]
[]
[Kernels]
[./diff]
type = DarcyFluxPressure
variable = pressure
[../]
[./diff_b]
type = Diffusion
variable = b
[../]
[./a1diff]
type = CoupledDiffusionReactionSub
variable = a
v = b
log_k = 2
weight = 2
sto_v = 1.5
sto_u = 2
gamma_eq = 2
gamma_u = 2.5
gamma_v = 1.5
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity'
prop_values = '1e-4 1e-4 0.2'
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
perf_graph = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
(modules/phase_field/test/tests/phase_field_kernels/ADSplitCahnHilliard.i)
#
# Test the split parsed function free enery Cahn-Hilliard Bulk kernel
# The free energy used here has the same functional form as the SplitCHPoly kernel
# If everything works, the output of this test should replicate the output
# of marmot/tests/chpoly_test/CHPoly_Cu_Split_test.i (exodiff match)
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmin = 0
xmax = 60
ymin = 0
ymax = 60
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 0
y1 = 0
radius = 30.0
invalue = 1.0
outvalue = -0.5
int_width = 30.0
[../]
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./c_res]
type = ADSplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
[../]
[./w_res]
type = ADSplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = ADCoupledTimeDerivative
variable = w
v = c
[../]
[]
[Materials]
[./pfmobility]
type = ADGenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '100 40'
[../]
[./free_energy]
type = ADMathFreeEnergy
f_name = F
c = 'c'
[../]
[]
[Preconditioning]
# active = ' '
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
num_steps = 2
dt = 1
[]
[Outputs]
exodus = true
file_base = SplitCahnHilliard_out
[]
(modules/phase_field/test/tests/actions/conserved_forward_split_1var.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
xmax = 25.0
ymax = 25.0
elem_type = QUAD
[]
[Debug]
show_actions = true
[]
[Modules]
[./PhaseField]
[./Conserved]
[./c]
solve_type = FORWARD_SPLIT
mobility = 1.0
kappa = kappa_c
free_energy = F
[../]
[../]
[../]
[]
[ICs]
[./c_IC]
type = CrossIC
variable = c
x1 = 0.0
x2 = 25.0
y1 = 0.0
y2 = 25.0
[../]
[]
[AuxVariables]
[./local_energy]
family = MONOMIAL
order = CONSTANT
[../]
[]
[AuxKernels]
[./local_energy]
type = TotalFreeEnergy
variable = local_energy
f_name = F
kappa_names = kappa_c
interfacial_vars = c
[../]
[]
[Materials]
[./kappa_c]
type = GenericConstantMaterial
prop_names = kappa_c
prop_values = 2.0
[../]
[./free_energy]
type = DerivativeParsedMaterial
coupled_variables = c
expression = '(1 - c)^2 * (1 + c)^2'
property_name = F
[../]
[]
[Postprocessors]
[./total_free_energy]
type = ElementIntegralVariablePostprocessor
variable = local_energy
[../]
[./total_c]
type = ElementIntegralVariablePostprocessor
variable = c
execute_on = 'initial TIMESTEP_END'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
solve_type = 'NEWTON'
l_max_its = 30
l_tol = 1.0e-4
nl_max_its = 10
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 5
dt = 0.7
[]
[Outputs]
perf_graph = true
exodus = true
[]
(test/tests/mortar/gap-conductance-2d-non-conforming/gap-conductance.i)
[Mesh]
[file]
type = FileMeshGenerator
file = nodal_normals_test_offset_nonmatching_gap.e
[]
[./primary]
input = file
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = '20'
[../]
[./secondary]
input = primary
type = LowerDBlockFromSidesetGenerator
sidesets = '1'
new_block_id = '10'
[../]
[]
[Problem]
kernel_coverage_check = false
[]
[Variables]
[./T]
block = '1 2'
[../]
[./lambda]
block = '10'
[../]
[]
[BCs]
[./neumann]
type = FunctionGradientNeumannBC
exact_solution = exact_soln
variable = T
boundary = '3 4 5 6 7 8'
[../]
[]
[Kernels]
[./conduction]
type = Diffusion
variable = T
block = '1 2'
[../]
[./sink]
type = Reaction
variable = T
block = '1 2'
[../]
[./forcing_function]
type = BodyForce
variable = T
function = forcing_function
block = '1 2'
[../]
[]
[Functions]
[./forcing_function]
type = ParsedFunction
expression = '-4 + x^2 + y^2'
[../]
[./exact_soln]
type = ParsedFunction
expression = 'x^2 + y^2'
[../]
[]
[Debug]
show_var_residual_norms = 1
[]
[Constraints]
[./mortar]
type = GapHeatConductanceTest
primary_boundary = 2
secondary_boundary = 1
primary_subdomain = 20
secondary_subdomain = 10
variable = lambda
secondary_variable = T
[../]
[]
[Materials]
[constant]
type = ADGenericConstantMaterial
prop_names = 'gap_conductance'
prop_values = '.03'
block = '1 2'
[]
[./ssm]
type = SpatialStatefulMaterial
block = '1 2'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
solve_type = NEWTON
type = Steady
petsc_options_iname = '-pc_type -snes_linesearch_type'
petsc_options_value = 'lu basic'
[]
[Outputs]
exodus = true
[dofmap]
type = DOFMap
execute_on = 'initial'
[]
[]
(test/tests/mesh/patterned_mesh/mesh_tester.i)
[Mesh]
type = FileMesh
file = patterned_mesh_in.e
dim = 2
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = MatCoefDiffusion
variable = u
conductivity = conductivity
[../]
[]
[BCs]
[./top]
type = DirichletBC
variable = u
boundary = 3
value = 1
[../]
[./bottom]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[]
[Materials]
[./mat1]
type = GenericConstantMaterial
block = 1
prop_names = conductivity
prop_values = 100
[../]
[./mat2]
type = GenericConstantMaterial
block = 2
prop_names = conductivity
prop_values = 1e-4
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/chemical_reactions/test/tests/parser/equilibrium_without_action.i)
# Test AqueousEquilibriumReactions parser
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Variables]
[./a]
[../]
[./b]
[../]
[]
[AuxVariables]
[./pressure]
[../]
[./pa2]
[../]
[./pab]
[../]
[]
[AuxKernels]
[./pa2]
type = AqueousEquilibriumRxnAux
variable = pa2
v = a
log_k = 2
sto_v = 2
[../]
[./pab]
type = AqueousEquilibriumRxnAux
variable = pab
v = 'a b'
log_k = -2
sto_v = '1 1'
[../]
[]
[ICs]
[./a]
type = BoundingBoxIC
variable = a
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[../]
[./b]
type = BoundingBoxIC
variable = b
x1 = 0.0
y1 = 0.0
x2 = 1.0e-10
y2 = 1
inside = 1.0e-2
outside = 1.0e-10
[../]
[./pressure]
type = FunctionIC
variable = pressure
function = 2-x
[../]
[]
[Kernels]
[./a_ie]
type = PrimaryTimeDerivative
variable = a
[../]
[./a_diff]
type = PrimaryDiffusion
variable = a
[../]
[./a_conv]
type = PrimaryConvection
variable = a
p = pressure
[../]
[./b_ie]
type = PrimaryTimeDerivative
variable = b
[../]
[./b_diff]
type = PrimaryDiffusion
variable = b
[../]
[./b_conv]
type = PrimaryConvection
variable = b
p = pressure
[../]
[./a1_eq]
type = CoupledBEEquilibriumSub
variable = a
log_k = 2
weight = 2
sto_u = 2
[../]
[./a1_diff]
type = CoupledDiffusionReactionSub
variable = a
log_k = 2
weight = 2
sto_u = 2
[../]
[./a1_conv]
type = CoupledConvectionReactionSub
variable = a
log_k = 2
weight = 2
sto_u = 2
p = pressure
[../]
[./a2_eq]
type = CoupledBEEquilibriumSub
variable = a
v = b
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
[../]
[./a2_diff]
type = CoupledDiffusionReactionSub
variable = a
v = b
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
[../]
[./a2_conv]
type = CoupledConvectionReactionSub
variable = a
v = b
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
p = pressure
[../]
[./b2_eq]
type = CoupledBEEquilibriumSub
variable = b
v = a
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
[../]
[./b2_diff]
type = CoupledDiffusionReactionSub
variable = b
v = a
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
[../]
[./b2_conv]
type = CoupledConvectionReactionSub
variable = b
v = a
log_k = -2
weight = 1
sto_v = 1
sto_u = 1
p = pressure
[../]
[]
[BCs]
[./a_left]
type = DirichletBC
variable = a
boundary = left
value = 1.0e-2
[../]
[./a_right]
type = ChemicalOutFlowBC
variable = a
boundary = right
[../]
[./b_left]
type = DirichletBC
variable = b
boundary = left
value = 1.0e-2
[../]
[./b_right]
type = ChemicalOutFlowBC
variable = b
boundary = right
[../]
[]
[Materials]
[./porous]
type = GenericConstantMaterial
prop_names = 'diffusivity conductivity porosity'
prop_values = '1e-4 1e-4 0.2'
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
nl_abs_tol = 1e-12
end_time = 10
dt = 10
[]
[Outputs]
file_base = equilibrium_out
exodus = true
perf_graph = true
print_linear_residuals = true
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
(modules/solid_mechanics/test/tests/gravity/ad_gravity_test.i)
#
# Gravity Test
#
# This test is designed to apply a gravity body force.
#
# The mesh is composed of one block with a single element.
# The bottom is fixed in all three directions. Poisson's ratio
# is zero and the density is 20/9.81
# which makes it trivial to check displacements.
#
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
type = GeneratedMesh
dim = 3
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
add_variables = true
use_automatic_differentiation = true
[]
[]
[Kernels]
[gravity_y]
type = ADGravity
variable = disp_y
value = -9.81
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_x
boundary = bottom
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[]
[no_z]
type = DirichletBC
variable = disp_z
boundary = bottom
value = 0.0
[]
[]
[Materials]
[Elasticity_tensor]
type = ADComputeElasticityTensor
fill_method = symmetric_isotropic
C_ijkl = '0 0.5e6'
[]
[stress]
type = ADComputeLinearElasticStress
[]
[density]
type = ADGenericConstantMaterial
prop_names = density
prop_values = 2.0387
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_abs_tol = 1e-10
l_max_its = 20
[]
[Outputs]
[out]
type = Exodus
elemental_as_nodal = true
[]
[]
(modules/combined/test/tests/phase_field_fracture/crack2d_aniso.i)
#This input uses PhaseField-Nonconserved Action to add phase field fracture bulk rate kernels
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 20
ymax = 0.5
[]
[./noncrack]
type = BoundingBoxNodeSetGenerator
new_boundary = noncrack
bottom_left = '0.5 0 0'
top_right = '1 0 0'
input = gen
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Modules]
[./TensorMechanics]
[./Master]
[./All]
add_variables = true
strain = SMALL
additional_generate_output = 'strain_yy stress_yy'
planar_formulation = PLANE_STRAIN
[../]
[../]
[../]
[./PhaseField]
[./Nonconserved]
[./c]
free_energy = F
kappa = kappa_op
mobility = L
[../]
[../]
[../]
[]
[Kernels]
[./solid_x]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_x
component = 0
c = c
[../]
[./solid_y]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_y
component = 1
c = c
[../]
[./off_disp]
type = AllenCahnElasticEnergyOffDiag
variable = c
displacements = 'disp_x disp_y'
mob_name = L
[../]
[]
[BCs]
[./ydisp]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = 't'
[../]
[./yfix]
type = DirichletBC
variable = disp_y
boundary = noncrack
value = 0
[../]
[./xfix]
type = DirichletBC
variable = disp_x
boundary = right
value = 0
[../]
[]
[Materials]
[./pfbulkmat]
type = GenericConstantMaterial
prop_names = 'gc_prop l visco'
prop_values = '1e-3 0.05 1e-6'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '127.0 70.8 70.8 127.0 70.8 127.0 73.55 73.55 73.55'
fill_method = symmetric9
euler_angle_1 = 30
euler_angle_2 = 0
euler_angle_3 = 0
[../]
[./define_mobility]
type = ParsedMaterial
material_property_names = 'gc_prop visco'
property_name = L
expression = '1.0/(gc_prop * visco)'
[../]
[./define_kappa]
type = ParsedMaterial
material_property_names = 'gc_prop l'
property_name = kappa_op
expression = 'gc_prop * l'
[../]
[./damage_stress]
type = ComputeLinearElasticPFFractureStress
c = c
E_name = 'elastic_energy'
D_name = 'degradation'
F_name = 'local_fracture_energy'
decomposition_type = stress_spectral
use_current_history_variable = true
[../]
[./degradation]
type = DerivativeParsedMaterial
property_name = degradation
coupled_variables = 'c'
expression = '(1.0-c)^2*(1.0 - eta) + eta'
constant_names = 'eta'
constant_expressions = '1.0e-6'
derivative_order = 2
[../]
[./local_fracture_energy]
type = DerivativeParsedMaterial
property_name = local_fracture_energy
coupled_variables = 'c'
material_property_names = 'gc_prop l'
expression = 'c^2 * gc_prop / 2 / l'
derivative_order = 2
[../]
[./fracture_driving_energy]
type = DerivativeSumMaterial
coupled_variables = c
sum_materials = 'elastic_energy local_fracture_energy'
derivative_order = 2
property_name = F
[../]
[]
[Postprocessors]
[./av_stress_yy]
type = ElementAverageValue
variable = stress_yy
[../]
[./av_strain_yy]
type = SideAverageValue
variable = disp_y
boundary = top
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_factor_mat_solving_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-8
l_tol = 1e-4
l_max_its = 100
nl_max_its = 10
dt = 5e-5
num_steps = 2
[]
[Outputs]
exodus = true
[]
(modules/xfem/test/tests/switching_material/one_cut_stationary.i)
[Problem]
solve = false
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[levelset_cut]
type = LevelSetCutUserObject
level_set_var = phi
negative_id = 1
positive_id = 33
[]
[]
[Mesh]
[square]
type = GeneratedMeshGenerator
dim = 2
nx = 2
ny = 2
[]
[]
[AuxVariables]
[phi]
[InitialCondition]
type = FunctionIC
function = 'x-0.213'
[]
[]
[]
[Materials]
[diffusivity_A]
type = GenericConstantMaterial
prop_names = 'A_D'
prop_values = '5'
[]
[diffusivity_B]
type = GenericConstantMaterial
prop_names = 'B_D'
prop_values = '0.5'
[]
[diff_combined]
type = XFEMCutSwitchingMaterialReal
cut_subdomain_ids = '1 33'
base_names = 'A B'
prop_name = D
geometric_cut_userobject = levelset_cut
outputs = 'exodus'
output_properties = 'D'
[]
[]
[Executioner]
type = Transient
num_steps = 1
max_xfem_update = 1
[]
[Outputs]
exodus = true
[]
(modules/phase_field/examples/rigidbodymotion/grain_forcedensity_ext.i)
# example showing grain motion due to applied force density on grains
[GlobalParams]
var_name_base = eta
op_num = 2
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 20
nz = 0
xmin = 0.0
xmax = 40.0
ymin = 0.0
ymax = 20.0
zmax = 0
elem_type = QUAD4
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SpecifiedSmoothCircleIC
invalue = 1.0
outvalue = 0.0
int_width = 6.0
x_positions = '20.0 30.0 '
z_positions = '0.0 0.0 '
y_positions = '0.0 25.0 '
radii = '14.0 14.0'
3D_spheres = false
variable = c
[../]
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./load]
type = ConstantFunction
value = -0.01
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./motion]
type = MultiGrainRigidBodyMotion
variable = w
c = c
v = 'eta0 eta1'
grain_tracker_object = grain_center
grain_force = grain_force
grain_volumes = grain_volumes
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c kappa_eta'
prop_values = '1.0 2.0 0.1'
[../]
[./free_energy]
type = DerivativeParsedMaterial
property_name = F
coupled_variables = c
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 1.0e-2'
expression = 16*barr_height*(c-cv_eq)^2*(1-cv_eq-c)^2
derivative_order = 2
[../]
[./force_density]
type = ExternalForceDensityMaterial
c = c
etas = 'eta0 eta1'
k = 1.0
force_y = load
[../]
[]
[AuxVariables]
[./eta0]
[../]
[./eta1]
[../]
[./bnds]
[../]
[./df00]
order = CONSTANT
family = MONOMIAL
[../]
[./df01]
order = CONSTANT
family = MONOMIAL
[../]
[./df10]
order = CONSTANT
family = MONOMIAL
[../]
[./df11]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./bnds]
type = BndsCalcAux
variable = bnds
var_name_base = eta
op_num = 2
v = 'eta0 eta1'
[../]
[./df01]
type = MaterialStdVectorRealGradientAux
variable = df01
component = 1
property = force_density_ext
[../]
[./df11]
type = MaterialStdVectorRealGradientAux
variable = df11
index = 1
component = 1
property = force_density_ext
[../]
[./df00]
type = MaterialStdVectorRealGradientAux
variable = df00
property = force_density_ext
[../]
[./df10]
type = MaterialStdVectorRealGradientAux
variable = df10
index = 1
property = force_density_ext
[../]
[]
[ICs]
[./ic_eta0]
int_width = 6.0
x1 = 20.0
y1 = 0.0
radius = 14.0
outvalue = 0.0
variable = eta0
invalue = 1.0
type = SmoothCircleIC
[../]
[./IC_eta1]
int_width = 6.0
x1 = 30.0
y1 = 25.0
radius = 14.0
outvalue = 0.0
variable = eta1
invalue = 1.0
type = SmoothCircleIC
[../]
[]
[VectorPostprocessors]
[./forces]
type = GrainForcesPostprocessor
grain_force = grain_force
[../]
[./grain_volumes]
type = FeatureVolumeVectorPostprocessor
flood_counter = grain_center
execute_on = 'initial timestep_begin'
[../]
[]
[UserObjects]
[./grain_center]
type = GrainTracker
outputs = none
compute_var_to_feature_map = true
execute_on = 'initial timestep_begin'
[../]
[./grain_force]
type = ComputeExternalGrainForceAndTorque
c = c
etas = 'eta0 eta1'
grain_data = grain_center
force_density = force_density_ext
execute_on = 'initial linear nonlinear'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
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
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 5
dt = 0.1
[./Adaptivity]
refine_fraction = 0.7
coarsen_fraction = 0.1
max_h_level = 2
initial_adaptivity = 1
[../]
[]
[Outputs]
exodus = 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/thermal_hydraulics/test/tests/materials/wall_friction_factor/churchill_ad.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
allow_renumbering = false
[]
[Materials]
[props]
type = ADGenericConstantMaterial
prop_names = 'rho vel mu D_h'
prop_values = '1000 0.1 0.001 0.15'
[]
[fD_material]
type = ADWallFrictionChurchillMaterial
rho = rho
vel = vel
D_h = D_h
mu = mu
f_D = 'f_D'
roughness = 0.5
[]
[]
[Postprocessors]
[fD]
type = ADElementAverageMaterialProperty
mat_prop = f_D
[]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
num_steps = 1
[]
[Outputs]
csv = true
execute_on = 'FINAL'
[]
(modules/heat_transfer/test/tests/thin_layer_heat_transfer/transient_2d.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
nx = 10
ny = 10
dim = 2
[]
[block1]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '0.5 1 0'
input = gen
[]
[block2]
type = SubdomainBoundingBoxGenerator
block_id = 2
bottom_left = '0.5 0 0'
top_right = '1 1 0'
input = block1
[]
[breakmesh]
input = block2
type = BreakMeshByBlockGenerator
block_pairs = '1 2'
split_interface = true
add_interface_on_two_sides = true
[]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[time]
type = HeatConductionTimeDerivative
variable = temperature
[]
[thermal_cond]
type = HeatConduction
variable = temperature
[]
[]
[InterfaceKernels]
[thin_layer]
type = ThinLayerHeatTransfer
thermal_conductivity = thermal_conductivity_layer
specific_heat = specific_heat_layer
density = density_layer
heat_source = heat_source_layer
thickness = 0.01
variable = temperature
neighbor_var = temperature
boundary = Block1_Block2
[]
[]
[BCs]
[left_temp]
type = DirichletBC
value = 0
variable = temperature
boundary = left
[]
[right_temp]
type = DirichletBC
value = 0
variable = temperature
boundary = right
[]
[]
[Materials]
[thermal_cond]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1 1 1'
[]
[thermal_cond_layer]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity_layer specific_heat_layer heat_source_layer density_layer'
prop_values = '0.05 1 10000 1'
boundary = Block1_Block2
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
dt = 0.05
num_steps = 2
[]
[Outputs]
print_linear_residuals = false
exodus = 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'
[]
[]
(modules/phase_field/test/tests/mobility_derivative/mobility_derivative_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
xmax = 30.0
ymax = 30.0
elem_type = QUAD4
[]
[Variables]
[./c]
[../]
[./w]
[../]
[]
[ICs]
[./c_IC]
type = CrossIC
x1 = 0.0
x2 = 30.0
y1 = 0.0
y2 = 30.0
variable = c
[../]
[]
[Kernels]
[./cres]
type = SplitCHParsed
variable = c
kappa_name = kappa_c
w = w
f_name = F
[../]
[./wres]
type = SplitCHWRes
variable = w
mob_name = M
coupled_variables = c
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./kappa]
type = GenericConstantMaterial
prop_names = 'kappa_c'
prop_values = '2.0'
[../]
[./mob]
type = DerivativeParsedMaterial
property_name = M
coupled_variables = c
expression = '1-0.9*c^2'
outputs = exodus
derivative_order = 1
[../]
[./free_energy]
type = MathEBFreeEnergy
property_name = F
c = c
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
off_diag_row = 'w c'
off_diag_column = 'c w'
[../]
[]
[Executioner]
type = Transient
scheme = 'BDF2'
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 lu 1'
l_max_its = 30
l_tol = 1.0e-4
nl_max_its = 50
nl_rel_tol = 1.0e-10
dt = 10.0
num_steps = 2
[]
[Outputs]
exodus = true
[]
(test/tests/interfacekernels/1d_interface/no-failed-point-inversions.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
xmax = 2
[]
[subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '1.0 0 0'
block_id = 1
top_right = '2.0 1.0 0'
[]
[interface]
input = subdomain1
type = SideSetsBetweenSubdomainsGenerator
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[]
[break]
type = BreakMeshByBlockGenerator
input = interface
[]
displacements = 'disp_x'
[]
[AuxVariables]
[disp_x][]
[]
[ICs]
[right]
type = ConstantIC
variable = disp_x
block = 1
value = 1
[]
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
block = '0'
[]
[v]
order = FIRST
family = LAGRANGE
block = '1'
[]
[]
[Kernels]
[diff_u]
type = CoeffParamDiffusion
variable = u
D = 4
block = 0
[]
[diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 1
[]
[]
[InterfaceKernels]
[penalty_interface]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = 'left'
value = 1
[]
[right]
type = DirichletBC
variable = v
boundary = 'right'
value = 0
[]
[]
[Materials]
[block0]
type = GenericConstantMaterial
block = '0'
prop_names = 'D'
prop_values = '4'
[]
[block1]
type = GenericConstantMaterial
block = '1'
prop_names = 'D'
prop_values = '2'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
[Debug]
show_var_residual_norms = true
[]
[Postprocessors]
[area]
type = AreaPostprocessor
use_displaced_mesh = true
boundary = 'right'
[]
[]
(modules/phase_field/examples/measure_interface_energy/1Dinterface_energy.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
xmax = 100
xmin = 0
elem_type = EDGE
[]
[AuxVariables]
[./local_energy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./local_free_energy]
type = TotalFreeEnergy
variable = local_energy
kappa_names = kappa_c
interfacial_vars = c
[../]
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
scaling = 1e1
[./InitialCondition]
type = RampIC
variable = c
value_left = 0
value_right = 1
[../]
[../]
[./w]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[./time]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[]
[Functions]
[./Int_energy]
type = ParsedFunction
symbol_values = 'total_solute Cleft Cright Fleft Fright volume'
expression = '((total_solute-Cleft*volume)/(Cright-Cleft))*Fright+(volume-(total_solute-Cleft*volume)/(Cright-Cleft))*Fleft'
symbol_names = 'total_solute Cleft Cright Fleft Fright volume'
[../]
[./Diff]
type = ParsedFunction
symbol_values = 'total_free_energy total_no_int'
symbol_names = 'total_free_energy total_no_int'
expression = total_free_energy-total_no_int
[../]
[]
[Materials]
[./consts]
type = GenericConstantMaterial
prop_names = 'kappa_c M'
prop_values = '25 150'
[../]
[./Free_energy]
type = DerivativeParsedMaterial
property_name = F
expression = 'c^2*(c-1)^2'
coupled_variables = c
derivative_order = 2
[../]
[]
[Postprocessors]
# The total free energy of the simulation cell to observe the energy reduction.
[./total_free_energy]
type = ElementIntegralVariablePostprocessor
variable = local_energy
[../]
# for testing we also monitor the total solute amount, which should be conserved,
# gives Cavg in % for this problem.
[./total_solute]
type = ElementIntegralVariablePostprocessor
variable = c
[../]
# Get simulation cell size (1D volume) from postprocessor
[./volume]
type = ElementIntegralMaterialProperty
mat_prop = 1
[../]
# Find concentration in each phase using SideAverageValue
[./Cleft]
type = SideAverageValue
boundary = left
variable = c
[../]
[./Cright]
type = SideAverageValue
boundary = right
variable = c
[../]
# Find local energy in each phase by checking boundaries
[./Fleft]
type = SideAverageValue
boundary = left
variable = local_energy
[../]
[./Fright]
type = SideAverageValue
boundary = right
variable = local_energy
[../]
# Use concentrations and energies to find total free energy without any interface,
# only applies once equilibrium is reached!!
# Difference between energy with and without interface
# gives interface energy per unit area.
[./total_no_int]
type = FunctionValuePostprocessor
function = Int_energy
[../]
[./Energy_of_Interface]
type = FunctionValuePostprocessor
function = Diff
[../]
[]
[Preconditioning]
# This preconditioner makes sure the Jacobian Matrix is fully populated. Our
# kernels compute all Jacobian matrix entries.
# This allows us to use the Newton solver below.
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
# Automatic differentiation provides a _full_ Jacobian in this example
# so we can safely use NEWTON for a fast solve
solve_type = 'NEWTON'
l_max_its = 15
l_tol = 1.0e-6
nl_max_its = 15
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-4
start_time = 0.0
# make sure that the result obtained for the interfacial free energy is fully converged
end_time = 40
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.5
[../]
[]
[Outputs]
gnuplot = true
csv = true
[./exodus]
type = Exodus
show = 'c local_energy'
execute_on = 'failed initial nonlinear timestep_end final'
[../]
[./console]
type = Console
execute_on = 'FAILED INITIAL NONLINEAR TIMESTEP_END final'
[../]
perf_graph = true
[]
(modules/combined/test/tests/phase_field_fracture/crack2d_computeCrackedStress_finitestrain_elastic.i)
#This input uses PhaseField-Nonconserved Action to add phase field fracture bulk rate kernels
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 20
ymax = 0.5
[]
[./noncrack]
type = BoundingBoxNodeSetGenerator
new_boundary = noncrack
bottom_left = '0.5 0 0'
top_right = '1 0 0'
input = gen
[../]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[AuxVariables]
[./strain_yy]
family = MONOMIAL
order = CONSTANT
[../]
[]
[Modules]
[./TensorMechanics]
[./Master]
[./All]
add_variables = true
strain = FINITE
planar_formulation = PLANE_STRAIN
additional_generate_output = 'stress_yy'
strain_base_name = uncracked
[../]
[../]
[../]
[./PhaseField]
[./Nonconserved]
[./c]
free_energy = E_el
kappa = kappa_op
mobility = L
[../]
[../]
[../]
[]
[Kernels]
[./solid_x]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_x
component = 0
c = c
[../]
[./solid_y]
type = PhaseFieldFractureMechanicsOffDiag
variable = disp_y
component = 1
c = c
[../]
[./off_disp]
type = AllenCahnElasticEnergyOffDiag
variable = c
displacements = 'disp_x disp_y'
mob_name = L
[../]
[]
[AuxKernels]
[./strain_yy]
type = RankTwoAux
variable = strain_yy
rank_two_tensor = uncracked_mechanical_strain
index_i = 1
index_j = 1
execute_on = TIMESTEP_END
[../]
[]
[BCs]
[./ydisp]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = 't'
[../]
[./yfix]
type = DirichletBC
variable = disp_y
boundary = noncrack
value = 0
[../]
[./xfix]
type = DirichletBC
variable = disp_x
boundary = right
value = 0
[../]
[]
[Materials]
[./pfbulkmat]
type = GenericConstantMaterial
prop_names = 'gc_prop l visco'
prop_values = '1e-3 0.05 1e-4'
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
C_ijkl = '120.0 80.0'
fill_method = symmetric_isotropic
base_name = uncracked
[../]
[./elastic]
type = ComputeFiniteStrainElasticStress
base_name = uncracked
[../]
[./cracked_stress]
type = ComputeCrackedStress
c = c
kdamage = 1e-5
F_name = E_el
use_current_history_variable = true
uncracked_base_name = uncracked
finite_strain_model = true
[../]
[]
[Postprocessors]
[./av_stress_yy]
type = ElementAverageValue
variable = stress_yy
[../]
[./av_strain_yy]
type = SideAverageValue
variable = disp_y
boundary = top
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_factor_mat_solving_package'
petsc_options_value = 'lu superlu_dist'
nl_rel_tol = 1e-8
l_tol = 1e-4
l_max_its = 100
nl_max_its = 10
dt = 3e-5
num_steps = 2
[]
[Outputs]
exodus = true
[]
(modules/xfem/test/tests/moving_interface/phase_transition_2d.i)
[GlobalParams]
order = FIRST
family = LAGRANGE
[]
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 11
ny = 1
xmin = 0.0
xmax = 20.0
ymin = 0.0
ymax = 5.0
elem_type = QUAD4
[]
[]
[XFEM]
qrule = volfrac
output_cut_plane = true
[]
[UserObjects]
[velocity]
type = XFEMPhaseTransitionMovingInterfaceVelocity
diffusivity_at_positive_level_set = 5
diffusivity_at_negative_level_set = 1
equilibrium_concentration_jump = 1
value_at_interface_uo = value_uo
[]
[value_uo]
type = NodeValueAtXFEMInterface
variable = 'u'
interface_mesh_cut_userobject = 'cut_mesh'
execute_on = TIMESTEP_END
level_set_var = ls
[]
[cut_mesh]
type = InterfaceMeshCut2DUserObject
mesh_file = flat_interface_1d.e
interface_velocity_uo = velocity
heal_always = true
[]
[]
[Variables]
[u]
[]
[]
[ICs]
[ic_u]
type = FunctionIC
variable = u
function = 'if(x<5.01, 2, 1)'
[]
[]
[AuxVariables]
[ls]
order = FIRST
family = LAGRANGE
[]
[]
[Constraints]
[u_constraint]
type = XFEMEqualValueAtInterface
geometric_cut_userobject = 'cut_mesh'
use_displaced_mesh = false
variable = u
value = 2
alpha = 1e6
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = diffusion_coefficient
[]
[time]
type = TimeDerivative
variable = u
[]
[]
[AuxKernels]
[ls]
type = MeshCutLevelSetAux
mesh_cut_user_object = cut_mesh
variable = ls
execute_on = 'TIMESTEP_BEGIN'
[]
[]
[Materials]
[diffusivity_A]
type = GenericConstantMaterial
prop_names = A_diffusion_coefficient
prop_values = 5
[]
[diffusivity_B]
type = GenericConstantMaterial
prop_names = B_diffusion_coefficient
prop_values = 1
[]
[diff_combined]
type = LevelSetBiMaterialReal
levelset_positive_base = 'A'
levelset_negative_base = 'B'
level_set_var = ls
prop_name = diffusion_coefficient
[]
[]
[BCs]
# Define boundary conditions
[left_u]
type = DirichletBC
variable = u
value = 2
boundary = left
[]
[right_u]
type = NeumannBC
variable = u
boundary = right
value = 0
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
l_tol = 1e-3
nl_max_its = 15
nl_rel_tol = 1e-9
nl_abs_tol = 1e-9
start_time = 0.0
dt = 1
num_steps = 5
max_xfem_update = 1
[]
[Outputs]
execute_on = timestep_end
exodus = true
perf_graph = true
[]
(modules/heat_transfer/test/tests/thin_layer_heat_transfer/steady_2d.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
nx = 10
ny = 10
dim = 2
[]
[block1]
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0 0 0'
top_right = '0.5 1 0'
input = gen
[]
[block2]
type = SubdomainBoundingBoxGenerator
block_id = 2
bottom_left = '0.5 0 0'
top_right = '1 1 0'
input = block1
[]
[breakmesh]
input = block2
type = BreakMeshByBlockGenerator
block_pairs = '1 2'
split_interface = true
add_interface_on_two_sides = true
[]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[thermal_cond]
type = HeatConduction
variable = temperature
[]
[]
[InterfaceKernels]
[thin_layer]
type = ThinLayerHeatTransfer
thermal_conductivity = thermal_conductivity_layer
thickness = 0.01
variable = temperature
neighbor_var = temperature
boundary = Block1_Block2
[]
[]
[BCs]
[left_temp]
type = DirichletBC
value = 100
variable = temperature
boundary = left
[]
[right_temp]
type = DirichletBC
value = 0
variable = temperature
boundary = right
[]
[]
[Materials]
[thermal_cond]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity'
prop_values = '1'
[]
[thermal_cond_layer]
type = GenericConstantMaterial
prop_names = 'thermal_conductivity_layer'
prop_values = '0.05'
boundary = Block1_Block2
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
dt = 0.05
num_steps = 1
[]
[Outputs]
print_linear_residuals = false
exodus = true
[]
(modules/phase_field/examples/multiphase/GrandPotential3Phase.i)
# This is an example of implementation of the multi-phase, multi-order parameter
# grand potential based phase-field model described in Phys. Rev. E, 98, 023309
# (2018). It includes 3 phases with 1 grain of each phase. This example was used
# to generate the results shown in Fig. 3 of the paper.
[Mesh]
type = GeneratedMesh
dim = 1
nx = 60
xmin = -15
xmax = 15
[]
[Variables]
[./w]
[../]
[./etaa0]
[../]
[./etab0]
[../]
[./etad0]
[../]
[]
[ICs]
[./IC_etaa0]
type = FunctionIC
variable = etaa0
function = ic_func_etaa0
[../]
[./IC_etab0]
type = FunctionIC
variable = etab0
function = ic_func_etab0
[../]
[./IC_etad0]
type = ConstantIC
variable = etad0
value = 0.1
[../]
[./IC_w]
type = FunctionIC
variable = w
function = ic_func_w
[../]
[]
[Functions]
[./ic_func_etaa0]
type = ParsedFunction
expression = '0.9*0.5*(1.0-tanh((x)/sqrt(2.0)))'
[../]
[./ic_func_etab0]
type = ParsedFunction
expression = '0.9*0.5*(1.0+tanh((x)/sqrt(2.0)))'
[../]
[./ic_func_w]
type = ParsedFunction
expression = 0
[../]
[]
[Kernels]
# Order parameter eta_alpha0
[./ACa0_bulk]
type = ACGrGrMulti
variable = etaa0
v = 'etab0 etad0'
gamma_names = 'gab gad'
[../]
[./ACa0_sw]
type = ACSwitching
variable = etaa0
Fj_names = 'omegaa omegab omegad'
hj_names = 'ha hb hd'
coupled_variables = 'etab0 etad0 w'
[../]
[./ACa0_int]
type = ACInterface
variable = etaa0
kappa_name = kappa
[../]
[./ea0_dot]
type = TimeDerivative
variable = etaa0
[../]
# Order parameter eta_beta0
[./ACb0_bulk]
type = ACGrGrMulti
variable = etab0
v = 'etaa0 etad0'
gamma_names = 'gab gbd'
[../]
[./ACb0_sw]
type = ACSwitching
variable = etab0
Fj_names = 'omegaa omegab omegad'
hj_names = 'ha hb hd'
coupled_variables = 'etaa0 etad0 w'
[../]
[./ACb0_int]
type = ACInterface
variable = etab0
kappa_name = kappa
[../]
[./eb0_dot]
type = TimeDerivative
variable = etab0
[../]
# Order parameter eta_delta0
[./ACd0_bulk]
type = ACGrGrMulti
variable = etad0
v = 'etaa0 etab0'
gamma_names = 'gad gbd'
[../]
[./ACd0_sw]
type = ACSwitching
variable = etad0
Fj_names = 'omegaa omegab omegad'
hj_names = 'ha hb hd'
coupled_variables = 'etaa0 etab0 w'
[../]
[./ACd0_int]
type = ACInterface
variable = etad0
kappa_name = kappa
[../]
[./ed0_dot]
type = TimeDerivative
variable = etad0
[../]
#Chemical potential
[./w_dot]
type = SusceptibilityTimeDerivative
variable = w
f_name = chi
coupled_variables = 'etaa0 etab0 etad0'
[../]
[./Diffusion]
type = MatDiffusion
variable = w
diffusivity = Dchi
args = ''
[../]
[./coupled_etaa0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etaa0
Fj_names = 'rhoa rhob rhod'
hj_names = 'ha hb hd'
coupled_variables = 'etaa0 etab0 etad0'
[../]
[./coupled_etab0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etab0
Fj_names = 'rhoa rhob rhod'
hj_names = 'ha hb hd'
coupled_variables = 'etaa0 etab0 etad0'
[../]
[./coupled_etad0dot]
type = CoupledSwitchingTimeDerivative
variable = w
v = etad0
Fj_names = 'rhoa rhob rhod'
hj_names = 'ha hb hd'
coupled_variables = 'etaa0 etab0 etad0'
[../]
[]
[Materials]
[./ha_test]
type = SwitchingFunctionMultiPhaseMaterial
h_name = ha
all_etas = 'etaa0 etab0 etad0'
phase_etas = 'etaa0'
[../]
[./hb_test]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hb
all_etas = 'etaa0 etab0 etad0'
phase_etas = 'etab0'
[../]
[./hd_test]
type = SwitchingFunctionMultiPhaseMaterial
h_name = hd
all_etas = 'etaa0 etab0 etad0'
phase_etas = 'etad0'
[../]
[./omegaa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegaa
material_property_names = 'Vm ka caeq'
expression = '-0.5*w^2/Vm^2/ka-w/Vm*caeq'
derivative_order = 2
[../]
[./omegab]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegab
material_property_names = 'Vm kb cbeq'
expression = '-0.5*w^2/Vm^2/kb-w/Vm*cbeq'
derivative_order = 2
[../]
[./omegad]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = omegad
material_property_names = 'Vm kd cdeq'
expression = '-0.5*w^2/Vm^2/kd-w/Vm*cdeq'
derivative_order = 2
[../]
[./rhoa]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhoa
material_property_names = 'Vm ka caeq'
expression = 'w/Vm^2/ka + caeq/Vm'
derivative_order = 2
[../]
[./rhob]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhob
material_property_names = 'Vm kb cbeq'
expression = 'w/Vm^2/kb + cbeq/Vm'
derivative_order = 2
[../]
[./rhod]
type = DerivativeParsedMaterial
coupled_variables = 'w'
property_name = rhod
material_property_names = 'Vm kd cdeq'
expression = 'w/Vm^2/kd + cdeq/Vm'
derivative_order = 2
[../]
[./c]
type = ParsedMaterial
material_property_names = 'Vm rhoa rhob rhod ha hb hd'
expression = 'Vm * (ha * rhoa + hb * rhob + hd * rhod)'
property_name = c
[../]
[./const]
type = GenericConstantMaterial
prop_names = 'kappa_c kappa L D Vm ka caeq kb cbeq kd cdeq gab gad gbd mu tgrad_corr_mult'
prop_values = '0 1 1.0 1.0 1.0 10.0 0.1 10.0 0.9 10.0 0.5 1.5 1.5 1.5 1.0 0.0'
[../]
[./Mobility]
type = DerivativeParsedMaterial
property_name = Dchi
material_property_names = 'D chi'
expression = 'D*chi'
derivative_order = 2
[../]
[./chi]
type = DerivativeParsedMaterial
property_name = chi
material_property_names = 'Vm ha(etaa0,etab0,etad0) ka hb(etaa0,etab0,etad0) kb hd(etaa0,etab0,etad0) kd'
expression = '(ha/ka + hb/kb + hd/kd) / Vm^2'
coupled_variables = 'etaa0 etab0 etad0'
derivative_order = 2
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[VectorPostprocessors]
[./etaa0]
type = LineValueSampler
variable = etaa0
start_point = '-15 0 0'
end_point = '15 0 0'
num_points = 61
sort_by = x
execute_on = 'initial timestep_end final'
[../]
[./etab0]
type = LineValueSampler
variable = etab0
start_point = '-15 0 0'
end_point = '15 0 0'
num_points = 61
sort_by = x
execute_on = 'initial timestep_end final'
[../]
[./etad0]
type = LineValueSampler
variable = etad0
start_point = '-15 0 0'
end_point = '15 0 0'
num_points = 61
sort_by = x
execute_on = 'initial timestep_end final'
[../]
[]
[Executioner]
type = Transient
nl_max_its = 15
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = -pc_type
petsc_options_value = asm
l_max_its = 15
l_tol = 1.0e-3
nl_rel_tol = 1.0e-8
start_time = 0.0
num_steps = 20
nl_abs_tol = 1e-10
dt = 1.0
[]
[Outputs]
[./exodus]
type = Exodus
execute_on = 'initial timestep_end final'
time_step_interval = 1
[../]
[./csv]
type = CSV
execute_on = 'initial timestep_end final'
time_step_interval = 1
[../]
[]
(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/chemical_reactions/test/tests/desorption/langmuir_jac2.i)
# testing whether when we have a centre block containing 'conc' which is a CONSTANT MONOMIAL, we get the correct Jacobian
[Mesh]
type = FileMesh
file = three_eles.e
[]
[Variables]
[./pressure]
[../]
[./conc]
family = MONOMIAL
order = CONSTANT
block = centre_block
[../]
[]
[ICs]
[./p_ic]
type = RandomIC
variable = pressure
min = -1
max = 1
[../]
[./conc_ic]
type = RandomIC
variable = conc
min = -1
max = 1
block = centre_block
[../]
[]
[Kernels]
[./p_dot] # this is just so a kernel is defined everywhere
type = TimeDerivative
variable = pressure
[../]
[./flow_from_matrix]
type = DesorptionFromMatrix
block = centre_block
variable = conc
pressure_var = pressure
[../]
[./flux_to_porespace]
type = DesorptionToPorespace
block = centre_block
variable = pressure
conc_var = conc
[../]
[]
[Materials]
[./nothing] # when any block contains a material, all blocks need to
type = GenericConstantMaterial
block = 'left_block centre_block right_block'
prop_names = ''
prop_values = ''
[../]
[./langmuir_params]
type = MollifiedLangmuirMaterial
block = centre_block
one_over_desorption_time_const = 0.813E-10
one_over_adsorption_time_const = 0.813E-10
langmuir_density = 2.34
langmuir_pressure = 1.5
pressure_var = pressure
conc_var = conc
[../]
[]
[Preconditioning]
[./andy]
type = SMP
full = true
#petsc_options = '-snes_test_display'
petsc_options_iname = '-ksp_type -pc_type -snes_atol -snes_rtol -snes_max_it -snes_type'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000 test'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
[]
[Outputs]
execute_on = 'timestep_end'
file_base = langmuir_jac2
[]
(modules/heat_transfer/test/tests/code_verification/spherical_test_no1.i)
# Problem III.1
#
# A spherical shell has a constant thermal conductivity k and internal
# heat generation q. It has inner radius ri and outer radius ro.
# Both surfaces are exposed to constant temperatures: u(ri) = ui and u(ro) = uo.
#
# REFERENCE:
# A. Toptan, et al. (Mar.2020). Tech. rep. CASL-U-2020-1939-000, SAND2020-3887 R. DOI:10.2172/1614683.
[Mesh]
[./geom]
type = GeneratedMeshGenerator
dim = 1
elem_type = EDGE2
xmin = 0.2
nx = 4
[../]
[]
[Variables]
[./u]
order = FIRST
[../]
[]
[Problem]
coord_type = RSPHERICAL
[]
[Functions]
[./exact]
type = ParsedFunction
symbol_names = 'ri ro ui uo'
symbol_values = '0.2 1.0 300 0'
expression = '( uo * (1/ri-1/x) - ui * (1/ro-1/x)) / (1/ri-1/ro)'
[../]
[]
[Kernels]
[./heat]
type = HeatConduction
variable = u
[../]
[]
[BCs]
[./ui]
type = DirichletBC
boundary = left
variable = u
value = 300
[../]
[./uo]
type = DirichletBC
boundary = right
variable = u
value = 0
[../]
[]
[Materials]
[./property]
type = GenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '1.0 1.0 5.0'
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./error]
type = ElementL2Error
function = exact
variable = u
[../]
[./h]
type = AverageElementSize
[]
[]
[Outputs]
csv = true
[]
(modules/solid_mechanics/test/tests/beam/dynamic/dyn_euler_small_rayleigh_hht_ti.i)
# Test for damped small strain euler beam vibration in y direction
# An impulse load is applied at the end of a cantilever beam of length 4m.
# The properties of the cantilever beam are as follows:
# Young's modulus (E) = 1e4
# Shear modulus (G) = 4e7
# Shear coefficient (k) = 1.0
# Cross-section area (A) = 0.01
# Iy = 1e-4 = Iz
# Length (L)= 4 m
# density (rho) = 1.0
# mass proportional rayleigh damping(eta) = 0.1
# stiffness proportional rayleigh damping(eta) = 0.1
# HHT time integration parameter (alpha) = -0.3
# Corresponding Newmark beta time integration parameters beta = 0.4225 and gamma = 0.8
# For this beam, the dimensionless parameter alpha = kAGL^2/EI = 6.4e6
# Therefore, the behaves like a Euler-Bernoulli beam.
# The displacement time history from this analysis matches with that obtained from Abaqus.
# Values from the first few time steps are as follows:
# time disp_y vel_y accel_y
# 0.0 0.0 0.0 0.0
# 0.2 0.019898364318588 0.18838688112273 1.1774180070171
# 0.4 0.045577003505278 0.087329917525455 -0.92596052423724
# 0.6 0.063767907208218 0.084330765885995 0.21274543331268
# 0.8 0.073602908614573 0.020029576220975 -0.45506879373455
# 1.0 0.06841704414745 -0.071840076837194 -0.46041813317992
[Mesh]
type = GeneratedMesh
nx = 10
dim = 1
xmin = 0.0
xmax = 4.0
displacements = 'disp_x disp_y disp_z'
[]
[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
[../]
[./rot_z]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./vel_x]
order = FIRST
family = LAGRANGE
[../]
[./vel_y]
order = FIRST
family = LAGRANGE
[../]
[./vel_z]
order = FIRST
family = LAGRANGE
[../]
[./accel_x]
order = FIRST
family = LAGRANGE
[../]
[./accel_y]
order = FIRST
family = LAGRANGE
[../]
[./accel_z]
order = FIRST
family = LAGRANGE
[../]
[./rot_vel_x]
order = FIRST
family = LAGRANGE
[../]
[./rot_vel_y]
order = FIRST
family = LAGRANGE
[../]
[./rot_vel_z]
order = FIRST
family = LAGRANGE
[../]
[./rot_accel_x]
order = FIRST
family = LAGRANGE
[../]
[./rot_accel_y]
order = FIRST
family = LAGRANGE
[../]
[./rot_accel_z]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./accel_x] # These auxkernels are only to check output
type = TestNewmarkTI
displacement = disp_x
variable = accel_x
first = false
[../]
[./accel_y]
type = TestNewmarkTI
displacement = disp_y
variable = accel_y
first = false
[../]
[./accel_z]
type = TestNewmarkTI
displacement = disp_z
variable = accel_z
first = false
[../]
[./vel_x]
type = TestNewmarkTI
displacement = disp_x
variable = vel_x
[../]
[./vel_y]
type = TestNewmarkTI
displacement = disp_y
variable = vel_y
[../]
[./vel_z]
type = TestNewmarkTI
displacement = disp_z
variable = vel_z
[../]
[./rot_accel_x]
type = TestNewmarkTI
displacement = rot_x
variable = rot_accel_x
first = false
[../]
[./rot_accel_y]
type = TestNewmarkTI
displacement = rot_y
variable = rot_accel_y
first = false
[../]
[./rot_accel_z]
type = TestNewmarkTI
displacement = rot_z
variable = rot_accel_z
first = false
[../]
[./rot_vel_x]
type = TestNewmarkTI
displacement = rot_x
variable = rot_vel_x
[../]
[./rot_vel_y]
type = TestNewmarkTI
displacement = rot_y
variable = rot_vel_y
[../]
[./rot_vel_z]
type = TestNewmarkTI
displacement = rot_z
variable = rot_vel_z
[../]
[]
[BCs]
[./fixx1]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./fixy1]
type = DirichletBC
variable = disp_y
boundary = left
value = 0.0
[../]
[./fixz1]
type = DirichletBC
variable = disp_z
boundary = left
value = 0.0
[../]
[./fixr1]
type = DirichletBC
variable = rot_x
boundary = left
value = 0.0
[../]
[./fixr2]
type = DirichletBC
variable = rot_y
boundary = left
value = 0.0
[../]
[./fixr3]
type = DirichletBC
variable = rot_z
boundary = left
value = 0.0
[../]
[]
[NodalKernels]
[./force_y2]
type = UserForcingFunctionNodalKernel
variable = disp_y
boundary = right
function = force
[../]
[]
[Functions]
[./force]
type = PiecewiseLinear
x = '0.0 0.2 0.4 10.0'
y = '0.0 0.01 0.0 0.0'
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
line_search = 'none'
l_tol = 1e-11
nl_max_its = 15
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
start_time = 0.0
dt = 0.2
end_time = 5.0
timestep_tolerance = 1e-6
# Time integrator
[./TimeIntegrator]
type = NewmarkBeta
beta = 0.4225
gamma = 0.8
[../]
[]
[Kernels]
[./solid_disp_x]
type = StressDivergenceBeam
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 0
variable = disp_x
zeta = 0.1
alpha = -0.3
[../]
[./solid_disp_y]
type = StressDivergenceBeam
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 1
variable = disp_y
zeta = 0.1
alpha = -0.3
[../]
[./solid_disp_z]
type = StressDivergenceBeam
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 2
variable = disp_z
zeta = 0.1
alpha = -0.3
[../]
[./solid_rot_x]
type = StressDivergenceBeam
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 3
variable = rot_x
zeta = 0.1
alpha = -0.3
[../]
[./solid_rot_y]
type = StressDivergenceBeam
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 4
variable = rot_y
zeta = 0.1
alpha = -0.3
[../]
[./solid_rot_z]
type = StressDivergenceBeam
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
component = 5
variable = rot_z
zeta = 0.1
alpha = -0.3
[../]
[./inertial_force_x]
type = InertialForceBeam
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
eta = 0.1
area = 0.01
Iy = 1e-4
Iz = 1e-4
Ay = 0.0
Az = 0.0
component = 0
variable = disp_x
alpha = -0.3
[../]
[./inertial_force_y]
type = InertialForceBeam
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
eta = 0.1
area = 0.01
Iy = 1e-4
Iz = 1e-4
Ay = 0.0
Az = 0.0
component = 1
variable = disp_y
alpha = -0.3
[../]
[./inertial_force_z]
type = InertialForceBeam
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
eta = 0.1
area = 0.01
Iy = 1e-4
Iz = 1e-4
Ay = 0.0
Az = 0.0
component = 2
variable = disp_z
alpha = -0.3
[../]
[./inertial_force_rot_x]
type = InertialForceBeam
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
eta = 0.1
area = 0.01
Iy = 1e-4
Iz = 1e-4
Ay = 0.0
Az = 0.0
component = 3
variable = rot_x
alpha = -0.3
[../]
[./inertial_force_rot_y]
type = InertialForceBeam
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
eta = 0.1
area = 0.01
Iy = 1e-4
Iz = 1e-4
Ay = 0.0
Az = 0.0
component = 4
variable = rot_y
alpha = -0.3
[../]
[./inertial_force_rot_z]
type = InertialForceBeam
block = 0
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
eta = 0.1
area = 0.01
Iy = 1e-4
Iz = 1e-4
Ay = 0.0
Az = 0.0
component = 5
variable = rot_z
alpha = -0.3
[../]
[]
[Materials]
[./elasticity]
type = ComputeElasticityBeam
youngs_modulus = 1.0e4
poissons_ratio = -0.999875
shear_coefficient = 1.0
block = 0
[../]
[./strain]
type = ComputeIncrementalBeamStrain
block = '0'
displacements = 'disp_x disp_y disp_z'
rotations = 'rot_x rot_y rot_z'
area = 0.01
Ay = 0.0
Az = 0.0
Iy = 1.0e-4
Iz = 1.0e-4
y_orientation = '0.0 1.0 0.0'
[../]
[./stress]
type = ComputeBeamResultants
block = 0
[../]
[./density]
type = GenericConstantMaterial
block = 0
prop_names = 'density'
prop_values = '1.0'
[../]
[]
[Postprocessors]
[./disp_x]
type = PointValue
point = '4.0 0.0 0.0'
variable = disp_x
[../]
[./disp_y]
type = PointValue
point = '4.0 0.0 0.0'
variable = disp_y
[../]
[./vel_y]
type = PointValue
point = '4.0 0.0 0.0'
variable = vel_y
[../]
[./accel_y]
type = PointValue
point = '4.0 0.0 0.0'
variable = accel_y
[../]
[]
[Outputs]
file_base = 'dyn_euler_small_rayleigh_hht_out'
exodus = true
csv = true
perf_graph = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/RZ_cone/RZ_cone_by_parts.i)
# This input file tests several different things:
# .) The axisymmetric (RZ) form of the governing equations.
# .) An open boundary.
# .) Integrating the pressure by parts.
# .) Natural boundary condition at the outlet.
[GlobalParams]
gravity = '0 0 0'
[]
[Mesh]
file = '2d_cone.msh'
[]
[Problem]
coord_type = RZ
[]
[Preconditioning]
[./SMP_PJFNK]
type = SMP
full = true
solve_type = Newton
[../]
[]
[Executioner]
type = Transient
dt = 0.005
dtmin = 0.005
num_steps = 5
l_max_its = 100
# Note: The Steady executioner can be used for this problem, if you
# drop the INSMomentumTimeDerivative kernels and use the following
# direct solver options.
# petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -ksp_type'
# petsc_options_value = 'lu NONZERO 1.e-10 preonly'
# Block Jacobi works well for this problem, as does "-pc_type asm
# -pc_asm_overlap 2", but an overlap of 1 does not work for some
# reason?
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'bjacobi ilu 4'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
console = true
[./out]
type = Exodus
[../]
[]
[Variables]
[./vel_x]
# Velocity in radial (r) direction
family = LAGRANGE
order = SECOND
[../]
[./vel_y]
# Velocity in axial (z) direction
family = LAGRANGE
order = SECOND
[../]
[./p]
family = LAGRANGE
order = FIRST
[../]
[]
[BCs]
[./u_in]
type = DirichletBC
boundary = bottom
variable = vel_x
value = 0
[../]
[./v_in]
type = FunctionDirichletBC
boundary = bottom
variable = vel_y
function = 'inlet_func'
[../]
[./u_axis_and_walls]
type = DirichletBC
boundary = 'left right'
variable = vel_x
value = 0
[../]
[./v_no_slip]
type = DirichletBC
boundary = 'right'
variable = vel_y
value = 0
[../]
[]
[Kernels]
[./x_momentum_time]
type = INSMomentumTimeDerivative
variable = vel_x
[../]
[./y_momentum_time]
type = INSMomentumTimeDerivative
variable = vel_y
[../]
[./mass]
type = INSMassRZ
variable = p
u = vel_x
v = vel_y
pressure = p
[../]
[./x_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_x
u = vel_x
v = vel_y
pressure = p
component = 0
[../]
[./y_momentum_space]
type = INSMomentumLaplaceFormRZ
variable = vel_y
u = vel_x
v = vel_y
pressure = p
component = 1
[../]
[]
[Materials]
[./const]
type = GenericConstantMaterial
block = 'volume'
prop_names = 'rho mu'
prop_values = '1 1'
[../]
[]
[Functions]
[./inlet_func]
type = ParsedFunction
expression = '-4 * x^2 + 1'
[../]
[]
[Postprocessors]
[./flow_in]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'bottom'
outputs = 'console' execute_on = 'timestep_end'
[../]
[./flow_out]
type = VolumetricFlowRate
vel_x = vel_x
vel_y = vel_y
boundary = 'top'
outputs = 'console' execute_on = 'timestep_end'
[../]
[]
(modules/phase_field/examples/nucleation/cahn_hilliard.i)
#
# Test the DiscreteNucleation material in a toy system. The global
# concentration is above the solubility limit, but below the spinodal.
# Without further intervention no nucleation will occur in a phase
# field model. The DiscreteNucleation material will locally modify the
# free energy to coerce nuclei to grow.
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 120
ny = 120
xmax = 500
ymax = 500
elem_type = QUAD
[]
[Modules]
[./PhaseField]
[./Conserved]
[./c]
free_energy = F
mobility = M
kappa = kappa_c
solve_type = REVERSE_SPLIT
[../]
[../]
[../]
[]
[ICs]
[./c_IC]
type = RandomIC
variable = c
min = 0.2
max = 0.21
[../]
[]
[Materials]
[./pfmobility]
type = GenericConstantMaterial
prop_names = 'M kappa_c'
prop_values = '1 25'
[../]
[./chemical_free_energy]
# simple double well free energy
type = DerivativeParsedMaterial
property_name = Fc
coupled_variables = 'c'
constant_names = 'barr_height cv_eq'
constant_expressions = '0.1 0'
expression = 16*barr_height*c^2*(1-c)^2 # +0.01*(c*plog(c,0.005)+(1-c)*plog(1-c,0.005))
derivative_order = 2
outputs = exodus
[../]
[./probability]
# This is a made up toy nucleation rate it should be replaced by
# classical nucleation theory in a real simulation.
type = ParsedMaterial
property_name = P
coupled_variables = c
expression = c*1e-7
outputs = exodus
[../]
[./nucleation]
# The nucleation material is configured to insert nuclei into the free energy
# tht force the concentration to go to 0.95, and holds this enforcement for 500
# time units.
type = DiscreteNucleation
property_name = Fn
op_names = c
op_values = 0.90
penalty = 5
penalty_mode = MIN
map = map
outputs = exodus
[../]
[./free_energy]
# add the chemical and nucleation free energy contributions together
type = DerivativeSumMaterial
derivative_order = 2
coupled_variables = c
sum_materials = 'Fc Fn'
[../]
[]
[UserObjects]
[./inserter]
# The inserter runs at the end of each time step to add nucleation events
# that happend during the timestep (if it converged) to the list of nuclei
type = DiscreteNucleationInserter
hold_time = 100
probability = P
radius = 10
[../]
[./map]
# The map UO runs at the beginning of a timestep and generates a per-element/qp
# map of nucleus locations. The map is only regenerated if the mesh changed or
# the list of nuclei was modified.
# The map converts the nucleation points into finite area objects with a given radius.
type = DiscreteNucleationMap
periodic = c
inserter = inserter
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Postprocessors]
[./dt]
type = TimestepSize
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'asm lu '
nl_max_its = 20
l_tol = 1.0e-4
nl_rel_tol = 1.0e-10
nl_abs_tol = 1.0e-10
start_time = 0.0
num_steps = 1200
[./TimeStepper]
type = IterationAdaptiveDT
dt = 10
growth_factor = 1.5
cutback_factor = 0.5
optimal_iterations = 5
[../]
[]
[Outputs]
exodus = true
[]
(test/include/materials/ActiveGenericConstantMaterial.h)
// This file is part of the MOOSE framework
// https://www.mooseframework.org
//
// All rights reserved, see COPYRIGHT for full restrictions
// https://github.com/idaholab/moose/blob/master/COPYRIGHT
//
// Licensed under LGPL 2.1, please see LICENSE for details
// https://www.gnu.org/licenses/lgpl-2.1.html
#pragma once
#include "GenericConstantMaterial.h"
class ActiveGenericConstantMaterial : public GenericConstantMaterial
{
public:
static InputParameters validParams();
ActiveGenericConstantMaterial(const InputParameters & parameters);
const std::unordered_set<unsigned int> & getActivePropIDs() { return _active_prop_ids; }
protected:
virtual void computeProperties() override;
virtual void computeQpProperties() override;
};
(test/include/materials/IncrementMaterial.h)
// This file is part of the MOOSE framework
// https://www.mooseframework.org
//
// All rights reserved, see COPYRIGHT for full restrictions
// https://github.com/idaholab/moose/blob/master/COPYRIGHT
//
// Licensed under LGPL 2.1, please see LICENSE for details
// https://www.gnu.org/licenses/lgpl-2.1.html
#pragma once
#include "GenericConstantMaterial.h"
/**
* A material that tracks the number of times computeQpProperties has been called.
*/
class IncrementMaterial : public GenericConstantMaterial
{
public:
static InputParameters validParams();
IncrementMaterial(const InputParameters & parameters);
protected:
virtual void computeQpProperties() override;
unsigned int _inc;
MaterialProperty<Real> & _mat_prop;
};