Hi Jon,
Thank you very much for your reply! They are all very useful informations.

The higher-order discretization sounds interesting. I am solving the elastic
force balance equations. I compared the results that I got from my fipy code
with those from ABAQUS (a finite element software). The results are very
similar except they are offset somehow (depending on the problem). If I use
the "getFaceGrad()" instead of "getGrad()" when calculating the strain from
the displacement, I get closer results. Maybe the higher-order interpolation
in finite element method makes the differences.

Thanks again,
Zhiwen


On Fri, Sep 19, 2008 at 3:49 PM, Jonathan Guyer <[EMAIL PROTECTED]> wrote:

>
>
> On Sep 19, 2008, at 10:40 AM, Zhiwen Liang wrote:
>
>  It seems that the "var.getFaceGrad()" gives better resolution of the field
>> stored in "var" than the "var.getGrad()". This is why I was trying to use
>> FaceVariable in one of the equation terms.
>>
>
> That depends on what you mean by "better resolution". If anything, I would
> expect `getGrad()` to be smoother, which is generally better.
>
>  The problem I am solving needs a very fine mesh. So I thought it might be
>> improved if I use the face variable.
>>
>
> I think there's a conceptual error here. If you need a fine mesh, then make
> a fine mesh. The FaceVariables are not any finer than the CellVariables;
> they're just displaced by half a grid-spacing. By definition, FiPy solves
> equations at Cell centers (CellVariables). Fluxes occur between Cells
> (diffusion & convection) and call for coefficients that are FaceVariables.
> Sources (transients and sources) change the value at Cells and therefore
> *must* be defined using CellVariables.
>

>
> There are any number of reasons why you might be getting poor results.
>
> Under-resolution is an obvious one: refine your mesh.
>
> Conceivably, `getGrad()` is an inadequate discretization for your needs, in
> which case we can look into coding up a higher-order discretization.


> Quite possibly, the issue is elsewhere altogether, though. What is the
> physical process you are trying to model? What behavior are you seeing that
> leads you to believe that you have a problem?
>
>
>

Reply via email to