How to make DynamicSelect() work with a basic tank example?

51 Views Asked by At

I try to make animation work with use of Dynamic Select() in the annotation. The examples provided in Mechanics/Multibody/Examples/Elementary/DoublePendulum works fine for me using OM 1.21 and MSL 3.2.3.

Now I try my own code with just a pump that pumps liquid into to a tank of mine and I want the liquid level increase with the increase volume pumped into the tank.

enter image description here

The harvestTank5 icon is a rectangle with a rectangle inside with FillPattern.Solid. The annotation is as follows and I have entered the function DynamicSelect(), but here just repeated the first argument into the second. The simulation works.

enter image description here

If I now change the last argument in DynamicSelecdt to {40, V}, where V is a real variable that represent the dynamically changing liquid volume, then I after translation just get a big square icon where harvesttank5 is now. The simulation stil works, but I do not get any animation results.

I think I follow the example with MSL Fluid/Media with tanks very well but it does not work.

See https://www.claytex.com/blog/using-dynamicselect-in-icons/

0

There are 0 best solutions below