Hidden WordScanner
Private scans · No account required

DuckieDai Clausius-Clapeyron Equation

Use the integrated Clausius-Clapeyron relation to solve either pressure, either temperature, or enthalpy of vaporization.

chemistry · MIT License

Overview

Use the integrated Clausius-Clapeyron relation to solve either pressure, either temperature, or enthalpy of vaporization.

  • Not calculator tested
  • Downloaded 34 times
  • Version 1.0.0
  • 2167 bytes
  • Uses math

Before you run it

  • TI-84 Plus CE Python · No calculator OS or Python App version has been verified.
  • TI Connect CE .py transfer is the intended path; calculator OS, Python App, transfer, and execution have not yet been tested for this release
  • Delta Hvap is constant over the temperature interval.
  • The vapor behaves ideally and liquid molar volume is negligible relative to vapor.
  • Pressures, temperatures, and supplied Delta Hvap must be positive; paired temperatures must differ when solving Delta Hvap.

Try the DuckieDai calculator screen

Follow the same opening, solve menu, prompts, validation, and result flow as the downloadable program.

JavaScript is required for the optional browser simulation. Source viewing and downloading remain available without it.

Simulation boundary: This preview uses a reviewed browser adapter. It does not execute the downloaded Python and does not prove TI-Python or calculator compatibility.

Learn the math

How the Clausius-Clapeyron equation works

The idea

A liquid's vapor pressure rises steeply as it warms. The Clausius-Clapeyron equation links the vapor pressures at two temperatures through the heat of vaporization.

It answers questions such as: what is the vapor pressure at a new temperature, or at what temperature will this liquid boil under a different pressure?

The formula

ln(P2/P1) = -(Hvap/R)*(1/T2 - 1/T1)

P1, P2
vapor pressures at the two temperatures, in the same unit
T1, T2
temperatures in kelvin
Hvap
heat of vaporization (kJ/mol)
R
8.314 J/mol K, built in

Using the program

Worked example

Water boils at 373.15 K under 1 atm, and Hvap = 40.7 kJ/mol. To find its vapor pressure at 350 K, choose 1 and enter 1, 373.15, 350, and 40.7.

The program shows P2 = 0.4199 atm (it prints more decimal places), so water at 350 K has about 42% of normal atmospheric vapor pressure.

Tips and common mistakes

Where this comes up

It appears in the liquids and phase changes unit of general chemistry and again in physical chemistry, wherever vapor pressure, boiling point, and heat of vaporization are linked.

Exact reviewed bytes

Source code

Download .py

View source below, copy it when JavaScript is available, or download the exact .py bytes.

  1. from math import log,exp
  2. R=8.314
  3. def duckiedai_intro(program_name,wait=True):
  4. title=program_name[:16]
  5. empty=16-len(title)
  6. left=empty//2
  7. right=empty-left
  8. print("+----------------------+")
  9. print("| "+" "*left+title+" "*right+" |")
  10. print("| |")
  11. print("| __ |")
  12. print("| ___(o )> quack! |")
  13. print("| \\ <_. ) |")
  14. print("| `---' |")
  15. print("| by DuckieDai |")
  16. print("+----------------------+")
  17. print("Loading...")
  18. if wait:
  19. input("Press enter to start ")
  20. print("\n"*6)
  21. def pos(s):
  22. while 1:
  23. try:
  24. x=float(input(s))
  25. if x>0:return x
  26. except:pass
  27. print("Enter a positive #")
  28. def menu():
  29. while 1:
  30. try:
  31. x=int(input("Choose 1-5: "))
  32. if x>0 and x<6:return x
  33. except:pass
  34. print("Choose 1 to 5")
  35. duckiedai_intro("CLAUSIUS CLAP")
  36. print("CLAUSIUS-CLAPEYRON")
  37. print("1 Find P2")
  38. print("2 Find T2")
  39. print("3 Find Hvap")
  40. print("4 Find P1")
  41. print("5 Find T1")
  42. c=menu()
  43. if c==1:
  44. p1=pos("P1: ")
  45. t1=pos("T1 K: ")
  46. t2=pos("T2 K: ")
  47. h=pos("Hvap kJ/mol: ")*1000
  48. try:
  49. p2=p1*exp((-h/R)*(1/t2-1/t1))
  50. print("P2 =",p2)
  51. print("P2/P1 =",p2/p1)
  52. except:print("P2 too large")
  53. elif c==2:
  54. p1=pos("P1: ")
  55. p2=pos("P2: ")
  56. t1=pos("T1 K: ")
  57. h=pos("Hvap kJ/mol: ")*1000
  58. x=1/t1-(R/h)*log(p2/p1)
  59. if x<=0:print("T2 is not positive")
  60. else:
  61. t2=1/x
  62. print("T2 K =",t2)
  63. print("T2 C =",t2-273.15)
  64. elif c==3:
  65. p1=pos("P1: ")
  66. p2=pos("P2: ")
  67. t1=pos("T1 K: ")
  68. t2=pos("T2 K: ")
  69. x=1/t2-1/t1
  70. if x==0:print("T1 and T2 differ")
  71. else:print("Hvap kJ/mol =",-R*log(p2/p1)/x/1000)
  72. elif c==4:
  73. p2=pos("P2: ")
  74. t1=pos("T1 K: ")
  75. t2=pos("T2 K: ")
  76. h=pos("Hvap kJ/mol: ")*1000
  77. try:print("P1 =",p2/exp((-h/R)*(1/t2-1/t1)))
  78. except:print("P1 cannot display")
  79. else:
  80. p1=pos("P1: ")
  81. p2=pos("P2: ")
  82. t2=pos("T2 K: ")
  83. h=pos("Hvap kJ/mol: ")*1000
  84. x=1/t2+(R/h)*log(p2/p1)
  85. if x<=0:print("T1 is not positive")
  86. else:
  87. t1=1/x
  88. print("T1 K =",t1)
  89. print("T1 C =",t1-273.15)
  90. input("ENTER for guide: ")
  91. print("QUICK GUIDE")
  92. print("Use Kelvin only")
  93. print("P units must match")
  94. print("Higher T: higher P")
  95. print("Hvap in kJ/mol")
  96. print("DuckieDai: done!")
  97. input("ENTER to exit: ")
