Changeset 8777


Ignore:
Timestamp:
Mar 26, 2013, 12:49:17 PM (12 years ago)
Author:
mungkasi
Message:

Adding/modifying automated report for steady state with bump.

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  
    9595
    9696#------------------------------------------------------------------------------
     97# Produce a documentation of parameters
     98#------------------------------------------------------------------------------
     99parameter_file=open('parameters.tex', 'w')
     100parameter_file.write('\\begin{verbatim}\n')
     101from pprint import pprint
     102pprint(domain.get_algorithm_parameters(),parameter_file,indent=4)
     103parameter_file.write('\\end{verbatim}\n')
     104parameter_file.close()
     105
     106#------------------------------------------------------------------------------
    97107# Evolve system through time
    98108#------------------------------------------------------------------------------
  • trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/lake_at_rest_immersed_bump/plot_results.py

    r8612 r8777  
    1818#Plot stages
    1919pyplot.clf()
    20 pyplot.ion()
    2120pyplot.plot(p2_st.x[v2], p2_st.stage[10,v2],'b.', label='numerical stage')
    2221pyplot.plot(p2_st.x[v2], p2_st.elev[v2],'k-', label='discretised bed')
     
    3231#Plot xmomentum
    3332pyplot.clf()
    34 pyplot.ion()
    3533pyplot.plot(p2_st.x[v2], p2_st.xmom[10,v2], 'b.', label='numerical')
    3634pyplot.plot(p2_st.x[v2], zeros(len(p2_st.x[v2])),'r-', label='analytical')
     
    4442#Plot velocities
    4543pyplot.clf()
    46 pyplot.ion()
    4744pyplot.plot(p2_st.x[v2], p2_st.xvel[10,v2], 'b.', label='numerical')
    4845pyplot.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  
    1111    run_validation_script('numerical_immersed_bump.py')
    1212    run_validation_script('plot_results.py')
     13    run('python', 'produce_report.py')     
    1314
    1415def clean():
  • trunk/anuga_core/source/anuga_validation_tests/Analytical_exact/lake_at_rest_immersed_bump/results.tex

    r8612 r8777  
    22\section{Lake at rest with an immersed bump}
    33
    4 This is a simple test if the method is well-balanced.
     4This is a simple test if the method is well-balanced.
     5The initial condition is a lake at rest with water depth $0.5$. The topography is
     6\begin{equation}
     7z(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}
     12The analytical solution is obviously a lake at rest, that is, $w=0.5$ and $u=v=0$.
     13
    514
    615\subsection{Results}
    716
    8 
    9 We should see excellent agreement between the analytical and numerical solutions if the method is well-balanced.
     17Setting 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.
    1018
    1119\begin{figure}[h]
Note: See TracChangeset for help on using the changeset viewer.