Skip to content

Commit f1a6805

Browse files
Merge pull request #408 from FormingWorlds/events
Event triggering to recompute outer boundary condition
2 parents 4843283 + aaebb06 commit f1a6805

31 files changed

+51
-29
lines changed

.github/workflows/tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
strategy:
2222
matrix:
2323
os: ['ubuntu-latest', 'macos-latest']
24-
python-version: ['3.11', '3.13']
24+
python-version: ['3.12','3.13']
2525
include:
2626
- os: ubuntu-latest
2727
INSTALL_DEPS: sudo apt-get update; sudo apt-get install libnetcdff-dev netcdf-bin libssl-dev

input/all_options.toml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -196,8 +196,8 @@ author = "Harrison Nicholls, Tim Lichtenberg, Mariana Sastre"
196196
F_initial = 1e3 # Initial heat flux guess [W m-2]
197197
radiogenic_heat = false # enable radiogenic heat production
198198
tidal_heat = false # enable tidal heat production
199-
rheo_phi_loc = 0.3 # Centre of rheological transition
200-
rheo_phi_wid = 0.15 # Width of rheological transition
199+
rheo_phi_loc = 0.6 # Centre of rheological transition
200+
rheo_phi_wid = 0.2 # Width of rheological transition
201201
bulk_modulus = 260e9 # Bulk modulus [Pa]
202202

203203
module = "spider" # Which interior module to use
@@ -214,9 +214,17 @@ author = "Harrison Nicholls, Tim Lichtenberg, Mariana Sastre"
214214
ini_dsdr = -4.698e-6 # Interior entropy gradient [J K-1 kg-1 m-1]
215215

216216
[interior.aragog]
217-
num_levels = 100 # Number of Aragog grid levels
218-
tolerance = 1.0e-7 # solver tolerance
219-
ini_tmagma = 3000.0 # Initial magma surface temperature [K]
217+
num_levels = 50 # Number of Aragog grid levels
218+
tolerance = 1.0e-7 # solver tolerance
219+
ini_tmagma = 3300.0 # Initial magma surface temperature [K]
220+
inner_boundary_condition = 1 # 1 = core cooling model, 2 = prescribed heat flux, 3 = prescribed temperature
221+
inner_boundary_value = 4000 # core temperature [K], if inner_boundary_condition = 3. CMB heat flux [W/m^2], if if inner_boundary_condition = 2
222+
conduction = true # enable conductive heat transfer
223+
convection = true # enable convective heat transfer
224+
gravitational_separation = false # enable gravitational separation
225+
mixing = false # enable mixing
226+
tsurf_poststep_change = 30 # threshold of maximum change on surface temperature
227+
event_triggering = true # enable events triggering to avoid abrupt jumps in surface temperature
220228

221229
[interior.dummy]
222230
ini_tmagma = 3500.0 # Initial magma surface temperature [K]

input/demos/aragog.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,9 @@ author = "Harrison Nicholls, Tim Lichtenberg"
117117
convection = true # enable convective heat transfer
118118
gravitational_separation = false # enable gravitational separation
119119
mixing = false # enable mixing
120+
tsurf_poststep_change = 30 # threshold of maximum change on surface temperature, compares current and first Tsurf
121+
event_triggering = true # enable events triggering to avoid abrupt jumps in surface temperature
122+
120123

121124
[interior.dummy]
122125
ini_tmagma = 3500.0 # Initial magma surface temperature [K]

input/minimal.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,11 @@ author = "Harrison Nicholls, Tim Lichtenberg, Mariana Sastre"
3232
corefrac = 0.55 # non-dim., radius fraction
3333

3434
[atmos_clim]
35-
module = "agni" # Which atmosphere module to use
35+
module = "janus" # Which atmosphere module to use
3636

37-
[atmos_clim.agni]
38-
spectral_group = "Honeyside" # which gas opacities to include
39-
spectral_bands = "48" # how many spectral bands?
37+
[atmos_clim.janus]
38+
spectral_group = "Frostflow" # which gas opacities to include
39+
spectral_bands = "16" # how many spectral bands?
4040

4141
[escape]
4242
module = "zephyrus"

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ authors = [
1515
{name = "Laurent Soucasse", email = "l.soucasse@esciencecenter.nl"},
1616
{name = "Stef Smeets", email = "s.smeets@esciencecenter.nl"},
1717
{name = "Dan J. Bower", email = "dbower@ethz.ch"},
18-
{name = "Mariana V. Sastre", email = "m.c.villamil.sastre@rug.nl"},
18+
{name = "Mariana Sastre", email = "m.c.villamil.sastre@rug.nl"},
1919
{name = "Emma Postolec", email = "e.n.postolec@rug.nl"},
2020
{name = "Mark Hammond", email = "mark.hammond@physics.ox.ac.uk"},
2121
{name = "Patrick Sanan", email = "patrick.sanan@gmail.com"},
@@ -49,12 +49,12 @@ dependencies = [
4949
"fwl-mors>=25.02.26",
5050
"fwl-calliope>=25.05.01",
5151
"fwl-zephyrus>=25.03.11",
52-
"aragog>=0.1.11a0",
52+
"aragog>=v0.2.5-alpha",
5353
"cmcrameri",
5454
"juliacall",
5555
"matplotlib",
5656
"netCDF4",
57-
"numpy",
57+
"numpy>=2.0.0",
5858
"pandas",
5959
"scipy",
6060
"sympy",

src/proteus/config/_interior.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ class Aragog:
8686
Whether to include gravitational separation in the model. Default is False.
8787
mixing: bool
8888
Whether to include mixing in the model. Default is False.
89+
tsurf_poststep_change: float
90+
Maximum change in surface temperature allowed during a single interior iteration [K].
91+
event_triggering: bool
92+
Whether to include event triggering in the solver. Default is True.
8993
"""
9094

9195
logging: str = field(default='ERROR',validator=in_(('INFO', 'DEBUG', 'ERROR', 'WARNING')))
@@ -98,6 +102,8 @@ class Aragog:
98102
convection: bool = field(default=True)
99103
gravitational_separation: bool = field(default=False)
100104
mixing: bool = field(default=False)
105+
tsurf_poststep_change: float = field(default=30, validator=ge(0))
106+
event_triggering:bool = field(default=True)
101107

102108

103109
def valid_interiordummy(instance, attribute, value):

src/proteus/interior/aragog.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,8 @@ def setup_solver(config:Config, hf_row:dict, interior_o:Interior_t):
9090
end_time = 0,
9191
atol = config.interior.aragog.tolerance,
9292
rtol = config.interior.aragog.tolerance,
93+
tsurf_poststep_change = config.interior.aragog.tsurf_poststep_change,
94+
event_triggering = config.interior.aragog.event_triggering,
9395
)
9496

9597
boundary_conditions = _BoundaryConditionsParameters(

src/proteus/interior/spider.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ def _try_spider( dirs:dict, config:Config,
354354
call_sequence.extend(["-param_utbl_const", "1.0E-7"]) # value of parameterisation
355355

356356
# fO2 buffer chosen to define fO2 (7: Iron-Wustite)
357-
call_sequence.extend(["-OXYGEN_FUGACITY", "7"])
357+
call_sequence.extend(["-OXYGEN_FUGACITY", "2"])
358358

359359
# radionuclides
360360
if config.interior.radiogenic_heat:
-117 KB
Binary file not shown.
-26.3 KB
Binary file not shown.

0 commit comments

Comments
 (0)