Model: Equation

Mandatory element

Once you have defined base names etc. that appear in your equations, you can start to write the actual equations. Basic MOSAICmodeling models consist of equations with a single notation. These are then joined together to form an equation system.


This tab is used to actually write down the individual equations that you need in your model. In MOSAICmodeling, you formulate your equations in a LaTeX-based syntax. This means that you can actually see the mathematical expressions as an easily readable output during the formulation. The editor to create or edit an equation inside MOSAICmodeling is shown in Figure 1. This editor has a toolbox, which can be opened via the “Open Toolbox” button and can assist you in formulating equations.

Figure 1: The equation editor inside MOSAICmodeling lets you formulate your equation and directly gives you a readable output of the current equation. Note that this editor might look differently depending on your operating system.
Mathematical operatorCommand in MOSAICmodelingRendered form
Multiplicationa \cdot ba \cdot b
Divisiona / b a / b
Fraction\frac{a}{b} \frac{a}{b}
Power function(a)^{b} (a)^{b}
n-th root(a)^{1/n} (a)^{1/n}
Exponential function\exp(a) \exp(a)
Natural logarithm\ln(a) \ln(a)
Sine\sin(a) \sin(a)
Cosine\cos(a) \cos(a)
Summation\sum_{i=1}^{Ni}{x_{i}} \sum_{i=1}^{Ni} x_{i}
Derivative\diff{x}{t} \frac{\mathrm{d} x}{\mathrm{d} t}
Partial derivative\pdiff{a}{b} \frac{\partial a}{\partial b}
Second partial derivative\p2diff{a}{b}{c} \frac{\partial^2 a}{\partial b \partial c}
Table 1: Overview of commands available in the toolbox

Explanation of the editor

Table 2 explains the entries of the equation editor.

FileFilename of your equation once you have saved or loaded it
ParametersFilename of your loaded parameter list
DescriptionDescription of your equation, e.g., mass balance. A description is always necessary
KeywordsOptional keywords for your equation
MosaicTeXWindow for writing the equation
ToolboxOpens window that contains helpful commands for quickly writing model equations
Table 2: Elements of the equation editor.


The image below illustrates the workflow to set up an equation.

Figure 2: Workflow to set up an equation.