We present two-dimensional simulations of chemotactic self-propelled bacteria swimming ina viscous fluid. Self-propulsion is modelled by a couple of forces of same intensity andopposite direction applied on the rigid bacterial body and on an associated region in thefluid representing the flagellar bundle. The method for solving the fluid flow and themotion of the bacteria is based on a variational formulation written on the whole domain,strongly coupling the fluid and the rigid particle problems: rigid motion is enforced bypenalizing the strain rate tensor on the rigid domain, while incompressibility is treatedby duality. This model allows to achieve an accurate description of fluid motion andhydrodynamic interactions in moderate to concentrated active suspensions. A mesoscopicmodel is also used, in which the size of the bacteria is supposed to be much smaller thanthe elements of fluid: the perturbation of the fluid due to propulsion and motion of theswimmers is neglected, and the fluid is only subjected to the buoyant forcing induced bythe presence of the bacteria, which are denser than the fluid. Although this model doesnot accurately take into account hydrodynamic interactions, it is able to reproducecomplex collective dynamics observed in concentrated bacterial suspensions, such asbioconvection. From a mathematical point of view, both models lead to a minimizationproblem which is solved with a standard Finite Element Method. In order to ensurerobustness, a projection algorithm is used to deal with contacts between particles. Wealso reproduce chemotactic behaviour driven by oxygen: an advection-diffusion equation onthe oxygen concentration is solved in the fluid domain, with a source term accounting foroxygen consumption by the bacteria. The orientations of the individual bacteria aresubjected to random changes, with a frequency that depends on the surrounding oxygenconcentration, in order to favor the direction of the concentration gradient.