- Timestamp:
- Mar 3, 2013, 11:23:04 PM (12 years ago)
- Location:
- trunk/anuga_core/validation_tests/Tests/Analytical_exact/dam_break_dry
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/validation_tests/Tests/Analytical_exact/dam_break_dry/numerical_dam_break_dry.py
r8682 r8719 54 54 domain.set_CFL(cfl) 55 55 56 print 'cfl ',cfl57 print 'alg ',alg58 59 56 #------------------------------------------------------------------------------ 60 57 # Setup initial conditions … … 87 84 88 85 89 parameter_file=open('parameters.tex', 'w')90 parameter_file.write('\\begin{verbatim}\n')91 from pprint import pprint92 pprint(domain.get_algorithm_parameters(),parameter_file,indent=4)93 parameter_file.write('\\end{verbatim}\n')94 parameter_file.close()95 96 97 86 #=============================================================================== 98 87 ##from anuga.visualiser import RealtimeVisualiser … … 103 92 #=============================================================================== 104 93 94 95 #------------------------------------------------------------------------------ 96 # Produce a documentation of parameters 97 #------------------------------------------------------------------------------ 98 parameter_file=open('parameters.tex', 'w') 99 parameter_file.write('\\begin{verbatim}\n') 100 from pprint import pprint 101 pprint(domain.get_algorithm_parameters(),parameter_file,indent=4) 102 parameter_file.write('\\end{verbatim}\n') 103 parameter_file.close() 105 104 106 105 #------------------------------------------------------------------------------ -
trunk/anuga_core/validation_tests/Tests/Analytical_exact/dam_break_dry/results.tex
r8682 r8719 1 1 2 \section{Dam Break }2 \section{Dam Break Involving a Dry Area} 3 3 4 Standard dam break test problem involving a dry area. Should show a rarefaction fan and wetting process. 4 The dam break problem involving a dry area was solved analytically by Ritter~\cite{Ritter1892} as well as Stoker~\cite{Stoker1948, Stoker1957}. The analytical solution exhibits a rarefaction fan as a parabolic curve. As water moves, it involves wetting process over the dry area. This is a one-dimensional-type problem. 5 6 The initial condition is 7 \begin{equation} \label{eq:rdbp} 8 u(x,0)=0~~, v(x,y)=0, ~~\textrm{and}~~ 9 h(x,0) = \left\{ \begin{array}{ll} 10 h_1 & \textrm{if $x < x_0$}\\ 11 0 & \textrm{if $x > x_0$}\\ 12 \end{array} \right. 13 \end{equation} 14 where $h_1>0$. 15 16 The analytical solution at time $t>0$ is~\cite{Ritter1892, Stoker1948, Stoker1957} 17 \begin{equation} \label{eq:h_sol_dry} 18 h(x) = \left\{ \begin{array}{ll} 19 h_1 & \textrm{if $x \leq -t \sqrt{gh_1}$}\\ 20 h_R=\frac{4}{9g}(\sqrt{gh_1}-\frac{x}{2t})^2 & \textrm{if $-t \sqrt{gh_1} <x \leq 2t\sqrt{gh_1}$}\\ 21 0 & \textrm{if $x \geq 2t\sqrt{gh_1}$}\\ 22 \end{array} \right. 23 \end{equation} 24 which is the free surface and 25 \begin{equation} \label{eq:u_sol_dry} 26 u(x) = \left\{ \begin{array}{ll} 27 0 & \textrm{if $x \leq -t \sqrt{gh_1}$}\\ 28 u_R=\frac{2}{3}(\sqrt{gh_1}+\frac{x}{t}) & \textrm{if $-t \sqrt{gh_1} <x \leq 2t\sqrt{gh_1}$}\\ 29 0 & \textrm{if $x \geq 2t\sqrt{gh_1}$}\\ 30 \end{array} \right. 31 \end{equation} 32 which is the velocity. 33 34 5 35 6 36 \subsection{Results} 7 8 9 We should see excellent agreement between the analytical and numerical solutions. 37 For our test, we consider $x_0=0$ and $h_1=10$ in (\ref{eq:rdbp}). 38 The following figures show the stage, $x$-momentum, and $x$-velocity at several instants of time. We should see excellent agreement between the analytical and numerical solutions. The wet/dry interface is difficult to resolve and it usually produces large errors. 10 39 11 40 \begin{figure}[h] 12 41 \begin{center} 13 42 \includegraphics[width=0.8\textwidth]{stage_plot.png} 43 %\label{fig:db_dry_stage} 14 44 \end{center} 15 45 \caption{Stage results} … … 20 50 \begin{center} 21 51 \includegraphics[width=0.8\textwidth]{xmom_plot.png} 52 %\label{fig:db_dry_xmom} 22 53 \end{center} 23 54 \caption{Xmomentum results} … … 28 59 \begin{center} 29 60 \includegraphics[width=0.8\textwidth]{xvel_plot.png} 61 %\label{fig:db_dry_xvel} 30 62 \end{center} 31 63 \caption{Xvelocity results}
Note: See TracChangeset
for help on using the changeset viewer.