Welcome, Guest
Username: Password: Remember me

TOPIC: Addresses of three triangle vertex in Telemac2D

Addresses of three triangle vertex in Telemac2D 11 years 9 months ago #7578

  • nguyenthong_BK
  • nguyenthong_BK's Avatar
Dear all ,
I'm a Telemac 2D user. In my fortran file, I would like to calculate the area of a triangular element. My question is what's the name of this variable in Telemac2D that will give the addresses of three triangle vertex? In addition, I can find other variable definition in which source code fortran file? Thank you very much for your help.
Best regards
Thong NGUYEN
HCMUT Viet Nam
The administrator has disabled public write access.

Addresses of three triangle vertex in Telemac2D 11 years 9 months ago #7580

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi
MESH%X%R(i) and MESH%Y%R(i) could gives you the position of node i
Generaly, all the variables are declared in the subroutine point_telemac2d

Regards
Christophe
The administrator has disabled public write access.

Addresses of three triangle vertex in Telemac2D 11 years 9 months ago #7585

  • nguyenthong_BK
  • nguyenthong_BK's Avatar
Dear Mr. C. Coulet,
Thank you alot for your prompt response. In fact, I would like to find 3 value i (node i) of a considered triangular element (not MESH%X%R(i) and MESH%Y%R(i)). When I found three node of triangular, then I will calculate the area (I already have this mathematical formula).
Best regards
Thong NGUYEN
The administrator has disabled public write access.

Addresses of three triangle vertex in Telemac2D 11 years 9 months ago #7586

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi

Sorry for the mistake.

You could use IKLE(ielem, 1), IKLE(ielem, 2) or IKLE(ielem, 3) for node 1, 2 or 3
On some subroutines, IKLE is also declared as a vector instead of an array so in this case you should use IKLE%I(ielem), IKLE%I(ielem+nelmax) or IKLE%I(ielem+ 2*nelmax)

You could find some exmaples in subroutines like dragfo.f, corpor.f or flusec_telemac2d

Regards
Christophe
The administrator has disabled public write access.

Addresses of three triangle vertex in Telemac2D 11 years 9 months ago #7587

  • nguyenthong_BK
  • nguyenthong_BK's Avatar
Salut,
Thank you very much. That's all what I need.
Best regards
Thong NGUYEN
HCMUT Viet Nam
The administrator has disabled public write access.

Addresses of three triangle vertex in Telemac2D 11 years 9 months ago #7598

  • jmhervouet
  • jmhervouet's Avatar
Hello,

To complement what Christophe said, please note also that if MESH is a BIEF_MESH structure, like MESH in Telemac-2D and MESH2D in Telemac-3D, then MESH%SURFAC%R(IELEM) is the area of element IELEM.

Regards,

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

Addresses of three triangle vertex in Telemac2D 11 years 9 months ago #7613

  • nguyenthong_BK
  • nguyenthong_BK's Avatar
Dear Mr J. M. Hervouet
Thank you very much for your suggestion. It's very useful for me when I modify the bottom topography in my fortran file.
In addition, I would like to know if we already have a Subroutine which allows the topography to be updated for each time step? Thank you in advance.
Best regards
Thong NGUYEN
HCMUT Viet Nam
The administrator has disabled public write access.

Addresses of three triangle vertex in Telemac2D 11 years 9 months ago #7621

  • jmhervouet
  • jmhervouet's Avatar
Hello Thong !

Actually I think you can change the bottom anywhere, as the depth is conserved and the free surface recomputed as bottom + depth. For example utimp_telemac2d.f is called at every time step, so you can do it there, it is done for this.

Regards,

Jean-Michel
The administrator has disabled public write access.

Addresses of three triangle vertex in Telemac2D 11 years 9 months ago #7623

  • nguyenthong_BK
  • nguyenthong_BK's Avatar
Salut Jean-Michel,
Thank you very much for your advice. I will apply it in my problem.
Best regards
Thong NGUYEN
HCMUT Viet Nam
The administrator has disabled public write access.
Moderators: pham

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