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

TOPIC: Liquid boundary problem with Parallel mode

Liquid boundary problem with Parallel mode 8 years 8 months ago #20008

  • amanj2013
  • amanj2013's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 211
  • Thank you received: 24
Hi everyone,

I have an issue with boundary condition file when running in parallel mode. I have an open sea liquid boundary which is programmed with SL function to read a liquid boundary file for each node and at each time step there is a value for water elevation. When I am running in scalar mode, everything is fine and correct; however, when running in parallel mode, it gives wrong value to the liquid boundary nodes.
here is the function:
! ****************************
DOUBLE PRECISION FUNCTION SL
! ****************************
!
&( I , N )
!
!***********************************************************************
! TELEMAC2D V6P2 08/11/2011
!***********************************************************************
!
!brief PRESCRIBES THE FREE SURFACE ELEVATION FOR LEVEL IMPOSED
!+ LIQUID BOUNDARIES.
!
!history J-M HERVOUET (LNHE)
!+ 17/08/1994
!+ V6P0
!+
!
!history N.DURAND (HRW), S.E.BOURBAN (HRW)
!+ 13/07/2010
!+ V6P0
!+ Translation of French comments within the FORTRAN sources into
!+ English comments
!
!history N.DURAND (HRW), S.E.BOURBAN (HRW)
!+ 21/08/2010
!+ V6P0
!+ Creation of DOXYGEN tags for automated documentation and
!+ cross-referencing of the FORTRAN sources
!
!history C. COULET (ARTELIA GROUP)
!+ 08/11/2011
!+ V6P2
!+ Modification size FCT due to modification of TRACER numbering
!
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!| I |-->| NUMBER OF LIQUID BOUNDARY
!| N |-->| GLOBAL NUMBER OF POINT
!| | | IN PARALLEL NUMBER IN THE ORIGINAL MESH
!~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
!
USE BIEF
USE DECLARATIONS_TELEMAC
USE DECLARATIONS_TELEMAC2D
USE INTERFACE_TELEMAC2D, EX_SL => SL
!
IMPLICIT NONE
INTEGER LNG,LU
COMMON/INFO/LNG,LU
!
!+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
!
INTEGER, INTENT(IN) :: I,N
!
!+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
!
CHARACTER*12 FCT !(changed)
INTEGER J
INTEGER M ! (ADDED)
LOGICAL, SAVE :: DEJA=.FALSE.
LOGICAL, DIMENSION(MAXFRO), SAVE :: OK
!
! FIRST CALL, OK INITIALISED TO .TRUE.
!
IF(.NOT.DEJA) THEN
DO J=1,MAXFRO ! INTEGER, parameter MAXFRO = 3000 BY DEFAULT
OK(J)=.TRUE.
ENDDO
! DEJA=.TRUE. (changed)
ENDIF
!
!
!
! IF THE LIQUID BOUNDARY FILE EXISTS, ATTEMPTS TO FIND
! THE VALUE IN IT. IF YES, OK REMAINS TO .TRUE. FOR NEXT CALLS
! IF NO, OK IS SET TO .FALSE.
!
IF(OK(I).AND.T2D_FILES(T2DIMP)%NAME(1:1).NE.' ') THEN
!
IF (NCSIZE.GT.1) THEN
M=MESH%KNOLG%I(N)
ELSE
M=N
ENDIF
! M=N
! FCT WILL BE SL(1), SL(2), ETC, SL(99), DEPENDING ON I
FCT(1:4)='ETA('
IF(M.LT.10) THEN
WRITE(FCT(5:5),FMT='(I1)') M
FCT(6:12)=')'
ELSEIF(M.LT.100) THEN
WRITE(FCT(5:6),FMT='(I2)') M
FCT(7:12)=')'
ELSEIF(M.LT.1000) THEN
WRITE(FCT(5:7),FMT='(I3)') M
FCT(8:12)=')'
ELSEIF(M.LT.10000) THEN
WRITE(FCT(5:8),FMT='(I4)') M
FCT(9:12)=')'
ELSEIF(M.LT.100000) THEN
WRITE(FCT(5:9),FMT='(I5)') M
FCT(10:12)=')'
ELSEIF(M.LT.1000000) THEN
WRITE(FCT(5:10),FMT='(I6)') M
FCT(11:12)=')'
ELSE
WRITE(LU,*) 'SL NOT PROGRAMMED FOR MORE THAN 99999 BOUNDARIES'
CALL PLANTE(1)
STOP
ENDIF
CALL READ_FIC_FRLIQ(SL,FCT,AT,T2D_FILES(T2DIMP)%LU,ENTET,OK(I))
!
ENDIF
!
IF(.NOT.OK(I).OR.T2D_FILES(T2DIMP)%NAME(1:1).EQ.' ') THEN
!
! PROGRAMMABLE PART
! SL IS READ FROM THE STEERING FILE, BUT MAY BE CHANGED
!
IF(NCOTE.GE.I) THEN
SL = COTE(I)
ELSE
IF(LNG.EQ.1) WRITE(LU,100) I
100 FORMAT(1X,/,1X,'SL : COTES IMPOSEES EN NOMBRE INSUFFISANT'
& ,/,1X,' DANS LE FICHIER DES PARAMETRES'
& ,/,1X,' IL EN FAUT AU MOINS : ',1I6)
IF(LNG.EQ.2) WRITE(LU,101) I
101 FORMAT(1X,/,1X,'SL: MORE PRESCRIBED ELEVATIONS ARE REQUIRED'
& ,/,1X,' IN THE PARAMETER FILE'
& ,/,1X,' AT LEAST ',1I6,' MUST BE GIVEN')
CALL PLANTE(1)
STOP
ENDIF
!
ENDIF
!
!
!
RETURN
END

