[cig-commits] r8163 - mc/3D/CitcomS/trunk/lib
tan2 at geodynamics.org
tan2 at geodynamics.org
Mon Oct 22 12:02:29 PDT 2007
Author: tan2
Date: 2007-10-22 12:02:29 -0700 (Mon, 22 Oct 2007)
New Revision: 8163
Modified:
mc/3D/CitcomS/trunk/lib/Advection_diffusion.c
mc/3D/CitcomS/trunk/lib/Phase_change.c
Log:
Added some comments
Modified: mc/3D/CitcomS/trunk/lib/Advection_diffusion.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Advection_diffusion.c 2007-10-22 18:04:57 UTC (rev 8162)
+++ mc/3D/CitcomS/trunk/lib/Advection_diffusion.c 2007-10-22 19:02:29 UTC (rev 8163)
@@ -614,6 +614,7 @@
if(E->control.disptn_number == 0)
heating = rho * Q;
else
+ /* E->heating_latent is actually the inverse of latent heating */
heating = (rho * Q - E->heating_adi[m][el] + E->heating_visc[m][el])
* E->heating_latent[m][el];
Modified: mc/3D/CitcomS/trunk/lib/Phase_change.c
===================================================================
--- mc/3D/CitcomS/trunk/lib/Phase_change.c 2007-10-22 18:04:57 UTC (rev 8162)
+++ mc/3D/CitcomS/trunk/lib/Phase_change.c 2007-10-22 19:02:29 UTC (rev 8163)
@@ -170,6 +170,9 @@
for(i=1;i<=E->lmesh.nno;i++) {
nz = ((i-1) % E->lmesh.noz) + 1;
dz = (E->sphere.ro-E->sx[m][3][i]) - depth;
+ /*XXX: dz*rho[nz]*g[nz] is only a approximation for the reduced
+ * pressure, a more accurate formula is:
+ * integral(rho(z)*g(z)*dz) from depth_ph to current depth */
e_pressure = dz * E->refstate.rho[nz] * E->refstate.gravity[nz]
- clapeyron * (E->T[m][i] - transT);
More information about the cig-commits
mailing list