modified clamp by shiburajdda | SimScale