This is a VBA everytime I try to test it it gives me value# as in something is w
ID: 3742139 • Letter: T
Question
This is a VBA everytime I try to test it it gives me value# as in something is wrong d. Create a gas pressure function. It will take as input the pressure (psi), the height, the specific gravity, and the average temperature, °F. The function will output the new pressure (psi). 0.01875SgH After the End Function from step c. write: Function GasBHP f (Pwh As Double, Sg As Double, H As Double, Zav As Double, TavF As Double) As Double Compute static gas well bottom hole pressure (psi) - Input: Pwh - Well Head Pressure psi (gauge pressure) SgGas Specific Gravity MWavg/MWair unitless H- Well Vertical Depth feet ZavAverage 2-Factor unitlessExplanation / Answer
Function GasBHP_f(Pwh As Double,Sq As Double,H as Double,Zav As Double,Tav_F As Double) As Double
Dim Pwh_psia As Double
Dim Tav_R As Double
Dim tp As Double
Dim tp1 As Double
Dim res As Double
tp1=0.0
tp=0.0
res=0.0
Pwh_psia=0.0
Tav_R=0.0
Pwh_psia=Pwh_psi+14.7
Tav_R=Tav_F+459.67
tp1=((0.01875*Sg*H)/(Zav*Tav_R))
res=Pwh_psia*Exp(tp1)-14.7
End Function
Related Questions
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.