From 62571a4865ed4700cba1f77aa89eac09bb4e53de Mon Sep 17 00:00:00 2001 From: Rory Barnes Date: Mon, 16 Sep 2024 11:43:22 -0700 Subject: [PATCH] Added test for the Brieman magnetic braking model. --- tests/Stellar/MagneticBraking/breiman.in | 12 + .../MagneticBraking/test_MagneticBraking.py | 638 +++++++----------- tests/Stellar/MagneticBraking/vpl.in | 2 +- tests/maketest.py | 3 + 4 files changed, 261 insertions(+), 394 deletions(-) create mode 100644 tests/Stellar/MagneticBraking/breiman.in diff --git a/tests/Stellar/MagneticBraking/breiman.in b/tests/Stellar/MagneticBraking/breiman.in new file mode 100644 index 000000000..b681a31f6 --- /dev/null +++ b/tests/Stellar/MagneticBraking/breiman.in @@ -0,0 +1,12 @@ +# +sName breimann +saModules stellar +dMass 1.0 +dAge 5.0e6 +dRotPeriod -1.0 # Initial rotaiton period (days) +sStellarModel baraffe +sMagBrakingModel breimann21 +bHaltEndBaraffeGrid 1 +dSatXUVFrac 1.e-3 +dSatXUVTime -0.1 +saOutputOrder Time -TotAngMom -Luminosity -Radius Temperature -RotPer RadGyra WindTorque RossbyNumber diff --git a/tests/Stellar/MagneticBraking/test_MagneticBraking.py b/tests/Stellar/MagneticBraking/test_MagneticBraking.py index 725aec6e7..a8c53c518 100644 --- a/tests/Stellar/MagneticBraking/test_MagneticBraking.py +++ b/tests/Stellar/MagneticBraking/test_MagneticBraking.py @@ -1,394 +1,246 @@ -import astropy.units as u -from benchmark import Benchmark, benchmark - - -@benchmark( - { - "log.initial.system.Age": {"value": 1.577880e14, "unit": u.sec}, - "log.initial.system.Time": {"value": 0.000000, "unit": u.sec}, - "log.initial.system.TotAngMom": { - "value": 8.714482e43, - "unit": (u.kg * u.m**2) / u.sec, - }, - "log.initial.system.TotEnergy": {"value": -4.729901e41, "unit": u.erg}, - "log.initial.system.PotEnergy": {"value": -1.587196e41, "unit": u.Joule}, - "log.initial.system.KinEnergy": {"value": 1.056225e39, "unit": u.Joule}, - "log.initial.system.DeltaTime": {"value": 0.000000, "unit": u.sec}, - "log.initial.matt.Mass": {"value": 1.988416e30, "unit": u.kg}, - "log.initial.matt.Radius": {"value": 156.404167, "unit": u.Rearth}, - "log.initial.matt.RadGyra": {"value": 0.449297}, - "log.initial.matt.RotAngMom": { - "value": 2.904827e43, - "unit": (u.kg * u.m**2) / u.sec, - }, - "log.initial.matt.RotVel": {"value": 7.254471e04, "unit": u.m / u.sec}, - "log.initial.matt.BodyType": {"value": 0.000000}, - "log.initial.matt.RotRate": {"value": 7.272205e-05, "unit": 1 / u.sec}, - "log.initial.matt.RotPer": {"value": 1.000000, "unit": u.day}, - "log.initial.matt.Density": {"value": 478.189139, "unit": u.kg / u.m**3}, - "log.initial.matt.HZLimitDryRunaway": {"value": 1.084540e11, "unit": u.m}, - "log.initial.matt.HZLimRecVenus": {"value": 1.636341e11, "unit": u.m}, - "log.initial.matt.HZLimRunaway": {"value": 2.172445e11, "unit": u.m}, - "log.initial.matt.HZLimMoistGreenhouse": {"value": 2.165140e11, "unit": u.m}, - "log.initial.matt.HZLimMaxGreenhouse": {"value": 3.930539e11, "unit": u.m}, - "log.initial.matt.HZLimEarlyMars": {"value": 4.287405e11, "unit": u.m}, - "log.initial.matt.Instellation": { - "value": -1.000000, - "unit": u.kg / u.sec**3, - }, - "log.initial.matt.CriticalSemiMajorAxis": {"value": -1.000000, "unit": u.m}, - "log.initial.matt.LXUVTot": {"value": 0.000638, "unit": u.LSUN}, - "log.initial.matt.LostEnergy": {"value": 5.562685e-309, "unit": u.Joule}, - "log.initial.matt.LostAngMom": { - "value": 5.562685e-309, - "unit": (u.kg * u.m**2) / u.sec, - }, - "log.initial.matt.Luminosity": {"value": 0.637970, "unit": u.LSUN}, - "log.initial.matt.LXUVStellar": {"value": 2.453632e23, "unit": u.W}, - "log.initial.matt.Temperature": {"value": 4309.980416, "unit": u.K}, - "log.initial.matt.LXUVFrac": {"value": 0.001000}, - "log.initial.matt.RossbyNumber": {"value": 0.028968}, - "log.initial.matt.DRotPerDtStellar": {"value": -3.381379e-10}, - "log.initial.sk.Mass": {"value": 1.988416e30, "unit": u.kg}, - "log.initial.sk.Radius": {"value": 156.404167, "unit": u.Rearth}, - "log.initial.sk.RadGyra": {"value": 0.449297}, - "log.initial.sk.RotAngMom": { - "value": 2.904827e43, - "unit": (u.kg * u.m**2) / u.sec, - }, - "log.initial.sk.RotVel": {"value": 7.254471e04, "unit": u.m / u.sec}, - "log.initial.sk.BodyType": {"value": 0.000000}, - "log.initial.sk.RotRate": {"value": 7.272205e-05, "unit": 1 / u.sec}, - "log.initial.sk.RotPer": {"value": 1.000000, "unit": u.day}, - "log.initial.sk.Density": {"value": 478.189139, "unit": u.kg / u.m**3}, - "log.initial.sk.HZLimitDryRunaway": {"value": 1.084540e11, "unit": u.m}, - "log.initial.sk.HZLimRecVenus": {"value": 1.636341e11, "unit": u.m}, - "log.initial.sk.HZLimRunaway": {"value": 2.172445e11, "unit": u.m}, - "log.initial.sk.HZLimMoistGreenhouse": {"value": 2.165140e11, "unit": u.m}, - "log.initial.sk.HZLimMaxGreenhouse": {"value": 3.930539e11, "unit": u.m}, - "log.initial.sk.HZLimEarlyMars": {"value": 4.287405e11, "unit": u.m}, - "log.initial.sk.Instellation": {"value": 872.466408, "unit": u.kg / u.sec**3}, - "log.initial.sk.CriticalSemiMajorAxis": {"value": -1.000000, "unit": u.m}, - "log.initial.sk.LXUVTot": {"value": 0.000638, "unit": u.LSUN}, - "log.initial.sk.LostEnergy": {"value": 5.562685e-309, "unit": u.Joule}, - "log.initial.sk.LostAngMom": { - "value": 5.562685e-309, - "unit": (u.kg * u.m**2) / u.sec, - }, - "log.initial.sk.Luminosity": {"value": 0.637970, "unit": u.LSUN}, - "log.initial.sk.LXUVStellar": {"value": 2.453632e23, "unit": u.W}, - "log.initial.sk.Temperature": {"value": 4309.980416, "unit": u.K}, - "log.initial.sk.LXUVFrac": {"value": 0.001000}, - "log.initial.sk.RossbyNumber": {"value": 0.028968}, - "log.initial.sk.DRotPerDtStellar": {"value": -1.268066e-10}, - "log.initial.reiners.Mass": {"value": 1.988416e30, "unit": u.kg}, - "log.initial.reiners.Radius": {"value": 156.404167, "unit": u.Rearth}, - "log.initial.reiners.RadGyra": {"value": 0.449297}, - "log.initial.reiners.RotAngMom": { - "value": 2.904827e43, - "unit": (u.kg * u.m**2) / u.sec, - }, - "log.initial.reiners.RotVel": {"value": 7.254471e04, "unit": u.m / u.sec}, - "log.initial.reiners.BodyType": {"value": 0.000000}, - "log.initial.reiners.RotRate": {"value": 7.272205e-05, "unit": 1 / u.sec}, - "log.initial.reiners.RotPer": {"value": 1.000000, "unit": u.day}, - "log.initial.reiners.Density": {"value": 478.189139, "unit": u.kg / u.m**3}, - "log.initial.reiners.HZLimitDryRunaway": {"value": 1.084540e11, "unit": u.m}, - "log.initial.reiners.HZLimRecVenus": {"value": 1.636341e11, "unit": u.m}, - "log.initial.reiners.HZLimRunaway": {"value": 2.172445e11, "unit": u.m}, - "log.initial.reiners.HZLimMoistGreenhouse": {"value": 2.165140e11, "unit": u.m}, - "log.initial.reiners.HZLimMaxGreenhouse": {"value": 3.930539e11, "unit": u.m}, - "log.initial.reiners.HZLimEarlyMars": {"value": 4.287405e11, "unit": u.m}, - "log.initial.reiners.Instellation": { - "value": 872.466408, - "unit": u.kg / u.sec**3, - }, - "log.initial.reiners.CriticalSemiMajorAxis": {"value": -1.000000, "unit": u.m}, - "log.initial.reiners.LXUVTot": {"value": 0.000638, "unit": u.LSUN}, - "log.initial.reiners.LostEnergy": {"value": 5.562685e-309, "unit": u.Joule}, - "log.initial.reiners.LostAngMom": { - "value": 5.562685e-309, - "unit": (u.kg * u.m**2) / u.sec, - }, - "log.initial.reiners.Luminosity": {"value": 0.637970, "unit": u.LSUN}, - "log.initial.reiners.LXUVStellar": {"value": 2.453632e23, "unit": u.W}, - "log.initial.reiners.Temperature": {"value": 4309.980416, "unit": u.K}, - "log.initial.reiners.LXUVFrac": {"value": 0.001000}, - "log.initial.reiners.RossbyNumber": {"value": 0.028968}, - "log.initial.reiners.DRotPerDtStellar": {"value": -1.874516e-10}, - "log.final.system.Age": {"value": 1.735668e15, "unit": u.sec, "rtol": 1e-4}, - "log.final.system.Time": {"value": 1.577880e15, "unit": u.sec, "rtol": 1e-4}, - "log.final.system.TotAngMom": { - "value": 8.715570e43, - "unit": (u.kg * u.m**2) / u.sec, - "rtol": 1e-4, - }, - "log.final.system.TotEnergy": { - "value": -4.729764e41, - "unit": u.erg, - "rtol": 1e-4, - }, - "log.final.system.PotEnergy": { - "value": -2.539332e41, - "unit": u.Joule, - "rtol": 1e-4, - }, - "log.final.system.KinEnergy": { - "value": 2.876242e39, - "unit": u.Joule, - "rtol": 1e-4, - }, - "log.final.matt.Mass": {"value": 1.988416e30, "unit": u.kg, "rtol": 1e-4}, - "log.final.matt.Radius": {"value": 97.759576, "unit": u.Rearth, "rtol": 1e-4}, - "log.final.matt.RadGyra": {"value": 0.299433, "rtol": 1e-4}, - "log.final.matt.RotAngMom": { - "value": 1.996789e43, - "unit": (u.kg * u.m**2) / u.sec, - "rtol": 1e-4, - }, - "log.final.matt.RotVel": { - "value": 1.796279e05, - "unit": u.m / u.sec, - "rtol": 1e-4, - }, - "log.final.matt.BodyType": {"value": 0.000000, "rtol": 1e-4}, - "log.final.matt.RotRate": {"value": 0.000288, "unit": 1 / u.sec, "rtol": 1e-4}, - "log.final.matt.RotPer": {"value": 0.252431, "unit": u.day, "rtol": 1e-4}, - "log.final.matt.Density": { - "value": 1958.243703, - "unit": u.kg / u.m**3, - "rtol": 1e-4, - }, - "log.final.matt.HZLimitDryRunaway": { - "value": 1.117753e11, - "unit": u.m, - "rtol": 1e-4, - }, - "log.final.matt.HZLimRecVenus": { - "value": 1.611200e11, - "unit": u.m, - "rtol": 1e-4, - }, - "log.final.matt.HZLimRunaway": { - "value": 2.113828e11, - "unit": u.m, - "rtol": 1e-4, - }, - "log.final.matt.HZLimMoistGreenhouse": { - "value": 2.131868e11, - "unit": u.m, - "rtol": 1e-4, - }, - "log.final.matt.HZLimMaxGreenhouse": { - "value": 3.653514e11, - "unit": u.m, - "rtol": 1e-4, - }, - "log.final.matt.HZLimEarlyMars": { - "value": 3.986121e11, - "unit": u.m, - "rtol": 1e-4, - }, - "log.final.matt.Instellation": { - "value": -1.000000, - "unit": u.kg / u.sec**3, - "rtol": 1e-4, - }, - "log.final.matt.CriticalSemiMajorAxis": { - "value": -1.000000, - "unit": u.m, - "rtol": 1e-4, - }, - "log.final.matt.LXUVTot": {"value": 0.000678, "unit": u.LSUN, "rtol": 1e-4}, - "log.final.matt.LostEnergy": { - "value": 9.339815e40, - "unit": u.Joule, - "rtol": 1e-4, - }, - "log.final.matt.LostAngMom": { - "value": 9.083485e42, - "unit": (u.kg * u.m**2) / u.sec, - "rtol": 1e-4, - }, - "log.final.matt.Luminosity": {"value": 0.677642, "unit": u.LSUN, "rtol": 1e-4}, - "log.final.matt.LXUVStellar": {"value": 2.606209e23, "unit": u.W, "rtol": 1e-4}, - "log.final.matt.Temperature": {"value": 5533.499918, "unit": u.K, "rtol": 1e-4}, - "log.final.matt.LXUVFrac": {"value": 0.001000, "rtol": 1e-4}, - "log.final.matt.RossbyNumber": {"value": 0.015282, "rtol": 1e-4}, - "log.final.matt.DRotPerDtStellar": {"value": 5.922558e-12, "rtol": 1e-4}, - "log.final.sk.Mass": {"value": 1.988416e30, "unit": u.kg, "rtol": 1e-4}, - "log.final.sk.Radius": {"value": 97.759576, "unit": u.Rearth, "rtol": 1e-4}, - "log.final.sk.RadGyra": {"value": 0.299433, "rtol": 1e-4}, - "log.final.sk.RotAngMom": { - "value": 3.390981e42, - "unit": (u.kg * u.m**2) / u.sec, - "rtol": 1e-4, - }, - "log.final.sk.RotVel": { - "value": 3.050471e04, - "unit": u.m / u.sec, - "rtol": 1e-4, - }, - "log.final.sk.BodyType": {"value": 0.000000, "rtol": 1e-4}, - "log.final.sk.RotRate": { - "value": 4.892336e-05, - "unit": 1 / u.sec, - "rtol": 1e-4, - }, - "log.final.sk.RotPer": {"value": 1.486448, "unit": u.day, "rtol": 1e-4}, - "log.final.sk.Density": { - "value": 1958.243703, - "unit": u.kg / u.m**3, - "rtol": 1e-4, - }, - "log.final.sk.HZLimitDryRunaway": { - "value": 1.117753e11, - "unit": u.m, - "rtol": 1e-4, - }, - "log.final.sk.HZLimRecVenus": {"value": 1.611200e11, "unit": u.m, "rtol": 1e-4}, - "log.final.sk.HZLimRunaway": {"value": 2.113828e11, "unit": u.m, "rtol": 1e-4}, - "log.final.sk.HZLimMoistGreenhouse": { - "value": 2.131868e11, - "unit": u.m, - "rtol": 1e-4, - }, - "log.final.sk.HZLimMaxGreenhouse": { - "value": 3.653514e11, - "unit": u.m, - "rtol": 1e-4, - }, - "log.final.sk.HZLimEarlyMars": { - "value": 3.986121e11, - "unit": u.m, - "rtol": 1e-4, - }, - "log.final.sk.Instellation": { - "value": 926.720119, - "unit": u.kg / u.sec**3, - "rtol": 1e-4, - }, - "log.final.sk.CriticalSemiMajorAxis": { - "value": -1.000000, - "unit": u.m, - "rtol": 1e-4, - }, - "log.final.sk.LXUVTot": {"value": 0.000678, "unit": u.LSUN, "rtol": 1e-4}, - "log.final.sk.LostEnergy": { - "value": 9.619152e40, - "unit": u.Joule, - "rtol": 1e-4, - }, - "log.final.sk.LostAngMom": { - "value": 2.566131e43, - "unit": (u.kg * u.m**2) / u.sec, - "rtol": 1e-4, - }, - "log.final.sk.Luminosity": {"value": 0.677642, "unit": u.LSUN, "rtol": 1e-4}, - "log.final.sk.LXUVStellar": {"value": 2.606209e23, "unit": u.W, "rtol": 1e-4}, - "log.final.sk.Temperature": {"value": 5533.499918, "unit": u.K, "rtol": 1e-4}, - "log.final.sk.LXUVFrac": {"value": 0.001000, "rtol": 1e-4}, - "log.final.sk.RossbyNumber": {"value": 0.089986, "rtol": 1e-4}, - "log.final.sk.DRotPerDtStellar": {"value": 6.265864e-11, "rtol": 1e-4}, - "log.final.reiners.Mass": {"value": 1.988416e30, "unit": u.kg, "rtol": 1e-4}, - "log.final.reiners.Radius": { - "value": 97.759576, - "unit": u.Rearth, - "rtol": 1e-4, - }, - "log.final.reiners.RadGyra": {"value": 0.299433, "rtol": 1e-4}, - "log.final.reiners.RotAngMom": { - "value": 4.758849e42, - "unit": (u.kg * u.m**2) / u.sec, - "rtol": 1e-4, - }, - "log.final.reiners.RotVel": { - "value": 4.280982e04, - "unit": u.m / u.sec, - "rtol": 1e-4, - }, - "log.final.reiners.BodyType": {"value": 0.000000, "rtol": 1e-4}, - "log.final.reiners.RotRate": { - "value": 6.865826e-05, - "unit": 1 / u.sec, - "rtol": 1e-4, - }, - "log.final.reiners.RotPer": {"value": 1.059189, "unit": u.day, "rtol": 1e-4}, - "log.final.reiners.Density": { - "value": 1958.243703, - "unit": u.kg / u.m**3, - "rtol": 1e-4, - }, - "log.final.reiners.HZLimitDryRunaway": { - "value": 1.117753e11, - "unit": u.m, - "rtol": 1e-4, - }, - "log.final.reiners.HZLimRecVenus": { - "value": 1.611200e11, - "unit": u.m, - "rtol": 1e-4, - }, - "log.final.reiners.HZLimRunaway": { - "value": 2.113828e11, - "unit": u.m, - "rtol": 1e-4, - }, - "log.final.reiners.HZLimMoistGreenhouse": { - "value": 2.131868e11, - "unit": u.m, - "rtol": 1e-4, - }, - "log.final.reiners.HZLimMaxGreenhouse": { - "value": 3.653514e11, - "unit": u.m, - "rtol": 1e-4, - }, - "log.final.reiners.HZLimEarlyMars": { - "value": 3.986121e11, - "unit": u.m, - "rtol": 1e-4, - }, - "log.final.reiners.Instellation": { - "value": 926.720119, - "unit": u.kg / u.sec**3, - "rtol": 1e-4, - }, - "log.final.reiners.CriticalSemiMajorAxis": { - "value": -1.000000, - "unit": u.m, - "rtol": 1e-4, - }, - "log.final.reiners.LXUVTot": {"value": 0.000678, "unit": u.LSUN, "rtol": 1e-4}, - "log.final.reiners.LostEnergy": { - "value": 9.611108e40, - "unit": u.Joule, - "rtol": 1e-4, - }, - "log.final.reiners.LostAngMom": { - "value": 2.429319e43, - "unit": (u.kg * u.m**2) / u.sec, - "rtol": 1e-4, - }, - "log.final.reiners.Luminosity": { - "value": 0.677642, - "unit": u.LSUN, - "rtol": 1e-4, - }, - "log.final.reiners.LXUVStellar": { - "value": 2.606209e23, - "unit": u.W, - "rtol": 1e-4, - }, - "log.final.reiners.Temperature": { - "value": 5533.499918, - "unit": u.K, - "rtol": 1e-4, - }, - "log.final.reiners.LXUVFrac": {"value": 0.001000, "rtol": 1e-4}, - "log.final.reiners.RossbyNumber": {"value": 0.064121, "rtol": 1e-4}, - "log.final.reiners.DRotPerDtStellar": {"value": 8.507246e-11, "rtol": 1e-4}, - } +from benchmark import Benchmark, benchmark +import astropy.units as u + +@benchmark( + { + "log.initial.system.Age": {"value": 1.577880e+14, "unit": u.sec}, + "log.initial.system.Time": {"value": 0.000000, "unit": u.sec}, + "log.initial.system.TotAngMom": {"value": 1.161931e+44, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.initial.system.TotEnergy": {"value": -6.306535e+41, "unit": u.erg}, + "log.initial.system.PotEnergy": {"value": -1.587196e+41, "unit": u.Joule}, + "log.initial.system.KinEnergy": {"value": 1.056225e+39, "unit": u.Joule}, + "log.initial.system.DeltaTime": {"value": 0.000000, "unit": u.sec}, + "log.initial.matt.Mass": {"value": 1.988416e+30, "unit": u.kg}, + "log.initial.matt.Radius": {"value": 156.404167, "unit": u.Rearth}, + "log.initial.matt.RadGyra": {"value": 0.449297}, + "log.initial.matt.RotAngMom": {"value": 2.904827e+43, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.initial.matt.RotVel": {"value": 7.254471e+04, "unit": u.m / u.sec}, + "log.initial.matt.BodyType": {"value": 0.000000}, + "log.initial.matt.RotRate": {"value": 7.272205e-05, "unit": 1 / u.sec}, + "log.initial.matt.RotPer": {"value": 1.000000, "unit": u.day}, + "log.initial.matt.Density": {"value": 478.189139, "unit": u.kg / u.m ** 3}, + "log.initial.matt.HZLimitDryRunaway": {"value": 1.084540e+11, "unit": u.m}, + "log.initial.matt.HZLimRecVenus": {"value": 1.889483e+11, "unit": u.m}, + "log.initial.matt.HZLimRunaway": {"value": 2.508523e+11, "unit": u.m}, + "log.initial.matt.HZLimMoistGreenhouse": {"value": 2.500088e+11, "unit": u.m}, + "log.initial.matt.HZLimMaxGreenhouse": {"value": 4.538595e+11, "unit": u.m}, + "log.initial.matt.HZLimEarlyMars": {"value": 4.950669e+11, "unit": u.m}, + "log.initial.matt.Instellation": {"value": -1.000000, "unit": u.kg / u.sec ** 3}, + "log.initial.matt.CriticalSemiMajorAxis": {"value": -1.000000, "unit": u.m}, + "log.initial.matt.LXUVTot": {"value": 0.000638, "unit": u.LSUN}, + "log.initial.matt.LostEnergy": {"value": 5.562685e-309, "unit": u.Joule}, + "log.initial.matt.LostAngMom": {"value": 5.562685e-309, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.initial.matt.EscapeVelocity": {"value": 5.158234e+05, "unit": u.m / u.sec}, + "log.initial.matt.Luminosity": {"value": 0.637970, "unit": u.LSUN}, + "log.initial.matt.LXUVStellar": {"value": 2.453632e+23, "unit": u.W}, + "log.initial.matt.Temperature": {"value": 4309.980416, "unit": u.K}, + "log.initial.matt.LXUVFrac": {"value": 0.001000}, + "log.initial.matt.RossbyNumber": {"value": 0.028968}, + "log.initial.matt.DRotPerDtStellar": {"value": -3.381379e-10}, + "log.initial.matt.WindTorque": {"value": 5.385649e+27}, + "log.initial.sk.Mass": {"value": 1.988416e+30, "unit": u.kg}, + "log.initial.sk.Radius": {"value": 156.404167, "unit": u.Rearth}, + "log.initial.sk.RadGyra": {"value": 0.449297}, + "log.initial.sk.RotAngMom": {"value": 2.904827e+43, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.initial.sk.RotVel": {"value": 7.254471e+04, "unit": u.m / u.sec}, + "log.initial.sk.BodyType": {"value": 0.000000}, + "log.initial.sk.RotRate": {"value": 7.272205e-05, "unit": 1 / u.sec}, + "log.initial.sk.RotPer": {"value": 1.000000, "unit": u.day}, + "log.initial.sk.Density": {"value": 478.189139, "unit": u.kg / u.m ** 3}, + "log.initial.sk.HZLimitDryRunaway": {"value": 1.084540e+11, "unit": u.m}, + "log.initial.sk.HZLimRecVenus": {"value": 1.889483e+11, "unit": u.m}, + "log.initial.sk.HZLimRunaway": {"value": 2.508523e+11, "unit": u.m}, + "log.initial.sk.HZLimMoistGreenhouse": {"value": 2.500088e+11, "unit": u.m}, + "log.initial.sk.HZLimMaxGreenhouse": {"value": 4.538595e+11, "unit": u.m}, + "log.initial.sk.HZLimEarlyMars": {"value": 4.950669e+11, "unit": u.m}, + "log.initial.sk.Instellation": {"value": 872.466408, "unit": u.kg / u.sec ** 3}, + "log.initial.sk.CriticalSemiMajorAxis": {"value": -1.000000, "unit": u.m}, + "log.initial.sk.LXUVTot": {"value": 0.000638, "unit": u.LSUN}, + "log.initial.sk.LostEnergy": {"value": 5.562685e-309, "unit": u.Joule}, + "log.initial.sk.LostAngMom": {"value": 5.562685e-309, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.initial.sk.EscapeVelocity": {"value": 5.158234e+05, "unit": u.m / u.sec}, + "log.initial.sk.Luminosity": {"value": 0.637970, "unit": u.LSUN}, + "log.initial.sk.LXUVStellar": {"value": 2.453632e+23, "unit": u.W}, + "log.initial.sk.Temperature": {"value": 4309.980416, "unit": u.K}, + "log.initial.sk.LXUVFrac": {"value": 0.001000}, + "log.initial.sk.RossbyNumber": {"value": 0.028968}, + "log.initial.sk.DRotPerDtStellar": {"value": -1.268066e-10}, + "log.initial.sk.WindTorque": {"value": 7.643669e+28}, + "log.initial.reiners.Mass": {"value": 1.988416e+30, "unit": u.kg}, + "log.initial.reiners.Radius": {"value": 156.404167, "unit": u.Rearth}, + "log.initial.reiners.RadGyra": {"value": 0.449297}, + "log.initial.reiners.RotAngMom": {"value": 2.904827e+43, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.initial.reiners.RotVel": {"value": 7.254471e+04, "unit": u.m / u.sec}, + "log.initial.reiners.BodyType": {"value": 0.000000}, + "log.initial.reiners.RotRate": {"value": 7.272205e-05, "unit": 1 / u.sec}, + "log.initial.reiners.RotPer": {"value": 1.000000, "unit": u.day}, + "log.initial.reiners.Density": {"value": 478.189139, "unit": u.kg / u.m ** 3}, + "log.initial.reiners.HZLimitDryRunaway": {"value": 1.084540e+11, "unit": u.m}, + "log.initial.reiners.HZLimRecVenus": {"value": 1.889483e+11, "unit": u.m}, + "log.initial.reiners.HZLimRunaway": {"value": 2.508523e+11, "unit": u.m}, + "log.initial.reiners.HZLimMoistGreenhouse": {"value": 2.500088e+11, "unit": u.m}, + "log.initial.reiners.HZLimMaxGreenhouse": {"value": 4.538595e+11, "unit": u.m}, + "log.initial.reiners.HZLimEarlyMars": {"value": 4.950669e+11, "unit": u.m}, + "log.initial.reiners.Instellation": {"value": 872.466408, "unit": u.kg / u.sec ** 3}, + "log.initial.reiners.CriticalSemiMajorAxis": {"value": -1.000000, "unit": u.m}, + "log.initial.reiners.LXUVTot": {"value": 0.000638, "unit": u.LSUN}, + "log.initial.reiners.LostEnergy": {"value": 5.562685e-309, "unit": u.Joule}, + "log.initial.reiners.LostAngMom": {"value": 5.562685e-309, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.initial.reiners.EscapeVelocity": {"value": 5.158234e+05, "unit": u.m / u.sec}, + "log.initial.reiners.Luminosity": {"value": 0.637970, "unit": u.LSUN}, + "log.initial.reiners.LXUVStellar": {"value": 2.453632e+23, "unit": u.W}, + "log.initial.reiners.Temperature": {"value": 4309.980416, "unit": u.K}, + "log.initial.reiners.LXUVFrac": {"value": 0.001000}, + "log.initial.reiners.RossbyNumber": {"value": 0.028968}, + "log.initial.reiners.DRotPerDtStellar": {"value": -1.874516e-10}, + "log.initial.reiners.WindTorque": {"value": 5.604739e+28}, + "log.initial.breimann.Mass": {"value": 1.988416e+30, "unit": u.kg}, + "log.initial.breimann.Radius": {"value": 156.404167, "unit": u.Rearth}, + "log.initial.breimann.RadGyra": {"value": 0.449297}, + "log.initial.breimann.RotAngMom": {"value": 2.904827e+43, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.initial.breimann.RotVel": {"value": 7.254471e+04, "unit": u.m / u.sec}, + "log.initial.breimann.BodyType": {"value": 0.000000}, + "log.initial.breimann.RotRate": {"value": 7.272205e-05, "unit": 1 / u.sec}, + "log.initial.breimann.RotPer": {"value": 1.000000, "unit": u.day}, + "log.initial.breimann.Density": {"value": 478.189139, "unit": u.kg / u.m ** 3}, + "log.initial.breimann.HZLimitDryRunaway": {"value": 1.084540e+11, "unit": u.m}, + "log.initial.breimann.HZLimRecVenus": {"value": 1.889483e+11, "unit": u.m}, + "log.initial.breimann.HZLimRunaway": {"value": 2.508523e+11, "unit": u.m}, + "log.initial.breimann.HZLimMoistGreenhouse": {"value": 2.500088e+11, "unit": u.m}, + "log.initial.breimann.HZLimMaxGreenhouse": {"value": 4.538595e+11, "unit": u.m}, + "log.initial.breimann.HZLimEarlyMars": {"value": 4.950669e+11, "unit": u.m}, + "log.initial.breimann.Instellation": {"value": 872.466408, "unit": u.kg / u.sec ** 3}, + "log.initial.breimann.CriticalSemiMajorAxis": {"value": -1.000000, "unit": u.m}, + "log.initial.breimann.LXUVTot": {"value": 2.453632e+23, "unit": u.kg / u.sec ** 3}, + "log.initial.breimann.LostEnergy": {"value": 5.562685e-309, "unit": u.Joule}, + "log.initial.breimann.LostAngMom": {"value": 5.562685e-309, "unit": (u.kg * u.m ** 2) / u.sec}, + "log.initial.breimann.EscapeVelocity": {"value": 5.158234e+05, "unit": u.m / u.sec}, + "log.initial.breimann.Luminosity": {"value": 0.637970, "unit": u.LSUN}, + "log.initial.breimann.LXUVStellar": {"value": 2.453632e+23, "unit": u.W}, + "log.initial.breimann.Temperature": {"value": 4309.980416, "unit": u.K}, + "log.initial.breimann.LXUVFrac": {"value": 0.001000}, + "log.initial.breimann.RossbyNumber": {"value": 0.028968}, + "log.initial.breimann.DRotPerDtStellar": {"value": -3.352695e-10}, + "log.initial.breimann.WindTorque": {"value": 6.350015e+27}, + "log.final.system.Age": {"value": 1.735668e+15, "unit": u.sec, "rtol": 1e-4}, + "log.final.system.Time": {"value": 1.577880e+15, "unit": u.sec, "rtol": 1e-4}, + "log.final.system.TotAngMom": {"value": 1.162071e+44, "unit": (u.kg * u.m ** 2) / u.sec, "rtol": 1e-4}, + "log.final.system.TotEnergy": {"value": -6.306352e+41, "unit": u.erg, "rtol": 1e-4}, + "log.final.system.PotEnergy": {"value": -2.539332e+41, "unit": u.Joule, "rtol": 1e-4}, + "log.final.system.KinEnergy": {"value": 2.876242e+39, "unit": u.Joule, "rtol": 1e-4}, + "log.final.matt.Mass": {"value": 1.988416e+30, "unit": u.kg, "rtol": 1e-4}, + "log.final.matt.Radius": {"value": 97.759576, "unit": u.Rearth, "rtol": 1e-4}, + "log.final.matt.RadGyra": {"value": 0.299433, "rtol": 1e-4}, + "log.final.matt.RotAngMom": {"value": 1.996789e+43, "unit": (u.kg * u.m ** 2) / u.sec, "rtol": 1e-4}, + "log.final.matt.RotVel": {"value": 1.796279e+05, "unit": u.m / u.sec, "rtol": 1e-4}, + "log.final.matt.BodyType": {"value": 0.000000, "rtol": 1e-4}, + "log.final.matt.RotRate": {"value": 0.000288, "unit": 1 / u.sec, "rtol": 1e-4}, + "log.final.matt.RotPer": {"value": 0.252431, "unit": u.day, "rtol": 1e-4}, + "log.final.matt.Density": {"value": 1958.243703, "unit": u.kg / u.m ** 3, "rtol": 1e-4}, + "log.final.matt.HZLimitDryRunaway": {"value": 1.117753e+11, "unit": u.m, "rtol": 1e-4}, + "log.final.matt.HZLimRecVenus": {"value": 1.860454e+11, "unit": u.m, "rtol": 1e-4}, + "log.final.matt.HZLimRunaway": {"value": 2.440838e+11, "unit": u.m, "rtol": 1e-4}, + "log.final.matt.HZLimMoistGreenhouse": {"value": 2.461670e+11, "unit": u.m, "rtol": 1e-4}, + "log.final.matt.HZLimMaxGreenhouse": {"value": 4.218714e+11, "unit": u.m, "rtol": 1e-4}, + "log.final.matt.HZLimEarlyMars": {"value": 4.602776e+11, "unit": u.m, "rtol": 1e-4}, + "log.final.matt.Instellation": {"value": -1.000000, "unit": u.kg / u.sec ** 3, "rtol": 1e-4}, + "log.final.matt.CriticalSemiMajorAxis": {"value": -1.000000, "unit": u.m, "rtol": 1e-4}, + "log.final.matt.LXUVTot": {"value": 0.000678, "unit": u.LSUN, "rtol": 1e-4}, + "log.final.matt.LostEnergy": {"value": 9.339815e+40, "unit": u.Joule, "rtol": 1e-4}, + "log.final.matt.LostAngMom": {"value": 9.083485e+42, "unit": (u.kg * u.m ** 2) / u.sec, "rtol": 1e-4}, + "log.final.matt.EscapeVelocity": {"value": 6.524474e+05, "unit": u.m / u.sec, "rtol": 1e-4}, + "log.final.matt.Luminosity": {"value": 0.677642, "unit": u.LSUN, "rtol": 1e-4}, + "log.final.matt.LXUVStellar": {"value": 2.606209e+23, "unit": u.W, "rtol": 1e-4}, + "log.final.matt.Temperature": {"value": 5533.499918, "unit": u.K, "rtol": 1e-4}, + "log.final.matt.LXUVFrac": {"value": 0.001000, "rtol": 1e-4}, + "log.final.matt.RossbyNumber": {"value": 0.015282, "rtol": 1e-4}, + "log.final.matt.DRotPerDtStellar": {"value": 5.922558e-12, "rtol": 1e-4}, + "log.final.matt.WindTorque": {"value": 4.970718e+27, "rtol": 1e-4}, + "log.final.sk.Mass": {"value": 1.988416e+30, "unit": u.kg, "rtol": 1e-4}, + "log.final.sk.Radius": {"value": 97.759576, "unit": u.Rearth, "rtol": 1e-4}, + "log.final.sk.RadGyra": {"value": 0.299433, "rtol": 1e-4}, + "log.final.sk.RotAngMom": {"value": 3.390981e+42, "unit": (u.kg * u.m ** 2) / u.sec, "rtol": 1e-4}, + "log.final.sk.RotVel": {"value": 3.050471e+04, "unit": u.m / u.sec, "rtol": 1e-4}, + "log.final.sk.BodyType": {"value": 0.000000, "rtol": 1e-4}, + "log.final.sk.RotRate": {"value": 4.892336e-05, "unit": 1 / u.sec, "rtol": 1e-4}, + "log.final.sk.RotPer": {"value": 1.486448, "unit": u.day, "rtol": 1e-4}, + "log.final.sk.Density": {"value": 1958.243703, "unit": u.kg / u.m ** 3, "rtol": 1e-4}, + "log.final.sk.HZLimitDryRunaway": {"value": 1.117753e+11, "unit": u.m, "rtol": 1e-4}, + "log.final.sk.HZLimRecVenus": {"value": 1.860454e+11, "unit": u.m, "rtol": 1e-4}, + "log.final.sk.HZLimRunaway": {"value": 2.440838e+11, "unit": u.m, "rtol": 1e-4}, + "log.final.sk.HZLimMoistGreenhouse": {"value": 2.461670e+11, "unit": u.m, "rtol": 1e-4}, + "log.final.sk.HZLimMaxGreenhouse": {"value": 4.218714e+11, "unit": u.m, "rtol": 1e-4}, + "log.final.sk.HZLimEarlyMars": {"value": 4.602776e+11, "unit": u.m, "rtol": 1e-4}, + "log.final.sk.Instellation": {"value": 926.720119, "unit": u.kg / u.sec ** 3, "rtol": 1e-4}, + "log.final.sk.CriticalSemiMajorAxis": {"value": -1.000000, "unit": u.m, "rtol": 1e-4}, + "log.final.sk.LXUVTot": {"value": 0.000678, "unit": u.LSUN, "rtol": 1e-4}, + "log.final.sk.LostEnergy": {"value": 9.619152e+40, "unit": u.Joule, "rtol": 1e-4}, + "log.final.sk.LostAngMom": {"value": 2.566131e+43, "unit": (u.kg * u.m ** 2) / u.sec, "rtol": 1e-4}, + "log.final.sk.EscapeVelocity": {"value": 6.524474e+05, "unit": u.m / u.sec, "rtol": 1e-4}, + "log.final.sk.Luminosity": {"value": 0.677642, "unit": u.LSUN, "rtol": 1e-4}, + "log.final.sk.LXUVStellar": {"value": 2.606209e+23, "unit": u.W, "rtol": 1e-4}, + "log.final.sk.Temperature": {"value": 5533.499918, "unit": u.K, "rtol": 1e-4}, + "log.final.sk.LXUVFrac": {"value": 0.001000, "rtol": 1e-4}, + "log.final.sk.RossbyNumber": {"value": 0.089986, "rtol": 1e-4}, + "log.final.sk.DRotPerDtStellar": {"value": 6.265864e-11, "rtol": 1e-4}, + "log.final.sk.WindTorque": {"value": 1.577718e+27, "rtol": 1e-4}, + "log.final.reiners.Mass": {"value": 1.988416e+30, "unit": u.kg, "rtol": 1e-4}, + "log.final.reiners.Radius": {"value": 97.759576, "unit": u.Rearth, "rtol": 1e-4}, + "log.final.reiners.RadGyra": {"value": 0.299433, "rtol": 1e-4}, + "log.final.reiners.RotAngMom": {"value": 4.758849e+42, "unit": (u.kg * u.m ** 2) / u.sec, "rtol": 1e-4}, + "log.final.reiners.RotVel": {"value": 4.280982e+04, "unit": u.m / u.sec, "rtol": 1e-4}, + "log.final.reiners.BodyType": {"value": 0.000000, "rtol": 1e-4}, + "log.final.reiners.RotRate": {"value": 6.865826e-05, "unit": 1 / u.sec, "rtol": 1e-4}, + "log.final.reiners.RotPer": {"value": 1.059189, "unit": u.day, "rtol": 1e-4}, + "log.final.reiners.Density": {"value": 1958.243703, "unit": u.kg / u.m ** 3, "rtol": 1e-4}, + "log.final.reiners.HZLimitDryRunaway": {"value": 1.117753e+11, "unit": u.m, "rtol": 1e-4}, + "log.final.reiners.HZLimRecVenus": {"value": 1.860454e+11, "unit": u.m, "rtol": 1e-4}, + "log.final.reiners.HZLimRunaway": {"value": 2.440838e+11, "unit": u.m, "rtol": 1e-4}, + "log.final.reiners.HZLimMoistGreenhouse": {"value": 2.461670e+11, "unit": u.m, "rtol": 1e-4}, + "log.final.reiners.HZLimMaxGreenhouse": {"value": 4.218714e+11, "unit": u.m, "rtol": 1e-4}, + "log.final.reiners.HZLimEarlyMars": {"value": 4.602776e+11, "unit": u.m, "rtol": 1e-4}, + "log.final.reiners.Instellation": {"value": 926.720119, "unit": u.kg / u.sec ** 3, "rtol": 1e-4}, + "log.final.reiners.CriticalSemiMajorAxis": {"value": -1.000000, "unit": u.m, "rtol": 1e-4}, + "log.final.reiners.LXUVTot": {"value": 0.000678, "unit": u.LSUN, "rtol": 1e-4}, + "log.final.reiners.LostEnergy": {"value": 9.611108e+40, "unit": u.Joule, "rtol": 1e-4}, + "log.final.reiners.LostAngMom": {"value": 2.429319e+43, "unit": (u.kg * u.m ** 2) / u.sec, "rtol": 1e-4}, + "log.final.reiners.EscapeVelocity": {"value": 6.524474e+05, "unit": u.m / u.sec, "rtol": 1e-4}, + "log.final.reiners.Luminosity": {"value": 0.677642, "unit": u.LSUN, "rtol": 1e-4}, + "log.final.reiners.LXUVStellar": {"value": 2.606209e+23, "unit": u.W, "rtol": 1e-4}, + "log.final.reiners.Temperature": {"value": 5533.499918, "unit": u.K, "rtol": 1e-4}, + "log.final.reiners.LXUVFrac": {"value": 0.001000, "rtol": 1e-4}, + "log.final.reiners.RossbyNumber": {"value": 0.064121, "rtol": 1e-4}, + "log.final.reiners.DRotPerDtStellar": {"value": 8.507246e-11, "rtol": 1e-4}, + "log.final.reiners.WindTorque": {"value": 4.316258e+27, "rtol": 1e-4}, + "log.final.breimann.Mass": {"value": 1.988416e+30, "unit": u.kg, "rtol": 1e-4}, + "log.final.breimann.Radius": {"value": 97.759576, "unit": u.Rearth, "rtol": 1e-4}, + "log.final.breimann.RadGyra": {"value": 0.299433, "rtol": 1e-4}, + "log.final.breimann.RotAngMom": {"value": 2.164332e+43, "unit": (u.kg * u.m ** 2) / u.sec, "rtol": 1e-4}, + "log.final.breimann.RotVel": {"value": 1.946997e+05, "unit": u.m / u.sec, "rtol": 1e-4}, + "log.final.breimann.BodyType": {"value": 0.000000, "rtol": 1e-4}, + "log.final.breimann.RotRate": {"value": 0.000312, "unit": 1 / u.sec, "rtol": 1e-4}, + "log.final.breimann.RotPer": {"value": 0.232890, "unit": u.day, "rtol": 1e-4}, + "log.final.breimann.Density": {"value": 1958.243703, "unit": u.kg / u.m ** 3, "rtol": 1e-4}, + "log.final.breimann.HZLimitDryRunaway": {"value": 1.117753e+11, "unit": u.m, "rtol": 1e-4}, + "log.final.breimann.HZLimRecVenus": {"value": 1.860454e+11, "unit": u.m, "rtol": 1e-4}, + "log.final.breimann.HZLimRunaway": {"value": 2.440838e+11, "unit": u.m, "rtol": 1e-4}, + "log.final.breimann.HZLimMoistGreenhouse": {"value": 2.461670e+11, "unit": u.m, "rtol": 1e-4}, + "log.final.breimann.HZLimMaxGreenhouse": {"value": 4.218714e+11, "unit": u.m, "rtol": 1e-4}, + "log.final.breimann.HZLimEarlyMars": {"value": 4.602776e+11, "unit": u.m, "rtol": 1e-4}, + "log.final.breimann.Instellation": {"value": 926.720119, "unit": u.kg / u.sec ** 3, "rtol": 1e-4}, + "log.final.breimann.CriticalSemiMajorAxis": {"value": -1.000000, "unit": u.m, "rtol": 1e-4}, + "log.final.breimann.LXUVTot": {"value": 2.606209e+23, "unit": u.kg / u.sec ** 3, "rtol": 1e-4}, + "log.final.breimann.LostEnergy": {"value": 9.289524e+40, "unit": u.Joule, "rtol": 1e-4}, + "log.final.breimann.LostAngMom": {"value": 7.408068e+42, "unit": (u.kg * u.m ** 2) / u.sec, "rtol": 1e-4}, + "log.final.breimann.EscapeVelocity": {"value": 6.524474e+05, "unit": u.m / u.sec, "rtol": 1e-4}, + "log.final.breimann.Luminosity": {"value": 0.677642, "unit": u.LSUN, "rtol": 1e-4}, + "log.final.breimann.LXUVStellar": {"value": 2.606209e+23, "unit": u.W, "rtol": 1e-4}, + "log.final.breimann.Temperature": {"value": 5533.499918, "unit": u.K, "rtol": 1e-4}, + "log.final.breimann.LXUVFrac": {"value": 0.001000, "rtol": 1e-4}, + "log.final.breimann.RossbyNumber": {"value": 0.014099, "rtol": 1e-4}, + "log.final.breimann.DRotPerDtStellar": {"value": 4.204086e-12, "rtol": 1e-4}, + "log.final.breimann.WindTorque": {"value": 4.032506e+27, "rtol": 1e-4}, + } ) -class Test_MagneticBraking(Benchmark): - pass +class Test_MagneticBraking(Benchmark): + pass diff --git a/tests/Stellar/MagneticBraking/vpl.in b/tests/Stellar/MagneticBraking/vpl.in index 77903ec5b..bb4aefcf5 100644 --- a/tests/Stellar/MagneticBraking/vpl.in +++ b/tests/Stellar/MagneticBraking/vpl.in @@ -2,7 +2,7 @@ sSystemName system iVerbose 5 bOverwrite 1 -saBodyFiles matt.in sk.in reiners.in +saBodyFiles matt.in sk.in reiners.in breiman.in sUnitMass solar sUnitLength AU sUnitTime YEARS diff --git a/tests/maketest.py b/tests/maketest.py index b794cdec0..82d6b0a84 100644 --- a/tests/maketest.py +++ b/tests/maketest.py @@ -363,6 +363,9 @@ def ProcessUnits(data): if units == "kg/m^3": v[0] = "u.kg / u.m ** 3" + if units == "kg/sec^3": + v[0] = "u.kg / u.sec ** 3" + if units == "m/sec" or units == "m/s": v[0] = "u.m / u.sec"