- Index
- » Programming
- » Modelica Language
- » Modelling a winch (tether, that is...
Modelling a winch (tether, that is reeling out; changing mass)
Modelling a winch (tether, that is reeling out; changing mass)
Hello,
we need to model an electric winch. A tether (cable) is reeled out. We want to model the tether
as a number of segments, each of them consists of a point-mass and a spring-damper.
Aerodynamic drag shall also be attached.
We have a Java model, that works like this: During reel-out a new segment is added,
each time when the last segment reaches the maximal segment length. The new segment
has an initial length of zero, which is continuously increased during reel-out, until another
new segment is needed. Now my question:
- Is it possible in modelica, to add components dynamically during runtime?
We want to add new point-masses and new spring-damper elements, and also
remove them, if they are not needed, because the tether is getting shorter by
reeling in.
- Is it possible in modelica, to change the mass and the initial length of a spring-damper
at runtime? Is there a big simulation time penalty, if we do this?
Best regards:
Uwe Fechner
www.kitepower.eu
Re: Modelling a winch (tether, that is reeling out; changing mass)
Hi,
The Modelica language has no way to add components (= variables and equations) at runtime.
You can however define prior to the start of simulation for example 1000 tether elements, and change their state variables during runtime from being fixed at zero to whatever you need in your simulation.
You need to define events in your simulation that are triggered whenever a new tether element is supposed to become "active" or "inactive". Upon triggering the event, the states of the activated element would change from being fixed states to being governed by a dynamic equation (i.e. become part of the DAE system).
The Dymola simulator can handle this and I assume that OpenModelica can do so too. However events will slow down the simulation no matter how efficiently you have programmed them, so whether this is an option for you is something you'd have to find out for yourself.
- Index
- » Programming
- » Modelica Language
- » Modelling a winch (tether, that is...