Simulation of photosphere and chromosphere of two powerful solar flares (October 28, 2003 and September 1, 1990)