Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cross validation Spider / Aragog #309

Open
lsoucasse opened this issue Dec 11, 2024 · 23 comments
Open

Cross validation Spider / Aragog #309

lsoucasse opened this issue Dec 11, 2024 · 23 comments
Assignees
Labels
interior Physics - interior evolution JOSS publication: PROTEUS TBD before PROTEUS JOSS publication Priority 2: high Priority level 2: high time criticality or importance

Comments

@lsoucasse
Copy link
Member

We have now Aragog running, using look up table and producing reasonable output.

But we now need a comparison with Spider to validate the implementation, see first results from @planetmariana here.

@lsoucasse lsoucasse added the interior Physics - interior evolution label Dec 11, 2024
@lsoucasse lsoucasse added the Priority 2: high Priority level 2: high time criticality or importance label Dec 11, 2024
@planetmariana
Copy link
Contributor

Hi @timlichtenberg @lsoucasse @nichollsh,

I run the exact same simulation as here, but with interior model=SPIDER. With those conditions the planet reached the global energy balance. Besides the time-stepping factor mentioned #193, the rheological front when using Aragog starts above the CMB, so I'm a bit confused about it, as we are using the same melting curves, just in the P-T space. On the other side, both of them finish around the same time. We can discuss further about this, in the meantime I will check from the Aragog which parameter is causing the behaviour in the first 80 GPa.

plot_interior
plot_global_log

@timlichtenberg
Copy link
Member

I copy the images from the Aragog run from #306 (comment) to here in this thread again.
image
image

It looks to me as if the Aragog simulation is not initialised on an adiabat. From 80 GPa downwards the temperature profile is isothermal already at the first timestep. We need to understand the reason for this, possibly the initialisation is not yet working correctly?

@timlichtenberg timlichtenberg moved this from Next up to In Progress in PROTEUS Development Roadmap Dec 13, 2024
@lsoucasse
Copy link
Member Author

Could you send us the corresponding Aragog input file @planetmariana ?

@planetmariana
Copy link
Contributor

@lsoucasse is the input file Aragog.toml in main, I just change the interior model as SPIDER or Aragog, using both with JANUS. Both simulations took around 12hr, so for now I'm checking from Aragog which parameter can be changed. As discussed before @timlichtenberg if I change rheological_transition_melt_fraction there's a difference, but I don't know how unphysical that can be. See below:

Output from Aragog with rheological_transition_melt_fraction=0.4 :
mixed_phase

Output from Aragog with rheological_transition_melt_fraction=0.2
rheological_0 2

@timlichtenberg
Copy link
Member

0.4 is good and can stay. The latter is output from only running Aragog directly, and the former is using PROTEUS to execute Aragog, right? In the latter plot (just Aragog) the temperature profile looks adiabatic, it's only that the initial temperature is not high enough to generate a fully molten planet. This could mean that something is not properly communicated from PROTEUS to Aragog.

@planetmariana
Copy link
Contributor

Yes, these last ones are outputs directly from Aragog. Ok, I see the problem. I will check then outputs/inputs from both sides to see where's the difference.

@lsoucasse lsoucasse added the JOSS publication: PROTEUS TBD before PROTEUS JOSS publication label Dec 16, 2024
@planetmariana
Copy link
Contributor

Hi @timlichtenberg @lsoucasse @djbower,

I changed the initial config file for both SPIDER and Aragog for prescribed heat flux at the surface 1e6 and 0.0 at the inner boundary and the same end_time (500). I over plotted the liquidus to be sure that the initial profile was super-liquidus and also plotted the heat fluxes in Log scale. The convective and conductive heat fluxes are still very different, but if you take a look to the thermal profile of Aragog at t=500 around 100GPa is showing the same behaviour as we discussed previously in this discussion: here, even with the initial temperature file 0.json from SPIDER.

SPIDER

Image

Aragog

Image

Also, I noticed that this line from output.py:

# plot temperature
try:
axs[0].scatter(self.liquidus_K_staggered, self.pressure_GPa_staggered)
axs[0].scatter(self.solidus_K_staggered, self.pressure_GPa_staggered)
except AttributeError:
pass

Is not being executed, ie. is not plotting the solidus and liquidus (I did it manually), but it's also not raising an AttributeError, unless I call self.liquidus_K_staggered directly, where it complains about that the pressure must be set before calling the liquidus/solidus. I'm not sure if this can represent a real problem (like when evaluating the other properties on the melting curves) or if it's only affecting the plotting section.

@timlichtenberg
Copy link
Member

This doesn not look too bad for me, nice! :) First, the system is now cooling, check! This is different than in the linked thread, in there the system was initially isothermal and then heated up at the bottom and cooled at the top. The behaviour of this plot here is quite different (which is good)! SPIDER and Aragog follow a somewhat different (but both overall reasonable) cooling path and the thermal gradient of Aragog seems to follow a somewhat different behaviour, which could be correct given the convective fluxes.

We cannot quite tell, however. First, you are plotting different init time steps it seems to me (after 1 yr for SPIDER, 0 yr for Aragog). This means we cannot compare the actual convective flux. Then the cooling path is hard to follow, as we only have 2 time steps overall.

