How Can Sources and Sinks be Incorporated in a Parabolic PDE Algorithm?

  • Context: MHB 
  • Thread starter Thread starter ognik
  • Start date Start date
  • Tags Tags
    Algorithm Pde
Click For Summary
SUMMARY

The discussion focuses on incorporating sources and sinks into a parabolic partial differential equation (PDE) algorithm implemented in Fortran. The provided equation, ${\phi}^{n+1} = \frac{1}{1 + H\Delta t}\left[{\phi}^{n} + S^n \Delta t \right]$, is analyzed for stability and accuracy across various time steps ($\Delta t$) and lattice spacings. The user expresses confusion regarding the implementation of sources and sinks, which are critical for modeling inflow and outflow in the system. The discussion emphasizes the need for clear examples and guidance on integrating these concepts into the existing code.

PREREQUISITES
  • Understanding of parabolic PDEs, specifically diffusion equations.
  • Familiarity with Fortran programming and numerical methods.
  • Knowledge of discretization techniques and lattice structures.
  • Basic concepts of sources and sinks in the context of PDEs.
NEXT STEPS
  • Research methods for incorporating sources and sinks in PDE algorithms.
  • Learn about numerical stability and accuracy in Fortran simulations.
  • Explore examples of diffusion equations with sources and sinks in computational physics.
  • Investigate the effects of varying $\Delta t$ and lattice spacing on simulation outcomes.
USEFUL FOR

This discussion is beneficial for computational physicists, Fortran programmers, and students studying numerical methods for PDEs, particularly those interested in modeling dynamic systems with sources and sinks.

ognik
Messages
626
Reaction score
2
Hi - on the last chapter of this course and was feeling much better about it all, but I now confess to being back in my normal state - confused. I am given a simple fortran program (code attached in the zip file) and asked 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)

I have run this program for various sets of values - and the output all looks so similar that I can't see anything to discuss. The errors are similar magnitude. Some combinations of input don't produce any output - but that should be just a validation issue, as I say it is a simple program with no frills.
Someone give me a clue or 2 please...
 

Attachments

Physics news on Phys.org
I see a few people have looked without responding - I think I should be finding limitations of this approach, but so far haven't, so I might just be missing something obvious to someone else...either way, hopefully talking about the 2nd part of the exercise will help.

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

The text hasn't used the concept of sources/sinks before, but I think the PDE in question is similar to a diffusion equation so - please correct me - sources and sinks would be where there is inflow/outflow from the volume under study? And they are related to the Sn term in the equation? Earlier in this chapter I did some exercises on discretization, so I am familiar with that and lattices, but I am clueless otherwise (this course is about computational physics and as it happens I won't do equations like this until next year, C'est la vie)
 
Hi, I have edged a bit further along with this:

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 like $ \frac{\partial \phi}{\partial t} < 0 \: $ for a sink? $\: > 0 $ for a source?

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

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
Replies
7
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
1
Views
2K
Replies
2
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 0 ·
Replies
0
Views
1K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 6 ·
Replies
6
Views
4K