The original simulation was created due to request from [url=http://www.phy.ntnu.edu.tw/ntnujava/index.php?action=profile;u=42639]pavwell[/url]
I did check out your code. You said you want connect the output back to the input.
But I did not find such relation in your ejs model. I really do understand what you want in detail.
I can creat another one for you if you can provide me : at least a diagram with all dimension of the system
and all the related equations/ constrains.
There is no way that I can create a simulation without know detail information of the system to be simulated.