Engineering calculations are not always simple formulas but can be complex simulations. Valispace handles this by allowing you to specify simulations that take Valis as inputs and outputs Valis as results. Simulations in Valispace use the GNU Octave framework which is largely compatible with Matlab and the syntax is very similar to Matlab scripts (.m files). To make a new simulation, click on the simulation tab in the top navigation bar and then right click on a project to create a new simulation.
Inputs and outputs¶
Any Valis that are defined in components or analyses can be inputs or outputs of a simulation. To add an input or output, specify a Vali (start by typing a dollar sign to choose from the dropdown) and the name that will be used in the simulation file.
In this example, the
$Wheels.friction_coefficient has the name
mu is used in the simulation script to refer to the value of
$Wheels.friction_coefficient (0.7 in this case).
A Vali can be used as an input to several simulations, but it cannot be used as both an input and an output to the same simulation. A Vali that is an output of a simulation can not be changed via the formula anymore. Valis that are used in simulations are marked in the component details with a tag, as shown below:
Read more about the syntax of the simulation files at GNU Octave.