Changeset 8778
- Timestamp:
- Mar 26, 2013, 11:59:42 PM (12 years ago)
- Location:
- trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/lake_at_rest_steep_island
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/lake_at_rest_steep_island/numerical_steep_island.py
r8613 r8778 123 123 124 124 #------------------------------------------------------------------------------ 125 # Produce a documentation of parameters 126 #------------------------------------------------------------------------------ 127 parameter_file=open('parameters.tex', 'w') 128 parameter_file.write('\\begin{verbatim}\n') 129 from pprint import pprint 130 pprint(domain.get_algorithm_parameters(),parameter_file,indent=4) 131 parameter_file.write('\\end{verbatim}\n') 132 parameter_file.close() 133 134 #------------------------------------------------------------------------------ 125 135 # Evolve system through time 126 136 #------------------------------------------------------------------------------ -
trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/lake_at_rest_steep_island/plot_results.py
r8613 r8778 30 30 #Plot stages 31 31 pyplot.clf() 32 pyplot.ion()33 32 pyplot.plot(p2_st.x[v2], p2_st.stage[40,v2],'b.', label='numerical stage') 34 33 pyplot.plot(p2_st.x[v2], p2_st.elev[v2],'k-', label='discretised bed') … … 43 42 #Plot xmomentum 44 43 pyplot.clf() 45 pyplot.ion()46 44 pyplot.plot(p2_st.x[v2], p2_st.xmom[40,v2], 'b.', label='numerical') 47 45 pyplot.plot(p2_st.x[v2], zeros(len(p2_st.x[v2])),'r-', label='analytical') … … 55 53 #Plot velocities 56 54 pyplot.clf() 57 pyplot.ion()58 55 pyplot.plot(p2_st.x[v2], p2_st.xvel[40,v2], 'b.', label='numerical') 59 56 pyplot.plot(p2_st.x[v2], zeros(len(p2_st.x[v2])),'r-', label='analytical') -
trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/lake_at_rest_steep_island/produce_results.py
r8739 r8778 11 11 run_validation_script('numerical_steep_island.py') 12 12 run_validation_script('plot_results.py') 13 run('python', 'produce_report.py') 13 14 14 15 def clean(): -
trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/lake_at_rest_steep_island/results.tex
r8613 r8778 2 2 \section{Lake at rest with a steep island} 3 3 4 This is a test if the method is well-balanced. Furthermore, we test if the wet/dry interface has been correctly treated. 4 This is a test if the method is well-balanced. Furthermore, we test if the wet/dry interface has been correctly treated for a steep island. This test is taken from the work of Mungkasi and Roberts~\cite{MR2010}. 5 6 The initial condition is a lake at rest with water depth $4.5$. The topography is 7 \begin{equation} 8 z(x,y)= \left\{ \begin{array}{ll} 9 -0.01(x-200) + 4& ~\textrm{if}\quad 0 \leq x < 200\\ 10 -0.02(x-200) + 4& ~\textrm{if}\quad 200 \leq x < 300\\ 11 -0.01(x-300) + 2& ~\textrm{if}\quad 300 \leq x < 400\\ 12 (-1/75)(x-400) + 2& ~\textrm{if}\quad 400 \leq x < 550\\ 13 (1/11250)(x-550)(x-550)& ~\textrm{if}\quad 550 \leq x < 700\\ 14 0.03(x-700)& ~\textrm{if}\quad 700 \leq x < 800\\ 15 -0.03(x-800) + 3& ~\textrm{if}\quad 800 \leq x < 900\\ 16 6& ~\textrm{if}\quad 900 \leq x < 1000\\ 17 (-1.0/20000)(x-1000)(x-1400)& ~\textrm{if}\quad 1000 \leq x < 1400\\ 18 0& ~\textrm{if}\quad 1400 \leq x < 1500\\ 19 3& ~\textrm{if}\quad 1500 \leq x < 1700\\ 20 -0.03(x-1700) + 3& ~\textrm{if}\quad 1700 \leq x < 1800\\ 21 (4.5/40000)(x-1800)(x-1800) + 2 & ~\textrm{otherwise,}\\ 22 \end{array} \right. 23 \end{equation} 24 The analytical solution is the lake at rest, that is, $w=4.5$ and $u=v=0$. 5 25 6 26 \subsection{Results} 7 27 8 28 9 We should see excellent agreement between the analytical and numerical solutions if the method is well-balanced and if the wet/dry interface has been correctly treated.29 Current version of \anuga{} might not handle a discontinuous island perfectly. The following three figures show the stage, $x$-momentum, and $x$-velocity respectively, after we run the simulation for some time. We should see excellent agreement between the analytical and numerical solutions if the method is well-balanced and if the wet/dry interface has been correctly treated. 10 30 11 31 \begin{figure}[h]
Note: See TracChangeset
for help on using the changeset viewer.