Lol, so it goes like this. Say you have a hole in a thin metal plate and you want to move air through the hole. You have to either build up pressure on one side or reduce pressure on the other side. You can calculate the mass flow rate through the hole if you know the effective area of the hole (absolute area * coefficient of discharge), velocity of the flow, and the density of the air on the high pressure side. Now, concerning the throttle body...due to physics, we know the velocity is equal to the speed of sound when the pressure ratio is below 0.528. We know the density of the air upstream of the throttle because of the modeled baro pressure and intake air temperature. And finally, we know the effective area of the throttle (as a function of flow) due to the bench calibration that the throttle goes through. Now the rules of compressible flow tend to fall apart a bit when the pressure ratio goes above 0.528. That's what the phi correction is for. Below that pressure ratio, the airflow becomes subsonic. So the phi ratio is a multiplier on that bench throttle flow calibration for pressure ratios above 0.528 to continue giving us a usable model of compressible flow through the throttle to continue estimating throttle mass flow.
Now, phi is a variable itself and is updated based on models and measurements. Since we are measuring MAP and also have a running estimate of manifold pressure in the form of CALC_MAP, we can calculate an inferred flow discrepancy in the form of a set of throttle flow adaptives. Those adaptives are comprised of an adder, a multiplier, a proportional and an integral component. The phi variable is calculated with the throttle flow adaptive integral - phi is then used to calculate a new compressible flow factor to generate a corrected throttle mass flow when the air moving through it is subsonic, or P_Ratio > 0.528. Finally, the throttle adaptives all together are used to correct the values that come from the throttle body model.
It's a nasty algorithm, isn't it? I won't go into any more detail now, but tl;dr...air goes through the throttle, we model both that flow and the manifold pressure; model the baro at low TPS, estimate/calculate baro at high TPS; compare the modeled MAP to measured MAP, calculate phi and throttle adaptives to correct for subsonic throttle flow and any offsets the throttle might have (manufacturing tolerances, throttle coking, etc). There's a lot more to this crazy algorithm but I'll stop there