On Sat, Jan 21, 2012 at 1:22 PM, Rafael Calsaverini <
[email protected]> wrote:

> Hi,
>
> I just found out about fipy so I was giving it a try. I found out the
> nomenclature of the terms in the equations quite an obstacle though. Not
> being
> originally from the fluid dynamics community, some terminology is obscure
> to me,
> and the manual didn't quite illuminate for me how to write of a simulation
> for a
> arbitrary PDE.
>
> For example, I was interested, for example, in simulating the following
> equation:
>
> du/dt = d/dx(v(u) u)
>
> with Neumann boundary conditions at u(0), for example, and
>
> (interpret d/dt and d/dx as partial derivatives)
>
> How do I translate this into the terms classes?
>

I think this is just a ConvectionTerm. A description of the convection term
schemes are given on <
http://www.ctcms.nist.gov/fipy/documentation/numerical/discret.html#convection-term>
and <http://www.ctcms.nist.gov/fipy/documentation/numerical/scheme.html>.
The only second order scheme is the Van Leer term <
http://www.ctcms.nist.gov/fipy/fipy/generated/terms.html#module-fipy.terms.vanLeerConvectionTerm
>.

We are currently working on better Riemann based flux calculations for
convection terms for future releases.


>
> I understand that du/dt is equivalent to TransientTerm() and that d( v
> du/dx) is
> equivalent to DiffusionTerm(coeff = v).
>
> My questions are:
>
> 1) how to insert a term like d( v u)/dx
>

Use a convection term.


> 2) how to make v to be a function of u(x,t)?
>

Construct v from the u(x, t). See <
http://matforge.org/fipy/browser/trunk/examples/elphf/phaseDiffusion.py#L152>
for an example of constructing an operator variable that is used as a
convection coefficient. Unfortunately, the FiPy web page doesn't have
enough highlighted convection examples. They seem to be hidden away in the
examples directory.

-- 
Daniel Wheeler
_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
  [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]

Reply via email to