aboutsummaryrefslogtreecommitdiffstats
path: root/examples/newtonian_gravity/model.modelica
diff options
context:
space:
mode:
Diffstat (limited to 'examples/newtonian_gravity/model.modelica')
-rw-r--r--examples/newtonian_gravity/model.modelica10
1 files changed, 10 insertions, 0 deletions
diff --git a/examples/newtonian_gravity/model.modelica b/examples/newtonian_gravity/model.modelica
new file mode 100644
index 0000000..6ad0f90
--- /dev/null
+++ b/examples/newtonian_gravity/model.modelica
@@ -0,0 +1,10 @@
+model NewtonianGravitation
+ "Simple/classical Inverse-square law force"
+ parameter Real G=6.674e-11 "Gravitational Constant";
+ Real m_1(unit="kilogram") "mass #1";
+ Real m_2(unit="kilogram") "mass #2";
+ Real r(unit="meter") "radius";
+ Real F "force";
+equation
+ F = (G * m_1 * m_2) / (r^2);
+end NewtonianGravitation;