You can't do this. NaNs immediately propagate and will break your whole 
solution.

If I had to do this, I would decouple this region from the other equations by 
zeroing out the coefficients of those other equations in the appropriate region.

> On Jul 13, 2016, at 8:49 AM, Gopalakrishnan, Krishnakumar 
> <[email protected]> wrote:
> 
> <image001.gif>
> Hello,
>  
> I have a regular 2D Cartesian uniformly spaced mesh.
>  
> Due to some peculiarities of the physical system that I am currently working 
> with, the variable of interest in one of my PDEs, (fiPy CellVariable), is 
> undefined in certain interior node locations, i.e. we need to constrain them 
> to a value of float(‘nan’), when solving this PDE. 
>  
> It is not satisfactory to merely constrain them to have a value of 0.0 in 
> these interior co-ordinates, because a) It is physically inaccurate since the 
> values are not defined here and b) Because we need to couple this PDE to 
> other PDEs, the incorrect 0.0 values will propagate to other PDEs, thereby 
> polluting/corrupting their solutions too.  And hence, the full system of
>  
>  
> However, the following code snippet was deemed to be illegal when I tried it 
> out, since FiPy was checking for cellvariables to be strictly numeric (got a 
> value < eps error)
>  
> phi.constrain(float(‘nan’),mesh.y<=1.5)
>  
>  
>  
> How else can we enforce NaNs in these interior nodes in FiPy ?
>  
>  
>  
> Best Regards,
>  
> Krishna
>  
>  
> _______________________________________________
> 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