CMSX4:Simulation Error

solid-solid phase transformations, influence of stresses and strains
Aishwarya
Posts: 1
Joined: Fri Feb 03, 2017 11:09 am
anti_bot: 333

CMSX4:Simulation Error

Post by Aishwarya » Fri Feb 03, 2017 11:57 am

Hi,
I was trying to run the CMSX4 example with a newly generated GES file wherein I used the updated thermodynamic database TTNI8 and mobility database MOBNI4 and the same components for generating the file. However, on inputting the GES file name and changing the code to
Code Change:
# How shall diffusion of component 1 in phase 0 be solved?
1 0 diagonal g
# How shall diffusion of component 2 in phase 0 be solved?
2 0 diagonal g
# How shall diffusion of component 3 in phase 0 be solved?
3 0 diagonal g
# How shall diffusion of component 4 in phase 0 be solved?
4 0 diagonal g
# How shall diffusion of component 5 in phase 0 be solved?
5 0 diagonal g
# How shall diffusion of component 6 in phase 0 be solved?
6 0 diagonal g
# How shall diffusion of component 7 in phase 0 be solved?
7 0 diagonal g
# How shall diffusion of component 8 in phase 0 be solved?
8 0 diagonal g
# How shall diffusion of component 9 in phase 0 be solved?
9 0 diagonal g
# How shall diffusion of component 1 in phase 1 be solved?
1 1 multi ggggggggg
# How shall diffusion of component 2 in phase 1 be solved?
2 1 multi ggggggggg
# How shall diffusion of component 3 in phase 1 be solved?
3 1 multi ggggggggg
# How shall diffusion of component 4 in phase 1 be solved?
4 1 multi ggggggggg
# How shall diffusion of component 5 in phase 1 be solved?
5 1 multi ggggggggg
# How shall diffusion of component 6 in phase 1 be solved?
6 1 multi ggggggggg
# How shall diffusion of component 7 in phase 1 be solved?
7 1 multi ggggggggg
# How shall diffusion of component 8 in phase 1 be solved?
8 1 multi ggggggggg
# How shall diffusion of component 9 in phase 1 be solved?
9 1 multi ggggggggg
end_diffusion_data

Running the MICRESS code shows a simulation error as
Error:
==================================================

Time t = 0.0000000 s
CPU-time: 18 s
Current phase-field solver time step = 3.21E-05 s
Temperature at the bottom = 1652.0 K
Temperature gradient = 0.00000 K/cm
Fraction of phase 0: 1.00000
Fraction of phase 1: 0.00000
Fraction of phase 2: 0.00000
Updating of diffusion data from database...

Grain 5 reaches full size at t = 1.3973E-02 s

Grain 1 reaches full size at t = 1.5341E-02 s

Grain 2 reaches full size at t = 1.5341E-02 s

Grain 3 reaches full size at t = 1.5341E-02 s

Grain 4 reaches full size at t = 1.5341E-02 s

Grain 6 reaches full size at t = 1.5341E-02 s

Grain 7 reaches full size at t = 1.5341E-02 s

Grain 8 reaches full size at t = 1.5341E-02 s

Grain 9 reaches full size at t = 1.5341E-02 s

Grain 10 reaches full size at t = 1.5341E-02 s

Grain 11 reaches full size at t = 1.5341E-02 s

Grain 12 reaches full size at t = 1.5341E-02 s

Grain 13 reaches full size at t = 1.5341E-02 s

Grain 14 reaches full size at t = 1.5341E-02 s

