Why “state variables” matter when you build things
In real devices—engines, compressors, heat exchangers, 3D-printer hot ends, coffee roasters, kilns, and battery packs—you constantly deal with energy moving around. Some of that energy shows up as a temperature change you can measure; some becomes mechanical work you can feel as torque; some disappears into the environment as heat loss; some is stored internally in the material. State variables are the bookkeeping tools that let you describe “what condition is the system in right now?” without needing to know the detailed path it took to get there.
For makers, the practical value is this: if you can describe a device’s working fluid or solid parts with a small set of state variables, you can predict what happens when you change a knob (heater power, fan speed, valve opening, load torque) and you can size components (heater wattage, insulation thickness, radiator area) with fewer trial-and-error iterations.
Energy in real devices: what you can store vs what you can transfer
Stored energy: internal energy and related properties
Every material stores energy in microscopic forms (molecular motion, vibration, chemical bonds). In thermodynamics this is captured by internal energy, usually written as U for a whole object or u per unit mass. You generally cannot measure internal energy directly with a sensor. Instead, you infer changes in it from measurable quantities like temperature and from energy transfers like electrical heating.
In many maker-relevant situations, changes in internal energy are well approximated by a heat capacity model: ΔU ≈ m·c·ΔT for solids and liquids over moderate temperature ranges, where m is mass and c is specific heat capacity. This is not a universal law; it is a useful engineering approximation when phase change and strong property variation are absent.
Energy you can transfer: heat and work
Energy crosses a system boundary mainly as heat (driven by temperature difference) and work (organized energy transfer such as shaft work, electrical work, or pressure–volume work). Heat and work are not properties “contained” in the system; they are ways energy moves. This distinction is why state variables are so helpful: a state variable belongs to the system at an instant, while heat/work describe interactions during a process.
Continue in our app.
You can listen to the audiobook with the screen off, receive a free certificate for this course, and also have access to 5,000 other free online courses.
Or continue reading below...Download the app
In real devices, you often have multiple transfer modes at once: electrical power into a heater cartridge (work), heat conduction into a metal block (heat), forced convection from a fan (heat), and mechanical work from a motor into a compressor (work). A clean model starts by defining the system boundary (the part you care about) and then listing which energy transfers cross that boundary.
Temperature: what it is, what it isn’t, and how it behaves in hardware
Temperature as a state variable
Temperature is a state variable that indicates the direction of spontaneous heat flow: heat tends to flow from higher temperature to lower temperature. In devices, temperature is the most commonly measured thermodynamic variable because sensors are cheap and robust. But temperature is not “how much heat is in something.” Two objects at the same temperature can store very different amounts of internal energy if their masses or heat capacities differ.
Thermal equilibrium and “lumped” temperature
Many calculations assume a part has a single uniform temperature (a lumped model). This is valid when internal conduction is fast compared to heat exchange with the environment. A thick steel plate on a small heater may have large gradients; a small aluminum block with good contact may be nearly uniform. If you treat a non-uniform part as lumped, your controller may overshoot because the sensor sees a local temperature that is not representative of the whole.
Sensor reality: temperature measurement is a process, not a state
A thermistor, RTD, or thermocouple does not instantly report the true temperature of the target. It reports its own junction temperature, which approaches the target temperature with some time constant and is influenced by heat conduction through wires, radiation to surroundings, and contact resistance. Practically, this means: mount sensors where the heat flow you care about actually goes, minimize parasitic conduction paths, and expect lag. If you are tuning a PID loop on a heater, the sensor’s time constant is part of the plant.
State variables you’ll actually use: P, V, T, m, and composition
Pressure, volume, and temperature for gases
For gases in makers’ devices (air in compressors, CO₂ in cartridges, refrigerants in cooling loops), the common state variables are pressure (P), temperature (T), and either volume (V) or density (ρ). If the gas behaves close to ideal, these variables are linked by an equation of state. In practice, many compressed-air applications are “ideal enough” at moderate pressures and temperatures, but you should be cautious as pressure rises, as temperature drops near condensation, or when using real refrigerants.
Mass matters: open vs closed systems
In a sealed vessel, mass is constant and you can focus on P, V, T. In a flowing device (air compressor, vacuum pump, pneumatic tool, hot-air rework station), mass enters and leaves. Then mass flow rate becomes central. Many practical problems are not about the total energy stored, but about energy per unit mass of flow and how quickly you can add or remove it.
Composition as a state variable (often ignored until it breaks your design)
Humidity in air, fuel–air ratio in burners, and solvent concentration in drying processes can change behavior dramatically. Two air streams at the same P and T can carry different amounts of water vapor, affecting condensation, corrosion, and heat transfer. If your device involves drying, heating moist air, or compressing air, treat humidity (or more generally composition) as a state descriptor, not an afterthought.
Internal energy vs enthalpy: which one shows up in real devices?
Why flowing devices “prefer” enthalpy
When a fluid flows through a device, it carries energy not only as internal energy but also as the ability to push its way into and out of control volumes. This is captured by enthalpy, written H (or h per unit mass). You don’t need to memorize derivations to use it: in many steady-flow components (nozzles, heaters, coolers, throttling valves), the energy balance becomes simpler when written in terms of enthalpy.
Practical rule: if you are analyzing a flowing fluid through a component, you will often track h rather than u. If you are analyzing a sealed object heating up (a metal block, a tank), you often track U (or use m·c·ΔT as an approximation).
What you can measure and what you look up
In a workshop setting you can measure P, T, and sometimes flow rate. Enthalpy and internal energy are typically obtained from property tables, software, or approximations (like constant specific heats). For air at moderate conditions, using constant specific heat to estimate enthalpy change from temperature change is often acceptable for design-level calculations.
Step-by-step: modeling a heated metal block (lumped thermal mass)
This pattern appears in hot ends, heated beds, soldering irons, small ovens, and heated tooling.
Step 1: define the system and what you want to predict
System: the metal block plus heater cartridge embedded in it (or treat the heater as an energy input). Goal: predict temperature rise over time and steady temperature under a given power and cooling condition.
Step 2: list energy inputs and losses
- Input: electrical power into heater, approximately Pin = V·I (or from a wattmeter).
- Losses: convection to air (fan/no fan), conduction into mounting structure, radiation to surroundings.
Step 3: choose a simple state variable model
Assume lumped temperature T(t) for the block. Stored energy change is m·c·dT/dt.
Step 4: write the energy balance
A practical first model is: m·c·dT/dt = Pin − Q̇loss(T). For many builds, approximate losses as linear in temperature difference: Q̇loss ≈ K·(T − Tamb), where K lumps convection, conduction, and radiation into one coefficient around the operating range.
Step 5: identify parameters experimentally
You can estimate m from weight, c from material data, and then fit K from a cool-down test: heat the block to a known temperature, cut power, and record T(t). The slope gives you information about K because during cool-down m·c·dT/dt ≈ −K·(T − Tamb).
Step 6: use the model for design decisions
- Need faster warm-up? Increase Pin or reduce m·c (smaller mass or lower heat capacity material), but watch temperature uniformity and stability.
- Need better temperature stability under airflow? Reduce K with insulation or shielding, or increase thermal mass (higher m·c) knowing it slows response.
- Need accurate control? Place the sensor where T best represents the controlled point and account for lag; consider a two-node model (heater-to-block, block-to-air) if overshoot persists.
Step-by-step: compressed air tank heating during filling (state variables in a real process)
Filling a compressed air tank is a classic maker scenario: you notice the tank gets hot while filling and cools afterward. The state variables P and T change together, and the path matters because heat transfer to the environment occurs during the fill.
Step 1: define the system
System: the air inside the tank (control mass if you consider the tank sealed after filling, but during filling it is an open system). Measurables: tank pressure (gauge), tank surface temperature (approximate), ambient temperature, fill time.
Step 2: recognize what changes the state
- Mass increases as air flows in.
- Energy enters with the incoming air (it has its own temperature and enthalpy).
- Heat leaves through the tank wall to ambient during and after filling.
Step 3: practical observations to guide design
- Fast filling tends to produce higher peak temperature because there is less time for heat to escape during the process.
- Higher peak temperature means higher pressure during filling; after cooling, pressure drops even if no air leaks.
- If you size a compressor or set cut-off pressure without considering cooling, you may end up with less usable air than expected at ambient temperature.
Step 4: simple measurement workflow
- Record initial P and T (ambient).
- Fill to a target gauge pressure quickly; record immediate post-fill pressure and surface temperature.
- Let the tank cool to ambient; record final pressure.
This experiment teaches a key point about state variables: the final state after cooling (P at ambient T) depends on the energy exchanges that occurred during filling, not just the peak pressure you saw. For practical use, the cooled pressure is the state you care about for tool runtime.
Step-by-step: diagnosing a heat exchanger or radiator with state variables
Whether it’s a PC water-cooling radiator, an oil cooler, or a DIY air-to-air heat exchanger, the core idea is the same: you have two streams exchanging energy, and you can characterize performance with inlet/outlet state variables.
Step 1: instrument the inlets and outlets
- Measure T at hot-side inlet and outlet.
- Measure T at cold-side inlet and outlet.
- Measure or estimate flow rates (pump curve, flow meter, or timed volume method for liquids).
Step 2: compute heat transfer rate from each side
For a liquid with roughly constant specific heat, estimate Q̇ ≈ ṁ·c·(Tin − Tout) for the hot side, and similarly for the cold side. In a good measurement, these two Q̇ values should be close; differences point to sensor error, heat loss to the environment, or unsteady conditions.
Step 3: use state-variable changes to find bottlenecks
- Large temperature drop on hot side but small rise on cold side can indicate heat loss to ambient or incorrect flow estimate.
- Small temperature changes on both sides can mean insufficient heat transfer area, poor airflow, or too high flow rates for the available surface area.
- If increasing fan speed changes outlet temperatures significantly, convection on the air side is limiting; if it barely changes, the liquid-side resistance or contact resistance may dominate.
Choosing the right “system”: control mass vs control volume in maker projects
Control mass (closed system) examples
- A sealed pressure vessel being heated or cooled.
- A metal part in an oven (if you ignore moisture loss).
- A battery cell during a short test (if you ignore venting and mass change).
In these cases, mass is fixed, and state variables like T and P (if applicable) describe the state. Energy accounting focuses on how U changes with heat/work interactions.
Control volume (open system) examples
- Air flowing through a heater or dryer.
- Water flowing through a radiator.
- Refrigerant through an expansion device.
- Compressed air through a regulator.
Here, mass crosses the boundary. You track inlet/outlet state variables and flow rates, and you often use enthalpy to relate temperature changes to energy transfer.
Real-device complications: non-idealities you should expect
Property variation with temperature
Specific heats, thermal conductivity, viscosity, and even density can change with temperature. In many workshop designs you can treat them as constant over a limited range, but if you push to high temperatures (kilns, exhaust systems) or cryogenic conditions, constant-property assumptions can fail and your predictions drift.
Phase change and latent energy
Boiling, condensation, melting, and evaporation can move large amounts of energy with little temperature change. If your device involves steam, refrigerants, or drying, temperature alone is not enough to infer stored energy. State description must include phase (or quality for two-phase mixtures) and composition (e.g., humidity ratio).
Pressure drops and flow restrictions
In flowing systems, pressure is not uniform. A pressure gauge at the compressor outlet does not tell you the pressure at the tool if hoses and fittings cause significant drop. Since P is a state variable, you must measure it at the location relevant to the state you care about. For diagnosing, measure P upstream and downstream of suspected restrictions and compare under flow.
Thermal contact resistance
Two solids in contact do not automatically share temperature well. Surface roughness, clamping force, and thermal interface materials matter. In a hot end, poor contact between heater cartridge and block can cause the heater to run much hotter than the measured block temperature, reducing heater life and causing control instability. Treat “contact quality” as a design variable: ream holes properly, use appropriate thermal paste if compatible, and clamp securely.
Practical checklist: using state variables to debug a device
1) Identify the state you care about
- For a heater: target temperature at the work surface, not just near the sensor.
- For pneumatics: pressure at the actuator under flow, not static tank pressure.
- For cooling: component junction temperature, not only coolant temperature.
2) Decide what variables define that state
- Solids: usually T (and sometimes moisture content).
- Single-phase liquids: T and sometimes pressure (for boiling margin).
- Gases: P and T plus humidity/composition when relevant.
3) Measure at the right locations
- Place temperature sensors where heat actually enters/leaves the subsystem.
- Place pressure taps where flow is representative; avoid dead-end pockets.
- Measure ambient conditions; “room temperature” is often not constant near machines.
4) Look for consistency between energy and state changes
- If electrical input is high but temperature rise is small, losses (K) are large or heat is going somewhere else (conduction into a mount).
- If pressure changes without expected temperature change, check sensor placement and consider leaks or throttling effects.
- If outlet temperatures imply more heat removed than the heater supplies, your flow estimate or sensor calibration is wrong.
Minimal math toolkit (with maker-friendly interpretation)
Stored energy (lumped solid/liquid, no phase change): ΔU ≈ m * c * ΔT [J] (approximation) Electrical power input: P_in = V * I [W] Heat transfer rate from temperature change in a flowing stream: Qdot ≈ mdot * c * (T_in - T_out) [W] First-order lumped thermal model: m * c * dT/dt = P_in - K * (T - T_amb) Interpretation: m·c is thermal inertia (how hard it is to change temperature). K is how strongly the environment pulls temperature back toward ambient. Pin is how hard you push temperature upward. These three quantities—two properties and one input—explain most “why does my heater overshoot / why can’t it reach temperature / why does it cool so fast” questions.