Page 1 of 1

Residuals in steady-state not exactly zero

PostPosted: Fri Feb 05, 2016 3:35 pm
by kyri82
Hello,

I use the command
Code: Select all
resid(1);
to check the convergence at the steady-state and for a couple of equations I do not get exact zeros. In two equations differences are 0.1-0.2 (in some others 1^e-6 which I don't think is an issue). Is something to worry about? Code runs smoothly and results are as expected

Thanks!

K.

    Residuals of the static equations:

    Equation number 1 : 0
    Equation number 2 : 0
    Equation number 3 : 0
    Equation number 4 : 0
    Equation number 5 : 0
    Equation number 6 : 0
    Equation number 7 : 0
    Equation number 8 : 0
    Equation number 9 : 0
    Equation number 10 : 0
    Equation number 11 : 0
    Equation number 12 : 0
    Equation number 13 : 0
    Equation number 14 : 0
    Equation number 15 : 0
    Equation number 16 : 0
    Equation number 17 : 0
    Equation number 18 : 0
    Equation number 19 : 1.2442e-05
    Equation number 20 : 1.2442e-05
    Equation number 21 : 2.1527e-07
    Equation number 22 : 8.0091e-07
    Equation number 23 : 0
    Equation number 24 : 0
    Equation number 25 : 0
    Equation number 26 : 0
    Equation number 27 : 3.3045e-06
    Equation number 28 : 3.3045e-06
    Equation number 29 : 2.2659e-06
    Equation number 30 : 2.2659e-06
    Equation number 31 : 0
    Equation number 32 : 0
    Equation number 33 : 0
    Equation number 34 : 0
    Equation number 35 : -0.21598
    Equation number 36 : -0.16566
    Equation number 37 : 0
    Equation number 38 : 0
    Equation number 39 : 0
    Equation number 40 : 0
    Equation number 41 : 0
    Equation number 42 : 0
    Equation number 43 : 0
    Equation number 44 : 0
    Equation number 45 : 0
    Equation number 46 : 0
    Equation number 47 : 0
    Equation number 48 : 0
    Equation number 49 : 0
    Equation number 50 : 0
    Equation number 51 : 0
    Equation number 52 : 0
    Equation number 53 : 0
    Equation number 54 : 0
    Equation number 55 : 0
    Equation number 56 : 0
    Equation number 57 : 0
    Equation number 58 : 0
    Equation number 59 : 0
    Equation number 60 : 0
    Equation number 61 : 0
    Equation number 62 : 0
    Equation number 63 : 0
    Equation number 64 : 0
    Equation number 65 : 0
    Equation number 66 : 0
    Equation number 67 : 0
    Equation number 68 : 0
    Equation number 69 : 0
    Equation number 70 : 0
    Equation number 71 : 0
    Equation number 72 : 0
    Equation number 73 : 0
    Equation number 74 : 0
    Equation number 75 : 0
    Equation number 76 : 0
    Equation number 77 : 0
    Equation number 78 : 0
    Equation number 79 : 0
    Equation number 80 : 0
    Equation number 81 : 0
    Equation number 82 : 0
    Equation number 83 : 0
    Equation number 84 : 0
    Equation number 85 : 0
    Equation number 86 : 0
    Equation number 87 : 0
    Equation number 88 : 0
    Equation number 89 : 0
    Equation number 90 : 0
    Equation number 91 : 0
    Equation number 92 : 0
    Equation number 93 : 0
    Equation number 94 : 0
    Equation number 95 : 0
    Equation number 96 : 0
    Equation number 97 : 0
    Equation number 98 : 0
    Equation number 99 : 0

Re: Residuals in steady-state not exactly zero

PostPosted: Mon Feb 08, 2016 6:38 am
by jpfeifer
That is strange and should never happen. Did you try the unstable version? If the problem persists, send me the files.

Re: Residuals in steady-state not exactly zero

PostPosted: Tue Feb 16, 2016 4:20 pm
by kyri82
Thanks for your reply. This happens with 4.4.3 (and 4.3.3)
Please see attached the files - I use fsolve to fascilitate the steady-state calculation.

Best,
K.

Re: Residuals in steady-state not exactly zero

PostPosted: Sat Feb 20, 2016 8:29 am
by jpfeifer
Sorry, but I am a bit lost in your code. What should I look for? When I put the resid; command after steady where it belongs, all residuals are 0 as they should be.

Re: Residuals in steady-state not exactly zero

PostPosted: Tue Feb 23, 2016 1:20 pm
by kyri82
ok, good. It was my mistake then, I should have placed resid where it belongs to.

Note that it needs
Code: Select all
steady(solve_algo = 0);
to solve the steady-state, the other algorithms do not really work. I guess that's not a big deal, right?