cell dimension

technical aspects of .dri file generation (e.g. debug mode ) etc...
Ulrike
Posts: 1
Joined: Tue May 19, 2009 3:43 pm

cell dimension

Post by Ulrike » Tue Jun 23, 2009 6:04 pm

Hi,

the number of cells does influence the calculation time. So assuming a given physical length that I want to model with Micress, what's the best way to find out which cell size is small enough to obtain correct results and still large enough to keep the calculation time to a minium?

Ulrike

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

Re: cell dimension

Post by Bernd » Tue Jun 23, 2009 7:08 pm

Hi Ulrike,

your statement is correct, the number of grid cells, i.e. the resolution for a given domain size, strongly affects the simulation time. Assuming that diffusion is the performance bottleneck, one can expect a factor of 16 in simulation time if the value of deltaX is divided by 2! Therefore it is very important to find the optimal resolution.

In general, the resolution is high enough if a small change in deltaX does not change the results. In order to make a systematic study it is important to reduce the problem (temporarily) to the smallest representative size (taking advantage of all possible symmetries). With this small domain size it should be possible to get down to the really high resolutions where the results do no longer depend on the resolution. For this test simulation, all critical physical parameters (diffusion coefficients, interfacial energies, eventually the interface mobility) must be already adjusted because they would change the results of our test. To quantify the differences one can chose e.g. the phase fraction of the growing phase or the temperature if latent heat is used.

The procedure would be the following: Starting from the highly resolved test simulation, one would increase stepwise deltaX and compare the chosen quantity vs. time (e.g. phase fraction) and observe from which deltaX on the results get substantially different. Then, one would go one step back and use the corresponding deltaX for the big simulation.

Unfortunately, in many cases we would still be in a deltaX range where performance is poor. Then we can go one step further: Typically, a too low resolution for a diffusion-limited phase transformation leads to an artificial solute trapping and increased front kinetics. To a certain degree, one can try to compensate for that by reducing the interface mobility. As long as the development of the phase fraction can be corrected this way, and the morphology is also retained (a different morphology earlier or later will also affect the fraction-time curve!), there is no reason not to do that!

If one is willing to invest even more calibration effort, one can use additional numerical parameters like the dG-options (averaging length etc.) to even better adjust to the correct interface kinetics and phase morphologies.

Related to that is also the choice of a reasonable value of the interface thickness. If performance is critical, one can go down to 3.5 cells without deteriorating the curvature evolution too much.

Of course, all these measures may decrease the exactness of the microstructure predictions for a given domain size. But, if due to the better performance a much bigger domain can be simulated, the exactness of the overall result may be increased!


Bernd

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

Re: cell dimension

Post by Bernd » Thu Jun 25, 2009 12:48 pm

Dear Ulrike,

You sent me a private e-mail with an attached image which could be interesting to other people in the forum. Therefore I want to show it here, with your explicite permission (by the way, attaching images to the forum is quite easy, you just click "upload attachment" below the text box and select the image file)!

Your comment was that the example (2d growth of an already existing quadratic ferrite grain into austenite) showed unreasonable results if you systematically change the resolution deltaX, the interface mobility and the interface thickness.

If you have a look on the graphs, the first (upper left) shows the variation of deltaX. As expected, the fraction ferrite-vs.-time curve is practically identical for the smallest values of deltaX (0.08, 0.1 and 0.15 micrometer). But further increasing the value of deltaX leads to unsystematic curves with a generally lower growth rate. A similar inconsistent result is obtained when the interface thickness is changed (see the two graphs at the bottom of the attached image).

I think, the first issue would be to make sure that there is no numerical problem which makes the results difficult to interpret. Thermodynamic coupling can introduce such problems if the system is complex or if the relinearisation scheme is not correctly defined. It would be interesting to see the concentration and driving force output to get an impression of the numerical situation.
For this calibration test I would recommend you either to use a quite high relinearisation frequency (<0.1 s) instead of a critical temperature deviation: Because new interface cells always get an updated thermodynamic description, changing resolution will also change the actuality of this description, if it is not updated very often any way.
Even better, you could (only for this test) use linearised data (which is not so bad as long as the simulation is isothermal). Then you would get rid of the influence of updating thermodynamic data and also of all possible numerical instability problems which can be linked to TQ-coupling. To do so, you can directly copy the linearisation output of a TQ-coupled simulation from the .log file into the new driving file and use the new linear_TQ option. Then you get 1:1 the same description as it has been calculated during initialisation of the TQ interaction.

At least, it seems, that below 0.15 micron resolution, the example is running stable...


Bernd
L_Front_interface.JPG
L_Front_interface.JPG (382.09 KiB) Viewed 10528 times
#
# Automatic 'Driving File' written out by MICRESS.
#
#
# Type of input?
# ==============
shell input
#
#
# MICRESS binary
# ==============
# version number: 5.408 (Windows)
# compiled: 04/03/2009
# ('single precision' binary)
# license expires in 7 days
#
#
# Language settings
# =================
# Please select a language: 'English', 'Deutsch' or 'Francais'
English
#
#
# Flags and settings
# ==================
#
# Geometry
# --------
# Grid size?
# (for 2D calculations: AnzY=1, for 1D calculations: AnzX=1, AnzY=1)
# AnzX:
150
# AnzY:
1
# AnzZ:
150
# Cell dimension (grid spacing in micrometers):
# (optionally followed by rescaling factor for the output in the form of '3/4')
0.15000000
#
# Flags
# -----
# Type of coupling?
# Options: phase concentration temperature temp_cyl_coord
# [stress] [stress_coupled] [flow]
...

Hamid
Posts: 15
Joined: Fri Feb 27, 2009 12:47 am

Re: cell dimension

Post by Hamid » Fri May 21, 2010 5:07 am

Dear Bernd,

Hope you are doing pretty well. I am facing problem with my pearlite to austenite simulation since I tried to resolve cementite lamellae. The smallest object in my simulation (cementite lamella thickness) is about 50nm and the interface thickness is 4deltaX. Carbon diffusion is involved too. Enclosed you can find the effect of changing the cell size on the volume fraction of austenite from pearlite. You can see that the results is really sensitive to the cell size even if I use 1.0 or 2.0 nm cell size!. I am not quite sure how far should I decrease the cell size to see stability in my calculations.

Thank you in advance,
Hamid
Attachments
Effect of cell size.tif
Effect of cell size.tif (65.31 KiB) Viewed 10475 times

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

Re: cell dimension

Post by Bernd » Sat May 22, 2010 11:38 am

Dear Hamid,

As you sent me the image also per mail I could have a look on it and see, that the transformation is getting slower more or less proportional to the resolution (maybe, you should try to inlude images directly into the text by using the Img button).
The usual effect why the resolution should affect the transformation kinetics is by artificial solute trapping which occurs if the interface thickness is not small enough compared to the diffusion length. This is important in the case of diffusion limited growth.
On the other hand, there may be effects which come from the extremely fine resolution and hence the high stabilisation barrier, if the transformation is not diffusion limited.

To find out where to look at please tell me

- whether the reaction is (intended to be) diffusion limited, and
- whether other (slow) elements than carbon are involved.


Janin is right now working on improvements of the discretisation of the interface profile. If resolution is extremely high, interface stabilisation could reduce the effective mobility if the interfacial energy is high, and interface deformation which is needed to create new interface cells is hindered. This slowing effect should get smaller when the interfacial energy is reduced or when the interface thickness (in cells) is increased. You could try whether this is true in your case.
If you are working with a given interface mobility which is limiting the transformation, it could be corrected for this effect. Janin is working on an improved MICRESS version which could also help.


Bernd

Hamid
Posts: 15
Joined: Fri Feb 27, 2009 12:47 am

Re: cell dimension

Post by Hamid » Thu May 27, 2010 8:57 pm

Dear Bernd,

My simulation only deals with carbon diffusion and the reaction meant to be diffusion control. The mobility values for austenite interfaces are chosen to be high enough for that purpose. The interfacial energies are all about 0.5J/m^2. I will send you a copy of my input file via email. I also have the same problem when I reduce interface thickness. There is no convergency and the volume fraction decreases while I reduce the interface thickness.
Do I need to play with automatic time stepping?


