0% found this document useful (0 votes)
0 views

Weiland Emily Lab 1

Uploaded by

eweiland
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
0 views

Weiland Emily Lab 1

Uploaded by

eweiland
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 26

CEE 320 Fluid Mechanics Fundamentals Lab

Logarithmic Plotting

Emily Weiland
University of Hawaii at Manoa
CEE 320L Fluid Mechanics
9/17/2024
CEE 320L Fluid Mechanics
Fall 2022 Laboratory (No.)

EXECUTIVE SUMMARY

In this lab, we analyzed experimental data by plotting it on three types of graphs:

standard linear, semi-log, and log-log scales. The goal was to observe the relationship

between the independent variable (x) and the dependent variable (y) and determine the

most suitable graph to represent the underlying trends in the data. By comparing these

graphs, we evaluated the behavior of the dataset in different mathematical contexts.

Our findings showed that the data exhibited nonlinear behavior, and the log-log plot

provided the clearest linear relationship, indicating a potential power-law correlation.

The standard linear graph highlighted the rapid increase of y as x increased, while the

semi-log plot revealed that the data could also follow an exponential trend. These

results suggest that the relationship between the variables may be best modeled using

exponential or power functions, depending on the application.

Page
CEE 320L Fluid Mechanics
Fall 2022 Laboratory (No.)

TABLE OF CONTENTS

EXECUTIVE SUMMARY………………...……………………………………………………………...i
1 INTRODUCTION................................................................................................................................1
1.1 BACKGROUND................................................................................................................................1
1.2 REASON FOR EXPERIMENT.............................................................................................................1
1.3 THEORY..........................................................................................................................................1
1.4 OBJECTIVE......................................................................................................................................2
2 APPROACH.........................................................................................................................................3
2.1 TEST SETUP AND INSTRUMENTATION............................................................................................3
2.2 TEST SPECIMENS............................................................................................................................3
2.3 TEST PROCEDURE...........................................................................................................................4
3 CALCULATIONS/EQUATIONS......................................................................................................6
4 RESULTS.............................................................................................................................................7
4.1...............................................................................................................................................................7
4.2.............................................................................................................................................................10
5 ANALYSIS/ERROR..........................................................................................................................14
5.1.............................................................................................................................................................14
5.2.............................................................................................................................................................15
6 CONCLUSIONS/RECOMMENDATIONS....................................................................................16
7 REFERENCES...................................................................................................................................18

APPENDIX

TABLE OF FIGURES

Figure 1..........................................................................................................................................................8
Figure 2..........................................................................................................................................................8
Figure 3..........................................................................................................................................................9
Figure 4..........................................................................................................................................................9
Figure 5........................................................................................................................................................10
Figure 6........................................................................................................................................................11
Figure 7........................................................................................................................................................11
Figure 8........................................................................................................................................................12
Figure 9........................................................................................................................................................12
Figure 10......................................................................................................................................................13
Figure 11......................................................................................................................................................13

Page
CEE 320L Fluid Mechanics
Fall 2022 Laboratory (No.)

1 Introduction

1.1 Background
In this experiment, standard, semi-logarithmic, and log-logarithmic graphs were

used to analyze the different patterns between variables that are not always linear.

Depending on the variables, different plots can help make analyzing the variables a little

easier. Standard graphs are dependent on an independent variable (x) and a dependent

variable (y). If the data points do not form a straight line, however, it can be difficult to

find a best-fit trendline to analyze the point. Semi-log graphs plot the log values on a

standard graph, as observed before. This is useful for when standard graph points are

not originally linear, a semi-log can help organize the points in an easier fashion. Log-

log graphs plot values on logarithmic axes. When the points on a log-log graph form a

straight line it can be expressed as a power function.

1.2 Reason for Experiment


This experiment can be particularly useful in hydraulics when analyzing flow rate

(Q0 and head (h). The function for flow rate is non-linear, and involves a power, h. We

will see in this experiment that semi-log and log-log graphs can help us linearly analyze

non-linear functions. When following these complex patterns in hydraulics, having the

ability to visualize data in different ways can help us better understand fluid behavior.

1.3 Theory
The logarithm of the equation y = axn can be expressed as Y = A + nX. The

variable n represents the slope, and Y represents log(y), etc. We should see in the

standard plot that the plots should be non-linear. Then moving on to the semi-log and

log-log points we should see that the points are organized in an easier to understand,
Page 1
CEE 320L Fluid Mechanics
Fall 2022 Laboratory (No.)

straight line. Since both axes on the log-log graph are logarithmic, it should represent

the easiest mathematical method, as there is no previous log calculations needed like in

the semi-log graph. However, we should also see that the semi-log and the log-log

should look the same visually. We should also see that since the semi-log and standard

plots are plotted on standard graph paper, the mathematical representation should be

similar. Understanding the key differences between the different plotting methods can

help us in the future when analyzing values mathematically.

1.4 Objective
The objective of this lab was to understand the relationship between the three

different types of plots, as described previously. This lab specifically focuses on the

power equation y = axn, which can be later translated as Q = ahn when analyzing flow

rate and head in hydraulics. We will compare how the standard, semi-logarithmic, and

log-logarithmic plots represent the power relationship in the equation. We will see how

each plot can transform data points and their relationship to the y = axn equation and

understand the resulting lines on each plot. After this, we should be able to use these

graphs in the future to determine the coefficient from the graphs. Overall, the main

objective here is to gain experience in deciding the appropriate type of graph to analyze

different data points and how each plot can impact data interpretation, i.e., which can

make data interpretation easiest.

Page 2
CEE 320L Fluid Mechanics
Fall 2022 Laboratory (No.)

2 Approach

2.1 Test Setup and Instrumentation


Three different equations will be analyzed in this lab: y = mx + b, y = ax n, and y =

a10kx or y = aekx. We will be using standard graph paper, log-log graph paper, and semi-

log graph paper. The standard graph paper plots equation variables linearly with two

axes, plotting each point. Semi-log paper is on standard graph paper and will plot each

value as a log. For example, if we are given coordinates (x,y), we will plot LOG(x) on the

horizontal axis, and LOG(y) on the vertical axis. The last graph used will be the log-log

graph, which is a type of plot where the vertical and horizontal axes are scaled

logarithmically. This means instead of a linear plot, like with the standard graph, both

axes will show values in terms of their logarithms. Both the semi-log and the log-log

graphs should be similar visually. The lab will consist of two experiments with two

different tables, where we will plot the values on all three graphs and compare each

one.

2.2 Test Specimens


For exercise one, we are given five (x, y) coordinates with increasing vertical

components (See Table 2.1 for example).For exercise two we will plot atmospheric

pressure, where we are given seven (p, h) coordinates with decreasing vertical

components. The coordinate (p) being inches of mercury and the coordinate (h) being

thousands of feet. For this experiment, the values will be graphed in a Microsoft excel

workbook.

Page 3
CEE 320L Fluid Mechanics
Fall 2022 Laboratory (No.)

2.3 Test Procedure


For exercise one, the (x, y) values will first be plotted on standard graph paper.

First, the values will be entered in the workbook as a table, with the left side being the x-

values and the left being the y-values. Then, the table will be highlighted and inserted

as a regular scatter plot. For this part, the (0, 0) will be left out, as the trendline needs to

be exponential. Then the points will be right clicked so that a trendline can be inserted.

The trendline will be formatted so that an exponential trendline can be inserted as well,

checking the box for “show equation”

Next, a semi-log graph will be created. There first needs to be a separate table for

creating this graph, as it will be on a standard graph. The logarithms for copies of the

original values will be taken by typing “=LOG(x)” and “=LOG(y)” for each value in the

table. A scatter plot will be created following the same steps as before, by highlighting

the newly created table and creating another scatter plot. From this scatter plot, a

trendline will be produced following the same steps as before, however using a

hyperbolic trendline instead. The same process will be followed for exercise two,

however the given coordinates will be used instead of their logarithmic values and

plotted on a standard graph with a logarithmically scaled vertical axis.

Lastly, for exercise one, a log-log graph will be created. Since log-log graphs are set

with logarithmic horizontal and vertical axes, no extra calculations need to be produced,

so the first table will be used here. A scatter plot will be created from highlighting the

table. Then, logarithmic scales will be applied to both axes by formatting each axis to a

logarithmic scale. Next, the data will be right-clicked to add an appropriate “power”

Page 4
CEE 320L Fluid Mechanics
Fall 2022 Laboratory (No.)

trendline. The trendline equation will be shown on the graph for the log-log graph, as

well as the other two.

Page 5
CEE 320L Fluid Mechanics
Fall 2022 Laboratory (No.)

3 Calculations/Equations

For this lab, three curves will be analyzed: Linear, exponential, and power. The

standard graph (straight line on arithmetic graph paper) is a linear function. For this

curve, the equation is y = mx + b. The variable ‘m’ being the slope of the line, ∆y/∆x,

and the variable ‘b’ is the y-intercept at x = 0.

The semi-log graph (straight line on semi-logarithmic graph paper) is an exponential

function. For this curve, the equation is y = kemx or log y = mx + log k. On semi-

logarithmic graphs m = slope of line = ∆(log y) / ∆x, where k = y-intercept, the value of y

where the line crosses the x = 0 axis. If we take the logarithms of both sides of the

equation, we will get a straight line (which is what will be done in this experiment).

The log-log graph (straight line on logarithmic graph paper) is a power function. The

equation is y = kxm or log y = m log x + log k. The variable ‘m’ is the slope of the line,

∆(log y) / ∆(log x). The variable ‘k’ is the value of y where the line crosses the x = 1 axis.

Page 6
CEE 320L Fluid Mechanics
Fall 2022 Laboratory (No.)

4 Results

In determining the results for this lab, the lab resource, Equations of Straight Lines

on Various Graph Papers was used in aiding the set up for each graph. It was

recommended a linear trendline for a standard graph, an exponential trendline for a

semi-logarithmic graph, and a power function trendline for a log-logarithmic graph (CEE

320 Fluid Mechanics Lab I Logarithmic Plotting 2024).

4.1
As seen below in the graphs and tables, the standard graph for exercise 1 produced
x y
a linear trendline with equation y = 7.4078x + 9.1379.
0.2 7.44
0.6 14 It can be seen here that the linear trendline does not
2 28
6 52.3 accurately represent the points on the graph.
Table 1

To accurately represent the points, the trendline can be more accurately

represented as a power function with the equation y = 18.756x0.5736.

Page 7
CEE 320L Fluid Mechanics
Fall 2022 Laboratory (No.)

Figure 1

Figure 2

For the semi-logarithmic graph, the log values were taken for each x and y value

using the =LOG function in excel. This gives the value in the table below.

x y
-0.698970004 0.871572936
-0.22184875 1.146128036 As seen below, the semi-log graph produced an
0.301029996 1.447158031
0.77815125 1.718501689 exponential trendline with the equation
Table 2

Page 8
CEE 320L Fluid Mechanics
Fall 2022 Laboratory (No.)

y = 1.2329e0.4581x. If the trendline is adjusted to a linear fit, it can be observed that

the points are more accurately represented. The linear trendline produces the equation

y = 0.5736x + 1.2731.

Figure 3

Figure 4

For the log-logarithmic graph the original values were taken on logarithmic scale

x y axes. This produced a power trendline with the


0.2 7.44
0.5736
0.6 14 equation y = 18.756x . It can be observed that the
2 28
6 52.3 power trendline is the best-fit line for the given points.
Table 3

Page 9
CEE 320L Fluid Mechanics
Fall 2022 Laboratory (No.)

Figure 5

4.2
In exercise 2, the values provided in the given table produced a graph with a linear

h p trendline with the equation y = -0.7876x + 28.52. Like exercise 1, it


0 29.9
3 26.7 can be observed that the linear trendline is not the best fit for the
6 23.5
9 21.2 points. If the trendline is converted to an exponential function, the
12 18.6
-0.039x
15 16.8 line is a better fit, producing the equation y = 29.937e .
18 14.7
Table 4

Page 10
CEE 320L Fluid Mechanics
Fall 2022 Laboratory (No.)

Figure 6

Figure 7

For the semi-logarithmic graph, the logarithmic values were taken for each h and p

as given in Table 5. The table produces graphical points with an exponential trendline

h p with the function y = 1.6382e-0.247x. It is noted that the trendline with


0 29.9
3 26.7 this function does not accurately represent the points. If the
6 23.5
9 21.2 trendline is changed to a linear trendline can simplify the equation.
12 18.6
15 16.8 This produces the equation y = -0.8369x + 29.161.
18 14.7
Table 5

Page 11
CEE 320L Fluid Mechanics
Fall 2022 Laboratory (No.)

Figure 8

Figure 9

For the Log-logarithmic graph, the original table of coordinates is taken on a graph

h p with logarithmic scaled coordinates. This produces a power


0 29.9
3 26.7 trendline with the equation
6 23.5
9 21.2 Y = 40.212x-0.322. It can be observed that an exponential
12 18.6
15 16.8 trendline is a better fit, producing the equation y = 29.97e-0.039x.
18 14.7
Table 6

Page 12
CEE 320L Fluid Mechanics
Fall 2022 Laboratory (No.)

Figure 10

Figure 11

Page 13
CEE 320L Fluid Mechanics
Fall 2022 Laboratory (No.)

5 Analysis/Error

The data collected can aid in pin-pointing the accuracy and significance of different

trendlines using standard, semi-logarithmic, and log-logarithmic graphs. By plotting the

same points on each graph, they can be compared to each other. It was observed that

the best-fit trendlines differed between all three graphs, for both exercises. Comparing

the differences can tell which graph is more suitable for future data analysis, like flow-

rate head. For example, if given more complex data, the analysis from this lab could aid

in simplifying that process and increase precision. When determining the best-fit

trendline for a set of points, the R2 value closest to 1 represents the closest trendline fit

that most accurately represents the data set.

5.1
In exercise 1, given a standard graph with a recommended linear trendline, R2 =

0.9761. This is a pretty good fit. But it was observed that the power trendline was a

better fit indeed, with R2 = 1. That means that the power function is the absolute best fit

for the trendline on a standard graph. With the power function for this data set being y =

18.756x0.5736, that is a rather difficult equation to evaluate, compared to a preferred

linear equation.

In the 320 Fluid Mechanics Lab I Logarithmic Plotting handout, an exponential

trendline is recommended for a semi-log graph (CEE 320 Fluid Mechanics Lab I

Logarithmic Plotting 2024). However, it is observed that R2 = 0.9899. Compared to the

better fit trendline, a linear trendline with R2 = 1. This is actually an ideal situation, you

can see that the linear trendline with a simple y = mx + b equation, which can be easily

analyzed using basic knowledge of algebra and slopes.


Page 14
CEE 320L Fluid Mechanics
Fall 2022 Laboratory (No.)

In Equations of straight lines on various graph paper, the equation for a straight line

on logarithmic graph paper is a power function (Equations of Straight Lines on Various

Graph Papers 2024). In this example, the power trendline is the best fit giving, R2 = 1. In

this example, it is observed that the power function on the logarithmically scaled graph

shows a straight-line trend, which makes the slope extremely easy to calculate.

5.2
In exercise 2, h and p values were given in a table. Compared to the increasing

vertical values in exercise 1, the vertical values in this exercise descend. It was

originally noted that this could cause some possible differences in the trendlines and will

now be analyzed.

On the standard graph, the recommended linear fit from the lab materials provided

in the lab recourses (Equations of Straight Lines on Various Graph Papers 2024) gives

R2 = 0.992. When changed to the exponential trendline, R2 = 0.9989, which is the best-

fit trendline for this example.

The recommended exponential trendline produces a fit of R2 = 0.9994 on the semi-

logarithmic graph. The linear function was the next-best-fit trendline, giving a fit of R2 =

0.9898. For this example, the exponential function best represented the data on a semi-

log graph.

On the log-logarithmic graph with the recommended power function trendline, the fit

was R2 = 0.9363. For the better-fit line, an exponential trendline gave the fit R2 = 0.9989.

Page 15
CEE 320L Fluid Mechanics
Fall 2022 Laboratory (No.)

6 Conclusions/Recommendations

Usually the most important section of the report. Point out concisely what was

proven or concluded. Conclusions and recommendations are usually presented in

bullet form for greater impact and clarity. There should not be any new information or

observations in the conclusions. They should simply repeat the major conclusions made

during the discussion of the results. Remember that people reading a technical report

will seldom have the time to read the entire document. Normally they will read the

executive summary and scan the introduction and conclusions to get the basic

information about the test and the major results. If they have questions about these

results, they may go further and read other portions of the report. It is therefore

imperative that the executive summary, introduction, and conclusions be written

concisely and clearly. They should contain only the vital information about the test and

its outcome.

In this experiment, we analyzed the different ways standard, semi-logarithmic, and

log-logarithmic can represent complex sets of data. The R2 value was taken in account

for each graph in each example to determine the best-fit trendline that represented the

data most accurately. Based on the data collected, the following conclusions were

made.

 For sets of points with both ascending and descending


vertical components, semi-log, and log-log graphs represented the
data in the simplest way.

Page 16
CEE 320L Fluid Mechanics
Fall 2022 Laboratory (No.)

 For sets of points with ascending vertical components, data


plotted on semi-log graphs can be best represented as a linear
function, y = mx + b.
 For sets of points with descending vertical components, data
plotted on semi-log graphs can be best represented as a power
function trendline.
 For sets of points with descending vertical components, data
plotted on semi-log graph can be best represented as a simple linear
function, y = mx + b.
 For sets of points with descending vertical components, data
plotted on a log-log graph can be best represented as an exponential
function, y = kemx.

Finally, it is concluded that in all cases, whether vertical components are


increasing or decreasing, the semi-log graphical plot of data generally simplifies
complex data the most. In all cases on the semi-log graph, the trendline can be
represented as y = mx + b, where m is the slope of the line and b is the y-intercept.
For cases with increasing vertical components, such as example 1, the log-log
graph automatically produces a power trendline as the best fit line with function
equation y = kxm, m being the slope of the line, and k being the value where the line
crosses x = 1.

Page 17
CEE 320L Fluid Mechanics
Fall 2022 Laboratory (No.)

7 References

A. Dr. Sayed Bateni. (2024). CEE 320 Fluid Mechanics Lab I Logarithmic Plotting.

Honolulu, HI; Dept of Civil Engineering and Environmental Engineering,

University of Hawai’i at Manoa.

B. Dr. Sayed Bateni. (2024b). Equations of Straight Lines on Various Graph

Papers. Honolulu, HI; Dept of Civil Engineering and Environmental

Engineering, University of Hawai’i at Manoa.

Page 18
CEE 320L Fluid Mechanics
Fall 2022 Laboratory (No.)

Appendix

A-1 Equations and Sample Calculations

 Straight line on arithmetic graph paper (Linear function)

o Y = mx + b

o m = slope of line = ∆y / ∆x

o b = y-intercept: the value where x = 0

o Sample calculation function (Equations of Straight Lines on Various

Graph Papers 2024)

 Straight line on logarithmic graph paper (power function)

o Y = kxm or log y = m log x + log k

o m = slope of line = ∆(log y) / ∆(log x)

Page 19
CEE 320L Fluid Mechanics
Fall 2022 Laboratory (No.)

o k = value of y where line crosses the x = 1 axis

o Sample calculation (Equations of Straight Lines on Various Graph

Papers 2024)

 Straight line on semi-logarithmic graph paper (exponential)

o Y = k 10mx (or y = kemx) *note that e2.303 = 10* or log y = mx + log k (or

ln y = mx + ln k)

Page 20
CEE 320L Fluid Mechanics
Fall 2022 Laboratory (No.)

o m = slope of line = ∆(log y) / ∆x

o k = y-intercept: value of y where line crosses the x = 0 axis

o Sample calculation (Equations of Straight Lines on Various Graph

Papers 2024)

A-2 Raw Data

 Tables

x y h p
0.2 7.44 0 29.9
Page 21
CEE 320L Fluid Mechanics
Fall 2022 Laboratory (No.)

0.6 14 3 26.7
2 28 6 23.5
6 52.3 9 21.2
12 18.6
15 16.8
18 14.7

x y h p
-
0.6989700 1.4756
04 0.871572936 #NUM! 71
-
0.2218487 0.4771 1.4265
5 1.146128036 21 11
0.3010299 0.7781 1.3710
96 1.447158031 51 68
0.7781512 0.9542 1.3263
5 1.718501689 43 36
1.0791 1.2695
81 13
1.1760 1.2253
91 09
1.2552 1.1673
73 17

x y h p
0.2 7.44 0 29.9
0.6 14 3 26.7
2 28 6 23.5
6 52.3 9 21.2
Page 22
CEE 320L Fluid Mechanics
Fall 2022 Laboratory (No.)

12 18.6
15 16.8
18 14.7

Page 23

You might also like