Skip to content

Md/proteus#25

Merged
MarijnJ0 merged 29 commits intomainfrom
md/PROTEUS
Mar 8, 2026
Merged

Md/proteus#25
MarijnJ0 merged 29 commits intomainfrom
md/PROTEUS

Conversation

@MarijnJ0
Copy link
Member

Description

This PR fixes the normalization issues throughout the code. This version is fully able to self-consistently calculate the tidal dissipation in solid/fluid/mush regions in the mantle. Additionally, the changes involve a new logger function, adaptive spectrum, and updated test data. These changes allow Obliqua to be integrated into PROTEUS. The new test data is obtained from PROTEUS. I'm currently working on a PR for PROTEUS which will also make PROTEUS compatible with Obliqua. Currently, this does not include simulating multiple tide inducing objects, this will be part of a next PR. I made minimal changes to the docs, these should however also be updated soon given the newly introduced functionality.

Key changes:

  • Updated config files.
  • Automatic s range selection.
  • Adaptive and Full Imk2 spectrum calculations.
  • New heating profile plots.
  • Updated interpolator using log log.
  • New fluid1d tides module.
  • New mush tidal dissipation description (interp function).
  • Generalized spherical harmonics.
  • Generalized normalization across all modules.
  • Love.jl has been split into the two modules: solid1d.jl and solid1d_mush.jl.
  • Removed ad hoc heating functions in favour of proper expressions.
  • Removed individual calc_tides functions, everything is accessed through Obliqua.run_tides.

Closes #7, #22, and #24

Screenshots

Runtests.jl output:
afbeelding
afbeelding

The warnings appear since the tests only cover a single s (s=1), while proper convergence would require -4<=s<=4. This is fine for testing.

Runtests.jl combined model output. Note, this is using the adaptive profile, so we only probe a small range of forcing frequencies and Imk2.
all_layers_k2_1
tidal_heating_map_segment_1

Validation of changes

Tested on linux, ubuntu, with Julia Version 1.11.6.

Checklist

  • I have followed the contributing guidelines
  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • My changes generate no new warnings or errors
  • I have checked that the tests still pass on my computer
  • I have updated the docs, as appropriate
  • I have added tests for these changes, as appropriate
  • I have checked that all dependencies have been updated, as required

Relevant people

@nichollsh @timlichtenberg

MarijnJ0 and others added 21 commits February 1, 2026 21:45
…terate true forcing freqs, to enable Hansen passthrough to tide functions.
…ofile and has several Rayleigh drag scalings. Added semi-selfconsistent heating profile for solid1d and solid1d-mush models.
…ved Love.jl to solid1d.jl and solid1d_mush.jl. Renamed Solid.jl to solid0d.jl.
…ua.jl now only requires s values when running in adaptive mode.
@MarijnJ0 MarijnJ0 requested a review from a team as a code owner February 28, 2026 14:42
Copilot AI review requested due to automatic review settings February 28, 2026 14:42
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR refactors and extends Obliqua’s tidal dissipation pipeline to support self-consistent normalization and combined solid/fluid/mush dissipation, enabling integration with PROTEUS workflows.

Changes:

  • Introduces new 1D solid modules (solid1d, solid1d_mush) and updates existing 0D modules (solid0d, fluid0d) and core Love/heating routines to support the new normalization and spectrum behavior.
  • Expands plotting utilities (Imk2 spectrum + segment heating maps) and updates configuration files for adaptive/full spectrum settings and module selection.
  • Updates/extends the test suite and adds new PROTEUS-derived interior test data.

Reviewed changes

Copilot reviewed 16 out of 17 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
test/runtests.jl Updates tests to exercise Obliqua.run_tides across solid/fluid/mush module combinations and new reference data.
src/solid1d.jl New solid 1D propagator + heating profile implementation.
src/solid1d_mush.jl New two-phase (mush) 1D propagator + heating profile implementation.
src/solid0d.jl Renames module to solid0d to align with new module structure.
src/fluid0d.jl Renames module to fluid0d and removes obsolete helper.
src/Love.jl Adjusts 1D helper names/signatures and updates heating-profile APIs.
src/Hansen.jl Adds adaptive k/s range selection helper for Hansen coefficient truncation.
src/plotting.jl Adds segment-wise Imk2 spectrum plotting and a heating heatmap helper; refines log-scale plotting behavior.
src/load.jl Fixes interior verification field check (phi).
res/interior_data/runtests_mantle.json Adds new PROTEUS-derived interior dataset used by tests.
res/config/*.toml Updates default/runtest/all-options configs for new module selection + spectrum options.
docs/src/development.md Updates autodocs module list to new submodule names.
Project.toml Adds Statistics dependency/compat entry.
src/fwlLove.jl Removes legacy entrypoint module.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@nichollsh nichollsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for these changes, @MarijnJ0. It's exciting to see that we are very nearly ready to use Obliqua within PROTEUS. Please see my comments on this PR below.

1) Install errors

Additionally, I tried to follow the install instructions and found that it does not work:

(@v1.11) pkg> add https://github.com/FormingWorlds/Obliqua.git#julia
     Cloning git-repo `https://github.com/FormingWorlds/Obliqua.git`
    Updating git-repo `https://github.com/FormingWorlds/Obliqua.git`
ERROR: Did not find rev julia in repository

I am not sure that this is the command we want, since it also re-clones Obliqua from GitHub, despite previous install steps instructing the user to clone it manually. Maybe just add . would be better? Running add . works for me.

I am then able to run the tests on my laptop successfully.

2) Dependencies

The Project.toml file is also missing the LoggingExtras package.

3) Contributors

We have decided to move away from having an explicit Contributors table in the FWL repo readme files. Please remove this from the Obliqua readme.


const G::prec = prec(6.6743e-11) # m^3 kg^-1 s^-2

M = 8
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is the meaning of these variables at the top of the module scope? Are they fixed parameters or updated during runtime?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The parameters are updated during run time. They are defined like this, so that we can call 'solid1d_mush.res' to access them.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see. The reason I ask is because global variables are generally a bad idea: https://eugenekj.github.io/Linkedin_Articles/articles/Coding_Standards/06_Avoid_Global_Variables.html

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree, I have removed some of them now and can try to remove the rest as well. However, since the remaining ones are only updated when the define_spherical_grid function is called, I don't think it is a big issue (for now).

@nichollsh
Copy link
Member

@MarijnJ0 please let me know when this needs to be reviewed again :)

@MarijnJ0
Copy link
Member Author

MarijnJ0 commented Mar 8, 2026

@nichollsh, if you could review the code again that would be great! I think the requested changes should be in the code now. However, if you want me to remove the remaining global parameters in solid1d and solid1d-mush, let me know and I will try to do that first. Thanks!

Copy link
Member

@nichollsh nichollsh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes you made since my last PR look good to me. Thank you for addressing these.

I have also run the tests on my laptop and tried using the all_options.toml directly via the Julia REPL. Both seem to function fine: the tests pass, and the heating profile plot is reasonable.

In another PR, it would be ideal to update the docs (tutorials?) explaining clearly how to run the code from a config file.

I suggest that we merge this PR now, so that the changes discussed in our last meeting can be implemented.

@MarijnJ0 MarijnJ0 merged commit fdcb829 into main Mar 8, 2026
2 checks passed
@MarijnJ0 MarijnJ0 deleted the md/PROTEUS branch March 8, 2026 13:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Test Obliqua implementation in PROTEUS

3 participants