formula prototype by inajid | SimScale