Search code examples
openmodelica

OMNotebook Error: Class dev not found in scope (looking for a function or record)


I have modified the van der Pol example from DrModelica with the following changes:

model FPStirling "Free Piston Stirling engine model"
  Real x(start = 1,fixed = true);
  Real v(start = 1,fixed = true);
  Real T(start = 1,fixed = true);
  equation
  der(x) = v;
  dev(v) = T/x-1;
  dev(T) = 1 - x;
end FPStirling;

It evaluates and returns: {FPStirling}

Then I run: simulate(FPStirling, startTime=0, stopTime=25 )

But I get the output:

record SimulationResult
    resultFile = "",
    messages = "Failed to build model: FPStirling"
end SimulationResult;
OMC-ERROR: 
"[7:3-7:17] Error: Class dev not found in scope FPStirling (looking for a function or record).
Error: Error occurred while flattening model FPStirling
"

Could it be a path problem?


Solution

  • Do you really have a function dev defined somewhere? Or maybe its a typo for der.

    Adeel.