- 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
ADHeatConductionTimeDerivative
Description
The ADHeatConductionTimeDerivative
kernel implements a time derivative for the domain given by
where is the material density, is the specific heat, and the second term on the left hand side corresponds to the strong forms of other kernels. The corresponding ADHeatConductionTimeDerivative
weak form using inner-product notation is
where is the approximate solution and is a finite element test function.
The Jacobian is given by automatic differentiation, and should be perfect as long as and are provided using ADMaterial
derived objects.
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
- density_namedensityProperty name of the density material property
Default:density
C++ Type:MaterialPropertyName
Controllable:No
Description:Property name of the density material property
- 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.
- specific_heatspecific_heatProperty name of the specific heat material property
Default:specific_heat
C++ Type:MaterialPropertyName
Controllable:No
Description:Property name of the specific heat 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_tagssystem timeThe tag for the matrices this Kernel should fill
Default:system time
C++ Type:MultiMooseEnum
Options:nontime, system, time
Controllable:No
Description:The tag for the matrices this Kernel should fill
- vector_tagstimeThe tag for the vectors this Kernel should fill
Default:time
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/ad_heat_conduction/test.i)
- (modules/combined/test/tests/3d-mortar-projection-tolerancing/test.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/varied_pressure_thermomechanical_mortar.i)
- (modules/thermal_hydraulics/test/tests/components/file_mesh_component/file_mesh_component.i)
- (tutorials/darcy_thermo_mech/step07_adaptivity/problems/step7b_fine.i)
- (tutorials/darcy_thermo_mech/step06_coupled_darcy_heat_conduction/problems/step6a_coupled.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/small-2d/closed_gap_pressure_dependent_thermal_contact.i)
- (modules/thermal_hydraulics/test/tests/components/hs_boundary_external_app_heat_flux/main.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/small-2d/multi_component_mortar_thermal_conduction.i)
- (tutorials/darcy_thermo_mech/step07_adaptivity/problems/step7d_adapt_blocks.i)
- (modules/heat_transfer/test/tests/joule_heating/transient_ad_jouleheating.i)
- (tutorials/darcy_thermo_mech/step09_mechanics/problems/step9.i)
- (tutorials/darcy_thermo_mech/step06_coupled_darcy_heat_conduction/problems/step6c_decoupled.i)
- (modules/heat_transfer/test/tests/verify_against_analytical/ad_1D_transient.i)
- (modules/fsi/test/tests/2d-finite-strain-steady/thermal-me.i)
- (modules/solid_properties/test/tests/problems/heat_conduction/heat_conduction.i)
- (tutorials/darcy_thermo_mech/step08_postprocessors/problems/step8.i)
- (tutorials/darcy_thermo_mech/step07_adaptivity/problems/step7a_coarse.i)
- (modules/heat_transfer/test/tests/interface_heating_mortar/transient_joule_heating_constraint.i)
- (tutorials/darcy_thermo_mech/step05_heat_conduction/problems/step5c_outflow.i)
- (tutorials/darcy_thermo_mech/step06_coupled_darcy_heat_conduction/problems/step6b_transient_inflow.i)
- (tutorials/darcy_thermo_mech/step06_coupled_darcy_heat_conduction/tests/kernels/darcy_advection/darcy_advection.i)
- (modules/combined/test/tests/gap_heat_transfer_mortar/finite-2d/closed_gap_thermomechanical_mortar_contact.i)
- (modules/heat_transfer/test/tests/function_ellipsoid_heat_source/function_heat_source.i)
- (modules/thermal_hydraulics/test/tests/jacobians/materials/ad_solid_material.i)
- (tutorials/darcy_thermo_mech/step10_multiapps/problems/step10.i)
- (tutorials/darcy_thermo_mech/step05_heat_conduction/problems/step5b_transient.i)
- (tutorials/darcy_thermo_mech/step07_adaptivity/problems/step7c_adapt.i)
- (tutorials/darcy_thermo_mech/step05_heat_conduction/tests/bcs/outflow/outflow.i)
Child Objects
(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/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/varied_pressure_thermomechanical_mortar.i)
## Units in the input file: m-Pa-s-K
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
[left_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 10
xmax = 0.25
ymin = 0
ymax = 0.5
boundary_name_prefix = moving_block
[]
[left_block]
type = SubdomainIDGenerator
input = left_rectangle
subdomain_id = 1
[]
[right_rectangle]
type = GeneratedMeshGenerator
dim = 2
nx = 20
ny = 13
xmin = 0.25
xmax = 0.5
ymin = 0
ymax = 0.5
boundary_name_prefix = fixed_block
boundary_id_offset = 4
[]
[right_block]
type = SubdomainIDGenerator
input = right_rectangle
subdomain_id = 2
[]
[two_blocks]
type = MeshCollectionGenerator
inputs = 'left_block right_block'
[]
[block_rename]
type = RenameBlockGenerator
input = two_blocks
old_block = '1 2'
new_block = 'left_block right_block'
[]
patch_update_strategy = iteration
[]
[Variables]
[disp_x]
block = 'left_block right_block'
[]
[disp_y]
block = 'left_block right_block'
[]
[temperature]
initial_condition = 300.0
[]
[temperature_interface_lm]
block = 'interface_secondary_subdomain'
[]
[]
[Modules]
[TensorMechanics/Master]
[steel]
strain = FINITE
add_variables = false
use_automatic_differentiation = true
generate_output = 'strain_xx strain_xy strain_yy stress_xx stress_xy stress_yy'
additional_generate_output = 'vonmises_stress'
additional_material_output_family = 'MONOMIAL'
additional_material_output_order = 'FIRST'
block = 'left_block'
[]
[aluminum]
strain = FINITE
add_variables = false
use_automatic_differentiation = true
generate_output = 'strain_xx strain_xy strain_yy stress_xx stress_xy stress_yy'
additional_generate_output = 'vonmises_stress'
additional_material_output_family = 'MONOMIAL'
additional_material_output_order = 'FIRST'
block = 'right_block'
[]
[]
[]
[Kernels]
[HeatDiff_steel]
type = ADHeatConduction
variable = temperature
thermal_conductivity = steel_thermal_conductivity
block = 'left_block'
[]
[HeatTdot_steel]
type = ADHeatConductionTimeDerivative
variable = temperature
specific_heat = steel_heat_capacity
density_name = steel_density
block = 'left_block'
[]
[HeatDiff_aluminum]
type = ADHeatConduction
variable = temperature
thermal_conductivity = aluminum_thermal_conductivity
block = 'right_block'
[]
[HeatTdot_aluminum]
type = ADHeatConductionTimeDerivative
variable = temperature
specific_heat = aluminum_heat_capacity
density_name = aluminum_density
block = 'right_block'
[]
[]
[BCs]
[fixed_bottom_edge]
type = ADDirichletBC
variable = disp_y
value = 0
boundary = 'moving_block_bottom fixed_block_bottom'
[]
[fixed_outer_edge]
type = ADDirichletBC
variable = disp_x
value = 0
boundary = 'fixed_block_right'
[]
[pressure_left_block]
type = ADPressure
variable = disp_x
component = 0
boundary = 'moving_block_left'
function = '1e4*t*y'
[]
[temperature_left]
type = ADDirichletBC
variable = temperature
value = 300
boundary = 'moving_block_left'
[]
[temperature_right]
type = ADDirichletBC
variable = temperature
value = 800
boundary = 'fixed_block_right'
[]
[]
[Contact]
[interface]
primary = moving_block_right
secondary = fixed_block_left
model = frictionless
formulation = mortar
correct_edge_dropping = true
[]
[]
[Constraints]
[thermal_contact]
type = ModularGapConductanceConstraint
variable = temperature_interface_lm
secondary_variable = temperature
primary_boundary = moving_block_right
primary_subdomain = interface_primary_subdomain
secondary_boundary = fixed_block_left
secondary_subdomain = interface_secondary_subdomain
gap_flux_models = 'closed'
use_displaced_mesh = true
[]
[]
[Materials]
[steel_elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 1.93e11 #in Pa, 193 GPa, stainless steel 304
poissons_ratio = 0.29
block = 'left_block'
[]
[steel_stress]
type = ADComputeFiniteStrainElasticStress
block = 'left_block'
[]
[steel_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'steel_density steel_thermal_conductivity steel_heat_capacity steel_hardness'
prop_values = ' 8e3 16.2 0.5 129' ## for stainless steel 304
block = 'left_block'
[]
[aluminum_elasticity_tensor]
type = ADComputeIsotropicElasticityTensor
youngs_modulus = 6.8e10 #in Pa, 68 GPa, aluminum
poissons_ratio = 0.36
block = 'right_block'
[]
[aluminum_stress]
type = ADComputeFiniteStrainElasticStress
block = 'right_block'
[]
[aluminum_thermal_properties]
type = ADGenericConstantMaterial
prop_names = 'aluminum_density aluminum_thermal_conductivity aluminum_heat_capacity aluminum_hardness'
prop_values = ' 2.7e3 210 0.9 15' #for 99% pure Al
block = 'right_block'
[]
[]
[UserObjects]
[closed]
type = GapFluxModelPressureDependentConduction
primary_conductivity = steel_thermal_conductivity
secondary_conductivity = aluminum_thermal_conductivity
temperature = temperature
contact_pressure = interface_normal_lm
primary_hardness = steel_hardness
secondary_hardness = aluminum_hardness
boundary = moving_block_right
[]
[]
[Postprocessors]
[contact_pressure_max]
type = NodalExtremeValue
variable = interface_normal_lm
block = interface_secondary_subdomain
value_type = max
[]
[contact_pressure_average]
type = AverageNodalVariableValue
variable = interface_normal_lm
block = interface_secondary_subdomain
[]
[contact_pressure_min]
type = NodalExtremeValue
variable = interface_normal_lm
block = interface_secondary_subdomain
value_type = min
[]
[interface_temperature_max]
type = NodalExtremeValue
variable = temperature
block = interface_secondary_subdomain
value_type = max
[]
[interface_temperature_average]
type = AverageNodalVariableValue
variable = temperature
block = interface_secondary_subdomain
[]
[interface_temperature_min]
type = NodalExtremeValue
variable = temperature
block = interface_secondary_subdomain
value_type = min
[]
[]
[Executioner]
type = Transient
solve_type = NEWTON
automatic_scaling = false
line_search = 'none'
# mortar contact solver options
petsc_options = '-snes_converged_reason -pc_svd_monitor'
petsc_options_iname = '-pc_type -pc_factor_mat_solver_type'
petsc_options_value = ' lu superlu_dist'
snesmf_reuse_base = false
nl_rel_tol = 1e-7
nl_max_its = 20
l_max_its = 50
dt = 0.125
end_time = 1
[]
[Outputs]
csv = true
perf_graph = true
[]
(modules/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'
[]
[]
(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
[]
(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/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/thermal_hydraulics/test/tests/components/hs_boundary_external_app_heat_flux/main.i)
# Main input file.
#
# Run mesh.i first to produce a mesh file that this input uses:
#
# thermal_hydraulics-opt -i mesh.i --mesh-only mesh.e
length = 5.0
n_elems_axial = 10
rho_name = density
cp_name = specific_heat
k_name = thermal_conductivity
rho = 8000.0
cp = 500.0
k = 15.0
T_initial = 500.0
power = 1000.0
[Mesh]
type = FileMesh
file = mesh.e
[]
[Variables]
[T_solid]
[]
[]
[ICs]
[T_ic]
type = ConstantIC
variable = T_solid
value = ${T_initial}
[]
[]
[Kernels]
[time_derivative]
type = ADHeatConductionTimeDerivative
variable = T_solid
density_name = ${rho_name}
specific_heat = ${cp_name}
[]
[heat_conduction]
type = ADHeatConduction
variable = T_solid
thermal_conductivity = ${k_name}
[]
[]
[BCs]
[bc]
type = FunctorNeumannBC
variable = T_solid
boundary = 'inner'
functor = heat_flux_fn
flux_is_inward = false
[]
[]
[Materials]
[ad_constant_mat]
type = ADGenericConstantMaterial
prop_names = '${rho_name} ${cp_name} ${k_name}'
prop_values = '${rho} ${cp} ${k}'
[]
[]
[Functions]
[heat_flux_fn]
type = ParsedFunction
symbol_names = 'S'
symbol_values = 'inner_surface_area'
expression = '${power} / S'
[]
[]
[Postprocessors]
[inner_surface_area]
type = AreaPostprocessor
boundary = 'inner'
execute_on = 'INITIAL'
[]
[inner_perimeter]
type = ParsedPostprocessor
pp_names = 'inner_surface_area'
function = 'inner_surface_area / ${length}'
execute_on = 'INITIAL'
[]
[]
[MultiApps]
[sub]
type = TransientMultiApp
app_type = ThermalHydraulicsApp
input_files = 'sub.i'
positions = '0 0 0'
max_procs_per_app = 1
output_in_position = true
execute_on = 'TIMESTEP_END'
[]
[]
[UserObjects]
[layered_average_heat_flux]
type = NearestPointLayeredSideAverageFunctor
direction = z
points='0 0 0'
num_layers = ${n_elems_axial}
functor = heat_flux_fn
boundary = 'inner'
execute_on = 'TIMESTEP_END'
[]
[]
[Transfers]
[heat_flux_transfer]
type = MultiAppGeneralFieldUserObjectTransfer
to_multi_app = sub
source_user_object = layered_average_heat_flux
variable = q_ext
error_on_miss = true
[]
[perimeter_transfer]
type = MultiAppPostprocessorTransfer
to_multi_app = sub
from_postprocessor = inner_perimeter
to_postprocessor = P_ext
[]
[]
[Preconditioning]
[pc]
type = SMP
full = true
[]
[]
[Executioner]
type = Transient
scheme = bdf2
dt = 10.0
num_steps = 1
abort_on_solve_fail = true
solve_type = NEWTON
nl_abs_tol = 1e-10
nl_rel_tol = 1e-8
nl_max_its = 10
l_tol = 1e-3
l_max_its = 10
[]
(modules/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
[]
(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/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
[]
(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
[]
[]
(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/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/fsi/test/tests/2d-finite-strain-steady/thermal-me.i)
# Units: specific_heat_capacity--cp--J/(kg.K); density--rho--kg/(cm^3);
# dynamic_viscosity--mu--kg/(cm.s); thermal_conductivity--k--W/(cm.K);
# pressure--kg/(cm.s^2); force--kg.cm/s^2
outlet_pressure = 0
inlet_velocity = 150 # cm/s
ini_temp = 593 # K
heat_transfer_coefficient = 9 # W/(cm2.K)
g = -981 # cm/s2
alpha_fluid = 2e-4 # thermal expansion coefficient of fluid used in INSADBoussinesqBodyForce
[GlobalParams]
displacements = 'disp_x disp_y'
[]
[Mesh]
file = '2layers_2d_midline.msh'
[]
[Variables]
[velocity]
family = LAGRANGE_VEC
order = FIRST
block = 'fluid'
[]
[p]
family = LAGRANGE
order = FIRST
block = 'fluid'
[]
[Tf]
family = LAGRANGE
order = FIRST
block = 'fluid'
[]
[Ts]
family = LAGRANGE
order = FIRST
block = 'solid'
[]
[disp_x]
family = LAGRANGE
order = FIRST
block = 'solid fluid'
[]
[disp_y]
family = LAGRANGE
order = FIRST
block = 'solid fluid'
[]
[]
[AuxVariables]
[heat_source]
family = MONOMIAL
order = FIRST
block = 'solid'
[]
[]
[ICs]
[initial_velocity]
type = VectorConstantIC
variable = velocity
x_value = 0
y_value = ${inlet_velocity}
z_value = 0
[]
[initial_p]
type = FunctionIC
variable = p
function = ini_p
[]
[initial_Tf]
type = ConstantIC
variable = Tf
value = ${ini_temp}
[]
[initial_Ts]
type = ConstantIC
variable = Ts
value = ${ini_temp}
[]
[]
[Kernels]
[fluid_mass]
type = INSADMass
variable = p
use_displaced_mesh = true
[]
[fluid_mass_pspg]
type = INSADMassPSPG
variable = p
use_displaced_mesh = true
[]
[fluid_momentum_time]
type = INSADMomentumTimeDerivative
variable = velocity
use_displaced_mesh = true
[]
[fluid_momentum_convection]
type = INSADMomentumAdvection
variable = velocity
use_displaced_mesh = true
[]
[fluid_momentum_viscous]
type = INSADMomentumViscous
variable = velocity
use_displaced_mesh = true
[]
[fluid_momentum_pressure]
type = INSADMomentumPressure
variable = velocity
pressure = p
integrate_p_by_parts = true
use_displaced_mesh = true
[]
[fluid_momentum_gravity]
type = INSADGravityForce
variable = velocity
gravity = '0 ${g} 0'
use_displaced_mesh = true
[]
[fluid_momentum_buoyancy]
type = INSADBoussinesqBodyForce
variable = velocity
gravity = '0 ${g} 0'
alpha_name = 'alpha_fluid'
ref_temp = 'T_ref'
temperature = Tf
use_displaced_mesh = true
[]
[fluid_momentum_supg]
type = INSADMomentumSUPG
variable = velocity
velocity = velocity
use_displaced_mesh = true
[]
[fluid_temperature_time]
type = INSADHeatConductionTimeDerivative
variable = Tf
use_displaced_mesh = true
[]
[fluid_temperature_conduction]
type = ADHeatConduction
variable = Tf
thermal_conductivity = 'k'
use_displaced_mesh = true
[]
[fluid_temperature_advection]
type = INSADEnergyAdvection
variable = Tf
use_displaced_mesh = true
[]
[fluid_temperature_supg]
type = INSADEnergySUPG
variable = Tf
velocity = velocity
use_displaced_mesh = true
[]
[solid_temperature_time]
type = ADHeatConductionTimeDerivative
variable = Ts
density_name = 'rho'
specific_heat = 'cp'
block = 'solid'
use_displaced_mesh = true
[]
[solid_temperature_conduction]
type = ADHeatConduction
variable = Ts
thermal_conductivity = 'k'
block = 'solid'
use_displaced_mesh = true
[]
[heat_source]
type = ADCoupledForce
variable = Ts
v = heat_source
block = 'solid'
use_displaced_mesh = true
[]
[disp_x_smooth]
type = Diffusion
variable = disp_x
block = fluid
[]
[disp_y_smooth]
type = Diffusion
variable = disp_y
block = fluid
[]
[]
[Modules/TensorMechanics/Master]
strain = FINITE
material_output_order = FIRST
generate_output = 'vonmises_stress stress_xx stress_yy stress_zz strain_xx strain_yy strain_zz'
[solid]
block = 'solid'
temperature = Ts
automatic_eigenstrain_names = true
[]
[]
[InterfaceKernels]
[convection_heat_transfer]
type = ConjugateHeatTransfer
variable = Tf
T_fluid = Tf
neighbor_var = 'Ts'
boundary = 'solid_wall'
htc = 'htc'
use_displaced_mesh = true
[]
[]
[AuxKernels]
[heat_source_distribution_auxk]
type = FunctionAux
variable = heat_source
function = heat_source_distribution_function
block = 'solid'
use_displaced_mesh = true
[]
[]
[BCs]
[no_slip]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'solid_wall'
use_displaced_mesh = true
[]
[inlet_velocity]
type = VectorFunctionDirichletBC
variable = velocity
boundary = 'fluid_bottom'
function_y = ${inlet_velocity}
use_displaced_mesh = true
[]
[symmetry]
type = ADVectorFunctionDirichletBC
variable = velocity
boundary = 'fluid_wall'
function_x = 0
set_x_comp = true
set_y_comp = false
set_z_comp = false
use_displaced_mesh = true
[]
[outlet_p]
type = DirichletBC
variable = p
boundary = 'fluid_top'
value = ${outlet_pressure}
use_displaced_mesh = true
[]
[inlet_T]
type = DirichletBC
variable = Tf
boundary = 'fluid_bottom'
value = ${ini_temp}
use_displaced_mesh = true
[]
[pin1_y]
type = DirichletBC
variable = disp_y
boundary = 'pin1'
value = 0
use_displaced_mesh = true
[]
[pin1_x]
type = DirichletBC
variable = disp_x
boundary = 'pin1'
value = 0
use_displaced_mesh = true
[]
[top_and_bottom_y]
type = DirichletBC
variable = disp_y
boundary = 'solid_bottom solid_top fluid_top fluid_bottom'
value = 0
use_displaced_mesh = true
[]
[left_and_right_x]
type = DirichletBC
variable = disp_x
boundary = 'fluid_wall fluid_bottom'
value = 0
use_displaced_mesh = true
[]
[]
[Materials]
[rho_solid]
type = ADParsedMaterial
property_name = rho
expression = '0.0110876 * pow(9.9672e-1 + 1.179e-5 * Ts - 2.429e-9 * pow(Ts,2) + 1.219e-12 * pow(Ts,3),-3)'
coupled_variables = 'Ts'
block = 'solid'
use_displaced_mesh = true
[]
[cp_solid]
type = ADParsedMaterial
property_name = cp
expression = '0.76 * ((302.27 * pow((548.68 / Ts),2) * exp(548.68 / Ts)) / pow((exp(548.68 / Ts) - 1),2) + 2 * 8.463e-3 * Ts + 8.741e7 * 18531.7 * exp(-18531.7 / Ts) / pow(Ts,2)) + 0.24 * ((322.49 * pow((587.41/Ts),2) * exp(587.41 / Ts)) / pow((exp(587.41 / Ts) - 1),2) + 2 * 1.4679e-2 * Ts)'
coupled_variables = 'Ts'
block = 'solid'
use_displaced_mesh = true
[]
[k_solid]
type = ADParsedMaterial
property_name = k
expression = '1.158/(7.5408 + 17.692 * (Ts / 1000) + 3.6142 * pow((Ts/1000),2)) + 74.105 * pow((Ts / 1000),-2.5) * exp(-16.35 / (Ts / 1000))'
coupled_variables = 'Ts'
block = 'solid'
use_displaced_mesh = true
[]
[rho_fluid]
type = ADParsedMaterial
property_name = rho
expression = '(11096 - 1.3236 * Tf) * 1e-6'
coupled_variables = 'Tf'
block = 'fluid'
use_displaced_mesh = true
[]
[cp_fluid]
type = ADParsedMaterial
property_name = cp
expression = '159 - 2.72e-2 * Tf + 7.12e-6 * pow(Tf,2)'
coupled_variables = 'Tf'
block = 'fluid'
use_displaced_mesh = true
[]
[k_fluid]
type = ADParsedMaterial
property_name = k
expression = '(3.61 + 1.517e-2 * Tf - 1.741e-6 * pow(Tf,2)) * 1e-2'
coupled_variables = 'Tf'
block = 'fluid'
use_displaced_mesh = true
[]
[mu_fluid]
type = ADParsedMaterial
property_name = mu
expression = '4.94e-6 * exp(754.1/Tf)'
coupled_variables = 'Tf'
block = 'fluid'
use_displaced_mesh = true
[]
[buoyancy_thermal_expansion_coefficient_fluid]
type = ADGenericConstantMaterial
prop_names = 'alpha_fluid'
prop_values = '${alpha_fluid}'
block = 'fluid'
use_displaced_mesh = true
[]
[buoyancy_reference_temperature_fluid]
type = GenericConstantMaterial
prop_names = 'T_ref'
prop_values = '${ini_temp}'
block = 'fluid'
use_displaced_mesh = true
[]
[ins_mat_fluid]
type = INSADStabilized3Eqn
velocity = velocity
pressure = p
temperature = Tf
block = 'fluid'
use_displaced_mesh = true
[]
[htc]
type = ADGenericFunctionMaterial
prop_names = htc
prop_values = htc_function
use_displaced_mesh = true
[]
[elasticity_solid]
type = ComputeIsotropicElasticityTensor
youngs_modulus = 2e7
poissons_ratio = 0.32
block = 'solid'
use_displaced_mesh = true
[]
[thermal_expansion_solid]
type = ComputeThermalExpansionEigenstrain
temperature = Ts
thermal_expansion_coeff = 2e-4
stress_free_temperature = 593
eigenstrain_name = thermal_expansion
block = 'solid'
use_displaced_mesh = true
[]
[stress_solid]
type = ComputeFiniteStrainElasticStress
block = 'solid'
[]
[]
[Functions]
[htc_function]
type = ParsedFunction
expression = ${heat_transfer_coefficient}
[]
[ini_p]
type = ParsedFunction
expression = '0.010302 * 981 * (10 - y)'
[]
[heat_source_distribution_function]
type = ParsedFunction
expression = '300 * sin(pi * y / 10)'
[]
[]
[Preconditioning]
[SMP]
type = SMP
full = true
solve_type = 'PJFNK'
[]
[]
[Executioner]
type = Transient
end_time = 1e4
solve_type = 'NEWTON'
petsc_options = '-snes_converged_reason -ksp_converged_reason -snes_linesearch_monitor'
petsc_options_iname = '-pc_type -pc_factor_shift_type'
petsc_options_value = 'lu NONZERO'
line_search = 'none'
nl_max_its = 30
l_max_its = 100
automatic_scaling = true
compute_scaling_once = true
off_diagonals_in_auto_scaling = true
dtmin = 1
nl_abs_tol = 1e-12
[TimeStepper]
type = IterationAdaptiveDT
optimal_iterations = 6
growth_factor = 1.5
dt = 1
[]
[]
[Outputs]
[csv]
type = CSV
file_base = 'thermal-me'
execute_on = 'final'
[]
[]
[Postprocessors]
[average_solid_Ts]
type = ElementAverageValue
variable = Ts
block = 'solid'
use_displaced_mesh = true
[]
[average_fluid_Tf]
type = ElementAverageValue
variable = Tf
block = 'fluid'
use_displaced_mesh = true
[]
[max_solid_Ts]
type = ElementExtremeValue
variable = Ts
value_type = max
block = 'solid'
use_displaced_mesh = true
[]
[max_fluid_Tf]
type = ElementExtremeValue
variable = Tf
value_type = max
block = 'fluid'
use_displaced_mesh = true
[]
[min_solid_Ts]
type = ElementExtremeValue
variable = Ts
value_type = min
block = 'solid'
use_displaced_mesh = true
[]
[min_fluid_Tf]
type = ElementExtremeValue
variable = Tf
value_type = min
block = 'fluid'
use_displaced_mesh = true
[]
[]
[Debug]
show_var_residual_norms = true
[]
(modules/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
[]
(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
[]
(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/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/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/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
[]
(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/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/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/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
[]
(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
[]
[]
(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
[]
(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/tests/bcs/outflow/outflow.i)
[Mesh]
[gmg]
type = GeneratedMeshGenerator
dim = 2
nx = 30
ny = 5
xmax = 0.304 # Length of test chamber
ymax = 0.0257 # Test chamber radius
[]
coord_type = RZ
rz_coord_axis = X
[]
[Variables]
[temperature]
initial_condition = 300 # Start at room temperature
[]
[]
[Kernels]
[heat_conduction]
type = ADHeatConduction
variable = temperature
[]
[heat_conduction_time_derivative]
type = ADHeatConductionTimeDerivative
variable = temperature
[]
[]
[BCs]
[inlet_temperature]
type = DirichletBC
variable = temperature
boundary = left
value = 350 # (K)
[]
[outlet_temperature]
type = HeatConductionOutflow
variable = temperature
boundary = right
[]
[]
[Materials]
[steel]
type = ADGenericConstantMaterial
prop_names = 'thermal_conductivity specific_heat density'
prop_values = '18 466 8000' # W/m*K, J/kg-K, kg/m^3 @ 296K
[]
[]
[Problem]
type = FEProblem
[]
[Executioner]
type = Transient
num_steps = 2
solve_type = PJFNK
petsc_options_iname = '-pc_type -pc_hypre_type'
petsc_options_value = 'hypre boomeramg'
[]
[Outputs]
exodus = true
[]
(modules/thermal_hydraulics/include/kernels/ADHeatConductionTimeDerivativeRZ.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 "ADHeatConductionTimeDerivative.h"
#include "RZSymmetry.h"
/**
* Time derivative kernel used by heat conduction equation in arbitrary RZ symmetry
*/
class ADHeatConductionTimeDerivativeRZ : public ADHeatConductionTimeDerivative, public RZSymmetry
{
public:
ADHeatConductionTimeDerivativeRZ(const InputParameters & parameters);
protected:
virtual ADReal precomputeQpResidual();
public:
static InputParameters validParams();
};