code: def _t_update_b(self):
          r
          network = self.project.network
          phase = self.project.phases()[self.settings['phase']]
          Vi = network['pore.volume']
          dt = self.settings['t_step']
          s = self.settings['t_scheme']
          if (s == 'implicit'):
              f1, f2, f3 = 1, 1, 0
          elif (s == 'cranknicolson'):
              f1, f2, f3 = 0.5, 1, 0
          elif (s == 'steady'):
              f1, f2, f3 = 1, 0, 1
          x_old = self[self.settings['quantity']]
          b = (f2*(1-f1)*(-self._A_steady)*x_old +
               f2*(Vi/dt)*x_old +
               f3*np.zeros(shape=(self.Np, ), dtype=float))
          self._update_physics()
          for item in self.settings['sources']:
              Ps = self.pores(item)
              # Update b
              b[Ps] = b[Ps] - f2*(1-f1)*(phase[item+'.'+'rate'][Ps])
          self._b = b
          return b
docs: r"""
          A method to update 'b' array at each time step according to
          't_scheme' and the source term value