Skip to content

Commit

Permalink
- added new routines that return the derivative of \phi versus T for …
Browse files Browse the repository at this point in the history
…all melting parameterisations

- fixing equations in documentation
  • Loading branch information
boriskaus committed Mar 29, 2022
1 parent 2ba65f2 commit c17aa85
Show file tree
Hide file tree
Showing 7 changed files with 245 additions and 77 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name = "GeoParams"
uuid = "e018b62d-d9de-4a26-8697-af89c310ae38"
authors = ["Boris Kaus <kaus@uni-mainz.de>"]
version = "0.2.3"
version = "0.2.4"

[deps]
BibTeX = "7b0aa2c9-049f-5cec-894a-2b6b781bb25e"
Expand Down
9 changes: 8 additions & 1 deletion docs/src/man/melting.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,14 @@ GeoParams.MeltingParam.compute_meltfraction!
GeoParams.MeltingParam.compute_meltfraction
```

Also note that phase diagrams can be imported using `PerpleX_LaMEM_Diagram`.
You can also obtain the derivative of melt fraction versus temperature with (useful to compute latent heat effects):
```@docs
GeoParams.MeltingParam.compute_dϕdT!
GeoParams.MeltingParam.compute_dϕdT
```

Also note that phase diagrams can be imported using `PerpleX_LaMEM_Diagram`, which may also have melt content information.
The computational routines work with that as well.

# Plotting routines
You can use the routine `PlotMeltFraction` to create a plot, provided that the `Plots` package has been loaded
Expand Down
13 changes: 5 additions & 8 deletions src/Energy/Conductivity.jl
Original file line number Diff line number Diff line change
Expand Up @@ -87,16 +87,16 @@ Their parameterization is originally given for the thermal diffusivity, together
Cp = a + b T - c/T^2
```
```math
\\kappa = d/T - e, if T<=846K
\\kappa = d/T - e \\textrm{ if } T<=846K
```
```math
\\kappa = f - g*T, if T>846K
\\kappa = f - g*T \\textrm{ if } T>846K
```
```math
\\rho = 2700 kg/m3
\\rho = 2700 kg/m^3
```
```math
k = \\kappa Cp \\rho
k = \\kappa \\rho Cp
```
where ``Cp`` is the heat capacity [``J/mol/K``], and ``a,b,c`` are parameters that dependent on the temperature `T`:
Expand Down Expand Up @@ -197,7 +197,7 @@ end
Sets a temperature-dependent conductivity that is parameterization after *Whittington, et al. 2009*
The original parameterization involves quite a few parameters; this is a polynomial fit that is roughly valid from 0-1000C
The original parameterization involves quite a few parameters; this is a polynomial fit that is roughly valid from 0-1000Celcius
```math
k [W/m/K] = -2 10^{-9} (T-Ts)^3 + 6 10^{-6} (T-Ts)^2 - 0.0062 (T-Ts) + 4
```
Expand All @@ -206,8 +206,6 @@ The original parameterization involves quite a few parameters; this is a polynom
```
where `T[K]` is the temperature in Kelvin (or the nondimensional equivalent of it).
"""


@with_kw_noshow struct T_Conductivity_Whittington_parameterised{T,U1,U2,U3,U4,U5} <: AbstractConductivity{T}
# Note: the resulting curve of k was visually compared with Fig. 2 of the paper
a::GeoUnit{T,U1} = -2e-09Watt/m/K^4 #
Expand Down Expand Up @@ -269,7 +267,6 @@ end
#-------------------------------------------------------------------------



# Temperature (& Pressure) dependent conductivity -------------------------------
"""
TP_Conductivity()
Expand Down
11 changes: 6 additions & 5 deletions src/GeoParams.jl
Original file line number Diff line number Diff line change
Expand Up @@ -111,16 +111,17 @@ export compute_zirconsaturation, compute_zirconsaturation!, # calculation

# Seismic velocities
using .MaterialParameters.SeismicVelocity
export compute_pwave_velocity, compute_swave_velocity,
compute_pwave_velocity!, compute_swave_velocity!,
export compute_pwave_velocity, compute_swave_velocity,
compute_pwave_velocity!, compute_swave_velocity!,
ConstantSeismicVelocity

# Add melting parameterizations
include("./MeltFraction/MeltingParameterization.jl")
using .MeltingParam
export compute_meltfraction, compute_meltfraction!, # calculation routines
MeltingParam_Caricchi, MeltingParam_4thOrder,
MeltingParam_5thOrder, MeltingParam_Quadratic
export compute_meltfraction, compute_meltfraction!, # calculation routines
compute_dϕdT, compute_dϕdT!,
MeltingParam_Caricchi, MeltingParam_4thOrder,
MeltingParam_5thOrder, MeltingParam_Quadratic


# Add plotting routines - only activated if the "Plots.jl" package is loaded
Expand Down
Loading

0 comments on commit c17aa85

Please sign in to comment.