P1 = 200 [kPa] P2 = P1 T1 = 25 [C] m = 1 [kg] Fluid$ = 'R134a' v1 = volume(Fluid$, P=P1, T=T1) u1 = intEnergy(Fluid$, P=P1, T=T1) h1 = enthalpy(Fluid$, P=P1, T=T1)
EES is case-insensitive but uses ^ for power. 3. Implementing Iso-Processes in EES a) Isobaric (( P = constant )) Cengel rule: ( P_1 = P_2 ), ( Q - W_b = \Delta H ) (for closed system, often ( W_b = P\Delta V )).
P1 = 300 [kPa] T1 = 60 [C] m = 0.5 [kg] Fluid$ = 'Water' v1 = volume(Fluid$, P=P1, T=T1) u1 = intEnergy(Fluid$, P=P1, T=T1) s1 = entropy(Fluid$, P=P1, T=T1)
"Closed system boundary work" W_b = m * P1 * (v2 - v1) "kPa*m^3 = kJ" Engineering Equation Solver EES Cengel Thermo Iso
x = (v - v_f)/(v_g - v_f) "Or directly:" x = quality(Fluid$, P=P, h=h_mix) | Mistake | Correction | |---------|-------------| | Forgetting units | Use [kPa] , [C] , [kJ/kg] in comments or EES unit system | | Using P*v = R*T for steam | Use v = volume(Steam, P=P, T=T) | | Isentropic but wrong fluid | s2 = s1 only if reversible & adiabatic | | Confusing W_b sign | EES doesn’t enforce sign convention; write Q - W = ΔU | | Not initializing variables | EES solves iteratively; provide guesses if needed: T2 = 300 | 6. Example Problem: Cengel 7-41 (Isentropic Compression) Problem: Air at 100 kPa, 300 K is compressed isentropically to 1 MPa. Find final temp and work.
"Isentropic expansion" s2 = s1 h2s = enthalpy(Fluid$, P=P2, s=s2) T2s = temperature(Fluid$, P=P2, s=s2) x2s = quality(Fluid$, P=P2, s=s2) "If in two-phase"
"1st law" Q_in - W_b = m*(u2 - u1) Rule: ( v_1 = v_2 ), ( W_b = 0 ), ( Q = \Delta U ). P1 = 200 [kPa] P2 = P1 T1
v2 = v1 "Final pressure given" P2 = 500 [kPa] T2 = temperature(Fluid$, P=P2, v=v2) u2 = intEnergy(Fluid$, P=P2, v=v2)
"Steady-flow compressor work" w_comp_in = h2 - h1 "kJ/kg"
"Actual (given efficiency η=0.85)" η = 0.85 η = (h1 - h2a)/(h1 - h2s) h2a = h1 - η*(h1 - h2s) W_a = h1 - h2a EES replaces table lookup: P1 = 300 [kPa] T1 = 60 [C] m = 0
This is a specialized guide focused on using specifically for the Thermodynamics problem style found in Cengel’s textbooks (e.g., Thermodynamics: An Engineering Approach ), with emphasis on Iso (Isentropic, Isothermal, Isobaric, Isochoric) processes.
"Given" P1 = 100 [kPa] T1 = 300 [K] P2 = 1000 [kPa] Fluid$ = 'Air' "EES treats as ideal gas with var cp" s1 = entropy(Fluid$, P=P1, T=T1) "Isentropic" s2 = s1 T2 = temperature(Fluid$, P=P2, s=s2) h1 = enthalpy(Fluid$, T=T1) h2 = enthalpy(Fluid$, T=T2)
| Cengel Table | EES function | |--------------|---------------| | Saturated water T | v_f = volume(Water, T=T_sat, x=0) | | Saturated water P | h_g = enthalpy(Water, P=P_sat, x=1) | | Superheated | v = volume(R134a, T=T, P=P) | | Compressed liquid approx | h(T,P) ≈ h_f@T in EES: h = enthalpy(Fluid$, T=T, P=P) (EES corrects) |
"Isentropic turbine work" W_s = h1 - h2s "kJ/kg"