Welcome, Guest
Username: Password: Remember me

TOPIC: Measure Flow upstream a weir

Measure Flow upstream a weir 4 years 4 months ago #36376

  • FLC
  • FLC's Avatar
Hi everyone,

In order to control the water surface elevation upstream a weir (modelled with topography, not with a 1D weir law) is there a
way to easily measure the flow through a cross-section and get the value in the fortran code ?

Best Regards.
The administrator has disabled public write access.

Measure Flow upstream a weir 4 years 4 months ago #36377

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1559
  • Thank you received: 602
Hello FLC,

What about reading the "control sections" section described in the TELEMAC-2D user manual?

Hope this helps,

Chi-Tuan
The administrator has disabled public write access.
The following user(s) said Thank You: FLC

Measure Flow upstream a weir 4 years 4 months ago #36379

  • FLC
  • FLC's Avatar
Hello Chi-Tuan,

First, thanks for your answer.
In fact, it was part of my first idea but I need real-time flow values (that i can use in a fortran code) and not just values of the flow output file once the simulation is achieved.

Best regards,

Fabien
The administrator has disabled public write access.

Measure Flow upstream a weir 4 years 4 months ago #36380

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1559
  • Thank you received: 602
Hello Fabien,

I think you can read the source codes, in particular FLUXPR_TELEMAC2D subroutine and its note:
!note PRINTOUTS OF DISCHARGES THROUGH CONTROL SECTIONS ARE DONE
!+ IN THIS ROUTINE. YOU CAN REWRITE IT TO DIVERT THESE
!+ PRINTOUTS TO A FILE OR TO CHANGE THE FORMAT

Hope this helps,

Chi-Tuan
The administrator has disabled public write access.
The following user(s) said Thank You: FLC

Measure Flow upstream a weir 4 years 3 months ago #36471

  • FLC
  • FLC's Avatar
Hello Pham,

Thank you very much for your response.
I follow your instructions and it seems to work.

Best Regards,
The administrator has disabled public write access.

Measure Flow upstream a weir 4 years 3 months ago #36487

  • FLC
  • FLC's Avatar
Hello Pham,

In fact,it works but only from FLUXPR_TELEMAC2D and all of its arguments are "INTENT IN", so it can't be called from another subroutine.

Is there a way to have an access to the flow from another subroutine with a simple function like FLOW(section number, time) or, at less, to store the results of fluxpr_telemac2d in a global variable ?

Have a good day

Best regards,

Fabien
The administrator has disabled public write access.

Measure Flow upstream a weir 4 years 3 months ago #36497

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1559
  • Thank you received: 602
Hello Fabien,

INTENT IN only means that variables declared with such arguments can only be read, not changed in this subroutine.

Copy this FLUXPR_TELEMAC2D in your FORTRAN FILE and implement directly what you want inside this subroutine. If all needed variables are available in this subroutine, it is OK. Otherwise if they are variables known in declarations_telemac2d, you can add them on the line USE DECLARATIONS_TELEMAC2D, ONLY after NSE_FPR.

Otherwise, copy FLUXPR_TELEMAC2D in your FORTRAN FILE with a different name, e.g. FLUXPR_TELEMAC2D_2, call it in FLUSEC_TELEMAC2D with the new name FLUXPR_TELEMAC2D_2 and change the number of arguments to get new variables computed in FLUXPR_TELEMAC2D_2 you want (and delete the INTENT IN mentions). Then you can do and get whatever you want.

Hope this helps,

Chi-Tuan
The administrator has disabled public write access.

Measure Flow upstream a weir 4 years 3 months ago #36498

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1559
  • Thank you received: 602
For the 2nd suggestion, you also have to copy FLUSEC_TELEMAC2D subroutine of course in your FORTRAN FILE and modified it as already told.

Chi-Tuan
The administrator has disabled public write access.

Measure Flow upstream a weir 4 years 3 months ago #36505

  • FLC
  • FLC's Avatar
Hi Pham,

This time, it works.
It's simpler to work directly from FLUXPR_TELEMAC2D and call all variables we need (like mesh or zf for example) from DECLARATIONS_TELEMAC2D.

Thank you

Fabien
The administrator has disabled public write access.
Moderators: pham

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