Thread Subject: Simscape - domains with multiple across variables

Subject: Simscape - domains with multiple across variables

From: John Kreuder

Date: 9 Jun, 2009 18:59:02

Message: 1 of 9

I am using Simscape to create a thermal system models. For proof of concept, I am trying to model a Brayton Cycle (compressor, combustor and turbine in series, where the compressor is driven by the work output of the turbine). Since both pressure and temperature of the air entering the turbine are needed to predict the work output, I am using my own domain adapted from the Simscape hydraulic foundation library that includes both pressure and temperature as across variables, while the only through variable is mass flow rate. All of the Demos and examples from Mathworks consist of domains that contain only one through and one across variable. How, if at all, does my domain differ and what sort of workarounds do you recommend?

Subject: Simscape - domains with multiple across variables

From: Arnaud Miege

Date: 9 Jun, 2009 19:57:02

Message: 2 of 9

"John Kreuder" <gedoboarder@hotmail.com> wrote in message <h0mbdm$5sv$1@fred.mathworks.com>...
> I am using Simscape to create a thermal system models. For proof of concept, I am trying to model a Brayton Cycle (compressor, combustor and turbine in series, where the compressor is driven by the work output of the turbine). Since both pressure and temperature of the air entering the turbine are needed to predict the work output, I am using my own domain adapted from the Simscape hydraulic foundation library that includes both pressure and temperature as across variables, while the only through variable is mass flow rate. All of the Demos and examples from Mathworks consist of domains that contain only one through and one across variable. How, if at all, does my domain differ and what sort of workarounds do you recommend?

Hi,

I would suggest adding heat flow as a through variable. The tricky part is defining temperature-dependent domain-wide parameters, such as fluid properties. If you manage to get it working, I would encourage you to post it to the FEX for sharing with the rest of the community. Good luck!

Arnaud

Subject: Simscape - domains with multiple across variables

From: Robert

Date: 10 Jun, 2009 02:34:02

Message: 3 of 9

"Arnaud Miege" <arnaud.miege@nospam.mathworks.co.uk> wrote in message <h0meqe$m2b$1@fred.mathworks.com>...
> "John Kreuder" <gedoboarder@hotmail.com> wrote in message <h0mbdm$5sv$1@fred.mathworks.com>...
> > I am using Simscape to create a thermal system models. For proof of concept, I am trying to model a Brayton Cycle (compressor, combustor and turbine in series, where the compressor is driven by the work output of the turbine). Since both pressure and temperature of the air entering the turbine are needed to predict the work output, I am using my own domain adapted from the Simscape hydraulic foundation library that includes both pressure and temperature as across variables, while the only through variable is mass flow rate. All of the Demos and examples from Mathworks consist of domains that contain only one through and one across variable. How, if at all, does my domain differ and what sort of workarounds do you recommend?
>
> Hi,
>
> I would suggest adding heat flow as a through variable. The tricky part is defining temperature-dependent domain-wide parameters, such as fluid properties. If you manage to get it working, I would encourage you to post it to the FEX for sharing with the rest of the community. Good luck!
>
> Arnaud

Arnaud,
But can one still have two across variables with one variable? What problems might arise if such a domain definition is used?

Won't adding heat flow as a through variable actually cause problems since the heat flow of a component such as a heat exchanger, combustor, turbine, etc. will actually change "across" the component?
Rob

Subject: Simscape - domains with multiple across variables

From: Robert

Date: 10 Jun, 2009 02:35:02

Message: 4 of 9

"Arnaud Miege" <arnaud.miege@nospam.mathworks.co.uk> wrote in message <h0meqe$m2b$1@fred.mathworks.com>...
> "John Kreuder" <gedoboarder@hotmail.com> wrote in message <h0mbdm$5sv$1@fred.mathworks.com>...
> > I am using Simscape to create a thermal system models. For proof of concept, I am trying to model a Brayton Cycle (compressor, combustor and turbine in series, where the compressor is driven by the work output of the turbine). Since both pressure and temperature of the air entering the turbine are needed to predict the work output, I am using my own domain adapted from the Simscape hydraulic foundation library that includes both pressure and temperature as across variables, while the only through variable is mass flow rate. All of the Demos and examples from Mathworks consist of domains that contain only one through and one across variable. How, if at all, does my domain differ and what sort of workarounds do you recommend?
>
> Hi,
>
> I would suggest adding heat flow as a through variable. The tricky part is defining temperature-dependent domain-wide parameters, such as fluid properties. If you manage to get it working, I would encourage you to post it to the FEX for sharing with the rest of the community. Good luck!
>
> Arnaud

Arnaud,
But can one still have two across variables with one variable? What problems might arise if such a domain definition is used?

Won't adding heat flow as a through variable actually cause problems since the heat flow of a component such as a heat exchanger, combustor, turbine, etc. will actually change "across" the component?
Rob

Subject: Simscape - domains with multiple across variables

From: li min

