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

Model error: Argument of log

Model error: Argument of log

For a simple component in my model I have the following relation:

  p = A_cw - B_cw * log((TLC - RV) / (v - RV) - 0.999);

with only two variables p(pressure) and v(volume). During simulations, I am getting the following error multiple times but the simulation is continuing.

assert | debug | <p>Model error: Argument of log(-0.999 + DIVISION(RespiratorySystem.ChestWall.TLC - RespiratorySystem.ChestWall.RV, RespiratorySystem.ChestWall.v - RespiratorySystem.ChestWall.RV)) was -0.586256 should be &gt; 0</p>

I checked the corresponding time instances for the variable v if it go beyond the value which makes the argument of log expression negative but it does not even come close. So the simulation result shows variable value which does not make the argument of log() function negative but still I am getting this assertion error.

When I tried to convert the p-v relation to an exponential function in the following manner:

v = Something + exp(p*Something) then I am getting "Jacobian determinant is NaN" but simulation still continues.

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