In order to understand the transport of fast electrons within solid density targets driven by an optical high power laser, we have numerically investigated the dynamics and structure of strong self-generated magnetic fields in such experiments. Here we present a systematic study of the bulk magnetic field generation due to the ponderomotive current, Weibel-like instability and resistivity gradient between two solid layers. Using particle-in-cell simulations, we observe the effect of varying the laser and target parameters, including laser intensity, focal size, incident angle, preplasma scale length, target thickness and material and experimental geometry. The simulation results suggest that the strongest magnetic field is generated with laser incident angles and preplasma scale lengths that maximize laser absorption efficiency. The recent commissioning of experimental platforms equipped with both optical high power laser and X-ray free electron laser (XFEL), such as European XFEL-HED, LCLS-MEC and SACLA beamlines, provides unprecedented opportunities to probe the self-generated bulk magnetic field by X-ray polarimetry via Faraday rotation with simultaneous high spatial and temporal resolution. We expect that this systematic numerical investigation will pave the way to design and optimize near future experimental setups to probe the magnetic fields in such experimental platforms.