Welcome, Guest
Username: Password: Remember me

TOPIC: Computation fails in WAVE_EQUATION in restart mode

Computation fails in WAVE_EQUATION in restart mode 8 years 11 months ago #19183

  • pilou1253
  • pilou1253's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 584
  • Thank you received: 106
Hi all!

I have a 3D model that stops at the first time step on a restart procedure (either scalar or parallel). The failure occur in WAVE_EQUATION, see the log in attachment.

After some troubleshouting it appears that this problem is caused by a local head loss that is applied at the open boundary (see source.f attached).

No paramaters are changed in restart. I attach my cas file.

Some info on my model:
- one tracer (temperature)
- wind
- two source (one inflow, one sink)
- horizontal levels
- hydrostatic mode
- k-epsilon


Any idea of what could be causing this problem, and if this can be fixed?

Thank you in advance!

Best regards
PL

fatalerror.jpg



File Attachment:

File Name: source.f
File Size: 5 KB



File Attachment:

File Name: cas3d_suite_2015-12-14.txt
File Size: 12 KB
The administrator has disabled public write access.

Computation fails in WAVE_EQUATION in restart mode 8 years 11 months ago #19185

  • jmhervouet
  • jmhervouet's Avatar
Hello,

It is certainly due to the fact that you are in hydrostatic mode, in which case WN is not even allocated (in fact allocated wit size 0), whereas you use it in your head loss formula. This would have nothing to see with the restart. So remove WN from the computation of NORM in source.f and see what happens...

With best regards,

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

Computation fails in WAVE_EQUATION in restart mode 8 years 11 months ago #19186

  • pilou1253
  • pilou1253's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 584
  • Thank you received: 106
Hello,

Thank you for your answer!
The restarted computation is now starting properly in hydrostatic with following modifications in source.f:
DO I=1,NPOIN3
        IF(MESH3D%Y%R(I).GT.5550.D0.AND.MESH3D%X%R(I).GT.850.D0) THEN
!          NORM=SQRT(UN3%R(I)**2+VN3%R(I)**2+WN3%R(I)**2)
          NORM=SQRT(UN3%R(I)**2+VN3%R(I)**2) 
          S1U%R(I)=0.01D0*NORM
          S1V%R(I)=0.01D0*NORM
!          S1W%R(I)=0.01D0*NORM  
        ENDIF
      ENDDO

The initial computation runs fine with my original version of source.f, including S1W%R(I)=0.01D0*NORM. But if I understand you right it should not be the case...

BUT, it now fails in CVDF3D for tracers after 5 iterations:

APPEL DE CVDF3D POUR TRACEUR 1
MURD3D: ITERATION NO. REACHED 100 , STOP.
ALFA = 1.0000000000000000
GUILTY POINT = 1

PLANTE: PROGRAM STOPPED AFTER AN ERROR


I already had this problem in the initial run and it was "fixed" by changing advection scheme for tracers to 14 or 5. I now have 5 in my cas file, 14 giving a poor mass balance. Any more tips?

Thank you in advance!

Best regards
PL
The administrator has disabled public write access.

Computation fails in WAVE_EQUATION in restart mode 8 years 11 months ago #19187

  • jmhervouet
  • jmhervouet's Avatar
Hello,

Scheme 5 (PSI) officially does not work with tidal flats, whereas scheme 14 (NERDS) does. Sometimes scheme 5 can work with elements which have a volume = 0, but you need a clear difference between elements with no volume and others.

You cannot say that scheme 14 gives a poor mass balance since you have :

TREATMENT OF FLUXES AT THE BOUNDARIES : 1;1;1

try 2;2;2, and scheme 14 gives a mass balance with machine accuracy (however with diffusion it will depend on the accuracy of the solver for ).

I hope this helps, regards,

JMH
The administrator has disabled public write access.

Computation fails in WAVE_EQUATION in restart mode 8 years 11 months ago #19189

  • pilou1253
  • pilou1253's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 584
  • Thank you received: 106
Hello,

OK, I will try it. I initially had option 2 but changed to 1 in order to ensure that my tracer concentration at boundaries would correspond to the prescribed values (I had stratification).

Another question regarding stratification: I could read some posts on the forum about stratification and mixing with wind action. This is exactely my case, if I run a case with a stratified water body (temperature and salt), my stratification gets destroyed rather quick. I read that refining the vertical mesh (horizontal levels) can help. Is there any other parameter that can help to keep the stratification (non hydrostatic version, ...) ?

Thank you in advance!

Best regards
PL
The administrator has disabled public write access.

Computation fails in WAVE_EQUATION in restart mode 8 years 11 months ago #19190

  • jmhervouet
  • jmhervouet's Avatar
Hello,

Our best case with stratifications is the Berre lagoon, it works with planes with prescribed elevation to follow the stratifications, non-hydrostatic option, the k-epsilon model, and PSI scheme (5) on tracers, the latter has a threshold volume of 0.001 for treating the elements (the stable time-step for distributive schemes is proportional to the elements volumes, so the smallest active element must have a reasonable size, hence it is not suitable for tidal flats). Unconditionnally stable and less diffusive advection schemes are on the way but only in 2D for version 7.1, the 3D versions will be in version 7.2.

Another point that must be understood is the fact that any stratification is naturally destroyed by diffusion along the vertical, unless there is a physical factor that maintains it, e.g. heating by the sun for thermal stratifications. In the Berre lagoon the salt stratification is maintained by the salt coming from the see and the fresh water from a power plant.

With best regards,

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

Computation fails in WAVE_EQUATION in restart mode 8 years 11 months ago #19192

  • pilou1253
  • pilou1253's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 584
  • Thank you received: 106
Hello !

Thank you for information.
Regarding stratification, I defined a vertical tracer profile (in tra_prof_z) at my inflow boundaries with exactly the same stratification than my initial conditions. However, my inflows are small and my stratification is strong (from 18 degrees and water surface to 5 degrees at the bottom). I guess it is a bit overkill...

I have another question: how should we interprete the mass balance results and especially MASS LOSS? For example, I have the following:

--- TRACER 1 ---
INITIAL MASS : 0.1675915E+10
FINAL MASS : 0.1667260E+10
MASS EXITING (BOUNDARIES OR SOURCE) : 8656228.
MASS LOSS : -286.2156

Compared with the initial or final mass, the mass loss is rather small (approx. 1,5E-5 %). But is it right to assess the mass balance this way?

Thank you in advance

Best regards
PL
The administrator has disabled public write access.

Computation fails in WAVE_EQUATION in restart mode 8 years 11 months ago #19193

  • jmhervouet
  • jmhervouet's Avatar
Hello,

I would expect less mass error. Try a smaller ACCURACY FOR DIFFUSION OF TRACERS, the default is 1.E-6, try 1.E-8 and 1.E-10 and see what happens. A relative error of about 1.E-10 can normally be reached.

With best regards,

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

Computation fails in WAVE_EQUATION in restart mode 8 years 11 months ago #19194

  • pilou1253
  • pilou1253's Avatar
  • OFFLINE
  • openTELEMAC Guru
  • Posts: 584
  • Thank you received: 106
Hello,

I already have ACCURACY FOR DIFFUSION OF TRACERS = 1.E-10. I made a test with 1.E-14 but got similar results (I guess this is beyond machine accuracy).

I have a relative error of 1.5E-7 with wind forcing and of 1.E-8 without wind for a long simulation.

The limiting factor might be my time step. The mass balance is improved by factor 10-2 if I reduce it from 5s to 1s. My problem is that 1s is too costly in terms of computation time, and the spatial spreading is pretty much similar between the two runs.

But is there some rule stating that a relative error less than 1.E-XX is "poor" or so?

Thank you in advance

Regards
PL
The administrator has disabled public write access.

Computation fails in WAVE_EQUATION in restart mode 8 years 11 months ago #19195

  • jmhervouet
  • jmhervouet's Avatar
Hello,

This error is OK but I expected less. Anyway as the total mass is about constant you can have a relative error that tends to infinity if time tends to infinity, as you accumulate errors on the boundary, only the result on a single time step is relevant in that case.

Regards,

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

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