Welcome, Guest
Username: Password: Remember me

TOPIC: Issue with imposing boundary conditions (IMPOSE_BND_SPECTRA.f)

Issue with imposing boundary conditions (IMPOSE_BND_SPECTRA.f) 7 years 2 months ago #27690

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
Hello all,

I am troubleshooting an error with a case that involves imposing spectra from an offshore model to a coastal one (similar to the impose_spectra example). I have pinpointed the issue at line 222, trunk version):
BC_NPLAN=BC_NPOIN/BC_NF
where division by zero occurs. The problem originates at line 210:
IF((BC_X(IPOIN).EQ.0.0).AND.(BC_Y(IPOIN).GE.0.0))THEN
  BC_NF=BC_NF+1
In my spectrum file BC_X(IPOIN) is never equal to 0.0 so BC_NF stays 0 as originally declared in line 204. Here is the list of the BC_coordinates:

File Attachment:

File Name: BC_coords.txt
File Size: 43 KB


Is there a problem with my spectrum file structure? I do not have a means to visualise the spectrum it is not easy to troubleshoot. Can anyone provide more insight into the issue? Any help would be greatly appreciated.

Best Regards,
Costas

PS. I cannot attach the spectrum file (probable because it is quite large ~6mb), so I will need to find another way to upload.
The administrator has disabled public write access.

Issue with imposing boundary conditions (IMPOSE_BND_SPECTRA.f) 7 years 2 months ago #27691

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
Download link for the spectrum file (OneDrive):
1drv.ms/u/s!AlgdD0M4jdq2jDSm7dgfoOoRZc3I
I hope it works,
Costas
The administrator has disabled public write access.

Issue with imposing boundary conditions (IMPOSE_BND_SPECTRA.f) 7 years 2 months ago #27692

  • tfouquet
  • tfouquet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 294
  • Thank you received: 112
Hello Costas,

You are right (once again) there is a problem. We assumed that there is always an angle of 0 degree in the discretisation of theta but it can also be epsilon (your case) so i will change BC_X.eq.0 by abs(BC_X).lt.epsilon which is better in any case.

thank you

best regards

Thierry
The administrator has disabled public write access.
The following user(s) said Thank You: cyamin

Issue with imposing boundary conditions (IMPOSE_BND_SPECTRA.f) 7 years 2 months ago #27693

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
Hello Thierry,

I applied your tentative solution (using eps=1.D-06) and it works. This issue puzzled me for days as the case initially worked.:S Thank you for your insight and help.

Regards,
Costas
The administrator has disabled public write access.
Moderators: tfouquet

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