# [petsc-users] From 1D to 3D problem ? Unstructured mesh ?

Christophe Ortiz christophe.ortiz at ciemat.es
Mon Feb 24 02:04:13 CST 2014

```On Sat, Feb 22, 2014 at 2:33 AM, Jed Brown <jed at jedbrown.org> wrote:

> Christophe Ortiz <christophe.ortiz at ciemat.es> writes:
>
> > Hi all,
> >
> > Recently I have implemented a 1D problem of coupled diffusion equations
> > using PETSc. I did it using finite differences for diffusion terms and
> > F(t,U,U_t) = 0. It works pretty well with ARKIMEX3. I get a nice timestep
> > variation and all boundary conditions work well.
> >
> > Now I would like to move to 3D problems to simulate the diffusion and
> > interaction of species in a "real material". By real material I mean a
> > material made of subregions with internal surfaces where species could
> > recombine (means Dirichlet). These subregions are distributed in a
> > complicated manner, ie not cartesian. A good picture of this would be a
> > polycrystal (see attachment to get an idea). Each crystal has a different
> > orientation and the boundary between two small crystals forms an internal
> > surface.
> >
> > I have several questions on how to implement this:
> >
> > 1) Since, the problem will not be solved in a cartesian mesh, should I
> use
> > unstructured meshes ? If so, how can this unstructured mesh can be
> > generated ( I have no experience with unstructured meshes. I always work
> in
> > 1D).
>
> Are you intending to mesh the boundaries of the crystals?  Will you be
> dynamically remeshing?  (That is very complicated and expensive in 3D.)
>
What formulation will you be using for grain boundary evolution?
>
>
No, in principle I will not consider the evolution of grains. Therefore, no
dynamic remershing (in principle).
What I want is just the evolution of diffusing and reacting species inside
the ensemble of grains, including their interaction with the grain
boundaries (trapping, segregation, ...).

> I think you should check out phase field models, such as the publication
> below.

I never used phase-field models. According to what I read, it can model
many phnomena but in particular it substitutes a boundary condition at an
interface by a PDE for the evolution of an auxiliary field (Wikipedia). In
this sense, maybe it could be interesting since I want to simulate the
evolution of species inside grains with many internal grain boundaries.
But I don't know if to treat a grain boundary as a infinitely sharp
interface or as a thin but finite piece of material with different
properties for species (diffusion coeff for instance).

>  Perhaps check out the paper below.  The framework (MOOSE) used
> for this publication should be released open source on github next week
> (check https://github.com/idaholab/).  I don't know if Marmot, the
> phase-field component, will be open source any time soon, but they are
> typically happy to collaborate.  MOOSE uses PETSc for solvers, but
> provides a higher level interface.
>
> @article{tonks2012object,
>   title={An object-oriented finite element framework for multiphysics
> phase field simulations},
>   author={Tonks, M.R. and Gaston, D. and Millett, P.C. and Andrs, D. and
> Talbot, P.},
>   journal={Computational Materials Science},
>   volume={51},
>   number={1},
>   pages={20--29},
>   year={2012},
>   publisher={Elsevier}
> }
>
>
Sorry, I could not download the article. We don't have access. Crisis in
Spain :-( !
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20140224/c5473eb2/attachment.html>
```