Solving Diffusion PDE By Finite difference Method in fortran

1 reply · 6K views · last reply
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
  • Schematic cross-section of three layers: a dome-shaped droplet on top, a green cuticle layer in the middle, and a yellow subcuticle layer below, with wavy arrows showing diffusion downward; labelled Droplet, Cuticle and Subcuticle, with z and r axes shown.
    problem_ figure1.jpg
    41.4 KB · Views: 762
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
e) make sure your answer is reasonable