It is not presently possible to solve the grain impingement problem on a mesh that is not one of FiPy's predefined grids.

I don't believe it's hard to fix, but I needed to puzzle out why _meshSpacing was used at all (that bit of code is 14 years old). I now understand what it's doing, and I don't think it's hard, but it's also not something I can instantly fix. https://github.com/usnistgov/fipy/issues/554 > On Feb 7, 2018, at 3:44 PM, Sachin Kurian <sach...@vt.edu> wrote: > > In FiPy, it is possible to solve the common governing equations in a > non-standard geometry and mesh that is imported from gmsh. FiPy also solves > the coupled phase field (CellVariable) and orientation field > (ModularVariable) equations on a standard mesh. But defining a > ModularVariable on non-standard mesh leads to an error. > So, in its current setup, is it possible to solve the grain impingement > problem in a circular domain with triangular meshes using FiPy? > Or is there any other way than using gmsh to get FiPy solve the grain > impingement problem in a non-standard geometry? > > > On Wed, Feb 7, 2018 at 2:34 PM, Guyer, Jonathan E. Dr. (Fed) > <jonathan.gu...@nist.gov> wrote: > SkewedGrid2D is a defined thing in FiPy. > > GmshGrid2D and GmshGrid3D have a _meshSpacing property defined, but making a > generic periodic mesh with Gmsh will not induce this. > > > > On Feb 7, 2018, at 12:07 PM, Sachin Kurian <sach...@vt.edu> wrote: > > > > Thank you. > > I've tried using quad meshes from gmsh (I suppose this is what you meant by > > skew grids), but the same error shows up. So, the problem is that > > '_meshSpacing' is not an attribute for 'Gmsh2D' mesh if I define a > > ModularVariable on that mesh. > > > > On Wed, Feb 7, 2018 at 11:49 AM, Guyer, Jonathan E. Dr. (Fed) > > <jonathan.gu...@nist.gov> wrote: > > _meshSpacing is only implemented for (square (including skew)) grids and > > only used by the _ModCellGradVariable. It's apparently been like that since > > before FiPy was FiPy, 14 years ago. > > > > I'll need to think about this more deeply to understand why normalizing by > > grid spacing even makes sense, much less what the answer should be for a > > general mesh. > > > > > > > On Feb 6, 2018, at 7:17 PM, Sachin Kurian <sach...@vt.edu> wrote: > > > > > > Hi everyone, > > > > > > I've just started using FiPy. I'm particularely interested in the phase > > > field problems. I tried the examples of solidification and grain > > > impingement given in the documentation. What I intend to do is to use a > > > non-rectangular domain with triangular mesh for the problem. After > > > importing the unstructured mesh generated by gmsh, I assigned a > > > ModularVariable (theta) to the cells (Similar to the grain impingement > > > examples). Unfortunately, assigning a ModularVariable to the Gmsh2D() > > > mesh throws an attribute error:'Gmsh2D' object has no attribute > > > '_meshSpacing' when I use theta.grad.mag command or try solving the > > > equation. > > > What am I doing wrong here? Is it possible to model the grain impingement > > > problem in a user defined geometry and mesh created using gmsh? Or is > > > there any other approach in FiPy to achieve the same goal? > > > I use windows platform, > > > Python 2.7 > > > FiPy 3.1.3. > > > > > > Thanks, > > > > > > -- > > > Sachin Kurian > > > > > > _______________________________________________ > > > fipy mailing list > > > fipy@nist.gov > > > http://www.ctcms.nist.gov/fipy > > > [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] > > > > > > _______________________________________________ > > fipy mailing list > > fipy@nist.gov > > http://www.ctcms.nist.gov/fipy > > [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] > > > > > > > > -- > > Sachin Kurian > > Graduate Student > > Department of Mechanical Engineering > > Virginia Tech > > _______________________________________________ > > fipy mailing list > > fipy@nist.gov > > http://www.ctcms.nist.gov/fipy > > [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] > > > _______________________________________________ > fipy mailing list > fipy@nist.gov > http://www.ctcms.nist.gov/fipy > [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] > > > > -- > Sachin Kurian > Graduate Student > Department of Mechanical Engineering > Virginia Tech > _______________________________________________ > fipy mailing list > fipy@nist.gov > http://www.ctcms.nist.gov/fipy > [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ] _______________________________________________ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]