From e0ac275968caa2a527a2fdbdabedbcb94992368d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Chi-Tu=C3=A2n=20Pham?= <chi-tuan.pham@edf.fr>
Date: Fri, 27 Dec 2024 17:59:55 +0100
Subject: [PATCH] [VnV][telemac3d] Update V example with better choices for 2
 keywords - TREATMENT OF NEGATIVE DEPTHS = 2 (new default value since release
 9.0) and TIDAL FLATS = YES (default value) to improve mass conservation of
 water in particular for prismatic elements (also chosen for tetrahedra)

---
 examples/telemac3d/V/doc/V.tex       |  7 ++++++-
 examples/telemac3d/V/f3d_V.slf       |  4 ++--
 examples/telemac3d/V/f3d_V_prism.slf |  2 +-
 examples/telemac3d/V/t3d_V_prism.cas |  2 --
 examples/telemac3d/V/t3d_V_tetra.cas |  4 ----
 examples/telemac3d/V/vnv_V.py        | 12 ++++++------
 6 files changed, 15 insertions(+), 16 deletions(-)

diff --git a/examples/telemac3d/V/doc/V.tex b/examples/telemac3d/V/doc/V.tex
index 7f88a683cd..d5806544a2 100644
--- a/examples/telemac3d/V/doc/V.tex
+++ b/examples/telemac3d/V/doc/V.tex
@@ -87,9 +87,14 @@ In any case, the situation can be considered as globally stable. The test is don
 to verify the horizontal diffusion terms, which are estimated in the transformed $\sigma$-mesh 
 (buoyancy terms). In this case, the tracer does not induce any flow. 
 The final mass balance of computation using prism elements exposes a very good mass conservation 
-(the mass loss is less than 0.9 10$^{-6}$ for the water and 0.1 for the temperature). %water -0.8780626E-06 T:-0.9947534E-01
+(the mass loss is less than 10$^{-9}$ for the water and 10$^{-3}$ for the temperature). %water 0.1164153E-09 T 0.8483063E-03
 For the computation using tetrahedron elements, the conservation of mass and temperature is perfect.
 
+For prismatic elements, mass conservation is improved (up to machine precision
+for water depth) by using default value for keyword
+\telkey{TREATMENT OF NEGATIVE DEPTHS} (= 2), contrary to choice 1 for this
+example until 9.0.
+
 \begin{figure}[!htbp]
 \begin{minipage}[t]{0.50\textwidth}
  \centering
diff --git a/examples/telemac3d/V/f3d_V.slf b/examples/telemac3d/V/f3d_V.slf
index e84483e879..e6232c8a7e 100644
--- a/examples/telemac3d/V/f3d_V.slf
+++ b/examples/telemac3d/V/f3d_V.slf
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:124dfa46ce3a92c559c74a7b8c459035f5fe16ad6c628794b9d258f2f1bb024a
-size 500801
+oid sha256:4e4817df5ef27652fe5cef1e927bd9d1da56169cb245680f8f7ee37b847127cc
+size 303768
diff --git a/examples/telemac3d/V/f3d_V_prism.slf b/examples/telemac3d/V/f3d_V_prism.slf
index 326bbcb673..c7e52960a1 100644
--- a/examples/telemac3d/V/f3d_V_prism.slf
+++ b/examples/telemac3d/V/f3d_V_prism.slf
@@ -1,3 +1,3 @@
 version https://git-lfs.github.com/spec/v1
-oid sha256:6cb2e7d0777a42dc6bf7f9c8fa0c69352890e7768044021c07d0a67ef8e88167
+oid sha256:a696278f292cd649b924bdbb5582afd14856092ee4b5ee3ac7b6251b78f9ed18
 size 303768