Can you please add to the plots:

  • Time steps 0 yr and 1 yr for both, so we can compare the same times.
  • About 5-10 time steps inbetween (if they exist). These should be all differently colored (in shades of a colormap), so we can distinguish them. Also please make sure that all time steps have the same color in both plots.

@planetmariana
Copy link
Contributor

@timlichtenberg Sure ! Discussing with @lsoucasse I was wondering why Aragog take the initial temperature field and then warms to consequently gets cooler, it's following the melting curves correctly, but still a bit curious. Also, it's visible the difference in order of magnitud still on the convective heat flux as it evolves. And, the melt fraction at the lower boundary has a jump but I think that can be related to the limits I set to all the lookup tables (up to 135GPa). In any case, we realised that the problem with the liquidus being set before the pressure it's only affecting the plotting part and not the evaluation of other properties.

SPIDER

Image

Aragog
Image

@planetmariana
Copy link
Contributor

Hi @timlichtenberg @lsoucasse ,

I was testing Aragog with the init_temperature= adiabat from SPIDER, with the parameters of surface_temperature and basal_temperature, just to check that Aragog was not getting confused on using the init_temperature or the fixed temperatures. In this case I put the upper and lower values from the temperature field and the temperature field itself, realising that after timestep 0 the adiabatic warms and then gets cooler as I mentioned to you before.

Image

I tried to set an end_time=1e6, but the simulation finish at 1e3, so I set a statement for debugging, where I obtained this:

aragog.solver - INFO - message: Required step size is less than spacing between numbers.

Then, I was reading that can be related to the way that the solver is managing rapidly changing derivatives. In any case, I tried also with an initial temperature field isothermal, obtaining exactly the same error, but very small changes in time (1e-27):

Image

I will keep printing debugging logs from the solver to check if it's the method itself of the the grid resolution that is affecting the whole process :)

@timlichtenberg
Copy link
Member

timlichtenberg commented Jan 31, 2025

Thanks! Can you attach the used config files for these runs please?

@planetmariana
Copy link
Contributor

@planetmariana
Copy link
Contributor

planetmariana commented Feb 6, 2025

Hi @timlichtenberg @lsoucasse,

I did the comparison between Aragog and SPIDER with:

  • Upper boundary condition (Grey atmosphere with emmisivity=1 and Teqm=273).

  • 220 nodes.

I produce this two movies to see the evolution more in detail but overall they seem to behave similarly. Although, right now I'm running new simulations with: core cooling condition and fixed heat flux at the upper boundary and higher resolution but it's taking a bit long, so I will try to run them in the cluster.

Aragog:
https://github.com/user-attachments/assets/114787c6-3075-47b9-b872-fad72fe0b3f2

SPIDER
https://github.com/user-attachments/assets/9f9761a4-6c64-41a2-b84a-e0d1b4ec2e1e

@timlichtenberg
Copy link
Member

Awesome, thanks for the update! After our discussion yesterday, we settled on now doing the comparison for convective- and conductive-flux only with Aragog and SPIDER to see how the codes compare with only the exact same flux terms operating.

In addition, we are trying to smoothen the usage of Aragog within PROTEUS; for that we want to run PROTEUS with default settings (as discussed yesterday) and compare it by simply switching out Aragog vs. SPIDER, with settings as close as possible to each other.

@lsoucasse
Copy link
Member Author

I have tried to run the default settings with Aragog (and Janus) but it is extremely slow.
It gets stuck at iteration 6 which is the first significant time step (300 years) but did not completed it after 2 hours...
Do you experience such long running time Mariana?

@planetmariana
Copy link
Contributor

Hi @lsoucasse , yes when using Aragog+JANUS it can take up to 8hr with default settings.

@timlichtenberg
Copy link
Member

Can you do a comparison with AGNI?

@lsoucasse
Copy link
Member Author

Can you do a comparison with AGNI?

I tried with AGNI but it fails to converge and provide a solution with default settings. Here is the log.

failed-coupled-agni.log

@nichollsh
Copy link
Contributor

AGNI also seems to be performing very slowly for you. In one of the PROTEUS steps, it only manages a single iteration before timing-out.

@nichollsh
Copy link
Contributor

nichollsh commented Feb 14, 2025

Which points to a SOCRATES issue. I also noticed that sometimes SOCRATES was returning garbage values in the GitHub actions. I don't think this is a fault of gfortran, but it points to a problem with the spectral files. The files themselves have not changed, so my suspicion is that OSF could be providing corrupted data...

@timlichtenberg
Copy link
Member

timlichtenberg commented Feb 14, 2025

I notice that the volatile settings are somewhat extreme in the .toml file. I cannot find earth-demo.toml in current main. Is that the same as default.toml?

@nichollsh
Copy link
Contributor

nichollsh commented Feb 14, 2025

On this note, I should add that AGNI will not perform well when getting down to Earth-like surface temperatures. It will probably try to rain-out a large fraction of the atmosphere, since the outgassing will generate a massive amount of steam.

@timlichtenberg
Copy link
Member

It's probably okay to stop at mantle solidification for the demo, but that should be followed up I guess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
interior Physics - interior evolution JOSS publication: PROTEUS TBD before PROTEUS JOSS publication Priority 2: high Priority level 2: high time criticality or importance
Projects
Status: In Progress
Development

No branches or pull requests

4 participants