### Manual added in doc/Manual and a note on how to implement the...

Manual added in doc/Manual and a note on how to implement the Saint-Venant-Exner approach in a coupled way in SLIM is also added
parent 4362afd1
Pipeline #2386 failed with stage
in 2 minutes and 22 seconds
 start = 0; end = 10; //Create the points to draw the contour Point(1) = {start, 0.605, 0, 1.0}; Point(2) = {start, -0.605, 0, 1.0}; Point(3) = {start, 0.2, 0, 1.0}; Point(4) = {start, 0.1492, 0, 1.0}; Point(5) = {start, -0.1492, 0, 1.0}; Point(6) = {start, -0.2, 0, 1.0}; Point(7) = {end, 0.605, 0, 1.0}; Point(8) = {end, -0.605, 0, 1.0}; Point(9) = {end, 0.2, 0, 1.0}; Point(10) = {end, -0.1492, 0, 1.0}; Point(11) = {end, 0.1492, 0, 1.0}; Point(12) = {end, -0.2, 0, 1.0}; //Create the lines between the points Line(1) = {7, 1}; Line(2) = {2, 8}; Line(3) = {1, 3}; Line(4) = {3, 4}; Line(5) = {4, 5}; Line(6) = {5, 6}; Line(7) = {6, 2}; Line(8) = {9, 7}; Line(9) = {11, 9}; Line(10) = {10, 11}; Line(11) = {12, 10}; Line(12) = {8, 12}; Line(13) = {3, 9}; Line(14) = {4, 11}; Line(15) = {5, 10}; Line(16) = {6, 12}; //Defines the boundary of every surface. The elements will be generated separately on each surface Line Loop(17) = {13, 8, 1, 3}; Plane Surface(18) = {17}; Line Loop(19) = {14, 9, -13, 4}; Plane Surface(20) = {19}; Line Loop(21) = {15, 10, -14, 5}; Plane Surface(22) = {21}; Line Loop(23) = {16, 11, -15, 6}; Plane Surface(24) = {23}; Line Loop(25) = {2, 12, -16, 7}; Plane Surface(26) = {25}; //Defines the physical tags that will be used to impose the boundary conditions Physical Line("Wall") = {1, 2}; Physical Line("In") = {3, 4, 5, 6, 7}; Physical Line("Out") = {8, 9, 10, 11, 12}; Physical Surface("Domain") = {18, 20, 22, 24, 26}; //Other parameters Mesh.CharacteristicLengthFactor = 0.1; Mesh.Algorithm = 6;
 import slimPre import mySlim as slim from dgpy.scripts import slim_private import numpy ################## ## Parameters ## ################## #File parameters meshfile = "CompoundChannel.msh" output_bath = "output/bath" #Output folder for the bathymetry output_nc = "netcdf/" #Output folder for NETcdf files mesh_start = 0 mesh_end = 10 #Time parameters dt = 1 #Time step tstart = 0 #Starting time for the hydrodynamics tend = 160 #End time of the simulation tinit = 80 #Starting time for the tracer equation tstab = 50 #Time at which the boundary conditions reach their final value export = dt #Bathymetry parameters b = 0.605 bfp = 0.405 h = 0.0752 hfp = 0.0508 s0 = 0.0019 level = 0.0119 #Parameters boundary conditions q = 0.015 slip = 0.996 #Flow parameters smagorinsky_coefficient = 0.4 manning_mc = 0.010 manning_w = 0.001 manning_fp = 0.016 #Parameters tracer concentrationIn = 0.0 concentration = 0.0 source = 1.0 #Parameters sediment initial_bottom_concentration = 0.0 windU = 1e-4 windV = 1e-4 rhosediment = 2650 porosity = 0.4 rhosedimentbottom = rhosediment*(1.-porosity) d50 = 91e-6 d90 = 0.0004 shields = 0.0119 diffusivity = 1e-6 g = 9.81 fluxMc = 1 diffusivity_mode_constant = False diffusivity_mc = 1.2e-3 diffusivity_w = 1.0e-3 diffusivity_fp = 0.4e-3 smagorinsky_coefficient = 0.3 h = 0.063 manning_mc = 0.010 manning_w = 0.01 manning_fp = 0.012 q = 0.015 level = 0.005 #The functions to calculate various parameters are defined. They will be used later def bathf(x,y) : bathi = 0. if abs(y) >= (b-bfp) : bathi = h-hfp elif abs (y) >= (b-bfp-hfp) : bathi = h-(abs(y)-(b-bfp-hfp)) else : bathi = h return bathi+x*s0-level def calcEta(x,y) : return -x*s0+level def calcUInit(x,y) : return 0. def calcManning(x,y): n = manning_mc if abs(y) >= (b-bfp) : n = manning_fp elif abs (y) >= (b-bfp-hfp) : n = manning_w else : n = manning_mc return n def calcDiffusivity(x,y): if abs(y) >= (b-bfp) : d = diffusivity_fp elif abs (y) >= (b-bfp-hfp) : d = diffusivity_mc + (abs(y)-(b-bfp-hfp))/(hfp)*(diffusivity_fp-diffusivity_mc) else : d = diffusivity_mc return d def calcC(x,y) : c=concentration return c def calcSource(x,y): c = 0 if abs(y-0)<=(b-bfp-hfp)+0.0001 and abs(x)<0.1: c=0.8*source/(0.1*(b-bfp-hfp)*2*h*1000)*700*q return c def calcSed(x,y) : sed = initial_bottom_concentration return sed def calcQ(t0, i,dt): t = t0 + i*dt discharge = q if t
