Welcome, Guest
Username: Password: Remember me

TOPIC: Numerical oscillations in a canal

Numerical oscillations in a canal 2 years 9 months ago #39759

  • Karen
  • Karen's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 10
Hello,

I am simulating a canal that discharges into a wide river with TELEMAC2D v8p0r0. The river portion of the model seems to be well represented, however the simulated flow in the canal has large numerical oscillations. I have tried reducing the time step, modifying the mesh and gradually increasing the flow in the canal, but they do not stop the oscillations from appearing. I am running v8p0r0 with gfortran 4.8.0 and Python 2.7.5 on Windows 10.

I used the following numerical options:

SOLVEUR = 7
OPTION DU SOLVEUR = 3
BANCS DECOUVRANTS = OUI
MODELE DE TURBULENCE = 1
NOMBRE DE SOUS-ITERATIONS POUR LES NON-LINEARITES = 3
FORME DE LA CONVECTION = 1;5
COEFFICIENT DE DIFFUSION DES VITESSES = 1.E-4
MASS-LUMPING SUR H = 1
MASS-LUMPING SUR LA VITESSE = 1
DISCRETISATIONS EN ESPACE = 12;11
COMPATIBILITE DU GRADIENT DE SURFACE LIBRE = 0.5
TRAITEMENT DU SYSTEME LINEAIRE = 2

Out of curiosity, I ran the same model with v6p1 (Perl scripts) since I have used this version extensively in the past. With v6p1, I left the DISCRETISATIONS EN ESPACE and COMPATIBILITE DU GRADIENT DE SURFACE LIBRE as the default values. Interestingly, there were no oscillations at all in the canal and water levels were well represented.

Any advice on how to reduce the oscillations in the canal using v8?

Thank you in advance!
The administrator has disabled public write access.

Numerical oscillations in a canal 2 years 9 months ago #39769

  • c.coulet
  • c.coulet's Avatar
  • OFFLINE
  • Moderator
  • Posts: 3722
  • Thank you received: 1031
Hi
No immediate idea to solve this problem but few ideas to investigate.
The oscillations are not related to python or perl.
This could be linked to compiler if compilation option changed (particularly if optimisation is used and is different)
By the way, I suspect a change in the default value of some keywords so you should look at this (compare the dictionnary or add &ETA at the end of the steering file and check in the listing or look at the release notes where such changes are indicated)
Hope this helps
Christophe
The administrator has disabled public write access.

Numerical oscillations in a canal 2 years 9 months ago #39774

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

Using DISCRETISATIONS EN ESPACE = 12;11 means quasi bubble element for velocity (rather than linear P1 element by default = 11). It is more accurate with quasi bubble, but may be less stable.

If you use v8p0 (or rather the latest v8p3r1) with default value for DISCRETISATIONS EN ESPACE (= 11;11), the results will be changed and may have less spurious oscillations.

Hope this helps,

Chi-Tuan
The administrator has disabled public write access.

Numerical oscillations in a canal 2 years 9 months ago #39797

  • Karen
  • Karen's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 10
Hello,

Thanks M. Coulet and Chi-Tuan. Based on your advice, I ran some tests with v8p0 using the default values for various keywords. The results were different, but oscillations up to +/- 0.8 m were still present in the canal near its confluence with the river. The river is approximately 25 times wider than the canal. Densifying the mesh at the confluence did not improve stability and increased calculation time significantly.

I also changed the compiler optimization from -O2 to -O3, since that is what I used in v6p1. This did not get rid of the oscillations in the canal and had a negligible influence on results in the river portion of the model.

My next test will be trying to run v8 with Intel Fortran instead of gfortran.

Best regards,
Karen
The administrator has disabled public write access.

Numerical oscillations in a canal 2 years 9 months ago #39853

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

Can you send at least your full steering file + boundary conditions file please?

Chi-Tuan
The administrator has disabled public write access.

Numerical oscillations in a canal 2 years 9 months ago #39857

  • Karen
  • Karen's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 10
Hello,

I was able to run a test with Intel Fortran. The oscillations were still present with v8p0 and ifort.

As another test, I ran the model with ifort and v6p1 (perl) using the unstable v8p0 result as a restart file. The simulation quickly stabilized and the water levels in the canal matched the observed data. Furthermore, the simulated longitudinal profile in the canal using v6p1 was smoother with ifort compared to gfortran.

I have attached images of the velocity vectors simulated in the canal using v8p0 and v6p1. The unstable v8p0 model has velocity vectors that are sometimes perpendicular to the axis of the canal. The velocity vectors simulated with v6p1 are aligned with the axis of the canal, as expected.

For now I’m out of ideas of how to stabilize my v8p0 model. I have used v8p0 for other models without issue.

Attached are the steering file and the boundary conditions file as requested.

Thanks for your help!
Karen


v8p0_Velocity_vectors_2022-02-22.jpg


v6p1_Velocity_vectors_2022-02-22.jpg


File Attachment:

File Name: CAS_1_2022-02-22.txt
File Size: 4 KB


File Attachment:

File Name: Geo_1_2022-02-22.cli
File Size: 113 KB
The administrator has disabled public write access.

Numerical oscillations in a canal 2 years 9 months ago #39861

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

TELEMAC-2D has changed since v6p1 (more than 10 years ago).
In that release, there were some values of keywords changed in lecdon_telemac2d subroutine when activating wave equation (TREATMENT OF THE LINEAR SYSTEM = 2). In particular, IMPLICITATION FOR DEPTH was automatically set to 1. and PRECONDITIONING set to 5 if initially set to 2 (or let to default value = 2).

You can try to change these 2 keywords in your simulation. The 1st one should help to smooth the results and be more stable. If an intermediate value of 0.9 or 0.95 is OK for your computations, I would recommend to use such values rather than 1.

After that, if your results have already improved but you have some spurious oscillations, do not hesitate to set FREE SURFACE GRADIENT COMPATIBILITY to 0.9 or less.

I would also advise you to read the recommendations of the TELEMAC-2D user manual (chapter 6), in particular for TREATMENT OF NEGATIVE DEPTHS = 2 combined with SUPG OPTION = 0;0 and CONTINUITY CORRECTION = YES (to avoid negative depths if you want) or use SOLVER = 1 or 2 which may be more efficient than GMRES with the wave equation).

Hope this helps,

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

Numerical oscillations in a canal 2 years 8 months ago #39929

  • Karen
  • Karen's Avatar
  • OFFLINE
  • Fresh Boarder
  • Posts: 10
Hi Chi-Tuan,

Thank you so much for your help!

I was able to stabilize my v8p0 model using the keywords IMPLICITATION FOR DEPTH = 0.9 and PRECONDITIONING = 2.

I tested the other keywords as you suggested and was able to obtain water levels in the canal that were close to those observed.

Here are the numerical options I used:

BANCS DECOUVRANTS = OUI
MODELE DE TURBULENCE = 1
BILAN DE MASSE = OUI
NOMBRE DE SOUS-ITERATIONS POUR LES NON-LINEARITES = 3
FORME DE LA CONVECTION = 1;5
COEFFICIENT DE DIFFUSION DES VITESSES = 1.E-4
MASS-LUMPING SUR H = 1
MASS-LUMPING SUR LA VITESSE = 1
STOCKAGE DES MATRICES = 3
TRAITEMENT DU SYSTEME LINEAIRE = 2
CORRECTION DE CONTINUITE = OUI
SOLVEUR = 1
IMPLICITATION POUR LA HAUTEUR = 0.9
PRECONDITIONNEMENT = 2
TRAITEMENT DES HAUTEURS NEGATIVES = 2
OPTION DE SUPG = 0;0
COMPATIBILITE DU GRADIENT DE SURFACE LIBRE = 0.9

Thanks again!

Best Regards,
Karen
The administrator has disabled public write access.

Numerical oscillations in a canal 2 years 8 months ago #39953

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

Good news if it works for you now. Thanks for sharing your feedback. It may help other users.

Chi-Tuan
The administrator has disabled public write access.
Moderators: pham

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