[cig-commits] r7972 - mc/3D/CitcomS/trunk/lib

tan2 at geodynamics.org tan2 at geodynamics.org
Fri Sep 14 16:11:46 PDT 2007


Author: tan2
Date: 2007-09-14 16:11:46 -0700 (Fri, 14 Sep 2007)
New Revision: 7972

Modified:
   mc/3D/CitcomS/trunk/lib/Advection_diffusion.c
Log:
Added the contribution of latent heat to the diffusion term

Modified: mc/3D/CitcomS/trunk/lib/Advection_diffusion.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Advection_diffusion.c	2007-09-14 23:11:27 UTC (rev 7971)
+++ mc/3D/CitcomS/trunk/lib/Advection_diffusion.c	2007-09-14 23:11:46 UTC (rev 7972)
@@ -625,10 +625,11 @@
 	for(i=1;i<=vpts;i++)
 	  Eres[j] -=
 	    PG.vpt[GNVINDEX(j,i)] * dOmega.vpt[i]
-	    * (dT[i] - heating + v1[i]*tx1[i] + v2[i]*tx2[i] + v3[i]*tx3[i])
- 	    + diff*dOmega.vpt[i] * (GNx.vpt[GNVXINDEX(0,j,i)]*tx1[i]*rtf[3][i] +
-				    GNx.vpt[GNVXINDEX(1,j,i)]*tx2[i]*sint[i] +
-				    GNx.vpt[GNVXINDEX(2,j,i)]*tx3[i] );
+              * (dT[i] - heating + v1[i]*tx1[i] + v2[i]*tx2[i] + v3[i]*tx3[i])
+              + diff * dOmega.vpt[i] * E->heating_latent[m][el]
+              * (GNx.vpt[GNVXINDEX(0,j,i)]*tx1[i]*rtf[3][i] +
+                 GNx.vpt[GNVXINDEX(1,j,i)]*tx2[i]*sint[i] +
+                 GNx.vpt[GNVXINDEX(2,j,i)]*tx3[i] );
       }
     }
 
@@ -636,7 +637,8 @@
       for(j=1;j<=ends;j++) {
 	Eres[j]=0.0;
 	for(i=1;i<=vpts;i++)
-	  Eres[j] -= PG.vpt[GNVINDEX(j,i)] * dOmega.vpt[i] * (dT[i] - heating + v1[i] * tx1[i] + v2[i] * tx2[i] + v3[i] * tx3[i]);
+	  Eres[j] -= PG.vpt[GNVINDEX(j,i)] * dOmega.vpt[i]
+              * (dT[i] - heating + v1[i]*tx1[i] + v2[i]*tx2[i] + v3[i]*tx3[i]);
       }
     }
 



More information about the cig-commits mailing list