The Vapor Pressure Calculation Tool (Antoine Constants) is a program that allows you to calculate the vapor pressure of a substance using the Antoine equations. By inputting the relevant Antoine constants for the substance, the tool can provide an estimate of its vapor pressure at a given temperature. This tool was “programmed” without writing any code. Programming was done by ChatGPT 4.0 written in python. Rather than being useful on its own, this shows how easy it is to program little tools with no prior experience in programming.

Simply Download this file (or copy the code attached below insert into editor

Vapour Pressure.py

Grafical Interface of the Calculator.

Grafical Interface of the Calculator.

To run simply install (or update) python via microsoft store:

Untitled

Code:

import tkinter as tk
from tkinter import ttk
import math

def calculate_vapor_pressure():
    try:
        A = float(entry_A.get())
        B = float(entry_B.get())
        C = float(entry_C.get())
        temperature_C = float(entry_temp.get())
        temperature_K = temperature_C + 273.15
        vapor_pressure = 10 ** (A - (B / (temperature_K + C)))
        label_result.config(text=f"Dampfdruck: {vapor_pressure:.4f} bar")
    except ValueError:
        label_result.config(text="Ungültige Eingabe!")

# Fenster erstellen
window = tk.Tk()
window.title("Dampfdruck-Rechner")

# Eingabefelder und Beschriftungen
label_A = tk.Label(window, text="Antoine-Konstante A:")
label_A.grid(column=0, row=0)
entry_A = tk.Entry(window)
entry_A.grid(column=1, row=0)

label_B = tk.Label(window, text="Antoine-Konstante B:")
label_B.grid(column=0, row=1)
entry_B = tk.Entry(window)
entry_B.grid(column=1, row=1)

label_C = tk.Label(window, text="Antoine-Konstante C:")
label_C.grid(column=0, row=2)
entry_C = tk.Entry(window)
entry_C.grid(column=1, row=2)

label_temp = tk.Label(window, text="Temperatur (°C):")
label_temp.grid(column=0, row=3)
entry_temp = tk.Entry(window)
entry_temp.grid(column=1, row=3)

# Ergebnis-Label
label_result = tk.Label(window, text="Dampfdruck: ")
label_result.grid(column=0, row=4, columnspan=2)

# Berechnungsbutton
button_calculate = tk.Button(window, text="Berechnen", command=calculate_vapor_pressure)
button_calculate.grid(column=0, row=5, columnspan=2)

# Haupt-Schleife
window.mainloop()