I have a question regarding how to handle the mass fractions of a multicomponent medium that I'm working on. To be more specific, I'm wondering whether to choose a reduced-state model (as in reducedX = true;) or a full-state model (as in reducedX = false;).
The model is currently reduced-state, and it seems to be working as it should. To me, it seemed like a good idea to utilize the fact that sum(X) = 1. However, I found this in the documentation of the Modelica.Media-package
"(...) Although this kind of model (the full-state model) is heavier, as it provides one extra state variable, it can be less prone to numerical and/or symbolic problems, which can be caused by that constraint (in the reduced-state model)."
Does anyone happen to know whether these "numerical and/or symbolic problems" are something to worry about, or if there are any other reasons for not using a reduced-state model? Or any other upsides for using a full-state model, for that matter?
Any help or thoughts on the matter will be greatly appreciated!
preguntado el 31 de julio de 12 a las 11:07
Which of the two options is better depends on the circumstances. The full-state model has more states than are strictly necessary, which will e.g. give your trouble when you want to linearize the model and do something with the linearized version. That can also lead to troubles with the symbolic routines (index reduction, but this is often not needed for multi-component media and flows). The reduced state model can lead to a numerically bad situation, if the "last" component mass fraction tends to zero. It will be computed from 1 - Sum(x[1:n-1] or similar, meaning you subtract two numbers of almost the same size, which leads to cancellation of valid digits and reduced accuracy. No one-way answer, I hope this helps.