Solving a PDE Using Finite Difference Method

In summary, it is possible to solve the equation if the function C(x,t) is known. However, without knowing the function, it is a shot in the dark.
  • #1
kitz2
4
0
Hi

The equation is:

[tex]\frac{dP}{dt}-A*\frac{{d}^2P}{dx^2}-B*\frac{dC}{dt}=0[/tex]

dP/dt=A*d2P/dx^2 was solved using a finite difference method. If the function C(x,t) is known, is it possible to solve the whole equation by using the finite difference solution as a supplement to the complete solution. I mean solving dP/dt = B*dC/dt, and add them together or something. In case, how do I go about it?

Im using MATLAB and from the first finite difference solution I have an matrix for P(x,t) with all values for different x and t, and I also have a matrix for C(x,t) with all values for x and t. What I did was adding the P matrix with the C matrix multiplied with B , which have equal size. When the result was not as I wanted I tried adding the P matrix with P(matrix)+B*C(matrix), so I had 2*P(matrix) + B*C(matrix). Then I got a result which looked alright, but obviosuly it is just a shot in the dark, and not "math".

Im not very good at math as you might notice :blushing:
 
Physics news on Phys.org
  • #2
This is not a partial differential equation (pde) it is a second order ordinary differential equation (ode). Are there any boundary or initail conditions that must be satisfied ?
 
  • #3
Boundary and inital conditions:

C=Co , t=0, 0<=x<=inf.
C=Cdf x-> inf , t >0
P=Po , t=0 0<=x<=inf.
P=Po t>0 x-> inf.
P=Pw x=0 t>0
 
  • #4
CFDFEAGURU said:
This is not a partial differential equation (pde) it is a second order ordinary differential equation (ode). Are there any boundary or initail conditions that must be satisfied ?

It is a partial differential equation, both t and x are the independent variables and P the dependent function to find. C is a given function, but I don't see how to solve it. Certainly numerical ways should be possible but I can't help you on this.

coomast
 

Related to Solving a PDE Using Finite Difference Method

1. What is a PDE?

A PDE (Partial Differential Equation) is a mathematical equation that involves multiple variables and their partial derivatives. It is commonly used to describe physical phenomena such as heat transfer, fluid flow, and diffusion.

2. What is the Finite Difference Method?

The Finite Difference Method is a numerical technique used to solve PDEs by approximating the derivatives with finite differences. It involves dividing the domain into a grid and solving for the unknown values at discrete points on the grid.

3. How do you solve a PDE using Finite Difference Method?

To solve a PDE using the Finite Difference Method, you first need to discretize the domain by dividing it into a grid. Then, you approximate the partial derivatives at each grid point using finite differences and set up a system of equations. Finally, you solve the system of equations to obtain the unknown values at each grid point.

4. What are the advantages of using Finite Difference Method?

One advantage of using the Finite Difference Method is its simplicity and ease of implementation. It is also a versatile method that can be applied to various types of PDEs. Additionally, it provides a numerical solution that can be easily visualized and analyzed.

5. What are the limitations of the Finite Difference Method?

The Finite Difference Method can be computationally expensive for complex PDEs, as it requires a fine grid to accurately approximate the derivatives. It also has limitations in handling irregular or non-uniform domains. Furthermore, it may introduce errors due to the approximation of derivatives.

Similar threads

Replies
4
Views
927
  • Differential Equations
Replies
3
Views
2K
  • Differential Equations
Replies
7
Views
2K
  • Differential Equations
Replies
23
Views
3K
Replies
2
Views
1K
  • Differential Equations
Replies
1
Views
3K
  • Differential Equations
Replies
3
Views
2K
  • Differential Equations
Replies
3
Views
605
  • Differential Equations
Replies
2
Views
2K
  • Differential Equations
Replies
4
Views
790
Back
Top