Best regards,
Hamid

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

Re: cell dimension

Post by Bernd » Mon May 31, 2010 5:45 pm

Dear Hamid,

Both pictures you sent me are showing the same tendency, namely the increase of the transformation rate with decreasing resolution:
Effect of cell size.gif
Effect of cell size.gif (9.85 KiB) Viewed 10426 times
Calibration (interface).gif
Calibration (interface).gif (9.46 KiB) Viewed 10425 times
I tried to run the driving file from you and could see, that the driving force of the austenite-ferrite interface most of the time is still quite high, so that the process probably is still far from being diffusion limited. So, I would guess that what you see is a mixture of both effects which I mentioned above: Solute trapping if the diffusion length is not much greater than the interface thickness, and artefacts with respect to the mobility of the interface or of the triple junction, if the interface thickness (in cells) is too small.

Unfortunately, the system is much too complex to really be sure with this analysis. You should also check whether the phase fractions of the initial structure can be really reproduced independently from the resolution and interface thickness, and whether the curvatures are correctly reproduced in all cases. Maybe, you should try to find out whether the differences in transformation rate are accompanied by some characteristic morphological differences which make it easier to reduce the number of possible effects.

Nevertheless, If my guess is correct and you see mainly the two effects as I said, the solution would be to fix the mobility problem by getting to the diffusion limit (then, the interface or triple junction mobility looses importance) and fix the trapping problem by calibration of the mobility. To do so, you should reduce the example to the smallest possible geometry with only one cementite lamella, chose a fairly small interface thickness of 4 or 5 cells and plot the austenite fraction versus the interface mobility. If the grid resolution is high enough you should find a saturation (plateau) which allows you to calibrate the mobility for simulations with less resolution.

Bernd

Hamid
Posts: 15
Joined: Fri Feb 27, 2009 12:47 am

Re: cell dimension

Post by Hamid » Tue Jun 01, 2010 4:06 am

Thank you Bernd,

Actually, I did similar sort of calculations for the following situation, a rim of austenite around carbide particle, below. Then I changed the mobility for austenite interfaces (both with ferrite and cementite) systematically and the results is shown below. As you can see in my simulation input file, I used mobility value of 10^-3 cm4/Js (10^-11 m4/Js) which is supposed to be in diffusion control regime. Now, I would do that for lamella geometry too to see the effect.
BTW, I finally managed to insert the pictures thanks to lower resolution gif/jpeg format. Thank you for the advise.

Best regards,
Hamid
cal-830-0.01.txt_phas_0s.gif
cal-830-0.01.txt_phas_0s.gif (2.26 KiB) Viewed 10423 times
Attachments
Mobility.jpg
Mobility.jpg (27.7 KiB) Viewed 10418 times

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

Re: cell dimension

Post by Bernd » Tue Jun 01, 2010 10:50 pm

Dear Hamid,

I think this test case is not really comparable, because there is no carbon diffusion through the ferrite phase! You should try to build up a small test with simular geometry and similar curvatures as in your lamellae example.

If you then also find such a plateau as you show (at high enough resolution), you got it! Then you just need to calibrate the mobility for lower resolution and you can get back to the bigger problem with several lamellae...

Bernd

Hamid
Posts: 15
Joined: Fri Feb 27, 2009 12:47 am

Re: cell dimension

Post by Hamid » Wed Jun 09, 2010 8:09 am

Dear Bernd,

I used small scale model to see diffusion controlled reaction and I came more or less to the same number of the mobility. Below you can see the simulation and the corresponding results. When, I look into the driving force values at the interfaces (ferrite/austenite and cementite/austenite), they are OK, but the values at triple junctions are very large (similar to what you saw in previous simulations). I am not quite sure whether or not this is a sign of wrong doing in simulation.

All the best,
Hamid
Mobility.gif
Mobility.gif (7.82 KiB) Viewed 10415 times
Attachments
0.001.gif
0.001.gif (48.46 KiB) Viewed 10407 times

Post Reply