From 3655d7baefab5bd488c0cf18d13c0b4675b0e897 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Chi-Tu=C3=A2n=20Pham?= <chi-tuan.pham@edf.fr> Date: Thu, 26 Dec 2024 13:21:09 +0100 Subject: [PATCH] [VnV][telemac3d] Update bump example with better choices for a few keywords - TIDAL FLATS = YES (default value) to improve mass conservation of water - SOLVER FOR PPE = 1: conjugate gradient is a little bit more efficient than CGSTAB (= 6) or GMRES (= 7) for this example --- examples/telemac3d/bump/doc/bump.tex | 24 +++++++++++++----------- examples/telemac3d/bump/f3d_bump.slf | 4 ++-- examples/telemac3d/bump/t3d_bump.cas | 6 +----- examples/telemac3d/bump/vnv_bump.py | 6 +++--- 4 files changed, 19 insertions(+), 21 deletions(-) diff --git a/examples/telemac3d/bump/doc/bump.tex b/examples/telemac3d/bump/doc/bump.tex index a524f305a8..c77aae8aaf 100644 --- a/examples/telemac3d/bump/doc/bump.tex +++ b/examples/telemac3d/bump/doc/bump.tex @@ -19,7 +19,7 @@ The maximum elevation of the bump in its middle is 0 m (at $x$ = 10.0~m) with the profile of the singularity (Figure \ref{t3d:bump:fig:profil}) which is defined by: \begin{equation*} -z_{\rm{f}}(x) =max(-0.2, -0.0246875(x-10)^2) +z_{\rm{f}}(x) = \max(-0.2, -0.0246875(x-10)^2) \end{equation*} The studied flow regime provides a transition to super-critical flow conditions located on the bump, @@ -95,10 +95,16 @@ The time step is 0.01~s for a simulated period of 50~s. \bigskip This case is computed with the non-hydrostatic version. To solve advection, the method of characteristics is used for the velocities (scheme 1). -The GMRES (Generalized Minimal Residual Method, scheme 7) is used to solve +The conjugate gradient method (scheme 1) is used to solve the Pressure Poisson Equation with an accuracy fixed at the default value $10^{-8}$ (since version 8.1). +It is chosen because a little bit more efficient than CGSTAB (= 6) or GMRES +(= 7). The implicitation coefficients for depth and velocities are equal to 0.6. +\\ + +Mass conservation is improved (up to machine precision) by using default value +for the keyword \telkey{TIDAL FLATS} (= YES). \section{Results} @@ -109,16 +115,17 @@ It follows well the shape of the bump (Figures \ref{t3d:bump:fig:veloH} and \ref{t3d:bump:fig:veloV}). Generally, the results (Figure \ref{t3d:bump:fig:free_surface}) are in good agreement with the analytical -solution. This solution is described in details in [1].\\ +solution. This solution is described in details in \cite{Hervouet2007} +pages 128--129.\\ Moreover, the position of the hydraulic jump is correctly computed. However, a shift (difference of the free surface at the entrance) is observed on the free surface, which seems to be due to the way to calculate the free surface by \telemac{3D}. -%\section{Conclusion} +\section{Conclusion} -\bigskip -To conclude, this flow is well reproduced by \telemac{3D}. +%\bigskip +This flow is well reproduced by \telemac{3D}. \begin{figure}[!htbp] \centering @@ -140,8 +147,3 @@ To conclude, this flow is well reproduced by \telemac{3D}. and \telemac{3D} solution.} \label{t3d:bump:fig:free_surface} \end{figure} - -\section{Reference} - -[1] Hydrodynamics of Free Surface Flows modelling with the finite -element method. Jean-Michel Hervouet (Wiley, 2007) pp 128-129. diff --git a/examples/telemac3d/bump/f3d_bump.slf b/examples/telemac3d/bump/f3d_bump.slf index d003ba688b..8e95c79fbe 100644 --- a/examples/telemac3d/bump/f3d_bump.slf +++ b/examples/telemac3d/bump/f3d_bump.slf @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:f1482bf2e5d4a0c6e086080e7f5d43ceb70d7b948162f62ce039789a76b160d9 -size 1936821 +oid sha256:3ce5c4745750e2e8c776f259961a8a07deb29c908165d4ddc77aafdf396f76fa +size 484332 diff --git a/examples/telemac3d/bump/t3d_bump.cas b/examples/telemac3d/bump/t3d_bump.cas index 53a1303428..061360d2bf 100644 --- a/examples/telemac3d/bump/t3d_bump.cas +++ b/examples/telemac3d/bump/t3d_bump.cas @@ -47,8 +47,6 @@ INITIAL ELEVATION : 0.4 PRESCRIBED FLOWRATES : 0.;2. PRESCRIBED ELEVATIONS : 0.4;0. / -TIDAL FLATS = NO -/ NUMBER OF 2D PRIVATE ARRAYS = 3 VARIABLES FOR 2D GRAPHIC PRINTOUTS = 'U,V,H,B,S,PRIVE3' VARIABLES FOR 3D GRAPHIC PRINTOUTS = 'Z,U,V,W,DP' @@ -82,6 +80,4 @@ DYNAMIC PRESSURE IN WAVE EQUATION : YES / / SYSTEMES LINEAIRES DE L'OPTION NON-HYDROSTATIQUE / -SOLVER FOR PPE = 6 -/ACCURACY FOR PPE = 1.E-5 -/MAXIMUM NUMBER OF ITERATIONS FOR PPE = 250 +SOLVER FOR PPE = 1 / A LITTLE BIT MORE EFFICIENT THAN 6 OR 7 diff --git a/examples/telemac3d/bump/vnv_bump.py b/examples/telemac3d/bump/vnv_bump.py index 63ed80f400..20d9a45638 100644 --- a/examples/telemac3d/bump/vnv_bump.py +++ b/examples/telemac3d/bump/vnv_bump.py @@ -55,17 +55,17 @@ class VnvStudy(AbstractVnvStudy): # Comparison with the last time frame of the reference file. self.check_epsilons('vnv_1:T3DRES', 'f3d_bump.slf', - eps=[1.E-4, 1.E-3, 1.E-3, 1.E-3, 1.E-5]) + eps=[1.E-9]) # Comparison with the last time frame of the reference file. self.check_epsilons('vnv_2:T3DRES', 'f3d_bump.slf', - eps=[1.E-4, 2.E-3, 1.E-3, 1.E-3, 1.E-5]) + eps=[1.E-4, 7.E-4, 2.E-4, 2.E-4, 1.E-5]) # Comparison between sequential and parallel run. self.check_epsilons('vnv_1:T3DRES', 'vnv_2:T3DRES', - eps=[1.E-4, 1.E-3, 1.E-3, 1.E-3, 1.E-5]) + eps=[1.E-4, 7.E-4, 2.E-4, 2.E-4, 1.E-5]) def _post(self): -- GitLab