Application of the aquifer's average characteristics for determining the onset of thermohaline convection in a heterogeneous aquifer