Opened 9 years ago

Closed 9 years ago

#3883 closed task (fixed)

Modelica.Fluid.Examples.Explanatory.MomentumBalanceFittings

Reported by: Volker Waurich Owned by: Volker Waurich
Priority: normal Milestone: Future
Component: Run-time Version:
Keywords: MSL_trunk, MSL_3.2.1 Cc: Willi Braun, Vitalij Ruge

Description (last modified by Volker Waurich)

Hi,

Just to document some debug insight.

A non-linear system does not converge during initialization.
The problem is as follow:
One residual in simcode equation 50 is computed as:
res = rightAdaptor.A_mean * rightAdaptor.dp_fg + rightAdaptor.F_p

If I set almost correct start values (according to dymola)
The numerical values for this residual are:
3.92699e+119 * -6.53663e+002 + 2.56825e+122

If you look at the mantissas, this seems to be on the right way. But I guess multiplying such a big and small number reveals some numerical issues.

Change History (6)

comment:1 by Volker Waurich, 9 years ago

Besides that these huge numbers are generated from a function call which has kind of "regular" physical dimensional inputs. So the sensitity of this "transfer function" is quite big.

comment:2 by Volker Waurich, 9 years ago

Description: modified (diff)

comment:3 by Lennart Ochel, 9 years ago

Keywords: MSL_trunk MSL_3.2.1 added

comment:4 by Volker Waurich, 9 years ago

Owner: set to Volker Waurich
Status: newassigned
Type: discussiontask

comment:5 by Volker Waurich, 9 years ago

I figured out, that the model simulates if we do the following:

Combine the equation
leftAdaptor.F_p = leftAdaptor.A_mean * (100000.0 - leftAdaptor.state_a_nondes.p
with
-leftAdaptor.F_p = leftAdaptor.A_mean * leftAdaptor.dp_fg
to
-leftAdaptor.dp_fg = 100000.0 - leftAdaptor.state_a_nondes.p

and replace the second equation with this equation.
The same thing for rightAdapter as well.

I will see if I can extend my cse-implementation to do so.
This reduces the number of equations in the non linear loop.

comment:6 by Volker Waurich, 9 years ago

Resolution: fixed
Status: assignedclosed

I implemented some rule to cancel expressions in paths of basic algebraic equations. Unfortunately, this doesn't apply for any models except this ons. Anyway, the model now simulates even if some crazy results are different to dymola ( 2.57e+122 <> 3.4e38)

Note: See TracTickets for help on using tickets.