I also have a subroutine SUBROUTINE READ_FIC_FRLIQ which is as standard mode in Telemac.

my liquid file looks like:
look at the picture
The ETA( ) here is the global node no at liquid boundary in scalar mode.
any help?
Thanks,
AMANJ
Attachments:
The administrator has disabled public write access.

Liquid boundary problem with Parallel mode 8 years 8 months ago #20013

  • amanj2013
  • amanj2013's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 211
  • Thank you received: 24
I FOUND THAT WHEN IN PARALLEL MODE, TELEMAC2D DOESNT CALL SL AND AS WELL LIQUID BOUNDARY VALUE FILE. THE PROBLEM IS OUTSIDE OF THIS FUNCTION, I TRIED TO FIND WHEN CALLING SL INSIDE BORD I COULDNT FIND.

ANY IDEA?

AMANJ
The administrator has disabled public write access.

Liquid boundary problem with Parallel mode 8 years 8 months ago #20014

  • amanj2013
  • amanj2013's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 211
  • Thank you received: 24
HERE IS THE LOOP WHERE CALLING SL IN BORD ROUTINE I FOUND CALLING SL BUT I DONT KNOW WHY DOESNT CALL LIQUID FILE?

LOOP ON ALL BOUNDARY POINTS
!
DO K=1,NPTFR
!
! LEVEL IMPOSED WITH VALUE GIVEN IN THE CAS FILE (NCOTE0)
!
IF(LIHBOR(K).EQ.KENT) THEN
!
IFRLIQ=NUMLIQ(K)
!
! IFRLIQ.EQ.0 MAY HAPPEN WITH WEIRS
IF(IFRLIQ.GT.0) THEN
IF(STA_DIS_CURVES(IFRLIQ).EQ.1) THEN
Z = STA_DIS_CUR(IFRLIQ,FLUX_BOUNDARIES(IFRLIQ),
& PTS_CURVES(IFRLIQ),QZ,NFRLIQ,
& ZF(NBOR(K))+H%R(NBOR(K)))
HBOR(K) = MAX( 0.D0 , Z-ZF(NBOR(K)) )
H%R(NBOR(K))=HBOR(K)
ELSEIF(NCOTE.GT.0.OR.NOMIMP(1:1).NE.' ') THEN
N=NBOR(K)
IF(NCSIZE.GT.1) N=MESH%KNOLG%I(N)
Z = SL(IFRLIQ,N)
HBOR(K) = MAX( 0.D0 , Z-ZF(NBOR(K)) )
H%R(NBOR(K))=HBOR(K)
! ELSE HBOR TAKEN IN BOUNDARY CONDITIONS FILE
ENDIF
ENDIF
!
ENDIF
!
The administrator has disabled public write access.

