Skip to main content
added 384 characters in body
Source Link
cfdlab
  • 3.1k
  • 13
  • 19

You are doing explicit time stepping, so solvability is not much of a problem.

You can write for the last grid point $$ du_n/dt = (u_{n-1}-2u_n+u_{n+1})/h^2 $$ with the ghost value $u_{n+1}$ being $$ u_{n+1} = -u_{n-3} + 4 u_{n-2} - 6 u_{n-1} + 4 u_n $$ A Taylor expansion shows $$ u_{n+1} = u_n + h u'_n + (h^2/2) u''_n + (h^3/6) u'''_n + O(h^4) $$ So the ghost value is just obtained by a fourth order extrapolation of the solution. No

If the Taylor expansion were of the form $$ u_{n+1} = h u'_n + (h^2/2) u''_n + (h^3/6) u'''_n + O(h^4) $$ then implicitly you would have applied zero Dirichlet bc. If it was of the form $$ u_{n+1} = u_n + (h^2/2) u''_n + (h^3/6) u'''_n + O(h^4) $$ then implicitly you would have applied zero Neumann bc.

But we see all terms upto $O(h^3)$, so no boundary condition is being applied, explicitly or implicitly.

This does not correspond to anything physical or mathematical. The solutions in fact seem to be growing unboundedly with time when I ran the Python code. So I would not attach any significance to the solution you are getting out of this.

You are doing explicit time stepping, so solvability is not much of a problem.

You can write for the last grid point $$ du_n/dt = (u_{n-1}-2u_n+u_{n+1})/h^2 $$ with the ghost value $u_{n+1}$ being $$ u_{n+1} = -u_{n-3} + 4 u_{n-2} - 6 u_{n-1} + 4 u_n $$ A Taylor expansion shows $$ u_{n+1} = u_n + h u'_n + (h^2/2) u''_n + (h^3/6) u'''_n + O(h^4) $$ So the ghost value is just obtained by a fourth order extrapolation of the solution. No boundary condition is being applied.

This does not correspond to anything physical or mathematical. The solutions in fact seem to be growing unboundedly with time when I ran the Python code. So I would not attach any significance to the solution you are getting out of this.

You are doing explicit time stepping, so solvability is not much of a problem.

You can write for the last grid point $$ du_n/dt = (u_{n-1}-2u_n+u_{n+1})/h^2 $$ with the ghost value $u_{n+1}$ being $$ u_{n+1} = -u_{n-3} + 4 u_{n-2} - 6 u_{n-1} + 4 u_n $$ A Taylor expansion shows $$ u_{n+1} = u_n + h u'_n + (h^2/2) u''_n + (h^3/6) u'''_n + O(h^4) $$ So the ghost value is just obtained by a fourth order extrapolation of the solution.

If the Taylor expansion were of the form $$ u_{n+1} = h u'_n + (h^2/2) u''_n + (h^3/6) u'''_n + O(h^4) $$ then implicitly you would have applied zero Dirichlet bc. If it was of the form $$ u_{n+1} = u_n + (h^2/2) u''_n + (h^3/6) u'''_n + O(h^4) $$ then implicitly you would have applied zero Neumann bc.

But we see all terms upto $O(h^3)$, so no boundary condition is being applied, explicitly or implicitly.

This does not correspond to anything physical or mathematical. The solutions in fact seem to be growing unboundedly with time when I ran the Python code. So I would not attach any significance to the solution you are getting out of this.

added 40 characters in body
Source Link
cfdlab
  • 3.1k
  • 13
  • 19

You are doing explicit time stepping, so solvability is not much of a problem.

You can write for the last grid point $$ du_n/dt = (u_{n-1}-2u_n+u_{n+1})/h^2 $$ with the ghost value $u_{n+1}$ being $$ u_{n+1} = -u_{n-3} + 4 u_{n-2} - 6 u_{n-1} + 4 u_n $$ A Taylor expansion shows $$ u_{n+1} = u_n + h u'_n + (h^2/2) u''_n + (h^3/6) u'''_n + O(h^4) $$ So the ghost value is just obtained by a fourth order extrapolation of the solution. No boundary condition is being applied.

This does not correspond to anything physical or mathematical. The solutions in fact seem to be growing unboundedly with time when I ran the Python code. So I would not attach any significance to the solution you are getting out of this.

You are doing explicit time stepping, so solvability is not much of a problem.

You can write for the last grid point $$ du_n/dt = (u_{n-1}-2u_n+u_{n+1})/h^2 $$ with the ghost value $u_{n+1}$ being $$ u_{n+1} = -u_{n-3} + 4 u_{n-2} - 6 u_{n-1} + 4 u_n $$ A Taylor expansion shows $$ u_{n+1} = u_n + h u'_n + (h^2/2) u''_n + (h^3/6) u'''_n + O(h^4) $$ So the ghost value is just obtained by a fourth order extrapolation of the solution.

This does not correspond to anything physical or mathematical. The solutions in fact seem to be growing unboundedly with time when I ran the Python code. So I would not attach any significance to the solution you are getting out of this.

You are doing explicit time stepping, so solvability is not much of a problem.

You can write for the last grid point $$ du_n/dt = (u_{n-1}-2u_n+u_{n+1})/h^2 $$ with the ghost value $u_{n+1}$ being $$ u_{n+1} = -u_{n-3} + 4 u_{n-2} - 6 u_{n-1} + 4 u_n $$ A Taylor expansion shows $$ u_{n+1} = u_n + h u'_n + (h^2/2) u''_n + (h^3/6) u'''_n + O(h^4) $$ So the ghost value is just obtained by a fourth order extrapolation of the solution. No boundary condition is being applied.

This does not correspond to anything physical or mathematical. The solutions in fact seem to be growing unboundedly with time when I ran the Python code. So I would not attach any significance to the solution you are getting out of this.

Source Link
cfdlab
  • 3.1k
  • 13
  • 19

You are doing explicit time stepping, so solvability is not much of a problem.

You can write for the last grid point $$ du_n/dt = (u_{n-1}-2u_n+u_{n+1})/h^2 $$ with the ghost value $u_{n+1}$ being $$ u_{n+1} = -u_{n-3} + 4 u_{n-2} - 6 u_{n-1} + 4 u_n $$ A Taylor expansion shows $$ u_{n+1} = u_n + h u'_n + (h^2/2) u''_n + (h^3/6) u'''_n + O(h^4) $$ So the ghost value is just obtained by a fourth order extrapolation of the solution.

This does not correspond to anything physical or mathematical. The solutions in fact seem to be growing unboundedly with time when I ran the Python code. So I would not attach any significance to the solution you are getting out of this.