<jupyter_start><jupyter_text>""" \ 1) **Find density of gas listed in Table 1.1**\ solution:\Using ρ=nM/V = MP/ZRT (equation 1) \"""<jupyter_code>m = 19.91           #molecular weight of all the gases listed in table 1

      # At Standard Conditions
psc = 14.7          #pressure 
zsc = 1     
r = 10.732          #gas constant
tsc = 520           #temperature
m_air = 28.97       #mol weight of air 

if (medium == 'air'):
    density_g = 1.0
else:
    density_g = m/m_air

print(density_g)

density_numerator = m * psc
density_dinominator = zsc * r * tsc

standard_density = density_numerator / density_dinominator

print("density of gas listed in table 1=",standard_density)<jupyter_output>0.6872626855367622
density of gas listed in table 1= 0.052445060064795435<jupyter_text>**2)What is the gas pressure gradient in the reservior at 2000 psia and 180°F(Z=0.865)** Density(ρ) of gas in reservior can be calculated using eq 1.  (ρV)sc=(ρV)res (ρ)res=(ρ)sc*EFor a real gas, gas expansion factor\ E=(volume of n moles of gas at std. condition)/  \( Vol of n moles of gas at reserviour conditions.) \   =35.37 P/ZT<jupyter_code>#Given
standard_density = 0.05244
psc= 2000 
z=.865
tsc= 640 #(180+460)

den_res= (35.37* psc* standard_density )/(z* tsc)
print("density of gas in reservior=",den_res ,"lb/cu.ft")<jupyter_output>density of gas in reservior= 6.700877167630058 lb/cu.ft<jupyter_text>**converting it into pressure gradient(psi/ft)**<jupyter_code>pressure_gradient= den_res/144
print("pressure gradient in the reservior at 2000 psia and 180°F=",pressure_gradient,"psi/ft")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1154562383612663, 'fraction_numerical': 0.08317815021725636, 'mean_word_length': 4.166666666666667, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '319994', 'license': 'MIT', 'n_tokens_mistral': 691, 'n_tokens_neox': 576, 'n_words': 175, 'path': 'Exercise_1_1.ipynb', 'repo_name': 'iamsrijit/Fundamentals-of-Reservoir-Engineering', 'size': '1611'}