# Variables
q = 120 # Heat from surrounding, cal
W = 70 # Work done, cal
# Solution
delta_E = q - W
print "Change in internal Energy", delta_E, "cals."
print "CH4 (g) + 2O2 (g) -> CO2 (g) + 2H20 (l)"
delta_n = 1 - (1 + 2)
solution = - 2 * 2 * 298 # cals
print "Delta H - Delta E is:", solution, "cals"
# Variables
delta_G = -16.0 # Kelvin cal
delta_H = -10.0 # Kelvin cal
T = 300 # Kelvin
# Solution
delta_S = (delta_H - delta_G) * 10 ** 3 / T # cal/deg
new_T = 330 # Kelvin
new_delta_G = (delta_H * 10 ** 3) - new_T * delta_S
print "The free energy at 330K is:", "{:.2e}".format(new_delta_G), "K cal"
# Variables
delta_S = -20.7 # cal /deg /mol
delta_H = -67.37 # K cal
T = 25 # deg C
# Solution
T += 273 # K
delta_G = delta_H - (T * delta_S * 10 ** -3)
print "The change in free energy at 25deg C is:", delta_G, "K cal / mol"
# Variables
wt = 1 # g
delta_H = 149 # joules
# Solution
delta_H_fusion = delta_H * (10 * 12 + 8 * 1)
print "Enthalpy of fusion of naphthalene:", delta_H_fusion * 10 ** -3, "kJ/mol"
# Variables
delta_H_acetylene = 230 # kJ/mol
delta_H_benzene = 85 # kJ/mol
T = 298 # K
# Solution
delta_H = delta_H_benzene - 3 * delta_H_acetylene
print "The enthalpy change for the reaction is:", delta_H, "kJ/mole"
# Constant
delta_H_vap = 2.0723 # kJ/g
Tb = 373 # K
# Solution
delta_H_vap *= 18 # kJ/mol
delta_S = delta_H_vap / Tb
delta_G = delta_H_vap - Tb * delta_S
delta_S *= 1000
print "The Entropy change is:", "{:.1f}".format(delta_S), "J/mol/K"
print "The Free Energy change is:", delta_G, "kJ/mol"
import math
# Constant
R = 1.987 # cal /K /mol
# Variables
moles = 5
Vo = 4 # litres, Initial Volume
Vf = 40 # litres, Final Volume
T = 27 # deg C
# Solution
print "dS = nRln(V2 / V1)"
dS = moles * R * 2.303 * math.log10(Vf / Vo)
print "The change in entropy is:", "{:.2f}".format(dS), "cal / degree"
# Variables
wt = 10 # g
heat_abs = 4.5 # K
# Solution
mole = 10 / 100.0 # mol
delta_H = heat_abs / mole
print "The heat of the reaction is:", delta_H, "K cal / mol"
import math
# Constant
R = 8.314 # J / K
# Variables
V_O2 = 2.8 # litres
V_H2 = 19.6 # litres
# Solution
na = V_O2 / 22.4 # mol
nb = V_H2 / 22.4 # mol
Xa = na / (na + nb)
Xb = nb / (na + nb)
delta_S = (- R) * (na * math.log(Xa) + nb * math.log(Xb))
print "The increase in entropy on mixing is:", "{:.3f}".format(delta_S), "J / K"
# Solution
print "For 1 mole of ideal gas,"
print "\tPV = RT or T = (PV) / R\n"
print "Differentiating with respect to V at constant P,"
print "\t[dT/dV]p = P/R\n"
print "Differentiating again with respect oto P at constant V"
print "\t[d2T/(dV*dP)] = 1/R\n"
print "Now differectiating with respect to P at constant V,"
print "\t[dT/dP]v = V/R\n"
print "Differentiating again with respect to V at constant P,"
print "\t[d2T/(dV*dP)] = 1/R\n"
print "From equations we get:"
print "\t[d2T/(dV*dP)] = [d2T/(dV*dP)]\n"
print "Hence, dT is a perfect differential."
# Variables
delta_G_25 = - 85.77 # k J, Free Energy at 25 C
delta_G_35 = - 83.68 # k J, Free Energy at 35 C
Ti = 273 + 25 # K
Tf = 273 + 35 # K
# Solution
print "Equating the entropy change at both the temperatures."
print "(delta_H + delta_G_25) / Ti = (delta_H + delta_G_35) / Tf"
delta_H = - 148
print "The change in enthalpy for the process at 30C is", delta_H, "kJ"
# Constants
Lv = 101 # cal /g, Latent headt of vap.
mwt = 78 # molecular weight of benzene
# Variable
moles = 2
Tb = 80.2 # C, boiling point of benzene
# Solution
Tb += 273 # K
delta_H = Lv * mwt
delta_S = delta_H / Tb
delta_G = delta_H - Tb * delta_S
print "delta_S =", "{:.2f}".format(delta_S), "cal / K"
print "delta_G = delta_A =", delta_G
# Variables
V1 = 6 # dm^3
V2 = 2 # dm^3
T1 = 27 # C
moles = 5
# Solution
print "T1*V1 ^ (gamma - 1) = T2 * V2 ^ (gamma - 1)"
T1 += 273 # K
T2 = T1 * (V1 / V2) ** (8.314 / 20.91)
print "The final temperature is", "{:.1f}".format(T2), "K"
q = 0 # Adiabatic process
delta_E = - moles * 20.91 * (T2 - T1)
delta_E /= 1000
print "q = ", q
print "Change is Energy is", "{:.2f}".format(delta_E), "kJ / mol"
W = - delta_E
print "W = ", "{:.2f}".format(delta_E), "kJ / mol"
import math
# Constant
R = 8.314 # J / K mol
# Variables
mole = 1
V1 = 5 # dm^3
V2 = 10 # dm^3
T = 300 # K
# Solution
print "For isothermal and reversible process,"
delta_E = delta_H = 0
delta_A = delta_G = - 2.303 * mole * R * T * math.log10(V2 / V1)
q = W = - delta_G
print "delta_E = delta_H =", delta_H
print "delta_G = delta_A =", "{:.3f}".format(delta_G), "J / mol\n"
print "For isothermal and reversible expansion"
print "q = W = -delta_G =", "{:.3f}".format(W), "J / mol"
import math
# Constant
R = 8.314 # J / K mol
# Variables
n = 5 # moles
T = 27 # C
V1 = 50.0 # L, Initial Volume
V2 = 1000 # L, Final Volume
# Solution
T += 273
delta_G = 2.303 * n * R * T * math.log10(V1 / V2)
delta_G /= 1000
print "The free energy change is", "{:.3f}".format(delta_G), "k J"
# Variables
delta_H_neu = - 51.46 # k J/mol, neutralization
delta_H_ion = - 57.1 # k J/mol, ionization
# Solution
delta_H = - delta_H_ion + delta_H_neu
print "The head of ionization for NH4OH is", delta_H, "kJ / mol"
print "For 1 mole of an ideal gas,"
print "PV = RT or V = (RT)/P"
print "(dV/ dP) = -(RT/P^2)\t (at constant temperature)"
print "(d^2V/ (dP*dT)) = -(R/ P^2)"
print "(dV/ dT) = (R/ P)\t (at constant pressure)"
print "(d^2V/ (dT*dP)) = -(R/ P^2)\n"
print "(d^2V/ (dT*dP)) = (d^2V/ (dP*dT))\t[From above equations]"
print "Hence, dV is an exact differential."
print "Let P1, V1, T1 and P2, V2, T2 b the initial and final",
print "state, respectively of the system"
print "W rev = nRT[P1/ P2 - 1]"
print "W irr = nRT[1 - P2/ P1]"
print "W rev - W irr = [nRT/(P1P2)]*(P1 - P2)^2"
print "Because RHS of the above equation is always positive,"
print "W rev > W irr"
# Solution
Eq_HI = 1.56 / 2
Eq_H2 = 0.22 / 2
Eq_I2 = 0.22 / 2
Kc = Eq_H2 * Eq_I2 / (Eq_HI ** 2)
print "The equilibrium constant for the dissociation reaction",
print "{:.4f}".format(Kc)
# Variables
Kc = 0.5 # / mole^2 litre^2
T = 400 # K
R = 0.082 # litre atm degree^-1 mole^-1
# Solution
Kp = Kc * (R * T) ** (-2)
print "The given equilibrium is"
print "\t\tN2(g) + 3H2(g) <--> 2NH3(g)"
print "Kp is", "{:.3e}".format(Kp)
# Variables
solubility = 7.5 * 10 ** - 5 # mol L^-1
# Solution
Ksp = 4 * (solubility ** 3)
print "Solubility product of the salt is", "{:.4e}".format(Ksp), "mol^3 / L^-3"
# Variables
Ti = 25 # C
S = 0.00179 # g / L
# Solution
S /= 170 # mol / L
Ksp = S ** 2
print "Solubility product at 25 C is", "{:.4e}".format(Ksp), "mol^2 / L^-2"
# Variables
Ksp = 8 * 10 ** - 5 # Solubility product PbBr2
disso = 80 / 100 # % dissociation
# Solution
S = (Ksp / 4) ** (1 / 3.0) # Solubility is 100%
S_80 = S * (80 / 100.0)
S_per_g = S_80 * 367 - 1.621
print "Solubility in gm per litre is", "{:.3f}".format(S_per_g), "gm / litre"
# Variables
n_acid = 1 # mole
n_alcohol = 1 # mole
T = 25 # C
x = 0.667 # mole
# Solution
print "Kc = [CH3COOC2H][H2O] / ([CH3COOH][C2H2OH])"
Kc = 4
print "[CH3COOH] = (2 - x) / V"
print "[C2H5OH] = (1 - x) / V"
print "[CH3COOC2H5] = [H20] = x / V"
print "3x^2 - 12x + 8 = 0"
print "x =", 2.366, "or", 0.634
print "0.634 mole of ester would be formed, because the other value,",
print "x = 2.366, is not permissible."
import math
# Variables
n_acid = 0.2 # mole
n_salt = 0.10 # mole
Ka = 1.8 * 10 ** -5
# Solution
pH = - math.log10(Ka) + math.log10(n_salt / n_acid)
print "The pH of acidic buffer is", "{:.3f}".format(pH)
import math
# Variables
n_salt = 0.02 # mole
n_base = 0.2 # mole
pKb = 4.7
# Solution
pOH = pKb + math.log10(n_salt / n_base)
pH = 14 - pOH
print "pH of a buffer solution is", pH
# Variables
n_H2 = 8.07 # moles
n_I2 = 9.08 # moles
T = 448 # C
n_eqHI2 = 13.38 # moles
# Solution
x = n_eqHI2 / 2 + 6.69
Kc = n_eqHI2 ** 2 / (n_H2 * n_I2)
print "H2 + I2 <--> 2HI"
print "1 0 0"
print "1 - 2xx x x"
print "x/(1 - 2x) = (1/Kc)^0.5"
print "Dissociation constant of HI is 106.75 x 10^-3"