Re: 2D anisotropic unstructured mesh and non-classical FV schemes
>> If you wish to use an unstructured Delaunay mesh, it has >> to be isotropic (equilateral triangles) or near-isotropic otherwise >> the control volume calculation will result in overlaps and the >> conservation property will be violated (the solution would more likely >> be incorrect). > > CC-FVM is a direct discretization of the divergence theorem. As such, I'm > pretty sure it is guaranteed to be conservative. > > Non-orthogonality will lead to fluxes being wrong, but they will still be > conservative (whatever they flux out of one cell, they > deposit in the > neighbor). I guess what I said would've been clearer if I had mentioned VC-FVM at the top (I only mentioned it close to the end of my post). My description was purely from the VC-FVM point-of-view, hence the 'calculation of control volume' part, which is an extra step and has many algorithmic variations of its own, e.g., median dual scheme, containment dual scheme, etc, (whereas in CC-FVM, the triangle itself is the control volume). Though from your description, doesn't look like CC-FVM is without problems either ("fluxes being wrong"). ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
Re: 2D anisotropic unstructured mesh and non-classical FV schemes
Daniel is much better versed in the nuances of FV schemes than I am, but I did want to question one assertion you made: > On Oct 16, 2017, at 6:16 PM, F Hssn wrote: > > If you wish to use an unstructured Delaunay mesh, it has > to be isotropic (equilateral triangles) or near-isotropic otherwise > the control volume calculation will result in overlaps and the > conservation property will be violated (the solution would more likely > be incorrect). CC-FVM is a direct discretization of the divergence theorem. As such, I'm pretty sure it is guaranteed to be conservative. Non-orthogonality will lead to fluxes being wrong, but they will still be conservative (whatever they flux out of one cell, they deposit in the neighbor). > On Oct 17, 2017, at 4:07 PM, F Hssn wrote: > >> What is an anisotropic mesh? > > By anisotropic, I mean the mesh having low-quality triangles (skinny > triangles, as opposed to equilateral triangles), strategically > oriented so they reduce the number of vertices required but do not > negatively affect the resolution of the functions or solutions > involved (e.g., the interpolation error does not increase compared to > an isotropic mesh where all triangles are equilateral or > near-equilateral). > > bamg is a good anisotropic mesh generator and its user manual [1] > contains examples of anisotropic meshes (e.g., Fig 12 on page 14). > > I should point out that when I say anisotropic quad-tree based > axis-aligned mesh, I really mean quasi-ansiotropy, since an > axis-aligned mesh can only orient skinny triangles along x or y axis. > If your solution has an interface layer that is oriented in neither, > e.g., if it's at a 45 degree angle, an axis-aligned mesh would not be > able to make use of anisotropy and would end up using way more > vertices instead (for constructing small rectangles along the layer). > (An illustration of an axis-aligned mesh: > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fimgur.com%2F15pyjHG&data=02%7C01%7Cjonathan.guyer%40nist.gov%7C0cd9082479634078c46808d5159ac7e0%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C0%7C636438676887192908&sdata=SdR7MZg8rnTndTHH5p%2Fqxxni8s4KPo1KQLubiNVAMQg%3D&reserved=0) > > [1] > https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.ljll.math.upmc.fr%2Fhecht%2Fftp%2Fbamg%2Fbamg.pdf&data=02%7C01%7Cjonathan.guyer%40nist.gov%7C0cd9082479634078c46808d5159ac7e0%7C2ab5d82fd8fa4797a93e054655c61dec%7C1%7C1%7C636438676887192908&sdata=ATMC%2FZGC9k5g%2FIs%2BqED%2F1sFbMIp90LK84urX3Py6RS4%3D&reserved=0 > ___ > 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 ]
Re: 2D anisotropic unstructured mesh and non-classical FV schemes
> What is an anisotropic mesh? By anisotropic, I mean the mesh having low-quality triangles (skinny triangles, as opposed to equilateral triangles), strategically oriented so they reduce the number of vertices required but do not negatively affect the resolution of the functions or solutions involved (e.g., the interpolation error does not increase compared to an isotropic mesh where all triangles are equilateral or near-equilateral). bamg is a good anisotropic mesh generator and its user manual [1] contains examples of anisotropic meshes (e.g., Fig 12 on page 14). I should point out that when I say anisotropic quad-tree based axis-aligned mesh, I really mean quasi-ansiotropy, since an axis-aligned mesh can only orient skinny triangles along x or y axis. If your solution has an interface layer that is oriented in neither, e.g., if it's at a 45 degree angle, an axis-aligned mesh would not be able to make use of anisotropy and would end up using way more vertices instead (for constructing small rectangles along the layer). (An illustration of an axis-aligned mesh: https://imgur.com/15pyjHG) [1] https://www.ljll.math.upmc.fr/hecht/ftp/bamg/bamg.pdf ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
Re: 2D anisotropic unstructured mesh and non-classical FV schemes
Thanks for your interest in FiPy On Mon, Oct 16, 2017 at 6:16 PM, F Hssn wrote: > > So my questions are: > > - Does fipy handle anisotropic unstructured meshes without any > problem? (I'm specifically looking to use bamg for 2D mesh adaptation > based on interpolation error reduction/equidistribution) What is an anisotropic mesh? FiPy does "handle" unstructured meshes in that the problem will solve, however, the accuracy decreases as the non-orthogonality and non-conjunctionality increases (as you pointed out). There has been an attempt to implement terms to correct for the non-orthogonality, see https://github.com/usnistgov/fipy/blob/develop/fipy/terms/diffusionTermCorrection.py and https://github.com/usnistgov/fipy/blob/develop/fipy/terms/diffusionTermNoCorrection.py You might want to try playing with the corrected diffusion term to see how well it works. I can't find any examples of its use though. See also - https://www.mail-archive.com/fipy@nist.gov/msg03758.html - https://www.mail-archive.com/fipy@nist.gov/msg03757.html - https://www.mail-archive.com/fipy@nist.gov/msg03765.html > - If not, does fipy provide (or provide a way to implement) MPFA > (multi-point flux approximation) or some other non-classical scheme > (like HMM) that allows anisotropic unstructured meshes (as discussed > in the Drioniou paper [1]) ? I don't think I can easily answer that without a great deal of work, but I did skim over the Drioniou paper, https://arxiv.org/pdf/1407.1567.pdf. I can't foresee all the issues with implementing the various schemes but one that does come to mind is having to use neighbor's neighbor values to compute fluxes, which I think these schemes require. It would require a lot of changes to FiPy to set that up efficiently. However, I will certainly keep this paper on my list of items to research further. Thanks for highlighting it. > - Or, does fipy allow any other way to make vertex-centered control > volume calculation that can take into account anisotropy and can make > sure there are no control volume overlaps (and as a result, the > coefficients stay positive, and monotonicity is maintained, and none > of the nice properties are violated) ? No, FiPy is definitely not set up for vertex centered. The above cell-centered approach is the way to go. -- Daniel Wheeler ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]
2D anisotropic unstructured mesh and non-classical FV schemes
I'm looking into using fipy to solve my system of 3 equations (one Poisson, two continuity), used for semiconductor device simulation (the drift-diffusion system, also known as van Roosbroeck system of equations). My system is: - singularly perturbed (contains sharp boundary/interface layers) - non-linear. - 2D - time-independent For such a system anisotropic mesh helps a lot with keeping the number of mesh-points small. However classical finite volume scheme (2-point flux approximation, or TPFA) as pointed out in the paper by Droniou [1] puts severe limitations on the kind of mesh you could use. Specifically, you can only use anistropic mesh with quad-tree based mesh (i.e., construction of a axis-aligned quad mesh, followed by splitting each quad into two triangles). If you wish to use an unstructured Delaunay mesh, it has to be isotropic (equilateral triangles) or near-isotropic otherwise the control volume calculation will result in overlaps and the conservation property will be violated (the solution would more likely be incorrect). There are some other aspects of a FV scheme as mentioned in Droniou that I'm still trying to understand (as an engineer, not a mathematician). E.g., monotonicity, coercivity, min-max principle, discrete max principle, etc, etc. So my questions are: - Does fipy handle anisotropic unstructured meshes without any problem? (I'm specifically looking to use bamg for 2D mesh adaptation based on interpolation error reduction/equidistribution) - If not, does fipy provide (or provide a way to implement) MPFA (multi-point flux approximation) or some other non-classical scheme (like HMM) that allows anisotropic unstructured meshes (as discussed in the Drioniou paper [1]) ? - Or, does fipy allow any other way to make vertex-centered control volume calculation that can take into account anisotropy and can make sure there are no control volume overlaps (and as a result, the coefficients stay positive, and monotonicity is maintained, and none of the nice properties are violated) ? Thanks in advance, F [1] J. Droniou, “Finite volume schemes for diffusion equations: Introduction to and review of modern methods,” Math. Models Methods Appl. Sci., vol. 24, no. 08, pp. 1575–1619, Jan. 2014. ___ fipy mailing list fipy@nist.gov http://www.ctcms.nist.gov/fipy [ NIST internal ONLY: https://email.nist.gov/mailman/listinfo/fipy ]