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

TOPIC: Displaying Free Surface Clipped to Edge of Water

Displaying Free Surface Clipped to Edge of Water 9 years 5 months ago #17160

  • ingénieure
  • ingénieure's Avatar
Thank you for sharing! I will definitely set that up in TELEMAC from now on.
The administrator has disabled public write access.

Displaying Free Surface Clipped to Edge of Water 9 years 5 months ago #17163

  • Fauret
  • Fauret's Avatar
  • OFFLINE
  • Junior Boarder
  • Posts: 44
  • Thank you received: 12
Once you are in the fortran, you can easily take full advantage of the unlimited flexibilty of Telemac, for instance by getting the surface area of the flooded regions (you just need to add the surface area of all elements which depth is > 0.05).
Thierry
The administrator has disabled public write access.
The following user(s) said Thank You: ingénieure

Displaying Free Surface Clipped to Edge of Water 9 years 5 months ago #17344

  • ingénieure
  • ingénieure's Avatar
Could you provide a bit more guidance on modifying the fortran code?

I've added a new variable in NOMVAR_TELEMAC2D
TEXTE (32) = 'CLIPPED WSE M '
! VARIABLE 32
MNEMO(32) = 'CWSE '

I've then inserted a section after line 579 in PRERES_TELEMAC2D
! CLIP FREE SURFACE ELEVATION IF DEPTH < 0.01 m

I'm getting an error message since I haven't defined CWSE. Where and how should CWSE be defined? I'll attached my fortran file to this post. Any help would be greatly appreciated.

File Attachment:

File Name: Fortran.f
File Size: 25 KB
The administrator has disabled public write access.

Displaying Free Surface Clipped to Edge of Water 9 years 5 months ago #17347

  • jmhervouet
  • jmhervouet's Avatar
Hello,

There is no variable CWSE created and allocated with what you did. In fact you have 4 user variables that can be used in block PRIVE, so if you do exactly what you have done, but for variable 23, everything will be OK as this variable is already allocated, and you just have to change CWSE into PRIVE%ADR(1)%P in preres_telemac2d.

With best regards,

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

Displaying Free Surface Clipped to Edge of Water 9 years 5 months ago #17369

  • ingénieure
  • ingénieure's Avatar
Thank you, but this is a bit beyond my fortran comfort level. Could you provide a little more guidance with the lines below?


!==========================================================
! CLIP FREE SURFACE ELEVATION IF DEPTH < 0.01 m
!==========================================================
!
IF((LEO.AND.SORLEO(23)).OR.(IMP.AND.SORIMP(23))) THEN
DO N=1,NPOIN
CWSE(N)=PRIVE%ADR(1)%P(N)
IF (H%R(N).GT.0.01D0) THEN
CWSE%R(N)=S%R(N)
ELSE
CWSE%R(N)=-999
ENDIF
ENDDO
ENDIF
!
The administrator has disabled public write access.

Displaying Free Surface Clipped to Edge of Water 9 years 5 months ago #17370

  • jmhervouet
  • jmhervouet's Avatar
Hello,

I just mean this:

IF((LEO.AND.SORLEO(23)).OR.(IMP.AND.SORIMP(23))) THEN
DO N=1,NPOIN
IF (H%R(N).GT.0.01D0) THEN
PRIVE%ADR(1)%P(N)=H%R(N)+ZF%R(N)
ELSE
PRIVE%ADR(1)%P(N)=-999.D0
ENDIF
ENDDO
ENDIF

There is no variable S, and CWSE does not exist either, it would have to be declared with type BIEF_OBJ and then allocated with BIEF_ALLVEC (all this is explained in the guide for programming which is available on this site, but is not useful here).

Regards,

JMH
The administrator has disabled public write access.

Displaying Free Surface Clipped to Edge of Water 9 years 5 months ago #17372

  • ingénieure
  • ingénieure's Avatar
Thank you very much!
I got it to work by adding %R to PRIVE%ADR(1)%P%R(N) in the lines you provided.
The administrator has disabled public write access.
  • Page:
  • 1
  • 2
Moderators: Serrer, a.barton

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