The Thermodynamic System and Models #
We define a thermodynamic system to be over a general field, which we require to be an albelian group for multiplication. This class has five properties to describe the system, pressure, volume, temperature, amount of substance, and energy. Each property is defined as a function from the natural numbers to our field. This function represents the equillibrium states of the system.
We also define six properties of a thermodynamic system: isobaric, isochoric, isothermal, adiabatic, closed system, and isolated system. These take in a thermodynamic system and have the type Prop, so they can be thought of as assertation about the system.
We finally define an ideal gas, which extends the thermodynamic system by providing a model for the systems properties. So far, the ideal gas only defines the unviersal gas constant and the ideal gas law. Then we show how the boyles law follows form the ideal gas law and the assumption of isothermal and a closed system
To Do #
- Add more parameters to the ideal gas model, including ideal models of energy.
- Define more for energy: heat capacity as a function of temeperature, the first and second law of thermodynamics
Equations
- isothermal M = ∀ (n m : α), M.temperature n = M.temperature m
Equations
- adiabatic M = ∀ (n m : α), M.internal_energy n = M.internal_energy m
Equations
- closed_system M = ∀ (n m : α), M.substance_amount n = M.substance_amount m
Equations
- isolated_system M = (adiabatic M ∧ closed_system M)
Gas Laws #
Equations
- charles_law M = ∃ (k : ℝ), ∀ (n : α), M.volume n = k * M.temperature n
Equations
- avogadros_law M = ∃ (k : ℝ), ∀ (n : α), M.volume n = k * M.substance_amount n
System models #
- to_thermo_system : thermo_system α
- R : ℝ
- ideal_gas_law : ∀ (n : α), self.to_thermo_system.pressure n * self.to_thermo_system.volume n = self.to_thermo_system.substance_amount n * self.R * self.to_thermo_system.temperature n
Instances for ideal_gas
- ideal_gas.has_sizeof_inst