sandbox/FancyPants

edit - markdown - original modelica
display: latex

Demo of modelthing syntax features

$$\begin{array}{rcl} \alpha & = & \Delta^{ P_{ 2 } } \\ \frac{ d \Gamma }{ dt } & = & \frac{ \left(6 + Q_{ \lambda }\right) }{ \beta } \\ \frac{ d }{ dt } \beta^{ 4 } & = & 99 \\ 5 & = & \log_{10}{ \beta } \\ Q_{ \lambda } & = & \sqrt{ \frac{ \Delta \cdot \alpha }{ 3453 } } \\ \end{array}$$
Variable Type Description Value (default) Datatype
\(\alpha\) free complexity factor \(\) Real
\(\beta\) free variable of state \(\) Real
\(\Delta\) input raven count \(\) Integer
\(\Gamma\) output year of birth \(1997\) Integer
\(P_{ 2 }\) parameter dimensional constant \(1.234\) Real
\(Q_{ \lambda }\) parameter widget ratio \(1.234\) Real

This model is a stress-test for representation code.

It is editable!


Modelica Code

model FancyPants
  "Demo of modelthing syntax features"
  Real alpha "complexity factor";
  Real beta "variable of state";
  input Integer Delta "raven count";
  output Integer Gamma=1997  "year of birth";
  parameter Real P_2=1.234e0  "dimensional constant";
  parameter Real Q_lambda=1.234e0  "widget ratio";
equation
  alpha = (Delta ^ P_2);
  der(Gamma) = ((6 + Q_lambda) / beta);
  der((beta ^ 4)) = 99;
  5 = log10(beta);
  Q_lambda = sqrt(((Delta * alpha) / 3453));
end FancyPants;



examples - sandbox - readme - source code