Heat Conduction

LowLevelFEM.FDMMethod
FDM(K, C, q, T0, tₘₐₓ, Δt; ϑ=...)

Solves a transient heat conduction problem using Finite Difference Method (FDM). Introducing a ϑ parameter, special cases can be used as the Forward Euler (explicit, ϑ=0), Backward Euler (implicit, ϑ=1), Crank-Nicolson (ϑ=0.5) and intermediate cases (0<ϑ<1). (This method is known as ϑ-method. See [5].) K is the heat conduction matrix, C is the heat capacity matrix, q is the heat flux vector, T0 is the initial temperature, tₘₐₓ is the upper bound of the time intervall (lower bound is zero) and Δt is the time step size. Returns the nodal temperature vectors in each time step arranged in the columns of the matrix T and a vector t of the time instants used.

The critical (largest allowed) time step is Δtₘₐₓ = 2 / ((1-2ϑ)*λₘₐₓ) where λₘₐₓ is the largest eigenvalue of (KC)θ=0 eigenvalue problem and ϑ is the parameter of the ϑ-method. Default value of ϑ is 1/2.

Return: T

Types:

  • K: SystemMatrix
  • C: SystemMatrix
  • q: ScalarField
  • T0: ScalarField
  • tₘₐₓ: Float64
  • Δt: Float64
  • T: ScalarField
source
LowLevelFEM.applyHeatConvection!Method
applyHeatConvection!(heatCondMat, heatFluxVec, heatConv)

Applies heat convectiom boundary conditions heatConv on a heat conduction matrix heatCondMat and heat flux vector heatFluxVec. Mesh details are in problem. heatConv is a tuple of name of physical group and prescribed heat transfer coefficient h and ambient temperature Tₐ. The ambient temperature can be either a constant or a function of x, y and z coordinates.

Returns: nothing

Types:

  • problem: Problem
  • heatCondMat: SystemMatrix
  • heatFluxVec: VectorField
  • heatConv: Vector{Tuple{String, Float64, Float64, Float64}}
source
LowLevelFEM.heatCapacityMatrixMethod
heatCapacityMatrix(problem; lumped=...)

Solves the heat capacity matrix of the problem. If lumped is true, solves lumped heat capacity matrix.

Return: heatCapMat

Types:

  • problem: Problem
  • lumped: Boolean
  • massMat: SystemMatrix
source
LowLevelFEM.heatConductionMatrixMethod
heatConductionMatrix(problem)

Solves the heat conduction matrix of the problem.

Returns: heatCondMat

Types:

  • problem: Problem
  • heatCondMat: SystemMatrix

Examples

Kth = heatConductionMatrix(problem)
source
LowLevelFEM.heatConvectionMatrixMethod
heatConvectionMatrix(problem, heatConvection)

Solves the heat convection matrix of the problem. heatConvection is a vector of heat convection boundary condicions defined in function heatConduction. With the heat convection vector (see the heatConvectionVector function) heatConvVec, temperature field vector T in hand the heat flux vector qCV arising from the heat convection boundary condition can be solved. qCV = heatConvMat * T - heatConvVec

Return: heatConvMat

Types:

  • problem: Problem
  • heatConvection: Vector{Tuple{String, Float64, Float64, Float64}}
  • heatConvMat: SystemMatrix
source
LowLevelFEM.heatConvectionVectorMethod
heatConvectionVector(problem, heatConvection)

Solves a heat convection vector of problem. heatConvection is a vector of heat convection boundary condicions defined in function heatConduction. With the heat convection matrix (see the heatConvectionMatrix function) heatConvMat, temperature field vector T in hand the heat flux vector qCV arising from the heat convection boundary condition can be solved. qCV = heatConvMat * T - heatConvVec

Return: heatConvVec

Types:

  • problem: Problem
  • heatConvection: Vector{Tuple{String, Float64, Float64, Float64}}
  • heatConvVec: ScalarField
source
LowLevelFEM.heatFluxVectorMethod
heatFluxVector(problem, heatFlux)

Solves a heat flux or heat source vector of problem. heatFlux is a tuple of name of physical group name, heat flux qn normal to the surface of the body. The outward direction is positive. It can solve heat flux (or heat source) depending on the problem.

  • In case of 2D problems and Point physical group means concentrated heat flux.
  • In case of 2D problems and Line physical group means surface heat flux.
  • In case of 2D problems and Surface physical group means body heat source.
  • In case of 3D problems and Point physical group means concentrated heat flux.
  • In case of 3D problems and Line physical group means edge heat source.
  • In case of 3D problems and Surface physical group means surface heat flux.
  • In case of 3D problems and Volume physical group means body heat source.

