Dear Daniel:
Thanks a lot for your reply. Greatly appreciated.
The trick you used to transform the equation is quite clever ;-). I
guess now my question is how to represent $\partial_i V$ in the
convection term.
Though you confirmed to me that it's possible to have a convection
term with a variable coefficient, like $\partial_i V$, I'm still not
clear how to do that in Fipy. From the documentation on
Convectionterm, I found the following:
>>> cv = CellVariable(mesh = m)
>>> __ConvectionTerm(coeff = cv)
Traceback (most recent call last):
...
TypeError: The coefficient must be a vector value.
It looks to me that only, a scalar, or a constant vector is allowed in
this term. Any suggestion?
Thanks again.
Best,
Bin
On Oct 12, 2010, at 8:35 AM, Daniel Wheeler wrote:
Hi Bin,
Sorry for the delayed reply. I think the best way to deal with the
equation you proposed is to convert to the following form:
\begin{equation}
0 = a q \partial_i^2 V - a \partial \left(q \partial_i V \right) + b
\partial_i^2 q
\end{equation}
That way, you'll have an implicit source term, a convection term and a
diffusion term.
On Wed, Oct 6, 2010 at 9:35 PM, BIN ZHANG <[email protected]> wrote:
Hi, there:
Is it possible to use a variable convection term rather than a
constant?
I am not certain what you mean by a "variable convection term". Do you
mean a convection term with a variable coefficient? If so, the answer
is yes. The coefficient can be any vector field that changes in space
and time, but the term can not be posed to FiPy in the form you gave.
Hope the above helps.
--
Daniel Wheeler