Apologies for the slow reply. I hadn't noticed your response until
now. See below.

On Wed, Aug 8, 2018 at 1:09 PM Daniel DeSantis <desan...@gmail.com> wrote:
>
> Daniel,
>
> Thank you very much for your help.The code does run much better.
>
> I was curious about these lines of code. I'm hoping to understand what this 
> means so that I can use it if needed, next time.
>
> Thank you again,
> Dan DeSantis
>
> constraint_value = FaceVariable(mesh=mesh)
> T.faceGrad.constrain(constraint_value,mesh.facesLeft)
>
> for sweep in range(sweeps):
> constraint_value[:] = h * ((60. + 273.15) - T.faceValue)

I only used the above code as it happened to work. It should work
without having to do the update in the loop, but something isn't right
with the way FiPy is updating constraints in the case when the
constraint is not a bare FaceVariable. In other words, we make a face
variable and then say that the constraint depends on that face
variable. We have to explicitly update the face variable in the loop.

The expression "h * ((60. + 273.15) - T.faceValue" should also be a
face variable and so we should be able to use "T.faceGrad.constrain(h
* ((60. + 273.15) - T.faceValue, mesh.facesLeft)" and not update in
the loop. That doesn't work, however.

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