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

How do we view the initial values?

How do we view the initial values?

I am working with a fluid system model and having trouble with initialization.  I suspect that the initial values assigned to the variables are not close enough to a valid solution for the simulation to be able to start.

Is there a way to look at the initial values that are set when the simulation begins for the pressure and flow variables?

If so, I suspect that I could look at them and figure out what initial equations I need to add to aid the initialization process.

Is there a good way to debug these problems?  I have looked for one but have not found anything helpful.  I would appreciate guidance on how to work through these problems.

Here is the output I see when trying to run the simulation:

Code:

  1 /tmp/OpenModelica_michael/OMEdit/CDepWithDeposition.CDepSystemV2/CDepSystemV2 -port=38453 -logFormat=xmltcp -override=startTime=0,stopTime=60000,stepSize=100,tolerance=1e-06,solver=dass    l,outputFormat=mat,variableFilter=.* -r=/tmp/OpenModelica_michael/OMEdit/CDepWithDeposition.CDepSystemV2/CDepSystemV2_res.mat -iim=symbolic -cpu -w -lv=LOG_INIT,LOG_STATS -inputPath=/tm    p/OpenModelica_michael/OMEdit/CDepWithDeposition.CDepSystemV2 -outputPath=/tmp/OpenModelica_michael/OMEdit/CDepWithDeposition.CDepSystemV2

  2 ### START INITIALIZATION ###
  3 updating min-values
  4 updating max-values
  5 updating nominal-values
  6 updating primary start-values
  7 initialization method: symbolic        [solves the initialization problem symbolically - default]
  8 Model contains homotopy operator: Use adaptive homotopy method to solve initialization problem. To disable initialization with homotopy operator use "-noHomotopyOnFirstTry".
  9 The initialization problem is inconsistent due to the following equation: 0 != 0.008 = 100120.0 - PreCoolerHeatExchanger.chamber_flow.mediums[1].p
10 ### END INITIALIZATION ###
11 Error in initialization. Storing results and exiting.
12 Use -lv=LOG_INIT -w for more information.

Thanks,
    Michael

Re: How do we view the initial values?

In OMEdit  you can open the simulation setup and, in the simulation flags tab, tick LOG_INIT_V. You will find the log in the output path with information about the start values used.

Re: How do we view the initial values?

Thank you CGT for explaining how to use the LOG_INIT_V simulation flag to save the initial data and where to find it.  I found the initial conditions .intdata file in the output path as you said.  It appears that the .intdata file is a data file of some sorts.  Is there a tool for viewing this file?  I tried to figure out if the OMEdit plotting tool could open it, but I could not figure out how to do this.


Code:


michael@jenkins:/tmp/OpenModelica_michael/OMEdit/Cdep.CDepSystem_reference_for_first_tryV2$ ls -ltr
total 287332
drwxr-xr-x 7 michael michael      4096 Apr 21 07:54 ..
-rw-r--r-- 1 michael michael   1252947 Apr 21 16:57 CDepSystem_reference_for_first_tryV2_init.xml
-rw-r--r-- 1 michael michael   1924067 Apr 21 16:57 CDepSystem_reference_for_first_tryV2_info.json
-rwxr-xr-x 1 michael michael   1788528 Apr 21 16:57 CDepSystem_reference_for_first_tryV2
-rw-r--r-- 1 michael michael  20283380 Apr 21 16:57 CDepSystem_reference_for_first_tryV2_prof.intdata
-rw-r--r-- 1 michael michael  40806800 Apr 21 16:57 CDepSystem_reference_for_first_tryV2_prof.realdata
-rw-r--r-- 1 michael michael 228016014 Apr 21 16:57 CDepSystem_reference_for_first_tryV2_res.mat
-rw-r--r-- 1 michael michael    139615 Apr 21 16:57 CDepSystem_reference_for_first_tryV2.log

Re: How do we view the initial values?

Sorry for the delay, I didn't follow the topic.
In Windows, you will find the generated files under your user, in the \AppData\Local\Temp\OpenModelica\OMEdit plus the name of your simulation. The file with .log extension can be opened with a text editor.

Carlos

Re: How do we view the initial values?

Thank you Carlos!  I was looking at the wrong file.  As you said, the .log file has the initial values and that it is a text file and can be viewed with a text editor.

There are 0 guests and 0 other users also viewing this topic
You are here: