Why Does Increasing Final Run Time Cause Divergence in Finite Differencing?

  • Thread starter Thread starter member 428835
  • Start date Start date
  • Tags Tags
    Error Finite
  • #91
joshmccraney said:
Hey Chet, I have a quick question. When transforming from ##Z## to ##z## I did the following: ##Z=L(tf)z##, but now I'm not sure why I used the last value of ##L##. Should ##L## be evaluated at the final time? Could you explain your reasoning?
You did it so you could always have a grid point exactly at the moving boundary, making it convenient to apply any boundary condition there. Also, you always have the same number of grid points, and they are uniformly distributed between the boundaries. You've taken the complexity out of applying the moving boundary condition and transferred it to the differential equation where it can be handled much more easily.

Chet
 
Physics news on Phys.org
  • #92
Thanks! For some reason I was wondering which L I should use to transform back from Z to z but obviously it's the most recent L. Thanks Chet! You're definitely brilliant!
 
  • #93
Hey Chet, sorry to bother you again about this problem, but how much more effort would need to be put into the finite difference scheme to go implicit? I've never done this before and am curious about it.
 
  • #94
joshmccraney said:
Hey Chet, sorry to bother you again about this problem, but how much more effort would need to be put into the finite difference scheme to go implicit? I've never done this before and am curious about it.
It depends. What you would do would be to only discretize the differential equations in the spatial direction, but not in the time direction. So then you would have a coupled set of non-linear first order ODEs in time for the y values at the M grid points (plus an additional first order ODE for L2). This approach is called the Method of Lines. To solve these equations implicitly, you would typically need a stiff ODE equation solver subroutine. The problem would be done in FORTRAN, and you would be using a commercially available stiff package like the ones available on IMSL or online (e.g., DASSL). Or, if Matlab has a stiff equation solver, you could use that.

Chet
 
  • #95
Thanks a ton Chet! I really appreciate your help.
 
  • #96
Is #86 the newest code? I would like to look it over when it is fully done :)
 
  • #97
after chet's correction, yep!
 

Similar threads

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