Explicit solution of heat/diffusion equation

  • Thread starter Thread starter Holofernes
  • Start date Start date
  • Tags Tags
    Explicit
Holofernes
Messages
2
Reaction score
0
I am trying to use a explicit FDM for transient 1d conditions with linear elements for specific diffusion equation:

ds/dt=D(x)*d2s/dx2+R(s)

the problem is that I am using different, nonlinear functions describing diffusion constant D(x) and reaction rate R(s).
The diffusion parameter is dependent on position along x and in general case is a function with non-continuous dD(x)/dx at some points. I am using average value of diffusion parameter for each linear element but the solution seems to be not right. I think that is the problem, because when I use constant D everything looks all right. Especially plot of d2s/dx2 is very wired.
What I am doing wrong?
Thanks.
 
Physics news on Phys.org
Huh?

Holofernes said:
I am trying to use a explicit FDM for transient 1d conditions with linear elements for specific diffusion equation:

ds/dt=D(x)*d2s/dx2+R(s)

the problem is that I am using different, nonlinear functions describing diffusion constant D(x) and reaction rate R(s).
The diffusion parameter is dependent on position along x and in general case is a function with non-continuous dD(x)/dx at some points. I am using average value of diffusion parameter for each linear element but the solution seems to be not right. I think that is the problem, because when I use constant D everything looks all right. Especially plot of d2s/dx2 is very wired.
What I am doing wrong?
Thanks.

FDM?

Wired as in wire-frame plot? Or is that "weird"?
 
'wired' as strange. it has to many bumps. should be less compicated in places where D is changing
 
Gentle hint

So, weird as in "strange"? Too many bumps? Less complicated? And what is FDM? "Finite difference method", perchance? Is your diffusion equation
<br /> \frac{\partial u}{\partial t} = f(x) \, \frac{\partial^2 u}{\partial x^2}+ g(u)<br />
where u is an unknown function of x,t and f,g are known functions of one variable, and where f is continuous but only piecewise differentiable? You hinted at initial conditions--- what are they?
 
Last edited:
Thread 'Direction Fields and Isoclines'
I sketched the isoclines for $$ m=-1,0,1,2 $$. Since both $$ \frac{dy}{dx} $$ and $$ D_{y} \frac{dy}{dx} $$ are continuous on the square region R defined by $$ -4\leq x \leq 4, -4 \leq y \leq 4 $$ the existence and uniqueness theorem guarantees that if we pick a point in the interior that lies on an isocline there will be a unique differentiable function (solution) passing through that point. I understand that a solution exists but I unsure how to actually sketch it. For example, consider a...
Back
Top