Intermediate output for t = 2.0000 s
CPU-time: 7644 s
Current phase-field solver time step = 1.00E-01 s
Average conc. of comp. 1 = NaN, Variation = NaN wt%
Average conc. of comp. 2 = NaN, Variation = NaN wt%
Average conc. of comp. 3 = NaN, Variation = NaN wt%
Average conc. of comp. 4 = NaN, Variation = NaN wt%
Average conc. of comp. 5 = NaN, Variation = NaN wt%
Average conc. of comp. 6 = NaN, Variation = NaN wt%
Average conc. of comp. 7 = NaN, Variation = NaN wt%
Average conc. of comp. 8 = NaN, Variation = NaN wt%
Average conc. of comp. 9 = NaN, Variation = NaN wt%
Temperature at the bottom = 1650.7 K
Temperature gradient = 0.00000 K/cm
complete relinearisation!
trying hard phases 0 1 level: 4 zp= 1010 error= 3
trying harder! Error = 3
trying hard phases 0 1 level: 4 zp= 169439 error= 3
trying harder! Error = 3
trying hard phases 0 1 level: 4 zp= 443914 error= 3
trying harder! Error = 3
trying hard phases 0 1 level: 4 zp= 343887 error= 3
trying harder! Error = 3
trying hard phases 0 1 level: 4 zp= 516331 error= 3
trying harder! Error = 3
trying hard phases 0 1 level: 4 zp= 70414 error= 3
trying harder! Error = 3
trying hard phases 0 1 level: 4 zp= 243860 error= 3
trying harder! Error = 3
trying hard phases 0 1 level: 4 zp= 417306 error= 3
trying harder! Error = 3
trying hard phases 0 1 level: 4 zp= 161221 error= 3
trying harder! Error = 3
trying hard phases 0 1 level: 4 zp= 334467 error= 3
trying harder! Error = 3
trying hard phases 0 1 level: 4 zp= 507713 error= 3
trying harder! Error = 3
trying hard phases 0 1 level: 4 zp= 434840 error= 3
trying harder! Error = 3
trying hard phases 0 1 level: 4 zp= 60848 error= 3

and the same goes on for other phases. Can someone please explain what this error is about and what can I do to avoid it?

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

Re: CMSX4:Simulation Error

Post by Bernd » Fri Feb 03, 2017 7:03 pm

Dear Aishwarya,

Welcome to the MICRESS forum.

It seems that the problem comes from the change of the .GES5 file which you created. You write that you combined the TTNI8 and the MOBNI4 databases when creating this file. This is not allowed because these databases are incompatible. MOBNI1 has been designed to be compatible to Thermotech TTNI Databases, while MOBNI2-4 are compatible to Thermo-Calc's TCNI databases. So, please use MOBNI1 together with TTNI8 for your purposes.
Unfortunately, it is difficult to catch such compatibility issues inside MICRESS because they occur inside the Thermo-Calc libraries and are furthermore platform dependent. The incompatibilities of the databases leads to calculation of wrong diffusivity values (probably NaN, you can check in .diff output) which create NaN values for concentrations.
Apart from that, you should check whether the order of phases is the same as in the standard .GES file. You can find that in the "Phase diagram - input data" section of the input file:

...
# The database contains 4 phases:
# 1: FCC_A1
# 2: FCC_L12
# 3: LAVES
# 4: LIQUID
# Specify relation between phase indices Micress -> TC!
# The matrix phase has in MICRESS the index 0
# Thermo-Calc index of the (MICRESS) phase 0?
4
# Thermo-Calc index of the (MICRESS) phase 1?
1
# Thermo-Calc index of the (MICRESS) phase 2?
2
# 0 -> LIQUID
# 1 -> FCC_A1
# 2 -> FCC_L12
...

They could be changed in case you included additional phases into the .GES5 file, or as consequence of a different default ordering in the database (.tdb file). In that case you need to adjust the relations between phase indices in MICRESS and the .GES-file.

Best wishes

Bernd

Sudhee
Posts: 23
Joined: Tue Mar 28, 2017 7:33 pm
anti_bot: 333

Re: CMSX4:Simulation Error

Post by Sudhee » Wed Oct 25, 2017 10:14 am

Dear Bernd,
I have a similar issue. The diffusion coefficients suddenly go into negative values and I see this error (NaN).

Intermediate output for t = 30.000 s
CPU-time: 3644 s
Current phase-field solver time step = 1.00E+00 s
Average conc. of comp. 1 = NaN, Variation = NaN at%
Average conc. of comp. 2 = 4.5199871, Variation = -0.0000129 at%
Average conc. of comp. 3 = NaN, Variation = NaN at%
Temperature at the bottom = 773.00 K
Temperature gradient = 0.00000 K/cm
[/i]

This problem started when I introduced 'Si' into my system.
I have sent you a personal message with the .log file and also TabD file for your reference. I couldn't find what's going wrong with my file. Could you please help me.

Best regards,
Sudhindra.

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

Re: CMSX4:Simulation Error

Post by Bernd » Wed Oct 25, 2017 4:09 pm

Dear Sudhindra,

for me it looks like if you get some numerical problems which cause the negative diffusion coefficient of Si at 27s. This easily leads to negative concentrations after short time. If you check the .diff output you will probably see that there are variations of the phase composition which produce the negative diffusivity, i.e. there must exist some type of instability before which needs to be resolved. What seems strange to me is that you use an extremely small value for the interface mobility which is essentially 0, so you keep the interfaces fixed and only allow for diffusion. In general, I think, it would make sense to use the full diffusion matrices for both phases in this case (keyword "multi") as strong cross diffusion effects can be expected between C and Si.
To find out what is the reason I would need more information. The best would be you send me the complete set of input files (including .ges5 and .korn for the initial microstructure) so that I can try myself.

