The free energy of Gibbs is a thermodynamic function that is formulated under the on control of the temperature and pressure. This basic thermodynamic function has importance especially in predicting spontaneous direction of chemical reactions. Its absolute value is indicative about the direction of the chemical reaction. For example, a positive value of this function usually signifies a non-spontaneous direction of the chemical reaction.

Also a negative value of this thermodynamic function is usually indicative of a spontaneous process of the thermodynamic reaction. A zero value of the free energy of Gibbs usually signifies an equilibrium state of the chemical reaction. Therefore, this thermodynamic function is predominantly used to predict the direction of spontaneity of thermodynamic processes.

In this article there will be a derivation of the equation of an ideal gas of photons based on the recent theory of photons that are related through an equation of forces and velocities of light photons.

The free energy of Gibbs has the following general mathematical structure:

** G=H-TS**

It can be shown that at constant temperature the free energy of gibbs has the following differential form:

** dG=VdP**

This expression is correct for an ideal gas at constant temperature.

By using the ideal gas law:

**PV=nRT **

One can isolate V in terms of the other components so that one has the following expression:

**V=nRT/P**

By substituting this value of V into the equation of dG one gets:

**dG=nRT*dP/P**

By integrating both sides of the equation one gets the following formula for G:

**G = nRT*ln(P2/P1)**

We know however from previous work the following equation:

**F1*L=nRT*ln(V2/V1)**

We can change the Pressure function in the mathematical expression for G to the volume using the ideal gas equation:

**PV=nRT**

By doing so the mathematical expression for G looks now like this:

**G = nRT*ln(V1/V2)**

We want now to write the expression of G in terms of parameters of the photon equation of forces.

By doing so one gets the following mathematical expression:

**G = -F1*L**

This simple mathematical expression relates the free energy of Gibbs of an ideal gas of photons to the force F1 in terms

of the work that is done by this force along the distance L.

If the force F1 sign is positive then this means that the G is negative and the process that involves the photons is spontaneous. If the sign of the force F1 is negative then this means that the value of G is positive and the process that involves the photons is then non-spontaneous.

Next I would like to calculate the heat capacity of an ideal gas of photons:

The concept of heat capacity is derived from the thermodynamic science and is a thermodynamic quantity that is defined as the rate of change of the energy of the given system as a function of temperature. There are two variations of heat capacities. One is defined at constant volume and the other is defined at constant pressure. Heat capacity is a measure of the given system's ability to absorb heat as a function of the change in temperature.

Usually large value of the heat capacity means that the system is able to absorb much heat without significant change in the temperature of the system. An example of such a system is the molecule of water which has high value of its heat capacity. Small value of the heat capacity usually means that a dramatic change in the temperature of the system is associated with little absorbance of heat from the surrounding. In what follows the mathematical expressions of both heat capacities at constant volume and pressure will be derived for an ideal gas of photons.

We start from the relativistic energy equation of a photon and differentiate it with respect to the temperature T. Thus:

**E=pc**

Differentiating with respect to T gives

**dE/dT=(dp/dT)*c**

The first term is nothing but the heat capacity at constant volume Cv. Thus we have:

**Cv=(dp/dT)*c**

Dp/dT does not have any significant physical value. Therefore we try to change the differentiation of p fromT to t which

is the time. Thus we get:

**Cv=(dp/dt)*(dt/dT)*c**

Dp/dt is known as the force F1. Dt/dT is the inverse of the rate of change of temperature as a function of time. This is

still a not convenient expression. Therefore we change the differentiation from T to r which is the displacement. Thus we get:

**Cv=(dp/dt)*c/(dT/dt)**

Changing the differentiation of T from t to r gives

**Cv=(dp/dt)*c/{(dT/dr)*(dr/dt)}**

This expression has more familiar terms that have physical significance.

**Dp/dt is the force F1**

Dr/dt is the expression of the velocity and

dT/dr is the rate of change of temperature as a function of the place. This is a well known term in the equation for heat

conduction:

**Q=k*(dT/dr)**

Thus the final expression of Cv looks like this:

**Cv=F1*c/{(Q/K)*v}=F1*c*K/(Q*v)**

Here Q is the heat that is conducted in the system.

Now an expression for Cp or the heat capacity at constant pressure will be derived.

At constant pressure we have:

**Q=H=E+PV**

Cp is by definition the rate of change of the heat at constant pressure as a function of temperature. Thus one has:

**dQ/dT=Cp=dH/dT=dE+d(PV)**

**Cp=dE/dT+d(PV)/dT**

For an ideal gas of photons we have:

**dE/dT=Cv **and at constant pressure we have

**d(PV)=P*dV/dT **Thus we obtain:

**Cp=Cv+P*(dV/dT)**

We get then an expression for dV/dT from the equation of the ideal gas: PV=nRT Thus we obtain:

** dV/dT=nR/P**

Substituting this expression for dV/dT in the above equation for Cp we get:

**Cp=Cv + nR**

We rmember that:

**Cv = F1*c*K/(Q*v). **Thus we obtain the following epression for Cp:

** Cp = F1*c*K/{Q*v} + nR**