diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/classic_gravitation/metadata.toml | 15 | ||||
-rw-r--r-- | examples/classic_gravitation/model.modelica | 9 | ||||
-rw-r--r-- | examples/classic_gravitation/page.md | 9 | ||||
-rw-r--r-- | examples/lotka_volterra/metadata.toml | 17 | ||||
-rw-r--r-- | examples/lotka_volterra/model.modelica | 11 | ||||
-rw-r--r-- | examples/lotka_volterra/page.md | 8 |
6 files changed, 38 insertions, 31 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) + diff --git a/examples/lotka_volterra/metadata.toml b/examples/lotka_volterra/metadata.toml index 7d2cf0d..2e98841 100644 --- a/examples/lotka_volterra/metadata.toml +++ b/examples/lotka_volterra/metadata.toml @@ -2,17 +2,6 @@ [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] @@ -55,9 +44,3 @@ sexprs = [''' 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" - diff --git a/examples/lotka_volterra/model.modelica b/examples/lotka_volterra/model.modelica new file mode 100644 index 0000000..6f011a2 --- /dev/null +++ b/examples/lotka_volterra/model.modelica @@ -0,0 +1,11 @@ +model LotkaVolterra + parameter Real alpha; + parameter Real beta; + parameter Real delta; + parameter Real gamma; + Real x; + Real y; +equation + der(x) = (alpha * x) - (beta * x * y) + der(y) = (delta * x * y) - (gamma * y) +end LotkaVolterra; diff --git a/examples/lotka_volterra/page.md b/examples/lotka_volterra/page.md new file mode 100644 index 0000000..8b85919 --- /dev/null +++ b/examples/lotka_volterra/page.md @@ -0,0 +1,8 @@ + +This is a wikipage! + +## References + +* [Mathworld](http://mathworld.wolfram.com/Lotka-VolterraEquations.html) +* [Wikipedia](https://en.wikipedia.org/wiki/Lotka%E2%80%93Volterra_equations) + |