Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register
  • Index
  • » Users
  • » PaulTherm
  • » Profile

Posts

Posts

May-06-16 13:36:02
Having problems modeling two-phase boiling in a rigid container

Hello All,

First of all, does any of you have any experience with Two-Phase Modeling in a rigid container (closed-system)? This is what I am working on and I am having some problems with running the model. After writing the energy and the mass balance (between phases), I get something called "Circular equalities detected".

The code looks very simple:

parameter Modelica.SIunits.Mass m_tot=5;
parameter Modelica.SIunits.SpecificHeatCapacity Cp=4.92;
parameter Modelica.SIunits.Power P_in=20;
Modelica.SIunits.Temperature T(start=273.15);
Modelica.SIunits.Mass m_g;
Modelica.SIunits.Mass m_l(start = m_tot);
Modelica.SIunits.Volume V_l(start=V_tot);
Modelica.SIunits.Volume V_g;
Modelica.SIunits.SpecificVolume v_l;
Modelica.SIunits.SpecificVolume v_g;

equation

v_l=v(T);   //Variable Specific Volume liquid

v_g=v(T);  //Variable Specific Volume gas

     Above, I have v(T), just for reference. They are some functions that depend on temperature. For testing, one can simply use

     v_l=time+1;

     v_g=time+2;  //Variable Specific Volume gas

m_tot*Cp*der(T)=P_in;

m_tot=m_l+m_g;

der(m_l)=-der(m_g);

m_l= V_l/v_l;

m_g= V_g/v_g;

I would appreciate any help!

Thank you in advance.

  • Index
  • » Users
  • » PaulTherm
  • » Profile
You are here: