On Jan 7, 2009, at 1:34 PM, Etienne Rivard wrote:

Everything can be calculated from other variables of the system, except for the velocity. Therefore, I need this equation to compute the velocity
$v^*$.

How does $v^*$ appear in your other equations? Is it possible that one of them is more naturally solved for velocity?


It appears in a simple derivative so I thought about declaring this
term in fipy with a convection term. However there are several problems
with this strategy.


- Ideally, the velocity which is a vector face variable should be a
coefficient, not the variable we are solving for.

Correct. FiPy cannot directly solve for vector fields, nor can it solve for face variables.

*If* I were to try to solve this equation for $v^*$, I'd cast it into a set of scalar equations for the components of $v^*$ (Since you're in 1D, that's a trivial operation in this case). You then can, in theory, write $\frac{\partial}{\partial \xi} \left( \frac{c v^*}{R} \right)$ as a convection term, as you surmised. Then, interpolate as usual from the cell components of $v^*$ to a vector face variable.

but you're then having to treat the scalar field $\frac{c}{R}$ as the convective velocity of the scalar field $v^*_\xi$. In 1D, this isn't a big deal (although it might require a bit of fiddling to get the right shape), but I don't even know what the velocity should be if you did this problem in higher dimensions, which is a clue that this isn't the correct approach.


- There is no diffusion term in this equation which makes it a hyperbolic
equation and as far as I heard this isn't necessarily a good thing.

I just recently had cause to solve a similar equation for light absorption, which led us to find a bug. You'll need the tip-of-trunk to solve this equation at all. If you're still using FiPy 1.x, then you probably can't solve it. The boundary conditions can be a bit tricky, too. See http://matforge.org/fipy/browser/trunk/examples/convection/source.py for a simple case.

 My case is diffrent,
there is no pressure gradient, the velocity is "diffusion induced" if I
may say it like that, it is due to evaporation and diffusion of the
different chemical species in the domain.

Understood. We still wonder if this is the correct equation to solve for $v^*$. It certainly looks much more like an equation for $c$. What do your other equations look like?


Does anyone have any ideas? Jonathan perhaps? Any help would be greatly
appreciated.

Daniel's our fluids expert, but hopefully I didn't make too big hash of it.


Reply via email to