-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from VirtualPlanetaryLaboratory/dev
updated documentation and re-added bp functionality
- Loading branch information
Showing
11 changed files
with
199 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,28 @@ | ||
Running multi-planet | ||
Running MultiPlanet | ||
==================== | ||
|
||
To run :code:`multi-planet` on a large number of simulations, first run | ||
:code:`vspace` to create the simulation folders. Then, in that same directory, type: | ||
To run :code:`MultiPlanet` on a large number of simulations, first run :code:`VSPACE` to | ||
create the simulation folders. Then, in that same directory, type: | ||
|
||
.. code-block:: bash | ||
multi-planet <input file> -c [number of cores] -q -bp -m [email] | ||
multiplanet <input file> -c [number of cores] -q -bp -m [email] | ||
Where the "input file" **must be the same file** used with :code:`vspace`. You can | ||
Where the "input file" **must be the same file** used with :code:`VSPACE`. You can | ||
specify the number of cores, but the default is the maximum number of cores. | ||
|
||
There are three optional arguments for ``multi-planet``: | ||
There are three optional arguments for ``MultiPlanet``: | ||
|
||
:code:`-q`: there will be no output in the command line | ||
|
||
:code:`-bp`: `bigplanet`_ will be ran in after ``multi-planet``. | ||
:code:`-bp`: `BigPlanet`_ will be ran in conjunction with MultiPlanet. | ||
|
||
.. _bigplanet: https://github.com/VirtualPlanetaryLaboratory/bigplanet | ||
.. BigPlanet: https://github.com/VirtualPlanetaryLaboratory/bigplanet | ||
:code:`-m`: emails the users at :code:`email` when the simulations are complete | ||
|
||
``multi-planet`` keeps track of the status of the parameter sweep. Should the run halt | ||
early for any reason, simply run ``multi-planet`` again it will restart all the simulations | ||
|
||
``MultiPlanet`` keeps track of the status of the parameter sweep. Should the run halt | ||
early for any reason, simply run ``MultiPlanet`` again it will restart all the simulations | ||
that crashed and continue on with the parameter sweep. You can also check the status | ||
of the parameter sweep with `mpstatus <mpstatus>`_. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,28 @@ | ||
Installation Guide | ||
================== | ||
|
||
There are two ways to install ``multi-planet``: 1) in conjunction with | ||
There are two ways to install ``MultiPlanet``: 1) in conjunction with | ||
`VPLanet <https://github.com/VirtualPlanetaryLaboratory/vplanet>`_ and | ||
its other support scripts, or 2) from source. | ||
|
||
To install bigplanet and the other ``VPLanet`` packages, use the command: | ||
To install MultiPlanet and the other ``VPLanet`` packages, use the command: | ||
|
||
.. code-block:: bash | ||
python -m pip install vplanet | ||
To install from source, first close the repo: | ||
|
||
|
||
.. code-block:: bash | ||
git clone https://github.com/VirtualPlanetaryLaboratory/multi-planet.git | ||
and then go into the directory (bigplanet) and run the setup script: | ||
and then go into the directory (MultiPlanet) and run the setup script: | ||
|
||
.. code-block:: bash | ||
cd multi-planet | ||
cd multi-planet/ | ||
python setup.py install | ||
The setup script installs the various dependencies, creates the ``multi-planet`` and ``mpstatus`` | ||
The setup script installs the various dependencies, creates the ``MultiPlanet`` and ``mpstatus`` | ||
executables, and adds them to your PATH. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
sDestFolder MP_Bigplanet | ||
sArchiveFile MP_Bigplanet.bpa | ||
|
||
saBodyFiles earth.in venus.in sun.in | ||
|
||
sPrimaryFile vpl.in | ||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# Earthlike parameters | ||
sName earth # Body's name | ||
saModules radheat thermint | ||
|
||
# Physical Properties | ||
dMass -1.0 # Mass, negative -> Earth masses | ||
dRadius -1.0 # Radius, negative -> Earth radii | ||
dRotPeriod -1.0 # Rotation period, negative -> days | ||
dObliquity 23.5 | ||
dRadGyra 0.5 | ||
# Orbital Properties | ||
dEcc 0.0167 # Eccentricity | ||
dSemi -1 # Semi-major axis, negative -> AU | ||
|
||
|
||
# RADHEAT Parameters | ||
# *Num* are in numbers of atoms, negative -> Earth vals | ||
### 40K | ||
d40KPowerMan -1 | ||
d40KPowerCore -1 | ||
d40KPowerCrust -1 | ||
### 232Th | ||
d232ThPowerMan -1 | ||
d232ThPowerCore -1 | ||
d232ThPowerCrust -1 | ||
### 235U | ||
d235UPowerMan -1 | ||
d235UPowerCore -1 | ||
d235UPowerCrust -1 | ||
### 238U | ||
d238UPowerMan -1 | ||
d238UPowerCore -1 | ||
d238UPowerCrust -1 | ||
|
||
### THERMINT inputs. | ||
dTMan 3000 | ||
dTCore 6000 | ||
#dViscJumpMan 2.40 | ||
|
||
saOutputOrder -Time -TMan -TUMan -TLMan -TCMB -TCore $ | ||
-HflowUMan -HflowMeltMan -RadPowerMan -RadPowerCore -RadPowerCrust $ | ||
-HflowCMB -HflowSecMan $ | ||
-TDotMan -TDotCore -TJumpLMan -TJumpUMan -RIC -RayleighMan -ViscUMan -ViscLMan $ | ||
-MeltMassFluxMan -FMeltUMan $ | ||
-MagMom -CoreBuoyTherm -CoreBuoyCompo -CoreBuoyTotal -MagPauseRad $ | ||
-BLUMan -BLLMan $ | ||
-238UPowerMan -238UNumMan -238UMassMan -238UPowerCore -238UNumCore -238UMassCore $ | ||
-238UPowerCrust -238UNumCrust -238UMassCrust $ | ||
-235UPowerMan -235UNumMan -235UMassMan -235UPowerCore -235UNumCore -235UMassCore $ | ||
-235UPowerCrust -235UNumCrust -235UMassCrust $ | ||
-232ThPowerMan -232ThNumMan -232ThMassMan -232ThPowerCore -232ThNumCore -232ThMassCore $ | ||
-232ThPowerCrust -232ThNumCrust -232ThMassCrust $ | ||
-40KPowerMan -40KNumMan -40KMassMan -40KPowerCore -40KNumCore -40KMassCore $ | ||
-40KPowerCrust -40KNumCrust -40KMassCrust ChiOC ChiIC MassChiOC MassChiIC MassOC MassIC $ | ||
-RadPowerTotal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
# sun parameters | ||
sName sun | ||
dMass 1 | ||
dSemi 0 | ||
dEcc 0 | ||
dRadius 0.00135 | ||
dLuminosity 3.846e26 | ||
sStellarModel none | ||
saModules stellar |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import subprocess | ||
import numpy as np | ||
import os | ||
import pathlib | ||
import multiprocessing as mp | ||
import warnings | ||
import sys | ||
|
||
def test_mp_bigplanet(): | ||
#gets current path | ||
path = pathlib.Path(__file__).parents[0].absolute() | ||
sys.path.insert(1, str(path.parents[0])) | ||
|
||
#gets the number of cores on the machine | ||
cores = mp.cpu_count() | ||
if cores == 1: | ||
warnings.warn("There is only 1 core on the machine",stacklevel=3) | ||
else: | ||
# Run vspace | ||
if not (path / "MP_Bigplanet").exists(): | ||
subprocess.check_output(["vspace", "vspace.in"], cwd=path) | ||
|
||
# Run multi-planet | ||
if not (path / ".MP_Bigplanet").exists(): | ||
subprocess.check_output(["multiplanet", "vspace.in", "-bp"], cwd=path) | ||
|
||
file = path / "MP_Bigplanet.bpa" | ||
|
||
assert os.path.isfile(file) == True | ||
|
||
if __name__ == "__main__": | ||
test_mp_bigplanet() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
# Example primary input file for VPLANET | ||
sSystemName earth # System Name | ||
iVerbose 5 # Verbosity level | ||
bOverwrite 1 # Allow file overwrites? | ||
|
||
# All space after a # is ignored, as is white space | ||
# The first lowercase letter(s) denote the cast: b=boolean, i=int, d=double, | ||
# s=string. An "a" indicates an array and multiple arguments are allowed/expected. | ||
|
||
# List of "body files" that contain body-specific parameters | ||
saBodyFiles sun.in $ # The host star | ||
earth.in # Earth | ||
|
||
|
||
# Array options can continue to the next line with a terminating "$". The $ can be | ||
# at the end of the string or not. Comments are allowed afterwards. | ||
|
||
# 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 | ||
sUnitTemp K | ||
|
||
# Units specified in the primary input file are propagated into the bodies. Otherwise | ||
# specifiy units on a per body basis in the body files. | ||
# Most string arguments can be in any case and need only be unambiguous. | ||
|
||
# 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 | ||
|
||
# Option names must be exact in spelling and case. | ||
|
||
# Evolution Parameters | ||
bDoForward 1 # Perform a forward evolution? | ||
bVarDt 1 # Use variable timestepping? | ||
dEta 0.1 # Coefficient for variable timestepping | ||
dStopTime 4.5e9 #1e10 # Stop time for evolution | ||
dOutputTime 1e7 # 4.5e9 # Output timesteps (assuming in body files) | ||
|
||
# Some options are only permitted in the primary file, some are forbidden. | ||
# That should really be documented! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
sSrcFolder . | ||
sDestFolder MP_Bigplanet | ||
sTrialName semi_ | ||
|
||
sBodyFile earth.in | ||
dSemi [1, 2, n3] a | ||
|
||
sBodyFile sun.in | ||
|
||
sPrimaryFile vpl.in |