Step 3a - Adding volumetric heating
In Step 3, we added the time-derivative term to the heat equation, and showed how including it allows for the solution of transient thermal problems. Some thermal problems also involve a volumetric heat source, which could arise due to a number of phenomena, including exothermic chemical reactions, nuclear fission, and resistive heating.
#
# Single block thermal input with time derivative and volumetric heat source terms
# https://mooseframework.inl.gov/modules/heat_transfer/tutorials/introduction/therm_step03.html
#
[Mesh]
[generated]
type = GeneratedMeshGenerator
dim = 2
nx = 10
ny = 10
xmax = 2
ymax = 1
[]
[]
[Variables]
[T]
initial_condition = 300.0
[]
[]
[Kernels]
[heat_conduction]
type = HeatConduction
variable = T
[]
[time_derivative]
type = HeatConductionTimeDerivative
variable = T
[]
[heat_source]
type = HeatSource
variable = T
value = 1e4
[]
[]
[Materials]
[thermal]
type = HeatConductionMaterial
thermal_conductivity = 45.0
specific_heat = 0.5
[]
[density]
type = GenericConstantMaterial
prop_names = 'density'
prop_values = 8000.0
[]
[]
[BCs]
[t_left]
type = DirichletBC
variable = T
value = 300
boundary = 'left'
[]
[t_right]
type = FunctionDirichletBC
variable = T
function = '300+5*t'
boundary = 'right'
[]
[]
[Executioner]
type = Transient
end_time = 5
dt = 1
[]
[VectorPostprocessors]
[t_sampler]
type = LineValueSampler
variable = T
start_point = '0 0.5 0'
end_point = '2 0.5 0'
num_points = 20
sort_by = x
[]
[]
[Outputs]
exodus = true
[csv]
type = CSV
file_base = therm_step03a_out
execute_on = final
[]
[]
(moose/modules/heat_transfer/tutorials/introduction/therm_step03a.i)Input file
Kernels
The only change necessary to include a volumetric heating term to this problem is to add an additional block under Kernels
for the volumetric heat source, which is provided by the HeatSource
kernel. The prescribed value here is a constant heat source prescribed as a heat source per unit volume. Options exist for prescribing this using a function, which provides the flexibility to model a wide variety of problems.
It may seem unusual that this is prescribed using a Kernel because this is similar in nature to a boundary condition. However, volume integrals are prescribed as Kernels in MOOSE, regardless of whether they are source terms or terms that depend on a derivative of the solution.
[Kernels]
[heat_conduction]
type = HeatConduction
variable = T
[]
[time_derivative]
type = HeatConductionTimeDerivative
variable = T
[]
[heat_source]
type = HeatSource
variable = T
value = 1e4
[]
[]
(moose/modules/heat_transfer/tutorials/introduction/therm_step03a.i)Questions
Before running the model, consider how the solution should change with the addition of volumetric heating.
Now go ahead and run the input and visualize the result to see if it matches the behavior you would expect.
Exploring parameters
Try changing the magnitude of the volumetric heating and see how that affects the solution.