On May 26, 2006, at 2:51 PM, Damm, Edward F. (E. Buddy) wrote:
All the examples you gave had the gradient term expressed as the field
variable you are solving for in the transientTerm. There were no
mixed
gradient terms with respect to the transientTerm, so I'm still a
little
fuzzy. I may be oversimplifying here.
If I have the equation $\frac{\partial u_{c}}{\partial t}=\nabla
\left[
D\cdot \nabla u_{c}+u\cdot \nabla \phi \right] $
Here transient term is solving for the Field variable $u$_{c}.
The first gradient term is in $u_{c}$, so I do Not factor out $u_{c}$
The second gradient term is in $\phi $, so now I do need to factor out
$%
u_{c}.$ With that done, I then have...
It has nothing to do with where the gradient is. Each term implicitly
contains the solution variable in one particular location, so you
should never include this *implicit* solution variable in the
coefficient for that term. That would be redundant. You have to
figure out which canonical Term is represented by each part of your
equation. Once you know that, then look where the solution variable
appears in that Term and everything *else* is the coefficient.
If you're solving for u_c, then:
$\frac{\partial u_{c}}{\partial t}$ is a TransientTerm for u_c with
coefficient 1.
$\frac{\partial \rho_0 u_{c}}{\partial t} is a TransientTerm for u_c
with coefficient rho0.
$\frac{\partial \rho_0 u_{c} u_{c}}{\partial t} is a TransientTerm
for u_c with coefficient rho0 * uC.
$\frac{\partial \phi}{\partial t} isn't a TransientTerm for u_c at all.
$\nabla^2 u_c$ is a DiffusionTerm for u_c with diffusion coefficient 1.
$\nabla \left[ D \cdot \nabla u_c \right]$ is a DiffusionTerm for u_c
with diffusion coefficient D.
$\nabla \left[ D u_c \cdot \nabla u_c \right]$ is a DiffusionTerm for
u_c with diffusion coefficient D * uC.
$\nabla \left[ D \cdot \nabla \phi \right]$ isn't a DiffusionTerm for
u_c at all.
$\nabla\cdot\left[ (1,0,0) * u_c \right]$ is a DiffusionTerm for u_c
with velocity coefficient (1,0,0) (in 3D).
$\nabla\cdot\left[ \vec{v} u_c \right]$ is a ConvectionTerm for u_c
with velocity coefficient v.
$\nabla\cdot\left[ \vec{v} * (1 - u_c) u_c \right]$ is a
ConvectionTerm for u_c with velocity coefficient v * (1 - uC).
$\nabla\cdot\left[ \vec{v} \phi \right]$ isn't a ConvectionTerm for
u_c at all.
A convection term is a convection term because it looks like the
divergence of u_c times *some* velocity vector. It doesn't matter if
that velocity vector has a gradient in it. It doesn't matter if the
velocity vector is *also* a function of u_c.
A diffusion term is a diffusion term because it looks like the
divergence of some diffusivity times the gradient of u_c. It doesn't
matter if the diffusivity also has u_c in it.
Maybe this is the source of your confusion: Arguably, if you had a term
$\nabla\cdot\left[ u_c \nabla u_c \right]$
you could think of this as a DiffusionTerm with a diffusion
coefficient uC *or* as a ConvectionTerm with a velocity coefficient
uC.getFaceGrad(). While this may be technically true, I would never
treat it as a ConvectionTerm, and I don't even know if it would work
at all. Maybe Daniel can confirm.