- variableThe name of the variable that this residual object operates on
C++ Type:NonlinearVariableName
Controllable:No
Description:The name of the variable that this residual object operates on
ADHeatConduction
Description
ADHeatConduction
is the implementation of the heat diffusion equation in HeatConduction within the framework of automatic differentiation. The ADHeatConduction
kernel implements the heat equation given by Fourier's Law where The heat flux is given as where denotes the thermal conductivity of the material. can either be an ADMaterial
or traditional Material
.
This class inherits from the ADDiffusion class.
Same as Diffusion
in terms of physics/residual, but the Jacobian is computed using forward automatic differentiation
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
- displacementsThe displacements
C++ Type:std::vector<VariableName>
Controllable:No
Description:The displacements
- 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.
- thermal_conductivitythermal_conductivitythe name of the thermal conductivity material property
Default:thermal_conductivity
C++ Type:MaterialPropertyName
Controllable:No
Description:the name of the thermal conductivity material property
- 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
- absolute_value_vector_tagsThe tags for the vectors this residual object should fill with the absolute value of the residual contribution
C++ Type:std::vector<TagName>
Controllable:No
Description:The tags for the vectors this residual object should fill with the absolute value of the residual contribution
- extra_matrix_tagsThe extra tags for the matrices this Kernel should fill
C++ Type:std::vector<TagName>
Controllable:No
Description:The extra tags for the matrices this Kernel should fill
- extra_vector_tagsThe extra tags for the vectors this Kernel should fill
C++ Type:std::vector<TagName>
Controllable:No
Description:The extra tags for the vectors this Kernel should fill
- matrix_tagssystemThe tag for the matrices this Kernel should fill
Default:system
C++ Type:MultiMooseEnum
Options:nontime, system
Controllable:No
Description:The tag for the matrices this Kernel should fill
- vector_tagsnontimeThe tag for the vectors this Kernel should fill
Default:nontime
C++ Type:MultiMooseEnum
Options:nontime, time
Controllable:No
Description:The tag for the vectors this Kernel should fill
Tagging Parameters
- control_tagsAdds user-defined labels for accessing object parameters via control logic.
C++ Type:std::vector<std::string>
Controllable:No
Description:Adds user-defined labels for accessing object parameters via control logic.
- diag_save_inThe name of auxiliary variables to save this Kernel's diagonal Jacobian contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)
C++ Type:std::vector<AuxVariableName>
Controllable:No
Description:The name of auxiliary variables to save this Kernel's diagonal Jacobian contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)
- enableTrueSet the enabled status of the MooseObject.
Default:True
C++ Type:bool
Controllable:Yes
Description:Set the enabled status of the MooseObject.
- implicitTrueDetermines whether this object is calculated using an implicit or explicit form
Default:True
C++ Type:bool
Controllable:No
Description:Determines whether this object is calculated using an implicit or explicit form
- save_inThe name of auxiliary variables to save this Kernel's residual contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)
C++ Type:std::vector<AuxVariableName>
Controllable:No
Description:The name of auxiliary variables to save this Kernel's residual contributions to. Everything about that variable must match everything about this variable (the type, what blocks it's on, etc.)
- 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_meshTrueWhether 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:True
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/heat_transfer/test/tests/gap_heat_transfer_mortar_action/modular_gap_heat_transfer_mortar_displaced_radiation_conduction_action_existing_UOs.i)
- (modules/heat_transfer/test/tests/heat_source_bar/ad_heat_source_bar.i)
- (tutorials/darcy_thermo_mech/step09_mechanics/problems/step9.i)
- (modules/heat_transfer/test/tests/verify_against_analytical/ad_2d_steady_state.i)
- (modules/heat_transfer/test/tests/verify_against_analytical/ad_1D_transient.i)
- (modules/thermal_hydraulics/test/tests/jacobians/materials/ad_solid_material.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d-rz/finite_action_al.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_mortar_displaced.i)
- (tutorials/darcy_thermo_mech/step10_multiapps/problems/step10.i)
- (modules/navier_stokes/test/tests/finite_element/ins/boussinesq/benchmark/benchmark.i)
- (modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_dual_material.i)
- (modules/combined/test/tests/optimization/invOpt_nonlinear/homogeneous_forward.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/varied_pressure_thermomechanical_mortar.i)
- (tutorials/darcy_thermo_mech/step05_heat_conduction/tests/bcs/outflow/outflow.i)
- (modules/combined/test/tests/optimization/invOpt_nonlinear/simulation.i)
- (modules/combined/test/tests/optimization/invOpt_nonlinear/forward.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/modular_gap_heat_transfer_mortar_displaced_radiation_conduction_separate.i)
- (modules/combined/test/tests/optimization/invOpt_bc_convective/adjoint.i)
- (modules/combined/test/tests/optimization/invOpt_bc_convective/forward.i)
- (modules/combined/test/tests/thermo_mech/ad-thermo_mech.i)
- (modules/navier_stokes/test/tests/finite_element/ins/wall_convection/steady.i)
- (modules/thermal_hydraulics/test/tests/components/file_mesh_component/file_mesh_component.i)
- (modules/heat_transfer/test/tests/radiative_bcs/ad_function_radiative_bc.i)
- (modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_single_material.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar_action/modular_gap_heat_transfer_mortar_displaced_radiation_conduction_action_lowerd_exists.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/small-2d/small.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/finite_rr.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/bc_gap_heat_transfer_displaced_radiation.i)
- (tutorials/darcy_thermo_mech/step07_adaptivity/problems/step7a_coarse.i)
- (modules/combined/test/tests/optimization/invOpt_nonlinear/adjoint.i)
- (modules/heat_transfer/test/tests/postprocessors/ad_convective_ht_side_integral.i)
- (modules/navier_stokes/test/tests/finite_element/ins/boussinesq/boussinesq_square.i)
- (modules/heat_transfer/test/tests/joule_heating/transient_ad_jouleheating.i)
- (modules/combined/test/tests/combined_plasticity_temperature/ad_plasticity_temperature_dep_yield.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar_action/modular_gap_heat_transfer_mortar_displaced_radiation_conduction_verbose.i)
- (modules/navier_stokes/test/tests/finite_element/ins/block-restriction/two-mats-one-eqn-set.i)
- (tutorials/darcy_thermo_mech/step10_multiapps/tests/auxkernels/corrosion/corrosion.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar_action/modular_gap_heat_transfer_mortar_displaced_radiation_conduction_action.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/modular_gap_heat_transfer_mortar_displaced_conduction_function.i)
- (modules/combined/test/tests/3d-mortar-projection-tolerancing/test.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/finite_action.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d-rz/finite.i)
- (modules/heat_transfer/test/tests/ad_heat_conduction/test.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_mean_zero_pressure.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/bc_gap_heat_transfer_displaced_conduction.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/modular_gap_heat_transfer_mortar_displaced_conduction.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/closed_gap_prescribed_pressure.i)
- (modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_offset_single_material_insulated.i)
- (modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_single_material_insulated.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar_action/modular_gap_heat_transfer_mortar_displaced_conduction_UOs_function.i)
- (modules/solid_properties/test/tests/problems/heat_conduction/heat_conduction.i)
- (modules/fsi/test/tests/2d-finite-strain-steady/thermal-me.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/modular_gap_heat_transfer_mortar_displaced_radiation.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_stabilized_with_temp.i)
- (tutorials/darcy_thermo_mech/step06_coupled_darcy_heat_conduction/problems/step6c_decoupled.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/small-2d/open_gap_pressure_dependent.i)
- (tutorials/darcy_thermo_mech/step05_heat_conduction/problems/step5b_transient.i)
- (modules/navier_stokes/test/tests/finite_element/ins/boussinesq/boussinesq_square_constant_names.i)
- (modules/navier_stokes/test/tests/finite_element/ins/block-restriction/one-mat-two-eqn-sets.i)
- (modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_dual_material_insulated.i)
- (modules/heat_transfer/test/tests/function_ellipsoid_heat_source/function_heat_source.i)
- (modules/heat_transfer/test/tests/interface_heating_mortar/transient_joule_heating_constraint.i)
- (tutorials/darcy_thermo_mech/step07_adaptivity/problems/step7b_fine.i)
- (modules/navier_stokes/test/tests/finite_element/ins/boussinesq/boussinesq_stabilized.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/mixed-transient-steady/mixed.i)
- (modules/navier_stokes/test/tests/finite_element/ins/energy_source/steady.i)
- (modules/heat_transfer/test/tests/ad_convective_heat_flux/flux.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/modular_gap_heat_transfer_mortar_displaced.i)
- (tutorials/darcy_thermo_mech/step07_adaptivity/problems/step7d_adapt_blocks.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/finite_action_rr.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/small-2d-rz/small.i)
- (modules/navier_stokes/examples/laser-welding/3d.i)
- (modules/thermal_hydraulics/test/tests/components/hs_boundary_external_app_heat_flux/main.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/finite.i)
- (tutorials/darcy_thermo_mech/step07_adaptivity/problems/step7c_adapt.i)
- (tutorials/darcy_thermo_mech/step05_heat_conduction/problems/step5c_outflow.i)
- (tutorials/darcy_thermo_mech/step10_multiapps/problems/step10_micro.i)
- (modules/heat_transfer/test/tests/gap_heat_transfer_mortar/modular_gap_heat_transfer_mortar_displaced_radiation_conduction.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/small-2d/closed_gap_pressure_dependent_thermal_contact.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven.i)
- (tutorials/darcy_thermo_mech/step08_postprocessors/problems/step8.i)
- (modules/heat_transfer/test/tests/radiative_bcs/ad_radiative_bc_cyl.i)
- (tutorials/darcy_thermo_mech/step05_heat_conduction/problems/step5a_steady.i)
- (modules/navier_stokes/test/tests/finite_element/ins/energy_source/steady-var.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/closed_gap_thermomechanical_mortar_contact.i)
- (modules/navier_stokes/test/tests/finite_element/ins/energy-conservation/q2q1.i)
- (modules/navier_stokes/test/tests/finite_element/ins/energy-conservation/q1q1.i)
- (tutorials/darcy_thermo_mech/step06_coupled_darcy_heat_conduction/problems/step6a_coupled.i)
- (modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_stabilized_with_temp_transient.i)
- (modules/combined/test/tests/gap_heat_transfer_jac/two_blocks.i)
- (modules/navier_stokes/test/tests/finite_element/ins/block-restriction/two-mats-two-eqn-sets.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/small-2d/multi_component_mortar_thermal_conduction.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d-rz/finite_action.i)
- (modules/heat_transfer/test/tests/conjugate_heat_transfer/conjugate_heat_transfer.i)
- (tutorials/darcy_thermo_mech/step06_coupled_darcy_heat_conduction/tests/kernels/darcy_advection/darcy_advection.i)
- (modules/heat_transfer/test/tests/recover/ad_recover.i)
- (tutorials/darcy_thermo_mech/step06_coupled_darcy_heat_conduction/problems/step6b_transient_inflow.i)
- (modules/navier_stokes/examples/laser-welding/2d.i)
Child Objects
References
No citations exist within this document.(modules/heat_transfer/test/tests/gap_heat_transfer_mortar_action/modular_gap_heat_transfer_mortar_displaced_radiation_conduction_action_existing_UOs.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-gap.e
[]
allow_renumbering = false
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Variables]
[temp]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_x]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_y]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[]
[Materials]
[left]
type = ADHeatConductionMaterial
block = 1
thermal_conductivity = 0.01
specific_heat = 1
[]
[right]
type = ADHeatConductionMaterial
block = 2
thermal_conductivity = 0.005
specific_heat = 1
[]
[]
[Kernels]
[hc_displaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = '1'
[]
[hc_undisplaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = false
block = '2'
[]
[disp_x]
type = Diffusion
variable = disp_x
block = '1 2'
[]
[disp_y]
type = Diffusion
variable = disp_y
block = '1 2'
[]
[]
[MortarGapHeatTransfer]
[mortar_heat_transfer]
temperature = temp
boundary = 100
use_displaced_mesh = true
primary_boundary = 100
secondary_boundary = 101
user_created_gap_flux_models = 'radiation_uo conduction_uo'
[]
[]
[UserObjects]
[radiation_uo]
type = GapFluxModelRadiation
temperature = temp
boundary = 100
primary_emissivity = 1.0
secondary_emissivity = 1.0
use_displaced_mesh = true
[]
[conduction_uo]
type = GapFluxModelConduction
temperature = temp
boundary = 100
gap_conductivity = 0.02
use_displaced_mesh = true
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temp
boundary = 'left'
value = 100
[]
[right]
type = DirichletBC
variable = temp
boundary = 'right'
value = 0
[]
[left_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'left'
value = .1
[]
[right_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'right'
value = 0
[]
[bottom_disp_y]
type = DirichletBC
preset = false
variable = disp_y
boundary = 'bottom'
value = 0
[]
[]
[Preconditioning]
[fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-11
nl_abs_tol = 1.0e-10
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '100 101'
variable = 'temp'
[]
[]
[Outputs]
csv = true
[exodus]
type = Exodus
show = 'temp'
[]
[]
(modules/heat_transfer/test/tests/heat_source_bar/ad_heat_source_bar.i)
# This is a simple 1D test of the volumetric heat source with material properties
# of a representative ceramic material. A bar is uniformly heated, and a temperature
# boundary condition is applied to the left side of the bar.
# Important properties of problem:
# Length: 0.01 m
# Thermal conductivity = 3.0 W/(mK)
# Specific heat = 300.0 J/K
# density = 10431.0 kg/m^3
# Prescribed temperature on left side: 600 K
# When it has reached steady state, the temperature as a function of position is:
# T = -q/(2*k) (x^2 - 2*x*length) + 600
# or
# T = -6.3333e+7 * (x^2 - 0.02*x) + 600
# on left side: T=600, on right side, T=6933.3
[Mesh]
type = GeneratedMesh
dim = 1
xmax = 0.01
nx = 20
[]
[Variables]
[./temp]
initial_condition = 300.0
[../]
[]
[Kernels]
[./heat]
type = ADHeatConduction
variable = temp
thermal_conductivity = thermal_conductivity
[../]
[./heatsource]
type = ADMatHeatSource
material_property = volumetric_heat
variable = temp
scalar = 10
[../]
[]
[BCs]
[./lefttemp]
type = DirichletBC
boundary = left
variable = temp
value = 600
[../]
[]
[Materials]
[./density]
type = ADGenericConstantMaterial
prop_names = 'density thermal_conductivity volumetric_heat '
prop_values = '10431.0 3.0 3.8e7'
[../]
[]
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[Executioner]
type = Steady
[]
[Postprocessors]
[./right]
type = SideAverageValue
variable = temp
boundary = right
[../]
[./error]
type = NodalL2Error
function = '-3.8e+8/(2*3) * (x^2 - 2*x*0.01) + 600'
variable = temp
[../]
[]
[Outputs]
execute_on = FINAL
exodus = true
[]
(tutorials/darcy_thermo_mech/step09_mechanics/problems/step9.i)
[GlobalParams]
displacements = 'disp_r disp_z'
[]
[Mesh]
[generate]
type = GeneratedMeshGenerator
dim = 2
ny = 200
nx = 10
ymax = 0.304 # Length of test chamber
xmax = 0.0257 # Test chamber radius
[]
[bottom]
type = SubdomainBoundingBoxGenerator
input = generate
location = inside
bottom_left = '0 0 0'
top_right = '0.01285 0.304 0'
block_id = 1
[]
coord_type = RZ
[]
[Variables]
[pressure]
[]
[temperature]
initial_condition = 300 # Start at room temperature
[]
[]
[AuxVariables]
[velocity]
order = CONSTANT
family = MONOMIAL_VEC
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
# This block adds all of the proper Kernels, strain calculators, and Variables
# for SolidMechanics in the correct coordinate system (autodetected)
add_variables = true
strain = FINITE
eigenstrain_names = eigenstrain
use_automatic_differentiation = true
generate_output = 'vonmises_stress elastic_strain_xx elastic_strain_yy strain_xx strain_yy'
[]
[]
[Kernels]
[darcy_pressure]
type = DarcyPressure
variable = pressure
[]
[heat_conduction]
type = ADHeatConduction
variable = temperature
[]
[heat_conduction_time_derivative]
type = ADHeatConductionTimeDerivative
variable = temperature
[]
[heat_convection]
type = DarcyAdvection
variable = temperature
pressure = pressure
[]
[]
[AuxKernels]
[velocity]
type = DarcyVelocity
variable = velocity
execute_on = timestep_end
pressure = pressure
[]
[]
[BCs]
[inlet]
type = DirichletBC
variable = pressure
boundary = bottom
value = 4000 # (Pa) From Figure 2 from paper. First data point for 1mm spheres.
[]
[outlet]
type = DirichletBC
variable = pressure
boundary = top
value = 0 # (Pa) Gives the correct pressure drop from Figure 2 for 1mm spheres
[]
[inlet_temperature]
type = FunctionDirichletBC
variable = temperature
boundary = bottom
function = 'if(t<0,350+50*t,350)'
[]
[outlet_temperature]
type = HeatConductionOutflow
variable = temperature
boundary = top
[]
[hold_inlet]
type = DirichletBC
variable = disp_z
boundary = bottom
value = 0
[]
[hold_center]
type = DirichletBC
variable = disp_r
boundary = left
value = 0
[]
[hold_outside]
type = DirichletBC
variable = disp_r
boundary = right
value = 0
[]
[]
[Materials]
viscosity_file = data/water_viscosity.csv
density_file = data/water_density.csv
thermal_conductivity_file = data/water_thermal_conductivity.csv
specific_heat_file = data/water_specific_heat.csv
thermal_expansion_file = data/water_thermal_expansion.csv
[column_top]
type = PackedColumn
block = 0
temperature = temperature
radius = 1.15
fluid_viscosity_file = ${viscosity_file}
fluid_density_file = ${density_file}
fluid_thermal_conductivity_file = ${thermal_conductivity_file}
fluid_specific_heat_file = ${specific_heat_file}
fluid_thermal_expansion_file = ${thermal_expansion_file}
[]
[column_bottom]
type = PackedColumn
block = 1
temperature = temperature
radius = 1
fluid_viscosity_file = ${viscosity_file}
fluid_density_file = ${density_file}
fluid_thermal_conductivity_file = ${thermal_conductivity_file}
fluid_specific_heat_file = ${specific_heat_file}
fluid_thermal_expansion_file = ${thermal_expansion_file}
[]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 200e9 # (Pa) from wikipedia
poissons_ratio = .3 # from wikipedia
[]
[elastic_stress]
type = ADComputeFiniteStrainElasticStress
[]
[thermal_strain]
type = ADComputeThermalExpansionEigenstrain
stress_free_temperature = 300
eigenstrain_name = eigenstrain
temperature = temperature
thermal_expansion_coeff = 1e-5 # TM modules doesn't support material property, but it will
[]
[]
[Postprocessors]
[average_temperature]
type = ElementAverageValue
variable = temperature
[]
[]
[Problem]
type = FEProblem
[]
[Executioner]
type = Transient
start_time = -1
end_time = 200
steady_state_tolerance = 1e-7
steady_state_detection = true
dt = 0.25
solve_type = PJFNK
automatic_scaling = true
compute_scaling_once = false
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
#petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
#petsc_options_value = 'hypre boomeramg 500'
line_search = none
[TimeStepper]
type = FunctionDT
function = 'if(t<0,0.1,0.25)'
[]
[]
[Outputs]
[out]
type = Exodus
elemental_as_nodal = true
[]
[]
(modules/heat_transfer/test/tests/verify_against_analytical/ad_2d_steady_state.i)
# This test solves a 2D steady state heat equation
# The error is found by comparing to the analytical solution
# Note that the thermal conductivity, specific heat, and density in this problem
# Are set to 1, and need to be changed to the constants of the material being
# Analyzed
[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
xmax = 2
ymax = 2
[]
[Variables]
[./T]
[../]
[]
[Kernels]
[./HeatDiff]
type = ADHeatConduction
variable = T
[../]
[]
[BCs]
[./zero]
type = DirichletBC
variable = T
boundary = 'right bottom left'
value = 0
[../]
[./top]
type = ADFunctionDirichletBC
variable = T
boundary = top
function = '10*sin(pi*x*0.5)'
[../]
[]
[Materials]
[./properties]
type = ADGenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '1 1 1'
[../]
[]
[Postprocessors]
[./nodal_error]
type = NodalL2Error
function = '10/(sinh(pi))*sin(pi*x*0.5)*sinh(pi*y*0.5)'
variable = T
[../]
[./elemental_error]
type = ElementL2Error
function = '10/(sinh(pi))*sin(pi*x*0.5)*sinh(pi*y*0.5)'
variable = T
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/verify_against_analytical/ad_1D_transient.i)
# This test solves a 1D transient heat equation
# The error is caclulated by comparing to the analytical solution
# The problem setup and analytical solution are taken from "Advanced Engineering
# Mathematics, 10th edition" by Erwin Kreyszig.
# http://www.amazon.com/Advanced-Engineering-Mathematics-Erwin-Kreyszig/dp/0470458364
# It is Example 1 in section 12.6 on page 561
[Mesh]
type = GeneratedMesh
dim = 1
nx = 160
xmax = 80
[]
[Variables]
[./T]
[../]
[]
[ICs]
[./T_IC]
type = FunctionIC
variable = T
function = '100*sin(pi*x/80)'
[../]
[]
[Kernels]
[./HeatDiff]
type = ADHeatConduction
variable = T
[../]
[./HeatTdot]
type = ADHeatConductionTimeDerivative
variable = T
[../]
[]
[BCs]
[./sides]
type = DirichletBC
variable = T
boundary = 'left right'
value = 0
[../]
[]
[Materials]
[./k]
type = ADGenericConstantMaterial
prop_names = 'thermal_conductivity'
prop_values = '0.95' #copper in cal/(cm sec C)
[../]
[./cp]
type = ADGenericConstantMaterial
prop_names = 'specific_heat'
prop_values = '0.092' #copper in cal/(g C)
[../]
[./rho]
type = ADGenericConstantMaterial
prop_names = 'density'
prop_values = '8.92' #copper in g/(cm^3)
[../]
[]
[Postprocessors]
[./error]
type = NodalL2Error
function = '100*sin(pi*x/80)*exp(-0.95/(0.092*8.92)*pi^2/80^2*t)'
variable = T
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
l_tol = 1e-6
dt = 2
end_time = 100
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/jacobians/materials/ad_solid_material.i)
[Mesh]
type = GeneratedMesh
dim = 1
nx = 3
allow_renumbering = false
[]
[Variables]
[T]
[]
[]
[Functions]
[k_fn]
type = ParsedFunction
expression = 't*t + 2*t'
[]
[cp_fn]
type = ParsedFunction
expression = 't*t*t + 3*t'
[]
[rho_fn]
type = ParsedFunction
expression = 't*t*t*t + 4*t'
[]
[]
[HeatStructureMaterials]
[prop_uo]
type = SolidMaterialProperties
k = k_fn
cp = cp_fn
rho = rho_fn
[]
[]
[Components]
[]
[Materials]
[solid_mat]
type = ADSolidMaterial
T = T
properties = prop_uo
[]
[]
[Kernels]
[td]
type = ADHeatConductionTimeDerivative
variable = T
specific_heat = specific_heat
density_name = density
[]
[diff]
type = ADHeatConduction
variable = T
thermal_conductivity = thermal_conductivity
[]
[forcing_fn]
type = BodyForce
variable = T
value = -4
[]
[]
[BCs]
[left]
type = DirichletBC
boundary = left
variable = T
value = 0
[]
[right]
type = DirichletBC
boundary = right
variable = T
value = 1
[]
[]
[Executioner]
type = Transient
num_steps = 1
dt = 1
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d-rz/finite_action_al.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite_al'
[Mesh]
patch_size = 80
patch_update_strategy = auto
coord_type = RZ
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Problem]
type = AugmentedLagrangianContactFEProblem
maximum_lagrangian_update_iterations = 20
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = '${fparse 2.0 / (E_plank + E_block)}'
[]
[temp]
order = ${order}
block = 'plank block'
scaling = 1e-1
[]
[]
[AuxVariables]
[penalty_normal_pressure]
[]
[]
[AuxKernels]
[penalty_normal_pressure]
type = PenaltyMortarUserObjectAux
variable = penalty_normal_pressure
user_object = penalty_weightedgap_object_al_frictionless
contact_quantity = normal_pressure
boundary = 'block_left'
[]
[]
[Modules/TensorMechanics/Master]
[action]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx '
'strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
strain = FINITE
[]
[]
[Kernels]
[hc]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = 'plank block'
[]
[]
[Contact]
[al_frictionless]
formulation = mortar_penalty
model = frictionless
primary = plank_right
secondary = block_left
penalty = 5e6
al_penetration_tolerance = 1e-7
penalty_multiplier = 50
[]
[]
[MortarGapHeatTransfer]
[mortar_heat_transfer]
temperature = temp
use_displaced_mesh = true
gap_flux_options = conduction
gap_conductivity = 1
boundary = plank_right
primary_boundary = plank_right
primary_subdomain = al_frictionless_primary_subdomain
secondary_boundary = block_left
secondary_subdomain = al_frictionless_secondary_subdomain
thermal_lm_scaling = 1e-7
gap_geometry_type = PLATE
[]
[]
[BCs]
[left_temp]
type = DirichletBC
variable = temp
boundary = 'plank_left'
value = 400
[]
[right_temp]
type = DirichletBC
variable = temp
boundary = 'block_right'
value = 300
[]
[left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
preset = false
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
preset = false
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[]
[heat_plank]
type = ADHeatConductionMaterial
block = plank
thermal_conductivity = 2
specific_heat = 1
[]
[heat_block]
type = ADHeatConductionMaterial
block = block
thermal_conductivity = 1
specific_heat = 1
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
end_time = 7.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'none'
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[avg_temp]
type = ElementAverageValue
variable = temp
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
exodus = true
[comp]
type = CSV
show = 'avg_temp'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/gap_heat_transfer_mortar_displaced.i)
[Mesh]
displacements = 'disp_x disp_y'
[file]
type = FileMeshGenerator
file = 2blk-gap.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '101'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '100'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Variables]
[./temp]
order = FIRST
family = LAGRANGE
block = '1 2'
[../]
[./disp_x]
order = FIRST
family = LAGRANGE
block = '1 2'
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
block = '1 2'
[../]
[./lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[../]
[]
[Materials]
[./left]
type = ADHeatConductionMaterial
block = 1
thermal_conductivity = 1000
specific_heat = 1
[../]
[./right]
type = ADHeatConductionMaterial
block = 2
thermal_conductivity = 500
specific_heat = 1
[../]
[]
[Kernels]
[./hc_displaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = '1'
[../]
[./hc_undisplaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = false
block = '2'
[../]
[disp_x]
type = Diffusion
variable = disp_x
block = '1 2'
[]
[disp_y]
type = Diffusion
variable = disp_y
block = '1 2'
[]
[]
[Constraints]
[./ced]
type = GapConductanceConstraint
variable = lm
secondary_variable = temp
k = 100
use_displaced_mesh = true
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
displacements = 'disp_x disp_y'
[../]
[]
[BCs]
[./left]
type = DirichletBC
variable = temp
boundary = 'left'
value = 1
[../]
[./right]
type = DirichletBC
variable = temp
boundary = 'right'
value = 0
[../]
[left_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'left'
value = .1
[]
[right_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'right'
value = 0
[]
[bottom_disp_y]
type = DirichletBC
preset = false
variable = disp_y
boundary = 'bottom'
value = 0
[]
[]
[Preconditioning]
[./fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-11
[]
[Outputs]
exodus = true
show = 'temp disp_x disp_y'
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
(tutorials/darcy_thermo_mech/step10_multiapps/problems/step10.i)
[GlobalParams]
displacements = 'disp_r disp_z'
[]
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 100
ymax = 0.304 # Length of test chamber
xmax = 0.0257 # Test chamber radius
[]
[]
[Variables]
[pressure]
[]
[temperature]
initial_condition = 300 # Start at room temperature
[]
[]
[AuxVariables]
[k_eff]
initial_condition = 15.0 # water at 20C
[]
[velocity]
order = CONSTANT
family = MONOMIAL_VEC
[]
[]
[Physics/SolidMechanics/QuasiStatic]
[all]
# This block adds all of the proper Kernels, strain calculators, and Variables
# for SolidMechanics in the correct coordinate system (autodetected)
add_variables = true
strain = FINITE
eigenstrain_names = eigenstrain
use_automatic_differentiation = true
generate_output = 'vonmises_stress elastic_strain_xx elastic_strain_yy strain_xx strain_yy'
[]
[]
[Kernels]
[darcy_pressure]
type = DarcyPressure
variable = pressure
[]
[heat_conduction]
type = ADHeatConduction
variable = temperature
[]
[heat_conduction_time_derivative]
type = ADHeatConductionTimeDerivative
variable = temperature
[]
[heat_convection]
type = DarcyAdvection
variable = temperature
pressure = pressure
[]
[]
[AuxKernels]
[velocity]
type = DarcyVelocity
variable = velocity
execute_on = timestep_end
pressure = pressure
[]
[]
[BCs]
[inlet]
type = DirichletBC
variable = pressure
boundary = bottom
value = 4000 # (Pa) From Figure 2 from paper. First data point for 1mm spheres.
[]
[outlet]
type = DirichletBC
variable = pressure
boundary = top
value = 0 # (Pa) Gives the correct pressure drop from Figure 2 for 1mm spheres
[]
[inlet_temperature]
type = FunctionDirichletBC
variable = temperature
boundary = bottom
function = 'if(t<0,350+50*t,350)'
[]
[outlet_temperature]
type = HeatConductionOutflow
variable = temperature
boundary = top
[]
[hold_inlet]
type = DirichletBC
variable = disp_z
boundary = bottom
value = 0
[]
[hold_center]
type = DirichletBC
variable = disp_r
boundary = left
value = 0
[]
[hold_outside]
type = DirichletBC
variable = disp_r
boundary = right
value = 0
[]
[]
[Materials]
viscosity_file = data/water_viscosity.csv
density_file = data/water_density.csv
specific_heat_file = data/water_specific_heat.csv
thermal_expansion_file = data/water_thermal_expansion.csv
[column]
type = PackedColumn
temperature = temperature
radius = 1
thermal_conductivity = k_eff # Use the AuxVariable instead of calculating
fluid_viscosity_file = ${viscosity_file}
fluid_density_file = ${density_file}
fluid_specific_heat_file = ${specific_heat_file}
fluid_thermal_expansion_file = ${thermal_expansion_file}
[]
[elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 200e9 # (Pa) from wikipedia
poissons_ratio = .3 # from wikipedia
[]
[elastic_stress]
type = ADComputeFiniteStrainElasticStress
[]
[thermal_strain]
type = ADComputeThermalExpansionEigenstrain
stress_free_temperature = 300
thermal_expansion_coeff = 1e-6
eigenstrain_name = eigenstrain
temperature = temperature
[]
[]
[Postprocessors]
[average_temperature]
type = ElementAverageValue
variable = temperature
[]
[]
[Executioner]
type = Transient
start_time = -1
end_time = 200
steady_state_tolerance = 1e-7
steady_state_detection = true
dt = 0.25
solve_type = PJFNK
automatic_scaling = true
compute_scaling_once = false
petsc_options_iname = '-pc_type -pc_hypre_type -ksp_gmres_restart'
petsc_options_value = 'hypre boomeramg 500'
line_search = none
[TimeStepper]
type = FunctionDT
function = 'if(t<0,0.1,0.25)'
[]
[]
[MultiApps]
[micro]
type = TransientMultiApp
app_type = DarcyThermoMechApp
positions = '0.01285 0.0 0
0.01285 0.0608 0
0.01285 0.1216 0
0.01285 0.1824 0
0.01285 0.2432 0
0.01285 0.304 0'
input_files = step10_micro.i
execute_on = 'timestep_end'
[]
[]
[Transfers]
[keff_from_sub]
type = MultiAppPostprocessorInterpolationTransfer
from_multi_app = micro
variable = k_eff
power = 1
postprocessor = k_eff
execute_on = 'timestep_end'
[]
[temperature_to_sub]
type = MultiAppVariableValueSamplePostprocessorTransfer
to_multi_app = micro
source_variable = temperature
postprocessor = temperature_in
execute_on = 'timestep_end'
[]
[]
[Controls]
[multiapp]
type = TimePeriod
disable_objects = 'MultiApps::micro Transfers::keff_from_sub Transfers::temperature_to_sub'
start_time = '0'
execute_on = 'initial'
[]
[]
[Outputs]
[out]
type = Exodus
elemental_as_nodal = true
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/boussinesq/benchmark/benchmark.i)
rayleigh=1e3
hot_temp=${rayleigh}
temp_ref=${fparse hot_temp / 2.}
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 100
[]
[./bottom_left]
type = ExtraNodesetGenerator
new_boundary = corner
coord = '0 0'
input = gen
[../]
[]
[Preconditioning]
[./Newton_SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -ksp_gmres_restart'
petsc_options_value = 'bjacobi lu NONZERO 200'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[out]
type = Exodus
[]
[]
[Variables]
[velocity]
family = LAGRANGE_VEC
[]
[p][]
[temp]
initial_condition = 340
scaling = 1e-4
[]
[]
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
variable = velocity
[]
[]
[BCs]
[./velocity_dirichlet]
type = VectorDirichletBC
boundary = 'left right bottom top'
variable = velocity
# The third entry is to satisfy RealVectorValue
values = '0 0 0'
[../]
# Even though we are integrating by parts, because there are no integrated
# boundary conditions on the velocity p doesn't appear in the system of
# equations. Thus we must pin the pressure somewhere in order to ensure a
# unique solution
[./p_zero]
type = DirichletBC
boundary = corner
variable = p
value = 0
[../]
[./hot]
type = DirichletBC
variable = temp
boundary = left
value = ${hot_temp}
[../]
[./cold]
type = DirichletBC
variable = temp
boundary = right
value = 0
[../]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[mass_pspg]
type = INSADMassPSPG
variable = p
[]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[momentum_advection]
type = INSADMomentumAdvection
variable = velocity
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
[]
[./buoyancy]
type = INSADBoussinesqBodyForce
variable = velocity
temperature = temp
gravity = '0 -1 0'
[../]
[./gravity]
type = INSADGravityForce
variable = velocity
gravity = '0 -1 0'
[../]
[supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[]
[temp_advection]
type = INSADEnergyAdvection
variable = temp
[]
[temp_conduction]
type = ADHeatConduction
variable = temp
thermal_conductivity = 'k'
[../]
[temp_supg]
type = INSADEnergySUPG
variable = temp
velocity = velocity
[]
[]
[Materials]
[./ad_const]
type = ADGenericConstantMaterial
# alpha = coefficient of thermal expansion where rho = rho0 -alpha * rho0 * delta T
prop_names = 'mu rho alpha k cp'
prop_values = '1 1 1 1 1'
[../]
[./const]
type = GenericConstantMaterial
prop_names = 'temp_ref'
prop_values = '${temp_ref}'
[../]
[ins_mat]
type = INSADStabilized3Eqn
velocity = velocity
pressure = p
temperature = temp
[]
[]
(modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_dual_material.i)
## Units in the input file: m-Pa-s-K-V
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmax = 0.1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmin = 0.1
xmax = 0.2
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
[interface_secondary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'fixed_block_left'
new_block_id = 3
new_block_name = 'interface_secondary_subdomain'
input = block_rename
[]
[interface_primary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'moving_block_right'
new_block_id = 4
new_block_name = 'interface_primary_subdomain'
input = interface_secondary_subdomain
[]
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
[]
[Variables]
[temperature]
initial_condition = 300.0
[]
[temperature_interface_lm]
block = 'interface_secondary_subdomain'
[]
[potential]
[]
[potential_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[AuxVariables]
[interface_normal_lm]
order = FIRST
family = LAGRANGE
block = 'interface_secondary_subdomain'
initial_condition = 1.0
[]
[]
[Kernels]
[HeatDiff_steel]
type = ADHeatConduction
variable = temperature
thermal_conductivity = steel_thermal_conductivity
extra_vector_tags = 'ref'
block = 'left_block'
[]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
extra_vector_tags = 'ref'
block = 'right_block'
[]
[electric_steel]
type = ADMatDiffusion
variable = potential
diffusivity = steel_electrical_conductivity
extra_vector_tags = 'ref'
block = 'left_block'
[]
[electric_aluminum]
type = ADMatDiffusion
variable = potential
diffusivity = aluminum_electrical_conductivity
extra_vector_tags = 'ref'
block = 'right_block'
[]
[]
[BCs]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'fixed_block_right'
[]
[electric_left]
type = ADDirichletBC
variable = potential
value = 0.0
boundary = moving_block_left
[]
[electric_right]
type = ADDirichletBC
variable = potential
value = 3.0e-1
boundary = fixed_block_right
[]
[]
[Constraints]
[thermal_contact]
type = ModularGapConductanceConstraint
variable = temperature_interface_lm
secondary_variable = temperature
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_temperature'
[]
[electrical_contact]
type = ModularGapConductanceConstraint
variable = potential_interface_lm
secondary_variable = potential
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_electric'
[]
[interface_heating]
type = ADInterfaceJouleHeatingConstraint
potential_lagrange_multiplier = potential_interface_lm
secondary_variable = temperature
primary_electrical_conductivity = steel_electrical_conductivity
secondary_electrical_conductivity = aluminum_electrical_conductivity
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
[]
[]
[Materials]
[steel_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'steel_density steel_thermal_conductivity steel_heat_capacity steel_electrical_conductivity steel_hardness'
prop_values = '8e3 16.2 500.0 1.39e6 1.0' ## for stainless steel 304
block = 'left_block interface_secondary_subdomain'
[]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_electrical_conductivity aluminum_hardness'
prop_values = ' 2.7e3 210 900.0 3.7e7 1.0' #for 99% pure Al
block = 'left_block right_block interface_secondary_subdomain'
[]
[]
[UserObjects]
[closed_temperature]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_thermal_conductivity
secondary_conductivity = aluminum_thermal_conductivity
temperature = temperature
contact_pressure = interface_normal_lm
primary_hardness = steel_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[closed_electric]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_electrical_conductivity
secondary_conductivity = aluminum_electrical_conductivity
temperature = potential
contact_pressure = interface_normal_lm
primary_hardness = steel_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[]
[Postprocessors]
[steel_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_primary_subdomain
[]
[aluminum_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_secondary_subdomain
[]
[interface_heat_flux_steel]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = moving_block_right
diffusivity = steel_thermal_conductivity
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[interface_electrical_flux]
type = ADSideDiffusiveFluxAverage
variable = potential
boundary = fixed_block_left
diffusivity = aluminum_electrical_conductivity
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
nl_abs_tol = 1e-10
nl_rel_tol = 1e-6
nl_max_its = 100
nl_forced_its = 1
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/combined/test/tests/optimization/invOpt_nonlinear/homogeneous_forward.i)
[Executioner]
type = Steady
solve_type = NEWTON
line_search = none
#nl_forced_its = 1
nl_abs_tol = 1e-12
nl_rel_tol = 1e-12
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Mesh]
[]
[Variables]
[T]
[]
[]
[AuxVariables]
[forwardT]
[]
[_dDdTgradT]
order = CONSTANT
family = MONOMIAL_VEC
[]
[]
[Kernels]
[heat_conduction]
type = ADHeatConduction
thermal_conductivity = 'linearized_conductivity'
variable = T
[]
[heat_source]
type = ADMatHeatSource
material_property = 'volumetric_heat'
variable = T
[]
[advection]
type = ConservativeAdvection
velocity = _dDdTgradT
variable = T
upwinding_type = full #Full upwinding gives somewhat better results
[]
[]
[AuxKernels]
[_dDdTgradT]
type = ADFunctorElementalGradientAux
functor = forwardT
variable = _dDdTgradT
factor_matprop = '_dDdT'
[]
[]
[Materials]
[LinearizedConductivity]
type = ADParsedMaterial
f_name = 'linearized_conductivity'
function = '10+500*forwardT'
args = 'forwardT'
[]
[_dDdT]
type = ADParsedMaterial
f_name = '_dDdT' # "_" represents negation
function = '-500'
args = 'forwardT'
[]
[volumetric_heat]
type = ADGenericFunctionMaterial
prop_names = 'volumetric_heat'
prop_values = 'volumetric_heat_func'
[]
[]
[Functions]
[volumetric_heat_func]
type = ParsedOptimizationFunction
expression = q
param_symbol_names = 'q'
param_vector_name = 'params/heat_source'
[]
[]
[BCs]
[left]
type = NeumannBC
variable = T
boundary = left
value = 0
[]
[right]
type = NeumannBC
variable = T
boundary = right
value = 0
[]
[bottom]
type = DirichletBC
variable = T
boundary = bottom
value = 0
[]
[top]
type = DirichletBC
variable = T
boundary = top
value = 0
[]
[]
[Reporters]
[measurement_locations]
type = OptimizationData
variable = T
[]
[params]
type = ConstantReporter
real_vector_names = 'heat_source'
real_vector_values = '0' # Dummy
[]
[]
[Outputs]
console = false
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/varied_pressure_thermomechanical_mortar.i)
## Units in the input file: m-Pa-s-K
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
xmax = 0.25
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 13
xmin = 0.25
xmax = 0.5
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
patch_update_strategy = iteration
[]
[Variables]
[disp_x]
block = 'left_block right_block'
[]
[disp_y]
block = 'left_block right_block'
[]
[temperature]
initial_condition = 300.0
[]
[temperature_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[Modules]
[TensorMechanics/Master]
[steel]
strain = FINITE
add_variables = false
use_automatic_differentiation = true
generate_output = 'strain_xx strain_xy strain_yy stress_xx stress_xy stress_yy'
additional_generate_output = 'vonmises_stress'
additional_material_output_family = 'MONOMIAL'
additional_material_output_order = 'FIRST'
block = 'left_block'
[]
[aluminum]
strain = FINITE
add_variables = false
use_automatic_differentiation = true
generate_output = 'strain_xx strain_xy strain_yy stress_xx stress_xy stress_yy'
additional_generate_output = 'vonmises_stress'
additional_material_output_family = 'MONOMIAL'
additional_material_output_order = 'FIRST'
block = 'right_block'
[]
[]
[]
[Kernels]
[HeatDiff_steel]
type = ADHeatConduction
variable = temperature
thermal_conductivity = steel_thermal_conductivity
block = 'left_block'
[]
[HeatTdot_steel]
type = ADHeatConductionTimeDerivative
variable = temperature
specific_heat = steel_heat_capacity
density_name = steel_density
block = 'left_block'
[]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
block = 'right_block'
[]
[HeatTdot_aluminum]
type = ADHeatConductionTimeDerivative
variable = temperature
specific_heat = aluminum_heat_capacity
density_name = aluminum_density
block = 'right_block'
[]
[]
[BCs]
[fixed_bottom_edge]
type = ADDirichletBC
variable = disp_y
value = 0
boundary = 'moving_block_bottom fixed_block_bottom'
[]
[fixed_outer_edge]
type = ADDirichletBC
variable = disp_x
value = 0
boundary = 'fixed_block_right'
[]
[pressure_left_block]
type = ADPressure
variable = disp_x
component = 0
boundary = 'moving_block_left'
function = '1e4*t*y'
[]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 800
boundary = 'fixed_block_right'
[]
[]
[Contact]
[interface]
primary = moving_block_right
secondary = fixed_block_left
model = frictionless
formulation = mortar
correct_edge_dropping = true
[]
[]
[Constraints]
[thermal_contact]
type = ModularGapConductanceConstraint
variable = temperature_interface_lm
secondary_variable = temperature
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed'
use_displaced_mesh = true
[]
[]
[Materials]
[steel_elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1.93e11 #in Pa, 193 GPa, stainless steel 304
poissons_ratio = 0.29
block = 'left_block'
[]
[steel_stress]
type = ADComputeFiniteStrainElasticStress
block = 'left_block'
[]
[steel_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'steel_density steel_thermal_conductivity steel_heat_capacity steel_hardness'
prop_values = ' 8e3 16.2 0.5 129' ## for stainless steel 304
block = 'left_block'
[]
[aluminum_elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 6.8e10 #in Pa, 68 GPa, aluminum
poissons_ratio = 0.36
block = 'right_block'
[]
[aluminum_stress]
type = ADComputeFiniteStrainElasticStress
block = 'right_block'
[]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_hardness'
prop_values = ' 2.7e3 210 0.9 15' #for 99% pure Al
block = 'right_block'
[]
[]
[UserObjects]
[closed]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_thermal_conductivity
secondary_conductivity = aluminum_thermal_conductivity
temperature = temperature
contact_pressure = interface_normal_lm
primary_hardness = steel_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[]
[Postprocessors]
[contact_pressure_max]
type = NodalExtremeValue
variable = interface_normal_lm
block = interface_secondary_subdomain
value_type = max
[]
[contact_pressure_average]
type = AverageNodalVariableValue
variable = interface_normal_lm
block = interface_secondary_subdomain
[]
[contact_pressure_min]
type = NodalExtremeValue
variable = interface_normal_lm
block = interface_secondary_subdomain
value_type = min
[]
[interface_temperature_max]
type = NodalExtremeValue
variable = temperature
block = interface_secondary_subdomain
value_type = max
[]
[interface_temperature_average]
type = AverageNodalVariableValue
variable = temperature
block = interface_secondary_subdomain
[]
[interface_temperature_min]
type = NodalExtremeValue
variable = temperature
block = interface_secondary_subdomain
value_type = min
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
# mortar contact solver options
petsc_options = '-snes_converged_reason -pc_svd_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = ' lu superlu_dist'
snesmf_reuse_base = false
nl_rel_tol = 1e-7
nl_max_its = 20
l_max_its = 50
dt = 0.125
end_time = 1
[]
[Outputs]
csv = true
perf_graph = true
[]
(tutorials/darcy_thermo_mech/step05_heat_conduction/tests/bcs/outflow/outflow.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 30
ny = 5
xmax = 0.304 # Length of test chamber
ymax = 0.0257 # Test chamber radius
[]
coord_type = RZ
rz_coord_axis = X
[]
[Variables]
[temperature]
initial_condition = 300 # Start at room temperature
[]
[]
[Kernels]
[heat_conduction]
type = ADHeatConduction
variable = temperature
[]
[heat_conduction_time_derivative]
type = ADHeatConductionTimeDerivative
variable = temperature
[]
[]
[BCs]
[inlet_temperature]
type = DirichletBC
variable = temperature
boundary = left
value = 350 # (K)
[]
[outlet_temperature]
type = HeatConductionOutflow
variable = temperature
boundary = right
[]
[]
[Materials]
[steel]
type = ADGenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '18 466 8000' # W/m*K, J/kg-K, kg/m^3 @ 296K
[]
[]
[Problem]
type = FEProblem
[]
[Executioner]
type = Transient
num_steps = 2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/optimization/invOpt_nonlinear/simulation.i)
[Executioner]
type = Steady
solve_type = NEWTON
line_search = none
nl_abs_tol = 1e-12
nl_rel_tol = 1e-12
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 2
ymax = 2
[]
[Variables]
[forwardT]
[]
[]
[Kernels]
[heat_conduction]
type = ADHeatConduction
thermal_conductivity = 'conductivity'
variable = forwardT
[]
[heat_source]
type = ADMatHeatSource
material_property = 'volumetric_heat'
variable = forwardT
[]
[]
[Materials]
[NonlinearConductivity]
type = ADParsedMaterial
f_name = 'conductivity'
function = '10+500*forwardT'
args = 'forwardT'
[]
[volumetric_heat]
type = ADGenericFunctionMaterial
prop_names = 'volumetric_heat'
prop_values = 'volumetric_heat_func'
[]
[]
[Functions]
[volumetric_heat_func]
type = ParsedFunction
value = q
vars = 'q'
vals = 'heat_source_pp'
[]
[]
[Postprocessors]
[heat_source_pp]
type = ConstantValuePostprocessor
value = 333
execute_on = 'LINEAR'
[]
[]
[BCs]
[left]
type = NeumannBC
variable = forwardT
boundary = left
value = 0
[]
[right]
type = NeumannBC
variable = forwardT
boundary = right
value = 0
[]
[bottom]
type = DirichletBC
variable = forwardT
boundary = bottom
value = 2
[]
[top]
type = DirichletBC
variable = forwardT
boundary = top
value = 1
[]
[]
[Reporters]
[measurement_locations]
type = OptimizationData
[]
[]
[Controls]
[parameterReceiver]
type = ControlsReceiver
[]
[]
[VectorPostprocessors]
[data_pt]
type = PointValueSampler
variable = forwardT
points = '0.2 0.2 0
0.8 0.6 0
0.2 1.4 0
0.8 1.8 0'
sort_by = id
[]
[]
[Outputs]
csv = true
[]
(modules/combined/test/tests/optimization/invOpt_nonlinear/forward.i)
[Executioner]
type = Steady
solve_type = NEWTON
line_search = none
nl_abs_tol = 1e-12
nl_rel_tol = 1e-12
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Mesh]
[]
[Variables]
[forwardT]
[]
[]
[Kernels]
[heat_conduction]
type = ADHeatConduction
thermal_conductivity = 'conductivity'
variable = forwardT
[]
[heat_source]
type = ADMatHeatSource
material_property = 'volumetric_heat'
variable = forwardT
[]
[]
[Materials]
[NonlinearConductivity]
type = ADParsedMaterial
f_name = 'conductivity'
function = '10+500*forwardT'
args = 'forwardT'
[]
[volumetric_heat]
type = ADGenericFunctionMaterial
prop_names = 'volumetric_heat'
prop_values = 'volumetric_heat_func'
[]
[]
[Functions]
[volumetric_heat_func]
type = ParsedOptimizationFunction
expression = q
param_symbol_names = 'q'
param_vector_name = 'params/heat_source'
[]
[]
[BCs]
[left]
type = NeumannBC
variable = forwardT
boundary = left
value = 0
[]
[right]
type = NeumannBC
variable = forwardT
boundary = right
value = 0
[]
[bottom]
type = DirichletBC
variable = forwardT
boundary = bottom
value = 2
[]
[top]
type = DirichletBC
variable = forwardT
boundary = top
value = 1
[]
[]
[Reporters]
[measurement_locations]
type = OptimizationData
variable = forwardT
[]
[params]
type = ConstantReporter
real_vector_names = 'heat_source'
real_vector_values = '0' # Dummy
[]
[]
[Outputs]
console = false
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/modular_gap_heat_transfer_mortar_displaced_radiation_conduction_separate.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-gap.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '101'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '100'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Variables]
[temp]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_x]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_y]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[]
[lm_conduction]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[Materials]
[left]
type = ADHeatConductionMaterial
block = 1
thermal_conductivity = 0.01
specific_heat = 1
[]
[right]
type = ADHeatConductionMaterial
block = 2
thermal_conductivity = 0.005
specific_heat = 1
[]
[]
[Kernels]
[hc_displaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = '1'
[]
[hc_undisplaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = false
block = '2'
[]
[disp_x]
type = Diffusion
variable = disp_x
block = '1 2'
[]
[disp_y]
type = Diffusion
variable = disp_y
block = '1 2'
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = temp
boundary = 100
primary_emissivity = 1.0
secondary_emissivity = 1.0
use_displaced_mesh = true
[]
[conduction]
type = GapFluxModelConduction
temperature = temp
boundary = 100
gap_conductivity = 0.02
use_displaced_mesh = true
[]
[]
[Constraints]
[ced_radiation]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
use_displaced_mesh = true
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
gap_flux_models = 'radiation'
[]
[ced_conduction]
type = ModularGapConductanceConstraint
variable = lm_conduction
secondary_variable = temp
use_displaced_mesh = true
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
gap_flux_models = 'conduction'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temp
boundary = 'left'
value = 100
[]
[right]
type = DirichletBC
variable = temp
boundary = 'right'
value = 0
[]
[left_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'left'
value = .1
[]
[right_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'right'
value = 0
[]
[bottom_disp_y]
type = DirichletBC
preset = false
variable = disp_y
boundary = 'bottom'
value = 0
[]
[]
[Preconditioning]
[fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-11
nl_abs_tol = 1.0e-10
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '100 101'
variable = 'temp'
[]
[]
[Outputs]
exodus = false
csv = true
[]
(modules/combined/test/tests/optimization/invOpt_bc_convective/adjoint.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 20
xmax = 1
ymax = 2
[]
[]
[AuxVariables]
[temperature_forward]
[]
[T2]
[]
[]
[AuxKernels]
[TT]
type = ParsedAux
args = 'temperature temperature_forward'
variable = T2
function = 'temperature*(100-temperature_forward)'
[]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[heat_conduction]
type = ADHeatConduction
variable = temperature
[]
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = temperature
x_coord_name = misfit/measurement_xcoord
y_coord_name = misfit/measurement_ycoord
z_coord_name = misfit/measurement_zcoord
value_name = misfit/misfit_values
[]
[]
[Reporters]
[misfit]
type = OptimizationData
[]
[params]
type = ConstantReporter
real_vector_names = 'vals'
real_vector_values = '0' # Dummy value
[]
[]
[BCs]
[left]
type = ConvectiveFluxFunction
variable = temperature
boundary = 'left'
T_infinity = 0.0
coefficient = function1
[]
[right]
type = NeumannBC
variable = temperature
boundary = right
value = 0
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 0
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 0
[]
[]
[Materials]
[steel]
type = ADGenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
nl_abs_tol = 1e-6
nl_rel_tol = 1e-8
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Functions]
[function1]
type = ParsedOptimizationFunction
expression = 'a'
param_symbol_names = 'a'
param_vector_name = 'params/vals'
[]
[]
[VectorPostprocessors]
[adjoint_pt]
type = SideOptimizationNeumannFunctionInnerProduct
variable = T2
function = function1
boundary = left
[]
[]
[Outputs]
console = false
exodus = false
file_base = 'adjoint'
[]
(modules/combined/test/tests/optimization/invOpt_bc_convective/forward.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 20
xmax = 1
ymax = 2
[]
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[heat_conduction]
type = ADHeatConduction
variable = temperature
[]
[]
[BCs]
[left]
type = ConvectiveFluxFunction
variable = temperature
boundary = 'left'
T_infinity = 100.0
coefficient = function1
[]
[right]
type = NeumannBC
variable = temperature
boundary = right
value = -100
[]
[bottom]
type = DirichletBC
variable = temperature
boundary = bottom
value = 500
[]
[top]
type = DirichletBC
variable = temperature
boundary = top
value = 600
[]
[]
[Materials]
[steel]
type = ADGenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 5
[]
[]
[Executioner]
type = Steady
solve_type = PJFNK
nl_abs_tol = 1e-6
nl_rel_tol = 1e-8
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Functions]
[function1]
type = ParsedOptimizationFunction
expression = 'a'
param_symbol_names = 'a'
param_vector_name = 'params/vals'
[]
[]
[VectorPostprocessors]
[vertical]
type = LineValueSampler
variable = 'temperature'
start_point = '0.1 0.0 0.0'
end_point = '0.1 2.0 0.0'
num_points = 21
sort_by = id
[]
[]
[Reporters]
[measure_data]
type = OptimizationData
variable = temperature
[]
[params]
type = ConstantReporter
real_vector_names = 'vals'
real_vector_values = '0' # Dummy value
[]
[]
[Outputs]
csv = true
exodus = false
console = false
file_base = 'forward'
[]
(modules/combined/test/tests/thermo_mech/ad-thermo_mech.i)
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
temperature = temp
volumetric_locking_correction = true
[]
[Mesh]
file = cube.e
[]
[Variables]
[./disp_x]
[../]
[./disp_y]
[../]
[./disp_z]
[../]
[./temp]
[../]
[]
[Kernels]
[./TensorMechanics]
use_automatic_differentiation = true
[../]
[./heat]
type = ADHeatConduction
variable = temp
[../]
[]
[BCs]
[./bottom_x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./bottom_y]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[../]
[./bottom_z]
type = DirichletBC
variable = disp_z
boundary = 1
value = 0.0
[../]
[./bottom_temp]
type = DirichletBC
variable = temp
preset = false
boundary = 1
value = 10.0
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1.0
poissons_ratio = 0.3
[../]
[./strain]
type = ADComputeSmallStrain
eigenstrain_names = eigenstrain
[../]
[./thermal_strain]
type = ADComputeThermalExpansionEigenstrain
stress_free_temperature = 0.0
thermal_expansion_coeff = 1e-5
eigenstrain_name = eigenstrain
[../]
[./stress]
type = ADComputeLinearElasticStress
[../]
[./heat]
type = ADHeatConductionMaterial
specific_heat = 1.0
thermal_conductivity = 1.0
[../]
[./density]
type = ADDensity
density = 1.0
[../]
[]
[Preconditioning]
[./smp]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
nl_rel_tol = 1e-14
l_tol = 1e-3
l_max_its = 100
dt = 1.0
end_time = 1.0
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/wall_convection/steady.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./velocity]
family = LAGRANGE_VEC
[../]
[./p]
[../]
[temperature][]
[]
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
variable = velocity
[]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[./mass_pspg]
type = INSADMassPSPG
variable = p
[../]
[./momentum_convection]
type = INSADMomentumAdvection
variable = velocity
[../]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
[../]
[./momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[../]
[./temperature_advection]
type = INSADEnergyAdvection
variable = temperature
[../]
[./temperature_conduction]
type = ADHeatConduction
variable = temperature
thermal_conductivity = 'k'
[../]
[temperature_ambient_convection]
type = INSADEnergyAmbientConvection
variable = temperature
alpha = 1
T_ambient = 0.5
[]
[temperature_supg]
type = INSADEnergySUPG
variable = temperature
velocity = velocity
[]
[]
[BCs]
[./no_slip]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom right left'
[../]
[./lid]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'top'
function_x = 'lid_function'
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[./temperature_hot]
type = DirichletBC
variable = temperature
boundary = 'bottom'
value = 1
[../]
[./temperature_cold]
type = DirichletBC
variable = temperature
boundary = 'top'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat]
type = INSADStabilized3Eqn
velocity = velocity
pressure = p
temperature = temperature
[]
[]
[Functions]
[./lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_factor_levels -ksp_gmres_restart'
petsc_options_value = 'asm 6 200'
line_search = 'none'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/test/tests/components/file_mesh_component/file_mesh_component.i)
# This test solves two identical heat conduction problems, one created with THM
# components, and one with the constituent lower-level objects and FileMeshComponent.
rho = 8000
cp = 500
k = 15
initial_T = 1000
T_left = 1005
T_right = 300
htc_right = 1000
[Variables]
[T_moose]
block = 'hs_external:block_a'
initial_condition = ${initial_T}
[]
[]
[Kernels]
[time_derivative]
type = ADHeatConductionTimeDerivative
variable = T_moose
block = 'hs_external:block_a'
density_name = density
specific_heat = specific_heat
[]
[heat_conduction]
type = ADHeatConduction
variable = T_moose
block = 'hs_external:block_a'
thermal_conductivity = thermal_conductivity
[]
[]
[BCs]
[dirichlet_bc]
type = ADFunctionDirichletBC
variable = T_moose
boundary = 'hs_external:left'
function = ${T_left}
[]
[convection_bc]
type = ADConvectionHeatTransferBC
variable = T_moose
boundary = 'hs_external:right'
T_ambient = ${T_right}
htc_ambient = ${htc_right}
[]
[]
[Materials]
[prop_mat]
type = ADGenericConstantMaterial
prop_names = 'density specific_heat thermal_conductivity'
prop_values = '${rho} ${cp} ${k}'
[]
[]
[Components]
[hs_external]
type = FileMeshComponent
file = 'mesh_in.e'
position = '0 0 0'
[]
[hs]
type = HeatStructurePlate
position = '0 0 0'
orientation = '1 0 0'
length = 5.0
n_elems = 10
names = 'blk'
widths = '1.0'
n_part_elems = '2'
depth = 1.0
initial_T = ${initial_T}
[]
[start]
type = HSBoundarySpecifiedTemperature
hs = hs
boundary = 'hs:start'
T = ${T_left}
[]
[end]
type = HSBoundaryAmbientConvection
hs = hs
boundary = 'hs:end'
T_ambient = ${T_right}
htc_ambient = ${htc_right}
[]
[]
# Currently, there is no way to have a variable of the same name created in THM
# as one in MOOSE, even though they are on different blocks. Thus, we create a
# common variable name here and copy both variables into it for output.
[AuxVariables]
[T]
[]
[]
[AuxKernels]
[T_moose_ak]
type = CopyValueAux
variable = T
block = 'hs_external:block_a'
source = T_moose
execute_on = 'INITIAL TIMESTEP_END'
[]
[T_thm_ak]
type = CopyValueAux
variable = T
block = 'hs:blk'
source = T_solid
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = 'bdf2'
start_time = 0
dt = 1.0
num_steps = 5
abort_on_solve_fail = true
solve_type = 'NEWTON'
[]
[Outputs]
[exodus]
type = Exodus
file_base = 'file_mesh_component'
show = 'T'
[]
[]
(modules/heat_transfer/test/tests/radiative_bcs/ad_function_radiative_bc.i)
#
# If we assume that epsilon*sigma*(T_inf^4-T_s^4) is approximately equal to
# epsilon*sigma*4*T_inf^3*(T_inf-T_s), that form is equivalent to
# h*(T_inf-T_s), the convective flux bc. So, the radiative and convective
# flux bcs should give nearly the same answer if the leading terms are equal.
#
[Mesh]
[top]
type = GeneratedMeshGenerator
dim = 3
nx = 10
bias_x = 0.8
ymin = 1.2
ymax = 2.2
boundary_name_prefix = top
[]
[bottom]
type = GeneratedMeshGenerator
dim = 3
nx = 10
bias_x = 0.8
boundary_name_prefix = bot
boundary_id_offset = 6
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'top bottom'
[]
[]
[Variables]
[temp]
initial_condition = 600.0
[]
[]
[Kernels]
[heat_dt]
type = ADTimeDerivative
variable = temp
[]
[heat_conduction]
type = ADHeatConduction
variable = temp
[]
[]
[BCs]
[top_right]
type = ADConvectiveHeatFluxBC
variable = temp
boundary = top_right
T_infinity = 300.0
heat_transfer_coefficient = 3.0
[]
[bot_right]
type = ADFunctionRadiativeBC
variable = temp
boundary = bot_right
# htc/(stefan-boltzmann*4*T_inf^3)
emissivity_function = '3/(5.670367e-8*4*300*300*300)'
[]
[]
[Materials]
[thermal]
type = ADGenericConstantMaterial
prop_names = 'density thermal_conductivity specific_heat'
prop_values = '1 10 100'
[]
[]
[Postprocessors]
[top_left_temp]
type = SideAverageValue
variable = temp
boundary = top_left
execute_on = 'TIMESTEP_END initial'
[]
[bot_left_temp]
type = SideAverageValue
variable = temp
boundary = bot_left
execute_on = 'TIMESTEP_END initial'
[]
[top_right_temp]
type = SideAverageValue
variable = temp
boundary = top_right
[]
[bot_right_temp]
type = SideAverageValue
variable = temp
boundary = bot_right
[]
[]
[Executioner]
type = Transient
num_steps = 10
dt = 1e1
nl_abs_tol = 1e-12
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_single_material.i)
## Units in the input file: m-Pa-s-K-V
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmax = 0.1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmin = 0.1
xmax = 0.2
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
[interface_secondary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'fixed_block_left'
new_block_id = 3
new_block_name = 'interface_secondary_subdomain'
input = block_rename
[]
[interface_primary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'moving_block_right'
new_block_id = 4
new_block_name = 'interface_primary_subdomain'
input = interface_secondary_subdomain
[]
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
[]
[Variables]
[temperature]
initial_condition = 300.0
[]
[potential]
[]
[potential_interface_lm]
block = 'interface_secondary_subdomain'
[]
[temperature_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[AuxVariables]
[interface_normal_lm]
order = FIRST
family = LAGRANGE
block = 'interface_secondary_subdomain'
initial_condition = 1.0
[]
[]
[Kernels]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
extra_vector_tags = 'ref'
block = 'left_block right_block'
[]
[electric_aluminum]
type = ADMatDiffusion
variable = potential
diffusivity = aluminum_electrical_conductivity
extra_vector_tags = 'ref'
block = 'left_block right_block'
[]
[]
[BCs]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'fixed_block_right'
[]
[electric_left]
type = ADDirichletBC
variable = potential
value = 0.0
boundary = moving_block_left
[]
[electric_right]
type = ADDirichletBC
variable = potential
value = 3.0e-1
boundary = fixed_block_right
[]
[]
[Constraints]
[thermal_contact]
type = ModularGapConductanceConstraint
variable = temperature_interface_lm
secondary_variable = temperature
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_temperature'
[]
[electrical_contact]
type = ModularGapConductanceConstraint
variable = potential_interface_lm
secondary_variable = potential
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_electric'
[]
[interface_heating]
type = ADInterfaceJouleHeatingConstraint
potential_lagrange_multiplier = potential_interface_lm
secondary_variable = temperature
primary_electrical_conductivity = aluminum_electrical_conductivity
secondary_electrical_conductivity = aluminum_electrical_conductivity
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
[]
[]
[Materials]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_electrical_conductivity aluminum_hardness'
prop_values = ' 2.7e3 210 900.0 3.7e7 1.0' #for 99% pure Al
block = 'left_block right_block interface_secondary_subdomain'
[]
[]
[UserObjects]
[closed_temperature]
type = GapFluxModelPressureDependentConduction
primary_conductivity = aluminum_thermal_conductivity
secondary_conductivity = aluminum_thermal_conductivity
temperature = temperature
contact_pressure = interface_normal_lm
primary_hardness = aluminum_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[closed_electric]
type = GapFluxModelPressureDependentConduction
primary_conductivity = aluminum_electrical_conductivity
secondary_conductivity = aluminum_electrical_conductivity
temperature = potential
contact_pressure = interface_normal_lm
primary_hardness = aluminum_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[]
[Postprocessors]
[aluminum_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_secondary_subdomain
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[aluminum_interface_potential]
type = AverageNodalVariableValue
variable = potential
block = interface_secondary_subdomain
[]
[interface_electrical_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = potential
boundary = fixed_block_left
diffusivity = aluminum_electrical_conductivity
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
nl_abs_tol = 1e-10
nl_rel_tol = 1e-6
nl_max_its = 50
nl_forced_its = 1
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar_action/modular_gap_heat_transfer_mortar_displaced_radiation_conduction_action_lowerd_exists.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-gap.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '101'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '100'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Variables]
[temp]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_x]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_y]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[]
[Materials]
[left]
type = ADHeatConductionMaterial
block = 1
thermal_conductivity = 0.01
specific_heat = 1
[]
[right]
type = ADHeatConductionMaterial
block = 2
thermal_conductivity = 0.005
specific_heat = 1
[]
[]
[Kernels]
[hc_displaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = '1'
[]
[hc_undisplaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = false
block = '2'
[]
[disp_x]
type = Diffusion
variable = disp_x
block = '1 2'
[]
[disp_y]
type = Diffusion
variable = disp_y
block = '1 2'
[]
[]
[MortarGapHeatTransfer]
[mortar_heat_transfer]
temperature = temp
primary_emissivity = 1.0
secondary_emissivity = 1.0
boundary = 100
use_displaced_mesh = true
gap_conductivity = 0.02
primary_boundary = 100
secondary_boundary = 101
# We already have mortar lower-dimensional domains and do not need the action
# to create them for us. It will reuse those and define variables and constraints on
# the existing appended meshes.
primary_subdomain = 'primary_lower'
secondary_subdomain = 'secondary_lower'
gap_flux_options = 'CONDUCTION RADIATION'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temp
boundary = 'left'
value = 100
[]
[right]
type = DirichletBC
variable = temp
boundary = 'right'
value = 0
[]
[left_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'left'
value = .1
[]
[right_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'right'
value = 0
[]
[bottom_disp_y]
type = DirichletBC
preset = false
variable = disp_y
boundary = 'bottom'
value = 0
[]
[]
[Preconditioning]
[fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-11
nl_abs_tol = 1.0e-10
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '100 101'
variable = 'temp'
[]
[]
[Outputs]
csv = true
[exodus]
type = Exodus
show = 'temp'
[]
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/small-2d/small.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'small'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[secondary]
input = block_rename
type = LowerDBlockFromSidesetGenerator
sidesets = 'block_left'
new_block_id = '30'
new_block_name = 'frictionless_secondary_subdomain'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'plank_right'
new_block_id = '20'
new_block_name = 'frictionless_primary_subdomain'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[temp]
order = ${order}
block = 'plank block'
scaling = 1e-1
[]
[thermal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
scaling = 1e-7
[]
[frictionless_normal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
use_dual = true
[]
[]
[Modules/TensorMechanics/Master]
[action]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
[]
[]
[Kernels]
[hc]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = 'plank block'
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
lm_variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[thermal_contact]
type = GapConductanceConstraint
variable = thermal_lm
secondary_variable = temp
k = 1
use_displaced_mesh = true
primary_boundary = plank_right
primary_subdomain = frictionless_primary_subdomain
secondary_boundary = block_left
secondary_subdomain = frictionless_secondary_subdomain
displacements = 'disp_x disp_y'
[]
[]
[BCs]
[left_temp]
type = DirichletBC
variable = temp
boundary = 'plank_left'
value = 400
[]
[right_temp]
type = DirichletBC
variable = temp
boundary = 'block_right'
value = 300
[]
[left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeLinearElasticStress
block = 'plank block'
[]
[heat_plank]
type = ADHeatConductionMaterial
block = plank
thermal_conductivity = 2
specific_heat = 1
[]
[heat_block]
type = ADHeatConductionMaterial
block = block
thermal_conductivity = 1
specific_heat = 1
[]
[]
[Preconditioning]
[smp]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -snes_max_it'
petsc_options_value = 'lu NONZERO 1e-15 20'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'none'
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[avg_temp]
type = ElementAverageValue
variable = temp
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact avg_temp'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/finite_rr.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[secondary]
input = block_rename
type = LowerDBlockFromSidesetGenerator
sidesets = 'block_left'
new_block_id = '30'
new_block_name = 'frictionless_secondary_subdomain'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'plank_right'
new_block_id = '20'
new_block_name = 'frictionless_primary_subdomain'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
converge_on = 'disp_x disp_y temp'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[temp]
order = ${order}
block = 'plank block'
scaling = 1e-1
[]
[thermal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
scaling = 1e-7
[]
[frictionless_normal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
use_dual = true
[]
[]
[Modules/TensorMechanics/Master]
[action]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
strain = FINITE
extra_vector_tags = 'ref'
[]
[]
[Kernels]
[hc]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = 'plank block'
extra_vector_tags = 'ref'
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
lm_variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[thermal_contact]
type = GapConductanceConstraint
variable = thermal_lm
secondary_variable = temp
k = 1
use_displaced_mesh = true
primary_boundary = plank_right
primary_subdomain = frictionless_primary_subdomain
secondary_boundary = block_left
secondary_subdomain = frictionless_secondary_subdomain
displacements = 'disp_x disp_y'
[]
[]
[BCs]
[left_temp]
type = ADDirichletBC
variable = temp
boundary = 'plank_left'
value = 400
[]
[right_temp]
type = ADDirichletBC
variable = temp
boundary = 'block_right'
value = 300
[]
[left_x]
type = ADDirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = ADDirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
preset = false
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
preset = false
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[]
[heat_plank]
type = ADHeatConductionMaterial
block = plank
thermal_conductivity = 2
specific_heat = 1
[]
[heat_block]
type = ADHeatConductionMaterial
block = block
thermal_conductivity = 1
specific_heat = 1
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -snes_max_it'
petsc_options_value = 'lu NONZERO 1e-15 20'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'none'
nl_abs_tol = 1e-13
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[avg_temp]
type = ElementAverageValue
variable = temp
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact avg_temp'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/bc_gap_heat_transfer_displaced_radiation.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-gap.e
[]
allow_renumbering = false
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Variables]
[temp]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_x]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_y]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[]
[Materials]
[left]
type = ADHeatConductionMaterial
block = 1
thermal_conductivity = 0.01
specific_heat = 1
[]
[right]
type = ADHeatConductionMaterial
block = 2
thermal_conductivity = 0.005
specific_heat = 1
[]
[]
[Kernels]
[hc_displaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = '1'
[]
[hc_undisplaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = false
block = '2'
[]
[disp_x]
type = Diffusion
variable = disp_x
block = '1 2'
[]
[disp_y]
type = Diffusion
variable = disp_y
block = '1 2'
[]
[]
[ThermalContact]
[thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 100
secondary = 101
emissivity_primary = 1.0
emissivity_secondary = 1.0
gap_conductivity = 1.0e-12
quadrature = true
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temp
boundary = 'left'
value = 100
[]
[right]
type = DirichletBC
variable = temp
boundary = 'right'
value = 0
[]
[left_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'left'
value = .1
[]
[right_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'right'
value = 0
[]
[bottom_disp_y]
type = DirichletBC
preset = false
variable = disp_y
boundary = 'bottom'
value = 0
[]
[]
[Preconditioning]
[fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-11
nl_abs_tol = 1.0e-10
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '100 101'
variable = 'temp'
[]
[]
[Outputs]
exodus = false
csv = true
[]
(tutorials/darcy_thermo_mech/step07_adaptivity/problems/step7a_coarse.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 30
ny = 3
xmax = 0.304 # Length of test chamber
ymax = 0.0257 # Test chamber radius
[]
coord_type = RZ
rz_coord_axis = X
[]
[Variables]
[pressure]
[]
[temperature]
initial_condition = 300 # Start at room temperature
[]
[]
[AuxVariables]
[velocity]
order = CONSTANT
family = MONOMIAL_VEC
[]
[]
[Kernels]
[darcy_pressure]
type = DarcyPressure
variable = pressure
[]
[heat_conduction]
type = ADHeatConduction
variable = temperature
[]
[heat_conduction_time_derivative]
type = ADHeatConductionTimeDerivative
variable = temperature
[]
[heat_convection]
type = DarcyAdvection
variable = temperature
pressure = pressure
[]
[]
[AuxKernels]
[velocity]
type = DarcyVelocity
variable = velocity
execute_on = timestep_end
pressure = pressure
[]
[]
[BCs]
[inlet]
type = DirichletBC
variable = pressure
boundary = left
value = 4000 # (Pa) From Figure 2 from paper. First data point for 1mm spheres.
[]
[outlet]
type = DirichletBC
variable = pressure
boundary = right
value = 0 # (Pa) Gives the correct pressure drop from Figure 2 for 1mm spheres
[]
[inlet_temperature]
type = FunctionDirichletBC
variable = temperature
boundary = left
function = 'if(t<0,350+50*t,350)'
[]
[outlet_temperature]
type = HeatConductionOutflow
variable = temperature
boundary = right
[]
[]
[Materials]
[column]
type = PackedColumn
radius = 1
temperature = temperature
[]
[]
[Problem]
type = FEProblem
[]
[Executioner]
type = Transient
solve_type = NEWTON
automatic_scaling = true
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
end_time = 100
dt = 0.25
start_time = -1
steady_state_tolerance = 1e-5
steady_state_detection = true
[TimeStepper]
type = FunctionDT
function = 'if(t<0,0.1,0.25)'
[]
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/optimization/invOpt_nonlinear/adjoint.i)
[Executioner]
type = Steady
solve_type = NEWTON
line_search = none
nl_abs_tol = 1e-12
nl_rel_tol = 1e-12
nl_max_its = 100
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Mesh]
[]
[Variables]
[adjointT]
[]
[]
[AuxVariables]
[forwardT]
[]
[dDdTgradT]
order = CONSTANT
family = MONOMIAL_VEC
[]
[]
[Kernels]
[heat_conduction]
type = ADHeatConduction
thermal_conductivity = 'linearized_conductivity'
variable = adjointT
[]
[advection]
type = LevelSetAdvection
velocity = dDdTgradT
variable = adjointT
[]
[]
[AuxKernels]
[dDdTgradT]
type = ADFunctorElementalGradientAux
functor = forwardT
variable = dDdTgradT
factor_matprop = 'dDdT'
[]
[]
[Materials]
[LinearizedConductivity]
type = ADParsedMaterial
f_name = 'linearized_conductivity'
function = '10+500*forwardT'
args = 'forwardT'
[]
[dDdT]
type = ADParsedMaterial
f_name = 'dDdT'
function = '500'
args = 'forwardT'
[]
[]
[DiracKernels]
[pt]
type = ReporterPointSource
variable = adjointT
x_coord_name = misfit/measurement_xcoord
y_coord_name = misfit/measurement_ycoord
z_coord_name = misfit/measurement_zcoord
value_name = misfit/misfit_values
[]
[]
[Reporters]
[misfit]
type = OptimizationData
[]
[params]
type = ConstantReporter
real_vector_names = 'heat_source'
real_vector_values = '0' # Dummy
[]
[]
[BCs]
[left]
type = NeumannBC
variable = adjointT
boundary = left
value = 0
[]
[right]
type = NeumannBC
variable = adjointT
boundary = right
value = 0
[]
[bottom]
type = DirichletBC
variable = adjointT
boundary = bottom
value = 0
[]
[top]
type = DirichletBC
variable = adjointT
boundary = top
value = 0
[]
[]
[VectorPostprocessors]
[gradient_vpp]
type = ElementOptimizationSourceFunctionInnerProduct
function = volumetric_heat_func
variable = adjointT
[]
[]
[Functions]
[volumetric_heat_func]
type = ParsedOptimizationFunction
expression = q
param_symbol_names = 'q'
param_vector_name = 'params/heat_source'
[]
[]
[Outputs]
console = false
[]
(modules/heat_transfer/test/tests/postprocessors/ad_convective_ht_side_integral.i)
[Mesh]
[./cartesian]
type = CartesianMeshGenerator
dim = 2
dx = '0.45 0.1 0.45'
ix = '5 1 5'
dy = '0.45 0.1 0.45'
iy = '5 1 5'
subdomain_id = '1 1 1
1 2 1
1 1 1'
[../]
[./add_iss_1]
type = SideSetsBetweenSubdomainsGenerator
primary_block = 1
paired_block = 2
new_boundary = 'interface'
input = cartesian
[../]
[./block_deleter]
type = BlockDeletionGenerator
block = 2
input = add_iss_1
[../]
[]
[Variables]
[./temperature]
initial_condition = 300
[../]
[]
[AuxVariables]
[./channel_T]
family = MONOMIAL
order = CONSTANT
initial_condition = 400
[../]
[./channel_Hw]
family = MONOMIAL
order = CONSTANT
initial_condition = 1000
[../]
[]
[Kernels]
[./graphite_diffusion]
type = ADHeatConduction
variable = temperature
thermal_conductivity = 'thermal_conductivity'
[../]
[]
[BCs]
## boundary conditions for the thm channels in the reflector
[./channel_heat_transfer]
type = CoupledConvectiveHeatFluxBC
variable = temperature
htc = channel_Hw
T_infinity = channel_T
boundary = 'interface'
[../]
# hot boundary on the left
[./left]
type = DirichletBC
variable = temperature
value = 1000
boundary = 'left'
[../]
# cool boundary on the right
[./right]
type = DirichletBC
variable = temperature
value = 300
boundary = 'right'
[../]
[]
[Materials]
[./pronghorn_solid_material]
type = ADHeatConductionMaterial
temp = temperature
thermal_conductivity = 25
specific_heat = 1000
[../]
[./htc_material]
type = ADGenericConstantMaterial
prop_names = 'alpha_wall'
prop_values = '1000'
[../]
[./tfluid_mat]
type = ADPiecewiseLinearInterpolationMaterial
property = tfluid_mat
variable = channel_T
x = '400 500'
y = '400 500'
[../]
[]
[Postprocessors]
[./Qw1]
type = ADConvectiveHeatTransferSideIntegral
T_fluid_var = channel_T
htc_var = channel_Hw
T_solid = temperature
boundary = interface
[../]
[./Qw2]
type = ADConvectiveHeatTransferSideIntegral
T_fluid_var = channel_T
htc = alpha_wall
T_solid = temperature
boundary = interface
[../]
[./Qw3]
type = ADConvectiveHeatTransferSideIntegral
T_fluid = tfluid_mat
htc = alpha_wall
T_solid = temperature
boundary = interface
[../]
[]
[Executioner]
type = Steady
[]
[Outputs]
csv = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/boussinesq/boussinesq_square.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmax = .05
ymax = .05
nx = 20
ny = 20
elem_type = QUAD9
[]
[./bottom_left]
type = ExtraNodesetGenerator
new_boundary = corner
coord = '0 0'
input = gen
[../]
[]
[Preconditioning]
[./Newton_SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -ksp_gmres_restart'
petsc_options_value = 'bjacobi lu NONZERO 200'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[out]
type = Exodus
execute_on = 'final'
[]
[]
[Variables]
[velocity]
family = LAGRANGE_VEC
order = SECOND
[]
[p][]
[./temp]
order = SECOND
initial_condition = 340
scaling = 1e-4
[../]
[]
[BCs]
[./velocity_dirichlet]
type = VectorDirichletBC
boundary = 'left right bottom top'
variable = velocity
# The third entry is to satisfy RealVectorValue
values = '0 0 0'
[../]
# Even though we are integrating by parts, because there are no integrated
# boundary conditions on the velocity p doesn't appear in the system of
# equations. Thus we must pin the pressure somewhere in order to ensure a
# unique solution
[./p_zero]
type = DirichletBC
boundary = corner
variable = p
value = 0
[../]
[./cold]
type = DirichletBC
variable = temp
boundary = left
value = 300
[../]
[./hot]
type = DirichletBC
variable = temp
boundary = right
value = 400
[../]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[momentum_advection]
type = INSADMomentumAdvection
variable = velocity
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
[]
[temp_advection]
type = INSADEnergyAdvection
variable = temp
[]
[temp_conduction]
type = ADHeatConduction
variable = temp
thermal_conductivity = 'k'
[../]
[./buoyancy]
type = INSADBoussinesqBodyForce
variable = velocity
temperature = temp
gravity = '0 -9.81 0'
[../]
[./gravity]
type = INSADGravityForce
variable = velocity
gravity = '0 -9.81 0'
[../]
[]
[Materials]
[./ad_const]
type = ADGenericConstantMaterial
# alpha = coefficient of thermal expansion where rho = rho0 -alpha * rho0 * delta T
prop_names = 'mu rho alpha k cp'
prop_values = '30.74e-6 .5757 2.9e-3 46.38e-3 1054'
[../]
[./const]
type = GenericConstantMaterial
prop_names = 'temp_ref'
prop_values = '900'
[../]
[ins_mat]
type = INSAD3Eqn
velocity = velocity
pressure = p
temperature = temp
[]
[]
(modules/heat_transfer/test/tests/joule_heating/transient_ad_jouleheating.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
xmax = 5
ymax = 5
[]
[Variables]
[./T]
initial_condition = 293.0 #in K
[../]
[./elec]
[../]
[]
[Kernels]
[./HeatDiff]
type = ADHeatConduction
variable = T
[../]
[./HeatTdot]
type = ADHeatConductionTimeDerivative
variable = T
[../]
[./HeatSrc]
type = ADJouleHeatingSource
variable = T
elec = elec
[../]
[./electric]
type = ADHeatConduction
variable = elec
thermal_conductivity = electrical_conductivity
[../]
[]
[BCs]
[./lefttemp]
type = ADDirichletBC
boundary = left
variable = T
value = 293 #in K
[../]
[./elec_left]
type = ADDirichletBC
variable = elec
boundary = left
value = 1 #in V
[../]
[./elec_right]
type = ADDirichletBC
variable = elec
boundary = right
value = 0
[../]
[]
[Materials]
[./k]
type = ADGenericConstantMaterial
prop_names = 'thermal_conductivity'
prop_values = '397.48' #copper in W/(m K)
[../]
[./cp]
type = ADGenericConstantMaterial
prop_names = 'specific_heat'
prop_values = '385.0' #copper in J/(kg K)
[../]
[./rho]
type = ADGenericConstantMaterial
prop_names = 'density'
prop_values = '8920.0' #copper in kg/(m^3)
[../]
[./sigma] #copper is default material
type = ADElectricalConductivity
temperature = T
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
scheme = bdf2
solve_type = NEWTON
petsc_options_iname = '-pc_type'
petsc_options_value = 'hypre'
dt = 1
end_time = 5
automatic_scaling = true
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/combined/test/tests/combined_plasticity_temperature/ad_plasticity_temperature_dep_yield.i)
#
# This is a test of the piece-wise linear strain hardening model using the
# small strain formulation. This test exercises the temperature-dependent
# yield stress.
#
# Test procedure:
# 1. The element is pulled to and then beyond the yield stress for a given
# temperature.
# 2. The displacement is then constant while the temperature increases and
# the yield stress decreases. This results in a lower stress with more
# plastic strain.
# 3. The temperature decreases beyond its original value giving a higher
# yield stress. The displacement increases, causing increases stress to
# the new yield stress.
# 4. The temperature and yield stress are constant with increasing
# displacement giving a constant stress and more plastic strain.
#
# Plotting total_strain_yy on the x axis and stress_yy on the y axis shows
# the stress history in a clear way.
#
# s |
# t | *****
# r | *
# e | ***** *
# s | * * *
# s | * *
# |*
# +------------------
# total strain
#
[Mesh]
type = GeneratedMesh
dim = 3
nx = 1
ny = 1
nz = 1
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
[]
[Modules/TensorMechanics/Master]
[./all]
strain = FINITE
incremental = true
add_variables = true
generate_output = 'stress_yy plastic_strain_xx plastic_strain_yy plastic_strain_zz'
use_automatic_differentiation = true
[../]
[]
[Variables]
[./temp]
order = FIRST
family = LAGRANGE
[../]
[]
[Functions]
[./top_pull]
type = PiecewiseLinear
x = '0 1 2 4 5 6'
y = '0 0.025 0.05 0.05 0.06 0.085'
[../]
[./yield]
type = PiecewiseLinear
x = '400 500 600'
y = '6e3 5e3 4e3'
[../]
[./temp]
type = PiecewiseLinear
x = '0 1 2 3 4'
y = '500 500 500 600 400'
[../]
[]
[Kernels]
[./heat]
type = ADHeatConduction
variable = temp
[../]
[]
[BCs]
[./y_pull_function]
type = FunctionDirichletBC
variable = disp_y
boundary = top
function = top_pull
[../]
[./x_bot]
type = DirichletBC
variable = disp_x
boundary = left
value = 0.0
[../]
[./y_bot]
type = DirichletBC
variable = disp_y
boundary = bottom
value = 0.0
[../]
[./z_bot]
type = DirichletBC
variable = disp_z
boundary = back
value = 0.0
[../]
[./temp]
type = FunctionDirichletBC
variable = temp
function = temp
boundary = left
[../]
[]
[Materials]
[./elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
block = 0
youngs_modulus = 2.0e5
poissons_ratio = 0.3
[../]
[./creep_plas]
type = ADComputeMultipleInelasticStress
block = 0
inelastic_models = 'plasticity'
max_iterations = 50
absolute_tolerance = 1e-05
[../]
[./plasticity]
type = ADIsotropicPlasticityStressUpdate
block = 0
hardening_constant = 0
yield_stress_function = yield
temperature = temp
[../]
[./heat_conduction]
type = ADHeatConductionMaterial
block = 0
specific_heat = 1
thermal_conductivity = 1
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
line_search = 'none'
l_max_its = 100
nl_max_its = 100
nl_rel_tol = 1e-12
nl_abs_tol = 1e-10
l_tol = 1e-9
start_time = 0.0
end_time = 6
dt = 0.1
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar_action/modular_gap_heat_transfer_mortar_displaced_radiation_conduction_verbose.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-gap.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '101'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '100'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Variables]
[temp]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_x]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_y]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[Materials]
[left]
type = ADHeatConductionMaterial
block = 1
thermal_conductivity = 0.01
specific_heat = 1
[]
[right]
type = ADHeatConductionMaterial
block = 2
thermal_conductivity = 0.005
specific_heat = 1
[]
[]
[Kernels]
[hc_displaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = '1'
[]
[hc_undisplaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = false
block = '2'
[]
[disp_x]
type = Diffusion
variable = disp_x
block = '1 2'
[]
[disp_y]
type = Diffusion
variable = disp_y
block = '1 2'
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = temp
boundary = 100
primary_emissivity = 1.0
secondary_emissivity = 1.0
use_displaced_mesh = true
[]
[conduction]
type = GapFluxModelConduction
temperature = temp
boundary = 100
gap_conductivity = 0.02
use_displaced_mesh = true
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
use_displaced_mesh = true
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
correct_edge_dropping = true
gap_flux_models = 'radiation conduction'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temp
boundary = 'left'
value = 100
[]
[right]
type = DirichletBC
variable = temp
boundary = 'right'
value = 0
[]
[left_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'left'
value = .1
[]
[right_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'right'
value = 0
[]
[bottom_disp_y]
type = DirichletBC
preset = false
variable = disp_y
boundary = 'bottom'
value = 0
[]
[]
[Preconditioning]
[fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-11
nl_abs_tol = 1.0e-10
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '100 101'
variable = 'temp'
[]
[]
[Outputs]
csv = true
[exodus]
type = Exodus
show = 'temp'
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/block-restriction/two-mats-one-eqn-set.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 2
ymin = 0
ymax = 1
nx = 16
ny = 8
elem_type = QUAD9
[]
[./corner_node_0]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node_0'
coord = '0 0 0'
input = gen
[../]
[./corner_node_1]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node_1'
coord = '1 0 0'
input = corner_node_0
[../]
[./subdomain1]
input = corner_node_1
type = SubdomainBoundingBoxGenerator
bottom_left = '1 0 0'
top_right = '2 1 0'
block_id = 1
[../]
[./break_boundary]
input = subdomain1
type = BreakBoundaryOnSubdomainGenerator
[../]
[./interface0]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
primary_block = '0'
paired_block = '1'
new_boundary = 'interface0'
[../]
[./interface1]
type = SideSetsBetweenSubdomainsGenerator
input = interface0
primary_block = '1'
paired_block = '0'
new_boundary = 'interface1'
[../]
[]
[Variables]
[velocity0]
order = SECOND
family = LAGRANGE_VEC
[]
[T0]
order = SECOND
[InitialCondition]
type = ConstantIC
value = 1.0
[]
[]
[p0]
[]
[]
[Kernels]
[./mass0]
type = INSADMass
variable = p0
[../]
[./momentum_time0]
type = INSADMomentumTimeDerivative
variable = velocity0
[../]
[./momentum_convection0]
type = INSADMomentumAdvection
variable = velocity0
[../]
[./momentum_viscous0]
type = INSADMomentumViscous
variable = velocity0
[../]
[./momentum_pressure0]
type = INSADMomentumPressure
variable = velocity0
pressure = p0
integrate_p_by_parts = true
[../]
[./temperature_time0]
type = INSADHeatConductionTimeDerivative
variable = T0
[../]
[./temperature_advection0]
type = INSADEnergyAdvection
variable = T0
[../]
[./temperature_conduction0]
type = ADHeatConduction
variable = T0
thermal_conductivity = 'k'
[../]
[]
[BCs]
[./no_slip0]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'bottom_to_0 interface0 left'
[../]
[./lid0]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'top_to_0'
function_x = 'lid_function0'
[../]
[./T_hot0]
type = DirichletBC
variable = T0
boundary = 'bottom_to_0'
value = 1
[../]
[./T_cold0]
type = DirichletBC
variable = T0
boundary = 'top_to_0'
value = 0
[../]
[./pressure_pin0]
type = DirichletBC
variable = p0
boundary = 'pinned_node_0'
value = 0
[../]
[./no_slip1]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'bottom_to_1 interface1 right'
[../]
[./lid1]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'top_to_1'
function_x = 'lid_function1'
[../]
[./T_hot1]
type = DirichletBC
variable = T0
boundary = 'bottom_to_1'
value = 1
[../]
[./T_cold1]
type = DirichletBC
variable = T0
boundary = 'top_to_1'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat0]
type = INSAD3Eqn
velocity = velocity0
pressure = p0
temperature = T0
block = '0'
[]
[ins_mat1]
type = INSAD3Eqn
velocity = velocity0
pressure = p0
temperature = T0
block = '1'
[]
[]
[Functions]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
[./lid_function0]
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[./lid_function1]
type = ParsedFunction
expression = '4*(x-1)*(2-x)'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Transient
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_levels -sub_pc_factor_shift_type'
petsc_options_value = 'asm 2 ilu 4 NONZERO'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
exodus = true
[]
(tutorials/darcy_thermo_mech/step10_multiapps/tests/auxkernels/corrosion/corrosion.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
ymax = 0.1
xmax = 0.1
[]
uniform_refine = 0
[]
[Adaptivity]
max_h_level = 3
initial_steps = 5
cycles_per_step = 2
initial_marker = error_marker
marker = error_marker
[Indicators]
[phi_jump]
type = GradientJumpIndicator
variable = phi
[]
[]
[Markers]
[error_marker]
type = ErrorFractionMarker
indicator = phi_jump
refine = 0.9
[]
[]
[]
[Variables]
[temperature]
initial_condition = 300
[]
[]
[AuxVariables]
[phi]
[]
[]
[AuxKernels]
[corrosion]
type = RandomCorrosion
execute_on = 'timestep_end'
variable = phi
reference_temperature = 300
temperature = 301
[]
[]
[Kernels]
[heat_conduction]
type = ADHeatConduction
variable = temperature
[]
[]
[BCs]
[left]
type = PostprocessorDirichletBC
variable = temperature
boundary = left
postprocessor = 301
[]
[right]
type = NeumannBC
variable = temperature
boundary = right
value = 100 # prescribed flux
[]
[]
[Materials]
[column]
type = PackedColumn
temperature = temperature
radius = 1 # mm
phase = phi
outputs = exodus
output_properties = porosity
[]
[]
[Problem]
type = FEProblem
[]
[Postprocessors]
[k_eff]
type = ThermalConductivity
variable = temperature
T_hot = 301
flux = 100
dx = 0.1
boundary = right
length_scale = 1
[]
[]
[Executioner]
type = Transient
num_steps = 5
dt = 0.5
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
execute_on = 'initial timestep_end'
exodus = true
[console]
type = Console
execute_postprocessors_on = 'timestep_begin timestep_end'
[]
[]
[ICs]
[close_pack]
radius = 0.01
outvalue = 0 # water
variable = phi
invalue = 1 #steel
type = ClosePackIC
[]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar_action/modular_gap_heat_transfer_mortar_displaced_radiation_conduction_action.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-gap.e
[]
allow_renumbering = false
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Variables]
[temp]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_x]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_y]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[]
[Materials]
[left]
type = ADHeatConductionMaterial
block = 1
thermal_conductivity = 0.01
specific_heat = 1
[]
[right]
type = ADHeatConductionMaterial
block = 2
thermal_conductivity = 0.005
specific_heat = 1
[]
[]
[Kernels]
[hc_displaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = '1'
[]
[hc_undisplaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = false
block = '2'
[]
[disp_x]
type = Diffusion
variable = disp_x
block = '1 2'
[]
[disp_y]
type = Diffusion
variable = disp_y
block = '1 2'
[]
[]
[MortarGapHeatTransfer]
[mortar_heat_transfer]
temperature = temp
primary_emissivity = 1.0
secondary_emissivity = 1.0
boundary = 100
use_displaced_mesh = true
gap_conductivity = 0.02
primary_boundary = 100
secondary_boundary = 101
gap_flux_options = 'CONDUCTION RADIATION'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temp
boundary = 'left'
value = 100
[]
[right]
type = DirichletBC
variable = temp
boundary = 'right'
value = 0
[]
[left_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'left'
value = .1
[]
[right_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'right'
value = 0
[]
[bottom_disp_y]
type = DirichletBC
preset = false
variable = disp_y
boundary = 'bottom'
value = 0
[]
[]
[Preconditioning]
[fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-11
nl_abs_tol = 1.0e-10
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '100 101'
variable = 'temp'
[]
[]
[Outputs]
csv = true
[exodus]
type = Exodus
show = 'temp'
[]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/modular_gap_heat_transfer_mortar_displaced_conduction_function.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-gap.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '101'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '100'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[AuxVariables]
[dummy]
order = FIRST
family = LAGRANGE
initial_condition = 1.0
[]
[]
[Functions]
[function]
type = ParsedFunction
expression = 'if(t > 100.0, 0.0, t)'
[]
[]
[Variables]
[temp]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_x]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_y]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[Materials]
[left]
type = ADHeatConductionMaterial
block = 1
thermal_conductivity = 0.01
specific_heat = 1
[]
[right]
type = ADHeatConductionMaterial
block = 2
thermal_conductivity = 0.005
specific_heat = 1
[]
[]
[Kernels]
[hc_displaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = '1'
[]
[hc_undisplaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = false
block = '2'
[]
[disp_x]
type = Diffusion
variable = disp_x
block = '1 2'
[]
[disp_y]
type = Diffusion
variable = disp_y
block = '1 2'
[]
[]
[UserObjects]
[conduction]
type = GapFluxModelConduction
temperature = temp
boundary = 100
gap_conductivity = 10.0
gap_conductivity_function_variable = dummy
gap_conductivity_function = function
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
use_displaced_mesh = true
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
gap_flux_models = conduction
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temp
boundary = 'left'
value = 100
[]
[right]
type = DirichletBC
variable = temp
boundary = 'right'
value = 0
[]
[left_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'left'
value = .1
[]
[right_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'right'
value = 0
[]
[bottom_disp_y]
type = DirichletBC
preset = false
variable = disp_y
boundary = 'bottom'
value = 0
[]
[]
[Preconditioning]
[fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-11
nl_abs_tol = 1.0e-10
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '100 101'
variable = 'temp'
[]
[]
[Outputs]
exodus = false
csv = true
[]
(modules/combined/test/tests/3d-mortar-projection-tolerancing/test.i)
stress_free_temperature = 300
thermal_expansion_coeff = 6.66e-6
[Problem]
type = FEProblem
[]
[GlobalParams]
displacements = 'disp_x disp_y disp_z'
temperature = T_K
[]
[Mesh]
patch_update_strategy = iteration
use_displaced_mesh = true
patch_size = 40
[ori]
type = FileMeshGenerator
file = 'test.msh'
[]
[]
[Variables]
[disp_x]
block = 'pellet_inner pellet_outer'
[]
[disp_y]
block = 'pellet_inner pellet_outer'
[]
[disp_z]
block = 'pellet_inner pellet_outer'
[]
[T_K]
[InitialCondition]
type = ConstantIC
value = 300.0
[]
[]
[lm_pellet]
block = 'pellet_secondary_subdomain'
[]
[]
[Kernels]
[solid_x]
type = ADStressDivergenceTensors
variable = disp_x
component = 0
block = 'pellet_inner pellet_outer'
use_displaced_mesh = false
[]
[solid_y]
type = ADStressDivergenceTensors
variable = disp_y
component = 1
block = 'pellet_inner pellet_outer'
use_displaced_mesh = false
[]
[solid_z]
type = ADStressDivergenceTensors
variable = disp_z
component = 2
block = 'pellet_inner pellet_outer'
use_displaced_mesh = false
[]
[timeder]
type = ADHeatConductionTimeDerivative
variable = 'T_K'
density_name = density
specific_heat = specific_heat
block = 'pellet_inner pellet_outer'
use_displaced_mesh = true
[]
[diff]
type = ADHeatConduction
variable = 'T_K'
thermal_conductivity = thermal_conductivity
block = 'pellet_inner pellet_outer'
use_displaced_mesh = true
[]
[heatsource]
type = ADMatHeatSource
variable = 'T_K'
material_property = radial_source
block = 'pellet_inner pellet_outer'
use_displaced_mesh = true
[]
[]
[Debug]
show_var_residual_norms = TRUE
[]
[BCs]
[mirror_z]
type = ADDirichletBC
variable = disp_z
boundary = 'mirror_innerp mirror_outerp'
value = 0
[]
[mirror_x]
type = ADDirichletBC
variable = disp_x
boundary = 'mirror_innerp mirror_outerp'
value = 0
[]
[mirror_y]
type = ADDirichletBC
variable = disp_y
boundary = 'mirror_innerp mirror_outerp'
value = 0
[]
[]
[Materials]
[pellet_properties]
type = ADGenericConstantMaterial
prop_names = 'density thermal_conductivity specific_heat'
prop_values = '3.3112e3 34 1.2217e3'
block = 'pellet_inner pellet_outer'
[]
[pulse_shape_linear]
type = ADGenericFunctionMaterial
prop_values = '5e10*max(11455*(t)/7,1e-9)'
prop_names = 'radial_source'
output_properties = 'radial_source'
block = 'pellet_inner pellet_outer'
use_displaced_mesh = false
[]
[strain]
type = ADComputeSmallStrain
displacements = 'disp_x disp_y disp_z'
eigenstrain_names = eigenstrain #nameS!
block = 'pellet_inner pellet_outer'
[]
[thermal_strain]
type = ADComputeThermalExpansionEigenstrain
stress_free_temperature = ${stress_free_temperature}
thermal_expansion_coeff = ${thermal_expansion_coeff}
eigenstrain_name = eigenstrain
block = 'pellet_inner pellet_outer'
[]
[elasticity]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 3.306e11
poissons_ratio = 0.329
[]
[stress]
type = ADComputeLinearElasticStress
block = 'pellet_inner pellet_outer'
[]
[]
[Contact]
[pellet]
primary = void_pellet_0
secondary = void_pellet_1
model = frictionless
formulation = mortar
c_normal = 1e6
correct_edge_dropping = true
[]
[]
[UserObjects]
[conduction]
type = GapFluxModelConduction
temperature = T_K
boundary = 'void_pellet_0 void_pellet_1'
gap_conductivity = 0.4
use_displaced_mesh = true
[]
[rad_pellet]
type = GapFluxModelRadiation
temperature = T_K
boundary = void_pellet_0
primary_emissivity = 0.37
secondary_emissivity = 0.37
use_displaced_mesh = true
[]
[]
[Constraints]
[gap_pellet]
type = ModularGapConductanceConstraint
variable = lm_pellet
secondary_variable = T_K
primary_boundary = 'void_pellet_0'
primary_subdomain = pellet_primary_subdomain
secondary_boundary = 'void_pellet_1'
secondary_subdomain = pellet_secondary_subdomain
gap_flux_models = 'conduction rad_pellet' #closed_pellet
gap_geometry_type = 'CYLINDER'
cylinder_axis_point_1 = '0 0 0'
cylinder_axis_point_2 = '0 0 1'
use_displaced_mesh = true
quadrature = SECOND
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package -pc_factor_shift_type'
petsc_options_value = 'lu superlu_dist NONZERO'
automatic_scaling = true
line_search = none
ignore_variables_for_autoscaling = 'pellet_normal_lm'
compute_scaling_once = true
scaling_group_variables = 'disp_x disp_y disp_z; T_K'
nl_rel_tol = 1e-50
nl_abs_tol = 1e-8
nl_max_its = 20
dtmin = 1e-3
dt = 1e-3
start_time = 0e-3
end_time = 1
[]
[Outputs]
[exodus]
type = Exodus
file_base = constMat
[]
print_linear_residuals = false
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/finite_action.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[temp]
order = ${order}
block = 'plank block'
scaling = 1e-1
[]
[]
[Modules/TensorMechanics/Master]
[action]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
strain = FINITE
[]
[]
[Kernels]
[hc]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = 'plank block'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e6
[]
[]
[MortarGapHeatTransfer]
[mortar_heat_transfer]
temperature = temp
use_displaced_mesh = true
gap_flux_options = conduction
gap_conductivity = 1
boundary = plank_right
primary_boundary = plank_right
primary_subdomain = frictionless_primary_subdomain
secondary_boundary = block_left
secondary_subdomain = frictionless_secondary_subdomain
thermal_lm_scaling = 1e-7
gap_geometry_type = PLATE
[]
[]
[BCs]
[left_temp]
type = ADDirichletBC
variable = temp
boundary = 'plank_left'
value = 400
[]
[right_temp]
type = ADDirichletBC
variable = temp
boundary = 'block_right'
value = 300
[]
[left_x]
type = ADDirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = ADDirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
preset = false
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
preset = false
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[]
[heat_plank]
type = ADHeatConductionMaterial
block = plank
thermal_conductivity = 2
specific_heat = 1
[]
[heat_block]
type = ADHeatConductionMaterial
block = block
thermal_conductivity = 1
specific_heat = 1
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -snes_max_it'
petsc_options_value = 'lu NONZERO 1e-15 20'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'none'
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[avg_temp]
type = ElementAverageValue
variable = temp
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact avg_temp'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d-rz/finite.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite'
[Mesh]
patch_size = 80
patch_update_strategy = auto
coord_type = RZ
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[secondary]
input = block_rename
type = LowerDBlockFromSidesetGenerator
sidesets = 'block_left'
new_block_id = '30'
new_block_name = 'frictionless_secondary_subdomain'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'plank_right'
new_block_id = '20'
new_block_name = 'frictionless_primary_subdomain'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[temp]
order = ${order}
block = 'plank block'
scaling = 1e-1
[]
[thermal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
scaling = 1e-7
[]
[frictionless_normal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
use_dual = true
[]
[]
[Modules/TensorMechanics/Master]
[action]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
strain = FINITE
[]
[]
[Kernels]
[hc]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = 'plank block'
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
lm_variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[thermal_contact]
type = GapConductanceConstraint
variable = thermal_lm
secondary_variable = temp
k = 1
use_displaced_mesh = true
primary_boundary = plank_right
primary_subdomain = frictionless_primary_subdomain
secondary_boundary = block_left
secondary_subdomain = frictionless_secondary_subdomain
displacements = 'disp_x disp_y'
[]
[]
[BCs]
[left_temp]
type = DirichletBC
variable = temp
boundary = 'plank_left'
value = 400
[]
[right_temp]
type = DirichletBC
variable = temp
boundary = 'block_right'
value = 300
[]
[left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
preset = false
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
preset = false
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[]
[heat_plank]
type = ADHeatConductionMaterial
block = plank
thermal_conductivity = 2
specific_heat = 1
[]
[heat_block]
type = ADHeatConductionMaterial
block = block
thermal_conductivity = 1
specific_heat = 1
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -snes_max_it'
petsc_options_value = 'lu NONZERO 1e-15 20'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'none'
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[avg_temp]
type = ElementAverageValue
variable = temp
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact avg_temp'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/heat_transfer/test/tests/ad_heat_conduction/test.i)
# This test solves a 1D transient heat equation with a complicated thermal
# conductivity in order to verify jacobian calculation via AD
[Mesh]
type = GeneratedMesh
dim = 2
nx = 5
ny = 5
xmax = 0.001
ymax = 0.001
[]
[Variables]
[./T]
initial_condition = 1.5
[../]
[./c]
initial_condition = 1.5
[../]
[]
[Kernels]
[./HeatDiff]
type = ADHeatConduction
variable = T
thermal_conductivity = thermal_conductivity
[../]
[./heat_dt]
type = ADHeatConductionTimeDerivative
variable = T
specific_heat = thermal_conductivity
density_name = thermal_conductivity
[../]
[./c]
type = ADDiffusion
variable = c
[../]
[]
[Kernels]
[./c_dt]
type = TimeDerivative
variable = c
[../]
[]
[BCs]
[./left_c]
type = DirichletBC
variable = c
boundary = left
value = 2
[../]
[./right_c]
type = DirichletBC
variable = c
boundary = right
value = 1
[../]
[./left_T]
type = DirichletBC
variable = T
boundary = top
value = 1
[../]
[./right_T]
type = DirichletBC
variable = T
boundary = bottom
value = 2
[../]
[]
[Materials]
[./k]
type = ADThermalConductivityTest
c = c
temperature = T
[../]
[]
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
num_steps = 1
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_mean_zero_pressure.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
elem_type = QUAD9
[]
[]
[AuxVariables]
[vel_x]
order = SECOND
[]
[vel_y]
order = SECOND
[]
[]
[AuxKernels]
[vel_x]
type = VectorVariableComponentAux
variable = vel_x
vector_variable = velocity
component = 'x'
[]
[vel_y]
type = VectorVariableComponentAux
variable = vel_y
vector_variable = velocity
component = 'y'
[]
[]
[Variables]
[./velocity]
order = SECOND
family = LAGRANGE_VEC
[../]
[./T]
order = SECOND
[./InitialCondition]
type = ConstantIC
value = 1.0
[../]
[../]
[./p]
[../]
[./lambda]
family = SCALAR
order = FIRST
[../]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[./momentum_time]
type = INSADMomentumTimeDerivative
variable = velocity
[../]
[./momentum_convection]
type = INSADMomentumAdvection
variable = velocity
[../]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
[../]
[./temperature_time]
type = INSADHeatConductionTimeDerivative
variable = T
[../]
[./temperature_advection]
type = INSADEnergyAdvection
variable = T
[../]
[./temperature_conduction]
type = ADHeatConduction
variable = T
thermal_conductivity = 'k'
[../]
[./mean_zero_pressure]
type = ScalarLagrangeMultiplier
variable = p
lambda = lambda
[../]
[]
[ScalarKernels]
[./mean_zero_pressure_lm]
type = AverageValueConstraint
variable = lambda
pp_name = pressure_integral
value = 0
[../]
[]
[BCs]
[./no_slip]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom right left'
[../]
[./lid]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'top'
function_x = 'lid_function'
[../]
[./T_hot]
type = DirichletBC
variable = T
boundary = 'bottom'
value = 1
[../]
[./T_cold]
type = DirichletBC
variable = T
boundary = 'top'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat]
type = INSAD3Eqn
velocity = velocity
pressure = p
temperature = T
[]
[]
[Postprocessors]
[./pressure_integral]
type = ElementIntegralVariablePostprocessor
variable = p
execute_on = linear
[../]
[]
[Functions]
[./lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Transient
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_levels -sub_pc_factor_shift_type'
petsc_options_value = 'asm 2 ilu 4 NONZERO'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
exodus = true
perf_graph = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/bc_gap_heat_transfer_displaced_conduction.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-gap.e
[]
allow_renumbering = false
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Variables]
[temp]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_x]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_y]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[]
[Materials]
[left]
type = ADHeatConductionMaterial
block = 1
thermal_conductivity = 0.01
specific_heat = 1
[]
[right]
type = ADHeatConductionMaterial
block = 2
thermal_conductivity = 0.005
specific_heat = 1
[]
[]
[Kernels]
[hc_displaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = '1'
[]
[hc_undisplaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = false
block = '2'
[]
[disp_x]
type = Diffusion
variable = disp_x
block = '1 2'
[]
[disp_y]
type = Diffusion
variable = disp_y
block = '1 2'
[]
[]
[ThermalContact]
[thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 100
secondary = 101
emissivity_primary = 0.0
emissivity_secondary = 0.0
gap_conductivity = 100.0
quadrature = true
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temp
boundary = 'left'
value = 100
[]
[right]
type = DirichletBC
variable = temp
boundary = 'right'
value = 0
[]
[left_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'left'
value = .1
[]
[right_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'right'
value = 0
[]
[bottom_disp_y]
type = DirichletBC
preset = false
variable = disp_y
boundary = 'bottom'
value = 0
[]
[]
[Preconditioning]
[fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-11
nl_abs_tol = 1.0e-10
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '100 101'
variable = 'temp'
[]
[]
[Outputs]
exodus = false
csv = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/modular_gap_heat_transfer_mortar_displaced_conduction.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-gap.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '101'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '100'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Variables]
[temp]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_x]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_y]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[Materials]
[left]
type = ADHeatConductionMaterial
block = 1
thermal_conductivity = 0.01
specific_heat = 1
[]
[right]
type = ADHeatConductionMaterial
block = 2
thermal_conductivity = 0.005
specific_heat = 1
[]
[]
[Kernels]
[hc_displaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = '1'
[]
[hc_undisplaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = false
block = '2'
[]
[disp_x]
type = Diffusion
variable = disp_x
block = '1 2'
[]
[disp_y]
type = Diffusion
variable = disp_y
block = '1 2'
[]
[]
[UserObjects]
[conduction]
type = GapFluxModelConduction
temperature = temp
boundary = 100
gap_conductivity = 10.0
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
use_displaced_mesh = true
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
gap_flux_models = conduction
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temp
boundary = 'left'
value = 100
[]
[right]
type = DirichletBC
variable = temp
boundary = 'right'
value = 0
[]
[left_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'left'
value = .1
[]
[right_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'right'
value = 0
[]
[bottom_disp_y]
type = DirichletBC
preset = false
variable = disp_y
boundary = 'bottom'
value = 0
[]
[]
[Preconditioning]
[fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-11
nl_abs_tol = 1.0e-10
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '100 101'
variable = 'temp'
[]
[]
[Outputs]
exodus = false
csv = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/closed_gap_prescribed_pressure.i)
## Units in the input file: m-Pa-s-K
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 10
xmax = 1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 10
xmin = 1
xmax = 2
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
[interface_secondary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'fixed_block_left'
new_block_id = 3
new_block_name = 'interface_secondary_subdomain'
input = block_rename
[]
[interface_primary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'moving_block_right'
new_block_id = 4
new_block_name = 'interface_primary_subdomain'
input = interface_secondary_subdomain
[]
[]
[Variables]
[temperature]
initial_condition = 525.0
[]
[temperature_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[AuxVariables]
[interface_normal_lm]
order = FIRST
family = LAGRANGE
block = 'interface_secondary_subdomain'
initial_condition = 100.0
[]
[]
[Kernels]
[HeatDiff_steel]
type = ADHeatConduction
variable = temperature
thermal_conductivity = steel_thermal_conductivity
block = 'left_block'
[]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
block = 'right_block'
[]
[]
[BCs]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 800
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 250
boundary = 'fixed_block_right'
[]
[]
[Constraints]
[thermal_contact]
type = ModularGapConductanceConstraint
variable = temperature_interface_lm
secondary_variable = temperature
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed'
[]
[]
[Materials]
[steel_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'steel_density steel_thermal_conductivity steel_hardness'
prop_values = '8e3 16.2 129' ## for stainless steel 304
block = 'left_block'
[]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_hardness'
prop_values = ' 2.7e3 210 15' #for 99% pure Al
block = 'right_block'
[]
[]
[UserObjects]
[closed]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_thermal_conductivity
secondary_conductivity = aluminum_thermal_conductivity
temperature = temperature
contact_pressure = interface_normal_lm
primary_hardness = steel_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[]
[Postprocessors]
[steel_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_primary_subdomain
[]
[aluminum_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_secondary_subdomain
[]
[interface_heat_flux_steel]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = moving_block_right
diffusivity = steel_thermal_conductivity
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
automatic_scaling = false
nl_rel_tol = 1e-14
nl_max_its = 20
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_offset_single_material_insulated.i)
## Units in the input file: m-Pa-s-K-V
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 100
xmax = 0.1
ymin = 0.1
ymax = 0.35
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 100
xmin = 0.1
xmax = 0.2
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
[interface_secondary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'fixed_block_left'
new_block_id = 3
new_block_name = 'interface_secondary_subdomain'
input = block_rename
[]
[interface_primary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'moving_block_right'
new_block_id = 4
new_block_name = 'interface_primary_subdomain'
input = interface_secondary_subdomain
[]
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
[]
[Variables]
[temperature]
initial_condition = 300.0
[]
[potential]
[]
[potential_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[AuxVariables]
[interface_normal_lm]
order = FIRST
family = LAGRANGE
block = 'interface_secondary_subdomain'
initial_condition = 1.0
[]
[]
[Kernels]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
extra_vector_tags = 'ref'
block = 'left_block right_block'
[]
[electric_aluminum]
type = ADMatDiffusion
variable = potential
diffusivity = aluminum_electrical_conductivity
extra_vector_tags = 'ref'
block = 'left_block right_block'
[]
[]
[BCs]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'fixed_block_right'
[]
[electric_left]
type = ADDirichletBC
variable = potential
value = 0.0
boundary = moving_block_left
[]
[electric_right]
type = ADDirichletBC
variable = potential
value = 3.0e-1
boundary = fixed_block_right
[]
[]
[Constraints]
[electrical_contact]
type = ModularGapConductanceConstraint
variable = potential_interface_lm
secondary_variable = potential
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_electric'
correct_edge_dropping = true
[]
[interface_heating]
type = ADInterfaceJouleHeatingConstraint
potential_lagrange_multiplier = potential_interface_lm
secondary_variable = temperature
primary_electrical_conductivity = aluminum_electrical_conductivity
secondary_electrical_conductivity = aluminum_electrical_conductivity
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
[]
[]
[Materials]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_electrical_conductivity aluminum_hardness'
prop_values = ' 2.7e3 210 900.0 3.7e7 1.0' #for 99% pure Al
block = 'left_block right_block interface_secondary_subdomain'
[]
[]
[UserObjects]
[closed_electric]
type = GapFluxModelPressureDependentConduction
primary_conductivity = aluminum_electrical_conductivity
secondary_conductivity = aluminum_electrical_conductivity
temperature = potential
contact_pressure = interface_normal_lm
primary_hardness = aluminum_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[]
[Postprocessors]
[interface_heat_flux_large_block]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[interface_heat_flux_small_block]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = moving_block_right
diffusivity = aluminum_thermal_conductivity
[]
[interface_electrical_flux_large_block]
type = ADSideDiffusiveFluxAverage
variable = potential
boundary = fixed_block_left
diffusivity = aluminum_electrical_conductivity
[]
[interface_electrical_flux_small_block]
type = ADSideDiffusiveFluxAverage
variable = potential
boundary = moving_block_right
diffusivity = aluminum_electrical_conductivity
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
nl_abs_tol = 2e-10
nl_rel_tol = 1e-6
nl_max_its = 50
nl_forced_its = 1
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_single_material_insulated.i)
## Units in the input file: m-Pa-s-K-V
# In this steady-state, symmetric simulation, the temperature at the interface between
# the two blocks of aluminum can be calculated through Fourier's law (see the documentation
# page for ADInterfaceJouleHeatingConstraint for the relevant formulas).
#
# With the prescribed 0.0 V (left) and 0.3V (right) potential boundary conditions, the
# electric potential drop is 9.25e6 [V * S / m^2]. From this current-density-like LM variable,
# the volumetric heat source at the interface is calculated as
# q = 1.15625e6 [W/m^3}
# Because of the 2D nature of this problem, the volumetric heat source is equal to
# the negative of the heat flux at the interface.
#
# Finally, the temperature at the interface is computed as a function of the block width,
# thermal conductivity, and specified temperature boundary condition (300K on both the
# left and right edges):
# T_{interface} = 850.5952K
# which matches the simulation result to the 6 decimal places shown.
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmax = 0.1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmin = 0.1
xmax = 0.2
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
[interface_secondary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'fixed_block_left'
new_block_id = 3
new_block_name = 'interface_secondary_subdomain'
input = block_rename
[]
[interface_primary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'moving_block_right'
new_block_id = 4
new_block_name = 'interface_primary_subdomain'
input = interface_secondary_subdomain
[]
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
[]
[Variables]
[temperature]
initial_condition = 300.0
[]
[potential]
[]
[potential_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[AuxVariables]
[interface_normal_lm]
order = FIRST
family = LAGRANGE
block = 'interface_secondary_subdomain'
initial_condition = 1.0
[]
[]
[Kernels]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
extra_vector_tags = 'ref'
block = 'left_block right_block'
[]
[electric_aluminum]
type = ADMatDiffusion
variable = potential
diffusivity = aluminum_electrical_conductivity
extra_vector_tags = 'ref'
block = 'left_block right_block'
[]
[]
[BCs]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'fixed_block_right'
[]
[electric_left]
type = ADDirichletBC
variable = potential
value = 0.0
boundary = moving_block_left
[]
[electric_right]
type = ADDirichletBC
variable = potential
value = 3.0e-1
boundary = fixed_block_right
[]
[]
[Constraints]
[electrical_contact]
type = ModularGapConductanceConstraint
variable = potential_interface_lm
secondary_variable = potential
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_electric'
[]
[interface_heating]
type = ADInterfaceJouleHeatingConstraint
potential_lagrange_multiplier = potential_interface_lm
secondary_variable = temperature
primary_electrical_conductivity = aluminum_electrical_conductivity
secondary_electrical_conductivity = aluminum_electrical_conductivity
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
[]
[]
[Materials]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_electrical_conductivity aluminum_hardness'
prop_values = ' 2.7e3 210 900.0 3.7e7 1.0' #for 99% pure Al
block = 'left_block right_block interface_secondary_subdomain'
[]
[]
[UserObjects]
[closed_electric]
type = GapFluxModelPressureDependentConduction
primary_conductivity = aluminum_electrical_conductivity
secondary_conductivity = aluminum_electrical_conductivity
temperature = potential
contact_pressure = interface_normal_lm
primary_hardness = aluminum_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[]
[Postprocessors]
[aluminum_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_secondary_subdomain
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[aluminum_interface_potential]
type = AverageNodalVariableValue
variable = potential
block = interface_secondary_subdomain
[]
[interface_electrical_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = potential
boundary = fixed_block_left
diffusivity = aluminum_electrical_conductivity
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
nl_abs_tol = 2e-10
nl_rel_tol = 1e-6
nl_max_its = 50
nl_forced_its = 1
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar_action/modular_gap_heat_transfer_mortar_displaced_conduction_UOs_function.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-gap.e
[]
allow_renumbering = false
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Variables]
[temp]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_x]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_y]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[]
[Functions]
[gc_function]
type = PiecewiseLinear
x = '-10000 10000'
y = '0.02 0.02'
[]
[]
[Materials]
[left]
type = ADHeatConductionMaterial
block = 1
thermal_conductivity = 0.01
specific_heat = 1
[]
[right]
type = ADHeatConductionMaterial
block = 2
thermal_conductivity = 0.005
specific_heat = 1
[]
[]
[Kernels]
[hc_displaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = '1'
[]
[hc_undisplaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = false
block = '2'
[]
[disp_x]
type = Diffusion
variable = disp_x
block = '1 2'
[]
[disp_y]
type = Diffusion
variable = disp_y
block = '1 2'
[]
[]
[MortarGapHeatTransfer]
[mortar_heat_transfer]
temperature = temp
boundary = 100
use_displaced_mesh = true
primary_boundary = 100
secondary_boundary = 101
user_created_gap_flux_models = 'radiation_uo conduction_uo'
[]
[]
[UserObjects]
[radiation_uo]
type = GapFluxModelRadiation
temperature = temp
boundary = 100
primary_emissivity = 1.0
secondary_emissivity = 1.0
use_displaced_mesh = true
[]
[conduction_uo]
type = GapFluxModelConduction
temperature = temp
boundary = 100
gap_conductivity_function = gc_function
gap_conductivity_function_variable = temp
gap_conductivity = 1.0
use_displaced_mesh = true
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temp
boundary = 'left'
value = 100
[]
[right]
type = DirichletBC
variable = temp
boundary = 'right'
value = 0
[]
[left_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'left'
value = .1
[]
[right_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'right'
value = 0
[]
[bottom_disp_y]
type = DirichletBC
preset = false
variable = disp_y
boundary = 'bottom'
value = 0
[]
[]
[Preconditioning]
[fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-11
nl_abs_tol = 1.0e-10
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '100 101'
variable = 'temp'
[]
[]
[Outputs]
csv = true
[exodus]
type = Exodus
show = 'temp'
[]
[]
(modules/solid_properties/test/tests/problems/heat_conduction/heat_conduction.i)
[Mesh]
type = GeneratedMesh
dim = 2
nx = 10
ny = 10
[]
[SolidProperties]
[sp]
type = ThermalSS316Properties
[]
[]
[Materials]
[thermal_mat]
type = ADThermalSolidPropertiesMaterial
temperature = T
sp = sp
density = rho
specific_heat = cp
thermal_conductivity = k
[]
[]
[Variables]
[T]
order = FIRST
family = LAGRANGE
[]
[]
[ICs]
[T_ic]
type = ConstantIC
variable = T
value = 300
[]
[]
[Kernels]
[time_derivative]
type = ADHeatConductionTimeDerivative
variable = T
density_name = rho
specific_heat = cp
[]
[heat_conduction]
type = ADHeatConduction
variable = T
thermal_conductivity = k
[]
[]
[BCs]
[left]
type = DirichletBC
variable = T
boundary = left
value = 500
[]
[]
[Executioner]
type = Transient
scheme = implicit-euler
dt = 100.0
num_steps = 5
abort_on_solve_fail = true
solve_type = NEWTON
nl_rel_tol = 1e-10
nl_abs_tol = 1e-10
nl_max_its = 10
l_tol = 1e-5
l_max_its = 10
[]
[Outputs]
exodus = true
[]
(modules/fsi/test/tests/2d-finite-strain-steady/thermal-me.i)
# Units: specific_heat_capacity--cp--J/(kg.K); density--rho--kg/(cm^3);
# dynamic_viscosity--mu--kg/(cm.s); thermal_conductivity--k--W/(cm.K);
# pressure--kg/(cm.s^2); force--kg.cm/s^2
outlet_pressure = 0
inlet_velocity = 150 # cm/s
ini_temp = 593 # K
heat_transfer_coefficient = 9 # W/(cm2.K)
g = -981 # cm/s2
alpha_fluid = 2e-4 # thermal expansion coefficient of fluid used in INSADBoussinesqBodyForce
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = '2layers_2d_midline.msh'
[]
[Variables]
[velocity]
family = LAGRANGE_VEC
order = FIRST
block = 'fluid'
[]
[p]
family = LAGRANGE
order = FIRST
block = 'fluid'
[]
[Tf]
family = LAGRANGE
order = FIRST
block = 'fluid'
[]
[Ts]
family = LAGRANGE
order = FIRST
block = 'solid'
[]
[disp_x]
family = LAGRANGE
order = FIRST
block = 'solid fluid'
[]
[disp_y]
family = LAGRANGE
order = FIRST
block = 'solid fluid'
[]
[]
[AuxVariables]
[heat_source]
family = MONOMIAL
order = FIRST
block = 'solid'
[]
[]
[ICs]
[initial_velocity]
type = VectorConstantIC
variable = velocity
x_value = 0
y_value = ${inlet_velocity}
z_value = 0
[]
[initial_p]
type = FunctionIC
variable = p
function = ini_p
[]
[initial_Tf]
type = ConstantIC
variable = Tf
value = ${ini_temp}
[]
[initial_Ts]
type = ConstantIC
variable = Ts
value = ${ini_temp}
[]
[]
[Kernels]
[fluid_mass]
type = INSADMass
variable = p
use_displaced_mesh = true
[]
[fluid_mass_pspg]
type = INSADMassPSPG
variable = p
use_displaced_mesh = true
[]
[fluid_momentum_time]
type = INSADMomentumTimeDerivative
variable = velocity
use_displaced_mesh = true
[]
[fluid_momentum_convection]
type = INSADMomentumAdvection
variable = velocity
use_displaced_mesh = true
[]
[fluid_momentum_viscous]
type = INSADMomentumViscous
variable = velocity
use_displaced_mesh = true
[]
[fluid_momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
use_displaced_mesh = true
[]
[fluid_momentum_gravity]
type = INSADGravityForce
variable = velocity
gravity = '0 ${g} 0'
use_displaced_mesh = true
[]
[fluid_momentum_buoyancy]
type = INSADBoussinesqBodyForce
variable = velocity
gravity = '0 ${g} 0'
alpha_name = 'alpha_fluid'
ref_temp = 'T_ref'
temperature = Tf
use_displaced_mesh = true
[]
[fluid_momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
use_displaced_mesh = true
[]
[fluid_temperature_time]
type = INSADHeatConductionTimeDerivative
variable = Tf
use_displaced_mesh = true
[]
[fluid_temperature_conduction]
type = ADHeatConduction
variable = Tf
thermal_conductivity = 'k'
use_displaced_mesh = true
[]
[fluid_temperature_advection]
type = INSADEnergyAdvection
variable = Tf
use_displaced_mesh = true
[]
[fluid_temperature_supg]
type = INSADEnergySUPG
variable = Tf
velocity = velocity
use_displaced_mesh = true
[]
[solid_temperature_time]
type = ADHeatConductionTimeDerivative
variable = Ts
density_name = 'rho'
specific_heat = 'cp'
block = 'solid'
use_displaced_mesh = true
[]
[solid_temperature_conduction]
type = ADHeatConduction
variable = Ts
thermal_conductivity = 'k'
block = 'solid'
use_displaced_mesh = true
[]
[heat_source]
type = ADCoupledForce
variable = Ts
v = heat_source
block = 'solid'
use_displaced_mesh = true
[]
[disp_x_smooth]
type = Diffusion
variable = disp_x
block = fluid
[]
[disp_y_smooth]
type = Diffusion
variable = disp_y
block = fluid
[]
[]
[Modules/TensorMechanics/Master]
strain = FINITE
material_output_order = FIRST
generate_output = 'vonmises_stress stress_xx stress_yy stress_zz strain_xx strain_yy strain_zz'
[solid]
block = 'solid'
temperature = Ts
automatic_eigenstrain_names = true
[]
[]
[InterfaceKernels]
[convection_heat_transfer]
type = ConjugateHeatTransfer
variable = Tf
T_fluid = Tf
neighbor_var = 'Ts'
boundary = 'solid_wall'
htc = 'htc'
use_displaced_mesh = true
[]
[]
[AuxKernels]
[heat_source_distribution_auxk]
type = FunctionAux
variable = heat_source
function = heat_source_distribution_function
block = 'solid'
use_displaced_mesh = true
execute_on = 'INITIAL TIMESTEP_BEGIN'
[]
[]
[BCs]
[no_slip]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'solid_wall'
use_displaced_mesh = true
[]
[inlet_velocity]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'fluid_bottom'
function_y = ${inlet_velocity}
use_displaced_mesh = true
[]
[symmetry]
type = ADVectorFunctionDirichletBC
variable = velocity
boundary = 'fluid_wall'
function_x = 0
set_x_comp = true
set_y_comp = false
set_z_comp = false
use_displaced_mesh = true
[]
[outlet_p]
type = DirichletBC
variable = p
boundary = 'fluid_top'
value = ${outlet_pressure}
use_displaced_mesh = true
[]
[inlet_T]
type = DirichletBC
variable = Tf
boundary = 'fluid_bottom'
value = ${ini_temp}
use_displaced_mesh = true
[]
[pin1_y]
type = DirichletBC
variable = disp_y
boundary = 'pin1'
value = 0
use_displaced_mesh = true
[]
[pin1_x]
type = DirichletBC
variable = disp_x
boundary = 'pin1'
value = 0
use_displaced_mesh = true
[]
[top_and_bottom_y]
type = DirichletBC
variable = disp_y
boundary = 'solid_bottom solid_top fluid_top fluid_bottom'
value = 0
use_displaced_mesh = true
[]
[left_and_right_x]
type = DirichletBC
variable = disp_x
boundary = 'fluid_wall fluid_bottom'
value = 0
use_displaced_mesh = true
[]
[]
[Materials]
[rho_solid]
type = ADParsedMaterial
property_name = rho
expression = '0.0110876 * pow(9.9672e-1 + 1.179e-5 * Ts - 2.429e-9 * pow(Ts,2) + 1.219e-12 * pow(Ts,3),-3)'
coupled_variables = 'Ts'
block = 'solid'
use_displaced_mesh = true
[]
[cp_solid]
type = ADParsedMaterial
property_name = cp
expression = '0.76 * ((302.27 * pow((548.68 / Ts),2) * exp(548.68 / Ts)) / pow((exp(548.68 / Ts) - 1),2) + 2 * 8.463e-3 * Ts + 8.741e7 * 18531.7 * exp(-18531.7 / Ts) / pow(Ts,2)) + 0.24 * ((322.49 * pow((587.41/Ts),2) * exp(587.41 / Ts)) / pow((exp(587.41 / Ts) - 1),2) + 2 * 1.4679e-2 * Ts)'
coupled_variables = 'Ts'
block = 'solid'
use_displaced_mesh = true
[]
[k_solid]
type = ADParsedMaterial
property_name = k
expression = '1.158/(7.5408 + 17.692 * (Ts / 1000) + 3.6142 * pow((Ts/1000),2)) + 74.105 * pow((Ts / 1000),-2.5) * exp(-16.35 / (Ts / 1000))'
coupled_variables = 'Ts'
block = 'solid'
use_displaced_mesh = true
[]
[rho_fluid]
type = ADParsedMaterial
property_name = rho
expression = '(11096 - 1.3236 * Tf) * 1e-6'
coupled_variables = 'Tf'
block = 'fluid'
use_displaced_mesh = true
[]
[cp_fluid]
type = ADParsedMaterial
property_name = cp
expression = '159 - 2.72e-2 * Tf + 7.12e-6 * pow(Tf,2)'
coupled_variables = 'Tf'
block = 'fluid'
use_displaced_mesh = true
[]
[k_fluid]
type = ADParsedMaterial
property_name = k
expression = '(3.61 + 1.517e-2 * Tf - 1.741e-6 * pow(Tf,2)) * 1e-2'
coupled_variables = 'Tf'
block = 'fluid'
use_displaced_mesh = true
[]
[mu_fluid]
type = ADParsedMaterial
property_name = mu
expression = '4.94e-6 * exp(754.1/Tf)'
coupled_variables = 'Tf'
block = 'fluid'
use_displaced_mesh = true
[]
[buoyancy_thermal_expansion_coefficient_fluid]
type = ADGenericConstantMaterial
prop_names = 'alpha_fluid'
prop_values = '${alpha_fluid}'
block = 'fluid'
use_displaced_mesh = true
[]
[buoyancy_reference_temperature_fluid]
type = GenericConstantMaterial
prop_names = 'T_ref'
prop_values = '${ini_temp}'
block = 'fluid'
use_displaced_mesh = true
[]
[ins_mat_fluid]
type = INSADStabilized3Eqn
velocity = velocity
pressure = p
temperature = Tf
block = 'fluid'
use_displaced_mesh = true
[]
[htc]
type = ADGenericFunctionMaterial
prop_names = htc
prop_values = htc_function
use_displaced_mesh = true
[]
[elasticity_solid]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2e7
poissons_ratio = 0.32
block = 'solid'
use_displaced_mesh = true
[]
[thermal_expansion_solid]
type = ComputeThermalExpansionEigenstrain
temperature = Ts
thermal_expansion_coeff = 2e-4
stress_free_temperature = 593
eigenstrain_name = thermal_expansion
block = 'solid'
use_displaced_mesh = true
[]
[stress_solid]
type = ComputeFiniteStrainElasticStress
block = 'solid'
[]
[]
[Functions]
[htc_function]
type = ParsedFunction
expression = ${heat_transfer_coefficient}
[]
[ini_p]
type = ParsedFunction
expression = '0.010302 * 981 * (10 - y)'
[]
[heat_source_distribution_function]
type = ParsedFunction
expression = '300 * sin(pi * y / 10)'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
solve_type = 'PJFNK'
[]
[]
[Executioner]
type = Transient
end_time = 1e4
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
nl_max_its = 30
l_max_its = 100
automatic_scaling = true
compute_scaling_once = true
off_diagonals_in_auto_scaling = true
dtmin = 1
nl_abs_tol = 1e-12
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 6
growth_factor = 1.5
dt = 1
[]
[]
[Outputs]
[csv]
type = CSV
file_base = 'thermal-me'
execute_on = 'final'
[]
[]
[Postprocessors]
[average_solid_Ts]
type = ElementAverageValue
variable = Ts
block = 'solid'
use_displaced_mesh = true
[]
[average_fluid_Tf]
type = ElementAverageValue
variable = Tf
block = 'fluid'
use_displaced_mesh = true
[]
[max_solid_Ts]
type = ElementExtremeValue
variable = Ts
value_type = max
block = 'solid'
use_displaced_mesh = true
[]
[max_fluid_Tf]
type = ElementExtremeValue
variable = Tf
value_type = max
block = 'fluid'
use_displaced_mesh = true
[]
[min_solid_Ts]
type = ElementExtremeValue
variable = Ts
value_type = min
block = 'solid'
use_displaced_mesh = true
[]
[min_fluid_Tf]
type = ElementExtremeValue
variable = Tf
value_type = min
block = 'fluid'
use_displaced_mesh = true
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/modular_gap_heat_transfer_mortar_displaced_radiation.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-gap.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '101'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '100'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Variables]
[temp]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_x]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_y]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[Materials]
[left]
type = ADHeatConductionMaterial
block = 1
thermal_conductivity = 0.01
specific_heat = 1
[]
[right]
type = ADHeatConductionMaterial
block = 2
thermal_conductivity = 0.005
specific_heat = 1
[]
[]
[Kernels]
[hc_displaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = '1'
[]
[hc_undisplaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = false
block = '2'
[]
[disp_x]
type = Diffusion
variable = disp_x
block = '1 2'
[]
[disp_y]
type = Diffusion
variable = disp_y
block = '1 2'
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = temp
boundary = 100
primary_emissivity = 1.0
secondary_emissivity = 1.0
use_displaced_mesh = true
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
use_displaced_mesh = true
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
gap_flux_models = radiation
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temp
boundary = 'left'
value = 100
[]
[right]
type = DirichletBC
variable = temp
boundary = 'right'
value = 0
[]
[left_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'left'
value = .1
[]
[right_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'right'
value = 0
[]
[bottom_disp_y]
type = DirichletBC
preset = false
variable = disp_y
boundary = 'bottom'
value = 0
[]
[]
[Preconditioning]
[fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-11
nl_abs_tol = 1.0e-10
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '100 101'
variable = 'temp'
[]
[]
[Outputs]
exodus = false
csv = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_stabilized_with_temp.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./velocity]
family = LAGRANGE_VEC
[../]
[./p]
[../]
[temperature][]
[]
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
variable = velocity
[]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[./mass_pspg]
type = INSADMassPSPG
variable = p
[../]
[./momentum_convection]
type = INSADMomentumAdvection
variable = velocity
[../]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
[../]
[./momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[../]
[./temperature_advection]
type = INSADEnergyAdvection
variable = temperature
[../]
[./temperature_conduction]
type = ADHeatConduction
variable = temperature
thermal_conductivity = 'k'
[../]
[temperature_supg]
type = INSADEnergySUPG
variable = temperature
velocity = velocity
[]
[]
[BCs]
[./no_slip]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom right left'
[../]
[./lid]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'top'
function_x = 'lid_function'
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[./temperature_hot]
type = DirichletBC
variable = temperature
boundary = 'bottom'
value = 1
[../]
[./temperature_cold]
type = DirichletBC
variable = temperature
boundary = 'top'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat]
type = INSADStabilized3Eqn
velocity = velocity
pressure = p
temperature = temperature
[]
[]
[Functions]
[./lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_factor_levels -ksp_gmres_restart'
petsc_options_value = 'asm 6 200'
line_search = 'none'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
exodus = true
[]
(tutorials/darcy_thermo_mech/step06_coupled_darcy_heat_conduction/problems/step6c_decoupled.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 200
ny = 10
xmax = 0.304 # Length of test chamber
ymax = 0.0257 # Test chamber radius
[]
coord_type = RZ
rz_coord_axis = X
[]
[Variables]
[temperature]
initial_condition = 300 # Start at room temperature
[]
[]
[AuxVariables]
[pressure]
[]
[]
[AuxKernels]
[pressure]
type = FunctionAux
variable = pressure
function = '4000 - 3000 * x - 3000 * t*x*x*y'
execute_on = timestep_end
[]
[]
[Kernels]
[heat_conduction]
type = ADHeatConduction
variable = temperature
[]
[heat_conduction_time_derivative]
type = ADHeatConductionTimeDerivative
variable = temperature
[]
[heat_convection]
type = DarcyAdvection
variable = temperature
pressure = pressure
[]
[]
[BCs]
[inlet_temperature]
type = DirichletBC
variable = temperature
boundary = left
value = 350
[]
[outlet_temperature]
type = HeatConductionOutflow
variable = temperature
boundary = right
[]
[]
[Materials]
[column]
type = PackedColumn
radius = 1
temperature = 293.15 # 20C
[]
[]
[Problem]
type = FEProblem
[]
[Executioner]
type = Transient
num_steps = 300
dt = 0.1
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/small-2d/open_gap_pressure_dependent.i)
## Units in the input file: m-Pa-s-K
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 10
xmax = 1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 10
xmin = 1.0001
xmax = 2.0001
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
[]
[Variables]
[disp_x]
block = 'left_block right_block'
[]
[disp_y]
block = 'left_block right_block'
[]
[temperature]
initial_condition = 525.0
[]
[temperature_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[Modules]
[TensorMechanics/Master]
[steel]
strain = SMALL
add_variables = false
use_automatic_differentiation = true
additional_generate_output = 'vonmises_stress'
additional_material_output_family = 'MONOMIAL'
additional_material_output_order = 'FIRST'
block = 'left_block'
[]
[aluminum]
strain = SMALL
add_variables = false
use_automatic_differentiation = true
additional_generate_output = 'vonmises_stress'
additional_material_output_family = 'MONOMIAL'
additional_material_output_order = 'FIRST'
block = 'right_block'
[]
[]
[]
[Kernels]
[HeatDiff_steel]
type = ADHeatConduction
variable = temperature
thermal_conductivity = steel_thermal_conductivity
block = 'left_block'
[]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
block = 'right_block'
[]
[]
[BCs]
[fixed_bottom_edge]
type = ADDirichletBC
variable = disp_y
value = 0
boundary = 'moving_block_bottom fixed_block_bottom'
[]
[fixed_outer_edge]
type = ADDirichletBC
variable = disp_x
value = 0
boundary = 'fixed_block_right'
[]
[pressure_left_block]
type = ADPressure
variable = disp_x
boundary = 'moving_block_left'
component = 0
function = 1*t
[]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 800
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 250
boundary = 'fixed_block_right'
[]
[]
[Contact]
[interface]
primary = moving_block_right
secondary = fixed_block_left
model = frictionless
formulation = mortar
correct_edge_dropping = true
[]
[]
[Constraints]
[thermal_contact]
type = ModularGapConductanceConstraint
variable = temperature_interface_lm
secondary_variable = temperature
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed'
use_displaced_mesh = true
[]
[]
[Materials]
[steel_elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1.93e11 #in Pa, 193 GPa, stainless steel 304
poissons_ratio = 0.29
block = 'left_block'
[]
[steel_stress]
type = ADComputeLinearElasticStress
block = 'left_block'
[]
[steel_density]
type = ADGenericConstantMaterial
prop_names = 'steel_density'
prop_values = 8e3 #in kg/m^3, stainless steel 304
block = 'left_block'
[]
[steel_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'steel_thermal_conductivity steel_heat_capacity steel_emissivity'
prop_values = '16.2 0.5 0.6' ## for stainless steel 304
block = 'left_block'
[]
[aluminum_elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 6.8e10 #in Pa, 68 GPa, aluminum
poissons_ratio = 0.36
block = 'right_block'
[]
[aluminum_stress]
type = ADComputeLinearElasticStress
block = 'right_block'
[]
[aluminum_density]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density'
prop_values = 2.7e3 #in kg/m^3, stainless steel 304
block = 'right_block'
[]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_thermal_conductivity aluminum_heat_capacity aluminum_emissivity'
prop_values = '210 0.9 0.25'
block = 'right_block'
[]
[]
[UserObjects]
[closed]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_thermal_conductivity
secondary_conductivity = aluminum_thermal_conductivity
temperature = temperature
primary_hardness = 1.0
secondary_hardness = 1.0
boundary = moving_block_right
contact_pressure = interface_normal_lm
[]
[]
[Postprocessors]
[steel_pt_interface_temperature]
type = NodalVariableValue
nodeid = 245
variable = temperature
[]
[aluminum_pt_interface_temperature]
type = NodalVariableValue
nodeid = 657
variable = temperature
[]
[interface_heat_flux_steel]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = moving_block_right
diffusivity = steel_thermal_conductivity
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[steel_element_interface_stress]
type = ElementalVariableValue
variable = vonmises_stress
elementid = 199
[]
[aluminum_element_interface_stress]
type = ElementalVariableValue
variable = vonmises_stress
elementid = 560
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
[]
[Outputs]
csv = true
perf_graph = true
[]
(tutorials/darcy_thermo_mech/step05_heat_conduction/problems/step5b_transient.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmax = 0.304 # Length of test chamber
ymax = 0.0257 # Test chamber radius
[]
coord_type = RZ
rz_coord_axis = X
[]
[Variables]
[temperature]
initial_condition = 300 # Start at room temperature
[]
[]
[Kernels]
[heat_conduction]
type = ADHeatConduction
variable = temperature
[]
[heat_conduction_time_derivative]
type = ADHeatConductionTimeDerivative
variable = temperature
[]
[]
[BCs]
[inlet_temperature]
type = DirichletBC
variable = temperature
boundary = left
value = 350 # (K)
[]
[outlet_temperature]
type = DirichletBC
variable = temperature
boundary = right
value = 300 # (K)
[]
[]
[Materials]
[steel]
type = ADGenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '18 0.466 8000' # W/m*K, J/kg-K, kg/m^3 @ 296K
[]
[]
[Problem]
type = FEProblem
[]
[Executioner]
type = Transient
num_steps = 10
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/boussinesq/boussinesq_square_constant_names.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmax = .05
ymax = .05
nx = 20
ny = 20
elem_type = QUAD9
[]
[bottom_left]
type = ExtraNodesetGenerator
new_boundary = corner
coord = '0 0'
input = gen
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
nl_rel_tol = 1e-12
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[out]
type = Exodus
execute_on = 'final'
[]
[]
[Variables]
[velocity]
family = LAGRANGE_VEC
order = SECOND
[]
[p][]
[temp]
order = SECOND
initial_condition = 340
scaling = 1e-4
[]
[]
[BCs]
[velocity_dirichlet]
type = VectorDirichletBC
boundary = 'left right bottom top'
variable = velocity
# The third entry is to satisfy RealVectorValue
values = '0 0 0'
[]
# Even though we are integrating by parts, because there are no integrated
# boundary conditions on the velocity p doesn't appear in the system of
# equations. Thus we must pin the pressure somewhere in order to ensure a
# unique solution
[p_zero]
type = DirichletBC
boundary = corner
variable = p
value = 0
[]
[cold]
type = DirichletBC
variable = temp
boundary = left
value = 300
[]
[hot]
type = DirichletBC
variable = temp
boundary = right
value = 400
[]
[]
[Kernels]
[mass]
type = INSADMass
variable = p
[]
[momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[]
[momentum_advection]
type = INSADMomentumAdvection
variable = velocity
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
[]
[temp_advection]
type = INSADEnergyAdvection
variable = temp
[]
[temp_conduction]
type = ADHeatConduction
variable = temp
thermal_conductivity = 'k'
[]
[buoyancy]
type = INSADBoussinesqBodyForce
variable = velocity
temperature = temp
gravity = '0 -9.81 0'
ref_temp = 900
alpha_name = 2.9e-3
[]
[gravity]
type = INSADGravityForce
variable = velocity
gravity = '0 -9.81 0'
[]
[]
[Materials]
[ad_const]
type = ADGenericConstantMaterial
prop_names = 'mu rho k cp'
prop_values = '30.74e-6 .5757 46.38e-3 1054'
[]
[ins_mat]
type = INSAD3Eqn
velocity = velocity
pressure = p
temperature = temp
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/block-restriction/one-mat-two-eqn-sets.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 2
ymin = 0
ymax = 1
nx = 16
ny = 8
elem_type = QUAD9
[]
[./corner_node_0]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node_0'
coord = '0 0 0'
input = gen
[../]
[./corner_node_1]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node_1'
coord = '1 0 0'
input = corner_node_0
[../]
[./subdomain1]
input = corner_node_1
type = SubdomainBoundingBoxGenerator
bottom_left = '1 0 0'
top_right = '2 1 0'
block_id = 1
[../]
[./break_boundary]
input = subdomain1
type = BreakBoundaryOnSubdomainGenerator
[../]
[./interface0]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
primary_block = '0'
paired_block = '1'
new_boundary = 'interface0'
[../]
[./interface1]
type = SideSetsBetweenSubdomainsGenerator
input = interface0
primary_block = '1'
paired_block = '0'
new_boundary = 'interface1'
[../]
[]
[Variables]
[velocity0]
order = SECOND
family = LAGRANGE_VEC
[]
[T0]
order = SECOND
[InitialCondition]
type = ConstantIC
value = 1.0
[]
[]
[p0]
[]
[]
[Kernels]
[./mass0]
type = INSADMass
variable = p0
block = 0
[../]
[./momentum_time0]
type = INSADMomentumTimeDerivative
variable = velocity0
block = 0
[../]
[./momentum_convection0]
type = INSADMomentumAdvection
variable = velocity0
block = 0
[../]
[./momentum_viscous0]
type = INSADMomentumViscous
variable = velocity0
block = 0
[../]
[./momentum_pressure0]
type = INSADMomentumPressure
variable = velocity0
pressure = p0
integrate_p_by_parts = true
block = 0
[../]
[./temperature_time0]
type = INSADHeatConductionTimeDerivative
variable = T0
block = 0
[../]
[./temperature_advection0]
type = INSADEnergyAdvection
variable = T0
block = 0
[../]
[./temperature_conduction0]
type = ADHeatConduction
variable = T0
thermal_conductivity = 'k'
block = 0
[../]
[./mass1]
type = INSADMass
variable = p0
block = 1
[../]
[./momentum_time1]
type = INSADMomentumTimeDerivative
variable = velocity0
block = 1
[../]
[./momentum_convection1]
type = INSADMomentumAdvection
variable = velocity0
block = 1
[../]
[./momentum_viscous1]
type = INSADMomentumViscous
variable = velocity0
block = 1
[../]
[./momentum_pressure1]
type = INSADMomentumPressure
variable = velocity0
pressure = p0
integrate_p_by_parts = true
block = 1
[../]
[./temperature_time1]
type = INSADHeatConductionTimeDerivative
variable = T0
block = 1
[../]
[./temperature_advection1]
type = INSADEnergyAdvection
variable = T0
block = 1
[../]
[./temperature_conduction1]
type = ADHeatConduction
variable = T0
thermal_conductivity = 'k'
block = 1
[../]
[]
[BCs]
[./no_slip0]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'bottom_to_0 interface0 left'
[../]
[./lid0]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'top_to_0'
function_x = 'lid_function0'
[../]
[./T_hot0]
type = DirichletBC
variable = T0
boundary = 'bottom_to_0'
value = 1
[../]
[./T_cold0]
type = DirichletBC
variable = T0
boundary = 'top_to_0'
value = 0
[../]
[./pressure_pin0]
type = DirichletBC
variable = p0
boundary = 'pinned_node_0'
value = 0
[../]
[./no_slip1]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'bottom_to_1 interface1 right'
[../]
[./lid1]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'top_to_1'
function_x = 'lid_function1'
[../]
[./T_hot1]
type = DirichletBC
variable = T0
boundary = 'bottom_to_1'
value = 1
[../]
[./T_cold1]
type = DirichletBC
variable = T0
boundary = 'top_to_1'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat0]
type = INSAD3Eqn
velocity = velocity0
pressure = p0
temperature = T0
block = '0 1'
[]
[]
[Functions]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
[./lid_function0]
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[./lid_function1]
type = ParsedFunction
expression = '4*(x-1)*(2-x)'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Transient
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_levels -sub_pc_factor_shift_type'
petsc_options_value = 'asm 2 ilu 4 NONZERO'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/interface_heating_mortar/constraint_joule_heating_dual_material_insulated.i)
## Units in the input file: m-Pa-s-K-V
# Using the steady-state Fourier's law, the temperature at the interface in each block,
# in the case where thermal contact between the two blocks at the interface is not
# considered, (steel block on left, aluminum on right) is calculated as:
#
# T_{interface - steel} = 816.849K
# T_{interface - aluminum} = 339.871K
# which matches the simulation results to the 6 decimal places shown.
# As expected, the heat flux resulting from the volumetric Joule heating source is
# equivalent on both sides of the interface.
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmax = 0.1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmin = 0.1
xmax = 0.2
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
[interface_secondary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'fixed_block_left'
new_block_id = 3
new_block_name = 'interface_secondary_subdomain'
input = block_rename
[]
[interface_primary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'moving_block_right'
new_block_id = 4
new_block_name = 'interface_primary_subdomain'
input = interface_secondary_subdomain
[]
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
[]
[Variables]
[temperature]
initial_condition = 300.0
[]
[potential]
[]
[potential_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[AuxVariables]
[interface_normal_lm]
order = FIRST
family = LAGRANGE
block = 'interface_secondary_subdomain'
initial_condition = 1.0
[]
[]
[Kernels]
[HeatDiff_steel]
type = ADHeatConduction
variable = temperature
thermal_conductivity = steel_thermal_conductivity
extra_vector_tags = 'ref'
block = 'left_block'
[]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
extra_vector_tags = 'ref'
block = 'right_block'
[]
[electric_steel]
type = ADMatDiffusion
variable = potential
diffusivity = steel_electrical_conductivity
extra_vector_tags = 'ref'
block = 'left_block'
[]
[electric_aluminum]
type = ADMatDiffusion
variable = potential
diffusivity = aluminum_electrical_conductivity
extra_vector_tags = 'ref'
block = 'right_block'
[]
[]
[BCs]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'fixed_block_right'
[]
[electric_left]
type = ADDirichletBC
variable = potential
value = 0.0
boundary = moving_block_left
[]
[electric_right]
type = ADDirichletBC
variable = potential
value = 3.0e-1
boundary = fixed_block_right
[]
[]
[Constraints]
[electrical_contact]
type = ModularGapConductanceConstraint
variable = potential_interface_lm
secondary_variable = potential
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_electric'
[]
[interface_heating]
type = ADInterfaceJouleHeatingConstraint
potential_lagrange_multiplier = potential_interface_lm
secondary_variable = temperature
primary_electrical_conductivity = steel_electrical_conductivity
secondary_electrical_conductivity = aluminum_electrical_conductivity
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
[]
[]
[Materials]
[steel_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'steel_density steel_thermal_conductivity steel_heat_capacity steel_electrical_conductivity steel_hardness'
prop_values = '8e3 16.2 500.0 1.39e6 1.0' ## for stainless steel 304
block = 'left_block interface_secondary_subdomain'
[]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_electrical_conductivity aluminum_hardness'
prop_values = ' 2.7e3 210 900.0 3.7e7 1.0' #for 99% pure Al
block = 'left_block right_block interface_secondary_subdomain'
[]
[]
[UserObjects]
[closed_electric]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_electrical_conductivity
secondary_conductivity = aluminum_electrical_conductivity
temperature = potential
contact_pressure = interface_normal_lm
primary_hardness = steel_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[]
[Postprocessors]
[steel_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_primary_subdomain
[]
[aluminum_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_secondary_subdomain
[]
[interface_heat_flux_steel]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = moving_block_right
diffusivity = steel_thermal_conductivity
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[interface_electrical_flux]
type = ADSideDiffusiveFluxAverage
variable = potential
boundary = fixed_block_left
diffusivity = aluminum_electrical_conductivity
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
nl_abs_tol = 1e-10
nl_rel_tol = 1e-6
nl_max_its = 100
nl_forced_its = 1
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/heat_transfer/test/tests/function_ellipsoid_heat_source/function_heat_source.i)
[Mesh]
type = GeneratedMesh
dim = 3
xmin = -5.0
xmax = 5.0
nx = 10
ymin = -5.0
ymax = 5.0
ny = 10
zmin = 0.0
zmax = 1.0
nz = 1
[]
[Variables]
[./temp]
initial_condition = 300
[../]
[]
[Kernels]
[./time]
type = ADHeatConductionTimeDerivative
variable = temp
[../]
[./heat_conduct]
type = ADHeatConduction
variable = temp
thermal_conductivity = thermal_conductivity
[../]
[./heat_source]
type = ADMatHeatSource
material_property = volumetric_heat
variable = temp
[../]
[]
[BCs]
[./temp_bottom_fix]
type = ADDirichletBC
variable = temp
boundary = 1
value = 300
[../]
[]
[Materials]
[./heat]
type = ADHeatConductionMaterial
specific_heat = 603
thermal_conductivity = 10e-2
[../]
[./density]
type = ADGenericConstantMaterial
prop_names = 'density'
prop_values = '4.43e-6'
[../]
[./volumetric_heat]
type = FunctionPathEllipsoidHeatSource
rx = 1
ry = 1
rz = 1
power = 1000
efficiency = 0.5
factor = 2
function_x= path_x
function_y= path_y
function_z= path_z
[../]
[]
[Functions]
[./path_x]
type = ParsedFunction
expression = 2*cos(2.0*pi*t)
[../]
[./path_y]
type = ParsedFunction
expression = 2*sin(2.0*pi*t)
[../]
[./path_z]
type = ParsedFunction
expression = 1.0
[../]
[]
[Postprocessors]
[temp_max]
type = ElementExtremeValue
variable = temp
[]
[temp_min]
type = ElementExtremeValue
variable = temp
value_type = min
[]
[temp_avg]
type = ElementAverageValue
variable = temp
[]
[]
[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]
[Executioner]
type = Transient
solve_type = PJFNK
nl_rel_tol = 1e-6
nl_abs_tol = 1e-6
petsc_options_iname = '-ksp_type -pc_type -pc_factor_mat_solver_package'
petsc_options_value = 'preonly lu superlu_dist'
l_max_its = 100
end_time = 1
dt = 0.1
dtmin = 1e-4
[]
[Outputs]
csv = true
[]
(modules/heat_transfer/test/tests/interface_heating_mortar/transient_joule_heating_constraint.i)
## Units in the input file: m-Pa-s-K-V
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmax = 0.1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmin = 0.1
xmax = 0.2
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
[interface_secondary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'fixed_block_left'
new_block_id = 3
new_block_name = 'interface_secondary_subdomain'
input = block_rename
[]
[interface_primary_subdomain]
type = LowerDBlockFromSidesetGenerator
sidesets = 'moving_block_right'
new_block_id = 4
new_block_name = 'interface_primary_subdomain'
input = interface_secondary_subdomain
[]
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
[]
[Variables]
[temperature]
initial_condition = 300.0
[]
[temperature_interface_lm]
block = 'interface_secondary_subdomain'
[]
[potential]
[]
[potential_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[AuxVariables]
[interface_normal_lm]
order = FIRST
family = LAGRANGE
block = 'interface_secondary_subdomain'
initial_condition = 1.0
[]
[]
[Kernels]
[HeatDiff_steel]
type = ADHeatConduction
variable = temperature
thermal_conductivity = steel_thermal_conductivity
extra_vector_tags = 'ref'
block = 'left_block'
[]
[HeatTdot_steel]
type = ADHeatConductionTimeDerivative
variable = temperature
specific_heat = steel_heat_capacity #use parsed material property
density_name = steel_density
extra_vector_tags = 'ref'
block = 'left_block'
[]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
extra_vector_tags = 'ref'
block = 'right_block'
[]
[HeatTdot_aluminum]
type = ADHeatConductionTimeDerivative
variable = temperature
specific_heat = aluminum_heat_capacity #use parsed material property
density_name = aluminum_density
extra_vector_tags = 'ref'
block = 'right_block'
[]
[electric_steel]
type = ADMatDiffusion
variable = potential
diffusivity = steel_electrical_conductivity
extra_vector_tags = 'ref'
block = 'left_block'
[]
[electric_aluminum]
type = ADMatDiffusion
variable = potential
diffusivity = aluminum_electrical_conductivity
extra_vector_tags = 'ref'
block = 'right_block'
[]
[]
[BCs]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'fixed_block_right'
[]
[electric_left]
type = ADDirichletBC
variable = potential
value = 0.0
boundary = moving_block_left
[]
[electric_right]
type = ADDirichletBC
variable = potential
value = 3.0e-1
boundary = fixed_block_right
[]
[]
[Constraints]
[thermal_contact]
type = ModularGapConductanceConstraint
variable = temperature_interface_lm
secondary_variable = temperature
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_temperature'
[]
[electrical_contact]
type = ModularGapConductanceConstraint
variable = potential_interface_lm
secondary_variable = potential
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed_electric'
[]
[interface_heating]
type = ADInterfaceJouleHeatingConstraint
potential_lagrange_multiplier = potential_interface_lm
secondary_variable = temperature
primary_electrical_conductivity = steel_electrical_conductivity
secondary_electrical_conductivity = aluminum_electrical_conductivity
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
[]
[]
[Materials]
[steel_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'steel_density steel_thermal_conductivity steel_heat_capacity steel_electrical_conductivity steel_hardness'
prop_values = '8e3 16.2 500.0 1.39e6 1.0' ## for stainless steel 304
block = 'left_block interface_secondary_subdomain'
[]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_electrical_conductivity aluminum_hardness'
prop_values = ' 2.7e3 210 900.0 3.7e7 1.0' #for 99% pure Al
block = 'left_block right_block interface_secondary_subdomain'
[]
[]
[UserObjects]
[closed_temperature]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_thermal_conductivity
secondary_conductivity = aluminum_thermal_conductivity
temperature = temperature
contact_pressure = interface_normal_lm
primary_hardness = steel_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[closed_electric]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_electrical_conductivity
secondary_conductivity = aluminum_electrical_conductivity
temperature = potential
contact_pressure = interface_normal_lm
primary_hardness = steel_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[]
[Postprocessors]
[steel_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_primary_subdomain
[]
[aluminum_interface_temperature]
type = AverageNodalVariableValue
variable = temperature
block = interface_secondary_subdomain
[]
[interface_heat_flux_steel]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = moving_block_right
diffusivity = steel_thermal_conductivity
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[interface_electrical_flux]
type = ADSideDiffusiveFluxAverage
variable = potential
boundary = fixed_block_left
diffusivity = aluminum_electrical_conductivity
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
nl_abs_tol = 1e-8
nl_rel_tol = 1e-4
nl_max_its = 100
nl_forced_its = 1
dt = 1200.0
dtmin = 1200.0
num_steps = 8
[]
[Outputs]
csv = true
perf_graph = true
[]
(tutorials/darcy_thermo_mech/step07_adaptivity/problems/step7b_fine.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 30
ny = 3
xmax = 0.304 # Length of test chamber
ymax = 0.0257 # Test chamber radius
[]
coord_type = RZ
rz_coord_axis = X
uniform_refine = 3
[]
[Variables]
[pressure]
[]
[temperature]
initial_condition = 300 # Start at room temperature
[]
[]
[AuxVariables]
[velocity]
order = CONSTANT
family = MONOMIAL_VEC
[]
[]
[Kernels]
[darcy_pressure]
type = DarcyPressure
variable = pressure
[]
[heat_conduction]
type = ADHeatConduction
variable = temperature
[]
[heat_conduction_time_derivative]
type = ADHeatConductionTimeDerivative
variable = temperature
[]
[heat_convection]
type = DarcyAdvection
variable = temperature
pressure = pressure
[]
[]
[AuxKernels]
[velocity]
type = DarcyVelocity
variable = velocity
execute_on = timestep_end
pressure = pressure
[]
[]
[BCs]
[inlet]
type = DirichletBC
variable = pressure
boundary = left
value = 4000 # (Pa) From Figure 2 from paper. First data point for 1mm spheres.
[]
[outlet]
type = DirichletBC
variable = pressure
boundary = right
value = 0 # (Pa) Gives the correct pressure drop from Figure 2 for 1mm spheres
[]
[inlet_temperature]
type = FunctionDirichletBC
variable = temperature
boundary = left
function = 'if(t<0,350+50*t,350)'
[]
[outlet_temperature]
type = HeatConductionOutflow
variable = temperature
boundary = right
[]
[]
[Materials]
[column]
type = PackedColumn
radius = 1
temperature = temperature
[]
[]
[Problem]
type = FEProblem
[]
[Executioner]
type = Transient
solve_type = NEWTON
automatic_scaling = true
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
end_time = 100
dt = 0.25
start_time = -1
steady_state_tolerance = 1e-5
steady_state_detection = true
[TimeStepper]
type = FunctionDT
function = 'if(t<0,0.1,0.25)'
[]
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/boussinesq/boussinesq_stabilized.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmax = .05
ymax = .05
nx = 20
ny = 20
elem_type = QUAD9
[]
[./bottom_left]
type = ExtraNodesetGenerator
new_boundary = corner
coord = '0 0'
input = gen
[../]
[]
[Preconditioning]
[./Newton_SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-12
petsc_options_iname = '-pc_type -sub_pc_type -sub_pc_factor_shift_type -ksp_gmres_restart'
petsc_options_value = 'bjacobi lu NONZERO 200'
[]
[Debug]
show_var_residual_norms = true
[]
[Outputs]
[out]
type = Exodus
execute_on = 'final'
[]
[]
[Variables]
[velocity]
family = LAGRANGE_VEC
[]
[p][]
[temp]
initial_condition = 340
scaling = 1e-4
[]
[]
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
variable = velocity
[]
[]
[BCs]
[./velocity_dirichlet]
type = VectorDirichletBC
boundary = 'left right bottom top'
variable = velocity
# The third entry is to satisfy RealVectorValue
values = '0 0 0'
[../]
# Even though we are integrating by parts, because there are no integrated
# boundary conditions on the velocity p doesn't appear in the system of
# equations. Thus we must pin the pressure somewhere in order to ensure a
# unique solution
[./p_zero]
type = DirichletBC
boundary = corner
variable = p
value = 0
[../]
[./cold]
type = DirichletBC
variable = temp
boundary = left
value = 300
[../]
[./hot]
type = DirichletBC
variable = temp
boundary = right
value = 400
[../]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[mass_pspg]
type = INSADMassPSPG
variable = p
[]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[momentum_advection]
type = INSADMomentumAdvection
variable = velocity
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
[]
[./buoyancy]
type = INSADBoussinesqBodyForce
variable = velocity
temperature = temp
gravity = '0 -9.81 0'
[../]
[./gravity]
type = INSADGravityForce
variable = velocity
gravity = '0 -9.81 0'
[../]
[supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[]
[temp_advection]
type = INSADEnergyAdvection
variable = temp
[]
[temp_conduction]
type = ADHeatConduction
variable = temp
thermal_conductivity = 'k'
[../]
[temp_supg]
type = INSADEnergySUPG
variable = temp
velocity = velocity
[]
[]
[Materials]
[./ad_const]
type = ADGenericConstantMaterial
# alpha = coefficient of thermal expansion where rho = rho0 -alpha * rho0 * delta T
prop_names = 'mu rho alpha k cp'
prop_values = '30.74e-6 .5757 2.9e-3 46.38e-3 1054'
[../]
[./const]
type = GenericConstantMaterial
prop_names = 'temp_ref'
prop_values = '900'
[../]
[ins_mat]
type = INSADStabilized3Eqn
velocity = velocity
pressure = p
temperature = temp
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/mixed-transient-steady/mixed.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./velocity]
family = LAGRANGE_VEC
[../]
[./p]
[../]
[temperature]
[InitialCondition]
type = ConstantIC
value = 1.0
[]
[]
[]
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
variable = velocity
[]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[./mass_pspg]
type = INSADMassPSPG
variable = p
[../]
[./momentum_time]
type = INSADMomentumTimeDerivative
variable = velocity
[../]
[./momentum_convection]
type = INSADMomentumAdvection
variable = velocity
[../]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
[../]
[./momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[../]
[./temperature_advection]
type = INSADEnergyAdvection
variable = temperature
[../]
[./temperature_conduction]
type = ADHeatConduction
variable = temperature
thermal_conductivity = 'k'
[../]
[temperature_supg]
type = INSADEnergySUPG
variable = temperature
velocity = velocity
[]
[]
[BCs]
[./no_slip]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom right left'
[../]
[./lid]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'top'
function_x = 'lid_function'
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[./temperature_hot]
type = DirichletBC
variable = temperature
boundary = 'bottom'
value = 1
[../]
[./temperature_cold]
type = DirichletBC
variable = temperature
boundary = 'top'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat]
type = INSADStabilized3Eqn
velocity = velocity
pressure = p
temperature = temperature
[]
[]
[Functions]
[./lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -sub_pc_factor_levels -ksp_gmres_restart'
petsc_options_value = 'asm 6 200'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/energy_source/steady.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./velocity]
family = LAGRANGE_VEC
[../]
[./p]
[../]
[temperature][]
[]
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
variable = velocity
[]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[./mass_pspg]
type = INSADMassPSPG
variable = p
[../]
[./momentum_convection]
type = INSADMomentumAdvection
variable = velocity
[../]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
[../]
[./momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[../]
[./temperature_advection]
type = INSADEnergyAdvection
variable = temperature
[../]
[./temperature_conduction]
type = ADHeatConduction
variable = temperature
thermal_conductivity = 'k'
[../]
[temperature_source]
type = INSADEnergySource
variable = temperature
source_function = 1
[]
[temperature_supg]
type = INSADEnergySUPG
variable = temperature
velocity = velocity
[]
[]
[BCs]
[./no_slip]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom right left'
[../]
[./lid]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'top'
function_x = 'lid_function'
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[./temperature_hot]
type = DirichletBC
variable = temperature
boundary = 'bottom'
value = 1
[../]
[./temperature_cold]
type = DirichletBC
variable = temperature
boundary = 'top'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat]
type = INSADStabilized3Eqn
velocity = velocity
pressure = p
temperature = temperature
[]
[]
[Functions]
[./lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_factor_levels -ksp_gmres_restart'
petsc_options_value = 'asm 6 200'
line_search = 'none'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/ad_convective_heat_flux/flux.i)
# This is a test of the ConvectiveHeatFluxBC.
# There is a single 1x1 element with a prescribed temperature
# on the left side and a convective flux BC on the right side.
# The temperature on the left is 100, and the far-field temp is 200.
# The conductance of the body (conductivity * length) is 10
#
# If the conductance in the BC is also 10, the temperature on the
# right side of the solid element should be 150 because half of the
# temperature drop should occur over the body and half in the BC.
#
# The integrated flux is deltaT * conductance, or -50 * 10 = -500.
# The negative sign indicates that heat is going into the body.
[Mesh]
type = GeneratedMesh
dim = 2
[]
[Problem]
extra_tag_vectors = 'bcs'
[]
[Variables]
[./temp]
initial_condition = 100.0
[../]
[]
[Kernels]
[./heat_conduction]
type = ADHeatConduction
variable = temp
thermal_conductivity = 10
[../]
[]
[BCs]
[./left]
type = ADDirichletBC
variable = temp
boundary = left
value = 100.0
[../]
[./right]
type = ADConvectiveHeatFluxBC
variable = temp
boundary = right
T_infinity = 200.0
heat_transfer_coefficient = 10
[../]
[]
[Postprocessors]
[./right_flux]
type = SideDiffusiveFluxAverage
variable = temp
boundary = right
diffusivity = 10
[../]
[]
[Executioner]
type = Transient
num_steps = 1.0
nl_rel_tol = 1e-12
[]
[Outputs]
csv = true
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/modular_gap_heat_transfer_mortar_displaced.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-gap.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '101'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '100'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Variables]
[./temp]
order = FIRST
family = LAGRANGE
block = '1 2'
[../]
[./disp_x]
order = FIRST
family = LAGRANGE
block = '1 2'
[../]
[./disp_y]
order = FIRST
family = LAGRANGE
block = '1 2'
[../]
[./lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[../]
[]
[Materials]
[./left]
type = ADHeatConductionMaterial
block = 1
thermal_conductivity = 1000
specific_heat = 1
[../]
[./right]
type = ADHeatConductionMaterial
block = 2
thermal_conductivity = 500
specific_heat = 1
[../]
[]
[Kernels]
[./hc_displaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = '1'
[../]
[./hc_undisplaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = false
block = '2'
[../]
[disp_x]
type = Diffusion
variable = disp_x
block = '1 2'
[]
[disp_y]
type = Diffusion
variable = disp_y
block = '1 2'
[]
[]
[UserObjects]
[simple]
type = GapFluxModelSimple
k = 100
temperature = temp
boundary = 100
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
use_displaced_mesh = true
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
gap_flux_models = simple
[]
[]
[BCs]
[./left]
type = DirichletBC
variable = temp
boundary = 'left'
value = 1
[../]
[./right]
type = DirichletBC
variable = temp
boundary = 'right'
value = 0
[../]
[left_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'left'
value = .1
[]
[right_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'right'
value = 0
[]
[bottom_disp_y]
type = DirichletBC
preset = false
variable = disp_y
boundary = 'bottom'
value = 0
[]
[]
[Preconditioning]
[./fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-11
[]
[Outputs]
exodus = true
show = 'temp disp_x disp_y'
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
(tutorials/darcy_thermo_mech/step07_adaptivity/problems/step7d_adapt_blocks.i)
[Mesh]
uniform_refine = 3
[generate]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 4
xmax = 0.304 # Length of test chamber
ymax = 0.0257 # Test chamber radius
[]
[bottom]
type = SubdomainBoundingBoxGenerator
input = generate
location = inside
bottom_left = '0 0 0'
top_right = '0.304 0.01285 0'
block_id = 1
[]
coord_type = RZ
rz_coord_axis = X
[]
[Variables]
[pressure]
[]
[temperature]
initial_condition = 300 # Start at room temperature
[]
[]
[AuxVariables]
[velocity]
order = CONSTANT
family = MONOMIAL_VEC
[]
[]
[Kernels]
[darcy_pressure]
type = DarcyPressure
variable = pressure
[]
[heat_conduction]
type = ADHeatConduction
variable = temperature
[]
[heat_conduction_time_derivative]
type = ADHeatConductionTimeDerivative
variable = temperature
[]
[heat_convection]
type = DarcyAdvection
variable = temperature
pressure = pressure
[]
[]
[AuxKernels]
[velocity]
type = DarcyVelocity
variable = velocity
execute_on = timestep_end
pressure = pressure
[]
[]
[BCs]
[inlet]
type = DirichletBC
variable = pressure
boundary = left
value = 4000 # (Pa) From Figure 2 from paper. First data point for 1mm spheres.
[]
[outlet]
type = DirichletBC
variable = pressure
boundary = right
value = 0 # (Pa) Gives the correct pressure drop from Figure 2 for 1mm spheres
[]
[inlet_temperature]
type = FunctionDirichletBC
variable = temperature
boundary = left
function = 'if(t<0,350+50*t,350)'
[]
[outlet_temperature]
type = HeatConductionOutflow
variable = temperature
boundary = right
[]
[]
[Materials]
viscosity_file = data/water_viscosity.csv
density_file = data/water_density.csv
thermal_conductivity_file = data/water_thermal_conductivity.csv
specific_heat_file = data/water_specific_heat.csv
[column_bottom]
type = PackedColumn
block = 1
radius = 1.15
temperature = temperature
fluid_viscosity_file = ${viscosity_file}
fluid_density_file = ${density_file}
fluid_thermal_conductivity_file = ${thermal_conductivity_file}
fluid_specific_heat_file = ${specific_heat_file}
[]
[column_top]
type = PackedColumn
block = 0
radius = 1
temperature = temperature
porosity = '0.25952 + 0.7*x/0.304'
fluid_viscosity_file = ${viscosity_file}
fluid_density_file = ${density_file}
fluid_thermal_conductivity_file = ${thermal_conductivity_file}
fluid_specific_heat_file = ${specific_heat_file}
[]
[]
[Problem]
type = FEProblem
[]
[Executioner]
type = Transient
solve_type = NEWTON
automatic_scaling = true
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
end_time = 100
dt = 0.25
start_time = -1
steady_state_tolerance = 1e-5
steady_state_detection = true
[TimeStepper]
type = FunctionDT
function = 'if(t<0,0.1,0.25)'
[]
[]
[Adaptivity]
marker = error_frac
max_h_level = 3
[Indicators]
[temperature_jump]
type = GradientJumpIndicator
variable = temperature
scale_by_flux_faces = true
[]
[]
[Markers]
[error_frac]
type = ErrorFractionMarker
coarsen = 0.025
indicator = temperature_jump
refine = 0.9
[]
[]
[]
[Outputs]
[out]
type = Exodus
output_material_properties = true
[]
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/finite_action_rr.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Problem]
type = ReferenceResidualProblem
reference_vector = 'ref'
extra_tag_vectors = 'ref'
converge_on = 'disp_x disp_y temp'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[temp]
order = ${order}
block = 'plank block'
scaling = 1e-1
[]
[]
[Modules/TensorMechanics/Master]
[action]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
strain = FINITE
extra_vector_tags = 'ref'
[]
[]
[Kernels]
[hc]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = 'plank block'
extra_vector_tags = 'ref'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e6
[]
[]
[MortarGapHeatTransfer]
[mortar_heat_transfer]
temperature = temp
use_displaced_mesh = true
gap_flux_options = conduction
gap_conductivity = 1
boundary = plank_right
primary_boundary = plank_right
primary_subdomain = frictionless_primary_subdomain
secondary_boundary = block_left
secondary_subdomain = frictionless_secondary_subdomain
thermal_lm_scaling = 1e-7
gap_geometry_type = PLATE
[]
[]
[BCs]
[left_temp]
type = ADDirichletBC
variable = temp
boundary = 'plank_left'
value = 400
[]
[right_temp]
type = ADDirichletBC
variable = temp
boundary = 'block_right'
value = 300
[]
[left_x]
type = ADDirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = ADDirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
preset = false
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
preset = false
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[]
[heat_plank]
type = ADHeatConductionMaterial
block = plank
thermal_conductivity = 2
specific_heat = 1
[]
[heat_block]
type = ADHeatConductionMaterial
block = block
thermal_conductivity = 1
specific_heat = 1
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -snes_max_it'
petsc_options_value = 'lu NONZERO 1e-15 20'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'none'
nl_abs_tol = 1e-13
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[avg_temp]
type = ElementAverageValue
variable = temp
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact avg_temp'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/small-2d-rz/small.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'small'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[secondary]
input = block_rename
type = LowerDBlockFromSidesetGenerator
sidesets = 'block_left'
new_block_id = '30'
new_block_name = 'frictionless_secondary_subdomain'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'plank_right'
new_block_id = '20'
new_block_name = 'frictionless_primary_subdomain'
[]
[]
[Problem]
coord_type = RZ
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[temp]
order = ${order}
block = 'plank block'
scaling = 1e-1
[]
[thermal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
scaling = 1e-7
[]
[frictionless_normal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
use_dual = true
[]
[]
[Modules/TensorMechanics/Master]
[action]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
[]
[]
[Kernels]
[hc]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = 'plank block'
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
lm_variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[thermal_contact]
type = GapConductanceConstraint
variable = thermal_lm
secondary_variable = temp
k = 1
use_displaced_mesh = true
primary_boundary = plank_right
primary_subdomain = frictionless_primary_subdomain
secondary_boundary = block_left
secondary_subdomain = frictionless_secondary_subdomain
displacements = 'disp_x disp_y'
[]
[]
[BCs]
[left_temp]
type = DirichletBC
variable = temp
boundary = 'plank_left'
value = 400
[]
[right_temp]
type = DirichletBC
variable = temp
boundary = 'block_right'
value = 300
[]
[left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
preset = false
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
preset = false
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeLinearElasticStress
block = 'plank block'
[]
[heat_plank]
type = ADHeatConductionMaterial
block = plank
thermal_conductivity = 2
specific_heat = 1
[]
[heat_block]
type = ADHeatConductionMaterial
block = block
thermal_conductivity = 1
specific_heat = 1
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -snes_max_it'
petsc_options_value = 'lu NONZERO 1e-15 20'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'none'
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[avg_temp]
type = ElementAverageValue
variable = temp
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact avg_temp'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/navier_stokes/examples/laser-welding/3d.i)
period=1.25e-3
endtime=${period}
timestep=1.25e-5
surfacetemp=300
sb=5.67e-8
[GlobalParams]
temperature = T
[]
[Mesh]
type = GeneratedMesh
dim = 3
xmin = -.35e-3
xmax = 0.35e-3
ymin = -.35e-3
ymax = .35e-3
zmin = -.7e-3
zmax = 0
nx = 2
ny = 2
nz = 2
displacements = 'disp_x disp_y disp_z'
uniform_refine = 2
[]
[Variables]
[vel]
family = LAGRANGE_VEC
[]
[T]
[]
[p]
[]
[disp_x]
[]
[disp_y]
[]
[disp_z]
[]
[]
[ICs]
[T]
type = FunctionIC
variable = T
function = '(${surfacetemp} - 300) / .7e-3 * z + ${surfacetemp}'
[]
[]
[Kernels]
[disp_x]
type = Diffusion
variable = disp_x
[]
[disp_y]
type = Diffusion
variable = disp_y
[]
[disp_z]
type = Diffusion
variable = disp_z
[]
[mass]
type = INSADMass
variable = p
use_displaced_mesh = true
[]
[mass_pspg]
type = INSADMassPSPG
variable = p
use_displaced_mesh = true
[]
[momentum_time]
type = INSADMomentumTimeDerivative
variable = vel
use_displaced_mesh = true
[]
[momentum_advection]
type = INSADMomentumAdvection
variable = vel
use_displaced_mesh = true
[]
[momentum_mesh_advection]
type = INSADMomentumMeshAdvection
variable = vel
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
[]
[momentum_viscous]
type = INSADMomentumViscous
variable = vel
use_displaced_mesh = true
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = vel
pressure = p
integrate_p_by_parts = true
use_displaced_mesh = true
[]
[momentum_supg]
type = INSADMomentumSUPG
variable = vel
material_velocity = relative_velocity
use_displaced_mesh = true
[]
[temperature_time]
type = INSADHeatConductionTimeDerivative
variable = T
use_displaced_mesh = true
[]
[temperature_advection]
type = INSADEnergyAdvection
variable = T
use_displaced_mesh = true
[]
[temperature_mesh_advection]
type = INSADEnergyMeshAdvection
variable = T
disp_x = disp_x
disp_y = disp_y
disp_z = disp_z
use_displaced_mesh = true
[]
[temperature_conduction]
type = ADHeatConduction
variable = T
thermal_conductivity = 'k'
use_displaced_mesh = true
[]
[temperature_supg]
type = INSADEnergySUPG
variable = T
velocity = vel
use_displaced_mesh = true
[]
[]
[BCs]
[x_no_disp]
type = DirichletBC
variable = disp_x
boundary = 'back'
value = 0
[]
[y_no_disp]
type = DirichletBC
variable = disp_y
boundary = 'back'
value = 0
[]
[z_no_disp]
type = DirichletBC
variable = disp_z
boundary = 'back'
value = 0
[]
[no_slip]
type = ADVectorFunctionDirichletBC
variable = vel
boundary = 'bottom right left top back'
[]
[T_cold]
type = DirichletBC
variable = T
boundary = 'back'
value = 300
[]
[radiation_flux]
type = FunctionRadiativeBC
variable = T
boundary = 'front'
emissivity_function = '1'
Tinfinity = 300
stefan_boltzmann_constant = ${sb}
use_displaced_mesh = true
[]
[weld_flux]
type = GaussianEnergyFluxBC
variable = T
boundary = 'front'
P0 = 159.96989792079225
R = 1.8257418583505537e-4
x_beam_coord = '2e-4 * cos(t * 2 * pi / ${period})'
y_beam_coord = '2e-4 * sin(t * 2 * pi / ${period})'
z_beam_coord = 0
use_displaced_mesh = true
[]
[vapor_recoil]
type = INSADVaporRecoilPressureMomentumFluxBC
variable = vel
boundary = 'front'
use_displaced_mesh = true
[]
[displace_x_top]
type = INSADDisplaceBoundaryBC
boundary = 'front'
variable = 'disp_x'
velocity = 'vel'
component = 0
associated_subdomain = 0
[]
[displace_y_top]
type = INSADDisplaceBoundaryBC
boundary = 'front'
variable = 'disp_y'
velocity = 'vel'
component = 1
associated_subdomain = 0
[]
[displace_z_top]
type = INSADDisplaceBoundaryBC
boundary = 'front'
variable = 'disp_z'
velocity = 'vel'
component = 2
associated_subdomain = 0
[]
[displace_x_top_dummy]
type = INSADDummyDisplaceBoundaryIntegratedBC
boundary = 'front'
variable = 'disp_x'
velocity = 'vel'
component = 0
[]
[displace_y_top_dummy]
type = INSADDummyDisplaceBoundaryIntegratedBC
boundary = 'front'
variable = 'disp_y'
velocity = 'vel'
component = 1
[]
[displace_z_top_dummy]
type = INSADDummyDisplaceBoundaryIntegratedBC
boundary = 'front'
variable = 'disp_z'
velocity = 'vel'
component = 2
[]
[]
[Materials]
[ins_mat]
type = INSADStabilized3Eqn
velocity = vel
pressure = p
temperature = T
use_displaced_mesh = true
[]
[steel]
type = AriaLaserWeld304LStainlessSteel
temperature = T
beta = 1e7
use_displaced_mesh = true
[]
[steel_boundary]
type = AriaLaserWeld304LStainlessSteelBoundary
boundary = 'front'
temperature = T
use_displaced_mesh = true
[]
[const]
type = GenericConstantMaterial
prop_names = 'abs sb_constant'
prop_values = '1 ${sb}'
use_displaced_mesh = true
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu NONZERO strumpack'
[]
[]
[Executioner]
type = Transient
end_time = ${endtime}
dtmin = 1e-8
dtmax = ${timestep}
petsc_options = '-snes_converged_reason -ksp_converged_reason -options_left'
solve_type = 'NEWTON'
line_search = 'none'
nl_max_its = 12
l_max_its = 100
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 7
dt = ${timestep}
linear_iteration_ratio = 1e6
growth_factor = 1.5
[]
[]
[Outputs]
[exodus]
type = Exodus
output_material_properties = true
show_material_properties = 'mu'
[]
checkpoint = true
perf_graph = true
[]
[Debug]
show_var_residual_norms = true
[]
[Adaptivity]
marker = combo
max_h_level = 4
[Indicators]
[error_T]
type = GradientJumpIndicator
variable = T
[]
[error_dispz]
type = GradientJumpIndicator
variable = disp_z
[]
[]
[Markers]
[errorfrac_T]
type = ErrorFractionMarker
refine = 0.4
coarsen = 0.2
indicator = error_T
[]
[errorfrac_dispz]
type = ErrorFractionMarker
refine = 0.4
coarsen = 0.2
indicator = error_dispz
[]
[combo]
type = ComboMarker
markers = 'errorfrac_T errorfrac_dispz'
[]
[]
[]
[Postprocessors]
[num_dofs]
type = NumDOFs
system = 'NL'
[]
[nl]
type = NumNonlinearIterations
[]
[tot_nl]
type = CumulativeValuePostprocessor
postprocessor = 'nl'
[]
[]
(modules/thermal_hydraulics/test/tests/components/hs_boundary_external_app_heat_flux/main.i)
# Main input file.
#
# Run mesh.i first to produce a mesh file that this input uses:
#
# thermal_hydraulics-opt -i mesh.i --mesh-only mesh.e
length = 5.0
n_elems_axial = 10
rho_name = density
cp_name = specific_heat
k_name = thermal_conductivity
rho = 8000.0
cp = 500.0
k = 15.0
T_initial = 500.0
power = 1000.0
[Mesh]
type = FileMesh
file = mesh.e
[]
[Variables]
[T_solid]
[]
[]
[ICs]
[T_ic]
type = ConstantIC
variable = T_solid
value = ${T_initial}
[]
[]
[Kernels]
[time_derivative]
type = ADHeatConductionTimeDerivative
variable = T_solid
density_name = ${rho_name}
specific_heat = ${cp_name}
[]
[heat_conduction]
type = ADHeatConduction
variable = T_solid
thermal_conductivity = ${k_name}
[]
[]
[BCs]
[bc]
type = FunctorNeumannBC
variable = T_solid
boundary = 'inner'
functor = heat_flux_fn
flux_is_inward = false
[]
[]
[Materials]
[ad_constant_mat]
type = ADGenericConstantMaterial
prop_names = '${rho_name} ${cp_name} ${k_name}'
prop_values = '${rho} ${cp} ${k}'
[]
[]
[Functions]
[heat_flux_fn]
type = ParsedFunction
symbol_names = 'S'
symbol_values = 'inner_surface_area'
expression = '${power} / S'
[]
[]
[Postprocessors]
[inner_surface_area]
type = AreaPostprocessor
boundary = 'inner'
execute_on = 'INITIAL'
[]
[inner_perimeter]
type = ParsedPostprocessor
pp_names = 'inner_surface_area'
expression = 'inner_surface_area / ${length}'
execute_on = 'INITIAL'
[]
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = ThermalHydraulicsApp
input_files = 'sub.i'
positions = '0 0 0'
max_procs_per_app = 1
output_in_position = true
execute_on = 'TIMESTEP_END'
[]
[]
[UserObjects]
[layered_average_heat_flux]
type = NearestPointLayeredSideAverageFunctor
direction = z
points='0 0 0'
num_layers = ${n_elems_axial}
functor = heat_flux_fn
boundary = 'inner'
execute_on = 'TIMESTEP_END'
[]
[]
[Transfers]
[heat_flux_transfer]
type = MultiAppGeneralFieldUserObjectTransfer
to_multi_app = sub
source_user_object = layered_average_heat_flux
variable = q_ext
error_on_miss = true
[]
[perimeter_transfer]
type = MultiAppPostprocessorTransfer
to_multi_app = sub
from_postprocessor = inner_perimeter
to_postprocessor = P_ext
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
dt = 10.0
num_steps = 1
abort_on_solve_fail = true
solve_type = NEWTON
nl_abs_tol = 1e-10
nl_rel_tol = 1e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 10
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/finite.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite'
[Mesh]
patch_size = 80
patch_update_strategy = auto
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = -0.3
xmax = 0.3
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.31
xmax = 0.91
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[secondary]
input = block_rename
type = LowerDBlockFromSidesetGenerator
sidesets = 'block_left'
new_block_id = '30'
new_block_name = 'frictionless_secondary_subdomain'
[]
[primary]
input = secondary
type = LowerDBlockFromSidesetGenerator
sidesets = 'plank_right'
new_block_id = '20'
new_block_name = 'frictionless_primary_subdomain'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[temp]
order = ${order}
block = 'plank block'
scaling = 1e-1
[]
[thermal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
scaling = 1e-7
[]
[frictionless_normal_lm]
order = ${order}
block = 'frictionless_secondary_subdomain'
use_dual = true
[]
[]
[Modules/TensorMechanics/Master]
[action]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
strain = FINITE
[]
[]
[Kernels]
[hc]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = 'plank block'
[]
[]
[UserObjects]
[weighted_gap_uo]
type = LMWeightedGapUserObject
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
lm_variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
[]
[]
[Constraints]
[weighted_gap_lm]
type = ComputeWeightedGapLMMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
weighted_gap_uo = weighted_gap_uo
[]
[normal_x]
type = NormalMortarMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
secondary_variable = disp_x
component = x
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[normal_y]
type = NormalMortarMechanicalContact
primary_boundary = plank_right
secondary_boundary = block_left
primary_subdomain = frictionless_primary_subdomain
secondary_subdomain = frictionless_secondary_subdomain
variable = frictionless_normal_lm
secondary_variable = disp_y
component = y
use_displaced_mesh = true
compute_lm_residuals = false
weighted_gap_uo = weighted_gap_uo
[]
[thermal_contact]
type = GapConductanceConstraint
variable = thermal_lm
secondary_variable = temp
k = 1
use_displaced_mesh = true
primary_boundary = plank_right
primary_subdomain = frictionless_primary_subdomain
secondary_boundary = block_left
secondary_subdomain = frictionless_secondary_subdomain
displacements = 'disp_x disp_y'
[]
[]
[BCs]
[left_temp]
type = ADDirichletBC
variable = temp
boundary = 'plank_left'
value = 400
[]
[right_temp]
type = ADDirichletBC
variable = temp
boundary = 'block_right'
value = 300
[]
[left_x]
type = ADDirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = ADDirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
preset = false
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
preset = false
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[]
[heat_plank]
type = ADHeatConductionMaterial
block = plank
thermal_conductivity = 2
specific_heat = 1
[]
[heat_block]
type = ADHeatConductionMaterial
block = block
thermal_conductivity = 1
specific_heat = 1
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -snes_max_it'
petsc_options_value = 'lu NONZERO 1e-15 20'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'none'
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[avg_temp]
type = ElementAverageValue
variable = temp
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact avg_temp'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[dof]
type = DOFMap
execute_on = 'initial'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(tutorials/darcy_thermo_mech/step07_adaptivity/problems/step7c_adapt.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 30
ny = 3
xmax = 0.304 # Length of test chamber
ymax = 0.0257 # Test chamber radius
[]
coord_type = RZ
rz_coord_axis = X
uniform_refine = 3
[]
[Variables]
[pressure]
[]
[temperature]
initial_condition = 300 # Start at room temperature
[]
[]
[AuxVariables]
[velocity]
order = CONSTANT
family = MONOMIAL_VEC
[]
[]
[Kernels]
[darcy_pressure]
type = DarcyPressure
variable = pressure
[]
[heat_conduction]
type = ADHeatConduction
variable = temperature
[]
[heat_conduction_time_derivative]
type = ADHeatConductionTimeDerivative
variable = temperature
[]
[heat_convection]
type = DarcyAdvection
variable = temperature
pressure = pressure
[]
[]
[AuxKernels]
[velocity]
type = DarcyVelocity
variable = velocity
execute_on = timestep_end
pressure = pressure
[]
[]
[BCs]
[inlet]
type = DirichletBC
variable = pressure
boundary = left
value = 4000 # (Pa) From Figure 2 from paper. First data point for 1mm spheres.
[]
[outlet]
type = DirichletBC
variable = pressure
boundary = right
value = 0 # (Pa) Gives the correct pressure drop from Figure 2 for 1mm spheres
[]
[inlet_temperature]
type = FunctionDirichletBC
variable = temperature
boundary = left
function = 'if(t<0,350+50*t,350)'
[]
[outlet_temperature]
type = HeatConductionOutflow
variable = temperature
boundary = right
[]
[]
[Materials]
[column]
type = PackedColumn
radius = 1
temperature = temperature
[]
[]
[Problem]
type = FEProblem
[]
[Executioner]
type = Transient
solve_type = NEWTON
automatic_scaling = true
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
end_time = 100
dt = 0.25
start_time = -1
steady_state_tolerance = 1e-5
steady_state_detection = true
[TimeStepper]
type = FunctionDT
function = 'if(t<0,0.1,0.25)'
[]
[]
[Outputs]
exodus = true
[]
[Adaptivity]
marker = error_frac
max_h_level = 3
[Indicators]
[temperature_jump]
type = GradientJumpIndicator
variable = temperature
scale_by_flux_faces = true
[]
[]
[Markers]
[error_frac]
type = ErrorFractionMarker
coarsen = 0.15
indicator = temperature_jump
refine = 0.7
[]
[]
[]
(tutorials/darcy_thermo_mech/step05_heat_conduction/problems/step5c_outflow.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmax = 0.304 # Length of test chamber
ymax = 0.0257 # Test chamber radius
[]
coord_type = RZ
rz_coord_axis = X
[]
[Variables]
[temperature]
initial_condition = 300 # Start at room temperature
[]
[]
[Kernels]
[heat_conduction]
type = ADHeatConduction
variable = temperature
[]
[heat_conduction_time_derivative]
type = ADHeatConductionTimeDerivative
variable = temperature
[]
[]
[BCs]
[inlet_temperature]
type = DirichletBC
variable = temperature
boundary = left
value = 350 # (K)
[]
[outlet_temperature]
type = HeatConductionOutflow
variable = temperature
boundary = right
[]
[]
[Materials]
[steel]
type = ADGenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '18 466 8000' # W/m*K, J/kg-K, kg/m^3 @ 296K
[]
[]
[Problem]
type = FEProblem
[]
[Executioner]
type = Transient
num_steps = 10
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(tutorials/darcy_thermo_mech/step10_multiapps/problems/step10_micro.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
ymax = 0.1
xmax = 0.1
[]
uniform_refine = 0
[]
[Adaptivity]
max_h_level = 4
initial_steps = 6
initial_marker = error_marker
cycles_per_step = 2
marker = error_marker
[Indicators]
[phi_jump]
type = GradientJumpIndicator
variable = phi
[]
[]
[Markers]
[error_marker]
type = ErrorFractionMarker
indicator = phi_jump
refine = 0.8
coarsen = 0.1
[]
[]
[]
[Variables]
[temperature]
initial_condition = 300
[]
[]
[AuxVariables]
[phi]
[]
[]
[AuxKernels]
[corrosion]
type = RandomCorrosion
variable = phi
reference_temperature = 300
temperature = temperature_in
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Kernels]
[heat_conduction]
type = ADHeatConduction
variable = temperature
[]
[]
[BCs]
[left]
type = PostprocessorDirichletBC
variable = temperature
boundary = left
postprocessor = temperature_in
[]
[right]
type = NeumannBC
variable = temperature
boundary = right
value = 100 # prescribed flux
[]
[]
[Materials]
[column]
type = PackedColumn
temperature = temperature
radius = 1 # mm
phase = phi
[]
[]
[Postprocessors]
[temperature_in]
type = Receiver
default = 301
[]
[k_eff]
type = ThermalConductivity
variable = temperature
T_hot = temperature_in
flux = 100
dx = 0.1
boundary = right
length_scale = 1
k0 = 12.05
execute_on = 'INITIAL TIMESTEP_END'
[]
[average_porosity]
type = ADElementAverageMaterialProperty
mat_prop = porosity
execute_on = 'INITIAL TIMESTEP_END'
[]
[t_right]
type = SideAverageValue
boundary = right
variable = temperature
execute_on = 'INITIAL TIMESTEP_END'
[]
[]
[Executioner]
type = Transient
end_time = 1000
dt = 1
steady_state_tolerance = 1e-9
steady_state_detection = true
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
automatic_scaling = true
[]
[Outputs]
execute_on = 'initial timestep_end'
exodus = true
[]
[ICs]
[close_pack]
radius = 0.01 # meter
outvalue = 0 # water
variable = phi
invalue = 1 # steel
type = ClosePackIC
[]
[]
(modules/heat_transfer/test/tests/gap_heat_transfer_mortar/modular_gap_heat_transfer_mortar_displaced_radiation_conduction.i)
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[file]
type = FileMeshGenerator
file = 2blk-gap.e
[]
[secondary]
type = LowerDBlockFromSidesetGenerator
sidesets = '101'
new_block_id = 10001
new_block_name = 'secondary_lower'
input = file
[]
[primary]
type = LowerDBlockFromSidesetGenerator
sidesets = '100'
new_block_id = 10000
new_block_name = 'primary_lower'
input = secondary
[]
allow_renumbering = false
[]
[Problem]
kernel_coverage_check = false
material_coverage_check = false
[]
[Variables]
[temp]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_x]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[disp_y]
order = FIRST
family = LAGRANGE
block = '1 2'
[]
[lm]
order = FIRST
family = LAGRANGE
block = 'secondary_lower'
[]
[]
[Materials]
[left]
type = ADHeatConductionMaterial
block = 1
thermal_conductivity = 0.01
specific_heat = 1
[]
[right]
type = ADHeatConductionMaterial
block = 2
thermal_conductivity = 0.005
specific_heat = 1
[]
[]
[Kernels]
[hc_displaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = '1'
[]
[hc_undisplaced_block]
type = ADHeatConduction
variable = temp
use_displaced_mesh = false
block = '2'
[]
[disp_x]
type = Diffusion
variable = disp_x
block = '1 2'
[]
[disp_y]
type = Diffusion
variable = disp_y
block = '1 2'
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
temperature = temp
boundary = 100
primary_emissivity = 1.0
secondary_emissivity = 1.0
use_displaced_mesh = true
[]
[conduction]
type = GapFluxModelConduction
temperature = temp
boundary = 100
gap_conductivity = 0.02
use_displaced_mesh = true
[]
[]
[Constraints]
[ced]
type = ModularGapConductanceConstraint
variable = lm
secondary_variable = temp
use_displaced_mesh = true
primary_boundary = 100
primary_subdomain = 10000
secondary_boundary = 101
secondary_subdomain = 10001
gap_flux_models = 'radiation conduction'
[]
[]
[BCs]
[left]
type = DirichletBC
variable = temp
boundary = 'left'
value = 100
[]
[right]
type = DirichletBC
variable = temp
boundary = 'right'
value = 0
[]
[left_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'left'
value = .1
[]
[right_disp_x]
type = DirichletBC
preset = false
variable = disp_x
boundary = 'right'
value = 0
[]
[bottom_disp_y]
type = DirichletBC
preset = false
variable = disp_y
boundary = 'bottom'
value = 0
[]
[]
[Preconditioning]
[fmp]
type = SMP
full = true
solve_type = 'NEWTON'
[]
[]
[Executioner]
type = Steady
nl_rel_tol = 1e-11
nl_abs_tol = 1.0e-10
[]
[VectorPostprocessors]
[NodalTemperature]
type = NodalValueSampler
sort_by = id
boundary = '100 101'
variable = 'temp'
[]
[]
[Outputs]
exodus = false
csv = true
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/small-2d/closed_gap_pressure_dependent_thermal_contact.i)
## Units in the input file: m-Pa-s-K
# The analytical solution for a steady state thermal contact and a mechanical
# contact pressure of 1Pa, the temperature of the steel block at the interface
# is calcaluated as
#
# T^s_{int} = \frac{T^a_{BC}C_T k_a + T^s_{BC} k_s \left(k_a +C_T \right)}{k_s (k_a + C_T) + k_a C_T}
# T^s_{int} = 460K
#
# with the boundary conditions and thermal conductivity values specified in the
# input file below. Similarly, the temperature of the aluminum block (cold block)
# is calculated as
#
# T^a_{int} = \frac{T^s_{int} C_T + T^a_{BC} k_a}{k_a + C_T}
# T^a_{int} = 276K
#
# The values predicted by the simulation at the interface converge towards these
# temperature values, and are within a few degrees by 240s. A smaller timestep
# than is practical for the regression test application further reduces the difference
# between the analytical solution and the simulation result.
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 10
xmax = 1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 10
xmin = 1
xmax = 2
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
[]
[Variables]
[disp_x]
block = 'left_block right_block'
[]
[disp_y]
block = 'left_block right_block'
[]
[temperature]
initial_condition = 525.0
[]
[temperature_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[Modules]
[TensorMechanics/Master]
[steel]
strain = SMALL
add_variables = false
use_automatic_differentiation = true
additional_generate_output = 'vonmises_stress'
additional_material_output_family = 'MONOMIAL'
additional_material_output_order = 'FIRST'
block = 'left_block'
[]
[aluminum]
strain = SMALL
add_variables = false
use_automatic_differentiation = true
additional_generate_output = 'vonmises_stress'
additional_material_output_family = 'MONOMIAL'
additional_material_output_order = 'FIRST'
block = 'right_block'
[]
[]
[]
[Kernels]
[HeatDiff_steel]
type = ADHeatConduction
variable = temperature
thermal_conductivity = steel_thermal_conductivity
block = 'left_block'
[]
[HeatTdot_steel]
type = ADHeatConductionTimeDerivative
variable = temperature
specific_heat = steel_heat_capacity
density_name = steel_density
block = 'left_block'
[]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
block = 'right_block'
[]
[HeatTdot_aluminum]
type = ADHeatConductionTimeDerivative
variable = temperature
specific_heat = aluminum_heat_capacity
density_name = aluminum_density
block = 'right_block'
[]
[]
[BCs]
[fixed_bottom_edge]
type = ADDirichletBC
variable = disp_y
value = 0
boundary = 'moving_block_bottom fixed_block_bottom'
[]
[fixed_outer_edge]
type = ADDirichletBC
variable = disp_x
value = 0
boundary = 'fixed_block_right'
[]
[displacement_left_block]
type = ADDirichletBC
variable = disp_x
value = 1.8e-11
boundary = 'moving_block_left'
[]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 800
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 250
boundary = 'fixed_block_right'
[]
[]
[Contact]
[interface]
primary = moving_block_right
secondary = fixed_block_left
model = frictionless
formulation = mortar
correct_edge_dropping = true
[]
[]
[Constraints]
[thermal_contact]
type = ModularGapConductanceConstraint
variable = temperature_interface_lm
secondary_variable = temperature
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed'
use_displaced_mesh = true
[]
[]
[Materials]
[steel_elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1.93e11 #in Pa, 193 GPa, stainless steel 304
poissons_ratio = 0.29
block = 'left_block'
[]
[steel_stress]
type = ADComputeLinearElasticStress
block = 'left_block'
[]
[steel_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'steel_density steel_thermal_conductivity steel_heat_capacity'
prop_values = '8e3 16.2 0.5' ## for stainless steel 304
block = 'left_block'
[]
[aluminum_elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 6.8e10 #in Pa, 68 GPa, aluminum
poissons_ratio = 0.36
block = 'right_block'
[]
[aluminum_stress]
type = ADComputeLinearElasticStress
block = 'right_block'
[]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity'
prop_values = ' 2.7e3 210 0.9'
block = 'right_block'
[]
[]
[UserObjects]
[closed]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_thermal_conductivity
secondary_conductivity = aluminum_thermal_conductivity
temperature = temperature
contact_pressure = interface_normal_lm
primary_hardness = 1.0
secondary_hardness = 1.0
boundary = moving_block_right
[]
[]
[Postprocessors]
[steel_pt_interface_temperature]
type = NodalVariableValue
nodeid = 245
variable = temperature
[]
[aluminum_pt_interface_temperature]
type = NodalVariableValue
nodeid = 657
variable = temperature
[]
[interface_heat_flux_steel]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = moving_block_right
diffusivity = steel_thermal_conductivity
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
# mortar contact solver options
petsc_options = '-snes_converged_reason -pc_svd_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = ' lu superlu_dist'
snesmf_reuse_base = false
nl_rel_tol = 1e-10
nl_max_its = 20
l_max_its = 50
dt = 60
end_time = 240
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
elem_type = QUAD9
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[AuxVariables]
[vel_x]
order = SECOND
[]
[vel_y]
order = SECOND
[]
[]
[AuxKernels]
[vel_x]
type = VectorVariableComponentAux
variable = vel_x
vector_variable = velocity
component = 'x'
[]
[vel_y]
type = VectorVariableComponentAux
variable = vel_y
vector_variable = velocity
component = 'y'
[]
[]
[Variables]
[./velocity]
order = SECOND
family = LAGRANGE_VEC
[../]
[./T]
order = SECOND
[./InitialCondition]
type = ConstantIC
value = 1.0
[../]
[../]
[./p]
[../]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[./momentum_time]
type = INSADMomentumTimeDerivative
variable = velocity
[../]
[./momentum_convection]
type = INSADMomentumAdvection
variable = velocity
[../]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
[../]
[./temperature_time]
type = INSADHeatConductionTimeDerivative
variable = T
[../]
[./temperature_advection]
type = INSADEnergyAdvection
variable = T
[../]
[./temperature_conduction]
type = ADHeatConduction
variable = T
thermal_conductivity = 'k'
[../]
[]
[BCs]
[./no_slip]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom right left'
[../]
[./lid]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'top'
function_x = 'lid_function'
[../]
[./T_hot]
type = DirichletBC
variable = T
boundary = 'bottom'
value = 1
[../]
[./T_cold]
type = DirichletBC
variable = T
boundary = 'top'
value = 0
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat]
type = INSAD3Eqn
velocity = velocity
pressure = p
temperature = T
[]
[]
[Functions]
[./lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Transient
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_levels'
petsc_options_value = 'asm 2 ilu 4'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
file_base = lid_driven_out
exodus = true
perf_graph = true
[]
(tutorials/darcy_thermo_mech/step08_postprocessors/problems/step8.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 30
ny = 3
xmax = 0.304 # Length of test chamber
ymax = 0.0257 # Test chamber radius
[]
coord_type = RZ
rz_coord_axis = X
uniform_refine = 2
[]
[Variables]
[pressure]
[]
[temperature]
initial_condition = 300 # Start at room temperature
[]
[]
[AuxVariables]
[velocity]
order = CONSTANT
family = MONOMIAL_VEC
[]
[]
[Kernels]
[darcy_pressure]
type = DarcyPressure
variable = pressure
[]
[heat_conduction]
type = ADHeatConduction
variable = temperature
[]
[heat_conduction_time_derivative]
type = ADHeatConductionTimeDerivative
variable = temperature
[]
[heat_convection]
type = DarcyAdvection
variable = temperature
pressure = pressure
[]
[]
[AuxKernels]
[velocity]
type = DarcyVelocity
variable = velocity
execute_on = timestep_end
pressure = pressure
[]
[]
[BCs]
[inlet]
type = DirichletBC
variable = pressure
boundary = left
value = 4000 # (Pa) From Figure 2 from paper. First data point for 1mm spheres.
[]
[outlet]
type = DirichletBC
variable = pressure
boundary = right
value = 0 # (Pa) Gives the correct pressure drop from Figure 2 for 1mm spheres
[]
[inlet_temperature]
type = FunctionDirichletBC
variable = temperature
boundary = left
function = 'if(t<0,350+50*t,350)'
[]
[outlet_temperature]
type = HeatConductionOutflow
variable = temperature
boundary = right
[]
[]
[Materials]
[column]
type = PackedColumn
radius = 1
temperature = temperature
porosity = '0.25952 + 0.7*y/0.0257'
[]
[]
[Postprocessors]
[average_temperature]
type = ElementAverageValue
variable = temperature
[]
[outlet_heat_flux]
type = ADSideDiffusiveFluxIntegral
variable = temperature
boundary = right
diffusivity = thermal_conductivity
[]
[]
[VectorPostprocessors]
[temperature_sample]
type = LineValueSampler
num_points = 500
start_point = '0.1 0 0'
end_point = '0.1 0.0257 0'
variable = temperature
sort_by = y
[]
[]
[Problem]
type = FEProblem
[]
[Executioner]
type = Transient
solve_type = NEWTON
automatic_scaling = true
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
end_time = 100
dt = 0.25
start_time = -1
steady_state_tolerance = 1e-5
steady_state_detection = true
[TimeStepper]
type = FunctionDT
function = 'if(t<0,0.1,0.25)'
[]
[]
[Outputs]
exodus = true
csv = true
[]
(modules/heat_transfer/test/tests/radiative_bcs/ad_radiative_bc_cyl.i)
#
# Thin cylindrical shell with very high thermal conductivity
# so that temperature is almost uniform at 500 K. Radiative
# boundary conditions is applied. Heat flux out of boundary
# 'right' should be 3723.36; this is approached as the mesh
# is refined
#
[Mesh]
type = MeshGeneratorMesh
[cartesian]
type = CartesianMeshGenerator
dim = 2
dx = '1 1'
ix = '1 10'
dy = '1 1'
subdomain_id = '1 2 1 2'
[]
[remove_1]
type = BlockDeletionGenerator
block = 1
input = cartesian
[]
[readd_left]
type = ParsedGenerateSideset
combinatorial_geometry = 'abs(x - 1) < 1e-4'
new_sideset_name = left
input = remove_1
[]
[]
[Problem]
coord_type = RZ
[]
[Variables]
[temp]
initial_condition = 800.0
[]
[]
[Kernels]
[heat]
type = ADHeatConduction
variable = temp
[]
[]
[BCs]
[lefttemp]
type = ADDirichletBC
boundary = left
variable = temp
value = 800
[]
[radiative_bc]
type = ADInfiniteCylinderRadiativeBC
boundary = right
variable = temp
boundary_radius = 2
boundary_emissivity = 0.2
cylinder_radius = 3
cylinder_emissivity = 0.7
Tinfinity = 500
[]
[]
[Materials]
[density]
type = ADGenericConstantMaterial
prop_names = 'density thermal_conductivity'
prop_values = '1 1.0e5'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
[]
[]
[Executioner]
type = Steady
petsc_options = '-snes_converged_reason'
line_search = none
nl_rel_tol = 1e-6
nl_abs_tol = 1e-7
[]
[Postprocessors]
[right]
type = ADSideDiffusiveFluxAverage
variable = temp
boundary = right
diffusivity = thermal_conductivity
[]
[min_temp]
type = ElementExtremeValue
variable = temp
value_type = min
[]
[max_temp]
type = ElementExtremeValue
variable = temp
value_type = max
[]
[]
[Outputs]
csv = true
[]
(tutorials/darcy_thermo_mech/step05_heat_conduction/problems/step5a_steady.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 100
ny = 10
xmax = 0.304 # Length of test chamber
ymax = 0.0257 # Test chamber radius
[]
coord_type = RZ
rz_coord_axis = X
[]
[Variables]
[temperature]
[]
[]
[Kernels]
[heat_conduction]
type = ADHeatConduction
variable = temperature
[]
[]
[BCs]
[inlet_temperature]
type = DirichletBC
variable = temperature
boundary = left
value = 350 # (K)
[]
[outlet_temperature]
type = DirichletBC
variable = temperature
boundary = right
value = 300 # (K)
[]
[]
[Materials]
[steel]
type = ADGenericConstantMaterial
prop_names = thermal_conductivity
prop_values = 18 # K: (W/m*K) from wikipedia @296K
[]
[]
[Problem]
type = FEProblem
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/energy_source/steady-var.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[AuxVariables]
[u]
initial_condition = 1
[]
[]
[Variables]
[./velocity]
family = LAGRANGE_VEC
[../]
[./p]
[../]
[temperature][]
[]
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
variable = velocity
[]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[./mass_pspg]
type = INSADMassPSPG
variable = p
[../]
[./momentum_convection]
type = INSADMomentumAdvection
variable = velocity
[../]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
[../]
[./momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[../]
[./temperature_advection]
type = INSADEnergyAdvection
variable = temperature
[../]
[./temperature_conduction]
type = ADHeatConduction
variable = temperature
thermal_conductivity = 'k'
[../]
[temperature_source]
type = INSADEnergySource
variable = temperature
source_variable = u
[]
[temperature_supg]
type = INSADEnergySUPG
variable = temperature
velocity = velocity
[]
[]
[BCs]
[./no_slip]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom right left'
[../]
[./lid]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'top'
function_x = 'lid_function'
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[./temperature_hot]
type = DirichletBC
variable = temperature
boundary = 'bottom'
value = 1
[../]
[./temperature_cold]
type = DirichletBC
variable = temperature
boundary = 'top'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat]
type = INSADStabilized3Eqn
velocity = velocity
pressure = p
temperature = temperature
[]
[]
[Functions]
[./lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[]
[Executioner]
type = Steady
solve_type = 'NEWTON'
petsc_options_iname = '-pc_type -sub_pc_factor_levels -ksp_gmres_restart'
petsc_options_value = 'asm 6 200'
line_search = 'none'
nl_rel_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
[out]
type = Exodus
hide = 'u'
[]
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/closed_gap_thermomechanical_mortar_contact.i)
## Units in the input file: m-Pa-s-K
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 10
xmax = 1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 10
xmin = 1
xmax = 2
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
patch_update_strategy = iteration
[]
[Variables]
[disp_x]
block = 'left_block right_block'
[]
[disp_y]
block = 'left_block right_block'
[]
[temperature]
initial_condition = 300.0
[]
[temperature_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[Modules]
[TensorMechanics/Master]
[steel]
strain = FINITE
add_variables = false
use_automatic_differentiation = true
generate_output = 'strain_xx strain_xy strain_yy stress_xx stress_xy stress_yy'
additional_generate_output = 'vonmises_stress'
additional_material_output_family = 'MONOMIAL'
additional_material_output_order = 'FIRST'
eigenstrain_names = steel_thermal_expansion
block = 'left_block'
[]
[aluminum]
strain = FINITE
add_variables = false
use_automatic_differentiation = true
generate_output = 'strain_xx strain_xy strain_yy stress_xx stress_xy stress_yy'
additional_generate_output = 'vonmises_stress'
additional_material_output_family = 'MONOMIAL'
additional_material_output_order = 'FIRST'
eigenstrain_names = aluminum_thermal_expansion
block = 'right_block'
[]
[]
[]
[Kernels]
[HeatDiff_steel]
type = ADHeatConduction
variable = temperature
thermal_conductivity = steel_thermal_conductivity
block = 'left_block'
[]
[HeatTdot_steel]
type = ADHeatConductionTimeDerivative
variable = temperature
specific_heat = steel_heat_capacity
density_name = steel_density
block = 'left_block'
[]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
block = 'right_block'
[]
[HeatTdot_aluminum]
type = ADHeatConductionTimeDerivative
variable = temperature
specific_heat = aluminum_heat_capacity
density_name = aluminum_density
block = 'right_block'
[]
[]
[BCs]
[fixed_bottom_edge]
type = ADDirichletBC
variable = disp_y
value = 0
boundary = 'moving_block_bottom fixed_block_bottom'
[]
[fixed_outer_edge]
type = ADDirichletBC
variable = disp_x
value = 0
boundary = 'fixed_block_right'
[]
[displacement_left_block]
type = ADFunctionDirichletBC
variable = disp_x
function = '2.0e-7*t'
boundary = 'moving_block_left'
[]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 800
boundary = 'fixed_block_right'
[]
[]
[Contact]
[interface]
primary = moving_block_right
secondary = fixed_block_left
model = frictionless
formulation = mortar
correct_edge_dropping = true
[]
[]
[Constraints]
[thermal_contact]
type = ModularGapConductanceConstraint
variable = temperature_interface_lm
secondary_variable = temperature
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed'
use_displaced_mesh = true
[]
[]
[Materials]
[steel_elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1.93e11 #in Pa, 193 GPa, stainless steel 304
poissons_ratio = 0.29
block = 'left_block'
[]
[steel_stress]
type = ADComputeFiniteStrainElasticStress
block = 'left_block'
[]
[steel_thermal_expansion]
type = ADComputeThermalExpansionEigenstrain
thermal_expansion_coeff = 17.3e-6 # stainless steel 304
stress_free_temperature = 300.0
temperature = temperature
eigenstrain_name = 'steel_thermal_expansion'
block = 'left_block'
[]
[steel_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'steel_density steel_thermal_conductivity steel_heat_capacity steel_hardness'
prop_values = ' 8e3 16.2 0.5 129' ## for stainless steel 304
block = 'left_block'
[]
[aluminum_elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 6.8e10 #in Pa, 68 GPa, aluminum
poissons_ratio = 0.36
block = 'right_block'
[]
[aluminum_stress]
type = ADComputeFiniteStrainElasticStress
block = 'right_block'
[]
[aluminum_thermal_expansion]
type = ADComputeThermalExpansionEigenstrain
thermal_expansion_coeff = 24.0e-6 # aluminum
stress_free_temperature = 300.0
temperature = temperature
eigenstrain_name = 'aluminum_thermal_expansion'
block = 'right_block'
[]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_hardness'
prop_values = ' 2.7e3 210 0.9 15' #for 99% pure Al
block = 'right_block'
[]
[]
[UserObjects]
[closed]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_thermal_conductivity
secondary_conductivity = aluminum_thermal_conductivity
temperature = temperature
contact_pressure = interface_normal_lm
primary_hardness = steel_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[]
[Postprocessors]
[steel_pt_interface_temperature]
type = NodalVariableValue
nodeid = 245
variable = temperature
[]
[aluminum_pt_interface_temperature]
type = NodalVariableValue
nodeid = 657
variable = temperature
[]
[steel_element_interface_stress]
type = ElementalVariableValue
variable = vonmises_stress
elementid = 199
[]
[aluminum_element_interface_stress]
type = ElementalVariableValue
variable = vonmises_stress
elementid = 560
[]
[interface_heat_flux_steel]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = moving_block_right
diffusivity = steel_thermal_conductivity
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
# mortar contact solver options
petsc_options = '-snes_converged_reason -pc_svd_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = ' lu superlu_dist'
snesmf_reuse_base = false
nl_rel_tol = 1e-8
nl_max_its = 20
l_max_its = 50
dt = 2
end_time = 10
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/energy-conservation/q2q1.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
nx = 10
ny = 10
dim = 2
[]
[subdomain]
type = SubdomainBoundingBoxGenerator
bottom_left = '0.5 0 0'
top_right = '1 1 0'
block_id = 1
input = gen
[]
[break_boundary]
input = subdomain
type = BreakBoundaryOnSubdomainGenerator
boundaries = 'bottom top'
[]
[sideset]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
primary_block = '1'
paired_block = '0'
new_boundary = 'fluid_left'
[]
coord_type = RZ
second_order = true
[]
[Variables]
[T]
order = SECOND
[]
[velocity]
family = LAGRANGE_VEC
order = SECOND
block = 1
[]
[pressure]
block = 1
[]
[]
[Kernels]
[mass]
type = INSADMass
variable = pressure
block = 1
[]
[momentum_convection]
type = INSADMomentumAdvection
variable = velocity
block = 1
[]
[momentum_viscous]
type = INSADMomentumViscous
variable = velocity
block = 1
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = pressure
integrate_p_by_parts = true
block = 1
[]
[momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
block = 1
[]
[temperature_advection]
type = INSADEnergyAdvection
variable = T
block = 1
[]
[temperature_supg]
type = INSADEnergySUPG
variable = T
velocity = velocity
block = 1
[]
[temperature_conduction]
type = ADHeatConduction
variable = T
thermal_conductivity = 'k'
[]
[heat_source]
type = BodyForce
variable = T
block = 0
function = 'x + y'
[]
[]
[BCs]
[velocity_inlet]
type = VectorFunctionDirichletBC
variable = velocity
function_y = 1
boundary = 'bottom_to_1'
[]
[wall]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'fluid_left right'
[]
[convective_heat_transfer]
type = ConvectiveHeatFluxBC
variable = T
T_infinity = 0
heat_transfer_coefficient = 1
boundary = 'right'
[]
[]
[Materials]
[constant]
type = ADGenericConstantMaterial
prop_names = 'cp rho k mu'
prop_values = '1 1 1 1'
[]
[ins]
type = INSADStabilized3Eqn
pressure = pressure
velocity = velocity
temperature = T
block = 1
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
[]
[Outputs]
csv = true
[]
[Postprocessors]
[convective_heat_transfer]
type = ConvectiveHeatTransferSideIntegral
T_solid = T
T_fluid = 0
htc = 1
boundary = 'right'
[]
[advection]
type = INSADElementIntegralEnergyAdvection
temperature = T
velocity = velocity
cp = cp
rho = rho
block = 1
[]
[source]
type = FunctionElementIntegral
function = 'x + y'
block = 0
[]
[energy_balance]
type = ParsedPostprocessor
expression = 'convective_heat_transfer + advection - source'
pp_names = 'convective_heat_transfer advection source'
[]
[]
(modules/navier_stokes/test/tests/finite_element/ins/energy-conservation/q1q1.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
nx = 10
ny = 10
dim = 2
[]
[subdomain]
type = SubdomainBoundingBoxGenerator
bottom_left = '0.5 0 0'
top_right = '1 1 0'
block_id = 1
input = gen
[]
[break_boundary]
input = subdomain
type = BreakBoundaryOnSubdomainGenerator
boundaries = 'bottom top'
[]
[sideset]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
primary_block = '1'
paired_block = '0'
new_boundary = 'fluid_left'
[]
coord_type = RZ
[]
[Variables]
[T][]
[velocity]
family = LAGRANGE_VEC
block = 1
[]
[pressure]
block = 1
[]
[]
[Kernels]
[mass]
type = INSADMass
variable = pressure
block = 1
[]
[pspg]
type = INSADMassPSPG
variable = pressure
block = 1
[]
[momentum_convection]
type = INSADMomentumAdvection
variable = velocity
block = 1
[]
[momentum_viscous]
type = INSADMomentumViscous
variable = velocity
block = 1
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = pressure
integrate_p_by_parts = true
block = 1
[]
[momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
block = 1
[]
[temperature_advection]
type = INSADEnergyAdvection
variable = T
block = 1
[]
[temperature_supg]
type = INSADEnergySUPG
variable = T
velocity = velocity
block = 1
[]
[temperature_conduction]
type = ADHeatConduction
variable = T
thermal_conductivity = 'k'
[]
[heat_source]
type = BodyForce
variable = T
block = 0
function = 'x + y'
[]
[]
[BCs]
[velocity_inlet]
type = VectorFunctionDirichletBC
variable = velocity
function_y = 1
boundary = 'bottom_to_1'
[]
[wall]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'fluid_left right'
[]
[convective_heat_transfer]
type = ConvectiveHeatFluxBC
variable = T
T_infinity = 0
heat_transfer_coefficient = 1
boundary = 'right'
[]
[]
[Materials]
[constant]
type = ADGenericConstantMaterial
prop_names = 'cp rho k mu'
prop_values = '1 1 1 1'
[]
[ins]
type = INSADStabilized3Eqn
pressure = pressure
velocity = velocity
temperature = T
block = 1
[]
[]
[Executioner]
type = Steady
solve_type = NEWTON
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
[]
[Outputs]
csv = true
[]
[Postprocessors]
[convective_heat_transfer]
type = ConvectiveHeatTransferSideIntegral
T_solid = T
T_fluid = 0
htc = 1
boundary = 'right'
[]
[advection]
type = INSADElementIntegralEnergyAdvection
temperature = T
velocity = velocity
cp = cp
rho = rho
block = 1
[]
[source]
type = FunctionElementIntegral
function = 'x + y'
block = 0
[]
[energy_balance]
type = ParsedPostprocessor
expression = 'convective_heat_transfer + advection - source'
pp_names = 'convective_heat_transfer advection source'
[]
[]
(tutorials/darcy_thermo_mech/step06_coupled_darcy_heat_conduction/problems/step6a_coupled.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 200
ny = 10
xmax = 0.304 # Length of test chamber
ymax = 0.0257 # Test chamber radius
[]
coord_type = RZ
rz_coord_axis = X
[]
[Variables]
[pressure]
[]
[temperature]
initial_condition = 300 # Start at room temperature
[]
[]
[AuxVariables]
[velocity]
order = CONSTANT
family = MONOMIAL_VEC
[]
[]
[Kernels]
[darcy_pressure]
type = DarcyPressure
variable = pressure
[]
[heat_conduction]
type = ADHeatConduction
variable = temperature
[]
[heat_conduction_time_derivative]
type = ADHeatConductionTimeDerivative
variable = temperature
[]
[heat_convection]
type = DarcyAdvection
variable = temperature
pressure = pressure
[]
[]
[AuxKernels]
[velocity]
type = DarcyVelocity
variable = velocity
execute_on = timestep_end
pressure = pressure
[]
[]
[BCs]
[inlet]
type = DirichletBC
variable = pressure
boundary = left
value = 4000 # (Pa) From Figure 2 from paper. First data point for 1mm spheres.
[]
[outlet]
type = DirichletBC
variable = pressure
boundary = right
value = 0 # (Pa) Gives the correct pressure drop from Figure 2 for 1mm spheres
[]
[inlet_temperature]
type = FunctionDirichletBC
variable = temperature
boundary = left
function = 'if(t<0,350+50*t,350)'
[]
[outlet_temperature]
type = HeatConductionOutflow
variable = temperature
boundary = right
[]
[]
[Materials]
[column]
type = PackedColumn
temperature = temperature
radius = 1
[]
[]
[Problem]
type = FEProblem
[]
[Executioner]
type = Transient
solve_type = NEWTON
automatic_scaling = true
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
end_time = 100
dt = 0.25
start_time = -1
steady_state_tolerance = 1e-5
steady_state_detection = true
[TimeStepper]
type = FunctionDT
function = 'if(t<0,0.1,0.25)'
[]
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/test/tests/finite_element/ins/lid_driven/ad_lid_driven_stabilized_with_temp_transient.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 1.0
ymin = 0
ymax = 1.0
nx = 16
ny = 16
[]
[./corner_node]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node'
nodes = '0'
input = gen
[../]
[]
[Variables]
[./velocity]
family = LAGRANGE_VEC
[../]
[./p]
[../]
[temperature]
[InitialCondition]
type = ConstantIC
value = 1.0
[]
[]
[]
[ICs]
[velocity]
type = VectorConstantIC
x_value = 1e-15
y_value = 1e-15
variable = velocity
[]
[]
[Kernels]
[./mass]
type = INSADMass
variable = p
[../]
[./mass_pspg]
type = INSADMassPSPG
variable = p
[../]
[./momentum_time]
type = INSADMomentumTimeDerivative
variable = velocity
[../]
[./momentum_convection]
type = INSADMomentumAdvection
variable = velocity
[../]
[./momentum_viscous]
type = INSADMomentumViscous
variable = velocity
[../]
[./momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
[../]
[./momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
[../]
[./temperature_advection]
type = INSADEnergyAdvection
variable = temperature
[../]
[temperature_time]
type = INSADHeatConductionTimeDerivative
variable = temperature
[]
[./temperature_conduction]
type = ADHeatConduction
variable = temperature
thermal_conductivity = 'k'
[../]
[temperature_supg]
type = INSADEnergySUPG
variable = temperature
velocity = velocity
[]
[]
[BCs]
[./no_slip]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'bottom right left'
[../]
[./lid]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'top'
function_x = 'lid_function'
[../]
[./pressure_pin]
type = DirichletBC
variable = p
boundary = 'pinned_node'
value = 0
[../]
[./temperature_hot]
type = DirichletBC
variable = temperature
boundary = 'bottom'
value = 1
[../]
[./temperature_cold]
type = DirichletBC
variable = temperature
boundary = 'top'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat]
type = INSADStabilized3Eqn
velocity = velocity
pressure = p
temperature = temperature
[]
[]
[Functions]
[./lid_function]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -sub_pc_factor_levels -ksp_gmres_restart'
petsc_options_value = 'asm 6 200'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-12
nl_max_its = 6
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/gap_heat_transfer_jac/two_blocks.i)
# This problem consists of two beams with different prescribed temperatures on
# the top of the top beam and the bottom of the bottom beam. The top beam is
# fixed against vertical displacement on the top surface, and the bottom beam
# bends downward due to thermal expansion.
# This is a test of the effectiveness of the Jacobian terms coupling temperature
# and displacement for thermal contact. The Jacobian is not exactly correct,
# but is close enough that this challenging problem converges in a small number
# of nonlinear iterations using NEWTON.
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[./msh]
type = FileMeshGenerator
file = two_blocks.e
[]
[]
[Variables]
[./temp]
[../]
[]
[Kernels]
[./heat]
type = ADHeatConduction
variable = temp
[../]
[]
[Modules/TensorMechanics/Master]
[./all]
strain = FINITE
add_variables = true
eigenstrain_names = thermal_expansion
generate_output = 'stress_xx stress_yy stress_zz stress_yz stress_xz stress_xy'
use_automatic_differentiation = true
[../]
[]
[Contact]
[./mechanical]
primary = 4
secondary = 5
formulation = kinematic
tangential_tolerance = 1e-1
penalty = 1e10
[../]
[]
[ThermalContact]
[./thermal]
type = GapHeatTransfer
variable = temp
primary = 4
secondary = 5
emissivity_primary = 0
emissivity_secondary = 0
gap_conductivity = 1e4
quadrature = true
[../]
[]
[BCs]
[./left_x]
type = DirichletBC
variable = disp_x
boundary = 1
value = 0.0
[../]
[./left_y]
type = DirichletBC
variable = disp_y
boundary = 1
value = 0.0
[../]
[./top_y]
type = DirichletBC
variable = disp_y
boundary = 7
value = 0
[../]
[./top_temp]
type = DirichletBC
variable = temp
boundary = 7
value = 1000.0
[../]
[./bot_temp]
type = DirichletBC
variable = temp
boundary = 6
value = 500.0
[../]
[]
[Materials]
[./density]
type = Density
density = 100
[../]
[./temp]
type = ADHeatConductionMaterial
thermal_conductivity = 1e5
specific_heat = 620.0
[../]
[./Elasticity_tensor]
type = ADComputeElasticityTensor
fill_method = symmetric_isotropic
C_ijkl = '0.3 0.5e8'
[../]
[./thermal_eigenstrain]
type = ADComputeThermalExpansionEigenstrain
thermal_expansion_coeff = 1e-5
stress_free_temperature = 500
temperature = temp
eigenstrain_name = thermal_expansion
[../]
[./stress]
type = ADComputeFiniteStrainElasticStress
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
[../]
[]
[Outputs]
exodus = true
[]
[Executioner]
automatic_scaling = true
type = Transient
petsc_options_iname = '-pc_type'
petsc_options_value = 'lu'
solve_type = NEWTON
nl_max_its = 15
l_tol = 1e-10
l_max_its = 50
start_time = 0.0
dt = 0.2
dtmin = 0.2
num_steps = 1
line_search = none
[]
(modules/navier_stokes/test/tests/finite_element/ins/block-restriction/two-mats-two-eqn-sets.i)
[Mesh]
[gen]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 2
ymin = 0
ymax = 1
nx = 16
ny = 8
elem_type = QUAD9
[]
[./corner_node_0]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node_0'
coord = '0 0 0'
input = gen
[../]
[./corner_node_1]
type = ExtraNodesetGenerator
new_boundary = 'pinned_node_1'
coord = '1 0 0'
input = corner_node_0
[../]
[./subdomain1]
input = corner_node_1
type = SubdomainBoundingBoxGenerator
bottom_left = '1 0 0'
top_right = '2 1 0'
block_id = 1
[../]
[./break_boundary]
input = subdomain1
type = BreakBoundaryOnSubdomainGenerator
[../]
[./interface0]
type = SideSetsBetweenSubdomainsGenerator
input = break_boundary
primary_block = '0'
paired_block = '1'
new_boundary = 'interface0'
[../]
[./interface1]
type = SideSetsBetweenSubdomainsGenerator
input = interface0
primary_block = '1'
paired_block = '0'
new_boundary = 'interface1'
[../]
[]
[Variables]
[velocity0]
order = SECOND
family = LAGRANGE_VEC
block = 0
[]
[T0]
order = SECOND
[InitialCondition]
type = ConstantIC
value = 1.0
[]
block = 0
[]
[p0]
block = 0
[]
[velocity1]
order = SECOND
family = LAGRANGE_VEC
block = 1
[]
[T1]
order = SECOND
[InitialCondition]
type = ConstantIC
value = 1.0
[]
block = 1
[]
[p1]
block = 1
[]
[]
[Kernels]
[./mass0]
type = INSADMass
variable = p0
block = 0
[../]
[./momentum_time0]
type = INSADMomentumTimeDerivative
variable = velocity0
block = 0
[../]
[./momentum_convection0]
type = INSADMomentumAdvection
variable = velocity0
block = 0
[../]
[./momentum_viscous0]
type = INSADMomentumViscous
variable = velocity0
block = 0
[../]
[./momentum_pressure0]
type = INSADMomentumPressure
variable = velocity0
pressure = p0
integrate_p_by_parts = true
block = 0
[../]
[./temperature_time0]
type = INSADHeatConductionTimeDerivative
variable = T0
block = 0
[../]
[./temperature_advection0]
type = INSADEnergyAdvection
variable = T0
block = 0
[../]
[./temperature_conduction0]
type = ADHeatConduction
variable = T0
thermal_conductivity = 'k'
block = 0
[../]
[./mass1]
type = INSADMass
variable = p1
block = 1
[../]
[./momentum_time1]
type = INSADMomentumTimeDerivative
variable = velocity1
block = 1
[../]
[./momentum_convection1]
type = INSADMomentumAdvection
variable = velocity1
block = 1
[../]
[./momentum_viscous1]
type = INSADMomentumViscous
variable = velocity1
block = 1
[../]
[./momentum_pressure1]
type = INSADMomentumPressure
variable = velocity1
pressure = p1
integrate_p_by_parts = true
block = 1
[../]
[./temperature_time1]
type = INSADHeatConductionTimeDerivative
variable = T1
block = 1
[../]
[./temperature_advection1]
type = INSADEnergyAdvection
variable = T1
block = 1
[../]
[./temperature_conduction1]
type = ADHeatConduction
variable = T1
thermal_conductivity = 'k'
block = 1
[../]
[]
[BCs]
[./no_slip0]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'bottom_to_0 interface0 left'
[../]
[./lid0]
type = VectorFunctionDirichletBC
variable = velocity0
boundary = 'top_to_0'
function_x = 'lid_function0'
[../]
[./T_hot0]
type = DirichletBC
variable = T0
boundary = 'bottom_to_0'
value = 1
[../]
[./T_cold0]
type = DirichletBC
variable = T0
boundary = 'top_to_0'
value = 0
[../]
[./pressure_pin0]
type = DirichletBC
variable = p0
boundary = 'pinned_node_0'
value = 0
[../]
[./no_slip1]
type = VectorFunctionDirichletBC
variable = velocity1
boundary = 'bottom_to_1 interface1 right'
[../]
[./lid1]
type = VectorFunctionDirichletBC
variable = velocity1
boundary = 'top_to_1'
function_x = 'lid_function1'
[../]
[./T_hot1]
type = DirichletBC
variable = T1
boundary = 'bottom_to_1'
value = 1
[../]
[./T_cold1]
type = DirichletBC
variable = T1
boundary = 'top_to_1'
value = 0
[../]
[./pressure_pin1]
type = DirichletBC
variable = p1
boundary = 'pinned_node_1'
value = 0
[../]
[]
[Materials]
[./const]
type = ADGenericConstantMaterial
prop_names = 'rho mu cp k'
prop_values = '1 1 1 .01'
[../]
[ins_mat0]
type = INSAD3Eqn
velocity = velocity0
pressure = p0
temperature = T0
block = 0
[]
[ins_mat1]
type = INSAD3Eqn
velocity = velocity1
pressure = p1
temperature = T1
block = 1
[]
[]
[Functions]
# We pick a function that is exactly represented in the velocity
# space so that the Dirichlet conditions are the same regardless
# of the mesh spacing.
[./lid_function0]
type = ParsedFunction
expression = '4*x*(1-x)'
[../]
[./lid_function1]
type = ParsedFunction
expression = '4*(x-1)*(2-x)'
[../]
[]
[Preconditioning]
[./SMP]
type = SMP
full = true
solve_type = 'NEWTON'
[../]
[]
[Executioner]
type = Transient
# Run for 100+ timesteps to reach steady state.
num_steps = 5
dt = .5
dtmin = .5
petsc_options_iname = '-pc_type -pc_asm_overlap -sub_pc_type -sub_pc_factor_levels -sub_pc_factor_shift_type'
petsc_options_value = 'asm 2 ilu 4 NONZERO'
line_search = 'none'
nl_rel_tol = 1e-12
nl_abs_tol = 1e-13
nl_max_its = 6
l_tol = 1e-6
l_max_its = 500
[]
[Outputs]
exodus = true
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/small-2d/multi_component_mortar_thermal_conduction.i)
## Units in the input file: m-Pa-s-K
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 10
xmax = 1
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 40
ny = 10
xmin = 1.
xmax = 2.
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
patch_update_strategy = iteration
[]
[Variables]
[disp_x]
block = 'left_block right_block'
[]
[disp_y]
block = 'left_block right_block'
[]
[temperature]
initial_condition = 525.0
[]
[temperature_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[Modules]
[TensorMechanics/Master]
[steel]
strain = SMALL
add_variables = false
use_automatic_differentiation = true
additional_generate_output = 'vonmises_stress'
additional_material_output_family = 'MONOMIAL'
additional_material_output_order = 'FIRST'
block = 'left_block'
[]
[aluminum]
strain = SMALL
add_variables = false
use_automatic_differentiation = true
additional_generate_output = 'vonmises_stress'
additional_material_output_family = 'MONOMIAL'
additional_material_output_order = 'FIRST'
block = 'right_block'
[]
[]
[]
[Kernels]
[HeatDiff_steel]
type = ADHeatConduction
variable = temperature
thermal_conductivity = steel_thermal_conductivity
block = 'left_block'
[]
[HeatTdot_steel]
type = ADHeatConductionTimeDerivative
variable = temperature
specific_heat = steel_heat_capacity
density_name = steel_density
block = 'left_block'
[]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
block = 'right_block'
[]
[HeatTdot_aluminum]
type = ADHeatConductionTimeDerivative
variable = temperature
specific_heat = aluminum_heat_capacity
density_name = aluminum_density
block = 'right_block'
[]
[]
[BCs]
[fixed_bottom_edge]
type = ADDirichletBC
variable = disp_y
value = 0
boundary = 'moving_block_bottom fixed_block_bottom'
[]
[fixed_outer_edge]
type = ADDirichletBC
variable = disp_x
value = 0
boundary = 'fixed_block_right'
[]
[displacement_left_block]
type = ADFunctionDirichletBC
variable = disp_x
function = 'if(t<61, 2.0e-7, -2.0e-8*(t-60))'
boundary = 'moving_block_left'
[]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 800
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 250
boundary = 'fixed_block_right'
[]
[]
[Contact]
[interface]
primary = moving_block_right
secondary = fixed_block_left
model = frictionless
formulation = mortar
correct_edge_dropping = true
[]
[]
[Constraints]
[thermal_contact]
type = ModularGapConductanceConstraint
variable = temperature_interface_lm
secondary_variable = temperature
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'radiation closed'
use_displaced_mesh = true
[]
[]
[Materials]
[steel_elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1.93e11 #in Pa, 193 GPa, stainless steel 304
poissons_ratio = 0.29
block = 'left_block'
[]
[steel_stress]
type = ADComputeLinearElasticStress
block = 'left_block'
[]
[steel_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'steel_density steel_thermal_conductivity steel_heat_capacity'
prop_values = ' 8e3 16.2 0.5' ## for stainless steel 304
block = 'left_block'
[]
[aluminum_elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 6.8e10 #in Pa, 68 GPa, aluminum
poissons_ratio = 0.36
block = 'right_block'
[]
[aluminum_stress]
type = ADComputeLinearElasticStress
block = 'right_block'
[]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity'
prop_values = ' 2.7e3 210 0.9'
block = 'right_block'
[]
[]
[UserObjects]
[radiation]
type = GapFluxModelRadiation
secondary_emissivity = 0.25
primary_emissivity = 0.6
temperature = temperature
boundary = moving_block_right
[]
[closed]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_thermal_conductivity
secondary_conductivity = aluminum_thermal_conductivity
temperature = temperature
contact_pressure = interface_normal_lm
primary_hardness = 1.0
secondary_hardness = 1.0
boundary = moving_block_right
[]
[]
[Postprocessors]
[steel_pt_interface_temperature]
type = NodalVariableValue
nodeid = 245
variable = temperature
[]
[aluminum_pt_interface_temperature]
type = NodalVariableValue
nodeid = 657
variable = temperature
[]
[aluminum_element_interface_stress]
type = ElementalVariableValue
variable = vonmises_stress
elementid = 560
[]
[interface_heat_flux_steel]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = moving_block_right
diffusivity = steel_thermal_conductivity
[]
[interface_heat_flux_aluminum]
type = ADSideDiffusiveFluxAverage
variable = temperature
boundary = fixed_block_left
diffusivity = aluminum_thermal_conductivity
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
# mortar contact solver options
petsc_options = '-snes_converged_reason -pc_svd_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = ' lu superlu_dist'
snesmf_reuse_base = false
nl_rel_tol = 1e-10
nl_max_its = 20
l_max_its = 50
dt = 60
end_time = 120
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d-rz/finite_action.i)
E_block = 1e7
E_plank = 1e7
elem = QUAD4
order = FIRST
name = 'finite'
[Mesh]
patch_size = 80
patch_update_strategy = auto
coord_type = RZ
[plank]
type = GeneratedMeshGenerator
dim = 2
xmin = 0
xmax = 0.6
ymin = -10
ymax = 10
nx = 2
ny = 67
elem_type = ${elem}
boundary_name_prefix = plank
[]
[plank_id]
type = SubdomainIDGenerator
input = plank
subdomain_id = 1
[]
[block]
type = GeneratedMeshGenerator
dim = 2
xmin = 0.61
xmax = 1.21
ymin = 7.7
ymax = 8.5
nx = 3
ny = 4
elem_type = ${elem}
boundary_name_prefix = block
boundary_id_offset = 10
[]
[block_id]
type = SubdomainIDGenerator
input = block
subdomain_id = 2
[]
[combined]
type = MeshCollectionGenerator
inputs = 'plank_id block_id'
[]
[block_rename]
type = RenameBlockGenerator
input = combined
old_block = '1 2'
new_block = 'plank block'
[]
[]
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Variables]
[disp_x]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[disp_y]
order = ${order}
block = 'plank block'
scaling = ${fparse 2.0 / (E_plank + E_block)}
[]
[temp]
order = ${order}
block = 'plank block'
scaling = 1e-1
[]
[]
[Modules/TensorMechanics/Master]
[action]
generate_output = 'stress_xx stress_yy stress_zz vonmises_stress hydrostatic_stress strain_xx strain_yy strain_zz'
block = 'plank block'
use_automatic_differentiation = true
strain = FINITE
[]
[]
[Kernels]
[hc]
type = ADHeatConduction
variable = temp
use_displaced_mesh = true
block = 'plank block'
[]
[]
[Contact]
[frictionless]
primary = plank_right
secondary = block_left
formulation = mortar
c_normal = 1e6
[]
[]
[MortarGapHeatTransfer]
[mortar_heat_transfer]
temperature = temp
use_displaced_mesh = true
gap_flux_options = conduction
gap_conductivity = 1
boundary = plank_right
primary_boundary = plank_right
primary_subdomain = frictionless_primary_subdomain
secondary_boundary = block_left
secondary_subdomain = frictionless_secondary_subdomain
thermal_lm_scaling = 1e-7
gap_geometry_type = PLATE
[]
[]
[BCs]
[left_temp]
type = DirichletBC
variable = temp
boundary = 'plank_left'
value = 400
[]
[right_temp]
type = DirichletBC
variable = temp
boundary = 'block_right'
value = 300
[]
[left_x]
type = DirichletBC
variable = disp_x
boundary = plank_left
value = 0.0
[]
[left_y]
type = DirichletBC
variable = disp_y
boundary = plank_bottom
value = 0.0
[]
[right_x]
type = ADFunctionDirichletBC
variable = disp_x
boundary = block_right
function = '-0.04*sin(4*(t+1.5))+0.02'
preset = false
[]
[right_y]
type = ADFunctionDirichletBC
variable = disp_y
boundary = block_right
function = '-t'
preset = false
[]
[]
[Materials]
[plank]
type = ADComputeIsotropicElasticityTensor
block = 'plank'
poissons_ratio = 0.3
youngs_modulus = ${E_plank}
[]
[block]
type = ADComputeIsotropicElasticityTensor
block = 'block'
poissons_ratio = 0.3
youngs_modulus = ${E_block}
[]
[stress]
type = ADComputeFiniteStrainElasticStress
block = 'plank block'
[]
[heat_plank]
type = ADHeatConductionMaterial
block = plank
thermal_conductivity = 2
specific_heat = 1
[]
[heat_block]
type = ADHeatConductionMaterial
block = block
thermal_conductivity = 1
specific_heat = 1
[]
[]
[Executioner]
type = Transient
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason'
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_shift_amount -snes_max_it'
petsc_options_value = 'lu NONZERO 1e-15 20'
end_time = 13.5
dt = 0.1
dtmin = 0.1
timestep_tolerance = 1e-6
line_search = 'none'
[]
[Postprocessors]
[nl_its]
type = NumNonlinearIterations
[]
[total_nl_its]
type = CumulativeValuePostprocessor
postprocessor = nl_its
[]
[l_its]
type = NumLinearIterations
[]
[total_l_its]
type = CumulativeValuePostprocessor
postprocessor = l_its
[]
[contact]
type = ContactDOFSetSize
variable = frictionless_normal_lm
subdomain = frictionless_secondary_subdomain
[]
[avg_hydro]
type = ElementAverageValue
variable = hydrostatic_stress
block = 'block'
[]
[avg_temp]
type = ElementAverageValue
variable = temp
block = 'block'
[]
[max_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
[]
[min_hydro]
type = ElementExtremeValue
variable = hydrostatic_stress
block = 'block'
value_type = min
[]
[avg_vonmises]
type = ElementAverageValue
variable = vonmises_stress
block = 'block'
[]
[max_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
[]
[min_vonmises]
type = ElementExtremeValue
variable = vonmises_stress
block = 'block'
value_type = min
[]
[]
[Outputs]
file_base = ${name}
[comp]
type = CSV
show = 'contact avg_temp'
[]
[out]
type = CSV
file_base = '${name}_out'
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/heat_transfer/test/tests/conjugate_heat_transfer/conjugate_heat_transfer.i)
[Mesh]
type = FileMesh
file = simple_pb.e
[]
[Variables]
[./temp_wall]
block = 'left right'
[../]
[./temp_fluid]
block = 'center'
[../]
[]
[Kernels]
[./wall_conduction]
type = ADHeatConduction
variable = temp_wall
[../]
[./heat_source]
type = HeatSource
value = 1e3 # W/m^3
variable = temp_fluid
block = 'center'
[../]
[./center_conduction]
type = ADHeatConduction
variable = temp_fluid
block = 'center'
[../]
[]
[BCs]
[./right]
type = DirichletBC
variable = temp_wall
boundary = 'right'
value = 300
[../]
[./left]
type = DirichletBC
variable = temp_wall
boundary = 'left'
value = 100
[../]
[]
[Executioner]
type = Steady
solve_type = PJFNK
[]
[Outputs]
exodus = true
[]
[Materials]
[./walls]
type = ADHeatConductionMaterial
thermal_conductivity = 10 # W/m k
block = 'left right'
specific_heat = .49e3 # J/kg k
[../]
[./pb]
type = ADHeatConductionMaterial
thermal_conductivity = 1
specific_heat = .49e3 # J/kg K
block = 'center'
[../]
[./alpha_wall]
type = ADGenericConstantMaterial
prop_names = 'alpha_wall'
prop_values = '1'
block = 'center'
[../]
[]
[InterfaceKernels]
[./left_center_wrt_center]
type = ConjugateHeatTransfer
variable = temp_fluid
T_fluid = temp_fluid
neighbor_var = 'temp_wall'
boundary = 'left_center_wrt_center'
htc = 'alpha_wall'
[../]
[./right_center_wrt_center]
type = ConjugateHeatTransfer
variable = temp_fluid
T_fluid = temp_fluid
neighbor_var = 'temp_wall'
boundary = 'right_center_wrt_center'
htc = 'alpha_wall'
[../]
[]
[Preconditioning]
[./Hypre]
type = SMP
petsc_options_value = 'lu hypre'
full = true
petsc_options_iname = '-pc_type -pc_hypre_type'
[../]
[]
(tutorials/darcy_thermo_mech/step06_coupled_darcy_heat_conduction/tests/kernels/darcy_advection/darcy_advection.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 200
ny = 10
xmax = 0.304 # Length of test chamber
ymax = 0.0257 # Test chamber radius
[]
coord_type = RZ
rz_coord_axis = X
[]
[Variables]
[temperature]
initial_condition = 300 # Start at room temperature
[]
[]
[AuxVariables]
[pressure]
initial_condition = 10000
[]
[]
[Kernels]
[heat_conduction]
type = ADHeatConduction
variable = temperature
[]
[heat_conduction_time_derivative]
type = ADHeatConductionTimeDerivative
variable = temperature
[]
[heat_convection]
type = DarcyAdvection
variable = temperature
pressure = pressure
[]
[]
[BCs]
[inlet_temperature]
type = DirichletBC
variable = temperature
boundary = left
value = 350
[]
[outlet_temperature]
type = HeatConductionOutflow
variable = temperature
boundary = right
[]
[]
[Materials]
[column]
type = PackedColumn
radius = 1
temperature = temperature
[]
[]
[Problem]
type = FEProblem
[]
[Executioner]
type = Transient
num_steps = 10
dt = 0.1
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/heat_transfer/test/tests/recover/ad_recover.i)
[GlobalParams]
order = SECOND
family = LAGRANGE
[]
[Problem]
coord_type = RZ
[]
[Mesh]
file = recover_in.e
[]
[Variables]
[./temp]
initial_condition = 580.0
[../]
[]
[AuxVariables]
[./gap_cond]
order = CONSTANT
family = MONOMIAL
[../]
[]
[Kernels]
[./heat]
type = ADHeatConduction
variable = temp
[../]
[./heat_source]
type = ADMatHeatSource
material_property = volumetric_heat
variable = temp
scalar = 1e3
block = pellet_type_1
[../]
[]
[ThermalContact]
[./thermal_contact]
type = GapHeatTransfer
variable = temp
primary = 5
secondary = 10
emissivity_primary = 0
emissivity_secondary = 0
quadrature = true
[../]
[]
[BCs]
[./outside]
type = DirichletBC
value = 580
boundary = '1 2 3'
variable = temp
[../]
[./edge]
type = DirichletBC
value = 700
boundary = 10
variable = temp
[../]
[]
[Materials]
[./volumetric_heat]
type = ADGenericFunctionMaterial
prop_names = 'volumetric_heat'
prop_values = 't'
[../]
[./thermal_3]
type = ADHeatConductionMaterial
block = 3
thermal_conductivity = 5
specific_heat = 12
[../]
[./thermal_1]
type = ADHeatConductionMaterial
block = 1
thermal_conductivity = 16.0
specific_heat = 330.0
[../]
[]
[Executioner]
type = Transient
solve_type = 'PJFNK'
petsc_options = '-snes_ksp_ew'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_package'
petsc_options_value = ' lu superlu_dist'
nl_rel_tol = 1e-9
nl_abs_tol = 1e-11
start_time = -200
n_startup_steps = 1
end_time = 1.02e5
num_steps = 10
dtmax = 2e6
dtmin = 1
[./TimeStepper]
type = IterationAdaptiveDT
dt = 2.0e2
optimal_iterations = 15
iteration_window = 2
[../]
[./Quadrature]
order = FIFTH
side_order = SEVENTH
[../]
[]
[Postprocessors]
[./ave_temp_interior]
type = SideAverageValue
boundary = 9
variable = temp
execute_on = 'initial linear'
[../]
[./avg_clad_temp]
type = SideAverageValue
boundary = 7
variable = temp
execute_on = 'initial timestep_end'
[../]
[./flux_from_clad]
type = ADSideDiffusiveFluxIntegral
variable = temp
boundary = 5
diffusivity = thermal_conductivity
[../]
[./_dt]
type = TimestepSize
[../]
[]
[Outputs]
exodus = true
[]
(tutorials/darcy_thermo_mech/step06_coupled_darcy_heat_conduction/problems/step6b_transient_inflow.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 200
ny = 10
xmax = 0.304 # Length of test chamber
ymax = 0.0257 # Test chamber radius
[]
coord_type = RZ
rz_coord_axis = X
[]
[Variables]
[pressure]
[]
[temperature]
initial_condition = 300 # Start at room temperature
[]
[]
[AuxVariables]
[velocity]
order = CONSTANT
family = MONOMIAL_VEC
[]
[]
[Kernels]
[darcy_pressure]
type = DarcyPressure
variable = pressure
[]
[heat_conduction]
type = ADHeatConduction
variable = temperature
[]
[heat_conduction_time_derivative]
type = ADHeatConductionTimeDerivative
variable = temperature
[]
[heat_convection]
type = DarcyAdvection
variable = temperature
pressure = pressure
[]
[]
[AuxKernels]
[velocity]
type = DarcyVelocity
variable = velocity
execute_on = timestep_end
pressure = pressure
[]
[]
[Functions]
[inlet_function]
type = ParsedFunction
expression = 2000*sin(0.466*pi*t) # Inlet signal from Fig. 3
[]
[outlet_function]
type = ParsedFunction
expression = 2000*cos(0.466*pi*t) # Outlet signal from Fig. 3
[]
[]
[BCs]
[inlet]
type = FunctionDirichletBC
variable = pressure
boundary = left
function = inlet_function
[]
[outlet]
type = FunctionDirichletBC
variable = pressure
boundary = right
function = outlet_function
[]
[inlet_temperature]
type = FunctionDirichletBC
variable = temperature
boundary = left
function = 'if(t<0,350+50*t,350)'
[]
[outlet_temperature]
type = HeatConductionOutflow
variable = temperature
boundary = right
[]
[]
[Materials]
[column]
type = PackedColumn
radius = 1
temperature = temperature
fluid_viscosity_file = data/water_viscosity.csv
fluid_density_file = data/water_density.csv
fluid_thermal_conductivity_file = data/water_thermal_conductivity.csv
fluid_specific_heat_file = data/water_specific_heat.csv
outputs = exodus
[]
[]
[Problem]
type = FEProblem
[]
[Executioner]
type = Transient
solve_type = NEWTON
automatic_scaling = true
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
end_time = 100
dt = 0.25
start_time = -1
steady_state_tolerance = 1e-5
steady_state_detection = true
[TimeStepper]
type = FunctionDT
function = 'if(t<0,0.1,(2*pi/(0.466*pi))/16)' # dt to always hit the peaks of sine/cosine BC
[]
[]
[Outputs]
exodus = true
[]
(modules/navier_stokes/examples/laser-welding/2d.i)
endtime=5e-4 # s
timestep=${fparse endtime/100} # s
surfacetemp=300 # K
power=190 # W
R=1.8257418583505537e-4 # m
[Mesh]
type = GeneratedMesh
dim = 2
xmin = -.45e-3 # m
xmax = 0.45e-3 # m
ymin = -.9e-4 # m
ymax = 0
nx = 25
ny = 5
displacements = 'disp_x disp_y'
[]
[GlobalParams]
temperature = T
[]
[Variables]
[vel]
family = LAGRANGE_VEC
[]
[T]
[]
[p]
[]
[disp_x]
[]
[disp_y]
[]
[]
[AuxVariables]
[vel_x_aux]
[InitialCondition]
type = ConstantIC
value = 1e-15
[]
[]
[vel_y_aux]
[InitialCondition]
type = ConstantIC
value = 1e-15
[]
[]
[]
[AuxKernels]
[vel_x_value]
type = VectorVariableComponentAux
variable = vel_x_aux
vector_variable = vel
component = x
[]
[vel_y_value]
type = VectorVariableComponentAux
variable = vel_y_aux
vector_variable = vel
component = y
[]
[]
[ICs]
[T]
type = FunctionIC
variable = T
function = '(${surfacetemp} - 300) / .7e-3 * y + ${surfacetemp}'
[]
[]
[Kernels]
[disp_x]
type = Diffusion
variable = disp_x
[]
[disp_y]
type = Diffusion
variable = disp_y
[]
[mass]
type = INSADMass
variable = p
use_displaced_mesh = true
[]
[mass_pspg]
type = INSADMassPSPG
variable = p
use_displaced_mesh = true
[]
[momentum_time]
type = INSADMomentumTimeDerivative
variable = vel
use_displaced_mesh = true
[]
[momentum_advection]
type = INSADMomentumAdvection
variable = vel
use_displaced_mesh = true
[]
[momentum_mesh_advection]
type = INSADMomentumMeshAdvection
variable = vel
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
[]
[momentum_viscous]
type = INSADMomentumViscous
variable = vel
use_displaced_mesh = true
[]
[momentum_pressure]
type = INSADMomentumPressure
variable = vel
pressure = p
integrate_p_by_parts = true
use_displaced_mesh = true
[]
[momentum_supg]
type = INSADMomentumSUPG
variable = vel
material_velocity = relative_velocity
use_displaced_mesh = true
[]
[temperature_time]
type = INSADHeatConductionTimeDerivative
variable = T
use_displaced_mesh = true
[]
[temperature_advection]
type = INSADEnergyAdvection
variable = T
use_displaced_mesh = true
[]
[temperature_mesh_advection]
type = INSADEnergyMeshAdvection
variable = T
disp_x = disp_x
disp_y = disp_y
use_displaced_mesh = true
[]
[temperature_conduction]
type = ADHeatConduction
variable = T
thermal_conductivity = 'k'
use_displaced_mesh = true
[]
[temperature_supg]
type = INSADEnergySUPG
variable = T
velocity = vel
use_displaced_mesh = true
[]
[]
[BCs]
[x_no_disp]
type = DirichletBC
variable = disp_x
boundary = 'bottom'
value = 0
[]
[y_no_disp]
type = DirichletBC
variable = disp_y
boundary = 'bottom'
value = 0
[]
[no_slip]
type = ADVectorFunctionDirichletBC
variable = vel
boundary = 'bottom right left'
[]
[T_cold]
type = DirichletBC
variable = T
boundary = 'bottom'
value = 300
[]
[radiation_flux]
type = FunctionRadiativeBC
variable = T
boundary = 'top'
emissivity_function = '1'
Tinfinity = 300
stefan_boltzmann_constant = 5.67e-8
use_displaced_mesh = true
[]
[weld_flux]
type = GaussianEnergyFluxBC
variable = T
boundary = 'top'
P0 = ${power}
R = ${R}
x_beam_coord = '-0.35e-3 +0.7e-3*t/${endtime}'
y_beam_coord = '0'
use_displaced_mesh = true
[]
[vapor_recoil]
type = INSADVaporRecoilPressureMomentumFluxBC
variable = vel
boundary = 'top'
use_displaced_mesh = true
[]
[displace_x_top]
type = INSADDisplaceBoundaryBC
boundary = 'top'
variable = 'disp_x'
velocity = 'vel'
component = 0
associated_subdomain = 0
[]
[displace_y_top]
type = INSADDisplaceBoundaryBC
boundary = 'top'
variable = 'disp_y'
velocity = 'vel'
component = 1
associated_subdomain = 0
[]
[displace_x_top_dummy]
type = INSADDummyDisplaceBoundaryIntegratedBC
boundary = 'top'
variable = 'disp_x'
velocity = 'vel'
component = 0
[]
[displace_y_top_dummy]
type = INSADDummyDisplaceBoundaryIntegratedBC
boundary = 'top'
variable = 'disp_y'
velocity = 'vel'
component = 1
[]
[]
[Materials]
[ins_mat]
type = INSADStabilized3Eqn
velocity = vel
pressure = p
temperature = T
use_displaced_mesh = true
[]
[steel]
type = AriaLaserWeld304LStainlessSteel
temperature = T
beta = 1e7
use_displaced_mesh = true
[]
[steel_boundary]
type = AriaLaserWeld304LStainlessSteelBoundary
boundary = 'top'
temperature = T
use_displaced_mesh = true
[]
[const]
type = GenericConstantMaterial
prop_names = 'abs sb_constant'
prop_values = '1 5.67e-8'
use_displaced_mesh = true
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
petsc_options_iname = '-pc_type -pc_factor_shift_type -pc_factor_mat_solver_type'
petsc_options_value = 'lu NONZERO strumpack'
[]
[]
[Executioner]
type = Transient
end_time = ${endtime}
dtmin = 1e-8
dtmax = ${timestep}
petsc_options = '-snes_converged_reason -ksp_converged_reason -options_left'
solve_type = 'NEWTON'
line_search = 'none'
nl_max_its = 12
l_max_its = 100
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 7
dt = ${timestep}
linear_iteration_ratio = 1e6
growth_factor = 1.5
[]
[]
[Outputs]
[exodus]
type = Exodus
output_material_properties = true
show_material_properties = 'mu'
[]
checkpoint = true
perf_graph = true
[]
[Debug]
show_var_residual_norms = true
[]
[Adaptivity]
marker = combo
max_h_level = 4
[Indicators]
[error_T]
type = GradientJumpIndicator
variable = T
[]
[error_dispz]
type = GradientJumpIndicator
variable = disp_y
[]
[]
[Markers]
[errorfrac_T]
type = ErrorFractionMarker
refine = 0.4
coarsen = 0.2
indicator = error_T
[]
[errorfrac_dispz]
type = ErrorFractionMarker
refine = 0.4
coarsen = 0.2
indicator = error_dispz
[]
[combo]
type = ComboMarker
markers = 'errorfrac_T errorfrac_dispz'
[]
[]
[]
[Postprocessors]
[num_dofs]
type = NumDOFs
system = 'NL'
[]
[nl]
type = NumNonlinearIterations
[]
[tot_nl]
type = CumulativeValuePostprocessor
postprocessor = 'nl'
[]
[]
(modules/thermal_hydraulics/include/kernels/ADHeatConductionRZ.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 "ADHeatConduction.h"
#include "RZSymmetry.h"
/**
* Heat conduction kernel in arbitrary RZ symmetry
*/
class ADHeatConductionRZ : public ADHeatConduction, public RZSymmetry
{
public:
ADHeatConductionRZ(const InputParameters & parameters);
protected:
virtual ADRealVectorValue precomputeQpResidual();
public:
static InputParameters validParams();
};