Welcome, Guest
Username: Password: Remember me

TOPIC: Dragfo subroutine : Energy extraction

Dragfo subroutine : Energy extraction 9 years 8 months ago #16368

  • anasrahman
  • anasrahman's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 33
  • Thank you received: 1
Hello everyone,

1. Regarding the drag force (U and V) in dragfo subroutine, can I safely assume that the FVDRAG and FUDRAG formula will be multiplied by density and U,V components when the calculation is run, as pointed out in topic #11231

The reason I am asking this is because I have seen an example of dragfo subroutine in which the density and U,V velocity are included in the FVDRAG and FUDRAG formula. Kindly refer to topic #10547

2. I would also appreciate if someone could point me to the direction on how can I include the following equations in the DRAGFO subroutine, and view the output in the result file.

Average current velocities , Uavg = (1/Time step)* (sum of U velocity at every time step)

Average power = (1/Time step) * (sum of (0.5* density * (U^3)))

I am having trouble as I do not know how to introduce the Time step in the equation.

3. The output can be viewed by using points from topic #9753

However, may I know when do I need to use the following line:

DOUBLE PRECISION, POINTER :: power(:)
DOUBLE PRECISION, PARAMETER :: cd=0.9D0


Thank you

Anas
The administrator has disabled public write access.

Dragfo subroutine : Energy extraction 9 years 8 months ago #16370

  • jmhervouet
  • jmhervouet's Avatar
Hello again,

It seems that to get the average velocity, if you sum all the time steps, you must divide by the number of time steps, not by the time step ? This number of time steps is called NIT in Fortran and can be accessed with a :

USE DECLARATIONS_TELEMAC2D, ONLY : NIT

or you add NIT in the ONLY list if it already exists. To do the division at the end do a :

IF(LT.EQ.NIT) THEN
dividing by NIT
ENDIF


You should also add a number of SAVE to keep your variables between two calls to dragfo.f, or to be sure add a single :

SAVE

at the end of the declarations.

Regards,

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

Dragfo subroutine : Energy extraction 9 years 7 months ago #16571

  • tIDAL
  • tIDAL's Avatar
While running a simulation in telemac2d using dragfo (for simulating turbines) I am getting an error message:


x86_64-w64-mingw32-gfortran -c -O3 -ffixed-line-length-132 -fconvert=big-endian
-frecord-marker=4 -I C:\opentelemac\v6p3r1\builds\wingfortrans\lib\utils\specia
l -I C:\opentelemac\v6p3r1\builds\wingfortrans\lib\utils\parallel -I C:\opente
lemac\v6p3r1\builds\wingfortrans\lib\utils\damocles -I C:\opentelemac\v6p3r1\bu
ilds\wingfortrans\lib\utils\bief -I C:\opentelemac\v6p3r1\builds\wingfortrans\l
ib\sisyphe -I C:\opentelemac\v6p3r1\builds\wingfortrans\lib\tomawac -I C:\open
telemac\v6p3r1\builds\wingfortrans\lib\telemac2d t2dfort.f
t2dfort.f:202.42:

if(INPOLY(X(I),Y(I),ta(J)%box_x,ta(J)%box_y,ta(J)%n_box)) then
1
Error: 'box_x' at (1) is not a member of the 'turbine_array' structure
t2dfort.f:215.14:

end if
1
Error: Expecting END DO statement at (1)
t2dfort.f:242.43:

if(INPOLY(X4,Y4,ta(J)%box_x,ta(J)%box_y,ta(J)%n_box)) then
1
Error: 'box_x' at (1) is not a member of the 'turbine_array' structure
t2dfort.f:247.20:

end if
1
Error: Expecting END DO statement at (1)
... The following command failed for the reason above
x86_64-w64-mingw32-gfortran -c -O3 -ffixed-line-length-132 -fconvert=big-endian
-frecord-marker=4 -I C:\opentelemac\v6p3r1\builds\wingfortrans\lib\utils\specia
l -I C:\opentelemac\v6p3r1\builds\wingfortrans\lib\utils\parallel -I C:\opente
lemac\v6p3r1\builds\wingfortrans\lib\utils\damocles -I C:\opentelemac\v6p3r1\bu
ilds\wingfortrans\lib\utils\bief -I C:\opentelemac\v6p3r1\builds\wingfortrans\l
ib\sisyphe -I C:\opentelemac\v6p3r1\builds\wingfortrans\lib\tomawac -I C:\open
telemac\v6p3r1\builds\wingfortrans\lib\telemac2d t2dfort.f






Dragfo file is attached alongwith.
Attachments:
The administrator has disabled public write access.

Dragfo subroutine : Energy extraction 9 years 7 months ago #16581

  • jmhervouet
  • jmhervouet's Avatar
Hello,

There seem to be multiple mistakes in your implementation, with many lines commented. I see for example that there are two lines with "type(turbine_array)", moreover within the second type(turbine_array) definition there are other instructions and a COMMON, this has no meaning in Fortran. This requires a serious checking and rewriting.

JMH
The administrator has disabled public write access.

Dragfo subroutine : Energy extraction 9 years 4 months ago #17553

  • Veerle
  • Veerle's Avatar
Dear,

I am adapting the drag force formula as well. As mentioned in previous comments (#11231 and #16368) FUDRAG is multiplied with the water density, stream velcoty and water heigth.

I am wondering what the use is of the parameter 'AIRE'.
In the subroutine dragfo.f at line 105: AIRE = AIRE + T1%R(I)

Are FUDRAG and FVDRAG the only output parameters of this subroutine. And do I need to keep the parameter AIRE?

Best regards,
Veerle
The administrator has disabled public write access.

Dragfo subroutine : Energy extraction 9 years 4 months ago #17556

  • jmhervouet
  • jmhervouet's Avatar
Hello Veerle,

The drag forces are forces and what we apply on the bottom are stresses, hence forces divided by an area. This is why at the end of the computation the total drag forces of an area are divided by the area on which they are applied. As this is meant for vertical structures like tree trunks, it should not be very different in your case, but you may want to have different zones with different drag coefficients.

With best regards,

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

Dragfo subroutine : Energy extraction 9 years 4 months ago #17557

  • Veerle
  • Veerle's Avatar
Thank you Jean-Michel for the fast answer.

I am wondering how to implement submerged structures, which have a height lower than the water depth.

FUDRAG%R(I) = - 0.5D0 * A_VEG * CD * UNORM * H_VEG/HN%R(I)
with H_VEG: height of the vegetation

And do I still need line 105: AIRE = AIRE + T1%R(I)?


Best regards,
Veerle
The administrator has disabled public write access.

Dragfo subroutine : Energy extraction 9 years 4 months ago #17562

  • jmhervouet
  • jmhervouet's Avatar
Hello Veerle,

This is my last day before vacation, so I have not too much time to explain, but submerged structures behave like friction, i.e. they have relatively less influence when the depth increases, unlike non submerged vertical structures with an impacted area that increases with depth, so that the breaking effect remains somewhat constant. So sorry but your submerged vegetation will behave like a friction and you should look at friction laws...

Regards,

JMH
The administrator has disabled public write access.

Dragfo subroutine : Energy extraction 9 years 4 months ago #17565

  • Veerle
  • Veerle's Avatar
Thank you Jean-Michel,

I will checked the friction laws again to better understand the procedrure.

Have a nice holiday,
Veerle
The administrator has disabled public write access.
Moderators: pham

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