Simulation of solar system formation via accretion