What would be the ill effects of putting a hook in the code that would make
the boundary values correct? It would be a simple extrapolation using half
the cell width and the gradient in the cell.

- - - - - - - - - - - - - - - - -
L.Bryce Whitson Jr.
[email protected]

On Tue, Nov 18, 2014 at 1:09 PM, Daniel Wheeler <[email protected]>
wrote:

> On Tue, Nov 18, 2014 at 12:44 PM, L.Bryce Whitson Jr. <[email protected]
> > wrote:
>
>> I recently noticed that the faceValue of a variable is incorrect when a
>> Neumann (constant gradient) boundary condition is applied. For example,
>> let's assume the following:
>>
>> dx = 1
>> nx = 5
>> dTr/dx = 4 for right face
>> Tl = 300 for left face
>>
>> x = [0.5, 1.5, 2.5, 3.5, 4.5]
>>
>> The steady solution to this problem would be:
>> T = [302, 306, 310, 314, 318]
>> T.faceValue = [300, 304, 308, 312, 316, 320]
>>
>> However, in FiPy I get the following for the faceValues
>> T.faceValue = [300, 304, 308, 312, 316, 318]
>>
>> I'm assuming this is a bug in the faceValue code. Would this be correct?
>>
>
> Hi Bryce,
>
> It is certainly unintuitive and it causes results to be misinterpreted,
> but it isn't a bug in the sense that the equations needs that value during
> solve(). Basically, the "faceValue" property isn't aware of the faceGrad
> constraint, but equations are aware. The "faceValue" is really something
> that needs to be correct for the equation solution and wasn't intended to
> be used to extract values, necessarily. However, it would be nice if it all
> just worked intuitively.
>
> I hope that helps a bit.
>
> Cheers,
>
> Daniel
>
>
> --
> Daniel Wheeler
>
> _______________________________________________
> fipy mailing list
> [email protected]
> http://www.ctcms.nist.gov/fipy
>   [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
>
>
_______________________________________________
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