Welcome, Guest
Username: Password: Remember me

TOPIC: Tidal Turbine Modelling Using dragfo

Tidal Turbine Modelling Using dragfo 2 years 6 months ago #40288

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
use the -s option to have a full listing file...
Christophe
The administrator has disabled public write access.

Tidal Turbine Modelling Using dragfo 2 years 6 months ago #40295

  • msuryaprawira
  • msuryaprawira's Avatar
Hi,

Yes so I printed the full listing.

The NaN's are only happening only at the last time step.

This is 1 time-step before the crash:

================================================================================
ITERATION 682 TIME: 1 D 11 H 15 MN 41.0000 S ( 126941.0000 S)
ADVECTION STEP
DIFFUSION-PROPAGATION STEP
GRACJG (BIEF) : 3 ITERATIONS, RELATIVE PRECISION: 0.9273404E-04
POSITIVE DEPTHS OBTAINED IN 6 ITERATIONS
BALANCE OF WATER VOLUME
VOLUME IN THE DOMAIN : 0.1907696E+14 M3
FLUX BOUNDARY 1: -373518.2 M3/S ( >0 : ENTERING <0 : EXITING )
FLUX BOUNDARY 2: -549818.9 M3/S ( >0 : ENTERING <0 : EXITING )
RELATIVE ERROR IN VOLUME AT T = 0.1269E+06 S : -0.1658414E-13
PRERES: MAXIMUM COURANT NUMBER: 0.2359475

VELOCITY U M/S

1: 0.70730 2: 0.57988 3: -0.27666 4: 1.0670 5: 0.66214 6: 0.22631 7: -0.27643
8: 0.57382 9: 0.35476 10: 0.89092 11: 0.59708 12: 1.1320 13: 0.79481 14: 0.16585
15: 1.2558 16: 0.55485 17: 0.19634E-01 18: 0.19626 19: 0.47787 20: 0.72684 21: 1.2124
22: 0.95288 23: 0.74991 24: 1.4112 25: 0.35905 26: 0.55656 27: 0.45073 28: 0.11831
29: 0.29428 30: 1.0538 31: 0.88480 32: 0.58233 33: 0.74440 34: 1.0252 35: 0.61068

VELOCITY V M/S

1: 0.22157 2: 0.12565 3: -0.94558E-01 4: 0.42989 5: 0.29225 6: 0.24518 7: -0.11310
8: 0.22492 9: 0.14450 10: 0.34888 11: 0.20196 12: 0.20158 13: 0.28505 14: 0.22243
15: 0.28937 16: 0.28968 17: 0.77786E-02 18: 0.76404E-01 19: 0.21438 20: 0.80668E-01 21: 0.24899E-01
22: 0.34279 23: 0.20305 24: -0.10325E-01 25: 0.17185 26: 0.23846 27: 0.24718 28: 0.44828E-01
29: -0.28084E-02 30: -0.14354 31: 0.24372 32: 0.23893 33: 0.25061 34: 0.14374 35: 0.10816





And this is the time step where the crash occurs:

================================================================================
ITERATION 683 TIME: 1 D 11 H 15 MN 41.5000 S ( 126941.5000 S)
ADVECTION STEP
DIFFUSION-PROPAGATION STEP
GRACJG (BIEF) : EXCEEDING MAXIMUM ITERATIONS: 1500 RELATIVE PRECISION: NaN
POSITIVE DEPTHS OBTAINED IN 1 ITERATIONS
BALANCE OF WATER VOLUME
VOLUME IN THE DOMAIN : 0.1907696E+14 M3
FLUX BOUNDARY 1: NaN M3/S ( >0 : ENTERING <0 : EXITING )
FLUX BOUNDARY 2: NaN M3/S ( >0 : ENTERING <0 : EXITING )
RELATIVE ERROR IN VOLUME AT T = 0.1269E+06 S : NaN
PRERES: MAXIMUM COURANT NUMBER: 0.000000

