A junction state change may activate algebraic constraints between state variables, leading to higher index DAE problems. An explicit forward Euler integration scheme cannot handle such problems. HYBRSIM solves this by distinguishing between the storage elements in integral and those in derivative causality. Each integration step applies the forward Euler to the independent integral causality state variables without taking the influence of the algebraic loops with the dependent derivative causality variables into account. It then applies conservation of state to find consistent values for both the independent and dependent variables. Presently, the execution of this step is computationally ineffecient. During iteration, a specific fraction of the difference in the stored energy value is added to the dependent state variables and propagated along the bond graph path to be taken out of the independent state variable storage components.
For the nonelastic collision in Fig. 5. If m_{1} = m_{2}, conservation of momentum and the v_{1}^{+} = v_{2}^{+} constraint on the a posteriori velocities determines that the velocity after collision of the combined mass should be half the velocity of m_{1} before collision. The first steps of the HYBRSIM iteration upon collision for m_{1} = m_{2} = 1 and initial velocities v_{1} = 1 and v_{2} = 0 is presented in Table 1. For the first iteration step, v_{1} = 1 and v_{2} = 0, and, therefore, stored momentum p_{1} = m_{1} v_{1} = 1 and p_{2} = m_{2} v_{2} = 0. If p_{1} is chosen as the independent state, then its corresponding velocity value is enforced on m_{2}, i.e., p_{2}^{+} = 1. This means a discontinuous change of momentum from 0 to 1 which is applied by taking a convergence factor into account. This factor prevents the iteration from oscillating between two values. The resulting change of momentum, is added to m_{2}, and, therefore, has to be taken out of m_{1}(momentum is conserved).
The new state
variables are compared and, because only a fraction was propagated,
there is still inconsistency, though less. Again, a fraction of
the difference is added to the dependent variable
and propagated to be taken out of the independent variable storage components.
For the nonelastic collision, at the next iteration p_{1} = 0.6which results in v_{1} = 0.6 being enforced on m_{2}. Now,
the new momentum would be
p_{2}^{+} = 0.6 but the present value
p_{2} = 0.4, and, again accounting
for the convergence factor,
0.4 (0.6 - 0.4) is added
to m_{2} and taken out of m_{1}.
This process continues until convergence occurs within a prespecified margin.
Note that the total amount of energy is conserved, since whatever
is taken out of the independent state variable storage elements
is put into the dependent variable storage elements.
Also, the discontinuous
change in velocity is not explicitly modeled in Fig. 5,
but derived from inherent physical principles.
iteration | p_{1} | p_{2}^{+} | p_{2} | |
0 | 1 | 1 | 0 | 0.4 |
1 | 0.6 | 0.6 | 0.4 | 0.08 |
2 | 0.52 | 0.52 | 0.48 | 0.016 |
3 | 0.504 | 0.504 | 0.496 | 0.0032 |
If state variables become directly dependent on sources, they may change discontinuously as well with explicit exchange of, e.g., momentum, with the environment (a bouncing ball). In case of combined dependency between storage elements and sources, conservation of state still applies, and HYBRSIM handles this correctly. To illustrate this interaction between storage and source dependency, consider the elastic collision in Fig. 8. Upon collision, the controlled 0-junction becomes active, and there is dependency between m_{1}, m_{2}, and the modulated Sf that models a restitution coefficient, , of 0.6. In this system, conservation of momentum still applies, but instead of v_{1}^{+} = v_{2}^{+} the velocity constraint is . Simulation results in Fig. 9 show the HYBRSIM output.