Loading [MathJax]/extensions/TeX/boldsymbol.js
\newcommand{\uex}{{u_{\small\mbox{e}}}} \newcommand{\half}{\frac{1}{2}} \newcommand{\halfi}{{1/2}} \newcommand{\xpoint}{\boldsymbol{x}} \newcommand{\normalvec}{\boldsymbol{n}} \newcommand{\Oof}[1]{\mathcal{O}(#1)} \newcommand{\Ix}{\mathcal{I}_x} \newcommand{\Iy}{\mathcal{I}_y} \newcommand{\It}{\mathcal{I}_t} \newcommand{\setb}[1]{#1^0} % set begin \newcommand{\sete}[1]{#1^{-1}} % set end \newcommand{\setl}[1]{#1^-} \newcommand{\setr}[1]{#1^+} \newcommand{\seti}[1]{#1^i} \newcommand{\Real}{\mathbb{R}}

« Previous
Next »

Collection of initial conditions

The function pulse in wave1D_dn_vc.py offers four initial conditions:

  1. a rectangular pulse ("plug")
  2. a Gaussian function (gaussian)
  3. a "cosine hat": one period of 1 + \cos (\pi x , x\in [-1,1]
  4. half a "cosine hat": half a period of \cos \pi x , x\in [-{\half},{\half}]
Can locate the initial pulse at x=0 or in the middle

>>> import wave1D_dn_vc as w
>>> w.pulse(loc='left', pulse_tp='cosinehat', Nx=50, every_frame=10)

« Previous
Next »