# Title: Poiseuille flow # # Description: # # A simple parabolic Poiseuille flow in a periodic channel with a # constant along-channel acceleration $a$. The theoretical solution is given by: # $$u(y)={a\over 2\nu}(1/4-y^2)$$ # Figure \ref{convergence} illustrates the maximum error between the # computed and theoretical solutions as a function of spatial # resolution. # # \begin{figure}[htbp] # \caption{\label{convergence}Convergence of the maximum error as a function # of resolution (number of grid points across the channel).} # \begin{center} # \includegraphics[width=\hsize]{convergence.eps} # \end{center} # \end{figure} # # Author: St\'ephane Popinet # Command: sh poiseuille.sh # Version: 1.2.0 # Required files: poiseuille.sh error.ref # Generated files: convergence.eps # 1 1 GfsSimulation GfsBox GfsGEdge {} { Refine LEVEL # use backward Euler to avoid Crank-Nicholson oscillations in time SourceViscosity 1. { beta = 1 } Source U 1 # we need this so that acceleration can be balanced by viscous stress # and yes, fixme, this is a mess... AdvectionParams { gc = 1 } EventStop { istep = 1 } U 1e-6 DU ProjectionParams { tolerance = 1e-6 } ApproxProjectionParams { tolerance = 1e-6 } OutputErrorNorm { start = end } { awk '{print LEVEL,$5,$7,$9}' } { v = U } { s = 1./2.*(1./4 - y*y) } } GfsBox { bottom = Boundary { BcDirichlet U 0 BcDirichlet V 0 } top = Boundary { BcDirichlet U 0 BcDirichlet V 0 } } 1 1 right