1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Investigating a Parabolic PDE algorithm

  1. Jun 11, 2015 #1
    1. The problem statement, all variables and given/known data
    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

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

    3. 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)
     

    Attached Files:

  2. jcsd
  3. Jun 13, 2015 #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 $$
     
  4. Jun 14, 2015 #3
    Hi - thanks but the program I have to study uses the algorithm I gave up front, so I have to stick with that.
     
  5. Jun 14, 2015 #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!
     

    Attached Files:

  6. Jun 14, 2015 #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?
     
  7. Jun 18, 2015 #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.
     
  8. Jun 21, 2015 #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.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Investigating a Parabolic PDE algorithm
  1. Investigating Fuses (Replies: 0)

  2. Investigating Fuses (Replies: 1)

  3. Parabolic Bowl (Replies: 2)

  4. Parabolic Coordinates (Replies: 1)

  5. Parabolic mirror (Replies: 1)

Loading...