On Wed, Jul 17, 2013 at 9:00 PM, Vijay Krishnamurthy <[email protected]>wrote:

> Hello,
>
> I am trying to solve a bunch of advection-diffusion-reaction
> equations for $N$ scalar fields coupled to a flow field in
> $d=1,2$ dimensions.
>
> Equation for the vectorial flow field
> $$
> \nabla^2 \mathbf{v} + \zeta \nabla (\nabla \cdot \mathbf{v})
> = \mathbf{v} - \nabla F(\{c_i\})
> $$
> The flow field is not divergence free. $F$ is a function of
> the $N$ scalar fields $c_i$, $i=1,\ldots N$. These scalar
> fields are evolved by coupled advection-diffusion-reaction
> equations of the form
> $$
> \frac{\partial c_i}{\partial t} =
> -\mathbf{v} \cdot \nabla c_i
> -(\nabla \cdot \mathbf{v})  c_i
> + D_i \nabla^2 c_i + R_i(\{c_i\})
> $$
> where $D_i$ are the diffusion constants and $R_i$ are
> (polynomial) reaction terms.
>
> ------------------
>
> Before investing a lot of time, I want to know if this
> system of equations can be solved via FIPY in $d=1,2$ in flat
> and curved geometries (e.g., on a circular/elliptical loop
> for 1D, on a spherical/ellipsoidal surface for 2D). The
> example of the Cahn-Hilliard equation solved on a sphere is
> very promising.
>

You can definitely pose this problem to FiPy and probably for the
geometries of interest. You will not be able to use the coupled equation to
make the non-standard terms (second term in each equation).


>
> For 2D, this post
> http://thread.gmane.org/gmane.comp.python.fipy/2819/focus=2833
> might be relevant, and I dont know if one can still solve the
> equations despite the discussion in that thread.
>
>
As this thread suggest, you will not be able to use a coupled equation to
solve this. You will have to go equation by equation. Sorry about that
limitation. We really should fix it.



> I started with the simplest case of a single scalar field on
> a flat line in 1D, with no reaction terms. For a given $c$
> field, I can get the flow field and for a given flow field,
> I can evolve the advection-diffusion-reaction equation for
> the $c$ field. The trouble is when they are coupled and
> evolved together.
>
> My attempt is here
> http://pastebin.com/vrnTX5sj
>

Don't bother coupling these equation. The benefit comes in coupling the
flow equation in 2D.


> Also could you please give your opinion regarding 2D and
> curved geometries?
>

The gemetry should not present a challange to FiPy assuming that Gmsh can
generate it and with the caveat that FiPy looses accuracy as the
non-orthogonality and non-conjunctinality is increased. If you are looking
for an "engineering solution", then it's fine.


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