Professional Documents
Culture Documents
Van Der Waal Equation
Van Der Waal Equation
The Van Der Waals equation is an equation of state for a fluid composed of
particles that have a non-zero volume and a pairwise attractive inter-particle force.
The equation uses the following state variables:
a). The pressure of the fluid, p
b). total volume of the container containing the fluid V
c). number of moles, n
d). absolute temperature of the system, K
The function of the program is to use Van der Waals equation of state for a
gas to display in tabular form the relationship between the pressure and the volume
of n moles of carbon dioxide at a constant absolute temperature (T). It also shows
the volume of gas from the initial to final volume by the volume increment.
Algorithm.
Test Data.
// Define constants.
#define a 3.952
#define b 0.0427
#define R 0.08206
#define mL_L .001
int main ()
{
double Nofmoles;
double temp;
double initialV;
double finalV;
double incrementV;
table.
double pressure;
//Pressure (atm).
double volumeV;
int ans;
//Repetition
do
{
cout<<"\n ****** Van Der Waals Equations ******\n";
cout<<" Welcome to Van Der Waals equation.\n ";
//Repetition
while(ans<2);
return 0;
}