ufsowa / mcdif

Monte Carlo based alghoritms used to simulate thermodynamic and kinetic properties of the alloys
3 stars 4 forks source link

Time for equlibrate #38

Closed ufsowa closed 7 years ago

ufsowa commented 7 years ago

Include inertia time of equilibration. Actually, diffusion take place in equilibrium conditions. Equilibrium is very fast te << tj. Which is proportional to Darken relation for interdiffusion.

Base on EVENTS I can have time for a jump tj.

How to define time of equilibration te?

Time for plastic flow is define as a ds = exp(-t/tau_p). Relaxation of mechanical strains in crystal occurs with relaxation time tau_p.

Similar relation can be proposed for time of equlibration of vacancies. dV = exp(-t/tau_e) What does it mean?

Here, t is a total time which is a sum of tj: t = sum(tj)

Another thing is a situation where we change a temperature. Then system should react on this change with some relaxation time.

What is a situation with LRO. I just allow atom to jumps. I It will be a similar situation where the change of LRO occure togeather with change of vacancy concentration.

How in this case define tau_e? It must depends on t and tau :interrobang:

Proposition 1:

1) Calculate total time of simulation t. ( at the beggining t=0 );
2) Calculate propability of equlibration Pe and probability of a jump Pj.
          But I do not know what is Pj. I know what is time of this jump tj.
3) Choose random number R = <0,1)
4) If R < Pe then do equlibration. Else do the jump.
5) Increase total time: t=t+tj.

How it looks in reality? Within time tj, spcific number of equlibration events will occure. How to calculate what number of eq. events happans within time tj? From decay relation dC = exp(-t/tau_e)

Proposition 1:

1) Calculate total time of simulation t. ( at the beggining t=0 );
2) Calculate number of eq. events Ne. 
3) Perform Ne equlibrateion events.
5) Increase total time: t=t+tj.

C.B.D.

Total time can be monitored in opcja. Neq can be also calculated in opcja

ufsowa commented 7 years ago

How to define tau_e? In case of present simulation it can be a constant. With this constant you are able to control rate of equilibration. So this is answer for the question how often do the equilibration.

But now, qestion is how to choose which eq. event will take place? Actually all eq. events are performed within time 0. Now I should choose eq. event from the list of eq. events. But I do not need "real" time for this process. Because this time is limited be decay relation. So I can randomly choose eq. event from events -> Metropoli alghoritm.

Problem is to build a list of eq. events.

What is a eq. event?

ufsowa commented 7 years ago

Eq. event is a creation/anihilation (dislocation movement).

Now, equlibration can take place after every jump. At the begginig of RTA step equlibration function is executed. Or even more precislly. After building EVENT list, time calculation, execute equlibration function.

1) Check system and find where vacancy must be added or removed - bulid eq. Events.
     eq. events is a list of vacancies and atoms which must be removed.
2) Choose in while loop Neq number of eq. events.
    2a) For atom do the dislocation movement.
3) Finish equlibration and back to RTA.

Number of EVENTs is changed after equlibration. Time is changed. So it is better idea to execute equilibration function after the jump in RTA.

ufsowa commented 7 years ago

Consequences for efficiency?

Imagine that you have too many vac. in the system Nv. You now what is Nv_eq, then: Nv(t) = (Nv-Nv_eq)exp(-t/tau_e) + Nv_eq Neq = Nv(0) - Nv(t) Neq = Nv - (Nv-Nv_eq)exp(-t/tau_e) + Nv_eq Neq = (1 - exp(-t/tau_e))(Nv - Neq)

What else? In general Nv and Neq depends on x. So, I must check every plane x and for every plane count total eq. events TNeq according to local difference of Nv - Neq Then from eq. events, choose TNeq events.

Futher more Neq can be negative when Nv < Neq (adding vacancy). So I must use absolute value: Neq = abs ((1 - exp(-t/tau_e))(Nv - Neq))

ufsowa commented 7 years ago

Up to now,

Now, if tau_eq is large, then small number of eq. event is allowed. It can happen that after jump just calculation will be performed and no equilibration will occur.

If tau_eq is small, execute steps 1-4, then execute dislocation movement. All eq. event can be performed.

Steps 1-4 increase simulation time.

ufsowa commented 7 years ago

What more? Nv changes with time t. This Neq = abs (Nv - N_eq - exp(-t/tau_e)(Nv - Neq)) is for Nv at the beginning t=0.