Download pdf - Mathcad - Spot Questions1

Transcript
  • 7/31/2019 Mathcad - Spot Questions1

    1/5

    Computer Programming Skills MathCad Solution by DF Sozinando Student at theVaal University of Technology

    Data matrix is extracted from steam table. The columns (from left to right) of the matrix are respectively

    1. Pressure in kPa,

    2. Temperature in oC,

    3. Specific volume dry saturated vg in m3/kg,

    4. Specific enthalpy of liquid saturated hf in kJ/kg5. Specific enthalpy of vaporisation hfg in kJ/kg, and

    6. Specific enthalpy of dry saturated steam in kJ/kg, and

    7. The specific volume liquid saturated vf m3/kg

    Write a function that will return the quality of stean for a provided value of the enthalpy

    The quality of steam is subcool (h < hf), liquid saturated (h = hf) , wet ( hf < h < hg), dry saturated (h = hg),

    superheated ( h > hg).

    Write a program that will return the quality of steam for a given value of the enthalpy. Test your program with

    vector h at 19 kPa for respective values of h = 2000; 2608; 3000; 200 and 247. Your display will be presented in a

    function Quality(x)

    ORIGIN 1

    Datasup

    10

    8.80

    7.863

    7.1045

    6.47913

    5.95494

    18

    13.2969

    10.5435

    8.73473

    7.45568

    6.50337

    14.67

    16.67

    18.67

    20.67

    22.67

    24.67

    8.445

    11.445

    14.445

    17.445

    20.445

    23.445

    :=

    Data

    5

    5.5

    6

    6.5

    7

    7.5

    8

    8.5

    99.5

    10

    11

    12

    13

    14

    15

    16

    1718

    19

    20

    32.9

    34.6

    36.2

    37.7

    39

    40.3

    41.6

    42.7

    43.844.8

    45.8

    47.7

    49.5

    51.1

    52.6

    54

    55.3

    56.657.8

    59

    60.1

    28.19

    25.77

    23.74

    22.02

    20.53

    19.24

    18.10

    17.10

    16.215.40

    14.67

    13.42

    12.36

    11.47

    10.69

    10.02

    9.433

    8.9118.445

    8.027

    7.650

    138

    145

    152

    158

    163

    169

    174

    179

    183188

    192

    200

    207

    214

    220

    226

    232

    237242

    247

    252

    2424

    2420

    2416

    2413

    2410

    2406

    2403

    2401

    23982395

    2393

    2388

    2384

    2380

    2377

    2373

    2370

    23672364

    2361

    2358

    2562

    2565

    2568

    2571

    2573

    2575

    2577

    2580

    25812583

    2593

    2588

    2591

    2594

    2597

    2599

    2602

    26042606

    2608

    2610

    0.00100533

    0.0010059

    0.00100645

    0.00100699

    0.0010075

    0.001008

    0.00100848

    0.00100895

    0.00100940.00100984

    0.00101027

    0.0010111

    0.00101188

    0.00101263

    0.00101335

    0.00101404

    0.00101471

    0.001015350.00101597

    0.00101658

    0.00101716

    :=

  • 7/31/2019 Mathcad - Spot Questions1

    2/5

    Computer Programming Skills MathCad Solution by DF Sozinando Student at theVaal University of Technology

    n 20:=

    Quality x( ) h x

    hf Datan 4,( )

    hfg Datan 5,( )

    hg Datan 6,( )

    sorting "subcool" h hf

  • 7/31/2019 Mathcad - Spot Questions1

    3/5

    Computer Programming Skills MathCad Solution by DF Sozinando Student at theVaal University of Technology

    The study of stress and strain of a structure subjected to axial loading is governed by the following set of equations:

    Modulus of elaticity E is such that: Ex

    x

    = (Hooke's law)

    Poisson's ratioy

    x

    -=

    Where: xLoad

    Cross_Sectional_Area= (stress)

    and xx

    Initial_Length= (Axial Strain) y

    x

    Initial_Diameter= (Lateral Strains

    g A rod of length L3 500mm= anda diameter 16mm= made of homogeneous and isotropic material is observed

    to increase in length by , and to decrease in diameter by x 300m= , and to decrease in diameter by 2.4m=

    ( y -= ) when subjected to an axial load F3 12kN=

    Use the Programming toolbar and write a function constants P x, , x, y,( ) x y, , E,( )=

    Evaluate the program for the following numerical applications. Return results with 5 decimal digits, in order asprescribed by the defined user-defined function output order

    constants 12kN 500mm, 16mm, 300m, 24m,( )

    constants 18kN 60cm, 16mm, 300m, 24m,( )

  • 7/31/2019 Mathcad - Spot Questions1

    4/5

    Computer Programming Skills MathCad Solution by DF Sozinando Student at theVaal University of Technology

    constants P x, , x, y,( ) xP

    42

    xx

    x

    yy

    -

    y

    x

    -

    Ex

    x

    1

    MPa

    stack x y, , E,( )return

    :=

    constants 12kN 500mm, 16mm, 300 m, 2.4 m,( )

    0.0006

    0.00015-

    0.25

    99471.83943

    =

    constants 18kN 60cm, 0.64in, 300 m, 2.4 m,( )

    0.0005

    0.000148-

    0.295276

    173454.366919

    =

    verification 1

    x 300m:= p 12kN:= 3 16mm:= 2.4 m:= L3 500mm:= y -:=

    yy

    3

    0.015- %=:= xx

    L3

    0.06 %=:= xp

    32

    4

    59683.10366 kPa=:=

    y

    x

    - 0.25=:= Ex

    x

    99471.83943 MPa=:=

  • 7/31/2019 Mathcad - Spot Questions1

    5/5

    Computer Programming Skills MathCad Solution by DF Sozinando Student at theVaal University of Technology

    verification 2

    p 18kN:= 0.64 in:= x 60cm:=

    yy

    0.01476- %=:= xx

    x0.05 %=:= x

    p

    2

    4

    86727.18346 kPa=:=

    y

    x

    - 0.29528=:= Ex

    x

    25157.42898 ksi=:=


Recommended