Filename
ccEQ.py
Size
2167 bytes
SHA-256
8cc5c176f0340878b9cc77812e2a04b48b406d072b87b10faab88b17d891f84f

Usage

Inputs

  • Two vapor pressures in the same unit
  • Absolute temperatures in kelvin
  • Enthalpy of vaporization in kJ/mol when supplied

Outputs

  • Requested pressure, temperature, or enthalpy of vaporization

Units: Pressure units may vary but must match; temperature is kelvin; enthalpy is kJ/mol; R is 8.314 J/(mol*K).

Assumptions and limitations

Assumptions

  • Delta Hvap is constant over the temperature interval.
  • The vapor behaves ideally and liquid molar volume is negligible relative to vapor.

Constraints

  • Pressures, temperatures, and supplied Delta Hvap must be positive; paired temperatures must differ when solving Delta Hvap.

Known failures

  • Wide temperature ranges, near-critical conditions, or phase changes can violate the approximation.
  • Extreme pressure ratios may overflow or underflow floating-point display.

Compatibility and review

Review status
Not calculator tested
Tested on
The owner reports personally testing the supplied archive programs on a calculator; exact model, OS, and Python App versions were not recorded
What happened
Owner reported interactive testing is disclosed, but the published bytes are not labeled independently calculator tested because the environment is unrecorded and Arrhenius received a narrow intake correction
Dependencies
math
Suggested calculator name
CCEQ — you can give it another valid, unique name when you transfer it
Desktop test cases
Not available for this interactive-only source

This exact source auto-launches an interactive calculator session, so compatibility evidence comes from the recorded physical-device review rather than an importable desktop fixture.

Transfer and launch

Download the .py file, send it to your calculator with TI Connect CE as CCEQ or another name, then open the Python App and try the worked example on this page first. This release has no verified calculator OS or Python App version; treat transfer and execution as unverified until independently tested.

Full installation and troubleshooting guide. Check your teacher's or exam's rules before using any program.

Version history

Did a DuckieDai program help with your homework? Every program here is free. If you would like to say thanks, you can leave a tip on Cash App ($duckiedai214) or read what tips pay for.

Independent compatibility resource: Hidden Word Scanner is independent and is not affiliated with or endorsed by Texas Instruments. TI product names describe compatibility only.

Action-count privacy: Successful downloads, preview starts, and preview completions increment same-origin aggregate counters, and so does a Yes or No answer about whether the program worked. Your browser notes that you answered; that note is never sent to the site. No entered values, source text, IP address, account, cookie, device identifier, or fingerprint is stored with these counts.