Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
albert-de-montserrat committed Oct 19, 2024
1 parent 6dfd983 commit f80cbad
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/MeltFraction/MeltingParameterization.jl
Original file line number Diff line number Diff line change
Expand Up @@ -581,7 +581,7 @@ julia> T,phi,dϕdT = PlotMeltFraction(p,T=T);
The same but with smoothening:
```julia
julia> p_s = SmoothMelting(p=MeltingParam_4thOrder(), k_liq=0.21/K);
4th order polynomial melting curve: phi = -7.594512597174117e-10T^4 + 3.469192091489447e-6T^3 + -0.00592352980926T^2 + 4.482855645604745T + -1268.730161921053 963.15 K ≤ T ≤ 1270.15 K with smooth Heaviside function smoothening using k_sol=0.1 K⁻¹·⁰, k_liq=0.11 K⁻¹·
4th order polynomial melting curve: phi = -7.594512597174117e-10T^4 + 3.469192091489447e-6T^3 + -0.00592352980926T^2 + 4.482855645604745T + -1268.730161921053 963.15 K ≤ T ≤ 1270.15 K with smooth Heaviside function smoothening using k_sol=0.1 K⁻¹·⁰, k_liq=0.11 K⁻¹·
julia> T_s,phi_s,dϕdT_s = PlotMeltFraction(p_s,T=T);
```
Expand Down Expand Up @@ -738,8 +738,8 @@ for myType in (
:SmoothMelting,
)
@eval begin
(p::$(myType))(args) = clamp(p(; args...), one(eltype(args)), zero(eltype(args)))
compute_meltfraction(p::$(myType), args) = clamp(p(; args...), one(eltype(args)), zero(eltype(args)))
(p::$(myType))(args) = p(; args...)
compute_meltfraction(p::$(myType), args) = p(; args...)
compute_dϕdT(p::$(myType), args) = compute_dϕdT(p; args...)
end
end
Expand Down Expand Up @@ -767,7 +767,7 @@ end
Computation of melt fraction ϕ for the whole domain and all phases, in case an array with phase properties `MatParam` is provided, along with `P` and `T` arrays.
"""
compute_meltfraction(args::Vararg{Any,N}) where {N} =
clamp(compute_param(compute_meltfraction, args...), 0e0, 1e0)
clamp(compute_param(compute_meltfraction, args...), 0, 1)

"""
compute_meltfraction(ϕ::AbstractArray{<:AbstractFloat}, Phases::AbstractArray{<:Integer}, P::AbstractArray{<:AbstractFloat},T::AbstractArray{<:AbstractFloat}, MatParam::AbstractArray{<:AbstractMaterialParamsStruct})
Expand Down Expand Up @@ -802,4 +802,4 @@ This is employed, for example, in computing latent heat terms in an implicit man
"""
compute_dϕdT!(args::Vararg{Any,N}) where {N} = compute_param!(compute_dϕdT, args...)

end
end

0 comments on commit f80cbad

Please sign in to comment.