<<

Winter 2013 Chem 254: Introductory

Chapter 3: The Math of Thermodynamics ...... 25 Derivatives of functions of a single variable ...... 25 Partial Derivatives ...... 26 Total Differentials ...... 28 Differential Forms ...... 31 Integrals ...... 32 Line Integrals ...... 32 Exact vs ...... 33 Definition of β and κ ...... 36 Dependence of U on T and V ...... 37 Dependence of H on T and P ...... 37 Derivations involving dH ...... 38

Relation between CP and CV (Exact) ...... 39 Joule Thompson Experiment ...... 39

Chapter 3: The Math of Thermodynamics

Derivatives of functions of a single variable

df f()() x h f x  lim dxh0 h instantaneous slope f()() x h  f x  h  lim h0 2h

(better if done on a computer with finite step size)

Often used derivatives df fx() dx xa axa1 eax aeax 1

ln(ax ) x ln(ax ) ln a ln x

Chapter 3: The Math of Thermodynamics 25

Winter 2013 Chem 254: Introductory Thermodynamics

sin(ax ) acos( ax ) cos(ax ) asin( ax )

Rules for Derivatives d df dg  f()() x g x    dx dx dx d df dg  f()()()() x g x  g x f x  Leibniz dx dx dx df df du ux()  dx du dx d Eg. sin(x22 ) cos( x )2 x dx

d 22 e2x 3 x e 2 x 3 x (4 x 3) dx df dg g()() x f x d f() x  dx dx Quotient Rule dx g() x gx()2

Partial Derivatives

f(,) x y depends on multiple variables eg. T(,,) x y z  the thermometer reading in a room f  Pronounced: di f , di x at constant y x y The change in function x -direction keeping y constant

Rules to take partial derivatives  same as in 1 dimension, treat remaining variable as constants

22 f(,) x y ex y x

f x22 y x ex(2 1) x y

f x22 y x  ey(2 ) y x f( x , y ) ln( x2 2 xy )

Chapter 3: The Math of ThermodynamicsChapter 3: The Math of Thermodynamics 26

Winter 2013 Chem 254: Introductory Thermodynamics

f 1 2 (2xy 2 ) x y x 2 xy f 1  2 (2x ) y x x 2 xy

Higher Partial Derivatives d2 f() x d df For one variable: 2   dx dx dx 2 dd2 12 Eg. 2ln(xx ) 2 2   2 dxdx  x x 2 ff   Partial derivatives: 2   x xx y y y 2 ff   2   y yy x x x

Mixed Derivatives  ff           x  y  y  y  xyy    x

f x2222 xy x xy e e(2 x 2 y ) x y

f x2222 xy x xy e e(2 x ) y x

 f  x2 2 xy  (e )(2 x 2 y ) y  x  y x y x

22 ex22 xy(2 x  2 y )(2 x )  e x xy (2)

 f  x2 2 xy   (ex )(2 ) x  y  x x y

22 ex22 xy(2 x  2 y )(2 x )  e x xy (2)  Order of derivatives does not matter  f 22 f  f   x  y  x  y  y  x x y

Chapter 3: The Math of ThermodynamicsChapter 3: The Math of Thermodynamics 27

Winter 2013 Chem 254: Introductory Thermodynamics

In mathematics  one would typically not write out what’s kept constant f f f instead of ; f(,,) x y z instead of  x x y x yz,

In Thermodynamics: ALWAYS write what is kept constant V V  ,  T Pn, T H

Total Differentials

 when 2 or more variables are not constant

One dimension df11 d23 f d f df dx  dx23  dx .... dx2! dx23 3! dx df  dx for dx infinitesimal dx

df f()() x dx  f x  dx x

Two dimensions ff df dx  dy  .... xyy x f(,)(,) x  x y   y  f x y ff df  x   y xy y xy x xy

x  in arbitrary direction  , We can calculate the change in function f (for small x , y ) y 

Chapter 3: The Math of ThermodynamicsChapter 3: The Math of Thermodynamics 28

Winter 2013 Chem 254: Introductory Thermodynamics

Curve f( x , y ) 0

ff df dx  dy  0 xyy x  Calculate how much does y change if x x dx f f   dy x y ff dx y x   dx dy  dx f xyy  dy f x   x y x y y 1 So  keeping f constant x f x  y f

Consider function f( x , y , z ) 0 (surface in 3 dimensions) ff z constant : dx dy 0 xyyz, zx, f  x y zx,.  y f z  x zy, ff    y constant:  dx   dz 0 xz y,, z   y x f  z x zy,.  x y f  z xy, ff x constant: dy dz 0 yzxz, xy,

Chapter 3: The Math of ThermodynamicsChapter 3: The Math of Thermodynamics 29

Winter 2013 Chem 254: Introductory Thermodynamics

f  y z xy,.  z x f  y zx, x  z    y  Cyclic Rule     1 for f( x , y , z ) 0 yz   x yx   z 