VELOCITY U M/S

1: 0.70726 2: 0.57985 3: NaN 4: 1.0669 5: 0.66210 6: NaN 7: NaN
8: NaN 9: 0.35474 10: NaN 11: NaN 12: NaN 13: NaN 14: NaN
15: NaN 16: NaN 17: NaN 18: 0.19625 19: NaN 20: NaN 21: NaN
22: NaN 23: NaN 24: NaN 25: NaN 26: NaN 27: NaN 28: 0.11830
29: NaN 30: NaN 31: NaN 32: NaN 33: NaN 34: NaN 35: NaN

VELOCITY V M/S

1: 0.22156 2: 0.12564 3: NaN 4: 0.42987 5: 0.29224 6: NaN 7: NaN
8: NaN 9: 0.14449 10: NaN 11: NaN 12: NaN 13: NaN 14: NaN
15: NaN 16: NaN 17: NaN 18: 0.76400E-01 19: NaN 20: NaN 21: NaN
22: NaN 23: NaN 24: NaN 25: NaN 26: NaN 27: NaN 28: 0.44825E-01
29: NaN 30: NaN 31: NaN 32: NaN 33: NaN 34: NaN 35: NaN

This is the result of the calculation. How can I see further into this?
The administrator has disabled public write access.

Tidal Turbine Modelling Using dragfo 2 years 6 months ago #40296

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
According to this, we see that a problem occur during the solving step which leads to NaN result and then to a crash in dragfo because velocities are also NaN...

Now you should try to understand what is the reason of the problem in the solving step...
As the problem is probably in the dragfo subroutine I would try to print the results of computed FU and FV values to see if every thing goes well at the iteration 682...

Hope this helps
Christophe
The administrator has disabled public write access.

Tidal Turbine Modelling Using dragfo 2 years 6 months ago #40297

  • msuryaprawira
  • msuryaprawira's Avatar
I see, thanks for the insights.

And what commands should I use to print the result of the previous time step in gdb? So far i only use print but it only shows the last time step. Should i use breakpoints?
The administrator has disabled public write access.

Tidal Turbine Modelling Using dragfo 2 years 6 months ago #40301

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
yes you could use breakpoints...
Christophe
The administrator has disabled public write access.

Tidal Turbine Modelling Using dragfo 2 years 6 months ago #40303

  • msuryaprawira
  • msuryaprawira's Avatar
Hi

yes I have created breakpoints and used the print section. However, it reads something like this:

(gdb) p fudrag%r(ipoin)
$1 = ( 123456, 2, 'XXXXXX', 'FU ', 1, 11, 110072, 110072, 1, 1, 0, 2, '?', '?', (8.0353959179033324e-316), (0), (0), 0, 0, 0, 0, '\000', '\000', 0x0, 0x0, 0, 0, 0, (( 0x0 )) )

Am I printing it the correct way?




Also, these are the values of other variables at time-step 683 and 684 (where it crashes)

================================================================================
ITERATION 683 TIME: 1 D 11 H 15 MN 41.5000 S ( 126941.5000 S)
ADVECTION STEP
DIFFUSION-PROPAGATION STEP

Breakpoint 1, dragfo (fudrag=..., fvdrag=...)
at D:\0_modelling\telemacfiles\ntt_debug\18_temp_2\user_fortran\dragfo_4a.f:477
477 IF((IPID.EQ.0).AND.(LT.EQ.1))THEN
(gdb) p alpha
$8 = 85.442721197117166
(gdb) p utecx
$9 = 0.032011611540058514
(gdb) p utecy
$10 = -0.40161262607557591
(gdb) p urefx
$11 = -0.089036000376132102
(gdb) p urefy
$12 = -0.41862305353571028
(gdb) p iangle
$13 = 85



================================================================================
ITERATION 684 TIME: 1 D 11 H 15 MN 42.0000 S ( 126942.0000 S)
ADVECTION STEP
DIFFUSION-PROPAGATION STEP

