Thread Subject: Simscape setup notation for through variables

Subject: Simscape setup notation for through variables

From: John Kreuder

Date: 9 Jun, 2009 19:43:01

Message: 1 of 4

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?

Subject: Simscape setup notation for through variables

From: Arnaud Miege

Date: 10 Jun, 2009 08:12:24

Message: 2 of 4


"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

Subject: Simscape setup notation for through variables

From: Stefan Smolik

Date: 12 Aug, 2009 17:49:20

Message: 3 of 4

Hi,

I was wondering about a similar question that came up when I read the Simscape User's guide 3.0. On page 1-8 a regular force source block is described and specifies how to measure the through variable.

It states that the block's/the source's positive direction is from C (bottom right) to R (top). However the velocity as across variable is measured as V_c-V_r in the opposite direction. I got confused when I tried to transfer that definition to an ideal heat flow source. Because according to my perception it would mean that the relative temperature of the heat flow source is measured in the same direction. So this would mean T_thermal reference - T_heat flow source outlet = positive direction although in general this is negative.

What did I misunderstand in this context?

Subject: Simscape setup notation for through variables

From: Arnaud Miege

Date: 15 Sep, 2009 09:10:04

Message: 4 of 4

"Stefan Smolik" <ssmolik@gmx.de> wrote in message <h5uvb0$e7r$1@fred.mathworks.com>...
> Hi,
>
> I was wondering about a similar question that came up when I read the Simscape User's guide 3.0. On page 1-8 a regular force source block is described and specifies how to measure the through variable.
>
> It states that the block's/the source's positive direction is from C (bottom right) to R (top). However the velocity as across variable is measured as V_c-V_r in the opposite direction. I got confused when I tried to transfer that definition to an ideal heat flow source. Because according to my perception it would mean that the relative temperature of the heat flow source is measured in the same direction. So this would mean T_thermal reference - T_heat flow source outlet = positive direction although in general this is negative.
>
> What did I misunderstand in this context?

The through (force) and the across (velocity) variables in the example presented on page 1-8 are measured in the SAME, not in the opposite, direction: from C to R. This sign convention is maintained wherever possible in Simscape for one important reason: the sign of the power directly indicates whether the component dissipates or generates energy. The power is positive in the first case and negative in the latter.
     
The same sign convention is applied in a thermal heat source and temperature is measured as T_A – T_B. And as you correctly pointed out, the temperature difference is negative if temperature at node B is greater than that at node A. Even though temperature is not used in the block since product of the through and across variables in thermal circuits is not the power as it is in all other physical domains. You can see for yourself the polarity of all the block variables by opening the corresponding source file (*.ssc).

HTH,

Arnaud

Tags for this Thread

Everyone's Tags:

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Tag Activity for This Thread
Tag Applied By Date/Time
simscape Stefan Smolik 12 Aug, 2009 13:55:07
thermal Stefan Smolik 12 Aug, 2009 13:55:06
setup John Kreuder 9 Jun, 2009 15:44:04
through variables John Kreuder 9 Jun, 2009 15:44:04
simscape John Kreuder 9 Jun, 2009 15:44:04
rssFeed for this Thread

Contact us at files@mathworks.com