Welcome, Guest
Username: Password: Remember me

TOPIC: NaN occurred when coupled with Waqtel

NaN occurred when coupled with Waqtel 7 years 2 months ago #27699

  • Yunhao Song
  • Yunhao Song's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 118
  • Thank you received: 9
Hello everyone,

This problem has bothered me for a while and I'll try to make it clear as much as possible.

I've been running a 3D model (v7p2r1) of a riverine reservoir with a tributary and temperature is taken into account as an active tracer. I'm trying to simulate the density flow in the estuary of the tributary induced by different temperature between the main stem(17.0℃) and tributary water(15.2℃). The prescribed flowrates, elevations and tracer values are all constant. At first when Waqtel wasn't coupled with T3D the results were steady and looked reasonable, while in order to be more precise I tried to take the water-atmosphere temperature exchange into consideration. In the t3d manual under '5.5.2 The temperature' it says:
Air temperature may be specified using the keyword AIR TEMPERATURE if it is constant in time and space.
But the keyword AIR TEMPERATURE cannot be recognized and it's not listed in Telemac3d.dico, then I chose to couple Telemac3d with Waqtel and prescribed air temperature (which is 26℃, and the initial temperature of the domain is 15.2℃) in ASCII ATMOSPHERIC DATA FILE.

The time step I used is 30s (the same value used for previous simulations) but error occurred as listed below :
@STREAMLINE::SCARACT: THE NUMBER OF TRACEBACK INTERFACE CROSSINGS IGEN > 99
Then I ran some tests with time step gradually reduced to 1s, during the process another error shown below kept occurring.

NaN_error.png


No matter what time step was used the NaN error occurred between 6hours and 7hours, and always first came along with 206, the MAXIMUM NUMBER OF ITERATIONS FOR DIFFUSION OF TRACERS. Besides, the velocity profile became quite unstable, especially in the area near the lower boundary (see screenshot attached). I'm really confused why this happened. I tried adjusting COEFFICIENT FOR HORIZONTAL DIFFUSION OF TRACERS from 1.E-6 to 1.E-2 but didn't solve the problem. Please find my steering files in the attachment.

Many thanks in advance, any advice would be very appreciated!

With best regards,
Yunhao
Attachments:
The administrator has disabled public write access.

NaN occurred when coupled with Waqtel 7 years 2 months ago #27717

  • jmhervouet
  • jmhervouet's Avatar
Hello,

This is probably not due to Waqtel. It seems that the results are unstable on a boundary condition, which hints that the problem is not well posed. It could be that you have a prescribed depth or elevation with free velocities, or mixed fluvial/torrential conditions on this boundary, or a dry zone on this boundary, or more simply an initial elevation which is much lower than the prescribed elevation at the entrance.

With best regards,

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

NaN occurred when coupled with Waqtel 7 years 2 months ago #27721

  • Yunhao Song
  • Yunhao Song's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 118
  • Thank you received: 9
Hi Jean-Michel,

Thank you, I'll give some more detailed information about my case according to your reply.

It could be that you have a prescribed depth or elevation with free velocities
There're three open boundaries in my model, two of them are upper boundaries (4 5 5) with prescribed Q and one is the lower boundary (5 4 4) with prescribed H shown in the picture, which indeed has free velocities. But does it mean that it's ill-posed?

or mixed fluvial/torrential conditions on this boundary
Excuse me but I don't really get it, do you mean the Froude number?

or a dry zone on this boundary
The dry zone is located on each side of the two river banks, tidal flats is on in my case.

or more simply an initial elevation which is much lower than the prescribed elevation at the entrance
The initial elevation (constant over the domain) has the same value with the prescribed elevation on the lower boundary shown in the picture.

It is noteworthy that before Waqtel was coupled, I've run some simulations with and without temperature as a tracer using the same settings, the results showed that both velocity and temperature profile were steady and reasonable.

Any possible suggestion or solution is appreciated!

With best regards,
Yunhao Song
The administrator has disabled public write access.

NaN occurred when coupled with Waqtel 6 years 10 months ago #28555

  • Yunhao Song
  • Yunhao Song's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 118
  • Thank you received: 9
Dear Jean-Michel,

