Numerical parameters

technical aspects of .dri file generation (e.g. debug mode ) etc...
Post Reply
jan
Posts: 74
Joined: Thu Jun 19, 2008 2:54 pm

Numerical parameters

Post by jan » Mon Jun 23, 2008 8:19 am

If someone wants to set up a new simulation with MICRESS, one of the typical problems is to find appropriate parameters. In addition to physical parameters there is a set of numerical parameters which strongly affect the numerical stability of a MICRESS simulation.
How to detect instabilities? In the worst case you can get a hard crash. If you run a Thermo-Calc coupled simulation it is most probable that the thermodynamic subroutines give errors or warnings due to unphysical variables which are created by instabilities. So there is normally no chance not to detect instabilities! Without coupling to thermodynamic data you can detect instabilities via "chess pattern" formation in the .conc or .driv output, by spreading of the interface reagion (.intf output) to values much bigger than the specified interface thickness, or by extreme slowing down of the simulation (check CPU time in the .TabL output).
The most critical parameters for numerical stability are the grid resolution and the interface mobility. Generally the grid resolution must be high enough to resolve the diffusion profiles, which are related to the diffusion coefficients and the growth velocity of the interface, and the curvature of the finest microstructures which are expected to form. On the other hand the interface mobility must be high enough to allow diffusion-controlled growth without slowing down the interface kinetically.
This in principle would mean, that using very high resolution and high interface mobilities would automatically result in stable simulations.Indeed this is true in most cases, but it is not practicable because it results in extremely high calculation times! For example, increasing grid resolution by a factor of 2 in a 2-dimensional simulation will result in a factor of 4 (8 for 3D) for the simulation time, if the simulation is limited by interface related load (high proportion of interface in the calculation domain), or by a factor of 16 (32 for 3D), if diffusion is time-limiting! Increasing the interface mobility proprotionally reduced the phase-field time step and thus increases the simulation time.

General advices for finding proper numerical parameters are the following:

- Try to use the smallest size of the simulation area which still represents your problem. After finding suitable parameters you can apply them to bigger domains or more complex problems.
- Reduce the problem to only one interface between two phases. Optimizing different phase interaction at a time will produce confusion!
- Use the automatic time stepping option to get rid of the time-step as an additional numerical parameter.
- Don't use physical parameters for optimizing numerical stability! If you do not know all of them make guesses and stick to them, until later by comparison of stable simulations to experimental data you can calibrate them.

Depending on whether you need quantitative or just qualitative results, and whether you can afford the high resolution you would need for complete resolution of the microstructure and the diffusion profiles, from my experience there are mainly three approaches:

a) Qualitative work:

Choose a resolution for which you have the feeling that you can afford (in terms of calculation time). Start with a guessed mobility value. If the simulation is crashing or shows instabilities, lower the mobility value until you get a stable run. Look at the .driv output to see whether the movement of the interface is strongly slowed down by the choice of your mobility ( http://board.micress.de/viewtopic.php?f=18&t=25 )! If that is the case, the grid resolution is not fine enough! Try again with a smaller value. On the other hand, if the simulation is running properly with your first guess of the mobility and resolution value, try to reduce the mobiltiy or increase grid spacing to make your simulation even faster.

b) Full resolution of the microstructure and diffusion profiles:

If you want to be sure that the choice of the grid resolution and interface mobility does not affect the results of your simulation, you need to quantitatively check the growth velocity of the interface. This can be easily done by plotting one of the phase fractions vs. time (.TabF output) or the temperature vs. time (.TabL), if you use release of latent heat. Then you can quantitatively check the growth kinetics for different parameter settings.
The way to proceed is the follwing: Start from a given grid resolution and systematically modify the interface mobility. You will experience that growth kinetics will get faster on increasing the interface mobility, as long as you are in the range of too low mobilities. If you further increase the interface mobility depending on the grid spacing you will get the following behaviour:

i) too big grid spacing: The growth rate of the interface will further increase until you end up in numerical instabilities
ii) grid spacing is small enough: The growth rate will reach a plateau and remain constant even for higher interface mobility values.

Once you observe such a plateau you can be sure that (at least from numerical reasons and assuming diffusion-limited growth!) your results are quantitative. Unfortunately there are only few cases where you can afford to solve your problem completely with that high resolution. In most cases you have to proceed to c).

c) Quantitative work without fully resolving microstructure and diffusion profiles

A way to get the right kinetics even if you cannot afford the high resolution you would need for fully resolving the microstructure and diffusion profiles is to use the interface mobility to calibrate the growth kinetics. This necessarily means that you need to know the exact kinetics for your process either from experiments or by getting it from a high resolution simulation via method b), using the smallest possible calculation domain which still represents your simulation problem.
Calibration is just done by variation of the interface mobility for the given (to big) value of the grid spacing and comparing (via .TabL or .TabF output) to the reference simulation (or experiment). This is not always possible if the morphology of the low-resolution simulation is very different to the real one. Then you should try to use additionally the averaging of the driving force across the interface to better match morphology ans such the kinetic transient of your interface growth. For this reason you can adjust the averaging length of the driving force seperately for each phase interaction. By this way in many cases you are able to perform low-resolution simulation without getting all microstructure details but with the appropriate growth kinetics.


