|
"John Kreuder" <gedoboarder@hotmail.com> wrote in message
news:h0me05$s7v$1@fred.mathworks.com...
>I am a little confused about the notation used when creating simscape
>component files. Take for example the statement through(q, A.q, B.q); in
>the function setup section of the component file where A and B are nodes on
>the component declared in the nodes section and associated with a
>particular domain. The user documentation says that this statement is
>equivalent to saying "q is positive if it 'flows' from A to B".
>
> So far I understand, but what about when you have a component that acts
> like a source or a sink (such as an electrical ground). The function setup
> line reads through(i, V.i, []); where V is the node. What does this mean
> in words? And what would be the implication if instead it read through(i,
> [], V.i);?
>
> Finally, say I want to use one of the aforementioned through variables in
> the equations section of a component file. If q signifies volumetric flow
> rate of a fluid and it remains constant across the component (q in = q
> out) then are q, A.q and B.q all equal values and are they all
> interchangeable throughout my equations?
Hi,
through(i, V.i, []); means that i is positive if it flows from V to ground
through(i, [], V.i); means that i is positive if it flows from ground to V
For your second question, yes I believe that's the case. Check out the
source code of the hydraulic flow rate sensor block in R2009a.
HTH,
Arnaud
|