# Solving Diffusion PDE By Finite difference Method in fortran

• cool2shiv
In summary, the conversation discusses solving a parabolic PDE with boundary conditions using the FINITE DIFFERENCE METHOD in Fortran. The problem involves a droplet diffusing on a leaf, with boundary conditions of dc/dn=0 at the upper surface of the droplet and leaf, and dc/dz=0 for the bottom layer. The width of the droplet is taken to be very large. The speaker asks for help in creating a grid for the FDM, stating that the droplet is not hemispherical in shape. The suggested steps for solving the problem include creating a mesh via matrix and arrays, inputting initial conditions, discretizing equations, and solving via time-marching. The importance of ensuring a reasonable answer is
cool2shiv
Hey,
I want to solve a parabolic PDE with boundry conditions by using FINITE DIFFERENCE METHOD in fortran. (diffusion) See the attachment for the problem

The problem is that there is a droplet on a leaf and it is diffusing in the leaf
the boundry conditions are
dc/dn= 0 at the upper surface of drop as well as the leaf
and
dc/dz = 0
for the bottom most layer
and the width is taken very large

Can anyone help me please in making the grid for using FDM
the Droplet is not hemispherical in shape.

#### Attachments

• problem_ figure1.jpg
41.4 KB · Views: 677
I told you earlier

a) Make a Mesh via matrix, arrays, selecting regions, and inputting appriopriate zeros e.g. a zeros array
b) Input your initial conditions into that array
c) discretize your equations into finite difference (conditions for the top, bottom, and central part of the body)
d) solve via time-marching, or where you solve for the next time interval from the previous.. since this is a transient problem

## 1. What is the Finite Difference Method?

The Finite Difference Method is a numerical technique used to approximate solutions to differential equations. It involves dividing the domain of the problem into a grid and approximating the derivatives of the function at each grid point using a finite difference formula.

## 2. How does the Finite Difference Method solve diffusion PDEs?

The Finite Difference Method solves diffusion PDEs by discretizing the differential equation into a system of linear equations using finite difference approximations. This system of equations can then be solved using matrix methods, such as Gaussian elimination, to obtain a numerical solution to the PDE.

## 3. What is the role of Fortran in solving diffusion PDEs using the Finite Difference Method?

Fortran is a high-level programming language that is commonly used in scientific computing. It is particularly well-suited for solving diffusion PDEs using the Finite Difference Method because of its efficient handling of array operations and its ability to perform fast numerical computations.

## 4. What are the advantages of using the Finite Difference Method to solve diffusion PDEs?

The Finite Difference Method is a versatile and powerful technique for solving a wide range of diffusion PDEs. It is relatively easy to implement and can handle complex geometries and boundary conditions. Additionally, the method provides a numerical solution that can be easily visualized and analyzed.

## 5. Are there any limitations to using the Finite Difference Method for solving diffusion PDEs?

While the Finite Difference Method is a useful tool for solving diffusion PDEs, it does have some limitations. One limitation is that it may require a large number of grid points to achieve accurate results, which can increase computational costs. Additionally, the method may not be suitable for problems with highly irregular geometries or complex boundary conditions.

• Differential Equations
Replies
2
Views
2K
• Differential Equations
Replies
8
Views
2K
• Differential Equations
Replies
1
Views
1K
• Differential Equations
Replies
13
Views
2K
• Calculus
Replies
6
Views
6K
• Differential Equations
Replies
3
Views
2K
• Differential Equations
Replies
16
Views
2K
• Differential Equations
Replies
1
Views
1K
• Engineering and Comp Sci Homework Help
Replies
5
Views
1K
• Differential Equations
Replies
2
Views
3K