idaholab / moose

Multiphysics Object Oriented Simulation Environment
https://www.mooseframework.org
GNU Lesser General Public License v2.1
1.7k stars 1.04k forks source link

Fix EBSDMesh to enable uniform refinement #7307

Closed j2bradley closed 8 years ago

j2bradley commented 8 years ago

Description of the enhancement or error report

EBSDMesh un-does the uniform refinement that is specified in the input file, preventing users from refining their mesh. Guilty code is found here.

Rationale for the enhancement or information for reproducing the error

When mesh adaptivity cannot be used, this behavior may prevent users from specifying a mesh fine enough to resolve grain boundary evolution accurately.

Identified impact

This may affect anyone using EBSDReader.

dschwen commented 8 years ago

Please use initial refinement instead. The whole point of this Mesh class is to provide the EBSD IC with a mesh that exactly matches the EBSD data! Adding uniform refinement the way it is used in GeneratedMesh would defeat that purpose.

uniform refinement is not un-done! It causes the final mesh to be a uniformly refined version of a mesh coarser than the EBSD data. This is important to allow coarsening in adaptive mesh simulations. The so-called guility code just checks if it is possible to get to the EBSD resolution through refinement from a coarser mesh.

Now, if mesh adaptivity cannot be used (for example with stateful material properties). We need to figure out something else...

permcody commented 8 years ago

Not quite - The EBSDMesh is designed to read in a grid size that exactly matches the EBSD data. Any further refinement won't help because the data doesn't exist beyond the EBSD data. What you should do for this case is use initial refinement with multiple cycles. You get an arbitrarily fine line around your grain boundary this way.

permcody commented 8 years ago

💩 - @dschwen beat me by a fraction of a second

dschwen commented 8 years ago

More like a fraction of an hour (4 minutes).

j2bradley commented 8 years ago

Ok. @permcody I am trying to use GrainTextureVectorPostprocessor to pull information out of a uniform mesh that is generated from EBSD data. I can modify EBSDMesh for my own purposes so I can get a fine enough mesh without using adaptivity, but perhaps this is time to start looking into modifying GrainTextureVectorPostprocessor so it can handle mesh adaptivity.

permcody commented 8 years ago

Yes, time to move to the next level. Theoretically you could make EBSDMesh work with an even finer grid but it's going to really slow down your whole simulation. It's actually quite fine already and going finer is going to give you a lot of resolution inside of the grains where you don't need it.

j2bradley commented 8 years ago

Would you like me to open an issue to improve GrainTextureVectorPostprocessor and we can discuss a solution there?

permcody commented 8 years ago

Yes