Homework Solution: TABLE A. 1 SI units (101 kPa (abs)] Kinematic Viscosity Dynamic Specific Weight Density (kg/m…

1. Write a functional program in MATLAB that computes the specific weight of water for a given temperature using the data from Appendix A. Such a program could be part of a more comprehensive program to be written later. The following options could be used. a. Enter the table data for specific weight as a function of temperature into an array. Then for a specified temperature search for the array for the corresponding specific weight. Interpolate temperature between values given in the table. b. Include data in both SI units and US customary System units. c. Include density d. Include checks in the program to ensure that the specified temperature is within the range given in the tables (i.e. above the freezing point and below the boiling point). e. Instead of using the table look-up approach, use a curve-fit technique to obtain the equations of the properties of water vs. temperature. Then compute the desired value for any specified temperature.
TABLE A. 1 SI units (101 kPa (abs)] Kinematic Viscosity Dynamic Specific Weight Density (kg/m3) 1000 1000 1000 1000 Viscosity (Pa s) 1.75 × 10-3 1.52 × 10-3 Temperature (kN/m3) 1.75× 10-6 1.52 × 10-6 1.30 × 10-6 1.15 × 1 1.02 × 10-6 8.94 × 10-7 8.03 × 10-7 7.22 × 10-7 6.56 × 10-7 6.00 × 10-7 5.48 × 10-7 5.05 × 10-7 4.67× 10-7 4.39 × 10-7 0 9.81 9.81 9.81 9.81 9.79 9.78 9.77 9.75 5 1.30 × 10-3 1.15 × 10-3 15 20 25 30 0-6 ×10-3 8.91 × 10-4 8.00 × 10-4 718 × 10-4 6.51 × 10-4 5.94 × 10-4 5.41 × 10-4 4.98 × 10-4 4.60 x 10-4 4.31 × 10-4 997 996 35 40 9.73 45 990 988 986 984 981 50 60 65 70 75 80 9.69 9.67 9.65 9.62 9.59 9.56 9.53 978 02 0 411 x 107 975 3.73 × 10-4 3.50×10-4 3.30 × 10-4 3.11 × 10-4 2.92 × 10-4 2.82 × 10-4 3.83 × 10-7 3.60×10 3.41 × 10-7 3.22 × 10 3.04 × 10-7 2.94 × 10-7 85 9.50 968 965 962 958 90 9.47 9.44 100

1. Write a authoritative program in MATLAB that abuses the biased efficacy of breathe-into coercion a consecrated weather using the facts from Appendix A. Such a program could be sunder of a more inclusive program to be written after. The subjoined options could be interpretationd.

a. Enter the consultation facts coercion biased efficacy as a business of weather into an decorate. Then coercion a certain weather quest coercion the decorate coercion the similar biased efficacy. Interpolate weather among computes consecrated in the consultation.

b. Include facts in twain SI units and US natural System units.

c. Include inobservance

d. Include checks in the program to fix that the certain weather is among the ramble consecrated in the consultations (i.e. overhead the freezing object and under the eruption object).

e. Instead of using the consultation look-up admission, interpretation a curve-fit technique to conquer the equations of the properties of breathe-into vs. weather. Then abuse the desired compute coercion any certain weather.

TABLE A. 1 SI units (101 kPa (abs)] Kinematic Viscosity Dynamic Biased Efficacy Inobservance (kg/m3) 1000 1000 1000 1000 Viscosity (Pa s) 1.75 × 10-3 1.52 × 10-3 Weather (kN/m3) 1.75× 10-6 1.52 × 10-6 1.30 × 10-6 1.15 × 1 1.02 × 10-6 8.94 × 10-7 8.03 × 10-7 7.22 × 10-7 6.56 × 10-7 6.00 × 10-7 5.48 × 10-7 5.05 × 10-7 4.67× 10-7 4.39 × 10-7 0 9.81 9.81 9.81 9.81 9.79 9.78 9.77 9.75 5 1.30 × 10-3 1.15 × 10-3 15 20 25 30 0-6 ×10-3 8.91 × 10-4 8.00 × 10-4 718 × 10-4 6.51 × 10-4 5.94 × 10-4 5.41 × 10-4 4.98 × 10-4 4.60 x 10-4 4.31 × 10-4 997 996 35 40 9.73 45 990 988 986 984 981 50 60 65 70 75 80 9.69 9.67 9.65 9.62 9.59 9.56 9.53 978 02 0 411 x 107 975 3.73 × 10-4 3.50×10-4 3.30 × 10-4 3.11 × 10-4 2.92 × 10-4 2.82 × 10-4 3.83 × 10-7 3.60×10 3.41 × 10-7 3.22 × 10 3.04 × 10-7 2.94 × 10-7 85 9.50 968 965 962 958 90 9.47 9.44 100

Expert Counterpart

Code:

%Define weather

temp = 0:5:100;

%Define biased efficacy consultation

sp_wt = [9.81 9.81 9.81 9.81 9.79 9.78 9.77 9.75 9.73 9.71 9.69 9.67 9.65 9.62 9.59 9.56 9.53 9.50 9.47 9.44 9.40];

%Define inobservance consultation

inobservance = [1000 1000 1000 1000 998 997 996 994 992 990 988 986 984 981 978 975 971 968 965 962 968];

%Enter weather

x = input(‘Enter temp: ‘);

%Abuse refutation

refutation = ceil(x/5);

%Abuse efficacy

y_sp_wt = sp_wt(index) + (sp_wt(refutation + 1) – sp_wt(index)) / (refutation * abs(5 – x)) ;

%Abuse inobservance

y_inobservance = inobservance(index) + (density(refutation + 1) – inobservance(index)) / (refutation * abs(5 – x)) ;

%Display result

fprintf(‘sp-wt = %d KiloNewton per sound meterninobservance = %d kg per sound metern’, y_sp_wt, y_density)