Welcome, Guest
Username: Password: Remember me

TOPIC: Problem with floating bodies

Problem with floating bodies 9 years 11 months ago #15092

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

I am trying to introduce floating bodies in my model for an algae transport study. The aim is to introduce several algae sources at regular time intervals.

Since the source locations are many (~300), I have created a formatted file containing the source X,Y coordinates and specify it in my cas file as formatted file 2. As a first step, I am trying to introduce the floats only once. The computation runs, but the drogues result file is empty. Everything worked fine when I introduced one drogue with manual coordinates.

Here is my fortran file:

File Attachment:

File Name: t2d_algae_for_v0.f
File Size: 6 KB


Any help would be appreciated.

Regards,
Costas
The administrator has disabled public write access.

Problem with floating bodies 9 years 11 months ago #15093

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
I have tried a different approach in the fortran file (see new file below) and now computation stops and I get this error message:
PARTICLE 1 IN NONE OF THE SUB-DOMAINS

I don't know if it is a step forwards or backwards... I have checked the coordinates of the points and all lie within the boundary of my domain. What could be the problem?

File Attachment:

File Name: t2d_algae_for_v1.f
File Size: 6 KB


Regards,
Costas
The administrator has disabled public write access.

Problem with floating bodies 9 years 11 months ago #15096

  • jmhervouet
  • jmhervouet's Avatar
Hello,

We'll ask Antoine, the person in charge of algae. In the example we give in subroutine flot.f, there is a ALGAE_START to fill to give the fitst time-step of release, did you give it ? It could be a reason why nothing happens.

With best regards,

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

Problem with floating bodies 9 years 11 months ago #15098

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
Yes, I have set and everything worked as it should when I defined only one float position, as in the example. The problem occurs when I try to 'map' multiple float source coodinates within the ADD_PARTICLE subroutine with the DO statement. Probably it is my code that is wrong. I do not understand fully how the ADD_PARTICLE subroutine works.

Costas
The administrator has disabled public write access.

Problem with floating bodies 9 years 11 months ago #15108

  • jmhervouet
  • jmhervouet's Avatar
Hello Costas,

No, I see no problem in what you wrote, if flot.f is called also for LT=0, is it ? I suppose because if not you would not see your prints of XFLOT and YFLOT, I'll check on Monday. Otherwise could you test if it works with normal particles, not algae. Once you are happy with those particles we'll see what happens when we turn them into algae.

With best regards,

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

Problem with floating bodies 9 years 11 months ago #15109

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

Very good remark, indeed, it does not call it at LT=0 and that was the culprit. Changing my condition (to read the coordinate file) from LT.LT.1 to LT.LE.1 got me going. I can now have a productive day. :cheer: Thank you very much.

Regards,
Costas
The administrator has disabled public write access.

Problem with floating bodies 9 years 11 months ago #15130

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

It seems that I have stumbled across another issue, which involves the ADD_PARTICLE subroutine. What I would like to do is essentially drop every X timesteps, Y number of floats/algae simultaneously. In the end, the question is whether the ADD_PARTICLE subroutine is compatible with what I would like to do.

So far, I can insert multiple floats simultaneously once, however, I cannot sort out the tagging of each particle. My code is:
DO I=1,NFLOT_MAX
          CALL ADD_PARTICLE(XFLOT(I),YFLOT(I),0.D0,I,NFLOT,
     &                    NFLOT_MAX,XFLOT,YFLOT,YFLOT,TAGFLO,
     &                    SHPFLO,SHPFLO,ELTFLO,ELTFLO,MESH,1,
     &                    0.D0,0.D0,0.D0,0.D0,0,0)
        WRITE(*,*) LT, XFLOT(I), YFLOT(I), TAGFLO(I)
        ENDDO

and the output of the WRITE statement is:
         100   843198.75639999995        4020831.8480000002       2147483647
         100   843167.44850000006        4020870.8330000001       2147483647
 ...
and so on.

I do not understand how the "2147483647" tag occurred and in general how the tagging of floats works within the ADD_PARTICLE subroutine. I need to sort this out before I move on to add another set of floats at a following timestep (if that is possible at all).

Any insight on the problem will be appreciated.
Regards,
Costas
The administrator has disabled public write access.

Problem with floating bodies 9 years 11 months ago #15132

  • cyamin
  • cyamin's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 997
  • Thank you received: 234
Problem solved as follows:
        DO I=1,NFLOT_MAX
          TAGFLO(I)=I
          CALL ADD_PARTICLE(XFLOT(I),YFLOT(I),0.D0,TAGFLO(I),NFLOT,
     &                    NFLOT_MAX,XFLOT,YFLOT,YFLOT,TAGFLO,
     &                    SHPFLO,SHPFLO,ELTFLO,ELTFLO,MESH,1,
     &                    0.D0,0.D0,0.D0,0.D0,0,0)
          WRITE(*,*) LT, XFLOT(I), YFLOT(I), TAGFLO(I)
        ENDDO
I am slowly coming to terms with the subroutine.
Costas
The administrator has disabled public write access.

Problem with floating bodies 9 years 11 months ago #15133

  • jmhervouet
  • jmhervouet's Avatar
Hello,

I looked at the implementation (add_particle is in streamline.f in library BIEF) and it is normal if you are in parallel. The array TAGFLO is not filled if the particle added is not in the processor 0 that does your WRITE.
With best regards,

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

Problem with floating bodies 9 years 11 months ago #15134

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

Thank you for your explanation, it now makes sense, because towards the end of the list some floats did obtain a proper tag.

Now that I have succeeded to add one set of floats, I tried adding another set, at the same coordinates (as the first set), but at the time the second set is supposed to be dropped, I get this error:
PARTICLE IN 4 SUB-DOMAINS
PLANTE: PROGRAM STOPPED AFTER AN ERROR
This is my code:
      ALGAE_START=100
! 
      IF(LT.GE.MAX(1,ALGAE_START).AND.
     & (100*(LT/100).EQ.LT).AND.LT.LE.500) THEN
        DO I=1,231
          TAGFLO(I)=I*(LT/100)
          CALL ADD_PARTICLE(XFLOT(I),YFLOT(I),0.D0,TAGFLO(I),NFLOT,
     &                    NFLOT_MAX,XFLOT,YFLOT,YFLOT,TAGFLO,
     &                    SHPFLO,SHPFLO,ELTFLO,ELTFLO,MESH,1,
     &                    0.D0,0.D0,0.D0,0.D0,0,0)
          WRITE(*,*) LT, XFLOT(I), YFLOT(I), TAGFLO(I)
        ENDDO
      ENDIF
I have tracked the error trap in streamline.f but I do not fully understand why it is triggered. Is it because NFLOT is not incremented between the successive calls to the ADD_PARTICLE subroutine?

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

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