Practical 1 P 1 Aintrotocomputingpdf
Practical 1 P 1 Aintrotocomputingpdf
Practical 1 P 1 Aintrotocomputingpdf
Practical 1P1a
Introduction to Computing
What you should learn from this exercise
Safety
This practical only involves using computers and as such does not have any significant
practical risks.
In 2020 this practical is to be completed remotely without actually visiting the Teaching
Laboratory.
The practical briefing presentation by the Senior Demonstrator has been recorded and is
available online. In addition there is a recording of actually completing the whole practical
by following through the instructions in this guidance script.
You will not be sitting in front of the computers in the teaching lab, but instead you are
expected to use your own personal computer. As a member of Oxford University your
Nexus365 account provides Office365 which can be used online via a web-browser at
http://www.office365.com ( click Sign-In at top right of page and enter
username@DOMAIN e.g. [email protected] then at the Oxford Webauth webpage
enter your username and password ). Note that your account is also licensed to be able
to download and install upto 5 copies of Office365 onto your personal computers (see
“Install Office” button top right). Please now check that you are able to access Excel and
Word using your own personal computer.
Although you are expected to use your own personal computer to do this practical and
store your files, you should also be aware that the department runs a terminal server which
In order to avoid overloading the limited resources of the terminal server you do NOT need
to use the terminal server for completing this practical (but is useful that you now know
how to do so). Please fully signout/logout from the terminal server (do not just disconnect).
From now on please just use your own personal computer and save files anywhere on
your own computer or in onedrive if using office365 online.
Since you are working remotely please ignore the section about printing from the teaching
lab computers and collecting your printout from the departmental photocopier. Similarly
please ignore the section about showing the printout to the Senior Demonstrator. If you
wish you can email your finished writeup to [email protected] but the
practical will not be formally assessed.
Overview
Open using Excel. The spreadsheet shows the results of running a model of plastic
behaviour of a metal, to simulate the effect of grain size (d) on yield stress (y). The
expected relationship is:
y B A d 0 .5
where d is the grain size and A and B are constants. The table in the upper left hand corner
shows the results: the yield stress produced by the model is shown for various simulated
grain sizes. There is also a column where 1/d has been calculated, so that we should be
In this computing exercise, you will build up this spreadsheet step by step. You will then
present these results in an unassessed practical write-up. You should include an
estimate of the errors (lack of accuracy) in the original data and therefore the error in the
calculation of the parameters A and B.
First Login
The teaching laboratory computers all run Windows 10. During term time the computers
are set to default to using SSO login credentials via the OX.AC.UK domain. Use your
university SSO login credentials to logon to the teaching laboratory computer.
e.g. OX.AC.UK\abcd1234 or [email protected]
Open the file explorer window (Start->Search “explorer”, or use shortcut Windows+E). On
the teaching laboratory computers your main directory is stored on network drive “O:”
which is on the department fileserver. This means that it does not matter which computer
you sit at when using computers within the computer room.
It's a good idea to keep future work (practical’s, etc.) in suitably named folders so that you
can easily tell what is what. Create a new folder on drive O: called “1P1a” (click to select
drive O: then use the ribbon button “New Folder” or right-click the viewing pane and select
New -> New Folder).
Open using Excel. This version of the spreadsheet only has the basic data in it. (The
example file “Practical 1P1a complete.xls” should still be open and available for
reference; see VIEW tab / WINDOW group / SWITCH WINDOWS item in the Excel menu
If prompted you may need to click on “Enable Editing” to trust the downloaded document.
Click on cell B2, and drag down to B6 which selects the column title “d(mm)" and values
for grain size which will become the x-axis for the graph. Hold the control key down (this
lets you select non-adjacent areas at the same time), and move the mouse to D2; drag
over the D2:D6 cells, which selects the “Stress(MPa)” title and data that you need to plot
on the y-axis..
Now create an X-Y scatter plot with the selected data, using the column B data series for
X-data and column D for Y-data. ( See INSERT tab / CHARTS group / SCATTER item –
version showing just points with no lines)
You can see that the stress on the system falls as the grain size (d) increases. However
the theory predicts that it falls linearly as 1/d. To see this, you need to plot the yield
stress against 1/d, not d.
Save the modified blank spreadsheet in your 1P1a folder with new filename “Practical
1P1a results.xls”.
I have left a blank column (C) for you to put in the 1/d data. Select cell C3, and type “
=1/sqrt( “ then click on cell B3 (i.e. you are pointing at what you want the square root of)
then type “ ) ” and press “enter”. The number 0.141 should appear in cell C3. You now
need to copy this formula down over the remaining cells in column C. Click on cell C3 (if
it’s not already selected). You will see a little square in the bottom right-hand corner of the
cell. “Grab” this by clicking and holding the left mouse button over it, and “drag” the box
down over the cells below. Release the mouse button and the numbers will appear in all
the cells as the same formula has been applied to the selected cells.
Save your work again when you have got this right.
Now you need to add this new data to the graph. Select cell C2 then “click & drag” to select
cells C2-D6. Select the HOME tab / CLIPBOARD group / COPY item or use shortcut Ctl-
C. This has copied these data onto the windows “clipboard”. You will see (information bar
at bottom of window) that Excel now wants to know where to put it! Click on the graph,
The graph accepts the data but it isn’t quite right yet. The problem is that everything is
being plotted against a common X-axis, so all the newly added d data points all appear
stacked above X=0. You need to set up a different X-axis for the d data.
Make sure the chart is still active, and click on one of the data points that you have just
added. The data points in this series will "light up", and you can now fiddle with its layout
and characteristics. Selecting the chart causes CHART TOOLS to appear on the menu
ribbon. Select FORMAT tab / CURRENT SELECTION group / FORMAT SELECTION item
(or alternatively click the right mouse button and select FORMAT DATA SERIES item). A
set of options pop up, and you want to alter the "axis" characteristic. Make the series plot
on the "Secondary Axis". It is closer, but still not quite right, since a secondary Y axis has
been put in and what you want is a secondary X-axis. Now select DESIGN tab / CHART
LAYOUTS group / ADD CHART ELEMENT dropdown / AXES / SECONDARY
HORIZONTAL which gets rid of the “Secondary Vertical axis” and turns on the "Secondary
Horizontal axis". The data points which previously appeared bunched above X=0 should
now be distributed across the whole area of the graph.
A few more minor changes are desirable. The graph axes and the chart itself all need
labeling. You could also select your new x-axis at the top, and format it to have a fixed
scale that starts at 0.05 rather than 0.00. If there is a legend beside the graph, select and
delete it. Comparing with the completed example, work out how to make the changes
using the DESIGN tab / CHART LAYOUTS group / ADD CHAR ELEMENT dropdown
menu.
Your graph should be looking better and suitable for presenting in your report.
Time to save again!
Regression analysis
There are two functions to perform regression analysis. One, "LINEST", returns the
parameters of the best fit line (slope, intercept, goodness of fit, etc.). Another, "TREND",
given a set of "wanted" X-values, returns the Y-values that lie on the best fit straight line
TREND
First, set up a column of your desired Trend X-values on the data worksheet. I suggest
values 0, 0.05, 0.10, 0.15 and 0.2, nice and regular. (See the finished version for an idea
of where to put these - in F3 to F7). We will use the column to the right of our "Trend X"
values to receive the "Predicted Stress" results.
1. Click and drag to highlight the empty “Predicted Stress” cells (G3:G7).
2. Click the "function" button, fx and search for TREND. Alternatively
3. select menu FORMULAS tab / FUNCTION LIBRARY group / MORE
FUNCTIONS dropdown / STATISTICAL menu:TREND / (you will see that there
are lots of other useful statistical functions available, such as "AVERAGE" and
"STDEV".)
4. Click "next". A Function Arguments dialog box appears asking you to select the
"known y's" (cursor is blinking in this bit) and "known x's". We want the stresses
(cells D3:D6) for "known y". You can either type D3:D6 into the box, or drag the
"function wizard" panel so that you can see the spreadsheet data, and then just
click and drag on the cells you want.
5. Now use the same method to select cells C3:C6 for the "known x's", and
F3:F7 for the "new x's".
6. If you were to press OK now, then only one value will appear in cell G3. ( if
you did this you will need to undo!) What you actually need to do is to press
Ctrl-Shift-Return all together. All the "best fit" Y-values now appear in cells
G3-G7. Why the Ctrl-Shift? Because what you are entering is an "array
formula". Each item in the “results” column is related to a calculation over
the whole “source” column.
7. Now add the data we have just created to the graph, in the same way as
you did above. Select F3:G7, copy it to the clipboard (HOME tab /
CLIPBOARD group / COPY item), activate the graph and paste special
(HOME tab / CLIPBOARD group / PASTE dropdown / PASTE SPECIAL
item).
1. Clicking on the “best fit” data, and format to remove the data points, and make
the line a nice solid red.
2. Ensure that there are no lines joining the real data.
3. Since there is no legend and there are two sets of data and two X-axes, insert some
arrows to indicate which data points go with which X-axis. (INSERT tab /
ILLUSTRATIONS group / SHAPES dropdown / ARROW item)
LINEST
y B A d 0 .5
Select cells F11 and G11. Type "=" and use the "fx" button to activate the "function wizard"
again. Set up the "LINEST" function, with C3:C6 as the "known x" and D3:D6 as the "known
y". Remember to use Ctrl-Shift-Return (it’s another array formula, producing the results
from the “known y-values” D3:D6 and the “known x-values” C3:C6). Format the result to 2
decimal places. If you wanted to do so, you could confirm that these values do in fact give
the same straight line that TREND returns by using this formula to create another table of
model data and plotting another line on the graph.
Save the spreadsheet. The first part of the practical is now complete.
Do not spend too much time making the write-up perfect – you need to try to finish the rest
of this script!
2. Select the bits you want from the spreadsheet (e.g. cells B2:D6)
and copy (HOME tab:CLIPBOARD group:COPY item)
“followme” should be the default printer. The followme print queue can be released at any
of the color photocopiers within the department (e.g. if there is a problem with the Holder
Building photocopier try going to Reception and using the photocopier there instead).
“hb30-tl-hp401dn” is a small desktop black&white printer in the computer room. The printer
will start printing paper as soon as you send your print job to that printer.
- go to the Holder Building photocopier in the main corridor near the stairs;
- present your university card to the contact-less card reader to authenticate;
- The photocopier should identify you and set your email address as the “scan-to-
me” email address. Then the photocopier will list any print jobs you have sent which
can be released for printing on that device. Release your print job and pick-up the
paper printout.
- After printing your document, you might also like to test using the scan-to-email
functionality of the photocopier. Put the paper printout onto the glass for
photocopying. Press Home button then select Scanner. Select the “Scan-to-me”
Show the printout to the Demonstrator. They will check it over with you.
Let us first consider how this data may have been obtained. Each yield stress value
represents a single measurement of the yield stress of one specimen. After testing
the specimen has been examined metallographically from which the grain size has
been measured as an average of measuring the size (average diameter? mean linear
intercept method?) of lots of grains (> 100 grains?).
What is the (lack of) accuracy of these measurements? Since each yield stress
measurement is a single measurement it has one value, but the value (e.g. 19 MPa) has
a precision of ±0.5 MPa due to being measured to the nearest 1 MPa. However the grain
size is an average of lots of measurements therefore it is possible to statistically analyse
these measurements to determine the standard error of each average. This is done from
the standard deviation of the data assuming a Gaussian distribution and therefore gives a
different error for each specimen.
The original spreadsheet “Practical 1P1a complete.xls” has a worksheet tab called “Data
with errors” which contains additional data for the errors in the stress and grain size
measurements. These errors have then been added to the graph as error bars as shown
on the worksheet tab called “Graph with errors”.
It is also desirable to consider the accuracy of the best fit line, especially the resultant
The analysis of errors is very important and will be covered in considerable detail later in
the course. At this early stage in the course students are expected to be aware of the
magnitude and source of errors and students should include consideration of errors when
presenting data in practical write-ups.
Use the help menu in Microsoft Excel to work out how to add error bars to your graph!
(have a play around and see if you can work out how excel does error bars…)
You should also look at the spreadsheet “Practical 1P1a complete.xls” and try to work out
how the error data given on the sheet called “Data with error” has been added to the
graph entitled “Petch Plot with error bars” on the worksheet “Graph with errors”.
Consider the specimen with Stress = 11 MPa. We could ask how significant is it that this
point does lie off the best-fit line? When you add the error bars you find that the best-fit line
is intersected by the error bar indicating that the off-set of the data point from the line is
not significant.
If you want to get more marks for your practical write-up you should give a brief
description of errors in the practical and incorporate the new graph with error bars.
Updated your practical write-up with data and graph including error bars and add a brief
description of how errors have been considered and what the errors are in the values of
A and B. You will probably need to extend your write-up onto a second page.
Note: there are no marks given for this “practical”. It is for your benefit; unless you can do
the basic data manipulation dealt with here, you may have problems in handling and
presenting data from many of the other practicals.
Feedback
This practical class does not use the formal online practical feedback assessment
questionnaire however you are invited to complete following paper feedback form and put
your anonymous responses in the letterbox located in the corridor outside the teaching
labs.
2. Do you consider that you got out of the exercise what you were meant to?
Was there any information that was missing you would have expected/would have liked to
have received? If so, please give details below.
Any other comments? (Particularly for any problems exposed by responses to the
questions above)