On Nov 26, 2012, at 3:48 PM, Kerem Yunus Camsari wrote: > Since I am using the Fokker-Planck equation, I needed to add the gradient of > the diffusion term as a convection term separately (middle term below). It > appears that if I turn this term off , the solution does not blow up. > > > eq=TransientTerm()==DiffusionTerm(coeff=Diffusion)+1*ExponentialConvectionTerm(coeff=Diffusion.divergence*[[1]])-ExponentialConvectionTerm(coeff=DriftR*[[1]])
Diffusion.divergence is not the gradient of Diffusion. I don't think a FaceVariable has a grad operator because it's not a sensible thing to ask for in cell-centered finite volume. Define Diffusion as a CellVariable and then use Diffusion.grad. You can also then choose which interpolation of Diffusion to use in the DiffusionTerm, as Wheeler said: >> It might be that you need a harmonic or geometric mean at the faces for the >> diffusion coefficient. This will actually prevent flux in the places where >> the diffusion coefficient is zero you can try: DiffusionTerm(coeff=Diffusion.arithmeticFaceValue) (the default) DiffusionTerm(coeff=Diffusion.geometricFaceValue) DiffusionTerm(coeff=Diffusion.harmonicFaceValue) _______________________________________________ fipy mailing list [email protected] http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