diff --git a/examples/telemac3d/V/t3d_V_prism.cas b/examples/telemac3d/V/t3d_V_prism.cas
index 082dcc1a17..3cade54a13 100644
--- a/examples/telemac3d/V/t3d_V_prism.cas
+++ b/examples/telemac3d/V/t3d_V_prism.cas
@@ -60,7 +60,6 @@ BETA EXPANSION COEFFICIENT FOR TRACERS : 2.E-4
 STANDARD VALUES FOR TRACERS : 0.
 AVERAGE WATER DENSITY = 999.972
 LAW OF BOTTOM FRICTION = 0
-TIDAL FLATS = NO
 HYDROSTATIC INCONSISTENCY FILTER = YES
 INITIAL CONDITIONS : 'CONSTANT ELEVATION'
 INITIAL ELEVATION : 0.1
@@ -68,4 +67,3 @@ INITIAL ELEVATION : 0.1
 / DEFAULT VALUES UNTIL V8P5 KEPT FOR NON REGRESSION
 /
 VERTICAL TURBULENCE MODEL = 1
-TREATMENT OF NEGATIVE DEPTHS = 1
diff --git a/examples/telemac3d/V/t3d_V_tetra.cas b/examples/telemac3d/V/t3d_V_tetra.cas
index cede094ff3..c7ac610267 100644
--- a/examples/telemac3d/V/t3d_V_tetra.cas
+++ b/examples/telemac3d/V/t3d_V_tetra.cas
@@ -61,10 +61,6 @@ BETA EXPANSION COEFFICIENT FOR TRACERS : 2.E-4
 STANDARD VALUES FOR TRACERS : 0.
 AVERAGE WATER DENSITY = 999.972
 LAW OF BOTTOM FRICTION = 0
-TIDAL FLATS = NO
 HYDROSTATIC INCONSISTENCY FILTER = YES
 INITIAL CONDITIONS : 'CONSTANT ELEVATION'
 INITIAL ELEVATION : 0.1
-/
-/ DEFAULT VALUE UNTIL V8P5 KEPT FOR NON REGRESSION
-TREATMENT OF NEGATIVE DEPTHS = 1
diff --git a/examples/telemac3d/V/vnv_V.py b/examples/telemac3d/V/vnv_V.py
index c101b98387..c10b52e707 100644
--- a/examples/telemac3d/V/vnv_V.py
+++ b/examples/telemac3d/V/vnv_V.py
@@ -73,32 +73,32 @@ class VnvStudy(AbstractVnvStudy):
         # Comparison with the last time frame of the reference file.
         self.check_epsilons('vnv_1:T3DRES',
                             'f3d_V.slf',
-                            eps=[1.E-15])
+                            eps=[1.E-6, 1.E-14, 1.E-14, 1.E-14, 1.E-14, 1.E-14])
 
         # Comparison with the last time frame of the reference file.
         self.check_epsilons('vnv_2:T3DRES',
                             'f3d_V.slf',
-                            eps=[1.E-15])
+                            eps=[1.E-6, 1.E-14, 1.E-14, 1.E-14, 1.E-14, 1.E-14])
 
         # Comparison between sequential and parallel run.
         self.check_epsilons('vnv_1:T3DRES',
                             'vnv_2:T3DRES',
-                            eps=[1.E-15])
+                            eps=[1.E-6, 1.E-14, 1.E-14, 1.E-14, 1.E-14, 1.E-14])
 
         # Comparison with the last time frame of the reference file.
         self.check_epsilons('vnv_3:T3DRES',
                             'f3d_V_prism.slf',
-                            eps=[1.E-15])
+                            eps=[1.E-14])
 
         # Comparison with the last time frame of the reference file.
         self.check_epsilons('vnv_4:T3DRES',
                             'f3d_V_prism.slf',
-                            eps=[1.E-15])
+                            eps=[1.E-13])
 
         # Comparison between sequential and parallel run.
         self.check_epsilons('vnv_3:T3DRES',
                             'vnv_4:T3DRES',
-                            eps=[1.E-15])
+                            eps=[1.E-13])
 
 
     def _post(self):
-- 
GitLab