As you see it is quite a bit of work to perform quantitative simulations with MICRESS, if there is no access to infinite computational power or if the problem is not extremely simple. But keep in mind that in many cases you may be just interested in knowing how a system reacts on changes of a physical parameter, or due to the lack of physical parameters you anyway need to calibrate your simulation to experimental results. Then it is often not necessary to perform a perfect adjustment of the transformation kinetics to get a valuable insight into the problem by simulation.

This methods an the approach to quantitative simulation is based on my personal experience and opinion. Other people involved in phase-field simulations may have different ideas. I would like to read your comments on that!


Bernd

---

original message from Bernd
Last edited by jan on Mon Jun 23, 2008 10:04 am, edited 1 time in total.

jan
Posts: 74
Joined: Thu Jun 19, 2008 2:54 pm

Re: Numerical parameters

Post by jan » Mon Jun 23, 2008 8:20 am

Sorry, the link was wrong!

Look here!: http://board.micress.de//viewtopic.php?f=18&t=25

---

original message from Bernd

Antoine
Posts: 7
Joined: Wed Jun 25, 2008 9:34 am

Re: Numerical parameters

Post by Antoine » Mon Jul 21, 2008 4:51 pm

Hello Bernd,

At the beginning of your post you mention that one should
use "very high resolution and high interface mobilities"
to get "stable simulations" and a little bit later you say
that "If the simulation is crashing or shows instabilities" one
should "lower the mobility value".... I guess that at
the beginning of the post you meant that a realistic simulation
is performed using a very large value of the interface mobility.
Unfortunately using high values for the mobility may leads
to instabilities and would also induce an increase of the CPU time
required. For that reason one has to find a proper
compromise for the mobility (realistic and/or achievable).

Bernd
Posts: 1505
Joined: Mon Jun 23, 2008 9:29 pm

Re: Numerical parameters

Post by Bernd » Wed Aug 06, 2008 3:59 pm

Hi Antoine,

I did not say that one "should" use very high resolution and high interface mobilities! I was just stating that if we could afford a very high resolution we would just have to set the mobility high enough and everything would be fine.
But in practically all cases we cannot afford such a high resolution, and we have to find a good compromise!

Nevertheless, you are right in the sense that even for very high resolution a too high mobility can create numerical instabilities. But, then, reducing the mobility will resolve the problem without affecting the results!

Bernd

Antoine
Posts: 7
Joined: Wed Jun 25, 2008 9:34 am

Mobility value?

Post by Antoine » Thu Aug 07, 2008 9:33 am

Hello,

In this topic we spoke mainly about the interface mobility,
and about the way one can adjust it if simulations are diverging...
However no tricks are provided when no experimental references
are available in the scientific literature.
And now comes my question: I would like to know what
kind of typical values could be used for a first guess (for
liquid/solid, liquid/intermetallics, solid/solid, ...)? Are there
any empirical rules for guessing such values?
Thank you!

Cheers

Antoine CARRE

Bernd
Posts: 1505
Joined: Mon Jun 23, 2008 9:29 pm

Re: Numerical parameters

Post by Bernd » Thu Aug 07, 2008 6:32 pm

Hi Antoine,

of course there is no general rule. If I start a new calculation in the field of solidification of metals, I start trying with about the following values:

interface mobility (cm4/(Js):
- solid liquid interface for solid solution phase (e.g. fcc-liq): 0.1-0.01
- solid-liquid interface for intermetallic phase (e.g. Mg2Si-liq): 1.E-5-1.E-6
- solid-solid interface without interstitial elements (e.g. fcc-Mg2Si): 1.E-8-1.E-11
- solid-solid interface with interstitial elements (e.g. fcc-bcc): 1.E-3-1.E-5

interfacial energy (J/cm2):
- metallic anisotropy: 1.E-5-1.E-6
- facetted anisotropy: 1.E-3-1.E-4

averaging length: 0.5
smooth: 45

This is only a rule of thumb and the values are meant just as inital start values for a proper optimisation/calibration if nothing is known about the system!

Bernd

Antoine
Posts: 7
Joined: Wed Jun 25, 2008 9:34 am

Some way of guessing the mobility value

Post by Antoine » Wed Aug 13, 2008 11:01 am

Hi

Some additional information.... according to Markus, another way to
guess the mobility (mue) can be derived from dimensional ([]) consideration.
The mobility in elementary units is: [mue]=[m]^4.[J]^-1.[s]^-1.
The diffusivity (D) in elementary units is defined: [D]=[m]^2.[s]^-1.
The surface energy (sigma) in elementary units is defined: [sigma]=[J].[m]^-2.
So one can infer a guess order of magnitude for the mobility: [mue]= [D]/[sigma].

Bye

Antoine

Post Reply