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
  • » marius.koenig
  • » Profile

Posts

Posts

Jun-07-16 16:27:55
Using the standard Modelica.Fluid Library several errors occure

Dear Modelica Users and Developers,

I am using the Standard Modelica.Fluid library to model a simple heat transfer problem with storages. After several unsuccessfull trials to set up a simple model I now tried to modify the examples until I am able to use it for my purpose.

Unfortunately if I start modifing and adappting things I always run into errors I am not able to solve.

My model is based on Modelica.Fluid.Examples.HeatingSystem. My aim is to build a model with two tanks, two pipes with heat exchange and two pumps which cycle the fluid. The two pumpes shell be controlled to regulate the mass flow in the pipes to provide a constant temperature to the fluid which is then stored in the tanks for further use. From my point of view this task should be a simple one.

So first of all the question, if there are any good documentations to this Library (exept of the one which is officially, which I am already using). My error messeages I get vary widely.

If I introduce a PI controler to meassure the temperature and controll the mass flow in the pipe, I often get following error message:

Cannot reduce the DAE index and select states.
This is most likely due to non-differentiable functions.

Another message is concerning the use of modelicas homotrophy mode and a singular system:

Solving using global homotopy-method.
The following error was detected at time: 0
Error: Scalar system is always singular for pump.dp_pump = (homotopy(0.0, 0.0)-pump.W_single)/( -homotopy(1.25*pump.V_flow_single, 0.0)) = 0/-0
Error: Failed to start model.

Or I get somethin similar like this:

abs(y0d) < 1E-015 or abs(y1d) < 1E-015
The following error was detected at time: 0
regFun3(): Derivatives at data points do not allow co-monotone interpolation, as both are non-zero, of opposite sign and have an absolute value larger than machine eps (y0d = -0.000690531, y1d = 0.999503). Please correct arguments.
The stack of functions is:
Modelica.Fluid.Utilities.regFun3
massFlowRate_dp_staticHead_Unique16
massFlowRate_dp_staticHead_Unique16(pipe1.flowModel.dps_fg[3], pipe1.flowModel.rhos[3], pipe1.flowModel.rhos[4], pipe1.flowModel.mus[3], pipe1.flowModel.mus[4], 0.25, pipe1.dimensions[2], 0.0, pipe1.crossAreas[2], pipe1.roughnesses[2], 0.3333333333333333*pipe1.flowModel.dp_small, 4000)
Non-linear solver will attempt to handle this problem.

ERROR: Failed to solve non-linear system using Newton solver.
To get more information: Turn on Simulation/Setup/Debug/Nonlinear solver diagnostics/Details
Solution to systems of equations not found at time = 0
   Nonlinear system of equations number = 1
   Infinity-norm of residue = 20
   Iteration is not making good progress.
   Accumulated number of residue       calc.: 1332
   Accumulated number of symbolic Jacobian calc.: 210
   Last values of solution vector:
pipe1.state_b.T = 300
   Last values of residual vector:
{ 20 }

Error: could not solve simplified initialization for homotopy method.
Error: could not solve simplified initialization for homotopy method.
Error: Failed to start model.

Since I would still call me a beginner to Modelica, I have no Idea what to do for solving this error messages. Furthermore it is very hard to understand every model of the fluid library. Maybe somebody could comment some of the error messages or give some advices on how to get into the Modelica Fluid Lib.

I would appreciate every kind of help for this issue. If you would like to get the model file to run it directly I could provide it to you.

I would be delighted if you can support me solving my problems.

Many thanks,
Marius

Here you can see a rough scetch of one version I tried to model.
https://www.openmodelica.org/images/agorapro/attachments/5122/mini_Model.PNG

  • Index
  • » Users
  • » marius.koenig
  • » Profile
You are here: