# Couple TELEMAC-DWAQ : How to Implement Weirs - Home - Delft3D

## Message Boards

### Couple TELEMAC-DWAQ : How to Implement Weirs

JL

##### Joon Lee, modified 6 Years ago.

#### Couple TELEMAC-DWAQ : How to Implement Weirs

Youngling Posts: 13 Join Date: 11/6/12 Recent Posts 00

I developed a TELEMAC model for a river with two weirs.

I runned the model and tried to couple with DWAQ.

However, I had an error message at the WAQ(1) step, as shown below in the .lst file.

----------------------------------------------------------------------------------------------------------------------------------------------------------------

************************************************************************************************************* B L O C K - 4 *****

Bound nr: boundary-IDs: boundary-names: boundary-types:

1 6007 (Section 1 - 1)6007 (Section 1 - 1) 1/1 (Section 1 - 1)

2 6284 (Section 1 - 1)6284 (Section 1 - 1) 1/1 (Section 1 - 1)

3 6559 (Section 1 - 1)6559 (Section 1 - 1) 1/1 (Section 1 - 1)

4 6832 (Section 1 - 1)6832 (Section 1 - 1) 1/1 (Section 1 - 1)

5 7102 (Section 1 - 1)7102 (Section 1 - 1) 1/1 (Section 1 - 1)

6 7370 (Section 1 - 1)7370 (Section 1 - 1) 1/1 (Section 1 - 1)

7 7637 (Section 1 - 1)7637 (Section 1 - 1) 1/1 (Section 1 - 1)

8 7903 (Section 1 - 1)7903 (Section 1 - 1) 1/1 (Section 1 - 1)

9 8167 (Section 1 - 1)8167 (Section 1 - 1) 1/1 (Section 1 - 1)

10 8430 (Section 1 - 1)8430 (Section 1 - 1) 1/1 (Section 1 - 1)

11 0 (Section 1 - 1) 0 (Section 1 - 1) 1/1 (Section 1 - 1)

12 199 (Section 2 - 1) 199 (Section 2 - 1) 2/1 (Section 2 - 1)

13 401 (Section 2 - 1) 401 (Section 2 - 1) 2/1 (Section 2 - 1)

14 607 (Section 2 - 1) 607 (Section 2 - 1) 2/1 (Section 2 - 1)

15 817 (Section 2 - 1) 817 (Section 2 - 1) 2/1 (Section 2 - 1)

16 1031 (Section 2 - 1)1031 (Section 2 - 1) 2/1 (Section 2 - 1)

17 1249 (Section 2 - 1)1249 (Section 2 - 1) 2/1 (Section 2 - 1)

18 1468 (Section 2 - 1)1468 (Section 2 - 1) 2/1 (Section 2 - 1)

19 1688 (Section 2 - 1)1688 (Section 2 - 1) 2/1 (Section 2 - 1)

20 1909 (Section 2 - 1)1909 (Section 2 - 1) 2/1 (Section 2 - 1)

ERROR reading file on unit: 39, filename: test1.inp

Line on input file was:

2 ; use defaults

^

Expected was a character !

Detected was an integer !

ERROR. Reading block 5 !! Check input file !!

Number of ERRORS during read of input file: 2 !!

Further processing impossible.

*************** EXECUTION HALTED !! ***************

----------------------------------------------------------------------------------------------------------------------------------------------------------------

Soon, I noticed that there is a mismatch of "Number of boundaries".

The number from dwq_delwaq-frmto.dwq (for EXCHANGES BETWEEN NODES DELWAQ FILE) was defined to be 48, including some nodes for the weirs.

On the contrary, the number written by DEL_GUI was defined to be 20, which is for the inlet and outlet, but not for the weirs.

Actually, the nodes for the weirs are not open boundaries.

So... the question is ... Is there any way to edit "EXCHANGES BETWEEN NODES DELWAQ FILE", (1) to correct the (actual) number of boundaries and (2) to make exchange connections between the pairs of weir nodes?

Best Regards,

Joon Lee

Assisstant Professor

School of Construction and Environmental Engineering

Kyungpook National University

I runned the model and tried to couple with DWAQ.

However, I had an error message at the WAQ(1) step, as shown below in the .lst file.

----------------------------------------------------------------------------------------------------------------------------------------------------------------

************************************************************************************************************* B L O C K - 4 *****

Bound nr: boundary-IDs: boundary-names: boundary-types:

1 6007 (Section 1 - 1)6007 (Section 1 - 1) 1/1 (Section 1 - 1)

2 6284 (Section 1 - 1)6284 (Section 1 - 1) 1/1 (Section 1 - 1)

3 6559 (Section 1 - 1)6559 (Section 1 - 1) 1/1 (Section 1 - 1)

4 6832 (Section 1 - 1)6832 (Section 1 - 1) 1/1 (Section 1 - 1)

5 7102 (Section 1 - 1)7102 (Section 1 - 1) 1/1 (Section 1 - 1)

6 7370 (Section 1 - 1)7370 (Section 1 - 1) 1/1 (Section 1 - 1)

7 7637 (Section 1 - 1)7637 (Section 1 - 1) 1/1 (Section 1 - 1)

8 7903 (Section 1 - 1)7903 (Section 1 - 1) 1/1 (Section 1 - 1)

9 8167 (Section 1 - 1)8167 (Section 1 - 1) 1/1 (Section 1 - 1)

10 8430 (Section 1 - 1)8430 (Section 1 - 1) 1/1 (Section 1 - 1)

11 0 (Section 1 - 1) 0 (Section 1 - 1) 1/1 (Section 1 - 1)

12 199 (Section 2 - 1) 199 (Section 2 - 1) 2/1 (Section 2 - 1)

13 401 (Section 2 - 1) 401 (Section 2 - 1) 2/1 (Section 2 - 1)

14 607 (Section 2 - 1) 607 (Section 2 - 1) 2/1 (Section 2 - 1)

15 817 (Section 2 - 1) 817 (Section 2 - 1) 2/1 (Section 2 - 1)

16 1031 (Section 2 - 1)1031 (Section 2 - 1) 2/1 (Section 2 - 1)

17 1249 (Section 2 - 1)1249 (Section 2 - 1) 2/1 (Section 2 - 1)

18 1468 (Section 2 - 1)1468 (Section 2 - 1) 2/1 (Section 2 - 1)

19 1688 (Section 2 - 1)1688 (Section 2 - 1) 2/1 (Section 2 - 1)

20 1909 (Section 2 - 1)1909 (Section 2 - 1) 2/1 (Section 2 - 1)

ERROR reading file on unit: 39, filename: test1.inp

Line on input file was:

2 ; use defaults

^

Expected was a character !

Detected was an integer !

ERROR. Reading block 5 !! Check input file !!

Number of ERRORS during read of input file: 2 !!

Further processing impossible.

*************** EXECUTION HALTED !! ***************

----------------------------------------------------------------------------------------------------------------------------------------------------------------

Soon, I noticed that there is a mismatch of "Number of boundaries".

The number from dwq_delwaq-frmto.dwq (for EXCHANGES BETWEEN NODES DELWAQ FILE) was defined to be 48, including some nodes for the weirs.

On the contrary, the number written by DEL_GUI was defined to be 20, which is for the inlet and outlet, but not for the weirs.

Actually, the nodes for the weirs are not open boundaries.

So... the question is ... Is there any way to edit "EXCHANGES BETWEEN NODES DELWAQ FILE", (1) to correct the (actual) number of boundaries and (2) to make exchange connections between the pairs of weir nodes?

Best Regards,

Joon Lee

Assisstant Professor

School of Construction and Environmental Engineering

Kyungpook National University

### Attachments:

AM

##### Arjen Markus, modified 6 Years ago.

#### RE: Couple TELEMAC-DWAQ : How to Implement Weirs

Jedi Knight Posts: 223 Join Date: 1/26/11 Recent Posts 00

I will try and see what I can do. I have never dealt with weirs in TELEMAC though, I have no idea how the interfacing is defined for them (only saw your post just now)

AM

##### Arjen Markus, modified 6 Years ago.

#### RE: Couple TELEMAC-DWAQ : How to Implement Weirs

Jedi Knight Posts: 223 Join Date: 1/26/11 Recent Posts 10

Besides the number of boundary segments found in the grid itself (via the CLI file) not being equal to the number of boundary segments found in the pointer table (the fromto file), I also see a "0" for the index of the segment attached to one of the boundary segments - it should have been 8691.

Not sure yet where that is coming from.

But studying the output from the first step of Delft3D-WAQ, I conclude that the hanlling of weirs in the TELEMAC-DWAQ coupling leads to inconsistent exchanges. The workaround at the moment is to correct the pointer table. This requires some manual work as it is not clear from the available information where the weirs are located.

This is my receipe:

- The extra boundaries due to the weirs can be identified by comparing the section with boundary numbers and exchange numbers with the list of boundary segments in the LST file. Any boundary number from the first table not in the second one indicates such an extra boundary:

First table:

boundary exchange from to

number number segment segment

1 24447 -1 6007

2 24448 -2 6284

3 24449 -3 6559

4 24450 -4 6832

....

Second table:

1 6007 (Section 1 - 1)6007 (Section 1 - 1) 1/1 (Section 1 - 1)

2 6284 (Section 1 - 1)6284 (Section 1 - 1) 1/1 (Section 1 - 1)

3 6559 (Section 1 - 1)6559 (Section 1 - 1) 1/1 (Section 1 - 1)

4 6832 (Section 1 - 1)6832 (Section 1 - 1) 1/1 (Section 1 - 1)

5 7102 (Section 1 - 1)7102 (Section 1 - 1) 1/1 (Section 1 - 1)

6 7370 (Section 1 - 1)7370 (Section 1 - 1) 1/1 (Section 1 - 1)

7 7637 (Section 1 - 1)7637 (Section 1 - 1) 1/1 (Section 1 - 1)

8 7903 (Section 1 - 1)7903 (Section 1 - 1) 1/1 (Section 1 - 1)

9 8167 (Section 1 - 1)8167 (Section 1 - 1) 1/1 (Section 1 - 1)

10 8430 (Section 1 - 1)8430 (Section 1 - 1) 1/1 (Section 1 - 1)

11 0 (Section 1 - 1) 0 (Section 1 - 1) 1/1 (Section 1 - 1) ---- 0 should be 8691

....

- The trick now is to find out which DWAQ segment on the other side of the weir is connected to that. That is not that easy. You can use the visualisation area and click near the nodes to get the index. If you know where the weir is located then you can guess the adjacent node.

- Once you have assembled the translation table, something like:

boundary -12 (exchanging to 8431, exchange number 24458) is adjacent to boundary -32 (exchanging to 1468, exchange number 24478)

...

(note: arbitrary numbers, not at all sure this is really the case)

then you need to change the pointer table, so that the boundary segment -12 is changed to 8431 in the right position in the pointer table, that is, in exchange number 24458. And in the counter exchange, number 24478, you need to set both the from element and the to element to 0, so that this exchange is no longer active.

- The final step is to renumber the remaining boundary segments - in the pointer table again - in accordance with their position in the list of boundaries (the second table).

This is mostly tedious work, I am afraid. If you can find out the proper connections of these extra boundary segments, then I can correct the pointer table (or rather write a small program to do the actual work).

Not sure yet where that is coming from.

But studying the output from the first step of Delft3D-WAQ, I conclude that the hanlling of weirs in the TELEMAC-DWAQ coupling leads to inconsistent exchanges. The workaround at the moment is to correct the pointer table. This requires some manual work as it is not clear from the available information where the weirs are located.

This is my receipe:

- The extra boundaries due to the weirs can be identified by comparing the section with boundary numbers and exchange numbers with the list of boundary segments in the LST file. Any boundary number from the first table not in the second one indicates such an extra boundary:

First table:

boundary exchange from to

number number segment segment

1 24447 -1 6007

2 24448 -2 6284

3 24449 -3 6559

4 24450 -4 6832

....

Second table:

1 6007 (Section 1 - 1)6007 (Section 1 - 1) 1/1 (Section 1 - 1)

2 6284 (Section 1 - 1)6284 (Section 1 - 1) 1/1 (Section 1 - 1)

3 6559 (Section 1 - 1)6559 (Section 1 - 1) 1/1 (Section 1 - 1)

4 6832 (Section 1 - 1)6832 (Section 1 - 1) 1/1 (Section 1 - 1)

5 7102 (Section 1 - 1)7102 (Section 1 - 1) 1/1 (Section 1 - 1)

6 7370 (Section 1 - 1)7370 (Section 1 - 1) 1/1 (Section 1 - 1)

7 7637 (Section 1 - 1)7637 (Section 1 - 1) 1/1 (Section 1 - 1)

8 7903 (Section 1 - 1)7903 (Section 1 - 1) 1/1 (Section 1 - 1)

9 8167 (Section 1 - 1)8167 (Section 1 - 1) 1/1 (Section 1 - 1)

10 8430 (Section 1 - 1)8430 (Section 1 - 1) 1/1 (Section 1 - 1)

11 0 (Section 1 - 1) 0 (Section 1 - 1) 1/1 (Section 1 - 1) ---- 0 should be 8691

....

- The trick now is to find out which DWAQ segment on the other side of the weir is connected to that. That is not that easy. You can use the visualisation area and click near the nodes to get the index. If you know where the weir is located then you can guess the adjacent node.

- Once you have assembled the translation table, something like:

boundary -12 (exchanging to 8431, exchange number 24458) is adjacent to boundary -32 (exchanging to 1468, exchange number 24478)

...

(note: arbitrary numbers, not at all sure this is really the case)

then you need to change the pointer table, so that the boundary segment -12 is changed to 8431 in the right position in the pointer table, that is, in exchange number 24458. And in the counter exchange, number 24478, you need to set both the from element and the to element to 0, so that this exchange is no longer active.

- The final step is to renumber the remaining boundary segments - in the pointer table again - in accordance with their position in the list of boundaries (the second table).

This is mostly tedious work, I am afraid. If you can find out the proper connections of these extra boundary segments, then I can correct the pointer table (or rather write a small program to do the actual work).

JL

##### Joon Lee, modified 6 Years ago.

#### RE: Couple TELEMAC-DWAQ : How to Implement Weirs

Youngling Posts: 13 Join Date: 11/6/12 Recent Posts 00

Dear Arjen,

Could you shortly explain "how to edit the pointer table".

I may have to open the "dwq_delwaq-frmto.dwq" file, but I cannot open it with any editing program, such as NotePad.

Thank you!

Joon

Could you shortly explain "how to edit the pointer table".

I may have to open the "dwq_delwaq-frmto.dwq" file, but I cannot open it with any editing program, such as NotePad.

Thank you!

Joon

AM

##### Arjen Markus, modified 6 Years ago.

#### RE: Couple TELEMAC-DWAQ : How to Implement Weirs

Jedi Knight Posts: 223 Join Date: 1/26/11 Recent Posts 00

Hi Joon,

well, these files are either formatted, in which case your editor would show you four columns of numbers, or - which is more likely - they are binary, in which case an editor will show a lot of rubbish. What I meant was that I use the translation table I roughly described to edit the pointer table via a small program. Nothing really fancy, mind you, something very much ad hoc. The information needed for that is however the crucial part: you need to specify which nodes (segments) to connect. As I do not have the TELEMAC grid itself - nor the experience to examine these grids, I need you to take care of that bit.

Regards,

Arjen

well, these files are either formatted, in which case your editor would show you four columns of numbers, or - which is more likely - they are binary, in which case an editor will show a lot of rubbish. What I meant was that I use the translation table I roughly described to edit the pointer table via a small program. Nothing really fancy, mind you, something very much ad hoc. The information needed for that is however the crucial part: you need to specify which nodes (segments) to connect. As I do not have the TELEMAC grid itself - nor the experience to examine these grids, I need you to take care of that bit.

Regards,

Arjen

BL

##### Byung Joon Lee, modified 6 Years ago.

#### RE: Couple TELEMAC-DWAQ : How to Implement Weirs

Youngling Posts: 6 Join Date: 2/10/14 Recent Posts 00

Dear Arjen,

First of all, I am sorry for bothering you many times, and I am very thankful for your help!

I have written a new pointer table.

As you recommended,

(1) For flow direction of the adjacent weir nodes, I have written the from and to segment numbers.

(2) For counter-flow direction of the adjacent weir nodes, I have set the segment numbers to be zero.

(3) I have rearranged the boundary and segment numbers for the actual in- and out-flow boundaries.

See Table 1 below. Also, you can see Table 2 with detailed explanation.

If possible, could you teach me how to modify the pointer table (your ad-hoc method)?

I will encounter such a weir problem, again and again.

So, I want to learn a generic solution.

Indeed, I want to learn how to open/modify/write the pointer table (DWQ file).

(I have basic knowledge on MATLAB.)

Thank you a lot!

Best Regards,

Joon

(Table 1) See also Table 1 in attachment.

//////////////////////////////////////////////////////////////////////////////////////////////////////

boundary exchange from to

number number segment segment

1 24447 -1 6007

2 24448 -2 6284

3 24449 -3 6559

4 24450 -4 6832

5 24451 -5 7102

6 24452 -6 7370

7 24453 -7 7637

8 24454 -8 7903

9 24455 -9 8167

10 24456 -10 8430

11 24457 -11 8691

24458 5728 8431

24459 5438 8168

24460 5134 7904

24461 4832 7638

24462 4526 7371

24463 4216 7103

24464 3903 6833

24465 0 0

24466 0 0

24467 0 0

24468 0 0

24469 0 0

24470 0 0

24471 0 0

12 24472 -12 199

13 24473 -13 401

14 24474 -14 607

15 24475 -15 817

16 24476 -16 1031

17 24477 -17 1249

18 24478 -18 1468

19 24479 -19 1688

20 24480 -20 1909

24481 1030 3592

24482 1248 3904

24483 1467 4217

24484 1687 4527

24485 1908 4833

24486 2130 5135

24487 2353 5434

24488 0 0

24489 0 0

24490 0 0

24491 0 0

24492 0 0

24493 0 0

24494 0 0

//////////////////////////////////////////////////////////////////////////////////////////////////////

You can also see what I have done for the original table in the LST file. See the table below.

(Table 2) See also Table 1 in attachment.

//////////////////////////////////////////////////////////////////////////////////////////////////////

boundary exchange from to

number number segment segment

------------------------------------------ BC DN (DWAQ-Defined Bound Nr.)

1 24447 -1 6007 1

2 24448 -2 6284 2

3 24449 -3 6559 3

4 24450 -4 6832 4

5 24451 -5 7102 5

6 24452 -6 7370 6

7 24453 -7 7637 7

8 24454 -8 7903 8

9 24455 -9 8167 9

10 24456 -10 8430 10

11 24457 -11 8691 11

------------------------------------------ BC DN (DWAQ-Defined Bound Nr.)

------------------------------------------ WeirA (From Segment Nr.)

12 24458 -12 8431 <-- 5728 (Flow)

13 24459 -13 8168 <-- 5438 (Flow)

14 24460 -14 7904 <-- 5134 (Flow)

15 24461 -15 7638 <-- 4832 (Flow)

16 24462 -16 7371 <-- 4526 (Flow)

17 24463 -17 7103 <-- 4216 (Flow)

18 24464 -18 6833 <-- 3903 (Flow)

------------------------------------------ WeirA (From Segment Nr.)

------------------------------------------ WeirB (From Segment Nr.)

19 24465 -19 2353 x-x 5434 (0: Counter flow)

20 24466 -20 2130 x-x 5135 (0: Counter flow)

21 24467 -21 1908 x-x 4833 (0: Counter flow)

22 24468 -22 1687 x-x 4527 (0: Counter flow)

23 24469 -23 1467 x-x 4217 (0: Counter flow)

24 24470 -24 1248 x-x 3904 (0: Counter flow)

25 24471 -25 1030 x-x 3592 (0: Counter flow)

------------------------------------------ WeirB (From Segment Nr.)

------------------------------------------ BC UP (DWAQ-Defined Bound Nr.) <-- Here is the mismatch for Bound Nr.

26 24472 -26 199 12

27 24473 -27 401 13

28 24474 -28 607 14

29 24475 -29 817 15

30 24476 -30 1031 16

31 24477 -31 1249 17

32 24478 -32 1468 18

33 24479 -33 1688 19

34 24480 -34 1909 20

------------------------------------------ BC UP (DWAQ-Defined Bound Nr.) <-- Here is the mismatch for Bound Nr.

------------------------------------------ WeirB (From Segment Nr.)

35 24481 -35 3592 <-- 1030 (Flow)

36 24482 -36 3904 <-- 1248 (Flow)

37 24483 -37 4217 <-- 1467 (Flow)

38 24484 -38 4527 <-- 1687 (Flow)

39 24485 -39 4833 <-- 1908 (Flow)

40 24486 -40 5135 <-- 2130 (Flow)

41 24487 -41 5434 <-- 2353 (Flow)

------------------------------------------ WeirB (From Segment Nr.)

------------------------------------------ WeirA (From Segment Nr.)

42 24488 -42 5728 x-x 8431 (0: Counter flow)

43 24489 -43 5433 x-x 8168 (0: Counter flow)

44 24490 -44 5134 x-x 7904 (0: Counter flow)

45 24491 -45 4832 x-x 7638 (0: Counter flow)

46 24492 -46 4526 x-x 7371 (0: Counter flow)

47 24493 -47 4216 x-x 7103 (0: Counter flow)

48 24494 -48 3903 x-x 6833 (0: Counter flow)

------------------------------------------ WeirA (From Segment Nr.)

//////////////////////////////////////////////////////////////////////////////////////////////////////

First of all, I am sorry for bothering you many times, and I am very thankful for your help!

I have written a new pointer table.

As you recommended,

(1) For flow direction of the adjacent weir nodes, I have written the from and to segment numbers.

(2) For counter-flow direction of the adjacent weir nodes, I have set the segment numbers to be zero.

(3) I have rearranged the boundary and segment numbers for the actual in- and out-flow boundaries.

See Table 1 below. Also, you can see Table 2 with detailed explanation.

If possible, could you teach me how to modify the pointer table (your ad-hoc method)?

I will encounter such a weir problem, again and again.

So, I want to learn a generic solution.

Indeed, I want to learn how to open/modify/write the pointer table (DWQ file).

(I have basic knowledge on MATLAB.)

Thank you a lot!

Best Regards,

Joon

(Table 1) See also Table 1 in attachment.

//////////////////////////////////////////////////////////////////////////////////////////////////////

boundary exchange from to

number number segment segment

1 24447 -1 6007

2 24448 -2 6284

3 24449 -3 6559

4 24450 -4 6832

5 24451 -5 7102

6 24452 -6 7370

7 24453 -7 7637

8 24454 -8 7903

9 24455 -9 8167

10 24456 -10 8430

11 24457 -11 8691

24458 5728 8431

24459 5438 8168

24460 5134 7904

24461 4832 7638

24462 4526 7371

24463 4216 7103

24464 3903 6833

24465 0 0

24466 0 0

24467 0 0

24468 0 0

24469 0 0

24470 0 0

24471 0 0

12 24472 -12 199

13 24473 -13 401

14 24474 -14 607

15 24475 -15 817

16 24476 -16 1031

17 24477 -17 1249

18 24478 -18 1468

19 24479 -19 1688

20 24480 -20 1909

24481 1030 3592

24482 1248 3904

24483 1467 4217

24484 1687 4527

24485 1908 4833

24486 2130 5135

24487 2353 5434

24488 0 0

24489 0 0

24490 0 0

24491 0 0

24492 0 0

24493 0 0

24494 0 0

//////////////////////////////////////////////////////////////////////////////////////////////////////

You can also see what I have done for the original table in the LST file. See the table below.

(Table 2) See also Table 1 in attachment.

//////////////////////////////////////////////////////////////////////////////////////////////////////

boundary exchange from to

number number segment segment

------------------------------------------ BC DN (DWAQ-Defined Bound Nr.)

1 24447 -1 6007 1

2 24448 -2 6284 2

3 24449 -3 6559 3

4 24450 -4 6832 4

5 24451 -5 7102 5

6 24452 -6 7370 6

7 24453 -7 7637 7

8 24454 -8 7903 8

9 24455 -9 8167 9

10 24456 -10 8430 10

11 24457 -11 8691 11

------------------------------------------ BC DN (DWAQ-Defined Bound Nr.)

------------------------------------------ WeirA (From Segment Nr.)

12 24458 -12 8431 <-- 5728 (Flow)

13 24459 -13 8168 <-- 5438 (Flow)

14 24460 -14 7904 <-- 5134 (Flow)

15 24461 -15 7638 <-- 4832 (Flow)

16 24462 -16 7371 <-- 4526 (Flow)

17 24463 -17 7103 <-- 4216 (Flow)

18 24464 -18 6833 <-- 3903 (Flow)

------------------------------------------ WeirA (From Segment Nr.)

------------------------------------------ WeirB (From Segment Nr.)

19 24465 -19 2353 x-x 5434 (0: Counter flow)

20 24466 -20 2130 x-x 5135 (0: Counter flow)

21 24467 -21 1908 x-x 4833 (0: Counter flow)

22 24468 -22 1687 x-x 4527 (0: Counter flow)

23 24469 -23 1467 x-x 4217 (0: Counter flow)

24 24470 -24 1248 x-x 3904 (0: Counter flow)

25 24471 -25 1030 x-x 3592 (0: Counter flow)

------------------------------------------ WeirB (From Segment Nr.)

------------------------------------------ BC UP (DWAQ-Defined Bound Nr.) <-- Here is the mismatch for Bound Nr.

26 24472 -26 199 12

27 24473 -27 401 13

28 24474 -28 607 14

29 24475 -29 817 15

30 24476 -30 1031 16

31 24477 -31 1249 17

32 24478 -32 1468 18

33 24479 -33 1688 19

34 24480 -34 1909 20

------------------------------------------ BC UP (DWAQ-Defined Bound Nr.) <-- Here is the mismatch for Bound Nr.

------------------------------------------ WeirB (From Segment Nr.)

35 24481 -35 3592 <-- 1030 (Flow)

36 24482 -36 3904 <-- 1248 (Flow)

37 24483 -37 4217 <-- 1467 (Flow)

38 24484 -38 4527 <-- 1687 (Flow)

39 24485 -39 4833 <-- 1908 (Flow)

40 24486 -40 5135 <-- 2130 (Flow)

41 24487 -41 5434 <-- 2353 (Flow)

------------------------------------------ WeirB (From Segment Nr.)

------------------------------------------ WeirA (From Segment Nr.)

42 24488 -42 5728 x-x 8431 (0: Counter flow)

43 24489 -43 5433 x-x 8168 (0: Counter flow)

44 24490 -44 5134 x-x 7904 (0: Counter flow)

45 24491 -45 4832 x-x 7638 (0: Counter flow)

46 24492 -46 4526 x-x 7371 (0: Counter flow)

47 24493 -47 4216 x-x 7103 (0: Counter flow)

48 24494 -48 3903 x-x 6833 (0: Counter flow)

------------------------------------------ WeirA (From Segment Nr.)

//////////////////////////////////////////////////////////////////////////////////////////////////////

### Attachments:

AM

##### Arjen Markus, modified 6 Years ago.

#### RE: Couple TELEMAC-DWAQ : How to Implement Weirs (Answer)

Jedi Knight Posts: 223 Join Date: 1/26/11 Recent Posts 00

Hi Joon,

like I said, the file is a binary file. Here is a piece of Fortran code that you can use to read it:

integer, parameter :: noq = 24494

integer, dimension(4,noq) :: ipoint

open( 10, file = 'dwq_delwaq-frmto.dwq', access = 'stream' )

read( 10 ) ipoint

The trick now is to replace the exchange pointers by the new ones you found:

ipoint(:,24458) = (/ 5728, 8431, 0, 0 /)

ipoint(:,24488) = (/ 0, 0, 0, 0 /)

(etc. - insert similar statements for the others)

Then:

open( 11, file = 'dwq_delwaq-frmto.dwq_corrected', access = 'stream' )

write( 11 ) ipoint

close( 11 )

should do the trick.

