These calculations run in your web browser, using embedded Javascripts; which means that you must set your browser to allow Javascripts .
This calculates the (ideal) gas pressure inside a piston-cylinder device. Atmospheric pressure acts above the piston (pushing down); the piston may have mass (weight assumed acting downward); there may be an applied force (may act positive up or negative down). Also calculates the heigh of the piston above the floor of the cylinder, based on ideal gas volume and piston area.
The assumption of constant temperature implies that, as the gas in the cylinder expands and compresses, heat is allowed to transfer though the cylinder walls. During a compression, when the gas tends to get hotter, heat leaves the cylinder; vice versa for expansion.
If the cylinder is insulated (and the process is adiabatic - no heat transfer) we would have to re-calculate the gas temperature at every step in the process. We will add this feature in a later analysis.