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.Solid, Obliqua.Love and Obliqua.Fluid. In principle, this is rather simple, since you only have to call one function depending on your use case. 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.

Warning

Newer versions of the code will stop using the distinct phase calc_..._tides functions, instead all models can be accessed through run_tides.

using Obliqua

# location of data files
RES_DIR = "/path/to/Obliqua/res"

# use the relevant load function
omega, ecc, rho, radius, visc, shear, bulk, ncalc = Obliqua.load.load_interior("$RES_DIR/interior_data/test_mantle.json", false)

# call the desired model
power_prf, power_blk, imag_k2 = Obliqua.calc_solid_tides(omega, ecc, rho, radius, visc, shear, bulk; ncalc=ncalc, material="maxwell")

In general, we can use

TidesFunction
solid-phaseObliqua.calc_solid_tides
solid-phase + mush interfaceObliqua.calc_solid_tides_mush
liquid-phaseObliqua.calc_fluid_tides
mixed-phaseObliqua.run_tides


Obliqua.complex_muMethod
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.
source
Obliqua.get_layersMethod
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.
source
Obliqua.make_loggerMethod
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.
source
Obliqua.open_configMethod
Open and validate config file.

Arguments:

  • cfg_path::String : Path to configuration file

Returns:

  • cfg_dict::Dict : Dictionary containing the configuration
source
Obliqua.run_fluid0dMethod
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::precc : Complex Tidal k2 Lovenumber.
  • k2_L::precc : Complex Load k2 Lovenumber.
source
Obliqua.run_fluid1dMethod
run_fluid1d(omega, rho, radius, gravity, ρ_mean_lower, S_mass, sma; n=2, sigma_R=1e-3, sigma_R_prf="uniform", H_R=1e3, efficiency=0.3)

Calculate k2 Lovenumbers in the 1D fluid, and compute 1d heating profile from density-contrast and Rayleigh-drag.

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.
  • gravity::Array{prec,1} : Cumulative gravity profile.
  • ρ_mean_lower::prec : Mean density of lower (non-fluid) layer.
  • S_mass::prec : Stellar mass.
  • sma::prec : Semimajor axis.
  • R::prec : Planet Radius.

Keyword Arguments

  • n::Int=2 : Power of the radial factor (goes with (r/a)^{n}, since r<<a only n=2 contributes significantly).
  • σ_R::Float64=1e-3 : Rayleigh drag coefficient at interface.
  • σ_inf::Float64=1e-3 : Rayleigh drag coefficient in pure fluid.
  • sigma_R_prf::String="uniform" : Rayleigh drag profile.
  • H_R::Float64=1e3 : Rayleigh drag scale height.
  • efficiency::Float64=0.3 : Rayleigh drag efficiency at core interface.

Returns

  • power_prf::Array{prec,1} : Heating profile.
  • k2_T::precc : Complex Tidal k2 Lovenumber.
  • k2_L::precc : Complex Load k2 Lovenumber.
source
Obliqua.run_interpMethod
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{prec,1} : Heating profile.
  • k2_T::precc : Complex Tidal k2 Lovenumber.
  • k2_L::precc : Complex Load k2 Lovenumber.
source
Obliqua.run_solid0dMethod
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::precc : Complex Tidal k2 Lovenumber.
  • k2_L::precc : Complex Load k2 Lovenumber.
source
Obliqua.run_solid1dMethod
run_solid1d(omega, rho, radius, visc, shear, bulk; ncalc=2000, n=2, m=2)

Use 1D solid tides model to calculate k2 Lovenumbers, and compute 1D heating profile from strain tensor.

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.

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.

Returns

  • power_prf::Array{prec,1} : Heating profile.
  • k2_T::precc : Complex Tidal k2 Lovenumber.
  • k2_L::precc : Complex Load k2 Lovenumber.
source
Obliqua.run_solid1d_mushMethod
run_solid1d_mush(omega, rho, radius, visc, shear, bulk, phi, R; 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.

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.
  • 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.
  • k2_T::precc : Complex Tidal k2 Lovenumber.
  • k2_L::precc : Complex Load k2 Lovenumber.
source
Obliqua.run_tidesMethod
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 number k2 was evaluated.
  • imag_k2::Array{Float64,1} : Imaginary part of the Love number k2 for the planet.
source
Obliqua.setup_loggingMethod
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)
source