On Mon, Feb 6, 2012 at 12:41 PM, wang yunbo <[email protected]> wrote:

> Hi,
>
> Followed up the previous question, now I  calculated the curvature
> everywhere for the mesh and found the accuracy was not that within second
> order.
>

How do you know? How did you check the order of accuracy? Is the curvature
calculation not second order accurate or the calculation of the distance
function?

Is my mesh not stable?
>

I don't think stability is an issue here.

Here is my mesh:
>
> mesh = Grid2D(dx=1.0, dy=1.0, nx=100, ny=100)
>
> var = DistanceVariable(name='Test',
>                        mesh=mesh,
>                        value=-1.0,
>                        hasOld=1)
>
> For initial value,
>
> var.setValue(1.0, where = ((x-50.0)**2+(y-50.0)**2>625.0))
>
> var.calcDistanceFunction()
>
>
> For this case, what is the best way to calculate the curvature?
>

var.getFaceGrad().getDivergence()

should be second order accurate.

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