Opened 13 years ago

Last modified 12 years ago

#1721 closed defect (fixed)

error division by zero

Reported by: mohamed Owned by: mohamed
Priority: blocker Milestone: 1.9.0
Component: Backend Version:
Keywords: Cc: mohamed, Frenkel, TUD, Lennart Ochel, Willi Braun

Description

Dear all,

I have a problem with a model generating
an error division by zero.

Using these scripts wihin OMShell:

loadFile("C:/Users/sridim/Desktop/gaspropreties.mo")
true

simulate(gaspropreties.intake1)

will generate the following error:
record SimulationResult

resultFile = "",
simulationOptions = "startTime = 0.0, stopTime = 1.0, numberOfIntervals = 500, tolerance = 1e-006, method = 'dassl', fileNamePrefix = 'gaspropreties.intake1', storeInTemp = false, noClean = false, options = , outputFormat = 'mat', variableFilter = '.*', measureTime = false, cflags = ",
messages = "Simulation execution failed for model: gaspropreties.intake1

warning | division by zero in partial equation: 1.0 / pco1 because pco1 == 0

| [line] 263 | [file] gaspropreties.intake1.c

throw | [line] 43 | [file] util/division.c

| division by zero

",

timeFrontend = 0.0,
timeBackend = 0.0,
timeSimCode = 0.0,
timeTemplates = 0.0,
timeCompile = 0.0,
timeSimulation = 0.0,
timeTotal = 0.0

end SimulationResult;

Attached,please find the full model(file.mo).

Best regards,
Mohamed,

Attachments (1)

gaspropreties.mo (369 bytes ) - added by mohamed 13 years ago.

Download all attachments as: .zip

Change History (4)

by mohamed, 13 years ago

Attachment: gaspropreties.mo added

comment:1 by Jens Frenkel, 13 years ago

this is a problem with initialisation and start values.

The initialisation method called the system without set init()=true before initialisation. Either change the startvalue of pco1 to 14... or call initialisation with init()=true.

comment:2 by Willi Braun, 13 years ago

Yes, we have some issues with the initial operator. Lennart and me start to think about a better handling while the initialization.
As Jens mention a workaround is to provide a start-value != 0 to aco1.

comment:3 by Martin Sjölund, 12 years ago

Cc: Frenkel TUD added; Jens Frenkel removed
Component: Backend
Milestone: 1.9.0
Note: See TracTickets for help on using tickets.