If you are unfamilar with Fortran or have no suitable compiler, I can create the new file for you.

Regards,

Arjen

like I said, the file is a binary file. Here is a piece of Fortran code that you can use to read it:

integer, parameter :: noq = 24494

integer, dimension(4,noq) :: ipoint

open( 10, file = 'dwq_delwaq-frmto.dwq', access = 'stream' )

read( 10 ) ipoint

The trick now is to replace the exchange pointers by the new ones you found:

ipoint(:,24458) = (/ 5728, 8431, 0, 0 /)

ipoint(:,24488) = (/ 0, 0, 0, 0 /)

(etc. - insert similar statements for the others)

Then:

open( 11, file = 'dwq_delwaq-frmto.dwq_corrected', access = 'stream' )

write( 11 ) ipoint

close( 11 )

should do the trick.

If you are unfamilar with Fortran or have no suitable compiler, I can create the new file for you.

Regards,

Arjen

BL

##### Byung Joon Lee, modified 6 Years ago.

#### RE: Couple TELEMAC-DWAQ : How to Implement Weirs

Youngling Posts: 6 Join Date: 2/10/14 Recent Posts 00

Dear Arjen,

I have tested your FORTRAN script with "Intel Parallel Studio 2013".

However, the numbers in "ipoint" are too big, like "ipoint(:,1) = (/268435456, -367656960, -350879744, -384434176/)".

So, could you check the numbers in the "dwq_delwaq-frmto.dwq" file?

The DWQ file is attached to my earlier post at 7/9/14 7:37 PM.

Thank you a lot!

Regards,

Joon

I have tested your FORTRAN script with "Intel Parallel Studio 2013".

However, the numbers in "ipoint" are too big, like "ipoint(:,1) = (/268435456, -367656960, -350879744, -384434176/)".

So, could you check the numbers in the "dwq_delwaq-frmto.dwq" file?

The DWQ file is attached to my earlier post at 7/9/14 7:37 PM.

Thank you a lot!

Regards,

Joon

AM

##### Arjen Markus, modified 6 Years ago.

#### RE: Couple TELEMAC-DWAQ : How to Implement Weirs

Jedi Knight Posts: 223 Join Date: 1/26/11 Recent Posts 00

Hi Joon,

I tried this myself, saw the huge numbers, looked in the file with a hexadecimal viewer and realised that the numbers are stored in "big-endian" form, rather than the "little-endian" form that is used on Intel-based PCs. That is why the D-WAQ input file contains the keyword "BIG_ENDIAN" .

So the solution is to add a (non-standard) keyword to the open statement for both files:

open( 10, file = 'dwq_delwaq-frmto.dwq', access = 'stream', convert='big_endian' )

The first row in the pointer table then reads:

16 5866 5867 5865

which looks much more useful.

Regards,

Arjen

I tried this myself, saw the huge numbers, looked in the file with a hexadecimal viewer and realised that the numbers are stored in "big-endian" form, rather than the "little-endian" form that is used on Intel-based PCs. That is why the D-WAQ input file contains the keyword "BIG_ENDIAN" .

So the solution is to add a (non-standard) keyword to the open statement for both files:

open( 10, file = 'dwq_delwaq-frmto.dwq', access = 'stream', convert='big_endian' )

The first row in the pointer table then reads:

16 5866 5867 5865

which looks much more useful.

Regards,

Arjen

BL

##### Byung Joon Lee, modified 6 Years ago.

#### RE: Couple TELEMAC-DWAQ : How to Implement Weirs

Youngling Posts: 6 Join Date: 2/10/14 Recent Posts 00

Dear Arjen,

Thank a lot for your help.

It is getting clear and clear.

I have check the "ipoint" array.

And, I noticed that "16" repeats again and again.

For example,

---------------------------------

ipoint(1,1)=16

ipoint(2,1)=5866

ipoint(3,1)=5867

ipoint(4,1)=5865

ipoint(1,2)=5868

ipoint(2,2)=16

ipoint(3,2)=16

ipoint(4,2)=5867

ipoint(1,3)=5868

ipoint(2,3)=5866

ipoint(3,3)=5869

ipoint(4,3)=16

ipoint(1,4)=16

...

...(and so on)

---------------------------------

So, the number, "16", seems a separator without any meaning.

Do you have any idea on it?

How does DELWAQ read this array?

Best Regards,

Joon

Thank a lot for your help.

It is getting clear and clear.

I have check the "ipoint" array.

And, I noticed that "16" repeats again and again.

For example,

---------------------------------

ipoint(1,1)=16

ipoint(2,1)=5866

ipoint(3,1)=5867

ipoint(4,1)=5865

ipoint(1,2)=5868

ipoint(2,2)=16

ipoint(3,2)=16

ipoint(4,2)=5867

ipoint(1,3)=5868

ipoint(2,3)=5866

ipoint(3,3)=5869

ipoint(4,3)=16

ipoint(1,4)=16

...

...(and so on)

---------------------------------

So, the number, "16", seems a separator without any meaning.

Do you have any idea on it?

How does DELWAQ read this array?

Best Regards,

Joon

AM

##### Arjen Markus, modified 6 Years ago.

#### RE: Couple TELEMAC-DWAQ : How to Implement Weirs

Jedi Knight Posts: 223 Join Date: 1/26/11 Recent Posts 00

Hi Joon,

good thing you checked this. The file is actually an unformatted file - I am so used to binary/stream files in the context of Delft3D-WAQ that I did not even bother to check. The number 16 is the length of the record in bytes. The proper way to read the file is this:

integer :: i

open( 10, file = 'dwq_delwaq-frmto.dwq', form = 'unformatted', convert='big_endian' )

do i = 1,noq

read( 10 ) ipoint(:,i)

enddo

And writing should be done in a similar way.

Regards,

Arjen

good thing you checked this. The file is actually an unformatted file - I am so used to binary/stream files in the context of Delft3D-WAQ that I did not even bother to check. The number 16 is the length of the record in bytes. The proper way to read the file is this:

integer :: i

open( 10, file = 'dwq_delwaq-frmto.dwq', form = 'unformatted', convert='big_endian' )

do i = 1,noq

read( 10 ) ipoint(:,i)

enddo

And writing should be done in a similar way.

Regards,

Arjen

BL

##### Byung Joon Lee, modified 6 Years ago.

#### RE: Couple TELEMAC-DWAQ : How to Implement Weirs

Youngling Posts: 6 Join Date: 2/10/14 Recent Posts 00

Dear Arjen,

I am very sorry for disturbing you again and again.

I have written the following FORTRAN script and modified the DWQ file.

However, I still have error.

The number of boundaries, which is read with the DWQ file, (i.e. 47) does not match to the number of the actual boundaries (20).

Please see the following FORTRAN script and the error sign in the LST file.

Can I reduce the number of boundaries, from 47 to 20, arbitrarily?

Thank you!

Joon

(1) FORTRAN Script

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

program test1

integer, parameter :: noq = 24494

integer, dimension(4,noq) :: ipoint

integer :: i

open( 10, file = 'dwq_delwaq-frmto.dwq',form = 'unformatted', convert='big_endian')

do i = 1,noq

read( 10 ) ipoint(:,i)

