Manual

FEM machines

Heat diffusion: volume

FinEtoolsHeatDiff.FEMMHeatDiffModule.capacityFunction
capacity(self::FEMMHeatDiff,  assembler::A, geom::NodalField{GFT},  temp::NodalField{FT}) where {A<:AbstractSysmatAssembler, GFT, FT}

Compute the capacity matrix.

Arguments

  • self = model machine,
  • assembler = matrix assembler
  • geom = geometry field,
  • temp = temperature field
FinEtoolsHeatDiff.FEMMHeatDiffModule.conductivityFunction
conductivity(self::FEMMHeatDiff,  assembler::A, geom::NodalField{GFT},  temp::NodalField{FT}) where {A<:AbstractSysmatAssembler, GFT, FT}

Compute the conductivity matrix.

Arguments

  • self = model machine,
  • assembler = matrix assembler
  • geom = geometry field,
  • temp = temperature field
FinEtoolsHeatDiff.FEMMHeatDiffModule.energyFunction
energy(self::FEMMHeatDiff, geom::NodalField{GFT},  temp::NodalField{FT}) where {GFT, FT}

Compute the "energy" integral over the interior domain.

The "energy" density is the dot product of the gradient of temperature and the heat flux.

Arguments

  • self = model machine,
  • geom = geometry field,
  • temp = temperature field
FinEtools.FEMMBaseModule.inspectintegpointsFunction
inspectintegpoints(self::FEMMHeatDiff, geom::NodalField{GFT}, u::NodalField{T}, temp::NodalField{FT}, felist::VecOrMat{IntT}, inspector::F, idat, quantity=:heatflux; context...) where {T<:Number, GFT, FT, IntT, F<:Function}

Inspect integration point quantities.

Arguments

  • geom - reference geometry field
  • u - displacement field (ignored)
  • temp - temperature field
  • felist - indexes of the finite elements that are to be inspected: The fes to be included are: fes[felist].
  • context - structure: see the update!() method of the material.
  • inspector - function with the signature idat = inspector(idat, j, conn, x, out, loc); where idat - a structure or an array that the inspector may use to maintain some state, for instance heat flux, j is the element number, conn is the element connectivity, out is the output of the update!() method, loc is the location of the integration point in the reference configuration.

Output

The updated inspector data is returned.

Heat diffusion: surface

FinEtoolsHeatDiff.FEMMHeatDiffSurfModule.surfacetransferFunction
surfacetransfer(self::FEMMHeatDiffSurf,  assembler::A, geom::NodalField{GFT}, temp::NodalField{FT})  where {A<:AbstractSysmatAssembler, GFT, FT}

Compute the surface heat transfer matrix.

Arguments

  • self = model machine,
  • assembler = matrix assembler
  • geom = geometry field,
  • temp = temperature field
FinEtoolsHeatDiff.FEMMHeatDiffSurfModule.surfacetransferloadsFunction
surfacetransferloads(self::FEMMHeatDiffSurf,  assembler::A,  geom::NodalField{GFT}, temp::NodalField{FT},  ambtemp::NodalField{FT}) where {A<:AbstractSysvecAssembler, GFT, FT}

Compute the load vector corresponding to surface heat transfer.

Arguments

  • self = model machine,
  • assembler = matrix assembler
  • geom = geometry field,
  • temp = temperature field
  • ambtemp = ambient temperature field on the surface

Algorithms

Heat conduction

FinEtoolsHeatDiff.AlgoHeatDiffModule.steadystateFunction
steadystate(modeldata::FDataDict)

Steady-state heat conduction solver.

Argument

modeldata = dictionary with items

  • "fens" = finite element node set
  • "regions" = array of region dictionaries
  • "essential_bcs" = array of essential boundary condition dictionaries
  • "convection_bcs" = array of convection boundary condition dictionaries
  • "flux_bcs" = array of flux boundary condition dictionaries

For each region (connected piece of the domain made of a particular material), mandatory, the region dictionary contains items:

  • "femm" = finite element mmodel machine (mandatory);
  • "Q" = material internal heat generation rate (optional; default 0.0)

For essential boundary conditions (optional) each dictionary would hold

  • "temperature" = fixed (prescribed) temperature (scalar), or a function with signature function T = f(x) If not given, zero temperatures assumed.
  • "node_list" = list of nodes on the boundary to which the condition applies (mandatory)

For convection boundary conditions (optional) each dictionary may hold

  • "femm" = finite element mmodel machine (mandatory);
  • "ambient_temperature" = fixed (prescribed) ambient temperature (scalar) If not given, zero temperatures assumed.

For flux boundary conditions (optional) each dictionary would hold

  • "femm" = finite element mmodel machine (mandatory);
  • "normal_flux" = normal component of the flux through the boundary (scalar) Positive when outgoing.

Output

modeldata= the dictionary on input is augmented with

  • "geom" = the nodal field that is the geometry
  • "temp" = the nodal field that is the computed temperature

Material models

Material models for heat diffusion

FinEtoolsHeatDiff.MatHeatDiffModule.tangentmoduli!Function
tangentmoduli!(self::MatHeatDiff, kappabar::Matrix{FT}, t = zero(FT), dt = zero(FT), loc::Matrix{FT} = reshape(FT[],0,0), label = 0) where {FT}

Calculate the thermal conductivity matrix.

  • kappabar = matrix of thermal conductivity (tangent moduli) in material coordinate system, supplied as a buffer and overwritten.
FinEtoolsHeatDiff.MatHeatDiffModule.update!Function
update!(self::MatHeatDiff, heatflux::Vector{FT}, output::Vector{FT}, gradT::Vector{FT}, t= zero(FT), dt= zero(FT), loc::Matrix{FT}=reshape(FT[],0,0), label=0, quantity=:nothing) where {FT}

Update material state.

Arguments

  • gradT = thermal gradient vector,
  • t = current time,
  • dt = current time step,
  • loc = location of the quadrature point in global Cartesian coordinates,
  • label = label of the finite element in which the quadrature point is located.
  • quantity = quantity to be output (:heatflux)

Output

  • heatflux = heat flux vector, allocated by the caller with a size of the embedding space. The components of the heat flux vector are calculated and stored in the heatflux vector.
  • output = array which is (if necessary) allocated in an appropriate size, filled with the output quantity, and returned.

Modules

FinEtoolsHeatDiff.FinEtoolsHeatDiffModule

FinEtools (C) 2017-2024, Petr Krysl

Finite Element tools. Julia implementation of the finite element method for continuum mechanics. Package for heat diffusion problems.

FinEtoolsHeatDiff.FEMMHeatDiffModuleModule
FEMMHeatDiffModule

Module for operations on interiors of domains to construct system matrices and system vectors for linear heat conduction/diffusion.

FinEtoolsHeatDiff.FEMMHeatDiffSurfModuleModule
FEMMHeatDiffSurfModule

Module for operations on boundaries of domains to construct system matrices and system vectors for linear heat diffusion/conduction.