Changeset 8792
- Timestamp:
- Mar 30, 2013, 12:56:51 AM (12 years ago)
- Location:
- trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/rundown_mild_slope
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/rundown_mild_slope/plot_results.py
r8651 r8792 46 46 #-------------------- 47 47 pyplot.clf() 48 pyplot.ion()49 48 50 49 line, = pyplot.plot( (p2.x[v].min(),p2.x[v].max()) ,( (p2.stage[:,v]-p2.elev[:,v]).max(),(p2.stage[:,v]-p2.elev[v]).min() ) ) -
trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/rundown_mild_slope/produce_results.py
r8739 r8792 15 15 run_validation_script('run_channel.py') 16 16 run_validation_script('plot_results.py') 17 run('pdflatex', 'report.tex') 18 run('bibtex', 'report') 19 run('pdflatex', 'report.tex') 20 run('bibtex', 'report') 21 run('pdflatex', 'report.tex') 22 run('bibtex', 'report') 17 23 18 24 def clean(): -
trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/rundown_mild_slope/results.tex
r8651 r8792 5 5 6 6 \section{Shallow flow down a mild slope} 7 This case simulates very shallow flow running down a mild slope topography. It represents an idealisation of the rainfall-runoff problem, which will often involve very shallow flows down such a topography. This case has an analytical solution (the steady-uniform solution, bed slope = friction slope). 7 This case simulates very shallow flow running down a mild slope topography. It represents an idealisation of the rainfall-runoff problem, which will often involve very shallow flows down such a topography. This case has an analytical solution, and in particular, we consider the steady-uniform solution with the values of bed slope and friction slope are the same. 8 9 Suppose that we are given a one dimensional domain. The steady state conditions with a contant water depth everywhere make the shallow water equations to the single identity 10 \begin{equation} 11 z_x = - S_f. 12 \end{equation} 13 Here $q=uh$ is the momentum or water discharge and $S_f$ is the symbol for the force of bottom friction involving Manning's coefficient $n$. We take 14 \begin{equation} 15 S_f = n^2 \frac{q|q|}{h^{10/3}}. 16 \end{equation} 17 If $q$, $n$, and $z_x$ are given, then the analytical solution is 18 \begin{equation} 19 u(x)= \left[- n^{-2} q^{4/3} z_x\right]^{3/10}, 20 \end{equation} 21 \begin{equation} 22 h(x)= \frac{q}{u}\,. 23 \end{equation} 8 24 9 25 \subsection{Results} 26 For our test, we consider a square dimensional domain with length and width 100. We take $q=0.2$, $n=0.03$, and $z_x=-0.1$. 27 The topography is 28 \begin{equation} 29 z(x, y)= -0.1 x\,. 30 \end{equation} 31 The initial condition is $u=v=0$ and 32 \begin{equation} 33 w(x,y,0)= -0.1 x + 0.01\,. 34 \end{equation} 35 36 37 Some simualtion results are as follows. 10 38 Figures~\ref{fig:depthdownchan} shows the steady state depth in the downstream direction. There should be a good agreement with the analytical solution, at least away from the boundaries. 39 Figures~\ref{fig:xvelscrosschan} and~\ref{fig:yvelscroschan} show the steady state $x$- and $y$-velocities, along a slice in the cross slope direction (near $x=50$). The $x$-velocities should agree well with the analytical solution, and the $y$-velocities should be zero. 11 40 12 41 \begin{figure}[h] … … 17 46 \end{center} 18 47 \end{figure} 19 20 Figures~\ref{fig:xvelscrosschan} and~\ref{fig:yvelscroschan} show the steady state $x$- and $y$-velocities, along a slice in the cross slope direction (near $x=50$). The $x$-velocities should agree well with the analytical solution, and the $y$-velocities should be zero. 48 21 49 22 50 \begin{figure}[h] -
trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/rundown_mild_slope/run_channel.py
r8678 r8792 26 26 from anuga.utilities.argparsing import parse_standard_args 27 27 alg, cfl = parse_standard_args() 28 alg = '2_0'29 28 domain.set_flow_algorithm(alg) 30 29 domain.set_CFL(cfl) … … 60 59 Br = anuga.Reflective_boundary(domain) # Solid reflective wall 61 60 domain.set_boundary({'left': BdIN, 'right': Bt, 'top': Br, 'bottom': Br}) 61 62 63 #------------------------------------------------------------------------------ 64 # Produce a documentation of parameters 65 #------------------------------------------------------------------------------ 66 parameter_file=open('parameters.tex', 'w') 67 parameter_file.write('\\begin{verbatim}\n') 68 from pprint import pprint 69 pprint(domain.get_algorithm_parameters(),parameter_file,indent=4) 70 parameter_file.write('\\end{verbatim}\n') 71 parameter_file.close() 72 62 73 #------------------------------------------------------------------------------ 63 74 # Evolve system through time
Note: See TracChangeset
for help on using the changeset viewer.