Let G be a semidirect product of finitely generated Abelian groups. We provide a method for constructing an explicit contraction (special homotopy equivalence) from the reduced bar construction of the group ring of G, B(Z Z[G]), to a much smaller DGA-module hG. Such a contraction is called a homological model for G and is used as the input datum in the methods described in Álvarez et al. (J Symb Comput 44:558-570, 2009;2012) for calculating a generating set for representative 2-cocycles and n-cocycles over G, respectively. These computations have led to the finding of new cocyclic Hadamard matrices (Álvarez et al. in 2006).