formula by sramingwong | SimScale