enddo

ipoint(:,24458) = (/ 5728, 8431, 0, 0 /)

ipoint(:,24459) = (/ 5438, 8168, 0, 0 /)

ipoint(:,24460) = (/ 5134, 7904, 0, 0 /)

ipoint(:,24461) = (/ 4832, 7638, 0, 0 /)

ipoint(:,24462) = (/ 4526, 7371, 0, 0 /)

ipoint(:,24463) = (/ 4216, 7103, 0, 0 /)

ipoint(:,24464) = (/ 3903, 6833, 0, 0 /)

ipoint(:,24465) = (/ 0, 0, 0, 0 /)

ipoint(:,24466) = (/ 0, 0, 0, 0 /)

ipoint(:,24467) = (/ 0, 0, 0, 0 /)

ipoint(:,24468) = (/ 0, 0, 0, 0 /)

ipoint(:,24469) = (/ 0, 0, 0, 0 /)

ipoint(:,24470) = (/ 0, 0, 0, 0 /)

ipoint(:,24471) = (/ 0, 0, 0, 0 /)

ipoint(:,24472) = (/ -12, 199,-12, 199 /)

ipoint(:,24473) = (/ -13, 401,-13, 401 /)

ipoint(:,24474) = (/ -14, 607, -14, 607 /)

ipoint(:,24475) = (/ -15, 817, -15, 817 /)

ipoint(:,24476) = (/ -16, 1031,-16, 1031 /)

ipoint(:,24477) = (/ -17, 1249,-17, 1249 /)

ipoint(:,24478) = (/ -18, 1468, -18, 1468 /)

ipoint(:,24479) = (/ -19, 1688, -19, 1688 /)

ipoint(:,24480) = (/ -20, 1909, -20, 1909 /)

ipoint(:,24481) = (/ 1030, 3592, 0, 0 /)

ipoint(:,24482) = (/ 1248, 3904, 0, 0 /)

ipoint(:,24483) = (/ 1467, 4217, 0, 0 /)

ipoint(:,24484) = (/ 1687, 4527, 0, 0 /)

ipoint(:,24485) = (/ 1908, 4833, 0, 0 /)

ipoint(:,24486) = (/ 2130, 5135, 0, 0 /)

ipoint(:,24487) = (/ 2353, 5434, 0, 0 /)

ipoint(:,24488) = (/ 0, 0, 0, 0 /)

ipoint(:,24489) = (/ 0, 0, 0, 0 /)

ipoint(:,24490) = (/ 0, 0, 0, 0 /)

ipoint(:,24491) = (/ 0, 0, 0, 0 /)

ipoint(:,24492) = (/ 0, 0, 0, 0 /)

ipoint(:,24493) = (/ 0, 0, 0, 0 /)

ipoint(:,24494) = (/ 0, 0, 0, 0 /)

open( 11, file = 'dwq_delwaq-frmto_corrected.dwq',form = 'unformatted', convert='big_endian')

do i = 1,noq

write( 11 ) ipoint(:,i)

enddo

close( 11 )

end

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

(2) Error Sign in the LST file

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Number of boundaries : 47

boundary exchange from to

number number segment segment

1 24447 -1 6007

2 24448 -2 6284

3 24449 -3 6559

4 24450 -4 6832

5 24451 -5 7102

6 24452 -6 7370

7 24453 -7 7637

8 24454 -8 7903

9 24455 -9 8167

10 24456 -10 8430

11 24457 -11 8691

12 24472 -12 199

13 24473 -13 401

14 24474 -14 607

15 24475 -15 817

16 24476 -16 1031

17 24477 -17 1249

18 24478 -18 1468

19 24479 -19 1688

20 24480 -20 1909

WARNING, there is no flow associated with boundary nr: 21

WARNING, there is no active segment associated with boundary nr: 21

WARNING, there is no flow associated with boundary nr: 22

...

...

WARNING, there is no flow associated with boundary nr: 47

WARNING, there is no active segment associated with boundary nr: 47

...

...

************************************************************************************************************* B L O C K - 4 *****

Bound nr: boundary-IDs: boundary-names: boundary-types:

1 6007 (Section 1 - 1)6007 (Section 1 - 1) 1/1 (Section 1 - 1)

2 6284 (Section 1 - 1)6284 (Section 1 - 1) 1/1 (Section 1 - 1)

3 6559 (Section 1 - 1)6559 (Section 1 - 1) 1/1 (Section 1 - 1)

4 6832 (Section 1 - 1)6832 (Section 1 - 1) 1/1 (Section 1 - 1)

5 7102 (Section 1 - 1)7102 (Section 1 - 1) 1/1 (Section 1 - 1)

6 7370 (Section 1 - 1)7370 (Section 1 - 1) 1/1 (Section 1 - 1)

7 7637 (Section 1 - 1)7637 (Section 1 - 1) 1/1 (Section 1 - 1)

8 7903 (Section 1 - 1)7903 (Section 1 - 1) 1/1 (Section 1 - 1)

9 8167 (Section 1 - 1)8167 (Section 1 - 1) 1/1 (Section 1 - 1)

10 8430 (Section 1 - 1)8430 (Section 1 - 1) 1/1 (Section 1 - 1)

11 8691 (Section 1 - 1)8691 (Section 1 - 1) 1/1 (Section 1 - 1)

12 199 (Section 2 - 1) 199 (Section 2 - 1) 2/1 (Section 2 - 1)

13 401 (Section 2 - 1) 401 (Section 2 - 1) 2/1 (Section 2 - 1)

14 607 (Section 2 - 1) 607 (Section 2 - 1) 2/1 (Section 2 - 1)

15 817 (Section 2 - 1) 817 (Section 2 - 1) 2/1 (Section 2 - 1)

16 1031 (Section 2 - 1)1031 (Section 2 - 1) 2/1 (Section 2 - 1)

17 1249 (Section 2 - 1)1249 (Section 2 - 1) 2/1 (Section 2 - 1)

18 1468 (Section 2 - 1)1468 (Section 2 - 1) 2/1 (Section 2 - 1)

19 1688 (Section 2 - 1)1688 (Section 2 - 1) 2/1 (Section 2 - 1)

20 1909 (Section 2 - 1)1909 (Section 2 - 1) 2/1 (Section 2 - 1)

ERROR reading file on unit: 39, filename: test2.inp

Line on input file was:

2 ; use defaults

^

Expected was a character !

Detected was an integer !

ERROR. Reading block 5 !! Check input file !!

Number of ERRORS during read of input file: 2 !!

Further processing impossible.

*************** EXECUTION HALTED !! ***************

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

I am very sorry for disturbing you again and again.

I have written the following FORTRAN script and modified the DWQ file.

However, I still have error.

The number of boundaries, which is read with the DWQ file, (i.e. 47) does not match to the number of the actual boundaries (20).

Please see the following FORTRAN script and the error sign in the LST file.

Can I reduce the number of boundaries, from 47 to 20, arbitrarily?

Thank you!

Joon

(1) FORTRAN Script

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

program test1

integer, parameter :: noq = 24494

integer, dimension(4,noq) :: ipoint

integer :: i

open( 10, file = 'dwq_delwaq-frmto.dwq',form = 'unformatted', convert='big_endian')

