Configuring physical blocks using target values
Target values are configured only for blocks physical modeling. |
The model has parameters that are set directly (for example, inductance and mass), and variables that change over time (for example, current and temperature). Combinations of variable values may be incorrect (for example, the spring is stretched, but there is no force), and others show the normal or transient state of the system.
To view all the target values of the model, use the window physical variables. |
For example, two blocks Capacitor (Advanced) They can work differently with the same parameters if one block has target values set and the other doesn’t (see Example):
Without target values |
With a target value |
It is important to note that the target values are not the initial conditions. These are benchmarks that help simplify the launch and configuration of the model. |
At the beginning of the simulation, Engee calculates the initial values of the variables to determine the starting point of the simulation. This process involves finding the initial values for all variables of the system. Target values allow you to influence this process by setting priorities and initial values for specific variables at the block level. This can be done in the Initial Targets section of the settings window corresponding blocks, for example:
Each target value consists of a variable value, a unit of measurement, and a priority. Here Current is the numerical value of the current through the capacitor. It is equal By default to `0', measured in amperes and has a priority of `None'.
Priorities of target values
The values set when initializing variables at the block level are not their actual values, but the target values at the start of the simulation. The solver can reach some of them and some of them can’t. The solver tries to find a solution that:
-
Fully meets all high priorities;
-
To bring the variables as close as possible to the target values, starting with the highest priorities.
Priorities determine how important it is for the solver to achieve specific target values when running the simulation:
-
High
(high priority) — the solver tries to accurately achieve the target values for variables with high priority. -
Low
(low priority) — after completing all high priority goals, the solver tries to get closer to the target values with low priority. The accuracy of their achievement depends on the fulfillment of high priorities.
If you set too many target values, the solver may not find an exact solution for all high priorities or may not be able to find a solution at all. |
Example
To demonstrate the operation of the target values, build two identical models from blocks:
Leave the block settings By default, but for the Capacitor block of one of the models, set the value of the Capacitor voltage parameter to `1'. For signal lines between the Inductor and Capacitor blocks, enable signal recording as shown in the picture:
In the settings window, select the following solver parameters as shown in the figure:
Run a simulation of the model . In the charts window
A simulation of two electrical circuits is presented, each of which is a resonant circuit with an inductance and a capacitor connected to a signal source .
Based on the graph it can be seen:
-
Capacitor-1.v — the blue curve shows damped voltage fluctuations on the first capacitor. This indicates that the initial conditions or parameters of the circuit are set in such a way that they caused resonance in the circuit. The capacitor has a target value Capacitor voltage =
1
, which led to the occurrence of damped voltage fluctuations. -
Capacitor.The v — orange line shows that the voltage on the second capacitor practically does not change, which may indicate the absence of initial fluctuations, since the parameter Capacitor voltage =
0
, which explains the absence of significant voltage fluctuations.
A comparison of the two models shows how target values can significantly influence the behavior of physical systems. The model with a given target value demonstrates decaying voltage fluctuations, while the second model remains at rest. This emphasizes the importance of correctly setting the target values to achieve the desired system behavior.