IDAError

Hi,

I have realized this model:
***************************************************************************************************
model Tank
ReadSignal tSensorLevel;
LiquidFlow qIn;
LiquidFlow qOut;
parameter Real a = 0.02;
Real xt(start = 0.0);
equation
der(xt) = (qIn.lflow - qOut.lflow);
qOut.lflow = a*xt;
tSensorLevel.val = xt;
end Tank;
connector ReadSignal
Real val;
end ReadSignal;
connector LiquidFlow
Real lflow;
end LiquidFlow;
model BaseController
parameter Real hMax = 8;
parameter Real hMin = 5.5;
ReadSignal cIn, cOut;
equation
cOut.val = if (cIn.val > hMax) then 0 elseif (cIn.val < hMin) then 1 else cOut.val;
end BaseController;
model LiquidSource
LiquidFlow qOut;
parameter Real b = 0.3;
equation
qOut.lflow = if time > 0 then b else 0;
end LiquidSource;
model Valve
LiquidFlow vIn, vOut;
ReadSignal vsIn;
Real yt(start = 0.0);
parameter Real d = 0.000005;
parameter Real T = 4;
equation
der(yt) = if ((vsIn.val > 1-d) and (vsIn.val < 1+d) and (yt < 1) and time > 0) then (1/T) elseif ((vsIn.val > 0-d) and (vsIn.val < 0+d) and (yt > 0) and time > 0) then -(1/T) else 0;
vOut.lflow = yt * vIn.lflow;
end Valve;
model Sensor
ReadSignal sIn, sOutStima;
parameter Real sErr = 1;
equation
sOutStima.val = sIn.val + sErr;
end Sensor;
model WaterTank
Sensor sensor(sErr = 0);
Valve valve(T = 4);
LiquidSource source(b = 0.3);
BaseController controller(hMax = 8, hMin = 5.5);
Tank tank(a = 0.02);
equation
connect(source.qOut, valve.vIn);
connect(valve.vOut, tank.qIn);
connect(tank.tSensorLevel, sensor.sIn);
connect(sensor.sOutStima, controller.cIn);
connect(controller.cOut, valve.vsIn);
end WaterTank;
***************************************************************************************************
when I use the model with OpenModelica it works well, but when I simulate it with JModelica the programme gives me this error:
***************************************************************************************************
IDAError: 'Convergence test failures occurred too many times during one internal time step or minimu step size was reached. At time 24.851205'
***************************************************************************************************
Could you give me some suggestions to solve my problem?

Thank you

Marco

London’s V&A Opens ‘Undressed’ Exhibit

All kind of Women' Clothing,Men's Clothing,Toys, Kids & Baby,Shoes,Bags,CellPhone Accessorie. Find what's your want from www.yolobaba.com!