[CIG-MC] varying thermal expansivity and diffusivity

tan2 tan2tan2 at gmail.com
Tue May 21 20:53:02 PDT 2013


Hi Robert,

The code can have depth-dependent thermal expansivity and heat capacity by
setting "reference_state=0". Please read the code in reference_state(),
Material_properties.c for more details.

The code doesn't have depth-dependent diffusivity, but it won't be
difficult to write. You'll need to uncomment the the codes about allocation
and input of E->refstate.thermal_conductivity in global_defs.h and
Material_properties.c first.

Then, add these lines in pg_solver(), Advection_diffusion.c

    for (m=1;m<=E->sphere.caps_per_proc;m++)
       for(el=1;el<=E->lmesh.nel;el++)    {
          int nz;
          double diff2;
          ....

          nz = ((el-1) % E->lmesh.elz) + 1;
          diff2 = diff * 0.5 * (E->refstate.thermal_conductivity[i+1] /
 (E->refstate.rho[i+1]*E->refstate.heat_capacity[i+1]) +
(E->refstate.thermal_conductivity[i] /
(E->refstate.rho[i]*E->refstate.heat_capacity[i]);
          pg_shape_fn(E, el, &PG, &(E->gNX[m][el]), VV, rtf, diff2, m);
          element_residual(E, el, &PG, &(E->gNX[m][el]), &(E->gDA[m][el]),
                           VV, T, Tdot,
                           Q0, Eres, rtf, diff2, E->sphere.cap[m].TB,
                           FLAGS, m);
          ....

Please test this code before using it. I can't guarantee it will work
correctly.


Eh Tan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://geodynamics.org/pipermail/cig-mc/attachments/20130522/de0cb7c2/attachment.html>


More information about the CIG-MC mailing list