Bernd

Sudhee
Posts: 23
Joined: Tue Mar 28, 2017 7:33 pm
anti_bot: 333

Re: CMSX4:Simulation Error

Post by Sudhee » Wed Oct 25, 2017 8:02 pm

Dear Bernd,
Thank you for the response. True, for now, I am trying to keep the interfaces stable and only allowing diffusion of elements. Attached are the .korn and .GES5 files. I have already sent you the input file (in.txt). Please, let me know if you need any further information.
Thank you.

Best regards,
Sudhindra.
Attachments
Fe-C-Mn-Si.GES5
(48.49 KiB) Downloaded 242 times
Aust_Mart_75_25_initial_in_korn.txt
(694.1 KiB) Downloaded 260 times

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

Re: CMSX4:Simulation Error

Post by Bernd » Thu Oct 26, 2017 12:48 am

Dear Sudhindra,

I found two reasons for the instabilities. The first is obvious: You should have seen the warnings like

Warning: Demixing in interface FCC_A1/BCC_A2, component C
Warning: Demixing in interface FCC_A1/BCC_A2, component SI


Those should not be ignored, the remedy is explained here:

# Phase diagram - input data
# ==========================
#
# List of phases and components which are stoichiometric:
# phase and component(s) numbers
# List of concentration limits (at%):
# <Limits>, phase number and component number
# List for ternary extrapolation (2 elements + main comp.):
# <interaction>, component 1, component 2
# Switches: <stoich_enhanced_{on|off}> <solubility_{on|off}>
# End with 'no_more_stoichio' or 'no_stoichio'
interaction
no_stoichio
#


The second problem seems to come from the nple model which depends on the moving direction of the interface. In your case, this direction is ill-defined because of the low mobility of the interface and the constant temperature.
This leads to a continuous direction change and bears the risk of numerical issues.
A workaround here would be to change the criterion for the moving direction from average_velocity to bottom_temperature

# Please specify a criterion for the direction
# of the direction of the redistribution model:
# Options: local_velocity average_velocity bottom_temperature
bottom_temperature


and include a very small cooling or heating rate which is only numerically relevant to determine the moving direction:

# Cooling rate? [K/s]
0.00001


I hope this helps...

Bernd

Sudhee
Posts: 23
Joined: Tue Mar 28, 2017 7:33 pm
anti_bot: 333

Re: CMSX4:Simulation Error

Post by Sudhee » Thu Oct 26, 2017 9:31 pm

Dear Bernd,
Thank you for the suggestions. I implemented this kind of changes earlier, but still, it shows the same error.
Is it because of the relinearization interval of the phase diagram? I have set that to be 0.5s, is it too small and leading to this kind of error?

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

Re: CMSX4:Simulation Error

Post by Bernd » Thu Oct 26, 2017 11:56 pm

Dear Sudindra,

for me it works fine after having changed these two things. However, I also did never see the problem with the negative diffusion coefficient - perhaps you have a different problem which I don't have...

Maybe, in your case it is like for Aishwarya the specific combination of thermodynamic data, mobility data, and TQ-version. Which versions of thermodynamic and diffusion data did you combine?

Bernd

Sudhee
Posts: 23
Joined: Tue Mar 28, 2017 7:33 pm
anti_bot: 333

Re: CMSX4:Simulation Error

Post by Sudhee » Fri Oct 27, 2017 12:50 pm

Dear Bernd,
I use Thermocalc-2016a and TCFE8 database and Mob2 for diffusion data.

Can I know which ones did you use?

Best regards,
Sudhindra.

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

Re: CMSX4:Simulation Error

Post by Bernd » Fri Oct 27, 2017 4:38 pm

Dear Sudhindra,

I can tell you that the MOB2 is definitively not the best choice (don't you have one of the MOBFEx databases which are newer?).
However, even with your chosen combination I cannot reproduce your problem. There are some error messages which come from the extreme off-equilibrium conditions which you have chosen, but no negative diffusivities! I also find it strange that the problem occurred only after 27 sec...

Can you please send the complete screen output (.scr), inut file (.in), log-file (.log), linearisation output (.TabLin) and diffusion coefficient outputs (.TabD, .diff) of a simulation which crashed in this way (please use my "bottom_temperature" trick and diagonal extrapolation ("interaction")?

Bernd

Post Reply