This file was automatically imported from the old site. You can see other imported files on the reuploads page.

The Ideal Gas Law

Originally uploaded by Fisheater on 6th April 2012 02:22 am

Ideal Gas Law Script
Coded By: Fisheater
PV = nRT
P = Pressure (atm),
V = Volume (L),
n = # of moles,
R = 0.0821,
T = Temperature (K)
This is a script that uses the Ideal Gas Law which is PV=nRT, where R is a constant, 0.0821.
With this script, you can calculate a number of things including:
# of Moles,
Just drag the lua folder into your garrysmod/garrysmod directory and override if necessary.
-How to use-
Open up the menu with the command: IdealGas_Menu
When in there, enter your values for each and select which units each of the values are in.
*Leave only one value blank to solve for it!* Press Find! and your answer will be printed in chat.
Pressure: atm, torr, kpa, pa;
Volume: L, mL, cm^3;
Moles: mol;
Temperature: K, C;
-Example Problems-
I have 4 moles of a gas at a pressure of 5.6 atm and a volume of 12 liters, what is the temperature in Kelvin?
A container has 3 moles of gas with a volume of 60 liters at a temperatuer of 400 K, what is the preesure of inside the container at atm?

This download looks like an unpacked addon. You can either convert the files to an addon or merge the folders in the zip with the folders in your Garry's Mod folder.

Convert to Addon (Recommended)

You should end up with a directory structure similar to below:

  • steamapps
    • common
      • garrysmod
        • garrysmod
          • addons
            • The Ideal Gas Law <-- Make this folder!
              • e.g.
              • lua
              • maps
              • materials
              • models
              • etc

Or, Merge Folders (Not recommended)

This option makes it difficult to remove the content should you no longer want it. Merge any folders from the zip with the equivalent folders in your Garry's Mod folder.

Don't know where the Garry's Mod folder is or how to extract zip files? See more useful installation tips.

  • lua/
    • autorun/
      • client/
        • PV=nRT.lua