Hi Burak,

The getGrad operator doesn't include the boundary condition in its
evaluation. Reading <
http://www.ctcms.nist.gov/fipy/documentation/FAQ.html#i-can-t-get-the-fixedvalue-or-fixedflux-boundary-condition-objects-to-work-right-what-do-i-do-now>
may help. The next version of FiPy will use a different syntax for boundary
conditions and the getGrad operator will work better as a result.

On Tue, Dec 20, 2011 at 8:15 AM, Burak Atakan <[email protected]>wrote:

> it Burak Atakan <herzige@...> writes:
>
>
> > print T.getGrad().getValue()
> > print T.getValue()
> > ############# END
> >
> > The output is:
> >     [[ -500.         -1000.         -1000.          -999.99999998
> >   -1000.00000006  -999.99999983 -1000.00000035  -999.99999949
> >   -1000.00000049  -500.00000161]]
> > [ 395.          385.          375.          365.          355.
>  345.
> >   335.          324.99999999  315.00000001  304.99999998]
>
> Just as a tiny followup:
> I also checked
> T.getArithmeticFaceValue()
>
> which gives:
> [ 395.          390.          380.          370.          360.
>  350.
>  340.          330.          320.          310.          304.99999998]
> shouldn't the first and last value be (near) 400. and 300., respectively?
>

Depends what the boundary conditions are. We assume that the gradient is
zero on the edge. This transfers to the natural boundary condition when
solving second order PDEs.

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