Proof:

f f f 3 1 y x z x  z    y  xz, yz, xy,      1 yz   x yx   z  f f f  x zy, z xy, y zx, From the cyclic rule y    z  1   y          z x   x  yx   x  z  y z Way to remember cyclic rule z   z   y      x yz  yx   x 

Application in Thermodynamics nRT n2 Van der Waals P  a  nRT() V  nb1  an 2 V 2 V nb V 2 P nR  TV V nb

P 2 2 3 nRT(  1)( V  nb )  an (  2) V V T V V : first derive V f(,) P T then find  (very hard) P T P T

V How do we calculate ? P T

Chapter 3: The Math of ThermodynamicsChapter 3: The Math of Thermodynamics 30

Winter 2013 Chem 254: Introductory Thermodynamics

V 1 We can use  P P T  V T VVP              ( 1) (cyclic rule) TPT PTV       PP         Calculate using above results TV VT  

Differential Forms

General (Pfaff): df gxydx(,)(,) hxydy f f Question: Is there a function F(,) x y such that g(,) x y   and h(,) x y  ? x y y x df dF  df F F Path final initial If F(,) x y associated with g(,)(,) x y dx h x y dy then:  g(,)(,) x y  h x y yxx y If this relationship holds: a function does exist If this relationship does not hold: does not exist

df gxydx(,)(,) hxydy is an if and only if

, otherwise it’s an inexact differential

If df is an exact differential  independent of path that runs between initial and final state

dU,,,, dH dS dG dA: exact differential qw, : inexact differential

Chapter 3: The Math of ThermodynamicsChapter 3: The Math of Thermodynamics 31

Winter 2013 Chem 254: Introductory Thermodynamics

Integrals

b n f( x ) dx lim f ( x1 ) dx (Area under function) a x 0  i1

f() xi  x = area for each rectangle

dF b Find function Fx() such that  fx()then: f()()() x dx F b F a dx a

Strategy for solving integrals 1) - guess solution, dF - verify the differentiation  fx()? dx - if not right  tinker with constants 2) - Look them up (books) or use math programs Examples in thermodynamics dF fx() Fx() dx

1 1 aa xaa ( 1) xa1 (a 1) x x a 1 (a  1) b bln x ln xb x

1 ax 1 ax eax e ae a a

Line Integrals

Consider differential df gxydx(,)(,) hxydy consider paths

y()() x P1 x and y()() x P2 x

df I df I in general II Px() 1 Px() 2 12 1 2

Chapter 3: The Math of ThermodynamicsChapter 3: The Math of Thermodynamics 32

Winter 2013 Chem 254: Introductory Thermodynamics

dP y()() x P x dy 1 dx 1 dx I gxydx(,)(,) hxydy  df 1 Path   

x2 dP I gxPxdxhxPx ,(),()   1 dx 1x  1 1 1 dx

x2 dP I gxPx ,(),() hxPx  1 dx 1x  1 1 1 dx x I 2 c() x dx  reduced to 1d integral 1 x 1 Likewise:

x2 dP I gxPx ,(),() hxPx  2 dx 2x  2 2 1 dx  integrals are different But: they are the same if and only df is an exact differential

If df exact differential then I1  I(,)(,) x yfinal I x y initial

Exact vs Inexact Differential

dd Inexact differential: g(,)(,) x y  h x y dyx  dx y df  gives results but depends on path Path

Real life example of exact differential: height differences on a mountain

It is clear the height difference is independent of how you get there

How do you get contours for map? Measure the height differences between neighbouring points

dh hxy dx h dy  measure in small steps h(,) x y defines height function of xy,

Real life example of Inexact differential: shoveling snow

Chapter 3: The Math of ThermodynamicsChapter 3: The Math of Thermodynamics 33

Winter 2013 Chem 254: Introductory Thermodynamics

d d dx d dy snow x y The amount of snow you shovel depends on

the path you take between points A and B Exact differential: df2 xydx x2 dy  (2xy ) ( x2 ) yxxy 22xx Therefore, is exact differential

 df is independent of path

dF dF 2 2  Fx() such that  2xy ;  x  F(,) x y x y dx y dy x

dP d() y x Px(): yx 1 1 1 dx dx dP d() y x2 Px(): yx 2 2 2x 2 dx dx

I gxydx(,)(,) hxydy 1 Path x1 dP gxPxdx ,(),() hxPx  1 dx x0 11dx 11 I2 x  xdx  x22  1 dx  3 x dx 1 00 1 x3 1 0 11 I2 x  x2 dx  x 2  2 xdx  4 x 3 dx 2 00 1 x4 1 (integral result is the same because exact differential) 0 2 F(,) x y x y IFFn (1,1)  (0,0)  1  0  1

Example of inexact differential: df x2 dx2 xydy ;

