Solving Diffusion Equation By Finite difference Method in fortran

Click For Summary

Discussion Overview

The discussion revolves around solving a parabolic partial differential equation (PDE) related to diffusion using the finite difference method (FDM) in Fortran. The specific application involves modeling the diffusion of a droplet on a leaf with defined boundary conditions.

Discussion Character

  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant seeks assistance in creating a grid for applying the finite difference method to a diffusion problem involving a droplet on a leaf, specifying boundary conditions of zero flux at the droplet's surface and the bottom layer.
  • Another participant questions the meaning of the term dc/dn and clarifies their understanding of the variables involved in the equation.
  • A participant mentions that the flux perpendicular to the surface of the droplet is zero and asks for further guidance on how to proceed.
  • One suggestion involves generating meshes as rectangles of varying sizes and using a 3-D matrix to account for time and spatial variables, with an offer for additional help.
  • There is a repeated inquiry about how to apply the boundary condition dc/dn=0 on the curved surface of the droplet, emphasizing the need for points on the droplet's surface and the perpendicular line to it.
  • A participant proposes modeling the droplet and surrounding area as a series of rectangles and describes a method for applying the boundary condition at the hemisphere or rectangle interface.
  • Another participant expresses concern about determining the points on the hemisphere and ensuring that the corners of the rectangles align with the hemisphere's surface, highlighting the challenge of finding values only at the corners of rectangles.

Areas of Agreement / Disagreement

Participants express various approaches and methods for modeling the problem, but there is no consensus on the best way to implement the boundary conditions or how to accurately represent the droplet's shape in the grid.

Contextual Notes

Participants discuss the complexities of applying boundary conditions on a non-hemispherical droplet and the challenges of ensuring grid points align with the droplet's surface, indicating potential limitations in their proposed methods.

cool2shiv
Messages
5
Reaction score
0
Hey,
I want to solve a parabolic PDE with boundary 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 boundary 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

  • figure problem.JPG
    figure problem.JPG
    40.2 KB · Views: 672
Physics news on Phys.org
What is dc/dn? From your equation you have three independent variables: z, r, and t.

Edit: Oh silly me I get it sorry.
 
the flux perpendicular to the surface of the drop is zero.
So, have you any idea what should i do?
 
you can generate the meshes as all rectangles of different sizes, in matlab, FORTRAN, c++, etc. Just set up a 3-D matrix to account for changes in time, r,z. You can then discretize the equation via finite difference from that to go from there. Talk to me if you need additional help.
 
Hey thanks a lot... but how will i use the boundary condition on the curved surface i.e dc/dn=0
i.e flux perpendicular to droplet is 0.

for that i think i will need the points on the surface of the droplet (not hemisphere) and the point which is on the line perpendicular to the surface of the droplet...

please tell me how to make grid... and how to use the boundary condition dc/dn=0

i will be thankful to u for this.
 
cool2shiv said:
Hey thanks a lot... but how will i use the boundary condition on the curved surface i.e dc/dn=0
i.e flux perpendicular to droplet is 0.

for that i think i will need the points on the surface of the droplet (not hemisphere) and the point which is on the line perpendicular to the surface of the droplet...

please tell me how to make grid... and how to use the boundary condition dc/dn=0

i will be thankful to u for this.

model everything as a bunch of rectangles.. hemisphere is small rectangle on top of the other two rectanges.. simply the bc, dc/dn=0 at the hemisphere/rectangle or that C(i+1,j)-C(i,j)/(delta(x)=0, so C(i+1,j)=C(i,j) at the hemisphere barrier... meshes can be made by filling up matrices with zeroes and making these matrices based on size of rectangle e.g. 5 m X 5 m rectangle can be a 5 X 5 matrix, if the units are "m".. get my drift? do the same with the other rectangles, keeping respect to orientation and size and keep everything in one mesh?

Ok?
 
yeah that is fine..but How will i find the points on the hemisphere?
i mean how will i make sure that the corners of the rectangles fall on the hemisphere??
as i can only fond the values at the corners of a rectangle?
Did u get what i am trying to ask?
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
6K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 5 ·
Replies
5
Views
2K
Replies
0
Views
1K
  • · Replies 7 ·
Replies
7
Views
2K
  • · Replies 13 ·
Replies
13
Views
3K
  • · Replies 8 ·
Replies
8
Views
4K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 4 ·
Replies
4
Views
4K
Replies
2
Views
1K