- variableThe name of the variable that this object operates on
C++ Type:std::vector<VariableName>
Controllable:No
Description:The name of the variable that this object operates on
ElementIntegralVariablePostprocessor
The ElementIntegralVariablePostprocessor is an intermediate base class that should be derived from for any calculation involving the integral of a variable quantity over the whole domain or a portion of the domain.
The ElementIntegralVariablePostprocessor may be used to compute the volume integral of a variable, based on the quadrature defined for this variable. This integral may be restricted to blocks/subdomains on which the variable is defined.
Example input file
In this input file, we use ElementIntegralVariablePostprocessor
to compute the integral of a variable , solution of a diffusion problem, over each and all of the two subdomains it is defined on.
[Mesh]
file = rectangle.e
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff'
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
active = 'left right'
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Postprocessors]
[./integral_left]
type = ElementIntegralVariablePostprocessor
variable = u
block = 1
[../]
[./integral_right]
type = ElementIntegralVariablePostprocessor
variable = u
block = 2
[../]
[./integral_all]
type = ElementIntegralVariablePostprocessor
variable = u
[../]
[]
[Outputs]
file_base = out_block
exodus = false
csv = true
[]
(test/tests/postprocessors/element_integral/element_block_integral_test.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
- execute_onTIMESTEP_ENDThe list of flag(s) indicating when this object should be executed, the available options include FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM.
Default:TIMESTEP_END
C++ Type:ExecFlagEnum
Options:FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM, TRANSFER
Controllable:No
Description:The list of flag(s) indicating when this object should be executed, the available options include FORWARD, ADJOINT, HOMOGENEOUS_FORWARD, ADJOINT_TIMESTEP_BEGIN, ADJOINT_TIMESTEP_END, NONE, INITIAL, LINEAR, NONLINEAR, POSTCHECK, TIMESTEP_END, TIMESTEP_BEGIN, MULTIAPP_FIXED_POINT_END, MULTIAPP_FIXED_POINT_BEGIN, FINAL, CUSTOM.
- prop_getter_suffixAn optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
C++ Type:MaterialPropertyName
Controllable:No
Description:An optional suffix parameter that can be appended to any attempt to retrieve/get material properties. The suffix will be prepended with a '_' character.
- use_interpolated_stateFalseFor the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Default:False
C++ Type:bool
Controllable:No
Description:For the old and older state use projected material properties interpolated at the quadrature points. To set up projection use the ProjectedStatefulMaterialStorageAction.
Optional Parameters
- allow_duplicate_execution_on_initialFalseIn the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
Default:False
C++ Type:bool
Controllable:No
Description:In the case where this UserObject is depended upon by an initial condition, allow it to be executed twice during the initial setup (once before the IC and again after mesh adaptivity (if applicable).
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:Yes
Description:Set the enabled status of the MooseObject.
- execution_order_group0Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
Default:0
C++ Type:int
Controllable:No
Description:Execution order groups are executed in increasing order (e.g., the lowest number is executed first). Note that negative group numbers may be used to execute groups before the default (0) group. Please refer to the user object documentation for ordering of user object execution within a group.
- force_postauxFalseForces the UserObject to be executed in POSTAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in POSTAUX
- force_preauxFalseForces the UserObject to be executed in PREAUX
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREAUX
- force_preicFalseForces the UserObject to be executed in PREIC during initial setup
Default:False
C++ Type:bool
Controllable:No
Description:Forces the UserObject to be executed in PREIC during initial setup
- 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
- outputsVector of output names where you would like to restrict the output of variables(s) associated with this object
C++ Type:std::vector<OutputName>
Controllable:No
Description:Vector of output names where you would like to restrict the output of variables(s) associated with this object
- 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
Input Files
- (modules/combined/examples/phase_field-mechanics/kks_mechanics_VTS.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_flux_1phase/phy.energy_heatflux_ss_1phase.i)
- (modules/porous_flow/test/tests/fluids/simple_fluid.i)
- (test/tests/interfacekernels/3d_interface/coupled_value_coupled_flux_with_jump_material.i)
- (test/tests/executioners/eigen_convergence/a.i)
- (modules/combined/examples/phase_field-mechanics/Pattern1.i)
- (modules/porous_flow/test/tests/fluidstate/brineco2_nonisothermal.i)
- (test/tests/kernels/vector_fe/coupled_electrostatics.i)
- (modules/solid_mechanics/test/tests/postprocessors/material_tensor_average_test.i)
- (test/tests/outputs/exodus/exodus_side_discontinuous_edge2.i)
- (test/tests/kernels/array_kernels/array_diffusion_reaction_coupling.i)
- (modules/thermal_hydraulics/test/tests/components/shaft_connected_pump_1phase/pump_coastdown.i)
- (test/tests/variables/curvilinear_element/curvilinear_element_test.i)
- (modules/porous_flow/test/tests/fluids/multicomponent.i)
- (modules/navier_stokes/test/tests/postprocessors/flow_rates/mass_flux_weighted_pp.i)
- (test/tests/postprocessors/element_integral_var_pps/pps_old_value.i)
- (modules/chemical_reactions/test/tests/desorption/mollified_langmuir_desorption.i)
- (test/tests/auxkernels/element_aux_var/element_high_order_aux_test.i)
- (test/tests/kernels/hfem/3d-lower-d-volumes.i)
- (modules/porous_flow/test/tests/fluidstate/brineco2_ic.i)
- (modules/misc/test/tests/dynamic_loading/dynamic_obj_registration/dynamic_syntax.i)
- (modules/combined/test/tests/optimization/compliance_sensitivity/2d_mbb_pde.i)
- (test/tests/controls/pid_control/pid_pp_control.i)
- (modules/porous_flow/test/tests/fluids/brine1_tabulated.i)
- (modules/combined/examples/optimization/multi-load/square_main.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_balance/large_gap_heat_transfer_test_cylinder.i)
- (modules/combined/examples/publications/rapid_dev/fig7b.i)
- (test/tests/problems/eigen_problem/eigensolvers/ne_coupled_picard.i)
- (test/tests/transfers/multiapp_conservative_transfer/sub_power_density.i)
- (modules/combined/examples/publications/rapid_dev/fig7a.i)
- (modules/phase_field/test/tests/SplitCH/forward_split_math_test.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_3D_mortar.i)
- (modules/phase_field/examples/multiphase/GrandPotential3Phase_masscons.i)
- (modules/phase_field/test/tests/conserved_noise/normal_masked.i)
- (test/tests/restart/restart_transient_from_transient/restart_trans_with_2subs_sub.i)
- (test/tests/interfacekernels/2d_interface/coupled_value_coupled_flux_with_jump_material.i)
- (modules/porous_flow/test/tests/fluidstate/brineco2.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_sphere3D_mortar.i)
- (test/tests/restart/restart_transient_from_transient/pseudo_trans_with_2subs_sub.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_balance/large_gap_heat_transfer_test_rz_cylinder.i)
- (modules/combined/test/tests/ACGrGrElasticDrivingForce/bicrystal.i)
- (modules/combined/examples/optimization/thermomechanical/thermomechanical_main.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_specified_temperature_1phase/phy.energy_walltemperature_ss_1phase.i)
- (test/tests/executioners/eigen_executioners/ne_deficient_b.i)
- (modules/phase_field/test/tests/actions/grain_growth_with_c.i)
- (modules/combined/examples/optimization/helmholtz_multimat_nostrip.i)
- (test/tests/auxkernels/element_aux_var/l2_element_aux_var_test.i)
- (modules/porous_flow/test/tests/fluids/simple_fluid_hr.i)
- (modules/combined/examples/optimization/helmholtz_multimat_strip.i)
- (modules/combined/test/tests/optimization/compliance_sensitivity/paper_three_materials_test.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_sphere3D.i)
- (test/tests/interfacekernels/3d_interface/coupled_value_coupled_flux.i)
- (test/tests/tag/tag_interface_kernels.i)
- (test/tests/executioners/eigen_executioners/ne_coupled.i)
- (test/tests/transfers/multiapp_conservative_transfer/sub_nearest_point.i)
- (modules/combined/test/tests/optimization/compliance_sensitivity/2d_mmb_2material.i)
- (modules/combined/test/tests/optimization/compliance_sensitivity/2d_mbb.i)
- (test/tests/problems/eigen_problem/eigensolvers/ne-coupled-scaling.i)
- (test/tests/problems/eigen_problem/eigensolvers/ne_coupled_scaled.i)
- (test/tests/transfers/multiapp_conservative_transfer/parent_conservative_transfer.i)
- (modules/porous_flow/test/tests/fluids/h2o.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_sphere.i)
- (modules/thermal_hydraulics/test/tests/components/junction_parallel_channels_1phase/conservation.i)
- (modules/combined/test/tests/optimization/compliance_sensitivity/2d_mmb_2material_cost_initial.i)
- (test/tests/auxkernels/array_var_component/array_var_component.i)
- (test/tests/problems/eigen_problem/eigensolvers/ne_coupled_picard_subT_sub.i)
- (modules/porous_flow/test/tests/fluids/methane.i)
- (test/tests/transfers/multiapp_conservative_transfer/secondary_negative_adjuster.i)
- (modules/phase_field/examples/slkks/CrFe.i)
- (modules/phase_field/test/tests/grain_growth/test.i)
- (modules/optimization/test/tests/optimizationreporter/material/adjoint_explicit.i)
- (modules/porous_flow/test/tests/fluids/ideal_gas.i)
- (modules/phase_field/test/tests/GBAnisotropy/test2.i)
- (test/tests/postprocessors/element_integral_var_pps/pps_old_value_fv.i)
- (modules/phase_field/test/tests/grain_growth/evolution.i)
- (modules/combined/test/tests/grain_texture/EulerAngle2RGBAction.i)
- (test/tests/problems/eigen_problem/eigensolvers/ne_coupled.i)
- (modules/phase_field/test/tests/grain_growth/thumb.i)
- (modules/chemical_reactions/test/tests/aqueous_equilibrium/water_dissociation.i)
- (modules/combined/examples/optimization/2d_mbb_pde_amr.i)
- (test/tests/interfacekernels/2d_interface/coupled_value_coupled_flux_dot.i)
- (modules/chemical_reactions/test/tests/aqueous_equilibrium/co2_h2o.i)
- (modules/phase_field/examples/multiphase/DerivativeMultiPhaseMaterial.i)
- (modules/thermal_hydraulics/test/tests/components/volume_junction_1phase/t_junction_1phase.i)
- (test/tests/transfers/multiapp_conservative_transfer/sub_conservative_transfer.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_cylinder_mortar_error.i)
- (modules/chemical_reactions/test/tests/solid_kinetics/calcite_precipitation.i)
- (modules/combined/examples/mortar/eigenstrain.i)
- (test/tests/preconditioners/fsp/array-test.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_rz_cylinder.i)
- (test/tests/restart/restart_transient_from_steady/steady_with_2subs_sub.i)
- (modules/combined/examples/publications/rapid_dev/fig8.i)
- (test/tests/executioners/eigen_convergence/b.i)
- (test/tests/postprocessors/element_integral_var_pps/initial_pps.i)
- (modules/phase_field/test/tests/grain_growth/explicit.i)
- (test/tests/executioners/eigen_executioners/normal_eigen_kernel.i)
- (modules/contact/test/tests/explicit_dynamics/settlement.i)
- (modules/thermal_hydraulics/test/tests/components/deprecated/heat_source_volumetric.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_3d/jac.1phase.i)
- (test/tests/restart/restart_transient_from_steady/restart_trans_with_2subs_sub.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_rz_cylinder_mortar.i)
- (modules/thermal_hydraulics/test/tests/components/shaft_connected_turbine_1phase/shaft_motor_turbine.i)
- (modules/phase_field/test/tests/grain_growth/constant_mobility.i)
- (modules/phase_field/test/tests/actions/grain_growth.i)
- (modules/thermal_hydraulics/test/tests/components/pump_1phase/pump_mass_energy_conservation.i)
- (modules/phase_field/test/tests/flood_counter_aux_test/boundary_intersection.i)
- (test/tests/dirackernels/multiplicity/multiplicity.i)
- (modules/phase_field/examples/cahn-hilliard/Parsed_CH.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_3d/phy.conservation.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_cylinder_mortar.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/porous_flow/test/tests/fluidstate/brineco2_2.i)
- (modules/porous_flow/test/tests/fluids/co2.i)
- (modules/phase_field/examples/cahn-hilliard/Parsed_SplitCH.i)
- (modules/phase_field/test/tests/grain_growth/boundingbox.i)
- (modules/combined/examples/optimization/multi-load/single_subapp_one.i)
- (modules/combined/examples/optimization/thermomechanical/thermal_sub.i)
- (test/tests/postprocessors/element_integral/element_block_integral_test.i)
- (modules/porous_flow/test/tests/fluids/simple_fluid_yr_MPa_C_action.i)
- (test/tests/executioners/eigen_executioners/ne_mat.i)
- (modules/combined/examples/optimization/multi-load/single_main.i)
- (test/tests/dirackernels/function_dirac_source/function_dirac_source.i)
- (modules/phase_field/test/tests/conserved_noise/integral.i)
- (modules/phase_field/examples/rigidbodymotion/AC_CH_Multigrain.i)
- (modules/phase_field/test/tests/conserved_noise/uniform.i)
- (test/tests/kernels/hfem/robin.i)
- (modules/porous_flow/test/tests/fluids/brine1.i)
- (modules/phase_field/test/tests/grain_growth/off-diagonal.i)
- (modules/phase_field/test/tests/TotalFreeEnergy/TotalFreeEnergy_test.i)
- (modules/combined/examples/mortar/eigenstrain_action.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_3d/err.not_a_3d_hs.i)
- (test/tests/kernels/scalar_constraint/scalar_constraint_kernel_disp.i)
- (modules/heat_transfer/test/tests/parallel_element_pps_test/parallel_element_pps_test.i)
- (modules/phase_field/test/tests/grain_growth/particle.i)
- (test/tests/restart/restart_transient_from_steady/steady_with_sub_sub.i)
- (test/tests/problems/mixed_coord/mixed_coord_test.i)
- (modules/contact/test/tests/mortar_dynamics/block-dynamics-reference.i)
- (test/tests/userobjects/pre_aux_based_on_exec_flag/pre_post_aux_test.i)
- (modules/combined/examples/periodic_strain/global_strain_pfm.i)
- (modules/chemical_reactions/test/tests/desorption/langmuir_desorption.i)
- (modules/porous_flow/test/tests/fluids/simple_fluid_MPa.i)
- (modules/combined/test/tests/optimization/thermal_sensitivity/2d_root.i)
- (test/tests/executioners/eigen_executioners/ipm.i)
- (test/tests/executioners/eigen_executioners/ane.i)
- (test/tests/multiapps/full_solve_multiapp/parent_eigen.i)
- (modules/phase_field/test/tests/GBAnisotropy/test3.i)
- (test/tests/auxkernels/forcing_function_aux/forcing_function_aux.i)
- (test/tests/transfers/multiapp_high_order_variable_transfer/sub_L2_Lagrange_conservative.i)
- (test/tests/auxkernels/normalization_aux/normalization_aux.i)
- (modules/phase_field/test/tests/GBAnisotropy/test1.i)
- (modules/combined/examples/phase_field-mechanics/kks_mechanics_KHS.i)
- (test/tests/postprocessors/coupled_solution_dofs/coupled_solution_dofs.i)
- (modules/combined/examples/optimization/2d_mbb_pde.i)
- (test/tests/kernels/hfem/lower-d-volumes.i)
- (modules/combined/examples/optimization/thermomechanical/structural_sub.i)
- (modules/porous_flow/test/tests/fluidstate/waterncg.i)
- (test/tests/materials/var_coupling/var_coupling.i)
- (test/tests/postprocessors/table_tolerance/table_tolerance_test.i)
- (modules/combined/test/tests/optimization/compliance_sensitivity/thermal_test.i)
- (test/tests/postprocessors/displaced_mesh/elemental.i)
- (test/tests/postprocessors/element_integral/element_integral_test.i)
- (modules/thermal_hydraulics/test/tests/components/free_boundary_1phase/phy.conservation_free_boundary_1phase.i)
- (modules/combined/test/tests/optimization/compliance_sensitivity/3d_mbb.i)
- (modules/thermal_hydraulics/test/tests/components/shaft_connected_pump_1phase/shaft_motor_pump.i)
- (modules/phase_field/test/tests/slkks/full_solve.i)
- (test/tests/ics/array_function_ic/array_function_ic_test.i)
- (test/tests/outputs/exodus/exodus_side_discontinuous.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_cylinder.i)
- (test/tests/kernels/array_kernels/standard_save_in.i)
- (test/tests/interfacekernels/2d_interface/coupled_value_coupled_flux.i)
- (modules/phase_field/test/tests/grain_growth/temperature_gradient.i)
- (modules/phase_field/test/tests/actions/grain_growth_with_T_grad.i)
- (test/tests/dgkernels/hfem/hfem_jacobian.i)
- (modules/combined/examples/optimization/three_materials.i)
- (test/tests/transfers/multiapp_conservative_transfer/primary_skipped_adjuster.i)
- (modules/porous_flow/test/tests/fluids/simple_fluid_dy.i)
- (test/tests/restart/restart_transient_from_steady/restart_trans_with_sub_sub.i)
- (test/tests/multiapps/override_cliargs/sub.i)
- (modules/combined/examples/optimization/multi-load/square_subapp_two.i)
- (test/tests/kernels/scalar_constraint/scalar_constraint_kernel.i)
- (test/tests/outputs/debug/show_execution_userobjects.i)
- (modules/porous_flow/test/tests/fluidstate/brineco2_fv.i)
- (test/tests/interfacekernels/gmsh_sidesets/coupled_value_coupled_flux.i)
- (test/tests/interfacekernels/ik_displaced/displaced.i)
- (modules/porous_flow/test/tests/fluidstate/waterncg_nonisothermal.i)
- (modules/combined/test/tests/grain_texture/EulerAngleProvider2RGBAux_bicrystal.i)
- (test/tests/kernels/array_kernels/array_diffusion_reaction_other_coupling.i)
- (modules/combined/test/tests/optimization/compliance_sensitivity/2d_mbb_pde_amr.i)
- (modules/porous_flow/test/tests/actions/fullsat_brine.i)
- (modules/thermal_hydraulics/test/tests/components/shaft_connected_compressor_1phase/shaft_motor_compressor.i)
- (test/tests/userobjects/force_aux_ordering/force_preaux.i)
- (test/tests/coord_type/coord_type_rz_general.i)
- (modules/combined/examples/periodic_strain/global_strain_pfm_3D.i)
- (test/tests/ics/integral_preserving_function_ic/sinusoidal_z.i)
- (modules/phase_field/test/tests/TotalFreeEnergy/TotalFreeEnergy_2var_test.i)
- (test/tests/functions/piecewise_multilinear/twoD_const.i)
- (modules/porous_flow/test/tests/fluids/simple_fluid_yr_MPa_C.i)
- (modules/phase_field/test/tests/actions/conserved_forward_split_1var.i)
- (test/tests/transfers/multiapp_high_order_variable_transfer/parent_L2_Lagrange_conservative.i)
- (modules/chemical_reactions/test/tests/aqueous_equilibrium/calcium_bicarbonate.i)
- (modules/porous_flow/test/tests/fluids/simple_fluid_yr.i)
- (test/tests/controls/pid_control/pid_control.i)
- (test/tests/kernels/hfem/dirichlet.i)
- (modules/thermal_hydraulics/test/tests/components/heat_source_volumetric_1phase/phy.conservation.1phase.i)
- (test/tests/transfers/multiapp_high_order_variable_transfer/sub_L2_Lagrange.i)
- (modules/geochemistry/test/tests/kernels/advection_1.i)
- (test/tests/misc/save_in/block-restricted-save-in.i)
- (test/tests/executioners/eigen_executioners/ne.i)
- (modules/porous_flow/test/tests/fluidstate/brineco2_hightemp.i)
- (test/tests/transfers/multiapp_conservative_transfer/parent_power_density.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_sphere_mortar.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_sphere_mortar_error.i)
- (modules/phase_field/tutorials/spinodal_decomposition/s5_energycurve.i)
- (modules/combined/examples/optimization/2d_mbb.i)
- (modules/phase_field/test/tests/free_energy_material/CoupledValueFunctionFreeEnergy.i)
- (modules/combined/examples/optimization/multi-load/square_subapp_one.i)
- (modules/combined/examples/optimization/3d_mbb.i)
- (test/tests/misc/selective_reinit/selective_reinit_test.i)
- (modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/phy.conservation_1phase.i)
- (test/tests/problems/eigen_problem/eigensolvers/ne-coupled-resid-scaling.i)
- (test/tests/kernels/hfem/neumann.i)
- (modules/chemical_reactions/test/tests/solid_kinetics/calcite_dissolution.i)
- (modules/phase_field/examples/measure_interface_energy/1Dinterface_energy.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_3D.i)
- (modules/phase_field/test/tests/conserved_noise/normal.i)
- (test/tests/transfers/multiapp_conservative_transfer/sub_userobject.i)
- (modules/combined/test/tests/optimization/compliance_sensitivity/2d_mmb_2material_cost.i)
- (modules/combined/test/tests/optimization/compliance_sensitivity/three_materials_thermal.i)
- (modules/porous_flow/test/tests/fluidstate/waterncg_ic.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_balance/large_gap_heat_transfer_test_sphere.i)
- (modules/combined/examples/optimization/multi-load/single_subapp_two.i)
- (test/tests/transfers/multiapp_conservative_transfer/primary_negative_adjuster.i)
Child Objects
- (framework/include/postprocessors/ElementL2Error.h)
- (framework/include/postprocessors/ElementAverageValue.h)
- (framework/include/postprocessors/ElementL1Error.h)
- (framework/include/postprocessors/ElementL2Norm.h)
- (framework/include/postprocessors/ElementH1SemiError.h)
- (modules/solid_mechanics/include/postprocessors/Mass.h)
- (test/include/postprocessors/ElementL2Diff.h)
- (framework/include/postprocessors/VariableInnerProduct.h)
- (test/include/postprocessors/ExecutionGroupTestPostprocessor.h)
- (framework/include/postprocessors/ElementW1pError.h)
- (examples/ex20_user_objects/include/userobjects/BlockAverageValue.h)
- (framework/include/postprocessors/ElementL2Difference.h)
- (test/include/postprocessors/ElementMomentSum.h)
- (modules/richards/include/postprocessors/RichardsMass.h)
(test/tests/postprocessors/element_integral/element_block_integral_test.i)
[Mesh]
file = rectangle.e
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff'
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
active = 'left right'
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Postprocessors]
[./integral_left]
type = ElementIntegralVariablePostprocessor
variable = u
block = 1
[../]
[./integral_right]
type = ElementIntegralVariablePostprocessor
variable = u
block = 2
[../]
[./integral_all]
type = ElementIntegralVariablePostprocessor
variable = u
[../]
[]
[Outputs]
file_base = out_block
exodus = false
csv = true
[]
(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/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_flux_1phase/phy.energy_heatflux_ss_1phase.i)
# This test tests conservation of energy at steady state for 1-phase flow when a
# heat flux is specified. Conservation is checked by comparing the integral of
# the heat flux against the difference of the boundary fluxes.
[GlobalParams]
initial_p = 7.0e6
initial_vel = 0
initial_T = 513
gravity_vector = '0.0 0.0 0.0'
closures = simple_closures
[]
[FluidProperties]
[eos]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
length = 3.66
n_elems = 10
A = 1.907720E-04
D_h = 1.698566E-02
f = 0.0
fp = eos
[]
[ht_pipe]
type = HeatTransferFromHeatFlux1Phase
flow_channel = pipe
q_wall = 1.0e5
Hw = 1.0e4
P_hf = 4.4925e-2
[]
[inlet]
type = SolidWall1Phase
input = 'pipe:in'
[]
[outlet]
type = SolidWall1Phase
input = 'pipe:out'
[]
[]
[Postprocessors]
[E]
type = ElementIntegralVariablePostprocessor
variable = rhoEA
execute_on = 'initial timestep_end'
[]
[E_change]
type = ChangeOverTimePostprocessor
postprocessor = E
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
abort_on_solve_fail = true
dt = 1
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-7
nl_max_its = 50
l_tol = 1e-3
l_max_its = 60
start_time = 0
num_steps = 10
[]
[Outputs]
[out]
type = CSV
show = 'E_change'
[]
[console]
type = Console
show = 'E_change'
[]
[]
(modules/porous_flow/test/tests/fluids/simple_fluid.i)
# Test the properties calculated by the simple fluid Material
# Pressure 10 MPa
# Temperature = 300 K (temperature unit = K)
# Density should equal 1500*exp(1E7/1E9-2E-4*300)=1426.844 kg/m^3
# Viscosity should equal 1.1E-3 Pa.s
# Energy density should equal 4000 * 300 = 1.2E6 J/kg
# Specific enthalpy should equal 4000 * 300 + 10e6 / 1426.844 = 1.207008E6 J/kg
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 2.0E-4
cv = 4000.0
cp = 5000.0
bulk_modulus = 1.0E9
thermal_conductivity = 1.0
viscosity = 1.1E-3
density0 = 1500.0
[]
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp T'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[Variables]
[pp]
initial_condition = 10e6
[]
[T]
initial_condition = 300.0
[]
[]
[Kernels]
[dummy_p]
type = Diffusion
variable = pp
[]
[dummy_T]
type = Diffusion
variable = T
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = T
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
temperature_unit = Kelvin
fp = the_simple_fluid
phase = 0
[]
[]
[Postprocessors]
[pressure]
type = ElementIntegralVariablePostprocessor
variable = pp
[]
[temperature]
type = ElementIntegralVariablePostprocessor
variable = T
[]
[density]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_density_qp0'
[]
[viscosity]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_viscosity_qp0'
[]
[internal_energy]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_internal_energy_qp0'
[]
[enthalpy]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_enthalpy_qp0'
[]
[]
[Executioner]
type = Steady
solve_type = Newton
[]
[Outputs]
execute_on = 'timestep_end'
file_base = simple_fluid
csv = true
[]
(test/tests/interfacekernels/3d_interface/coupled_value_coupled_flux_with_jump_material.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 2
xmax = 2
ny = 2
ymax = 2
nz = 2
zmax = 2
[]
[./subdomain1]
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 1'
block_id = 1
input = gen
[../]
[./break_boundary]
input = subdomain1
type = BreakBoundaryOnSubdomainGenerator
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
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
[../]
[./source_u]
type = BodyForce
variable = u
value = 1
[../]
[]
[AuxVariables]
[./jump_var]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[jump_aux]
type = MaterialRealAux
boundary = primary0_interface
property = jump
variable = jump_var
[]
[]
[InterfaceKernels]
[./interface]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
jump_prop_name = jump
[../]
[]
[Materials]
[./jump]
type = JumpInterfaceMaterial
var = u
neighbor_var = v
boundary = primary0_interface
[../]
[]
[BCs]
[./u]
type = VacuumBC
variable = u
boundary = 'left_to_0 bottom_to_0 back_to_0 right top front'
[../]
[./v]
type = VacuumBC
variable = v
boundary = 'left_to_1 bottom_to_1 back_to_1'
[../]
[]
[Postprocessors]
[./u_int]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[../]
[./v_int]
type = ElementIntegralVariablePostprocessor
variable = v
block = 1
[../]
[interface_var_jump]
type = InterfaceAverageVariableValuePostprocessor
interface_value_type = jump_abs
variable = u
neighbor_variable = v
execute_on = TIMESTEP_END
boundary = primary0_interface
[]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = 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/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
[]
(modules/porous_flow/test/tests/fluidstate/brineco2_nonisothermal.i)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 2
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pgas]
initial_condition = 20e6
[]
[z]
initial_condition = 0.2
[]
[temperature]
initial_condition = 70
[]
[]
[AuxVariables]
[xnacl]
initial_condition = 0.1
[]
[pressure_gas]
order = CONSTANT
family = MONOMIAL
[]
[pressure_water]
order = CONSTANT
family = MONOMIAL
[]
[saturation_gas]
order = CONSTANT
family = MONOMIAL
[]
[saturation_water]
order = CONSTANT
family = MONOMIAL
[]
[density_water]
order = CONSTANT
family = MONOMIAL
[]
[density_gas]
order = CONSTANT
family = MONOMIAL
[]
[viscosity_water]
order = CONSTANT
family = MONOMIAL
[]
[viscosity_gas]
order = CONSTANT
family = MONOMIAL
[]
[enthalpy_water]
order = CONSTANT
family = MONOMIAL
[]
[enthalpy_gas]
order = CONSTANT
family = MONOMIAL
[]
[internal_energy_water]
order = CONSTANT
family = MONOMIAL
[]
[internal_energy_gas]
order = CONSTANT
family = MONOMIAL
[]
[x0_water]
order = CONSTANT
family = MONOMIAL
[]
[x0_gas]
order = CONSTANT
family = MONOMIAL
[]
[x1_water]
order = CONSTANT
family = MONOMIAL
[]
[x1_gas]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[pressure_water]
type = PorousFlowPropertyAux
variable = pressure_water
property = pressure
phase = 0
execute_on = timestep_end
[]
[pressure_gas]
type = PorousFlowPropertyAux
variable = pressure_gas
property = pressure
phase = 1
execute_on = timestep_end
[]
[saturation_water]
type = PorousFlowPropertyAux
variable = saturation_water
property = saturation
phase = 0
execute_on = timestep_end
[]
[saturation_gas]
type = PorousFlowPropertyAux
variable = saturation_gas
property = saturation
phase = 1
execute_on = timestep_end
[]
[density_water]
type = PorousFlowPropertyAux
variable = density_water
property = density
phase = 0
execute_on = timestep_end
[]
[density_gas]
type = PorousFlowPropertyAux
variable = density_gas
property = density
phase = 1
execute_on = timestep_end
[]
[viscosity_water]
type = PorousFlowPropertyAux
variable = viscosity_water
property = viscosity
phase = 0
execute_on = timestep_end
[]
[viscosity_gas]
type = PorousFlowPropertyAux
variable = viscosity_gas
property = viscosity
phase = 1
execute_on = timestep_end
[]
[enthalpy_water]
type = PorousFlowPropertyAux
variable = enthalpy_water
property = enthalpy
phase = 0
execute_on = timestep_end
[]
[enthalpy_gas]
type = PorousFlowPropertyAux
variable = enthalpy_gas
property = enthalpy
phase = 1
execute_on = timestep_end
[]
[internal_energy_water]
type = PorousFlowPropertyAux
variable = internal_energy_water
property = internal_energy
phase = 0
execute_on = timestep_end
[]
[internal_energy_gas]
type = PorousFlowPropertyAux
variable = internal_energy_gas
property = internal_energy
phase = 1
execute_on = timestep_end
[]
[x1_water]
type = PorousFlowPropertyAux
variable = x1_water
property = mass_fraction
phase = 0
fluid_component = 1
execute_on = timestep_end
[]
[x1_gas]
type = PorousFlowPropertyAux
variable = x1_gas
property = mass_fraction
phase = 1
fluid_component = 1
execute_on = timestep_end
[]
[x0_water]
type = PorousFlowPropertyAux
variable = x0_water
property = mass_fraction
phase = 0
fluid_component = 0
execute_on = timestep_end
[]
[x0_gas]
type = PorousFlowPropertyAux
variable = x0_gas
property = mass_fraction
phase = 1
fluid_component = 0
execute_on = timestep_end
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
variable = pgas
fluid_component = 0
[]
[mass1]
type = PorousFlowMassTimeDerivative
variable = z
fluid_component = 1
[]
[heat]
type = TimeDerivative
variable = temperature
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pgas z temperature'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[fs]
type = PorousFlowBrineCO2
brine_fp = brine
co2_fp = co2
capillary_pressure = pc
[]
[]
[FluidProperties]
[co2]
type = CO2FluidProperties
[]
[brine]
type = BrineFluidProperties
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[brineco2]
type = PorousFlowFluidState
gas_porepressure = pgas
z = z
temperature = temperature
temperature_unit = Celsius
xnacl = xnacl
capillary_pressure = pc
fluid_state = fs
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-12 0 0 0 1e-12 0 0 0 1e-12'
[]
[relperm0]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[relperm1]
type = PorousFlowRelativePermeabilityCorey
n = 3
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 1
end_time = 1
nl_abs_tol = 1e-12
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[density_water]
type = ElementIntegralVariablePostprocessor
variable = density_water
[]
[density_gas]
type = ElementIntegralVariablePostprocessor
variable = density_gas
[]
[viscosity_water]
type = ElementIntegralVariablePostprocessor
variable = viscosity_water
[]
[viscosity_gas]
type = ElementIntegralVariablePostprocessor
variable = viscosity_gas
[]
[enthalpy_water]
type = ElementIntegralVariablePostprocessor
variable = enthalpy_water
[]
[enthalpy_gas]
type = ElementIntegralVariablePostprocessor
variable = enthalpy_gas
[]
[internal_energy_water]
type = ElementIntegralVariablePostprocessor
variable = internal_energy_water
[]
[internal_energy_gas]
type = ElementIntegralVariablePostprocessor
variable = internal_energy_gas
[]
[x1_water]
type = ElementIntegralVariablePostprocessor
variable = x1_water
[]
[x0_water]
type = ElementIntegralVariablePostprocessor
variable = x0_water
[]
[x1_gas]
type = ElementIntegralVariablePostprocessor
variable = x1_gas
[]
[x0_gas]
type = ElementIntegralVariablePostprocessor
variable = x0_gas
[]
[sg]
type = ElementIntegralVariablePostprocessor
variable = saturation_gas
[]
[sw]
type = ElementIntegralVariablePostprocessor
variable = saturation_water
[]
[pwater]
type = ElementIntegralVariablePostprocessor
variable = pressure_water
[]
[pgas]
type = ElementIntegralVariablePostprocessor
variable = pressure_gas
[]
[x0mass]
type = PorousFlowFluidMass
fluid_component = 0
phase = '0 1'
[]
[x1mass]
type = PorousFlowFluidMass
fluid_component = 1
phase = '0 1'
[]
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(test/tests/kernels/vector_fe/coupled_electrostatics.i)
# Test for DivField and GradField kernels and VectorDivPenaltyDirichletBC bcs.
# This test uses Raviart-Thomas elements to solve a model div-grad problem
# in H(div). The problem is simply a div-grad formulation, u = -grad(p), and
# div(u) = f, of the standard Poisson problem div(grad(p)) = -f.
# Manufactured solution: p = cos(k*x)*sin(k*y)*cos(k*z).
k = asin(1)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 3
nx = 6
ny = 6
nz = 6
xmax = 1
ymax = 1
zmax = 1
xmin = -1
ymin = -1
zmin = -1
elem_type = HEX27
[]
[]
[Variables]
[u]
family = RAVIART_THOMAS
order = FIRST
[]
[p]
family = MONOMIAL
order = CONSTANT
[]
[lambda]
family = SCALAR
order = FIRST
[]
[]
[Functions]
[f]
type = ParsedVectorFunction
expression_x = ${k}*sin(${k}*x)*sin(${k}*y)*cos(${k}*z)
expression_y = -${k}*cos(${k}*x)*cos(${k}*y)*cos(${k}*z)
expression_z = ${k}*cos(${k}*x)*sin(${k}*y)*sin(${k}*z)
div = ${Mesh/gmg/dim}*${k}^2*cos(${k}*x)*sin(${k}*y)*cos(${k}*z)
[]
[]
[Kernels]
[coefficient]
type = VectorFunctionReaction
variable = u
sign = negative
[]
[gradient]
type = GradField
variable = u
coupled_scalar_variable = p
[]
[divergence]
type = DivField
variable = p
coupled_vector_variable = u
[]
[forcing]
type = BodyForce
variable = p
function = ${Functions/f/div}
[]
[mean_zero_p]
type = ScalarLagrangeMultiplier
variable = p
lambda = lambda
[]
[]
[ScalarKernels]
[constraint]
type = AverageValueConstraint
variable = lambda
pp_name = PP
value = 0.0
[]
[]
[BCs]
[sides]
type = VectorDivPenaltyDirichletBC
variable = u
function = f
penalty = 1e8
boundary = 'top bottom left right front back'
[]
[]
[Postprocessors]
active = PP
[PP]
type = ElementIntegralVariablePostprocessor
variable = p
execute_on = linear
[]
[L2Error]
type = ElementVectorL2Error
variable = u
function = f
[]
[HDivSemiError]
type = ElementHDivSemiError
variable = u
function = f
[]
[HDivError]
type = ElementHDivError
variable = u
function = f
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
solve_type = LINEAR
petsc_options_iname = '-pc_type -ksp_rtol -ksp_norm_type'
petsc_options_value = ' jacobi 1e-12 preconditioned'
[]
[Outputs]
exodus = true
[]
(modules/solid_mechanics/test/tests/postprocessors/material_tensor_average_test.i)
[Mesh]
[./msh]
type = GeneratedMeshGenerator
dim = 3
xmax = 2
ymax = 2
zmax = 2
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Physics]
[SolidMechanics]
[QuasiStatic]
[./all]
strain = FINITE
add_variables = true
generate_output = 'stress_zz'
[../]
[../]
[../]
[]
[BCs]
[./back_z]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[../]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./bottom_y]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./move_front]
type = FunctionDirichletBC
variable = disp_z
boundary = front
function = 't/10.'
[../]
[]
[Materials]
[./stress]
type = ComputeFiniteStrainElasticStress
[../]
[./elasticity_tensor]
type = ComputeElasticityTensor
fill_method = symmetric9
C_ijkl = '1.5e6 0.75e6 0.75e6 1.5e6 0.75e6 1.5e6 0.375e6 0.375e6 0.375e6'
[../]
[]
[Postprocessors]
[./szz_avg]
type =MaterialTensorAverage
rank_two_tensor = stress
index_i = 2
index_j = 2
use_displaced_mesh = true
[]
[./szz_int]
type =MaterialTensorIntegral
rank_two_tensor = stress
index_i = 2
index_j = 2
use_displaced_mesh = true
[]
[./szz_avg_aux]
type =ElementAverageValue
variable = stress_zz
use_displaced_mesh = true
[]
[./szz_int_aux]
type =ElementIntegralVariablePostprocessor
variable = stress_zz
use_displaced_mesh = true
[]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type '
petsc_options_value = lu
nl_rel_tol = 1e-10
nl_abs_tol = 1e-6
l_max_its = 20
start_time = 0.0
dt = 0.2
end_time = 1.0
[]
[Outputs]
csv = true
[]
(test/tests/outputs/exodus/exodus_side_discontinuous_edge2.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 16
dim = 1
[]
[]
[Variables]
[u]
order = THIRD
family = MONOMIAL
[]
[lambda]
family = SIDE_HIERARCHIC
order = CONSTANT
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = '1'
[]
[source]
type = BodyForce
variable = u
value = '1'
[]
[]
[DGKernels]
[testjumps]
type = HFEMTestJump
variable = u
side_variable = lambda
[]
[trialjumps]
type = HFEMTrialJump
variable = lambda
interior_variable = u
[]
[]
[BCs]
[u_robin]
type = VacuumBC
boundary = 'left right'
variable = u
[]
[lambda_D_unused]
type = PenaltyDirichletBC
boundary = 'left right'
variable = lambda
penalty = 1
[]
[]
[Postprocessors]
[intu]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[]
[lambdanorm]
type = ElementSidesL2Norm
variable = lambda
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu basic mumps'
[]
[Outputs]
[out]
type = Exodus
discontinuous = true
side_discontinuous = true
file_base = 'exodus_side_discontinuous_edge2_out'
[]
[]
(test/tests/kernels/array_kernels/array_diffusion_reaction_coupling.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
components = 2
[]
[v]
[]
[]
[Kernels]
[diff]
type = ArrayDiffusion
variable = u
diffusion_coefficient = dc
[]
[reaction]
type = ArrayReaction
variable = u
reaction_coefficient = rc
[]
[diffv]
type = Diffusion
variable = v
[]
[vu]
type = ArrayCoupledForce
variable = u
v = v
coef = '0 0.5'
[]
[]
[BCs]
[left]
type = ArrayDirichletBC
variable = u
boundary = 1
values = '0 0'
[]
[right]
type = ArrayDirichletBC
variable = u
boundary = 2
values = '1 2'
[]
[leftv]
type = DirichletBC
variable = v
boundary = 1
value = 0
[]
[rightv]
type = DirichletBC
variable = v
boundary = 2
value = 2
[]
[]
[Materials]
[dc]
type = GenericConstantArray
prop_name = dc
prop_value = '1 1'
[]
[rc]
type = GenericConstant2DArray
prop_name = rc
prop_value = '1 0; -0.1 1'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[intu0]
type = ElementIntegralArrayVariablePostprocessor
variable = u
component = 0
[]
[intu1]
type = ElementIntegralArrayVariablePostprocessor
variable = u
component = 1
[]
[intv]
type = ElementIntegralVariablePostprocessor
variable = v
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/components/shaft_connected_pump_1phase/pump_coastdown.i)
# Pump data used in this test comes from the Semiscale Program, summarized in NUREG/CR-4945
initial_T = 393.15
area = 1e-2
dt = 0.005
[GlobalParams]
initial_p = 1.4E+07
initial_T = ${initial_T}
initial_vel = 0.01
initial_vel_x = 0.01
initial_vel_y = 0
initial_vel_z = 0
A = ${area}
A_ref = ${area}
f = 100
scaling_factor_1phase = '1 1 1e-3'
closures = simple_closures
rdg_slope_reconstruction = minmod
fp = fp
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[pump]
type = ShaftConnectedPump1Phase
inlet = 'pipe:out'
outlet = 'pipe:in'
position = '0 0 0'
scaling_factor_rhoEV = 1e-5
volume = 0.3
inertia_coeff = '1 1 1 1'
inertia_const = 0.5
omega_rated = 314
speed_cr_I = 1e12
speed_cr_fr = 0.001
torque_rated = 47.1825
volumetric_rated = 1
head_rated = 58.52
tau_fr_coeff = '4 0 80 0'
tau_fr_const = 8
head = head_fcn
torque_hydraulic = torque_fcn
density_rated = 124.2046
[]
[pipe]
type = FlowChannel1Phase
position = '0.6096 0 0'
orientation = '1 0 0'
length = 10
n_elems = 20
[]
[shaft]
type = Shaft
connected_components = 'pump'
initial_speed = 1
[]
[]
[Functions]
[head_fcn]
type = PiecewiseLinear
data_file = semiscale_head_data.csv
format = columns
[]
[torque_fcn]
type = PiecewiseLinear
data_file = semiscale_torque_data.csv
format = columns
[]
[S_energy_fcn]
type = ParsedFunction
expression = '-tau_hyd * omega'
symbol_names = 'tau_hyd omega'
symbol_values = 'pump:hydraulic_torque shaft:omega'
[]
[energy_conservation_fcn]
type = ParsedFunction
expression = '(E_change - S_energy * dt) / E_tot'
symbol_names = 'E_change S_energy dt E_tot'
symbol_values = 'E_change S_energy ${dt} E_tot'
[]
[]
[Postprocessors]
# mass conservation
[mass_pipes]
type = ElementIntegralVariablePostprocessor
variable = rhoA
block = 'pipe'
execute_on = 'initial timestep_end'
[]
[mass_pump]
type = ScalarVariable
variable = pump:rhoV
execute_on = 'initial timestep_end'
[]
[mass_tot]
type = SumPostprocessor
values = 'mass_pipes mass_pump'
execute_on = 'initial timestep_end'
[]
[mass_conservation]
type = ChangeOverTimePostprocessor
postprocessor = mass_tot
change_with_respect_to_initial = true
compute_relative_change = true
execute_on = 'initial timestep_end'
[]
# energy conservation
[E_pipes]
type = ElementIntegralVariablePostprocessor
variable = rhoEA
block = 'pipe'
execute_on = 'initial timestep_end'
[]
[E_pump]
type = ScalarVariable
variable = pump:rhoEV
execute_on = 'initial timestep_end'
[]
[E_tot]
type = LinearCombinationPostprocessor
pp_coefs = '1 1'
pp_names = 'E_pipes E_pump'
execute_on = 'initial timestep_end'
[]
[S_energy]
type = FunctionValuePostprocessor
function = S_energy_fcn
execute_on = 'initial timestep_end'
[]
[E_change]
type = ChangeOverTimePostprocessor
postprocessor = E_tot
execute_on = 'initial timestep_end'
[]
# This should also execute on initial. This value is
# lagged by one timestep as a workaround to moose issue #13262.
[energy_conservation]
type = FunctionValuePostprocessor
function = energy_conservation_fcn
execute_on = 'timestep_end'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
dt = ${dt}
num_steps = 40
solve_type = 'NEWTON'
line_search = 'basic'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
nl_max_its = 15
l_tol = 1e-4
l_max_its = 10
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Outputs]
velocity_as_vector = false
exodus = true
[]
(test/tests/variables/curvilinear_element/curvilinear_element_test.i)
[Mesh]
file = curvi.e
# This mesh only has one element. It does seem to work if you
# use ReplicatedMesh on two processors, but it hangs with DistributedMesh
# on two processors.
parallel_type = replicated
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Postprocessors]
[./integral]
type = ElementIntegralVariablePostprocessor
variable = u
[../]
[]
[Outputs]
file_base = out
csv = true
[]
(modules/porous_flow/test/tests/fluids/multicomponent.i)
# Test the density and viscosity calculated by the brine material using PorousFlowMultiComponentFluid
# Pressure 20 MPa
# Temperature 50C
# xnacl = 0.1047 (equivalent to 2.0 molality)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[Variables]
[pp]
initial_condition = 20e6
[]
[]
[Kernels]
[dummy]
type = Diffusion
variable = pp
[]
[]
[AuxVariables]
[temp]
initial_condition = 50
[]
[xnacl]
initial_condition = 0.1047
[]
[]
[FluidProperties]
[brine]
type = BrineFluidProperties
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temp
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[brine]
type = PorousFlowMultiComponentFluid
temperature_unit = Celsius
x = xnacl
phase = 0
fp = brine
[]
[]
[Executioner]
type = Steady
solve_type = Newton
[]
[Postprocessors]
[pressure]
type = ElementIntegralVariablePostprocessor
variable = pp
[]
[temperature]
type = ElementIntegralVariablePostprocessor
variable = temp
[]
[xnacl]
type = ElementIntegralVariablePostprocessor
variable = xnacl
[]
[density]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_density_qp0'
[]
[viscosity]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_viscosity_qp0'
[]
[enthalpy]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_enthalpy_qp0'
[]
[internal_energy]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_internal_energy_qp0'
[]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = brine1
csv = true
[]
(modules/navier_stokes/test/tests/postprocessors/flow_rates/mass_flux_weighted_pp.i)
# Fluid properties
mu = 1
rho = 1
cp = 1
k = 1e-3
# Operating conditions
u_inlet = 1
T_inlet = 200
p_outlet = 10
# expected temperature at outlet
#
# mdot * cp dT = Qdot
# Qdot = 500
# mdot = 1
# cp = 1
# dT = 500
[Mesh]
[gen]
type = CartesianMeshGenerator
dim = 2
dx = '5 0.1 4.9'
ix = '10 3 10'
dy = '0.5 0.5'
iy = '2 2'
subdomain_id = '1 2 3 1 3 3'
[]
[interior]
type = SideSetsBetweenSubdomainsGenerator
primary_block = '1'
paired_block = '2 3'
new_boundary = 'interior'
input = gen
[]
[]
[AuxVariables]
[porosity]
type = MooseVariableFVReal
[]
[hsrc]
type = MooseVariableFVReal
[]
[]
[ICs]
[porosity_1]
type = ConstantIC
variable = porosity
value = 0.5
block = '1 3'
[]
[porosity_2]
type = ConstantIC
variable = porosity
value = 0.1
block = 2
[]
[hsrc]
type = ConstantIC
variable = hsrc
value = 100
block = 1
[]
[]
[Modules]
[NavierStokesFV]
compressibility = 'incompressible'
porous_medium_treatment = true
add_energy_equation = true
density = 'rho'
dynamic_viscosity = 'mu'
thermal_conductivity = 'k'
specific_heat = 'cp'
porosity = 'porosity'
initial_velocity = '${u_inlet} 1e-6 0'
initial_pressure = ${p_outlet}
initial_temperature = ${T_inlet}
inlet_boundaries = 'left'
momentum_inlet_types = 'fixed-velocity'
momentum_inlet_function = '${u_inlet} 0'
energy_inlet_types = 'fixed-temperature'
energy_inlet_function = '${T_inlet}'
wall_boundaries = 'top bottom'
momentum_wall_types = 'noslip symmetry'
energy_wall_types = 'heatflux heatflux'
energy_wall_function = '0 0'
outlet_boundaries = 'right'
momentum_outlet_types = 'fixed-pressure'
pressure_function = '${p_outlet}'
mass_advection_interpolation = 'upwind'
momentum_advection_interpolation = 'upwind'
energy_advection_interpolation = 'upwind'
external_heat_source = hsrc
[]
[]
[FunctorMaterials]
[constants]
type = ADGenericFunctorMaterial
prop_names = 'cp rho mu k'
prop_values = '${cp} ${rho} ${mu} ${k}'
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-8
end_time = 1000
dt = 10
num_steps = 5
[]
# Some basic Postprocessors to examine the solution
[Postprocessors]
[Qdot]
type = ElementIntegralVariablePostprocessor
variable = hsrc
[]
[mass-flux-weighted-T-out]
type = MassFluxWeightedFlowRate
vel_x = superficial_vel_x
vel_y = superficial_vel_y
advected_quantity = T_fluid
density = rho
rhie_chow_user_object = 'pins_rhie_chow_interpolator'
boundary = 'right'
[]
[mass-flux-weighted-T-interior]
type = MassFluxWeightedFlowRate
vel_x = superficial_vel_x
vel_y = superficial_vel_y
advected_quantity = T_fluid
density = rho
rhie_chow_user_object = 'pins_rhie_chow_interpolator'
boundary = 'interior'
[]
[mdot]
type = VolumetricFlowRate
vel_x = superficial_vel_x
vel_y = superficial_vel_y
advected_quantity = rho
rhie_chow_user_object = 'pins_rhie_chow_interpolator'
boundary = 'right'
[]
[outlet-u]
type = SideAverageValue
variable = superficial_vel_x
boundary = 'right'
[]
[outlet-temp]
type = SideAverageValue
variable = T_fluid
boundary = 'right'
[]
[]
[Outputs]
csv = true
[]
(test/tests/postprocessors/element_integral_var_pps/pps_old_value.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 4
ny = 4
elem_type = QUAD4
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
initial_condition = 1
[../]
[]
[Functions]
[./force_fn]
type = ParsedFunction
expression = '1'
[../]
[./exact_fn]
type = ParsedFunction
expression = 't'
[../]
[]
[Kernels]
[./time_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn_u]
type = BodyForce
variable = u
function = force_fn
[../]
[]
[BCs]
[./all_u]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./a]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = 'initial timestep_end'
[../]
[./total_a]
type = TimeIntegratedPostprocessor
value = a
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 1
start_time = 1
end_time = 3
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/chemical_reactions/test/tests/desorption/mollified_langmuir_desorption.i)
# testing the entire desorption DEs with mollification
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
xmin = 0
xmax = 1
[]
[Variables]
[./pressure]
[../]
[./conc]
family = MONOMIAL
order = CONSTANT
[../]
[]
[ICs]
[./p_ic]
type = ConstantIC
variable = pressure
value = 1.0
[../]
[./conc_ic]
type = ConstantIC
variable = conc
value = 1.0
[../]
[]
[Kernels]
[./c_dot]
type = TimeDerivative
variable = conc
[../]
[./flow_from_matrix]
type = DesorptionFromMatrix
variable = conc
pressure_var = pressure
[../]
[./rho_dot]
type = TimeDerivative
variable = pressure
[../]
[./flux_to_porespace]
type = DesorptionToPorespace
variable = pressure
conc_var = conc
[../]
[]
[Postprocessors]
[./mass_rho]
type = ElementIntegralVariablePostprocessor
block = 0
variable = pressure
execute_on = 'initial timestep_end'
[../]
[./mass_conc]
type = ElementIntegralVariablePostprocessor
block = 0
variable = conc
execute_on = 'initial timestep_end'
[../]
[./mass_tot]
type = FunctionValuePostprocessor
function = mass_fcn
execute_on = 'initial timestep_end'
[../]
[./p0]
type = PointValue
variable = pressure
point = '0 0 0'
execute_on = 'initial timestep_end'
[../]
[./c0]
type = PointValue
variable = conc
point = '0 0 0'
execute_on = 'initial timestep_end'
[../]
[]
[Functions]
[./mass_fcn]
type = ParsedFunction
expression = a+b
symbol_names = 'a b'
symbol_values = 'mass_rho mass_conc'
[../]
[]
[Materials]
[./lang_stuff]
type = MollifiedLangmuirMaterial
block = 0
one_over_desorption_time_const = 0.90909091
one_over_adsorption_time_const = 0.90909091
langmuir_density = 0.88
langmuir_pressure = 1.23
pressure_var = pressure
conc_var = conc
mollifier = 1E-4
[../]
[]
[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
dt = 0.01
end_time = 2
[]
[Outputs]
file_base = mollified_langmuir_desorption
time_step_interval = 10
csv = 10
[] # Outputs
(test/tests/auxkernels/element_aux_var/element_high_order_aux_test.i)
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./high_order]
order = NINTH
family = MONOMIAL
[../]
[./one]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
# Coupling of nonlinear to Aux
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = CoupledForce
variable = u
v = one
[../]
[]
[AuxKernels]
[./coupled_high_order]
variable = high_order
type = CoupledAux
value = 2
operator = +
coupled = u
execute_on = 'initial timestep_end'
[../]
[./constant]
variable = one
type = ConstantAux
value = 1
execute_on = 'initial timestep_end'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Postprocessors]
[./int2_u]
type = ElementL2Norm
variable = u
execute_on = 'initial timestep_end'
[../]
[./int2_ho]
type = ElementL2Norm
variable = high_order
execute_on = 'initial timestep_end'
[../]
[./int_u]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = 'initial timestep_end'
[../]
[./int_ho]
type = ElementIntegralVariablePostprocessor
variable = high_order
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
[./ex_out]
type = Exodus
file_base = ho
elemental_as_nodal = true
[../]
[]
(test/tests/kernels/hfem/3d-lower-d-volumes.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 3
ny = 3
nz = 3
dim = 3
[]
build_all_side_lowerd_mesh = true
[]
[Variables]
[u]
order = THIRD
family = MONOMIAL
block = 0
[]
[uhat]
order = CONSTANT
family = MONOMIAL
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
[]
[lambda]
order = CONSTANT
family = MONOMIAL
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
[]
[lambdab]
order = CONSTANT
family = MONOMIAL
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
[]
[]
[AuxVariables]
[v]
order = CONSTANT
family = MONOMIAL
block = 0
initial_condition = '1'
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = '1'
block = 0
[]
[source]
type = CoupledForce
variable = u
v = v
coef = '1'
block = 0
[]
[reaction]
type = Reaction
variable = uhat
rate = '1'
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
[]
[uhat_coupled]
type = CoupledForce
variable = uhat
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
v = lambdab
coef = '1'
[]
[]
[DGKernels]
[surface]
type = TestLowerDVolumes
variable = u
lowerd_variable = lambda
l = 1
n = 3
[]
[]
[BCs]
[all]
type = HFEMDirichletBC
boundary = 'left right top bottom back front'
variable = u
lowerd_variable = lambdab
uhat = uhat
[]
[]
[Postprocessors]
[intu]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[]
[lambdanorm]
type = ElementL2Norm
variable = lambda
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu basic mumps'
[]
[Outputs]
[out]
# we hide lambda because it may flip sign due to element
# renumbering with distributed mesh
type = Exodus
hide = lambda
[]
[]
(modules/porous_flow/test/tests/fluidstate/brineco2_ic.i)
# Tests correct calculation of z (total mass fraction of NCG summed over all
# phases) using the PorousFlowFluidStateIC initial condition. Once z is
# calculated by the initial condition, the thermophysical properties are calculated
# and the resulting gas saturation should be equal to that given in the intial condition
[Mesh]
type = GeneratedMesh
dim = 2
[]
[GlobalParams]
PorousFlowDictator = dictator
temperature_unit = Celsius
[]
[Variables]
[pgas]
initial_condition = 1e6
[]
[z]
[]
[]
[ICs]
[z]
type = PorousFlowFluidStateIC
saturation = 0.5
gas_porepressure = pgas
temperature = 50
variable = z
xnacl = 0.1
fluid_state = fs
[]
[]
[AuxVariables]
[saturation_gas]
order = CONSTANT
family = MONOMIAL
[]
[saturation_water]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[saturation_water]
type = PorousFlowPropertyAux
variable = saturation_water
property = saturation
phase = 0
execute_on = timestep_end
[]
[saturation_gas]
type = PorousFlowPropertyAux
variable = saturation_gas
property = saturation
phase = 1
execute_on = timestep_end
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
variable = pgas
fluid_component = 0
[]
[mass1]
type = PorousFlowMassTimeDerivative
variable = z
fluid_component = 1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pgas z'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[fs]
type = PorousFlowBrineCO2
brine_fp = brine
co2_fp = co2
capillary_pressure = pc
[]
[]
[FluidProperties]
[co2]
type = CO2FluidProperties
[]
[brine]
type = BrineFluidProperties
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = 50
[]
[waterncg]
type = PorousFlowFluidState
gas_porepressure = pgas
z = z
fluid_state = fs
capillary_pressure = pc
xnacl = 0.1
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-12 0 0 0 1e-12 0 0 0 1e-12'
[]
[relperm0]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[relperm1]
type = PorousFlowRelativePermeabilityCorey
n = 3
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 1
end_time = 1
nl_abs_tol = 1e-12
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[sg]
type = ElementIntegralVariablePostprocessor
variable = saturation_gas
execute_on = 'initial timestep_end'
[]
[sw]
type = ElementIntegralVariablePostprocessor
variable = saturation_water
execute_on = 'initial timestep_end'
[]
[z]
type = ElementIntegralVariablePostprocessor
variable = z
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
csv = true
[]
(modules/misc/test/tests/dynamic_loading/dynamic_obj_registration/dynamic_syntax.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
xmin = 0
xmax = 1000
ymin = 0
ymax = 1000
zmin = 0
zmax = 0
elem_type = QUAD4
uniform_refine = 2
[]
[GlobalParams]
op_num = 2
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[ICs]
[./PolycrystalICs]
[./BicrystalCircleGrainIC]
radius = 333.333
x = 500
y = 500
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
block = 0
T = 500 # K
wGB = 60 # nm
GBmob0 = 2.5e-6 #m^4/(Js) from Schoenfelder 1997
Q = 0.23 #Migration energy in eV
GBenergy = 0.708 #GB energy in J/m^2
[../]
[]
[Postprocessors]
[./gr1area]
type = ElementIntegralVariablePostprocessor
variable = gr1
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
# petsc_options_iname = '-pc_type'
# petsc_options_value = 'lu'
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_tol = 1.0e-4
l_max_its = 30
nl_max_its = 20
nl_rel_tol = 1.0e-9
start_time = 0.0
num_steps = 1
dt = 80.0
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
[Problem]
register_objects_from = 'PhaseFieldApp'
library_path = '../../../../../phase_field/lib'
[]
(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'
[]
[]
(test/tests/controls/pid_control/pid_pp_control.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
inactive = 'exception'
[diff]
type = CoefDiffusion
variable = u
coef = 1
[]
[exception]
type = NanKernel
variable = 'u'
timestep_to_nan = 2
[]
[]
[BCs]
[left]
type = PostprocessorDirichletBC
variable = u
boundary = 3
postprocessor = received_bc
[]
[right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[]
[]
[Functions]
[conditional_function]
type = ParsedFunction
expression = 't >= 1.9 & t < 2.1'
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
start_time = 0.0
num_steps = 20
dt = 1
nl_abs_tol = 1e-10
line_search = 'none'
# For picard tests
picard_abs_tol = 1e-3
[]
[Postprocessors]
[integral]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = 'initial timestep_end'
[]
[received_bc]
type = Receiver
default = 0
[]
[]
[Controls]
inactive = 'make_crash'
[integral_value]
type = PIDTransientControl
postprocessor = integral
target = 1.5
parameter_pp = 'received_bc'
K_integral = -1
K_proportional = -1
K_derivative = -0.1
execute_on = 'initial timestep_begin'
[]
[make_crash]
type = ConditionalFunctionEnableControl
enable_objects = 'Kernels::exception'
conditional_function = 'conditional_function'
execute_on = 'timestep_begin'
[]
[]
[MultiApps]
inactive = 'shortest_app'
[shortest_app]
type = TransientMultiApp
input_files = 'pid_pp_control_subapp.i'
[]
[]
[Outputs]
file_base = out
exodus = false
csv = true
[]
(modules/porous_flow/test/tests/fluids/brine1_tabulated.i)
# Test the density and viscosity calculated by the brine material using a
# TabulatedFluidProperties userobject for water
# Pressure 20 MPa
# Temperature 50C
# xnacl = 0.1047 (equivalent to 2.0 molality)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[Variables]
[pp]
initial_condition = 20e6
[]
[]
[Kernels]
[dummy]
type = Diffusion
variable = pp
[]
[]
[AuxVariables]
[temp]
initial_condition = 50
[]
[xnacl]
initial_condition = 0.1047
[]
[]
[FluidProperties]
[water]
type = Water97FluidProperties
[]
[watertab]
type = TabulatedBicubicFluidProperties
fp = water
save_file = false
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temp
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[brine]
type = PorousFlowBrine
water_fp = watertab
temperature_unit = Celsius
xnacl = 0.1047
phase = 0
[]
[]
[Executioner]
type = Steady
solve_type = Newton
[]
[Postprocessors]
[pressure]
type = ElementIntegralVariablePostprocessor
variable = pp
[]
[temperature]
type = ElementIntegralVariablePostprocessor
variable = temp
[]
[xnacl]
type = ElementIntegralVariablePostprocessor
variable = xnacl
[]
[density]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_density_qp0'
[]
[viscosity]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_viscosity_qp0'
[]
[enthalpy]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_enthalpy_qp0'
[]
[internal_energy]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_internal_energy_qp0'
[]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = brine1
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/heat_transfer/test/tests/gap_heat_transfer_balance/large_gap_heat_transfer_test_cylinder.i)
rpv_core_gap_size = 0.15
core_outer_radius = 2
rpv_inner_radius = ${fparse 2 + rpv_core_gap_size}
rpv_outer_radius = ${fparse 2.5 + rpv_core_gap_size}
rpv_outer_htc = 10 # W/m^2/K
rpv_outer_Tinf = 300 # K
core_blocks = '1'
rpv_blocks = '3'
[Mesh]
[core_gap_rpv]
type = ConcentricCircleMeshGenerator
num_sectors = 10
radii = '${core_outer_radius} ${rpv_inner_radius} ${rpv_outer_radius}'
rings = '2 1 2'
has_outer_square = false
preserve_volumes = true
portion = full
[]
[rename_core_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = core_gap_rpv
primary_block = 1
paired_block = 2
new_boundary = 'core_outer'
[]
[rename_inner_rpv_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = rename_core_bdy
primary_block = 3
paired_block = 2
new_boundary = 'rpv_inner'
[]
[2d_mesh]
type = BlockDeletionGenerator
input = rename_inner_rpv_bdy
block = 2
[]
[]
[Variables]
[Tsolid]
initial_condition = 500
[]
[]
[Kernels]
[heat_source]
type = CoupledForce
variable = Tsolid
block = '${core_blocks}'
v = power_density
[]
[heat_conduction]
type = HeatConduction
variable = Tsolid
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = Tsolid
boundary = 'outer' # outer RPV
coefficient = ${rpv_outer_htc}
T_infinity = ${rpv_outer_Tinf}
[]
[]
[ThermalContact]
[RPV_gap]
type = GapHeatTransfer
gap_geometry_type = 'CYLINDER'
emissivity_primary = 0.8
emissivity_secondary = 0.8
variable = Tsolid
primary = 'core_outer'
secondary = 'rpv_inner'
gap_conductivity = 0.1
quadrature = true
cylinder_axis_point_1 = '0 0 0'
cylinder_axis_point_2 = '0 0 5'
[]
[]
[AuxVariables]
[power_density]
block = '${core_blocks}'
initial_condition = 50e3
[]
[]
[Materials]
[simple_mat]
type = HeatConductionMaterial
thermal_conductivity = 34.6 # W/m/K
[]
[]
[Postprocessors]
[Tcore_avg]
type = ElementAverageValue
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${core_blocks}'
[]
[Trpv_avg]
type = ElementAverageValue
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${rpv_blocks}'
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = '${core_blocks}'
[]
[rpv_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = Tsolid
boundary = 'outer' # outer RVP
T_fluid = ${rpv_outer_Tinf}
htc = ${rpv_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(rpv_convective_out - ptot) / ptot'
pp_names = 'rpv_convective_out ptot'
[]
[]
[Executioner]
type = Steady
automatic_scaling = true
compute_scaling_once = false
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
l_max_its = 100
[Quadrature]
side_order = seventh
[]
line_search = none
[]
[Outputs]
exodus = false
csv = true
[]
(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
[../]
[]
(test/tests/problems/eigen_problem/eigensolvers/ne_coupled_picard.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 10
elem_type = QUAD4
nx = 8
ny = 8
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
# set this so that the Picard initial norm is not zero
initial_condition = 1
[../]
[]
[AuxVariables]
[./T]
order = FIRST
family = LAGRANGE
# set this so that the Picard initial norm is not zero
initial_condition = 1
[../]
[./power]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = DiffMKernel
variable = u
mat_prop = diffusion
offset = 0.0
[../]
[./rhs]
type = CoefReaction
variable = u
coefficient = -1.0
extra_vector_tags = 'eigen'
[../]
[]
[AuxKernels]
[./power_ak]
type = NormalizationAux
variable = power
source_variable = u
normalization = unorm
# this coefficient will affect the eigenvalue.
normal_factor = 10
execute_on = timestep_end
[../]
[]
[BCs]
[./homogeneous]
type = DirichletBC
variable = u
boundary = '0 1 2 3'
value = 0
[../]
[./eigenU]
type = EigenDirichletBC
variable = u
boundary = '0 1 2 3'
[../]
[]
[Materials]
[./dc]
type = VarCouplingMaterial
var = T
block = 0
base = 1.0
coef = 1.0
[../]
[]
[Executioner]
type = Eigenvalue
solve_type = PJFNK
nl_abs_tol = 1e-8
nl_rel_tol = 1e-6
fixed_point_max_its = 10
fixed_point_rel_tol = 1e-6
[]
[Postprocessors]
[./unorm]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = linear
[../]
[]
[VectorPostprocessors]
[./eigenvalues]
type = Eigenvalues
execute_on = 'timestep_end'
[../]
[]
[Outputs]
csv = true
exodus =true
execute_on = 'timestep_end'
[]
[MultiApps]
[./sub]
type = FullSolveMultiApp
input_files = ne_coupled_picard_sub.i
execute_on = timestep_end
[../]
[]
[Transfers]
[./T_from_sub]
type = MultiAppShapeEvaluationTransfer
from_multi_app = sub
source_variable = T
variable = T
[../]
[./power_to_sub]
type = MultiAppShapeEvaluationTransfer
to_multi_app = sub
source_variable = power
variable = power
[../]
[]
(test/tests/transfers/multiapp_conservative_transfer/sub_power_density.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.01 # to make sure the meshes don't align
xmax = 0.49 # to make sure the meshes don't align
ymax = 1
nx = 10
ny = 10
[]
[block1]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0.2 0.2 0'
top_right = '0.3 0.8 0'
[]
[]
[Variables]
[sink]
family = MONOMIAL
order = CONSTANT
[]
[]
[Functions]
[sink_func]
type = ParsedFunction
expression = '5e2*x*(0.5-x)+5e1'
[]
[]
[Kernels]
[reaction]
type = Reaction
variable = sink
[]
[coupledforce]
type = BodyForce
variable = sink
function = sink_func
[]
[]
[AuxVariables]
[from_parent]
block = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[sink]
type = ElementIntegralVariablePostprocessor
block = 1
variable = sink
[]
[from_parent_pp]
type = ElementIntegralVariablePostprocessor
block = 1
variable = from_parent
execute_on = 'transfer'
[]
[]
[Outputs]
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/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/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_3D_mortar.i)
outer_htc = 10 # W/m^2/K
outer_Tinf = 300 # K
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 6
nz = 6
xmin = -1
xmax = -0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
elem_type = HEX27
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'left_bottom left_back left_right left_front left_left left_top'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 3
nx = 4
ny = 8
nz = 8
xmin = 0.5
xmax = 1
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
elem_type = HEX27
[]
[right_block_sidesets]
type = RenameBoundaryGenerator
input = right_block
old_boundary = '0 1 2 3 4 5'
# new_boundary = 'right_bottom right_back right_right right_front right_left right_top'
new_boundary = '100 101 102 103 104 105'
[]
[right_block_sidesets_rename]
type = RenameBoundaryGenerator
input = right_block_sidesets
old_boundary = '100 101 102 103 104 105'
new_boundary = 'right_bottom right_back right_right right_front right_left right_top'
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block_sidesets_rename
subdomain_id = 2
[]
[combined_mesh]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_id'
[]
[left_lower]
type = LowerDBlockFromSidesetGenerator
input = combined_mesh
sidesets = 'left_right'
new_block_id = '10001'
new_block_name = 'secondary_lower'
[]
[right_lower]
type = LowerDBlockFromSidesetGenerator
input = left_lower
sidesets = 'right_left'
new_block_id = '10000'
new_block_name = 'primary_lower'
[]
[]
[Functions]
[temp]
type = PiecewiseLinear
x = '0 1'
y = '100 200'
[]
[]
[Variables]
[temp]
initial_condition = 500
[]
[lm]
order = SECOND
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[AuxVariables]
[power_density]
block = 1
initial_condition = 50e3
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temp
block = '1 2'
[]
[heat_source]
type = CoupledForce
variable = temp
block = '1'
v = power_density
[]
[]
[Materials]
[heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 34.6
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = temp
boundary = 'left_right'
primary_emissivity = 0.0
secondary_emissivity = 0.0
[]
[conduction]
type = GapFluxModelConduction
temperature = temp
boundary = 'left_right'
gap_conductivity = 5.0
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
primary_boundary = 'right_left'
primary_subdomain = 'primary_lower'
secondary_boundary = 'left_right'
secondary_subdomain = 'secondary_lower'
gap_flux_models = 'radiation conduction'
gap_geometry_type = PLATE
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = temp
boundary = 'right_right' # outer RPV
coefficient = ${outer_htc}
T_infinity = ${outer_Tinf}
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 1
dtmin = 0.01
end_time = 1
nl_rel_tol = 1e-12
nl_abs_tol = 1e-8
[]
[Outputs]
exodus = true
csv = true
[Console]
type = Console
[]
[]
[Postprocessors]
[temp_left]
type = SideAverageValue
boundary = 'left_right'
variable = temp
[]
[temp_right]
type = SideAverageValue
boundary = 'right_left'
variable = temp
[]
[flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 'left_right'
diffusivity = thermal_conductivity
[]
[flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 'right_left'
diffusivity = thermal_conductivity
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = 1
[]
[convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = temp
boundary = 'right_right' # outer RVP
T_fluid = ${outer_Tinf}
htc = ${outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(convective_out - ptot) / ptot'
pp_names = 'convective_out ptot'
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = 'left_right right_left'
variable = temp
[]
[]
(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/phase_field/test/tests/conserved_noise/normal_masked.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
[]
[Functions]
[./mask_func]
type = ParsedFunction
expression = 'r:=sqrt((x-5)^2+(y-5)^2); if (r<3, 1.0, 0.0)'
[../]
[]
[Variables]
[./c]
order = FIRST
family = LAGRANGE
initial_condition = 0.0
[../]
[]
[Kernels]
[./time]
type = TimeDerivative
variable = c
[../]
[./conserved_langevin]
type = ConservedLangevinNoise
amplitude = 0.5
variable = c
noise = normal_masked_noise
[]
[]
[BCs]
[./Periodic]
[./all]
variable = c
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./mask_material]
type = GenericFunctionMaterial
prop_names = 'mask_prop'
prop_values = 'mask_func'
[../]
[]
[UserObjects]
[./normal_masked_noise]
type = ConservedMaskedNormalNoise
mask = mask_prop
[../]
[]
[Postprocessors]
[./total_c]
type = ElementIntegralVariablePostprocessor
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_masked
[./csv]
type = CSV
[../]
[]
(test/tests/restart/restart_transient_from_transient/restart_trans_with_2subs_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
ny = 3
xmax = 0.3
ymax = 0.3
[]
[AuxVariables]
[power_density]
[]
[]
[Variables]
[temp]
[]
[]
[Kernels]
[heat_conduction]
type = Diffusion
variable = temp
[]
[heat_ie]
type = TimeDerivative
variable = temp
[]
[heat_source_fuel]
type = CoupledForce
variable = temp
v = power_density
[]
[]
[BCs]
[bc]
type = DirichletBC
variable = temp
boundary = '1 3'
value = 100
[]
[bc2]
type = NeumannBC
variable = temp
boundary = '0 2'
value = 10.0
[]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
start_time = 0
end_time = 3
dt = 1.0
nl_abs_tol = 1e-7
nl_rel_tol = 1e-7
[]
[Postprocessors]
[temp_fuel_avg]
type = ElementAverageValue
variable = temp
block = '0'
execute_on = 'initial timestep_end'
[]
[pwr_density]
type = ElementIntegralVariablePostprocessor
block = '0'
variable = power_density
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
perf_graph = true
exodus = true
color = true
[]
(test/tests/interfacekernels/2d_interface/coupled_value_coupled_flux_with_jump_material.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
[]
[./subdomain1]
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 0'
block_id = 1
input = gen
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = subdomain1
primary_block = '0'
paired_block = '1'
new_boundary = 'primary0_interface'
[../]
[./break_boundary]
input = interface
type = BreakBoundaryOnSubdomainGenerator
[../]
[]
[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
[../]
[./source_u]
type = BodyForce
variable = u
value = 1
[../]
[]
[InterfaceKernels]
[./interface]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
jump_prop_name = jump
[../]
[]
[Materials]
[./jump]
type = JumpInterfaceMaterial
var = u
neighbor_var = v
boundary = primary0_interface
[../]
[]
[BCs]
[./u]
type = VacuumBC
variable = u
boundary = 'left_to_0 bottom_to_0 right top'
[../]
[./v]
type = VacuumBC
variable = v
boundary = 'left_to_1 bottom_to_1'
[../]
[]
[Postprocessors]
[./u_int]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[../]
[./v_int]
type = ElementIntegralVariablePostprocessor
variable = v
block = 1
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
(modules/porous_flow/test/tests/fluidstate/brineco2.i)
# Tests correct calculation of properties in PorousFlowBrineCO2
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 2
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
temperature = 30
[]
[Variables]
[pgas]
initial_condition = 20e6
[]
[z]
initial_condition = 0.2
[]
[]
[AuxVariables]
[xnacl]
initial_condition = 0.1
[]
[pressure_gas]
order = CONSTANT
family = MONOMIAL
[]
[pressure_water]
order = CONSTANT
family = MONOMIAL
[]
[saturation_gas]
order = CONSTANT
family = MONOMIAL
[]
[saturation_water]
order = CONSTANT
family = MONOMIAL
[]
[density_water]
order = CONSTANT
family = MONOMIAL
[]
[density_gas]
order = CONSTANT
family = MONOMIAL
[]
[viscosity_water]
order = CONSTANT
family = MONOMIAL
[]
[viscosity_gas]
order = CONSTANT
family = MONOMIAL
[]
[enthalpy_water]
order = CONSTANT
family = MONOMIAL
[]
[enthalpy_gas]
order = CONSTANT
family = MONOMIAL
[]
[internal_energy_water]
order = CONSTANT
family = MONOMIAL
[]
[internal_energy_gas]
order = CONSTANT
family = MONOMIAL
[]
[x0_water]
order = CONSTANT
family = MONOMIAL
[]
[x0_gas]
order = CONSTANT
family = MONOMIAL
[]
[x1_water]
order = CONSTANT
family = MONOMIAL
[]
[x1_gas]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[pressure_water]
type = PorousFlowPropertyAux
variable = pressure_water
property = pressure
phase = 0
execute_on = timestep_end
[]
[pressure_gas]
type = PorousFlowPropertyAux
variable = pressure_gas
property = pressure
phase = 1
execute_on = timestep_end
[]
[saturation_water]
type = PorousFlowPropertyAux
variable = saturation_water
property = saturation
phase = 0
execute_on = timestep_end
[]
[saturation_gas]
type = PorousFlowPropertyAux
variable = saturation_gas
property = saturation
phase = 1
execute_on = timestep_end
[]
[density_water]
type = PorousFlowPropertyAux
variable = density_water
property = density
phase = 0
execute_on = timestep_end
[]
[density_gas]
type = PorousFlowPropertyAux
variable = density_gas
property = density
phase = 1
execute_on = timestep_end
[]
[viscosity_water]
type = PorousFlowPropertyAux
variable = viscosity_water
property = viscosity
phase = 0
execute_on = timestep_end
[]
[viscosity_gas]
type = PorousFlowPropertyAux
variable = viscosity_gas
property = viscosity
phase = 1
execute_on = timestep_end
[]
[enthalpy_water]
type = PorousFlowPropertyAux
variable = enthalpy_water
property = enthalpy
phase = 0
execute_on = timestep_end
[]
[enthalpy_gas]
type = PorousFlowPropertyAux
variable = enthalpy_gas
property = enthalpy
phase = 1
execute_on = timestep_end
[]
[internal_energy_water]
type = PorousFlowPropertyAux
variable = internal_energy_water
property = internal_energy
phase = 0
execute_on = timestep_end
[]
[internal_energy_gas]
type = PorousFlowPropertyAux
variable = internal_energy_gas
property = internal_energy
phase = 1
execute_on = timestep_end
[]
[x1_water]
type = PorousFlowPropertyAux
variable = x1_water
property = mass_fraction
phase = 0
fluid_component = 1
execute_on = timestep_end
[]
[x1_gas]
type = PorousFlowPropertyAux
variable = x1_gas
property = mass_fraction
phase = 1
fluid_component = 1
execute_on = timestep_end
[]
[x0_water]
type = PorousFlowPropertyAux
variable = x0_water
property = mass_fraction
phase = 0
fluid_component = 0
execute_on = timestep_end
[]
[x0_gas]
type = PorousFlowPropertyAux
variable = x0_gas
property = mass_fraction
phase = 1
fluid_component = 0
execute_on = timestep_end
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
variable = pgas
fluid_component = 0
[]
[mass1]
type = PorousFlowMassTimeDerivative
variable = z
fluid_component = 1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pgas z'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[fs]
type = PorousFlowBrineCO2
brine_fp = brine
co2_fp = co2
capillary_pressure = pc
[]
[]
[FluidProperties]
[co2]
type = CO2FluidProperties
[]
[brine]
type = BrineFluidProperties
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[brineco2]
type = PorousFlowFluidState
gas_porepressure = pgas
z = z
temperature_unit = Celsius
xnacl = xnacl
capillary_pressure = pc
fluid_state = fs
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-12 0 0 0 1e-12 0 0 0 1e-12'
[]
[relperm0]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[relperm1]
type = PorousFlowRelativePermeabilityCorey
n = 3
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 1
end_time = 1
nl_abs_tol = 1e-12
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[density_water]
type = ElementIntegralVariablePostprocessor
variable = density_water
[]
[density_gas]
type = ElementIntegralVariablePostprocessor
variable = density_gas
[]
[viscosity_water]
type = ElementIntegralVariablePostprocessor
variable = viscosity_water
[]
[viscosity_gas]
type = ElementIntegralVariablePostprocessor
variable = viscosity_gas
[]
[enthalpy_water]
type = ElementIntegralVariablePostprocessor
variable = enthalpy_water
[]
[enthalpy_gas]
type = ElementIntegralVariablePostprocessor
variable = enthalpy_gas
[]
[internal_energy_water]
type = ElementIntegralVariablePostprocessor
variable = internal_energy_water
[]
[internal_energy_gas]
type = ElementIntegralVariablePostprocessor
variable = internal_energy_gas
[]
[x1_water]
type = ElementIntegralVariablePostprocessor
variable = x1_water
[]
[x0_water]
type = ElementIntegralVariablePostprocessor
variable = x0_water
[]
[x1_gas]
type = ElementIntegralVariablePostprocessor
variable = x1_gas
[]
[x0_gas]
type = ElementIntegralVariablePostprocessor
variable = x0_gas
[]
[sg]
type = ElementIntegralVariablePostprocessor
variable = saturation_gas
[]
[sw]
type = ElementIntegralVariablePostprocessor
variable = saturation_water
[]
[pwater]
type = ElementIntegralVariablePostprocessor
variable = pressure_water
[]
[pgas]
type = ElementIntegralVariablePostprocessor
variable = pressure_gas
[]
[x0mass]
type = PorousFlowFluidMass
fluid_component = 0
phase = '0 1'
[]
[x1mass]
type = PorousFlowFluidMass
fluid_component = 1
phase = '0 1'
[]
[]
[Outputs]
csv = true
file_base = brineco2
execute_on = 'TIMESTEP_END'
perf_graph = false
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_sphere3D_mortar.i)
sphere_outer_htc = 10 # W/m^2/K
sphere_outer_Tinf = 300 # K
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Mesh]
[file]
type = FileMeshGenerator
file = sphere3D.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '3'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
[]
[Functions]
[temp]
type = PiecewiseLinear
x = '0 1'
y = '100 200'
[]
[]
[Variables]
[temp]
initial_condition = 500
[]
[lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[AuxVariables]
# [gap_conductance]
# order = CONSTANT
# family = MONOMIAL
# []
[power_density]
block = 'fuel'
initial_condition = 50e3
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temp
block = '1 2'
[]
[heat_source]
type = CoupledForce
variable = temp
block = 'fuel'
v = power_density
[]
[]
# [AuxKernels]
# [gap_cond]
# type = MaterialRealAux
# property = gap_conductance
# variable = gap_conductance
# boundary = 2
# []
# []
[Materials]
[heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 34.6
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = temp
boundary = 2
primary_emissivity = 0.0
secondary_emissivity = 0.0
[]
[conduction]
type = GapFluxModelConduction
temperature = temp
boundary = 2
gap_conductivity = 5.0
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
primary_boundary = 3
primary_subdomain = 10000
secondary_boundary = 2
secondary_subdomain = 10001
gap_flux_models = 'radiation conduction'
gap_geometry_type = SPHERE
sphere_origin = '0 0 0'
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = temp
boundary = '4' # outer RPV
coefficient = ${sphere_outer_htc}
T_infinity = ${sphere_outer_Tinf}
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 1
dtmin = 0.01
end_time = 1
nl_rel_tol = 1e-12
nl_abs_tol = 1e-7
[]
[Outputs]
exodus = true
csv = true
[Console]
type = Console
[]
[]
[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
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = 'fuel'
[]
[sphere_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = temp
boundary = '4' # outer RVP
T_fluid = ${sphere_outer_Tinf}
htc = ${sphere_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(sphere_convective_out - ptot) / ptot'
pp_names = 'sphere_convective_out ptot'
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '2 3'
variable = temp
[]
[]
(test/tests/restart/restart_transient_from_transient/pseudo_trans_with_2subs_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
ny = 3
xmax = 0.3
ymax = 0.3
[]
[AuxVariables]
[power_density]
[]
[]
[Variables]
[temp]
[]
[]
[Kernels]
[heat_timedt]
type = TimeDerivative
variable = temp
[]
[heat_conduction]
type = Diffusion
variable = temp
[]
[heat_source_fuel]
type = CoupledForce
variable = temp
v = power_density
[]
[]
[BCs]
[bc]
type = DirichletBC
variable = temp
boundary = '1 3'
value = 100
[]
[bc2]
type = NeumannBC
variable = temp
boundary = '0 2'
value = 10.0
[]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_abs_tol = 1e-7
nl_rel_tol = 1e-7
end_time = 20
dt = 2.0
[]
[Postprocessors]
[temp_fuel_avg]
type = ElementAverageValue
variable = temp
execute_on = 'initial timestep_end'
[]
[pwr_density]
type = ElementIntegralVariablePostprocessor
variable = power_density
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
perf_graph = true
exodus = true
color = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_balance/large_gap_heat_transfer_test_rz_cylinder.i)
rpv_core_gap_size = 0.2
core_outer_radius = 2
rpv_inner_radius = '${fparse 2 + rpv_core_gap_size}'
rpv_outer_radius = '${fparse 2.5 + rpv_core_gap_size}'
rpv_width = '${fparse rpv_outer_radius - rpv_inner_radius}'
rpv_outer_htc = 10 # W/m^2/K
rpv_outer_Tinf = 300 # K
core_blocks = '1'
rpv_blocks = '3'
[Mesh]
[gmg]
type = CartesianMeshGenerator
dim = 2
dx = '${core_outer_radius} ${rpv_core_gap_size} ${rpv_width}'
ix = '400 1 100'
dy = 1
iy = '5'
[]
[set_block_id1]
type = SubdomainBoundingBoxGenerator
input = gmg
bottom_left = '0 0 0'
top_right = '${core_outer_radius} 1 0'
block_id = 1
location = INSIDE
[]
[rename_core_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = set_block_id1
primary_block = 1
paired_block = 0
new_boundary = 'core_outer'
[]
[set_block_id3]
type = SubdomainBoundingBoxGenerator
input = rename_core_bdy
bottom_left = '${rpv_inner_radius} 0 0'
top_right = '${rpv_outer_radius} 1 0'
block_id = 3
location = INSIDE
[]
[rename_inner_rpv_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = set_block_id3
primary_block = 3
paired_block = 0
new_boundary = 'rpv_inner'
[]
# comment out for test without gap
[2d_mesh]
type = BlockDeletionGenerator
input = rename_inner_rpv_bdy
block = 0
[]
[]
[Problem]
coord_type = RZ
[]
[Variables]
[Tsolid]
initial_condition = 500
[]
[]
[Kernels]
[heat_source]
type = CoupledForce
variable = Tsolid
block = '${core_blocks}'
v = power_density
[]
[heat_conduction]
type = HeatConduction
variable = Tsolid
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = Tsolid
boundary = 'right' # outer RPV
coefficient = ${rpv_outer_htc}
T_infinity = ${rpv_outer_Tinf}
[]
[]
[ThermalContact]
[RPV_gap]
type = GapHeatTransfer
gap_geometry_type = 'CYLINDER'
emissivity_primary = 0.8
emissivity_secondary = 0.8
variable = Tsolid
primary = 'core_outer'
secondary = 'rpv_inner'
gap_conductivity = 0.1
quadrature = true
[]
[]
[AuxVariables]
[power_density]
block = '${core_blocks}'
initial_condition = 50e3
[]
[]
[Materials]
[simple_mat]
type = HeatConductionMaterial
thermal_conductivity = 34.6 # W/m/K
[]
[]
[Postprocessors]
[Tcore_avg]
type = ElementAverageValue
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${core_blocks}'
[]
[Trpv_avg]
type = ElementAverageValue
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${rpv_blocks}'
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = '${core_blocks}'
[]
[rpv_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = Tsolid
boundary = 'right' # outer RVP
T_fluid = ${rpv_outer_Tinf}
htc = ${rpv_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(rpv_convective_out - ptot) / ptot'
pp_names = 'rpv_convective_out ptot'
[]
[flux_from_core] # converges to ptot as the mesh is refined
type = SideDiffusiveFluxIntegral
variable = Tsolid
boundary = core_outer
diffusivity = thermal_conductivity
[]
[flux_into_rpv] # converges to rpv_convective_out as the mesh is refined
type = SideDiffusiveFluxIntegral
variable = Tsolid
boundary = rpv_inner
diffusivity = thermal_conductivity
[]
[]
[Executioner]
type = Steady
automatic_scaling = true
compute_scaling_once = false
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
l_max_its = 100
[Quadrature]
# order = fifth
side_order = seventh
[]
line_search = none
[]
[Outputs]
exodus = false
csv = true
[]
(modules/combined/test/tests/ACGrGrElasticDrivingForce/bicrystal.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 3
xmax = 1000
ymax = 1000
elem_type = QUAD4
uniform_refine = 2
[]
[GlobalParams]
op_num = 2
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
[../]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[ICs]
[./PolycrystalICs]
[./BicrystalBoundingBoxIC]
x1 = 0
y1 = 0
x2 = 500
y2 = 1000
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[./elastic_strain11]
order = CONSTANT
family = MONOMIAL
[../]
[./elastic_strain22]
order = CONSTANT
family = MONOMIAL
[../]
[./elastic_strain12]
order = CONSTANT
family = MONOMIAL
[../]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./var_indices]
order = CONSTANT
family = MONOMIAL
[../]
[./C1111]
order = CONSTANT
family = MONOMIAL
[../]
[./active_bounds_elemental]
order = CONSTANT
family = MONOMIAL
[../]
[./euler_angle]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[./PolycrystalElasticDrivingForce]
[../]
[./TensorMechanics]
displacements = 'disp_x disp_y'
[../]
[]
[AuxKernels]
[./bnds_aux]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[../]
[./elastic_strain11]
type = RankTwoAux
variable = elastic_strain11
rank_two_tensor = elastic_strain
index_i = 0
index_j = 0
execute_on = timestep_end
[../]
[./elastic_strain22]
type = RankTwoAux
variable = elastic_strain22
rank_two_tensor = elastic_strain
index_i = 1
index_j = 1
execute_on = timestep_end
[../]
[./elastic_strain12]
type = RankTwoAux
variable = elastic_strain12
rank_two_tensor = elastic_strain
index_i = 0
index_j = 1
execute_on = timestep_end
[../]
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
flood_counter = grain_tracker
execute_on = 'initial timestep_begin'
field_display = UNIQUE_REGION
[../]
[./var_indices]
type = FeatureFloodCountAux
variable = var_indices
flood_counter = grain_tracker
execute_on = 'initial timestep_begin'
field_display = VARIABLE_COLORING
[../]
[./C1111]
type = RankFourAux
variable = C1111
rank_four_tensor = elasticity_tensor
index_l = 0
index_j = 0
index_k = 0
index_i = 0
execute_on = timestep_end
[../]
[./active_bounds_elemental]
type = FeatureFloodCountAux
variable = active_bounds_elemental
field_display = ACTIVE_BOUNDS
execute_on = 'initial timestep_begin'
flood_counter = grain_tracker
[../]
[./euler_angle]
type = OutputEulerAngles
variable = euler_angle
euler_angle_provider = euler_angle_file
grain_tracker = grain_tracker
output_euler_angle = 'phi1'
[../]
[]
[BCs]
[./top_displacement]
type = DirichletBC
variable = disp_y
boundary = top
value = -10.0
[../]
[./x_anchor]
type = DirichletBC
variable = disp_x
boundary = 'left right'
value = 0.0
[../]
[./y_anchor]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
block = 0
T = 500 # K
wGB = 75 # nm
GBmob0 = 2.5e-6 #m^4/(Js) from Schoenfelder 1997
Q = 0.23 #Migration energy in eV
GBenergy = 0.708 #GB energy in J/m^2
time_scale = 1.0e-6
[../]
[./ElasticityTensor]
type = ComputePolycrystalElasticityTensor
grain_tracker = grain_tracker
[../]
[./strain]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y'
[../]
[./stress]
type = ComputeLinearElasticStress
block = 0
[../]
[]
[UserObjects]
[./euler_angle_file]
type = EulerAngleFileReader
file_name = test.tex
[../]
[./grain_tracker]
type = GrainTrackerElasticity
connecting_threshold = 0.05
compute_var_to_feature_map = true
flood_entity_type = elemental
execute_on = 'initial timestep_begin'
euler_angle_provider = euler_angle_file
fill_method = symmetric9
C_ijkl = '1.27e5 0.708e5 0.708e5 1.27e5 0.708e5 1.27e5 0.7355e5 0.7355e5 0.7355e5'
outputs = none
[../]
[]
[Postprocessors]
[./dt]
type = TimestepSize
[../]
[./gr0_area]
type = ElementIntegralVariablePostprocessor
variable = gr0
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
coupled_groups = 'gr0,gr1 disp_x,disp_y'
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart -pc_hypre_boomeramg_strong_threshold'
petsc_options_value = 'hypre boomeramg 31 0.7'
l_max_its = 30
l_tol = 1e-4
nl_max_its = 30
nl_rel_tol = 1e-9
start_time = 0.0
num_steps = 3
dt = 0.2
[./Adaptivity]
initial_adaptivity = 2
refine_fraction = 0.7
coarsen_fraction = 0.1
max_h_level = 2
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/combined/examples/optimization/thermomechanical/thermomechanical_main.i)
vol_frac = 0.4
power = 2.0
E0 = 1.0e-6
E1 = 1.0
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 40
xmin = 0
xmax = 40
ymin = 0
ymax = 40
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = hold
nodes = 0
[]
[push_left]
type = ExtraNodesetGenerator
input = node
new_boundary = push_left
coord = '16 0 0'
[]
[push_center]
type = ExtraNodesetGenerator
input = push_left
new_boundary = push_center
coord = '24 0 0'
[]
[extra]
type = SideSetsFromBoundingBoxGenerator
input = push_center
bottom_left = '-0.01 17.999 0'
top_right = '5 22.001 0'
boundary_new = n1
boundaries_old = left
[]
[dirichlet_bc]
type = SideSetsFromNodeSetsGenerator
input = extra
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[mat_den]
family = MONOMIAL
order = FIRST
initial_condition = 0.02
[]
[sensitivity_one]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[]
[sensitivity_two]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[]
[total_sensitivity]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[]
[]
[AuxKernels]
[total_sensitivity]
type = ParsedAux
variable = total_sensitivity
expression = '(1-1.0e-7)*sensitivity_one + 1.0e-7*sensitivity_two'
coupled_variables = 'sensitivity_one sensitivity_two'
execute_on = 'LINEAR TIMESTEP_END'
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_y]
type = DirichletBC
variable = disp_y
boundary = hold
value = 0.0
[]
[no_x_symm]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${E1} + (mat_den ^ ${power}) * (${E1}-${E0})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
# We do filtering in the subapps
[update]
type = DensityUpdate
density_sensitivity = total_sensitivity
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = MULTIAPP_FIXED_POINT_BEGIN
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-8
dt = 1.0
num_steps = 2
[]
[Outputs]
[out]
type = CSV
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
exodus = true
[]
[Postprocessors]
[mesh_volume]
type = VolumePostprocessor
execute_on = 'initial timestep_end'
[]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[vol_frac]
type = ParsedPostprocessor
function = 'total_vol / mesh_volume'
pp_names = 'total_vol mesh_volume'
[]
[sensitivity]
type = ElementIntegralVariablePostprocessor
variable = total_sensitivity
[]
[]
[MultiApps]
[sub_app_one]
type = TransientMultiApp
input_files = structural_sub.i
[]
[sub_app_two]
type = TransientMultiApp
input_files = thermal_sub.i
[]
[]
[Transfers]
# First SUB-APP: STRUCTURAL
# To subapp densities
[subapp_one_density]
type = MultiAppCopyTransfer
to_multi_app = sub_app_one
source_variable = mat_den # Here
variable = mat_den
[]
# From subapp sensitivity
[subapp_one_sensitivity]
type = MultiAppCopyTransfer
from_multi_app = sub_app_one
source_variable = Dc # sensitivity_var
variable = sensitivity_one # Here
[]
# Second SUB-APP: HEAT CONDUCTIVITY
# To subapp densities
[subapp_two_density]
type = MultiAppCopyTransfer
to_multi_app = sub_app_two
source_variable = mat_den # Here
variable = mat_den
[]
# From subapp sensitivity
[subapp_two_sensitivity]
type = MultiAppCopyTransfer
from_multi_app = sub_app_two
source_variable = Tc # sensitivity_var
variable = sensitivity_two # Here
[]
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_specified_temperature_1phase/phy.energy_walltemperature_ss_1phase.i)
# This test tests conservation of energy at steady state for 1-phase flow when
# wall temperature is specified. Conservation is checked by comparing the
# integral of the heat flux against the difference of the boundary fluxes.
[GlobalParams]
initial_p = 7.0e6
initial_vel = 0
initial_T = 513
gravity_vector = '0.0 0.0 0.0'
closures = simple_closures
[]
[FluidProperties]
[eos]
type = StiffenedGasFluidProperties
gamma = 2.35
cv = 1816.0
q = -1.167e6
p_inf = 1.0e9
q_prime = 0
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[pipe]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
length = 3.66
n_elems = 10
A = 1.907720E-04
D_h = 1.698566E-02
f = 0.0
fp = eos
[]
[ht_pipe]
type = HeatTransferFromSpecifiedTemperature1Phase
flow_channel = pipe
T_wall = 550
Hw = 1.0e3
P_hf = 4.4925e-2
[]
[inlet]
type = SolidWall1Phase
input = 'pipe:in'
[]
[outlet]
type = SolidWall1Phase
input = 'pipe:out'
[]
[]
[Postprocessors]
[hf_pipe]
type = ADHeatRateConvection1Phase
block = pipe
T_wall = T_wall
T = T
Hw = Hw
P_hf = P_hf
execute_on = 'initial timestep_end'
[]
[heat_added]
type = TimeIntegratedPostprocessor
value = hf_pipe
execute_on = 'initial timestep_end'
[]
[E]
type = ElementIntegralVariablePostprocessor
variable = rhoEA
execute_on = 'initial timestep_end'
[]
[E_change]
type = ChangeOverTimePostprocessor
postprocessor = E
change_with_respect_to_initial = true
execute_on = 'initial timestep_end'
[]
[E_conservation]
type = DifferencePostprocessor
value1 = heat_added
value2 = E_change
execute_on = 'initial timestep_end'
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = crank-nicolson
abort_on_solve_fail = true
dt = 1e-1
solve_type = 'NEWTON'
line_search = 'basic'
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu'
nl_rel_tol = 1e-9
nl_abs_tol = 1e-8
nl_max_its = 50
l_tol = 1e-3
l_max_its = 60
start_time = 0
num_steps = 10
[]
[Outputs]
[out]
type = CSV
show = 'E_conservation'
[]
[console]
type = Console
show = 'E_conservation'
[]
[]
(test/tests/executioners/eigen_executioners/ne_deficient_b.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 10
elem_type = QUAD4
nx = 8
ny = 8
uniform_refine = 0
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[./v]
order = FIRST
family = LAGRANGE
eigen = true
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[./rhs]
type = CoupledEigenKernel
variable = u
v = v
[../]
[./src_v]
type = CoupledForce
variable = v
v = u
[../]
[]
[BCs]
[./homogeneous_u]
type = DirichletBC
variable = u
boundary = '0 1 2 3'
value = 0
[../]
[./homogeneous_v]
type = DirichletBC
variable = v
boundary = '0 1 2 3'
value = 0
[../]
[]
[Executioner]
type = NonlinearEigen
bx_norm = 'vnorm'
free_power_iterations = 2
nl_abs_tol = 1e-12
nl_rel_tol = 1e-50
k0 = 1.0
output_after_power_iterations = false
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
[]
[Postprocessors]
[./vnorm]
type = ElementIntegralVariablePostprocessor
variable = v
# execute on residual is important for nonlinear eigen solver!
execute_on = linear
[../]
[./udiff]
type = ElementL2Diff
variable = u
outputs = console
[../]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = ne_deficient_b
exodus = true
[]
(modules/phase_field/test/tests/actions/grain_growth_with_c.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
xmax = 400
ymax = 400
elem_type = QUAD
[]
[GlobalParams]
op_num = 2
var_name_base = gr
[]
[Modules]
[./PhaseField]
[./GrainGrowth]
c = c
[../]
[../]
[]
[AuxVariables]
[./c]
[../]
[]
[ICs]
[./PolycrystalICs]
[./BicrystalCircleGrainIC]
radius = 300
x = 400
y = 0
int_width = 60
[../]
[../]
[./c_IC]
type = SmoothCircleIC
variable = c
x1 = 100
y1 = 0.0
radius = 50
int_width = 40
invalue = 1.0
outvalue = 0.0
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
T = 500 # K
wGB = 60 # nm
GBmob0 = 2.5e-6 #m^4/(Js) from Schoenfelder 1997
Q = 0.23 #Migration energy in eV
GBenergy = 0.708 #GB energy in J/m^2
[../]
[]
[Postprocessors]
[./gr1area]
type = ElementIntegralVariablePostprocessor
variable = gr1
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'NEWTON'
l_tol = 1.0e-4
l_max_its = 30
nl_max_its = 20
nl_rel_tol = 1.0e-9
num_steps = 5
dt = 80.0
[]
[Outputs]
exodus = true
[]
(modules/combined/examples/optimization/helmholtz_multimat_nostrip.i)
vol_frac = 0.35
power = 1.1
Emin = 1.0e-6
Ess = 0.475 # ss
Et = 1.0 # w
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
# final_generator = 'MoveRight'
[Bottom]
type = GeneratedMeshGenerator
dim = 2
nx = 320
ny = 30
xmin = 0
xmax = 150
ymin = 0
ymax = 15
[]
[RenameBottom]
type = RenameBoundaryGenerator
input = Bottom
old_boundary = 'top bottom right left'
new_boundary = 'top_bottom bottom_bottom right_bottom left_bottom'
[]
[Top]
type = GeneratedMeshGenerator
dim = 2
nx = 320
ny = 30
xmin = 0
xmax = 150
ymin = 0
ymax = 15
[]
[MoveTop]
type = TransformGenerator
input = Top
transform = TRANSLATE
vector_value = '0 15 0'
[]
[RenameTop]
type = RenameBoundaryGenerator
input = MoveTop
old_boundary = 'top bottom right left'
new_boundary = 'top_top bottom_top right_top left_top'
[]
[bottom_gen]
type = ParsedSubdomainMeshGenerator
input = RenameBottom
combinatorial_geometry = 'y <= 15'
block_id = 1
[]
[top_gen]
type = ParsedSubdomainMeshGenerator
input = RenameTop
combinatorial_geometry = 'y > 15'
block_id = 3
[]
[stitch]
type = StitchedMeshGenerator
inputs = 'bottom_gen top_gen'
stitch_boundaries_pairs = 'top_bottom bottom_top'
[]
[left_load]
type = ExtraNodesetGenerator
input = stitch
new_boundary = left_load
coord = '37.5 30 0'
[]
[right_load]
type = ExtraNodesetGenerator
input = left_load
new_boundary = right_load
coord = '112.5 30 0'
[]
[left_support]
type = ExtraNodesetGenerator
input = right_load
new_boundary = left_support
coord = '0 0 0'
[]
[right_support]
type = ExtraNodesetGenerator
input = left_support
new_boundary = right_support
coord = '150 0 0'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[Dc]
initial_condition = -1.0
[]
[]
[AuxVariables]
[Cc]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = ${vol_frac}
[]
[sensitivity]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[AuxKernel]
type = MaterialRealAux
variable = sensitivity
property = sensitivity
execute_on = LINEAR
[]
[]
[mat_den_nodal]
family = L2_LAGRANGE
order = FIRST
initial_condition = ${vol_frac}
[AuxKernel]
type = SelfAux
execute_on = TIMESTEP_END
variable = mat_den_nodal
v = mat_den
[]
[]
[Dc_elem]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[AuxKernel]
type = SelfAux
variable = Dc_elem
v = Dc
execute_on = 'TIMESTEP_END'
[]
[]
[]
[Kernels]
[diffusion]
type = FunctionDiffusion
variable = Dc
function = 4.0
[]
[potential]
type = Reaction
variable = Dc
[]
[source]
type = CoupledForce
variable = Dc
v = sensitivity
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_y]
type = DirichletBC
variable = disp_y
boundary = left_support
value = 0.0
[]
[no_x]
type = DirichletBC
variable = disp_x
boundary = left_support
value = 0.0
[]
[no_y_right]
type = DirichletBC
variable = disp_y
boundary = right_support
value = 0.0
[]
[boundary_penalty]
type = ADRobinBC
variable = Dc
boundary = 'bottom_bottom right_bottom left_bottom top_top right_top left_top'
coefficient = 10
[]
[]
[NodalKernels]
[left_down]
type = NodalGravity
variable = disp_y
boundary = left_load
gravity_value = -1e-3
mass = 1
[]
[right_down]
type = NodalGravity
variable = disp_y
boundary = right_load
gravity_value = -1e-3
mass = 1
[]
[]
[Materials]
[elasticity_tensor_one]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys_one
poissons_ratio = poissons_ratio
args = 'mat_den'
block = '1'
[]
[elasticity_tensor_three]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys_three
poissons_ratio = poissons_ratio
args = 'mat_den'
block = '3'
[]
# One: Tungsten
[E_phys_one]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${Et}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys_one
block = '1'
outputs = 'exodus'
[]
# Three: SS316
[E_phys_three]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${Ess}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys_three
block = '3'
outputs = 'exodus'
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc_one]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys_one
block = '1'
[]
[dc_three]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys_three
block = '3'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[update_one]
type = DensityUpdate
density_sensitivity = Dc_elem
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
block = '1'
[]
[update_three]
type = DensityUpdate
density_sensitivity = Dc_elem
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
block = '3'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-10
dt = 1.0
num_steps = 90
[]
[Outputs]
exodus = true
[out]
type = CSV
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[mesh_volume]
type = VolumePostprocessor
execute_on = 'initial timestep_end'
[]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[vol_frac]
type = ParsedPostprocessor
function = 'total_vol / mesh_volume'
pp_names = 'total_vol mesh_volume'
[]
[sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = sensitivity
block = '1 3'
[]
[objective_one]
type = ElementIntegralMaterialProperty
mat_prop = strain_energy_density
execute_on = 'INITIAL TIMESTEP_END'
block = '1'
[]
[objective_three]
type = ElementIntegralMaterialProperty
mat_prop = strain_energy_density
execute_on = 'INITIAL TIMESTEP_END'
block = '3'
[]
[]
(test/tests/auxkernels/element_aux_var/l2_element_aux_var_test.i)
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
second_order = true
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./l2_lagrange]
order = FIRST
family = L2_LAGRANGE
[../]
[./l2_hierarchic]
order = FIRST
family = L2_HIERARCHIC
[../]
[./one]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
# Coupling of nonlinear to Aux
[./diff]
type = Diffusion
variable = u
[../]
[./force]
type = CoupledForce
variable = u
v = one
[../]
[]
[AuxKernels]
[./coupled_l2_lagrange]
variable = l2_lagrange
type = CoupledAux
value = 2
operator = +
coupled = u
execute_on = 'initial timestep_end'
[../]
[./coupled_l2_hierarchic]
variable = l2_hierarchic
type = CoupledAux
value = 2
operator = +
coupled = u
execute_on = 'initial timestep_end'
[../]
[./constant]
variable = one
type = ConstantAux
value = 1
execute_on = 'initial timestep_end'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Postprocessors]
[./int2_u]
type = ElementL2Norm
variable = u
execute_on = 'initial timestep_end'
[../]
[./int2_l2_lagrange]
type = ElementL2Norm
variable = l2_lagrange
execute_on = 'initial timestep_end'
[../]
[./int2_l2_hierarchic]
type = ElementL2Norm
variable = l2_hierarchic
execute_on = 'initial timestep_end'
[../]
[./int_u]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = 'initial timestep_end'
[../]
[./int_l2_lagrange]
type = ElementIntegralVariablePostprocessor
variable = l2_lagrange
execute_on = 'initial timestep_end'
[../]
[./int_l2_hierarchic]
type = ElementIntegralVariablePostprocessor
variable = l2_hierarchic
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
[./ex_out]
type = Exodus
file_base = l2elemaux
elemental_as_nodal = true
[../]
[]
(modules/porous_flow/test/tests/fluids/simple_fluid_hr.i)
# Test the properties calculated by the simple fluid Material
# Time are chosen to be hours
# Pressure 10 MPa
# Temperature = 300 K (temperature unit = K)
# Density should equal 1500*exp(1E7/1E9-2E-4*300)=1426.844 kg/m^3
# Viscosity should equal 3.06E-7 Pa.hr
# Energy density should equal 4000 * 300 = 1.2E6 J/kg
# Specific enthalpy should equal 4000 * 300 + 10e6 / 1426.844 = 1.207008E6 J/kg
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 2.0E-4
cv = 4000.0
cp = 5000.0
bulk_modulus = 1.0E9
thermal_conductivity = 1.0
viscosity = 1.1E-3
density0 = 1500.0
[]
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp T'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[Variables]
[pp]
initial_condition = 10E6
[]
[T]
initial_condition = 300.0
[]
[]
[Kernels]
[dummy_p]
type = Diffusion
variable = pp
[]
[dummy_T]
type = Diffusion
variable = T
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = T
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
temperature_unit = Kelvin
time_unit = hours
fp = the_simple_fluid
phase = 0
[]
[]
[Postprocessors]
[pressure]
type = ElementIntegralVariablePostprocessor
variable = pp
[]
[temperature]
type = ElementIntegralVariablePostprocessor
variable = T
[]
[density]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_density_qp0'
[]
[viscosity]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_viscosity_qp0'
[]
[internal_energy]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_internal_energy_qp0'
[]
[enthalpy]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_enthalpy_qp0'
[]
[]
[Executioner]
type = Steady
solve_type = Newton
[]
[Outputs]
execute_on = 'timestep_end'
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/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/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_sphere3D.i)
sphere_outer_htc = 10 # W/m^2/K
sphere_outer_Tinf = 300 # K
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Mesh]
file = sphere3D.e
[]
[Functions]
[temp]
type = PiecewiseLinear
x = '0 1'
y = '100 200'
[]
[]
[Variables]
[temp]
initial_condition = 500
[]
[]
[AuxVariables]
[gap_conductance]
order = CONSTANT
family = MONOMIAL
[]
[power_density]
block = 'fuel'
initial_condition = 50e3
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temp
[]
[heat_source]
type = CoupledForce
variable = temp
block = 'fuel'
v = power_density
[]
[]
[AuxKernels]
[gap_cond]
type = MaterialRealAux
property = gap_conductance
variable = gap_conductance
boundary = 2
[]
[]
[Materials]
[heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 34.6
[]
[]
[ThermalContact]
[thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 3
secondary = 2
emissivity_primary = 0
emissivity_secondary = 0
gap_conductivity = 5
gap_geometry_type = SPHERE
sphere_origin = '0 0 0'
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = temp
boundary = '4' # outer RPV
coefficient = ${sphere_outer_htc}
T_infinity = ${sphere_outer_Tinf}
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 1
dtmin = 0.01
end_time = 1
nl_rel_tol = 1e-12
nl_abs_tol = 1e-7
[Quadrature]
order = fifth
side_order = seventh
[]
[]
[Outputs]
exodus = true
csv = true
[Console]
type = Console
[]
[]
[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
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = 'fuel'
[]
[sphere_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = temp
boundary = '4' # outer RVP
T_fluid = ${sphere_outer_Tinf}
htc = ${sphere_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(sphere_convective_out - ptot) / ptot'
pp_names = 'sphere_convective_out ptot'
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '2 3'
variable = temp
[]
[]
(test/tests/interfacekernels/3d_interface/coupled_value_coupled_flux.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 2
xmax = 2
ny = 2
ymax = 2
nz = 2
zmax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 1'
block_id = 1
[../]
[./break_boundary]
input = subdomain1
type = BreakBoundaryOnSubdomainGenerator
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
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
[../]
[./source_u]
type = BodyForce
variable = u
value = 1
[../]
[]
[InterfaceKernels]
[./interface]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
[../]
[]
[BCs]
[./u]
type = VacuumBC
variable = u
boundary = 'left_to_0 bottom_to_0 back_to_0 right top front'
[../]
[./v]
type = VacuumBC
variable = v
boundary = 'left_to_1 bottom_to_1 back_to_1'
[../]
[]
[Postprocessors]
[./u_int]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[../]
[./v_int]
type = ElementIntegralVariablePostprocessor
variable = v
block = 1
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
(test/tests/tag/tag_interface_kernels.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 3
nx = 2
xmax = 2
ny = 2
ymax = 2
nz = 2
zmax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 0 0'
top_right = '1 1 1'
block_id = 1
[../]
[./break_boundary]
input = subdomain1
type = BreakBoundaryOnSubdomainGenerator
[../]
[./interface]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
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
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1'
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 1
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1'
[../]
[./source_u]
type = BodyForce
variable = u
value = 1
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1 vec_tag2'
[../]
[]
[InterfaceKernels]
[./interface]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1 vec_tag2'
[../]
[]
[BCs]
[./u]
type = VacuumBC
variable = u
boundary = 'left_to_0 bottom_to_0 back_to_0 right top front'
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1'
[../]
[./v]
type = VacuumBC
variable = v
boundary = 'left_to_1 bottom_to_1 back_to_1'
extra_matrix_tags = 'mat_tag1 mat_tag2'
extra_vector_tags = 'vec_tag1'
[../]
[]
[AuxVariables]
[./tag_variable1]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./tag_variable2]
order = FIRST
family = LAGRANGE
block = 1
[../]
[]
[AuxKernels]
[./TagVectorAux1]
type = TagVectorAux
variable = tag_variable1
v = u
block = 0
vector_tag = vec_tag2
execute_on = timestep_end
[../]
[./TagVectorAux2]
type = TagMatrixAux
variable = tag_variable2
v = v
block = 1
matrix_tag = mat_tag2
execute_on = timestep_end
[../]
[]
[Postprocessors]
[./u_int]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[../]
[./v_int]
type = ElementIntegralVariablePostprocessor
variable = v
block = 1
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Problem]
type = TagTestProblem
test_tag_vectors = 'nontime residual vec_tag1 vec_tag2'
test_tag_matrices = 'mat_tag1 mat_tag2'
extra_tag_matrices = 'mat_tag1 mat_tag2'
extra_tag_vectors = 'vec_tag1 vec_tag2'
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
[]
(test/tests/executioners/eigen_executioners/ne_coupled.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 10
elem_type = QUAD4
nx = 8
ny = 8
uniform_refine = 0
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[./T]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./power]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = DiffMKernel
variable = u
mat_prop = diffusion
offset = 0.0
[../]
[./rhs]
type = MassEigenKernel
variable = u
[../]
[./diff_T]
type = Diffusion
variable = T
[../]
[./src_T]
type = CoupledForce
variable = T
v = power
[../]
[]
[AuxKernels]
[./power_ak]
type = NormalizationAux
variable = power
source_variable = u
normalization = unorm
# this coefficient will affect the eigenvalue.
normal_factor = 10
execute_on = linear
[../]
[]
[BCs]
[./homogeneous]
type = DirichletBC
variable = u
boundary = '0 1 2 3'
value = 0
[../]
[./homogeneousT]
type = DirichletBC
variable = T
boundary = '0 1 2 3'
value = 0
[../]
[]
[Materials]
[./dc]
type = VarCouplingMaterial
var = T
block = 0
base = 1.0
coef = 1.0
[../]
[]
[Executioner]
type = NonlinearEigen
bx_norm = 'unorm'
free_power_iterations = 2
nl_abs_tol = 1e-12
nl_rel_tol = 1e-50
k0 = 1.0
output_after_power_iterations = false
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
[]
[Postprocessors]
active = 'unorm udiff'
[./unorm]
type = ElementIntegralVariablePostprocessor
variable = u
# execute on residual is important for nonlinear eigen solver!
execute_on = linear
[../]
[./udiff]
type = ElementL2Diff
variable = u
outputs = console
[../]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = ne_coupled
exodus = true
[]
(test/tests/transfers/multiapp_conservative_transfer/sub_nearest_point.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.01 # to make sure the meshes don't align
xmax = 0.49 # to make sure the meshes don't align
ymax = 1
nx = 10
ny = 10
[]
[block1]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0.2 0.2 0'
top_right = '0.3 0.8 0'
[]
[]
[Variables]
[sink]
family = MONOMIAL
order = CONSTANT
[]
[]
[Functions]
[sink_func]
type = ParsedFunction
expression = '5e2*x*(0.5-x)+5e1'
[]
[]
[Kernels]
[reaction]
type = Reaction
variable = sink
[]
[coupledforce]
type = BodyForce
variable = sink
function = sink_func
[]
[]
[AuxVariables]
[from_parent]
block = 1
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[sink]
type = ElementIntegralVariablePostprocessor
block = 1
variable = sink
[]
[from_parent_pp]
type = ElementIntegralVariablePostprocessor
block = 1
variable = from_parent
execute_on = 'transfer'
[]
[]
[Outputs]
exodus = true
[console]
type = Console
execute_on = 'timestep_end timestep_begin'
[]
[]
(modules/combined/test/tests/optimization/compliance_sensitivity/2d_mmb_2material.i)
vol_frac = 0.5
power = 1
E0 = 1e-5
E1 = 0.6
E2 = 1.0
rho0 = 0.0
rho1 = 0.4
rho2 = 1.0
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 150
ny = 50
xmin = 0
xmax = 30
ymin = 0
ymax = 10
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = hold
nodes = 0
[]
[push]
type = ExtraNodesetGenerator
input = node
new_boundary = push
coord = '30 10 0'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[Dc]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
# initial_condition = ${vol_frac}
[]
[]
[ICs]
[mat_den]
type = RandomIC
seed = 5
variable = mat_den
max = '${fparse vol_frac+0.15}'
min = '${fparse vol_frac-0.15}'
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_y
boundary = hold
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[]
[NodalKernels]
[push]
type = NodalGravity
variable = disp_y
boundary = push
gravity_value = -1
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# ordered multimaterial simp
expression = "A1:=(${E0}-${E1})/(${rho0}^${power}-${rho1}^${power}); "
"B1:=${E0}-A1*${rho0}^${power}; E1:=A1*mat_den^${power}+B1; "
"A2:=(${E1}-${E2})/(${rho1}^${power}-${rho2}^${power}); "
"B2:=${E1}-A2*${rho1}^${power}; E2:=A2*mat_den^${power}+B2; "
"if(mat_den<${rho1},E1,E2)"
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity2
design_density = mat_den
youngs_modulus = E_phys
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[rad_avg]
type = RadialAverage
radius = 1.2
weights = linear
prop_name = sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
[update]
type = DensityUpdate
density_sensitivity = Dc
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
[]
[calc_sense]
type = SensitivityFilter
density_sensitivity = Dc
design_density = mat_den
filter_UO = rad_avg
execute_on = TIMESTEP_END
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-8
dt = 1.0
num_steps = 70
[]
[Outputs]
exodus = true
[out]
type = CSV
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = sensitivity
[]
[]
(modules/combined/test/tests/optimization/compliance_sensitivity/2d_mbb.i)
vol_frac = 0.5
E0 = 1
Emin = 1e-8
power = 2
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 150
ny = 50
xmin = 0
xmax = 30
ymin = 0
ymax = 10
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = hold
nodes = 0
[]
[push]
type = ExtraNodesetGenerator
input = node
new_boundary = push
coord = '30 10 0'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[Dc]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = ${vol_frac}
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_y
boundary = hold
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[]
[NodalKernels]
[push]
type = NodalGravity
variable = disp_y
boundary = push
gravity_value = -1
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${E0}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
incremental = false
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[rad_avg]
type = RadialAverage
radius = 1.2
weights = linear
prop_name = sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
[update]
type = DensityUpdate
density_sensitivity = Dc
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
[]
[calc_sense]
type = SensitivityFilter
density_sensitivity = Dc
design_density = mat_den
filter_UO = rad_avg
execute_on = TIMESTEP_END
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-8
dt = 1.0
num_steps = 70
[]
[Outputs]
[out]
type = CSV
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = sensitivity
[]
[]
(test/tests/problems/eigen_problem/eigensolvers/ne-coupled-scaling.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 10
elem_type = QUAD4
nx = 8
ny = 8
[]
[Variables]
[u][]
[T][]
[]
[AuxVariables]
[power][]
[]
[Kernels]
[./diff]
type = DiffMKernel
variable = u
mat_prop = diffusion
offset = 0.0
[../]
[./rhs]
type = CoefReaction
variable = u
coefficient = -1.0
extra_vector_tags = 'eigen'
[../]
[./diff_T]
type = CoefDiffusion
variable = T
coef = 1e30
[../]
[./src_T]
type = CoupledForce
variable = T
v = power
coef = 1e30
[../]
[]
[AuxKernels]
[./power_ak]
type = NormalizationAux
variable = power
source_variable = u
normalization = unorm
# this coefficient will affect the eigenvalue.
normal_factor = 10
execute_on = linear
[../]
[]
[BCs]
[./homogeneous]
type = DirichletBC
variable = u
boundary = '0 1 2 3'
value = 0
[../]
[./eigenU]
type = EigenDirichletBC
variable = u
boundary = '0 1 2 3'
[../]
[./homogeneousT]
type = DirichletBC
variable = T
boundary = '0 1 2 3'
value = 0
[../]
[]
[Materials]
[./dc]
type = VarCouplingMaterial
var = T
block = 0
base = 1.0
coef = 1.0
[../]
[]
[Executioner]
type = Eigenvalue
solve_type = PJFNK
automatic_scaling = true
petsc_options = '-pc_svd_monitor'
petsc_options_iname = '-pc_type'
petsc_options_value = 'svd'
verbose = true
[]
[Postprocessors]
[./unorm]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = linear
[../]
[]
[VectorPostprocessors]
[./eigenvalues]
type = Eigenvalues
execute_on = 'timestep_end'
[../]
[]
[Outputs]
exodus = true
csv = true
execute_on = 'timestep_end'
[]
(test/tests/problems/eigen_problem/eigensolvers/ne_coupled_scaled.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 10
elem_type = QUAD4
nx = 8
ny = 8
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[./T]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./power]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = DiffMKernel
variable = u
mat_prop = diffusion
offset = 0.0
[../]
[./rhs]
type = CoefReaction
variable = u
coefficient = -1.0
extra_vector_tags = 'eigen'
[../]
[./diff_T]
type = Diffusion
variable = T
[../]
[./src_T]
type = CoupledForce
variable = T
v = power
[../]
[]
[AuxKernels]
[./power_ak]
type = NormalizationAux
variable = power
source_variable = u
normalization = unorm
# this coefficient will affect the eigenvalue.
normal_factor = 10
execute_on = linear
[../]
[]
[BCs]
[./homogeneous]
type = DirichletBC
variable = u
boundary = '0 1 2 3'
value = 0
[../]
[./eigenU]
type = EigenDirichletBC
variable = u
boundary = '0 1 2 3'
[../]
[./homogeneousT]
type = DirichletBC
variable = T
boundary = '0 1 2 3'
value = 0
[../]
[]
[Materials]
[./dc]
type = VarCouplingMaterial
var = T
block = 0
base = 1.0
coef = 1.0
[../]
[]
[Executioner]
type = Eigenvalue
solve_type = PJFNK
# Postprocessor value to normalize
normalization = unorm
# Value to set normilization to
normal_factor = 17
[]
[Postprocessors]
[./unorm]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = linear
[../]
[]
[Outputs]
exodus = true
execute_on = 'timestep_end'
[]
(test/tests/transfers/multiapp_conservative_transfer/parent_conservative_transfer.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
[]
[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'
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
input_files = sub_conservative_transfer.i
execute_on = timestep_end
[]
[]
[Postprocessors]
[from_postprocessor]
type = ElementIntegralVariablePostprocessor
variable = u
[]
[]
[Transfers]
[to_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
source_variable = u
variable = aux_u
to_multi_app = sub
from_postprocessors_to_be_preserved = 'from_postprocessor'
to_postprocessors_to_be_preserved = 'to_postprocessor'
[]
[]
[Outputs]
exodus = true
[console]
type = Console
execute_postprocessors_on = 'INITIAL nonlinear TIMESTEP_END'
[]
[]
(modules/porous_flow/test/tests/fluids/h2o.i)
# Test the density and viscosity calculated by the water Material
# Region 1 density
# Pressure 80 MPa
# Temperature 300K (26.85C)
# Water density should equal 1.0 / 0.971180894e-3 = 1029.7 kg/m^3 (IAPWS IF97)
# Water viscosity should equal 0.00085327 Pa.s (NIST webbook)
# Results are within expected accuracy
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[Variables]
[pp]
initial_condition = 80e6
[]
[]
[Kernels]
[dummy]
type = Diffusion
variable = pp
[]
[]
[AuxVariables]
[temp]
initial_condition = 300.0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temp
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[water]
type = PorousFlowSingleComponentFluid
temperature_unit = Kelvin
fp = water
phase = 0
[]
[]
[FluidProperties]
[water]
type = Water97FluidProperties
[]
[]
[Executioner]
type = Steady
solve_type = Newton
[]
[Postprocessors]
[pressure]
type = ElementIntegralVariablePostprocessor
variable = pp
[]
[temperature]
type = ElementIntegralVariablePostprocessor
variable = temp
[]
[density]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_density_qp0'
[]
[viscosity]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_viscosity_qp0'
[]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = h2o
csv = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_sphere.i)
sphere_outer_htc = 10 # W/m^2/K
sphere_outer_Tinf = 300 # K
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Problem]
coord_type = RZ
[]
[Mesh]
[file]
type = FileMeshGenerator
file = cyl2D.e
[]
allow_renumbering = false
[]
[Functions]
[temp]
type = PiecewiseLinear
x = '0 1'
y = '100 200'
[]
[]
[Variables]
[temp]
initial_condition = 500
[]
[]
[AuxVariables]
[gap_conductance]
order = CONSTANT
family = MONOMIAL
[]
[power_density]
block = 'fuel'
initial_condition = 50e3
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temp
[]
[heat_source]
type = CoupledForce
variable = temp
block = 'fuel'
v = power_density
[]
[]
[AuxKernels]
[gap_cond]
type = MaterialRealAux
property = gap_conductance
variable = gap_conductance
boundary = 2
[]
[]
[Materials]
[heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 34.6
[]
[]
[ThermalContact]
[thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 3
secondary = 2
emissivity_primary = 0.0
emissivity_secondary = 0.0
gap_conductivity = 5
# quadrature = true
gap_geometry_type = SPHERE
sphere_origin = '0 0 0'
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = temp
boundary = '4' # outer RPV
coefficient = ${sphere_outer_htc}
T_infinity = ${sphere_outer_Tinf}
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '2 3'
variable = temp
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 1
dtmin = 0.01
end_time = 1
nl_rel_tol = 1e-12
nl_abs_tol = 1e-7
[Quadrature]
order = fifth
side_order = seventh
[]
[]
[Outputs]
exodus = true
csv = true
[Console]
type = Console
[]
[]
[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
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = 'fuel'
[]
[sphere_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = temp
boundary = '4' # outer RVP
T_fluid = ${sphere_outer_Tinf}
htc = ${sphere_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(sphere_convective_out - ptot) / ptot'
pp_names = 'sphere_convective_out ptot'
[]
[]
(modules/thermal_hydraulics/test/tests/components/junction_parallel_channels_1phase/conservation.i)
# Junction between 2 pipes where the second has half the area of the first.
# The momentum density of the second should be twice that of the first.
[GlobalParams]
gravity_vector = '0 0 0'
initial_T = 300
initial_p = 1e5
initial_vel = 20
initial_vel_x = 20
initial_vel_y = 0
initial_vel_z = 0
f = 0
fp = eos
scaling_factor_1phase = '1 1e-2 1e-5'
closures = simple_closures
[]
[FluidProperties]
[eos]
type = StiffenedGasFluidProperties
gamma = 1.4
cv = 725
p_inf = 0
q = 0
q_prime = 0
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Functions]
[K_loss_fn]
type = PiecewiseLinear
x = '0 0.2'
y = '0 1'
[]
[]
[Components]
[pipe1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 1
A = 1
n_elems = 20
[]
[junction1]
type = JunctionParallelChannels1Phase
connections = 'pipe1:out pipe2:in'
position = '1 0 0'
volume = 1e-2
K = 0
[]
[pipe2]
type = FlowChannel1Phase
position = '1 0 0'
orientation = '1 0 0'
length = 1
A = 0.5
n_elems = 20
[]
[junction2]
type = JunctionParallelChannels1Phase
connections = 'pipe2:out pipe1:in'
position = '1 0 0'
volume = 1e-2
[]
[]
[ControlLogic]
active = ''
[K_crtl]
type = TimeFunctionComponentControl
component = junction1
parameter = K
function = K_loss_fn
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 0.05
num_steps = 5
abort_on_solve_fail = true
solve_type = 'NEWTON'
line_search = basic
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu'
nl_rel_tol = 0
nl_abs_tol = 1e-8
nl_max_its = 20
l_tol = 1e-3
l_max_its = 20
[]
[Postprocessors]
# mass conservation
[mass_pipes]
type = ElementIntegralVariablePostprocessor
variable = rhoA
block = 'pipe1 pipe2'
execute_on = 'initial timestep_end'
[]
[mass_junction1]
type = ScalarVariable
variable = junction1:rhoV
execute_on = 'initial timestep_end'
[]
[mass_junction2]
type = ScalarVariable
variable = junction2:rhoV
execute_on = 'initial timestep_end'
[]
[mass_tot]
type = SumPostprocessor
values = 'mass_pipes mass_junction1 mass_junction2'
execute_on = 'initial timestep_end'
[]
[mass_tot_change]
type = ChangeOverTimePostprocessor
change_with_respect_to_initial = true
postprocessor = mass_tot
compute_relative_change = true
execute_on = 'initial timestep_end'
[]
# energy conservation
[E_pipes]
type = ElementIntegralVariablePostprocessor
variable = rhoEA
block = 'pipe1 pipe2'
execute_on = 'initial timestep_end'
[]
[E_junction1]
type = ScalarVariable
variable = junction1:rhoEV
execute_on = 'initial timestep_end'
[]
[E_junction2]
type = ScalarVariable
variable = junction2:rhoEV
execute_on = 'initial timestep_end'
[]
[E_tot]
type = SumPostprocessor
values = 'E_pipes E_junction1 E_junction2'
execute_on = 'initial timestep_end'
[]
[E_tot_change]
type = ChangeOverTimePostprocessor
change_with_respect_to_initial = true
postprocessor = E_tot
compute_relative_change = true
execute_on = 'initial timestep_end'
[]
[p_pipe1_out]
type = SideAverageValue
boundary = pipe1:out
variable = p
[]
[p_pipe2_in]
type = SideAverageValue
boundary = pipe2:in
variable = p
[]
[dp_junction]
type = DifferencePostprocessor
value1 = p_pipe1_out
value2 = p_pipe2_in
[]
[]
[Outputs]
[out]
type = CSV
show = 'mass_tot_change E_tot_change'
[]
[]
(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
[]
[]
(test/tests/auxkernels/array_var_component/array_var_component.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
components = 2
[]
[]
[Kernels]
[diff]
type = ArrayDiffusion
variable = u
diffusion_coefficient = dc
[]
[]
[BCs]
[left]
type = ArrayDirichletBC
variable = u
boundary = 1
values = '0 0'
[]
[right]
type = ArrayDirichletBC
variable = u
boundary = 2
values = '1 2'
[]
[]
[Materials]
[dc]
type = GenericConstantArray
prop_name = dc
prop_value = '1 1'
[]
[]
[AuxVariables]
[u0][]
[]
[AuxKernels]
[u0]
type = ArrayVariableComponent
variable = u0
array_variable = u
component = 0
[]
[]
[Postprocessors]
[intu0]
type = ElementIntegralVariablePostprocessor
variable = u0
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
exodus = true
[]
(test/tests/problems/eigen_problem/eigensolvers/ne_coupled_picard_subT_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 10
elem_type = QUAD4
nx = 10
ny = 10
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./T]
order = FIRST
family = LAGRANGE
[../]
[./power]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = DiffMKernel
variable = u
mat_prop = diffusion
offset = 0.0
[../]
[./rhs]
type = CoefReaction
variable = u
coefficient = -1.0
extra_vector_tags = 'eigen'
[../]
[]
[AuxKernels]
[./power_ak]
type = NormalizationAux
variable = power
source_variable = u
normalization = unorm
normal_factor = 10
execute_on = timestep_end
[../]
[]
[BCs]
[./homogeneous]
type = DirichletBC
variable = u
boundary = '0 1 2 3'
value = 0
[../]
[./eigenU]
type = EigenDirichletBC
variable = u
boundary = '0 1 2 3'
[../]
[]
[Materials]
[./dc]
type = VarCouplingMaterial
var = T
block = 0
base = 1.0
coef = 1.0
[../]
[]
[Executioner]
type = Eigenvalue
solve_type = PJFNK
nl_abs_tol = 1e-8
nl_rel_tol = 1e-6
[]
[Postprocessors]
[./power]
type = ElementIntegralVariablePostprocessor
variable = power
execute_on = timestep_end
[../]
[./unorm]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = linear
[../]
[]
[VectorPostprocessors]
[./eigenvalues]
type = Eigenvalues
execute_on = 'timestep_end'
[../]
[]
[Outputs]
csv = true
exodus = true
execute_on = 'timestep_end'
[]
(modules/porous_flow/test/tests/fluids/methane.i)
# Test MethaneFluidProperties
# Reference data from Irvine Jr, T. F. and Liley, P. E. (1984) Steam and
# Gas Tables with Computer Equations
#
# For temperature = 350K, the fluid properties should be:
# density = 55.13 kg/m^3
# viscosity = 0.01276 mPa.s
# h = 708.5 kJ/kg
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[Variables]
[pp]
initial_condition = 10e6
[]
[]
[Kernels]
[dummy]
type = Diffusion
variable = pp
[]
[]
[AuxVariables]
[temp]
initial_condition = 350.0
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = 'temp'
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[methane]
type = PorousFlowSingleComponentFluid
temperature_unit = Kelvin
fp = methane
phase = 0
[]
[]
[FluidProperties]
[methane]
type = MethaneFluidProperties
[]
[]
[Executioner]
type = Steady
solve_type = Newton
[]
[Postprocessors]
[pressure]
type = ElementIntegralVariablePostprocessor
variable = pp
[]
[temperature]
type = ElementIntegralVariablePostprocessor
variable = temp
[]
[density]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_density_qp0'
[]
[viscosity]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_viscosity_qp0'
[]
[enthalpy]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_enthalpy_qp0'
[]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = methane
csv = true
[]
(test/tests/transfers/multiapp_conservative_transfer/secondary_negative_adjuster.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[AuxVariables]
[var]
family = MONOMIAL
order = CONSTANT
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Postprocessors]
[to_postprocessor]
type = ElementIntegralVariablePostprocessor
variable = var
execute_on = 'transfer'
[]
[]
[Problem]
type = FEProblem
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_abs_tol = 1e-12
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = 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
[]
(modules/phase_field/test/tests/grain_growth/test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
xmin = 0
xmax = 400
ymin = 0
ymax = 400
zmin = 0
zmax = 0
elem_type = QUAD4
uniform_refine = 1
[]
[GlobalParams]
op_num = 2
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[ICs]
[./PolycrystalICs]
[./BicrystalCircleGrainIC]
radius = 300
x = 400
y = 0
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
T = 500 # K
wGB = 60 # nm
GBmob0 = 2.5e-6 #m^4/(Js) from Schoenfelder 1997
Q = 0.23 #Migration energy in eV
GBenergy = 0.708 #GB energy in J/m^2
[../]
[]
[Postprocessors]
[./gr1area]
type = ElementIntegralVariablePostprocessor
variable = gr1
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[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_tol = 1.0e-4
l_max_its = 30
nl_max_its = 20
nl_rel_tol = 1.0e-9
start_time = 0.0
num_steps = 5
dt = 80.0
[./Adaptivity]
initial_adaptivity = 2
refine_fraction = 0.8
coarsen_fraction = 0.05
max_h_level = 2
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/optimization/test/tests/optimizationreporter/material/adjoint_explicit.i)
[Mesh]
[]
[Variables]
[adjoint_var]
[]
[]
[Kernels]
[heat_conduction]
type = MatDiffusion
variable = adjoint_var
diffusivity = thermal_conductivity
[]
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = adjoint_var
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
[]
[]
[AuxVariables]
[temperature_forward]
[]
[grad_Tx]
order = CONSTANT
family = MONOMIAL
[]
[grad_Ty]
order = CONSTANT
family = MONOMIAL
[]
[grad_Tz]
order = CONSTANT
family = MONOMIAL
[]
[grad_Tfx]
order = CONSTANT
family = MONOMIAL
[]
[grad_Tfy]
order = CONSTANT
family = MONOMIAL
[]
[grad_Tfz]
order = CONSTANT
family = MONOMIAL
[]
[negative_gradient]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[grad_Tx]
type = VariableGradientComponent
component = x
variable = grad_Tx
gradient_variable = adjoint_var
[]
[grad_Ty]
type = VariableGradientComponent
component = y
variable = grad_Ty
gradient_variable = adjoint_var
[]
[grad_Tz]
type = VariableGradientComponent
component = z
variable = grad_Tz
gradient_variable = adjoint_var
[]
[grad_Tfx]
type = VariableGradientComponent
component = x
variable = grad_Tfx
gradient_variable = temperature_forward
[]
[grad_Tfy]
type = VariableGradientComponent
component = y
variable = grad_Tfy
gradient_variable = temperature_forward
[]
[grad_Tfz]
type = VariableGradientComponent
component = z
variable = grad_Tfz
gradient_variable = temperature_forward
[]
[negative_gradient]
type = ParsedAux
variable = negative_gradient
args = 'grad_Tx grad_Ty grad_Tz grad_Tfx grad_Tfy grad_Tfz'
function = '-(grad_Tx*grad_Tfx+grad_Ty*grad_Tfy+grad_Tz*grad_Tfz)'
[]
[]
[BCs]
[left]
type = NeumannBC
variable = adjoint_var
boundary = left
value = 0
[]
[right]
type = NeumannBC
variable = adjoint_var
boundary = right
value = 0
[]
[bottom]
type = DirichletBC
variable = adjoint_var
boundary = bottom
value = 0
[]
[top]
type = DirichletBC
variable = adjoint_var
boundary = top
value = 0
[]
[]
[Functions]
[thermo_conduct]
type = ParsedFunction
value = alpha
vars = 'alpha'
vals = 'p1'
[]
[]
[Materials]
[thermalProp]
type = GenericFunctionMaterial
prop_names = 'thermal_conductivity'
prop_values = 'thermo_conduct'
[]
[thermalPropDeriv]
type = GenericFunctionMaterial
prop_names = 'thermal_conductivity_deriv'
prop_values = '1'
[]
[]
[Executioner]
type = Steady
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'
[]
[Postprocessors]
[pp_adjoint_grad_parsedFunc]
type = ElementIntegralVariablePostprocessor
variable = negative_gradient
execute_on = 'initial linear'
[]
[p1]
type = ConstantValuePostprocessor
value = 10
execute_on = 'initial linear'
[]
[]
[Controls]
[parameterReceiver]
type = ControlsReceiver
[]
[]
[VectorPostprocessors]
[adjoint_grad]
type = VectorOfPostprocessors
postprocessors = 'pp_adjoint_grad_parsedFunc'
[]
[]
[Outputs]
console = false
file_base = 'adjoint'
[]
(modules/porous_flow/test/tests/fluids/ideal_gas.i)
# Example of using the IdealGasFluidProperties userobject to provide fluid
# properties for an ideal gas. Use values for hydrogen (H2) at 1 MPa and 50 C.
#
# Input values:
# M = 2.01588e-3 kg/mol
# gamma = 1.4
# viscosity = 9.4393e-6 Pa.s
#
# Expected output:
# density = 750.2854 kg/m^3
# internal energy = 3.33 MJ/kg
# enthalpy = 4.66 MJ/kg
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[Variables]
[pp]
initial_condition = 1e6
[]
[]
[Kernels]
[dummy]
type = Diffusion
variable = pp
[]
[]
[AuxVariables]
[temp]
initial_condition = 50.0
[]
[]
[FluidProperties]
[idealgas]
type = IdealGasFluidProperties
molar_mass = 2.01588e-3
gamma = 1.4
mu = 9.4393e-6
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temp
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[idealgass]
type = PorousFlowSingleComponentFluid
temperature_unit = Celsius
fp = idealgas
phase = 0
[]
[]
[Executioner]
type = Steady
solve_type = Newton
[]
[Postprocessors]
[pressure]
type = ElementIntegralVariablePostprocessor
variable = pp
[]
[temperature]
type = ElementIntegralVariablePostprocessor
variable = temp
[]
[density]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_density_qp0'
[]
[viscosity]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_viscosity_qp0'
[]
[internal_energy]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_internal_energy_qp0'
[]
[enthalpy]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_enthalpy_qp0'
[]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = ideal_gas
csv = true
[]
(modules/phase_field/test/tests/GBAnisotropy/test2.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 60
ny = 30
nz = 0
xmin = 0
xmax = 1000
ymin = 0
ymax = 600
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[Variables] # produce smooth initial GB
[./gr0]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SpecifiedSmoothCircleIC
x_positions = '250.0 750.0'
y_positions = '300.0 300.0'
z_positions = ' 0.0 0.0'
radii = '200.0 200.0'
invalue = 0.0
outvalue = 1.0
int_width = 50.0
[../]
[../]
[./gr1]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 250.0
y1 = 300.0
radius = 200.0
invalue = 1.0
outvalue = 0.0
int_width = 50.0
[../]
[../]
[./gr2]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = SmoothCircleIC
x1 = 750.0
y1 = 300.0
radius = 200.0
invalue = 1.0
outvalue = 0.0
int_width = 50.0
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[./unique_grains]
order = FIRST
family = LAGRANGE
[../]
[./var_indices]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./PolycrystalKernel]
var_name_base = gr
op_num = 3
[../]
[]
[AuxKernels]
[./bnds_aux]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
var_name_base = gr
op_num = 3
[../]
[]
[BCs]
[./Periodic]
[./top_bottom]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./CuGrGranisotropic]
type = GBAnisotropy
T = 600 # K
op_num = 3
var_name_base = gr
wGB = 100
length_scale = 1.0e-9
time_scale = 1.0e-9
# molar_volume_value = 7.11e-6 #Units:m^3/mol
Anisotropic_GB_file_name = anisotropy_mobility.txt
inclination_anisotropy = false
[../]
[]
[Postprocessors]
[./dt]
# Outputs the current time step
type = TimestepSize
[../]
[./gr1_area]
type = ElementIntegralVariablePostprocessor
variable = gr1
[../]
[./gr2_area]
type = ElementIntegralVariablePostprocessor
variable = gr2
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_max_its = 30
l_tol = 1e-4
nl_max_its = 40
nl_rel_tol = 1e-9
dt = 5.0
num_steps = 2
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/postprocessors/element_integral_var_pps/pps_old_value_fv.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 4
ny = 4
elem_type = QUAD4
[]
[Variables]
[./u]
order = CONSTANT
family = MONOMIAL
fv = true
initial_condition = 1
[../]
[]
[Functions]
[./force_fn]
type = ParsedFunction
expression = '1'
[../]
[./exact_fn]
type = ParsedFunction
expression = 't'
[../]
[]
[FVKernels]
[./diff_u]
type = FVDiffusion
variable = u
coeff = '1'
block = '0'
[../]
[./ffn_u]
type = FVBodyForce
variable = u
function = force_fn
[../]
[]
[FVBCs]
[./all_u]
type = FVFunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[]
[Postprocessors]
[./a]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = 'initial timestep_end'
[../]
[./total_a]
type = TimeIntegratedPostprocessor
value = a
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/phase_field/test/tests/grain_growth/evolution.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
xmax = 1000
ymax = 1000
zmax = 0
elem_type = QUAD4
uniform_refine = 2
[]
[GlobalParams]
op_num = 4
var_name_base = 'gr'
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[UserObjects]
[./voronoi]
type = PolycrystalVoronoi
rand_seed = 102
grain_num = 4
coloring_algorithm = bt
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = 'timestep_end'
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./Moly_GB]
type = GBEvolution
time_scale = 1.0
GBmob0 = 3.986e-6
T = 500 # K
wGB = 60 # nm
Q = 1.0307
GBenergy = 2.4
[../]
[]
[Postprocessors]
[./gr1area]
type = ElementIntegralVariablePostprocessor
variable = gr1
execute_on = 'initial timestep_end'
[../]
[./avg_grain_vol]
type = AverageGrainVolume
grain_num = 4
execute_on = 'initial timestep_end'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[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_tol = 1.0e-4
l_max_its = 30
nl_max_its = 20
nl_rel_tol = 1.0e-9
start_time = 0.0
num_steps = 2
dt = 4
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/grain_texture/EulerAngle2RGBAction.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 12
xmax = 1000
ymax = 300
elem_type = QUAD4
[]
[GlobalParams]
op_num = 2
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[ICs]
[./PolycrystalICs]
[./BicrystalBoundingBoxIC]
x1 = 0
y1 = 0
x2 = 500
y2 = 1000
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./var_indices]
order = CONSTANT
family = MONOMIAL
[../]
[./active_bounds_elemental]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./bnds_aux]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[../]
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
flood_counter = grain_tracker
execute_on = 'initial timestep_begin'
field_display = UNIQUE_REGION
[../]
[./var_indices]
type = FeatureFloodCountAux
variable = var_indices
flood_counter = grain_tracker
execute_on = 'initial timestep_begin'
field_display = VARIABLE_COLORING
[../]
[./active_bounds_elemental]
type = FeatureFloodCountAux
variable = active_bounds_elemental
field_display = ACTIVE_BOUNDS
execute_on = 'initial timestep_begin'
flood_counter = grain_tracker
[../]
[]
[Modules]
[./PhaseField]
[./EulerAngles2RGB]
crystal_structure = cubic
euler_angle_provider = euler_angle_file
grain_tracker = grain_tracker
[../]
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
block = 0
T = 500 # K
wGB = 75 # nm
GBmob0 = 2.5e-6 #m^4/(Js) from Schoenfelder 1997
Q = 0.23 #Migration energy in eV
GBenergy = 0.708 #GB energy in J/m^2
time_scale = 1.0e-6
[../]
[]
[UserObjects]
[./grain_tracker]
type = FauxGrainTracker
connecting_threshold = 0.05
compute_var_to_feature_map = true
flood_entity_type = elemental
execute_on = 'initial timestep_begin'
outputs = none
[../]
[./euler_angle_file]
type = EulerAngleFileReader
file_name = test.tex
[../]
[]
[Postprocessors]
[./gr0_area]
type = ElementIntegralVariablePostprocessor
variable = gr0
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
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 = 30
l_tol = 1e-4
nl_max_its = 30
nl_rel_tol = 1e-9
start_time = 0.0
num_steps = 3
dt = 0.2
[]
[Outputs]
execute_on = 'initial timestep_end'
exodus = true
perf_graph = true
[]
(test/tests/problems/eigen_problem/eigensolvers/ne_coupled.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 10
elem_type = QUAD4
nx = 8
ny = 8
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[./T]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./power]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff]
type = DiffMKernel
variable = u
mat_prop = diffusion
offset = 0.0
[../]
[./rhs]
type = CoefReaction
variable = u
coefficient = -1.0
extra_vector_tags = 'eigen'
[../]
[./diff_T]
type = Diffusion
variable = T
[../]
[./src_T]
type = CoupledForce
variable = T
v = power
[../]
[]
[AuxKernels]
[./power_ak]
type = NormalizationAux
variable = power
source_variable = u
normalization = unorm
# this coefficient will affect the eigenvalue.
normal_factor = 10
execute_on = linear
[../]
[]
[BCs]
[./homogeneous]
type = DirichletBC
variable = u
boundary = '0 1 2 3'
value = 0
[../]
[./eigenU]
type = EigenDirichletBC
variable = u
boundary = '0 1 2 3'
[../]
[./homogeneousT]
type = DirichletBC
variable = T
boundary = '0 1 2 3'
value = 0
[../]
[]
[Materials]
[./dc]
type = VarCouplingMaterial
var = T
block = 0
base = 1.0
coef = 1.0
[../]
[]
[Executioner]
type = Eigenvalue
solve_type = PJFNK
[]
[Postprocessors]
[./unorm]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = linear
[../]
[]
[VectorPostprocessors]
[./eigenvalues]
type = Eigenvalues
execute_on = 'timestep_end'
[../]
[]
[Outputs]
csv = true
file_base = ne_coupled
execute_on = 'timestep_end'
[]
(modules/phase_field/test/tests/grain_growth/thumb.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
xmin = 0
xmax = 1000
ymin = 0
ymax = 1000
zmin = 0
zmax = 0
elem_type = QUAD4
uniform_refine = 2
[]
[GlobalParams]
op_num = 2
var_name_base = gr
v = 'gr0 gr1'
[]
[Variables]
[./gr0]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ThumbIC
xcoord = 500.0
height = 600.0
width = 400.0
invalue = 0.0
outvalue = 1.0
[../]
[../]
[./gr1]
order = FIRST
family = LAGRANGE
[./InitialCondition]
type = ThumbIC
xcoord = 500.0
height = 600.0
width = 400.0
invalue = 1.0
outvalue = 0.0
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
[../]
[]
[BCs]
active = ' '
[./Periodic]
[./left_right]
primary = 0
secondary = 2
translation = '0 1000 0'
[../]
[./top_bottom]
primary = 1
secondary = 3
translation = '-1000 0 0'
[../]
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
T = 500 # K
wGB = 60 # nm
GBmob0 = 2.5e-6 #m^4/(Js) from Schoenfelder 1997
Q = 0.23 #Migration energy in eV
GBenergy = 0.708 #GB energy in J/m^2
[../]
[]
[Postprocessors]
[./gr_area]
type = ElementIntegralVariablePostprocessor
variable = gr1
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[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_tol = 1.0e-4
l_max_its = 30
nl_max_its = 20
nl_rel_tol = 1.0e-9
start_time = 0.0
num_steps = 10
dt = 80.0
[./Adaptivity]
initial_adaptivity = 2
refine_fraction = 0.8
coarsen_fraction = 0.05
max_h_level = 2
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(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/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
[]
[]
[]
(test/tests/interfacekernels/2d_interface/coupled_value_coupled_flux_dot.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 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]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./v]
order = FIRST
family = LAGRANGE
block = 1
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 2
block = 0
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 4
block = 1
[../]
[./source_u]
type = BodyForce
variable = u
function = 0.1*t
[../]
[]
[InterfaceKernels]
[./interface]
type = PenaltyInterfaceDiffusionDot
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
[../]
[]
[BCs]
[./u]
type = VacuumBC
variable = u
boundary = 'left_to_0 bottom_to_0 right top'
[../]
[./v]
type = VacuumBC
variable = v
boundary = 'left_to_1 bottom_to_1'
[../]
[]
[Postprocessors]
[./u_int]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[../]
[./v_int]
type = ElementIntegralVariablePostprocessor
variable = v
block = 1
[../]
[]
[Preconditioning]
[./SMP]
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 '
dt = 0.1
num_steps = 10
dtmin = 0.1
line_search = none
[]
[Outputs]
exodus = true
print_linear_residuals = 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/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/thermal_hydraulics/test/tests/components/volume_junction_1phase/t_junction_1phase.i)
# Junction between 3 pipes, 1 of which goes to a dead-end. All ends are walls,
# and 1 of the pipes is pressurized higher than the others.
A_big = 1
A_small = 0.5
[GlobalParams]
gravity_vector = '0 0 0'
scaling_factor_1phase = '1 1 1e-5'
scaling_factor_rhoV = 1
scaling_factor_rhouV = 1
scaling_factor_rhovV = 1
scaling_factor_rhowV = 1
scaling_factor_rhoEV = 1e-5
initial_T = 300
initial_vel = 0
n_elems = 20
length = 1
f = 0
fp = fp
rdg_slope_reconstruction = minmod
closures = simple_closures
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 1.4
cv = 725
q = 0
q_prime = 0
p_inf = 0
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[pipe1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
A = ${A_big}
# This pipe is pressurized higher than the others.
initial_p = 1.05e5
[]
[pipe2]
type = FlowChannel1Phase
position = '1 0 0'
orientation = '1 0 0'
A = ${A_big}
initial_p = 1e5
[]
[pipe3]
type = FlowChannel1Phase
position = '1 0 0'
orientation = '0 1 0'
# This pipe is smaller than the others.
A = ${A_small}
initial_p = 1e5
[]
[junction]
type = VolumeJunction1Phase
connections = 'pipe1:out pipe2:in pipe3:in'
position = '1 0 0'
volume = 0.37
initial_p = 1e5
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 0
[]
[pipe1_wall]
type = SolidWall1Phase
input = 'pipe1:in'
[]
[pipe2_wall]
type = SolidWall1Phase
input = 'pipe2:out'
[]
[pipe3_wall]
type = SolidWall1Phase
input = 'pipe3:out'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
end_time = 5
dt = 0.05
num_steps = 5
abort_on_solve_fail = true
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 10
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Postprocessors]
# mass conservation
[mass_pipes]
type = ElementIntegralVariablePostprocessor
variable = rhoA
block = 'pipe1 pipe2 pipe3'
execute_on = 'initial timestep_end'
[]
[mass_junction]
type = ScalarVariable
variable = junction:rhoV
execute_on = 'initial timestep_end'
[]
[mass_tot]
type = SumPostprocessor
values = 'mass_pipes mass_junction'
execute_on = 'initial timestep_end'
[]
[mass_tot_change]
type = ChangeOverTimePostprocessor
change_with_respect_to_initial = true
postprocessor = mass_tot
compute_relative_change = true
execute_on = 'initial timestep_end'
[]
# energy conservation
[E_pipes]
type = ElementIntegralVariablePostprocessor
variable = rhoEA
block = 'pipe1 pipe2 pipe3'
execute_on = 'initial timestep_end'
[]
[E_junction]
type = ScalarVariable
variable = junction:rhoEV
execute_on = 'initial timestep_end'
[]
[E_tot]
type = SumPostprocessor
values = 'E_pipes E_junction'
execute_on = 'initial timestep_end'
[]
[E_tot_change]
type = ChangeOverTimePostprocessor
change_with_respect_to_initial = true
postprocessor = E_tot
compute_relative_change = true
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
[out]
type = CSV
show = 'mass_tot_change E_tot_change'
[]
[]
(test/tests/transfers/multiapp_conservative_transfer/sub_conservative_transfer.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmin = 0.05
xmax = 1.2
ymin = 0.05
ymax = 1.1
[]
[Variables]
[./u]
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./coupledforce]
type = CoupledForce
variable = u
v = aux_u
[../]
[]
[AuxVariables]
[./aux_u]
family = LAGRANGE
order = FIRST
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Postprocessors]
[./to_postprocessor]
type = ElementIntegralVariablePostprocessor
variable = aux_u
execute_on = 'transfer'
[../]
[]
[Problem]
type = FEProblem
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_abs_tol = 1e-12
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_cylinder_mortar_error.i)
rpv_core_gap_size = 0.15
core_outer_radius = 2
rpv_inner_radius = ${fparse 2 + rpv_core_gap_size}
rpv_outer_radius = ${fparse 2.5 + rpv_core_gap_size}
rpv_outer_htc = 10 # W/m^2/K
rpv_outer_Tinf = 300 # K
core_blocks = '1'
rpv_blocks = '3'
[Mesh]
[core_gap_rpv]
type = ConcentricCircleMeshGenerator
num_sectors = 10
radii = '${core_outer_radius} ${rpv_inner_radius} ${rpv_outer_radius}'
rings = '2 1 2'
has_outer_square = false
preserve_volumes = true
portion = full
[]
[rename_core_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = core_gap_rpv
primary_block = 1
paired_block = 2
new_boundary = 'core_outer'
[]
[rename_inner_rpv_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = rename_core_bdy
primary_block = 3
paired_block = 2
new_boundary = 'rpv_inner'
[]
[2d_mesh]
type = BlockDeletionGenerator
input = rename_inner_rpv_bdy
block = 2
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = 'rpv_inner'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = 2d_mesh
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = 'core_outer'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Variables]
[Tsolid]
initial_condition = 500
[]
[lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[Kernels]
[heat_source]
type = CoupledForce
variable = Tsolid
block = '${core_blocks}'
v = power_density
[]
[heat_conduction]
type = HeatConduction
variable = Tsolid
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = Tsolid
boundary = 'outer' # outer RPV
coefficient = ${rpv_outer_htc}
T_infinity = ${rpv_outer_Tinf}
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = Tsolid
boundary = 'rpv_inner'
primary_emissivity = 0.8
secondary_emissivity = 0.8
[]
[conduction]
type = GapFluxModelConduction
temperature = Tsolid
boundary = 'rpv_inner'
gap_conductivity = 0.1
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = Tsolid
primary_boundary = 'core_outer'
primary_subdomain = 10000
secondary_boundary = 'rpv_inner'
secondary_subdomain = 10001
gap_flux_models = 'radiation conduction'
gap_geometry_type = 'CYLINDER'
cylinder_axis_point_2 = '0 0 5'
[]
[]
[AuxVariables]
[power_density]
block = '${core_blocks}'
initial_condition = 50e3
[]
[]
[Materials]
[simple_mat]
type = HeatConductionMaterial
thermal_conductivity = 34.6 # W/m/K
[]
[]
[Postprocessors]
[Tcore_avg]
type = ElementAverageValue
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${core_blocks}'
[]
[Trpv_avg]
type = ElementAverageValue
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${rpv_blocks}'
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = '${core_blocks}'
[]
[rpv_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = Tsolid
boundary = 'outer' # outer RVP
T_fluid = ${rpv_outer_Tinf}
htc = ${rpv_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(rpv_convective_out - ptot) / ptot'
pp_names = 'rpv_convective_out ptot'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = 'rpv_inner core_outer'
variable = 'Tsolid'
[]
[]
[Executioner]
type = Steady
petsc_options = '-snes_converged_reason -pc_svd_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -mat_mffd_err -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = ' lu superlu_dist 1e-5 NONZERO '
'1e-15'
snesmf_reuse_base = false
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
l_max_its = 100
line_search = none
[]
[Outputs]
exodus = false
csv = 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/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/preconditioners/fsp/array-test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
components = 2
[]
[v]
[]
[]
[Kernels]
[diff]
type = ArrayDiffusion
variable = u
diffusion_coefficient = dc
[]
[reaction]
type = ArrayReaction
variable = u
reaction_coefficient = rc
[]
[diffv]
type = Diffusion
variable = v
[]
[vu]
type = ArrayCoupledForce
variable = u
v = v
coef = '0 0.5'
[]
[]
[BCs]
[left]
type = ArrayDirichletBC
variable = u
boundary = 1
values = '0 0'
[]
[right]
type = ArrayDirichletBC
variable = u
boundary = 2
values = '1 2'
[]
[leftv]
type = DirichletBC
variable = v
boundary = 1
value = 0
[]
[rightv]
type = DirichletBC
variable = v
boundary = 2
value = 2
[]
[]
[Materials]
[dc]
type = GenericConstantArray
prop_name = dc
prop_value = '1 1'
[]
[rc]
type = GenericConstant2DArray
prop_name = rc
prop_value = '1 0; -0.1 1'
[]
[]
[Preconditioning]
[FSP]
type = FSP
topsplit = 'uv'
[uv]
splitting = 'u v'
# Generally speaking, there are four types of splitting we could choose
# <additive,multiplicative,symmetric_multiplicative,schur>
splitting_type = symmetric_multiplicative
[]
[u]
vars = 'u'
petsc_options_iname = '-pc_type -ksp_type'
petsc_options_value = ' hypre preonly'
[]
[v]
vars = 'v'
petsc_options_iname = '-pc_type -ksp_type'
petsc_options_value = ' hypre preonly'
[]
[]
[]
[Postprocessors]
[intu0]
type = ElementIntegralArrayVariablePostprocessor
variable = u
component = 0
[]
[intu1]
type = ElementIntegralArrayVariablePostprocessor
variable = u
component = 1
[]
[intv]
type = ElementIntegralVariablePostprocessor
variable = v
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_rz_cylinder.i)
rpv_core_gap_size = 0.2
core_outer_radius = 2
rpv_inner_radius = '${fparse 2 + rpv_core_gap_size}'
rpv_outer_radius = '${fparse 2.5 + rpv_core_gap_size}'
rpv_width = '${fparse rpv_outer_radius - rpv_inner_radius}'
rpv_outer_htc = 10 # W/m^2/K
rpv_outer_Tinf = 300 # K
core_blocks = '1'
rpv_blocks = '3'
[Mesh]
[gmg]
type = CartesianMeshGenerator
dim = 2
dx = '${core_outer_radius} ${rpv_core_gap_size} ${rpv_width}'
ix = '400 1 100'
dy = 1
iy = '5'
[]
[set_block_id1]
type = SubdomainBoundingBoxGenerator
input = gmg
bottom_left = '0 0 0'
top_right = '${core_outer_radius} 1 0'
block_id = 1
location = INSIDE
[]
[rename_core_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = set_block_id1
primary_block = 1
paired_block = 0
new_boundary = 'core_outer'
[]
[set_block_id3]
type = SubdomainBoundingBoxGenerator
input = rename_core_bdy
bottom_left = '${rpv_inner_radius} 0 0'
top_right = '${rpv_outer_radius} 1 0'
block_id = 3
location = INSIDE
[]
[rename_inner_rpv_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = set_block_id3
primary_block = 3
paired_block = 0
new_boundary = 'rpv_inner'
[]
# comment out for test without gap
[2d_mesh]
type = BlockDeletionGenerator
input = rename_inner_rpv_bdy
block = 0
[]
allow_renumbering = false
[]
[Problem]
coord_type = RZ
[]
[Variables]
[Tsolid]
initial_condition = 500
[]
[]
[Kernels]
[heat_source]
type = CoupledForce
variable = Tsolid
block = '${core_blocks}'
v = power_density
[]
[heat_conduction]
type = HeatConduction
variable = Tsolid
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = Tsolid
boundary = 'right' # outer RPV
coefficient = ${rpv_outer_htc}
T_infinity = ${rpv_outer_Tinf}
[]
[]
[ThermalContact]
[RPV_gap]
type = GapHeatTransfer
gap_geometry_type = 'CYLINDER'
emissivity_primary = 0.8
emissivity_secondary = 0.8
variable = Tsolid
primary = 'core_outer'
secondary = 'rpv_inner'
gap_conductivity = 0.1
quadrature = true
[]
[]
[AuxVariables]
[power_density]
block = '${core_blocks}'
initial_condition = 50e3
[]
[]
[Materials]
[simple_mat]
type = HeatConductionMaterial
thermal_conductivity = 34.6 # W/m/K
[]
[]
[Postprocessors]
[Tcore_avg]
type = ElementAverageValue
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${core_blocks}'
[]
[Trpv_avg]
type = ElementAverageValue
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${rpv_blocks}'
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = '${core_blocks}'
[]
[rpv_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = Tsolid
boundary = 'right' # outer RVP
T_fluid = ${rpv_outer_Tinf}
htc = ${rpv_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(rpv_convective_out - ptot) / ptot'
pp_names = 'rpv_convective_out ptot'
[]
[flux_from_core] # converges to ptot as the mesh is refined
type = SideDiffusiveFluxIntegral
variable = Tsolid
boundary = core_outer
diffusivity = thermal_conductivity
[]
[flux_into_rpv] # converges to rpv_convective_out as the mesh is refined
type = SideDiffusiveFluxIntegral
variable = Tsolid
boundary = rpv_inner
diffusivity = thermal_conductivity
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = 'rpv_inner core_outer'
variable = Tsolid
[]
[]
[Executioner]
type = Steady
automatic_scaling = true
compute_scaling_once = false
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
l_max_its = 100
[Quadrature]
# order = fifth
side_order = seventh
[]
line_search = none
[]
[Outputs]
exodus = false
csv = true
[]
(test/tests/restart/restart_transient_from_steady/steady_with_2subs_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
ny = 3
xmax = 0.3
ymax = 0.3
[]
[AuxVariables]
[power_density]
[]
[]
[Variables]
[temp]
[]
[]
[Kernels]
[heat_conduction]
type = Diffusion
variable = temp
[]
[heat_source_fuel]
type = CoupledForce
variable = temp
v = power_density
[]
[]
[BCs]
[bc]
type = DirichletBC
variable = temp
boundary = '1 3'
value = 100
[]
[bc2]
type = NeumannBC
variable = temp
boundary = '0 2'
value = 10.0
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_abs_tol = 1e-7
nl_rel_tol = 1e-7
[]
[Postprocessors]
[temp_fuel_avg]
type = ElementAverageValue
variable = temp
execute_on = 'initial timestep_end'
[]
[pwr_density]
type = ElementIntegralVariablePostprocessor
variable = power_density
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
perf_graph = true
exodus = true
color = 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
[]
(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
[]
(test/tests/postprocessors/element_integral_var_pps/initial_pps.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
ymin = 0
ymax = 1
nx = 3
ny = 3
elem_type = QUAD9
[]
[Variables]
active = 'u v'
[./u]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 2.8
[../]
[../]
[./v]
order = SECOND
family = LAGRANGE
[./InitialCondition]
type = ConstantIC
value = 5.4
[../]
[../]
[]
[Functions]
active = 'force_fn exact_fn left_bc'
[./force_fn]
type = ParsedFunction
expression = '1-x*x+2*t'
[../]
[./exact_fn]
type = ParsedFunction
expression = '(1-x*x)*t'
[../]
[./left_bc]
type = ParsedFunction
expression = t
[../]
[]
[Kernels]
active = '
time_u diff_u ffn_u
time_v diff_v'
[./time_u]
type = TimeDerivative
variable = u
[../]
[./diff_u]
type = Diffusion
variable = u
[../]
[./ffn_u]
type = BodyForce
variable = u
function = force_fn
[../]
[./time_v]
type = TimeDerivative
variable = v
[../]
[./diff_v]
type = Diffusion
variable = v
[../]
[]
[BCs]
active = 'all_u left_v right_v'
[./all_u]
type = FunctionDirichletBC
variable = u
boundary = '0 1 2 3'
function = exact_fn
[../]
[./left_v]
type = FunctionDirichletBC
variable = v
boundary = '3'
function = left_bc
[../]
[./right_v]
type = DirichletBC
variable = v
boundary = '1'
value = 0
[../]
[]
[Postprocessors]
[./initial_u]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = initial
[../]
[./initial_v]
type = ElementIntegralVariablePostprocessor
variable = v
execute_on = initial
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
dt = 0.1
start_time = 0
end_time = 0.3
[]
[Outputs]
file_base = out_initial_pps
exodus = true
[]
(modules/phase_field/test/tests/grain_growth/explicit.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
xmin = 0
xmax = 400
ymin = 0
ymax = 400
zmin = 0
zmax = 0
elem_type = QUAD4
uniform_refine = 1
[]
[GlobalParams]
op_num = 2
var_name_base = gr
implicit = false
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[ICs]
[./PolycrystalICs]
[./BicrystalCircleGrainIC]
radius = 300
x = 400
y = 0
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
T = 500 # K
wGB = 60 # nm
GBmob0 = 2.5e-6 #m^4/(Js) from Schoenfelder 1997
Q = 0.23 #Migration energy in eV
GBenergy = 0.708 #GB energy in J/m^2
[../]
[]
[Postprocessors]
[./gr1area]
type = ElementIntegralVariablePostprocessor
variable = gr1
execute_on = 'initial timestep_end'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = explicit-euler
solve_type = NEWTON
# petsc_options_iname = '-pc_type'
# petsc_options_value = 'bjacobi'
#
l_tol = 1.0e-6
nl_rel_tol = 1.0e-10
num_steps = 61
dt = 0.08
[]
[Outputs]
execute_on = 'initial timestep_end final'
time_step_interval = 20
exodus = true
[]
(test/tests/executioners/eigen_executioners/normal_eigen_kernel.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 10
elem_type = QUAD4
nx = 8
ny = 8
uniform_refine = 0
[]
[Variables]
active = 'u'
[./u]
# second order is way better than first order
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff rea rhs'
[./diff]
type = Diffusion
variable = u
[../]
[./rea]
type = CoefReaction
variable = u
coefficient = 2.0
[../]
[./rhs]
type = MassEigenKernel
variable = u
eigen = false
[../]
[./rea1]
type = CoefReaction
variable = u
coefficient = 1.0
[../]
[]
[BCs]
[./inhomogeneous]
type = DirichletBC
variable = u
boundary = '2 3'
value = 1
[../]
[]
[Executioner]
type = Steady
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
[]
[Postprocessors]
active = 'unorm'
[./unorm]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = timestep_end
[../]
[]
[Outputs]
file_base = normal_eigen_kernel
exodus = 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/thermal_hydraulics/test/tests/components/deprecated/heat_source_volumetric.i)
[GlobalParams]
scaling_factor_1phase = '1 1e-2 1e-4'
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[flow_channel]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 10
A = 1
f = 0
fp = fp
closures = simple_closures
initial_T = 310
initial_p = 1e5
initial_vel = 0
[]
[wall1]
type = SolidWall1Phase
input = flow_channel:in
[]
[wall2]
type = SolidWall1Phase
input = flow_channel:out
[]
[heat_source]
type = HeatSourceVolumetric
flow_channel = flow_channel
q = 1e3
[]
[]
[Postprocessors]
[E_tot]
type = ElementIntegralVariablePostprocessor
variable = rhoEA
execute_on = 'initial timestep_end'
[]
[E_tot_change]
type = ChangeOverTimePostprocessor
change_with_respect_to_initial = true
postprocessor = E_tot
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.1
end_time = 1
abort_on_solve_fail = 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'
[]
(test/tests/restart/restart_transient_from_steady/restart_trans_with_2subs_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
ny = 3
xmax = 0.3
ymax = 0.3
[]
[AuxVariables]
[power_density]
[]
[]
[Variables]
[temp]
[]
[]
[Kernels]
[heat_conduction]
type = Diffusion
variable = temp
[]
[heat_ie]
type = TimeDerivative
variable = temp
[]
[heat_source_fuel]
type = CoupledForce
variable = temp
v = power_density
[]
[]
[BCs]
[bc]
type = DirichletBC
variable = temp
boundary = '1 3'
value = 100
[]
[bc2]
type = NeumannBC
variable = temp
boundary = '0 2'
value = 10.0
[]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
start_time = 0
end_time = 3
dt = 1.0
nl_abs_tol = 1e-7
nl_rel_tol = 1e-7
[]
[Postprocessors]
[temp_fuel_avg]
type = ElementAverageValue
variable = temp
block = '0'
execute_on = 'initial timestep_end'
[]
[pwr_density]
type = ElementIntegralVariablePostprocessor
block = '0'
variable = power_density
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
perf_graph = true
exodus = true
color = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_rz_cylinder_mortar.i)
rpv_core_gap_size = 0.2
core_outer_radius = 2
rpv_inner_radius = '${fparse 2 + rpv_core_gap_size}'
rpv_outer_radius = '${fparse 2.5 + rpv_core_gap_size}'
rpv_width = '${fparse rpv_outer_radius - rpv_inner_radius}'
rpv_outer_htc = 10 # W/m^2/K
rpv_outer_Tinf = 300 # K
core_blocks = '1'
rpv_blocks = '3'
[Mesh]
[gmg]
type = CartesianMeshGenerator
dim = 2
dx = '${core_outer_radius} ${rpv_core_gap_size} ${rpv_width}'
ix = '400 1 100'
dy = 1
iy = '5'
[]
[set_block_id1]
type = SubdomainBoundingBoxGenerator
input = gmg
bottom_left = '0 0 0'
top_right = '${core_outer_radius} 1 0'
block_id = 1
location = INSIDE
[]
[rename_core_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = set_block_id1
primary_block = 1
paired_block = 0
new_boundary = 'core_outer'
[]
[set_block_id3]
type = SubdomainBoundingBoxGenerator
input = rename_core_bdy
bottom_left = '${rpv_inner_radius} 0 0'
top_right = '${rpv_outer_radius} 1 0'
block_id = 3
location = INSIDE
[]
[rename_inner_rpv_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = set_block_id3
primary_block = 3
paired_block = 0
new_boundary = 'rpv_inner'
[]
# comment out for test without gap
[2d_mesh]
type = BlockDeletionGenerator
input = rename_inner_rpv_bdy
block = 0
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = 'rpv_inner'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = 2d_mesh
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = 'core_outer'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Problem]
coord_type = RZ
[]
[Variables]
[Tsolid]
initial_condition = 500
[]
[lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[Kernels]
[heat_source]
type = CoupledForce
variable = Tsolid
block = '${core_blocks}'
v = power_density
[]
[heat_conduction]
type = HeatConduction
variable = Tsolid
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = Tsolid
boundary = 'right' # outer RPV
coefficient = ${rpv_outer_htc}
T_infinity = ${rpv_outer_Tinf}
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = Tsolid
boundary = 'rpv_inner'
primary_emissivity = 0.8
secondary_emissivity = 0.8
[]
[conduction]
type = GapFluxModelConduction
temperature = Tsolid
boundary = 'rpv_inner'
gap_conductivity = 0.1
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = Tsolid
primary_boundary = 'core_outer'
primary_subdomain = 10000
secondary_boundary = 'rpv_inner'
secondary_subdomain = 10001
gap_flux_models = 'radiation conduction'
gap_geometry_type = 'CYLINDER'
[]
[]
[AuxVariables]
[power_density]
block = '${core_blocks}'
initial_condition = 50e3
[]
[]
[Materials]
[simple_mat]
type = HeatConductionMaterial
thermal_conductivity = 34.6 # W/m/K
[]
[]
[Postprocessors]
[Tcore_avg]
type = ElementAverageValue
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${core_blocks}'
[]
[Trpv_avg]
type = ElementAverageValue
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${rpv_blocks}'
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = '${core_blocks}'
[]
[rpv_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = Tsolid
boundary = 'right' # outer RVP
T_fluid = ${rpv_outer_Tinf}
htc = ${rpv_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(rpv_convective_out - ptot) / ptot'
pp_names = 'rpv_convective_out ptot'
[]
[flux_from_core] # converges to ptot as the mesh is refined
type = SideDiffusiveFluxIntegral
variable = Tsolid
boundary = core_outer
diffusivity = thermal_conductivity
[]
[flux_into_rpv] # converges to rpv_convective_out as the mesh is refined
type = SideDiffusiveFluxIntegral
variable = Tsolid
boundary = rpv_inner
diffusivity = thermal_conductivity
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = 'rpv_inner core_outer'
variable = Tsolid
[]
[]
[Executioner]
type = Steady
petsc_options = '-snes_converged_reason -pc_svd_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -mat_mffd_err -pc_factor_shift_type '
'-pc_factor_shift_amount'
petsc_options_value = ' lu superlu_dist 1e-5 NONZERO '
'1e-15'
snesmf_reuse_base = false
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
l_max_its = 100
line_search = none
[]
[Outputs]
exodus = false
csv = true
[]
(modules/thermal_hydraulics/test/tests/components/shaft_connected_turbine_1phase/shaft_motor_turbine.i)
area = 0.2359
dt = 1.e-3
[GlobalParams]
initial_p = 2e5
initial_T = 600
initial_vel = 100
initial_vel_x = 100
initial_vel_y = 0
initial_vel_z = 0
A = ${area}
A_ref = ${area}
f = 100
scaling_factor_1phase = '0.04 0.04 0.04e-5'
closures = simple_closures
fp = fp
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[turbine]
type = ShaftConnectedTurbine1Phase
inlet = 'pipe:out'
outlet = 'pipe:in'
position = '0 0 0'
volume = 0.2
inertia_coeff = '1 1 1 1'
inertia_const = 1.61397
speed_cr_I = 1e12
speed_cr_fr = 0
tau_fr_coeff = '0 0 0 0'
tau_fr_const = 0
omega_rated = 100
D_wheel = 0.4
head_coefficient = head
power_coefficient = power
[]
[pipe]
type = FlowChannel1Phase
position = '0.1 0 0'
orientation = '1 0 0'
length = 10
n_elems = 20
initial_p = 2e6
[]
[dyno]
type = ShaftConnectedMotor
inertia = 1e2
torque = -1e3
[]
[shaft]
type = Shaft
connected_components = 'dyno turbine'
initial_speed = 300
[]
[]
[Functions]
[head]
type = PiecewiseLinear
x = '0 7e-3 1e-2'
y = '0 15 20'
[]
[power]
type = PiecewiseLinear
x = '0 6e-3 1e-2'
y = '0 0.05 0.18'
[]
[S_energy_fcn]
type = ParsedFunction
expression = '-(tau_driving+tau_fr)*omega'
symbol_names = 'tau_driving tau_fr omega'
symbol_values = 'turbine:driving_torque turbine:friction_torque shaft:omega'
[]
[energy_conservation_fcn]
type = ParsedFunction
expression = '(E_change - S_energy * dt) / E_tot'
symbol_names = 'E_change S_energy dt E_tot'
symbol_values = 'E_change S_energy ${dt} E_tot'
[]
[]
[Postprocessors]
# mass conservation
[mass_pipes]
type = ElementIntegralVariablePostprocessor
variable = rhoA
block = 'pipe'
execute_on = 'initial timestep_end'
[]
[mass_turbine]
type = ScalarVariable
variable = turbine:rhoV
execute_on = 'initial timestep_end'
[]
[mass_tot]
type = SumPostprocessor
values = 'mass_pipes mass_turbine'
execute_on = 'initial timestep_end'
[]
[mass_conservation]
type = ChangeOverTimePostprocessor
postprocessor = mass_tot
change_with_respect_to_initial = true
compute_relative_change = true
execute_on = 'initial timestep_end'
[]
# energy conservation
[E_pipes]
type = ElementIntegralVariablePostprocessor
variable = rhoEA
block = 'pipe'
execute_on = 'initial timestep_end'
[]
[E_turbine]
type = ScalarVariable
variable = turbine:rhoEV
execute_on = 'initial timestep_end'
[]
[E_tot]
type = LinearCombinationPostprocessor
pp_coefs = '1 1'
pp_names = 'E_pipes E_turbine'
execute_on = 'initial timestep_end'
[]
[S_energy]
type = FunctionValuePostprocessor
function = S_energy_fcn
execute_on = 'initial timestep_end'
[]
[E_change]
type = ChangeOverTimePostprocessor
postprocessor = E_tot
execute_on = 'initial timestep_end'
[]
# This should also execute on initial. This value is
# lagged by one timestep as a workaround to moose issue #13262.
[energy_conservation]
type = FunctionValuePostprocessor
function = energy_conservation_fcn
execute_on = 'timestep_end'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
dt = ${dt}
num_steps = 6
solve_type = NEWTON
nl_rel_tol = 1e-8
nl_abs_tol = 1e-6
nl_max_its = 15
l_tol = 1e-4
l_max_its = 10
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Outputs]
velocity_as_vector = false
[]
(modules/phase_field/test/tests/grain_growth/constant_mobility.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
xmax = 1000
ymax = 1000
zmax = 0
elem_type = QUAD4
uniform_refine = 2
[]
[GlobalParams]
op_num = 4
var_name_base = 'gr'
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[UserObjects]
[./voronoi]
type = PolycrystalVoronoi
rand_seed = 6
grain_num = 4
coloring_algorithm = bt
[../]
[]
[ICs]
[./PolycrystalICs]
[./PolycrystalColoringIC]
polycrystal_ic_uo = voronoi
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = 'timestep_end'
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./Moly_GB]
type = GBEvolution
time_scale = 1.0e-2
GBMobility = 1.88e-14 # m^4/J*s
T = '500' # K
wGB = 60 # nm
GBenergy = 1.4
[../]
[]
[Postprocessors]
[./gr1area]
type = ElementIntegralVariablePostprocessor
variable = gr1
execute_on = 'initial timestep_end'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[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_tol = 1.0e-4
l_max_its = 30
nl_max_its = 20
nl_rel_tol = 1.0e-9
start_time = 0.0
num_steps = 2
dt = 4
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/actions/grain_growth.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
xmax = 400
ymax = 400
elem_type = QUAD
[]
[GlobalParams]
op_num = 2
var_name_base = gr
[]
[Modules]
[./PhaseField]
[./GrainGrowth]
variable_mobility = false
[../]
[../]
[]
[ICs]
[./PolycrystalICs]
[./BicrystalCircleGrainIC]
radius = 300
x = 400
y = 0
int_width = 60
[../]
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
T = 500 # K
wGB = 60 # nm
GBmob0 = 2.5e-6 #m^4/(Js) from Schoenfelder 1997
Q = 0.23 #Migration energy in eV
GBenergy = 0.708 #GB energy in J/m^2
[../]
[]
[Postprocessors]
[./gr1area]
type = ElementIntegralVariablePostprocessor
variable = gr1
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
solve_type = 'NEWTON'
l_tol = 1.0e-4
l_max_its = 30
nl_max_its = 20
nl_rel_tol = 1.0e-9
num_steps = 5
dt = 80.0
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/components/pump_1phase/pump_mass_energy_conservation.i)
# This test tests that mass and energy are conserved.
dt = 1.e-2
head = 95.
volume = 1.
A = 1.
g = 9.81
[GlobalParams]
initial_T = 393.15
initial_vel = 0
f = 0
fp = fp
scaling_factor_1phase = '0.04 0.04 0.04e-5'
closures = simple_closures
A = ${A}
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[wall_in]
type = SolidWall1Phase
input = 'pipe1:in'
[]
[pipe1]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 1
initial_p = 1.7E+07
n_elems = 10
gravity_vector = '0 0 0'
[]
[pump]
type = Pump1Phase
connections = 'pipe1:out pipe2:in'
position = '1.02 0 0'
initial_p = 1.3e+07
scaling_factor_rhoEV = 1e-5
head = ${head}
A_ref = ${A}
volume = ${volume}
initial_vel_x = 0
initial_vel_y = 0
initial_vel_z = 0
[]
[pipe2]
type = FlowChannel1Phase
position = '1.04 0 0'
orientation = '1 0 0'
length = 1
initial_p = 1.3e+07
n_elems = 10
gravity_vector = '0 0 0'
[]
[wall_out]
type = SolidWall1Phase
input = 'pipe2:out'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
start_time = 0
dt = ${dt}
num_steps = 6
abort_on_solve_fail = true
solve_type = 'PJFNK'
line_search = 'basic'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-6
nl_max_its = 15
l_tol = 1e-4
l_max_its = 10
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Postprocessors]
# mass conservation
[mass_pipes]
type = ElementIntegralVariablePostprocessor
variable = rhoA
block = 'pipe1 pipe2'
execute_on = 'initial timestep_end'
[]
[mass_pump]
type = ScalarVariable
variable = pump:rhoV
execute_on = 'initial timestep_end'
[]
[mass_tot]
type = SumPostprocessor
values = 'mass_pipes mass_pump'
execute_on = 'initial timestep_end'
[]
[mass_tot_change]
type = ChangeOverTimePostprocessor
postprocessor = mass_tot
change_with_respect_to_initial = true
compute_relative_change = true
execute_on = 'initial timestep_end'
[]
# energy conservation
[E_pipes]
type = ElementIntegralVariablePostprocessor
variable = rhoEA
block = 'pipe1 pipe2'
execute_on = 'initial timestep_end'
[]
[E_pump]
type = ScalarVariable
variable = pump:rhoEV
execute_on = 'initial timestep_end'
[]
[E_tot]
type = LinearCombinationPostprocessor
pp_coefs = '1 1'
pp_names = 'E_pipes E_pump'
execute_on = 'initial timestep_end'
[]
[S_energy]
type = FunctionValuePostprocessor
function = S_energy_fcn
execute_on = 'initial timestep_end'
[]
[E_change]
type = ChangeOverTimePostprocessor
postprocessor = E_tot
execute_on = 'initial timestep_end'
[]
# this should also execute on initial, this value is
# lagged by one timestep as a workaround to moose issue #13262
[E_conservation]
type = FunctionValuePostprocessor
function = E_conservation_fcn
execute_on = 'timestep_end'
[]
[]
[Functions]
[S_energy_fcn]
type = ParsedFunction
expression = 'rhouV * g * head * A / volume'
symbol_names = 'rhouV g head A volume'
symbol_values = 'pump:rhouV ${g} ${head} ${A} ${volume}'
[]
[E_conservation_fcn]
type = ParsedFunction
expression = '(E_change - S_energy * dt) / E_tot'
symbol_names = 'E_change S_energy dt E_tot'
symbol_values = 'E_change S_energy ${dt} E_tot'
[]
[]
[Outputs]
[out]
type = CSV
execute_on = 'FINAL'
show = 'mass_tot_change E_conservation'
[]
[]
(modules/phase_field/test/tests/flood_counter_aux_test/boundary_intersection.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 50
xmax = 10
ymax = 50
[]
[]
[Variables]
[u]
[]
[]
[AuxVariables]
[v]
order = CONSTANT
family = MONOMIAL
[]
[pid]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[dot]
type = TimeDerivative
variable = u
[]
[]
[AuxKernels]
[intersect]
type = FeatureFloodCountAux
variable = v
flood_counter = intersection
field_display = INTERSECTS_SPECIFIED_BOUNDARY
execute_on = 'initial timestep_end'
[]
[pid]
type = ProcessorIDAux
variable = pid
[]
[]
[ICs]
[v]
type = BoundingBoxIC
variable = u
inside = 1
outside = 0
x1 = 3
x2 = 7
y1 = 0
y2 = 45
[]
[]
[Postprocessors]
[intersection]
type = FeatureFloodCount
variable = u
threshold = 0.3
specified_boundaries = bottom
compute_var_to_feature_map = true
execute_on = 'initial timestep_end'
[]
[vint]
type = ElementIntegralVariablePostprocessor
variable = v
[]
[]
[Executioner]
type = Transient
dt = 0.01
num_steps = 2
[]
[Outputs]
execute_on = 'timestep_end'
csv = true
[]
(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/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/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/gap_heat_transfer_mortar/large_gap_heat_transfer_test_cylinder_mortar.i)
rpv_core_gap_size = 0.15
core_outer_radius = 2
rpv_inner_radius = '${fparse 2 + rpv_core_gap_size}'
rpv_outer_radius = '${fparse 2.5 + rpv_core_gap_size}'
rpv_outer_htc = 10 # W/m^2/K
rpv_outer_Tinf = 300 # K
core_blocks = '1'
rpv_blocks = '3'
[Mesh]
[core_gap_rpv]
type = ConcentricCircleMeshGenerator
num_sectors = 10
radii = '${core_outer_radius} ${rpv_inner_radius} ${rpv_outer_radius}'
rings = '2 1 2'
has_outer_square = false
preserve_volumes = true
portion = full
[]
[rename_core_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = core_gap_rpv
primary_block = 1
paired_block = 2
new_boundary = 'core_outer'
[]
[rename_inner_rpv_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = rename_core_bdy
primary_block = 3
paired_block = 2
new_boundary = 'rpv_inner'
[]
[2d_mesh]
type = BlockDeletionGenerator
input = rename_inner_rpv_bdy
block = 2
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = 'rpv_inner'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = 2d_mesh
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = 'core_outer'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Variables]
[Tsolid]
initial_condition = 500
[]
[lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[Kernels]
[heat_source]
type = CoupledForce
variable = Tsolid
block = '${core_blocks}'
v = power_density
[]
[heat_conduction]
type = HeatConduction
variable = Tsolid
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = Tsolid
boundary = 'outer' # outer RPV
coefficient = ${rpv_outer_htc}
T_infinity = ${rpv_outer_Tinf}
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = Tsolid
boundary = 'rpv_inner'
primary_emissivity = 0.8
secondary_emissivity = 0.8
[]
[conduction]
type = GapFluxModelConduction
temperature = Tsolid
boundary = 'rpv_inner'
gap_conductivity = 0.1
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = Tsolid
primary_boundary = 'core_outer'
primary_subdomain = 10000
secondary_boundary = 'rpv_inner'
secondary_subdomain = 10001
gap_flux_models = 'radiation conduction'
gap_geometry_type = 'CYLINDER'
[]
[]
[AuxVariables]
[power_density]
block = '${core_blocks}'
initial_condition = 50e3
[]
[]
[Materials]
[simple_mat]
type = HeatConductionMaterial
thermal_conductivity = 34.6 # W/m/K
[]
[]
[Postprocessors]
[Tcore_avg]
type = ElementAverageValue
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${core_blocks}'
[]
[Trpv_avg]
type = ElementAverageValue
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${rpv_blocks}'
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = '${core_blocks}'
[]
[rpv_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = Tsolid
boundary = 'outer' # outer RVP
T_fluid = ${rpv_outer_Tinf}
htc = ${rpv_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(rpv_convective_out - ptot) / ptot'
pp_names = 'rpv_convective_out ptot'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = 'rpv_inner core_outer'
variable = 'Tsolid'
[]
[]
[Executioner]
type = Steady
petsc_options = '-snes_converged_reason -pc_svd_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -mat_mffd_err -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = ' lu superlu_dist 1e-5 NONZERO 1e-15'
snesmf_reuse_base = false
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
l_max_its = 100
line_search = none
[]
[Outputs]
exodus = false
csv = 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/porous_flow/test/tests/fluidstate/brineco2_2.i)
# Injection of supercritical CO2 into a single brine saturated cell. The CO2 initially fully
# dissolves into the brine, increasing its density slightly. After a few time steps,
# the brine is saturated with CO2, and subsequently a supercritical gas phase of CO2 saturated
# with a small amount of H2O is formed. Salt is included as a nonlinear variable.
[Mesh]
type = GeneratedMesh
dim = 2
[]
[GlobalParams]
PorousFlowDictator = dictator
temperature = 30
[]
[Variables]
[pgas]
initial_condition = 20e6
[]
[z]
[]
[xnacl]
initial_condition = 0.1
[]
[]
[DiracKernels]
[source]
type = PorousFlowSquarePulsePointSource
variable = z
point = '0.5 0.5 0'
mass_flux = 2
[]
[]
[BCs]
[left]
type = DirichletBC
value = 20e6
variable = pgas
boundary = left
[]
[right]
type = DirichletBC
value = 20e6
variable = pgas
boundary = right
[]
[]
[AuxVariables]
[pressure_gas]
order = CONSTANT
family = MONOMIAL
[]
[pressure_water]
order = CONSTANT
family = MONOMIAL
[]
[saturation_gas]
order = CONSTANT
family = MONOMIAL
[]
[saturation_water]
order = CONSTANT
family = MONOMIAL
[]
[density_water]
order = CONSTANT
family = MONOMIAL
[]
[density_gas]
order = CONSTANT
family = MONOMIAL
[]
[viscosity_water]
order = CONSTANT
family = MONOMIAL
[]
[viscosity_gas]
order = CONSTANT
family = MONOMIAL
[]
[x0_water]
order = CONSTANT
family = MONOMIAL
[]
[x0_gas]
order = CONSTANT
family = MONOMIAL
[]
[x1_water]
order = CONSTANT
family = MONOMIAL
[]
[x1_gas]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[pressure_water]
type = PorousFlowPropertyAux
variable = pressure_water
property = pressure
phase = 0
execute_on = 'initial timestep_end'
[]
[pressure_gas]
type = PorousFlowPropertyAux
variable = pressure_gas
property = pressure
phase = 1
execute_on = 'initial timestep_end'
[]
[saturation_water]
type = PorousFlowPropertyAux
variable = saturation_water
property = saturation
phase = 0
execute_on = 'initial timestep_end'
[]
[saturation_gas]
type = PorousFlowPropertyAux
variable = saturation_gas
property = saturation
phase = 1
execute_on = 'initial timestep_end'
[]
[density_water]
type = PorousFlowPropertyAux
variable = density_water
property = density
phase = 0
execute_on = 'initial timestep_end'
[]
[density_gas]
type = PorousFlowPropertyAux
variable = density_gas
property = density
phase = 1
execute_on = 'initial timestep_end'
[]
[viscosity_water]
type = PorousFlowPropertyAux
variable = viscosity_water
property = viscosity
phase = 0
execute_on = 'initial timestep_end'
[]
[viscosity_gas]
type = PorousFlowPropertyAux
variable = viscosity_gas
property = viscosity
phase = 1
execute_on = 'initial timestep_end'
[]
[x1_water]
type = PorousFlowPropertyAux
variable = x1_water
property = mass_fraction
phase = 0
fluid_component = 1
execute_on = 'initial timestep_end'
[]
[x1_gas]
type = PorousFlowPropertyAux
variable = x1_gas
property = mass_fraction
phase = 1
fluid_component = 1
execute_on = 'initial timestep_end'
[]
[x0_water]
type = PorousFlowPropertyAux
variable = x0_water
property = mass_fraction
phase = 0
fluid_component = 0
execute_on = 'initial timestep_end'
[]
[x0_gas]
type = PorousFlowPropertyAux
variable = x0_gas
property = mass_fraction
phase = 1
fluid_component = 0
execute_on = 'initial timestep_end'
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
variable = pgas
fluid_component = 0
[]
[mass1]
type = PorousFlowMassTimeDerivative
variable = z
fluid_component = 1
[]
[mass2]
type = PorousFlowMassTimeDerivative
variable = xnacl
fluid_component = 2
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pgas z xnacl'
number_fluid_phases = 2
number_fluid_components = 3
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[fs]
type = PorousFlowBrineCO2
brine_fp = brine
co2_fp = co2
capillary_pressure = pc
[]
[]
[FluidProperties]
[co2]
type = CO2FluidProperties
[]
[brine]
type = BrineFluidProperties
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[brineco2]
type = PorousFlowFluidState
gas_porepressure = pgas
z = z
temperature_unit = Celsius
xnacl = xnacl
capillary_pressure = pc
fluid_state = fs
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-12 0 0 0 1e-12 0 0 0 1e-12'
[]
[relperm0]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[relperm1]
type = PorousFlowRelativePermeabilityCorey
n = 3
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 1
end_time = 10
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[density_water]
type = ElementIntegralVariablePostprocessor
variable = density_water
execute_on = 'initial timestep_end'
[]
[density_gas]
type = ElementIntegralVariablePostprocessor
variable = density_gas
execute_on = 'initial timestep_end'
[]
[viscosity_water]
type = ElementIntegralVariablePostprocessor
variable = viscosity_water
execute_on = 'initial timestep_end'
[]
[viscosity_gas]
type = ElementIntegralVariablePostprocessor
variable = viscosity_gas
execute_on = 'initial timestep_end'
[]
[x1_water]
type = ElementIntegralVariablePostprocessor
variable = x1_water
execute_on = 'initial timestep_end'
[]
[x0_water]
type = ElementIntegralVariablePostprocessor
variable = x0_water
execute_on = 'initial timestep_end'
[]
[x1_gas]
type = ElementIntegralVariablePostprocessor
variable = x1_gas
execute_on = 'initial timestep_end'
[]
[x0_gas]
type = ElementIntegralVariablePostprocessor
variable = x0_gas
execute_on = 'initial timestep_end'
[]
[sg]
type = ElementIntegralVariablePostprocessor
variable = saturation_gas
execute_on = 'initial timestep_end'
[]
[sw]
type = ElementIntegralVariablePostprocessor
variable = saturation_water
execute_on = 'initial timestep_end'
[]
[pwater]
type = ElementIntegralVariablePostprocessor
variable = pressure_water
execute_on = 'initial timestep_end'
[]
[pgas]
type = ElementIntegralVariablePostprocessor
variable = pressure_gas
execute_on = 'initial timestep_end'
[]
[xnacl]
type = ElementIntegralVariablePostprocessor
variable = xnacl
execute_on = 'initial timestep_end'
[]
[x0mass]
type = PorousFlowFluidMass
fluid_component = 0
phase = '0 1'
execute_on = 'initial timestep_end'
[]
[x1mass]
type = PorousFlowFluidMass
fluid_component = 1
phase = '0 1'
execute_on = 'initial timestep_end'
[]
[x2mass]
type = PorousFlowFluidMass
fluid_component = 2
phase = '0 1'
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
csv = true
file_base = brineco2_2
execute_on = 'initial timestep_end'
perf_graph = true
[]
(modules/porous_flow/test/tests/fluids/co2.i)
# Test the density and viscosity calculated by the simple CO2 Material
# Pressure 5 MPa
# Temperature 50C
# These conditions correspond to the gas phase
# CO2 density should equal 104 kg/m^3 (NIST webbook)
# CO2 viscosity should equal 0.000017345 Pa.s (NIST webbook)
# Results are within expected accuracy
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[Variables]
[pp]
initial_condition = 5e6
[]
[]
[Kernels]
[dummy]
type = Diffusion
variable = pp
[]
[]
[AuxVariables]
[temp]
initial_condition = 50
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temp
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[co2]
type = PorousFlowSingleComponentFluid
temperature_unit = Celsius
fp = co2
phase = 0
[]
[]
[FluidProperties]
[co2]
type = CO2FluidProperties
[]
[]
[Executioner]
type = Steady
solve_type = Newton
[]
[Postprocessors]
[pressure]
type = ElementIntegralVariablePostprocessor
variable = pp
[]
[temperature]
type = ElementIntegralVariablePostprocessor
variable = temp
[]
[density]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_density_qp0'
[]
[viscosity]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_viscosity_qp0'
[]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = co2
csv = 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
[]
(modules/phase_field/test/tests/grain_growth/boundingbox.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
xmin = 0
xmax = 1000
ymin = 0
ymax = 1000
zmin = 0
zmax = 0
elem_type = QUAD4
uniform_refine = 2
[]
[GlobalParams]
op_num = 2
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[ICs]
[./PolycrystalICs]
[./BicrystalBoundingBoxIC]
x1 = 0
y1 = 0
x2 = 500
y2 = 1000
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
T = 500 # K
wGB = 60 # nm
GBmob0 = 2.5e-6 # m^4/(Js) from Schoenfelder 1997
Q = 0.23 # Migration energy in eV
GBenergy = 0.708 # GB energy in J/m^2
[../]
[]
[Postprocessors]
[./gr1area]
type = ElementIntegralVariablePostprocessor
variable = gr1
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[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_tol = 1.0e-4
l_max_its = 30
nl_max_its = 20
nl_rel_tol = 1.0e-9
start_time = 0.0
num_steps = 10
dt = 80.0
[./Adaptivity]
initial_adaptivity = 2
refine_fraction = 0.8
coarsen_fraction = 0.05
max_h_level = 2
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(modules/combined/examples/optimization/multi-load/single_subapp_one.i)
power = 2
E0 = 1.0
Emin = 1.0e-6
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
# final_generator = 'MoveRight'
[Bottom]
type = GeneratedMeshGenerator
dim = 2
nx = 80
ny = 40
xmin = 0
xmax = 150
ymin = 0
ymax = 75
[]
[left_load]
type = ExtraNodesetGenerator
input = Bottom
new_boundary = left_load
coord = '37.5 75 0'
[]
[right_load]
type = ExtraNodesetGenerator
input = left_load
new_boundary = right_load
coord = '112.5 75 0'
[]
[left_support]
type = ExtraNodesetGenerator
input = right_load
new_boundary = left_support
coord = '0 0 0'
[]
[right_support]
type = ExtraNodesetGenerator
input = left_support
new_boundary = right_support
coord = '150 0 0'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[Dc]
family = MONOMIAL
order = SECOND
initial_condition = -1.0
[]
[Cc]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = 0.1
[]
[sensitivity_var]
family = MONOMIAL
order = SECOND
initial_condition = -1.0
[]
[]
[AuxKernels]
[sensitivity_kernel]
type = MaterialRealAux
property = sensitivity
variable = sensitivity_var
check_boundary_restricted = false
execute_on = 'TIMESTEP_END'
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_y]
type = DirichletBC
variable = disp_y
boundary = left_support
value = 0.0
[]
[no_x]
type = DirichletBC
variable = disp_x
boundary = left_support
value = 0.0
[]
[no_y_right]
type = DirichletBC
variable = disp_y
boundary = right_support
value = 0.0
[]
[]
[NodalKernels]
[push_left]
type = NodalGravity
variable = disp_y
boundary = left_load
gravity_value = -1e-3
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${E0}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.0
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[rad_avg]
type = RadialAverage
radius = 3
weights = linear
prop_name = sensitivity
force_preaux = true
execute_on = 'TIMESTEP_END'
[]
# No SIMP optimization in subapp
[calc_sense]
type = SensitivityFilter
density_sensitivity = Dc
design_density = mat_den
filter_UO = rad_avg
force_postaux = true
execute_on = 'TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-10
dt = 1.0
num_steps = 25
[]
[Outputs]
exodus = true
[out]
type = CSV
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[mesh_volume]
type = VolumePostprocessor
execute_on = 'initial timestep_end'
[]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[vol_frac]
type = ParsedPostprocessor
function = 'total_vol / mesh_volume'
pp_names = 'total_vol mesh_volume'
[]
[sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = sensitivity
execute_on = 'TIMESTEP_BEGIN TIMESTEP_END NONLINEAR'
[]
[objective]
type = ElementIntegralMaterialProperty
mat_prop = strain_energy_density
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
(modules/combined/examples/optimization/thermomechanical/thermal_sub.i)
vol_frac = 0.4
power = 2.0
E0 = 1.0e-6
E1 = 1.0
rho0 = 0.0
rho1 = 1.0
C0 = 1.0e-6
C1 = 1.0
TC0 = 1.0e-16
TC1 = 1.0
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 40
xmin = 0
xmax = 40
ymin = 0
ymax = 40
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = hold
nodes = 0
[]
[push_left]
type = ExtraNodesetGenerator
input = node
new_boundary = push_left
coord = '16 0 0'
[]
[push_center]
type = ExtraNodesetGenerator
input = push_left
new_boundary = push_center
coord = '24 0 0'
[]
[extra]
type = SideSetsFromBoundingBoxGenerator
input = push_center
bottom_left = '-0.01 17.999 0'
top_right = '5 22.001 0'
boundary_new = n1
boundaries_old = left
[]
[dirichlet_bc]
type = SideSetsFromNodeSetsGenerator
input = extra
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[temp]
initial_condition = 100.0
[]
[]
[AuxVariables]
[Dc]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[]
[Cc]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[]
[Tc]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[]
[Cost]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[]
[mat_den]
family = MONOMIAL
order = FIRST
initial_condition = ${vol_frac}
[]
[]
[AuxKernels]
[Cost]
type = MaterialRealAux
variable = Cost
property = Cost_mat
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temp
diffusion_coefficient = thermal_cond
[]
[heat_source]
type = HeatSource
value = 1e-2 # W/m^3
variable = temp
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_y]
type = DirichletBC
variable = disp_y
boundary = hold
value = 0.0
[]
[no_x_symm]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[left_n1]
type = DirichletBC
variable = temp
boundary = n1
value = 0.0
[]
[top]
type = NeumannBC
variable = temp
boundary = top
value = 0
[]
[bottom]
type = NeumannBC
variable = temp
boundary = bottom
value = 0
[]
[right]
type = NeumannBC
variable = temp
boundary = right
value = 0
[]
[left]
type = NeumannBC
variable = temp
boundary = left
value = 0
[]
[]
[NodalKernels]
[push_left]
type = NodalGravity
variable = disp_y
boundary = push_left
gravity_value = 0.0 # -1e-8
mass = 1
[]
[push_center]
type = NodalGravity
variable = disp_y
boundary = push_center
gravity_value = 0.0 # -1e-8
mass = 1
[]
[]
[Materials]
[thermal_cond]
type = DerivativeParsedMaterial
# ordered multimaterial simp
expression = "A1:=(${TC0}-${TC1})/(${rho0}^${power}-${rho1}^${power}); "
"B1:=${TC0}-A1*${rho0}^${power}; TC1:=A1*mat_den^${power}+B1; TC1"
coupled_variables = 'mat_den'
property_name = thermal_cond
outputs = 'exodus'
[]
[thermal_compliance]
type = ThermalCompliance
temperature = temp
thermal_conductivity = thermal_cond
outputs = 'exodus'
[]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# ordered multimaterial simp
expression = "A1:=(${E0}-${E1})/(${rho0}^${power}-${rho1}^${power}); "
"B1:=${E0}-A1*${rho0}^${power}; E1:=A1*mat_den^${power}+B1; E1"
coupled_variables = 'mat_den'
property_name = E_phys
[]
[Cost_mat]
type = DerivativeParsedMaterial
# ordered multimaterial simp
expression = "A1:=(${C0}-${C1})/(${rho0}^(1/${power})-${rho1}^(1/${power})); "
"B1:=${C0}-A1*${rho0}^(1/${power}); C1:=A1*mat_den^(1/${power})+B1; C1"
coupled_variables = 'mat_den'
property_name = Cost_mat
[]
[CostDensity]
type = ParsedMaterial
property_name = CostDensity
coupled_variables = 'mat_den Cost'
expression = 'mat_den*Cost'
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
[]
[cc]
type = CostSensitivity
design_density = mat_den
cost = Cost_mat
outputs = 'exodus'
[]
[tc]
type = ThermalSensitivity
design_density = mat_den
thermal_conductivity = thermal_cond
temperature = temp
outputs = 'exodus'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[rad_avg]
type = RadialAverage
radius = 0.1
weights = linear
prop_name = sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
[rad_avg_cost]
type = RadialAverage
radius = 0.1
weights = linear
prop_name = cost_sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
[rad_avg_thermal]
type = RadialAverage
radius = 0.1
weights = linear
prop_name = thermal_sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
# Provides Dc
[calc_sense]
type = SensitivityFilter
density_sensitivity = Dc
design_density = mat_den
filter_UO = rad_avg
execute_on = TIMESTEP_END
force_postaux = true
[]
# Provides Cc
[calc_sense_cost]
type = SensitivityFilter
density_sensitivity = Cc
design_density = mat_den
filter_UO = rad_avg_cost
execute_on = TIMESTEP_END
force_postaux = true
[]
# Provides Tc
[calc_sense_thermal]
type = SensitivityFilter
density_sensitivity = Tc
design_density = mat_den
filter_UO = rad_avg_thermal
execute_on = TIMESTEP_END
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-12
dt = 1.0
num_steps = 500
[]
[Outputs]
exodus = true
[out]
type = CSV
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[right_flux]
type = SideDiffusiveFluxAverage
variable = temp
boundary = right
diffusivity = 10
[]
[mesh_volume]
type = VolumePostprocessor
execute_on = 'initial timestep_end'
[]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[vol_frac]
type = ParsedPostprocessor
function = 'total_vol / mesh_volume'
pp_names = 'total_vol mesh_volume'
[]
[sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = sensitivity
[]
[cost_sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = cost_sensitivity
[]
[cost]
type = ElementIntegralMaterialProperty
mat_prop = CostDensity
[]
[cost_frac]
type = ParsedPostprocessor
function = 'cost / mesh_volume'
pp_names = 'cost mesh_volume'
[]
[objective]
type = ElementIntegralMaterialProperty
mat_prop = strain_energy_density
execute_on = 'INITIAL TIMESTEP_END'
[]
[objective_thermal]
type = ElementIntegralMaterialProperty
mat_prop = thermal_compliance
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
(test/tests/postprocessors/element_integral/element_block_integral_test.i)
[Mesh]
file = rectangle.e
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff'
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
active = 'left right'
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 2
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Postprocessors]
[./integral_left]
type = ElementIntegralVariablePostprocessor
variable = u
block = 1
[../]
[./integral_right]
type = ElementIntegralVariablePostprocessor
variable = u
block = 2
[../]
[./integral_all]
type = ElementIntegralVariablePostprocessor
variable = u
[../]
[]
[Outputs]
file_base = out_block
exodus = false
csv = true
[]
(modules/porous_flow/test/tests/fluids/simple_fluid_yr_MPa_C_action.i)
# Version of simple_fluid_yr_MPa_C.i but using a PorousFlowFullySaturated Action, to check that the Action passes the unit choices through to the remainder of PorousFlow
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 2.0E-4
cv = 4000.0
cp = 5000.0
bulk_modulus = 1.0E9
thermal_conductivity = 1.0
viscosity = 1.1E-3
density0 = 1500.0
[]
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[Variables]
[pp]
initial_condition = 10
[]
[T]
initial_condition = 26.85
[]
[]
[PorousFlowFullySaturated]
coupling_type = ThermoHydro
porepressure = pp
temperature = T
temperature_unit = Celsius
pressure_unit = MPa
time_unit = years
fp = the_simple_fluid
[]
[Materials]
# these are needed by the Kernels, but are irrelevant to this particular problem
[porosity]
type = PorousFlowPorosityConst
porosity = 0.2
[]
[zero_thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '0 0 0 0 0 0 0 0 0'
[]
[rock_heat]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 1.0
density = 1.0
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '0 0 0 0 0 0 0 0 0'
[]
[]
[Postprocessors]
[pressure]
type = ElementIntegralVariablePostprocessor
variable = pp
[]
[temperature]
type = ElementIntegralVariablePostprocessor
variable = T
[]
[density]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_density_qp0'
[]
[viscosity]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_viscosity_qp0'
[]
[internal_energy]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_internal_energy_nodal0'
[]
[enthalpy]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_enthalpy_nodal0'
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
dt = 1
num_steps = 1
solve_type = Newton
[]
[Outputs]
file_base = simple_fluid_yr_MPa_C_out
execute_on = 'timestep_end'
csv = true
[]
(test/tests/executioners/eigen_executioners/ne_mat.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 10
elem_type = QUAD4
nx = 8
ny = 8
uniform_refine = 0
[]
# the minimum eigenvalue of this problem is 2*(PI/a)^2;
# Its inverse is 0.5*(a/PI)^2 = 5.0660591821169. Here a is equal to 10.
[Variables]
active = 'u'
[./u]
# second order is way better than first order
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff rhs'
[./diff]
type = Diffusion
variable = u
[../]
[./rhs]
type = MaterialEigenKernel
variable = u
mat = varmat
[../]
[]
[Materials]
[./var_mat]
type = VarCouplingMaterialEigen
block = 0
var = u
material_prop_name = varmat
[../]
[]
[BCs]
active = 'homogeneous'
[./homogeneous]
type = DirichletBC
variable = u
preset = false
boundary = '0 1 2 3'
value = 0
[../]
[]
[Executioner]
type = NonlinearEigen
bx_norm = 'unorm'
normalization = 'unorm'
normal_factor = 9.990012561844
free_power_iterations = 2
nl_abs_tol = 1e-12
nl_rel_tol = 1e-50
k0 = 1.0
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
[]
[Postprocessors]
active = 'unorm udiff'
[./unorm]
type = ElementIntegralVariablePostprocessor
variable = u
# execute on residual is important for nonlinear eigen solver!
execute_on = linear
[../]
[./udiff]
type = ElementL2Diff
variable = u
[../]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = ne_mat
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
[]
[]
(test/tests/dirackernels/function_dirac_source/function_dirac_source.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 5
ny = 5
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./time]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[]
[DiracKernels]
[./point_source]
type = FunctionDiracSource
variable = u
function = switch_off
point = '0.1 0.2 0.0'
[../]
[]
[Functions]
[./switch_off]
type = ParsedFunction
expression = 'if(t < 1.0001, 1, 0)'
[../]
[]
[BCs]
[./external]
type = NeumannBC
variable = u
boundary = '0 1 2 3'
value = 0
[../]
[]
[Postprocessors]
[./total_internal_energy]
type = ElementIntegralVariablePostprocessor
variable = u
[../]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 1
l_tol = 1e-03
[]
[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/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/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 = ' '
[../]
[]
(test/tests/kernels/hfem/robin.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 3
ny = 3
dim = 2
[]
build_all_side_lowerd_mesh = true
[]
[Variables]
[u]
order = THIRD
family = MONOMIAL
block = 0
[]
[lambda]
order = CONSTANT
family = MONOMIAL
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = '1'
block = 0
[]
[source]
type = BodyForce
variable = u
value = '1'
block = 0
[]
[]
[DGKernels]
[surface]
type = HFEMDiffusion
variable = u
lowerd_variable = lambda
[]
[]
[BCs]
[all]
type = VacuumBC
boundary = 'left right top bottom'
variable = u
[]
[]
[Postprocessors]
[intu]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[]
[lambdanorm]
type = ElementL2Norm
variable = lambda
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu basic mumps'
[]
[Outputs]
[out]
# we hide lambda because it may flip sign due to element
# renumbering with distributed mesh
type = Exodus
hide = lambda
[]
[]
(modules/porous_flow/test/tests/fluids/brine1.i)
# Test the density and viscosity calculated by the brine material
# Pressure 20 MPa
# Temperature 50C
# xnacl = 0.1047 (equivalent to 2.0 molality)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[Variables]
[pp]
initial_condition = 20e6
[]
[]
[Kernels]
[dummy]
type = Diffusion
variable = pp
[]
[]
[AuxVariables]
[temp]
initial_condition = 50
[]
[xnacl]
initial_condition = 0.1047
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temp
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[brine]
type = PorousFlowBrine
temperature_unit = Celsius
xnacl = xnacl
phase = 0
[]
[]
[Executioner]
type = Steady
solve_type = Newton
[]
[Postprocessors]
[pressure]
type = ElementIntegralVariablePostprocessor
variable = pp
[]
[temperature]
type = ElementIntegralVariablePostprocessor
variable = temp
[]
[xnacl]
type = ElementIntegralVariablePostprocessor
variable = xnacl
[]
[density]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_density_qp0'
[]
[viscosity]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_viscosity_qp0'
[]
[enthalpy]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_enthalpy_qp0'
[]
[internal_energy]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_internal_energy_qp0'
[]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = brine1
csv = true
[]
(modules/phase_field/test/tests/grain_growth/off-diagonal.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
xmin = 0
xmax = 1000
ymin = 0
ymax = 1000
zmin = 0
zmax = 0
elem_type = QUAD4
uniform_refine = 2
[]
[GlobalParams]
op_num = 2
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[ICs]
[./PolycrystalICs]
[./BicrystalCircleGrainIC]
radius = 333.333
x = 500
y = 500
int_width = 80
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
T = 500 # K
wGB = 60 # nm
GBmob0 = 2.5e-6 #m^4/(Js) from Schoenfelder 1997
Q = 0.23 #Migration energy in eV
GBenergy = 0.708 #GB energy in J/m^2
[../]
[]
[Postprocessors]
[./gr_area]
type = ElementIntegralVariablePostprocessor
variable = gr1
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
l_max_its = 30
nl_max_its = 20
start_time = 0.0
num_steps = 7
dt = 80.0
[./Adaptivity]
initial_adaptivity = 2
refine_fraction = 0.3
coarsen_fraction = 0.2
max_h_level = 2
[../]
[]
[Outputs]
exodus = true
[]
(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
[]
(modules/combined/examples/mortar/eigenstrain_action.i)
#
# Eigenstrain with Mortar gradient periodicity
#
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 50
ny = 50
xmin = -0.5
xmax = 0.5
ymin = -0.5
ymax = 0.5
[]
[./cnode]
input = gen
type = ExtraNodesetGenerator
coord = '0.0 0.0'
new_boundary = 100
[../]
[./anode]
input = cnode
type = ExtraNodesetGenerator
coord = '0.0 0.5'
new_boundary = 101
[../]
[]
[Modules/PhaseField/MortarPeriodicity]
[./strain]
variable = 'disp_x disp_y'
periodicity = gradient
periodic_directions = 'x y'
[../]
[]
[GlobalParams]
derivative_order = 2
enable_jit = true
displacements = 'disp_x disp_y'
[]
# AuxVars to compute the free energy density for outputting
[AuxVariables]
[./local_energy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[AuxKernels]
[./local_free_energy]
type = TotalFreeEnergy
block = 0
execute_on = 'initial LINEAR'
variable = local_energy
interfacial_vars = 'c'
kappa_names = 'kappa_c'
[../]
[]
[Variables]
# Solute concentration variable
[./c]
[./InitialCondition]
type = RandomIC
min = 0.49
max = 0.51
[../]
block = 0
[../]
[./w]
block = 0
[../]
# Mesh displacement
[./disp_x]
block = 0
[../]
[./disp_y]
block = 0
[../]
[]
[Kernels]
# Set up stress divergence kernels
[./TensorMechanics]
[../]
# Cahn-Hilliard kernels
[./c_dot]
type = CoupledTimeDerivative
variable = w
v = c
[../]
[./c_res]
type = SplitCHParsed
variable = c
f_name = F
kappa_name = kappa_c
w = w
[../]
[./w_res]
type = SplitCHWRes
variable = w
mob_name = M
[../]
[]
[Materials]
# declare a few constants, such as mobilities (L,M) and interface gradient prefactors (kappa*)
[./consts]
type = GenericConstantMaterial
block = '0'
prop_names = 'M kappa_c'
prop_values = '0.2 0.01 '
[../]
[./shear1]
type = GenericConstantRankTwoTensor
block = 0
tensor_values = '0 0 0 0 0 0.5'
tensor_name = shear1
[../]
[./shear2]
type = GenericConstantRankTwoTensor
block = 0
tensor_values = '0 0 0 0 0 -0.5'
tensor_name = shear2
[../]
[./expand3]
type = GenericConstantRankTwoTensor
block = 0
tensor_values = '1 1 0 0 0 0'
tensor_name = expand3
[../]
[./weight1]
type = DerivativeParsedMaterial
block = 0
expression = '0.3*c^2'
property_name = weight1
coupled_variables = c
[../]
[./weight2]
type = DerivativeParsedMaterial
block = 0
expression = '0.3*(1-c)^2'
property_name = weight2
coupled_variables = c
[../]
[./weight3]
type = DerivativeParsedMaterial
block = 0
expression = '4*(0.5-c)^2'
property_name = weight3
coupled_variables = c
[../]
# matrix phase
[./elasticity_tensor]
type = ComputeElasticityTensor
block = 0
C_ijkl = '1 1'
fill_method = symmetric_isotropic
[../]
[./strain]
type = ComputeSmallStrain
block = 0
displacements = 'disp_x disp_y'
[../]
[./eigenstrain]
type = CompositeEigenstrain
block = 0
tensors = 'shear1 shear2 expand3'
weights = 'weight1 weight2 weight3'
args = c
eigenstrain_name = eigenstrain
[../]
[./stress]
type = ComputeLinearElasticStress
block = 0
[../]
# chemical free energies
[./chemical_free_energy]
type = DerivativeParsedMaterial
block = 0
property_name = Fc
expression = '4*c^2*(1-c)^2'
coupled_variables = 'c'
outputs = exodus
output_properties = Fc
[../]
# elastic free energies
[./elastic_free_energy]
type = ElasticEnergyMaterial
f_name = Fe
block = 0
args = 'c'
outputs = exodus
output_properties = Fe
[../]
# free energy (chemical + elastic)
[./free_energy]
type = DerivativeSumMaterial
block = 0
property_name = F
sum_materials = 'Fc Fe'
coupled_variables = 'c'
[../]
[]
[BCs]
[./Periodic]
[./up_down]
primary = top
secondary = bottom
translation = '0 -1 0'
variable = 'c w'
[../]
[./left_right]
primary = left
secondary = right
translation = '1 0 0'
variable = 'c w'
[../]
[../]
# fix center point location
[./centerfix_x]
type = DirichletBC
boundary = 100
variable = disp_x
value = 0
[../]
[./centerfix_y]
type = DirichletBC
boundary = 100
variable = disp_y
value = 0
[../]
# fix side point x coordinate to inhibit rotation
[./angularfix]
type = DirichletBC
boundary = 101
variable = disp_x
value = 0
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
# We monitor the total free energy and the total solute concentration (should be constant)
[Postprocessors]
[./total_free_energy]
type = ElementIntegralVariablePostprocessor
block = 0
execute_on = 'initial TIMESTEP_END'
variable = local_energy
[../]
[./total_solute]
type = ElementIntegralVariablePostprocessor
block = 0
execute_on = 'initial TIMESTEP_END'
variable = c
[../]
[./min]
type = ElementExtremeValue
block = 0
execute_on = 'initial TIMESTEP_END'
value_type = min
variable = c
[../]
[./max]
type = ElementExtremeValue
block = 0
execute_on = 'initial TIMESTEP_END'
value_type = max
variable = c
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = 'PJFNK'
line_search = basic
# mortar currently does not support MPI parallelization
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount'
petsc_options_value = ' lu NONZERO 1e-10'
l_max_its = 30
nl_max_its = 12
l_tol = 1.0e-4
nl_rel_tol = 1.0e-8
nl_abs_tol = 1.0e-10
start_time = 0.0
num_steps = 200
[./TimeStepper]
type = SolutionTimeAdaptiveDT
dt = 0.01
[../]
[]
[Outputs]
execute_on = 'timestep_end'
print_linear_residuals = false
exodus = true
[./table]
type = CSV
delimiter = ' '
[../]
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_3d/err.not_a_3d_hs.i)
[GlobalParams]
scaling_factor_1phase = '1 1 1e-3'
[]
[SolidProperties]
[mat]
type = ThermalFunctionSolidProperties
rho = 1000
cp = 100
k = 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]
[fch]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '0 0 1'
fp = fp
n_elems = 6
length = 1
initial_T = 300
initial_p = 1.01e5
initial_vel = 1
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 = HeatStructureCylindrical
position = '0 0 0'
orientation = '0 0 1'
widths = 0.1
inner_radius = 0.1
length = 1
n_elems = 6
n_part_elems = 1
initial_T = T_init
solid_properties = 'mat'
solid_properties_T_ref = '300'
names = blk
[]
[ht]
type = HeatTransferFromHeatStructure3D1Phase
flow_channels = 'fch'
hs = blk
boundary = blk:inner
Hw = 10000
P_hf = 0.156434465
[]
[]
[Postprocessors]
[energy_hs]
type = HeatStructureEnergy3D
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 = false
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
dt = 1
solve_type = PJFNK
line_search = basic
num_steps = 1000
steady_state_detection = true
steady_state_tolerance = 1e-08
nl_abs_tol = 1e-8
[]
(test/tests/kernels/scalar_constraint/scalar_constraint_kernel_disp.i)
#
# This test is identical to scalar_constraint_kernel.i, but it everything is evaluated on the displaced mesh
#
[GlobalParams]
use_displaced_mesh = true
[]
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
displacements = 'disp_x disp_y'
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = 'x*x+y*y'
[../]
[./ffn]
type = ParsedFunction
expression = -4
[../]
[./bottom_bc_fn]
type = ParsedFunction
expression = -2*y
[../]
[./right_bc_fn]
type = ParsedFunction
expression = 2*x
[../]
[./top_bc_fn]
type = ParsedFunction
expression = 2*y
[../]
[./left_bc_fn]
type = ParsedFunction
expression = -2*x
[../]
[]
[AuxVariables]
[./disp_x]
family = LAGRANGE
order = SECOND
[../]
[./disp_y]
family = LAGRANGE
order = SECOND
[../]
[]
[AuxKernels]
[./disp_x_ak]
type = ConstantAux
variable = disp_x
value = 0
[../]
[./disp_y_ak]
type = ConstantAux
variable = disp_y
value = 0
[../]
[]
# NL
[Variables]
[./u]
family = LAGRANGE
order = SECOND
[../]
[./lambda]
family = SCALAR
order = FIRST
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffnk]
type = BodyForce
variable = u
function = ffn
[../]
[./sk_lm]
type = ScalarLagrangeMultiplier
variable = u
lambda = lambda
[../]
[]
[ScalarKernels]
[./constraint]
type = AverageValueConstraint
variable = lambda
pp_name = pp
value = 2.666666666666666
# overrride the global setting, scalar kernels do not live on a mesh
use_displaced_mesh = false
[../]
[]
[BCs]
[./bottom]
type = FunctionNeumannBC
variable = u
boundary = '0'
function = bottom_bc_fn
[../]
[./right]
type = FunctionNeumannBC
variable = u
boundary = '1'
function = right_bc_fn
[../]
[./top]
type = FunctionNeumannBC
variable = u
boundary = '2'
function = top_bc_fn
[../]
[./left]
type = FunctionNeumannBC
variable = u
boundary = '3'
function = left_bc_fn
[../]
[]
[Postprocessors]
[./pp]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = linear
[../]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
execute_on = 'initial timestep_end'
[../]
[]
[Preconditioning]
[./pc]
type = SMP
full = true
solve_type = 'PJFNK'
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-14
l_tol = 1e-7
[]
[Outputs]
exodus = true
hide = lambda
[]
(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/phase_field/test/tests/grain_growth/particle.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
xmin = 0
xmax = 1000
ymin = 0
ymax = 1000
zmin = 0
zmax = 0
elem_type = QUAD4
uniform_refine = 2
[]
[GlobalParams]
op_num = 2
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[ICs]
[./PolycrystalICs]
[./BicrystalCircleGrainIC]
radius = 333.333
x = 500
y = 500
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[./c]
[./InitialCondition]
int_width = 60
x1 = 167
y1 = 500
radius = 50
outvalue = 0
variable = c
invalue = 1
type = SmoothCircleIC
[../]
[../]
[]
[Kernels]
[./PolycrystalKernel]
c = c
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
[../]
[]
[BCs]
[./Periodic]
[./all]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
T = 500 # K
wGB = 60 # nm
GBmob0 = 2.5e-6 #m^4/(Js) from Schoenfelder 1997
Q = 0.23 #Migration energy in eV
GBenergy = 0.708 #GB energy in J/m^2
[../]
[]
[Postprocessors]
[./gr1area]
type = ElementIntegralVariablePostprocessor
variable = gr1
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[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_tol = 1.0e-4
l_max_its = 30
nl_max_its = 20
nl_rel_tol = 1.0e-9
start_time = 0.0
num_steps = 10
dt = 80.0
[./Adaptivity]
initial_adaptivity = 2
refine_fraction = 0.8
coarsen_fraction = 0.05
max_h_level = 2
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/restart/restart_transient_from_steady/steady_with_sub_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[AuxVariables]
[./power_density]
[../]
[]
[Variables]
[./temp]
[../]
[]
[Kernels]
[./heat_conduction]
type = Diffusion
variable = temp
[../]
[./heat_ie]
type = TimeDerivative
variable = temp
[../]
[./heat_source_fuel]
type = CoupledForce
variable = temp
v = power_density
[../]
[]
[BCs]
[bc]
type = DirichletBC
variable = temp
boundary = '0 1 2 3'
value = 450
[]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
start_time = 0
end_time = 10
dt = 1.0
nl_abs_tol = 1e-7
nl_rel_tol = 1e-7
[]
[Postprocessors]
[./temp_fuel_avg]
type = ElementAverageValue
variable = temp
execute_on = 'initial timestep_end'
[../]
[./pwr_density]
type = ElementIntegralVariablePostprocessor
variable = power_density
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
perf_graph = true
exodus = true
color = true
[]
(test/tests/problems/mixed_coord/mixed_coord_test.i)
[Mesh]
file = rz_xyz.e
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./one]
initial_condition = 1
[../]
[]
[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
[../]
[./left_middle]
type = DirichletBC
variable = u
boundary = left_middle
value = 1
[../]
[./right_middle]
type = DirichletBC
variable = u
boundary = right_middle
value = 0
[../]
[]
[Postprocessors]
[./volume]
type = ElementIntegralVariablePostprocessor
variable = one
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Outputs]
file_base = out
exodus = true
[]
[Problem]
coord_type = 'RZ XYZ'
block = '1 2'
[]
(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/userobjects/pre_aux_based_on_exec_flag/pre_post_aux_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
nx = 2
ymin = 0
ymax = 1
ny = 2
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
initial_condition = 1
[../]
[]
[AuxVariables]
[w1]
order = FIRST
family = LAGRANGE
initial_condition = 2
[]
[w2]
order = FIRST
family = LAGRANGE
[]
[w3]
order = FIRST
family = LAGRANGE
[]
[w4]
order = FIRST
family = LAGRANGE
[]
[]
[Kernels]
[./time]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
# The purpose of this auxkernel is to provide the variable w1
# and the scalepostprocessors included below will either get
# an updated w1 or the previous w1 value depending on whether
# they are forced in preaux or postaux
[NormalizationAuxW1]
type = NormalizationAux
variable = w1
source_variable = u
shift = -100.0
normalization = 1.0
execute_on = 'INITIAL FINAL'
[]
# This establishes a dependency for scale_initial on exec INITIAL
[NormalizationAuxINITIAL]
type = NormalizationAux
variable = w2
source_variable = u
normalization = scale_initial
execute_on = 'INITIAL'
[]
# This establishes a dependency for scale_initial on exec TIMESTEP_END
[NormalizationAuxTIMESTEP_END]
type = NormalizationAux
variable = w3
source_variable = u
normalization = scale_td_end
execute_on = 'TIMESTEP_END'
[]
# This establishes a dependency for scale_initial on exec FINAL
[NormalizationAuxFINAL]
type = NormalizationAux
variable = w4
source_variable = u
normalization = scale_final
execute_on = 'FINAL'
[]
[]
[Postprocessors]
#
# scalePostAux always gets run post_aux
#
[./total_u1]
type = ElementIntegralVariablePostprocessor
variable = w1
execute_on = 'INITIAL TIMESTEP_BEGIN TIMESTEP_END FINAL'
[../]
[./scalePostAux]
type = ScalePostprocessor
value = total_u1
scaling_factor = 1
execute_on = 'INITIAL TIMESTEP_BEGIN TIMESTEP_END FINAL'
[../]
#
# shoule only run pre_aux on initial
#
[./total_u2]
type = ElementIntegralVariablePostprocessor
variable = w1
execute_on = 'INITIAL TIMESTEP_BEGIN TIMESTEP_END FINAL'
[../]
[./scale_initial]
type = ScalePostprocessor
value = total_u2
scaling_factor = 1
execute_on = 'INITIAL TIMESTEP_BEGIN TIMESTEP_END FINAL'
[../]
#
# shoule be forced into preaux on timestep_end
#
[./total_u3]
type = ElementIntegralVariablePostprocessor
variable = w1
execute_on = 'INITIAL TIMESTEP_BEGIN TIMESTEP_END FINAL'
[../]
[./scale_td_end]
type = ScalePostprocessor
value = total_u3
scaling_factor = 1
execute_on = 'INITIAL TIMESTEP_BEGIN TIMESTEP_END FINAL'
[../]
#
# shoule be forced into preaux on final
#
[./total_u4]
type = ElementIntegralVariablePostprocessor
variable = w1
execute_on = 'INITIAL TIMESTEP_BEGIN TIMESTEP_END FINAL'
[../]
[./scale_final]
type = ScalePostprocessor
value = total_u4
scaling_factor = 1
execute_on = 'INITIAL TIMESTEP_BEGIN TIMESTEP_END FINAL'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[]
[Executioner]
type = Transient
dt = 1.0
end_time = 2.0
[]
[Outputs]
[console]
type = Console
execute_on = 'INITIAL FINAL'
[]
[out]
type = CSV
execute_on = 'INITIAL FINAL'
[]
[]
(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/chemical_reactions/test/tests/desorption/langmuir_desorption.i)
# testing the entire desorption DEs
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
xmin = 0
xmax = 1
[]
[Variables]
[./pressure]
[../]
[./conc]
family = MONOMIAL
order = CONSTANT
[../]
[]
[ICs]
[./p_ic]
type = ConstantIC
variable = pressure
value = 1.0
[../]
[./conc_ic]
type = ConstantIC
variable = conc
value = 1.0
[../]
[]
[Kernels]
[./c_dot]
type = TimeDerivative
variable = conc
[../]
[./flow_from_matrix]
type = DesorptionFromMatrix
variable = conc
pressure_var = pressure
[../]
[./rho_dot]
type = TimeDerivative
variable = pressure
[../]
[./flux_to_porespace]
type = DesorptionToPorespace
variable = pressure
conc_var = conc
[../]
[]
[Postprocessors]
[./mass_rho]
type = ElementIntegralVariablePostprocessor
block = 0
variable = pressure
execute_on = 'initial timestep_end'
[../]
[./mass_conc]
type = ElementIntegralVariablePostprocessor
block = 0
variable = conc
execute_on = 'initial timestep_end'
[../]
[./mass_tot]
type = FunctionValuePostprocessor
function = mass_fcn
execute_on = 'initial timestep_end'
[../]
[./p0]
type = PointValue
variable = pressure
point = '0 0 0'
execute_on = 'initial timestep_end'
[../]
[./c0]
type = PointValue
variable = conc
point = '0 0 0'
execute_on = 'initial timestep_end'
[../]
[]
[Functions]
[./mass_fcn]
type = ParsedFunction
expression = a+b
symbol_names = 'a b'
symbol_values = 'mass_rho mass_conc'
[../]
[]
[Materials]
[./lang_stuff]
type = LangmuirMaterial
block = 0
one_over_desorption_time_const = 0.90909091
one_over_adsorption_time_const = 0.90909091
langmuir_density = 0.88
langmuir_pressure = 1.23
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'
petsc_options_value = 'bcgs bjacobi 1E-15 1E-10 10000'
[../]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.01
end_time = 2
[]
[Outputs]
file_base = langmuir_desorption
time_step_interval = 10
csv = 10
[] # Outputs
(modules/porous_flow/test/tests/fluids/simple_fluid_MPa.i)
# Test the properties calculated by the simple fluid Material
# Pressure unit is chosen to be MPa
# Pressure 10 MPa
# Temperature = 300 K (temperature unit = K)
# Density should equal 1500*exp(1E7/1E9-2E-4*300)=1426.844 kg/m^3
# Viscosity should equal 1.1E-9 MPa.s
# Energy density should equal 4000 * 300 = 1.2E6 J/kg
# Specific enthalpy should equal 4000 * 300 + 10e6 / 1426.844 = 1.207008E6 J/kg
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 2.0E-4
cv = 4000.0
cp = 5000.0
bulk_modulus = 1.0E9
thermal_conductivity = 1.0
viscosity = 1.1E-3
density0 = 1500.0
[]
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp T'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[Variables]
[pp]
initial_condition = 10
[]
[T]
initial_condition = 300.0
[]
[]
[Kernels]
[dummy_p]
type = Diffusion
variable = pp
[]
[dummy_T]
type = Diffusion
variable = T
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = T
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
temperature_unit = Kelvin
pressure_unit = MPa
fp = the_simple_fluid
phase = 0
[]
[]
[Postprocessors]
[pressure]
type = ElementIntegralVariablePostprocessor
variable = pp
[]
[temperature]
type = ElementIntegralVariablePostprocessor
variable = T
[]
[density]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_density_qp0'
[]
[viscosity]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_viscosity_qp0'
[]
[internal_energy]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_internal_energy_qp0'
[]
[enthalpy]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_enthalpy_qp0'
[]
[]
[Executioner]
type = Steady
solve_type = Newton
[]
[Outputs]
execute_on = 'timestep_end'
csv = true
[]
(modules/combined/test/tests/optimization/thermal_sensitivity/2d_root.i)
vol_frac = 0.5
E0 = 1
Emin = 1e-4
power = 1
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 20
xmin = 0
xmax = 40
ymin = 0
ymax = 40
[]
[]
[Variables]
[T]
initial_condition = 100
[]
[]
[AuxVariables]
[Dc]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = ${vol_frac}
[]
[]
[Kernels]
[heat]
type = HeatConduction
diffusion_coefficient = k
variable = T
[]
[heat_source]
type = HeatSource
function = 1e-2
variable = T
[]
[]
[DiracKernels]
[src]
type = ConstantPointSource
variable = T
point = '0 5 0'
value = 10
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = T
boundary = 'right top bottom'
value = 0.0
[]
[]
[Materials]
[k]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${E0}-${Emin})'
coupled_variables = 'mat_den'
property_name = k
[]
[dc]
type = ThermalSensitivity
temperature = T
design_density = mat_den
thermal_conductivity = k
[]
#only needed for objective function output in postprocessor
[thermal_compliance]
type = ThermalCompliance
temperature = T
thermal_conductivity = k
[]
[]
[UserObjects]
[rad_avg]
type = RadialAverage
radius = 3
weights = linear
prop_name = thermal_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
[]
[]
[Preconditioning]
[smp]
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'
nl_abs_tol = 1e-8
dt = 1.0
dtmin = 1.0
num_steps = 20
[]
[Outputs]
[out]
type = CSV
execute_on = 'FINAL'
[]
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 = thermal_sensitivity
[]
[objective_thermal]
type = ElementIntegralMaterialProperty
mat_prop = thermal_compliance
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
(test/tests/executioners/eigen_executioners/ipm.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 100
ymin = 0
ymax = 100
elem_type = QUAD4
nx = 8
ny = 8
uniform_refine = 0
displacements = 'x_disp y_disp'
[]
#The minimum eigenvalue for this problem is 2*(pi/a)^2 + 2 with a = 100.
#Its inverse will be 0.49950700634518.
[Variables]
active = 'u'
[./u]
# second order is way better than first order
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./x_disp]
[../]
[./y_disp]
[../]
[]
[AuxKernels]
[./x_disp]
type = FunctionAux
variable = x_disp
function = x_disp_func
[../]
[./y_disp]
type = FunctionAux
variable = y_disp
function = y_disp_func
[../]
[]
[Functions]
[./x_disp_func]
type = ParsedFunction
expression = 0
[../]
[./y_disp_func]
type = ParsedFunction
expression = 0
[../]
[]
[Kernels]
active = 'diff rea rhs'
[./diff]
type = Diffusion
variable = u
use_displaced_mesh = true
[../]
[./rea]
type = CoefReaction
variable = u
coefficient = 2.0
use_displaced_mesh = true
[../]
[./rhs]
type = MassEigenKernel
variable = u
use_displaced_mesh = true
[../]
[]
[BCs]
active = 'homogeneous'
[./homogeneous]
type = DirichletBC
variable = u
boundary = '0 1 2 3'
value = 0
use_displaced_mesh = true
[../]
[]
[Executioner]
type = InversePowerMethod
min_power_iterations = 11
max_power_iterations = 400
Chebyshev_acceleration_on = true
eig_check_tol = 1e-12
k0 = 0.5
bx_norm = 'unorm'
xdiff = 'udiff'
normalization = 'unorm'
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
[]
[Postprocessors]
active = 'unorm udiff'
[./unorm]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = linear
use_displaced_mesh = true
[../]
[./udiff]
type = ElementL2Diff
variable = u
execute_on = 'linear timestep_end'
use_displaced_mesh = true
[../]
[]
[Outputs]
file_base = ipm
exodus = true
hide = 'x_disp y_disp'
[]
(test/tests/executioners/eigen_executioners/ane.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 10
elem_type = QUAD4
nx = 8
ny = 8
uniform_refine = 0
[]
# the minimum eigenvalue is (2*PI*(p-1)^(1/p)/a/p/sin(PI/p))^p;
# Its inverse is 35.349726539758187. Here a is equal to 10.
[Variables]
active = 'u'
[./u]
# second order is way better than first order
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./uic]
type = RandomIC
variable = u
[../]
[]
[Kernels]
active = 'diff rhs'
[./diff]
type = PHarmonic
variable = u
p = 3
[../]
[./rhs]
type = PMassEigenKernel
variable = u
p = 3
[../]
[]
[BCs]
active = 'homogeneous'
[./homogeneous]
type = DirichletBC
variable = u
boundary = '0 2'
value = 0
[../]
[]
[Executioner]
type = NonlinearEigen
bx_norm = 'unorm'
free_power_iterations = 10
nl_abs_tol = 1e-12
nl_rel_tol = 1e-50
k0 = 1.0
# important: constant initial value set by auto_initilization does not
# converge to the fundamental mode
auto_initialization = false
output_after_power_iterations = false
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
l_max_its = 100
[]
[Postprocessors]
active = 'unorm udiff'
[./unorm]
type = ElementIntegralVariablePostprocessor
variable = u
# execute on residual is important for nonlinear eigen solver!
execute_on = linear
[../]
[./udiff]
type = ElementL2Diff
variable = u
outputs = console
[../]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = ane
exodus = true
[]
(test/tests/multiapps/full_solve_multiapp/parent_eigen.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[rhs]
type = MassEigenKernel
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[Executioner]
type = NonlinearEigen
bx_norm = 'unorm'
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[unorm]
type = ElementIntegralVariablePostprocessor
variable = u
# execute on residual is important for nonlinear eigen solver!
execute_on = linear
[]
[]
[Outputs]
exodus = true
perf_graph = true
[]
[MultiApps]
[full_solve]
type = FullSolveMultiApp
# not setting app_type to use the same app type of parent, i.e. MooseTestApp
execute_on = initial
positions = '0 0 0'
input_files = sub.i
[]
[]
(modules/phase_field/test/tests/GBAnisotropy/test3.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 40
nz = 0
xmin = 0
xmax = 1000
ymin = 0
ymax = 1000
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[GlobalParams]
op_num = 2
var_name_base = gr
wGB = 100
length_scale = 1.0e-9
time_scale = 1.0e-9
[]
[Variables]
[./PolycrystalVariables]
order = FIRST
family = LAGRANGE
[../]
[]
[ICs]
[./PolycrystalICs]
[./BicrystalCircleGrainIC]
radius = 333.33
x = 500
y = 500
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./bnds_aux]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[../]
[]
[BCs]
[./Periodic]
[./top_bottom]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./CuGrGranisotropic]
type = GBAnisotropy
T = 600 # K
# molar_volume_value = 7.11e-6 #Units:m^3/mol
Anisotropic_GB_file_name = anisotropy.txt
inclination_anisotropy = true
delta_sigma = 0.1
delta_mob = 0.0
[../]
[]
[Postprocessors]
[./dt]
# Outputs the current time step
type = TimestepSize
[../]
[./gr1_area]
type = ElementIntegralVariablePostprocessor
variable = gr1
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_max_its = 30
l_tol = 1e-4
nl_max_its = 40
nl_rel_tol = 1e-9
num_steps = 1
dt = 150.0
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/auxkernels/forcing_function_aux/forcing_function_aux.i)
# This is a test of the ForcingFunctionAux AuxKernel.
# The diffusion equation for u is solved with boundary conditions to force a gradient
# du/dx = 2, which is constant in time.
# du/dx is integrated over the unit square domain using a postprocessor, resulting in 2.
# The value of this postprocessor is supplied to the forcing function f used by
# the ForcingFunctionAux AuxKernel, which increments the AuxVariable T.
# Since the time step is 1, the value of T increases by 2 for each time step.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./grad_u_x]
order = CONSTANT
family = MONOMIAL
initial_condition = 2
[../]
[./T]
order = CONSTANT
family = MONOMIAL
initial_condition = 100
[../]
[]
[Functions]
[./u_ic_func]
type = ParsedFunction
expression = '2*x'
[../]
[./f]
type = ParsedFunction
symbol_names = f
symbol_values = grad_int
expression = f
[../]
[]
[ICs]
[./u_ic]
type = FunctionIC
variable = u
function = u_ic_func
[../]
[]
[Kernels]
[./dudt]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./grad_u_x_aux]
type = VariableGradientComponent
variable = grad_u_x
component = x
gradient_variable = u
[../]
[./T_increment]
type = ForcingFunctionAux
variable = T
function = f
[../]
[]
[Postprocessors]
[./grad_int]
type = ElementIntegralVariablePostprocessor
variable = grad_u_x
execute_on = 'INITIAL TIMESTEP_END'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 2
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
nl_abs_tol = 1e-10
num_steps = 2
dt = 1
[]
[Outputs]
exodus = true
[]
(test/tests/transfers/multiapp_high_order_variable_transfer/sub_L2_Lagrange_conservative.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
xmax = 0.5
ymax = 0.5
[]
[AuxVariables]
[./power_density]
family = L2_LAGRANGE
order = FIRST
[../]
[]
[Variables]
[./temp]
[../]
[]
[Kernels]
[./heat_conduction]
type = Diffusion
variable = temp
[../]
[./heat_source_fuel]
type = CoupledForce
variable = temp
v = power_density
[../]
[]
[BCs]
[bc]
type = DirichletBC
variable = temp
boundary = '0 1 2 3'
value = 450
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_abs_tol = 1e-7
nl_rel_tol = 1e-7
[]
[Postprocessors]
[./temp_fuel_avg]
type = ElementAverageValue
variable = temp
[../]
[./pwr_density]
type = ElementIntegralVariablePostprocessor
block = '0'
variable = power_density
execute_on = 'transfer'
[../]
[]
[Outputs]
perf_graph = true
exodus = true
color = true
[]
(test/tests/auxkernels/normalization_aux/normalization_aux.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
initial_condition = 1.0
[../]
[]
[AuxVariables]
[./u_normalized]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./diff_u]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./normalization_auxkernel]
type = NormalizationAux
variable = u_normalized
source_variable = u
normal_factor = 2.0
execute_on = timestep_end
# Note: 'normalization' or 'shift' are provided as CLI args
[../]
[]
[BCs]
[./left_u]
type = DirichletBC
variable = u
boundary = left
value = 1
[../]
[./right_u]
type = DirichletBC
variable = u
boundary = right
value = 2
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./unorm]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = 'initial timestep_end'
[../]
[./u_normalized_norm]
type = ElementIntegralVariablePostprocessor
variable = u_normalized
execute_on = 'initial timestep_end'
[../]
[./u0]
type = PointValue
variable = u
point = '0 0 0'
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/GBAnisotropy/test1.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 60
ny = 30
nz = 0
xmin = 0
xmax = 1000
ymin = 0
ymax = 600
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[GlobalParams]
op_num = 3
var_name_base = gr
wGB = 100
length_scale = 1.0e-9
time_scale = 1.0e-9
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[ICs]
[./PolycrystalICs]
[./Tricrystal2CircleGrainsIC]
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[./unique_grains]
order = FIRST
family = LAGRANGE
[../]
[./var_indices]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./bnds_aux]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[../]
[]
[BCs]
[./Periodic]
[./top_bottom]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./CuGrGranisotropic]
type = GBAnisotropy
T = 600 # K
# molar_volume_value = 7.11e-6 #Units:m^3/mol
Anisotropic_GB_file_name = anisotropy_mobility.txt # anisotropy_energy.txt
inclination_anisotropy = false # true
[../]
[]
[Postprocessors]
[./dt]
# Outputs the current time step
type = TimestepSize
[../]
[./gr1_area]
type = ElementIntegralVariablePostprocessor
variable = gr1
[../]
[./gr2_area]
type = ElementIntegralVariablePostprocessor
variable = gr2
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 31'
l_max_its = 30
l_tol = 1e-4
nl_max_its = 40
nl_rel_tol = 1e-9
num_steps = 1
dt = 10.0
[]
[Outputs]
execute_on = 'timestep_end'
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/postprocessors/coupled_solution_dofs/coupled_solution_dofs.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 3
ny = 3
[]
[Variables]
[./u]
[../]
[]
[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
[../]
[]
[Postprocessors]
[./L2_norm]
type = ElementL2Norm
variable = u
[../]
[./integral]
type = ElementIntegralVariablePostprocessor
variable = u
[../]
[./direct_sum]
type = ElementMomentSum
variable = u
[../]
[./direct_sum_old]
type = ElementMomentSum
variable = u
implicit = false
[../]
[./direct_sum_older]
type = ElementMomentSum
variable = u
use_old = true
implicit = false
[../]
[]
[Executioner]
type = Transient
num_steps = 3
nl_abs_tol = 1e-12
[]
[Outputs]
csv = true
[]
(modules/combined/examples/optimization/2d_mbb_pde.i)
vol_frac = 0.5
E0 = 1
Emin = 1e-8
power = 2
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 150
ny = 50
xmin = 0
xmax = 30
ymin = 0
ymax = 10
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = hold_y
nodes = 0
[]
[push]
type = ExtraNodesetGenerator
input = node
new_boundary = push
coord = '30 10 0'
[]
[]
[Variables]
[Dc]
initial_condition = -1.0
[]
[]
[AuxVariables]
[Emin]
family = MONOMIAL
order = CONSTANT
initial_condition = ${Emin}
[]
[power]
family = MONOMIAL
order = CONSTANT
initial_condition = ${power}
[]
[E0]
family = MONOMIAL
order = CONSTANT
initial_condition = ${E0}
[]
[sensitivity]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[AuxKernel]
type = MaterialRealAux
variable = sensitivity
property = sensitivity
execute_on = LINEAR
[]
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = ${vol_frac}
[]
[Dc_elem]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[AuxKernel]
type = SelfAux
variable = Dc_elem
v = Dc
execute_on = 'TIMESTEP_END'
[]
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[Kernels]
[diffusion]
type = FunctionDiffusion
variable = Dc
function = 0.15 # radius coeff
[]
[potential]
type = Reaction
variable = Dc
[]
[source]
type = CoupledForce
variable = Dc
v = sensitivity
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_y
boundary = hold_y
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[boundary_penalty]
type = ADRobinBC
variable = Dc
boundary = 'left top'
coefficient = 10
[]
[boundary_penalty_right]
type = ADRobinBC
variable = Dc
boundary = 'right'
coefficient = 10
[]
[]
[NodalKernels]
[push]
type = NodalGravity
variable = disp_y
boundary = push
gravity_value = -1
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'Emin mat_den power E0'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${E0}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
incremental = false
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[update]
type = DensityUpdate
density_sensitivity = Dc_elem
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
line_search = none
nl_abs_tol = 1e-4
l_max_its = 200
start_time = 0.0
dt = 1.0
num_steps = 70
[]
[Outputs]
[out]
type = Exodus
execute_on = 'INITIAL TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Controls]
[first_period]
type = TimePeriod
start_time = 0.0
end_time = 10
enable_objects = 'BCs::boundary_penalty_right'
execute_on = 'initial timestep_begin'
[]
[]
(test/tests/kernels/hfem/lower-d-volumes.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 3
ny = 3
dim = 2
[]
build_all_side_lowerd_mesh = true
[]
[Variables]
[u]
order = THIRD
family = MONOMIAL
block = 0
[]
[uhat]
order = CONSTANT
family = MONOMIAL
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
[]
[lambda]
order = CONSTANT
family = MONOMIAL
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
[]
[lambdab]
order = CONSTANT
family = MONOMIAL
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
[]
[]
[AuxVariables]
[v]
order = CONSTANT
family = MONOMIAL
block = 0
initial_condition = '1'
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = '1'
block = 0
[]
[source]
type = CoupledForce
variable = u
v = v
coef = '1'
block = 0
[]
[reaction]
type = Reaction
variable = uhat
rate = '1'
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
[]
[uhat_coupled]
type = CoupledForce
variable = uhat
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
v = lambdab
coef = '1'
[]
[]
[DGKernels]
[surface]
type = TestLowerDVolumes
variable = u
lowerd_variable = lambda
l = 1
n = 3
[]
[]
[BCs]
[all]
type = HFEMDirichletBC
boundary = 'left right top bottom'
variable = u
lowerd_variable = lambdab
uhat = uhat
[]
[]
[Postprocessors]
[intu]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[]
[lambdanorm]
type = ElementL2Norm
variable = lambda
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu basic mumps'
[]
[Outputs]
[out]
# we hide lambda because it may flip sign due to element
# renumbering with distributed mesh
type = Exodus
hide = lambda
[]
[]
(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/porous_flow/test/tests/fluidstate/waterncg.i)
# Tests correct calculation of properties in PorousFlowWaterNCG.
# This test is run three times, with the initial condition of z (the total mass
# fraction of NCG in all phases) varied to give either a single phase liquid, a
# single phase gas, or two phases.
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 2
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pgas]
initial_condition = 1e6
[]
[z]
initial_condition = 0.005
[]
[]
[AuxVariables]
[pressure_gas]
order = CONSTANT
family = MONOMIAL
[]
[pressure_water]
order = CONSTANT
family = MONOMIAL
[]
[saturation_gas]
order = CONSTANT
family = MONOMIAL
[]
[saturation_water]
order = CONSTANT
family = MONOMIAL
[]
[density_water]
order = CONSTANT
family = MONOMIAL
[]
[density_gas]
order = CONSTANT
family = MONOMIAL
[]
[viscosity_water]
order = CONSTANT
family = MONOMIAL
[]
[viscosity_gas]
order = CONSTANT
family = MONOMIAL
[]
[enthalpy_water]
order = CONSTANT
family = MONOMIAL
[]
[enthalpy_gas]
order = CONSTANT
family = MONOMIAL
[]
[internal_energy_water]
order = CONSTANT
family = MONOMIAL
[]
[internal_energy_gas]
order = CONSTANT
family = MONOMIAL
[]
[x0_water]
order = CONSTANT
family = MONOMIAL
[]
[x0_gas]
order = CONSTANT
family = MONOMIAL
[]
[x1_water]
order = CONSTANT
family = MONOMIAL
[]
[x1_gas]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[pressure_water]
type = PorousFlowPropertyAux
variable = pressure_water
property = pressure
phase = 0
execute_on = timestep_end
[]
[pressure_gas]
type = PorousFlowPropertyAux
variable = pressure_gas
property = pressure
phase = 1
execute_on = timestep_end
[]
[saturation_water]
type = PorousFlowPropertyAux
variable = saturation_water
property = saturation
phase = 0
execute_on = timestep_end
[]
[saturation_gas]
type = PorousFlowPropertyAux
variable = saturation_gas
property = saturation
phase = 1
execute_on = timestep_end
[]
[density_water]
type = PorousFlowPropertyAux
variable = density_water
property = density
phase = 0
execute_on = timestep_end
[]
[density_gas]
type = PorousFlowPropertyAux
variable = density_gas
property = density
phase = 1
execute_on = timestep_end
[]
[viscosity_water]
type = PorousFlowPropertyAux
variable = viscosity_water
property = viscosity
phase = 0
execute_on = timestep_end
[]
[viscosity_gas]
type = PorousFlowPropertyAux
variable = viscosity_gas
property = viscosity
phase = 1
execute_on = timestep_end
[]
[enthalpy_water]
type = PorousFlowPropertyAux
variable = enthalpy_water
property = enthalpy
phase = 0
execute_on = timestep_end
[]
[enthalpy_gas]
type = PorousFlowPropertyAux
variable = enthalpy_gas
property = enthalpy
phase = 1
execute_on = timestep_end
[]
[internal_energy_water]
type = PorousFlowPropertyAux
variable = internal_energy_water
property = internal_energy
phase = 0
execute_on = timestep_end
[]
[internal_energy_gas]
type = PorousFlowPropertyAux
variable = internal_energy_gas
property = internal_energy
phase = 1
execute_on = timestep_end
[]
[x1_water]
type = PorousFlowPropertyAux
variable = x1_water
property = mass_fraction
phase = 0
fluid_component = 1
execute_on = timestep_end
[]
[x1_gas]
type = PorousFlowPropertyAux
variable = x1_gas
property = mass_fraction
phase = 1
fluid_component = 1
execute_on = timestep_end
[]
[x0_water]
type = PorousFlowPropertyAux
variable = x0_water
property = mass_fraction
phase = 0
fluid_component = 0
execute_on = timestep_end
[]
[x0_gas]
type = PorousFlowPropertyAux
variable = x0_gas
property = mass_fraction
phase = 1
fluid_component = 0
execute_on = timestep_end
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
variable = pgas
fluid_component = 0
[]
[mass1]
type = PorousFlowMassTimeDerivative
variable = z
fluid_component = 1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pgas z'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[fs]
type = PorousFlowWaterNCG
water_fp = water
gas_fp = co2
capillary_pressure = pc
[]
[]
[FluidProperties]
[co2]
type = CO2FluidProperties
[]
[water]
type = Water97FluidProperties
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = 50
[]
[waterncg]
type = PorousFlowFluidState
gas_porepressure = pgas
z = z
temperature_unit = Celsius
capillary_pressure = pc
fluid_state = fs
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-12 0 0 0 1e-12 0 0 0 1e-12'
[]
[relperm0]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[relperm1]
type = PorousFlowRelativePermeabilityCorey
n = 3
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 1
end_time = 1
nl_abs_tol = 1e-12
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[density_water]
type = ElementIntegralVariablePostprocessor
variable = density_water
[]
[density_gas]
type = ElementIntegralVariablePostprocessor
variable = density_gas
[]
[viscosity_water]
type = ElementIntegralVariablePostprocessor
variable = viscosity_water
[]
[viscosity_gas]
type = ElementIntegralVariablePostprocessor
variable = viscosity_gas
[]
[enthalpy_water]
type = ElementIntegralVariablePostprocessor
variable = enthalpy_water
[]
[enthalpy_gas]
type = ElementIntegralVariablePostprocessor
variable = enthalpy_gas
[]
[internal_energy_water]
type = ElementIntegralVariablePostprocessor
variable = internal_energy_water
[]
[internal_energy_gas]
type = ElementIntegralVariablePostprocessor
variable = internal_energy_gas
[]
[x1_water]
type = ElementIntegralVariablePostprocessor
variable = x1_water
[]
[x0_water]
type = ElementIntegralVariablePostprocessor
variable = x0_water
[]
[x1_gas]
type = ElementIntegralVariablePostprocessor
variable = x1_gas
[]
[x0_gas]
type = ElementIntegralVariablePostprocessor
variable = x0_gas
[]
[sg]
type = ElementIntegralVariablePostprocessor
variable = saturation_gas
[]
[sw]
type = ElementIntegralVariablePostprocessor
variable = saturation_water
[]
[pwater]
type = ElementIntegralVariablePostprocessor
variable = pressure_water
[]
[pgas]
type = ElementIntegralVariablePostprocessor
variable = pressure_gas
[]
[x0mass]
type = PorousFlowFluidMass
fluid_component = 0
phase = '0 1'
[]
[x1mass]
type = PorousFlowFluidMass
fluid_component = 1
phase = '0 1'
[]
[]
[Outputs]
exodus = true
file_base = waterncg_liquid
[]
(test/tests/materials/var_coupling/var_coupling.i)
# The purpose of this test is to make sure that MooseVariable dependencies from Materials are properly handled.
#
# It it's not, this test will segfault
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./aux1]
initial_condition = 1
[../]
[]
[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]
[./coupling_u]
type = VarCouplingMaterial
block = 0
var = u
[../]
[]
[Postprocessors]
[./aux1_integral]
type = ElementIntegralVariablePostprocessor
variable = aux1
execute_on = 'initial timestep_end'
[../]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(test/tests/postprocessors/table_tolerance/table_tolerance_test.i)
# This test verifies that the row tolerance for outputting and displaying postprocessors
# can be controlled via the new_row_tolerance parameter. Normally new rows are only added
# if they are above a given tolerance.
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[AuxVariables]
[./aux]
order = FIRST
family = LAGRANGE
[../]
[]
[AuxKernels]
[./func]
type = FunctionAux
function = 'sin(x + 1e12*t)'
variable = aux
execute_on = timestep_begin
[../]
[]
[Executioner]
type = Transient
num_steps = 20
# Very small timestep size
dt = 1e-13
dtmin = 1e-13
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Postprocessors]
[./integral]
type = ElementIntegralVariablePostprocessor
variable = aux
[../]
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[Outputs]
exodus = false
[./out]
type = CSV
new_row_tolerance = 1e-14
[../]
[./console]
type = Console
new_row_tolerance = 1e-14
[../]
[]
(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'
[]
[]
(test/tests/postprocessors/displaced_mesh/elemental.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 2
ny = 2
displacements = 'ux uy'
[]
[AuxVariables]
[./ux]
[./InitialCondition]
type = FunctionIC
function = x
[../]
[../]
[./uy]
[./InitialCondition]
type = FunctionIC
function = y
[../]
[../]
[./c]
initial_condition = 1
[../]
[]
[Variables]
[./a]
[../]
[]
[Kernels]
[./a]
type = Diffusion
variable = a
[../]
[]
[Postprocessors]
[./without]
type = ElementIntegralVariablePostprocessor
variable = c
execute_on = initial
[../]
[./with]
type = ElementIntegralVariablePostprocessor
variable = c
use_displaced_mesh = true
execute_on = initial
[../]
[]
[Problem]
solve = false
[]
[Executioner]
type = Transient
num_steps = 0
[]
[Outputs]
[./out]
type = Exodus
[../]
[]
(test/tests/postprocessors/element_integral/element_integral_test.i)
[Mesh]
[./square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[../]
[]
[Variables]
active = 'u'
[./u]
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff'
[./diff]
type = Diffusion
variable = u
[../]
[]
[BCs]
active = 'left right'
[./left]
type = DirichletBC
variable = u
boundary = 3
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
[]
[Postprocessors]
[./integral]
type = ElementIntegralVariablePostprocessor
variable = u
[../]
[]
[Outputs]
file_base = out
exodus = false
csv = true
[]
(modules/thermal_hydraulics/test/tests/components/free_boundary_1phase/phy.conservation_free_boundary_1phase.i)
# This test tests conservation of mass, momentum, and energy on a transient
# problem with an inlet and outlet (using free boundaries for each). This test
# takes 1 time step with Crank-Nicolson and some boundary flux integral
# post-processors needed for the full conservation statement. Lastly, the
# conservation quantities are shown on the console, which should ideally be zero
# for full conservation.
[GlobalParams]
gravity_vector = '0 0 0'
scaling_factor_1phase = '1 1 1e-6'
closures = simple_closures
[]
[Functions]
[T_fn]
type = ParsedFunction
expression = '300 + 10 * (cos(2*pi*x + pi))'
[]
[]
[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]
[inlet]
type = FreeBoundary1Phase
input = pipe:in
[]
[pipe]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 1.0
n_elems = 10
A = 1.0
initial_T = T_fn
initial_p = 1e5
initial_vel = 1
f = 0
fp = fp
[]
[outlet]
type = FreeBoundary1Phase
input = pipe:out
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = crank-nicolson
start_time = 0.0
end_time = 0.01
dt = 0.01
abort_on_solve_fail = true
solve_type = 'PJFNK'
line_search = 'basic'
nl_rel_tol = 1e-6
nl_abs_tol = 1e-4
nl_max_its = 10
l_tol = 1e-2
l_max_its = 20
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Postprocessors]
# MASS
[massflux_left]
type = MassFluxIntegral
boundary = inlet
arhouA = rhouA
[]
[massflux_right]
type = MassFluxIntegral
boundary = outlet
arhouA = rhouA
[]
[massflux_difference]
type = DifferencePostprocessor
value1 = massflux_right
value2 = massflux_left
[]
[massflux_integral]
type = TimeIntegratedPostprocessor
value = massflux_difference
[]
[mass]
type = ElementIntegralVariablePostprocessor
variable = rhoA
execute_on = 'initial timestep_end'
[]
[mass_change]
type = ChangeOverTimePostprocessor
postprocessor = mass
change_with_respect_to_initial = true
execute_on = 'initial timestep_end'
[]
[mass_conservation]
type = SumPostprocessor
values = 'mass_change massflux_integral'
[]
# MOMENTUM
[momentumflux_left]
type = MomentumFluxIntegral
boundary = inlet
arhouA = rhouA
vel = vel
p = p
A = A
[]
[momentumflux_right]
type = MomentumFluxIntegral
boundary = outlet
arhouA = rhouA
vel = vel
p = p
A = A
[]
[momentumflux_difference]
type = DifferencePostprocessor
value1 = momentumflux_right
value2 = momentumflux_left
[]
[momentumflux_integral]
type = TimeIntegratedPostprocessor
value = momentumflux_difference
[]
[momentum]
type = ElementIntegralVariablePostprocessor
variable = rhouA
execute_on = 'initial timestep_end'
[]
[momentum_change]
type = ChangeOverTimePostprocessor
postprocessor = momentum
change_with_respect_to_initial = true
execute_on = 'initial timestep_end'
[]
[momentum_conservation]
type = SumPostprocessor
values = 'momentum_change momentumflux_integral'
[]
# ENERGY
[energyflux_left]
type = EnergyFluxIntegral
boundary = inlet
arhouA = rhouA
H = H
[]
[energyflux_right]
type = EnergyFluxIntegral
boundary = outlet
arhouA = rhouA
H = H
[]
[energyflux_difference]
type = DifferencePostprocessor
value1 = energyflux_right
value2 = energyflux_left
[]
[energyflux_integral]
type = TimeIntegratedPostprocessor
value = energyflux_difference
[]
[energy]
type = ElementIntegralVariablePostprocessor
variable = rhoEA
execute_on = 'initial timestep_end'
[]
[energy_change]
type = ChangeOverTimePostprocessor
postprocessor = energy
change_with_respect_to_initial = true
execute_on = 'initial timestep_end'
[]
[energy_conservation]
type = SumPostprocessor
values = 'energy_change energyflux_integral'
[]
[]
[Outputs]
[console]
type = Console
show = 'mass_conservation momentum_conservation energy_conservation'
[]
velocity_as_vector = false
[]
(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/thermal_hydraulics/test/tests/components/shaft_connected_pump_1phase/shaft_motor_pump.i)
# Pump data used in this test comes from the Semiscale Program, summarized in NUREG/CR-4945
initial_T = 393.15
area = 1e-2
dt = 1.e-2
[GlobalParams]
initial_p = 1.4E+07
initial_T = ${initial_T}
initial_vel = 10
initial_vel_x = 10
initial_vel_y = 0
initial_vel_z = 0
A = ${area}
A_ref = ${area}
f = 100
scaling_factor_1phase = '0.04 0.04 0.04e-5'
closures = simple_closures
fp = fp
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[pump]
type = ShaftConnectedPump1Phase
inlet = 'pipe:out'
outlet = 'pipe:in'
position = '0 0 0'
scaling_factor_rhoEV = 1e-5
volume = 0.3
inertia_coeff = '1 1 1 1'
inertia_const = 1.61397
omega_rated = 314
speed_cr_I = 1e12
speed_cr_fr = 0
torque_rated = 47.1825
volumetric_rated = 1
head_rated = 58.52
tau_fr_coeff = '0 0 9.084 0'
tau_fr_const = 0
head = head_fcn
torque_hydraulic = torque_fcn
density_rated = 124.2046
[]
[pipe]
type = FlowChannel1Phase
position = '0.6096 0 0'
orientation = '1 0 0'
length = 10
n_elems = 20
[]
[motor]
type = ShaftConnectedMotor
inertia = 2
torque = 47
[]
[shaft]
type = Shaft
connected_components = 'motor pump'
initial_speed = 30
[]
[]
[Functions]
[head_fcn]
type = PiecewiseLinear
data_file = semiscale_head_data.csv
format = columns
[]
[torque_fcn]
type = PiecewiseLinear
data_file = semiscale_torque_data.csv
format = columns
[]
[S_energy_fcn]
type = ParsedFunction
expression = '-tau_hyd * omega'
symbol_names = 'tau_hyd omega'
symbol_values = 'pump:hydraulic_torque shaft:omega'
[]
[energy_conservation_fcn]
type = ParsedFunction
expression = '(E_change - S_energy * dt) / E_tot'
symbol_names = 'E_change S_energy dt E_tot'
symbol_values = 'E_change S_energy ${dt} E_tot'
[]
[]
[Postprocessors]
# mass conservation
[mass_pipes]
type = ElementIntegralVariablePostprocessor
variable = rhoA
block = 'pipe'
execute_on = 'initial timestep_end'
[]
[mass_pump]
type = ScalarVariable
variable = pump:rhoV
execute_on = 'initial timestep_end'
[]
[mass_tot]
type = SumPostprocessor
values = 'mass_pipes mass_pump'
execute_on = 'initial timestep_end'
[]
[mass_conservation]
type = ChangeOverTimePostprocessor
postprocessor = mass_tot
change_with_respect_to_initial = true
compute_relative_change = true
execute_on = 'initial timestep_end'
[]
# energy conservation
[E_pipes]
type = ElementIntegralVariablePostprocessor
variable = rhoEA
block = 'pipe'
execute_on = 'initial timestep_end'
[]
[E_pump]
type = ScalarVariable
variable = pump:rhoEV
execute_on = 'initial timestep_end'
[]
[E_tot]
type = LinearCombinationPostprocessor
pp_coefs = '1 1'
pp_names = 'E_pipes E_pump'
execute_on = 'initial timestep_end'
[]
[S_energy]
type = FunctionValuePostprocessor
function = S_energy_fcn
execute_on = 'initial timestep_end'
[]
[E_change]
type = ChangeOverTimePostprocessor
postprocessor = E_tot
execute_on = 'initial timestep_end'
[]
# This should also execute on initial. This value is
# lagged by one timestep as a workaround to moose issue #13262.
[energy_conservation]
type = FunctionValuePostprocessor
function = energy_conservation_fcn
execute_on = 'timestep_end'
indirect_dependencies = 'E_tot E_change S_energy'
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
dt = ${dt}
num_steps = 6
solve_type = 'NEWTON'
line_search = 'basic'
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-6
nl_max_its = 15
l_tol = 1e-4
l_max_its = 10
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Outputs]
velocity_as_vector = false
[]
(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
[]
(test/tests/ics/array_function_ic/array_function_ic_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 8
[]
[Problem]
kernel_coverage_check = false
solve = false
[]
[Variables]
[u]
components = 2
[]
[u0]
[]
[u1]
[]
[]
[AuxVariables]
[v]
components = 2
[]
[]
[Functions]
[sinx]
type = ParsedFunction
expression = sin(x)
[]
[siny]
type = ParsedFunction
expression = sin(y)
[]
[]
[ICs]
[uic]
type = ArrayFunctionIC
variable = u
function = 'sinx siny'
[]
[u0ic]
type = FunctionIC
variable = u0
function = sinx
[]
[u1ic]
type = FunctionIC
variable = u1
function = siny
[]
[vic]
type = ArrayFunctionIC
variable = v
function = 'sinx siny'
[]
[]
[Postprocessors]
[uint0]
type = ElementIntegralArrayVariablePostprocessor
variable = u
component = 0
[]
[uint1]
type = ElementIntegralArrayVariablePostprocessor
variable = u
component = 1
[]
[u0int]
type = ElementIntegralVariablePostprocessor
variable = u0
[]
[u1int]
type = ElementIntegralVariablePostprocessor
variable = u1
[]
[vint0]
type = ElementIntegralArrayVariablePostprocessor
variable = v
component = 0
[]
[vint1]
type = ElementIntegralArrayVariablePostprocessor
variable = v
component = 1
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(test/tests/outputs/exodus/exodus_side_discontinuous.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
elem_type = QUAD9 # SIDE_HIERARCHIC needs side nodes
nx = 3
ny = 3
dim = 2
[]
[]
[Variables]
[u]
order = THIRD
family = MONOMIAL
[]
[lambda]
family = SIDE_HIERARCHIC
order = CONSTANT
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = '1'
[]
[source]
type = BodyForce
variable = u
value = '1'
[]
[]
[DGKernels]
[testjumps]
type = HFEMTestJump
variable = u
side_variable = lambda
[]
[trialjumps]
type = HFEMTrialJump
variable = lambda
interior_variable = u
[]
[]
[BCs]
[u_robin]
type = VacuumBC
boundary = 'left right top bottom'
variable = u
[]
[lambda_D_unused]
type = PenaltyDirichletBC
boundary = 'left right top bottom'
variable = lambda
penalty = 1
[]
[]
[Postprocessors]
[intu]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[]
[lambdanorm]
type = ElementSidesL2Norm
variable = lambda
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu basic mumps'
[]
[Outputs]
[out]
type = Exodus
discontinuous = true
side_discontinuous = true
file_base = 'exodus_side_discontinuous_out'
[]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_cylinder.i)
rpv_core_gap_size = 0.15
core_outer_radius = 2
rpv_inner_radius = '${fparse 2 + rpv_core_gap_size}'
rpv_outer_radius = '${fparse 2.5 + rpv_core_gap_size}'
rpv_outer_htc = 10 # W/m^2/K
rpv_outer_Tinf = 300 # K
core_blocks = '1'
rpv_blocks = '3'
[Mesh]
[core_gap_rpv]
type = ConcentricCircleMeshGenerator
num_sectors = 10
radii = '${core_outer_radius} ${rpv_inner_radius} ${rpv_outer_radius}'
rings = '2 1 2'
has_outer_square = false
preserve_volumes = true
portion = full
[]
[rename_core_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = core_gap_rpv
primary_block = 1
paired_block = 2
new_boundary = 'core_outer'
[]
[rename_inner_rpv_bdy]
type = SideSetsBetweenSubdomainsGenerator
input = rename_core_bdy
primary_block = 3
paired_block = 2
new_boundary = 'rpv_inner'
[]
[2d_mesh]
type = BlockDeletionGenerator
input = rename_inner_rpv_bdy
block = 2
[]
allow_renumbering = false
[]
[Variables]
[Tsolid]
initial_condition = 500
[]
[]
[Kernels]
[heat_source]
type = CoupledForce
variable = Tsolid
block = '${core_blocks}'
v = power_density
[]
[heat_conduction]
type = HeatConduction
variable = Tsolid
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = Tsolid
boundary = 'outer' # outer RPV
coefficient = ${rpv_outer_htc}
T_infinity = ${rpv_outer_Tinf}
[]
[]
[ThermalContact]
[RPV_gap]
type = GapHeatTransfer
gap_geometry_type = 'CYLINDER'
emissivity_primary = 0.8
emissivity_secondary = 0.8
variable = Tsolid
primary = 'core_outer'
secondary = 'rpv_inner'
gap_conductivity = 0.1
quadrature = true
cylinder_axis_point_1 = '0 0 0'
cylinder_axis_point_2 = '0 0 5'
[]
[]
[AuxVariables]
[power_density]
block = '${core_blocks}'
initial_condition = 50e3
[]
[]
[Materials]
[simple_mat]
type = HeatConductionMaterial
thermal_conductivity = 34.6 # W/m/K
[]
[]
[Postprocessors]
[Tcore_avg]
type = ElementAverageValue
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${core_blocks}'
[]
[Tcore_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${core_blocks}'
[]
[Trpv_avg]
type = ElementAverageValue
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_max]
type = ElementExtremeValue
value_type = max
variable = Tsolid
block = '${rpv_blocks}'
[]
[Trpv_min]
type = ElementExtremeValue
value_type = min
variable = Tsolid
block = '${rpv_blocks}'
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = '${core_blocks}'
[]
[rpv_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = Tsolid
boundary = 'outer' # outer RVP
T_fluid = ${rpv_outer_Tinf}
htc = ${rpv_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(rpv_convective_out - ptot) / ptot'
pp_names = 'rpv_convective_out ptot'
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = 'rpv_inner core_outer'
variable = Tsolid
[]
[]
[Executioner]
type = Steady
automatic_scaling = true
compute_scaling_once = false
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
l_max_its = 100
[Quadrature]
side_order = seventh
[]
line_search = none
[]
[Outputs]
exodus = false
csv = 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
[]
(test/tests/interfacekernels/2d_interface/coupled_value_coupled_flux.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 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]
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
[../]
[./source_u]
type = BodyForce
variable = u
value = 1
[../]
[]
[InterfaceKernels]
[./interface]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
[../]
[]
[BCs]
[./u]
type = VacuumBC
variable = u
boundary = 'left_to_0 bottom_to_0 right top'
[../]
[./v]
type = VacuumBC
variable = v
boundary = 'left_to_1 bottom_to_1'
[../]
[]
[Postprocessors]
[./u_int]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[../]
[./v_int]
type = ElementIntegralVariablePostprocessor
variable = v
block = 1
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
(modules/phase_field/test/tests/grain_growth/temperature_gradient.i)
#
# This test ensures that a flat grain boundary does not move
# under a temperature gradient using the normal grain growth model
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 20
xmax = 1000
ymax = 500
elem_type = QUAD
[]
[GlobalParams]
op_num = 2
var_name_base = gr
[]
[Functions]
[./TGradient]
type = ParsedFunction
expression = '450 + 0.1*x'
[../]
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[ICs]
[./PolycrystalICs]
[./BicrystalBoundingBoxIC]
x1 = 0.0
x2 = 500.0
y1 = 0.0
y2 = 500.0
[../]
[../]
[]
[AuxVariables]
[./bnds]
[../]
[./T]
[../]
[]
[Kernels]
[./PolycrystalKernel]
variable_mobility = true
coupled_variables = 'T'
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[../]
[./Tgrad]
type = FunctionAux
variable = T
function = TGradient
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
T = T # K
wGB = 60 # nm
GBmob0 = 2.5e-6 # m^4/(Js) from Schoenfelder 1997
Q = 0.23 # Migration energy in eV
GBenergy = 0.708 # GB energy in J/m^2
[../]
[]
[Postprocessors]
[./gr0_area]
type = ElementIntegralVariablePostprocessor
variable = gr0
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 = 20
nl_rel_tol = 1.0e-9
start_time = 0.0
num_steps = 10
dt = 100.0
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/actions/grain_growth_with_T_grad.i)
#
# This test ensures that a flat grain boundary does not move
# under a temperature gradient using the normal grain growth model
#
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 20
xmax = 1000
ymax = 500
elem_type = QUAD
[]
[GlobalParams]
op_num = 2
var_name_base = gr
[]
[Modules]
[./PhaseField]
[./GrainGrowth]
coupled_variables = T
variable_mobility = true
[../]
[../]
[]
[Functions]
[./TGradient]
type = ParsedFunction
expression = '450 + 0.1*x'
[../]
[]
[ICs]
[./PolycrystalICs]
[./BicrystalBoundingBoxIC]
x1 = 0.0
x2 = 500.0
y1 = 0.0
y2 = 500.0
[../]
[../]
[]
[AuxVariables]
[./T]
[../]
[]
[AuxKernels]
[./Tgrad]
type = FunctionAux
variable = T
function = TGradient
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
T = T # K
wGB = 60 # nm
GBmob0 = 2.5e-6 # m^4/(Js) from Schoenfelder 1997
Q = 0.23 # Migration energy in eV
GBenergy = 0.708 # GB energy in J/m^2
[../]
[]
[Postprocessors]
[./gr0_area]
type = ElementIntegralVariablePostprocessor
variable = gr0
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 = 20
nl_rel_tol = 1.0e-9
start_time = 0.0
num_steps = 10
dt = 100.0
[]
[Outputs]
exodus = true
[]
(test/tests/dgkernels/hfem/hfem_jacobian.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
elem_type = QUAD9 # SIDE_HIERARCHIC needs side nodes
nx = 3
ny = 3
dim = 2
[]
[]
[Variables]
[u]
order = FOURTH
family = MONOMIAL
[]
[lambda]
family = SIDE_HIERARCHIC
order = FIRST
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = '1'
[]
[source]
type = BodyForce
variable = u
value = '1'
[]
[]
[DGKernels]
[testjumps]
type = HFEMTestJump
variable = u
side_variable = lambda
[]
[trialjumps]
type = HFEMTrialJump
variable = lambda
interior_variable = u
[]
[]
[BCs]
[u_robin]
type = VacuumBC
boundary = 'left right top bottom'
variable = u
[]
[lambda_D_unused]
type = PenaltyDirichletBC
boundary = 'left right top bottom'
variable = lambda
penalty = 1
[]
[]
[Postprocessors]
[intu]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[]
[lambdanorm]
type = ElementSidesL2Norm
variable = lambda
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu basic mumps'
[]
(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'
[]
[]
(test/tests/transfers/multiapp_conservative_transfer/primary_skipped_adjuster.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
[]
[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]
[var]
family = MONOMIAL
order = THIRD
[]
[]
[ICs]
[var_ic]
type = FunctionIC
variable = var
function = '-exp(x * y)'
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
input_files = secondary_negative_adjuster.i
execute_on = timestep_begin
[]
[]
[Postprocessors]
[from_postprocessor]
type = ElementIntegralVariablePostprocessor
variable = var
[]
[]
[Transfers]
[to_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
source_variable = var
variable = var
to_multi_app = sub
from_postprocessors_to_be_preserved = 'from_postprocessor'
to_postprocessors_to_be_preserved = 'to_postprocessor'
allow_skipped_adjustment = true
[]
[]
[Outputs]
exodus = true
[]
(modules/porous_flow/test/tests/fluids/simple_fluid_dy.i)
# Test the properties calculated by the simple fluid Material
# Time unit is chosen to be days
# Pressure 10 MPa
# Temperature = 300 K (temperature unit = K)
# Density should equal 1500*exp(1E7/1E9-2E-4*300)=1426.844 kg/m^3
# Viscosity should equal 1.27E-8 Pa.dy
# Energy density should equal 4000 * 300 = 1.2E6 J/kg
# Specific enthalpy should equal 4000 * 300 + 10e6 / 1426.844 = 1.207008E6 J/kg
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 2.0E-4
cv = 4000.0
cp = 5000.0
bulk_modulus = 1.0E9
thermal_conductivity = 1.0
viscosity = 1.1E-3
density0 = 1500.0
[]
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp T'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[Variables]
[pp]
initial_condition = 10E6
[]
[T]
initial_condition = 300.0
[]
[]
[Kernels]
[dummy_p]
type = Diffusion
variable = pp
[]
[dummy_T]
type = Diffusion
variable = T
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = T
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
temperature_unit = Kelvin
time_unit = days
fp = the_simple_fluid
phase = 0
[]
[]
[Postprocessors]
[pressure]
type = ElementIntegralVariablePostprocessor
variable = pp
[]
[temperature]
type = ElementIntegralVariablePostprocessor
variable = T
[]
[density]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_density_qp0'
[]
[viscosity]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_viscosity_qp0'
[]
[internal_energy]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_internal_energy_qp0'
[]
[enthalpy]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_enthalpy_qp0'
[]
[]
[Executioner]
type = Steady
solve_type = Newton
[]
[Outputs]
execute_on = 'timestep_end'
csv = true
[]
(test/tests/restart/restart_transient_from_steady/restart_trans_with_sub_sub.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[AuxVariables]
[./power_density]
[../]
[]
[Variables]
[./temp]
# initial_condition = 1000000
[../]
[]
[Kernels]
[./heat_conduction]
type = Diffusion
variable = temp
[../]
[./heat_ie]
type = TimeDerivative
variable = temp
[../]
[./heat_source_fuel]
type = CoupledForce
variable = temp
v = power_density
[../]
[]
[BCs]
[bc]
type = DirichletBC
variable = temp
boundary = '0 1 2 3'
value = 450
[]
[]
[Executioner]
type = Transient
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
start_time = 0
end_time = 3
dt = 1.0
nl_abs_tol = 1e-7
nl_rel_tol = 1e-7
[]
[Postprocessors]
[./temp_fuel_avg]
type = ElementAverageValue
variable = temp
block = '0'
execute_on = 'initial timestep_end'
[../]
[./pwr_density]
type = ElementIntegralVariablePostprocessor
block = '0'
variable = power_density
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
perf_graph = true
exodus = true
color = true
[]
(test/tests/multiapps/override_cliargs/sub.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 1
nx = 10
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
value = 0
boundary = left
[]
[right]
type = DirichletBC
variable = u
value = 1
boundary = left
[]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[integral]
type = ElementIntegralVariablePostprocessor
variable = u
[]
[]
[Outputs]
exodus = true
[]
(modules/combined/examples/optimization/multi-load/square_subapp_two.i)
power = 1.0
E0 = 1.0
Emin = 1.0e-6
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[Bottom]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 100
xmin = 0
xmax = 150
ymin = 0
ymax = 150
[]
[left_load]
type = ExtraNodesetGenerator
input = Bottom
new_boundary = left_load
coord = '0 150 0'
[]
[right_load]
type = ExtraNodesetGenerator
input = left_load
new_boundary = right_load
coord = '150 150 0'
[]
[left_support]
type = ExtraNodesetGenerator
input = right_load
new_boundary = left_support
coord = '0 0 0'
[]
[right_support]
type = ExtraNodesetGenerator
input = left_support
new_boundary = right_support
coord = '150 0 0'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[Dc]
family = MONOMIAL
order = SECOND
initial_condition = -1.0
[]
[Cc]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = 0.25
[]
[sensitivity_var]
family = MONOMIAL
order = SECOND
initial_condition = -1.0
[]
[]
[AuxKernels]
[sensitivity_kernel]
type = MaterialRealAux
check_boundary_restricted = false
property = sensitivity
variable = sensitivity_var
execute_on = 'TIMESTEP_END'
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[BCs]
[no_y]
type = DirichletBC
variable = disp_y
boundary = left_support
value = 0.0
[]
[no_x]
type = DirichletBC
variable = disp_x
boundary = left_support
value = 0.0
[]
[no_y_right]
type = DirichletBC
variable = disp_y
boundary = right_support
value = 0.0
[]
[no_x_right]
type = DirichletBC
variable = disp_x
boundary = right_support
value = 0.0
[]
[]
[NodalKernels]
[push_right]
type = NodalGravity
variable = disp_y
boundary = right_load
gravity_value = 1e-3
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${E0}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
# We do averaging in subapps
[rad_avg]
type = RadialAverage
radius = 8
weights = linear
prop_name = sensitivity
execute_on = TIMESTEP_END
force_preaux = true
[]
[calc_sense]
type = SensitivityFilter
density_sensitivity = Dc
design_density = mat_den
filter_UO = rad_avg
execute_on = TIMESTEP_END
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
nl_abs_tol = 1e-10
dt = 1.0
num_steps = 10
[]
[Outputs]
exodus = true
[out]
type = CSV
execute_on = 'TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[mesh_volume]
type = VolumePostprocessor
execute_on = 'initial timestep_end'
[]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[vol_frac]
type = ParsedPostprocessor
function = 'total_vol / mesh_volume'
pp_names = 'total_vol mesh_volume'
[]
[sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = sensitivity
execute_on = 'TIMESTEP_BEGIN TIMESTEP_END NONLINEAR'
[]
[objective]
type = ElementIntegralMaterialProperty
mat_prop = strain_energy_density
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
(test/tests/kernels/scalar_constraint/scalar_constraint_kernel.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -1
xmax = 1
ymin = -1
ymax = 1
nx = 2
ny = 2
elem_type = QUAD9
[]
[Functions]
[./exact_fn]
type = ParsedFunction
expression = 'x*x+y*y'
[../]
[./ffn]
type = ParsedFunction
expression = -4
[../]
[./bottom_bc_fn]
type = ParsedFunction
expression = -2*y
[../]
[./right_bc_fn]
type = ParsedFunction
expression = 2*x
[../]
[./top_bc_fn]
type = ParsedFunction
expression = 2*y
[../]
[./left_bc_fn]
type = ParsedFunction
expression = -2*x
[../]
[]
[Variables]
[./u]
family = LAGRANGE
order = SECOND
[../]
[./lambda]
family = SCALAR
order = FIRST
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[./ffnk]
type = BodyForce
variable = u
function = ffn
[../]
[./sk_lm]
type = ScalarLagrangeMultiplier
variable = u
lambda = lambda
[../]
[]
[ScalarKernels]
[./constraint]
type = AverageValueConstraint
variable = lambda
pp_name = pp
value = 2.666666666666666
[../]
[]
[BCs]
[./bottom]
type = FunctionNeumannBC
variable = u
boundary = 'bottom'
function = bottom_bc_fn
[../]
[./right]
type = FunctionNeumannBC
variable = u
boundary = 'right'
function = right_bc_fn
[../]
[./top]
type = FunctionNeumannBC
variable = u
boundary = 'top'
function = top_bc_fn
[../]
[./left]
type = FunctionNeumannBC
variable = u
boundary = 'left'
function = left_bc_fn
[../]
[]
[Postprocessors]
[./pp]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = linear
[../]
[./l2_err]
type = ElementL2Error
variable = u
function = exact_fn
execute_on = 'initial timestep_end'
[../]
[]
[Preconditioning]
[./pc]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-9
l_tol = 1.e-10
nl_max_its = 10
# This example builds an indefinite matrix, so "-pc_type hypre -pc_hypre_type boomeramg" cannot
# be used reliably on this problem. ILU(0) seems to do OK in both serial and parallel in my testing,
# I have not seen any zero pivot issues.
petsc_options_iname = '-pc_type -sub_pc_type'
petsc_options_value = 'bjacobi ilu'
# This is a linear problem, so we don't need to recompute the
# Jacobian. This isn't a big deal for a Steady problems, however, as
# there is only one solve.
solve_type = 'LINEAR'
[]
[Outputs]
exodus = true
hide = lambda
[]
(test/tests/outputs/debug/show_execution_userobjects.i)
[Mesh]
[cmg]
type = CartesianMeshGenerator
dim = 2
dx = '1.5 2.4'
dy = '1.3 0.9'
ix = '3 2'
iy = '2 3'
subdomain_id = '0 1
1 0'
[]
[add_interface]
type = SideSetsBetweenSubdomainsGenerator
input = 'cmg'
primary_block = 0
paired_block = 1
new_boundary = 'interface'
[]
second_order = true
[]
[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 = SECOND
family = HIERARCHIC
[]
[v]
order = SECOND
family = LAGRANGE
initial_condition = 1
[]
[]
[AuxVariables]
[v_elem]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
active = 'diff1 diff2 test1 forceu forcev react'
[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
[]
[]
[AuxKernels]
[set_v_elem]
type = FunctionAux
variable = v_elem
# selected not to be the solution for no particular reason
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'
[]
[]
[Postprocessors]
# Global user objects
[dofs]
type = NumDOFs
[]
[h]
type = AverageElementSize
[]
# Elemental user objects
[L2u]
type = ElementL2Error
variable = u
function = slnu
# Testing an option
force_preic = true
[]
[L2v]
type = ElementL2Error
variable = v
function = slnv
# Testing an option
force_preaux = true
[]
[H1error]
type = ElementH1Error
variable = u
function = slnu
[]
[H1Semierror]
type = ElementH1SemiError
variable = u
function = slnu
[]
[L2v_elem]
type = ElementL2Error
variable = v_elem
function = slnv
[]
[f_integral]
type = FunctionElementIntegral
function = slnv
[]
[int_v]
type = ElementIntegralVariablePostprocessor
variable = v
block = 1
execute_on = 'TIMESTEP_END transfer'
[]
[int_v_elem]
type = ElementIntegralVariablePostprocessor
variable = v_elem
block = 1
execute_on = 'TIMESTEP_END transfer'
[]
# Side user objects
[integral_v]
type = SideIntegralVariablePostprocessor
variable = v
boundary = 0
[]
[]
[VectorPostprocessors]
# General UOs
[memory]
type = VectorMemoryUsage
[]
[line]
type = LineValueSampler
variable = v
num_points = 10
start_point = '0 0 0'
end_point = '0.5 0.5 0'
sort_by = 'x'
[]
# Nodal UOs
[nodal_sampler_y]
type = NodalValueSampler
variable = v
sort_by = 'y'
[]
[nodal_sampler_x]
type = NodalValueSampler
variable = v
sort_by = 'x'
[]
# Element UO
[elem_sample]
type = ElementValueSampler
variable = v_elem
sort_by = 'x'
[]
[]
[UserObjects]
# Nodal user objects
[find_node]
type = NearestNodeNumberUO
point = '0.5 0.5 0'
[]
# Side user objects
[side_int]
type = LayeredSideIntegral
variable = v
boundary = 0
direction = y
num_layers = 4
[]
[side_int_2]
type = NearestPointLayeredSideIntegral
variable = v
boundary = 0
direction = x
num_layers = 3
points = '1 1 0'
[]
# Interface user objects
[values]
type = InterfaceQpValueUserObject
var = v
boundary = interface
[]
inactive = 'prime_1 prime_2'
# Threaded general user objects
[prime_2]
type = PrimeProductUserObject
[]
[prime_1]
type = PrimeProductUserObject
[]
# Domain user objects
[domain_2]
type = InterfaceDomainUserObject
u = u
v = v
block = '0'
robin_boundaries = 'left'
interface_boundaries = 'interface'
interface_penalty = 1e-10
nl_abs_tol = 1e1
[]
[domain_1]
type = InterfaceDomainUserObject
u = u
v = v
block = '0 1'
robin_boundaries = 'left'
interface_boundaries = 'interface'
interface_penalty = 1e-10
nl_abs_tol = 1e1
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
l_tol = 1e-5
[]
[Problem]
kernel_coverage_check = false
[]
[MultiApps]
active = ''
[full_solve]
type = FullSolveMultiApp
execute_on = 'initial timestep_end final'
input_files = show_execution_userobjects.i
cli_args = 'Problem/solve=false'
[]
[]
[Transfers]
active = ''
[conservative]
type = MultiAppNearestNodeTransfer
from_multi_app = full_solve
source_variable = v
variable = v_elem
from_postprocessors_to_be_preserved = int_v
to_postprocessors_to_be_preserved = int_v_elem
[]
[]
[Debug]
show_execution_order = 'ALWAYS INITIAL NONLINEAR LINEAR TIMESTEP_BEGIN TIMESTEP_END FINAL'
[]
(modules/porous_flow/test/tests/fluidstate/brineco2_fv.i)
# Tests correct calculation of properties in PorousFlowBrineCO2 using FV variables
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 2
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
temperature = 30
[]
[Variables]
[pg]
type = MooseVariableFVReal
initial_condition = 20e6
[]
[z]
type = MooseVariableFVReal
initial_condition = 0.2
[]
[]
[AuxVariables]
[xnacl]
type = MooseVariableFVReal
initial_condition = 0.1
[]
[pressure_gas]
type = MooseVariableFVReal
[]
[pressure_water]
type = MooseVariableFVReal
[]
[saturation_gas]
type = MooseVariableFVReal
[]
[saturation_water]
type = MooseVariableFVReal
[]
[density_water]
type = MooseVariableFVReal
[]
[density_gas]
type = MooseVariableFVReal
[]
[viscosity_water]
type = MooseVariableFVReal
[]
[viscosity_gas]
type = MooseVariableFVReal
[]
[enthalpy_water]
type = MooseVariableFVReal
[]
[enthalpy_gas]
type = MooseVariableFVReal
[]
[internal_energy_water]
type = MooseVariableFVReal
[]
[internal_energy_gas]
type = MooseVariableFVReal
[]
[x0_water]
type = MooseVariableFVReal
[]
[x0_gas]
type = MooseVariableFVReal
[]
[x1_water]
type = MooseVariableFVReal
[]
[x1_gas]
type = MooseVariableFVReal
[]
[]
[AuxKernels]
[pressure_water]
type = ADPorousFlowPropertyAux
variable = pressure_water
property = pressure
phase = 0
execute_on = 'timestep_end'
[]
[pressure_gas]
type = ADPorousFlowPropertyAux
variable = pressure_gas
property = pressure
phase = 1
execute_on = 'timestep_end'
[]
[saturation_water]
type = ADPorousFlowPropertyAux
variable = saturation_water
property = saturation
phase = 0
execute_on = 'timestep_end'
[]
[saturation_gas]
type = ADPorousFlowPropertyAux
variable = saturation_gas
property = saturation
phase = 1
execute_on = 'timestep_end'
[]
[density_water]
type = ADPorousFlowPropertyAux
variable = density_water
property = density
phase = 0
execute_on = 'timestep_end'
[]
[density_gas]
type = ADPorousFlowPropertyAux
variable = density_gas
property = density
phase = 1
execute_on = 'timestep_end'
[]
[viscosity_water]
type = ADPorousFlowPropertyAux
variable = viscosity_water
property = viscosity
phase = 0
execute_on = 'timestep_end'
[]
[viscosity_gas]
type = ADPorousFlowPropertyAux
variable = viscosity_gas
property = viscosity
phase = 1
execute_on = 'timestep_end'
[]
[enthalpy_water]
type = ADPorousFlowPropertyAux
variable = enthalpy_water
property = enthalpy
phase = 0
execute_on = 'timestep_end'
[]
[enthalpy_gas]
type = ADPorousFlowPropertyAux
variable = enthalpy_gas
property = enthalpy
phase = 1
execute_on = 'timestep_end'
[]
[internal_energy_water]
type = ADPorousFlowPropertyAux
variable = internal_energy_water
property = internal_energy
phase = 0
execute_on = 'timestep_end'
[]
[internal_energy_gas]
type = ADPorousFlowPropertyAux
variable = internal_energy_gas
property = internal_energy
phase = 1
execute_on = 'timestep_end'
[]
[x1_water]
type = ADPorousFlowPropertyAux
variable = x1_water
property = mass_fraction
phase = 0
fluid_component = 1
execute_on = 'timestep_end'
[]
[x1_gas]
type = ADPorousFlowPropertyAux
variable = x1_gas
property = mass_fraction
phase = 1
fluid_component = 1
execute_on = 'timestep_end'
[]
[x0_water]
type = ADPorousFlowPropertyAux
variable = x0_water
property = mass_fraction
phase = 0
fluid_component = 0
execute_on = 'timestep_end'
[]
[x0_gas]
type = ADPorousFlowPropertyAux
variable = x0_gas
property = mass_fraction
phase = 1
fluid_component = 0
execute_on = 'timestep_end'
[]
[]
[FVKernels]
[mass0]
type = FVPorousFlowMassTimeDerivative
variable = pg
fluid_component = 0
[]
[mass1]
type = FVPorousFlowMassTimeDerivative
variable = z
fluid_component = 1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pg z'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[fs]
type = PorousFlowBrineCO2
brine_fp = brine
co2_fp = co2
capillary_pressure = pc
[]
[]
[FluidProperties]
[co2]
type = CO2FluidProperties
[]
[brine]
type = BrineFluidProperties
[]
[]
[Materials]
[temperature]
type = ADPorousFlowTemperature
[]
[brineco2]
type = ADPorousFlowFluidState
gas_porepressure = pg
z = z
temperature_unit = Celsius
xnacl = xnacl
capillary_pressure = pc
fluid_state = fs
[]
[permeability]
type = ADPorousFlowPermeabilityConst
permeability = '1e-12 0 0 0 1e-12 0 0 0 1e-12'
[]
[relperm0]
type = ADPorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[relperm1]
type = ADPorousFlowRelativePermeabilityCorey
n = 3
phase = 1
[]
[porosity]
type = ADPorousFlowPorosityConst
porosity = 0.1
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 1
end_time = 1
nl_abs_tol = 1e-12
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[density_water]
type = ElementIntegralVariablePostprocessor
variable = density_water
execute_on = 'timestep_end'
[]
[density_gas]
type = ElementIntegralVariablePostprocessor
variable = density_gas
execute_on = 'timestep_end'
[]
[viscosity_water]
type = ElementIntegralVariablePostprocessor
variable = viscosity_water
execute_on = 'timestep_end'
[]
[viscosity_gas]
type = ElementIntegralVariablePostprocessor
variable = viscosity_gas
execute_on = 'timestep_end'
[]
[enthalpy_water]
type = ElementIntegralVariablePostprocessor
variable = enthalpy_water
execute_on = 'timestep_end'
[]
[enthalpy_gas]
type = ElementIntegralVariablePostprocessor
variable = enthalpy_gas
execute_on = 'timestep_end'
[]
[internal_energy_water]
type = ElementIntegralVariablePostprocessor
variable = internal_energy_water
execute_on = 'timestep_end'
[]
[internal_energy_gas]
type = ElementIntegralVariablePostprocessor
variable = internal_energy_gas
execute_on = 'timestep_end'
[]
[x1_water]
type = ElementIntegralVariablePostprocessor
variable = x1_water
execute_on = 'timestep_end'
[]
[x0_water]
type = ElementIntegralVariablePostprocessor
variable = x0_water
execute_on = 'timestep_end'
[]
[x1_gas]
type = ElementIntegralVariablePostprocessor
variable = x1_gas
execute_on = 'timestep_end'
[]
[x0_gas]
type = ElementIntegralVariablePostprocessor
variable = x0_gas
execute_on = 'timestep_end'
[]
[sg]
type = ElementIntegralVariablePostprocessor
variable = saturation_gas
execute_on = 'timestep_end'
[]
[sw]
type = ElementIntegralVariablePostprocessor
variable = saturation_water
execute_on = 'timestep_end'
[]
[pwater]
type = ElementIntegralVariablePostprocessor
variable = pressure_water
execute_on = 'timestep_end'
[]
[pgas]
type = ElementIntegralVariablePostprocessor
variable = pressure_gas
execute_on = 'timestep_end'
[]
[x0mass]
type = FVPorousFlowFluidMass
fluid_component = 0
phase = '0 1'
[]
[x1mass]
type = FVPorousFlowFluidMass
fluid_component = 1
phase = '0 1'
[]
[]
[Outputs]
csv = true
file_base = brineco2
execute_on = 'timestep_end'
perf_graph = false
[]
(test/tests/interfacekernels/gmsh_sidesets/coupled_value_coupled_flux.i)
[Mesh]
file = gmsh_mesh.msh
[]
[Variables]
[./u]
block = 6
[../]
[./v]
block = 5
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 4
block = 6
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 5
[../]
[./source_u]
type = BodyForce
variable = u
value = 1
[../]
[]
[InterfaceKernels]
[./interface]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = '1 2'
penalty = 1e6
[../]
[]
[BCs]
[./u]
type = VacuumBC
variable = u
boundary = 4
[../]
[./v]
type = VacuumBC
variable = v
boundary = 3
[../]
[]
[Postprocessors]
[./u_int]
type = ElementIntegralVariablePostprocessor
variable = u
block = 6
[../]
[./v_int]
type = ElementIntegralVariablePostprocessor
variable = v
block = 5
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
(test/tests/interfacekernels/ik_displaced/displaced.i)
[Mesh]
displacements = 'disp_x disp_y'
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 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
[../]
[]
[AuxVariables]
[./disp_x]
[../]
[./disp_y]
[../]
[]
[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
[../]
[./source_u]
type = BodyForce
variable = u
value = 1
[../]
[]
[InterfaceKernels]
[./interface]
type = InterfacialSource
variable = u
neighbor_var = v
boundary = primary0_interface
use_displaced_mesh = true
[../]
[]
[BCs]
[./u]
type = VacuumBC
variable = u
boundary = 'left_to_0 bottom_to_0 right top'
[../]
[./v]
type = VacuumBC
variable = v
boundary = 'left_to_1 bottom_to_1'
[../]
[]
[Postprocessors]
[./u_int]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[../]
[./v_int]
type = ElementIntegralVariablePostprocessor
variable = v
block = 1
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
file_base = displaced
exodus = true
[]
[Functions]
[./disp_x_func]
type = ParsedFunction
expression = x
[../]
[./disp_y_func]
type = ParsedFunction
expression = y
[../]
[]
[ICs]
[./disp_x_ic]
function = disp_x_func
variable = disp_x
type = FunctionIC
[../]
[./disp_y_ic]
function = disp_y_func
variable = disp_y
type = FunctionIC
[../]
[]
(modules/porous_flow/test/tests/fluidstate/waterncg_nonisothermal.i)
[Mesh]
[mesh]
type = GeneratedMeshGenerator
dim = 2
[]
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[Variables]
[pgas]
initial_condition = 1e6
[]
[z]
initial_condition = 0.25
[]
[temperature]
initial_condition = 70
[]
[]
[AuxVariables]
[pressure_gas]
order = CONSTANT
family = MONOMIAL
[]
[pressure_water]
order = CONSTANT
family = MONOMIAL
[]
[saturation_gas]
order = CONSTANT
family = MONOMIAL
[]
[saturation_water]
order = CONSTANT
family = MONOMIAL
[]
[density_water]
order = CONSTANT
family = MONOMIAL
[]
[density_gas]
order = CONSTANT
family = MONOMIAL
[]
[viscosity_water]
order = CONSTANT
family = MONOMIAL
[]
[viscosity_gas]
order = CONSTANT
family = MONOMIAL
[]
[enthalpy_water]
order = CONSTANT
family = MONOMIAL
[]
[enthalpy_gas]
order = CONSTANT
family = MONOMIAL
[]
[internal_energy_water]
order = CONSTANT
family = MONOMIAL
[]
[internal_energy_gas]
order = CONSTANT
family = MONOMIAL
[]
[x0_water]
order = CONSTANT
family = MONOMIAL
[]
[x0_gas]
order = CONSTANT
family = MONOMIAL
[]
[x1_water]
order = CONSTANT
family = MONOMIAL
[]
[x1_gas]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[pressure_water]
type = PorousFlowPropertyAux
variable = pressure_water
property = pressure
phase = 0
execute_on = timestep_end
[]
[pressure_gas]
type = PorousFlowPropertyAux
variable = pressure_gas
property = pressure
phase = 1
execute_on = timestep_end
[]
[saturation_water]
type = PorousFlowPropertyAux
variable = saturation_water
property = saturation
phase = 0
execute_on = timestep_end
[]
[saturation_gas]
type = PorousFlowPropertyAux
variable = saturation_gas
property = saturation
phase = 1
execute_on = timestep_end
[]
[density_water]
type = PorousFlowPropertyAux
variable = density_water
property = density
phase = 0
execute_on = timestep_end
[]
[density_gas]
type = PorousFlowPropertyAux
variable = density_gas
property = density
phase = 1
execute_on = timestep_end
[]
[viscosity_water]
type = PorousFlowPropertyAux
variable = viscosity_water
property = viscosity
phase = 0
execute_on = timestep_end
[]
[viscosity_gas]
type = PorousFlowPropertyAux
variable = viscosity_gas
property = viscosity
phase = 1
execute_on = timestep_end
[]
[enthalpy_water]
type = PorousFlowPropertyAux
variable = enthalpy_water
property = enthalpy
phase = 0
execute_on = timestep_end
[]
[enthalpy_gas]
type = PorousFlowPropertyAux
variable = enthalpy_gas
property = enthalpy
phase = 1
execute_on = timestep_end
[]
[internal_energy_water]
type = PorousFlowPropertyAux
variable = internal_energy_water
property = internal_energy
phase = 0
execute_on = timestep_end
[]
[internal_energy_gas]
type = PorousFlowPropertyAux
variable = internal_energy_gas
property = internal_energy
phase = 1
execute_on = timestep_end
[]
[x1_water]
type = PorousFlowPropertyAux
variable = x1_water
property = mass_fraction
phase = 0
fluid_component = 1
execute_on = timestep_end
[]
[x1_gas]
type = PorousFlowPropertyAux
variable = x1_gas
property = mass_fraction
phase = 1
fluid_component = 1
execute_on = timestep_end
[]
[x0_water]
type = PorousFlowPropertyAux
variable = x0_water
property = mass_fraction
phase = 0
fluid_component = 0
execute_on = timestep_end
[]
[x0_gas]
type = PorousFlowPropertyAux
variable = x0_gas
property = mass_fraction
phase = 1
fluid_component = 0
execute_on = timestep_end
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
variable = pgas
fluid_component = 0
[]
[mass1]
type = PorousFlowMassTimeDerivative
variable = z
fluid_component = 1
[]
[heat]
type = TimeDerivative
variable = temperature
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pgas z '
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[fs]
type = PorousFlowWaterNCG
water_fp = water
gas_fp = co2
capillary_pressure = pc
[]
[]
[FluidProperties]
[co2]
type = CO2FluidProperties
[]
[water]
type = Water97FluidProperties
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = temperature
[]
[waterncg]
type = PorousFlowFluidState
gas_porepressure = pgas
z = z
temperature = temperature
temperature_unit = Celsius
capillary_pressure = pc
fluid_state = fs
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-12 0 0 0 1e-12 0 0 0 1e-12'
[]
[relperm0]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[relperm1]
type = PorousFlowRelativePermeabilityCorey
n = 3
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 1
end_time = 1
nl_abs_tol = 1e-12
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[density_water]
type = ElementIntegralVariablePostprocessor
variable = density_water
[]
[density_gas]
type = ElementIntegralVariablePostprocessor
variable = density_gas
[]
[viscosity_water]
type = ElementIntegralVariablePostprocessor
variable = viscosity_water
[]
[viscosity_gas]
type = ElementIntegralVariablePostprocessor
variable = viscosity_gas
[]
[enthalpy_water]
type = ElementIntegralVariablePostprocessor
variable = enthalpy_water
[]
[enthalpy_gas]
type = ElementIntegralVariablePostprocessor
variable = enthalpy_gas
[]
[internal_energy_water]
type = ElementIntegralVariablePostprocessor
variable = internal_energy_water
[]
[internal_energy_gas]
type = ElementIntegralVariablePostprocessor
variable = internal_energy_gas
[]
[x0_water]
type = ElementIntegralVariablePostprocessor
variable = x0_water
[]
[x1_gas]
type = ElementIntegralVariablePostprocessor
variable = x1_gas
[]
[x0_gas]
type = ElementIntegralVariablePostprocessor
variable = x0_gas
[]
[sg]
type = ElementIntegralVariablePostprocessor
variable = saturation_gas
[]
[sw]
type = ElementIntegralVariablePostprocessor
variable = saturation_water
[]
[pwater]
type = ElementIntegralVariablePostprocessor
variable = pressure_water
[]
[pgas]
type = ElementIntegralVariablePostprocessor
variable = pressure_gas
[]
[x0mass]
type = PorousFlowFluidMass
fluid_component = 0
phase = '0 1'
[]
[x1mass]
type = PorousFlowFluidMass
fluid_component = 1
phase = '0 1'
[]
[]
[Outputs]
csv = true
execute_on = timestep_end
[]
(modules/combined/test/tests/grain_texture/EulerAngleProvider2RGBAux_bicrystal.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 40
ny = 12
xmax = 1000
ymax = 300
elem_type = QUAD4
[]
[GlobalParams]
op_num = 2
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[ICs]
[./PolycrystalICs]
[./BicrystalBoundingBoxIC]
x1 = 0
y1 = 0
x2 = 500
y2 = 1000
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[./unique_grains]
order = CONSTANT
family = MONOMIAL
[../]
[./var_indices]
order = CONSTANT
family = MONOMIAL
[../]
[./active_bounds_elemental]
order = CONSTANT
family = MONOMIAL
[../]
[./rgb]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./PolycrystalKernel]
[../]
[]
[AuxKernels]
[./bnds_aux]
type = BndsCalcAux
variable = bnds
execute_on = timestep_end
[../]
[./unique_grains]
type = FeatureFloodCountAux
variable = unique_grains
flood_counter = grain_tracker
execute_on = 'initial timestep_begin'
field_display = UNIQUE_REGION
[../]
[./var_indices]
type = FeatureFloodCountAux
variable = var_indices
flood_counter = grain_tracker
execute_on = 'initial timestep_begin'
field_display = VARIABLE_COLORING
[../]
[./active_bounds_elemental]
type = FeatureFloodCountAux
variable = active_bounds_elemental
field_display = ACTIVE_BOUNDS
execute_on = 'initial timestep_begin'
flood_counter = grain_tracker
[../]
[./rgb]
type = EulerAngleProvider2RGBAux
variable = rgb
euler_angle_provider = euler_angle_file
grain_tracker = grain_tracker
crystal_structure = cubic
execute_on = 'initial timestep_end'
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
block = 0
T = 500 # K
wGB = 75 # nm
GBmob0 = 2.5e-6 #m^4/(Js) from Schoenfelder 1997
Q = 0.23 #Migration energy in eV
GBenergy = 0.708 #GB energy in J/m^2
time_scale = 1.0e-6
[../]
[]
[UserObjects]
[./grain_tracker]
type = FauxGrainTracker
connecting_threshold = 0.05
compute_var_to_feature_map = true
flood_entity_type = elemental
execute_on = 'initial timestep_begin'
outputs = none
[../]
[./euler_angle_file]
type = EulerAngleFileReader
file_name = test.tex
[../]
[]
[Postprocessors]
[./gr0_area]
type = ElementIntegralVariablePostprocessor
variable = gr0
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
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 = 30
l_tol = 1e-4
nl_max_its = 30
nl_rel_tol = 1e-9
start_time = 0.0
num_steps = 3
dt = 0.2
[]
[Outputs]
execute_on = 'initial timestep_end'
exodus = true
perf_graph = true
[]
(test/tests/kernels/array_kernels/array_diffusion_reaction_other_coupling.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 4
[]
[Variables]
[u]
order = FIRST
family = LAGRANGE
components = 2
[]
[v]
[]
[]
[Kernels]
[diff]
type = ArrayDiffusion
variable = u
diffusion_coefficient = dc
[]
[reaction]
type = ArrayReaction
variable = u
reaction_coefficient = rc
[]
[diffv]
type = Diffusion
variable = v
[]
[vu]
type = ArrayCoupledForce
variable = u
v = v
coef = '0 0.5'
[]
[uv]
type = CoupledArrayForce
variable = v
v = u
coef = '0.05 0'
[]
[]
[BCs]
[left]
type = ArrayDirichletBC
variable = u
boundary = 1
values = '0 0'
[]
[right]
type = ArrayDirichletBC
variable = u
boundary = 2
values = '1 2'
[]
[leftv]
type = DirichletBC
variable = v
boundary = 1
value = 0
[]
[rightv]
type = DirichletBC
variable = v
boundary = 2
value = 2
[]
[]
[Materials]
[dc]
type = GenericConstantArray
prop_name = dc
prop_value = '1 1'
[]
[rc]
type = GenericConstant2DArray
prop_name = rc
prop_value = '1 0; -0.1 1'
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[intu0]
type = ElementIntegralArrayVariablePostprocessor
variable = u
component = 0
[]
[intu1]
type = ElementIntegralArrayVariablePostprocessor
variable = u
component = 1
[]
[intv]
type = ElementIntegralVariablePostprocessor
variable = v
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/optimization/compliance_sensitivity/2d_mbb_pde_amr.i)
vol_frac = 0.5
E0 = 1
Emin = 1e-8
power = 3
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 2
nx = 30
ny = 10
xmin = 0
xmax = 30
ymin = 0
ymax = 10
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = hold
nodes = 0
[]
[push]
type = ExtraNodesetGenerator
input = node
new_boundary = push
coord = '30 10 0'
[]
[]
[Variables]
[disp_x]
[]
[disp_y]
[]
[Dc]
initial_condition = -1.0
[]
[]
[AuxVariables]
[sensitivity]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[AuxKernel]
type = MaterialRealAux
variable = sensitivity
property = sensitivity
execute_on = LINEAR
[]
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = ${vol_frac}
[]
[Dc_elem]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[AuxKernel]
type = SelfAux
variable = Dc_elem
v = Dc
execute_on = 'TIMESTEP_END'
[]
[]
[mat_den_nodal]
family = L2_LAGRANGE
order = FIRST
initial_condition = ${vol_frac}
[AuxKernel]
type = SelfAux
execute_on = TIMESTEP_END
variable = mat_den_nodal
v = mat_den
[]
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[Kernels]
[diffusion]
type = FunctionDiffusion
variable = Dc
function = 0.15 # radius coeff
[]
[potential]
type = Reaction
variable = Dc
[]
[source]
type = CoupledForce
variable = Dc
v = sensitivity
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_y
boundary = hold
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[boundary_penalty]
type = ADRobinBC
variable = Dc
boundary = 'left top'
coefficient = 10
[]
[boundary_penalty_right]
type = ADRobinBC
variable = Dc
boundary = 'right'
coefficient = 10
[]
[]
[NodalKernels]
[push]
type = NodalGravity
variable = disp_y
boundary = push
gravity_value = -1
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'mat_den'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${E0}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
incremental = false
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[update]
type = DensityUpdate
density_sensitivity = Dc_elem
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
line_search = none
nl_abs_tol = 1e-4
l_max_its = 200
start_time = 0.0
dt = 1.0
num_steps = 70
[]
[Outputs]
[out]
type = CSV
execute_on = 'INITIAL TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[sensitivity]
type = ElementIntegralMaterialProperty
mat_prop = sensitivity
[]
[]
[Controls]
[first_period]
type = TimePeriod
start_time = 0.0
end_time = 40
enable_objects = 'BCs::boundary_penalty_right'
execute_on = 'initial timestep_begin'
[]
[]
[Adaptivity]
max_h_level = 2
recompute_markers_during_cycles = true
interval = 1
cycles_per_step = 1
marker = density_marker
[Indicators]
[density_jump]
type = ValueJumpIndicator
variable = mat_den_nodal
[]
[]
[Markers]
[density_marker]
type = ErrorToleranceMarker
indicator = density_jump
coarsen = 0.1
refine = 0.1
[]
[]
[]
(modules/porous_flow/test/tests/actions/fullsat_brine.i)
# Test the density, viscosity, enthalpy and internal energy
# calculated by the PorousFlowBrine material when using
# PorousFlowFullySaturated action.
# Density (rho) and enthalpy (h) From Driesner (2007), Geochimica et
# Cosmochimica Acta 71, 4902-4919 (2007).
# Viscosity from Phillips et al, A technical databook for
# geothermal energy utilization, LbL-12810 (1981).
# Internal energy = h - p / rho.
# Pressure 20 MPa
# Temperature 50C
# xnacl = 0.1047 (equivalent to 2.0 molality)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[GlobalParams]
block = '0'
PorousFlowDictator = dictator
gravity = '0 0 0'
[]
[PorousFlowFullySaturated]
coupling_type = ThermoHydro
porepressure = pp
temperature = temp
mass_fraction_vars = "nacl"
fluid_properties_type = PorousFlowBrine
nacl_name = nacl
dictator_name = dictator
stabilization = none
[]
[Variables]
[pp]
initial_condition = 20E6
[]
[temp]
initial_condition = 323.15
[]
[nacl]
initial_condition = 0.1047
[]
[]
[Kernels]
# All provided by PorousFlowFullySaturated action
[]
[BCs]
[t_bdy]
type = DirichletBC
variable = temp
boundary = 'left right'
value = 323.15
[]
[p_bdy]
type = DirichletBC
variable = pp
boundary = 'left right'
value = 20E6
[]
[nacl_bdy]
type = DirichletBC
variable = nacl
boundary = 'left right'
value = 0.1047
[]
[]
[Postprocessors]
[pressure]
type = ElementIntegralVariablePostprocessor
variable = pp
[]
[temperature]
type = ElementIntegralVariablePostprocessor
variable = temp
[]
[xnacl]
type = ElementIntegralVariablePostprocessor
variable = nacl
[]
[density]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_density_qp0'
[]
[viscosity]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_viscosity_qp0'
[]
[enthalpy]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_enthalpy_qp0'
[]
[energy]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_internal_energy_nodal0'
[]
[]
[Materials]
# Thermal conductivity
[thermal_conductivity]
type = PorousFlowThermalConductivityIdeal
dry_thermal_conductivity = '3 0 0 0 3 0 0 0 3'
wet_thermal_conductivity = '3 0 0 0 3 0 0 0 3'
[]
# Specific heat capacity
[rock_heat]
type = PorousFlowMatrixInternalEnergy
specific_heat_capacity = 850
density = 2700
[]
# Permeability
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1E-13 0 0 0 1E-13 0 0 0 1E-13'
[]
# Porosity
[porosity]
type = PorousFlowPorosityConst
porosity = 0.3
[]
[]
[Preconditioning]
[andy]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 1
end_time = 1
[]
[Outputs]
file_base = fullsat_brine
csv = true
execute_on = 'timestep_end'
[]
(modules/thermal_hydraulics/test/tests/components/shaft_connected_compressor_1phase/shaft_motor_compressor.i)
area = 0.2359
dt = 1.e-3
[GlobalParams]
initial_p = 1e5
initial_T = 288
initial_vel = 60
initial_vel_x = 60
initial_vel_y = 0
initial_vel_z = 0
A = ${area}
A_ref = ${area}
f = 100
scaling_factor_1phase = '0.04 0.04 0.04e-5'
closures = simple_closures
fp = fp
[]
[FluidProperties]
[fp]
type = IdealGasFluidProperties
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[compressor]
type = ShaftConnectedCompressor1Phase
inlet = 'pipe:out'
outlet = 'pipe:in'
position = '0 0 0'
scaling_factor_rhoEV = 1e-5
volume = ${fparse area*0.45}
inertia_coeff = '1 1 1 1'
inertia_const = 1.61397
speed_cr_I = 1e12
speed_cr_fr = 0
tau_fr_coeff = '0 0 0 0'
tau_fr_const = 0
omega_rated = 200
mdot_rated = 21.74
rho0_rated = 1.1812
c0_rated = 340
speeds = '0.0 0.4 0.5 0.6 0.7 0.8 0.9 1.0 1.1 2'
Rp_functions = 'Rp00 Rp04 Rp05 Rp06 Rp07 Rp08 Rp09 Rp10 Rp11 Rp11'
eff_functions = 'eff00 eff04 eff05 eff06 eff07 eff08 eff09 eff10 eff11 eff11'
[]
[pipe]
type = FlowChannel1Phase
position = '0.1 0 0'
orientation = '1 0 0'
length = 10
n_elems = 20
[]
[motor]
type = ShaftConnectedMotor
inertia = 1e2
torque = 100
[]
[shaft]
type = Shaft
connected_components = 'motor compressor'
initial_speed = 100
[]
[]
[Functions]
[Rp00]
type = PiecewiseLinear
x = '0 0.3736 0.4216'
y = '1 0.9701 0.9619'
[]
[eff00]
type = PiecewiseLinear
x = '0 0.3736 0.4216'
y = '0.001 0.8941 0.6641'
[]
[Rp04]
type = PiecewiseLinear
x = '0.3736 0.3745 0.3753 0.3762 0.3770 0.3919 0.4067 0.4216 0.4826'
y = '1.0789 1.0779 1.0771 1.0759 1.0749 1.0570 1.0388 1.0204 0.9450'
[]
[eff04]
type = PiecewiseLinear
x = '0.3736 0.3745 0.3753 0.3762 0.3770 0.3919 0.4067 0.4216 0.4826'
y = '0.8941 0.8929 0.8925 0.8915 0.8901 0.8601 0.7986 0.6641 0.1115'
[]
[Rp05]
type = PiecewiseLinear
x = '0.3736 0.4026 0.4106 0.4186 0.4266 0.4346 0.4426 0.4506 0.4586 0.4666 0.4746 0.4826 0.5941'
y = '1.2898 1.2442 1.2316 1.2189 1.2066 1.1930 1.1804 1.1677 1.1542 1.1413 1.1279 1.1150 0.9357'
[]
[eff05]
type = PiecewiseLinear
x = '0.3736 0.4026 0.4106 0.4186 0.4266 0.4346 0.4426 0.4506 0.4586 0.4666 0.4746 0.4826 0.5941'
y = '0.9281 0.9263 0.9258 0.9244 0.9226 0.9211 0.9195 0.9162 0.9116 0.9062 0.8995 0.8914 0.7793'
[]
[Rp06]
type = PiecewiseLinear
x = '0.4026 0.4613 0.4723 0.4834 0.4945 0.5055 0.5166 0.5277 0.5387 0.5609 0.5719 0.583 0.5941 0.7124'
y = '1.5533 1.4438 1.4232 1.4011 1.3793 1.3589 1.3354 1.3100 1.2867 1.2376 1.2131 1.1887 1.1636 0.896'
[]
[eff06]
type = PiecewiseLinear
x = '0.4026 0.4613 0.4723 0.4834 0.4945 0.5055 0.5166 0.5277 0.5387 0.5609 0.5719 0.583 0.5941 0.7124'
y = '0.9148 0.9255 0.9275 0.9277 0.9282 0.9295 0.9290 0.9269 0.9242 0.9146 0.9080 0.900 0.8920 0.8061'
[]
[Rp07]
type = PiecewiseLinear
x = '0.4613 0.5447 0.5587 0.5726 0.5866 0.6006 0.6145 0.6285 0.6425 0.6565 0.6704 0.6844 0.6984 0.7124 0.8358'
y = '1.8740 1.6857 1.6541 1.6168 1.5811 1.5430 1.5067 1.4684 1.4292 1.3891 1.3479 1.3061 1.2628 1.2208 0.8498'
[]
[eff07]
type = PiecewiseLinear
x = '0.4613 0.5447 0.5587 0.5726 0.5866 0.6006 0.6145 0.6285 0.6425 0.6565 0.6704 0.6844 0.6984 0.7124 0.8358'
y = '0.9004 0.9232 0.9270 0.9294 0.9298 0.9312 0.9310 0.9290 0.9264 0.9225 0.9191 0.9128 0.9030 0.8904 0.7789'
[]
[Rp08]
type = PiecewiseLinear
x = '0.5447 0.6638 0.6810 0.6982 0.7154 0.7326 0.7498 0.7670 0.7842 0.8014 0.8186 0.8358 0.9702'
y = '2.3005 1.9270 1.8732 1.8195 1.7600 1.7010 1.6357 1.5697 1.5019 1.4327 1.3638 1.2925 0.7347'
[]
[eff08]
type = PiecewiseLinear
x = '0.5447 0.6638 0.6810 0.6982 0.7154 0.7326 0.7498 0.7670 0.7842 0.8014 0.8186 0.8358 0.9702'
y = '0.9102 0.9276 0.9301 0.9313 0.9319 0.9318 0.9293 0.9256 0.9231 0.9153 0.9040 0.8933 0.8098'
[]
[Rp09]
type = PiecewiseLinear
x = '0.6638 0.7762 0.7938 0.8115 0.8291 0.8467 0.8644 0.8820 0.8997 0.9173 0.9349 0.9526 0.9702 1.1107 1.25120'
y = '2.6895 2.2892 2.2263 2.1611 2.0887 2.0061 1.9211 1.8302 1.7409 1.6482 1.5593 1.4612 1.3586 0.5422 -0.2742'
[]
[eff09]
type = PiecewiseLinear
x = '0.6638 0.7762 0.7938 0.8115 0.8291 0.8467 0.8644 0.8820 0.8997 0.9173 0.9349 0.9526 0.9702 1.1107 1.2512'
y = '0.8961 0.9243 0.9288 0.9323 0.9330 0.9325 0.9319 0.9284 0.9254 0.9215 0.9134 0.9051 0.8864 0.7380 0.5896'
[]
[Rp10]
type = PiecewiseLinear
x = '0.7762 0.9255 0.9284 0.9461 0.9546 0.9816 0.9968 1.0170 1.039 1.0525 1.0812 1.0880 1.1056 1.1107 1.2511'
y = '3.3162 2.6391 2.6261 2.5425 2.5000 2.3469 2.2521 2.1211 1.974 1.8806 1.6701 1.6169 1.4710 1.4257 0.1817'
[]
[eff10]
type = PiecewiseLinear
x = '0.7762 0.9255 0.9284 0.9461 0.9546 0.9816 0.9968 1.0170 1.0390 1.0525 1.0812 1.0880 1.1056 1.1107 1.2511'
y = '0.8991 0.9276 0.9281 0.9308 0.9317 0.9329 0.9318 0.9291 0.9252 0.9223 0.9116 0.9072 0.8913 0.8844 0.6937'
[]
[Rp11]
type = PiecewiseLinear
x = '0.9255 1.0749 1.134 1.2511'
y = '3.9586 2.9889 2.605 1.4928'
[]
[eff11]
type = PiecewiseLinear
x = '0.9255 1.0749 1.1340 1.2511'
y = '0.9257 0.9308 0.9328 0.8823'
[]
[S_energy_fcn]
type = ParsedFunction
expression = '-(tau_isen+tau_diss)*omega'
symbol_names = 'tau_isen tau_diss omega'
symbol_values = 'compressor:isentropic_torque compressor:dissipation_torque shaft:omega'
[]
[energy_conservation_fcn]
type = ParsedFunction
expression = '(E_change - S_energy * dt) / E_tot'
symbol_names = 'E_change S_energy dt E_tot'
symbol_values = 'E_change S_energy ${dt} E_tot'
[]
[]
[Postprocessors]
# mass conservation
[mass_pipes]
type = ElementIntegralVariablePostprocessor
variable = rhoA
block = 'pipe'
execute_on = 'initial timestep_end'
[]
[mass_compressor]
type = ScalarVariable
variable = compressor:rhoV
execute_on = 'initial timestep_end'
[]
[mass_tot]
type = SumPostprocessor
values = 'mass_pipes mass_compressor'
execute_on = 'initial timestep_end'
[]
[mass_conservation]
type = ChangeOverTimePostprocessor
postprocessor = mass_tot
change_with_respect_to_initial = true
compute_relative_change = true
execute_on = 'initial timestep_end'
[]
# energy conservation
[E_pipes]
type = ElementIntegralVariablePostprocessor
variable = rhoEA
block = 'pipe'
execute_on = 'initial timestep_end'
[]
[E_compressor]
type = ScalarVariable
variable = compressor:rhoEV
execute_on = 'initial timestep_end'
[]
[E_tot]
type = LinearCombinationPostprocessor
pp_coefs = '1 1'
pp_names = 'E_pipes E_compressor'
execute_on = 'initial timestep_end'
[]
[S_energy]
type = FunctionValuePostprocessor
function = S_energy_fcn
execute_on = 'initial timestep_end'
[]
[E_change]
type = ChangeOverTimePostprocessor
postprocessor = E_tot
execute_on = 'initial timestep_end'
[]
# This should also execute on initial. This value is
# lagged by one timestep as a workaround to moose issue #13262.
[energy_conservation]
type = FunctionValuePostprocessor
function = energy_conservation_fcn
execute_on = 'timestep_end'
indirect_dependencies = 'E_tot E_change S_energy'
[]
[]
[Preconditioning]
[SMP_PJFNK]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'implicit-euler'
dt = ${dt}
num_steps = 6
solve_type = 'NEWTON'
line_search = 'basic'
petsc_options_iname = '-pc_type'
petsc_options_value = ' lu'
nl_rel_tol = 1e-8
nl_abs_tol = 1e-6
nl_max_its = 15
l_tol = 1e-4
l_max_its = 10
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Outputs]
velocity_as_vector = false
[]
(test/tests/userobjects/force_aux_ordering/force_preaux.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 1
nx = 2
ymin = 0
ymax = 1
ny = 2
[]
[Variables]
[./u]
order = FIRST
family = LAGRANGE
initial_condition = 1
[../]
[]
[Kernels]
[./time]
type = TimeDerivative
variable = u
[../]
[./diff]
type = Diffusion
variable = u
[../]
[]
[Postprocessors]
[./total_u]
type = ElementIntegralVariablePostprocessor
variable = u
[../]
# scale1 and scale2 depend on the ElementUO total_u. total_u is executed on
# timestep_end in POST_AUX _before_ the GeneralPostprocessors. scale1 is executed
# at its default location, timestep_end/POST_AUX/after total_u and hence gets
# the most up to date information. scale2 is pushed into PRE_AUX and hence picks
# up the value of total_u from the last timestep.
[./scale1]
type = ScalePostprocessor
value = total_u
scaling_factor = 1
[../]
[./scale2]
type = ScalePostprocessor
value = total_u
scaling_factor = 1
force_preaux = true
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = 1
value = 0
[../]
[]
[Executioner]
type = Transient
dt = 1.0
end_time = 2.0
[]
[Outputs]
csv = true
[]
(test/tests/coord_type/coord_type_rz_general.i)
# Tests using different coordinate systems in different blocks:
# block1: XYZ translated by (0,-1,0)
# block2: RZ with origin=(0,0,0) and direction=(0,1,0)
# block3: RZ with origin=(0,0,1) and direction=(1,0,0)
# block4: RZ with origin=(-1,-2,-3) and direction=(1,1,0)
#
# A transient heat conduction equation is solved with uniform properties.
# The same power is applied to each block via a uniform heat flux boundary
# condition on the outer cylindrical surface (top surface for block1).
# Conservation is checked for each via post-processors.
# Blocks block2, block3, and block4 should have identical solutions.
rho = 1000.0
cp = 500.0
k = 15.0
length = 1.5
radius = 0.5
perimeter = ${fparse 2 * pi * radius}
nz = 10
nr = 5
power = 1e3
heat_flux = ${fparse power / (perimeter * length)}
[Mesh]
# block1
[genmesh1]
type = GeneratedMeshGenerator
dim = 2
nx = ${nz}
ny = ${nr}
xmin = 0.0
xmax = ${length}
ymin = -1.0
ymax = ${fparse -1.0 + radius}
boundary_id_offset = 10
[]
[renumberblock1]
type = RenameBlockGenerator
input = genmesh1
old_block = 0
new_block = 1
[]
[renameblock1]
type = RenameBlockGenerator
input = renumberblock1
old_block = 1
new_block = block1
[]
[renameboundary1]
type = RenameBoundaryGenerator
input = renameblock1
old_boundary = '10 11 12 13'
new_boundary = 'bottom1 right1 top1 left1'
[]
# block2
[genmesh2]
type = GeneratedMeshGenerator
dim = 2
nx = ${nr}
ny = ${nz}
xmin = 0.0
xmax = ${radius}
ymin = 0
ymax = ${length}
boundary_id_offset = 20
[]
[renumberblock2]
type = RenameBlockGenerator
input = genmesh2
old_block = 0
new_block = 2
[]
[renameblock2]
type = RenameBlockGenerator
input = renumberblock2
old_block = 2
new_block = block2
[]
[renameboundary2]
type = RenameBoundaryGenerator
input = renameblock2
old_boundary = '20 21 22 23'
new_boundary = 'bottom2 right2 top2 left2'
[]
# block3
[genmesh3]
type = GeneratedMeshGenerator
dim = 2
nx = ${nz}
ny = ${nr}
xmin = 0.0
xmax = ${length}
ymin = 0
ymax = ${radius}
boundary_id_offset = 30
[]
[translate3]
type = TransformGenerator
input = genmesh3
transform = TRANSLATE
vector_value = '0 0 1'
[]
[renumberblock3]
type = RenameBlockGenerator
input = translate3
old_block = 0
new_block = 3
[]
[renameblock3]
type = RenameBlockGenerator
input = renumberblock3
old_block = 3
new_block = block3
[]
[renameboundary3]
type = RenameBoundaryGenerator
input = renameblock3
old_boundary = '30 31 32 33'
new_boundary = 'bottom3 right3 top3 left3'
[]
# block4
[genmesh4]
type = GeneratedMeshGenerator
dim = 2
nx = ${nz}
ny = ${nr}
xmin = 0.0
xmax = ${length}
ymin = 0
ymax = ${radius}
boundary_id_offset = 40
[]
[rotate4]
type = TransformGenerator
input = genmesh4
transform = ROTATE
vector_value = '45 0 0'
[]
[translate4]
type = TransformGenerator
input = rotate4
transform = TRANSLATE
vector_value = '-1 -2 -3'
[]
[renumberblock4]
type = RenameBlockGenerator
input = translate4
old_block = 0
new_block = 4
[]
[renameblock4]
type = RenameBlockGenerator
input = renumberblock4
old_block = 4
new_block = block4
[]
[renameboundary4]
type = RenameBoundaryGenerator
input = renameblock4
old_boundary = '40 41 42 43'
new_boundary = 'bottom4 right4 top4 left4'
[]
[combiner]
type = CombinerGenerator
inputs = 'renameboundary1 renameboundary2 renameboundary3 renameboundary4'
[]
coord_block = 'block1 block2 block3 block4'
coord_type = 'XYZ RZ RZ RZ'
rz_coord_blocks = 'block2 block3 block4'
rz_coord_origins = '0 0 0
0 0 1
-1 -2 -3'
rz_coord_directions = '0 1 0
1 0 0
1 1 0'
[]
[Variables]
[T]
family = LAGRANGE
order = FIRST
[]
[]
[Functions]
[T_ic_fn]
type = ParsedFunction
expression = 'x'
[]
[theoretical_energy_added_fn]
type = ParsedFunction
expression = '${power} * t'
[]
[]
[ICs]
[T_ic]
type = FunctionIC
variable = T
function = T_ic_fn
[]
[]
[Kernels]
[time_derivative]
type = ADTimeDerivative
variable = T
[]
[heat_conduction]
type = CoefDiffusion
variable = T
coef = ${fparse k / (rho * cp)}
[]
[]
[BCs]
[heat_flux_bc]
type = ADFunctionNeumannBC
variable = T
boundary = 'top1 right2 top3 top4'
# The heat conduction equation has been divided by rho*cp
function = '${fparse heat_flux / (rho * cp)}'
[]
[]
[Postprocessors]
[theoretical_energy_change]
type = FunctionValuePostprocessor
function = theoretical_energy_added_fn
execute_on = 'INITIAL TIMESTEP_END'
[]
# block1 conservation
[T_integral1]
type = ElementIntegralVariablePostprocessor
variable = T
block = 'block1'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy1]
type = ParsedPostprocessor
pp_names = 'T_integral1'
function = 'T_integral1 * ${rho} * ${cp} * ${perimeter}'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change1]
type = ChangeOverTimePostprocessor
postprocessor = energy1
change_with_respect_to_initial = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change_error1]
type = RelativeDifferencePostprocessor
value1 = energy_change1
value2 = theoretical_energy_change
execute_on = 'INITIAL TIMESTEP_END'
[]
# block2 conservation
[T_integral2]
type = ElementIntegralVariablePostprocessor
variable = T
block = 'block2'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy2]
type = ParsedPostprocessor
pp_names = 'T_integral2'
function = 'T_integral2 * ${rho} * ${cp}'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change2]
type = ChangeOverTimePostprocessor
postprocessor = energy2
change_with_respect_to_initial = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change_error2]
type = RelativeDifferencePostprocessor
value1 = energy_change2
value2 = theoretical_energy_change
execute_on = 'INITIAL TIMESTEP_END'
[]
# block3 conservation
[T_integral3]
type = ElementIntegralVariablePostprocessor
variable = T
block = 'block3'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy3]
type = ParsedPostprocessor
pp_names = 'T_integral3'
function = 'T_integral3 * ${rho} * ${cp}'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change3]
type = ChangeOverTimePostprocessor
postprocessor = energy3
change_with_respect_to_initial = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change_error3]
type = RelativeDifferencePostprocessor
value1 = energy_change3
value2 = theoretical_energy_change
execute_on = 'INITIAL TIMESTEP_END'
[]
# block4 conservation
[T_integral4]
type = ElementIntegralVariablePostprocessor
variable = T
block = 'block4'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy4]
type = ParsedPostprocessor
pp_names = 'T_integral4'
function = 'T_integral4 * ${rho} * ${cp}'
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change4]
type = ChangeOverTimePostprocessor
postprocessor = energy4
change_with_respect_to_initial = true
execute_on = 'INITIAL TIMESTEP_END'
[]
[energy_change_error4]
type = RelativeDifferencePostprocessor
value1 = energy_change4
value2 = theoretical_energy_change
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
dt = 1.0
num_steps = 10
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
nl_rel_tol = 1e-10
[]
[Outputs]
file_base = 'coord_type_rz_general'
[console]
type = Console
show = 'energy_change_error1 energy_change_error2 energy_change_error3 energy_change_error4'
[]
[exodus]
type = Exodus
show = 'T energy_change_error1 energy_change_error2 energy_change_error3 energy_change_error4'
[]
[]
(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 = ' '
[../]
[]
(test/tests/ics/integral_preserving_function_ic/sinusoidal_z.i)
[Mesh]
type = GeneratedMesh
dim = 3
nx = 5
ny = 5
nz = 20
xmax = 1.5
ymax = 1.7
zmax = 1.9
xmin = 0.0
ymin = 0.0
zmin = 0.0
[]
[Problem]
type = FEProblem
solve = false
[]
[AuxVariables]
[power]
family = MONOMIAL
order = CONSTANT
[]
[]
[ICs]
[power]
type = IntegralPreservingFunctionIC
variable = power
magnitude = 550.0
function = 'sin(pi * z / 1.9)'
integral = vol
[]
[]
[Postprocessors]
[vol]
type = FunctionElementIntegral
function = 'sin(pi * z / 1.9)'
execute_on = 'initial'
[]
[integrated_power] # should equal 550
type = ElementIntegralVariablePostprocessor
variable = power
[]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(modules/phase_field/test/tests/TotalFreeEnergy/TotalFreeEnergy_2var_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
xmin = 0
xmax = 1000
ymin = 0
ymax = 1000
zmin = 0
zmax = 0
elem_type = QUAD4
uniform_refine = 2
[]
[GlobalParams]
op_num = 2
var_name_base = gr
[]
[Variables]
[./PolycrystalVariables]
[../]
[]
[ICs]
[./PolycrystalICs]
[./BicrystalCircleGrainIC]
radius = 333.333
x = 500
y = 500
int_width = 60
[../]
[../]
[]
[AuxVariables]
[./bnds]
order = FIRST
family = LAGRANGE
[../]
[./local_energy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./gr0dot]
type = TimeDerivative
variable = gr0
[../]
[./gr0bulk]
type = AllenCahn
variable = gr0
f_name = F
coupled_variables = gr1
[../]
[./gr0int]
type = ACInterface
variable = gr0
kappa_name = kappa_op
[../]
[./gr1dot]
type = TimeDerivative
variable = gr1
[../]
[./gr1bulk]
type = AllenCahn
variable = gr1
f_name = F
coupled_variables = gr0
[../]
[./gr1int]
type = ACInterface
variable = gr1
kappa_name = kappa_op
[../]
[]
[AuxKernels]
[./BndsCalc]
type = BndsCalcAux
variable = bnds
[../]
[./local_free_energy]
type = TotalFreeEnergy
variable = local_energy
kappa_names = 'kappa_op kappa_op'
interfacial_vars = 'gr0 gr1'
[../]
[]
[BCs]
[./Periodic]
[./All]
auto_direction = 'x y'
[../]
[../]
[]
[Materials]
[./Copper]
type = GBEvolution
T = 500 # K
wGB = 60 # nm
GBmob0 = 2.5e-6 # m^4/(Js) from Schoenfelder 1997
Q = 0.23 # Migration energy in eV
GBenergy = 0.708 # GB energy in J/m^2
[../]
[./free_energy]
type = DerivativeParsedMaterial
coupled_variables = 'gr0 gr1'
material_property_names = 'mu gamma_asymm'
expression = 'mu*( gr0^4/4.0 - gr0^2/2.0 + gr1^4/4.0 - gr1^2/2.0 + gamma_asymm*gr0^2*gr1^2) + 1.0/4.0'
derivative_order = 2
enable_jit = true
[../]
[]
[Postprocessors]
[./total_energy]
type = ElementIntegralVariablePostprocessor
variable = local_energy
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[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_tol = 1.0e-4
l_max_its = 30
nl_max_its = 30
nl_rel_tol = 1.0e-10
start_time = 0.0
num_steps = 7
dt = 80.0
[./Adaptivity]
initial_adaptivity = 2
refine_fraction = 0.8
coarsen_fraction = 0.05
max_h_level = 2
[../]
[]
[Outputs]
execute_on = 'timestep_end'
exodus = true
[]
(test/tests/functions/piecewise_multilinear/twoD_const.i)
# PiecewiseMultilinear function tests in 2D
# See [Functions] block for a description of the tests
# The functions are compared with ParsedFunctions using postprocessors
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 2
nx = 4
ymin = -1
ymax = 1
ny = 4
[]
[Variables]
[./dummy]
[../]
[]
[Kernels]
[./dummy_u]
type = TimeDerivative
variable = dummy
[../]
[]
[AuxVariables]
[./constant]
family = MONOMIAL
order = CONSTANT
[../]
[./constant_ref]
family = MONOMIAL
order = CONSTANT
[../]
[./diff]
family = MONOMIAL
order = CONSTANT
[../]
[]
[AuxKernels]
[./const_AuxK]
type = FunctionAux
variable = constant
function = const_fcn
[../]
[./const_ref_AuxK]
type = FunctionAux
variable = constant_ref
function = const_ref
[../]
[./diff]
type = ParsedAux
variable = diff
expression = 'constant - constant_ref'
coupled_variables = 'constant constant_ref'
[../]
[]
[Functions]
[./const_fcn]
type = PiecewiseMulticonstant
direction = 'left right'
data_file = twoD_const.txt
[../]
[./const_ref]
type = ParsedFunction
expression = '
ix := if(x < 0.5, 0, if(x < 1, 1, 2));
iy := if(y > 0, 2, if(y > -0.5, 1, 0));
iy * 3 + ix
'
[../]
[]
[Postprocessors]
[./diff_pp]
type = ElementIntegralVariablePostprocessor
variable = diff
[../]
[]
[Executioner]
type = Transient
dt = 1
end_time = 1
[]
[Outputs]
execute_on = 'timestep_end'
file_base = twoD_const
hide = dummy
exodus = true
[]
(modules/porous_flow/test/tests/fluids/simple_fluid_yr_MPa_C.i)
# Test the properties calculated by the simple fluid Material
# Pressure unit is chosen to be MPa
# Time unit is chosen to be years
# Temperature unit is chosen to be Celsius
# Pressure 10 MPa
# Temperature = 26.85 C
# Density should equal 1500*exp(1E7/1E9-2E-4*300)=1426.844 kg/m^3
# Viscosity should equal 3.49E-17 MPa.yr
# Energy density should equal 4000 * 300 = 1.2E6 J/kg
# Specific enthalpy should equal 4000 * 300 + 10e6 / 1426.844 = 1.207008E6 J/kg
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 2.0E-4
cv = 4000.0
cp = 5000.0
bulk_modulus = 1.0E9
thermal_conductivity = 1.0
viscosity = 1.1E-3
density0 = 1500.0
[]
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp T'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[Variables]
[pp]
initial_condition = 10
[]
[T]
initial_condition = 26.85
[]
[]
[Kernels]
[dummy_p]
type = Diffusion
variable = pp
[]
[dummy_T]
type = Diffusion
variable = T
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = T
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
temperature_unit = Celsius
pressure_unit = MPa
time_unit = years
fp = the_simple_fluid
phase = 0
[]
[]
[Postprocessors]
[pressure]
type = ElementIntegralVariablePostprocessor
variable = pp
[]
[temperature]
type = ElementIntegralVariablePostprocessor
variable = T
[]
[density]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_density_qp0'
[]
[viscosity]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_viscosity_qp0'
[]
[internal_energy]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_internal_energy_qp0'
[]
[enthalpy]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_enthalpy_qp0'
[]
[]
[Executioner]
type = Steady
solve_type = Newton
[]
[Outputs]
execute_on = 'timestep_end'
csv = true
[]
(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/transfers/multiapp_high_order_variable_transfer/parent_L2_Lagrange_conservative.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
[]
[Variables]
[power_density]
family = L2_LAGRANGE
order = FIRST
[]
[]
[Functions]
[pwr_func]
type = ParsedFunction
expression = '1e3*x*(1-x)+5e2'
[]
[]
[Kernels]
[diff]
type = Reaction
variable = power_density
[]
[coupledforce]
type = BodyForce
variable = power_density
function = pwr_func
[]
[]
[Postprocessors]
[pwr_avg]
type = ElementAverageValue
block = '0'
variable = power_density
execute_on = 'initial timestep_end'
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_abs_tol = 1e-8
nl_rel_tol = 1e-12
[]
[Postprocessors]
[./from_postprocessor]
type = ElementIntegralVariablePostprocessor
variable = power_density
[../]
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
app_type = MooseTestApp
positions = '0 0 0'
input_files = sub_L2_Lagrange_conservative.i
execute_on = 'timestep_end'
[]
[]
[Transfers]
[p_to_sub]
type = MultiAppShapeEvaluationTransfer
source_variable = power_density
variable = power_density
to_multi_app = sub
execute_on = 'timestep_end'
from_postprocessors_to_be_preserved = 'from_postprocessor'
to_postprocessors_to_be_preserved = 'pwr_density'
[]
[]
[Outputs]
exodus = true
perf_graph = true
[]
(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/porous_flow/test/tests/fluids/simple_fluid_yr.i)
# Test the properties calculated by the simple fluid Material
# Time unit is chosen to be years
# Pressure 10 MPa
# Temperature = 300 K (temperature unit = K)
# Density should equal 1500*exp(1E7/1E9-2E-4*300)=1426.844 kg/m^3
# Viscosity should equal 3.49E-11 Pa.yr
# Energy density should equal 4000 * 300 = 1.2E6 J/kg
# Specific enthalpy should equal 4000 * 300 + 10e6 / 1426.844 = 1.207008E6 J/kg
[FluidProperties]
[the_simple_fluid]
type = SimpleFluidProperties
thermal_expansion = 2.0E-4
cv = 4000.0
cp = 5000.0
bulk_modulus = 1.0E9
thermal_conductivity = 1.0
viscosity = 1.1E-3
density0 = 1500.0
[]
[]
[Mesh]
type = GeneratedMesh
dim = 1
nx = 1
[]
[GlobalParams]
PorousFlowDictator = dictator
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pp T'
number_fluid_phases = 1
number_fluid_components = 1
[]
[]
[Variables]
[pp]
initial_condition = 10E6
[]
[T]
initial_condition = 300.0
[]
[]
[Kernels]
[dummy_p]
type = Diffusion
variable = pp
[]
[dummy_T]
type = Diffusion
variable = T
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = T
[]
[ppss]
type = PorousFlow1PhaseFullySaturated
porepressure = pp
[]
[simple_fluid]
type = PorousFlowSingleComponentFluid
temperature_unit = Kelvin
time_unit = years
fp = the_simple_fluid
phase = 0
[]
[]
[Postprocessors]
[pressure]
type = ElementIntegralVariablePostprocessor
variable = pp
[]
[temperature]
type = ElementIntegralVariablePostprocessor
variable = T
[]
[density]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_density_qp0'
[]
[viscosity]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_viscosity_qp0'
[]
[internal_energy]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_internal_energy_qp0'
[]
[enthalpy]
type = ElementIntegralMaterialProperty
mat_prop = 'PorousFlow_fluid_phase_enthalpy_qp0'
[]
[]
[Executioner]
type = Steady
solve_type = Newton
[]
[Outputs]
execute_on = 'timestep_end'
csv = true
[]
(test/tests/controls/pid_control/pid_control.i)
c = 0
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 2
ny = 2
dim = 2
[]
[]
[Variables]
[u]
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[]
[BCs]
[left]
type = DirichletBC
variable = u
boundary = 3
value = '${c}'
[]
[right]
type = DirichletBC
variable = u
boundary = 1
value = 1
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
start_time = 0.0
end_time = 20
dt = 1
[]
[Postprocessors]
[integral]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = 'initial timestep_end'
[]
[left_boundary_average]
type = SideAverageValue
variable = u
boundary = 3
execute_on = 'initial timestep_end'
[]
[]
[Controls]
[integral_value]
type = PIDTransientControl
postprocessor = integral
target = 1.5
parameter = 'BCs/left/value'
K_integral = -1
K_proportional = -1
K_derivative = -0.1
execute_on = 'initial timestep_begin'
[]
[]
[Outputs]
file_base = out
exodus = false
csv = true
[]
(test/tests/kernels/hfem/dirichlet.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 3
ny = 3
dim = 2
[]
build_all_side_lowerd_mesh = true
[]
[Variables]
[u]
order = THIRD
family = MONOMIAL
block = 0
[]
[uhat]
order = CONSTANT
family = MONOMIAL
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
[]
[lambda]
order = CONSTANT
family = MONOMIAL
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
[]
[lambdab]
order = CONSTANT
family = MONOMIAL
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
[]
[]
[AuxVariables]
[v]
order = CONSTANT
family = MONOMIAL
block = 0
initial_condition = '1'
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = '1'
block = 0
[]
[source]
type = CoupledForce
variable = u
v = v
coef = '1'
block = 0
[]
[reaction]
type = Reaction
variable = uhat
rate = '1'
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
[]
[uhat_coupled]
type = CoupledForce
variable = uhat
block = BOUNDARY_SIDE_LOWERD_SUBDOMAIN
v = lambdab
coef = '1'
[]
[]
[DGKernels]
[surface]
type = HFEMDiffusion
variable = u
lowerd_variable = lambda
[]
[]
[BCs]
[all]
type = HFEMDirichletBC
boundary = 'left right top bottom'
variable = u
lowerd_variable = lambdab
uhat = uhat
[]
[]
[Postprocessors]
[intu]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[]
[lambdanorm]
type = ElementL2Norm
variable = lambda
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu basic mumps'
[]
[Outputs]
[out]
# we hide lambda because it may flip sign due to element
# renumbering with distributed mesh
type = Exodus
hide = lambda
[]
[]
(modules/thermal_hydraulics/test/tests/components/heat_source_volumetric_1phase/phy.conservation.1phase.i)
# Tests energy conservation for HeatSourceVolumetric component with 1-phase flow
[GlobalParams]
scaling_factor_1phase = '1 1e-2 1e-4'
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[Components]
[flow_channel]
type = FlowChannel1Phase
position = '0 0 0'
orientation = '1 0 0'
length = 1
n_elems = 10
A = 1
f = 0
fp = fp
closures = simple_closures
initial_T = 310
initial_p = 1e5
initial_vel = 0
[]
[wall1]
type = SolidWall1Phase
input = flow_channel:in
[]
[wall2]
type = SolidWall1Phase
input = flow_channel:out
[]
[heat_source]
type = HeatSourceVolumetric1Phase
flow_channel = flow_channel
q = 1e3
[]
[]
[Postprocessors]
[E_tot]
type = ElementIntegralVariablePostprocessor
variable = rhoEA
execute_on = 'initial timestep_end'
[]
[E_tot_change]
type = ChangeOverTimePostprocessor
change_with_respect_to_initial = true
postprocessor = E_tot
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.1
end_time = 1
abort_on_solve_fail = true
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
csv = true
show = 'E_tot_change'
execute_on = 'final'
[]
(test/tests/transfers/multiapp_high_order_variable_transfer/sub_L2_Lagrange.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 20
ny = 20
[]
[AuxVariables]
[./power_density]
family = L2_LAGRANGE
order = FIRST
[../]
[]
[Variables]
[./temp]
[../]
[]
[Kernels]
[./heat_conduction]
type = Diffusion
variable = temp
[../]
[./heat_source_fuel]
type = CoupledForce
variable = temp
v = power_density
[../]
[]
[BCs]
[bc]
type = DirichletBC
variable = temp
boundary = '0 1 2 3'
value = 450
[]
[]
[Executioner]
type = Steady
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart '
petsc_options_value = 'hypre boomeramg 100'
nl_abs_tol = 1e-7
nl_rel_tol = 1e-7
[]
[Postprocessors]
[./temp_fuel_avg]
type = ElementAverageValue
variable = temp
block = '0'
execute_on = 'initial timestep_end'
[../]
[./pwr_density]
type = ElementIntegralVariablePostprocessor
block = '0'
variable = power_density
execute_on = 'initial timestep_end'
[../]
[]
[Outputs]
perf_graph = true
exodus = true
color = true
[]
(modules/geochemistry/test/tests/kernels/advection_1.i)
# A step-like initial concentration is advected to the right using a constant velocity.
# Because of the Dirichlet BC on the left, the step-like concentration profile is maintained (up to the usual numerical diffusion)
# Because upwinding_type=full in the ConservativeAdvection Kernel, there are no overshoots and undershoots
# The total amount of "conc" should increase by dt * velocity every timestep, as recorded by the front_position Postprocessor
[Mesh]
type = GeneratedMesh
dim = 1
nx = 100
[]
[Variables]
[conc]
[]
[]
[ICs]
[conc]
type = FunctionIC
function = 'if(x<=0.25, 1, 0)'
variable = conc
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
value = 1.0
variable = conc
[]
[]
[Kernels]
[dot]
type = GeochemistryTimeDerivative
variable = conc
[]
[adv]
type = ConservativeAdvection
velocity = velocity
upwinding_type = full
variable = conc
[]
[]
[AuxVariables]
[velocity]
family = MONOMIAL_VEC
order = CONSTANT
[]
[]
[AuxKernels]
[velocity]
type = VectorFunctionAux
function = vel_fcn
variable = velocity
[]
[]
[Functions]
[vel_fcn]
type = ParsedVectorFunction
expression_x = 1
expression_y = 0
expression_z = 0
[]
[]
[Executioner]
type = Transient
solve_type = Newton
dt = 0.01
end_time = 0.1
[]
[Postprocessors]
[front_position]
type = ElementIntegralVariablePostprocessor
variable = conc
[]
[]
[Outputs]
csv = true
[]
(test/tests/misc/save_in/block-restricted-save-in.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 2
xmax = 2
ny = 2
ymax = 2
[]
[./subdomain1]
input = gen
type = SubdomainBoundingBoxGenerator
bottom_left = '0 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]
order = FIRST
family = LAGRANGE
block = 0
[../]
[./v]
order = FIRST
family = LAGRANGE
block = 1
[../]
[]
[AuxVariables]
[./vres]
block = 1
[../]
[]
[Kernels]
[./diff_u]
type = CoeffParamDiffusion
variable = u
D = 4
block = 0
[../]
[./diff_v]
type = CoeffParamDiffusion
variable = v
D = 2
block = 1
[../]
[./source_u]
type = BodyForce
variable = u
value = 1
[../]
[]
[InterfaceKernels]
[./interface]
type = PenaltyInterfaceDiffusion
variable = u
neighbor_var = v
boundary = primary0_interface
penalty = 1e6
[../]
[]
[BCs]
[./u]
type = VacuumBC
variable = u
boundary = 'left_to_0 bottom_to_0 right top'
[../]
[./v]
type = VacuumBC
variable = v
boundary = 'left_to_1 bottom_to_1'
save_in = 'vres'
[../]
[]
[Postprocessors]
[./u_int]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[../]
[./v_int]
type = ElementIntegralVariablePostprocessor
variable = v
block = 1
[../]
[./vres_int]
type = ElementIntegralVariablePostprocessor
variable = vres
block = 1
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
solve_type = NEWTON
[]
[Outputs]
exodus = true
print_linear_residuals = true
[]
(test/tests/executioners/eigen_executioners/ne.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 10
elem_type = QUAD4
nx = 8
ny = 8
uniform_refine = 0
[]
# the minimum eigenvalue of this problem is 2*(PI/a)^2;
# Its inverse is 0.5*(a/PI)^2 = 5.0660591821169. Here a is equal to 10.
[Variables]
active = 'u'
[./u]
# second order is way better than first order
order = FIRST
family = LAGRANGE
[../]
[]
[Kernels]
active = 'diff rhs'
[./diff]
type = Diffusion
variable = u
[../]
[./rhs]
type = MassEigenKernel
variable = u
[../]
[]
[BCs]
active = 'homogeneous'
[./homogeneous]
type = DirichletBC
variable = u
preset = false
boundary = '0 1 2 3'
value = 0
[../]
[]
[Executioner]
type = NonlinearEigen
bx_norm = 'unorm'
normalization = 'unorm'
normal_factor = 9.990012561844
free_power_iterations = 2
nl_abs_tol = 1e-12
nl_rel_tol = 1e-50
k0 = 1.0
#Preconditioned JFNK (default)
solve_type = 'PJFNK'
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Postprocessors]
active = 'unorm udiff'
[./unorm]
type = ElementIntegralVariablePostprocessor
variable = u
# execute on residual is important for nonlinear eigen solver!
execute_on = linear
[../]
[./udiff]
type = ElementL2Diff
variable = u
[../]
[]
[Outputs]
execute_on = 'timestep_end'
file_base = ne
exodus = true
[]
(modules/porous_flow/test/tests/fluidstate/brineco2_hightemp.i)
# Tests correct calculation of properties in PorousFlowBrineCO2 in the elevated
# temperature regime (T > 110C)
[Mesh]
type = GeneratedMesh
dim = 2
[]
[GlobalParams]
PorousFlowDictator = dictator
temperature = 250
[]
[Variables]
[pgas]
initial_condition = 20e6
[]
[z]
initial_condition = 0.2
[]
[]
[AuxVariables]
[xnacl]
initial_condition = 0.1
[]
[pressure_gas]
order = CONSTANT
family = MONOMIAL
[]
[pressure_water]
order = CONSTANT
family = MONOMIAL
[]
[saturation_gas]
order = CONSTANT
family = MONOMIAL
[]
[saturation_water]
order = CONSTANT
family = MONOMIAL
[]
[density_water]
order = CONSTANT
family = MONOMIAL
[]
[density_gas]
order = CONSTANT
family = MONOMIAL
[]
[viscosity_water]
order = CONSTANT
family = MONOMIAL
[]
[viscosity_gas]
order = CONSTANT
family = MONOMIAL
[]
[x0_water]
order = CONSTANT
family = MONOMIAL
[]
[x0_gas]
order = CONSTANT
family = MONOMIAL
[]
[x1_water]
order = CONSTANT
family = MONOMIAL
[]
[x1_gas]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[pressure_water]
type = PorousFlowPropertyAux
variable = pressure_water
property = pressure
phase = 0
execute_on = timestep_end
[]
[pressure_gas]
type = PorousFlowPropertyAux
variable = pressure_gas
property = pressure
phase = 1
execute_on = timestep_end
[]
[saturation_water]
type = PorousFlowPropertyAux
variable = saturation_water
property = saturation
phase = 0
execute_on = timestep_end
[]
[saturation_gas]
type = PorousFlowPropertyAux
variable = saturation_gas
property = saturation
phase = 1
execute_on = timestep_end
[]
[density_water]
type = PorousFlowPropertyAux
variable = density_water
property = density
phase = 0
execute_on = timestep_end
[]
[density_gas]
type = PorousFlowPropertyAux
variable = density_gas
property = density
phase = 1
execute_on = timestep_end
[]
[viscosity_water]
type = PorousFlowPropertyAux
variable = viscosity_water
property = viscosity
phase = 0
execute_on = timestep_end
[]
[viscosity_gas]
type = PorousFlowPropertyAux
variable = viscosity_gas
property = viscosity
phase = 1
execute_on = timestep_end
[]
[x1_water]
type = PorousFlowPropertyAux
variable = x1_water
property = mass_fraction
phase = 0
fluid_component = 1
execute_on = timestep_end
[]
[x1_gas]
type = PorousFlowPropertyAux
variable = x1_gas
property = mass_fraction
phase = 1
fluid_component = 1
execute_on = timestep_end
[]
[x0_water]
type = PorousFlowPropertyAux
variable = x0_water
property = mass_fraction
phase = 0
fluid_component = 0
execute_on = timestep_end
[]
[x0_gas]
type = PorousFlowPropertyAux
variable = x0_gas
property = mass_fraction
phase = 1
fluid_component = 0
execute_on = timestep_end
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
variable = pgas
fluid_component = 0
[]
[mass1]
type = PorousFlowMassTimeDerivative
variable = z
fluid_component = 1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pgas z'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[fs]
type = PorousFlowBrineCO2
brine_fp = brine
co2_fp = co2
capillary_pressure = pc
[]
[]
[FluidProperties]
[co2]
type = CO2FluidProperties
[]
[brine]
type = BrineFluidProperties
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
[]
[brineco2]
type = PorousFlowFluidState
gas_porepressure = pgas
z = z
temperature_unit = Celsius
xnacl = xnacl
capillary_pressure = pc
fluid_state = fs
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-12 0 0 0 1e-12 0 0 0 1e-12'
[]
[relperm0]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[relperm1]
type = PorousFlowRelativePermeabilityCorey
n = 3
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 1
end_time = 1
nl_abs_tol = 1e-12
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[density_water]
type = ElementIntegralVariablePostprocessor
variable = density_water
[]
[density_gas]
type = ElementIntegralVariablePostprocessor
variable = density_gas
[]
[viscosity_water]
type = ElementIntegralVariablePostprocessor
variable = viscosity_water
[]
[viscosity_gas]
type = ElementIntegralVariablePostprocessor
variable = viscosity_gas
[]
[x1_water]
type = ElementIntegralVariablePostprocessor
variable = x1_water
[]
[x0_water]
type = ElementIntegralVariablePostprocessor
variable = x0_water
[]
[x1_gas]
type = ElementIntegralVariablePostprocessor
variable = x1_gas
[]
[x0_gas]
type = ElementIntegralVariablePostprocessor
variable = x0_gas
[]
[sg]
type = ElementIntegralVariablePostprocessor
variable = saturation_gas
[]
[sw]
type = ElementIntegralVariablePostprocessor
variable = saturation_water
[]
[pwater]
type = ElementIntegralVariablePostprocessor
variable = pressure_water
[]
[pgas]
type = ElementIntegralVariablePostprocessor
variable = pressure_gas
[]
[x0mass]
type = PorousFlowFluidMass
fluid_component = 0
phase = '0 1'
[]
[x1mass]
type = PorousFlowFluidMass
fluid_component = 1
phase = '0 1'
[]
[]
[Outputs]
csv = true
execute_on = 'TIMESTEP_END'
perf_graph = false
[]
(test/tests/transfers/multiapp_conservative_transfer/parent_power_density.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmax = 1
ymax = 1
nx = 10
ny = 10
[]
[block1]
input = gen
type = SubdomainBoundingBoxGenerator
block_id = 1
bottom_left = '0.5 0 0'
top_right = '1 1 0'
[]
[]
[Variables]
[power_density]
[]
[]
[Functions]
[pwr_func]
type = ParsedFunction
expression = '1e3*x*(1-x)+5e2'
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = power_density
[]
[coupledforce]
type = BodyForce
variable = power_density
function = pwr_func
[]
[]
[BCs]
[left]
type = DirichletBC
variable = power_density
boundary = left
value = 0
[]
[right]
type = DirichletBC
variable = power_density
boundary = right
value = 1e3
[]
[]
[AuxVariables]
[from_sub]
[]
[]
[Postprocessors]
[pwr0]
type = ElementIntegralVariablePostprocessor
block = 0
variable = power_density
[]
[pwr1]
type = ElementIntegralVariablePostprocessor
block = 1
variable = power_density
[]
[from_sub0]
type = ElementIntegralVariablePostprocessor
block = 0
variable = from_sub
execute_on = 'transfer'
[]
[from_sub1]
type = ElementIntegralVariablePostprocessor
block = 1
variable = from_sub
execute_on = 'transfer'
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
input_files = sub_power_density.i
positions = '0 0 0 0.5 0 0'
execute_on = timestep_end
[]
[]
[Transfers]
[to_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
source_variable = power_density
variable = from_parent
to_multi_app = sub
execute_on = timestep_end
# The following inputs specify what postprocessors should be conserved
# N pps are specified on the parent side, where N is the number of subapps
# 1 pp is specified on the subapp side
from_postprocessors_to_be_preserved = 'pwr0 pwr1'
to_postprocessors_to_be_preserved = 'from_parent_pp'
[]
[from_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
source_variable = sink
variable = from_sub
from_multi_app = sub
execute_on = timestep_end
# The following inputs specify what postprocessors should be conserved
# N pps are specified on the parent side, where N is the number of subapps
# 1 pp is specified on the subapp side
to_postprocessors_to_be_preserved = 'from_sub0 from_sub1'
from_postprocessors_to_be_preserved = 'sink'
[]
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_sphere_mortar.i)
sphere_outer_htc = 10 # W/m^2/K
sphere_outer_Tinf = 300 # K
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Problem]
coord_type = RZ
kernel_coverage_check = false
material_coverage_check = false
[]
[Mesh]
[file]
type = FileMeshGenerator
file = cyl2D.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '3'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Functions]
[temp]
type = PiecewiseLinear
x = '0 1'
y = '100 200'
[]
[]
[Variables]
[temp]
initial_condition = 500
[]
[lm]
order = SECOND
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[AuxVariables]
[power_density]
block = 'fuel'
initial_condition = 50e3
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temp
block = '1 2'
[]
[heat_source]
type = CoupledForce
variable = temp
block = 'fuel'
v = power_density
[]
[]
[Materials]
[heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 34.6
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = temp
boundary = 2
primary_emissivity = 0.0
secondary_emissivity = 0.0
[]
[conduction]
type = GapFluxModelConduction
temperature = temp
boundary = 2
gap_conductivity = 5.0
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
primary_boundary = 3
primary_subdomain = 10000
secondary_boundary = 2
secondary_subdomain = 10001
gap_flux_models = 'radiation conduction'
gap_geometry_type = SPHERE
sphere_origin = '0 0 0'
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = temp
boundary = '4' # outer RPV
coefficient = ${sphere_outer_htc}
T_infinity = ${sphere_outer_Tinf}
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 1
dtmin = 0.01
end_time = 1
nl_rel_tol = 1e-12
nl_abs_tol = 1e-7
[]
[Outputs]
exodus = true
csv = true
[Console]
type = Console
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '2 3'
variable = temp
[]
[]
[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
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = 'fuel'
[]
[sphere_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = temp
boundary = '4' # outer RVP
T_fluid = ${sphere_outer_Tinf}
htc = ${sphere_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(sphere_convective_out - ptot) / ptot'
pp_names = 'sphere_convective_out ptot'
[]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/large_gap_heat_transfer_test_sphere_mortar_error.i)
sphere_outer_htc = 10 # W/m^2/K
sphere_outer_Tinf = 300 # K
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Problem]
coord_type = RZ
kernel_coverage_check = false
material_coverage_check = false
[]
[Mesh]
[file]
type = FileMeshGenerator
file = cyl2D.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '2'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '3'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Functions]
[temp]
type = PiecewiseLinear
x = '0 1'
y = '100 200'
[]
[]
[Variables]
[temp]
initial_condition = 500
[]
[lm]
order = SECOND
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[AuxVariables]
[power_density]
block = 'fuel'
initial_condition = 50e3
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temp
block = '1 2'
[]
[heat_source]
type = CoupledForce
variable = temp
block = 'fuel'
v = power_density
[]
[]
[Materials]
[heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 34.6
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = temp
boundary = 2
primary_emissivity = 0.0
secondary_emissivity = 0.0
[]
[conduction]
type = GapFluxModelConduction
temperature = temp
boundary = 2
gap_conductivity = 5.0
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
primary_boundary = 3
primary_subdomain = 10000
secondary_boundary = 2
secondary_subdomain = 10001
gap_flux_models = 'radiation conduction'
gap_geometry_type = SPHERE
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = temp
boundary = '4' # outer RPV
coefficient = ${sphere_outer_htc}
T_infinity = ${sphere_outer_Tinf}
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 1
dtmin = 0.01
end_time = 1
nl_rel_tol = 1e-12
nl_abs_tol = 1e-7
[]
[Outputs]
exodus = true
csv = true
[Console]
type = Console
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '2 3'
variable = temp
[]
[]
[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
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = 'fuel'
[]
[sphere_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = temp
boundary = '4' # outer RVP
T_fluid = ${sphere_outer_Tinf}
htc = ${sphere_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(sphere_convective_out - ptot) / ptot'
pp_names = 'sphere_convective_out ptot'
[]
[]
(modules/phase_field/tutorials/spinodal_decomposition/s5_energycurve.i)
#
# Example simulation of an iron-chromium alloy at 500 C. Equilibrium
# concentrations are at 23.6 and 82.3 mol% Cr. Kappa value, free energy equation,
# and mobility equation were provided by Lars Hoglund. Solved using the split
# form of the Cahn-Hilliard equation.
[Mesh]
type = GeneratedMesh
dim = 2
elem_type = QUAD4
nx = 25
ny = 25
nz = 0
xmin = 0
xmax = 25
ymin = 0
ymax = 25
zmin = 0
zmax = 0
uniform_refine = 2
[]
[Variables]
[./c] # Mole fraction of Cr (unitless)
order = FIRST
family = LAGRANGE
scaling = 1e+04
[../]
[./w] # Chemical potential (eV/mol)
order = FIRST
family = LAGRANGE
[../]
[]
[AuxVariables]
[./f_density] # Local energy density (eV/mol)
order = CONSTANT
family = MONOMIAL
[../]
[]
[ICs]
[./concentrationIC] # 46.774 mol% Cr with variations
type = RandomIC
min = 0.44774
max = 0.48774
seed = 210
variable = c
[../]
[]
[BCs]
[./Periodic]
[./c_bcs]
auto_direction = 'x y'
[../]
[../]
[]
[Kernels]
[./w_dot]
variable = w
v = c
type = CoupledTimeDerivative
[../]
[./coupled_res]
variable = w
type = SplitCHWRes
mob_name = M
[../]
[./coupled_parsed]
variable = c
type = SplitCHParsed
f_name = f_loc
kappa_name = kappa_c
w = w
[../]
[]
[AuxKernels]
# Calculates the energy density by combining the local and gradient energies
[./f_density] # (eV/mol/nm^2)
type = TotalFreeEnergy
variable = f_density
f_name = 'f_loc'
kappa_names = 'kappa_c'
interfacial_vars = c
[../]
[]
[Materials]
# d is a scaling factor that makes it easier for the solution to converge
# without changing the results. It is defined in each of the first three
# materials and must have the same value in each one.
[./kappa] # Gradient energy coefficient (eV nm^2/mol)
type = GenericFunctionMaterial
prop_names = 'kappa_c'
prop_values = '8.125e-16*6.24150934e+18*1e+09^2*1e-27'
# kappa_c *eV_J*nm_m^2* d
[../]
[./mobility] # Mobility (nm^2 mol/eV/s)
# NOTE: This is a fitted equation, so only 'Conv' has units
type = DerivativeParsedMaterial
property_name = M
coupled_variables = c
constant_names = 'Acr Bcr Ccr Dcr
Ecr Fcr Gcr
Afe Bfe Cfe Dfe
Efe Ffe Gfe
nm_m eV_J d'
constant_expressions = '-32.770969 -25.8186669 -3.29612744 17.669757
37.6197853 20.6941796 10.8095813
-31.687117 -26.0291774 0.2286581 24.3633544
44.3334237 8.72990497 20.956768
1e+09 6.24150934e+18 1e-27'
expression = 'nm_m^2/eV_J/d*((1-c)^2*c*10^
(Acr*c+Bcr*(1-c)+Ccr*c*log(c)+Dcr*(1-c)*log(1-c)+
Ecr*c*(1-c)+Fcr*c*(1-c)*(2*c-1)+Gcr*c*(1-c)*(2*c-1)^2)
+c^2*(1-c)*10^
(Afe*c+Bfe*(1-c)+Cfe*c*log(c)+Dfe*(1-c)*log(1-c)+
Efe*c*(1-c)+Ffe*c*(1-c)*(2*c-1)+Gfe*c*(1-c)*(2*c-1)^2))'
derivative_order = 1
outputs = exodus
[../]
[./local_energy] # Local free energy function (eV/mol)
type = DerivativeParsedMaterial
property_name = f_loc
coupled_variables = c
constant_names = 'A B C D E F G eV_J d'
constant_expressions = '-2.446831e+04 -2.827533e+04 4.167994e+03 7.052907e+03
1.208993e+04 2.568625e+03 -2.354293e+03
6.24150934e+18 1e-27'
expression = 'eV_J*d*(A*c+B*(1-c)+C*c*log(c)+D*(1-c)*log(1-c)+
E*c*(1-c)+F*c*(1-c)*(2*c-1)+G*c*(1-c)*(2*c-1)^2)'
derivative_order = 2
[../]
[./precipitate_indicator] # Returns 1/625 if precipitate
type = ParsedMaterial
property_name = prec_indic
coupled_variables = c
expression = if(c>0.6,0.0016,0)
[../]
[]
[Postprocessors]
[./step_size] # Size of the time step
type = TimestepSize
[../]
[./iterations] # Number of iterations needed to converge timestep
type = NumNonlinearIterations
[../]
[./nodes] # Number of nodes in mesh
type = NumNodes
[../]
[./evaluations] # Cumulative residual calculations for simulation
type = NumResidualEvaluations
[../]
[./total_energy] # Total free energy at each timestep
type = ElementIntegralVariablePostprocessor
variable = f_density
execute_on = 'initial timestep_end'
[../]
[./num_features] # Number of precipitates formed
type = FeatureFloodCount
variable = c
threshold = 0.6
[../]
[./precipitate_area] # Fraction of surface devoted to precipitates
type = ElementIntegralMaterialProperty
mat_prop = prec_indic
[../]
[./active_time] # Time computer spent on simulation
type = PerfGraphData
section_name = "Root"
data_type = total
[../]
[]
[Preconditioning]
[./coupled]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = NEWTON
l_max_its = 30
l_tol = 1e-6
nl_max_its = 50
nl_abs_tol = 1e-9
end_time = 604800 # 7 days
petsc_options_iname = '-pc_type -ksp_gmres_restart -sub_ksp_type
-sub_pc_type -pc_asm_overlap'
petsc_options_value = 'asm 31 preonly
ilu 1'
[./TimeStepper]
type = IterationAdaptiveDT
dt = 10
cutback_factor = 0.8
growth_factor = 1.5
optimal_iterations = 7
[../]
[./Adaptivity]
coarsen_fraction = 0.1
refine_fraction = 0.7
max_h_level = 2
[../]
[]
[Outputs]
exodus = true
console = true
csv = true
[./console]
type = Console
max_rows = 10
[../]
[]
(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/phase_field/test/tests/free_energy_material/CoupledValueFunctionFreeEnergy.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
nz = 0
xmin = 0
xmax = 500
ymin = 0
ymax = 500
zmin = 0
zmax = 0
elem_type = QUAD4
[]
[GlobalParams]
op_num = 4
var_name_base = gr
[]
[Variables]
[PolycrystalVariables]
[]
[]
[Functions]
[grain_growth_energy]
type = PiecewiseMultilinear
data_file = grain_growth_energy.data
[]
[grain_growth_mu0]
type = PiecewiseMultilinear
data_file = grain_growth_mu0.data
[]
[grain_growth_mu1]
type = PiecewiseMultilinear
data_file = grain_growth_mu1.data
[]
[grain_growth_mu2]
type = PiecewiseMultilinear
data_file = grain_growth_mu2.data
[]
[grain_growth_mu3]
type = PiecewiseMultilinear
data_file = grain_growth_mu3.data
[]
[matrix]
type = ParsedFunction
expression = '1-x-y-z'
[]
[]
[ICs]
[gr1]
type = SmoothCircleIC
variable = gr1
x1 = 0
y1 = 0
radius = 150
int_width = 90
invalue = 1
outvalue = 0
[]
[gr2]
type = SmoothCircleIC
variable = gr2
x1 = 500
y1 = 0
radius = 120
int_width = 90
invalue = 1
outvalue = 0
[]
[gr3]
type = SmoothCircleIC
variable = gr3
x1 = 250
y1 = 500
radius = 300
int_width = 90
invalue = 1
outvalue = 0
[]
[gr0]
type = CoupledValueFunctionIC
variable = gr0
v = 'gr1 gr2 gr3'
function = matrix
[]
[]
[AuxVariables]
[bnds]
order = FIRST
family = LAGRANGE
[]
[local_energy]
order = CONSTANT
family = MONOMIAL
[]
[]
[Kernels]
[gr0dot]
type = TimeDerivative
variable = gr0
[]
[gr0bulk]
type = AllenCahn
variable = gr0
f_name = F
coupled_variables = 'gr1 gr2 gr3'
[]
[gr0int]
type = ACInterface
variable = gr0
kappa_name = kappa_op
[]
[gr1dot]
type = TimeDerivative
variable = gr1
[]
[gr1bulk]
type = AllenCahn
variable = gr1
f_name = F
coupled_variables = 'gr0 gr2 gr3'
[]
[gr1int]
type = ACInterface
variable = gr1
kappa_name = kappa_op
[]
[gr2dot]
type = TimeDerivative
variable = gr2
[]
[gr2bulk]
type = AllenCahn
variable = gr2
f_name = F
coupled_variables = 'gr0 gr1 gr3'
[]
[gr2int]
type = ACInterface
variable = gr2
kappa_name = kappa_op
[]
[gr3dot]
type = TimeDerivative
variable = gr3
[]
[gr3bulk]
type = AllenCahn
variable = gr3
f_name = F
coupled_variables = 'gr0 gr1 gr2'
[]
[gr3int]
type = ACInterface
variable = gr3
kappa_name = kappa_op
[]
[]
[AuxKernels]
[BndsCalc]
type = BndsCalcAux
variable = bnds
[]
[local_free_energy]
type = TotalFreeEnergy
variable = local_energy
kappa_names = 'kappa_op kappa_op kappa_op kappa_op'
interfacial_vars = 'gr0 gr1 gr2 gr3'
[]
[]
[Materials]
[Copper]
type = GBEvolution
T = 500 # K
wGB = 60 # nm
GBmob0 = 2.5e-6 # m^4/(Js) from Schoenfelder 1997
Q = 0.23 # Migration energy in eV
GBenergy = 0.708 # GB energy in J/m^2
[]
[Tabulated]
type = CoupledValueFunctionFreeEnergy
free_energy_function = grain_growth_energy
chemical_potential_functions = 'grain_growth_mu0 grain_growth_mu1 grain_growth_mu2 '
'grain_growth_mu3'
v = 'gr0 gr1 gr2 gr3'
[]
[]
[Postprocessors]
[total_energy]
type = ElementIntegralVariablePostprocessor
variable = local_energy
[]
[]
[Preconditioning]
[SMP]
type = SMP
coupled_groups = 'gr0,gr1 gr0,gr2 gr0,gr3'
[]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
l_tol = 1.0e-4
l_max_its = 30
nl_max_its = 30
nl_rel_tol = 1.0e-9
start_time = 0.0
num_steps = 3
dt = 100.0
[]
[Outputs]
exodus = true
print_linear_residuals = false
perf_graph = 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/combined/examples/optimization/3d_mbb.i)
vol_frac = 0.5
E0 = 1
Emin = 1e-8
power = 2
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Mesh]
[MeshGenerator]
type = GeneratedMeshGenerator
dim = 3
nx = 60
ny = 20
nz = 20
xmin = 0
xmax = 30
ymin = 0
ymax = 10
zmin = 0
zmax = 10
[]
[node]
type = ExtraNodesetGenerator
input = MeshGenerator
new_boundary = hold_y
coord = '0 0 0; 0 0 10'
[]
[push]
type = ExtraNodesetGenerator
input = node
new_boundary = push
coord = '30 10 5'
[]
[]
[Variables]
[disp_z]
[]
[Dc]
initial_condition = -1.0
[]
[]
[AuxVariables]
[Emin]
family = MONOMIAL
order = CONSTANT
initial_condition = ${Emin}
[]
[power]
family = MONOMIAL
order = CONSTANT
initial_condition = ${power}
[]
[E0]
family = MONOMIAL
order = CONSTANT
initial_condition = ${E0}
[]
[sensitivity]
family = MONOMIAL
order = FIRST
initial_condition = -1.0
[AuxKernel]
type = MaterialRealAux
variable = sensitivity
property = sensitivity
execute_on = LINEAR
[]
[]
[mat_den]
family = MONOMIAL
order = CONSTANT
initial_condition = ${vol_frac}
[]
[Dc_elem]
family = MONOMIAL
order = CONSTANT
initial_condition = -1.0
[AuxKernel]
type = SelfAux
variable = Dc_elem
v = Dc
execute_on = 'TIMESTEP_END'
[]
[]
[mat_den_nodal]
family = L2_LAGRANGE
order = FIRST
initial_condition = ${vol_frac}
[AuxKernel]
type = SelfAux
execute_on = TIMESTEP_END
variable = mat_den_nodal
v = mat_den
[]
[]
[]
[Modules/TensorMechanics/Master]
[all]
strain = SMALL
add_variables = true
incremental = false
[]
[]
[Kernels]
[diffusion]
type = FunctionDiffusion
variable = Dc
function = 0.15 # radius coeff
[]
[potential]
type = Reaction
variable = Dc
[]
[source]
type = CoupledForce
variable = Dc
v = sensitivity
[]
[]
[BCs]
[no_x]
type = DirichletBC
variable = disp_y
boundary = hold_y
value = 0.0
[]
[no_y]
type = DirichletBC
variable = disp_x
boundary = right
value = 0.0
[]
[boundary_penalty]
type = ADRobinBC
variable = Dc
boundary = 'left top front back'
coefficient = 10
[]
[boundary_penalty_right]
type = ADRobinBC
variable = Dc
boundary = 'right'
coefficient = 10
[]
[]
[NodalKernels]
[push]
type = NodalGravity
variable = disp_y
boundary = push
gravity_value = -1
mass = 1
[]
[]
[Materials]
[elasticity_tensor]
type = ComputeVariableIsotropicElasticityTensor
youngs_modulus = E_phys
poissons_ratio = poissons_ratio
args = 'Emin mat_den power E0'
[]
[E_phys]
type = DerivativeParsedMaterial
# Emin + (density^penal) * (E0 - Emin)
expression = '${Emin} + (mat_den ^ ${power}) * (${E0}-${Emin})'
coupled_variables = 'mat_den'
property_name = E_phys
[]
[poissons_ratio]
type = GenericConstantMaterial
prop_names = poissons_ratio
prop_values = 0.3
[]
[stress]
type = ComputeLinearElasticStress
[]
[dc]
type = ComplianceSensitivity
design_density = mat_den
youngs_modulus = E_phys
incremental = false
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[UserObjects]
[update]
type = DensityUpdate
density_sensitivity = Dc_elem
design_density = mat_den
volume_fraction = ${vol_frac}
execute_on = TIMESTEP_BEGIN
force_postaux = true
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
line_search = none
nl_abs_tol = 1e-4
l_max_its = 200
start_time = 0.0
dt = 1.0
num_steps = 70
[]
[Outputs]
[out]
type = Exodus
execute_on = 'INITIAL TIMESTEP_END'
[]
print_linear_residuals = false
[]
[Postprocessors]
[total_vol]
type = ElementIntegralVariablePostprocessor
variable = mat_den
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Controls]
[first_period]
type = TimePeriod
start_time = 0.0
end_time = 10
enable_objects = 'BCs::boundary_penalty_right'
execute_on = 'initial timestep_begin'
[]
[]
(test/tests/misc/selective_reinit/selective_reinit_test.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[Variables]
[./u]
[../]
[]
[AuxVariables]
[./dummy]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./diff]
type = Diffusion
variable = u
[../]
[]
[AuxKernels]
[./constant_dummy]
type = ConstantAux
variable = dummy
execute_on = 'initial timestep_end'
value = 4
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = u
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = u
boundary = right
value = 1
[../]
[]
[Postprocessors]
[./u_integral]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = linear
[../]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Adaptivity]
[./Indicators]
[./indicator]
type = GradientJumpIndicator
variable = u
[../]
[../]
[./Markers]
[./box]
type = BoxMarker
bottom_left = '0.2 0.2 0'
top_right = '0.8 0.8 0'
inside = refine
outside = coarsen
[../]
[../]
[]
[Outputs]
exodus = true
show = u
[]
[LotsOfAuxVariables]
[./avar]
number = 20
[../]
[]
(modules/thermal_hydraulics/test/tests/components/heat_transfer_from_heat_structure_1phase/phy.conservation_1phase.i)
# Tests conservation for heat transfer between a cylindrical heat structure and
# a 1-phase flow channel
[GlobalParams]
gravity_vector = '0 0 0'
scaling_factor_1phase = '1e-3 1e-3 1e-8'
scaling_factor_temperature = 1e-3
closures = simple_closures
[]
[FluidProperties]
[fp]
type = StiffenedGasFluidProperties
gamma = 2.35
q = -1167e3
q_prime = 0
p_inf = 1.e9
cv = 1816
[]
[]
[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]
[SolidProperties]
[main-material]
type = ThermalFunctionSolidProperties
k = 1e4
cp = 500.0
rho = 100.0
[]
[]
[Functions]
[T0_fn]
type = ParsedFunction
expression = '290 + 20 * (y - 1)'
[]
[]
[Components]
[left_wall]
type = SolidWall1Phase
input = 'pipe:in'
[]
[pipe]
type = FlowChannel1Phase
fp = fp
position = '0 2 0'
orientation = '1 0 0'
length = 1.0
n_elems = 5
A = 1.0
initial_T = 300
initial_p = 1e5
initial_vel = 0
f = 0
[]
[right_wall]
type = SolidWall1Phase
input = 'pipe:out'
[]
[heat_transfer]
type = HeatTransferFromHeatStructure1Phase
flow_channel = pipe
hs = heat_structure
hs_side = inner
Hw = 1e3
[]
[heat_structure]
#type = set externally
num_rods = 5
position = '0 2 0'
orientation = '1 0 0'
length = 1.0
n_elems = 5
names = 'main'
solid_properties = 'main-material'
solid_properties_T_ref = '300'
widths = '1.0'
n_part_elems = '5'
initial_T = T0_fn
[]
[]
[Postprocessors]
[E_pipe]
type = ElementIntegralVariablePostprocessor
variable = rhoEA
block = pipe
execute_on = 'initial timestep_end'
[]
[E_heat_structure]
block = 'heat_structure:main'
n_units = 5
execute_on = 'initial timestep_end'
[]
[E_tot]
type = SumPostprocessor
values = 'E_pipe E_heat_structure'
execute_on = 'initial timestep_end'
[]
[E_tot_change]
type = ChangeOverTimePostprocessor
change_with_respect_to_initial = true
postprocessor = E_tot
compute_relative_change = true
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 = 0.01
num_steps = 5
abort_on_solve_fail = true
[Quadrature]
type = GAUSS
order = SECOND
[]
[]
[Outputs]
file_base = 'phy.conservation_1phase_cylinder'
csv = true
show = 'E_tot_change'
execute_on = 'final'
[]
(test/tests/problems/eigen_problem/eigensolvers/ne-coupled-resid-scaling.i)
[Mesh]
type = GeneratedMesh
dim = 2
xmin = 0
xmax = 10
ymin = 0
ymax = 10
elem_type = QUAD4
nx = 8
ny = 8
[]
[Variables]
[u]
initial_condition = 1
[]
[T]
initial_condition = 1
[]
[]
[AuxVariables]
[power][]
[]
[Kernels]
[./diff]
type = DiffMKernel
variable = u
mat_prop = diffusion
offset = 0.0
[../]
[./rhs]
type = CoefReaction
variable = u
coefficient = -1.0
extra_vector_tags = 'eigen'
[../]
[./diff_T]
type = CoefDiffusion
variable = T
coef = 1e30
[../]
[./src_T]
type = CoupledForce
variable = T
v = power
coef = 1e30
[../]
[]
[AuxKernels]
[./power_ak]
type = NormalizationAux
variable = power
source_variable = u
normalization = unorm
# this coefficient will affect the eigenvalue.
normal_factor = 10
execute_on = linear
[../]
[]
[BCs]
[./homogeneous]
type = DirichletBC
variable = u
boundary = '0 1 2 3'
value = 0
[../]
[./eigenU]
type = EigenDirichletBC
variable = u
boundary = '0 1 2 3'
[../]
[./homogeneousT]
type = DirichletBC
variable = T
boundary = '0 1 2 3'
value = 0
[../]
[./eigenT]
type = EigenDirichletBC
variable = T
boundary = '0 1 2 3'
[../]
[]
[Materials]
[./dc]
type = VarCouplingMaterial
var = T
block = 0
base = 1.0
coef = 1.0
[../]
[]
[Executioner]
type = Eigenvalue
solve_type = PJFNK
automatic_scaling = true
petsc_options = '-pc_svd_monitor'
petsc_options_iname = '-pc_type'
petsc_options_value = 'svd'
verbose = true
resid_vs_jac_scaling_param = 1
[]
[Postprocessors]
[./unorm]
type = ElementIntegralVariablePostprocessor
variable = u
execute_on = linear
[../]
[]
[VectorPostprocessors]
[./eigenvalues]
type = Eigenvalues
execute_on = 'timestep_end'
[../]
[]
[Outputs]
exodus = true
csv = true
execute_on = 'timestep_end'
[]
(test/tests/kernels/hfem/neumann.i)
[Mesh]
[square]
type = GeneratedMeshGenerator
nx = 3
ny = 3
dim = 2
[]
build_all_side_lowerd_mesh = true
[]
[Variables]
[u]
order = THIRD
family = MONOMIAL
block = 0
[]
[lambda]
order = CONSTANT
family = MONOMIAL
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
[]
[]
[Kernels]
[diff]
type = MatDiffusion
variable = u
diffusivity = '1'
block = 0
[]
[reaction]
type = Reaction
variable = u
rate = '1'
block = 0
[]
[source]
type = BodyForce
variable = u
value = '1'
block = 0
[]
[]
[DGKernels]
[surface]
type = HFEMDiffusion
variable = u
lowerd_variable = lambda
[]
[]
[BCs]
[all]
type = NeumannBC
boundary = 'left right top bottom'
variable = u
[]
[]
[Postprocessors]
[intu]
type = ElementIntegralVariablePostprocessor
variable = u
block = 0
[]
[lambdanorm]
type = ElementL2Norm
variable = lambda
block = INTERNAL_SIDE_LOWERD_SUBDOMAIN
[]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -snes_linesearch_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu basic mumps'
[]
[Outputs]
[out]
# we hide lambda because it may flip sign due to element
# renumbering with distributed mesh
type = Exodus
hide = lambda
[]
[]
(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/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/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_3D.i)
outer_htc = 10 # W/m^2/K
outer_Tinf = 300 # K
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Mesh]
[left_block]
type = GeneratedMeshGenerator
dim = 3
nx = 3
ny = 6
nz = 6
xmin = -1
xmax = -0.5
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
elem_type = HEX27
[]
[left_block_sidesets]
type = RenameBoundaryGenerator
input = left_block
old_boundary = '0 1 2 3 4 5'
new_boundary = 'left_bottom left_back left_right left_front left_left left_top'
[]
[left_block_id]
type = SubdomainIDGenerator
input = left_block_sidesets
subdomain_id = 1
[]
[right_block]
type = GeneratedMeshGenerator
dim = 3
nx = 4
ny = 8
nz = 8
xmin = 0.5
xmax = 1
ymin = -0.5
ymax = 0.5
zmin = -0.5
zmax = 0.5
elem_type = HEX27
[]
[right_block_sidesets]
type = RenameBoundaryGenerator
input = right_block
old_boundary = '0 1 2 3 4 5'
# new_boundary = 'right_bottom right_back right_right right_front right_left right_top'
new_boundary = '100 101 102 103 104 105'
[]
[right_block_sidesets_rename]
type = RenameBoundaryGenerator
input = right_block_sidesets
old_boundary = '100 101 102 103 104 105'
new_boundary = 'right_bottom right_back right_right right_front right_left right_top'
[]
[right_block_id]
type = SubdomainIDGenerator
input = right_block_sidesets_rename
subdomain_id = 2
[]
[combined_mesh]
type = MeshCollectionGenerator
inputs = 'left_block_id right_block_id'
[]
[]
[Functions]
[temp]
type = PiecewiseLinear
x = '0 1'
y = '100 200'
[]
[]
[Variables]
[temp]
initial_condition = 500
[]
[]
[AuxVariables]
[gap_conductance]
order = CONSTANT
family = MONOMIAL
[]
[power_density]
block = 1
initial_condition = 50e3
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temp
[]
[heat_source]
type = CoupledForce
variable = temp
block = 1
v = power_density
[]
[]
[AuxKernels]
[gap_cond]
type = MaterialRealAux
property = gap_conductance
variable = gap_conductance
boundary = 'left_right'
[]
[]
[Materials]
[heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 34.6
[]
[]
[ThermalContact]
[thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 'right_left'
secondary = 'left_right'
emissivity_primary = 0
emissivity_secondary = 0
gap_conductivity = 5
gap_geometry_type = PLATE
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = temp
boundary = 'right_right' # outer RPV
coefficient = ${outer_htc}
T_infinity = ${outer_Tinf}
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 1
dtmin = 0.01
end_time = 1
nl_rel_tol = 1e-12
nl_abs_tol = 1e-8
[Quadrature]
order = fifth
side_order = seventh
[]
[]
[Outputs]
exodus = true
csv = true
[Console]
type = Console
[]
[]
[Postprocessors]
[temp_left]
type = SideAverageValue
boundary = 'left_right'
variable = temp
[]
[temp_right]
type = SideAverageValue
boundary = 'right_left'
variable = temp
[]
[flux_left]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 'left_right'
diffusivity = thermal_conductivity
[]
[flux_right]
type = SideDiffusiveFluxIntegral
variable = temp
boundary = 'right_left'
diffusivity = thermal_conductivity
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = 1
[]
[convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = temp
boundary = 'right_right' # outer RVP
T_fluid = ${outer_Tinf}
htc = ${outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(convective_out - ptot) / ptot'
pp_names = 'convective_out ptot'
[]
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = 'left_right right_left'
variable = temp
[]
[]
(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 = ' '
[../]
[]
(test/tests/transfers/multiapp_conservative_transfer/sub_userobject.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 4
ny = 8
xmax = 0.1
ymax = 0.5
coord_type = rz
[]
[Variables]
[u]
initial_condition = 1
[]
[]
[AuxVariables]
[layered_average_value]
order = CONSTANT
family = MONOMIAL
[]
[]
[Postprocessors]
[from_postprocessor]
type = ElementIntegralVariablePostprocessor
variable = layered_average_value
[]
[]
[Functions]
[axial_force]
type = ParsedFunction
expression = 1000*y
[]
[]
[Kernels]
[diff]
type = Diffusion
variable = u
[]
[td]
type = TimeDerivative
variable = u
[]
[force]
type = BodyForce
variable = u
function = axial_force
[]
[]
[AuxKernels]
[layered_aux]
type = SpatialUserObjectAux
variable = layered_average_value
execute_on = 'nonlinear TIMESTEP_END'
user_object = layered_average
[]
[]
[BCs]
[right]
type = DirichletBC
variable = u
boundary = right
value = 1
[]
[]
[UserObjects]
[layered_average]
type = LayeredAverage
variable = u
direction = y
num_layers = 4
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 0.001
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/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/porous_flow/test/tests/fluidstate/waterncg_ic.i)
# Tests correct calculation of z (total mass fraction of NCG summed over all
# phases) using the PorousFlowFluidStateIC initial condition. Once z is
# calculated by the initial condition, the thermophysical properties are calculated
# and the resulting gas saturation should be equal to that given in the intial condition
[Mesh]
type = GeneratedMesh
dim = 2
[]
[GlobalParams]
PorousFlowDictator = dictator
temperature_unit = Celsius
[]
[Variables]
[pgas]
initial_condition = 1e6
[]
[z]
[]
[]
[ICs]
[z]
type = PorousFlowFluidStateIC
saturation = 0.5
gas_porepressure = pgas
temperature = 50
variable = z
fluid_state = fs
[]
[]
[AuxVariables]
[saturation_gas]
order = CONSTANT
family = MONOMIAL
[]
[saturation_water]
order = CONSTANT
family = MONOMIAL
[]
[]
[AuxKernels]
[saturation_water]
type = PorousFlowPropertyAux
variable = saturation_water
property = saturation
phase = 0
execute_on = timestep_end
[]
[saturation_gas]
type = PorousFlowPropertyAux
variable = saturation_gas
property = saturation
phase = 1
execute_on = timestep_end
[]
[]
[Kernels]
[mass0]
type = PorousFlowMassTimeDerivative
variable = pgas
fluid_component = 0
[]
[mass1]
type = PorousFlowMassTimeDerivative
variable = z
fluid_component = 1
[]
[]
[UserObjects]
[dictator]
type = PorousFlowDictator
porous_flow_vars = 'pgas z'
number_fluid_phases = 2
number_fluid_components = 2
[]
[pc]
type = PorousFlowCapillaryPressureConst
pc = 0
[]
[fs]
type = PorousFlowWaterNCG
water_fp = water
gas_fp = co2
capillary_pressure = pc
[]
[]
[FluidProperties]
[co2]
type = CO2FluidProperties
[]
[water]
type = Water97FluidProperties
[]
[]
[Materials]
[temperature]
type = PorousFlowTemperature
temperature = 50
[]
[waterncg]
type = PorousFlowFluidState
gas_porepressure = pgas
z = z
fluid_state = fs
capillary_pressure = pc
[]
[permeability]
type = PorousFlowPermeabilityConst
permeability = '1e-12 0 0 0 1e-12 0 0 0 1e-12'
[]
[relperm0]
type = PorousFlowRelativePermeabilityCorey
n = 2
phase = 0
[]
[relperm1]
type = PorousFlowRelativePermeabilityCorey
n = 3
phase = 1
[]
[porosity]
type = PorousFlowPorosityConst
porosity = 0.1
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
dt = 1
end_time = 1
nl_abs_tol = 1e-12
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Postprocessors]
[sg]
type = ElementIntegralVariablePostprocessor
variable = saturation_gas
execute_on = 'initial timestep_end'
[]
[sw]
type = ElementIntegralVariablePostprocessor
variable = saturation_water
execute_on = 'initial timestep_end'
[]
[z]
type = ElementIntegralVariablePostprocessor
variable = z
execute_on = 'initial timestep_end'
[]
[]
[Outputs]
csv = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_balance/large_gap_heat_transfer_test_sphere.i)
sphere_outer_htc = 10 # W/m^2/K
sphere_outer_Tinf = 300 # K
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Problem]
coord_type = RZ
[]
[Mesh]
[file]
type = FileMeshGenerator
file = cyl2D.e
[]
[]
[Functions]
[temp]
type = PiecewiseLinear
x = '0 1'
y = '100 200'
[]
[]
[Variables]
[temp]
initial_condition = 500
[]
[]
[AuxVariables]
[gap_conductance]
order = CONSTANT
family = MONOMIAL
[]
[power_density]
block = 'fuel'
initial_condition = 50e3
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = temp
[]
[heat_source]
type = CoupledForce
variable = temp
block = 'fuel'
v = power_density
[]
[]
[AuxKernels]
[gap_cond]
type = MaterialRealAux
property = gap_conductance
variable = gap_conductance
boundary = 2
[]
[]
[Materials]
[heat1]
type = HeatConductionMaterial
block = '1 2'
specific_heat = 1.0
thermal_conductivity = 34.6
[]
[]
[ThermalContact]
[thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 3
secondary = 2
emissivity_primary = 0.8
emissivity_secondary = 0.8
gap_conductivity = 0.1
quadrature = true
gap_geometry_type = SPHERE
sphere_origin = '0 0 0'
[]
[]
[BCs]
[RPV_out_BC] # k \nabla T = h (T- T_inf) at RPV outer boundary
type = ConvectiveFluxFunction # (Robin BC)
variable = temp
boundary = '4' # outer RPV
coefficient = ${sphere_outer_htc}
T_infinity = ${sphere_outer_Tinf}
[]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'lu superlu_dist'
dt = 1
dtmin = 0.01
end_time = 1
nl_rel_tol = 1e-12
nl_abs_tol = 1e-7
[Quadrature]
order = fifth
side_order = seventh
[]
[]
[Outputs]
exodus = false
csv = true
[Console]
type = Console
[]
[]
[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
[]
[ptot]
type = ElementIntegralVariablePostprocessor
variable = power_density
block = 'fuel'
[]
[sphere_convective_out]
type = ConvectiveHeatTransferSideIntegral
T_solid = temp
boundary = '4' # outer RVP
T_fluid = ${sphere_outer_Tinf}
htc = ${sphere_outer_htc}
[]
[heat_balance] # should be equal to 0 upon convergence
type = ParsedPostprocessor
function = '(sphere_convective_out - ptot) / ptot'
pp_names = 'sphere_convective_out ptot'
[]
[]
(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/transfers/multiapp_conservative_transfer/primary_negative_adjuster.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 1
ny = 1
[]
[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]
[var]
family = MONOMIAL
order = THIRD
[]
[]
[ICs]
[var_ic]
type = FunctionIC
variable = var
function = '-exp(x * y)'
[]
[]
[Executioner]
type = Steady
solve_type = 'PJFNK'
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[MultiApps]
[sub]
type = FullSolveMultiApp
input_files = secondary_negative_adjuster.i
execute_on = timestep_end
[]
[]
[Postprocessors]
[from_postprocessor]
type = ElementIntegralVariablePostprocessor
variable = var
[]
[]
[Transfers]
[to_sub]
type = MultiAppGeneralFieldShapeEvaluationTransfer
source_variable = var
variable = var
to_multi_app = sub
from_postprocessors_to_be_preserved = 'from_postprocessor'
to_postprocessors_to_be_preserved = 'to_postprocessor'
[]
[]
[Outputs]
exodus = true
[]
(framework/include/postprocessors/ElementL2Error.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 "ElementIntegralVariablePostprocessor.h"
class Function;
class ElementL2Error : public ElementIntegralVariablePostprocessor
{
public:
static InputParameters validParams();
ElementL2Error(const InputParameters & parameters);
virtual Real getValue() const override;
protected:
virtual Real computeQpIntegral() override;
const Function & _func;
};
(framework/include/postprocessors/ElementAverageValue.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 "ElementIntegralVariablePostprocessor.h"
/**
* This postprocessor computes a volume integral of the specified variable.
*
* Note that specializations of this integral are possible by deriving from this
* class and overriding computeQpIntegral().
*/
class ElementAverageValue : public ElementIntegralVariablePostprocessor
{
public:
static InputParameters validParams();
ElementAverageValue(const InputParameters & parameters);
virtual void initialize() override;
virtual void execute() override;
virtual Real getValue() const override;
virtual void finalize() override;
virtual void threadJoin(const UserObject & y) override;
protected:
Real _volume;
};
(framework/include/postprocessors/ElementL1Error.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 "ElementIntegralVariablePostprocessor.h"
class Function;
/**
* Computes L1 error between an elemental field variable and an analytical function.
*/
class ElementL1Error : public ElementIntegralVariablePostprocessor
{
public:
static InputParameters validParams();
ElementL1Error(const InputParameters & parameters);
protected:
virtual Real computeQpIntegral() override;
const Function & _func;
};
(framework/include/postprocessors/ElementL2Norm.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 "ElementIntegralVariablePostprocessor.h"
class ElementL2Norm : public ElementIntegralVariablePostprocessor
{
public:
static InputParameters validParams();
ElementL2Norm(const InputParameters & parameters);
virtual Real getValue() const override;
protected:
virtual Real computeQpIntegral() override;
};
(framework/include/postprocessors/ElementH1SemiError.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 "ElementIntegralVariablePostprocessor.h"
class Function;
/**
* This postprocessor will print out the h1 seminorm between the computed
* solution and the passed function.
* ||u-f||_{H^1} = sqrt( \int |grad u - grad f|^2 dx )
*/
class ElementH1SemiError : public ElementIntegralVariablePostprocessor
{
public:
static InputParameters validParams();
ElementH1SemiError(const InputParameters & parameters);
virtual Real getValue() const override;
protected:
virtual Real computeQpIntegral() override;
const Function & _func;
};
(modules/solid_mechanics/include/postprocessors/Mass.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 "ElementIntegralVariablePostprocessor.h"
/**
* This postprocessor computes the mass by integrating the density over the volume.
*/
template <bool is_ad>
class MassTempl : public ElementIntegralVariablePostprocessor
{
public:
static InputParameters validParams();
MassTempl(const InputParameters & parameters);
protected:
virtual Real computeQpIntegral();
const GenericMaterialProperty<Real, is_ad> & _density;
};
typedef MassTempl<false> Mass;
typedef MassTempl<true> ADMass;
(test/include/postprocessors/ElementL2Diff.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 "ElementIntegralVariablePostprocessor.h"
class ElementL2Diff : public ElementIntegralVariablePostprocessor
{
public:
static InputParameters validParams();
ElementL2Diff(const InputParameters & parameters);
protected:
/**
* Get the L2 Error.
*/
virtual Real getValue() const override;
virtual Real computeQpIntegral() override;
const VariableValue & _u_old;
};
(framework/include/postprocessors/VariableInnerProduct.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 "ElementIntegralVariablePostprocessor.h"
class VariableInnerProduct : public ElementIntegralVariablePostprocessor
{
public:
static InputParameters validParams();
VariableInnerProduct(const InputParameters & parameters);
protected:
virtual Real computeQpIntegral() override;
/// Holds the values of second_variable at current quadrature points
const VariableValue & _v;
};
(test/include/postprocessors/ExecutionGroupTestPostprocessor.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 "ElementIntegralVariablePostprocessor.h"
/**
* Test user object that outputs on initialization and finalize to check if
* multiple loops over the mesh were taken to test the execution_order_group system.
*/
class ExecutionGroupTestPostprocessor : public ElementIntegralVariablePostprocessor
{
public:
static InputParameters validParams();
ExecutionGroupTestPostprocessor(const InputParameters & parameters);
virtual void initialize() override;
virtual void finalize() override;
};
(framework/include/postprocessors/ElementW1pError.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 "ElementIntegralVariablePostprocessor.h"
class Function;
/**
* This postprocessor computes the Sobolev norm W^{1,p} of the
* difference between the computed solution and the passed in function.
* If p==2, this is equivalent to the H1-norm, but p can be any real
* number >= 1. There are two possible definitions of this norm:
*
* 1.) ||u-f||_{W^{1,p}} \equiv (\int |u-f|^p dx + sum_{i=1}^3 \int |du/dx_i - df/dx_i|^p dx)^{1/p}
* 2.) ||u-f||_{W^{1,p}} \equiv (\int |u-f|^p dx)^{1/p} + sum_{i=1}^3 (\int |du/dx_i - df/dx_i|^p
* dx)^{1/p}
*
* which are equivalent in the "equivalence of norms" sense. (The
* difference is that the "1/p" exponent is on the outside of the sum
* in case 1, while it is on every term in case 2. We use definition
* 1 here for consistency with the original ElementH1Error class.
*/
class ElementW1pError : public ElementIntegralVariablePostprocessor
{
public:
static InputParameters validParams();
ElementW1pError(const InputParameters & parameters);
virtual Real getValue() const override;
protected:
virtual Real computeQpIntegral() override;
// The exponent used in the norm
Real _p;
const Function & _func;
};
(examples/ex20_user_objects/include/userobjects/BlockAverageValue.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 "ElementIntegralVariablePostprocessor.h"
#include "libmesh/mesh_tools.h"
/**
* Computes the average value of a variable on each block
*/
class BlockAverageValue : public ElementIntegralVariablePostprocessor
{
public:
BlockAverageValue(const InputParameters & parameters);
static InputParameters validParams();
/**
* Given a block ID return the average value for a variable on that block
*
* Note that accessor functions on UserObjects like this _must_ be const.
* That is because the UserObject system returns const references to objects
* trying to use UserObjects. This is done for parallel correctness.
*
* @return The average value of a variable on that block.
*/
Real averageValue(SubdomainID block) const;
/**
* This is called before execute so you can reset any internal data.
*/
virtual void initialize() override;
/**
* Called on every "object" (like every element or node).
* In this case, it is called at every quadrature point on every element.
*/
virtual void execute() override;
/**
* Called when using threading. You need to combine the data from "y"
* into _this_ object.
*/
virtual void threadJoin(const UserObject & y) override;
/**
* Called _once_ after execute has been called all all "objects".
*/
virtual void finalize() override;
protected:
// This map will hold the partial sums for each block
std::map<SubdomainID, Real> _integral_values;
// This map will hold the partial volume sums for each block
std::map<SubdomainID, Real> _volume_values;
// This map will hold our averages for each block
std::map<SubdomainID, Real> _average_values;
};
(framework/include/postprocessors/ElementL2Difference.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 "ElementIntegralVariablePostprocessor.h"
/**
* Computes the L2-Norm difference between two solution fields.
*/
class ElementL2Difference : public ElementIntegralVariablePostprocessor
{
public:
static InputParameters validParams();
ElementL2Difference(const InputParameters & parameters);
virtual Real getValue() const override;
protected:
virtual Real computeQpIntegral() override;
/// The variable to compare to
const VariableValue & _other_var;
};
(test/include/postprocessors/ElementMomentSum.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 "ElementIntegralVariablePostprocessor.h"
class ElementMomentSum : public ElementIntegralVariablePostprocessor
{
public:
static InputParameters validParams();
ElementMomentSum(const InputParameters & parameters);
protected:
virtual void execute() override;
const VariableValue & _elemental_sln;
};
(modules/richards/include/postprocessors/RichardsMass.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 "ElementIntegralVariablePostprocessor.h"
#include "RichardsVarNames.h"
// Forward Declarations
/**
* This postprocessor computes the fluid mass by integrating the density over the volume
*
*/
class RichardsMass : public ElementIntegralVariablePostprocessor
{
public:
static InputParameters validParams();
RichardsMass(const InputParameters & parameters);
protected:
virtual Real computeQpIntegral();
/// userobject that holds Richards variable names
const RichardsVarNames & _richards_name_UO;
/// Richards variable number that we want the mass for
unsigned int _pvar;
/// Mass, or vector of masses in multicomponent situation
const MaterialProperty<std::vector<Real>> & _mass;
};