#3693 closed defect (fixed)
root of negative value
Reported by: | Owned by: | Lennart Ochel | |
---|---|---|---|
Priority: | high | Milestone: | 1.9.4 |
Component: | Backend | Version: | v1.9.4-dev-nightly |
Keywords: | Cc: | Patrick Täuber |
Description
The example
testsuite/simulation/modelica/tearing/Tearing19-cel.mos
fails with activated wrapFunctionCalls-module.
The error dump:
assert | warning | The following assertion has been violated during initialization at time 0.000000 assert | debug | Model error: Argument of asin($cse6) outside the domain -1.0 <= nan <= 1.0
This is strange, since cse variables are only introduced for the simulation system. The initialization is solved propably.
Change History (9)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Cc: | added |
---|
Tearing19_eqFunction_46
is one of the inner equations of a tearing set:
/* equation index: 46 type: SIMPLE_ASSIGN x5 = (1.0 - (x4 ^ 4.0 + x0 * x1 * x2)) ^ 0.2 */ void Tearing19_eqFunction_46(DATA *data, threadData_t *threadData) { TRACE_PUSH const int equationIndexes[2] = {1,46}; modelica_real tmp1054; tmp1054 = $Px4; tmp1054 *= tmp1054; e3 = pow(1.0 - (tmp1054 * tmp1054) + ($Px0) * (($Px1) * ($Px2)), 0.2); TRACE_POP }
In this case, x5 is root of a negative number, which let function pow
fail.
Probably, we should not solve explicitly for roots. Patrick, what do you think?
comment:3 by , 9 years ago
The same issue is present in simulation/modelica/others/TestExpressionSolve.mos.
comment:4 by , 9 years ago
Summary: | tearing example fails with activated wrapFunctionCalls module → root of negative value |
---|
comment:5 by , 9 years ago
Status: | new → accepted |
---|
comment:6 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | accepted → closed |
comment:7 by , 9 years ago
Milestone: | Future → 1.9.4 |
---|
Note:
See TracTickets
for help on using tickets.
It seems that the problem comes from a bad value that is calculated for
$Px5
in functionTearing19_eqFunction_46
inTearing19_02nls.c
.