Using the First Law of Thermodynamics

The following equations were derived using the first law of thermodynamics.  They can also be derived using the equation of energy.  Also see the previous page for an illustration of an adiabatic, frictionless process.

> restart;

> first:=dU=dW+dQ; The first law of thermodynamics

[Maple Math]

> dQ:=0; dW:=-P*dV; dQ is zero since the process is adiablatic. The second equation is the definition of work.

[Maple Math]

[Maple Math]

> dU:=Cv*dT; The definition of internal energy U for an ideal gas since U is a function of only T in this case.

[Maple Math]

> P:=R*T/V(T); The ideal gas law. V must be written as a function of T so that Maple can solve a differential equation later.

[Maple Math]

> R:=Cp-Cv; Cp:=Cv*gamma; The relationship between Cp and Cv for an ideal gas and the definition of gamma.

[Maple Math]

[Maple Math]

> simplify(first); The first law again, with the above substitutions.

[Maple Math]

> eqn:=subs(dV=dT*D(V)(T),simplify(first/dT/Cv)); A simple substitution so that Maple knows that dV/dT is the same as D(V)(T).

[Maple Math]

> sol:=dsolve(eqn,V(T)); Solve the differentiable equation.

[Maple Math]

> C1:=solve(sol,_C1); Solve for the constant renamed C1

[Maple Math]

> unassign('P'): unassign('R'); V(T):=R*T/P; Need to clear the variable names P and R so that Maple will keep it in terms of the P and R. Ideal gas law.

[Maple Math]

> simplify(C1); C1 with the above substitution.

[Maple Math]

> C2:=simplify(1/(C1/R)); R and C1 are constants. So dividing C1 by R and taking the reciprocal will still be a constant.

[Maple Math]

> C3:=simplify(C2^((gamma-1)/gamma),assume=positive); gamma is assumed to be constant, so raising C2 to the (gamma-1)/gamma power will still be a constant. This yields eqn. 10.5-74 in the text.

[Maple Math]

> T:=P*M/R/rho; The ideal gas law again.

[Maple Math]

> C4:=simplify((C3*M/R)^(-gamma),assume=positive); M, R, and gamma are all constants. So multiplying C3 by M and dividing by R and then raising it to the -gamma power will yield another constant. This gives eqn. 10.5-75 in the text.

[Maple Math]

>