Liquid boundary problem with Parallel mode 8 years 8 months ago #20015

  • amanj2013
  • amanj2013's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 211
  • Thank you received: 24
The problem is with NPTFR number of boundary points, here in my case, I have 2383 points in scalar, when is going to parallel with 4 processor, it read only 154 and this is not true.
The administrator has disabled public write access.

Liquid boundary problem with Parallel mode 8 years 8 months ago #20025

  • jmhervouet
  • jmhervouet's Avatar
Hello,

Yes in parallel every sub-domain will have only its boundary nodes, so a smaller number than the total, it is normal. Then if in a sub-domain there is no point with prescribed elevation it will not read the liquid boundary file, so again normal, and I do not really see if there is really a problem in your case. You must keep in mind that only processor 0 is talking to you in the listing, other processors are redirected to the log files.

With best regards,

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

Liquid boundary problem with Parallel mode 8 years 8 months ago #20050

  • amanj2013
  • amanj2013's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 211
  • Thank you received: 24
Thank you dear Jean-Michel Hervouet,

I attached my Fortran file and when I am running in scalar or one processor, the code it reads the liquid boundary values which here are harmonic elevation values for each nodes at open sea liquid boundary and everything is fine. However, when running with 4 processors for example, it gives wrong value to the liquid boundary points which should be the same as in scalar.

I also have another issue with tidal simulation. for the same model, when the flood coming, the stationary velocity profile at some specific area what I used as control point is fine; however, during ebb flow is fluctuating strongly and I don't know what will cause this. All running under v7p0r1.
Attachments:
The administrator has disabled public write access.

Liquid boundary problem with Parallel mode 8 years 8 months ago #20054

  • jmhervouet
  • jmhervouet's Avatar
Hello,

At least I got the first point. If you look at line 203 of subroutine bord.f, we already do N=MESH%KNOLG%I(N), so you should not repeat it in function SL, otherwise the rest seems good.

With best regards,

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

Liquid boundary problem with Parallel mode 8 years 8 months ago #20063

  • amanj2013
  • amanj2013's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 211
  • Thank you received: 24
Thank you dear Jean-Michel Hervouet,

Now it works in parallel too. The only problem is the amplitude of velocity during ebb flow as a result of an island.
As you can see the velocity at flood flow is smooth ; however, during ebb is fluctuating strongly. what I am expecting of velocity is should be smooth in both cases as appear in the attached picture. But unfortunately is not.
The administrator has disabled public write access.

Liquid boundary problem with Parallel mode 8 years 8 months ago #20064

  • jmhervouet
  • jmhervouet's Avatar
Hello,

Could it be that at ebb flow the problem is not well posed, e.g. with entering free velocity, in which case the Thompson's boundary conditions would be necessary?

Regards,

JMH
The administrator has disabled public write access.

Liquid boundary problem with Parallel mode 8 years 8 months ago #20066

  • amanj2013
  • amanj2013's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 211
  • Thank you received: 24
Hello,

I believe this problem related to the version of Telemac. Currently I am using 7P01. however, before I was using 6p3 and the result was fine. The problem is occurred in 7p01. I am using the same steering file in new version as used in old version.

Thanks

AMANJ
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.