Calculation of stress—strain curves by using 2 dimensional dislocation dynamics