NOVELTY - A biodiesel is produced by preparing mixture of methanol and catalyst by dissolving 24-35 g of sodium hydroxide or sodium methoxide in each liter of methanol. A valve is closed and the mixture is stored in a vessel. Before each production, methanol and sodium hydroxide are mixed at 40 degrees C. A metering pump is adjusted so that a ratio of the flux of the mixture to the flux of rape oil is 1:4.5-5.5. The reactants are extracted from respective vessel and heated to 50-65 degrees C to be placed into a reactor with mechanical oscillation device.    USE - Method for producing biodiesel (claimed).    ADVANTAGE - The method makes use of a device that improves production efficiency, conversion rate, composition and quality of biodiesel.    DETAILED DESCRIPTION - Producing biodiesel comprises preparing mixture of methanol and catalyst by dissolving 24-35 g of sodium hydroxide (NaOH) or sodium methoxide (or sodium methyl) (NaOMe) in each liter of methanol (CH3OH). A valve is closed and the mixture is stored in a vessel. Before each production, CH3OH and NaOH or NaOMe are mixed at 40 degrees C. A metering pump is adjusted so that a ratio of the flux of the mixture to the flux of rape oil is 1:4.5-5.5. The reactants are extracted from respective vessel and heated to 50-65 degrees C to be placed into a reactor with mechanical oscillation device. An inlet and an outlet of the reactor have mechanical oscillation device fixed with it in a sealed manner, so that the reactant in the reactor is fully mixed to strengthen the reaction process. The mechanical oscillation device comprises rotor whose geometrical axis is intersected with a rotating shaft and is assembled on a rotating shaft. An eccentric distance of the rotor forms phase difference of 180 degrees . The rotor and outer end of a piston are connected. When the rotating shaft drives the rotor to rotate, the piston is driven by the rotor to carry out a reciprocating motion or 2 adjacent pistons carry out the reciprocation motion with opposite directions and equal displacement absolute value. The rotor moves or is fixed on the rotating shaft. The motion changes an eccentric distance of the rotor on the piston, particularly an amplitude of the piston so that the piston vibrates under different amplitudes. A piston guide cylinder is in sealed connection with the reactor. The reciprocating motion of the piston excites the reactant in the reactor so that collision rate of the reaction substance point in the reactor increases to form turbulence or is fully mixed to improve flow condition of the reactant, thus each substance point has uniform flow speed to prevent the return mixture reach the plunger flow and generate the motion beneficial for the reaction process. The reactor comprises baffle. It is tubular or basin-shaped. The tubular shape comprises straight pipe, elbow pipe, L-shaped pipe, T-shaped pipe, cross pipe or pipe coil or can be single-pipe type or multi-pipe type. A conveying pipeline between the outlet of a heater and the inlet of the reactor uses insulation measure to keep moderate reaction temperature of the reactant. A after the reaction is finished, the product (crude biodiesel and glycerin) enters a separator. The glycerin has high density to sink in the bottom and the crude biodiesel has less density to float. The separated crude biodiesel comprising methanol enters a washer to wash the methanol. The washed biodiesel firstly passes through a filter to filter moisture, and then it enters a water absorber to dewater and enter a storage tank to obtain finished product biodiesel. The frequency and amplitude of the piston are controlled to adjust flow condition of the material, retaining time, or product component and/or conversion rate or reaction speed of the reactant in the reactor. The frequency of the piston is changed via the change of the rotating speed of a speed regulation motor; and the amplitude of the piston is changed via the change of the rotor position.