Chapter 3: The Math of ThermodynamicsChapter 3: The Math of Thermodynamics 34

Winter 2013 Chem 254: Introductory Thermodynamics

11 I x22 1 dx  2 xxdx   1  3 xdx 1 00 1 x3 1 0 11 I x2 dx 2 x  x 2  2 xdx  x 2  4 x 4 dx 2 00 1 41 1 4 17 xx35      1 3 50 3 5 15

 (x2 ) (2 xy ) ? yxxy

02y not equal, differential is not exact, II12 in general

F 2 F Does F(,) x y exist such that  x and  2xy ? x y y x

F 2 1 3  x  F x c x y 3

F 2  2xy F xy c Not equal y x

Hence: for inexact differentials, line integrals can be calculated, but results depends on path. True for qw, in thermo or shoveling snow!

Summary of rules from math

y 1 y    y    z         x z x x z   z  x   x  y  y z Exact differential: df gxydx(,)(,) hxydy  g(,)(,) x y  f x y yxx y df is independent of path Path

Chapter 3: The Math of ThermodynamicsChapter 3: The Math of Thermodynamics 35

Winter 2013 Chem 254: Introductory Thermodynamics

Back to Thermodynamics!

Definition of β and κ

1 V -1 Define:    in units K   0 usually VT P V  V   : Volumetric coefficient T P

1 V -1    in Bar   0 VP T V V  : Isothermal P T

For solids and liquids  and  are more or less constant

For gases and are not constant nRT : V  P 11V nR P      V TP P nRT T 11V nRT P     () 2   V PT P nRT P P 11    VVV  T  P T V  PPVV        T P              TVTV VTP       V    P T P   hard to measure obtain as T V  PP    dP  dT   dV TV VT  

Chapter 3: The Math of ThermodynamicsChapter 3: The Math of Thermodynamics 36

Winter 2013 Chem 254: Introductory Thermodynamics

 1 dV dT V f f1 f dV dP dT Path  i  i V

 1 Vf PT    ln  Vi

Vf ln  TP   Vi

Dependence of U on T and V

UU    dU  dT   dV TV VT   dU q w  : inexact differential

 q Pext dV assume constant

dU q  qVV  C dT

UCT V  if V constant U lim  CV T 0  T V U  CV T V

UP      TPTP      (will be derived later) VT T   

Dependence of H on T and P

H for constant H  qPP  C  T HH    lim CP T 0     TT PP   H HV     CP   TVVT    (1   ) T P PT TP   (to be derived later too)

Chapter 3: The Math of ThermodynamicsChapter 3: The Math of Thermodynamics 37

Winter 2013 Chem 254: Introductory Thermodynamics

For Ideal gases 1 1   ;   T P As expected UPP     TPTP       0 VTT T   HV    1   TVVT    (1  )  0 PTT TP  

Derivations involving dH

dH dU d() PV dH dU  VdP  PdV HHUU            dT   dP    dT    dV  VdP  PdV TPTV PTVT          HU       CPV dT   V  dP  C dT      P  dV PV TT      UP    Use  PT   (relation stated before) VT  TV   HP    CPV dT   V dP  C dT   T   dV PT TV    assume T is constant (some process) HP     V dP T   dV ( constant) PT TV   HPV        VTlim  P 0     PTP TVT       HPV         VT     now use cyclic rule PTP TVT       HV     VT   PT TP  

Chapter 3: The Math of ThermodynamicsChapter 3: The Math of Thermodynamics 38

Winter 2013 Chem 254: Introductory Thermodynamics

Relation between CP and CV (Exact)

HU       CPV dT   V  dP  C dT      P  dV PV TT      Assume P constant PV    CCTPV    TT VP    CCTV    PV   2 C C TV (exact) PV  For ideal gas

P   nRT  nR V   nRT  nR     ;     TTVV VV   TTPP PP   nR nR nRT  CPVV C  T  C   nR V P PV

CPV C nR (used and derived before)

Joule Thompson Experiment

T  CJT (Joule Thompson Coefficient, definition) P H HHT                CCP JT PTP TPH      

PP12 qtotal  0 qqI II H is constant during process

If H is constant:

Chapter 3: The Math of ThermodynamicsChapter 3: The Math of Thermodynamics 39

Winter 2013 Chem 254: Introductory Thermodynamics

TT21 T lim  CJT PP21 PPP21H H H  CP C JT  V  VT  P T 1 V CCP JT  measures    VT P

CJT  0 for ideal gases

Utotal  U I  U II  w P1 V 1 P 2 V 2 q  0

UPVUPVI 1  1   II  2  2   0

Since P1 and P2 are kept constant:

HHHtotal   I   II  0

Htotal is a constant

Joule-Thompson measurement in practice

Apply PP12 , T1 then measure T2 CJT 

CJT as a function of TP, 

Chapter 3: The Math of ThermodynamicsChapter 3: The Math of Thermodynamics 40