From 45073111727adecb1d8f8e5ed49dcaf7e0c47425 Mon Sep 17 00:00:00 2001 From: Rory Barnes Date: Fri, 12 Apr 2024 16:46:24 -0700 Subject: [PATCH] Fixed bug in which a body running only atmesc did not lose water if dFXUV was set. Added new tests for water loss from constant XUV flux --- src/atmesc.c | 29 +++-- ..._WaterELimConstXUVLB15NoO2SinkBolmont16.py | 119 ++++++++++++++++++ .../vpl.in | 4 +- .../earth.in | 31 +++++ ...ELimConstXUVLB15NoO2SinkConstXAbsEffH2O.py | 119 ++++++++++++++++++ .../vpl.in | 24 ++++ .../earth.in | 30 +++++ ...st_WaterELimConstXUVLB15SinkO2Bolmont16.py | 119 ++++++++++++++++++ .../vpl.in | 24 ++++ .../earth.in | 31 +++++ ...erELimConstXUVLB15SinkO2ConstXAbsEffH2O.py | 119 ++++++++++++++++++ .../vpl.in | 24 ++++ .../earth.in | 30 +++++ ...terELimConstXUVLBExactNoO2SinkBolmont16.py | 119 ++++++++++++++++++ .../vpl.in | 24 ++++ .../earth.in | 31 +++++ ...mConstXUVLBExactNoO2SinkConstXAbsEffH2O.py | 119 ++++++++++++++++++ .../vpl.in | 24 ++++ .../earth.in | 30 +++++ ...WaterELimConstXUVLBExactSinkO2Bolmont16.py | 119 ++++++++++++++++++ .../vpl.in | 24 ++++ .../earth.in | 31 +++++ ...LimConstXUVLBExactSinkO2ConstXAbsEffH2O.py | 119 ++++++++++++++++++ .../vpl.in | 24 ++++ 24 files changed, 1354 insertions(+), 13 deletions(-) create mode 100644 tests/Atmesc/WaterELimConstXUVLB15NoO2SinkBolmont16/test_WaterELimConstXUVLB15NoO2SinkBolmont16.py create mode 100644 tests/Atmesc/WaterELimConstXUVLB15NoO2SinkConstXAbsEffH2O/earth.in create mode 100644 tests/Atmesc/WaterELimConstXUVLB15NoO2SinkConstXAbsEffH2O/test_WaterELimConstXUVLB15NoO2SinkConstXAbsEffH2O.py create mode 100644 tests/Atmesc/WaterELimConstXUVLB15NoO2SinkConstXAbsEffH2O/vpl.in create mode 100644 tests/Atmesc/WaterELimConstXUVLB15SinkO2Bolmont16/earth.in create mode 100644 tests/Atmesc/WaterELimConstXUVLB15SinkO2Bolmont16/test_WaterELimConstXUVLB15SinkO2Bolmont16.py create mode 100644 tests/Atmesc/WaterELimConstXUVLB15SinkO2Bolmont16/vpl.in create mode 100644 tests/Atmesc/WaterELimConstXUVLB15SinkO2ConstXAbsEffH2O/earth.in create mode 100644 tests/Atmesc/WaterELimConstXUVLB15SinkO2ConstXAbsEffH2O/test_WaterELimConstXUVLB15SinkO2ConstXAbsEffH2O.py create mode 100644 tests/Atmesc/WaterELimConstXUVLB15SinkO2ConstXAbsEffH2O/vpl.in create mode 100644 tests/Atmesc/WaterELimConstXUVLBExactNoO2SinkBolmont16/earth.in create mode 100644 tests/Atmesc/WaterELimConstXUVLBExactNoO2SinkBolmont16/test_WaterELimConstXUVLBExactNoO2SinkBolmont16.py create mode 100644 tests/Atmesc/WaterELimConstXUVLBExactNoO2SinkBolmont16/vpl.in create mode 100644 tests/Atmesc/WaterELimConstXUVLBExactNoO2SinkConstXAbsEffH2O/earth.in create mode 100644 tests/Atmesc/WaterELimConstXUVLBExactNoO2SinkConstXAbsEffH2O/test_WaterELimConstXUVLBExactNoO2SinkConstXAbsEffH2O.py create mode 100644 tests/Atmesc/WaterELimConstXUVLBExactNoO2SinkConstXAbsEffH2O/vpl.in create mode 100644 tests/Atmesc/WaterELimConstXUVLBExactSinkO2Bolmont16/earth.in create mode 100644 tests/Atmesc/WaterELimConstXUVLBExactSinkO2Bolmont16/test_WaterELimConstXUVLBExactSinkO2Bolmont16.py create mode 100644 tests/Atmesc/WaterELimConstXUVLBExactSinkO2Bolmont16/vpl.in create mode 100644 tests/Atmesc/WaterELimConstXUVLBExactSinkO2ConstXAbsEffH2O/earth.in create mode 100644 tests/Atmesc/WaterELimConstXUVLBExactSinkO2ConstXAbsEffH2O/test_WaterELimConstXUVLBExactSinkO2ConstXAbsEffH2O.py create mode 100644 tests/Atmesc/WaterELimConstXUVLBExactSinkO2ConstXAbsEffH2O/vpl.in diff --git a/src/atmesc.c b/src/atmesc.c index b62abdce4..dc121cb10 100644 --- a/src/atmesc.c +++ b/src/atmesc.c @@ -4138,18 +4138,25 @@ int fbDoesWaterEscape(BODY *body, EVOLVE *evolve, IO *io, int iBody) { // spectrum! The Kopparapu+14 limit is for a single star only. This // approximation for a binary is only valid if the two stars have // similar spectral types, or if body zero dominates the flux. - if (fdInstellation(body, iBody) < fdHZRG14(body, iBody)) { - if (body[iBody].dRGDuration == 0.) { - body[iBody].dRGDuration = body[iBody].dAge; - if (io->iVerbose > VERBPROG && !io->baEnterHZMessage[iBody]) { - printf("%s enters the habitable zone at %.2lf Myr.\n", - body[iBody].cName, evolve->dTime / (YEARSEC * 1e6)); - io->baEnterHZMessage[iBody] = 1; + double dInstellation = fdInstellation(body, iBody); + if (dInstellation == -1 && body[iBody].bCalcFXUV == 0) { + // Constant XUV flux, so set water to escape + return 1; + } else { + double dRunawayGreenhouseFlux = fdHZRG14(body, iBody); + if (dInstellation < dRunawayGreenhouseFlux) { + if (body[iBody].dRGDuration == 0.) { + body[iBody].dRGDuration = body[iBody].dAge; + if (io->iVerbose > VERBPROG && !io->baEnterHZMessage[iBody]) { + printf("%s enters the habitable zone at %.2lf Myr.\n", + body[iBody].cName, evolve->dTime / (YEARSEC * 1e6)); + io->baEnterHZMessage[iBody] = 1; + } + } + // Only stop water loss if user requested, which is default + if (body[iBody].bStopWaterLossInHZ) { + return 0; } - } - // Only stop water loss if user requested, which is default - if (body[iBody].bStopWaterLossInHZ) { - return 0; } } diff --git a/tests/Atmesc/WaterELimConstXUVLB15NoO2SinkBolmont16/test_WaterELimConstXUVLB15NoO2SinkBolmont16.py b/tests/Atmesc/WaterELimConstXUVLB15NoO2SinkBolmont16/test_WaterELimConstXUVLB15NoO2SinkBolmont16.py new file mode 100644 index 000000000..394aa0d44 --- /dev/null +++ b/tests/Atmesc/WaterELimConstXUVLB15NoO2SinkBolmont16/test_WaterELimConstXUVLB15NoO2SinkBolmont16.py @@ -0,0 +1,119 @@ +from benchmark import Benchmark, benchmark +import astropy.units as u + +@benchmark( + { + "log.initial.system.Age": {"value": 0.000000, "unit": u.sec}, + "log.initial.system.Time": {"value": 0.000000, "unit": u.sec}, + "log.initial.system.TotAngMom": {"value": 4.416946e+33, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.initial.system.TotEnergy": {"value": -2.237790e+32, "unit": u.Joule}, + "log.initial.system.PotEnergy": {"value": -2.239397e+32, "unit": u.Joule}, + "log.initial.system.KinEnergy": {"value": 1.606047e+29, "unit": u.Joule}, + "log.initial.system.DeltaTime": {"value": 0.000000, "unit": u.sec}, + "log.initial.earth.Mass": {"value": 5.972186e+24, "unit": u.kg}, + "log.initial.earth.Radius": {"value": 6.378100e+06, "unit": u.m}, + "log.initial.earth.RadGyra": {"value": 0.500000}, + "log.initial.earth.BodyType": {"value": 0.000000}, + "log.initial.earth.Density": {"value": 5495.038549, "unit": u.kg / u.m ** 3}, + "log.initial.earth.HZLimitDryRunaway": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.HZLimRecVenus": {"value": -1.000000}, + "log.initial.earth.HZLimRunaway": {"value": -1.000000}, + "log.initial.earth.HZLimMoistGreenhouse": {"value": -1.000000}, + "log.initial.earth.HZLimMaxGreenhouse": {"value": -1.000000}, + "log.initial.earth.HZLimEarlyMars": {"value": -1.000000}, + "log.initial.earth.Instellation": {"value": -1.000000, "unit": u.kg / u.sec ** 3}, + "log.initial.earth.MeanMotion": {"value": -1.000000, "unit": 1 / u.sec}, + "log.initial.earth.OrbPeriod": {"value": -1.000000, "unit": u.sec}, + "log.initial.earth.SemiMajorAxis": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.LXUVTot": {"value": -1.000000, "unit": u.kg / u.sec ** 3}, + "log.initial.earth.SurfWaterMass": {"value": 3.000000, "unit": u.TO}, + "log.initial.earth.EnvelopeMass": {"value": 0.000000, "unit": u.kg}, + "log.initial.earth.OxygenMass": {"value": 0.000000, "unit": u.bar}, + "log.initial.earth.RGLimit": {"value": 0.000000, "unit": u.au}, + "log.initial.earth.XO": {"value": 0.333333}, + "log.initial.earth.EtaO": {"value": 0.682959}, + "log.initial.earth.PlanetRadius": {"value": 6.378100e+06, "unit": u.m}, + "log.initial.earth.OxygenMantleMass": {"value": 0.000000, "unit": u.kg}, + "log.initial.earth.RadXUV": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.RadSolid": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.PresXUV": {"value": 5.000000}, + "log.initial.earth.ScaleHeight": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.ThermTemp": {"value": 400.000000, "unit": u.K}, + "log.initial.earth.AtmGasConst": {"value": 4124.000000}, + "log.initial.earth.PresSurf": {"value": -1.000000, "unit": u.Pa}, + "log.initial.earth.DEnvMassDt": {"value": 0.000000, "unit": u.kg / u.sec}, + "log.initial.earth.FXUV": {"value": 100.000000, "unit": u.W / u.m ** 2}, + "log.initial.earth.AtmXAbsEffH2O": {"value": 0.010704}, + "log.initial.earth.RocheRadius": {"value": 1.037254e+11, "unit": u.m}, + "log.initial.earth.BondiRadius": {"value": 1.249016e+08, "unit": u.m}, + "log.initial.earth.HEscapeRegime": {"value": 8.000000}, + "log.initial.earth.RRCriticalFlux": {"value": 53.697959, "unit": u.W / u.m ** 2}, + "log.initial.earth.CrossoverMass": {"value": 8.022481e-26, "unit": u.kg}, + "log.initial.earth.WaterEscapeRegime": {"value": 3.000000}, + "log.initial.earth.FXUVCRITDRAG": {"value": 4.977066, "unit": u.W / u.m ** 2}, + "log.initial.earth.HREFFLUX": {"value": 2.578763e+18, "unit": 1 / u.m ** 2 / u.sec}, + "log.initial.earth.XO2": {"value": 0.000000}, + "log.initial.earth.XH2O": {"value": 1.000000}, + "log.initial.earth.HDiffFlux": {"value": 1.264874e+17, "unit": 1 / u.m ** 2 / u.sec}, + "log.initial.earth.HRefODragMod": {"value": 0.154711}, + "log.initial.earth.KTide": {"value": 0.999908}, + "log.initial.earth.RGDuration": {"value": 0.00000e+00, "unit": u.yr}, + "log.final.system.Age": {"value": 3.155760e+13, "unit": u.sec}, + "log.final.system.Time": {"value": 3.155760e+13, "unit": u.sec}, + "log.final.system.TotAngMom": {"value": 4.416946e+33, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.final.system.TotEnergy": {"value": -2.237790e+32, "unit": u.Joule}, + "log.final.system.PotEnergy": {"value": -2.239397e+32, "unit": u.Joule}, + "log.final.system.KinEnergy": {"value": 1.606047e+29, "unit": u.Joule}, + "log.final.system.DeltaTime": {"value": 3.155760e+13, "unit": u.sec}, + "log.final.earth.Mass": {"value": 5.972186e+24, "unit": u.kg}, + "log.final.earth.Radius": {"value": 6.378100e+06, "unit": u.m}, + "log.final.earth.RadGyra": {"value": 0.500000}, + "log.final.earth.BodyType": {"value": 0.000000}, + "log.final.earth.Density": {"value": 5495.038549, "unit": u.kg / u.m ** 3}, + "log.final.earth.HZLimitDryRunaway": {"value": -1.000000, "unit": u.m}, + "log.final.earth.HZLimRecVenus": {"value": -1.000000}, + "log.final.earth.HZLimRunaway": {"value": -1.000000}, + "log.final.earth.HZLimMoistGreenhouse": {"value": -1.000000}, + "log.final.earth.HZLimMaxGreenhouse": {"value": -1.000000}, + "log.final.earth.HZLimEarlyMars": {"value": -1.000000}, + "log.final.earth.Instellation": {"value": -1.000000, "unit": u.kg / u.sec ** 3}, + "log.final.earth.MeanMotion": {"value": -1.000000, "unit": 1 / u.sec}, + "log.final.earth.OrbPeriod": {"value": -1.000000, "unit": u.sec}, + "log.final.earth.SemiMajorAxis": {"value": -1.000000, "unit": u.m}, + "log.final.earth.LXUVTot": {"value": -1.000000, "unit": u.kg / u.sec ** 3}, + "log.final.earth.SurfWaterMass": {"value": 2.930804, "unit": u.TO}, + "log.final.earth.EnvelopeMass": {"value": 0.000000, "unit": u.kg}, + "log.final.earth.OxygenMass": {"value": 5.195716, "unit": u.bar}, + "log.final.earth.RGLimit": {"value": 0.000000, "unit": u.au}, + "log.final.earth.XO": {"value": 0.334993}, + "log.final.earth.EtaO": {"value": 0.682959}, + "log.final.earth.PlanetRadius": {"value": 6.378100e+06, "unit": u.m}, + "log.final.earth.OxygenMantleMass": {"value": 0.000000, "unit": u.kg}, + "log.final.earth.RadXUV": {"value": -1.000000, "unit": u.m}, + "log.final.earth.RadSolid": {"value": -1.000000, "unit": u.m}, + "log.final.earth.PresXUV": {"value": 5.000000}, + "log.final.earth.ScaleHeight": {"value": -1.000000, "unit": u.m}, + "log.final.earth.ThermTemp": {"value": 400.000000, "unit": u.K}, + "log.final.earth.AtmGasConst": {"value": 4124.000000}, + "log.final.earth.PresSurf": {"value": -1.000000, "unit": u.Pa}, + "log.final.earth.DEnvMassDt": {"value": 0.000000, "unit": u.kg / u.sec}, + "log.final.earth.FXUV": {"value": 100.000000, "unit": u.W / u.m ** 2}, + "log.final.earth.AtmXAbsEffH2O": {"value": 0.010704}, + "log.final.earth.RocheRadius": {"value": 1.037254e+11, "unit": u.m}, + "log.final.earth.BondiRadius": {"value": 1.249016e+08, "unit": u.m}, + "log.final.earth.HEscapeRegime": {"value": 8.000000}, + "log.final.earth.RRCriticalFlux": {"value": 53.697959, "unit": u.W / u.m ** 2}, + "log.final.earth.CrossoverMass": {"value": 8.022481e-26, "unit": u.kg}, + "log.final.earth.WaterEscapeRegime": {"value": 3.000000}, + "log.final.earth.FXUVCRITDRAG": {"value": 4.964677, "unit": u.W / u.m ** 2}, + "log.final.earth.HREFFLUX": {"value": 2.578763e+18, "unit": 1 / u.m ** 2 / u.sec}, + "log.final.earth.XO2": {"value": 0.003729}, + "log.final.earth.XH2O": {"value": 0.996271}, + "log.final.earth.HDiffFlux": {"value": 1.261726e+17, "unit": 1 / u.m ** 2 / u.sec}, + "log.final.earth.HRefODragMod": {"value": 0.153738}, + "log.final.earth.KTide": {"value": 0.999908}, + "log.final.earth.RGDuration": {"value": 0.00000e+00, "unit": u.yr}, + } +) +class Test_WaterELimConstXUVLB15NoO2SinkBolmont16(Benchmark): + pass diff --git a/tests/Atmesc/WaterELimConstXUVLB15NoO2SinkBolmont16/vpl.in b/tests/Atmesc/WaterELimConstXUVLB15NoO2SinkBolmont16/vpl.in index f40cbe23e..de6a4d751 100644 --- a/tests/Atmesc/WaterELimConstXUVLB15NoO2SinkBolmont16/vpl.in +++ b/tests/Atmesc/WaterELimConstXUVLB15NoO2SinkBolmont16/vpl.in @@ -20,5 +20,5 @@ dMinValue 1e-10 # Minimum value of eccentricity/obli bDoForward 1 # Perform a forward evolution? bVarDt 1 # Use variable timestepping? dEta 0.1 # Coefficient for variable timestepping -dStopTime 1e8 # Stop time for evolution -dOutputTime 1e8 # Output timesteps (assuming in body files) +dStopTime 1e6 # Stop time for evolution +dOutputTime 1e6 # Output timesteps (assuming in body files) diff --git a/tests/Atmesc/WaterELimConstXUVLB15NoO2SinkConstXAbsEffH2O/earth.in b/tests/Atmesc/WaterELimConstXUVLB15NoO2SinkConstXAbsEffH2O/earth.in new file mode 100644 index 000000000..edbc9444b --- /dev/null +++ b/tests/Atmesc/WaterELimConstXUVLB15NoO2SinkConstXAbsEffH2O/earth.in @@ -0,0 +1,31 @@ +# Planet a parameters +sName earth # Body's name +saModules atmesc # Modules to apply, exact spelling required + +# Physical Properties +dMass -1 # Mass, negative -> Earth masses +dRadius -1 # Radius, negative -> Earth radii +dRotPeriod -1 # Rotation period, negative -> days +dObliquity 23.5 # Retrograde rotation +dRadGyra 0.5 # Radius of gyration (moment of inertia constant) + +# ATMESC Properties +dFXUV -100 # Incident XUV flux (constant) +dXFrac 1.0 # X-Ray/XUV absorption radius (fraction of planet radius) +dSurfWaterMass -3.0 # Initial surface water (Earth oceans) +dEnvelopeMass 0 # Initial envelope mass (Earth masses) +bHaltSurfaceDesiccated 0 # Halt when dry? +bHaltEnvelopeGone 0 # Halt when evaporated? +dMinSurfWaterMass -1.e-5 # Planet is desiccated when water content drops below this (Earth oceans) +sWaterLossModel lb15 +sPlanetRadiusModel none +bInstantO2Sink 0 +sAtmXAbsEffH2OModel none +dAtmXAbsEffH2O 0.1 + +# Orbital Properties +dSemi -1 # Semi-major axis, negative -> AU +dEcc 0.0167 # Eccentricity + +# Output +saOutputOrder Time -SurfWaterMass -RGLimit -OxygenMass diff --git a/tests/Atmesc/WaterELimConstXUVLB15NoO2SinkConstXAbsEffH2O/test_WaterELimConstXUVLB15NoO2SinkConstXAbsEffH2O.py b/tests/Atmesc/WaterELimConstXUVLB15NoO2SinkConstXAbsEffH2O/test_WaterELimConstXUVLB15NoO2SinkConstXAbsEffH2O.py new file mode 100644 index 000000000..acaba3bc4 --- /dev/null +++ b/tests/Atmesc/WaterELimConstXUVLB15NoO2SinkConstXAbsEffH2O/test_WaterELimConstXUVLB15NoO2SinkConstXAbsEffH2O.py @@ -0,0 +1,119 @@ +from benchmark import Benchmark, benchmark +import astropy.units as u + +@benchmark( + { + "log.initial.system.Age": {"value": 0.000000, "unit": u.sec}, + "log.initial.system.Time": {"value": 0.000000, "unit": u.sec}, + "log.initial.system.TotAngMom": {"value": 4.416946e+33, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.initial.system.TotEnergy": {"value": -2.237790e+32, "unit": u.Joule}, + "log.initial.system.PotEnergy": {"value": -2.239397e+32, "unit": u.Joule}, + "log.initial.system.KinEnergy": {"value": 1.606047e+29, "unit": u.Joule}, + "log.initial.system.DeltaTime": {"value": 0.000000, "unit": u.sec}, + "log.initial.earth.Mass": {"value": 5.972186e+24, "unit": u.kg}, + "log.initial.earth.Radius": {"value": 6.378100e+06, "unit": u.m}, + "log.initial.earth.RadGyra": {"value": 0.500000}, + "log.initial.earth.BodyType": {"value": 0.000000}, + "log.initial.earth.Density": {"value": 5495.038549, "unit": u.kg / u.m ** 3}, + "log.initial.earth.HZLimitDryRunaway": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.HZLimRecVenus": {"value": -1.000000}, + "log.initial.earth.HZLimRunaway": {"value": -1.000000}, + "log.initial.earth.HZLimMoistGreenhouse": {"value": -1.000000}, + "log.initial.earth.HZLimMaxGreenhouse": {"value": -1.000000}, + "log.initial.earth.HZLimEarlyMars": {"value": -1.000000}, + "log.initial.earth.Instellation": {"value": -1.000000, "unit": u.kg / u.sec ** 3}, + "log.initial.earth.MeanMotion": {"value": -1.000000, "unit": 1 / u.sec}, + "log.initial.earth.OrbPeriod": {"value": -1.000000, "unit": u.sec}, + "log.initial.earth.SemiMajorAxis": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.LXUVTot": {"value": -1.000000, "unit": u.kg / u.sec ** 3}, + "log.initial.earth.SurfWaterMass": {"value": 3.000000, "unit": u.TO}, + "log.initial.earth.EnvelopeMass": {"value": 0.000000, "unit": u.kg}, + "log.initial.earth.OxygenMass": {"value": 0.000000, "unit": u.bar}, + "log.initial.earth.RGLimit": {"value": 0.000000, "unit": u.au}, + "log.initial.earth.XO": {"value": 0.333333}, + "log.initial.earth.EtaO": {"value": 0.954654}, + "log.initial.earth.PlanetRadius": {"value": 6.378100e+06, "unit": u.m}, + "log.initial.earth.OxygenMantleMass": {"value": 0.000000, "unit": u.kg}, + "log.initial.earth.RadXUV": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.RadSolid": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.PresXUV": {"value": 5.000000}, + "log.initial.earth.ScaleHeight": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.ThermTemp": {"value": 400.000000, "unit": u.K}, + "log.initial.earth.AtmGasConst": {"value": 4124.000000}, + "log.initial.earth.PresSurf": {"value": -1.000000, "unit": u.Pa}, + "log.initial.earth.DEnvMassDt": {"value": 0.000000, "unit": u.kg / u.sec}, + "log.initial.earth.FXUV": {"value": 100.000000, "unit": u.W / u.m ** 2}, + "log.initial.earth.AtmXAbsEffH2O": {"value": 0.100000}, + "log.initial.earth.RocheRadius": {"value": 1.037254e+11, "unit": u.m}, + "log.initial.earth.BondiRadius": {"value": 1.249016e+08, "unit": u.m}, + "log.initial.earth.HEscapeRegime": {"value": 8.000000}, + "log.initial.earth.RRCriticalFlux": {"value": 53.697959, "unit": u.W / u.m ** 2}, + "log.initial.earth.CrossoverMass": {"value": 5.509522e-25, "unit": u.kg}, + "log.initial.earth.WaterEscapeRegime": {"value": 3.000000}, + "log.initial.earth.FXUVCRITDRAG": {"value": 0.532721, "unit": u.W / u.m ** 2}, + "log.initial.earth.HREFFLUX": {"value": 2.409265e+19, "unit": 1 / u.m ** 2 / u.sec}, + "log.initial.earth.XO2": {"value": 0.000000}, + "log.initial.earth.XH2O": {"value": 1.000000}, + "log.initial.earth.HDiffFlux": {"value": 1.264874e+17, "unit": 1 / u.m ** 2 / u.sec}, + "log.initial.earth.HRefODragMod": {"value": 0.115778}, + "log.initial.earth.KTide": {"value": 0.999908}, + "log.initial.earth.RGDuration": {"value": 0.00000e+00, "unit": u.yr}, + "log.final.system.Age": {"value": 3.155760e+13, "unit": u.sec}, + "log.final.system.Time": {"value": 3.155760e+13, "unit": u.sec}, + "log.final.system.TotAngMom": {"value": 4.416946e+33, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.final.system.TotEnergy": {"value": -2.237790e+32, "unit": u.Joule}, + "log.final.system.PotEnergy": {"value": -2.239397e+32, "unit": u.Joule}, + "log.final.system.KinEnergy": {"value": 1.606047e+29, "unit": u.Joule}, + "log.final.system.DeltaTime": {"value": 4.508229e+12, "unit": u.sec}, + "log.final.earth.Mass": {"value": 5.972186e+24, "unit": u.kg}, + "log.final.earth.Radius": {"value": 6.378100e+06, "unit": u.m}, + "log.final.earth.RadGyra": {"value": 0.500000}, + "log.final.earth.BodyType": {"value": 0.000000}, + "log.final.earth.Density": {"value": 5495.038549, "unit": u.kg / u.m ** 3}, + "log.final.earth.HZLimitDryRunaway": {"value": -1.000000, "unit": u.m}, + "log.final.earth.HZLimRecVenus": {"value": -1.000000}, + "log.final.earth.HZLimRunaway": {"value": -1.000000}, + "log.final.earth.HZLimMoistGreenhouse": {"value": -1.000000}, + "log.final.earth.HZLimMaxGreenhouse": {"value": -1.000000}, + "log.final.earth.HZLimEarlyMars": {"value": -1.000000}, + "log.final.earth.Instellation": {"value": -1.000000, "unit": u.kg / u.sec ** 3}, + "log.final.earth.MeanMotion": {"value": -1.000000, "unit": 1 / u.sec}, + "log.final.earth.OrbPeriod": {"value": -1.000000, "unit": u.sec}, + "log.final.earth.SemiMajorAxis": {"value": -1.000000, "unit": u.m}, + "log.final.earth.LXUVTot": {"value": -1.000000, "unit": u.kg / u.sec ** 3}, + "log.final.earth.SurfWaterMass": {"value": 2.516216, "unit": u.TO}, + "log.final.earth.EnvelopeMass": {"value": 0.000000, "unit": u.kg}, + "log.final.earth.OxygenMass": {"value": 5.195716, "unit": u.bar}, + "log.final.earth.RGLimit": {"value": 0.000000, "unit": u.au}, + "log.final.earth.XO": {"value": 0.335265}, + "log.final.earth.EtaO": {"value": 0.954654}, + "log.final.earth.PlanetRadius": {"value": 6.378100e+06, "unit": u.m}, + "log.final.earth.OxygenMantleMass": {"value": 0.000000, "unit": u.kg}, + "log.final.earth.RadXUV": {"value": -1.000000, "unit": u.m}, + "log.final.earth.RadSolid": {"value": -1.000000, "unit": u.m}, + "log.final.earth.PresXUV": {"value": 5.000000}, + "log.final.earth.ScaleHeight": {"value": -1.000000, "unit": u.m}, + "log.final.earth.ThermTemp": {"value": 400.000000, "unit": u.K}, + "log.final.earth.AtmGasConst": {"value": 4124.000000}, + "log.final.earth.PresSurf": {"value": -1.000000, "unit": u.Pa}, + "log.final.earth.DEnvMassDt": {"value": 0.000000, "unit": u.kg / u.sec}, + "log.final.earth.FXUV": {"value": 100.000000, "unit": u.W / u.m ** 2}, + "log.final.earth.AtmXAbsEffH2O": {"value": 0.100000}, + "log.final.earth.RocheRadius": {"value": 1.037254e+11, "unit": u.m}, + "log.final.earth.BondiRadius": {"value": 1.249016e+08, "unit": u.m}, + "log.final.earth.HEscapeRegime": {"value": 8.000000}, + "log.final.earth.RRCriticalFlux": {"value": 53.697959, "unit": u.W / u.m ** 2}, + "log.final.earth.CrossoverMass": {"value": 5.509522e-25, "unit": u.kg}, + "log.final.earth.WaterEscapeRegime": {"value": 3.000000}, + "log.final.earth.FXUVCRITDRAG": {"value": 0.531178, "unit": u.W / u.m ** 2}, + "log.final.earth.HREFFLUX": {"value": 2.409265e+19, "unit": 1 / u.m ** 2 / u.sec}, + "log.final.earth.XO2": {"value": 0.004341}, + "log.final.earth.XH2O": {"value": 0.995659}, + "log.final.earth.HDiffFlux": {"value": 1.261208e+17, "unit": 1 / u.m ** 2 / u.sec}, + "log.final.earth.HRefODragMod": {"value": 0.114892}, + "log.final.earth.KTide": {"value": 0.999908}, + "log.final.earth.RGDuration": {"value": 0.00000e+00, "unit": u.yr}, + } +) +class Test_WaterELimConstXUVLB15NoO2SinkConstXAbsEffH2O(Benchmark): + pass diff --git a/tests/Atmesc/WaterELimConstXUVLB15NoO2SinkConstXAbsEffH2O/vpl.in b/tests/Atmesc/WaterELimConstXUVLB15NoO2SinkConstXAbsEffH2O/vpl.in new file mode 100644 index 000000000..de6a4d751 --- /dev/null +++ b/tests/Atmesc/WaterELimConstXUVLB15NoO2SinkConstXAbsEffH2O/vpl.in @@ -0,0 +1,24 @@ +sSystemName solarsystem # System Name +iVerbose 5 # Verbosity level +bOverwrite 1 # Allow file overwrites? + +# List of "body files" that contain body-specific parameters +saBodyFiles earth.in + +# Input/Output Units +sUnitMass solar # Options: gram, kg, Earth, Neptune, Jupiter, solar +sUnitLength aU # Options: cm, m, km, Earth, Jupiter, solar, AU +sUnitTime YEARS # Options: sec, day, year, Myr, Gyr +sUnitAngle d # Options: deg, rad + +# Input/Output +bDoLog 1 # Write a log file? +iDigits 6 # Maximum number of digits to right of decimal +dMinValue 1e-10 # Minimum value of eccentricity/obliquity + +# Evolution Parameters +bDoForward 1 # Perform a forward evolution? +bVarDt 1 # Use variable timestepping? +dEta 0.1 # Coefficient for variable timestepping +dStopTime 1e6 # Stop time for evolution +dOutputTime 1e6 # Output timesteps (assuming in body files) diff --git a/tests/Atmesc/WaterELimConstXUVLB15SinkO2Bolmont16/earth.in b/tests/Atmesc/WaterELimConstXUVLB15SinkO2Bolmont16/earth.in new file mode 100644 index 000000000..90b82c18e --- /dev/null +++ b/tests/Atmesc/WaterELimConstXUVLB15SinkO2Bolmont16/earth.in @@ -0,0 +1,30 @@ +# Planet a parameters +sName earth # Body's name +saModules atmesc # Modules to apply, exact spelling required + +# Physical Properties +dMass -1 # Mass, negative -> Earth masses +dRadius -1 # Radius, negative -> Earth radii +dRotPeriod -1 # Rotation period, negative -> days +dObliquity 23.5 # Retrograde rotation +dRadGyra 0.5 # Radius of gyration (moment of inertia constant) + +# ATMESC Properties +dFXUV -100 # Incident XUV flux (constant) +dXFrac 1.0 # X-Ray/XUV absorption radius (fraction of planet radius) +dSurfWaterMass -3.0 # Initial surface water (Earth oceans) +dEnvelopeMass 0 # Initial envelope mass (Earth masses) +bHaltSurfaceDesiccated 0 # Halt when dry? +bHaltEnvelopeGone 0 # Halt when evaporated? +dMinSurfWaterMass -1.e-5 # Planet is desiccated when water content drops below this (Earth oceans) +sWaterLossModel lb15 +sPlanetRadiusModel none +bInstantO2Sink 1 +sAtmXAbsEffH2OModel bolmont16 + +# Orbital Properties +dSemi -1 # Semi-major axis, negative -> AU +dEcc 0.0167 # Eccentricity + +# Output +saOutputOrder Time -SurfWaterMass -RGLimit -OxygenMass diff --git a/tests/Atmesc/WaterELimConstXUVLB15SinkO2Bolmont16/test_WaterELimConstXUVLB15SinkO2Bolmont16.py b/tests/Atmesc/WaterELimConstXUVLB15SinkO2Bolmont16/test_WaterELimConstXUVLB15SinkO2Bolmont16.py new file mode 100644 index 000000000..2f2920cfa --- /dev/null +++ b/tests/Atmesc/WaterELimConstXUVLB15SinkO2Bolmont16/test_WaterELimConstXUVLB15SinkO2Bolmont16.py @@ -0,0 +1,119 @@ +from benchmark import Benchmark, benchmark +import astropy.units as u + +@benchmark( + { + "log.initial.system.Age": {"value": 0.000000, "unit": u.sec}, + "log.initial.system.Time": {"value": 0.000000, "unit": u.sec}, + "log.initial.system.TotAngMom": {"value": 4.416946e+33, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.initial.system.TotEnergy": {"value": -2.237790e+32, "unit": u.Joule}, + "log.initial.system.PotEnergy": {"value": -2.239397e+32, "unit": u.Joule}, + "log.initial.system.KinEnergy": {"value": 1.606047e+29, "unit": u.Joule}, + "log.initial.system.DeltaTime": {"value": 0.000000, "unit": u.sec}, + "log.initial.earth.Mass": {"value": 5.972186e+24, "unit": u.kg}, + "log.initial.earth.Radius": {"value": 6.378100e+06, "unit": u.m}, + "log.initial.earth.RadGyra": {"value": 0.500000}, + "log.initial.earth.BodyType": {"value": 0.000000}, + "log.initial.earth.Density": {"value": 5495.038549, "unit": u.kg / u.m ** 3}, + "log.initial.earth.HZLimitDryRunaway": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.HZLimRecVenus": {"value": -1.000000}, + "log.initial.earth.HZLimRunaway": {"value": -1.000000}, + "log.initial.earth.HZLimMoistGreenhouse": {"value": -1.000000}, + "log.initial.earth.HZLimMaxGreenhouse": {"value": -1.000000}, + "log.initial.earth.HZLimEarlyMars": {"value": -1.000000}, + "log.initial.earth.Instellation": {"value": -1.000000, "unit": u.kg / u.sec ** 3}, + "log.initial.earth.MeanMotion": {"value": -1.000000, "unit": 1 / u.sec}, + "log.initial.earth.OrbPeriod": {"value": -1.000000, "unit": u.sec}, + "log.initial.earth.SemiMajorAxis": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.LXUVTot": {"value": -1.000000, "unit": u.kg / u.sec ** 3}, + "log.initial.earth.SurfWaterMass": {"value": 3.000000, "unit": u.TO}, + "log.initial.earth.EnvelopeMass": {"value": 0.000000, "unit": u.kg}, + "log.initial.earth.OxygenMass": {"value": 0.000000, "unit": u.bar}, + "log.initial.earth.RGLimit": {"value": 0.000000, "unit": u.au}, + "log.initial.earth.XO": {"value": 0.333333}, + "log.initial.earth.EtaO": {"value": 0.682959}, + "log.initial.earth.PlanetRadius": {"value": 6.378100e+06, "unit": u.m}, + "log.initial.earth.OxygenMantleMass": {"value": 0.000000, "unit": u.kg}, + "log.initial.earth.RadXUV": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.RadSolid": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.PresXUV": {"value": 5.000000}, + "log.initial.earth.ScaleHeight": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.ThermTemp": {"value": 400.000000, "unit": u.K}, + "log.initial.earth.AtmGasConst": {"value": 4124.000000}, + "log.initial.earth.PresSurf": {"value": -1.000000, "unit": u.Pa}, + "log.initial.earth.DEnvMassDt": {"value": 0.000000, "unit": u.kg / u.sec}, + "log.initial.earth.FXUV": {"value": 100.000000, "unit": u.W / u.m ** 2}, + "log.initial.earth.AtmXAbsEffH2O": {"value": 0.010704}, + "log.initial.earth.RocheRadius": {"value": 1.037254e+11, "unit": u.m}, + "log.initial.earth.BondiRadius": {"value": 1.249016e+08, "unit": u.m}, + "log.initial.earth.HEscapeRegime": {"value": 8.000000}, + "log.initial.earth.RRCriticalFlux": {"value": 53.697959, "unit": u.W / u.m ** 2}, + "log.initial.earth.CrossoverMass": {"value": 8.022481e-26, "unit": u.kg}, + "log.initial.earth.WaterEscapeRegime": {"value": 3.000000}, + "log.initial.earth.FXUVCRITDRAG": {"value": 4.977066, "unit": u.W / u.m ** 2}, + "log.initial.earth.HREFFLUX": {"value": 2.578763e+18, "unit": 1 / u.m ** 2 / u.sec}, + "log.initial.earth.XO2": {"value": 0.000000}, + "log.initial.earth.XH2O": {"value": 1.000000}, + "log.initial.earth.HDiffFlux": {"value": 1.264874e+17, "unit": 1 / u.m ** 2 / u.sec}, + "log.initial.earth.HRefODragMod": {"value": 0.154711}, + "log.initial.earth.KTide": {"value": 0.999908}, + "log.initial.earth.RGDuration": {"value": 0.00000e+00, "unit": u.yr}, + "log.final.system.Age": {"value": 3.155760e+13, "unit": u.sec}, + "log.final.system.Time": {"value": 3.155760e+13, "unit": u.sec}, + "log.final.system.TotAngMom": {"value": 4.416946e+33, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.final.system.TotEnergy": {"value": -2.237790e+32, "unit": u.Joule}, + "log.final.system.PotEnergy": {"value": -2.239397e+32, "unit": u.Joule}, + "log.final.system.KinEnergy": {"value": 1.606047e+29, "unit": u.Joule}, + "log.final.system.DeltaTime": {"value": 3.155760e+13, "unit": u.sec}, + "log.final.earth.Mass": {"value": 5.972186e+24, "unit": u.kg}, + "log.final.earth.Radius": {"value": 6.378100e+06, "unit": u.m}, + "log.final.earth.RadGyra": {"value": 0.500000}, + "log.final.earth.BodyType": {"value": 0.000000}, + "log.final.earth.Density": {"value": 5495.038549, "unit": u.kg / u.m ** 3}, + "log.final.earth.HZLimitDryRunaway": {"value": -1.000000, "unit": u.m}, + "log.final.earth.HZLimRecVenus": {"value": -1.000000}, + "log.final.earth.HZLimRunaway": {"value": -1.000000}, + "log.final.earth.HZLimMoistGreenhouse": {"value": -1.000000}, + "log.final.earth.HZLimMaxGreenhouse": {"value": -1.000000}, + "log.final.earth.HZLimEarlyMars": {"value": -1.000000}, + "log.final.earth.Instellation": {"value": -1.000000, "unit": u.kg / u.sec ** 3}, + "log.final.earth.MeanMotion": {"value": -1.000000, "unit": 1 / u.sec}, + "log.final.earth.OrbPeriod": {"value": -1.000000, "unit": u.sec}, + "log.final.earth.SemiMajorAxis": {"value": -1.000000, "unit": u.m}, + "log.final.earth.LXUVTot": {"value": -1.000000, "unit": u.kg / u.sec ** 3}, + "log.final.earth.SurfWaterMass": {"value": 2.930804, "unit": u.TO}, + "log.final.earth.EnvelopeMass": {"value": 0.000000, "unit": u.kg}, + "log.final.earth.OxygenMass": {"value": 0.000000, "unit": u.bar}, + "log.final.earth.RGLimit": {"value": 0.000000, "unit": u.au}, + "log.final.earth.XO": {"value": 0.333333}, + "log.final.earth.EtaO": {"value": 0.682959}, + "log.final.earth.PlanetRadius": {"value": 6.378100e+06, "unit": u.m}, + "log.final.earth.OxygenMantleMass": {"value": 2.710708e+19, "unit": u.kg}, + "log.final.earth.RadXUV": {"value": -1.000000, "unit": u.m}, + "log.final.earth.RadSolid": {"value": -1.000000, "unit": u.m}, + "log.final.earth.PresXUV": {"value": 5.000000}, + "log.final.earth.ScaleHeight": {"value": -1.000000, "unit": u.m}, + "log.final.earth.ThermTemp": {"value": 400.000000, "unit": u.K}, + "log.final.earth.AtmGasConst": {"value": 4124.000000}, + "log.final.earth.PresSurf": {"value": -1.000000, "unit": u.Pa}, + "log.final.earth.DEnvMassDt": {"value": 0.000000, "unit": u.kg / u.sec}, + "log.final.earth.FXUV": {"value": 100.000000, "unit": u.W / u.m ** 2}, + "log.final.earth.AtmXAbsEffH2O": {"value": 0.010704}, + "log.final.earth.RocheRadius": {"value": 1.037254e+11, "unit": u.m}, + "log.final.earth.BondiRadius": {"value": 1.249016e+08, "unit": u.m}, + "log.final.earth.HEscapeRegime": {"value": 8.000000}, + "log.final.earth.RRCriticalFlux": {"value": 53.697959, "unit": u.W / u.m ** 2}, + "log.final.earth.CrossoverMass": {"value": 8.022481e-26, "unit": u.kg}, + "log.final.earth.WaterEscapeRegime": {"value": 3.000000}, + "log.final.earth.FXUVCRITDRAG": {"value": 4.977066, "unit": u.W / u.m ** 2}, + "log.final.earth.HREFFLUX": {"value": 2.578763e+18, "unit": 1 / u.m ** 2 / u.sec}, + "log.final.earth.XO2": {"value": 0.000000}, + "log.final.earth.XH2O": {"value": 1.000000}, + "log.final.earth.HDiffFlux": {"value": 1.264874e+17, "unit": 1 / u.m ** 2 / u.sec}, + "log.final.earth.HRefODragMod": {"value": 0.154711}, + "log.final.earth.KTide": {"value": 0.999908}, + "log.final.earth.RGDuration": {"value": 0.00000e+00, "unit": u.yr}, + } +) +class Test_WaterELimConstXUVLB15SinkO2Bolmont16(Benchmark): + pass diff --git a/tests/Atmesc/WaterELimConstXUVLB15SinkO2Bolmont16/vpl.in b/tests/Atmesc/WaterELimConstXUVLB15SinkO2Bolmont16/vpl.in new file mode 100644 index 000000000..de6a4d751 --- /dev/null +++ b/tests/Atmesc/WaterELimConstXUVLB15SinkO2Bolmont16/vpl.in @@ -0,0 +1,24 @@ +sSystemName solarsystem # System Name +iVerbose 5 # Verbosity level +bOverwrite 1 # Allow file overwrites? + +# List of "body files" that contain body-specific parameters +saBodyFiles earth.in + +# Input/Output Units +sUnitMass solar # Options: gram, kg, Earth, Neptune, Jupiter, solar +sUnitLength aU # Options: cm, m, km, Earth, Jupiter, solar, AU +sUnitTime YEARS # Options: sec, day, year, Myr, Gyr +sUnitAngle d # Options: deg, rad + +# Input/Output +bDoLog 1 # Write a log file? +iDigits 6 # Maximum number of digits to right of decimal +dMinValue 1e-10 # Minimum value of eccentricity/obliquity + +# Evolution Parameters +bDoForward 1 # Perform a forward evolution? +bVarDt 1 # Use variable timestepping? +dEta 0.1 # Coefficient for variable timestepping +dStopTime 1e6 # Stop time for evolution +dOutputTime 1e6 # Output timesteps (assuming in body files) diff --git a/tests/Atmesc/WaterELimConstXUVLB15SinkO2ConstXAbsEffH2O/earth.in b/tests/Atmesc/WaterELimConstXUVLB15SinkO2ConstXAbsEffH2O/earth.in new file mode 100644 index 000000000..b8f048613 --- /dev/null +++ b/tests/Atmesc/WaterELimConstXUVLB15SinkO2ConstXAbsEffH2O/earth.in @@ -0,0 +1,31 @@ +# Planet a parameters +sName earth # Body's name +saModules atmesc # Modules to apply, exact spelling required + +# Physical Properties +dMass -1 # Mass, negative -> Earth masses +dRadius -1 # Radius, negative -> Earth radii +dRotPeriod -1 # Rotation period, negative -> days +dObliquity 23.5 # Retrograde rotation +dRadGyra 0.5 # Radius of gyration (moment of inertia constant) + +# ATMESC Properties +dFXUV -100 # Incident XUV flux (constant) +dXFrac 1.0 # X-Ray/XUV absorption radius (fraction of planet radius) +dSurfWaterMass -3.0 # Initial surface water (Earth oceans) +dEnvelopeMass 0 # Initial envelope mass (Earth masses) +bHaltSurfaceDesiccated 0 # Halt when dry? +bHaltEnvelopeGone 0 # Halt when evaporated? +dMinSurfWaterMass -1.e-5 # Planet is desiccated when water content drops below this (Earth oceans) +sWaterLossModel lb15 +sPlanetRadiusModel none +bInstantO2Sink 1 +sAtmXAbsEffH2OModel none +dAtmXAbsEffH2O 0.1 + +# Orbital Properties +dSemi -1 # Semi-major axis, negative -> AU +dEcc 0.0167 # Eccentricity + +# Output +saOutputOrder Time -SurfWaterMass -RGLimit -OxygenMass diff --git a/tests/Atmesc/WaterELimConstXUVLB15SinkO2ConstXAbsEffH2O/test_WaterELimConstXUVLB15SinkO2ConstXAbsEffH2O.py b/tests/Atmesc/WaterELimConstXUVLB15SinkO2ConstXAbsEffH2O/test_WaterELimConstXUVLB15SinkO2ConstXAbsEffH2O.py new file mode 100644 index 000000000..9937b3a9a --- /dev/null +++ b/tests/Atmesc/WaterELimConstXUVLB15SinkO2ConstXAbsEffH2O/test_WaterELimConstXUVLB15SinkO2ConstXAbsEffH2O.py @@ -0,0 +1,119 @@ +from benchmark import Benchmark, benchmark +import astropy.units as u + +@benchmark( + { + "log.initial.system.Age": {"value": 0.000000, "unit": u.sec}, + "log.initial.system.Time": {"value": 0.000000, "unit": u.sec}, + "log.initial.system.TotAngMom": {"value": 4.416946e+33, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.initial.system.TotEnergy": {"value": -2.237790e+32, "unit": u.Joule}, + "log.initial.system.PotEnergy": {"value": -2.239397e+32, "unit": u.Joule}, + "log.initial.system.KinEnergy": {"value": 1.606047e+29, "unit": u.Joule}, + "log.initial.system.DeltaTime": {"value": 0.000000, "unit": u.sec}, + "log.initial.earth.Mass": {"value": 5.972186e+24, "unit": u.kg}, + "log.initial.earth.Radius": {"value": 6.378100e+06, "unit": u.m}, + "log.initial.earth.RadGyra": {"value": 0.500000}, + "log.initial.earth.BodyType": {"value": 0.000000}, + "log.initial.earth.Density": {"value": 5495.038549, "unit": u.kg / u.m ** 3}, + "log.initial.earth.HZLimitDryRunaway": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.HZLimRecVenus": {"value": -1.000000}, + "log.initial.earth.HZLimRunaway": {"value": -1.000000}, + "log.initial.earth.HZLimMoistGreenhouse": {"value": -1.000000}, + "log.initial.earth.HZLimMaxGreenhouse": {"value": -1.000000}, + "log.initial.earth.HZLimEarlyMars": {"value": -1.000000}, + "log.initial.earth.Instellation": {"value": -1.000000, "unit": u.kg / u.sec ** 3}, + "log.initial.earth.MeanMotion": {"value": -1.000000, "unit": 1 / u.sec}, + "log.initial.earth.OrbPeriod": {"value": -1.000000, "unit": u.sec}, + "log.initial.earth.SemiMajorAxis": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.LXUVTot": {"value": -1.000000, "unit": u.kg / u.sec ** 3}, + "log.initial.earth.SurfWaterMass": {"value": 3.000000, "unit": u.TO}, + "log.initial.earth.EnvelopeMass": {"value": 0.000000, "unit": u.kg}, + "log.initial.earth.OxygenMass": {"value": 0.000000, "unit": u.bar}, + "log.initial.earth.RGLimit": {"value": 0.000000, "unit": u.au}, + "log.initial.earth.XO": {"value": 0.333333}, + "log.initial.earth.EtaO": {"value": 0.954654}, + "log.initial.earth.PlanetRadius": {"value": 6.378100e+06, "unit": u.m}, + "log.initial.earth.OxygenMantleMass": {"value": 0.000000, "unit": u.kg}, + "log.initial.earth.RadXUV": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.RadSolid": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.PresXUV": {"value": 5.000000}, + "log.initial.earth.ScaleHeight": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.ThermTemp": {"value": 400.000000, "unit": u.K}, + "log.initial.earth.AtmGasConst": {"value": 4124.000000}, + "log.initial.earth.PresSurf": {"value": -1.000000, "unit": u.Pa}, + "log.initial.earth.DEnvMassDt": {"value": 0.000000, "unit": u.kg / u.sec}, + "log.initial.earth.FXUV": {"value": 100.000000, "unit": u.W / u.m ** 2}, + "log.initial.earth.AtmXAbsEffH2O": {"value": 0.100000}, + "log.initial.earth.RocheRadius": {"value": 1.037254e+11, "unit": u.m}, + "log.initial.earth.BondiRadius": {"value": 1.249016e+08, "unit": u.m}, + "log.initial.earth.HEscapeRegime": {"value": 8.000000}, + "log.initial.earth.RRCriticalFlux": {"value": 53.697959, "unit": u.W / u.m ** 2}, + "log.initial.earth.CrossoverMass": {"value": 5.509522e-25, "unit": u.kg}, + "log.initial.earth.WaterEscapeRegime": {"value": 3.000000}, + "log.initial.earth.FXUVCRITDRAG": {"value": 0.532721, "unit": u.W / u.m ** 2}, + "log.initial.earth.HREFFLUX": {"value": 2.409265e+19, "unit": 1 / u.m ** 2 / u.sec}, + "log.initial.earth.XO2": {"value": 0.000000}, + "log.initial.earth.XH2O": {"value": 1.000000}, + "log.initial.earth.HDiffFlux": {"value": 1.264874e+17, "unit": 1 / u.m ** 2 / u.sec}, + "log.initial.earth.HRefODragMod": {"value": 0.115778}, + "log.initial.earth.KTide": {"value": 0.999908}, + "log.initial.earth.RGDuration": {"value": 0.00000e+00, "unit": u.yr}, + "log.final.system.Age": {"value": 3.155760e+13, "unit": u.sec}, + "log.final.system.Time": {"value": 3.155760e+13, "unit": u.sec}, + "log.final.system.TotAngMom": {"value": 4.416946e+33, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.final.system.TotEnergy": {"value": -2.237790e+32, "unit": u.Joule}, + "log.final.system.PotEnergy": {"value": -2.239397e+32, "unit": u.Joule}, + "log.final.system.KinEnergy": {"value": 1.606047e+29, "unit": u.Joule}, + "log.final.system.DeltaTime": {"value": 4.508229e+12, "unit": u.sec}, + "log.final.earth.Mass": {"value": 5.972186e+24, "unit": u.kg}, + "log.final.earth.Radius": {"value": 6.378100e+06, "unit": u.m}, + "log.final.earth.RadGyra": {"value": 0.500000}, + "log.final.earth.BodyType": {"value": 0.000000}, + "log.final.earth.Density": {"value": 5495.038549, "unit": u.kg / u.m ** 3}, + "log.final.earth.HZLimitDryRunaway": {"value": -1.000000, "unit": u.m}, + "log.final.earth.HZLimRecVenus": {"value": -1.000000}, + "log.final.earth.HZLimRunaway": {"value": -1.000000}, + "log.final.earth.HZLimMoistGreenhouse": {"value": -1.000000}, + "log.final.earth.HZLimMaxGreenhouse": {"value": -1.000000}, + "log.final.earth.HZLimEarlyMars": {"value": -1.000000}, + "log.final.earth.Instellation": {"value": -1.000000, "unit": u.kg / u.sec ** 3}, + "log.final.earth.MeanMotion": {"value": -1.000000, "unit": 1 / u.sec}, + "log.final.earth.OrbPeriod": {"value": -1.000000, "unit": u.sec}, + "log.final.earth.SemiMajorAxis": {"value": -1.000000, "unit": u.m}, + "log.final.earth.LXUVTot": {"value": -1.000000, "unit": u.kg / u.sec ** 3}, + "log.final.earth.SurfWaterMass": {"value": 2.516216, "unit": u.TO}, + "log.final.earth.EnvelopeMass": {"value": 0.000000, "unit": u.kg}, + "log.final.earth.OxygenMass": {"value": 0.000000, "unit": u.bar}, + "log.final.earth.RGLimit": {"value": 0.000000, "unit": u.au}, + "log.final.earth.XO": {"value": 0.333333}, + "log.final.earth.EtaO": {"value": 0.954654}, + "log.final.earth.PlanetRadius": {"value": 6.378100e+06, "unit": u.m}, + "log.final.earth.OxygenMantleMass": {"value": 2.710708e+19, "unit": u.kg}, + "log.final.earth.RadXUV": {"value": -1.000000, "unit": u.m}, + "log.final.earth.RadSolid": {"value": -1.000000, "unit": u.m}, + "log.final.earth.PresXUV": {"value": 5.000000}, + "log.final.earth.ScaleHeight": {"value": -1.000000, "unit": u.m}, + "log.final.earth.ThermTemp": {"value": 400.000000, "unit": u.K}, + "log.final.earth.AtmGasConst": {"value": 4124.000000}, + "log.final.earth.PresSurf": {"value": -1.000000, "unit": u.Pa}, + "log.final.earth.DEnvMassDt": {"value": 0.000000, "unit": u.kg / u.sec}, + "log.final.earth.FXUV": {"value": 100.000000, "unit": u.W / u.m ** 2}, + "log.final.earth.AtmXAbsEffH2O": {"value": 0.100000}, + "log.final.earth.RocheRadius": {"value": 1.037254e+11, "unit": u.m}, + "log.final.earth.BondiRadius": {"value": 1.249016e+08, "unit": u.m}, + "log.final.earth.HEscapeRegime": {"value": 8.000000}, + "log.final.earth.RRCriticalFlux": {"value": 53.697959, "unit": u.W / u.m ** 2}, + "log.final.earth.CrossoverMass": {"value": 5.509522e-25, "unit": u.kg}, + "log.final.earth.WaterEscapeRegime": {"value": 3.000000}, + "log.final.earth.FXUVCRITDRAG": {"value": 0.532721, "unit": u.W / u.m ** 2}, + "log.final.earth.HREFFLUX": {"value": 2.409265e+19, "unit": 1 / u.m ** 2 / u.sec}, + "log.final.earth.XO2": {"value": 0.000000}, + "log.final.earth.XH2O": {"value": 1.000000}, + "log.final.earth.HDiffFlux": {"value": 1.264874e+17, "unit": 1 / u.m ** 2 / u.sec}, + "log.final.earth.HRefODragMod": {"value": 0.115778}, + "log.final.earth.KTide": {"value": 0.999908}, + "log.final.earth.RGDuration": {"value": 0.00000e+00, "unit": u.yr}, + } +) +class Test_WaterELimConstXUVLB15SinkO2ConstXAbsEffH2O(Benchmark): + pass diff --git a/tests/Atmesc/WaterELimConstXUVLB15SinkO2ConstXAbsEffH2O/vpl.in b/tests/Atmesc/WaterELimConstXUVLB15SinkO2ConstXAbsEffH2O/vpl.in new file mode 100644 index 000000000..de6a4d751 --- /dev/null +++ b/tests/Atmesc/WaterELimConstXUVLB15SinkO2ConstXAbsEffH2O/vpl.in @@ -0,0 +1,24 @@ +sSystemName solarsystem # System Name +iVerbose 5 # Verbosity level +bOverwrite 1 # Allow file overwrites? + +# List of "body files" that contain body-specific parameters +saBodyFiles earth.in + +# Input/Output Units +sUnitMass solar # Options: gram, kg, Earth, Neptune, Jupiter, solar +sUnitLength aU # Options: cm, m, km, Earth, Jupiter, solar, AU +sUnitTime YEARS # Options: sec, day, year, Myr, Gyr +sUnitAngle d # Options: deg, rad + +# Input/Output +bDoLog 1 # Write a log file? +iDigits 6 # Maximum number of digits to right of decimal +dMinValue 1e-10 # Minimum value of eccentricity/obliquity + +# Evolution Parameters +bDoForward 1 # Perform a forward evolution? +bVarDt 1 # Use variable timestepping? +dEta 0.1 # Coefficient for variable timestepping +dStopTime 1e6 # Stop time for evolution +dOutputTime 1e6 # Output timesteps (assuming in body files) diff --git a/tests/Atmesc/WaterELimConstXUVLBExactNoO2SinkBolmont16/earth.in b/tests/Atmesc/WaterELimConstXUVLBExactNoO2SinkBolmont16/earth.in new file mode 100644 index 000000000..515c834f9 --- /dev/null +++ b/tests/Atmesc/WaterELimConstXUVLBExactNoO2SinkBolmont16/earth.in @@ -0,0 +1,30 @@ +# Planet a parameters +sName earth # Body's name +saModules atmesc # Modules to apply, exact spelling required + +# Physical Properties +dMass -1 # Mass, negative -> Earth masses +dRadius -1 # Radius, negative -> Earth radii +dRotPeriod -1 # Rotation period, negative -> days +dObliquity 23.5 # Retrograde rotation +dRadGyra 0.5 # Radius of gyration (moment of inertia constant) + +# ATMESC Properties +dFXUV -100 # Incident XUV flux (constant) +dXFrac 1.0 # X-Ray/XUV absorption radius (fraction of planet radius) +dSurfWaterMass -3.0 # Initial surface water (Earth oceans) +dEnvelopeMass 0 # Initial envelope mass (Earth masses) +bHaltSurfaceDesiccated 0 # Halt when dry? +bHaltEnvelopeGone 0 # Halt when evaporated? +dMinSurfWaterMass -1.e-5 # Planet is desiccated when water content drops below this (Earth oceans) +sWaterLossModel lbexact +sPlanetRadiusModel none +bInstantO2Sink 0 +sAtmXAbsEffH2OModel bolmont16 + +# Orbital Properties +dSemi -1 # Semi-major axis, negative -> AU +dEcc 0.0167 # Eccentricity + +# Output +saOutputOrder Time -SurfWaterMass -RGLimit -OxygenMass diff --git a/tests/Atmesc/WaterELimConstXUVLBExactNoO2SinkBolmont16/test_WaterELimConstXUVLBExactNoO2SinkBolmont16.py b/tests/Atmesc/WaterELimConstXUVLBExactNoO2SinkBolmont16/test_WaterELimConstXUVLBExactNoO2SinkBolmont16.py new file mode 100644 index 000000000..1df203c0c --- /dev/null +++ b/tests/Atmesc/WaterELimConstXUVLBExactNoO2SinkBolmont16/test_WaterELimConstXUVLBExactNoO2SinkBolmont16.py @@ -0,0 +1,119 @@ +from benchmark import Benchmark, benchmark +import astropy.units as u + +@benchmark( + { + "log.initial.system.Age": {"value": 0.000000, "unit": u.sec}, + "log.initial.system.Time": {"value": 0.000000, "unit": u.sec}, + "log.initial.system.TotAngMom": {"value": 4.416946e+33, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.initial.system.TotEnergy": {"value": -2.237790e+32, "unit": u.Joule}, + "log.initial.system.PotEnergy": {"value": -2.239397e+32, "unit": u.Joule}, + "log.initial.system.KinEnergy": {"value": 1.606047e+29, "unit": u.Joule}, + "log.initial.system.DeltaTime": {"value": 0.000000, "unit": u.sec}, + "log.initial.earth.Mass": {"value": 5.972186e+24, "unit": u.kg}, + "log.initial.earth.Radius": {"value": 6.378100e+06, "unit": u.m}, + "log.initial.earth.RadGyra": {"value": 0.500000}, + "log.initial.earth.BodyType": {"value": 0.000000}, + "log.initial.earth.Density": {"value": 5495.038549, "unit": u.kg / u.m ** 3}, + "log.initial.earth.HZLimitDryRunaway": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.HZLimRecVenus": {"value": -1.000000}, + "log.initial.earth.HZLimRunaway": {"value": -1.000000}, + "log.initial.earth.HZLimMoistGreenhouse": {"value": -1.000000}, + "log.initial.earth.HZLimMaxGreenhouse": {"value": -1.000000}, + "log.initial.earth.HZLimEarlyMars": {"value": -1.000000}, + "log.initial.earth.Instellation": {"value": -1.000000, "unit": u.kg / u.sec ** 3}, + "log.initial.earth.MeanMotion": {"value": -1.000000, "unit": 1 / u.sec}, + "log.initial.earth.OrbPeriod": {"value": -1.000000, "unit": u.sec}, + "log.initial.earth.SemiMajorAxis": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.LXUVTot": {"value": -1.000000, "unit": u.kg / u.sec ** 3}, + "log.initial.earth.SurfWaterMass": {"value": 3.000000, "unit": u.TO}, + "log.initial.earth.EnvelopeMass": {"value": 0.000000, "unit": u.kg}, + "log.initial.earth.OxygenMass": {"value": 0.000000, "unit": u.bar}, + "log.initial.earth.RGLimit": {"value": 0.000000, "unit": u.au}, + "log.initial.earth.XO": {"value": 0.333333}, + "log.initial.earth.EtaO": {"value": 0.682959}, + "log.initial.earth.PlanetRadius": {"value": 6.378100e+06, "unit": u.m}, + "log.initial.earth.OxygenMantleMass": {"value": 0.000000, "unit": u.kg}, + "log.initial.earth.RadXUV": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.RadSolid": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.PresXUV": {"value": 5.000000}, + "log.initial.earth.ScaleHeight": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.ThermTemp": {"value": 400.000000, "unit": u.K}, + "log.initial.earth.AtmGasConst": {"value": 4124.000000}, + "log.initial.earth.PresSurf": {"value": -1.000000, "unit": u.Pa}, + "log.initial.earth.DEnvMassDt": {"value": 0.000000, "unit": u.kg / u.sec}, + "log.initial.earth.FXUV": {"value": 100.000000, "unit": u.W / u.m ** 2}, + "log.initial.earth.AtmXAbsEffH2O": {"value": 0.010704}, + "log.initial.earth.RocheRadius": {"value": 1.037254e+11, "unit": u.m}, + "log.initial.earth.BondiRadius": {"value": 1.249016e+08, "unit": u.m}, + "log.initial.earth.HEscapeRegime": {"value": 8.000000}, + "log.initial.earth.RRCriticalFlux": {"value": 53.697959, "unit": u.W / u.m ** 2}, + "log.initial.earth.CrossoverMass": {"value": 8.022481e-26, "unit": u.kg}, + "log.initial.earth.WaterEscapeRegime": {"value": 3.000000}, + "log.initial.earth.FXUVCRITDRAG": {"value": 4.977066, "unit": u.W / u.m ** 2}, + "log.initial.earth.HREFFLUX": {"value": 2.578763e+18, "unit": 1 / u.m ** 2 / u.sec}, + "log.initial.earth.XO2": {"value": 0.000000}, + "log.initial.earth.XH2O": {"value": 1.000000}, + "log.initial.earth.HDiffFlux": {"value": 1.264874e+17, "unit": 1 / u.m ** 2 / u.sec}, + "log.initial.earth.HRefODragMod": {"value": 0.154711}, + "log.initial.earth.KTide": {"value": 0.999908}, + "log.initial.earth.RGDuration": {"value": 0.00000e+00, "unit": u.yr}, + "log.final.system.Age": {"value": 3.155760e+13, "unit": u.sec}, + "log.final.system.Time": {"value": 3.155760e+13, "unit": u.sec}, + "log.final.system.TotAngMom": {"value": 4.416946e+33, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.final.system.TotEnergy": {"value": -2.237790e+32, "unit": u.Joule}, + "log.final.system.PotEnergy": {"value": -2.239397e+32, "unit": u.Joule}, + "log.final.system.KinEnergy": {"value": 1.606047e+29, "unit": u.Joule}, + "log.final.system.DeltaTime": {"value": 3.155760e+13, "unit": u.sec}, + "log.final.earth.Mass": {"value": 5.972186e+24, "unit": u.kg}, + "log.final.earth.Radius": {"value": 6.378100e+06, "unit": u.m}, + "log.final.earth.RadGyra": {"value": 0.500000}, + "log.final.earth.BodyType": {"value": 0.000000}, + "log.final.earth.Density": {"value": 5495.038549, "unit": u.kg / u.m ** 3}, + "log.final.earth.HZLimitDryRunaway": {"value": -1.000000, "unit": u.m}, + "log.final.earth.HZLimRecVenus": {"value": -1.000000}, + "log.final.earth.HZLimRunaway": {"value": -1.000000}, + "log.final.earth.HZLimMoistGreenhouse": {"value": -1.000000}, + "log.final.earth.HZLimMaxGreenhouse": {"value": -1.000000}, + "log.final.earth.HZLimEarlyMars": {"value": -1.000000}, + "log.final.earth.Instellation": {"value": -1.000000, "unit": u.kg / u.sec ** 3}, + "log.final.earth.MeanMotion": {"value": -1.000000, "unit": 1 / u.sec}, + "log.final.earth.OrbPeriod": {"value": -1.000000, "unit": u.sec}, + "log.final.earth.SemiMajorAxis": {"value": -1.000000, "unit": u.m}, + "log.final.earth.LXUVTot": {"value": -1.000000, "unit": u.kg / u.sec ** 3}, + "log.final.earth.SurfWaterMass": {"value": 2.930982, "unit": u.TO}, + "log.final.earth.EnvelopeMass": {"value": 0.000000, "unit": u.kg}, + "log.final.earth.OxygenMass": {"value": 5.148203, "unit": u.bar}, + "log.final.earth.RGLimit": {"value": 0.000000, "unit": u.au}, + "log.final.earth.XO": {"value": 0.334977}, + "log.final.earth.EtaO": {"value": 0.687157}, + "log.final.earth.PlanetRadius": {"value": 6.378100e+06, "unit": u.m}, + "log.final.earth.OxygenMantleMass": {"value": 0.000000, "unit": u.kg}, + "log.final.earth.RadXUV": {"value": -1.000000, "unit": u.m}, + "log.final.earth.RadSolid": {"value": -1.000000, "unit": u.m}, + "log.final.earth.PresXUV": {"value": 5.000000}, + "log.final.earth.ScaleHeight": {"value": -1.000000, "unit": u.m}, + "log.final.earth.ThermTemp": {"value": 400.000000, "unit": u.K}, + "log.final.earth.AtmGasConst": {"value": 4124.000000}, + "log.final.earth.PresSurf": {"value": -1.000000, "unit": u.Pa}, + "log.final.earth.DEnvMassDt": {"value": 0.000000, "unit": u.kg / u.sec}, + "log.final.earth.FXUV": {"value": 100.000000, "unit": u.W / u.m ** 2}, + "log.final.earth.AtmXAbsEffH2O": {"value": 0.010704}, + "log.final.earth.RocheRadius": {"value": 1.037254e+11, "unit": u.m}, + "log.final.earth.BondiRadius": {"value": 1.249016e+08, "unit": u.m}, + "log.final.earth.HEscapeRegime": {"value": 8.000000}, + "log.final.earth.RRCriticalFlux": {"value": 53.697959, "unit": u.W / u.m ** 2}, + "log.final.earth.CrossoverMass": {"value": 8.001197e-26, "unit": u.kg}, + "log.final.earth.WaterEscapeRegime": {"value": 3.000000}, + "log.final.earth.FXUVCRITDRAG": {"value": 4.964791, "unit": u.W / u.m ** 2}, + "log.final.earth.HREFFLUX": {"value": 2.578763e+18, "unit": 1 / u.m ** 2 / u.sec}, + "log.final.earth.XO2": {"value": 0.003695}, + "log.final.earth.XH2O": {"value": 0.996305}, + "log.final.earth.HDiffFlux": {"value": 1.261755e+17, "unit": 1 / u.m ** 2 / u.sec}, + "log.final.earth.HRefODragMod": {"value": 0.153911}, + "log.final.earth.KTide": {"value": 0.999908}, + "log.final.earth.RGDuration": {"value": 0.00000e+00, "unit": u.yr}, + } +) +class Test_WaterELimConstXUVLBExactNoO2SinkBolmont16(Benchmark): + pass diff --git a/tests/Atmesc/WaterELimConstXUVLBExactNoO2SinkBolmont16/vpl.in b/tests/Atmesc/WaterELimConstXUVLBExactNoO2SinkBolmont16/vpl.in new file mode 100644 index 000000000..de6a4d751 --- /dev/null +++ b/tests/Atmesc/WaterELimConstXUVLBExactNoO2SinkBolmont16/vpl.in @@ -0,0 +1,24 @@ +sSystemName solarsystem # System Name +iVerbose 5 # Verbosity level +bOverwrite 1 # Allow file overwrites? + +# List of "body files" that contain body-specific parameters +saBodyFiles earth.in + +# Input/Output Units +sUnitMass solar # Options: gram, kg, Earth, Neptune, Jupiter, solar +sUnitLength aU # Options: cm, m, km, Earth, Jupiter, solar, AU +sUnitTime YEARS # Options: sec, day, year, Myr, Gyr +sUnitAngle d # Options: deg, rad + +# Input/Output +bDoLog 1 # Write a log file? +iDigits 6 # Maximum number of digits to right of decimal +dMinValue 1e-10 # Minimum value of eccentricity/obliquity + +# Evolution Parameters +bDoForward 1 # Perform a forward evolution? +bVarDt 1 # Use variable timestepping? +dEta 0.1 # Coefficient for variable timestepping +dStopTime 1e6 # Stop time for evolution +dOutputTime 1e6 # Output timesteps (assuming in body files) diff --git a/tests/Atmesc/WaterELimConstXUVLBExactNoO2SinkConstXAbsEffH2O/earth.in b/tests/Atmesc/WaterELimConstXUVLBExactNoO2SinkConstXAbsEffH2O/earth.in new file mode 100644 index 000000000..518f2e819 --- /dev/null +++ b/tests/Atmesc/WaterELimConstXUVLBExactNoO2SinkConstXAbsEffH2O/earth.in @@ -0,0 +1,31 @@ +# Planet a parameters +sName earth # Body's name +saModules atmesc # Modules to apply, exact spelling required + +# Physical Properties +dMass -1 # Mass, negative -> Earth masses +dRadius -1 # Radius, negative -> Earth radii +dRotPeriod -1 # Rotation period, negative -> days +dObliquity 23.5 # Retrograde rotation +dRadGyra 0.5 # Radius of gyration (moment of inertia constant) + +# ATMESC Properties +dFXUV -100 # Incident XUV flux (constant) +dXFrac 1.0 # X-Ray/XUV absorption radius (fraction of planet radius) +dSurfWaterMass -3.0 # Initial surface water (Earth oceans) +dEnvelopeMass 0 # Initial envelope mass (Earth masses) +bHaltSurfaceDesiccated 0 # Halt when dry? +bHaltEnvelopeGone 0 # Halt when evaporated? +dMinSurfWaterMass -1.e-5 # Planet is desiccated when water content drops below this (Earth oceans) +sWaterLossModel lbexact +sPlanetRadiusModel none +bInstantO2Sink 0 +sAtmXAbsEffH2OModel none +dAtmXAbsEffH2O 0.1 + +# Orbital Properties +dSemi -1 # Semi-major axis, negative -> AU +dEcc 0.0167 # Eccentricity + +# Output +saOutputOrder Time -SurfWaterMass -RGLimit -OxygenMass diff --git a/tests/Atmesc/WaterELimConstXUVLBExactNoO2SinkConstXAbsEffH2O/test_WaterELimConstXUVLBExactNoO2SinkConstXAbsEffH2O.py b/tests/Atmesc/WaterELimConstXUVLBExactNoO2SinkConstXAbsEffH2O/test_WaterELimConstXUVLBExactNoO2SinkConstXAbsEffH2O.py new file mode 100644 index 000000000..d6b1c8a28 --- /dev/null +++ b/tests/Atmesc/WaterELimConstXUVLBExactNoO2SinkConstXAbsEffH2O/test_WaterELimConstXUVLBExactNoO2SinkConstXAbsEffH2O.py @@ -0,0 +1,119 @@ +from benchmark import Benchmark, benchmark +import astropy.units as u + +@benchmark( + { + "log.initial.system.Age": {"value": 0.000000, "unit": u.sec}, + "log.initial.system.Time": {"value": 0.000000, "unit": u.sec}, + "log.initial.system.TotAngMom": {"value": 4.416946e+33, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.initial.system.TotEnergy": {"value": -2.237790e+32, "unit": u.Joule}, + "log.initial.system.PotEnergy": {"value": -2.239397e+32, "unit": u.Joule}, + "log.initial.system.KinEnergy": {"value": 1.606047e+29, "unit": u.Joule}, + "log.initial.system.DeltaTime": {"value": 0.000000, "unit": u.sec}, + "log.initial.earth.Mass": {"value": 5.972186e+24, "unit": u.kg}, + "log.initial.earth.Radius": {"value": 6.378100e+06, "unit": u.m}, + "log.initial.earth.RadGyra": {"value": 0.500000}, + "log.initial.earth.BodyType": {"value": 0.000000}, + "log.initial.earth.Density": {"value": 5495.038549, "unit": u.kg / u.m ** 3}, + "log.initial.earth.HZLimitDryRunaway": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.HZLimRecVenus": {"value": -1.000000}, + "log.initial.earth.HZLimRunaway": {"value": -1.000000}, + "log.initial.earth.HZLimMoistGreenhouse": {"value": -1.000000}, + "log.initial.earth.HZLimMaxGreenhouse": {"value": -1.000000}, + "log.initial.earth.HZLimEarlyMars": {"value": -1.000000}, + "log.initial.earth.Instellation": {"value": -1.000000, "unit": u.kg / u.sec ** 3}, + "log.initial.earth.MeanMotion": {"value": -1.000000, "unit": 1 / u.sec}, + "log.initial.earth.OrbPeriod": {"value": -1.000000, "unit": u.sec}, + "log.initial.earth.SemiMajorAxis": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.LXUVTot": {"value": -1.000000, "unit": u.kg / u.sec ** 3}, + "log.initial.earth.SurfWaterMass": {"value": 3.000000, "unit": u.TO}, + "log.initial.earth.EnvelopeMass": {"value": 0.000000, "unit": u.kg}, + "log.initial.earth.OxygenMass": {"value": 0.000000, "unit": u.bar}, + "log.initial.earth.RGLimit": {"value": 0.000000, "unit": u.au}, + "log.initial.earth.XO": {"value": 0.333333}, + "log.initial.earth.EtaO": {"value": 0.954654}, + "log.initial.earth.PlanetRadius": {"value": 6.378100e+06, "unit": u.m}, + "log.initial.earth.OxygenMantleMass": {"value": 0.000000, "unit": u.kg}, + "log.initial.earth.RadXUV": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.RadSolid": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.PresXUV": {"value": 5.000000}, + "log.initial.earth.ScaleHeight": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.ThermTemp": {"value": 400.000000, "unit": u.K}, + "log.initial.earth.AtmGasConst": {"value": 4124.000000}, + "log.initial.earth.PresSurf": {"value": -1.000000, "unit": u.Pa}, + "log.initial.earth.DEnvMassDt": {"value": 0.000000, "unit": u.kg / u.sec}, + "log.initial.earth.FXUV": {"value": 100.000000, "unit": u.W / u.m ** 2}, + "log.initial.earth.AtmXAbsEffH2O": {"value": 0.100000}, + "log.initial.earth.RocheRadius": {"value": 1.037254e+11, "unit": u.m}, + "log.initial.earth.BondiRadius": {"value": 1.249016e+08, "unit": u.m}, + "log.initial.earth.HEscapeRegime": {"value": 8.000000}, + "log.initial.earth.RRCriticalFlux": {"value": 53.697959, "unit": u.W / u.m ** 2}, + "log.initial.earth.CrossoverMass": {"value": 5.509522e-25, "unit": u.kg}, + "log.initial.earth.WaterEscapeRegime": {"value": 3.000000}, + "log.initial.earth.FXUVCRITDRAG": {"value": 0.532721, "unit": u.W / u.m ** 2}, + "log.initial.earth.HREFFLUX": {"value": 2.409265e+19, "unit": 1 / u.m ** 2 / u.sec}, + "log.initial.earth.XO2": {"value": 0.000000}, + "log.initial.earth.XH2O": {"value": 1.000000}, + "log.initial.earth.HDiffFlux": {"value": 1.264874e+17, "unit": 1 / u.m ** 2 / u.sec}, + "log.initial.earth.HRefODragMod": {"value": 0.115778}, + "log.initial.earth.KTide": {"value": 0.999908}, + "log.initial.earth.RGDuration": {"value": 0.00000e+00, "unit": u.yr}, + "log.final.system.Age": {"value": 3.155760e+13, "unit": u.sec}, + "log.final.system.Time": {"value": 3.155760e+13, "unit": u.sec}, + "log.final.system.TotAngMom": {"value": 4.416946e+33, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.final.system.TotEnergy": {"value": -2.237790e+32, "unit": u.Joule}, + "log.final.system.PotEnergy": {"value": -2.239397e+32, "unit": u.Joule}, + "log.final.system.KinEnergy": {"value": 1.606047e+29, "unit": u.Joule}, + "log.final.system.DeltaTime": {"value": 5.259600e+12, "unit": u.sec}, + "log.final.earth.Mass": {"value": 5.972186e+24, "unit": u.kg}, + "log.final.earth.Radius": {"value": 6.378100e+06, "unit": u.m}, + "log.final.earth.RadGyra": {"value": 0.500000}, + "log.final.earth.BodyType": {"value": 0.000000}, + "log.final.earth.Density": {"value": 5495.038549, "unit": u.kg / u.m ** 3}, + "log.final.earth.HZLimitDryRunaway": {"value": -1.000000, "unit": u.m}, + "log.final.earth.HZLimRecVenus": {"value": -1.000000}, + "log.final.earth.HZLimRunaway": {"value": -1.000000}, + "log.final.earth.HZLimMoistGreenhouse": {"value": -1.000000}, + "log.final.earth.HZLimMaxGreenhouse": {"value": -1.000000}, + "log.final.earth.HZLimEarlyMars": {"value": -1.000000}, + "log.final.earth.Instellation": {"value": -1.000000, "unit": u.kg / u.sec ** 3}, + "log.final.earth.MeanMotion": {"value": -1.000000, "unit": 1 / u.sec}, + "log.final.earth.OrbPeriod": {"value": -1.000000, "unit": u.sec}, + "log.final.earth.SemiMajorAxis": {"value": -1.000000, "unit": u.m}, + "log.final.earth.LXUVTot": {"value": -1.000000, "unit": u.kg / u.sec ** 3}, + "log.final.earth.SurfWaterMass": {"value": 2.517826, "unit": u.TO}, + "log.final.earth.EnvelopeMass": {"value": 0.000000, "unit": u.kg}, + "log.final.earth.OxygenMass": {"value": 4.766918, "unit": u.bar}, + "log.final.earth.RGLimit": {"value": 0.000000, "unit": u.au}, + "log.final.earth.XO": {"value": 0.335105}, + "log.final.earth.EtaO": {"value": 0.962093}, + "log.final.earth.PlanetRadius": {"value": 6.378100e+06, "unit": u.m}, + "log.final.earth.OxygenMantleMass": {"value": 0.000000, "unit": u.kg}, + "log.final.earth.RadXUV": {"value": -1.000000, "unit": u.m}, + "log.final.earth.RadSolid": {"value": -1.000000, "unit": u.m}, + "log.final.earth.PresXUV": {"value": 5.000000}, + "log.final.earth.ScaleHeight": {"value": -1.000000, "unit": u.m}, + "log.final.earth.ThermTemp": {"value": 400.000000, "unit": u.K}, + "log.final.earth.AtmGasConst": {"value": 4124.000000}, + "log.final.earth.PresSurf": {"value": -1.000000, "unit": u.Pa}, + "log.final.earth.DEnvMassDt": {"value": 0.000000, "unit": u.kg / u.sec}, + "log.final.earth.FXUV": {"value": 100.000000, "unit": u.W / u.m ** 2}, + "log.final.earth.AtmXAbsEffH2O": {"value": 0.100000}, + "log.final.earth.RocheRadius": {"value": 1.037254e+11, "unit": u.m}, + "log.final.earth.BondiRadius": {"value": 1.249016e+08, "unit": u.m}, + "log.final.earth.HEscapeRegime": {"value": 8.000000}, + "log.final.earth.RRCriticalFlux": {"value": 53.697959, "unit": u.W / u.m ** 2}, + "log.final.earth.CrossoverMass": {"value": 5.486470e-25, "unit": u.kg}, + "log.final.earth.WaterEscapeRegime": {"value": 3.000000}, + "log.final.earth.FXUVCRITDRAG": {"value": 0.531306, "unit": u.W / u.m ** 2}, + "log.final.earth.HREFFLUX": {"value": 2.409265e+19, "unit": 1 / u.m ** 2 / u.sec}, + "log.final.earth.XO2": {"value": 0.003981}, + "log.final.earth.XH2O": {"value": 0.996019}, + "log.final.earth.HDiffFlux": {"value": 1.261512e+17, "unit": 1 / u.m ** 2 / u.sec}, + "log.final.earth.HRefODragMod": {"value": 0.114986}, + "log.final.earth.KTide": {"value": 0.999908}, + "log.final.earth.RGDuration": {"value": 0.00000e+00, "unit": u.yr}, + } +) +class Test_WaterELimConstXUVLBExactNoO2SinkConstXAbsEffH2O(Benchmark): + pass diff --git a/tests/Atmesc/WaterELimConstXUVLBExactNoO2SinkConstXAbsEffH2O/vpl.in b/tests/Atmesc/WaterELimConstXUVLBExactNoO2SinkConstXAbsEffH2O/vpl.in new file mode 100644 index 000000000..de6a4d751 --- /dev/null +++ b/tests/Atmesc/WaterELimConstXUVLBExactNoO2SinkConstXAbsEffH2O/vpl.in @@ -0,0 +1,24 @@ +sSystemName solarsystem # System Name +iVerbose 5 # Verbosity level +bOverwrite 1 # Allow file overwrites? + +# List of "body files" that contain body-specific parameters +saBodyFiles earth.in + +# Input/Output Units +sUnitMass solar # Options: gram, kg, Earth, Neptune, Jupiter, solar +sUnitLength aU # Options: cm, m, km, Earth, Jupiter, solar, AU +sUnitTime YEARS # Options: sec, day, year, Myr, Gyr +sUnitAngle d # Options: deg, rad + +# Input/Output +bDoLog 1 # Write a log file? +iDigits 6 # Maximum number of digits to right of decimal +dMinValue 1e-10 # Minimum value of eccentricity/obliquity + +# Evolution Parameters +bDoForward 1 # Perform a forward evolution? +bVarDt 1 # Use variable timestepping? +dEta 0.1 # Coefficient for variable timestepping +dStopTime 1e6 # Stop time for evolution +dOutputTime 1e6 # Output timesteps (assuming in body files) diff --git a/tests/Atmesc/WaterELimConstXUVLBExactSinkO2Bolmont16/earth.in b/tests/Atmesc/WaterELimConstXUVLBExactSinkO2Bolmont16/earth.in new file mode 100644 index 000000000..084c92813 --- /dev/null +++ b/tests/Atmesc/WaterELimConstXUVLBExactSinkO2Bolmont16/earth.in @@ -0,0 +1,30 @@ +# Planet a parameters +sName earth # Body's name +saModules atmesc # Modules to apply, exact spelling required + +# Physical Properties +dMass -1 # Mass, negative -> Earth masses +dRadius -1 # Radius, negative -> Earth radii +dRotPeriod -1 # Rotation period, negative -> days +dObliquity 23.5 # Retrograde rotation +dRadGyra 0.5 # Radius of gyration (moment of inertia constant) + +# ATMESC Properties +dFXUV -100 # Incident XUV flux (constant) +dXFrac 1.0 # X-Ray/XUV absorption radius (fraction of planet radius) +dSurfWaterMass -3.0 # Initial surface water (Earth oceans) +dEnvelopeMass 0 # Initial envelope mass (Earth masses) +bHaltSurfaceDesiccated 0 # Halt when dry? +bHaltEnvelopeGone 0 # Halt when evaporated? +dMinSurfWaterMass -1.e-5 # Planet is desiccated when water content drops below this (Earth oceans) +sWaterLossModel lbexact +sPlanetRadiusModel none +bInstantO2Sink 1 +sAtmXAbsEffH2OModel bolmont16 + +# Orbital Properties +dSemi -1 # Semi-major axis, negative -> AU +dEcc 0.0167 # Eccentricity + +# Output +saOutputOrder Time -SurfWaterMass -RGLimit -OxygenMass diff --git a/tests/Atmesc/WaterELimConstXUVLBExactSinkO2Bolmont16/test_WaterELimConstXUVLBExactSinkO2Bolmont16.py b/tests/Atmesc/WaterELimConstXUVLBExactSinkO2Bolmont16/test_WaterELimConstXUVLBExactSinkO2Bolmont16.py new file mode 100644 index 000000000..cebf6c672 --- /dev/null +++ b/tests/Atmesc/WaterELimConstXUVLBExactSinkO2Bolmont16/test_WaterELimConstXUVLBExactSinkO2Bolmont16.py @@ -0,0 +1,119 @@ +from benchmark import Benchmark, benchmark +import astropy.units as u + +@benchmark( + { + "log.initial.system.Age": {"value": 0.000000, "unit": u.sec}, + "log.initial.system.Time": {"value": 0.000000, "unit": u.sec}, + "log.initial.system.TotAngMom": {"value": 4.416946e+33, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.initial.system.TotEnergy": {"value": -2.237790e+32, "unit": u.Joule}, + "log.initial.system.PotEnergy": {"value": -2.239397e+32, "unit": u.Joule}, + "log.initial.system.KinEnergy": {"value": 1.606047e+29, "unit": u.Joule}, + "log.initial.system.DeltaTime": {"value": 0.000000, "unit": u.sec}, + "log.initial.earth.Mass": {"value": 5.972186e+24, "unit": u.kg}, + "log.initial.earth.Radius": {"value": 6.378100e+06, "unit": u.m}, + "log.initial.earth.RadGyra": {"value": 0.500000}, + "log.initial.earth.BodyType": {"value": 0.000000}, + "log.initial.earth.Density": {"value": 5495.038549, "unit": u.kg / u.m ** 3}, + "log.initial.earth.HZLimitDryRunaway": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.HZLimRecVenus": {"value": -1.000000}, + "log.initial.earth.HZLimRunaway": {"value": -1.000000}, + "log.initial.earth.HZLimMoistGreenhouse": {"value": -1.000000}, + "log.initial.earth.HZLimMaxGreenhouse": {"value": -1.000000}, + "log.initial.earth.HZLimEarlyMars": {"value": -1.000000}, + "log.initial.earth.Instellation": {"value": -1.000000, "unit": u.kg / u.sec ** 3}, + "log.initial.earth.MeanMotion": {"value": -1.000000, "unit": 1 / u.sec}, + "log.initial.earth.OrbPeriod": {"value": -1.000000, "unit": u.sec}, + "log.initial.earth.SemiMajorAxis": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.LXUVTot": {"value": -1.000000, "unit": u.kg / u.sec ** 3}, + "log.initial.earth.SurfWaterMass": {"value": 3.000000, "unit": u.TO}, + "log.initial.earth.EnvelopeMass": {"value": 0.000000, "unit": u.kg}, + "log.initial.earth.OxygenMass": {"value": 0.000000, "unit": u.bar}, + "log.initial.earth.RGLimit": {"value": 0.000000, "unit": u.au}, + "log.initial.earth.XO": {"value": 0.333333}, + "log.initial.earth.EtaO": {"value": 0.682959}, + "log.initial.earth.PlanetRadius": {"value": 6.378100e+06, "unit": u.m}, + "log.initial.earth.OxygenMantleMass": {"value": 0.000000, "unit": u.kg}, + "log.initial.earth.RadXUV": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.RadSolid": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.PresXUV": {"value": 5.000000}, + "log.initial.earth.ScaleHeight": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.ThermTemp": {"value": 400.000000, "unit": u.K}, + "log.initial.earth.AtmGasConst": {"value": 4124.000000}, + "log.initial.earth.PresSurf": {"value": -1.000000, "unit": u.Pa}, + "log.initial.earth.DEnvMassDt": {"value": 0.000000, "unit": u.kg / u.sec}, + "log.initial.earth.FXUV": {"value": 100.000000, "unit": u.W / u.m ** 2}, + "log.initial.earth.AtmXAbsEffH2O": {"value": 0.010704}, + "log.initial.earth.RocheRadius": {"value": 1.037254e+11, "unit": u.m}, + "log.initial.earth.BondiRadius": {"value": 1.249016e+08, "unit": u.m}, + "log.initial.earth.HEscapeRegime": {"value": 8.000000}, + "log.initial.earth.RRCriticalFlux": {"value": 53.697959, "unit": u.W / u.m ** 2}, + "log.initial.earth.CrossoverMass": {"value": 8.022481e-26, "unit": u.kg}, + "log.initial.earth.WaterEscapeRegime": {"value": 3.000000}, + "log.initial.earth.FXUVCRITDRAG": {"value": 4.977066, "unit": u.W / u.m ** 2}, + "log.initial.earth.HREFFLUX": {"value": 2.578763e+18, "unit": 1 / u.m ** 2 / u.sec}, + "log.initial.earth.XO2": {"value": 0.000000}, + "log.initial.earth.XH2O": {"value": 1.000000}, + "log.initial.earth.HDiffFlux": {"value": 1.264874e+17, "unit": 1 / u.m ** 2 / u.sec}, + "log.initial.earth.HRefODragMod": {"value": 0.154711}, + "log.initial.earth.KTide": {"value": 0.999908}, + "log.initial.earth.RGDuration": {"value": 0.00000e+00, "unit": u.yr}, + "log.final.system.Age": {"value": 3.155760e+13, "unit": u.sec}, + "log.final.system.Time": {"value": 3.155760e+13, "unit": u.sec}, + "log.final.system.TotAngMom": {"value": 4.416946e+33, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.final.system.TotEnergy": {"value": -2.237790e+32, "unit": u.Joule}, + "log.final.system.PotEnergy": {"value": -2.239397e+32, "unit": u.Joule}, + "log.final.system.KinEnergy": {"value": 1.606047e+29, "unit": u.Joule}, + "log.final.system.DeltaTime": {"value": 3.155760e+13, "unit": u.sec}, + "log.final.earth.Mass": {"value": 5.972186e+24, "unit": u.kg}, + "log.final.earth.Radius": {"value": 6.378100e+06, "unit": u.m}, + "log.final.earth.RadGyra": {"value": 0.500000}, + "log.final.earth.BodyType": {"value": 0.000000}, + "log.final.earth.Density": {"value": 5495.038549, "unit": u.kg / u.m ** 3}, + "log.final.earth.HZLimitDryRunaway": {"value": -1.000000, "unit": u.m}, + "log.final.earth.HZLimRecVenus": {"value": -1.000000}, + "log.final.earth.HZLimRunaway": {"value": -1.000000}, + "log.final.earth.HZLimMoistGreenhouse": {"value": -1.000000}, + "log.final.earth.HZLimMaxGreenhouse": {"value": -1.000000}, + "log.final.earth.HZLimEarlyMars": {"value": -1.000000}, + "log.final.earth.Instellation": {"value": -1.000000, "unit": u.kg / u.sec ** 3}, + "log.final.earth.MeanMotion": {"value": -1.000000, "unit": 1 / u.sec}, + "log.final.earth.OrbPeriod": {"value": -1.000000, "unit": u.sec}, + "log.final.earth.SemiMajorAxis": {"value": -1.000000, "unit": u.m}, + "log.final.earth.LXUVTot": {"value": -1.000000, "unit": u.kg / u.sec ** 3}, + "log.final.earth.SurfWaterMass": {"value": 2.930804, "unit": u.TO}, + "log.final.earth.EnvelopeMass": {"value": 0.000000, "unit": u.kg}, + "log.final.earth.OxygenMass": {"value": 0.000000, "unit": u.bar}, + "log.final.earth.RGLimit": {"value": 0.000000, "unit": u.au}, + "log.final.earth.XO": {"value": 0.333333}, + "log.final.earth.EtaO": {"value": 0.682959}, + "log.final.earth.PlanetRadius": {"value": 6.378100e+06, "unit": u.m}, + "log.final.earth.OxygenMantleMass": {"value": 2.710708e+19, "unit": u.kg}, + "log.final.earth.RadXUV": {"value": -1.000000, "unit": u.m}, + "log.final.earth.RadSolid": {"value": -1.000000, "unit": u.m}, + "log.final.earth.PresXUV": {"value": 5.000000}, + "log.final.earth.ScaleHeight": {"value": -1.000000, "unit": u.m}, + "log.final.earth.ThermTemp": {"value": 400.000000, "unit": u.K}, + "log.final.earth.AtmGasConst": {"value": 4124.000000}, + "log.final.earth.PresSurf": {"value": -1.000000, "unit": u.Pa}, + "log.final.earth.DEnvMassDt": {"value": 0.000000, "unit": u.kg / u.sec}, + "log.final.earth.FXUV": {"value": 100.000000, "unit": u.W / u.m ** 2}, + "log.final.earth.AtmXAbsEffH2O": {"value": 0.010704}, + "log.final.earth.RocheRadius": {"value": 1.037254e+11, "unit": u.m}, + "log.final.earth.BondiRadius": {"value": 1.249016e+08, "unit": u.m}, + "log.final.earth.HEscapeRegime": {"value": 8.000000}, + "log.final.earth.RRCriticalFlux": {"value": 53.697959, "unit": u.W / u.m ** 2}, + "log.final.earth.CrossoverMass": {"value": 8.022481e-26, "unit": u.kg}, + "log.final.earth.WaterEscapeRegime": {"value": 3.000000}, + "log.final.earth.FXUVCRITDRAG": {"value": 4.977066, "unit": u.W / u.m ** 2}, + "log.final.earth.HREFFLUX": {"value": 2.578763e+18, "unit": 1 / u.m ** 2 / u.sec}, + "log.final.earth.XO2": {"value": 0.000000}, + "log.final.earth.XH2O": {"value": 1.000000}, + "log.final.earth.HDiffFlux": {"value": 1.264874e+17, "unit": 1 / u.m ** 2 / u.sec}, + "log.final.earth.HRefODragMod": {"value": 0.154711}, + "log.final.earth.KTide": {"value": 0.999908}, + "log.final.earth.RGDuration": {"value": 0.00000e+00, "unit": u.yr}, + } +) +class Test_WaterELimConstXUVLBExactSinkO2Bolmont16(Benchmark): + pass diff --git a/tests/Atmesc/WaterELimConstXUVLBExactSinkO2Bolmont16/vpl.in b/tests/Atmesc/WaterELimConstXUVLBExactSinkO2Bolmont16/vpl.in new file mode 100644 index 000000000..de6a4d751 --- /dev/null +++ b/tests/Atmesc/WaterELimConstXUVLBExactSinkO2Bolmont16/vpl.in @@ -0,0 +1,24 @@ +sSystemName solarsystem # System Name +iVerbose 5 # Verbosity level +bOverwrite 1 # Allow file overwrites? + +# List of "body files" that contain body-specific parameters +saBodyFiles earth.in + +# Input/Output Units +sUnitMass solar # Options: gram, kg, Earth, Neptune, Jupiter, solar +sUnitLength aU # Options: cm, m, km, Earth, Jupiter, solar, AU +sUnitTime YEARS # Options: sec, day, year, Myr, Gyr +sUnitAngle d # Options: deg, rad + +# Input/Output +bDoLog 1 # Write a log file? +iDigits 6 # Maximum number of digits to right of decimal +dMinValue 1e-10 # Minimum value of eccentricity/obliquity + +# Evolution Parameters +bDoForward 1 # Perform a forward evolution? +bVarDt 1 # Use variable timestepping? +dEta 0.1 # Coefficient for variable timestepping +dStopTime 1e6 # Stop time for evolution +dOutputTime 1e6 # Output timesteps (assuming in body files) diff --git a/tests/Atmesc/WaterELimConstXUVLBExactSinkO2ConstXAbsEffH2O/earth.in b/tests/Atmesc/WaterELimConstXUVLBExactSinkO2ConstXAbsEffH2O/earth.in new file mode 100644 index 000000000..403dc5de9 --- /dev/null +++ b/tests/Atmesc/WaterELimConstXUVLBExactSinkO2ConstXAbsEffH2O/earth.in @@ -0,0 +1,31 @@ +# Planet a parameters +sName earth # Body's name +saModules atmesc # Modules to apply, exact spelling required + +# Physical Properties +dMass -1 # Mass, negative -> Earth masses +dRadius -1 # Radius, negative -> Earth radii +dRotPeriod -1 # Rotation period, negative -> days +dObliquity 23.5 # Retrograde rotation +dRadGyra 0.5 # Radius of gyration (moment of inertia constant) + +# ATMESC Properties +dFXUV -100 # Incident XUV flux (constant) +dXFrac 1.0 # X-Ray/XUV absorption radius (fraction of planet radius) +dSurfWaterMass -3.0 # Initial surface water (Earth oceans) +dEnvelopeMass 0 # Initial envelope mass (Earth masses) +bHaltSurfaceDesiccated 0 # Halt when dry? +bHaltEnvelopeGone 0 # Halt when evaporated? +dMinSurfWaterMass -1.e-5 # Planet is desiccated when water content drops below this (Earth oceans) +sWaterLossModel lbexact +sPlanetRadiusModel none +bInstantO2Sink 1 +sAtmXAbsEffH2OModel none +dAtmXAbsEffH2O 0.1 + +# Orbital Properties +dSemi -1 # Semi-major axis, negative -> AU +dEcc 0.0167 # Eccentricity + +# Output +saOutputOrder Time -SurfWaterMass -RGLimit -OxygenMass diff --git a/tests/Atmesc/WaterELimConstXUVLBExactSinkO2ConstXAbsEffH2O/test_WaterELimConstXUVLBExactSinkO2ConstXAbsEffH2O.py b/tests/Atmesc/WaterELimConstXUVLBExactSinkO2ConstXAbsEffH2O/test_WaterELimConstXUVLBExactSinkO2ConstXAbsEffH2O.py new file mode 100644 index 000000000..3b5c8c70e --- /dev/null +++ b/tests/Atmesc/WaterELimConstXUVLBExactSinkO2ConstXAbsEffH2O/test_WaterELimConstXUVLBExactSinkO2ConstXAbsEffH2O.py @@ -0,0 +1,119 @@ +from benchmark import Benchmark, benchmark +import astropy.units as u + +@benchmark( + { + "log.initial.system.Age": {"value": 0.000000, "unit": u.sec}, + "log.initial.system.Time": {"value": 0.000000, "unit": u.sec}, + "log.initial.system.TotAngMom": {"value": 4.416946e+33, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.initial.system.TotEnergy": {"value": -2.237790e+32, "unit": u.Joule}, + "log.initial.system.PotEnergy": {"value": -2.239397e+32, "unit": u.Joule}, + "log.initial.system.KinEnergy": {"value": 1.606047e+29, "unit": u.Joule}, + "log.initial.system.DeltaTime": {"value": 0.000000, "unit": u.sec}, + "log.initial.earth.Mass": {"value": 5.972186e+24, "unit": u.kg}, + "log.initial.earth.Radius": {"value": 6.378100e+06, "unit": u.m}, + "log.initial.earth.RadGyra": {"value": 0.500000}, + "log.initial.earth.BodyType": {"value": 0.000000}, + "log.initial.earth.Density": {"value": 5495.038549, "unit": u.kg / u.m ** 3}, + "log.initial.earth.HZLimitDryRunaway": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.HZLimRecVenus": {"value": -1.000000}, + "log.initial.earth.HZLimRunaway": {"value": -1.000000}, + "log.initial.earth.HZLimMoistGreenhouse": {"value": -1.000000}, + "log.initial.earth.HZLimMaxGreenhouse": {"value": -1.000000}, + "log.initial.earth.HZLimEarlyMars": {"value": -1.000000}, + "log.initial.earth.Instellation": {"value": -1.000000, "unit": u.kg / u.sec ** 3}, + "log.initial.earth.MeanMotion": {"value": -1.000000, "unit": 1 / u.sec}, + "log.initial.earth.OrbPeriod": {"value": -1.000000, "unit": u.sec}, + "log.initial.earth.SemiMajorAxis": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.LXUVTot": {"value": -1.000000, "unit": u.kg / u.sec ** 3}, + "log.initial.earth.SurfWaterMass": {"value": 3.000000, "unit": u.TO}, + "log.initial.earth.EnvelopeMass": {"value": 0.000000, "unit": u.kg}, + "log.initial.earth.OxygenMass": {"value": 0.000000, "unit": u.bar}, + "log.initial.earth.RGLimit": {"value": 0.000000, "unit": u.au}, + "log.initial.earth.XO": {"value": 0.333333}, + "log.initial.earth.EtaO": {"value": 0.954654}, + "log.initial.earth.PlanetRadius": {"value": 6.378100e+06, "unit": u.m}, + "log.initial.earth.OxygenMantleMass": {"value": 0.000000, "unit": u.kg}, + "log.initial.earth.RadXUV": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.RadSolid": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.PresXUV": {"value": 5.000000}, + "log.initial.earth.ScaleHeight": {"value": -1.000000, "unit": u.m}, + "log.initial.earth.ThermTemp": {"value": 400.000000, "unit": u.K}, + "log.initial.earth.AtmGasConst": {"value": 4124.000000}, + "log.initial.earth.PresSurf": {"value": -1.000000, "unit": u.Pa}, + "log.initial.earth.DEnvMassDt": {"value": 0.000000, "unit": u.kg / u.sec}, + "log.initial.earth.FXUV": {"value": 100.000000, "unit": u.W / u.m ** 2}, + "log.initial.earth.AtmXAbsEffH2O": {"value": 0.100000}, + "log.initial.earth.RocheRadius": {"value": 1.037254e+11, "unit": u.m}, + "log.initial.earth.BondiRadius": {"value": 1.249016e+08, "unit": u.m}, + "log.initial.earth.HEscapeRegime": {"value": 8.000000}, + "log.initial.earth.RRCriticalFlux": {"value": 53.697959, "unit": u.W / u.m ** 2}, + "log.initial.earth.CrossoverMass": {"value": 5.509522e-25, "unit": u.kg}, + "log.initial.earth.WaterEscapeRegime": {"value": 3.000000}, + "log.initial.earth.FXUVCRITDRAG": {"value": 0.532721, "unit": u.W / u.m ** 2}, + "log.initial.earth.HREFFLUX": {"value": 2.409265e+19, "unit": 1 / u.m ** 2 / u.sec}, + "log.initial.earth.XO2": {"value": 0.000000}, + "log.initial.earth.XH2O": {"value": 1.000000}, + "log.initial.earth.HDiffFlux": {"value": 1.264874e+17, "unit": 1 / u.m ** 2 / u.sec}, + "log.initial.earth.HRefODragMod": {"value": 0.115778}, + "log.initial.earth.KTide": {"value": 0.999908}, + "log.initial.earth.RGDuration": {"value": 0.00000e+00, "unit": u.yr}, + "log.final.system.Age": {"value": 3.155760e+13, "unit": u.sec}, + "log.final.system.Time": {"value": 3.155760e+13, "unit": u.sec}, + "log.final.system.TotAngMom": {"value": 4.416946e+33, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.final.system.TotEnergy": {"value": -2.237790e+32, "unit": u.Joule}, + "log.final.system.PotEnergy": {"value": -2.239397e+32, "unit": u.Joule}, + "log.final.system.KinEnergy": {"value": 1.606047e+29, "unit": u.Joule}, + "log.final.system.DeltaTime": {"value": 4.508229e+12, "unit": u.sec}, + "log.final.earth.Mass": {"value": 5.972186e+24, "unit": u.kg}, + "log.final.earth.Radius": {"value": 6.378100e+06, "unit": u.m}, + "log.final.earth.RadGyra": {"value": 0.500000}, + "log.final.earth.BodyType": {"value": 0.000000}, + "log.final.earth.Density": {"value": 5495.038549, "unit": u.kg / u.m ** 3}, + "log.final.earth.HZLimitDryRunaway": {"value": -1.000000, "unit": u.m}, + "log.final.earth.HZLimRecVenus": {"value": -1.000000}, + "log.final.earth.HZLimRunaway": {"value": -1.000000}, + "log.final.earth.HZLimMoistGreenhouse": {"value": -1.000000}, + "log.final.earth.HZLimMaxGreenhouse": {"value": -1.000000}, + "log.final.earth.HZLimEarlyMars": {"value": -1.000000}, + "log.final.earth.Instellation": {"value": -1.000000, "unit": u.kg / u.sec ** 3}, + "log.final.earth.MeanMotion": {"value": -1.000000, "unit": 1 / u.sec}, + "log.final.earth.OrbPeriod": {"value": -1.000000, "unit": u.sec}, + "log.final.earth.SemiMajorAxis": {"value": -1.000000, "unit": u.m}, + "log.final.earth.LXUVTot": {"value": -1.000000, "unit": u.kg / u.sec ** 3}, + "log.final.earth.SurfWaterMass": {"value": 2.516216, "unit": u.TO}, + "log.final.earth.EnvelopeMass": {"value": 0.000000, "unit": u.kg}, + "log.final.earth.OxygenMass": {"value": 0.000000, "unit": u.bar}, + "log.final.earth.RGLimit": {"value": 0.000000, "unit": u.au}, + "log.final.earth.XO": {"value": 0.333333}, + "log.final.earth.EtaO": {"value": 0.954654}, + "log.final.earth.PlanetRadius": {"value": 6.378100e+06, "unit": u.m}, + "log.final.earth.OxygenMantleMass": {"value": 2.710708e+19, "unit": u.kg}, + "log.final.earth.RadXUV": {"value": -1.000000, "unit": u.m}, + "log.final.earth.RadSolid": {"value": -1.000000, "unit": u.m}, + "log.final.earth.PresXUV": {"value": 5.000000}, + "log.final.earth.ScaleHeight": {"value": -1.000000, "unit": u.m}, + "log.final.earth.ThermTemp": {"value": 400.000000, "unit": u.K}, + "log.final.earth.AtmGasConst": {"value": 4124.000000}, + "log.final.earth.PresSurf": {"value": -1.000000, "unit": u.Pa}, + "log.final.earth.DEnvMassDt": {"value": 0.000000, "unit": u.kg / u.sec}, + "log.final.earth.FXUV": {"value": 100.000000, "unit": u.W / u.m ** 2}, + "log.final.earth.AtmXAbsEffH2O": {"value": 0.100000}, + "log.final.earth.RocheRadius": {"value": 1.037254e+11, "unit": u.m}, + "log.final.earth.BondiRadius": {"value": 1.249016e+08, "unit": u.m}, + "log.final.earth.HEscapeRegime": {"value": 8.000000}, + "log.final.earth.RRCriticalFlux": {"value": 53.697959, "unit": u.W / u.m ** 2}, + "log.final.earth.CrossoverMass": {"value": 5.509522e-25, "unit": u.kg}, + "log.final.earth.WaterEscapeRegime": {"value": 3.000000}, + "log.final.earth.FXUVCRITDRAG": {"value": 0.532721, "unit": u.W / u.m ** 2}, + "log.final.earth.HREFFLUX": {"value": 2.409265e+19, "unit": 1 / u.m ** 2 / u.sec}, + "log.final.earth.XO2": {"value": 0.000000}, + "log.final.earth.XH2O": {"value": 1.000000}, + "log.final.earth.HDiffFlux": {"value": 1.264874e+17, "unit": 1 / u.m ** 2 / u.sec}, + "log.final.earth.HRefODragMod": {"value": 0.115778}, + "log.final.earth.KTide": {"value": 0.999908}, + "log.final.earth.RGDuration": {"value": 0.00000e+00, "unit": u.yr}, + } +) +class Test_WaterELimConstXUVLBExactSinkO2ConstXAbsEffH2O(Benchmark): + pass diff --git a/tests/Atmesc/WaterELimConstXUVLBExactSinkO2ConstXAbsEffH2O/vpl.in b/tests/Atmesc/WaterELimConstXUVLBExactSinkO2ConstXAbsEffH2O/vpl.in new file mode 100644 index 000000000..de6a4d751 --- /dev/null +++ b/tests/Atmesc/WaterELimConstXUVLBExactSinkO2ConstXAbsEffH2O/vpl.in @@ -0,0 +1,24 @@ +sSystemName solarsystem # System Name +iVerbose 5 # Verbosity level +bOverwrite 1 # Allow file overwrites? + +# List of "body files" that contain body-specific parameters +saBodyFiles earth.in + +# Input/Output Units +sUnitMass solar # Options: gram, kg, Earth, Neptune, Jupiter, solar +sUnitLength aU # Options: cm, m, km, Earth, Jupiter, solar, AU +sUnitTime YEARS # Options: sec, day, year, Myr, Gyr +sUnitAngle d # Options: deg, rad + +# Input/Output +bDoLog 1 # Write a log file? +iDigits 6 # Maximum number of digits to right of decimal +dMinValue 1e-10 # Minimum value of eccentricity/obliquity + +# Evolution Parameters +bDoForward 1 # Perform a forward evolution? +bVarDt 1 # Use variable timestepping? +dEta 0.1 # Coefficient for variable timestepping +dStopTime 1e6 # Stop time for evolution +dOutputTime 1e6 # Output timesteps (assuming in body files)