alealbanesi
Hello,
being a trained materials scientist and physicist myself, I can assure you, this is everything but an easy task. Furthermore, the basic example MTLP100a you mention is an example that does not do what you want. It aims only at the calculation of the composition, just like this example: https://github.com/emefff/Metallurgy-in-Salome-Meca-Code_Aster. This is an 'ok' example for a slightly advanced user of CA. The main problem here is to get and transform the materials data for your material, so CA can use it. The needed TTT data is often times not very precise, and CA needs to interpolate between the curves.
What you need, and frankly, this is above my horizon with Code_Aster, is an example that couples metallurgy and mechanics, to be more precise, a plastic material model (something like the HSNV examples). A simple elastic model won't do. The resulting stresses would be too high, because also in real materials, plastic material behaviour reduces stresses induced by quenching (in most steels that would be of course, the transformation to martensite during quenching). So, essentially, I imagine it being like this: depending on the phase percentage calculated you need something like a generated stress or volume expansion of your phase, and, if you are a materials scientist, you know: a typical volume expansion of 100% martensite (the phase known best by materials scientists in the world!) is between 2-4% in volume depending on the %C etc.
So the best known materials phase change has this fluctuation, I do not know what materials you want to calculate, but even if we know what example to adapt to your problem, my main question is: Do you have any material data of your specific material? Are you prepared to do a Chaboche or other complicated plastic material model in your simualtion? For example: if you do not have Chaboche coefficients (they are empirical values, the are not real material parameters!) of your material, are you prepared to do extensive material tests?
May I ask, out of interest, what material do you have in mind? If this is something for your studies at university, I understand the task. But if it is something for engineering, I suggest to only do this if the stresses are high and/or the part dimensions are enormous or the part is very complex. Metallurgical simulations with complex geometries (that need a lot of elements) have another drawback: the metallurgical part of the sim needs a lot of memory, because depending on the number of phases (in above link a vector with 9 dimensions) your vectors get very big and together with millions of DOFs... you get the idea....
Sorry, this is not very helpful but as I said, this is not easy. This is for real simulation experts only and I don't consider myself one of those.... I know a guy who did crack evolution in die-casting dies (the cracks in the die are caused by repeated rapid heating by the cast alloy and rapid cooling of the dies by spraying, so there's a cyclic component also; and it's VERY mesh dependent etc.) , but with Ansys and Chaboche. I took him months to get this right and he had a cluster at his hands......very difficult!
Mario.
EDIT: Maybe a workaround would be to introduce a volume expansion in your phase (phase maybe must then be also a separated volume like in inductive surface hardening; but I don't know what you want to do exactly) upon quenching. That would mean a different alpha-curve for cooling if this is possible. Maybe by defining two materials: one for heating and one for cooling. But I'm just dabbling.....