Particle Models

A particle model track is a mathematical model of a point mass. The step positions of the particle are determined by the parameters of the model rather than being marked with the mouse.
There are two types of models: analytic and dynamic. An analytic model defines position functions of time, while a dynamic model defines force functions and initial conditions for numerical ODE solvers.
A particle model has a settable mass and generates motion data and vectors just like any other point mass. See Point Mass for additional information.
Building Models
Particle model properties are displayed and edited using the Model Builder tool. To display the builder, choose Model Builder... from the model's track menu.

Fig. 1 Model Builder with a dynamic model of a simple projectile
Functions and parameters are defined by entering expressions that are "parsed" (interpreted) by the OSP parser. The values of parameters are constants while those of functions depend on input variables such as x, y, t, etc. The parser recognizes the following elements:
| abs(x) | acos(x) | acosh(x) | asin(x) | asinh(x) | atan(x) | atanh(x) | atan2(x,y) | ceil(x) | cos(x) |
| cosh(x) | exp(x) | frac(x) | floor(x) | int(x) | log(x) | max(x,y) | min(x,y) | mod(x,y) | random(x) |
| round(x) | sign(x) | sin(x) | sinh(x) | sqr(x) | sqrt(x) | step(x) | tan(x) | tanh(x) |
Table 1 Mathematical functions recognized by the OSP Parser
Model Builder displays model functions along with associated parameters and initial conditions in tables with Name and Expression columns as shown in Fig. 1. The name of the fit is shown in bold font in the function table.
To edit a name or expression, double-click its table cell (gray cells cannot be edited). Names must be unique and can contain no spaces or mathematical symbols. Expressions must be valid mathematical expressions parsable by the OSP parser.
To create a new parameter or function, click the appropriate Add button.
When editing an expression, the names of all available variables are listed in blue in the status bar as shown in Fig. 2. Variables for parameter expressions include only other parameters, while variables for function expressions include independent variables (e.g., x, y, t, etc), parameters and support function names. In the example shown, the "fy" function may depend on any or all of the variables x, vx, y, vy, t, m, g. The entry "-m*g" is thus a valid expression.

Fig. 2 Editing an expression
If an invalid expression is entered into a cell the cell turns red and an error message is displayed in the status bar. In Figure 3, the expression "-mg" is invalid since the multiplication operator (*) has been omitted. Circular references also result in an error condition.

Fig. 3 Invalid expression
Model Builder includes several features designed to help students build, modify and compare models quickly:

Fig. 4 Using a support function to simplify expressions