Sorry about the late reply, I still couldn't figure out what caused the unstable velocity profile on the boundary, which is the outlet of the domain with prescribed elevation & free velocities. I'm really looking forward to your advice on how to solve the problem.

With best regards,
Yunhao
The administrator has disabled public write access.

NaN occurred when coupled with Waqtel 7 years 2 months ago #27725

  • riadh
  • riadh's Avatar
Hello

Is it possible to get the full model?

kind regards

Riadh
The administrator has disabled public write access.

NaN occurred when coupled with Waqtel 6 years 10 months ago #28557

  • riadh
  • riadh's Avatar
Dear Yunhao

Sorry for this late reply also.
My colleague in charge of T3D has checked up your model and remarked the following points:
1-with few other options change, your model does not run even in serial mode.
2-the gradient of bathymetry on both river banks is huge (more than 20m on a single 2D element). You need absolutely to refine the mesh on theses areas.
3-He suspected (and I do mostly agree) that the wetting/drying algorithm in such severe case is the cause of all these troubles.

So to help us to go on with the check up, can you:
1-refine the mesh
2- run hydrodynamics first and see if there is no issues. I will appreciate if you run both 2D and 3D cases.
3- then couple with WAQTEL and see what happens.

I will try to have some time within next days in order to work again on your case.

with my kind regards

Riadh
The administrator has disabled public write access.

NaN occurred when coupled with Waqtel 6 years 10 months ago #28588

  • Yunhao Song
  • Yunhao Song's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 118
  • Thank you received: 9
Dear Riadh,

Glad to hear from you, I also thought about refining the mesh in the dry zones (near both river banks) and did some tests last week, here are some results I got for now.

1. On both river banks the mesh was refined from about 30m to 15m (attachment 1);

2. Ran hydrodynamics in T3D, got stable result (attachment 2);

3. Ran hydrodynamics + tracer in T3D, both velocity and temperature results were reasonable (attachment 3);

4. Ran hydrodynamics + tracer in T3D coupled Waqtel(thermal process), meteo data file modified from T3D example 'heat-exchange'. The hydrodynamics was unstable especially on the lower boundary (attachment 4), leading to error '@STREAMLINE ... IGEN > 99' at 26000s. Temperature value on one node in tidal flats suddenly increased to 46.5°C while the air temperature was around 24.8°C (attachment 5), it turned out that the node was on the edge of wet/dry area and the gradient of the bank slope was still too large. Simply reducing the time step didn't solve the problem.

I will further refine the mesh to see if it helps, I'm quite confused about the unstable hydrodynamics on lower boundary in step 4 above, which Jean-Michel also mentioned in this post suggesting the problem was caused by ill-posed settings. Do you or your colleague have any idea about this?

Really appreciate you and your colleague's work, I'll let you know if I have something new.

With best regards,
Yunhao
The administrator has disabled public write access.

NaN occurred when coupled with Waqtel 6 years 10 months ago #28591

  • riadh
  • riadh's Avatar
Dear Yunhoa

Good job, Let us know about the effect of the refinement.
For your information also, we have fixed some bugs win waqtel and in the case waq3d_thermics. I will post all the changed routines very soon.

kind regards

Riadh
The administrator has disabled public write access.

NaN occurred when coupled with Waqtel 6 years 10 months ago #28619

  • Yunhao Song
  • Yunhao Song's Avatar
  • OFFLINE
  • Senior Boarder
  • Posts: 118
  • Thank you received: 9
Dear Riadh,

After further refinement the mesh size gradually decreases from 30m in the main channel, to 6m on river banks (attachment 1), stable hydrodynamics was obtained (attachment 2) but the unstable velocity profile still occurred on the lower boundary(attachment 3), simulation stopped due to the error:
@STREAMLINE::SCARACT: THE NUMBER OF TRACEBACK INTERFACE CROSSINGS IGEN > 99

Could you tell me where I went wrong with the boundary settings? The lower boundary(outlet) is set as (5 4 4) with free traces, the other two (inlet) were (4 5 5) with prescribed tracer value.

All the simulations were done with the latest v7p3 version in parallel mode. Hope to hear from you soon.

Best regards,
Yunhao
The administrator has disabled public write access.
Moderators: pham

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