On Fri, Jan 12, 2018 at 12:42 PM, Clara Maurel <cmau...@mit.edu> wrote:
> Hi Daniel,
>
> Thank you very much! The code runs for me as well: fantastic!
>
> I have to admit that the distinction between cell and face variables remains
> a bit obscure to me…

The domain is divided into cells or boxes in 2D. The faces are where
the boxes meet and the cell centers are located at the center of the
boxes. FiPy calculates/resolves fluxes between the boxes.

> The cell variable X_var is the composition of the
> system I am modelling. Then "G" in d2G is the Gibbs free energy (called f
> here
> https://www.ctcms.nist.gov/fipy/examples/cahnHilliard/generated/examples.cahnHilliard.mesh2DCoupled.html#module-examples.cahnHilliard.mesh2DCoupled),
> which is itself a function of the composition X_var (the spline function).
> I don’t know if these info are more useful to figure out if d2G should be
> cell or face variable? As I understood it, because I want to solve for
> X_var, this should be a cell variable and nothing else.

X_var is a cell variable but the diffusion coefficient can either be a
cell variable or a face variable in FiPy. FiPy converts the diffusion
coefficient to a face variable if it's defined as a cell variable in
the input file. FiPy calculates the flux between cells so the
diffusion coefficient is only used at the faces where the flux is
calculated. d2G has values which are defined over the domain. How do
those values correspond to a location in that domain? Why does d2G
have a shape of (1001,) when there are only 1000 cells?

> By higher dimension do you also mean 2D? I know 2D requires a lot of
> changes, but I thought 2D required only a change of grid. In any case, 2D is
> not my top priority at the moment.

Ok, this is only being used for 1D right now so you're fine.

> Thank you again very much for your help!

Good luck with it.

-- 
Daniel Wheeler

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

Reply via email to