Opened 14 years ago

Last modified 14 years ago

#1537 closed defect (fixed)

pre during initialization

Reported by: Martin Sjölund Owned by: Martin Sjölund
Priority: high Milestone:
Component: Version:
Keywords: Cc: Martin Sjölund, Frenkel TUD, Willi Braun

Description

OMC fails to initialize the following. I guess during initilization, pre(x)=x? Or we simply need to save the pre()-values during each iteration of the initialization?

loadModel(Modelica);
simulate(Modelica.Thermal.FluidHeatFlow.Examples.OneMass);

Gives:

int initial_residual()
{
  int i = 0;
  state mem_state;
  
  mem_state = get_memory_state();
  localData->initialResiduals[i++] = ($PheatCapacitor$PT - $P$PRE$PheatCapacitor$PT);
  if (sim_verbose == LOG_RES_INIT) { printf(" Residual[%d] : heatCapacitor.T - pre(heatCapacitor.T) = %f\n",i,localData->initialResiduals[i-1]); }
  localData->initialResiduals[i++] = ($Ppipe$PT - $P$PRE$Ppipe$PT);
  if (sim_verbose == LOG_RES_INIT) { printf(" Residual[%d] : pipe.T - pre(pipe.T) = %f\n",i,localData->initialResiduals[i-1]); }
  restore_memory_state(mem_state);
  
  return 0;
}

And:

Error in initialization. Solver iterated 50 times without finding a solution
Error in initialization. System of initial equations are not consistent.
(Least Square function value is 184000)
residual[0] = 313.15
residual[1] = 293.15

Change History (1)

comment:1 by Willi Braun, 14 years ago

fixed in rev9119.

Note: See TracTickets for help on using tickets.