Welcome, Guest
Username: Password: Remember me

TOPIC: Problem with floating bodies

Problem with floating bodies 9 years 11 months ago #15182

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
Just an update:
Scalar gives the exact error like mpi with 1 processor.
The administrator has disabled public write access.

Problem with floating bodies 9 years 11 months ago #15188

  • jmhervouet
  • jmhervouet's Avatar
Sorry I did not see this last message, anyway the workaround may work also, but less sure, unless you initialise the arrays with a hardcoded value of 1155 right at the beginning. If not send me your case.

A definitive correction would consist in sending NFLOT_MAX to streamline.f, for a correct dimensioning.

JM
The administrator has disabled public write access.

Problem with floating bodies 9 years 11 months ago #15187

  • jmhervouet
  • jmhervouet's Avatar
Dear Costas,

"Normally" there should be a deallocation reallocation when the size of arrays is too small, but there is the possibility that many trajectories arrive in a sub-domain that had itself initially less particles to treat, so asked for a smaller size, and this is somewhat unpredictable. I enclose a tentative workaround in streamline.f (lines about 314 to 330) with a coefficient SECURE set to 2. If it makes a difference we can perhaps make it by playing with this coefficient.

Fingers crossed,

JM
Attachments:
The administrator has disabled public write access.

Problem with floating bodies 9 years 11 months ago #15192

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

Thank you for your help. Tried your workaround with secure=2 but it didn't work. The error was just the same. However, I just tried setting ALGAE TRANSPORT MODEL =FALSE and the computation runs smoothly (with original streamline.f)! So I guess the problem lies with the modifications attributed to the ALGAE transport model.

Could it be that the caller function of COLLECT_ALG is not passing the correct size of NCHDIM (231 instead of 462)?

Here is my modification of flot.f:

File Attachment:

File Name: t2d_algae_for_v3.f
File Size: 7 KB


Edit: Where should I hardcode 1155? In my flot.f subroutine, or streamline.f?
The administrator has disabled public write access.

Problem with floating bodies 9 years 11 months ago #15195

  • jmhervouet
  • jmhervouet's Avatar
Hello,

Modified streamline with 1155 in file enclosed (just look for 1155, only one line is changed).
I'll transmit the case to my colleague in charge of algae (but he will probably need the case).

Regards,

JM
Attachments:
The administrator has disabled public write access.

Problem with floating bodies 9 years 11 months ago #15200

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

Your second modification didn't make any difference. Still, the computation with NO ALGAE works as it should, which is encouraging. I hope that you can track the error with the algae module since it is very interesting.

Here is my case:



Looking forward to hearing from you.
Regards,
Costas
The administrator has disabled public write access.

Problem with floating bodies 9 years 11 months ago #15203

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

I cannot see your case, maybe something went wrong with your attachement?

To help you understand ADD_PARTICLE here is what you should know.

- The first 3 variables are the coordinates in 3 dimensions
- The fourth is a label which is used by the user to follow particles (I think it could be set to 1 everywhere and not matter)
- NFLOT is the number of particles in the current processor and NFLOT_MAX is the maximum number of particles a processor could see (it is used to allocate memory).

I will try to see if I can add particles at different intervals while you send me your case file.

Regards,

Antoine
The administrator has disabled public write access.

Problem with floating bodies 9 years 11 months ago #15216

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

Thank you for taking interest in my case. I have overcome the problems with the ADD_PARTICLE subroutine (which was mainly caused by coding errors on my part). The problem that persists seems to involve the algae transport module (not taking account the NFLOT_MAX for properly dimensioning the arrays in streamline.f, as JMH pointed out). Float transport works properly though, I have tested it overnight for almost 12000 floats in 50 drops.

Here is my case (I didn't notice that the forum does not accept 7z archives):

File Attachment:

File Name: Algae_transport.zip
File Size: 141 KB


Regards,
Costas
The administrator has disabled public write access.

Problem with floating bodies 9 years 11 months ago #15227

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

So I didn't exactly run your case (as it seemed slightly large) but I tried to do a similar problem. To get rid of your NCHDIM error you need to modify the subroutine SCARACT in streamline.f to make sure it is recalculated. I have modified it in the following file:

File Attachment:

File Name: streamline_2014-12-11.f
File Size: 399 KB


You will see the modification in line 6325.

However this will not solve all your problems as to calculate the algae transport a few variables need to be initialised with the correct values, this can be seen lines 285-307 of subroutine derive.f.

In there all the variables with "_0" are interpolated within the mesh to calculate specific values of the fluid. At the moment the interpolation subroutines are not very flexible and it is difficult to use them for just a few specific particles (you should not reinterpolate the values for all particles).

If you want to modify the code so that this can be done it will require you to modify streamline.f, algae_transport.f and derive.f which will tedious and long. It would be faster to run several simulations of your code with different ALGAE_START (which might not have been the answer you were hopping for) and treat all the different particle position result files together.

Best regards,

Antoine
The administrator has disabled public write access.

Problem with floating bodies 9 years 11 months ago #15228

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

Thank you for your help. I will study your remarks regarding subroutine derive. In the meantime, I could not see the modification you did in streamline.f. The file you posted seems like the modified version JMH posted before. Can you check please?

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

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