Date: 10 Jun, 2009 04:53:01

Message: 5 of 9

Hi,
It seems that the our questions have some common ground.
my question is:
http://www.mathworks.com/matlabcentral/newsreader/view_thread/248136#641479

Subject: Simscape - domains with multiple across variables

From: Arnaud Miege

Date: 10 Jun, 2009 07:59:50

Message: 6 of 9


"Robert " <rjseme@rit.edu> wrote in message
news:h0n62q$dme$1@fred.mathworks.com...
> "Arnaud Miege" <arnaud.miege@nospam.mathworks.co.uk> wrote in message
> <h0meqe$m2b$1@fred.mathworks.com>...
>> "John Kreuder" <gedoboarder@hotmail.com> wrote in message
>> <h0mbdm$5sv$1@fred.mathworks.com>...
>> > I am using Simscape to create a thermal system models. For proof of
>> > concept, I am trying to model a Brayton Cycle (compressor, combustor
>> > and turbine in series, where the compressor is driven by the work
>> > output of the turbine). Since both pressure and temperature of the air
>> > entering the turbine are needed to predict the work output, I am using
>> > my own domain adapted from the Simscape hydraulic foundation library
>> > that includes both pressure and temperature as across variables, while
>> > the only through variable is mass flow rate. All of the Demos and
>> > examples from Mathworks consist of domains that contain only one
>> > through and one across variable. How, if at all, does my domain differ
>> > and what sort of workarounds do you recommend?
>>
>> Hi,
>>
>> I would suggest adding heat flow as a through variable. The tricky part
>> is defining temperature-dependent domain-wide parameters, such as fluid
>> properties. If you manage to get it working, I would encourage you to
>> post it to the FEX for sharing with the rest of the community. Good luck!
>>
>> Arnaud
>
> Arnaud,
> But can one still have two across variables with one variable? What
> problems might arise if such a domain definition is used?
>
> Won't adding heat flow as a through variable actually cause problems since
> the heat flow of a component such as a heat exchanger, combustor, turbine,
> etc. will actually change "across" the component?
> Rob

Hi Rob,

You can have two across variable and one through variable, there are no
rules as to the number of across and through variables in a domain, but it's
generally good practice to have a pair of across and through variables, in
your case pressure/mass flow rate and temperature/heat flow. The effect of
heat flow (in J/s) on temperature is similar to that of mass flow rate on
pressure. The through variable is what flows through a port (and therefore
you measure it in series) whereas the across variable is something that you
measure relative to a reference, i.e. in parallel. Think of voltage and
current in the electrical domain. Additionally if you are using the latest
versuion (R2009a), the source code for most of the blocks in the Simscape
foundation library is provided.

HTH,

Arnaud

Subject: Simscape - domains with multiple across variables

From: Robert

Date: 11 Jun, 2009 16:25:04

Message: 7 of 9

Arnaud,

I keep seeing that it is "best practice" to have a pair of one through and one across variable, but why? What is the technical reason for having pairs versus something else? Will some problems arise under certain situations that I should be aware of?

Thanks,
Rob

Subject: Simscape - domains with multiple across variables

From: Robert

Date: 11 Jun, 2009 16:27:04

Message: 8 of 9

Arnaud,

I keep seeing that it is "best practice" to have a pair of one through and one across variable, but why? What is the technical reason for having pairs versus something else? Will some problems arise under certain situations that I should be aware of?

Thanks,
Rob

Subject: Simscape - domains with multiple across variables

From: Arnaud Miege

Date: 15 Jun, 2009 11:58:01

Message: 9 of 9

"Robert " <rjseme@rit.edu> wrote in message <h0rb50$79k$1@fred.mathworks.com>...
> Arnaud,
>
> I keep seeing that it is "best practice" to have a pair of one through and one across variable, but why? What is the technical reason for having pairs versus something else? Will some problems arise under certain situations that I should be aware of?
>
> Thanks,
> Rob

Hi Rob,

This is only a suggestion and reflects only my opinion, but if you think of the energy/power that is being exchanged in a physical network, it is generally the product of an across and a through variable, e.g:
- electrical power = voltage x current
- mechanical power = force x velocity or torque x rotational velocity
- hydraulic power = pressure x flow rate
- thermal power = heat flow x temperature

That's why I suggested having a pair of across and through variables, it just makes sense from a physical point of view

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 li min 16 Jun, 2009 00:48:10
through variables Arnaud Miege 15 Jun, 2009 07:59:07
across variables Arnaud Miege 15 Jun, 2009 07:59:07
simscape Arnaud Miege 15 Jun, 2009 07:59:07
physical modelling Arnaud Miege 15 Jun, 2009 07:59:07
hydrothermal John Kreuder 9 Jun, 2009 15:04:03
thermohydraulic John Kreuder 9 Jun, 2009 15:04:03
simscape John Kreuder 9 Jun, 2009 15:04:02
rssFeed for this Thread

Contact us at files@mathworks.com