Sources and sinks for parabolic PDE algorithm

216 Views Asked by At

I am given a very basic fortran program (View here) and asked 1st to investigate its accuracy and stability, for various values of $ \Delta t $ and lattice spacings. The program is an implementation of: $ {\phi}^{n+1} = \frac{1}{1 + H\Delta t}\left[{\phi}^{n} + S^n \Delta t \right] $ (H is hermitian). That part I have completed OK.

The second part of the exercise says 'Incorporate sources or sinks along the lattice and study the solutions that arise when ∅ vanishes everywhere at t = 0.

  1. I don't understand 'studying the solutions when ∅ vanishes everywhere at t = 0', the program initializes ∅ to 0 at t=0 , so this condition seems to be a fixed default anyway, what am I missing?

  2. The text hasn't used the concept of sources/sinks before, but I think the PDE in question is similar to a simple diffusion equation so - please correct me carefully here - sources and sinks would be where there is inflow/outflow from the volume/area under study? Therefore should I be looking at something $ \frac{\partial \phi}{\partial t} < 0 \: $ for a sink? $\: > 0 $ for a source?

  3. If so, how does one incorporate them, along the lattice, into the program? I really am just blank about this....an example would be very useful!

  4. And are sources and sinks not related to the $ S^n $ term in the equation?

A little background: This course is 'computational physics' and as it happens I won't do equations like this until next year - so at this stage I would be happy with just enough info to do this particular problem. Earlier in this text I did some exercises on discretization, so I am familiar with that and lattices, but struggling otherwise. Thanks.