Skip to content

Heat capacity

Methods

Heat capacity is defined as

GeoParams.MaterialParameters.HeatCapacity.ConstantHeatCapacity Type
julia
ConstantHeatCapacity(Cp=1050J/kg/K)

Set a constant heat capacity:

Cp=cst

where Cp is the thermal heat capacity [J/kg/K].

source
GeoParams.MaterialParameters.HeatCapacity.T_HeatCapacity_Whittington Type
julia
T_HeatCapacity_Whittington()

Sets a temperature-dependent heat capacity following the parameterization of Whittington et al. (2009), Nature:

Cp=(a+bTc/T2)/m

where Cp is the heat capacity [J/kg/K], and a,b,c are parameters that dependent on the temperature T [K]:

  • a = 199.50 J/mol/K if T<= 846 K

  • a = 229.32 J/mol/K if T> 846 K

  • b = 0.0857J/mol/K^2 if T<= 846 K

  • b = 0.0323J/mol/K^2 if T> 846 K

  • c = 5e6J/mol*K if T<= 846 K

  • c = 47.9e-6J/mol*K if T> 846 K

  • molmass = 0.22178kg/mol

Note that this is slightly different than the equation in the manuscript, as Cp is in J/kg/K (rather than J/mol/K as in eq.3/4 of the paper)

source

Computational routines

To compute, use this:

GeoParams.MaterialParameters.HeatCapacity.compute_heatcapacity Function
julia
compute_heatcapacity(a::Vector_HeatCapacity; index::Int64, kwargs...)

Pointwise calculation of heat capacity from a vector where index is the index of the point

source
julia
compute_heatcapacity(P,T, s::AbstractPhaseDiagramsStruct)

Interpolates heat capacity as a function of T,P from a lookup table

source
julia
Cp = compute_heatcapacity(s::AbstractHeatCapacity, P, T)

Returns the heat capacity Cp at any temperature T and pressure P using any of the heat capacity laws implemented.

Currently available:

  • ConstantHeatCapacity

  • T_HeatCapacity_Whittington

  • Latent_HeatCapacity

Example

julia
julia> cp = T_HeatCapacity_Whittington()
T-dependent heat capacity following Whittington et al. (2009) for average crust.

julia> compute_heatcapacity(cp, (; T = 1000.0))
1179.6374785821629

The in-place compute_heatcapacity! fills a preallocated array instead:

julia
julia> cp = T_HeatCapacity_Whittington();

julia> T = collect(250.0:250.0:1250.0);

julia> Cp = similar(T);

julia> compute_heatcapacity!(Cp, cp, (; T = T));

julia> Cp
5-element Vector{Float64}:
  635.4269997294616
 1002.5701145279105
 1149.2745563671706
 1179.6374785821629
 1216.0474343943067
source
GeoParams.MaterialParameters.HeatCapacity.compute_heatcapacity! Function
julia
compute_heatcapacity!(Cp::AbstractArray{<:AbstractFloat}, MatParam::AbstractArray{<:AbstractMaterialParamsStruct}, Phases::AbstractArray{<:Integer}, P::AbstractArray{<:AbstractFloat},T::AbstractArray{<:AbstractFloat})

In-place computation of heat capacity Cp for the whole domain and all phases, in case a vector with phase properties MatParam is provided, along with P and T arrays. This assumes that the Phase of every point is specified as an Integer in the Phases array.

source