This simulation will provide first-year engineering undergraduates with hands-on experience of ideal gases. Users explore the behaviour of a closed ideal gas system by setting its thermodynamic state variables/constants (e.g., 𝑝, 𝑉, 𝑇, 𝐸ᵢ, Δ𝑆), applying work and/or heat to the system.
The following video displays the simulation of ideal gas behaviour depending on the system variables
* pressure p
* volume V
* temperature T
* internal energy 𝐸ᵢ
* entropy change Δ𝑆
ideal-gas-simulation-demonstration.mp4
The Application was build in collaboration with three other students, the parts implemented by me are as follows:
-
Root-mean-square speed: Calculated the root-mean-square speed of the particles based on temperature or (temperature change) of the gas and scaled the result to match the visual demonstration and to avoid excessive velocities.
- uᵣₘₛ = sqrt(3RT / M)
- R: Gas Constant
- T: Temperature
- M: Molar mass of gas
- uᵣₘₛ = sqrt(3RT / M)
-
Speed Redistribution: Redistributing the speed each step of the simulation of each particle to match the visual representation of the calculated root-mean-square speed.
-
Internal Energy: Calculating the internal energy of the ideal gas based on the temperature each steap of the model based on the changed parameters.
- Eᵢ = f * 1/2 * n * R * T
- Eᵢ: Internal Energy
- f: Degrees of Freedom (of the Particles)
- n: Mol of gas
- Eᵢ = f * 1/2 * n * R * T
-
Change of entropy: Calculating the specific heat capacity and the change in entropy depending on the thermodynamic process happening at the moment. Displaying the entropy change in the simulation GUI in a diagram.
- For isochoric process or |isochoric & isothermal|-process
- Specific heat capacity cₚ = (f+2) * R/2 * n / m
- m: Mass of gas
- Change in entropy Δs = cₚ · ln(T₂/T₁) + Rᵢ · ln(p₂/p₁)
- Specific heat capacity cₚ = (f+2) * R/2 * n / m
- For isobaric process or isothermal process
- Specific heat capacity cᵥ = f * R/2 * n / m
- Change in entropy Δs = cᵥ · ln(T₂/T₁) + Rᵢ · ln(V₂/V₁)
- For isochoric process or |isochoric & isothermal|-process
-
Rework of the graphical user interface and the plotting kwargs.
-
Fitting the size of the simulation-UI dynamically to the display size of the end user.
-
Prevention of polytropic thermodynamic processes by halting the volume change in non-volume relevant modes.
Running the Application: (Instructions in German)
Starten des Programms:
1. Installieren von Julia
2. Installieren der nötigen Packages
3. Julia Konsole öffnen
* Using Pkg
* Pkg.add("Paketname@vX.Y.Z")
- Agents v5.14.0
- LinearAlgebra
- GLMakie v0.8.5
- InteractiveDynamics v0.22.1
- Observables v0.5.4
4. Mit dem "cd()" command zu dem Verzeichnis navigieren, indem "IdealGas.jl" enthalten ist
5. Include("IdealGas.jl")
6. IdealGas.demo()