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+bT−c/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
GeoParams.MaterialParameters.HeatCapacity.T_HeatCapacity_Moitra Type
julia
T_HeatCapacity_Moitra()

Temperature-dependent heat capacity of a basanite glass (T<Tg) and melt (T≥Tg) after Moitra et al. (2018), eqs. 3 and 4:

cp=a0+b0T+c0/T2+d0/T(T<Tg),cp=a1+b1T(T≥Tg)

with T in K and

  • a0 = 2020 J/kg/K, b0 = -0.133 J/kg/K², c0 = 4.54e6 J K/kg, d0 = -21100 J/kg/K^(1/2)

  • a1 = 2150 J/kg/K, b1 = -0.5 J/kg/K²

  • Tg = 1000 K

The fit is calibrated on laser-flash data between 298 and 1273 K (their Table 3) and jumps at Tg; above 1273 K the melt branch is extrapolated. cp decreases above Tg because the sample crystallizes during the measurement (Moitra et al. 2018, p. 3627). T_HeatCapacity_Moitra_smoothed replaces the jump by a smooth transition.

References

  • Moitra, P., Sonder, I., Valentine, G. A. (2018), Effects of size and temperature-dependent thermal conductivity on the cooling of pyroclasts in air, G-cubed 19, 3623-3636, https://doi.org/10.1029/2018GC007510
source
GeoParams.MaterialParameters.HeatCapacity.T_HeatCapacity_Moitra_smoothed Type
julia
T_HeatCapacity_Moitra_smoothed()

T_HeatCapacity_Moitra with the jump at Tg replaced by a smooth transition of width ΔTg:

cp=(1−H)cp,glass+Hcp,melt,H=11+exp⁡(−4(T−Tg)/ΔTg)

where cp,glass and cp,melt are the glass and melt branches of T_HeatCapacity_Moitra evaluated at T. H is the smoothed Heaviside step of SmoothMelting with k=2/ΔTg, centered at Tg; it rises from 0.018 at Tg−ΔTg to 0.982 at Tg+ΔTg, i.e. from 5 % to 95 % over about 1.5ΔTg. The default ΔTg=20 K keeps both branches within about 15 K of Tg.

source
GeoParams.MaterialParameters.HeatCapacity.ThreePhase_HeatCapacity Type
julia
ThreePhase_HeatCapacity(; ρ=ThreePhase_Density(), Cpmelt=T_HeatCapacity_Moitra(), Cpsolid=T_HeatCapacity_Whittington(), Cpgas=ConstantHeatCapacity(Cp=3880J/kg/K))

Specific heat capacity of a melt + crystal + gas magma, the mass-weighted mean of the phase heat capacities (Heap et al. 2020, eq. 3, extended from two to three phases):

cp=ϕmρmcp,m+ϕxρxcp,x+ϕgasρgascp,gasϕmρm+ϕxρx+ϕgasρgas,ϕm=1−ϕx−ϕgas

so that ρcp, with ρ from ThreePhase_Density, is the volume-weighted sum of the phase values ρicp,i.

The phase densities come from the sub-laws of ρ, so the same ThreePhase_Density describes the magma in the momentum and energy equations. The gas and crystal volume fractions ϕ_gas, ϕ_x are passed at runtime, as for ThreePhase_Density; all sub-laws receive the remaining arguments (e.g. P, T). The gas laws are only evaluated when ϕ_gas != 0. The result is NaN unless ϕx≥0, ϕgas≥0 and ϕx+ϕgas≤1.

The default gas heat capacity is that of pure H2O used by Degruyter & Huber (2014); it ignores the X_co2 that GasMixture_Conductivity takes. The default Cpmelt decreases above Tg because the sample of Moitra et al. (2018) crystallizes (see T_HeatCapacity_Moitra).

References

source

Heat capacity of magma ​

The glass and melt heat capacity of T_HeatCapacity_Moitra jumps at the glass transition Tg; T_HeatCapacity_Moitra_smoothed replaces the jump by a transition of width ΔTg. The fit is calibrated up to 1273 K. T_HeatCapacity_Whittington is shown for comparison.

julia
using GeoParams, CairoMakie
T = range(300, 1400, 1101)
laws = (
    "T_HeatCapacity_Moitra" => T_HeatCapacity_Moitra(),
    "T_HeatCapacity_Moitra_smoothed (ΔTg = 20 K)" => T_HeatCapacity_Moitra_smoothed(),
    "T_HeatCapacity_Whittington" => T_HeatCapacity_Whittington(),
)
fig = Figure(size = (800, 450))
ax = Axis(fig[1, 1]; xlabel = "temperature T (K)", ylabel = "heat capacity c_p (J/kg/K)")
vspan!(ax, 1273, 1400; color = (:gray, 0.2), label = "Moitra extrapolated (> 1273 K)")
vlines!(ax, 1000; color = :black, linestyle = :dot, label = "T_g = 1000 K")
for (name, law) in laws
    lines!(ax, T, [compute_heatcapacity(law, (; T = t)) for t in T]; label = name)
end
axislegend(ax; position = :lt)
fig

ThreePhase_HeatCapacity mass-weights the phase heat capacities. The figure shows magma with 0–40 % crystals at 100 MPa and 850 °C, with an H2O gas of HalbachChatterjee_Density. The gas has a high specific heat capacity, so cp rises with the gas fraction, but it has little mass, so the volumetric heat capacity ρcp that enters the energy equation falls almost linearly.

julia
using GeoParams, CairoMakie
ρ = ThreePhase_Density(; ρgas = HalbachChatterjee_Density())
cp = ThreePhase_HeatCapacity(; ρ)
ϕ_gas = range(0, 0.6, 121)
fig = Figure(size = (900, 400))
ax1 = Axis(fig[1, 1]; xlabel = "gas fraction ϕ_gas (–)", ylabel = "c_p (J/kg/K)", title = "mass-weighted c_p")
ax2 = Axis(fig[1, 2]; xlabel = "gas fraction ϕ_gas (–)", ylabel = "ρ c_p (MJ/m³/K)", title = "volumetric heat capacity ρ c_p")
for ϕ_x in (0.0, 0.2, 0.4)
    args = [(; P = 1.0e8, T = 1123.15, ϕ_x, ϕ_gas = g) for g in ϕ_gas]
    lines!(ax1, ϕ_gas, [compute_heatcapacity(cp, a) for a in args]; label = "ϕ_x = $ϕ_x")
    lines!(ax2, ϕ_gas, [compute_density(ρ, a) * compute_heatcapacity(cp, a) / 1.0e6 for a in args]; label = "ϕ_x = $ϕ_x")
end
axislegend(ax2; position = :lb)
fig

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

  • T_HeatCapacity_Moitra

  • T_HeatCapacity_Moitra_smoothed

  • ThreePhase_HeatCapacity

  • 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