Investigating a Parabolic PDE algorithm

In summary: Sources and sinks are where there is inflow/outflow from the volume/area under study. To incorporate them, you would need to look at something like: $\frac{\partial \phi}{\partial t} < 0$ and > 0 for a source.
  • #1
ognik
643
2

Homework Statement


Hi - I'm on the last chapter of this book and am a bit stuck. I am given a very basic fortran program (code attached in the zip file) and asked to 'investigate its accuracy and stability, for various values of Δt and lattice spacings'. The program is an implementation of the equation recursion relation below (H is hermitian).

The second (and probably 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

Homework Equations


$$ {\phi}_{n+1}= \frac{1}{1+H\Delta t} \left[{\phi}^{n}{S}^{n}{\Delta t}\right] $$

The Attempt at a Solution


Part 1:
I have run the program for various sets of values - and the output all looks so similar that I can't see anything to discuss. The errors reported are of a similar magnitude. Some combinations of input don't produce any output - but that is probably just a validation issue, as I say it is a simple program with no frills (so it doesn't reject 'forbidden' values, just doesn't do anything).
I have done similar exercises in previous chapters, and there was always lots to talk about, so I must be missing some subtlety here - could someone try and give me a clue or 2 please...

Part 2:
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)
 

Attachments

  • chap7b.zip
    662 bytes · Views: 145
Physics news on Phys.org
  • #2
If I understand, your algorithm is:
$$ \frac{f_{n+1}-f_n}{\Delta{t}} = Hf_n + S_n $$
which use forward 1s derivative. You can try to convert to central 1st derivative:
$$ \frac{f_{n+1}-f_{n-1}}{2\Delta{t}} = Hf_n + S_n $$
 
  • #3
theodoros.mihos said:
If I understand, your algorithm is:
$$ \frac{f_{n+1}-f_n}{\Delta{t}} = Hf_n + S_n $$
which use forward 1s derivative. You can try to convert to central 1st derivative:
$$ \frac{f_{n+1}-f_{n-1}}{2\Delta{t}} = Hf_n + S_n $$
Hi - thanks but the program I have to study uses the algorithm I gave up front, so I have to stick with that.
 
  • #4
I guess people are having the same problem as I am - not sure what to do ...I have added the output (output_n.txt files) rom a few runs that I did, the parameters are shown at the start of each file. I see them all with a gauss-like bell curve, but that was expected. I just don't know what else to look at? Really appreciate some help with this!
 

Attachments

  • output_1.txt
    30.9 KB · Views: 309
  • output_2.txt
    95.8 KB · Views: 324
  • output_3.txt
    1.7 KB · Views: 313
  • output_4.txt
    9.9 KB · Views: 294
  • output_5.txt
    116.6 KB · Views: 321
  • output_6.txt
    116.6 KB · Views: 331
  • #5
Hi again, I have had to move on, deadlines etc. So I did a bunch more tests and just wrote it up objectively with the conclusions I could reach (mainly that this implicit method is more stable and a little more accurate than an explicit algorithm used in a previous exercise). That dispenses with part 1 (although I am open to any additional thoughts)

As above, part 2 says: "The second (and probably 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"

How can I incorporate sources or sinks into this algorithm (code in the attached zip file)?

I also don't understand studying the solutions when ∅ vanishes everywhere at t = 0, the program initializes ∅ to 0 at t=0 , so this condition is a fixed default anyway?
 
  • #6
Final, desperate call - assignment is due tomorrow, so will appreciate anyone who can help me quickly ...I think I have the method right, there is probably just some piece of the puzzle I don't know ...if you need more info. please just ask.
 
  • #7
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, for a sink, should I be looking at something like $$ \frac{\partial \phi}{\partial t} < 0 $$
and > 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.
 

1. What is a parabolic PDE algorithm?

A parabolic PDE algorithm is a numerical method for solving partial differential equations (PDEs) that describe the evolution of a system over time. It is called "parabolic" because it involves the second order in time derivative, making it suitable for modeling systems with diffusion or heat transfer.

2. How does a parabolic PDE algorithm work?

A parabolic PDE algorithm works by approximating the solution to a parabolic PDE at discrete points in time and space. It uses a finite difference method or finite element method to discretize the PDE into a system of algebraic equations, which can then be solved using numerical techniques such as Euler's method, Crank-Nicolson method, or the implicit Euler method.

3. What are the advantages of using a parabolic PDE algorithm?

One advantage of using a parabolic PDE algorithm is that it can handle complex boundary conditions and irregular geometries. It also allows for efficient parallelization, making it suitable for high-performance computing. Additionally, it can provide accurate solutions with relatively coarse grids and is stable for a wide range of time steps.

4. What are the limitations of a parabolic PDE algorithm?

A parabolic PDE algorithm may suffer from numerical instability if the time step is too large or the grid is too coarse. It may also be computationally expensive for problems with a large number of spatial dimensions. Furthermore, it may not be suitable for problems with discontinuous solutions or strong shocks.

5. In what fields is a parabolic PDE algorithm commonly used?

Parabolic PDE algorithms are commonly used in fields such as physics, engineering, and finance to model diffusion processes, heat transfer, and other time-dependent phenomena. They are also used in computer graphics for image and video processing, and in machine learning for solving partial differential equations arising in data-driven applications.

Similar threads

Replies
2
Views
2K
  • Advanced Physics Homework Help
Replies
12
Views
2K
Replies
19
Views
2K
  • Special and General Relativity
Replies
1
Views
1K
Replies
7
Views
2K
  • Advanced Physics Homework Help
Replies
3
Views
1K
  • Differential Equations
Replies
3
Views
1K
Replies
4
Views
1K
  • Special and General Relativity
Replies
1
Views
1K
Replies
1
Views
1K
Back
Top