Just wanted to write on the topic Differential Equation of Thermodynamics after completing a book which I have mentioned in one of tweets which is Differential Equation of Thermodynamics
1. Fundamentals of Thermodynamics and Differential Forms
Thermodynamics studies energy transformations in systems, often described by state variables like pressure volume , temperature , internal energy , enthalpy , entropy , and Gibbs free energy . These variables are related through exact differentials, which form the basis for many differential equations in the field.
1.1 Exact and Inexact Differentials
In thermodynamics, differentials can be exact (path-independent, like () or inexact (path-dependent, like heat or work (). An exact differential satisfies (Maxwell’s relations derive from this).
We can visualize this by thinking of climbing a mountain. The change in altitude (potential energy) depends only on the starting and ending points, this is an exact differential. However, the number of steps you take or the energy you burn depends on the specific trail you choose. The represents an inexact differential.
For a function , the total differential is:
In contrast, inexact differentials like do not integrate to a state function without an integrating factor. For example, while heat depends on the path, dividing by temperature () acts as an integrating factor to yield entropy , which is path-independent.
1.2 First Law of Thermodynamics
The first law is essentially the conservation of energy applied to thermodynamic systems. It asserts that energy cannot be created or destroyed, only transferred between the system and its surroundings. The first law states that the change in internal energy equals heat added minus work done:
For reversible processes, and , so:
This is a fundamental differential equation relating . It combines the first and second laws into a single “fundamental relation.” This equation implies that if we know how internal energy changes with respect to entropy and volume, we know everything about the system’s thermodynamics. To find explicit forms, integrate or use partial derivatives.
Example: Derive the relation for enthalpy :
This shows as a function of and . The utility of enthalpy () becomes apparent in processes occurring at constant pressure (like most chemical reactions in an open beaker), where , simplifying the analysis significantly.
We can practice computing partial derivatives. From , it follows that and .
Apply Maxwell’s relations. From the second derivatives:
This connects thermal expansion and compressibility. This is a powerful result because it relates a quantity that is hard to measure (change in entropy with volume) to quantities that are easy to measure experimentally (change in temperature or pressure).
2. Ordinary Differential Equations in Thermodynamic Processes
Ordinary differential equations (ODEs) appear in idealized processes like isothermal or adiabatic expansions, where one variable changes with respect to another. These idealizations allow us to model complex engines and atmospheric phenomena using solvable equations.
2.1 Isothermal Processes
In an isothermal process for an ideal gas, is constant, and . Physically, this implies the system is in contact with a thermal reservoir that exchanges heat perfectly to maintain the temperature. The work done is found by integrating :
This is not an ODE per se, but for non-ideal gases, van der Waals equation leads to more complex integrals. The term accounts for intermolecular forces, and accounts for the finite volume of molecules, making the integration of work physically more realistic for high-pressure systems.
2.2 Adiabatic Processes
Adiabatic processes occur when the system is perfectly insulated or the process happens so fast that no heat is exchanged (). Examples include the rapid compression of air in a diesel engine or sound waves propagating through air.
For reversible adiabatic processes, , so . For ideal gases, , leading to the ODE:
where is the gas constant. Integrating both sides:
or , with .
To solve step-by-step:
- Start from . This equates the drop in internal energy to the work done by the system.
- Substitute for ideal gas.
- Rearrange:
- Integrate: , exponentiate to get the relation.
Consider polytropic processes, where . The ODE becomes:
solved similarly by integration. The index allows this single equation to generalize various processes: is isothermal, is adiabatic, and is isobaric.
2.3 Chemical Kinetics and Rate Equations
Thermodynamics tells us if a reaction can happen, but kinetics tells us how fast. In chemical thermodynamics, reaction rates follow ODEs. For a first-order reaction , the rate is solving to . This exponential decay is ubiquitous in nature, describing everything from radioactive decay to drug elimination in the body.
In equilibrium thermodynamics, the Van Hoff equation relates equilibrium constant to temperature:
This is a separable ODE. This equation is vital for industrial chemistry as it predicts how shifting temperature changes the yield of a product.
To solve:
- Separate: .
- Integrate: .
- If is constant, , the Arrhenius form.
Practice: Assume kJ/mol, J/mol·K. Find at different . Note that because the enthalpy change is positive (endothermic), increasing will increase .
3. Partial Differential Equations in Heat Transfer
Thermodynamics often involves spatial variations, leading to partial differential equations (PDEs). While ODEs deal with uniform systems changing in time, PDEs are necessary when properties like temperature vary across both time and space (e.g., a cooling rod).
3.1 The Heat Equation
Fourier’s law states heat flux , where is thermal conductivity. This is the thermodynamic equivalent of diffusion: heat flows from high concentration (hot) to low concentration (cold). Combining with energy conservation:
the heat equation , with . Here, is the thermal diffusivity—a measure of how quickly a material reacts to a change in temperature.
For one dimension: .
To solve for a rod with fixed ends at :
- Assume separation of variables: . This assumes the spatial profile and time evolution can be decoupled.
- Substitute: . The left side depends only on time, the right only on space; they must equal a constant .
- Solve ODEs: (boundary conditions give ), ) )
- General solution: .
Physically, this solution represents a superposition of sine waves. The higher frequency terms (large ) decay much faster due to the term in the exponential, meaning sharp temperature spikes smooth out very quickly.
3.2 Navier-Stokes Equations in Fluid Thermodynamics
In compressible fluids, the continuity equation couples with energy and momentum equations. This is where thermodynamics meets fluid dynamics. For ideal gases, the energy equation includes terms like .
This system of PDEs is nonlinear and challenging because the flow velocity affects the temperature (through convection and compression), and the temperature affects the flow (by changing density and pressure). For isentropic flow, simplify using . This simplification is often used in aerodynamics to model airflow over wings where heat transfer is negligible.
4. Applications: Nonequilibrium and Stochastic Thermodynamics
Classical thermodynamics deals with “dead” states (equilibrium)
4.1 Onsager Relations and Linear Response
In nonequilibrium thermodynamics, fluxes relate to forces via , where . This leads to coupled ODEs or PDEs, like in thermoelectric effects. This formalism allows us to understand cross-phenomena: how a temperature gradient can generate an electric voltage (Seebeck effect) or how a voltage can pump heat.
Example: Peltier effect involves , a system solvable via matrix methods.
4.2 Phase Transitions and Landau Theory
Near critical points, the Gibbs free energy expands as , where is order parameter. The order parameter is a measure of symmetry breaking—like the magnetization in a ferromagnet or the density difference in a liquid-gas transition. Minimizing gives ODE-like equilibrium conditions: .
For dynamics, the time-dependent Ginzburg-Landau equation is:
a stochastic PDE. Here, represents thermal noise. This equation describes how a system “rolls down” the energy landscape to find its stable state, while being buffeted by random thermal fluctuations.
To solve the specific part for ( ), steady state , yielding or for .
You can really deep dive more about this topic from here Link , although I tried to cover everything I have learned from this book
Here are my upcoming line up of write ups
- Boltzmann Distribution in Practice
- From Bernoulli to Softmax in Gibbs updates
- Energy Based Models from First Principles