A dynamical coupled-channel model is presented for investigating the nucleon resonances in the meson production reactions induced by pions and photons. The model is based on an energy-independent Hamiltonian which is derived from a set of Lagrangians by using a unitary transformation method. By applying the projection operator techniques,we derive a set of coupled-channel equations which satisfy the unitarity conditions within the channel space spanned by the considered two-particle meson-baryon states and the three-particle $pipi N$ state. We present and explain in detail a numerical method based on a spline-function expansion for solving the resulting coupled-channel equations which contain logarithmically divergent one-particle-exchange driving terms resulted from the $pipi N$ unitarity cut. We show that this driving term can generate rapidly varying structure in the reaction amplitudes associated with the unstable particle channels. It also has large effects in determining the two-pion production cross sections. Our results indicate that cautions must be taken to interpret the $N^*$ parameters extracted from using models which do not include $pipi N$ cut effects.