We present a new approach for calculating the physical properties of highly ionized X-ray flows in active galactic nuclei ( AGN ) . Our method relies on a detailed treatment of the structure , dynamics and spectrum of the gas . A quantitative comparison of our model predictions with the 900 ksec Chandra/HETG X-ray spectrum of NGC 3783 shows that : ( 1 ) The highly ionized outflow is driven by thermal pressure gradients and radiation pressure force is less important . ( 2 ) A full featured dynamical model that provides a very good fit to the high resolution X-ray spectrum requires a multi-phased flow with a density power spectrum reminiscent of the interstellar medium . ( 3 ) Adiabatic cooling is an important factor and so is an additional heating source that may be related to the apparent multi-phase and turbulent nature of the flow . ( 4 ) The base of the flow is \sim 1 pc from the central object , in agreement with some , but not all previous estimates . ( 5 ) The mass loss rate is in the range 0.01 - 0.1 ~ { } { M _ { \odot } ~ { } yr ^ { -1 } } which is smaller than previous estimates and of the same order of the mass accretion rate in this object .