Chemical Engineering Tutorials

Wednesday, 31 December 2025

Maxwell Relations

Background

Maxwell’s equations are important for electric and magnetic fields, while Maxwell’s relations focus on thermodynamic quantities like temperature, pressure, volume, and entropy and are important when analyzing thermodynamic systems like internal combustion engines.

Like Maxwell’s equations, Maxwell’s relations are based on partial derivatives. The relations describe the symmetry of second-order partial derivatives of thermodynamic quantities. Maxwell’s relations directly and indirectly cover eight thermodynamic quantities including:

  • pressure (P),
  • volume (V),
  • temperature (T),
  • entropy (S) measured in Joules per Kelvin (J/K),
  • internal energy (U) measured in Joules,
  • enthalpy (H),
  • Helmholtz free energy (F or A),
  • Gibbs free energy (G).

P, V, and T are simple quantities while the other thermodynamic quantities are more complex, thus Maxwell’s relations are very important.

For example, enthalpy (H) measures a system’s total heat content is defined as the sum of its internal energy (U) plus the product of pressure (P) and volume (V): H = U + PV.

Helmholtz free energy (F) measures the useful work obtainable from a closed system at constant temperature and volume and is defined as F = U – TS.

Gibbs free energy (G) is used to predict the spontaneity of a process at a given temperature and is defined as G = H – TS, or ∂G = ∂H – T∂S:

  • When ∂G < 0, the process is spontaneous (favored).
  • When ∂G > 0, the process is non-spontaneous (not favored).
  • If ∂G = 0, the process is at equilibrium.


Mathematical Derivations of Maxwell's Relations

To derive Maxwell’s relations, it is useful to combine the First and Second Laws into a single mathematical statement. In order to do that, one notes that since:

for a reversible process: dq = TdS

Since: dw = TdS – pdV

for a reversible expansion in which only p-V works is done, and since dU = dq + dw

dU = TdS – pdV         (1)

This differential for dU can be used to simplify the differentials for H, A (Helmholtz energy) and G. But it is even more useful due to the constraints it places on the variables T, S, p and V due to the mathematics of exact differentials. 

Equation 1 suggests that the natural variables of internal energy are S and V or simply U (S, V). Thus, the total differential (dU) in equation 1 can be expressed as follows:

By studying equations 1 and 2, we can see that:

Since dU is an exact differential, the Euler relation must hold that:


substituting equations 3 and 4 into the above expression:


This is an example of a Maxwell Relation.

A similar result can be derived based on the definition of H:

H = U + pV

Using chain rule and differentiating d(pV) results in:

dH = dU + pdV + Vdp

Making the substitution using the combined first and second laws (dU = TdS - pdV) for a reversible change involving on expansion (p-V) work:

dH = TdS – pdV + pdV + Vdp

dH = TdS + Vdp         (5)

As in the case of internal energy, this suggests that the natural variables of H are S and p. Thus, 

If we compare equation 5 and 6 we get:


We can now see that equation 3 and equation 7 are equal to T hence are equal to each other:

Furthermore, the Euler Relation must also hold true:

This is the Maxwell Relation of H. The same can be done for G and A.


Summary

Maxwell Relations are summarized below:












Fundamentals of Partial Differentiation of the Exact Differential Equation

Carrying out partial differentiation of the Exact Differential Equation of M and N with respect to z and y, respectively, results in:


dx is a perfect differential when the above equation is satisfied for any function x.

Similarly, if y = y(x, z) and z = z(x, y), then from these two relations, we have:



In terms of p, v and T, the following relation holds true:









Wednesday, 17 December 2025

Thermodynamic Relations

Some properties like temperature, pressure, volume, and mass can be measured directly while other properties like density and specific volume can be determined from these using some simple relations.

However, properties like internal energy, enthalpy, and entropy are not so easy to determine as they cannot be measured directly or related to easily measurable properties through some simple relations.

