2010/1/28 Igor <[email protected]>:
> Dear fipy users and developers,
>
> I have a spherical symmetric problem, so I can use Grid1D mesh, but need to
> multiply coefficients in diffusion-convection problem by r^2 and also add
> external one like 1/r^2, i.e.
>
> df/dt = 1/r^2 d/dr (r^2 D df/dr) - 1/r^2 d/dr (r^2 u f)

The best way is to just being the r^2 expression inside the TransientTerm.

TransientTerm(r**2) == DiffusionTerm(... etc

Multiplying by the coefficient does work, but I'm not sure of the
equivalence of the discretization between "multiplying by the
coefficient" and "taking the r^2 inside the transient term".

> I managed to provide r^2 in "internal" coefficients, but failed to provide
> 1/r^2 in "external" ones (i.e. something like (1/r**2)*DiffusionTerm). I
> then tested to put some CellVariable before the Term as was advised to do
> earlier and the script failed again.

It should work, but as I said, you don't need to worry about it now.

Cheers

-- 
Daniel Wheeler

Reply via email to