CE 279 - Computational Geotechnics Assignment - 1 Due Date: March 26th, 2021

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

CE 279 - Computational Geotechnics

Assignment – 1
Due date: March 26th, 2021
Consider the following 1D wave equation on a 10m domain (−5 ≤ x ≤ 5).

ü = c2 u00 (1)
1
with initial conditions: u(x, 0) = 1+x2 ; u̇(x, 0) = 0

and with the following boundary conditions:


Case 1: Fixed boundaries on both edges
Case 2: Fixed boundary on x = −5m and stress-free boundary at x = 5m
Case 3: Fixed boundary on x = −5m and u0 (5, t) = −u̇(5, t)

Assume c = 1 m/s and total simulation time as 20s.

Solve the above equation numerically using the central difference method for both time and space.
Please submit source code. Please also present the results listed below.
1. Derive the stability criterion for solving the above equation using central difference for time and space
and choose the simulation time step accordingly. [20 pts]
2. Choose atleast 5 different grid sizes (∆x) in space and compute the error as the L2 norm of [uf inest−grid (x, 7)−
ucurrent−grid (x, 7)] and comment on the convergence of the algorithm by plotting error as a function
of ∆x. This can be done for any one of the three boundary condition scenarios. [20 pts]
3. Plot a 3D surface plot (x axis - time, y axis - x, z axis - u(x,t)) to demonstrate wave propagation
as a function of x and t for all three boundary condition cases and comment on the wave reflection
characteristics at the x = 5 m boundary. Use the results from the finest grid for these plots. [50 pts]
4. For any one of the boundary condition cases, plot the 3D surface plot for u(x,t) for an unstable time
step. [10 pts]
Discussion question [0 pts - just food for thought] - responses are welcome but not mandatory.

If you were to solve this problem in parallel on two separate computers by splitting the computational domain
into two, then the −5 ≤ x ≤ 0 domain would lie on one computer (say Comp1) and 0 ≤ x ≤ 5 would belong
to another computer (say Comp2). This implies that Comp1 would not have the solution corresponding to
any grid point from Comp2 and vice-versa. One of the computationally expensive parts of a parallel solve
is the transfer of data from one computer to another. So, it is best to transfer just the minimum amount
of data required for each computer to do its job. For solving this problem in parallel, please identify which
data needs to be transferred from Comp1 to Comp2 at each time step and also from Comp2 to Comp1.

General comments:
1. Don’t copy. Please work on the assignments yourself. I will also be interacting one-on-one (5-10 mins)
with all the students crediting the course after the assignment submission to gauge your understanding
of the submitted code/assignment.
2. Please ask any questions regarding the assignment at the end of the class or in the teams chat for the
class so that other students are also aware of the discussion.
3. Please email me the completed assignment by the end of March 26th.
4. Please submit the source code along with the assignment. For the numerical solution, please use
MATLAB, python, C/C++ or Fortran.

You might also like