do i = 1,noq

read( 10 ) ipoint(:,i)

enddo

ipoint(:,24458) = (/ 5728, 8431, 0, 0 /)

ipoint(:,24459) = (/ 5438, 8168, 0, 0 /)

ipoint(:,24460) = (/ 5134, 7904, 0, 0 /)

ipoint(:,24461) = (/ 4832, 7638, 0, 0 /)

ipoint(:,24462) = (/ 4526, 7371, 0, 0 /)

ipoint(:,24463) = (/ 4216, 7103, 0, 0 /)

ipoint(:,24464) = (/ 3903, 6833, 0, 0 /)

ipoint(:,24465) = (/ 0, 0, 0, 0 /)

ipoint(:,24466) = (/ 0, 0, 0, 0 /)

ipoint(:,24467) = (/ 0, 0, 0, 0 /)

ipoint(:,24468) = (/ 0, 0, 0, 0 /)

ipoint(:,24469) = (/ 0, 0, 0, 0 /)

ipoint(:,24470) = (/ 0, 0, 0, 0 /)

ipoint(:,24471) = (/ 0, 0, 0, 0 /)

ipoint(:,24472) = (/ -12, 199,-12, 199 /)

ipoint(:,24473) = (/ -13, 401,-13, 401 /)

ipoint(:,24474) = (/ -14, 607, -14, 607 /)

ipoint(:,24475) = (/ -15, 817, -15, 817 /)

ipoint(:,24476) = (/ -16, 1031,-16, 1031 /)

ipoint(:,24477) = (/ -17, 1249,-17, 1249 /)

ipoint(:,24478) = (/ -18, 1468, -18, 1468 /)

ipoint(:,24479) = (/ -19, 1688, -19, 1688 /)

ipoint(:,24480) = (/ -20, 1909, -20, 1909 /)

ipoint(:,24481) = (/ 1030, 3592, 0, 0 /)

ipoint(:,24482) = (/ 1248, 3904, 0, 0 /)

ipoint(:,24483) = (/ 1467, 4217, 0, 0 /)

ipoint(:,24484) = (/ 1687, 4527, 0, 0 /)

ipoint(:,24485) = (/ 1908, 4833, 0, 0 /)

ipoint(:,24486) = (/ 2130, 5135, 0, 0 /)

ipoint(:,24487) = (/ 2353, 5434, 0, 0 /)

ipoint(:,24488) = (/ 0, 0, 0, 0 /)

ipoint(:,24489) = (/ 0, 0, 0, 0 /)

ipoint(:,24490) = (/ 0, 0, 0, 0 /)

ipoint(:,24491) = (/ 0, 0, 0, 0 /)

ipoint(:,24492) = (/ 0, 0, 0, 0 /)

ipoint(:,24493) = (/ 0, 0, 0, 0 /)

ipoint(:,24494) = (/ 0, 0, 0, 0 /)

open( 11, file = 'dwq_delwaq-frmto_corrected.dwq',form = 'unformatted', convert='big_endian')

do i = 1,noq

write( 11 ) ipoint(:,i)

enddo

close( 11 )

end

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

(2) Error Sign in the LST file

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

Number of boundaries : 47

boundary exchange from to

number number segment segment

1 24447 -1 6007

2 24448 -2 6284

3 24449 -3 6559

4 24450 -4 6832

5 24451 -5 7102

6 24452 -6 7370

7 24453 -7 7637

8 24454 -8 7903

9 24455 -9 8167

10 24456 -10 8430

11 24457 -11 8691

12 24472 -12 199

13 24473 -13 401

14 24474 -14 607

15 24475 -15 817

16 24476 -16 1031

17 24477 -17 1249

18 24478 -18 1468

19 24479 -19 1688

20 24480 -20 1909

WARNING, there is no flow associated with boundary nr: 21

WARNING, there is no active segment associated with boundary nr: 21

WARNING, there is no flow associated with boundary nr: 22

...

...

WARNING, there is no flow associated with boundary nr: 47

WARNING, there is no active segment associated with boundary nr: 47

...

...

************************************************************************************************************* B L O C K - 4 *****

Bound nr: boundary-IDs: boundary-names: boundary-types:

1 6007 (Section 1 - 1)6007 (Section 1 - 1) 1/1 (Section 1 - 1)

2 6284 (Section 1 - 1)6284 (Section 1 - 1) 1/1 (Section 1 - 1)

3 6559 (Section 1 - 1)6559 (Section 1 - 1) 1/1 (Section 1 - 1)

4 6832 (Section 1 - 1)6832 (Section 1 - 1) 1/1 (Section 1 - 1)

5 7102 (Section 1 - 1)7102 (Section 1 - 1) 1/1 (Section 1 - 1)

6 7370 (Section 1 - 1)7370 (Section 1 - 1) 1/1 (Section 1 - 1)

7 7637 (Section 1 - 1)7637 (Section 1 - 1) 1/1 (Section 1 - 1)

8 7903 (Section 1 - 1)7903 (Section 1 - 1) 1/1 (Section 1 - 1)

9 8167 (Section 1 - 1)8167 (Section 1 - 1) 1/1 (Section 1 - 1)

10 8430 (Section 1 - 1)8430 (Section 1 - 1) 1/1 (Section 1 - 1)

11 8691 (Section 1 - 1)8691 (Section 1 - 1) 1/1 (Section 1 - 1)

12 199 (Section 2 - 1) 199 (Section 2 - 1) 2/1 (Section 2 - 1)

13 401 (Section 2 - 1) 401 (Section 2 - 1) 2/1 (Section 2 - 1)

14 607 (Section 2 - 1) 607 (Section 2 - 1) 2/1 (Section 2 - 1)

15 817 (Section 2 - 1) 817 (Section 2 - 1) 2/1 (Section 2 - 1)

16 1031 (Section 2 - 1)1031 (Section 2 - 1) 2/1 (Section 2 - 1)

17 1249 (Section 2 - 1)1249 (Section 2 - 1) 2/1 (Section 2 - 1)

18 1468 (Section 2 - 1)1468 (Section 2 - 1) 2/1 (Section 2 - 1)

19 1688 (Section 2 - 1)1688 (Section 2 - 1) 2/1 (Section 2 - 1)

20 1909 (Section 2 - 1)1909 (Section 2 - 1) 2/1 (Section 2 - 1)

ERROR reading file on unit: 39, filename: test2.inp

Line on input file was:

2 ; use defaults

^

Expected was a character !

Detected was an integer !

ERROR. Reading block 5 !! Check input file !!

Number of ERRORS during read of input file: 2 !!

Further processing impossible.

*************** EXECUTION HALTED !! ***************

////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

AM

##### Arjen Markus, modified 6 Years ago.

#### RE: Couple TELEMAC-DWAQ : How to Implement Weirs (Answer)

Jedi Knight Posts: 223 Join Date: 1/26/11 Recent Posts 00

Hi Joon,

these messages are due to the two extra columns in the pointer table. They contain references to boundary IDs -21 to -47.

I printed all the exchanges that have a negative index and filtered out the regular ones. Here is the result:

index from to from-1 to+1

564 1248 1467 -24 1687

