Welcome, Guest
Username: Password: Remember me

TOPIC: [Bugs] Flowrate mulitply by number of nodes on Dirac sources

[Bugs] Flowrate mulitply by number of nodes on Dirac sources 7 months 1 week ago #44542

  • Amalvir
  • Amalvir's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 10
  • Thank you received: 3
Hi !

I ran some test on the v8p4r0, and it appears that the flowrate of a source is multiplied by the number of nodes to which it is applied when the sources are defined by regions with Dirac type.

This bug happens in FV and FE schemes and I ran the test with 1 processor.

I attached my test case and the graph of the output flowrate.

I hope I'm in the right place to report bugs.

Thank you for your help !
Attachments:
The administrator has disabled public write access.

[Bugs] Flowrate mulitply by number of nodes on Dirac sources 7 months 1 week ago #44575

  • Amalvir
  • Amalvir's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 10
  • Thank you received: 3
Maybe it is related to the issue #802 (gitlab.pam-retd.fr/otm/telemac-mascaret/-/issues/802) ? But this new one is not related to parallelism...

Has anyone experienced the same ?

Thank you for your answers.
The administrator has disabled public write access.

[Bugs] Flowrate mulitply by number of nodes on Dirac sources 7 months 1 week ago #44577

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

I am not sure this combo of features (sources by regions + Dirac sources) was imagined by the developer who introduced sources by regions in TELEMAC-2D (I am pretty sure it was not).
For sure, there is no example to validate this combo.
Thanks for pointed it out.

Anyway, I (or if somebody else wants to try) have to investigate how is the best manner to fix this issue. I think an equivalent array as AREA_P should be computed by TELEMAC2D_INIT subroutine and transmitted to PROSOU subroutine (to divide by the number of nodes covered by the region definition).
My first idea is to convert SUM_TNP to an array of dimension the number of regions and declare it in DECLARATIONS_TELEMAC2D (+ allocation/deallocation as done for AREA_P) + use it in PROSOU. Parallelism seems to have already been imagined.

I come back when I have a validated solution (at least for your test case).

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

[Bugs] Flowrate mulitply by number of nodes on Dirac sources 7 months 1 week ago #44580

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

Please find enclosed my first tentative fix for your issue. For your test cases, it seems to work correctly, even in parallel! The thing I have not tried yet is if the region belongs to several subdomains when using parallelism (perhaps it is your case with 4 subdomains but I have not checked).

The fix works with the main. If you use a v8p5, there is another fix in TELEMAC2D_INIT subroutine but a partial fix as the rest of the fix is included in other files. If using a v8p5, you should change T14 with FV at line 644 when calling RESCUE) in case you want to use the fix for regions + Dirac + computation continuation.

One additional advice if you want to use control section is not to use the feature with keywords (old method) but using a SECTION INPUT FILE + a SECTION OUTPUT FILE to write the results in an ASCII output file (rather than only in the listing) because this 2nd method is the only one which works in parallel. Please find enclosed an example with your 2 node numbers.

Can you confirm it is OK for you, so that I will be able to push on the main please?

Chi-Tuan

File Attachment:

File Name: control_section.txt
File Size: 0 KB


File Attachment:

File Name: telemac2d_init_2024-04-16.f
File Size: 51 KB


File Attachment:

File Name: prosou.f
File Size: 30 KB
The administrator has disabled public write access.

[Bugs] Flowrate mulitply by number of nodes on Dirac sources 7 months 1 week ago #44584

  • Amalvir
  • Amalvir's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 10
  • Thank you received: 3
Thank you for your quick answer, I will test it as soon as possible, and I'll let you know.

Many thanks for the tips about the control section, I didn't know it was the old way. I checked the manual and it's right there, so my bad x)
The administrator has disabled public write access.

[Bugs] Flowrate mulitply by number of nodes on Dirac sources 7 months 1 day ago #44631

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

FYI, the fix I have suggested does not work in parallel if the region belongs to several subdomains in parallel. I have to change it.

Chi-Tuan
The administrator has disabled public write access.

[Bugs] Flowrate mulitply by number of nodes on Dirac sources 7 months 1 day ago #44632

  • Amalvir
  • Amalvir's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 10
  • Thank you received: 3
Hi,

Ok, I'm sorry, I haven't had time to take care of it yet.
Thank you for your work.

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

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