Welcome, Guest
Username: Password: Remember me

TOPIC: How to set Q values for two boundaries through fortran programming

How to set Q values for two boundaries through fortran programming 5 months 2 weeks ago #44898

  • fsjwlf
  • fsjwlf's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 1
official example "telemac2d/confluence" shows how to set the discharge value for one boundary through fortran programming:
SUBROUTINE USER_Q(I, Q)
USE BIEF
USE DECLARATIONS_SPECIAL
USE DECLARATIONS_TELEMAC
USE DECLARATIONS_TELEMAC2D
USE INTERFACE_TELEMAC2D, EX_USER_Q => USER_Q, EX_Q => Q
IMPLICIT NONE
INTEGER , INTENT(IN) :: I
DOUBLE PRECISION, INTENT(INOUT) :: Q
Q = DEBIT(I) * MIN( AT/10.D0 , 1.D0 )
END SUBROUTINE USER_Q


In my model, there are two inflows. How to set two inflow values through user_q.f?
(I think maybe I can set different "Q" according to INTENT(IN) I, but I don't know how to write the code. Should I define Q1 and Q2?
The administrator has disabled public write access.

How to set Q values for two boundaries through fortran programming 5 months 2 weeks ago #44899

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi
To use fortran programming, you should start by learning fortran...
There is other option to manage boundary condition in an easier way than programming, maybe you could have a look to those solutions (-> read the user manual!)
Regards
Christophe
The administrator has disabled public write access.

How to set Q values for two boundaries through fortran programming 5 months 2 weeks ago #44901

  • fsjwlf
  • fsjwlf's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 1
Thank you~
I know I can manage boundary through boundary files (T, Q(1), Q(2))
but I want to couple 1D hydrodynamic model with the Telemac 2D
so I want to set the Q value through programming.

Anyway, Thanks for your reply
The administrator has disabled public write access.

How to set Q values for two boundaries through fortran programming 5 months 2 weeks ago #44904

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
To use user_q subroutine you have to give the Q value according to I (which is the number of the boundary) then something like:
if I=1 Q=Q1
elseif I=2 Q=Q2
...
Endif

Regards
Christophe
The administrator has disabled public write access.
The following user(s) said Thank You: fsjwlf

How to set Q values for two boundaries through fortran programming 5 months 2 weeks ago #44907

  • fsjwlf
  • fsjwlf's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 11
  • Thank you received: 1
Thank you!!!!! I successfully set two Q values!
The administrator has disabled public write access.
Moderators: pham

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