  We study the evolution of a system consisting of two protoplanets still
embedded in a protoplanetary disk. Results of two different numerical
approaches are presented. In the first kind of model the motion of the disk
material is followed by fully viscous hydrodynamical simulations, and the
planetary motion is determined by N-body calculations including exactly the
gravitational potential from the disk material. In the second kind we only
solve the N-body part and add additional analytically given forces which model
the effect of the torques of the disk. This type of modeling is of course
orders of magnitudes faster than the full hydro-model. Another advantage of
this two-fold approach is the possibility of adjusting the otherwise unknown
parameters of the simplified model.
  The results give very good agreement between the methods. Using two different
initial setups for the planets and disk, we obtain in the first case a resonant
trapping into the 3:1 resonance, and in the second case a trapping into the 2:1
resonance. Resonant capture leads to a rise in the eccentricity and to an
alignment of the of the spatial orientation of orbits. The characteristics of
the numerical results agree very favorably with those of 3 observed planetary
systems (GJ 876, HD 82943, and 55 Cnc) known to be in mean motion resonances.
