aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2016-09-16 20:32:37 -0700
committerbnewbold <bnewbold@robocracy.org>2016-09-16 20:32:37 -0700
commit7b29df28d3fd18cf6118862ef0cc2a88c1e3c803 (patch)
tree59e7f9b1475ba96b42071ff02d6959c306d065b0 /examples
parent3009a97b2c5d6f3484a0f7801c0122d255de6e5e (diff)
downloadmodelthing-7b29df28d3fd18cf6118862ef0cc2a88c1e3c803.tar.gz
modelthing-7b29df28d3fd18cf6118862ef0cc2a88c1e3c803.zip
move files around
Diffstat (limited to 'examples')
-rw-r--r--examples/classic_gravitation/metadata.toml59
-rw-r--r--examples/lotka_volterra/metadata.toml63
2 files changed, 122 insertions, 0 deletions
diff --git a/examples/classic_gravitation/metadata.toml b/examples/classic_gravitation/metadata.toml
new file mode 100644
index 0000000..953dad8
--- /dev/null
+++ b/examples/classic_gravitation/metadata.toml
@@ -0,0 +1,59 @@
+
+[model]
+name-en = "Classic Gravitation"
+descrption-en = "Newtonian"
+sexprs = ['''
+ (=
+ F
+ (/ (* G m1 m2)
+ (square r 2)))
+ ''']
+
+[variables]
+
+ [variables.G]
+ type = "constant"
+ name-en = "Gravitational Constant"
+ value_si = 6.674e-11
+
+ [variables.F]
+ type = 'dependent'
+ name-en = "force"
+ units_si = "unit"
+
+ [variables.r]
+ type = 'independent'
+ name-en = "distance"
+ units_si = "meter"
+
+ [variables.m1]
+ type = 'independent'
+ latex = 'm_1'
+ name = "mass #1"
+ units_si = "kilogram"
+
+ [variables.m2]
+ type = 'independent'
+ latex = 'm_2'
+ name = "mass #2"
+ units_si = "kilogram"
+
+[examples]
+
+ [examples.earth_surface]
+ r = 6.371e6 # radius of earth
+ m1 = 5.972e24 # mass of earth
+ m2 = 70 # mass of human
+
+ [examples.earth_moon]
+ r = 385000 # radius of earth
+ m1 = 5.972e24 # mass of earth
+ m2 = 7.348e22 # mass of moon
+
+
+[references]
+
+ [references.url]
+ "Mathworld" = "http://mathworld.wolfram.com/Lotka-VolterraEquations.html"
+ "Wikipedia" = "https://en.wikipedia.org/wiki/Lotka%E2%80%93Volterra_equations"
+
diff --git a/examples/lotka_volterra/metadata.toml b/examples/lotka_volterra/metadata.toml
new file mode 100644
index 0000000..7d2cf0d
--- /dev/null
+++ b/examples/lotka_volterra/metadata.toml
@@ -0,0 +1,63 @@
+
+[model]
+name-en = "Lotka–Volterra equations"
+descrption-en = "Predator-Prey Model"
+sexprs = ['''
+ (=
+ (partial-derivative x t)
+ (- (* alpha x)
+ (* beta x y)))
+ ''','''
+ (=
+ (partial-derivative y t)
+ (- (* delta x y)
+ (* gamma y)))
+ ''']
+
+[variables]
+
+ [variables.t]
+ type = 'time' # or "independent"?
+
+ [variables.x]
+ type = 'state'
+
+ [variables.y]
+ type = 'state'
+
+ [variables.alpha]
+ type = 'parameter'
+ latex = '\alpha'
+ unicode = 'α'
+
+ [variables.beta]
+ type = 'parameter'
+ latex = '\beta'
+ unicode = 'β'
+
+ [variables.delta]
+ type = 'parameter'
+ latex = '\delta'
+ unicode = 'δ'
+
+ [variables.gamma]
+ type = 'parameter'
+ latex = '\gamma'
+ unicode = 'γ'
+
+[examples]
+
+ [examples.mathworld]
+ x = 10
+ y = 5
+ alpha = 1.5
+ beta = 1
+ gamma = 1
+ t = [0, 20]
+
+[references]
+
+ [references.url]
+ "Mathworld" = "http://mathworld.wolfram.com/Lotka-VolterraEquations.html"
+ "Wikipedia" = "https://en.wikipedia.org/wiki/Lotka%E2%80%93Volterra_equations"
+