Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit 

CIVE286 - Programming for Civil Engineers

Coursework 1

Submission Time & Date: 23:59 24th March 2023

Consider the soil profile as shown in Figure 1. The saturated unit weight for sand is 21.8kN/m3, and the           unsaturated unit weight for sand is 19.5kN/m3 . For the clay layer, saturated and unsaturated unit weights are   18.5kN/m3 and 15.5kN/m3 respectively. The unit weight for water is 9.8kN/m3 . The settlement describes how much the layer shrinks under the action of external loads. The formulae describing this phenomenon are:

Effective stress without surcharge: σ0 = Hsoil × γbHwater × γw .

Primary consolidation settlement: Sc =  e

For normally consolidated clay: e = Cclog10  ( )

For overconsolidated clay (σ ≥ σ +∆σ \ ) : e = Cslog10  ( )                         For overconsolidated clay (σ  < σ +∆σ \ ) : e = Cslog10  ( ) +Cclog10  ( )

where γb and γw are unit weight of soil and water respectively, e0 is initial void ratio, H is the clay layer        thickness, Cs and Cc are the swell and compression indices respectively, σ = OCR × σ is pre-consolidation stress, and ∆σ\  is the increase in effective stress by surcharge.


The task for this assignment is to program an appropriate set of VBA code, with data provided in Table 1 to:

1.  determine σ at the centre of the clay layer for water table varying from 5m to 15m below the ground surface (use 10 + 10 × i intervals to cover the variation, where i is the last digit of your student ID);

2.  determine the primary consolidation settlement for the clay layer for water table varying from 5m to 15m (10 + 10 × i intervals to cover the variation, where i is the last digit of your student ID);

3.  plot σ calculated in question 1 against the water table depth using VBA code;

4.  plot clay settlement calculated in question 2 against the water table depth using VBA code.

Table 1

Compression index Cc      0.25

Swell index Cs

0.09

OCR

1.0 +i×0. 1 (i is the last digit of your student ID)

Surcharge ∆σ (kPa)

80

Initial void ratio e0

0.95

Your code should contain

•  Correct input and output data [40%]

  At least one user-defined function (or subroutine) used in the code [10%]

  Appropriate structure (indents, comments, variable declarations) [15%]

  Two figures plotting effective stress and settlement against water table depth [15%]

Your report should

•  outline your coding strategy, describe the code including variables that were used to solve the problem, and how those variables were used to obtain the results.

  Be no more than two pages in length excluding the code.

Note:

  The project is worth 30% of your total module mark.

•  The deadline for submission is 23:59, 24 March 2023.

•  To submit your work, upload a zipped folder, with your ID number as the folder name, containing your VBA code in a .xlsm spreadsheet and your project report.

•  IF YOUR CODE DOES NOT RUN YOU WILL NOT RECEIVE ANY MARKS FOR THE CODE PART OF THE MARK SCHEME.

•  You should not collaborate with other people. If you submit a solution you are deemed to have agreed that you have not copied from or collaborated with another person. The software checker Moss

(Measure Of Software Similarity) may be used to detect plagiarism.

Table 1: Marking Criteria

 

Outstanding

Comprehensive/

Competent

Deficient/

Weak

0

Code, 50%

All           functions

present  and  prop- erly named.   Code runs perfectly with no errors.  Exceeds minimum    project requirements.

All           functions

present.          Code runs     but     some small   errors   may be present.   Meets minimum    project requirements

Functions   missing or          improperly named.           Code runs but has many

Code does not run

or is missing.

errors.

project

ments

Missing require-

Style, 25%

The best code that

could   be   reason- ably         expected. Fully   documented and    demonstrates a     clear     under- standing   of  VBA programming

Code  is  not  fully documented. Some weaknesses or lack of     understanding evident.

Code  is  very  dif- ficult   to   read   or is   otherwise   con- fusing. Poorly doc- umented.

Code  is  not  docu-

mented at all.

Report, 25%

Clearly   and   con- cisely  explains the

VBA     code     and

how each part runs and  contributes  to the    overall    pro- gram. Well written, without      spelling or        grammatical mistakes.

VBA  code  is  ex-

plained   but   with some      omissions. Report    is    some- what    unclear    or contains         some grammatical  /  ty- pographical errors.

VBA  code  is  not

well  explained  or is difficult to read. The    report    does not  demonstrate  a clear    understand- ing   on   behalf  of the  author.   Major

Report   impossible to read or missing

spelling matical Report  limit.

or   gram-

errors. exceeds