Thus, it is important to develop some fundamental relations between commonly encountered thermodynamic properties and express the properties that cannot be measured directly in terms of easily measurable properties.

Partial Derivatives and Associated Relations

Most basic thermodynamic relations involve differentials. Let us consider a function f that depends on a single variable x, i.e., f = f(x) as shown below:


The derivative of the function at a point defined as Slope expressed as:


Therefore, the derivative of a function f(x) with respect to x represents the rate of change of f with x.

Let us now consider a function that depends on two (or more) variables, such as z = z(x, y). This time the value of z depends on both x and y.

It is sometimes necessary to examine the dependence of z on only one of the variables by allowing one variable to change while holding the others constant and observing the change in the function.

The variation of z(x, y) with x when y is held constant is called the partial derivative of z with respect to x, and it is expressed as:


To obtain a relation for the total differential change in z(x, y) for simultaneous changes in x and y would be:


The above equation is the fundamental relation for the total differential of a dependent variable in terms of its partial derivatives with respect to the independent variables. This relation can easily be extended to include more independent variables.

An important relation for partial derivatives is used in calculus to test whether a differential dz is exact or inexact. In thermodynamics, this relation forms the basis for the development of the Maxwell relations which was discussed in a previous blog entry here where dz is replaced by dφ.

We can now develop two important relations for partial derivatives – the reciprocity and the cyclic relations.

The function z = z(x, y) can also be expressed as x = x(y, z) if y and z are taken to be the independent variables. Then the total differential of x becomes:


Eliminating dx from the above equation by combining the dz and dx equations we get:


The variables y and z are independent of each other and thus can be varied independently. For example, y can be held constant (dy = 0), and z can be varied over a range of values (dz ≠ 0). Therefore, for this equation to be valid at all times, the terms in the brackets must equal zero, regardless of the values of y and z. 

Setting the terms in each bracket of the above equation equal to zero gives two equations:


This equation is called the
reciprocity relation, and it shows that the inverse of a partial derivative is equal to its reciprocal.



This equation is called the cyclic relation, and it is frequently used in thermodynamics.








Thursday, 20 November 2025

Relationship Between Heat Transfer and the First Law of Thermodynamics

  • Thermodynamics and heat transfer are complementary engineering subjects, each addressing different aspects of energy behavior in systems.
  • In thermodynamics, heat is treated as a form of energy transfer used to analyze system states and energy requirements, but the theory does not address how heat actually flows or at what rate.
  • Heat transfer provides the engineering tools and rate equations needed to quantify heat-flow mechanisms (conduction, convection, radiation) and determine heat-exchange rates.
  • Practical engineering design problems—such as sizing equipment, components, or entire systems—require heat-transfer analysis in addition to thermodynamic principles.
  • Example: Designing and sizing a power plant cannot be accomplished using thermodynamics alone; engineers must apply heat-transfer principles to ensure feasible and efficient operation.

Relationship to the First Law of Thermodynamics (Conservation of Energy)

The first law of thermodynamics states that energy is conserved within a system. A system's energy can only change if energy crosses its boundaries.

For a closed system (fixed mass), there are only two mechanisms for energy transfer:

  • Heat transfer across the system boundaries. 
  • Work done by or on the system

These concepts form the standard mathematical statement of the first law for closed systems, as introduced in foundational thermodynamics courses:


Where ΔEsttot is the change in the total energy stored in the system, Q is the net heat transferred to the system, and W is the net work done by the system. This is schematically illustrated as follows: 

Figure 1

The first law of thermodynamics also applies to a control volume (open system), where mass can cross the system boundaries.
When mass enters or leaves a control volume, it carries energy with it — a process known as energy advectionEnergy advection becomes a third mechanism for energy transfer in addition to heat transfer and work. Thus, for both closed systems and control volumes, the first law states that the change in system energy equals the net energy transferred across its boundaries.

First Law of Thermodynamics over a Time Interval (Δt)

A refresher for the 1st law of Thermodynamics:

