def Conduction(self, dt, flx1, bc, temp2, flx2):
t = self.layerTemp          <EOL>hc = self.layerVolHeat      <EOL>tc = self.layerThermalCond  <EOL>d = self.layerThickness     <EOL>fimp = <NUM_LIT:0.5>                  <EOL>fexp = <NUM_LIT:0.5>                  <EOL>num = len(t)                <EOL>tcp = [<NUM_LIT:0> for x in range(num)]<EOL>hcp = [<NUM_LIT:0> for x in range(num)]<EOL>za = [[<NUM_LIT:0> for y in range(<NUM_LIT:3>)] for x in range(num)]<EOL>zy = [<NUM_LIT:0> for x in range(num)]<EOL>hcp[<NUM_LIT:0>] = hc[<NUM_LIT:0>] * d[<NUM_LIT:0>]<EOL>for j in range(<NUM_LIT:1>,num):<EOL><INDENT>tcp[j] = <NUM_LIT> / (d[j-<NUM_LIT:1>] / tc[j-<NUM_LIT:1>] + d[j] / tc[j])<EOL>hcp[j] = hc[j] * d[j]<EOL><DEDENT>za[<NUM_LIT:0>][<NUM_LIT:0>] = <NUM_LIT:0.><EOL>za[<NUM_LIT:0>][<NUM_LIT:1>] = hcp[<NUM_LIT:0>]/dt + fimp*tcp[<NUM_LIT:1>]<EOL>za[<NUM_LIT:0>][<NUM_LIT:2>] = -fimp*tcp[<NUM_LIT:1>]<EOL>zy[<NUM_LIT:0>] = hcp[<NUM_LIT:0>]/dt*t[<NUM_LIT:0>] - fexp*tcp[<NUM_LIT:1>]*(t[<NUM_LIT:0>]-t[<NUM_LIT:1>]) + flx1<EOL>for j in range(<NUM_LIT:1>,num-<NUM_LIT:1>):<EOL><INDENT>za[j][<NUM_LIT:0>] = fimp*(-tcp[j])<EOL>za[j][<NUM_LIT:1>] = hcp[j]/dt + fimp*(tcp[j]+tcp[j+<NUM_LIT:1>])<EOL>za[j][<NUM_LIT:2>] = fimp*(-tcp[j+<NUM_LIT:1>])<EOL>zy[j] = hcp[j]/dt * t[j] + fexp *(tcp[j]*t[j-<NUM_LIT:1>] - tcp[j]*t[j] - tcp[j+<NUM_LIT:1>]*t[j] + tcp[j+<NUM_LIT:1>]*t[j+<NUM_LIT:1>])<EOL><DEDENT>if self.is_near_zero(bc-<NUM_LIT:1.>): <EOL><INDENT>za[num-<NUM_LIT:1>][<NUM_LIT:0>] = fimp * (-tcp[num-<NUM_LIT:1>])<EOL>za[num-<NUM_LIT:1>][<NUM_LIT:1>] = hcp[num-<NUM_LIT:1>]/dt + fimp*tcp[num-<NUM_LIT:1>]<EOL>za[num-<NUM_LIT:1>][<NUM_LIT:2>] = <NUM_LIT:0.><EOL>zy[num-<NUM_LIT:1>] = hcp[num-<NUM_LIT:1>]/dt*t[num-<NUM_LIT:1>] + fexp*tcp[num-<NUM_LIT:1>]*(t[num-<NUM_LIT:2>]-t[num-<NUM_LIT:1>]) + flx2<EOL><DEDENT>elif self.is_near_zero(bc-<NUM_LIT>): <EOL><INDENT>za[num-<NUM_LIT:1>][<NUM_LIT:0>] = <NUM_LIT:0.><EOL>za[num-<NUM_LIT:1>][<NUM_LIT:1>] = <NUM_LIT:1.><EOL>za[num-<NUM_LIT:1>][<NUM_LIT:2>] = <NUM_LIT:0.><EOL>zy[num-<NUM_LIT:1>] = temp2<EOL><DEDENT>else:<EOL><INDENT>raise Exception(self.CONDUCTION_INPUT_MSG)<EOL><DEDENT>zx = self.invert(num,za,zy)<EOL>return zx<EOL>
Solve the conductance of heat based on of the element layers.
arg:
    flx1  : net heat flux on surface
    bc    : boundary condition parameter (1 or 2)
    temp2 : deep soil temperature (ave of air temperature)
    flx2  : surface flux (sum of absorbed, emitted, etc.)

key prop:
    za = [[ x00, x01, x02 ... x0w ]
          [ x10, x11, x12 ... x1w ]
                    ...
          [ xh0, xh1, xh2 ... xhw ]]

    where h = matrix row index    = element layer number
          w = matrix column index = 3