Return: heatFluxVec

Types:

  • problem: Problem
  • heatFlux: Vector{Tuple{String, Float64, Float64, Float64}}
  • heatFluxVec: VectorField
source
LowLevelFEM.heatSourceVectorMethod
heatSourceVector(problem, heatSource)

Solves a heat flux or heat source vector of problem. heatSource is a tuple of name of physical group name, heat flux qn normal to the surface of the body. The outward direction is positive. It can solve heat flux (or heat source) depending on the problem.

  • In case of 2D problems and Point physical group means concentrated heat flux.
  • In case of 2D problems and Line physical group means surface heat flux.
  • In case of 2D problems and Surface physical group means body heat source.
  • In case of 3D problems and Point physical group means concentrated heat flux.
  • In case of 3D problems and Line physical group means edge heat source.
  • In case of 3D problems and Surface physical group means surface heat flux.
  • In case of 3D problems and Volume physical group means body heat source.

Same as the heatFluxVector function.

Return: heatSourceVec

Types:

  • problem: Problem
  • heatSource: Vector{Tuple{String, Float64, Float64, Float64}}
  • heatSourceVec: VectorField
source
LowLevelFEM.initialTemperature!Method
initialTemperature!(name, T0; T=...)

Changes the tempetature value to T at nodes belonging to physical group name. Original values are in temperature vector T0.

Returns: nothing

Types:

  • name: String
  • T0: ScalarField
  • T: Float64
source
LowLevelFEM.initialTemperatureMethod
initialTemperature(problem, name; T=...)

Sets the temperature value T at nodes belonging to physical group name. Returns the T0 initial nodal temperature vector.

Return: T0

Types:

  • problem: Problem
  • name: String
  • T: Float64
  • T0: ScalarField
source
LowLevelFEM.latentHeatMatrixMethod
latentHeatMatrix(problem, u, v, T0)

Solves the latent heat matrix of the problem. With this matrix the generated heat due to deformations (given with displacement field u and velocity field v) can be solved. T0 is the current temperature field which is given in absolute temperature scale (Kelvin).

Return: latHeatMat

Types:

  • problem: Problem
  • u: VectorField
  • v: VectorField
  • T0: ScalarField
  • latHeatMat: SystemMatrix
source
LowLevelFEM.solveHeatFluxMethod
solveHeatFlux(T; DoFResults=false)

Solves the heat flux field q from temperature vector T. heat flux is given per elements, so it usually contains jumps at the boundary of elements. Details of mesh is available in problem. If DoFResults is true, q is a matrix with nodal results. In this case showDoFResults can be used to show the results (otherwise showHeatFluxResults or showElementResults).

Return: q

Types:

  • problem: Problem
  • T: ScalarField
  • q: VectorField
source
LowLevelFEM.solveTemperatureMethod
solveTemperature(problem, flux, temp, heatconv)

Solves the temperature field T of problem with given heat flux flux, temperature temp and heat convection heatconv.

Return: T

Types:

  • problem: Problem
  • flux: Vector{Tuple}
  • temp: Vector{Tuple}
  • heatconv: Vector{Tuple}
  • T: ScalarField
source
LowLevelFEM.solveTemperatureMethod
solveTemperature(problem, flux, temp)

Solves the temperature field T of problem with given heat flux flux and temperature temp.

Return: T

Types:

  • problem: Problem
  • flux: Vector{Tuple}
  • temp: Vector{Tuple}
  • T: ScalarField
source
LowLevelFEM.solveTemperatureMethod
solveTemperature(problem, u; T0=273.0)

Solves the raise of temperature T during reversible (no dissipation) elastic deformations, where u is the displacement field, and problem is a heat cunduction problem.

Return: T

Types:

  • problem: Problem
  • u: VectorField
  • T0: Float64
  • T: ScalarField
source
LowLevelFEM.solveTemperatureMethod
solveTemperature(K, q)

Solves the equation K*T=q for the temperature field T. K is the heat conduction matrix, q is the heat flux vector.

Return: T

Types:

  • K: SystemMatrix
  • q: ScalarField
  • T: ScalarField
source