1. The change in energy within a control volume is equal to the energy flowing into it minus the energy flowing out.

Energy can cross a control volume boundary through heat transfer, work, and energy advection (energy carried by mass flow). The first law of thermodynamics deals with total energy, which includes:

  • Mechanical energy: kinetic + potential
  • Internal energy: thermal energy plus chemical, nuclear, and other internal forms

In heat-transfer analysis, attention is mainly on thermal and mechanical energy. These two forms are not conserved on their own because they can be produced or consumed through conversions with other energy forms. Examples:

  • Chemical reactions can decrease chemical energy and increase thermal energy.
  • Electric motors convert electrical energy into mechanical energy.

These conversions can be viewed as thermal or mechanical energy generation (positive or negative). Therefore, a tailored form of the first law is needed for heat-transfer applications, accounting for these energy conversions.

Thermal and Mechanical Energy Equation over a Time Interval (Δt)

2. The rise in thermal and mechanical energy within a control volume equals the energy entering it, minus the energy leaving it, plus any thermal or mechanical energy produced inside the control volume.

This relation is written for a time period Δt, with all energy quantities expressed in joules. Because the first law must hold at every moment, it can also be written in terms of energy rates. In other words, at any instant, the rates of energy transfer must balance, with all terms expressed in joules per second (watts).

Thermal and Mechanical Energy Equation at an Instant (t)

3. The rate at which thermal and mechanical energy accumulates in a control volume equals the rate at which it enters, minus the rate at which it leaves, plus the rate at which it is produced inside the control volume.

If the combined inflow and generation of thermal and mechanical energy are greater than the outflow, the energy stored in the control volume will increase. If the outflow exceeds inflow and generation, the stored energy will decrease. When inflow and generation exactly match outflow, the system reaches a steady state, with no change in stored thermal and mechanical energy.


Let use now define the statement in italics and try to express it as an equation. let E stand for the sum of thermal and mechanical energy. Using the subscript st to represent energy stored in the control volume, the change in thermal and mechanical energy stored over the time interval Δt is then ΔEst. The subscripts in and out refer to energy entering and leaving the control volume. Finally, thermal and mechanical energy generation is given the symbol Eg. Thus statement 1 is:

Statement 2 is represented as figure (b) in Figure 1 and is expressed as:

The above two equations are essential tools for solving heat transfer problems. Applying the first law begins with identifying an appropriate control volume and its control surface. The analysis typically follows a series of steps:

  • the control surface is indicated, often by a dashed line;
  • a decision is made whether to perform the analysis over a time interval Δt or on a rate basis, depending on the problem’s objectives and the form of the given data; finally,
  • the relevant energy terms for the specific problem are identified.

The remainder of the section focuses on clarifying these energy terms to help develop confidence in applying them.

  • Stored thermal and mechanical energy, Est.
  • Thermal and mechanical energy generation, Eg.
  • Thermal and mechanical energy transport across the control surfaces, that is, the inflow and outflow terms, Ein and Eout.

the stored thermal and mechanical energy is given by:

Est = Kinetic Energy (KE) + Potential Energy (PE) + thermal energy (Ut)

where Ut = Sensible Energy (Usens) + Latent Enegry (Ulat) In many problems, the only relevant energy term will be the sensible energy, that is, Est = Usens.

The energy generation term is associated with conversion from some other form of internal energy (chemical, electrical, electromagnetic, or nuclear) to thermal or mechanical energy.

The inflow and outflow terms are surface phenomena. That is, they are associated exclusively with processes occurring at the control surface and are generally proportional to the surface area.

When the first law is applied to a control volume with fluid crossing its boundary, the work term is typically divided into two components. The first, called flow work, arises from pressure forces moving the fluid through the boundary and, for a unit mass, is equal to the product of the pressure and the fluid’s specific volume (pv). Under steady-state conditions (dEst/dt = 0), with no thermal or mechanical energy generation, the first law simplifies to the steady-flow energy equation. The equation for statement 2 becomes:


