thermo math

Upload: anshu-kumar-gupta

Post on 04-Apr-2018

213 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/30/2019 Thermo Math

    1/13

    1

    Author: Deepak Gupta, Department of Materials Science & Engineering, IIT Kanpur

    Useful Mathematics to Recall for Thermodynamics

    Before we start, first become comfortable with usage of the symbols. We are going to

    encounter forms such as,VP

    T

    ,

    SVT

    ,UP

    T

    ,

    PST

    It is important to recognize is that in all four cases, a) T is temperature, b) but the numerical

    value of temperature, also denoted as T, is given by

    )P,S(T)U,P(T)S,V(T)V,P(TT , c) this we know because inVP

    T

    implies T is a

    function of )V,P( only and similarly we deduce from the remaining partial derivatives, d)

    but also that )V,P(T will have a different functional form than )S,V(T . Hence, functionally

    they are all different.

    In short, in the function for temperature )V,P(T you can plug in value of P and V and get a

    numerical value of temperature T. And you can get the same numerical value of T if you

    plug in values of V and S in a different function T(V,S). That is, symbol T is being used for

    temperature and also for function T which maps independent variables to actual temperature.

    Also, the form of partial derivative in use tells us which ones are the independent variables.

    Assumption: Everything below is for well-behaved functions that are both continuous and

    differentiable in the domain of interest.

    1. Chain rule for partial differentiationConsider a function U(x,y) of independent variables x and y which maps these values to a

    quantity U. But, the independent variables of this function themselves depend on another set

    of variables s and t. Thus, U=U(x,y) and x=x(s,t), y=y(s,t).

    Then you should be able to recognize

    (a) dyy

    Udx

    x

    UdU

    xy

    (1)

    (b)SxSyS

    t

    y

    y

    U

    t

    x

    x

    U

    t

    U

    (2)

    (c)txtyt

    s

    y

    y

    U

    s

    x

    x

    U

    s

    U

    (3)

    From these, you should derive the following identities which will be useful in

    thermodynamics.

  • 7/30/2019 Thermo Math

    2/13

    2

    Author: Deepak Gupta, Department of Materials Science & Engineering, IIT Kanpur

    Reciprocity 1x

    y

    y

    x

    zz

    (4)

    and cyclic differentiation 1

    x

    z

    z

    y

    y

    x

    yxZ

    (5)

    To see how these might be useful, now let us work out a thermodynamic problem. For the

    definitionsP

    pT

    STC

    andV

    vT

    STC

    prove thatPT

    vpT

    V

    V

    STCC

    If we look at what we are asked to prove, the functions involved seem to be S(T,P) and

    S(T,V)

    Let us work with )T,V(S . From eq. (1),

    dTT

    SdV

    V

    SdS

    VT

    or dTT

    CdV

    V

    SdS v

    T

    ,

    Now we already have vC in the equation above and since pC involvesPT

    S

    , let us evaluate

    that from equation above. Using eq. (2) or (3),

    P

    v

    PTP T

    T

    T

    C

    T

    V

    V

    S

    T

    S

    ThereforeT

    C

    T

    V

    V

    S

    T

    Cv

    PT

    p

    orPT

    vpT

    V

    V

    STCC

    2. Exact and inexact differentialsLet us work in two dimensions, though generalization is possible. The statement of

    importance is that a differential

    dy)y,x(Ydx)y,x(Xdf (6)

    is exact (or total), and hence can be integrated without any path dependence, if and only if

  • 7/30/2019 Thermo Math

    3/13

    3

    Author: Deepak Gupta, Department of Materials Science & Engineering, IIT Kanpur

    x

    )y,x(Y

    y

    )y,x(X

    *(7)

    Alternatively, if and only if the identity in eq. (7) is true, there exists a function )y,x(f and

    then the total differential would be,

    dyy

    fdx

    x

    fdf

    xy

    Proof :

    If we assume integratibility, then such function f(x,y) exists. Hence, we can associate X(x,y)

    and Y(x,y) withyx

    f)y,x(X

    andx

    y

    f)y,x(Y

    .

    And since order of differentiation can be interchanged for well-behaved function, that is,

    y

    f

    xx

    f

    y

    Therefore,

    y

    X

    x

    Y

    . Meaning that if eq. (6) can be integrated, then identity in (7) will be

    true.

    Conversely, now we assume yX

    xY to be true and we find f (x, y), which will also be a

    proof that eq. (6) and be integrated.

    Choose a function f(x,y) ,such that

    )y,x(Xx

    f

    y

    (8)

    Therefore,

    x

    a

    )y(d)y,(X)y,x(f (9)

    Now impose the condition

    )y,x(Yy

    f

    x

    (10)

    *Now I am beginning to take liberty with partial differentiation, in not writing what variable is being held

    constant. That should be considered implied, though it will be a good practice for you to explicitly write it. I am

    taking liberty only so that you get used to reading other persons work.

  • 7/30/2019 Thermo Math

    4/13

    4

    Author: Deepak Gupta, Department of Materials Science & Engineering, IIT Kanpur

    And prove that )y( can be found, which also means f(x,y) is completely defined through eq.

    9.

    The italicized portion below can be ignored for now, and then you can come back and read it

    after the complete proof.

    In the following I am deriving a condition that if eq. (7) is true then function )y( can be

    found. If you followed the advice above, by now you would have anyways found that

    function; in this section, without explicitly finding the function, I am only proving that it can

    be found if eq. (7) were true.

    So make function )y,x(f in eq. (9) satisfy the same condition as in eq. (10),

    )y,x(Yyf

    From eq. (9), evaluate its partial derivative of f(x,y) with respect to y and equate to Y(x,y).

    )y,x(Ydy

    )y(d]d)y,(X[

    yy

    )y,x(fx

    a

    After rearranging,

    ]d)y,(X[y

    )y,x(Ydy

    )y(d x

    a

    Therefore, dy]d)y,(X[y

    )y,x(Y)y(

    x

    a

    This integration can be carried out only if integrand is not a function of x

    Therefore, 0]d)y,(X

    y

    )y,x(Y[

    x

    x

    a

    or

    x

    a

    d)y,(Xyxx

    )y,x(Y=

    x

    a

    d)y,(Xxy

    =y

    )y,x(X

    This was the initial assumption; therefore integration of eq. (6) will be possible when

    y

    X

    x

    Y

  • 7/30/2019 Thermo Math

    5/13

    5

    Author: Deepak Gupta, Department of Materials Science & Engineering, IIT Kanpur

    So from eq. (9) and (10),

    )y,x(Ydy

    )y(dd

    y

    )y,(X

    y

    fx

    a

    Since eq. (7) is assumed to be true, replacey

    )y,(X

    by )y,(Y

    , so that

    )y,x(Ydy

    )y(dd

    )y,(Y

    y

    fx

    a

    )y,x(Ydy

    )y(d)y,a(Y)y,x(Y

    or, )y,a(Ydy

    )y(d .

    Hence, y

    b

    d),a(Y)y(

    and x

    a

    y

    b

    d),a(Yd)y,(X)y,x(f . (11)

    Thus, if eq. (7), were true, we have found the function by integrating eq. (6).

    Now let us see a use of this. For example, if chemical potential for a pure gas is defined as

    dT)T,P(sdP)T,P(v)T,P(dg

    Then from eq. (11), we can immediately write

    P

    P

    T

    0

    Cdt)t,P(sdp)T,p(v)T,P(g (12)

    This Cdt)t,P(s oT

    is identified as the standard state free energy g0(T). You might have

    seen eq. (12) written as

    Recall you all know dG=VdP-SdT. I am writing the same equation, which for a pure gas you can assume to

    have been expressed on per mole basis. Hence, v, g and s appearing in the equation are molar volume and per

    mole free energy and entropy, respectively.

  • 7/30/2019 Thermo Math

    6/13

    6

    Author: Deepak Gupta, Department of Materials Science & Engineering, IIT Kanpur

    P

    P

    o

    0

    dp)T,p(v)T(g)T,P(g . (13)

    For an ideal gas, since

    P

    RTv , the equation (13) can be explicitly written as

    o

    o

    P

    PlnRT)T(g)T,P(g (14)

    You are probably used to taking 1 atm of a gas as the standard state, that is Po=1atm. In that

    case, eq. (14) can be seen in a form that is probably familiar to you,

    PlnRT)T(g)T,P(g o (15)

    Notice, in eq. (15), it is implied P must be taken in atm. Further, also notice from eq. (12),

    what standard state you choose also impacts go(T). You were free to choose standard state

    pressure Po=2 atm. Accordingly, in eq. (15), instead of ln P, you would have ln(P/2) and

    standard state free energy will also adjust itself in accordance with eq. (12) and in a manner

    that g(P,T) remains the same. After all, choice of Po

    is only defining a path of integration.

    Since dg(P,T) is an exact function, its value cannot depend on the path, or what standard state

    you chose.

    3. Properties of homogenous functions of order oneA homogenous function of order n is defined as

    )z,y,x(f)z,y,x(f n (16)

    In thermodynamics the property of a state are defined by quantities that are either intensive or

    extensive. The ones that are extensive are expressed by functions that are homogeneous

    functions of order one. Therefore, to derive important properties of such functions,

    Set xu , yv and zw and differentiate eq. (16) with respect to , using the chain

    rule

    )z,y,x(fnw

    w

    )w,v,u(fv

    v

    )w,v,u(fu

    u

    )w,v,u(f 1n

    we have written the function for three independent variables, x, y and z, but in what follows you should be able

    to see that the results can easily be generalized for any number of independent variables.

  • 7/30/2019 Thermo Math

    7/13

    7

    Author: Deepak Gupta, Department of Materials Science & Engineering, IIT Kanpur

    or )z,y,x(fnw

    )w,v,u(fz

    dv

    )w,v,u(fy

    u

    )w,v,u(fx 1n

    Now set ,1 and we have

    )z,y,x(nfz

    )z,y,x(fz

    y

    )z,y,x(fy

    x

    )z,y,x(fx

    .

    Since our thermodynamic extensive quantities will be homogenous functions of order one, let

    us restrict ourselves to n=1. Therefore,

    fzfyfxf 'z'

    y

    '

    x (17)

    wherez.y

    '

    xx

    )z,y,x(ff

    and similarly for other derivatives in y and z.

    Further perform total differentiation on eq. (17)

    )z,y,x(dfdzfzdfdyfydfdxfxdf'

    z

    '

    z

    '

    y

    '

    y

    '

    x

    '

    x

    or, dzfdyfdxfdzfdyfdxfzdfydfxdf 'z'

    y

    '

    x

    '

    z

    '

    y

    '

    x

    '

    z

    '

    y

    '

    x

    or, 0zdfydfxdf 'z'

    y

    '

    x (18)

    Eqs (17) and (18), represent two important properties of homogenous functions of order of 1.Further, the derivation above is for a function of three variables x, y and z. But you can see

    this can easily be generalised for any number of variables.

    Now let us see its use in thermodynamics. Ifyou dont already know, as a leap of faith,

    accept that the a combined statement of first and second laws of thermodynamics can be

    expressed as

    i

    i

    idnPdVTdSdU (19)

    where you are familiar with various symbols, except may be the chemical potential of speciesi, namely i. We are considering a solution of several chemical species and hence summation

    is over all the species. Here, ni denotes number of moles of species i in the solution. Finally,

    you could think of -idni as the chemical work done by the system as the moles of species i

    vanish out of the system.

    If you have not seen eq. (19) before, to gain confidence in it, associate TdS with q, the heat

    flow into the system and work done by the system with w=PdV- ii

    idn , then the form of

    the first law should be apparent to you, that is, dU=q-w. Notice for differential on q and w

  • 7/30/2019 Thermo Math

    8/13

    8

    Author: Deepak Gupta, Department of Materials Science & Engineering, IIT Kanpur

    are written differently, only to recognize that while dU is an exact derivative, q and w are

    not.

    Now let us get back to eq. (19), from which you should immediately recognize (see eq. (1))

    U=U(S, V, ni) (20)

    in,VS

    UT

    , (21a)

    in,SV

    UP

    , (21b)

    ijn,V,Si

    i

    n

    U

    (21c)

    Now in eq. (17), set )z,y,x(f to U (S,V,ni..); remember, if there are N chemical species in the

    system, then range of i is from 1 to N. Then from eq. (20), we associate x with S, y with V

    and z with various ni. Accordingly, eq. (17) is written as,

    ...)n,V,S(Un

    Un

    V

    UV

    S

    US i

    n,V,Sii

    i

    n,Sn,V,Sijii

    , and after using eq. (21)

    iinPVTSU (22)

    which is an important result. We just obtained the functional form of U, the internal energy.

    Further, from eq. (18), we obtain,

    i

    ii 0dnVdPSdT (23)

    which is the well-known Gibbs- Duhem equation, we shall frequently use.

    4. Legendre transformationConsider a function )z,y,x(f so that

    dzz

    fdy

    y

    fdx

    x

    fdf

    and in which let us set px

    f

    , qy

    f

    and rz

    f

    . Therefore,

    rdzqdypdxdf (24)

    Now subtract )qy(d from this equation

  • 7/30/2019 Thermo Math

    9/13

    9

    Author: Deepak Gupta, Department of Materials Science & Engineering, IIT Kanpur

    rdz)qy(dqdypdx)qyf(d = rdzydqpdx

    If we regard mqyf , then

    rdzydqpdxdm (25)

    Comparing the forms of eqs. (24) and (25), while f was regarded as function of (x,y,z), m

    appears as a function of (x,q,z). That is, by subtracting qy from f (m=f-qy), we can

    interchange y with q as the independent variable in the new function m.

    So what is its use in thermodynamics? Let us see that below.

    Our starting point are eqs. (19), (20) and (22); Eq. (20) shows the independent variables for

    the function U; associate it with our function f(x,y,z) here. From Eq. (19), you might be able

    to get an intuitive sense about how equilibrium may be defined for a system. Suppose we aredealing with a closed system, that is, dni=0 and equilibrium is sought at constant entropy and

    volume. In that case, from eq. (19), dU=0. Since in equilibrium, we are looking for

    stationary states of a system, that is, maximum or minimum of a function, U might be that

    function, given by eq. (22).

    (a)Now suppose we were to deal with a closed system at constant entropy and pressure,we may seek another function of )n,P,S( i , instead of (S,V and ni) in a form like eq.

    19. To generate that function, look at the form of U in eqs. (19) and (22) and

    substractPV from U so that derivative in eq. (19) changes from that on V to that on

    P. So, similar to m, that function will be U-(-PV). If we define PVUH , and bycomparing with eqs. (24) and (25), from eq. (19), we will have

    i

    i

    idnVdPTdSdH ; (26)

    this constructs a function called enthalpy, and since it is only a transformation of eq.

    (19), it also represents the combined statement of the first and the second laws of

    thermodynamics. So, when S and P are a constant, for a close system, dH=0. Since,

    eq. (26) also represents the statement of laws of thermodynamics, equilibrium under

    such conditions may be derived from eq. (26).

    (b)Similarly, to define a function of )n,V,T( i , define TSUF and theni

    i

    idnPdVSdTdF , (27)

    the Helmoltz free energy.

    (c)To generate a function which will be useful at constant T and P, that of variables (P,T,ni), define )TSHor(PVFG and then

  • 7/30/2019 Thermo Math

    10/13

    10

    Author: Deepak Gupta, Department of Materials Science & Engineering, IIT Kanpur

    i

    i

    idnVdPSdTdG (28)

    Finally, before I close this topic, as an aside from Legendres transformation, take a look ateqs. (19), (26), (27) and (28). They are all exact derivatives. So, eq. (7) should apply. And

    in that case we write what are known as Maxwells relations,

    ii n,Vn,SS

    P

    V

    T

    ii n,Pn,SS

    V

    P

    T

    ii n,Vn,TT

    P

    V

    S

    ii n,Pn,TT

    V

    P

    S

    5. Constrained maxima or minima: method of Lagrange multipliersConsider a wire bent in a form y=1-x2. Now join a string from origin to a point P, (x,y), on

    the bent wire. What is the length of the smallest string

    required?

    Thats an easy problem for you to solve. Length of string

    between origin and any point P on the wire, d, follows

    d2=x

    2+y

    2and all you have to do is minimize this function

    d2=f(x,y) after substituting from the equation of bent wire, that is, y =1- x

    2. Thus in this case

    you have to minimize a function

    d2=f(x,1-x

    2)=g(x)=x

    2+(1-x

    2)2

    .

    After setting g(y)=0, you will get2

    1x , and y=1/2 and it is easy to verify this

    corresponds to a minima (in addition you should find a maxima at x=0). Now you can also

    calculate d.

  • 7/30/2019 Thermo Math

    11/13

    11

    Author: Deepak Gupta, Department of Materials Science & Engineering, IIT Kanpur

    Instead, now work with the method of Lagrange multipliers. We have to minimize f(x,y)

    subject to a constraint y=1-x2, or x

    2+y=1. With (x,y)=1 as the constraint, implying (x,y)=

    x2+y, construct a function

    F(x,y)=f(x,y)+(x,y)

    which instead is maximized or minimized by setting dF=0. Therefore,

    df+ d=2xdx+2ydy+ (2xdx+dy)=0

    2x(+1)dx+(+2y)dy=0

    Since, both x and y are independent variables, dx and dy can be arbitrarily varied. Therefore,

    in general,

    2x(+1)=0 (29)

    (+2y)=0 (30)

    From eq. (29), either x=0 (which will lead to a maxima) or ==1. Substituting the latter in

    eq. (30), yields y=1/2, the same result as before.

    Why this method also works is not the subject matter here. For that, pick up any engineering

    mathematics book and learn. Only point being made is that this method simplifies algebra

    when a large number of variables and constraints are involved. In thermodynamics, now

    examine its use in determining a condition of equilibrium in a non-reacting, multicomponent

    and multiphase system.

    Consider a system consisting of a large number of phases and each phase is made

    up of n components 1, 2, 3., C. For example, a phase may be -iron containing

    components Fe and C. Now enclose this system by closed, rigid adiabatic walls, making it an

    isolated system.

    Therefore, for any phase i (=) made up of components k=1, 2., C, with

    superscript indicating a phase, eq. (19) is reproduced for phase i as

    i

    k

    k

    i

    k

    iiiii

    dndVPdSTdU (31)

    which after rearrangement is written as

    i

    k

    ki

    i

    k

    i

    ii

    i

    ii dn

    TT

    dVP

    T

    dUdS

    (32)

    Now take my word for it that an isolated system evolves in manner that its entropy should

    increase and the system reaches equilibrium, by attaining some pressure, temperature and

    redistributing volume of each phase and moles of each component within the phases. In that

  • 7/30/2019 Thermo Math

    12/13

    12

    Author: Deepak Gupta, Department of Materials Science & Engineering, IIT Kanpur

    state, the entropy i

    iSS is maximum. Recognize the independent variables from eq. (32),

    i

    C

    i

    k

    i

    2

    i

    1

    iiiin...n...n,n,V,USS . We need to maximize S, of course, subject to the constraints,

    ttanconsUUi

    i

    (33a)

    (energy is conserved for isolated system)

    ttanconsVVi

    i (33b)

    (rigid walls of isolated system allow no total volume change)

    ttanconsni

    i

    k , for each k=1, 2.C (33c)

    (in non-reacting system mass of each component is conserved)

    The total number of constraints are C+2. Can you also count the total number of independent

    variables in S?

    So, now you would be able to truly appreciate the power of using Lagrange multipliers for

    finding the stationary states. As before, construct a function

    i k

    i

    kk

    i

    v

    i

    u

    i

    k i

    i

    kk

    i

    i

    v

    i

    i

    u nVUSnVUSF (34)

    and for maximizing it,

    i k

    i

    kk

    i

    v

    i

    u

    i dndVdUdSdF =0, which after using eq. (32), becomes

    0dnT

    dVT

    PdU

    T

    1

    i k

    i

    kki

    i

    k

    i

    i

    vi

    i

    i

    i

    ui

    (35)

    By using the same idea that the coefficients in front of each differential of independent

    variables be zero, we would conclude

    u..........T

    1

    T

    1

    T

    1

    T

    1

    (36)

    implying temperature in all phases should be the same;

  • 7/30/2019 Thermo Math

    13/13

    13

    Author: Deepak Gupta, Department of Materials Science & Engineering, IIT Kanpur

    v..........T

    P

    T

    P

    T

    P

    T

    P

    (37)

    implying pressure in each phase should be the same as temperature in all phases is the same

    from eq. (36) and for any component k (k=1, 2, C)

    kkkkk ...........

    TTTT

    (38)

    which represents C set of equations, one for each component as k varies from 1,2C. The

    result means that chemical potential ofeach component should be the same in all the phases

    under chemical equilibrium. This is so, because temperature in all the phases is the same.

    What we have just derived is the condition of chemical equilibrium in non-reacting systems;

    further it should have been apparent to you that method of Lagrange multipliers indeed made

    our life easy.