Hi Robert,<br><br>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.<br><br>
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.<br>
<br>Then, add these lines in pg_solver(), Advection_diffusion.c<br><br><span style="font-family:tahoma,sans-serif">    for (m=1;m<=E->sphere.caps_per_proc;m++)<br>       for(el=1;el<=E->lmesh.nel;el++)    {<br>
          int nz;<br>          double diff2;<br>          ....<br><br>          nz = ((el-1) % E->lmesh.elz) + 1;<br>          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]);           <br>
          pg_shape_fn(E, el, &PG, &(E->gNX[m][el]), VV, rtf, diff2, m);<br>          element_residual(E, el, &PG, &(E->gNX[m][el]), &(E->gDA[m][el]),<br>                           VV, T, Tdot,<br>
                           Q0, Eres, rtf, diff2, E->sphere.cap[m].TB,<br>                           FLAGS, m);<br></span>          ....<br><br>Please test this code before using it. I can't guarantee it will work correctly.<br>
<br><br>Eh Tan<br>