The thermodynamic properties of the gas species include heat capacities which are used to distribute thermal energy among molecular degrees of freedom during the collisions.
Collision is modeled in the center-of-mass (CM) frame of reference. The velocities of the two molecules are first recalculated into the CM frame. The total energy of the two molecules is first calculated as their combined internal energy plus their combined kinetic energy in the CM coordinate frame. Chemical reactions are triggered when this energy is in excess of the activation energy for the reaction. In this case the enthalpy of the reaction is added to the total energy. This energy is then redistributed between the degrees of freedom of the product molecules according to the following scheme:
where are total degrees of freedom (kinetic + internal) for molecule X=(A,B), and is the specific heat of molecule X. The function DOF(Cp) of coputing the degrees of freedom from the specific heat is defined as:
The combined kinetic degrees of freedom are 6, then the combined internal degrees of freedom are calculated as:
Then for each molecule the ratio of its internal degrees of freedom to the total internal degrees of freedom is computed as:
The calculations of energy redistribution between colliding molecules is done in the center-of-mass system (CM). The number of kinetic (translational) degrees of freedom of two colliding molecules in CM system () will be less than that in the laboratory system, since the CM system already has 3 translational degrees of freedom associated with its center of mass. Thus, the total number of kinetic degrees of freedom in CM system will be:
And the total number of dof in the CM system will be reduced accordingly: . The number of internal degrees of freedom in CM system remain the same as in the laboratory system: .
The procedure for calculating new velocities and internal energies in CM system during the collision of two molecules ('a' and 'b') is as follows:
where iea, ieb are the internal energies of molecules and respectively.
This is used to build the ratio of new to old velocities (see interact(...) function in domain.cc):
which are used to update the velocity vector for each molecule as:
where i=(x,y,z) is the Cartesian direction of velocity vector. The remaining internal energy, ie, is distribued among the internal degrees of freedom of each molecule X as:
It should be noted, that in the above calculations, the value of kinetic energy was that computed in CM frame of referecne. This means that he actual kinetic energy of the molecule will have a somewhat higher value that what would be expected from an equal distribution of energy among the internal and exeternal degrees of freedom. Nevertheles, this scheme is considered accurate, since the resistribution of energy is indeed taking place in the center-of-mass reference frame, and this will inevitably lead to a higher contribution of energy to kinetic degrees of freedom.
<boundary>tag of the XML input file (see Sec.Configuration File).
The algorithm uses the density and temperature to calculate the frequency of injection of molecules of specie, at the boundary. The injection frequency, per unit area, is computed as
where is the time interval at which a molecule hits the boundary area , and is the number of molecules in a volume with the base and length as shown in the figure:
The number of molecules, can be related to density, , as:
where is the mass of one molecule and . Thus, the frequency is: