Welcome, Guest
Username: Password: Remember me

TOPIC: Treatment of Tidal Flats with Tracer Mass Conservation

Treatment of Tidal Flats with Tracer Mass Conservation 1 year 7 months ago #41229

  • toby.jhnsn
  • toby.jhnsn's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 151
  • Thank you received: 7
Hi,

I have a few questions regarding the correct specification of numerics when considering tidal flats and maintaining mass conservatism for tracers.

For advection schemes I typically use the method of characteristics (option 1) for the SCHEME FOR ADVECTION OF VELOCITIES alongside the TREATMENT OF NEGATIVE DEPTHS = 1. These are both default values and generally give good numerical stability.

However in some cases where I am carrying out tracer studies or sediment transport assessments and require mass conservatism with tidal flats it is necessary to use either NERD advection schemes 13 or 14 coupled with TREATMENT OF NEGATIVE DEPTHS = 2. There also appears to the option of using schemes 4 or 5 coupled with OPTION FOR ADVECTION SCHEME = 4 (LIPS). Which schemes most people are using (ideally with a good balance of stability but also the lowest possible numerical diffusion).

I am also a little consused around the requirement for the SUPG OPTION for water depth that is necessary when using TREATMENT OF NEGATIVE DEPTHS = 2. I am not sure why this option is required, when it appears to only be considered for SCHEME FOR ADVECTION OF XX = 2 (i.e SUPG).

Below is my numerics applied for treatment of tidal flats - simulation is running ok, free surface is a little noisy and smaller timestep and decreased free surface gradient compatibility required when switching from TREATMENT OF NEGATIVE DEPTHS = 1 to 2.

Can anbody advise whether this setup is in agreement with the recommendations, but also whether I can mix advection schemes 1 (characteristics) for velocities and NERD (14) for tracers while using TREATMENT of NEGATIVE DEPTHS = 2?

DISCRETIZATIONS IN SPACE : 11;11

TIDAL FLATS = YES                              
OPTION FOR THE TREATMENT OF TIDAL FLATS = 1    
TREATMENT OF NEGATIVE DEPTHS = 2               

TREATMENT OF THE LINEAR SYSTEM             : 2  / PSEUDO-WAVE EQUATION
SCHEME FOR ADVECTION OF VELOCITIES         : 1  / CHARACTERISTIC METHOD                                             
SCHEME FOR ADVECTION OF TRACERS            : 14 / NERD SCHEME - MASS CONSERVATIVE

SUPG OPTION                          	   : 2;0;2 / VELOCITY, DEPTH, TRACERS, k-epsilon

MASS-LUMPING ON H                          : 1    
CONTINUITY CORRECTION                      : YES

IMPLICITATION FOR DEPTH                    : 0.55    
IMPLICITATION FOR VELOCITY                 : 0.55
IMPLICITATION FOR DIFFUSION OF VELOCITY    : 1.00
IMPLICITATION COEFFICIENT OF TRACERS       : 0.6

FREE SURFACE GRADIENT COMPATIBILITY        : 0.1
The administrator has disabled public write access.

Treatment of Tidal Flats with Tracer Mass Conservation 1 year 7 months ago #41231

  • toby.jhnsn
  • toby.jhnsn's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 151
  • Thank you received: 7
Just following up with a couple of additional comments.

I realised that 'IMPLICITATION COEFFICIENT OF TRACERS : 0.6' is automatically set to 0 when using tracer advection schemes of 3,4,5,13,14 or 15.

I also wanted to better understand the numerical diffusion characteristics of the various schemes recommended for use with tidal flats. The Cone Test example in the T2D validation documentation (see attached) shows that the NERD Scheme (14) has relatively large numerical diffusion in comparison to PSI or N LIPS schemes.

I haven't tried so am unsure whether these LIPS schemes are compatible with tidal flats but it is stated in the user manual that:
The numerical advection schemes (keywords TYPE OF ADVECTION or SCHEME FOR ADVECTION
OF...) for tidal flats are:
  • 13 or 14: NERD scheme,
  • 4 or 5 coupled with OPTION FOR ADVECTION OF... = 4: LIPS scheme,
  • 15: ERIA scheme.

Has anybody has any experience using these schemes and is there any advantages/disadvantages between the LIPS schemes and NERD schemes when dealing with tidal flats, numerical diffusion and mass conservation?
Attachments:
The administrator has disabled public write access.

Treatment of Tidal Flats with Tracer Mass Conservation 1 year 7 months ago #41233

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1468
  • Thank you received: 563
Hello Toby,

OPTION FOR SUPG is not only used for the advection with SUPG scheme, but also in subroutine PROPAG for the matrices to solve the big linear system.

PSI scheme (= 5) does not work if there is no water, so does N scheme (= 4).
If you want to have a conservative scheme for tracers working with tidal flats, the choices are limited to:
- NERD (= 14 or 13),
- LIPS (= 4 or 5 + option = 4),
- ERIA (= 15).
LIPS and ERIA are less diffusive than NERD (its principal drawback).
All of them require TREATMENT OF NEGATIVE DEPTHS = 2 or 3 and the other ones you have already written (MASS-LUMPING FOR H = 1., CONTINUITY CORRECTION = YES, SUPG OPTION = 0 for H.

You can mix characteristics for velocities and LIPS for tracers.

FYI in 3D, I usually use LIPS for tracers and sometimes characteristics for velocities when faster (LIPS is now the default advection schemes for every variable in 3D, I recommend it in particular for tracers with tidal flats).

FYI also, it was decided to keep characteristics as default for tracers only because faster but I do not recommend it for tracers as not conservative.

Hope this helps,

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

Treatment of Tidal Flats with Tracer Mass Conservation 1 year 7 months ago #41236

  • toby.jhnsn
  • toby.jhnsn's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 151
  • Thank you received: 7
Hi Chi-Tuan,

Thanks for your feedback - definitely clear to me now. Will try to use the LIPS schemes for tracer studies moving forward I think.

Regards,
Toby
The administrator has disabled public write access.

Treatment of Tidal Flats with Tracer Mass Conservation 1 year 4 months ago #41810

  • toby.jhnsn
  • toby.jhnsn's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 151
  • Thank you received: 7
Just following up on this discussion.

Working on another study at the moment using tracers to model water exchange. As far as I can tell my model has been setup with all recommendations for conservation of tracer mass. I have attached my CAS file for reference.

Open tracer boundaries of the model domain are also closed so I would expect almost near perfect conservation of tracer throughout the simulation.

As you can see in the attached printout, it appears that I am losing some tracer mass from the very beginning of the simulation. Does anybody know what this may be attributed to? Is it just the precision of the solution or perhaps the numerics are not truely mass conservative?

Thanks,
Attachments:
The administrator has disabled public write access.

Treatment of Tidal Flats with Tracer Mass Conservation 1 year 4 months ago #41815

  • toby.jhnsn
  • toby.jhnsn's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 151
  • Thank you received: 7
After doing some more testing I found that my issue was related to the fact that I didn't have the following term enabled:

OPTION FOR THE DIFFUSION OF TRACERS = 2

Discovered it was related to diffusion when I disabled diffusion of the tracers. Enabling this has now signifciantly reduced the mass loss from the order of 1E-07 to 1E-12 on each timestep. Still not entirely mass conservative but much better.

Does anybody know if theres anything else I should be considering here to improve the solution?

Cheers,
Toby
The administrator has disabled public write access.

Treatment of Tidal Flats with Tracer Mass Conservation 1 year 4 months ago #41819

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1468
  • Thank you received: 563
Hello Toby,

When solving the diffusion step, there is a linear system which has to be inverted. An iterative solver is usually chosen to solve this step (i.e. conjugate gradient). If the chosen accuracy is not low enough, mass conservation may not be good enough. In your listing, I can read GRACJ (BIEF) : 1 ITERATION(S), RELATIVE PRECISION: 0.1358086E-09 which means that accuracy can be quite reduced.

In your case, I would suggest you to decrease ACCURACY FOR DIFFUSION OF TRACERS to 1.E-15. It should decrease tracer loss. The drawback may be CPU time will increase.

Hope this helps,

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

Treatment of Tidal Flats with Tracer Mass Conservation 1 year 4 months ago #41826

  • toby.jhnsn
  • toby.jhnsn's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 151
  • Thank you received: 7
Hi Chi-Tuan,

Thanks for the feedback - I did run some tests with increased precision after I wrote this post and it definitely did improve the mass conservation (of course at the expense of the computation time.

It seems that its a bit of trial and error to arrive at an acceptable mass loss (and precision). Although the mass loss was quite signifciant to begin with the overall results I was interested in did not really change that much once it had been improved.
The administrator has disabled public write access.

Treatment of Tidal Flats with Tracer Mass Conservation 7 months 6 days ago #43448

  • toby.jhnsn
  • toby.jhnsn's Avatar
  • OFFLINE
  • Expert Boarder
  • Posts: 151
  • Thank you received: 7
Hi Chi-Tuan,

Revisiting this older discussion I'm still unable to wrap my head around why my tracers have fairly large relative mass errors even with the ACCURACY FOR DIFFUSION OF TRACERS = 1E-15.

In the case attached, I have closed boundaries so there are no losses through the boundary, am using the NERD scheme for advection which is meant to be mass conservative. I believe the loss of accuracy is related to the diffusion more so than the advection but even increasing the accuracy to 1E-15 still yields a relative error on the final total tracer mass of the order of 1E-2 to 1E-5.

Do you know if this is to be expected - is there anything I may be missing in the setup of the model?

Unable to attach printout so below is an excerpt of the final mass balance
CVTRVF_NERD_2 (SCHEME 13 OR 14): 13 ITERATIONS
GRACJG (BIEF) : 28 ITERATIONS, RELATIVE PRECISION: 0.5964317E-08
POSITIVE DEPTHS OBTAINED IN 13 ITERATIONS
DIFFUSION OF TRACERS STEP
CVTRVF_NERD (SCHEME NERD, 13 OR 14): 13 ITERATIONS
GRACJG (BIEF) : 4 ITERATIONS, RELATIVE PRECISION: 0.4967410E-16

BALANCE OF T1 (UNIT: * M3)

INITIAL QUANTITY : 0.2282815E+11
FINAL QUANTITY : 0.2282815E+11
BOUNDARY 1 FLUX: -0.000000 ( >0 : ENTERING <0 : EXITING )
TOTAL QUANTITY LOST : 493.3176
RELATIVE ERROR : 0.2161006E-07

FINAL BALANCE OF T1 (UNIT: * M3)

INITIAL QUANTITY : 0.2282830E+11
FINAL QUANTITY : 0.2282815E+11
TOTAL QUANTITY LOST : 148170.2
RELATIVE ERROR : 0.6490640E-05

CVTRVF_NERD (SCHEME NERD, 13 OR 14): 13 ITERATIONS
GRACJG (BIEF) : 4 ITERATIONS, RELATIVE PRECISION: 0.2713111E-16

BALANCE OF T2 (UNIT: * M3)

INITIAL QUANTITY : 0.2958074E+11
FINAL QUANTITY : 0.2958070E+11
BOUNDARY 1 FLUX: -0.000000 ( >0 : ENTERING <0 : EXITING )
TOTAL QUANTITY LOST : 39823.41
RELATIVE ERROR : 0.1346262E-05

FINAL BALANCE OF T2 (UNIT: * M3)

INITIAL QUANTITY : 0.2962721E+11
FINAL QUANTITY : 0.2958070E+11
TOTAL QUANTITY LOST : 0.4650739E+08
RELATIVE ERROR : 0.1569753E-02

BALANCE OF WATER VOLUME
VOLUME IN THE DOMAIN : 0.7555957E+11 M3
FLUX BOUNDARY 1: -319256.7 M3/S ( >0 : ENTERING <0 : EXITING )
RELATIVE ERROR IN VOLUME AT T = 0.3275E+07 S : 0.4658581E-14
FINAL BALANCE OF WATER VOLUME

RELATIVE ERROR CUMULATED ON VOLUME: 0.6126976E-12

INITIAL VOLUME : 0.7459715E+11 M3
FINAL VOLUME : 0.7555957E+11 M3
VOLUME THAT ENTERED THE DOMAIN: 0.9624179E+09 M3 ( IF <0 EXIT )
TOTAL VOLUME LOST : 0.4629517E-01 M3
PRERES: MAXIMUM COURANT NUMBER: 0.3697225

END OF TIME LOOP

EXITING MPI


Thanks
Attachments:
The administrator has disabled public write access.

Treatment of Tidal Flats with Tracer Mass Conservation 6 months 2 weeks ago #43522

  • pham
  • pham's Avatar
  • OFFLINE
  • Administrator
  • Posts: 1468
  • Thank you received: 563
Hello Toby,

Can you upload your Fortran file please?

Can you also try a few things for me with your configuration (4 different runs):
- use OPTION FOR THE DIFFUSION OF TRACERS = 1 (default value) perhaps even OPTION FOR THE DIFFUSION OF VELOCITIES = 1, I wonder if there may be issues with tidal flats and mass balance. I have the feeling that nodes with water depth below 1 cm are not taken into account by reading the source code,
- use the same initial conditions for the 2 tracers, do you have the same balances?
- use scheme 14 for velocity components and the 2 tracers,
- remove culverts.

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

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