Methods to linearize terms of PDE

  • Thread starter robby991
  • Start date
  • #1
41
0

Main Question or Discussion Point

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:

Answers and Replies

  • #2
HallsofIvy
Science Advisor
Homework Helper
41,833
955
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 [itex](x_0, f(x_0))[/itex] the best linear approximation, its tangent approximation, is [itex]y= f'(x_0)(x- x_0)+ f(x_0)[/itex].

Of course, you have to choose [math]x_0[/math] carefully- and perhaps change it as x changes in your solution algorithm.
 
  • #3
41
0
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:

Related Threads on Methods to linearize terms of PDE

Replies
2
Views
6K
Replies
0
Views
1K
Replies
0
Views
5K
Replies
10
Views
6K
  • Last Post
Replies
4
Views
737
  • Last Post
2
Replies
32
Views
4K
  • Last Post
Replies
3
Views
4K
Replies
1
Views
770
Replies
1
Views
2K
Replies
6
Views
1K
Top