Energy and coercive field of a porous ferromagnetic sample with Bloch-walls and self-consistent magnetization