umercal negraon of he dffuson equaon (I) Fne dfference mehod. Spaal screaon. Inernal nodes. R L V For hermal conducon le s dscree he spaal doman no small fne spans, =,,: Balance of parcles for an nernal ( = -) volume V (change n concenraon durng due o he parcle echange wh adjacen cells): V + R L - + - R L V V =, L = R = Frs Fck s law:
umercal negraon of he dffuson equaon (II) Fne dfference mehod. Spaal screaon. Inernal nodes. Usng hs equaon we can calculae unknown concenraon a me + f we know concenraons a prevous mesep. The fne dfference scheme ha we dscussed s called he eplc Forward Tme enered Space (FTS) mehod, snce he unknown emperaure a node s gven eplcl n erms of onl known emperaures compued a he prevous mesep. or or n known pons new pon There s par b par cancellaon of erms n he FTS equaon ha ensures ha whaever he number of dffusng speces leaves one volume s pcked up b s ne-door neghbor.
umercal negraon of he dffuson equaon (III) Fne dfference mehod. Spaal screaon. End nodes. Le s consder he frs node, = and le s place he node a he surface. V 3 R ode ode ode 3 Balance of parcles for volume V ha s represened b he end node: R V R R V Frs Fck s law: V =V =V =- /, R = =V =- =V
umercal negraon of he dffuson equaon (IV) Fne dfference mehod. Spaal screaon. End nodes. Smlarl, for anoher end node, one can derve: - If an nal concenraon profle a me = 0 s gven, we can use he derved equaons for all nodes, from o, o calculae concenraon profle a me,, 3, ec.up o he me ha we are neresed n.
Sabl creron For a poson-dependen dffuson coeffcen, should be evaluaed a he nerfaces beween he volumes V n order o preserve he conservaon of he oal number of parcles e.g., for sample wh non-unform T dsrbuon T T / / / Poson (, T, ) dependen (,) ssumng ha he coeffcens of he dfferenal equaon are consan (or so slowl varng as o be consdered consan) he sabl creron for s Phscal nerpreaon: he mamum mesep s, up o a numercal facor, he dffuson me across a cell of wdh (remember Ensen relaon = s /d). Ths condon s referred o as he Von eumann sabl condon.
Smple boundar condons o mass ransfer hrough he boundar: L 0 + = 0 + = - - + fcve node onsan concenraon a he boundar L = f and we can use he followng boundar condon: L f
ffuson equaon n,,,,,, Boundar condon:,,,, boundar b Inal condon:,, 0, n j = j j b,, j = = j =
ffuson equaon n : eplc FTS scheme,,,,,,,j,j,j,j,j,j,j,j,j,j Sabl: ~ r 4,j,j,j,j,j,j
ffuson equaon n 3: eplc FTS scheme,j,k,j,k,j,k,j,k,j,k,,,,,,,j,k,j,k,j,k,j,k,j,k Sabl: r 6 ~ 3,,,,,,,j,k,j,k,j,k,k,j,j,k,k,j,j,k,j,k,j,k,k,j,j,k,k,j
Possble algorhm for solvng dffuson equaon. Inale dffuson consan, ssem se L, sep of spaal dscreaon, me-sep h, and he oal me of he smulaon. You can use ~ 00 seps n spaal dscreaon. Make sure ha sabl creron s sasfed.. efne an nal concenraon profle, 0. Use an arra o represen he concenraon a dscree pons 0,,, and se he value a each pon equal o he nal concenraon a ha pon. 3. each node poson ecep he wo surface nodes calculae new concenraon usng he fne dfference mehod descrbed n he lecure noes, use a dumm arra o sore new concenraon. 5. op he dumm arra no our concenraon arra. for =,,- 4. alculae concenraon for he wo surface nodes usng boundar condons approprae for he problem of our choce. For eample, for ero-flu surfaces we have: oe, ha n he rgh erm of hese formulas resul from he fac ha he hckness of he frs and las slces s / raher han. 6. Updae curren me = me + h 7. If he me s less han he me of he smulaon, go o 3 and repea. 8. Wre daa for plong fnal concenraon profle versus poson. You can also wre daa several me durng he smulaon f ou wan o see he evoluon of he concenraon profle wh me.