Changeset 8800
- Timestamp:
- Apr 1, 2013, 9:51:27 PM (12 years ago)
- Location:
- trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/transcritical_without_shock
- Files:
-
- 2 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/transcritical_without_shock/analytical_without_shock.py
r8622 r8800 12 12 from scipy.optimize import fsolve 13 13 from pylab import plot, show 14 from anuga import g 14 15 15 16 16 17 q0 = 1.53 # This is the imposed momentum 17 18 h_d = 0.66 # This is the water height downstream 18 g = 9.81 # Accelleration due to gravity19 19 20 20 def analytic_sol(x): -
trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/transcritical_without_shock/numerical_transcritical.py
r8622 r8800 107 107 108 108 #------------------------------------------------------------------------------ 109 # Produce a documentation of parameters 110 #------------------------------------------------------------------------------ 111 parameter_file=open('parameters.tex', 'w') 112 parameter_file.write('\\begin{verbatim}\n') 113 from pprint import pprint 114 pprint(domain.get_algorithm_parameters(),parameter_file,indent=4) 115 parameter_file.write('\\end{verbatim}\n') 116 parameter_file.close() 117 118 #------------------------------------------------------------------------------ 109 119 # Evolve system through time 110 120 #------------------------------------------------------------------------------ -
trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/transcritical_without_shock/plot_results.py
r8622 r8800 18 18 #Plot the stages############################################################## 19 19 pyplot.clf() 20 pyplot.ion()21 20 pyplot.plot(p2_st.x[v2], p2_st.stage[300,v2], 'b.-', label='numerical stage') # 0*T/6 22 21 pyplot.plot(p2_st.x[v2], h+z,'r-', label='analytical stage') … … 32 31 #Plot the momentums########################################################## 33 32 pyplot.clf() 34 pyplot.ion()35 33 pyplot.plot(p2_st.x[v2], p2_st.xmom[300,v2], 'b.-', label='numerical') # 0*T/6 36 34 pyplot.plot(p2_st.x[v2], 1.53*ones(len(p2_st.x[v2])),'r-', label='analytical') … … 46 44 #Plot the velocities######################################################### 47 45 pyplot.clf() 48 pyplot.ion()49 46 pyplot.plot(p2_st.x[v2], p2_st.xvel[300,v2], 'b.-', label='numerical') # 0*T/6 50 47 pyplot.plot(p2_st.x[v2], 1.53/h,'r-', label='analytical') -
trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/transcritical_without_shock/produce_results.py
r8739 r8800 11 11 run_validation_script('numerical_transcritical.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/transcritical_without_shock/results.tex
r8622 r8800 1 1 2 \section{ Flow over a bump: transcritical flow without a shock}2 \section{Transcritical flow without a shock over a bump} 3 3 4 This is transcritical flow over a bump without a shock. 4 This scenario exhibits transcritical flow without a shock over a bump. 5 This test is adapted from Goutal and Maurel~\cite{GM1997}. 6 The topography and the initial conditions are the same as those used in the subcritical flow as well as the transcritical flow with a shock (See the description given in the report on the subcritical flow and transcritical flow with a shock). The boundary conditions are different from those used in the subcritical flow test. Here we refer to the parameters used by Goutal and Maurel~\cite{GM1997}. The analytical height or depth $h$ of the transcritical flow is calculated the Bernoulli equation. The velocity is computed as $u=q/h$\,. 5 7 6 8 \subsection{Results} 9 Referring to Goutal and Maurel~\cite{GM1997}, we consider the initial condition 10 \begin{equation} 11 u(x,y,0)=v(x,y,0)=0\,, \quad 12 w(x,y,0)= 0.66\,, 13 \end{equation} 14 We enforce Dirichlet boundary conditions 15 at $x=0^{-}$ given by 16 \begin{equation} 17 [w,hu,hv]=[1.0144468506259066,~~~1.53,~~~0]\,, 18 \end{equation} 19 and at $25^{+}$ given by 20 \begin{equation} 21 [w,hu,hv]=[0.4057809296474606,~~~1.53,~~~0]\,. 22 \end{equation} 7 23 8 24 9 We should see excellent agreement between the analytical and numerical solutions. 25 26 27 Representatives of the simulation results are given in the following three figures. We should see excellent agreement between the analytical and numerical solutions. Small discrepancy may occurs for the $x$-momentum. It is not clear what makes this discrepancy. Numerical analysis may be conducted further to investigate why this discrepancy occurs. 10 28 11 29 \begin{figure}[h]
Note: See TracChangeset
for help on using the changeset viewer.