Welcome, Guest
Username: Password: Remember me

TOPIC: Turbine and turbulence

Turbine and turbulence 9 years 10 months ago #15414

  • Aqleema Shah
  • Aqleema Shah's Avatar
hie all
i wanted to know if by any means i can represent turbine in the flow simulations in order to evaluate the velocity pattern change.
An easier method would be appreciable as i am not so good in coding stuff.
The administrator has disabled public write access.

Turbine and turbulence 9 years 10 months ago #15415

  • jmhervouet
  • jmhervouet's Avatar
Hello,

The basic principle is to modify the subroutine dragfo.f, giving diameters and number of vertical structures that correspond to the turbine. This has been done a number of times already and maybe someone could post an example.

I just asked my colleagues at EDF if they can provide an example, wait and see. They also moved to 3D now.

With best regards,

Jean-Michel Hervouet
The administrator has disabled public write access.

Turbine and turbulence 9 years 10 months ago #15419

  • Aqleema Shah
  • Aqleema Shah's Avatar
Actually the model i worked for calculating the velocities in telemac didnt need any intervention of subroutine files.
Anyway thanks for the help. Looking forward for some examples to get through.

Regards,
The administrator has disabled public write access.

Turbine and turbulence 9 years 7 months ago #16466

  • dsc1r12
  • dsc1r12's Avatar
Hi,

I am trying to modify DRAGFO to incorporate a single row of turbines but am having a bit of trouble modifying FUDRAG and FVDRAG to consider turbines that do not take up the whole depth.

I have changed FUDRAG and FVDRAG to be (where 193 is the number of turbines per node, with 22 nodes in the polygon defined by XSOM and YSOM):

FUDRAG%R(I)= (-0.5D0 * A_turbine_a * C_D* UDRAG**2 *193.D0) / (UNORM*depth)
FVDRAG%R(I)= (-0.5D0 * A_turbine_a * C_D* UDRAG**2 *193.D0) / (UNORM*depth)

When I run the simulation, FUDRAG goes to NaN when I print it. However, if I use:

FUDRAG%R(I)= (-0.5D0 * A_turbine_a * C_D* UDRAG**2 *193.D0) / (UNORM*depth)
FVDRAG%R(I) = - 0.5D0 * DIAM * CD * UNORM *25

I.e. so that FVDRAG is different to FUDRAG but of the same magnitude, I get sensible values out for FUDRAG and FVDRAG. Do you have any idea why this may be?

I have attached my Dragfo.

Cheers

Danny
The administrator has disabled public write access.

Turbine and turbulence 9 years 7 months ago #16467

  • dsc1r12
  • dsc1r12's Avatar
file attached
Attachments:
The administrator has disabled public write access.

Turbine and turbulence 9 years 7 months ago #16468

  • jmhervouet
  • jmhervouet's Avatar
Hello,

I see no real error but the compiler could be confused by a number of things:

Why real(8) and not DOUBLE PRECISION, and they should be initialised by double precision values ending with D0

The line :

depth=max(H%R((I)), 0.01)

is strange and would be safer if written : depth=max(H%R(I),0.01D0)

The lines FUDRAG%R(I)=... and FVDRAG%R(I)=... have no clear continuation sign though they are on two lines.

You can also just write FVDRAG%R(I)=FUDRAG%R(I)

However the behaviour you report can hardly be explained by this and if you see a value of FUDRAG equal to NaN it would be worth printing all the parameters entering in the formula.

With best regards,

Jean-Michel Hervouet
The administrator has disabled public write access.

Turbine and turbulence 9 years 7 months ago #16469

  • dsc1r12
  • dsc1r12's Avatar
Hi JMH,

It seems to be a problem with UNORM, as when I print out each variable in teh equation for FUDRAG I get...

A_turbine_a
188.700000000000
C_D
0.800000000000000
UNORM
0.000000000000000E+000
UDRAG
0.000000000000000E+000
depth
32.6673535180672

Everything is correct apart from UNORM and UDRAG. I dont understand why UNORM is zero, especially as if I use :


FUDRAG%R(I)= (-0.5D0 * A_turbine_a * C_D* UDRAG**2 *193.D0) / (UNORM*depth)
FVDRAG%R(I) = - 0.5D0 * DIAM * CD * UNORM

I get:

A_turbine_a
188.700000000000
C_D
0.800000000000000
UNORM
1.18592287601195
UDRAG
1.18592287601195
depth
32.6673535180672

which looks correct. For some reason when FUDRAG%R(I)=FVDRAG%R(I) something is going wrong which gives UNORM = 0.
For the case where FUDRAG%R(I)=FVDRAG%R(I), FUDRAG%R(I)=0 when I print it at the end of DRAFO after the lines:
CALL OS('X=CX ',X=FUDRAG,C=SOM)
CALL OS('X=CX ',X=FVDRAG,C=SOM)

Any idea why UNORM is being calculated as 0? Is it that the drag force is relatively high when calculated averaged over the area? I find this unlikely given that AIRE=11362492.9548148

Danny
The administrator has disabled public write access.

Turbine and turbulence 9 years 7 months ago #16471

  • jmhervouet
  • jmhervouet's Avatar
Hello,

I thought you were clipping UNORM as you did for depth but, on a closer look, actually not, so UNORM can be 0.D0 if the velocity is 0.D0. After computing UDRAG you should add UNORM=MAX(UNORM,1.D-4) for example, otherwise you get a division by 0 that triggers the NaN.

However the behaviour you have may also hide some memory overlapping, did you change something else than dragfo.f, do you have VERTICAL STRUCTURES = YES in your steering file ? You can print FUDRAG%DIM1, FVDRAG%DIM1, FUDRAG%ELM, FVDRAG%ELM, FUDRAG%NAME, FVDRAG%NAME for a preliminary checking.

With best regards,

Jean-Michel Hervouet
The administrator has disabled public write access.

Turbine and turbulence 9 years 7 months ago #16473

  • dsc1r12
  • dsc1r12's Avatar
Yes you are right, I should have been clipping UNORM, thanks again!
The administrator has disabled public write access.
Moderators: pham

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