Program received signal SIGSEGV, Segmentation fault.
0x00000000004062ab in dragfo (fudrag=..., fvdrag=...)
at D:\0_modelling\telemacfiles\ntt_debug\18_temp_2\user_fortran\dragfo_4a.f:389
389 IF(IPID.EQ.DDPID(I,IANGLE))THEN
(gdb) p alpha
$14 = nan(0x8000000000000)
(gdb) p utecx
$15 = -nan(0x8000000000000)
(gdb) p utecy
$16 = nan(0x8000000000000)
(gdb) p urefx
$17 = 0
(gdb) p urefy
$18 = 0
(gdb) p iangle
$19 = -2147483648
The administrator has disabled public write access.

Tidal Turbine Modelling Using dragfo 2 years 6 months ago #40305

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
I suggest you to check each instruction after the breakpoint at iteration 680.
Use the n or s command in gdb.
the idea behind is to identify which values changes significantly to generate the crash in the resolution and leads to NaN values at the iteration 684 in dragfo...
Christophe
The administrator has disabled public write access.

Tidal Turbine Modelling Using dragfo 2 years 6 months ago #40311

  • msuryaprawira
  • msuryaprawira's Avatar
Hi,

I tried printing some values after iteration 680 produced in dragfo subroutine.
Here are the last 5 time step


EXCEL1.png


As can be seen from the picture, no significant changes between the numbers. It suddenly turns into NaNs.

Even the function H%I, U%I, and V%I (the final velocity on each nodes within the TEC) are also good until iteration 683 before it crashes


EXCEL2.png


Does this mean that the results from the dragfo subroutine on iteration 683 creates values that causes error on other subroutines on iteration 684?
The administrator has disabled public write access.

Tidal Turbine Modelling Using dragfo 2 years 6 months ago #40314

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
There is a significant change in UR!
I'm also wonder why IPOIN change between iterations.
As there is a condition at the end on UR, there is potentially some changes in the computed values for FUDRAG and FVDRAG...
Hope this helps
Christophe
The administrator has disabled public write access.

Tidal Turbine Modelling Using dragfo 2 years 6 months ago #40315

  • msuryaprawira
  • msuryaprawira's Avatar
Hi,

I am sorry. So, I made a mistake. After re-checking, this is what I came up with

EXCEL3.png


Turns out I print the result directly after the line in gdb. It's supposed to be one or two lines after to show the real results.



Also, here are the lines on FUDRAG and FVDRAG
HI=H%R(IPOIN)
UI=U%R(IPOIN)
VI=V%R(IPOIN)
END IF
!
IF((ABS(UR).GT.VCUT(I)).AND.(HI.GT.1.D-4))THEN

HALFCDSCOSTHETA=0.5D0*PI*RTEC(I)**2
& *CDTEC(I)*COS(THETA(I))
HALFCDSSINTHETA=0.5D0*PI*RTEC(I)**2
& *CDTEC(I)*SIN(THETA(I))

IF(ABS(UI).GT.1.D-4)THEN

FUDRAG%R(IPOIN)=FUDRAG%R(IPOIN)
& -HALFCDSCOSTHETA*UR*ABS(UR)/(AREA(I)*HI*UI)

END IF
IF(ABS(VI).GT.1.D-4)THEN

FVDRAG%R(IPOIN)=FVDRAG%R(IPOIN)
& +HALFCDSSINTHETA*UR*ABS(UR)/(AREA(I)*HI*VI)
END IF




Then I tried to print by using command "p FUDRAG%R(IPOIN)" and "p FVDRAG%R(IPOIN)" and the result is zero.

Sorry for the misinformation about the value of UR and IPOIN. Anyway, I am using v8p2 for this calculation. I hope there is no issue with the version of telemac.
The administrator has disabled public write access.
Moderators: pham

The open TELEMAC-MASCARET template for Joomla!2.5, the HTML 4 version.