Help - Search - Members - Calendar
Full Version: Using sensor elements from Modelica_fluid
Modelica Forum > Modelica > Modelica
footwork
Hi,
I'm using Modelica_fluid quite extensively to model flows of mixed gases and thermal interaction with lumps of metal, ie heat exchanger networks. I've been tidying these models up from the development stages to make them more usable by explicityly adding sensors from Modelica_Fluid.Components.Sensors.***** rather than justing digging in components for variables of interest. In doing only this, I can affect whether a model simulates or not, sometimes it even causes the model not to be able to initialise. Remove the sensor and the model works again. It usually the medium model that breaks along the lines of gas temperature below 200K of specific enthalpy -3e8 or some other peculiar behaviour. Has anyone seen anything similar or know of any rules about when and when not to add sensors.

Regards

Mark
Carsten
Hi Mark,

first you have to take care that the sensors are connected in the right way (MassFlowRate Sensor in series, RelPressure Sensor in parallel…).

second, if you are building components, I prefer assign outputs in the model directly to the variables (e.g. PressureOutput = medium.p). Otherwise the equation numbers of the model growth distinctly due to the additional medium models. But this has only influence to the model before translation. The only thing what should increase in the translated model is the number of alias variables. If the number of state variables or the size of linear and nonlinear systems of equations increases a modelling error might be the reason for it.

Regards
Carsten
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2012 Invision Power Services, Inc.