This diff is collapsed.
 % % file: localoperator.tex % author: Victor Brena % description: Briefly describes properties of the local operator. % \chapter{Generating a mesh with GMSH} \label{app:app01} The .geo file used to generate the mesh of the compound channel using GMSH is presented hereunder as an example on how to use SLIM. \lstinputlisting[language=C, frame=none, backgroundcolor=\color{white}, commentstyle=\color{orange},keywordstyle=\color{cyan}, numberstyle=\footnotesize\color{darkgray},stringstyle=\color{purple}, , numbers=left]{chapters/appendices/Compound_Channel.geo} \chapter{Running a simulation with SLIM} \label{app:app02} The python script used for the compound channel is presented hereunder as an example on how to use SLIM. \lstinputlisting[language=Python, frame=none, backgroundcolor=\color{white}, commentstyle=\color{orange},keywordstyle=\color{cyan}, numberstyle=\footnotesize\color{darkgray},stringstyle=\color{purple},numbers=left ]{chapters/appendices/Compound_Channel.py} \ \ No newline at end of file
 %% Creator: Inkscape 0.91_64bit, www.inkscape.org %% PDF/EPS/PS + LaTeX output extension by Johan Engelen, 2010 %% Accompanies image file 'Reference.pdf' (pdf, eps, ps) %% %% To include the image in your LaTeX document, write %% \input{.pdf_tex} %% instead of %% \includegraphics{.pdf} %% To scale the image, write %% \def\svgwidth{} %% \input{.pdf_tex} %% instead of %% \includegraphics[width=]{.pdf} %% %% Images with a different path to the parent latex file can %% be accessed with the `import' package (which may need to be %% installed) using %% \usepackage{import} %% in the preamble, and then including the image with %% \import{}{.pdf_tex} %% Alternatively, one can specify %% \graphicspath{{/}} %% %% For more information, please see info/svg-inkscape on CTAN: %% http://tug.ctan.org/tex-archive/info/svg-inkscape %% \begingroup% \makeatletter% \providecommand\color[]{% \errmessage{(Inkscape) Color is used for the text in Inkscape, but the package 'color.sty' is not loaded}% \renewcommand\color[]{}% }% \providecommand\transparent{% \errmessage{(Inkscape) Transparency is used (non-zero) for the text in Inkscape, but the package 'transparent.sty' is not loaded}% \renewcommand\transparent{}% }% \providecommand\rotatebox{#2}% \ifx\svgwidth\undefined% \setlength{\unitlength}{400.61204325bp}% \ifx\svgscale\undefined% \relax% \else% \setlength{\unitlength}{\unitlength * \real{\svgscale}}% \fi% \else% \setlength{\unitlength}{\svgwidth}% \fi% \global\let\svgwidth\undefined% \global\let\svgscale\undefined% \makeatother% \begin{picture}(1,0.81300162)% \put(0,0){\includegraphics[width=\unitlength,page=1]{Reference.pdf}}% \put(0.6257294,0.44969967){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.09699441\unitlength}\raggedright $h$\end{minipage}}}% \put(0.38666662,0.69675022){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.14549168\unitlength}\raggedleft $\eta$\end{minipage}}}% \put(0,0){\includegraphics[width=\unitlength,page=2]{Reference.pdf}}% \put(0.76776947,0.70055246){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.0655596\unitlength}\raggedright $z$\end{minipage}}}% \put(0.86657263,0.62381709){\color[rgb]{0,0,0}\makebox(0,0)[lt]{\begin{minipage}{0.06757681\unitlength}\raggedright $x$\end{minipage}}}% \end{picture}% \endgroup%