Simulation of Solar Magnetoconvection