With the pressure equation handled, we turn to the heat conduction equation:

$$C \frac{\partial T}{\partial t} - \nabla \cdot k \nabla T = 0$$$[](---) # Steady Heat Conduction (5a) * Let's initially exclude the time-dependent term and focus on the steady heat conduction equation, given by: $$-\nabla \cdot k \nabla T = 0$$$
* We are left with another Diffusion-type term which depends on the thermal conductivity, $$k$$.  This term is implemented in the MOOSE heat_conduction module as HeatConductionKernel.
* This Kernel is now used in conjunction with a GenericConstantMaterial to perform a steady state heat conduction solve (with $$T=350$$ at the inlet and $$T=300$$ at the outlet).
* GernericConstantMaterial is a simple way to define constant material properties.
- Two input parameters are provided using the usual "list" syntax:
text
prop_names  = 'conductivity density'
prop_values = '0.01         200'


[](---)

[modules/heat_conduction/include/HeatConduction.h](https://github.com/idaholab/moose/blob/devel/modules/heat_conduction/include/kernels/HeatConduction.h)

[](---)

[modules/heat_conduction/src/HeatConduction.C](https://github.com/idaholab/moose/blob/devel/modules/heat_conduction/src/kernels/HeatConduction.C)

[](---)

[](---)

# Transient Heat Conduction (5b)

* Now, add back in the time derivative to do a Transient heat conduction calculation:
$$C \frac{\partial T}{\partial t} - \nabla \cdot k \nabla T = 0$$\$
* This term already exists in the HeatConduction module as HeatConductionTimeDerivative.
* We therefore need only update the input file to run the transient case.

[MOOSE Time Derivative](/wiki/MooseSystems/Kernels)

[MOOSE Executioners](/wiki/MooseSystems/Executioners)

[MOOSE TimeSteppers](/wiki/MooseSystems/TimeSteppers)

[](---)
## Transient Heat Conduction Code

[modules/heat_conduction/src/HeatConductionTimeDerivative.C](https://github.com/idaholab/moose/blob/devel/modules/heat_conduction/src/kernels/HeatConductionTimeDerivative.C)

[](---)

[step5_heat_conduction/problems/step5b_transient.i](https://github.com/idaholab/moose/blob/devel/tutorials/darcy_thermo_mech/step05_heat_conduction/problems/step5b_transient.i)

[](---)
# Outflow BoundaryCondition (5c)

* The flow is assumed to exit the pipe into a large tank.
* This is modeled with the "No BC" boundary condition of [Griffiths](http://onlinelibrary.wiley.com/doi/10.1002/%28SICI%291097-0363%2819970228%2924:4%3C393%3a%3aAID-FLD505%3E3.0.CO;2-O/abstract).
* In this BC, the the boundary term, $$-\left < k \nabla T \cdot \mathbf{n}, \psi_i \right >$$, is computed implicitly rather than being replaced with a known flux, as is done in a NeumannBC.

[MOOSE BoundaryConditions](/wiki/MooseSystems/BCs)

[](---)
## Output BoundaryCondition Code

[step05_heat_conduction/include/bcs/HeatConductionOutflow.h](https://github.com/idaholab/moose/blob/devel/tutorials/darcy_thermo_mech/step05_heat_conduction/include/bcs/HeatConductionOutflow.h)

[](---)

[step05_heat_conduction/src/bcs/HeatConductionOutflow.C](https://github.com/idaholab/moose/blob/devel/tutorials/darcy_thermo_mech/step05_heat_conduction/src/bcs/HeatConductionOutflow.C)

[](---)

[step05_heat_conduction/problems/step5c_outflow.i](https://github.com/idaholab/moose/blob/devel/tutorials/darcy_thermo_mech/step05_heat_conduction/problems/step5c_outflow.i)

[](---)

# Create a Test

- Generate a tests that uses HeatConductionOutflow by mimicking the problem above but limiting the mesh size and the number of timesteps.

[tutorials/darcy_thermo_mech/step05_heat_conduction/tests/bcs/outflow/tests](https://github.com/idaholab/moose/blob/devel/tutorials/darcy_thermo_mech/step05_heat_conduction/tests/bcs/outflow/tests)

[](---)

[tutorials/darcy_thermo_mech/step05_heat_conduction/tests/bcs/outflow/outflow.i](https://github.com/idaholab/moose/blob/devel/tutorials/darcy_thermo_mech/step05_heat_conduction/tests/bcs/outflow/outflow.i)