Methods to linearize terms of PDE

robby991
Messages
37
Reaction score
1
HI, I have solved the diffusion equation using the central difference scheme. Next, I would like to code this diffusion equation with a nonlinear term added to the equation. The full equation is as follows:

Code:
dS/dt = Ds * d^2S/dx^2 - aS/b+S

Since aS/b+S is a nonlinear term, I need to linearize it. I was thinking using Newton's Method to perform this, where:

Code:
aS/b+S = f(S) = So +f'(So)(S-So)

Would this be the best way to do this? This will then have to be subtracted from the diffusion term, evaluated using central difference.

I initially thought I did not have to do this, however there is no change at all in the plot when I add, subtract, or remove this function from the central difference interation in my code. This iteration is as follows:

Code:
for j=1:numt-1  
         
    %2nd Derivative Central Difference Iteration% 
     
    for i=2:numx-1
      S(j+1,i) = S(j,i) + (dt/dx^2)*Ds*(S(j,i+1) - 2*S(j,i) + S(j,i-1[B]))-((Vmax*dt*S(j,i))/(Km+S(j,i))); [/B]    
    
   end    
  
end
 
Last edited:
Physics news on Phys.org
Strictly speaking, "Newton's method" is a method for numerically solving an equation- of course, it involves replacing the function by its tangent approximation at some point so that may be what you mean. Yes, at (x_0, f(x_0)) the best linear approximation, its tangent approximation, is y= f'(x_0)(x- x_0)+ f(x_0).

Of course, you have to choose [math]x_0[/math] carefully- and perhaps change it as x changes in your solution algorithm.
 
Thank you for the reply. I would like to know if this needs to be linearized by this method, or if it can be integrated into the diffusion equation via Eulers Method. The full equation is as follows

Code:
dS/dt = Ds * d^2S/dx^2 - VmaxS/Km+S

Where dS/dt = VmaxS/Km+S is known as the Michaelis Menten equation. My confusion arrises due to the fact that alone, this can be solved (I think) using the Eulers Method

Code:
S(ndt) = S((n-1)dt) - [dt*Vmax*S(n-1)dt/Km + S((n-1)dt)]

However, when coupled with the second order diffusion equation (evaluated with the central difference method), does the proposed solution still hold? Or does it have to be linearized?

Like I mentioned in my first post, the addition, subtraction, or removal of this term does not change the solution plot at all. My full code is as follows

Code:
clear all;

numx = 10;                      %number of grid points in space
numt = 1000;                    %number of time steps to be iterated over 
tmax = .0045;
Length = 1E-6;                  %length of grid
Ds = .019E-9;                      %requirement Ds(dt)/dx^2 < .5
Vmax = 275E-6;
Km = 3E-3;

x = linspace(0,Length,numx);   %vector of x values, to be used for plotting
t = linspace(0,tmax,numt)';      %vector of t values, to be used for plotting
S = zeros(numt,numx);           %initialize everything to zero

dx = x(2)-x(1);                 %Define grid spacing in time
dt = t(2)-t(1);                 %Define grid spacing in time

%specify initial conditions%

t(1) = 0;      %1st t position = 0

S(1,:) = sin((pi/2)+(x*pi/2));   
S(:,numx) = 0;   %dirichlet boundry

%iterate central difference equation% 

for j=1:numt-1  
    
      
    %2nd Derivative Central Difference Iteration% 
     
    for i=2:numx-1
      S(j+1,i) = S(j,i) + (dt/dx^2)*Ds*(S(j,i+1) - 2*S(j,i) + S(j,i-1))-((Vmax*dt*S(j,i)*dt)/(Km+S(j,i)*dt)); 
    end
    
    S(j+1,1)=S(j,1)+dt*Ds*2*(S(j,2)-S(j,1))./dx.^2;     %Neumann Boundary Condition
    
  
end
   
plot(x,S(numt,:));
 
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