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...

>>>transientTerm()== ImplicitDiffusionTerm(coeff=D) +
PowerLawConvectionTerm(coeff = u*phase.getFaceGrad(), diffusionTerm =
ImplicitDiffusionTerm(coeff=D))

Is that correct?

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Jonathan Guyer
Sent: Friday, May 26, 2006 9:29 AM
To: Multiple recipients of list
Subject: Re: convection coefficent a function of concentration



On May 26, 2006, at 9:06 AM, I wrote:


> Factoring out everything that *operates* on phi:
> \[
>     \left[\frac{\partial}{\partial t} - \nabla\cdot(\vec{u}) - 
> [\nabla\cdot(\Gamma_i)]^n - S_1 \right] phi = S_0 \]
> *This* is now in the form of a FiPy equation:
>     >>> TransientTerm() - ConvectionTerm(coeff=u) - DiffusiontTerm 
> (coeff=(Gamma1, ...)) - ImplicitSourceTerm(coeff=S1) == S0
>
>
> \phi doesn't appear explicitly in *any* of these expressions; it's 
> built into the Terms.


This does not mean that you factor out every single appearance of  
\phi in your equations. Only these specific appearances. Factor out  
the canonical appearance of \phi in each of the cannonical terms:

  \partial (\rho \phi) / \partial t = \left(\partial \rho / \partial  
t \right)[\phi] = TransientTerm(coeff=rho)

  \nabla\cdot(D \nabla \phi) = \left(\nabla\cdot(D \nabla))[\phi] =  
DiffusionTerm(coeff=D)

  \nabla\cdot(\vec{u} \phi) = \left(\nabla\cdot(\vec{u}))[\phi] =  
ConvectionTerm(coeff=u)

\rho can still be a function of \phi. D can be a function of \phi.  
\vec{u} can be a function of \phi. Leave those functions of \phi as  
they are, just factor out the *canonical* \phi that *must* be in the  
term.



-----------------------------------------
This message and any attachments are intended for the individual or
entity named above. If you are not the intended recipient, please
do not forward, copy, print, use or disclose this communication to
others; also please notify the sender by replying to this message,
and then delete it from your system. The Timken Company / The
Timken Corporation




Reply via email to