Tutorials (2)
Running Model
Now that you are able to validate and load data files using the Obliqua.load module, we can start using the tidal models Obliqua.solid0d, Obliqua.solid1d, Obliqua.solid1d_mush, Obliqua.solid1d_relax, Obliqua.solid1d_mush_relax, Obliqua.fluid0d and Obliqua.fluid1d. In principle, this is rather simple, since you only have to call one function. For example, let us proceed with the data file from Loading data. In this case, following the Table of inputs, we are interested in the solid-phase tides only, so we may use the Obliqua.calc_solid_tides function.
using Obliqua
# location of data files
RES_DIR = "/path/to/Obliqua/res"
# use the relevant load function
omega, axial, ecc, sma, S_mass, rho, radius, visc, shear, bulk, phi, ncalc =
Obliqua.load.load_interior_mush_full("$RES_DIR/interior_data/test_mantle_mush_full_test.json", false)
# call the desired model
power_prf, power_blk, σ_range, imag_k2 = Obliqua.run_tides(
omega, axial, ecc, sma, S_mass, rho, radius, visc, shear, bulk, phi, cfg
)
Obliqua.complex_mu — Method
complex_mu(σ_range, μ_profile, η_profile; material="andrade", α=0.3)Return the complex shear modulus μ̃(σ) for Maxwell or Andrade rheology.
Arguments
σ_range::AbstractVector: Forcing frequency range.μ_profile::Array{precc,1}: Shear profile of the planet (aka unrelaxed rigidity).η_profile::Array{prec,1}: Viscosity profile of the planet.
Keyword Arguments
material::String="andrade": Material for which to find complex shear modulus.α::Float64=0.3": Power-law exponent (free parameter).
Returns
μc::Matrix{precc}: Complex shear modulus profile at all forcing frequencies.
Obliqua.get_layers — Method
get_layers(r, η, η_l, η_s; min_frac=0.02)Determine the phase profile of a planetary interior considering solid, fluid, and mush layers.
Arguments
r::Array{prec,1}: Radial positions of layers, from core to surface.η::Array{prec,1}: Viscosity profile of the planet.η_l::Float64: Liquidus viscosity.η_s::Float64: Solidus viscosity.
Keyword Arguments
min_frac::Float64=0.02: Minimal segment radius fraction before smoothing.
Returns
mask_s::Vector{Bool}: Solid region mask.mask_l::Vector{Bool}: Fluid region mask.mask_c::Vector{Bool}: Mush region mask.is_seg::Vector{Tuple{Int,Int}}: Segment [start, stop] index array.segments::Vector{String}: Segment phase array.
Obliqua.make_logger — Method
Create a logger object and return it.Arguments:
outpath::String: Output file (empty to disable file logging).
Optional arguments:
to_term::Bool: Log to terminal?
Returns:
logger_both: Logger object.
Obliqua.nothing_if_none — Method
Convert 'none' string into nothing literal.
Obliqua.open_config — Method
Open and validate config file.Arguments:
cfg_path::String: Path to configuration file
Returns:
cfg_dict::Dict: Dictionary containing the configuration
Obliqua.run_fluid0d — Method
run_fluid0d(omega, rho, radius, ρ_ratio; n=2, sigma_R=1e-3)Calculate k2 Lovenumbers in the 0D fluid.
Arguments
omega::Float64: Forcing frequency.rho::Array{prec,1}: Density profile of the planet.radius::Array{prec,1}: Radial positions of layers, from core to surface.ρ_ratio::prec: Density contrast between current (fluid) and lower (non-fluid) layer.
Keyword Arguments
n::Int=2: Power of the radial factor (goes with (r/a)^{n}, since r<<a only n=2 contributes significantly).sigma_R::Float64=1e-3: Rayleigh drag coefficient.
Returns
k2_T::ComplexF64: Complex Tidal k2 Lovenumber.k2_L::ComplexF64: Complex Load k2 Lovenumber.
Obliqua.run_fluid1d — Method
run_fluid1d(omega, rho, radius, gravity, ρ_ratio, S_mass, sma, R; kwargs...)Compute tidal heating profile and Love numbers for a 1D fluid model.
Arguments
omega::Float64: Forcing frequencyrho::Vector{prec}: Density profileradius::Vector{prec}: Radial grid (core → surface)gravity::Vector{prec}: Gravity profileρ_ratio::prec: Density ratio of lower layerS_mass::prec: Stellar masssma::prec: Semi-major axisR::prec: Planet radius
Keyword Arguments
n::Int=2: Radial power (dominant term n=2)sigma_R::Float64=1e-3: Rayleigh drag at interfacesigma_inf::Float64=1e-7: Drag in fluid interiorsigma_R_prf::String="uniform": Drag profile typeH_R::Float64=1e3: Drag scale heightefficiency::Float64=0.3: Interface efficiency factor
Returns
power_prf::Vector{Float64}: Heating profilek2_T::ComplexF64: Tidal Love numberk2_L::ComplexF64: Load Love number
Obliqua.run_interp — Method
run_interp(omega, radius, P_t, P_b; t_width=0.1, b_width=0.1)Interpolate dissipation and k2 Lovenumbers in a 1D region without active tides.
Arguments
omega::Float64: Forcing frequency.radius::Array{prec,1}: Radial positions of layers, from core to surface.R::prec: Planet Radius.P_t::prec: Heating at upper interface.P_b::prec: Heating at lower interface.
Keyword Arguments
t_width::Float64=0.1: Fraction of segment height as standard deviation for upper dissipation peak.b_width::Float64=0.1: Fraction of segment height as standard deviation for lower dissipation peak.
Returns
power_prf::Array{Float64,1}: Heating profile.k2_T::ComplexF64: Complex Tidal k2 Lovenumber.k2_L::ComplexF64: Complex Load k2 Lovenumber.
Obliqua.run_solid0d — Method
run_solid0d(μc, radius, mass_tot; n=2)Calculate k2 Lovenumbers in the 0D solid.
Arguments
μc::Array{precc,1}: Forcing frequency range.radius::Array{prec,1}: Radial positions of layers, from core to surface.mass_tot::Float64: Total mass of planet.
Keyword Arguments
n::Int=2: Power of the radial factor (goes with (r/a)^{n}, since r<<a only n=2 contributes significantly).
Returns
k2_T::ComplexF64: Complex Tidal k2 Lovenumber.k2_L::ComplexF64: Complex Load k2 Lovenumber.
Obliqua.run_solid1d — Method
run_solid1d(omega, rho, radius, visc, shear, bulk, R, m_core, ρ_core, μ_core, κ_core; ncalc=2000, n=2, m=2, core="liquid")Use 1D solid tides model to calculate k2 Lovenumbers, and compute 1D heating profile from strain tensor. This method ignores inertia effects, since they break the numerical stability.
Arguments
omega::prec: Forcing frequency range.rho::Array{prec,1}: Density profile of the planet.radius::Array{prec,1}: Radial positions of layers, from core to surface.visc::Array{prec,1}: Viscosity profile of the planet.μ_profile::Array{precc,1}: Complex shear modulus profile of the planet.bulk::Array{prec,1}: Bulk modulus profile of the planet.R::prec: Planet radius.m_core::prec: Core mass.ρ_core::prec: Core density.μ_core::prec: Core shear modulus.κ_core::prec: Core bulk modulus.
Keyword Arguments
ncalc::Int=2000: Number of sublayers.n::Int=2: Power of the radial factor (goes with (r/a)^{n}, since r<<a only n=2 contributes significantly).m::Int=2: Harmonic of the true anomaly. m=2 corresponds to the semidiurnal tide, m=1 diurnal tide.core::String="liquid": Core state, either "liquid" or "solid".
Returns
power_prf::Array{Float64,1}: Heating profile.k2_T::ComplexF64: Complex Tidal k2 Lovenumber.k2_L::ComplexF64: Complex Load k2 Lovenumber.
Obliqua.run_solid1d_mush — Method
run_solid1d_mush(omega, rho, radius, visc, shear, bulk, phi, R, ρ_core, μ_core, κ_core; ncalc=2000, n=2, m=2, visc_l=1e2, bulk_l=1e9, permea=1e-7, porosity_thresh=1e-5)Use 1D solid tides model with mush interface to calculate k2 Lovenumbers, and compute 1D heating profile from strain tensor.
Arguments
omega::Float64: Forcing frequency range.rho::Array{prec,1}: Density profile of the planet.radius::Array{prec,1}: Radial positions of layers, from core to surface.visc::Array{prec,1}: Viscosity profile of the planet.shear::Array{precc,1}: Complex shear modulus profile of the planet.bulk::Array{prec,1}: Bulk modulus profile of the planet.phi::Array{prec,1}: Melt fraction (porosity) profile of the planet.R::prec: Planet radius.m_core::prec: Core mass.ρ_core::prec: Core density.μ_core::prec: Core shear modulus.κ_core::prec: Core bulk modulus.
Keyword Arguments
ncalc::Int=2000: Number of sublayers.n::Int=2: Power of the radial factor (goes with (r/a)^{n}, since r<<a only n=2 contributes significantly).m::Int=2: Harmonic of the true anomaly. m=2 corresponds to the semidiurnal tide, m=1 diurnal tide.core::String="liquid": Core state, either "liquid" or "solid".visc_l::Float64=1e2: Liquid viscosity.bulk_l::Float64=1e9: Liquid bulk modulus.permea::Float64=1e-7: Permeability of mush layer.porosity_thresh::Float64=1e-5: Porosity threshold, below this value no mush.
Returns
power_prf::Array{Float64,1}: Heating profile.k2_T::ComplexF64: Complex Tidal k2 Lovenumber.k2_L::ComplexF64: Complex Load k2 Lovenumber.
Obliqua.run_solid1d_mush_relax — Method
run_solid1d_mush_relax(omega, rho, radius, visc, shear, bulk, R, m_core, ρ_core, μ_core, κ_core; dr_min=300, dr_max=3000, n=2, m=2, core="liquid")Use 1D solid tides model with relaxation method to calculate k2 Lovenumbers, and compute 1D heating profile from strain tensor. This method includes inertia effects, but is more computationally expensive.
Arguments
omega::prec: Forcing frequency range.rho::Array{prec,1}: Density profile of the planet.radius::Array{prec,1}: Radial positions of layers, from core to surface.visc::Array{prec,1}: Viscosity profile of the planet.shear::Array{precc,1}: Complex shear modulus profile of the planet.bulk::Array{prec,1}: Bulk modulus profile of the planet.phi::Array{prec,1}: Melt fraction (porosity) profile of the planet.R::prec: Planet radius.m_core::prec: Core mass.ρ_core::prec: Core density.μ_core::prec: Core shear modulus.κ_core::prec: Core bulk modulus.
Keyword Arguments
dr_min::Int=300: Minimum layer thickness in m.dr_max::Int=3000: Maximum layer thickness in m.n::Int=2: Power of the radial factor (goes with (r/a)^{n}, since r<<a only n=2 contributes significantly).m::Int=2: Harmonic of the true anomaly. m=2 corresponds to the semidiurnal tide, m=1 diurnal tide.core::String="liquid": Core state, either "liquid", "solid", or "inertial".visc_l::Float64=1e2: Liquid viscosity.bulk_l::Float64=1e9: Liquid bulk modulus.permea::Float64=1e-7: Permeability of mush layer.porosity_thresh::Float64=1e-5: Porosity threshold, below this value no mush.
Returns
power_prf::Array{prec,1}: Heating profile.power_map::Array{prec,4}: Heating map (frequency, colatitude, longitude).k2_T::precc: Complex Tidal k2 Lovenumber.k2_L::precc: Complex Load k2 Lovenumber.
Obliqua.run_solid1d_relax — Method
run_solid1d_relax(omega, rho, radius, visc, shear, bulk, R, m_core, ρ_core, μ_core, κ_core; dr_min=300, dr_max=3000, n=2, m=2, core="liquid")Use 1D solid tides model with relaxation method to calculate k2 Lovenumbers, and compute 1D heating profile from strain tensor. This method includes inertia effects, but is more computationally expensive.
Arguments
omega::prec: Forcing frequency range.rho::Array{prec,1}: Density profile of the planet.radius::Array{prec,1}: Radial positions of layers, from core to surface.visc::Array{prec,1}: Viscosity profile of the planet.shear::Array{precc,1}: Complex shear modulus profile of the planet.bulk::Array{prec,1}: Bulk modulus profile of the planet.R::prec: Planet radius.m_core::prec: Core mass.ρ_core::prec: Core density.μ_core::prec: Core shear modulus.κ_core::prec: Core bulk modulus.
Keyword Arguments
dr_min::Int=300: Minimum layer thickness in m.dr_max::Int=3000: Maximum layer thickness in m.n::Int=2: Power of the radial factor (goes with (r/a)^{n}, since r<<a only n=2 contributes significantly).m::Int=2: Harmonic of the true anomaly. m=2 corresponds to the semidiurnal tide, m=1 diurnal tide.core::String="liquid": Core state, either "liquid", "solid", or "inertial".
Returns
power_prf::Array{Float64,1}: Heating profile.power_map::Array{Float64,4}: Heating map (frequency, colatitude, longitude).k2_T::ComplexF64: Complex Tidal k2 Lovenumber.k2_L::ComplexF64: Complex Load k2 Lovenumber.
Obliqua.run_tides — Method
run_tides(omega, axial, ecc, sma, S_mass, rho, radius, visc, shear, bulk, cfg)Compute the tidal heating profile of a planetary interior considering solid and fluid layers.
Arguments
omega::prec: Orbital frequency of the body.axial::prec: Axial (spin) frequency of the body.ecc::prec: Orbital eccentricity.sma::prec: Semi-major axis of the orbit.S_mass::prec: Mass of the central body (e.g., star) inducing tides.rho::Array{prec,1}: Radial density profile of the planet, from core to surface.radius::Array{prec,1}: Radial positions of layers, from core to surface.visc::Array{prec,1}: Viscosity profile of the planet.shear::Array{prec,1}: Shear modulus profile of the solid layers.bulk::Array{prec,1}: Bulk modulus profile of the solid layers.cfg::Dict: Configuration parameters from dictionary.
Returns
power_prf::Array{Float64,1}: Radial profile of tidal heating (W/m³).power_blk::Float64: Total tidal power integrated over the interior (W).σ_range::Array{Float64,1}: Frequencies at which the Love numberk2was evaluated.imag_k2::Array{Float64,1}: Imaginary part of the Love numberk2for the planet.
Obliqua.setup_logging — Method
Setup terminal logging and file logging.Arguments:
outpath::String: Output file (empty to disable file logging)verbosity::Int: Verbosity (0: silent, 1: normal, 2: debug)