Changeset 8777
- Timestamp:
- Mar 26, 2013, 12:49:17 PM (12 years ago)
- Location:
- trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/lake_at_rest_immersed_bump
- Files:
-
- 2 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/lake_at_rest_immersed_bump/numerical_immersed_bump.py
r8612 r8777 95 95 96 96 #------------------------------------------------------------------------------ 97 # Produce a documentation of parameters 98 #------------------------------------------------------------------------------ 99 parameter_file=open('parameters.tex', 'w') 100 parameter_file.write('\\begin{verbatim}\n') 101 from pprint import pprint 102 pprint(domain.get_algorithm_parameters(),parameter_file,indent=4) 103 parameter_file.write('\\end{verbatim}\n') 104 parameter_file.close() 105 106 #------------------------------------------------------------------------------ 97 107 # Evolve system through time 98 108 #------------------------------------------------------------------------------ -
trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/lake_at_rest_immersed_bump/plot_results.py
r8612 r8777 18 18 #Plot stages 19 19 pyplot.clf() 20 pyplot.ion()21 20 pyplot.plot(p2_st.x[v2], p2_st.stage[10,v2],'b.', label='numerical stage') 22 21 pyplot.plot(p2_st.x[v2], p2_st.elev[v2],'k-', label='discretised bed') … … 32 31 #Plot xmomentum 33 32 pyplot.clf() 34 pyplot.ion()35 33 pyplot.plot(p2_st.x[v2], p2_st.xmom[10,v2], 'b.', label='numerical') 36 34 pyplot.plot(p2_st.x[v2], zeros(len(p2_st.x[v2])),'r-', label='analytical') … … 44 42 #Plot velocities 45 43 pyplot.clf() 46 pyplot.ion()47 44 pyplot.plot(p2_st.x[v2], p2_st.xvel[10,v2], 'b.', label='numerical') 48 45 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_immersed_bump/produce_results.py
r8739 r8777 11 11 run_validation_script('numerical_immersed_bump.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_immersed_bump/results.tex
r8612 r8777 2 2 \section{Lake at rest with an immersed bump} 3 3 4 This is a simple test if the method is well-balanced. 4 This is a simple test if the method is well-balanced. 5 The initial condition is a lake at rest with water depth $0.5$. The topography is 6 \begin{equation} 7 z(x)= \left\{ \begin{array}{ll} 8 0.2-0.05\left(x-10\right)^2& ~\textrm{if}\quad 8 \leq x \leq 12\,,\\ 9 0& ~\textrm{otherwise,}\\ 10 \end{array} \right. 11 \end{equation} 12 The analytical solution is obviously a lake at rest, that is, $w=0.5$ and $u=v=0$. 13 5 14 6 15 \subsection{Results} 7 16 8 9 We should see excellent agreement between the analytical and numerical solutions if the method is well-balanced. 17 Setting up the boundaries to be reflective, we should see excellent agreement between the analytical and numerical solutions if the method is well-balanced. Some oscillations may occur, but if the method is well-balanced, they should be very close to the order of the machine precision. The following three figures show the stage, $x$-momentum, and $x$-velocity after running \anuga{} for some time. 10 18 11 19 \begin{figure}[h]
Note: See TracChangeset
for help on using the changeset viewer.