You are on page 1of 3

Civil & Environmental Engineering Department

CE318 Numerical & Statistical Methods in Civil Engineering


(132)
Lab Assignment #2
Objectives
To introduce the basic computational and graphical capabilities of Mathematica
Problem

Full
Mark
Student
Mark
Problem1 20
Problem2 20
Problem3 20
Problem4 40
Total 100
Student Name
Student ID
Submission Date
Problem 1 (Example 1.1, textbook)
The velocity of a free falling body near the earth surface is given by : v = (gm)/c (1 - e
-HcmL t
), where c is constant called the drag
coefficient (kg/s), m is the body mass (kg), g is gravitational constant = 9.81 (m/s
2
) and t is time (seconds). Define the function
v[m, c, t], evaluate it for m = 68.1 kg and c = 12.5 kg/s, then plot the resulted function for t ranging from 0 to .
Problem 2
Use the built-in function Manipulate to get an animated plot for the function sin[n1 x]+sin[n2 x] versus x which ranges from 0
to 2p. Let both n1 and n2 take continuous values between 1 and 20.
Problem 3
Use the built-in function If to construct the function f(x) defined by:
x x < 0
x
2
0 b x b 1
1 x
2
x > 1
Repeat the above using Piecewise function, then plot the function for x ranging from-1 to 5.
Problem 4
Consider the beam loaded as shown below. Generate the shear and bending moment diagrams using singularity functions repre-
sented by proper Mathematica built-in functions, then plot the shear and moment diagrams.
Solution steps :
1- Calculate the support reactions HR
L
= 57 kip HupwardL, R
R
= 28 kip HupwardL
2- derive V the following intervals :
0 < x < 5
5 < x < 8
8 < x < 10
2 | Lab_Assignment_2.nb
Instructor: Husain J. Al-Gahtani

3- derive M the following intervals :
0 < x < 5
5 < x < 7
7 < x < 8
8 < x < 10
4- Use the built-in functions If or Piecewise to get single expressions for V and M which are valid for the whole domain 0< x <10.
5- Plot V and M.
Lab_Assignment_2.nb | 3

You might also like