Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Using the DRAGFO subroutine to model TEC

Using the DRAGFO subroutine to model TEC 6 years 5 months ago #30397

  • MohdAlaa
  • MohdAlaa's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 76
  • Thank you received: 1
Hi,

I'm trying to model a TEC using Dragfo subroutine. I followed the steps as per the conference paper "Using the DRAGFO subroutine to model Tidal Energy Converters in Telemac-2D". But when I try to run the simulation it fails.

I've attached the modified subroutine and the list of errors.


Error1.jpg




Error2.jpg



Any advice?

Thanks,
Mohammed
Attachments:
The administrator has disabled public write access.

Using the DRAGFO subroutine to model TEC 6 years 5 months ago #30398

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi
the first error message indicates that your trying to use a modified version of dragfo which is older than the one you have in your installation.
Start with dragfo.f subroutine which exists in your installation and implement the modification.
Other errors comes from "wrong" characters in your fortran file.

Regards
Christophe
The administrator has disabled public write access.
The following user(s) said Thank You: MohdAlaa

Using the DRAGFO subroutine to model TEC 6 years 5 months ago #30400

  • MohdAlaa
  • MohdAlaa's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 76
  • Thank you received: 1
Hi Christophe,

I tried with the latest dragfo.f file. The first error has disappeared now, but the rest are still there.
I will check the rest of characters to make sure they are correct, although I following the paper exactly, it could be out-of-date now. However, the first error in the new run (second error in the previous snapshot) is about this command:
CALL VECTOR (T1,'=','MASBAS ',UN%ELM,1.D0,
& S,S,S,S,S,S,MESH,.FALSE.,S)
which is taken from the original Fortran file, and it works fine when I run the dragfore example.

Thanks,
The administrator has disabled public write access.

Using the DRAGFO subroutine to model TEC 6 years 5 months ago #30402

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Yes but there is a problem with the position of & in the tile.
Looks like you're using tabulation instead space...

Regards
Christophe
The administrator has disabled public write access.

Using the DRAGFO subroutine to model TEC 6 years 5 months ago #30406

  • MohdAlaa
  • MohdAlaa's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 76
  • Thank you received: 1
Yes, I was using tabulation. I replaced them with space now. It's getting better, but still, it fails with multiple errors. I will re-check all the lines and the positions.

Thanks
The administrator has disabled public write access.

Using the DRAGFO subroutine to model TEC 6 years 5 months ago #30411

  • MohdAlaa
  • MohdAlaa's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 76
  • Thank you received: 1
I found out what was the problem with the code. All the (')s were converted to a wrong format. Therefore, the software couldn't read the text commands.

Now T2D is reading the Fortran file. However, the simulation stops when trying to read the formatted file. According to the code in the paper, formatted file 2 is defined in Telemac as file 27. Therefore, to read the TEC data, the code is written as:

! READ THE NUMBER OF TEC
READ(27,*) NTEC

However, the error message says:
At line 148 of file t2d_dragfo_TEC.f (unit = 27, file = 'fort.27')
Fortran runtime error: End of file

So is this something updated in Telemac and file 27 is no longer refer to Formatted file 2? or the coding structure is updated and it should be written in a different way instead of READ(27,*)?

Thanks
The administrator has disabled public write access.

Using the DRAGFO subroutine to model TEC 6 years 5 months ago #30412

  • MohdAlaa
  • MohdAlaa's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 76
  • Thank you received: 1
I found the problem, I replaced

READ(27,*) NTEC

with

READ(T2D_FILES(T2DFO2)%LU,*) NTEC

It's working now.

I've attached the Fortran file in case anyone needs to use it for similar work.

Thanks
Attachments:
The administrator has disabled public write access.

Using the DRAGFO subroutine to model TEC 6 years 5 months ago #30425

  • MohdAlaa
  • MohdAlaa's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 76
  • Thank you received: 1
Updated file to include Vcut.
Attachments:
The administrator has disabled public write access.

Using the DRAGFO subroutine to model TEC 6 years 4 months ago #30910

  • Antoine Joly
  • Antoine Joly's Avatar
Hello Mohammed,

There was also a small typo in the dragfo article.

Here is the file with corrected signs to make it work regardless of the orientation of the TEC.

Best regards,

Antoine
Attachments:
The administrator has disabled public write access.

Using the DRAGFO subroutine to model TEC 6 years 1 month ago #31652

  • r.clayton
  • r.clayton's Avatar
Hi,

I am also trying to model a TEC using the modified dragfo code from the paper 'Using the DRAGFO subroutine to model Tidal Energy Converters in Telemac-2D'.

I see from a previous comment that there were some typos in the code in the paper, therefore I have updated the code using the file provided by Antoine above (thanks).

I have a query about the configuration of the steering file:
  • I have changed the vertical structures to 'Yes'
  • I defined the code as a fortran file in the steering file as in the paper
  • I created a data file with the TEC position in an .xyz format given in the paper
  • And I created an empty results file with the title 'TEC_power.txt'

  • However the model is not running. Please can you advise and let me know what I have done wrong.

    Thanks,
    Rob
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: pham

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