Imagine a scenario.You are riding a bicycle. Now instead of pedalling smoothly you hit the cycles pedal.You start hitting it violently and repeatedly(just like you stomp on a balloon laying on the floor to burst it).
Neither the pedal and nor the wheel will show sudden jerks and will still rotate smoothly. The sudden jerks given by you on the pedal will not cause it to rotate suddenly and neither will the tire ,yes there would be
increase in speed of tire but it would not be abrubt and uncontrollable.
Now you remove the tyre and put the cycle on the stand without the rear tyre and hit the pedal again.This time the pedals will suddenly rotate. The rotation will be abrubt and uncontrollable.
Tyre is the flywheel
Violent hitting of the pedal is the combustion in the engine generating the power.
The pedal is the piston.
So what functions will flywheel do as we can see from above scenario:-
The combustion in multiple cylinder happens very quickly and violently . This pushes down the Pistons suddenly.If there was no flywheel the rider would experience jerks with every Spark in every cylinder.The piston would move down suddenly with every Spark and rotate the crankshaft suddenly and give sudden power flow to the drive train. The flywheel helps to smoothen out these jerks.
It also stores inertia being a heavy mass. We all know how a heavy mass can store and expend inertia and help in smooth movements.Just like in our scenario when you are riding the bicycle and if you stop pedalling the bicycle will still move and carry you forward. Similarly when there is no power stroke the inertia stored in the flywheel keeps the crankshaft rotating.
This is not related to the scenario but it also provides friction surface for clutch to make contact and continue power flow through the drive train to the wheels.
Also there are 2 sets of teeths on the flywheel .
One set which meshes with the teeths of the gear on the starter motor .The starter motor rotates the flywheel which rotates the crankshaft causing camshaft to rotate,valves opening and finally voila the engine starts.
Second set is basically for a sensor to measure engine RPM.
By definition, Flywheel is a device which stores excess energy and give back same when needed.
In torque displacement curve, you see that torque is produced only in power stroke. Rest all stroke consumes torque. This variation in torque has adverse effect on crank shaft. It will be subjected to sudden change in
speeds and centrifugal forces.
Flywheel smooth out this torque curve, ie Torque mean is what we get as output. When during power stroke extra torque is produced, it is stored in flywheel to be used back in other three stroke. thus overall we get
good stable torque characteristics.
More variations bigger the flywheel , more the mass more fuel consumption. So what nowadays engineers do is to use multi-cylinder engines. Its firing order are kept such that overall output on crankshaft will be smooth torque characteristics.