Simulation of elastic moduli for porous materials