1084 4217 3904 4527 -36

1088 5434 5135 -41 4833

1383 5433 5728 5134 -42

1387 4216 4526 -47 4832

1621 199 200 -26 201

2219 401 402 -27 403

2829 607 608 -28 609

3451 817 818 -29 819

4085 1031 1032 -30 1033

4731 1249 1250 -31 1251

5383 1468 1469 -32 1470

6038 1688 1689 -33 1690

6696 1909 1910 -34 1911

If you extend your program with corrections for these exchanges as well:

ipoint(564) = (/ 1248, 1467, 0, 1687 /)

etc.

you should get a pointer table you can use.

Regards,

Arjen

these messages are due to the two extra columns in the pointer table. They contain references to boundary IDs -21 to -47.

I printed all the exchanges that have a negative index and filtered out the regular ones. Here is the result:

index from to from-1 to+1

564 1248 1467 -24 1687

1084 4217 3904 4527 -36

1088 5434 5135 -41 4833

1383 5433 5728 5134 -42

1387 4216 4526 -47 4832

1621 199 200 -26 201

2219 401 402 -27 403

2829 607 608 -28 609

3451 817 818 -29 819

4085 1031 1032 -30 1033

4731 1249 1250 -31 1251

5383 1468 1469 -32 1470

6038 1688 1689 -33 1690

6696 1909 1910 -34 1911

If you extend your program with corrections for these exchanges as well:

ipoint(564) = (/ 1248, 1467, 0, 1687 /)

etc.

you should get a pointer table you can use.

Regards,

Arjen

BL

##### Byung Joon Lee, modified 6 Years ago.

#### RE: Couple TELEMAC-DWAQ : How to Implement Weirs

Youngling Posts: 6 Join Date: 2/10/14 Recent Posts 00

Dear Arjen,

I think that I finally managed this problem.

Thank you a lot for your help!

I connected the two adjacent weir points, as you recommended.

(For example, "ipoint(:,24458) = (/ 5728, 8431, 0, 0 /)", (/From, To, -1, +1).)

DWAQ ran well without any errors in the Waq (1) and Waq (2) steps.

So, I would like to say that this is somewhat resolved.

However, when I checked the simulation result, I was frustrated.

The substance (tracer) was accumulated in the upstream part of the weir, not being able to pass the weir.

So... after I will check again my result, I will post this problem in a new thread.

(I guess, although the channels across the weir are connected, the area at a cell edge might not be considered. I am not sure...)

Anyhow, thank you very much.

Have a nice weekend!

Best Regards,

Joon

I think that I finally managed this problem.

Thank you a lot for your help!

I connected the two adjacent weir points, as you recommended.

(For example, "ipoint(:,24458) = (/ 5728, 8431, 0, 0 /)", (/From, To, -1, +1).)

DWAQ ran well without any errors in the Waq (1) and Waq (2) steps.

So, I would like to say that this is somewhat resolved.

However, when I checked the simulation result, I was frustrated.

The substance (tracer) was accumulated in the upstream part of the weir, not being able to pass the weir.

So... after I will check again my result, I will post this problem in a new thread.

(I guess, although the channels across the weir are connected, the area at a cell edge might not be considered. I am not sure...)

Anyhow, thank you very much.

Have a nice weekend!

Best Regards,

Joon

BL

##### Byung Joon Lee, modified 6 Years ago.

#### RE: Couple TELEMAC-DWAQ : How to Implement Weirs

Youngling Posts: 6 Join Date: 2/10/14 Recent Posts 00

Dear Arjen,

I have to check again the simulation.

Throughout the discussion, I had dealt with a DWQ file with weir-crossing flows (exchanges).

However, for the last simulation, I did a new TELEMAC simulation, and I found that its DWQ file does not have weir-crossing flows (exchanges).

The weir was considered rather as a simple boundary, resulting in mass (tracer) accumulation.

So, the two TELEMAC simulations produced different weir-crossing flow conditions.

I will study more about differences between the two TELEMAC simulations.

And, I will ask you again.

Thank you!

Regards,

Joon

I have to check again the simulation.

Throughout the discussion, I had dealt with a DWQ file with weir-crossing flows (exchanges).

However, for the last simulation, I did a new TELEMAC simulation, and I found that its DWQ file does not have weir-crossing flows (exchanges).

The weir was considered rather as a simple boundary, resulting in mass (tracer) accumulation.

So, the two TELEMAC simulations produced different weir-crossing flow conditions.

I will study more about differences between the two TELEMAC simulations.

And, I will ask you again.

Thank you!

Regards,

Joon

AM

##### Arjen Markus, modified 6 Years ago.

#### RE: Couple TELEMAC-DWAQ : How to Implement Weirs (Answer)

Jedi Knight Posts: 223 Join Date: 1/26/11 Recent Posts 10

Hi Joon,

this does sound suspicious. Even if the weir is simply an open boundary, then there should be a flow crossing it. Could it be that TELEMAC adds some "shadow" cells", so that the actual through-flow from one end to the next goes through other cells than you think? One way to find out is by using:

- the original pointer table

- a tracer that comes in via the boundaries

That way you ought to be able to detect where the through-flow is entering.

Regards,

Arjen

this does sound suspicious. Even if the weir is simply an open boundary, then there should be a flow crossing it. Could it be that TELEMAC adds some "shadow" cells", so that the actual through-flow from one end to the next goes through other cells than you think? One way to find out is by using:

- the original pointer table

- a tracer that comes in via the boundaries

That way you ought to be able to detect where the through-flow is entering.

Regards,

Arjen

JL

##### Joon Lee, modified 6 Years ago.

#### RE: Couple TELEMAC-DWAQ : How to Implement Weirs

Youngling Posts: 13 Join Date: 11/6/12 Recent Posts 00

Dear Arjen,

I really appreciate your help.

I think that a weir in the TELEMAC-DWAQ system is now working well.

I also noticed that, if TELEMAC start to run with a "dried" weir, i.e., water surface below the weir, it does not generate the flow exchanges.

In this case, both the sides of the weir do not connect to each other. (No exchange number exist.)

(Evenif the weir is submerged with increasing time, it is still "closed".)

Anyhow, I feel satisfied with simulation results, as shown in the attached figure.

Thank you again!

Best Regards,

Joon

I really appreciate your help.

I think that a weir in the TELEMAC-DWAQ system is now working well.

I also noticed that, if TELEMAC start to run with a "dried" weir, i.e., water surface below the weir, it does not generate the flow exchanges.

In this case, both the sides of the weir do not connect to each other. (No exchange number exist.)

(Evenif the weir is submerged with increasing time, it is still "closed".)

Anyhow, I feel satisfied with simulation results, as shown in the attached figure.

Thank you again!

Best Regards,

Joon

### Attachments:

AM

##### Arjen Markus, modified 6 Years ago.

#### RE: Couple TELEMAC-DWAQ : How to Implement Weirs

Jedi Knight Posts: 223 Join Date: 1/26/11 Recent Posts 00

Hi Joon,

great to hear that! I will make a note about this issue, but at least we have a workaround now.

Regards,

Arjen

great to hear that! I will make a note about this issue, but at least we have a workaround now.

Regards,

Arjen