|
"Ragoth Sundararajan" <ragoths@emmeskay.com> wrote in message <h29mpp$k80$1@fred.mathworks.com>...
> Hi,
>
> Although the Simscape documentation states that multiple through and across variables definitions can come in a single variables block (the implication is that these are contained in a single file), this does not seem to work. I had a model where components exchange both mass and energy, so I had Pressure and Temperature as across variables and mass flow rate and energy flow rate as through variables, all defined in a new domain file. The model had a source, sink and valve between them and all the mass and energy related definitions were in the components. This model when I attempted simulation, generated the error that some dependency was causing initial conditions related error. If I created two domain files, one for Pr and mass flow rate and another for Temp and energy flow rate and had two pairs of nodes or ports in the components to transport mass and energy separately, then the
> model simulates correctly.
>
> So, my questions are:
> 1) Do we need to define multiple sets of through and across variables in separate files?
> 2) Is it possible to have multiple quantities (mass and energy) flowing through the same node of a component? What if I had two masses (say two immiscible liquids) flowing between components - do I need two nodes?
>
> Any comments/clarifications would be appreciated. Thanks in advance.
>
> Ragoth
Hi,
It is definitely possible to have more than one across/through variable per node, they don't need to be defined in separate domains (files). I would suggest you contact technical support if you are having issues with this:
http://www.mathworks.com/support/contact_us/index.html
There may be something in the way the model is constructed that generates the error, it is difficult to say without seeing the actual model and component/domain definitions.
With regards to your second question, if I understand correctly, you want to model two different fluids flowing through a component, is that correct? Then yes, I think you need one port per fluid (although they can reference the same physical domain). That assumes the fluid flows are seperate and there are no mixing effects. I am not quite sure how you would model the mixing of two fluids in one physical port.
HTH,
Arnaud
|