aboutsummaryrefslogtreecommitdiffstats
path: root/examples/classic_gravitation
diff options
context:
space:
mode:
authorbnewbold <bnewbold@robocracy.org>2016-09-16 20:45:22 -0700
committerbnewbold <bnewbold@robocracy.org>2016-09-16 20:45:22 -0700
commitfdebceb92fe819cdcfeb9c1288102f3b97ab3ff6 (patch)
treefde73c0ddf13becc2dc686c6703e34ad69785cef /examples/classic_gravitation
parent7b29df28d3fd18cf6118862ef0cc2a88c1e3c803 (diff)
downloadmodelthing-fdebceb92fe819cdcfeb9c1288102f3b97ab3ff6.tar.gz
modelthing-fdebceb92fe819cdcfeb9c1288102f3b97ab3ff6.zip
update format of initial examples
Diffstat (limited to 'examples/classic_gravitation')
-rw-r--r--examples/classic_gravitation/metadata.toml15
-rw-r--r--examples/classic_gravitation/model.modelica9
-rw-r--r--examples/classic_gravitation/page.md9
3 files changed, 19 insertions, 14 deletions
diff --git a/examples/classic_gravitation/metadata.toml b/examples/classic_gravitation/metadata.toml
index 953dad8..ffd6e59 100644
--- a/examples/classic_gravitation/metadata.toml
+++ b/examples/classic_gravitation/metadata.toml
@@ -1,13 +1,7 @@
[model]
-name-en = "Classic Gravitation"
+name = "Classic Gravitation"
descrption-en = "Newtonian"
-sexprs = ['''
- (=
- F
- (/ (* G m1 m2)
- (square r 2)))
- ''']
[variables]
@@ -50,10 +44,3 @@ sexprs = ['''
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/classic_gravitation/model.modelica b/examples/classic_gravitation/model.modelica
new file mode 100644
index 0000000..6504ecf
--- /dev/null
+++ b/examples/classic_gravitation/model.modelica
@@ -0,0 +1,9 @@
+model ClassicGravitation
+ parameter Real G=6.674e-11 "Gravitational Constant";
+ Real m1 "mass #1";
+ Real m2 "mass #2";
+ Real r "radius";
+ Real F "force";
+equation
+ F = (G * m1 * m2) / (r^2)
+end ClassicGravitation;
diff --git a/examples/classic_gravitation/page.md b/examples/classic_gravitation/page.md
new file mode 100644
index 0000000..15b6946
--- /dev/null
+++ b/examples/classic_gravitation/page.md
@@ -0,0 +1,9 @@
+
+This is a wikipage!
+
+All about gravity!
+
+## References
+
+* [Wikipedia](https://en.wikipedia.org/wiki/Gravity)
+