An Efficient Model for Valvetrain and Spring Dynamics