On Wed, Aug 15, 2012 at 6:51 PM, Scott Norris <[email protected]> wrote:
> Hello,
>
> I am a new FiPy user, hoping it will be possible to replace a modest
> home-built, Matlab-based PDE solver codebase, both in research and graduate
> classes. It looks amazing, but I wanted to ask how severe are the
> restrictions on the form of PDEs that can be solved. The response in the
> FAQ to the question, "What if my term involves the dependent variable, but
> not where FiPy puts it?" seems to be, "Try to manipulate it into a
> combination of standard forms."
>
That is basically correct. However, the restrictions will be less severe in
the upcoming release as coupled and vector equations allow for more varied
equation forms, which should help you here.
>
> I'm particularly interested in using FiPy to study weakly-nonlinear
> equations associated with pattern formation in multiple dimensions. A
> classical problem there is the Kuramoto-Sivashinsky equation:
>
> h_t = - \nabla^2 h - \nabla^4 h - (1/2) | \nabla h |**2
>
> where h is the dependent variable.
One possible way to do this (with the coupled equation capability) would be
h_t = - \nabla^2 h - \nabla^2 f - (1/2) \nabla \cdot \left(h \nabla h
\right) + h f
f = \nabla^2 h
I can't say how well this will work, but it seems logical. The second to
last term will be a convection term with the velocity "\nabla h" and the
last term would be an implicit source term on f (h will be the
coefficient), since it is based on the derivatives of h.
I'm not seeing how to turn the last term into a difference of
> Convection/Diffusion terms, and the documentation seems to indicate that
> ImplicitSource terms are limited to being linear in the dependent
> variable. I've seen references to things like getGrad() and getDiv(), but
> little documentation, and vague references to things not working well if
> you try to add these explicitly to an equation.
>
We introduced coupling to deal with these issues. Using getGrad() and
getDiv() is fully explicit.
>
> Can terms like this be fit into FiPy's framework efficiently (i.e.,
> without drastic decrease in accuracy / increase in solution time)? If it's
> possible, I'd be happy to help write some documentation on how to code up
> various kinds of terms, as a part of my learning curve. If it's not
> possible, is there a deeper issue associated with the FVM? I grew up
> learning FDM, where it's possible to write a fairly basic solver for this
> problem. However, to the extent that I understand the basics of FVM, it's
> not clear to me how a volume integral of the last term could be converted
> into a surface integral.
>
You're quite right about the last term, but I think the real question is
how does one represents the term in a form such that any second order
gradients are implicit. The way I wrote the equation above only includes
one derivative that is explicit (in the second to last term). This should
be more stable than just evaluating the last term completely explicitly
(which you could always do with getGrad()).That is basically what you would
do with FD, so you can do the same in FiPy.
>
> Thanks in advance for any help.
>
No problem, thanks for your interest in FiPy.
--
Daniel Wheeler
_______________________________________________
fipy mailing list
[email protected]
http://www.ctcms.nist.gov/fipy
[ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]