PDA

View Full Version : 1 D steady state diffusion equation in the atmosphere


Juliousceasor
May11-11, 09:29 AM
Hello,

I have a 1-D steady state (dc/dt=0) differential equation in the atmosphere. It looks like follows,

K*C'' + (K'+K/H)*C' + (1/H*K'- (K/H^2)*H'- (L+Si))C + S = 0

where,
C = concentration of the contaminant in the atmosphere at different heights z
K = vertical diffusion coefficient
H = scale height
L = decay constant
Si= constant
S = source term

C'' = double derivative of C w.r.t. z
C',K',H'= derivative of C,K,H w.r.t. z

K,H,Si,S,L are all known values.

I am trying to solve the above differential equation numerically by means of finite differences of 1st order with boundary conditions,

At the top boundary: C = S/L
at the bottom boundary k*dc/dx = 0



Can anyone tell me how to write this routine in matlab?

help would be greatly appricieted! :)