using interpolating function as initial condition to Ndsolve

*To*: mathgroup at smc.vnet.net*Subject*: [mg102766] using interpolating function as initial condition to Ndsolve*From*: Santhosh <santhosh833 at gmail.com>*Date*: Wed, 26 Aug 2009 07:45:23 -0400 (EDT)

hi all, I am solving a set of four pdes (first order in time and second order in space) using NDsolve. I am able to solve for arbitrary initial conditions. What I am interested is fist solve with some random initial conditions and get the steady state solution. I want to use this solution as initial condition(e.g cf[0,z]=f(z)....) for the next computations. I could not figure out how to use interpolating function as initial condition. can anybody have any idea? Thank you. here is my code sol = NDSolve[ { D[cf[t, z], t] + v D[cf[t, z], z] - a1 (cc[t, z] - cf[t, z]) == 0, D[tf[t, z], t] + v D[tf[t, z], z] - a2 (tc[t, z] - tf[t, z]) - a3 (tw - tf[t, z]) == 0, D[cc[t, z], t] - a4 (cf[t, z] - cc[t, z]) - a5 r[cc[t, z], tc[t, z]] == 0, D[tc[t, z], t] - a6 (tf[t, z] - tc[t, z]) - a7 r[cc[t, z], tc[t, z]] - a8 D[tc[t, z], z, z] == 0, cf[t, 0] == c0, tf[t, 0] == t0, (D[tc[t, z], z] /. z -> 0) == 0, (D[tc[t, z], z] /. z -> length) == 0, cf[0, z] == c0, tf[0, z] == t0, cc[0, z] == c0, tc[0, z] == t0 }, {cf, tf, cc, tc}, {t, 0, tfinal}, {z, 0, length} ]