/3D-Particle-Simulation-Lab

I created a 3D simulation of an ideal gas in a container to display relationships between pressure & volume and pressure & number of particles.

Primary LanguageProcessing

This GitHub project contains my lab report (in both PDF and LaTeX formats) as well as the code for my simulations (writting using Processing). Part of the introduction to my lab has been recreated in Markdown below

Simulating the Relationship Between Pressure and Other Variables in a 3D Environment

Luke Carlson Trevor Day School March 11, 2013

Purpose

In this lab, I set out to create a 3D simulation of ideal gas particles in a cubic container in order to experimentally determine the pressure of the gas based on given circumstances. From there, I planned to explore the relationship between pressure and volume as well as pressure and number of particles.To produce a simlation, a replication of a real world circumstance using programming of a gas particle, it is first necessary to understand exactly how particles affect the pressure of a system. Pressure is the amount of force over a specific area, also written as $Pressure=F/A$.

Introduction

The Ideal Gas Law describes the characteristics of ideal gas in a container. Often written as $PV=nRT$, this law displays the relationship between Pressure, Volume, Temperature, moles of the particle, and the universal gas constant in a system. The Ideal Gas Law can be derived from combining three other gas laws: Boyle’s Law, Charles’s Law, and Avogadro’s Law. Boyle’s Law postulates that in a system with uniform temperature, the pressure of an ideal gas is inversely proportional with volume of the gas. Thus, the pressure times the volume is equal to a constant value in the system, often shown as $PV = k$ (where k is the constant). Since the constant is the same no matter the circumstances in the system, the law can be used to relate changes in pressure or volume as $P_{1}V_{1} = P_{2}V_{2}$ (where 1 indicates the initial and 2 is the final state).