In most open system applications, changes in latent energy between the inflow and outflow conditions of the above equation may be neglected, thus the thermal energy reduces to only the sensible component.

If the fluid is approximated as an ideal gas with constant specific heats, the difference in enthalpies (per unit mass) between the inlet and outlet flows may then be expressed as:

(iin  iout) = cp(Tin - Tout)

Where:

  • cp is the specific heat at constant pressure
  • Tin and Tout are the inlet and outlet temperatures, respectively.
  • If the fluid is an incompressible liquid, its specific heats at constant pressure and volume are equal, cp = cv = c,

Thus, for the above equation, the change in sensible energy (per unit mass) reduces to

(ut,in - ut,out) = c(Tin - Tout).

Unless the pressure drop is extremely large, the difference in flow work terms, (pv)in = (pv)out, is negligible for a liquid.

Having already assumed steady-state conditions, no changes in latent energy, and no thermal or mechanical energy generation, the simplified steady-flow thermal energy equation is obtained as follows:





Tuesday, 4 November 2025

SPECIAL MATHEMATICAL FUNCTIONS

Legendre’s Differential Equation

The differential equation, 

where n is a real constant known as Legendre’s equation of order n. When n is a nonnegative integer, i.e., n = 0, 1, 2, …., one solution of the above equation is called the Legendre polynomial (or Legendre function of the first kind) of degree n and is represented by Pn(x). The functions Pn(x) are expressed as follows:

Legendre polynomials are orthogonal with each other, i.e.,

The second solution of the Legendre equation is denoted by Qn(x) and is called the Legendre function of the second kind of order n. The functions Qn(x) are expressed as follows:

where An and Bn are suitably chosen constants. In particular:


Therefore, the general solution of Legendre’s differential equation is expressed as follows:

The substitution x = cos θ transforms Legendre’s equation into the following form:

The solution of Eq. (11) is given by

Legendre’s Associated Differential Equation

The differential equation:

where m and n are nonnegative integers, is known as Legendre’s associated equation of order n. Solutions of this equation are called associated Legendre functions. The general solution is:

where Pnm (x) and Qnm (x) are called the associated Legendre function of the first kind and associated Legendre function of the second kind, respectively. Associated Legendre functions of the first kind are defined by:

Associated Legendre functions of the first kind are orthogonal with each other, i.e.,

Associated Legendre functions of the second kind are defined by:

The substitution x = cos θ transforms Legendre’s associated differential equation into the equation:

which is satisfied by Pnm (cos θ) and Qnm (cos θ)

Hermite's Differential Equation

The differential equation:

where n is a real constant, is known as Hermite’s equation of order n. If n is a nonnegative integer, i.e., n = 0, 1, 2, ….. then solutions of Hermite’s equation are Hermite polynomials Hn(x) given by:

Hermite polynomials are orthogonal with each other, i.e.,

Laguerre's Differential Equation

The differential equation:

where n is a real constant, is known as Laguerre’s equation of order n. If n is a nonnegative integer, i.e., n = 0, 1, 2, ….., then solutions of Laguerre’s equation are Laguerre polynomials Ln(x) given by:

Laguerre polynomials are orthogonal with each other, i.e.,


Chebyshev's Differential Equation

The differential equation:

is known as Chebyshev’s equation of order n. The general solution of Chebyshev’s differential equation is:


where Tn(x) and Sn(x) are called the Chebyshev polynomials of the first kind and Chebyshev polynomials of the second kind, respectively. Chebyshev polynomial of the first kind is defined by:

Chebyshev polynomials of the first kind are orthogonal with each other, i.e.,

Chebyshev polynomial of the second kind Sn(x) is defined by:


Chebyshev polynomials of the second kind are orthogonal with each other, i.e.,




Maxwell Relations

Background Maxwell’s equations are important for electric and magnetic fields, while Maxwell’s relations focus on thermodynamic quantities l...