2
votes

I'm new to Dymola and I have to implement a chemical reactor in Dymola. I modeled the behaviour of the reactor in 3 different models, because the reactor behaves different depending on a variable x. So that model a is valid for x<=0.1, model 2 is valid for 0.75>x<0.1 and model 3 is valid for x>0.75. Is there any way to run only one of the three models in each simulation step? I have looked into the "if" statement to put all 3 model equations in one model, but that didn't work. Is there anyone out there who can help me? Any hint would be great! Thank you!

1

1 Answers

4
votes

Modelica does not handle variable structure problems. What this means is that the set of variables cannot change during the simulation.

Most people who are trying to solve such systems typically find a way to keep all variables present but somehow "deactivate" different sets by switching equations (which can, to some extent, change during the simulation).

If you give a bit more information about the types of models you need to switch between, I could try to give you some hints about how to "deactivate" them from one phase to another.