HW1

Embed Size (px)

DESCRIPTION

HW1

Citation preview

  • 15)

    a)

    d(M1)/d(t)=10

    d(M2)/d(t)=0

    d(M3)/d(t)=0

    d(S1)/d(t)=2-10*S1/M1

    d(S2)/d(t)=10*S1/M1-10*S2/M2

    d(S3)/d(t)=10*S2/M2-10*S3/M3

    t(0)=0

    M1(0)=1000

    M2(0)=1000

    M3(0)=1000

    S1(0)=200

    S2(0)=200

    S3(0)=200

    t(f)=60

    b)

    t M1 M2 M3 S1 S2 S3 SaltPC1 SaltPC2 SaltPC3 60 1600 1000 1000 222.5 181.7907 196.3368 13.90625 18.17907 19.63368

  • POLYMATH Report No TitleOrdinary Differential Equations 09-Sep-2014

    Calculated values of DEQ variables Variable Initial value Minimal value Maximal value Final value

    1 M1 1000. 1000. 1600. 1600.

    2 M2 1000. 1000. 1000. 1000.

    3 M3 1000. 1000. 1000. 1000.

    4 S1 200. 200. 222.5 222.5

    5 S2 200. 181.7907 200. 181.7907

    6 S3 200. 196.3368 200. 196.3368

    7 t 0 0 60. 60.

    Differential equations 1 d(M1)/d(t) = 10

    2 d(M2)/d(t) = 0

    3 d(M3)/d(t) = 0

    4 d(S1)/d(t) = 2-10*S1/M1

    5 d(S2)/d(t) = 10*S1/M1-10*S2/M2

    6 d(S3)/d(t) = 10*S2/M2-10*S3/M3

    General Total number of equations 6Number of differential equations 6Number of explicit equations 0Elapsed time 0.000 secSolution method RKF_45Step size guess. h 0.000001Truncation error tolerance. eps 0.000001

    Data file: c:\users\knghcmdell\google drive\fa\chee 400\1-15.pol

  • 16)

    a)

    # Example 1 - Heat Exchange in a Series of Tanks

    d(T1)/d(t) = (W * Cp * (T0 - T1) + UA * (Tsteam - T1)) / (M * Cp) # Temperature in the first tank (deg. C)

    d(T2)/d(t) = (W * Cp * (T1 - T2) + UA * (Tsteam - T2)) / (M * Cp) # Temperature in the second tank (deg. C)

    d(T3)/d(t) = (W * Cp * (T2 - T3) + UA * (Tsteam - T3)) / (M * Cp) # Temperature in the third tank (deg. C)

    # The explicit equations

    W = 100 # Feed flow rate (kg/min)

    Cp = 2.0 # Heat capacity (kJ/kg -deg. C)

    T0 = 20 # Feed temperature (deg C)

    UA = 10. # Area*heat transfer coefficient (kJ/min *deg C)

    Tsteam = 250 # Temperature of steam (deg. C)

    M = 1000 # Total mass in a tank (kg)

    # Initial values of the differential variables

    T1(0) = 20

    T2(0) = 20

    T3(0) = 20

    # Initial/final values of the independent differentiation variable

    t(0) = 0

    t(f) = 200

    b)

    d(T1)/d(t)=UA*(Tstream-T1)/(M*Cp)

    d(T2)/d(t)=UA*(Tstream-T2)/(M*Cp)

    d(T3)/d(t)=UA*(Tstream-T3)/(M*Cp)

  • UA=10

    Tstream=250

    M=1000

    Cp=2.0

    t(0)=0

    T1(0)=30.95238

    T2(0)=41.38322

    T3(0)=51.31735

    t(f)=180

    c)

    # Example 1 - Heat Exchange in a Series of Tanks

    d(T1)/d(t) = (W * Cp * (T0 - T1) + UA * (Tsteam - T1)) / (M * Cp) # Temperature in the first tank (deg. C)

    d(T2)/d(t) = (W * Cp * (T1 - T2) + UA * (Tsteam - T2)) / (M * Cp) # Temperature in the second tank (deg. C)

    d(T3)/d(t) = (W * Cp * (T2 - T3) + UA * (Tsteam - T3)) / (M * Cp) # Temperature in the third tank (deg. C)

    # The explicit equations

    W = 100 # Feed flow rate (kg/min)

    Cp = 2.0 # Heat capacity (kJ/kg -deg. C)

    T0 = 20 # Feed temperature (deg C)

    UA = 10. # Area*heat transfer coefficient (kJ/min *deg C)

    Tsteam = 250 # Temperature of steam (deg. C)

    M = 1000 # Total mass in a tank (kg)

    # Initial values of the differential variables

    T1(0) = 160.9419

  • T2(0) = 165.1827

    T3(0) = 169.2217

    # Initial/final values of the independent differentiation variable

    t(0) = 0

    t(f) = 200

    Result:

    t T1 T2 T3 88.33253 30.96457 41.50247 51.90634 91.53253 30.96109 41.47122 51.76597

    Since 1.01*T3 (steady state)=51.8305, t is between 88.33 and 91.53 minutes.

    By changing t(f), the time could be determined accurately at 89.956 minutes.

  • POLYMATH Report Example 1 - Heat Exchange in a Series of TanksOrdinary Differential Equations 09-Sep-2014

    Calculated values of DEQ variables Variable Initial value Minimal value Maximal value Final value

    1 Cp 2. 2. 2. 2.

    2 M 1000. 1000. 1000. 1000.

    3 t 0 0 200. 200.

    4 T0 20. 20. 20. 20.

    5 T1 20. 20. 30.95238 30.95238

    6 T2 20. 20. 41.38322 41.38322

    7 T3 20. 20. 51.31735 51.31735

    8 Tsteam 250. 250. 250. 250.

    9 UA 10. 10. 10. 10.

    10 W 100. 100. 100. 100.

    Differential equations 1 d(T1)/d(t) = (W * Cp * (T0 - T1) + UA * (Tsteam - T1)) / (M * Cp)

    Temperature in the first tank (deg. C)

    2 d(T2)/d(t) = (W * Cp * (T1 - T2) + UA * (Tsteam - T2)) / (M * Cp)

    Temperature in the second tank (deg. C)

    3 d(T3)/d(t) = (W * Cp * (T2 - T3) + UA * (Tsteam - T3)) / (M * Cp)

    Temperature in the third tank (deg. C)

    Explicit equations 1 W = 100

    Feed flow rate (kg/min)

    2 Cp = 2.0

    Heat capacity (kJ/kg -deg. C)

    3 T0 = 20

    Feed temperature (deg C)

    4 UA = 10.

    Area*heat transfer coefficient (kJ/min *deg C)

    5 Tsteam = 250

    Temperature of steam (deg. C)

    6 M = 1000

    Total mass in a tank (kg)

    General Total number of equations 9Number of differential equations 3Number of explicit equations 6Elapsed time 0.000 secSolution method RKF_45Step size guess. h 0.000001Truncation error tolerance. eps 0.000001

  • POLYMATH ReportOrdinary Differential Equations 09-Sep-2014

    Calculated values of DEQ variables Variable Initial value Minimal value Maximal value Final value

    1 Cp 2. 2. 2. 2.

    2 M 1000. 1000. 1000. 1000.

    3 t 0 0 180. 180.

    4 T1 30.95238 30.95238 160.9419 160.9419

    5 T2 41.38322 41.38322 165.1827 165.1827

    6 T3 51.31735 51.31735 169.2217 169.2217

    7 Tstream 250. 250. 250. 250.

    8 UA 10. 10. 10. 10.

    Differential equations 1 d(T1)/d(t) = UA*(Tstream-T1)/(M*Cp)

    2 d(T2)/d(t) = UA*(Tstream-T2)/(M*Cp)

    3 d(T3)/d(t) = UA*(Tstream-T3)/(M*Cp)

    Explicit equations 1 UA = 10

    2 Tstream = 250

    3 M = 1000

    4 Cp = 2.0

    General Total number of equations 7Number of differential equations 3Number of explicit equations 4Elapsed time 0.000 secSolution method RKF_45Step size guess. h 0.000001Truncation error tolerance. eps 0.000001

  • POLYMATH Report Example 1 - Heat Exchange in a Series of TanksOrdinary Differential Equations 09-Sep-2014

    Calculated values of DEQ variables Variable Initial value Minimal value Maximal value Final value

    1 Cp 2. 2. 2. 2.

    2 M 1000. 1000. 1000. 1000.

    3 t 0 0 200. 200.

    4 T0 20. 20. 20. 20.

    5 T1 160.9419 30.95238 160.9419 30.95238

    6 T2 165.2217 41.38322 165.2217 41.38322

    7 T3 169.2217 51.31737 169.2217 51.31737

    8 Tsteam 250. 250. 250. 250.

    9 UA 10. 10. 10. 10.

    10 W 100. 100. 100. 100.

    Differential equations 1 d(T1)/d(t) = (W * Cp * (T0 - T1) + UA * (Tsteam - T1)) / (M * Cp)

    Temperature in the first tank (deg. C)

    2 d(T2)/d(t) = (W * Cp * (T1 - T2) + UA * (Tsteam - T2)) / (M * Cp)

    Temperature in the second tank (deg. C)

    3 d(T3)/d(t) = (W * Cp * (T2 - T3) + UA * (Tsteam - T3)) / (M * Cp)

    Temperature in the third tank (deg. C)

    Explicit equations 1 W = 100

    Feed flow rate (kg/min)

    2 Cp = 2.0

    Heat capacity (kJ/kg -deg. C)

    3 T0 = 20

    Feed temperature (deg C)

    4 UA = 10.

    Area*heat transfer coefficient (kJ/min *deg C)

    5 Tsteam = 250

    Temperature of steam (deg. C)

    6 M = 1000

    Total mass in a tank (kg)

    General Total number of equations 9Number of differential equations 3Number of explicit equations 6Elapsed time 0.000 secSolution method RKF_45Step size guess. h 0.000001Truncation error tolerance. eps 0.000001

  • POLYMATH Report Example 1 - Heat Exchange in a Series of TanksOrdinary Differential Equations 10-Sep-2014

    Calculated values of DEQ variablesVariable Initial value Minimal value Maximal value Final value

    1 Cp 2. 2. 2. 2.

    2 M 1000. 1000. 1000. 1000.

    3 t 0 0 89.956 89.956

    4 T0 20. 20. 20. 20.

    5 T1 160.9419 30.96266 160.9419 30.96266

    6 T2 165.1827 41.48545 165.1827 41.48545

    7 T3 169.2217 51.83049 169.2217 51.83049

    8 Tsteam 250. 250. 250. 250.

    9 UA 10. 10. 10. 10.

    10 W 100. 100. 100. 100.

    Differential equations1 d(T1)/d(t) = (W * Cp * (T0 - T1) + UA * (Tsteam - T1)) / (M * Cp)

    Temperature in the first tank (deg. C)

    2 d(T2)/d(t) = (W * Cp * (T1 - T2) + UA * (Tsteam - T2)) / (M * Cp)

    Temperature in the second tank (deg. C)

    3 d(T3)/d(t) = (W * Cp * (T2 - T3) + UA * (Tsteam - T3)) / (M * Cp)Temperature in the third tank (deg. C)

    Explicit equations1 W = 100

    Feed flow rate (kg/min)

    2 Cp = 2.0

    Heat capacity (kJ/kg -deg. C)

    3 T0 = 20

    Feed temperature (deg C)

    4 UA = 10.

    Area*heat transfer coefficient (kJ/min *deg C)

    5 Tsteam = 250

    Temperature of steam (deg. C)

    6 M = 1000Total mass in a tank (kg)

    GeneralTotal number of equations 9Number of differential equations 3Number of explicit equations 6Elapsed time 0.000 secSolution method RKF_45Step size guess. h 0.000001Truncation error tolerance. eps 0.000001

    HW11-151-15a code1-15a1-151-15PCP

    1-161-16code1-16a1-16b1-16c

    1-16d