Changeset 454

Show
Ignore:
Timestamp:
03/20/2009 08:47:22 AM (3 years ago)
Author:
powell
Message:

New square interaction parameters.

Location:
trunk/matml/src/ternary
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/matml/src/ternary/freenergy.c

    r449 r454  
    7373    + eparams->Omega123*C1*C2*C3; 
    7474 
     75  /* This also includes "square" terms. */ 
     76  ret += eparams->Omega234*C2*C3*(1.-C2) + eparams->Omega235*C2*C3*(1.-C3) + 
     77    eparams->Omega245*C2*(1.-C2)*(1.-C3) + eparams->Omega345*C3*(1.-C2)*(1.-C3) 
     78    + eparams->Omega2345*C2*C3*(1.-C2)*(1.-C3); 
     79 
     80  /* And this folds in the Gaussians +*/ 
    7581  for (i=0; i<eparams->n_gauss; i++) 
    7682    ret += (eparams->gauss) [i].G * 
     
    136142    + eparams->Omega123*(C1-C2)*C3; 
    137143 
     144  ret += eparams->Omega234*C3*(1.-2.*C2) + eparams->Omega235*C3*(1.-C3) 
     145    + eparams->Omega245*(1.-2.*C2)*(1.-C3) - eparams->Omega345*C3*(1.-C3) 
     146    + eparams->Omega2345*C3*(1.-2.*C2)*(1.-C3); 
     147 
    138148  for (i=0; i<eparams->n_gauss; i++) 
    139149    ret -= 2. * (eparams->gauss) [i].G * (C2-(eparams->gauss) [i].C2) 
     
    193203    + eparams->Omega123*(C1-C3)*C2; 
    194204 
     205  ret += eparams->Omega234*C2*(1.-C2) + eparams->Omega235*C2*(1.-2.*C3) 
     206    - eparams->Omega245*C2*(1.-C2) + eparams->Omega345*(1.-C2)*(1.-2.*C3) 
     207    + eparams->Omega2345*C2*(1.-C2)*(1.-2.*C3); 
     208 
    195209  for (i=0; i<eparams->n_gauss; i++) 
    196210    ret -= 2. * (eparams->gauss) [i].G * (C3-(eparams->gauss) [i].C3) 
     
    248262                  + ((C2>=1.) ? LOCAL_INFINITY : eparams->S4/(1.-C2))) 
    249263    - eparams->Omega12*2 - eparams->Omega123*2*C3; 
     264 
     265  ret += - eparams->Omega234*C3*2. - eparams->Omega245*2.*(1.-C3); 
     266    - eparams->Omega2345*2.*C3*(1.-C3); 
     267 
    250268 
    251269  for (i=0; i<eparams->n_gauss; i++) 
     
    307325    - eparams->Omega13*2 - eparams->Omega123*2*C2; 
    308326 
     327  ret += - eparams->Omega235*C2*2. - eparams->Omega345*(1.-C2)*2. 
     328    - eparams->Omega2345*2.*C2*(1.-C2); 
     329 
    309330  for (i=0; i<eparams->n_gauss; i++) 
    310331    ret += 2. * (eparams->gauss) [i].G 
     
    363384    - eparams->Omega12 - eparams->Omega13 + eparams->Omega23 
    364385    + eparams->Omega123*(2*C1-1); 
     386 
     387  ret += eparams->Omega234*(1.-2.*C2) + eparams->Omega235*(1.-2.*C3) 
     388    - eparams->Omega245*(1.-2.*C2) - eparams->Omega345*(1.-2.*C3) 
     389    + eparams->Omega2345*(1.-2.*C2)*(1.-2.*C3); 
    365390 
    366391  for (i=0; i<eparams->n_gauss; i++) 
  • trunk/matml/src/ternary/square.c

    r452 r454  
    3838  energy_gaussian species = { "Species 0.8 0.8", .8, .8, -.2, .1, 2. }; 
    3939  energy_params /* Solid, liquid */ 
    40     eparams0 = {"Solid", 1.,1., 0.,-.1,-.2, -1.,-1.1,-1.2, 0.,1.,1.,1.,1., -.5,2.,.2, 0., &species,1}, 
    41     eparams1 = {"Liquid", 1.,1., .3,.1,-.1, -2.2,-2.,-1.8, 0.,1.,.67,1.,2., -.3,-.4,-.1, -.5, NULL,0}, 
     40    eparams0 = {"Solid", 1.,1., 0.,-.1,-.2, -1.,-1.1,-1.2, 0.,1.,1.,1.,1., 
     41                -.5,2.,.2, 0.,-.1,-.2,.1,.2,-.1, &species,1}, 
     42    eparams1 = {"Liquid", 1.,1., .3,.1,-.1, -2.2,-2.,-1.8, 0.,1.,.67,1.,2., 
     43                -.3,-.4,-.1, 0.,-.1,-.15,-.05,0.,.3, NULL,0}, 
    4244      allparams[2] = {eparams0, eparams1}; 
    4345 
  • trunk/matml/src/ternary/ternary.c

    r452 r454  
    3737  /* eparams: R,T0, G1@T0,G2,G3, C1,C2,C3, M1,M2,M3, O12,O13,O23,O123 */ 
    3838  energy_params /* Solid, liquid */ 
    39     eparams0 = {"Solid", 1.,1., 0.,-.1,-.2, -1.,-1.1,-1.2, 1.,.5,.2,0.,0., -.5,2.,.2, 0., NULL,0}, 
    40     eparams1 = {"Liquid", 1.,1., .3,.1,-.1, -2.2,-2.,-1.8, 1.,1.,.67,0.,0., -.3,-.4,-.1, -.5, NULL,0}, 
     39    eparams0 = {"Solid", 1.,1., 0.,-.1,-.2, -1.,-1.1,-1.2, 1.,.5,.2,0.,0., 
     40                -.5,2.,.2, 0.,0.,0.,0.,0.,0., NULL,0}, 
     41    eparams1 = {"Liquid", 1.,1., .3,.1,-.1, -2.2,-2.,-1.8, 1.,1.,.67,0.,0., 
     42                -.3,-.4,-.1, -.5,0.,0.,0.,0.,0., NULL,0}, 
    4143      allparams[2] = {eparams0, eparams1}; 
    4244 
  • trunk/matml/src/ternary/ternary.h

    r451 r454  
    105105  double Omega23;  /*+ Species 2-3 regular solution interaction parameter +*/ 
    106106  double Omega123; /*+ Species 1-2-3 regular solution interaction parameter +*/ 
     107  double Omega234; /*+ Species 2-3-4 regular solution interaction parameter +*/ 
     108  double Omega235; /*+ Species 2-3-5 regular solution interaction parameter +*/ 
     109  double Omega245; /*+ Species 2-4-5 regular solution interaction parameter +*/ 
     110  double Omega345; /*+ Species 3-4-5 regular solution interaction parameter +*/ 
     111  double Omega2345;/*+ Species 2-3-4-5 regular solution interaction parameter+*/ 
    107112  energy_gaussian *gauss; /*+ Array of Gaussian energy parameter structs +*/ 
    108113  int n_gauss;     /*+ Number of Gaussian energy terms +*/