67
A Software Tool for Automatic Modelling of Soil and Shallow Foundations by Junyan Xiao A thesis submitted in conformity with the requirements for the degree of Bachelor of Applied Science Department of Civil Engineering University of Toronto © Copyright by Junyan Xiao 2019

A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

  • Upload
    others

  • View
    3

  • Download
    0

Embed Size (px)

Citation preview

Page 1: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

A Software Tool for Automatic Modelling of Soil

and Shallow Foundations

by

Junyan Xiao

A thesis submitted in conformity with the requirements for the degree of Bachelor of Applied Science

Department of Civil Engineering University of Toronto

© Copyright by Junyan Xiao 2019

Page 2: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

I

A Software Tool for Automatic Modelling of Soil

and Shallow Foundations

Junyan Xiao

Bachelor of Applied Science

Department of Civil Engineering

University of Toronto

2019

Abstract

This thesis presents a newly developed automatic tool to generate shallow foundation models

which are able to accommodate Soil-Structure Interaction (SSI). This development is inspired by

other SSI modelling methods available in the literature, with further attention to the accuracy and

practicability. The models generated by the tool is able to capture the nonlinear soil and structure

behaviours as they are inevitable for shallow foundation designs/retrofitings.

In lieu of conventional cumbersome Finite Element Method (FEM) modelling, the innovative tool,

a fusion of MATLAB, Gmsh, and OpenSees software, takes care of pre-, and post-processing

procedure under reasonable assumptions, which reduces user efforts and level of knowledge

required to a large extent. A practical example of the proposed tool is provided. Since the tool is

currently at the prototyping phase, an outlook for the potential applications and the next step of

development are presented as well.

Page 3: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

II

Acknowledgments

First, I would like to express my sincere gratitude to my supervisor Professor Kwon for continuous

support and guidance throughout this project. Without him, I could not have been here. I would

like to thank Mohamed A. Sayed for helping me tackling OpenSees modelling issues.

I would also like to give thanks to my parents and my girlfriend for supporting me spiritually over

the entire project and my life in general.

Page 4: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

III

Table of Contents

List of Figures: ............................................................................................................................................. IV

List of Tables: ............................................................................................................................................... V

Chapter 1: Introduction ................................................................................................................................. 1

Chapter 2: Literature Review ........................................................................................................................ 3

2.1 Direct Approach .................................................................................................................................. 4

2.2 Substructure Approach ........................................................................................................................ 4

2.3 Comparison between Methods - Motivation of the Proposed Program .............................................. 8

Chapter 3: Software Framework Introduction ............................................................................................ 10

3.1 Pre-Processing ................................................................................................................................... 11

3.2 Finite Element Analysis .................................................................................................................... 18

3.3 Post-Processing ................................................................................................................................. 19

Chapter 4: FEM Model ............................................................................................................................... 20

4.1 General Information .......................................................................................................................... 20

4.1.1 FE Analysis Procedure ............................................................................................................... 20

4.1.2 Vertical Fz-Uz analysis ............................................................................................................... 22

4.1.3 Horizontal Fx-Ux and Fy-Uy analysis .......................................................................................... 22

4.1.4 Rotational Mx-Rx and My-Ry analysis ........................................................................................ 23

4.2 Materials ........................................................................................................................................... 24

4.2.1 Foundation Elements.................................................................................................................. 24

4.2.2 Soil Elements ............................................................................................................................. 25

4.3 Sensitivity ......................................................................................................................................... 27

4.3.1 Extent of the Soil Domain .......................................................................................................... 27

4.3.2 Mesh Refinement ....................................................................................................................... 28

4.4 Example ............................................................................................................................................ 29

4.5 Model Validation .............................................................................................................................. 34

4.5.1 Bearing Capacity ........................................................................................................................ 34

4.5.2 Static Stiffness Comparison ....................................................................................................... 36

Chapter 5: Limitations and Future Work .................................................................................................... 38

5.1 Lack of Interface Elements ........................................................................................................... 38

5.2 Homogenous Soil Domain ............................................................................................................ 39

5.3 Smart Mesh Size Selection Algorithm .......................................................................................... 39

5.4 Lumped Spring Model with Non-Linear Spring Approximation.................................................. 39

Page 5: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

IV

5.5 Near-field parameters for Macro-element Approach .................................................................... 39

5.6 Transfer to Dynamic Model .......................................................................................................... 40

Chapter 6: Conclusion ................................................................................................................................. 41

References ................................................................................................................................................... 42

Appendix A: Scripts for Pre-processing ..................................................................................................... 45

Appendix B: Scripts for FEM Analysis ...................................................................................................... 56

Appendix C: Scripts for Post-processing .................................................................................................... 57

List of Figures:

Figure 1: Types of foundations categorized using aspect ratio (Gerolymos and Gazetas 2006b) ................ 3

Figure 2: Wolf (1997)’s spring-dashpot-mass model (left) and Wang et al. (2011)’s Two DOFs Model

(right) ............................................................................................................................................................ 5

Figure 3. Stiffness calculation suggested in FEMA 356 (FEMA-356 2000) ................................................ 6

Figure 4: Lumped Spring Model (De Angelis et al. 2017) .......................................................................... 7

Figure 5. Systematic flowchart of the purposed software ........................................................................... 10

Figure 6: Text files for user input ............................................................................................................... 12

Figure 7. Sample 3-D soil-foundation FEM model meshed in Gmsh ......................................................... 14

Figure 8. Plan view of the sample model with the terminology used to define the model dimension ........ 15

Figure 9. Plan view of the sample model with the terminology used to define the mesh sizes .................. 15

Figure 10. Elevation view of the sample model with the terminology used to define the model dimension

.................................................................................................................................................................... 16

Figure 11. Elevation view of the sample model with the terminology used to define the mesh sizes ........ 16

Figure 12. Detailed drawing for the interface layer – Plan View ............................................................... 17

Figure 13. Detailed drawing for the interface layer – Elevation View ....................................................... 17

Figure 14: Step 1) gravity loading (left); Step 2) self-weight (middle); Step 3) test loading (right) .......... 21

Figure 15: Controlled point (yellow) and EqualDOFs nodes (blue) for vertical loading ........................... 22

Figure 16: Controlled point (yellow) and EqualDOFs (blue) for horizontal loading ................................. 23

Figure 17: Beam Elements and EqualDOFs (nodes with the same colour have same DOF constraints) for

Rotational Pushover .................................................................................................................................... 24

Figure 18: Shear Modulus Reduction Curve (Yang et al. 2003) ................................................................. 26

Figure 19: Yield surface configuration of pressure independent soil (left) and pressure dependent soil

(right) in 3-D stress space ........................................................................................................................... 26

Figure 20: Simple dimension of a shallow foundation FEM model (Gazetas et al. 2013) ......................... 27

Figure 21: Pressure bulb (Chen and Duan 2014) ....................................................................................... 28

Figure 22: Foundation geometry and soil properties in the example .......................................................... 29

Figure 23: User input .................................................................................................................................. 30

Figure 24: General failure pattern of shallow foundation (Chen and Duan 2014)..................................... 34

Figure 25: Bearing capacity analysis .......................................................................................................... 35

Figure 26: Definition of Parameters............................................................................................................ 37

Figure 27: Stress distribution 1) without Interface Layer (left); 2)with Interface Layer (right) ................. 39

Page 6: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

V

List of Tables:

Table 1: Comparisons between methods ...................................................................................................... 8

Table 2: Suggested values for clay-type materials (Yang et al. 2003) ........................................................ 13

Table 3: Suggested values for sand-type materials (Yang et al. 2003) ....................................................... 13

Table 4: Summary of Data Output Files ..................................................................................................... 19

Table 5: Matrix of the controlled and constraint DOFs for each DOF analysis ......................................... 22

Table 6: Summary of Material Models ....................................................................................................... 24

Table 7: Selected parameters of the FEM model, specified by the user. .................................................... 29

Table 8: Output Plots .................................................................................................................................. 31

Page 7: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

1

Chapter 1: Introduction

In today’s framework of performance-based structural design, prevention of socio-economic

damages due to an earthquake becomes fatal for architectures and engineers. To understand the

structural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

decades ago and studied by a number of researchers. It has been shown from the literature that SSI

can significantly alter the dynamic responses, especially for heavy constructions on soft soils. Once

the foundation is mobilized, a significant amount of energy will be dissipated at the interface. In

general, SSI lengthens the structural period and escalates the damping ratio, which may increase

the force and displacement demand under the seismic excitation (Elnashai et al. 2015). Such

phenomena have led structural engineers to go beyond the conventional linear-elastic analysis but

taking the nonlinearity of SSI into account by considering the inelastic cyclic hysteretic behaviour

of the bridge components. A rigorous method to model SSI is to have recourse to computer 3-D

simulation. One way to accomplish this is by utilizing FEM (Finite Element Method) which,

however, demands intensive computational power and massive modelling effort. Various

analytical and numerical modelling approaches are suggested and proposed by researchers to

substitute the refined FE model of the soil-foundation system. Research papers have also shown

that the numerically evaluated seismic fragility of bridges depend on how SSI is modelled, because

the SSI directly influences the foundation input motion.

In this work, a systematic framework of shallow foundation’s modelling is investigated. The SSI

between a structure and its supporting shallow foundations involves sliding (horizontal), settling

(vertical), and rocking (rotational) movement. Inertial effects of the foundation are studied

statically. A newly developed software tool is introduced to automatically generate shallow

foundation models which can take into account the effect of SSI. In lieu of traditional cumbersome

FEM modelling, the innovative tool takes care of pre-, and post-processing procedure under

reasonable assumptions, which reduces users’ efforts to a large extent. This tool is also able to

produce inputs for large-scale seismic assessments of bridge groups for cities. An open-source 3-

D seismic simulation software, OpenSees, is utilized as a platform for the aforementioned tool.

Chapter 2 of this thesis presents a brief literature review of the available shallow foundation

modelling techniques. The strengths and limitations of each approach are compared. Chapter 3

Page 8: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

2

discusses a detailed assembly of the proposed tool, including pre- and post-processing and adopted

FEM scheme. In Chapter 4, the proposed FE model is discussed in detail, along with an application

example. Chapter 5 discussed the limitations and future work of the proposed tool. Finally, the

conclusion is presented in Chapter 6.

Page 9: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

3

Chapter 2: Literature Review

Bridge foundations can be categorized by the shape and aspect ratio, a ratio between the foundation

depth and its width, as shown in Figure 1. Shallow foundations are defined with an aspect ratio

less than 1. Such foundations are used for transferring structural loads to the earth near the surface.

Shallow foundations exhibit nonlinear behaviour resulting from irreversible nonlinear soil

behaviour and soil-foundation interface conditions which leads to sliding and rocking of the

foundation (Chai et al. 2017). A number of analytical and numerical modelling approaches are

proposed by researchers to simulate the behaviour between soil and shallow foundations of bridges.

It is still a challenge to obtain efficient SSI model in a precise and low computational cost manner.

Two main approaches include: substructure approach and the direct approach. Under the

substructure approach, there are the lumped-spring approach, lumped parameter model approach,

the beam-on-Winkler-foundation (BNWF) model approach, and the macro-element model

approach.

Figure 1: Types of foundations categorized using aspect ratio (Gerolymos and Gazetas 2006b)

Under a seismic event, SSI can be analyzed through the superposition of two stages: the kinematic

effect stage and the inertia effect stage(Gerolymos and Gazetas 2006a). The former effect happens

along the length of the foundation caused by the lateral movement of the soil strata developed

during the earthquake based on the assumption that the superstructure has zero inertia. The latter

Page 10: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

4

effect acts on the foundation caused by the lateral forces on the superstructure. In the case of

shallow foundations, the kinematic effect stage is often neglected due to the shallow embedded

depth.

2.1 Direct Approach

In the direct approach, all components of the structure and soil are combined and modelled together

in a single model as a complete system. A properly defined model is able to capture the inertia and

kinematic effects simultaneously and yield an accurate and realistic result. For example, Manos et

al. (2008) developed an FE model for a bridge pier with its pier cap, shallow foundation and soil

domain together in ANSYS. Non-linear pier behaviour and SSI effect were investigated by the

author. The direct approach is accurate, however, requires a detailed modelling creation and

massive computational effort.

2.2 Substructure Approach

Substructure approach, also known as the partition method, models the superstructure and the soil

domain separately. The inertia effect can be determined and modelled to either account soil

frequency-dependent characteristics by assuming a linear elastic domain and switching the time-

domain analysis into the frequency-domain analysis utilizing Fourier transformation techniques,

or assume a frequency-independent system and capture the nonlinearity in the time domain

(Gazetas 1991).

Lumped parameter model, also know as lumped spring-mass-dashpot system, is introduced by

researchers to emulating frequency-dependent characteristics of the soil foundation system using

a set of physical components, such as springs, lumped masses, and dampers. The parameters of

such components are calibrated to match the dynamic impedance functions. Varies models are

purposed by researchers. Wolf (1997) used a simple spring-dashpot-mass model to simulate

deformable soil supporting a rigid massless cylindrical foundation, as shown in Figure 2. Wang et

al. (2011) represented SSI by a two DOF (superstructure and foundation) lumped parameter model

Page 11: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

5

consisted of two mass blocks, three springs, and three dashpots. Equivalent linear soil properties

are often used due to the model is not capable of capturing the nonlinearity from SSI.

Figure 2: Wolf (1997)’s spring-dashpot-mass model (left) and Wang et al. (2011)’s Two DOFs

Model (right)

Macro-element approach, initially purposed by Nova and Montrasio (1991), divides soil deposits

supporting structures into two subdomains. The near-field is identified in the vicinity of footing

where the majority of nonlinearity of the model occurs. The far-field domain, on the other hand,

describes the soil with purely linear behaviour. The frequency-dependency material properties are

simulated using the far-field components, a set of springs and dampers, to calibrate the dynamic

impedance. For the near field, a macro-element is used to capture the near-field nonlinearity. This

approach is originated by Roscoe et al. (1963a) as the authors studied the nonlinearity of the soils

with the theory of plasticity. In the paper, a yielding surface was created where all critical (in yield)

loading paths from laboratory tests were lied on. The model was then expanded by Nova to include

hardening rule and flow rule (Nova and Montrasio 1991). According to the author, this analysis

could accurately capture the approximation of the ultimate surfaces from SSI. The approach is

further developed in Paolucci et al. (2008), Chatzigogos et al. (2011) and Chai et al. (2017).

Leblouba et al. (2016a) developed a three-spring lumped spring model, where the horizontal and

rotational springs are modelled using the Bouc-Wen model whereas vertical springs are modelled

linearly. The parameters of springs are calibrated from experimental moment-rotation and

horizontal force-deformation curves.

Winkler model is originally introduced after Winkler (1867) to use a set of independent, close

spaced linear springs to idealize the soil medium. This idealization has limitations such as cannot

predict the inelastic behaviour and the deformation is localized and lack of continuity amongst

Page 12: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

6

springs. The beam-on-nonlinear-Winkler-foundation (BNWF) is an improvement of the original

model, achieving using a set of p-y, q-z and t-z curve springs with parameters calibrated against

laboratory (or numerical) tests and (or) analytical (or empirical) solutions. BNWF is commonly

used for professional practices as a result of its simplicity. For example, the Federal Emergency

Management Agency outlines three shallow foundation modelling options (FEMA-356 2000).

One of them is to use uncoupled vertical and rotational Winkler springs with a finite element

representation. The procedure of distributing and calculating the vertical stiffness is presented in

Figure 3. ACI-341 (2014) also suggests using uncoupled linear or nonlinear Winkler spring models

to model the shallow foundations. Raychowdhury and Hutchinson (2008) introduced a two-

dimensional nonlinear Winkler shallow foundation modelling command in the framework of

OpenSees. Three types of springs are utilized for a combined spring, which are drag, plastic, and

close springs. The spring parameters of the model were either calibrated against experimental

results or adopt from closed form solutions available in the literature.

Figure 3. Stiffness calculation suggested in FEMA 356 (FEMA-356 2000)

Lumped-spring approach models the foundation as a single DOF with springs connected in each

interested DOF to represent the soil-structure interaction in the specified direction. Spring

parameters can be determined in two ways: 1) using the closed-form formula available in the

Page 13: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

7

literature [Gazetas (1991) and Shamsabadi et al. (2010)] 2) calibrating parameters through

laboratory experiments or conducting FEM analysis, where foundations are assumed to be rigid.

Non-linear springs can be utilized to represent the compliance of the soil and capture the hysteretic

curves. Because developing lumped spring models for multi-directional inelastic cyclic behaviour

was difficult, the foundation's behaviours are assumed to be uncoupled in two orthogonal

directions. Figure 4 shows a sample lumped spring model developed by De Angelis et al. (2017).

Figure 4: Lumped Spring Model (De Angelis et al. 2017)

The accuracy of spring coefficients is essential for simplified models. Various approaches have

been purposed in the past decades to encompass dynamic characteristics (ex. sliding, rocking, and

uplifting) of shallow foundations and properties of vicinal soil, such as the closed-form expression

proposed by Gazetas (1991) and Mylonakis et al. (2006). Gazetas also suggested frequency-

modification factors which can be used to approximate dynamic impedance characteristics. A

stiffness degradation model is introduced by Paolucci et al. (2008) to account for the progressive

reduction of soil-structure contact as the results of foundation uplift and soil plasticization under

foundation edges. Reduction of the effective foundation width can occur due to the successive

loading cycles induced irrecoverable downward movement of the underlaid soil. The new effective

foundation width has the formula B’ = B(1-D), where D is a degradation parameter. Adamidis et

al. (2014) developed expressions for equivalent-linear stiffnesses (KR) and equivalent damping

ratios (ξR) in rocking of the circular and strip foundations on a homogenous inelastic undrained

clay stratum. KR is estimated from the parametric results of two/three-dimensional finite element

analyses and normalized by the system’s linear elastic stiffness. ξR is determined by considering

wave radiation, soil inelasticity (hysteresis), and energy dissipation (impact) from severe uplifting

and rocking of shallow foundations.

Page 14: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

8

2.3 Comparison between Methods - Motivation of the Proposed Program

The advantages and drawbacks of the afore-discussed modelling approaches are summarized in

Table.1 with their various modelling targets. At this stage of SSI study, some of the afore-discussed

models (ex. Marco-element models) are well investigated with 2-D idealization only. Considering

foundations may have different plane dimensions and shapes in reality, a 3-D model is required to

achieve better accuracy. Thus, the proposed program examines foundation response in 3-D space

with respect to five individual DOFs. The proposed program in this report can be well embedded

in multiple aforementioned modelling schemes. For the time-domain analysis, non-linear

characteristic backbone and hysteretic curves of the SSI can be generated by means of a series of

3D FE analysis. Such curves can then be used in calibration of the non-linear spring parameters

for the Winkler model or lumped-spring approach. Macro-element approach can also utilize the

results to obtain the initial stiffness and capacity to build a failure surface of the soil-foundation

system. At this stage, the ‘detachment’ between soil medium and foundation is under developing.

Further development of the program will allow the model to capture the geometrical nonlinearity

such as ‘sliding’ and ‘detachment’.

Table 1: Comparisons between methods

Foundation Modeling

Approach Advantage Disadvantage Usage

Direct

frequency-dependent

geometry and soil

non-linearities

included

close to reality,

accurate results

massive modelling and

computational efforts,

increasing with the

complexity of the

structure

Practical use for

critical structures

(ex. nuclear

power plants)

research work

Substructure Lumped

Spring

geometry and soil

non-linearities

included

minimum

computational efforts

uncoupled between

DOFs

frequency-independent

(unless Gazatas stiffness

is adopted)

requires accurate spring

calibrations

quick bridge

assessment

Multi-foundation

modelling

commercial and

practical use

Page 15: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

9

Table 1: Comparisons between methods continues

Foundation Modeling

Approach Advantage Disadvantage Usage

Substructure

Lumped

Parameter

frequency-dependent

low computational

efforts

geometry and soil non-

linearities excluded (unless

utilizing equivalent linear

approach)

requires proper model

calibrations

stability issues may exist

depends on structures and

soil, difficult to generalize

the model

mainly used for 2-D

analysis

research work

Macro-

element

accurate in

predicting geometry

and soil non-

linearities

coupled system

low computational

efforts

frequency-independent

requires accurate

information on the capacity

of soil and foundation

requires calibrations for

springs

research work

Winkler

(BNWF)

geometry and soil

non-linearities

included

low computational

efforts

uncoupled between DOFs

(unless the distribution of

springs is carefully

calibrated)

frequency-independent

(unless Gazatas stiffness is

adopted)

requires accurate spring

calibrations

quick bridge

assessment

Multi-

foundation

modelling

commercial

and practical

use (suggested

in many codes

and standards)

Page 16: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

10

Chapter 3: Software Framework Introduction

In this Chapter, the framework of the proposed shallow foundation modelling tool is introduced.

Figure 5 shows the overall flowchart of the program. It illustrates the adopted existing software

implemented at each step with corresponding input and output. The tool consists of three stages:

pre-processing, FEM analysis, and post-processing. Each stage of the program is covered in detail

in the following sections.

Figure 5. Systematic flowchart of the purposed software

Page 17: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

11

3.1 Pre-Processing

Text files (.txt) are currently used to record the user input. Users need to define total of three .txt

files: Material_Input.txt, Foundation_Input.txt, and FEM_Input.txt. The input includes key

dimensions of FE soil-foundation models and parameters of the soil. Figure 6 presents sample text

files used to record input. The format of the input need be strictly followed.

Extra care needs to be taken for ‘FM-’ parameters. Such parameters define the level of mesh

refinement of the model, and they are designed to take only integer numbers. For ‘FM-F’ an even

number should be selected so that symmetrical assumptions of the model hold, which is explained

later. Graphical illustrations of the geometrical inputs are shown in Figure 7-11.

This software aims to model embedded foundations; however, surface foundations can also be

modelled by reducing the embedded depth of the foundation to a reasonable small number and

setting FM-ZTL to one.

The soil type will be taken as clay if 0 is assigned to ‘SoilCategory’ entry in the material input file;

while sand will be used for the value of 1. If the clay is selected, parameters after

‘PressureDependCoeficient’ will be ignored; whereas ‘Cohesion’ will be ignored if the sand is

specified.

The last .txt input file is used to define the number of steps and stepsizes which will be used in

FEM analysis.

Page 18: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

12

Figure 6: Text files for user input

Considering the complexity of soil parameter calibrations, users can interpolate from the value

suggested by the developers of the soil models in OpenSees, shown in Table 2 for clay-type

materials and Table 3 for sand-type materials.

Page 19: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

13

Table 2: Suggested values for clay-type materials (Yang et al. 2003)

Table 3: Suggested values for sand-type materials (Yang et al. 2003)

Page 20: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

14

Then, MATLAB is utilized to pass soil-foundation dimensions to Gmsh, an open-sourced 3-D

finite element mesh generator (Geuzaine and Remacle 2009). MATLAB is a computing

environment as well as programming languages (Mathwork 2004).

A predefined Gmsh modelling script is then used to create a box-shaped soil domain with the

geometric and mesh dimensions adjusted based on the user input. The sample Gmsh script is shown

in Appendix. Instructional diagrams of a sample Gmsh-generated FEM model are shown in Figure

8-11. The colour green, orange, and brown represent the foundation, core region and outer region,

respectively.

After generating the structured mesh, a ‘.msh’ file, generated by Gmsh, encompasses all the 3-D

mesh information. The meshed model solely consists of eight-noded elements; details can be found

in Chapter 4.1. A MATLAB based code is then implemented to extract and reorganize the

connectivity of nodes and elements from the ‘.msh’ file; followed by the extra procedure(s) of

model modification, such as forming a half model to reduce computational demands.

Next, the foundation nodes, boundary conditions and varies recorders are all defined automatically

in MATLAB. Meanwhile, user inputted soil properties are assigned to the elements as well. Then,

multiple files are written in special syntax (.tcl) for selected FEM platform, OpenSees, are

generated using MATLAB codes.

The sample MATLAB scripts for pre-processing are shown in Appendix A.

Figure 7. Sample 3-D soil-foundation FEM model meshed in Gmsh

Page 21: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

15

Figure 8. Plan view of the sample model with the terminology used to define the model

dimension

Figure 9. Plan view of the sample model with the terminology used to define the mesh sizes

Page 22: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

16

Figure 10. Elevation view of the sample model with the terminology used to define the model

dimension

Figure 11. Elevation view of the sample model with the terminology used to define the mesh

sizes

Page 23: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

17

Figure 12. Detailed drawing for the interface layer – Plan View

Figure 13. Detailed drawing for the interface layer – Elevation View

Page 24: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

18

3.2 Finite Element Analysis

OpenSees is utilized as the FE analysis calculator. OpenSees is the abbreviation of the Open

System for Earthquake Engineering Simulation. It is an open-sourced finite element software

framework developed by the Pacific Earthquake Engineering Research Center (PEER), written in

C++ and interpreted using TCL. It is capable of modelling advanced structural and geotechnical

systems (McKenna et al. 2010).

After the pre-processing stage, the half model is subjected to pushover analysis in all three DOFs.

The displacement-controlled analysis is then used to generate backbone curves. Force and

displacement are recorded at the control nodes of the foundation, which is discussed in Chapter

3.1. To achieve a better convergence, the default stepsizes are chosen to be small numbers (0.0001)

in all directions (the users can adjust stepsize in Input). Energy incremental with a limit of 1e-5 is

chosen as the converging criteria. Constraint type is ‘Penalty’ with a constant of 1018. Profile solver

for symmetric positive definite (ProfileSPD) and modified Newton method are chosen as the

matrix solver and solution algorithms respectively. Different trials have been conducted for

performance evaluation and the aforementioned solution strategy has the shortest run time and

good convergence. If the analysis failed to converge, however, the stepsize will be reduced by half

and the maximum steps will be doubled off the original value. Pushover tests will be terminated

when the maximum steps (default 100) are reached.

Then, the static cyclic analysis is conducted to the foundations in all DOFs separately. The

displacement histories are generated based on the data collected from pushover analysis. The

number of cycles and incremental per cycle are specified by the users. Same as pushover analysis,

if the analysis failed to converge, a new analysis will be carried out with a half step size and a

doubled number of steps. The OpenSees file is shown in Appendix B.

Page 25: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

19

3.3 Post-Processing

MATLAB is utilized as the post-processing software. Scripts are developed to automatically

generate backbone and cyclic curves. Such curves are derived using the force and displacement

response recorded at the controlled nodes. Stress-distribution plots with the nodal displacement of

the x-direction symmetrical plane (where y-coordinates are 0) at the last computational step are

plotted as well. The sample MATLAB scripts for post-processing are shown in Appendix C.

The model purely consists of 3D brick elements (eight Gaussian points) with von Mises type

material assigned. Thus, octahedral stress is computed at each Gaussian point on the interested

plane. Then, average octahedral stress is taken at each node. This is not strictly accurate; however,

considering the massive amount of data points and simplicity of the mesh geometry this approach

is adopted in the program. The average stress tensors are then used to evaluate stress distribution.

Table 4 below summarises a list of output files. Data output files (.out) can be located in ‘Output’

folder; whereas all figures and plots are saved in ‘Photo’ folder.

Table 4: Summary of Data Output Files

File Name Discription

displacementFX.out

… (for all 5 DOFs) Displacements of controlled points

Gdisplacement.out Displacements due to gravity and self-weight, recorded at the

center of the foundation

nodaldisplacementFX.out

… (for all 3 DOFs)

Displacements of nodes in the soil domain (only for the nodes

on the plane of symmetry, where y = 0)

Stress1FX.out ~ Stress8FX.out

Strain1FX.out ~ Strain8FX.out

Stress and strain recorded at each Gaussian point of the nodes

in the soil domain

VerticalReaction.out To record vertical reactions at the restrained DOFs of the

foundation (for lateral analysis only)

HorizontalReaction.out To record horizontal reactions at the controlled points of the

foundation (for rotational analysis only)

Page 26: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

20

Chapter 4: FEM Model

As mentioned in the previous Chapter, the FEM model is developed in OpenSees. In this Chapter,

a detailed FE model assembly will be discussed, concerning the material and element types, FE

analysis procedure, and model sensitivity. The expecting computing time will be presented at the

end of this Chapter as well.

4.1 General Information

Symmetry is utilized to reduce FE mesh and computational time. The model is reduced to half size

of the original model for Fx, Fy, Fz, Mx, My analysis. Torsional behaviour, however, needs to have

a full model to emulate. Analysis of torsional behaviour is not included in the proposed program.

If the foundation has a rectangular shape (Lx ≠ Ly), two models with two different symmetrical

axes (X and Y) are generated for X-directional and Y-directional analysis separately. All elements

are eight nodded 3-D standard brick. Such elements employ a trilinear isoparametric formulation

for forces, stress and strain calculation with three degrees of freedom at each node.

The type of boundary conditions for this project is an important aspect and may affect the accuracy

of the results. For dynamic analysis, absorbing boundaries need to be utilized to prevent reflection

of the propagating waves. This program, however, aims at generating backbone curves and cyclic

load-deformation diagrams under static monotonic and cyclic loadings respectively. Thus, only

static analysis is required which allows the models to have near (as discussed in sensitivity analysis)

and basic types of boundary conditions. The proposed tool has a fully fixed base and partially

restrained (only in their respective normal direction) boundaries surrounded, which allows models

to settle due to the gravity or other static loadings.

4.1.1 FE Analysis Procedure

Each analysis consists of three main steps, suggested by Oktay (2012):

1. Free-field stresses calculation: Gravity loading is applied prior to other analysis to obtain

the initial confining pressure and generate a static equilibrium stress state. In this step, the

soil unit weight is assigned to the elements of the foundation to simulate free field

Page 27: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

21

settlement. All nodes in this phase are allowed to settle freely except the bottom nodes. The

body force of the foundation is assumed to be the same as the soil to remain the stress

equilibrium.

2. Application of model self-weight: The self-weight of the superstructure will then be

applied to the center of gravity of the foundation as a constant nodal force. Since symmetry

is utilized, only half of the structure self-weight is employed. Since the foundation still has

the same body force from the previous step, the total ‘weight’ of the foundation should be

deducted from the nodal force applied in this step.

3. Application of the test loading: Further analysis is performed in this step.

The FE analysis procedure varies between pressure-dependent materials and pressure-independent

materials since they have different shear stress-strain behaviour as the results of different

constitutive models. Step 1 to 3 are applicable when modelling cohesionless soil. For models with

pure cohesive soil medium, Step 1 can be skipped in the analysis because shear behaviour of

cohesive soil is insensitive to the level of confinement; zero body forces of such elements are

therefore assumed to reduce computational demand.

At the end of the free-field stress calculation stage, vertical settlement occurs. These small

displacements recorded at the nodes directly beneath the foundation are deducted from the total

vertical displacements in the later analysis.

Figure 14: Step 1) gravity loading (left); Step 2) self-weight (middle); Step 3) test loading (right)

The purposed program allows pushover and static cyclic analysis to be conducted in a total of five

degrees of freedom (DOFs). Torsional analysis of the foundation is not included. Since the only

half model is studied, the recorded resistant force is doubled. The load-deformation relationships

Page 28: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

22

are constructed using the reactions and displacement recorded at the controlled point. Table 5 is a

summary of the DOFs conditions for each applicable analysis.

Table 5: Matrix of the controlled and constraint DOFs for each DOF analysis

Ux Uy Uz Rx Ry

Fx Control: Fx-Ux free fix:Fz-Ux fix fix

Fy free Control: Fy-Uy fix:Fz-Uy fix fix

Fz fix fix Control: Fz -Uz free free

Mx free fix: Fy-Rx free:Mx-Settle. Control: Mx -Rx fix

My Fix: Fx-Ry free free:My-Settle. free Control: My -Ry

4.1.2 Vertical Fz-Uz analysis

Vertical ‘EqualDOF’ constraints are imposed on the surface nodes of the foundation, as shown in

Figure 15. Such constraints allow the foundation to settle the same distance. Horizontal

movements of the foundation are not permitted to obtain pure vertical resistances.

Figure 15: Controlled point (yellow) and EqualDOFs nodes (blue) for vertical loading

4.1.3 Horizontal Fx-Ux and Fy-Uy analysis

At the end of the gravity analysis, a ‘dummy’ controlled point will be created for the horizontal

DOF(s) analysis. The ‘dummy’ controlled point is at the center of the underformed foundation and

fixed in both vertical (z-axis) and normal (y-axis) directions. It is connected to the nodes on the

two faces of the foundation through ‘EqualDOF’ constraints, as shown in Figure 16. Thus, vertical

DOFs of the foundation are restrained. Displacement increments are then applied to the controlled

point. Vertical forces at the restrained nodes are recorded and lumped together to construct coupled

Page 29: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

23

F-u plots. As discussed in the early Chapter, if the foundation is squared, only one lateral analysis

will be performed; whereas for non-squared foundations, two half models are created to perform

two horizontal tests.

Figure 16: Controlled point (yellow) and EqualDOFs (blue) for horizontal loading

4.1.4 Rotational Mx-Rx and My-Ry analysis

The generated FEM model is three dimensional with three DOFs (x,y,z) per nodes. To control the

rotational displacement of the foundation, nodes with six DOFs are required. Therefore, beam

nodes and elements are generated upon the completion of gravity analysis. Such beam nodes are

attached (through ‘EqualDOF’ command) to the surface nodes of the foundation, as shown in

Figure 17. The node at the middle of the beam is selected as the controlled point, restrained from

any horizontal displacement. Displacement increments are then applied to the controlled node.

Similar to the horizontal DOF analysis, two tests need to be conducted for a non-squared

foundation.

Page 30: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

24

Figure 17: Beam Elements and EqualDOFs (nodes with the same colour have same DOF

constraints) for Rotational Pushover

4.2 Materials

In this section, materials used in the automatic generated FEM model are discussed, with respect

to types of material model used and their properties. Table 6 summarizes the types of material

models used.

Table 6: Summary of Material Models

Components Material Model

Foundation Elastic Isotropic

Cohesive Soil Pressure Independent Multi-Yield (PIMY)

Cohesionless Soil Pressure Dependent Multi-Yield (PDMY)

4.2.1 Foundation Elements

To reduce the degree of freedoms within the foundation and to prevent local deformations, the

foundations are idealized to behave as rigid bodies herein. Therefore, a linear elastic isotropic

material with a relatively large modulus of elasticity (109 kPa ≈ 40 times larger than actual concrete)

and zero Poisson’s ratio are assigned to the foundation elements.

Page 31: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

25

4.2.2 Soil Elements

The multi-surface concept with an associative flow rule is used to define the plasticity of PIMY

and PDMY materials in OpenSees (Yang et al. 2003).

In the proposed tool, cohesive soil (i.e. clay) is modelled with PIMY. Implemented by Yang et al.

(2003), PIMY is an effective model to simulate the monotonic and cyclic responses of the cohesive

soils. This material has an elastic-plastic characteristic with von Mises (J2 plasticity) type failure

criterion, where the plasticity only exhibits in the deviatoric stress-strain response. Octahedral

shear stress/strain is therefore computed because it represents the deviatoric stress/strain in the 3D

domain. The stress is expressed as:

𝜏𝑜𝑐𝑡 =1

3√(𝜎11 − 𝜎22)2 + (𝜎22 − 𝜎33)2 + (𝜎11 − 𝜎33)2 + 6(𝜎12

2 + 𝜎132 + 𝜎23

2)

where 𝜎11, 𝜎22, 𝜎33 are diagonal terms of the stress tensor and 𝜎12, 𝜎13, 𝜎23 are the shear stresses.

The deviatoric strain (𝛾𝑜𝑐𝑡) has a similar expression, which is:

𝛾𝑜𝑐𝑡 =2

3√(𝜀11 − 𝜀22)2 + (𝜀22 − 𝜀33)2 + (𝜀11 − 𝜀33)2 + 6(𝜀12

2 + 𝜀132 + 𝜀23

2)

Together 𝜏𝑜𝑐𝑡 and 𝛾𝑜𝑐𝑡 define back-bone curves. The octahedral shear stress (τoct) and strain (γoct)

constitutive relationship are defined by a hyperbolic function:

𝜏𝑜𝑐𝑡 =𝐺𝑚𝑎𝑥,𝑜𝑐𝑡

1 + 𝛾𝑜𝑐𝑡,1

𝛾𝑟(𝑝′𝑟

𝑝′)

∗ 𝛾𝑜𝑐𝑡

where G is shear modulus; γr is the reference shear strain; d is the pressure dependence coefficient;

p is effective confining pressure. For clay, d is zero. It is noteworthy that the back-bone curves

depend not only on the low-strain shear modulus (𝐺𝑚𝑎𝑥,𝑜𝑐𝑡) but also the confining pressure (p’) if

d is not equal to 0 (cohesionless material). Total of nine soil parameters are required to generate

the stress-strain relationship. Due to the complexity of parameter generation procedure, the users

are suggested to interpolate the soil parameters from the suggested values provided by the

developer of PIMY (Yang et al. 2003).

Hysteretic nonlinear behaviour of the sand is simulated by PDMY. The model is an elastic-plastic

model with mechanical behaviour depends on the confining pressure. Yield surfaces are Drucker-

Page 32: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

26

Prager type. The yield surfaces are conical shape surfaces with the shared apex located at the origin.

The outermost surface represents the failure criterion and the middle surfaces depict the hardening

region (Altoontash 2004). The constitutive model is similar to the von Mises type material but

without the effect of soil cohesion. The shear modulus reduction curve for both models are shown

in Figure 18. Figure 19 below illustrates the nested yield surfaces of typical von Mises type

materials and Drucker-Prager type materials.

Figure 18: Shear Modulus Reduction Curve (Yang et al. 2003)

Figure 19: Yield surface configuration of pressure independent soil (left) and pressure dependent

soil (right) in 3-D stress space

A more detailed material model explanation and a general procedure of soil parameters calibration

(against the experimental data) can be found in Altoontash (2004). In the paper, constitutive

constants are calibrated against multiple triaxle compression tests and direct simple shear tests.

Page 33: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

27

4.3 Sensitivity

The tool allows users to define the size of soil domain and its mesh dimensions manually. However,

a proper selection of the model size and mesh dimensions is essential which failing to do so may

results in obtaining solutions with low accuracy. Given that, sensitivity of the FEM model with

respect to the extent of the FE discretized field and the level of mesh refinement were discussed in

this section.

4.3.1 Extent of the Soil Domain

The optimized size of soil domain is a function of foundation geometry, soil properties, and applied

loading types. For typical FEM analysis on shallow foundations, Gazetas et al. (2013). suggests a

minimum domain size of 7B * 7B * 2B for squared foundations with dimension B * B. The

suggested dimensions are derived based on the concept of ‘pressure bulb’. A pressure bulb, or

isobar, is a stress contour which connects all points with the same vertical pressure. Theoretically,

models of soil domain should have boundary placed outside of the pressure bulb to prevent

interference. However, especially for the cases of vertical loading, stress decay rapidly between

the depth of 1B and 2B. Thus, placing the bottom boundary 2B away from the surface is generally

acceptable. Figure 21 shows a general graphical solution of pressure bulb calculation. This is

generally true for vertical and rotational loading. For horizontal loading cases, the stress field may

be extented beyond the boundary; however, for simplicity reason, the recommended size of soil

domains is 7L * 7B * 3L for rectangular-shaped foundations.

Figure 20: Simple dimension of a shallow foundation FEM model (Gazetas et al. 2013)

Page 34: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

28

Figure 21: Pressure bulb (Chen and Duan 2014)

4.3.2 Mesh Refinement

At this phase of the development, there is no general solution to optimize mesh sizes. If possible,

a mesh convergence test should be carried out prior to the practical use of the model. It is

noteworthy that the existence of a core region allows the user to have different levels of mesh

refinement in the domain. Computational efforts may be reduced compared to the model with a

single mesh size: Instead of defining highly refined mesh over the entire domain, theoretically, the

users can simply increase the level of refinement at the core region along with adjusting its

boundaries. The quantitative influence of mesh refinements on the accuracy of results, however,

is not investigated in this report.

Page 35: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

29

4.4 Example

To illustrate the proposed tool and its capability to model shallow foundations, a practical example

is presented. A general description of the soil medium and shallow foundation is listed below.

Figure 22: Foundation geometry and soil properties in the example

Table 7: Selected parameters of the FEM model, specified by the user.

Subject Description

Size of Soil medium 20m x 19m x 10m (L x W x H) *

Core Dimension 7m x 6m x 10m (L x W x H) **

Mesh Information FM-F: 6; FM-C: 4; FM-O: 5

FM-ZTL: 3; FM-ZBL: 10

* The size of the soil domain is considered large enough to capture the inelastic behaviour of the

soil in the vicinity of the foundation (larger than 7L * 7B * 3L).

** Geometrical parameters refer to the full model.

Page 36: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

30

Figure 23: User input

Due to the foundation has a rectangular shape (Lx ≠ Ly), two half models with two different

symmetrical axes (x and y) are generated for x-directional and y-directional analysis separately. A

total number of 3502 nodes and 2366 elements are used in the model above. Among these elements,

54 and 2312 elements are assigned to the foundation and soil medium, respectively. All output

data are in ‘.out’ formate and can be found in the ‘Output’ folder. Sample plots (18 out of 21) are

listed in Table 8 after post-processing stage. These figures are saved under the ‘Photos’ folder.

Stress-distribution plots are taken at the last step of the pushover analysis.

Page 37: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

31

Table 8: Output Plots

Fx – Ux - Monotonic Fx – Ux – Monotonic-Sigma Octa

Fy – Uy - Monotonic Fy – Uy – Monotonic-Sigma Octa

Fz – Uz - Monotonic Fz – Uz – Monotonic-Sigma zz

Page 38: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

32

Table 8: Output Plots continues

My – Ry - Monotonic My – Ry - Monotonic-Sigma Octa

Mx – Rx - Monotonic Mx – Rx - Monotonic-Sigma Octa

Fx – Ux - Cyclic Fy – Uy - Cyclic

Page 39: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

33

Table 8: Output Plots continues

My – Ry - Cyclic My – Ry – Cyclic – Settlement

Mx – Rx - Cyclic Mx – Rx – Cyclic – Settlement

Fx – Ry – Cyclic (coupled) Fy – Rx – Cyclic (coupled)

Page 40: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

34

4.5 Model Validation

In this section, the results from FEM analysis in Section 4.4 are compared to existing cloased form

solutions available in the literature, including bearing capacity and elastic stiffness of the

foundation in various directions.

4.5.1 Bearing Capacity

Bearing capacity in the vertical direction is examined against a theoretical value. The maximum

bearing capacity is defined as the ultimate load per unit area when the soil that supports the

foundation suddenly fails, and the failure surface extends to the ground surface (Chai et al. 2017).

Figure 24 shows three types of failure mechanism.

Figure 24: General failure pattern of shallow foundation (Chen and Duan 2014)

Page 41: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

35

The ultimate bearing capacity for squared or rectangular shallow foundations embedded in clay

can be evaluated as per suggested in bridge engineering handbook (Chen and Duan 2014):

𝑞𝑢𝑙𝑡 𝑔𝑟𝑜𝑠𝑠 = 𝑐(𝑁𝑐) + 𝑞(𝑁𝑞)

, where c is the cohesion of the soil; q is the surcharge at the base of the foundation; Nq is the

bearing capacity factor, 1 for clay; Nc is an/other bearing capacity factor, 5.14 for clay. Overall,

the theoretical bearing capacity is 1230 kN.

The load-settlement curve generated from the FEM monotonic loading analysis is observed a

punching shear failure pattern, as shown in Figure 25, where the curve shows a steep and elastic

slope as the load is increased. Bearing capacity from the FEM model is defined when the changing

in the slope of the BB curve stabilized. Following similar procedures suggested in Chai et al.

(2017), MATLAB script is utilized to obtain the bearing capacity, which is around 1600 kN. The

difference in results may due to the conservativeness of the theoretical prediction.

Figure 25: Bearing capacity analysis

Page 42: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

36

4.5.2 Static Stiffness Comparison

The elastic stiffness of five DOFs is compared to the theoretical value after Gazatas et al. (1986).

Table 9 shows the equations used to obtain the theoretical stiffness for embedded foundations

where the soil medium is assumed linear elastic and no geometric non-linearity involved (ex. no-

uplift behaviour). Therefore, the soil domain in FEM model is adjusted to have only linear elastic

properties with the same shear modulus and bulk modulus (without updatematerialstage command

in OpenSees). Results are summarized in Table 10.

Table 9: Static Stiffness for Arbitrarily Shaped Fully Embedded Foundations (Gazatas et al. (1986))

Static Stiffness for Arbitrarily Shaped Fully Embedded

Foundations

Vertical, z

𝐾𝑧,𝑒𝑚𝑏 = 𝐾𝑧,𝑠𝑢𝑟 × [1 +1

21

𝐷

𝐵(1 + 3ℵ)] × [1 + 0.2 (

𝐴𝑤

𝐴𝑏)

23

]

Horizontal, x or y

𝐾𝑥 𝑜𝑟 𝑦,𝑒𝑚𝑏 = 𝐾𝑥 𝑜𝑟 𝑦,𝑠𝑢𝑟 × [1 + 0.15√𝐷

𝐵]

× [1 + 0.52 (ℎ

𝐵

𝐴𝑤

𝐿2)

0.4

]

Rocking, rx

(around the longitudinal

axis)

𝐾𝑟𝑥,𝑒𝑚𝑏 = 𝐾𝑟𝑥,𝑠𝑢𝑟 × {1 + 1.26𝑑

𝐵[1 +

𝑑

𝐵(

𝑑

𝐷)

−0.2

√𝐵

𝐿]}

Rocking, ry

(around the lateral axis) 𝐾𝑟𝑥,𝑒𝑚𝑏 = 𝐾𝑟𝑥,𝑠𝑢𝑟 × {1 + 0.92 (

𝑑

𝐿)

0.6

[1.5 + (𝑑

𝐿)

1.9

(𝑑

𝐷)

−0.6

]}

Static Stiffness for Surface Foundations

Horizontal, x 𝐾𝑥,𝑠𝑢𝑟 =𝐺𝐵

2 − 𝜐[3.4 (

𝐿

𝐵)

0.65

+ 1.2]

Vertical, z 𝐾𝑧,𝑠𝑢𝑟 =𝐺𝐵

1 − 𝜐[1.55 (

𝐿

𝐵)

0.75

+ 0.8]

Rocking, ry 𝐾𝑟𝑦,𝑠𝑢𝑟 =𝐺𝐵3

1 − 𝜐[0.47 (

𝐿

𝐵)

2.4

+ 0.034]

Page 43: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

37

Figure 26: Definition of Parameters

Table 10: Theoretical values with OpenSees values

Stiffness Theoretical FEM % Difference

Horizontal, x 805,917 kN/m 950,000 kN/m 17.88%

Vertical, z 901,023 kN/m 1000,000 kN/m 11.11%

Rocking, ry 2404,000 kN/rad 2609,000 kN/rad 8.50%

The FEM results are in moderate agreement with the theoretical values. The differences may be

caused by the elastic halfspace assumption made when deriving the theoretical stiffness. This

assumption is due to the lack of theoretical solutions for rectangular foundations embedded in

homogenous stratum over bedrock, which may causes a reduction on the calculated stiffness.

Page 44: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

38

Chapter 5: Limitations and Future Work

In this Chapter the limitations of the proposed program are discussed along with their potential

impacts. The future work to overcome such limitations is also introduced.

5.1 Lack of Interface Elements

As mentioned earlier, geometric non-linearities of shallow foundation-soil interaction include

‘sliding’, ‘rocking’, and plasticity developed in the contacted soil. Proper interface elements allow

the FE model to capture the sliding behaviour as well as detachment or rocking. The interface

elements are necessary especially for the clay medium (PIMY). PIMY material in OpenSees has

the cohesive (tensile) capacity, causing an overestimation of the soil stiffness (derived from the

load-deformation curve). Figure 27 shows a comparison of stress field distribution caused by

lateral pushover analysis. It is observed that the model with the interface layer can reduce the soil

tensile stress significantly at the ‘detached’ side. Therefore, interface layers between foundations

and soil are required to be implemented to mitigate the tensile stress. One popular way is to assign

materials with tension cut-off feature to interface elements.

Many commercial FEM software has special elements or materials to emulate the interface (or

contact) layers. In Abaqus, interface elements can capture not only the detachment between two

surfaces, but the tangential frictional behaviour which is in compliance with the Coulomb Friction

law. In OpenSees, PDMY material can be assigned to the interface elements. This type of material

is cohesionless and provides zero tensile strength, which can better emulate the actual behaviour

between massive foundations and in-situ clayey soil. This material, however, has isotropic

hardening for the strong and dense soil; whereas for soft soil, PDMY has negligible strength and

therefor cannot show the stress propagation in soil correctly.

At the current phase, the interface layer is under developing.

Page 45: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

39

Figure 27: Stress distribution 1) without Interface Layer (left); 2)with Interface Layer (right)

5.2 Homogenous Soil Domain

At the prototyping phase, only homogenous soil domain is considered so far. This assumption,

however, limits the applicability of the proposed tool. Thus, as the next step of development, non-

homogenous soil domain will be employed. It is easy to achieve if soil strata are parallel to each

other. However, modelling complexity can increase rapidly with the nonuniformity of the soil

domain. The developer may need to have recourse to other open-sourced mesh generators in the

pre-processing stage to tackle the complicated soil domain.

5.3 Smart Mesh Size Selection Algorithm

As afore-discussed, the investigation on the mesh size selections is beyond the scope of this report.

In the future the developer may conduct mesh convergence tests for each mesh region (core and

outer) separately. Then, a closed formed solution for mesh optimization may be derived.

5.4 Lumped Spring Model with Non-Linear Spring Approximation

The generated backbone curves and hysteretic loops can be employed as the targets in the

calibration process. The non-linearity may be captured by multilinear materials.

5.5 Near-field parameters for Macro-element Approach

Macro-element approach requires inputs of various soil parameters to capture near-field

soil/geometrical non-linearity. The proposed program may help the users generate the required

inputs, such as maximum capacity in each DOFs.

Page 46: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

40

5.6 Transfer to Dynamic Model

The scope of this thesis is limited to static analysis of SSI only. However, if possible, the model

can be switched to the dynamic version by replacing the static boundaries to energy absorbed

boundaries, increasing the size of the domain (allowing the wave to propogate), and assigning

damping model to the soil. Such models can then be used to calibrate dynamic impedance and

damping of the foundation by conducting frequency-domain analysis, which can be utilized, for

example, as far-field inputs of macro-element approach.

Page 47: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

41

Chapter 6: Conclusion

In this chapter, the summary of the proposed shallow foundation modelling tool is provided. This

thesis aims to develop a shallow foundation FEM modelling tool which is able to pre-, and post-

process automatically under reasonable assumptions. This tool improves the practicability and

applicability for the users since traditional FEM modelling requires massive modelling and

computational efforts.

As there has been increasing awareness regarding to the non-linerities in shallow foundation

modelling, various methods have been proposed by researchers. Besides the direct approach, many

modelling methods require careful parameter calibrations against the experimental results or

general closed-form solutions. The proposed tool can be used to capture the non-linearities of soil-

foundation systems with minimum user effort required. That is the motivation of this thesis.

In this report, the pre-processing, FEM analysis, and post-processing operations of the proposed

tool are discussed in detail. A systematic framework is introduced. MATLAB, Gmsh, and

OpenSees are three software which the proposed tool is built onto. MATLAB software is used as

a platform to retrieve, record and transfer data between the other two software. Both Gmsh and

OpenSees are open-sourced program; the former one is a 3D mesh generator and the latter one is

an FE calculator. The models generated by the tool is able to capture the geometric and material

non-linearities as they are inevitable for shallow foundations design/retrofit.

The tool is currently at the prototyping phase. At this phase, the tool is limited to generate models

without interface elements only. Further development, optimization and validation of the tool are

required.

Page 48: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

42

References

ACI-341. (2014). Analysis and Design of Seismic-Resistant Concrete Bridge Systems.

Farmington Hills, MI.

Adamidis, O., Gazetas, G., Anastasopoulos, I., and Argyrou, C. (2014). “Equivalent-linear

stiffness and damping in rocking of circular and strip foundations.” Bulletin of Earthquake

Engineering, 12(3), 1177–1200.

Altoontash, A. (2004). "Simulation And Damage Models For Performance Assessment Of

Reinforced Concrete Beam-Column Joints." PHD thesis, Standford University.

De Angelis, A., Mucciacciaro, M., Pecce, M. R., and Sica, S. (2017). “Influence of SSI on the

Stiffness of Bridge Systems Founded on Caissons.” Journal of Bridge Engineering, 22(8),

04017045.

Chai, S. hyeon, Ghaemmaghami, A. R., and Kwon, O.-S. (2017). “Numerical modelling method

for inelastic and frequency-dependent behavior of shallow foundations.” Soil Dynamics and

Earthquake Engineering, 92, 377–387.

Chatzigogos, C. T., Figini, R., Pecker, A., and Salençon, J. (2011). “A macroelement formulation

for shallow foundations on cohesive and frictional soils.” International Journal for

Numerical and Analytical Methods in Geomechanics, 35(8), 902–931.

Chen, W.-F., and Duan, L. (2014). Bridge engineering handbook. Substructure design. CRC

Press.

Dobry, R., Gazetas, G., and Stokoe, K. H. (1986). “Dynamic Response of Arbitrarily Shaped

Foundations: Experimental Verification.” Journal of Geotechnical Engineering, 112(2),

136–154.

Elnashai, A. S., Di Sarno, L., and Kwon, O. (2015). Fundamentals of earthquake engineering :

from source to fragility. Wiley.

FEMA-356. (2000). “Prestandard and Commentary for Seismic Rehabilitation of Buildings.”

Federal Emergency Management Agency, Washington D.C.

Page 49: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

43

Gazetas, G. (1991). “Formulas and Charts for Impedances of Surface and Embedded

Foundations.” Journal of Geotechnical Engineering, 117(9), 1363–1381.

Gazetas, G., Anastasopoulos, I., Adamidis, O., and Kontoroupi, T. (2013). “Nonlinear rocking

stiffness of foundations.” Soil Dynamics and Earthquake Engineering, 47, 83–91.

Gerolymos, N., and Gazetas, G. (2006a). “Static and Dynamic Response of Massive Caisson

Foundations With Soil and Interface Nonlinearities - Validation and Results.” Soil

Dynamics and Earthquake Engineering, 26(5), 377–394.

Gerolymos, N., and Gazetas, G. (2006b). “Development of Winkler model for static and

dynamic response of caisson foundations with soil and interface nonlinearities.” Soil

Dynamics and Earthquake Engineering, 26(5), 363–376.

Geuzaine, C., and Remacle, J.-F. (2009). “Gmsh: A 3-D finite element mesh generator with

built-in pre- and post-processing facilities.” International Journal for Numerical Methods in

Engineering, John Wiley & Sons, Ltd, 79(11), 1309–1331.

Leblouba, M., Al Toubat, S., Ekhlasur Rahman, M., and Mugheida, O. (2016). “Practical Soil-

Shallow Foundation Model for Nonlinear Structural Analysis.” Mathematical Problems in

Engineering, 2016, 1–10.

Manos, G. C., Kourtides, V., and Sextos, A. (2008). Model Bridge Pier-Foundation-Soil

Interaction Implementing In-Situ / Shear Stack Testing And Numerucal Simulation.

Mathwork. (2004). Global Optimization Toolbox User’s Guide R2019a.

McKenna, F., Scott, M. H., and Fenves, G. L. (2010). “Nonlinear Finite-Element Analysis

Software Architecture Using Object Composition.” Journal of Computing in Civil

Engineering, 24(1), 95–107.

Mylonakis, G., Nikolaou, S., and Gazetas, G. (2006). “Footings under seismic loading: Analysis

and design issues with emphasis on bridge foundations.” Soil Dynamics and Earthquake

Engineering, 26(9), 824–853.

Nova, R., and Montrasio, L. (1991). “Settlements of shallow foundations on sand.”

Géotechnique, 41(2), 243–256.

Page 50: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

44

Oktay, H. E. (2012). "Finite Element Analysis Of Laboratory Model Experiments On Behavior

Of Shallow Foundations Under General Loading", PHD Thesis, Middle East Technical

University.

Paolucci, R., Shirato, M., and Yilmaz, M. T. (2008). “Seismic Behaviour of Shallow

Foundations: Shaking Table Experiments vs Numerical Modelling.” Earthquake Engng

Struct. Dyn., 37, 577–595.

Raychowdhury, P., and Hutchinson, T. (2008). “Nonlinear Material Models for Winkler-Based

Shallow Foundation Response Evaluation.” GeoCongress 2008, American Society of Civil

Engineers, Reston, VA, 686–693.

Shamsabadi, A., Khalili-Tehrani, P., Stewart, J. P., and Taciroglu, E. (2010). “Validated

Simulation Models for Lateral Response of Bridge Abutments with Typical Backfills.”

Journal of Bridge Engineering, 15(3), 302–311.

Wang, Q., Wang, J. T., Jin, F., Chi, F. D., and Zhang, C. H. (2011). “Real-time Dynamic Hybrid

Testing for Soil-Structure Interaction Analysis.” Soil Dynamics and Earthquake

Engineering, Elsevier, 31(12), 1690–1702.

Wolf, J. P. (1997). “Spring-Dashpot-Mass models for Foundation Vibrations.” Earthquake

Engineering and Structural Dynamics, 26(9), 931–949.

Yang, Z., Elgamal, A., and Parra, E. (2003). “Computational Model for Cyclic Mobility and

Associated Shear Deformation.” Journal of Geotechnical and Geoenvironmental

Engineering, 129(12), 1119–1127.

Page 51: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

45

Appendix A: Scripts for Pre-processing

UserInputs.m: Sample MATLAB script for transfering data from .txt (user input) to .geo (Gmsh) and .tcl

(OpenSees)

clc clear all; close all;

% Openning user input files w/ Gmsh & OpenSees linked file fileID1 = fileread('User Inputs/Foundation_Input.txt'); fileID2 = fileread('User Inputs/Material_Input.txt');

Gmsh = fopen('GmshIO/KeyP.geo','w'); Material = fopen('tcl/Soil_Properties.tcl','w');

% Read input files for model definition (only 1 input of foundation is shown) FM_F = str2double(regexpi(fileID1, '(?<=FM-F = \s*)\d*', 'match'));

% Write Gmsh file

fprintf (Gmsh, 'FM = %f\n',FM_F);

% Check soil type

SoilCategory = str2double(regexpi(fileID2, ... '(?<=SoilCategory... (clay=0,sand=1) = \s*)\d*', 'match'));

if SoilCategory == 0 % Soil is Clay

Cohesion = str2double(regexpi(fileID2,... '(?<=Cohesion(kPa) = \s*)\d*', 'match'));

% Write OpenSees file

fprintf (Material, 'set cohesion %f\n',Cohesion);

elseif SoilCategory == 1 % Soil is Sand

PTAng = str2double(regexpi(fileID2, '(?<=PTAng = \s*)\d*', 'match'));

% Write OpenSees file fprintf (Material, 'set PTAng %f\n',PTAng);

end

fclose all;

Page 52: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

46

Soil_Domain_finecenter.geo: Sample pre-defined Gmsh script

Include "KeyP.geo"; //Input File

//Define Points for Core Region Point(1) = {-LFoundationX/2,-LFoundationY/2,0}; Point(2) = {LFoundationX/2,-LFoundationY/2,0}; Point(3) = {LFoundationX/2,LFoundationY/2,0}; Point(4) = {-LFoundationX/2,LFoundationY/2,0};

//Define Lines for Core Region Line(1) = {1,2}; Line(2) = {2,3}; Line(3) = {3,4}; Line(4) = {4,1};

//Define Surface for Core Region Curve Loop(1) = {1, 2, 3, 4}; Plane Surface(100) = {1};

//Extrude and Meshing the Model LineGroup1[] = {1,2,3,4}; zL1[] = Translate {0,0, -LFoundationZ}{ Duplicata{ Line{LineGroup1[]}; } }; Transfinite Line {LineGroup1[],zL1[],zL5[]} = FM + 1 Using Progression 1; allParts[] = {100}; My_new_surfs1[] = Translate {0,0, -

LFoundationZ}{ Duplicata{ Surface{allParts[]}; } }; Transfinite Surface {allParts[],My_new_surfs1[]}; Recombine Surface {allParts[],My_new_surfs1[]};

zdir1[] = Extrude{0, 0, -TransLayer}{Surface{My_new_surfs1[]};

Layers{1};Recombine;};

Mesh 3; // Generalte 3D mesh Coherence Mesh; // Remove duplicate entities

Page 53: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

47

Conversion.m: MATLAB script for extracting nodes and elements from .msh (Gmsh) to .tcl (OpenSees)

input = fopen( 'GmshIO/Soil_Domain_finecenter.msh');

% Extracting nodes

a = '$Nodes'; y = 0; while y == strcmp(fgetl(input), a) continue end fgetl(input);

i = 1; while true newl = fgetl(input); o = str2num(newl); if strcmp(newl, '$EndNodes') break end if o(4) > 0 continue end nodes(i,1) = o(1); nodes(i,2) = o(2); nodes(i,3) = o(3); nodes(i,4) = o(4); i = i + 1; end

% Copying nodes to .tcl OpenSees file

fileID = fopen('txt/_FULLNodes.txt','w'); h = 1; for i = 1:size(nodes,1) if nodes(i,1) ~= h continue end fprintf(fileID,'%d %f %f %f\n',nodes(i,1),nodes(i,2),nodes(i,3),... nodes(i,4)); h = h + 1; end

% Extracting elements

if strcmp(fgetl(input),'$Elements') ~= 1 fprintf ( 1, '\n' ); fprintf ( 1, 'GMSH_DATA_READ - Error!\n' ); error ( 'Error!' ); end i = 1; while true newl = fgetl(input); o = str2num(newl); if strcmp(newl, '$EndElements') break end

Page 54: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

48

if size(o,2) < 9 continue end elements(i,1) = o(1); elements(i,2) = o(2); elements(i,3) = o(3); elements(i,4) = o(4); elements(i,5) = o(5); elements(i,6) = o(6); elements(i,7) = o(7); elements(i,8) = o(8); elements(i,9) = o(9); i = i + 1; end

% Copying elements to .tcl OpenSees file

fileID = fopen('txt/_FULLElements.txt','w'); for i = 1:size(elements,1) fprintf(fileID,'%d %d %d %d %d %d %d %d %d\n',elements(i,1),... elements(i,2),elements(i,3),elements(i,4),elements(i,5),... elements(i,6),elements(i,7),elements(i,8),elements(i,9)); end

fclose all;

Page 55: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

49

HalfmodegeneratorFx.m: Sample MATLAB script for generating .tcl file for horizontal monotonic

loading (creating nodes, elements, constraints, and recorders)

function halfmodelgeneratorFX(LFoundationZ, LFoundationX, LFoundationY,...

OutF_X,FM,stepsizeFX,stepFX)

% Create and Read .tcl & .txt Files

fileID1 = fopen('tcl/_HalfNodes.tcl','w'); fileID2 = fopen('tcl/_HalfElements.tcl','w'); fileID3 = fopen('tcl/_HalfFix.tcl','w'); fileID4 = fopen('tcl/_BeamElementGenerator.tcl','w'); fileID5 = fopen('tcl/_HalfNodeDispRecorder.tcl','w'); fileID6 = fopen('txt/_HalfNodeDispRecorder.txt','w'); fileID7 = fopen('tcl/_EdgeStressStrainRecorder.tcl','w'); fileID8 = fopen('txt/_EdgeStressStrainRecorder.txt','w'); fileID9 = fopen('txt/_FootingNodes.txt','w'); fileID10 = fopen('tcl/_LoadingPattern.tcl','w'); fileID11 = fopen('tcl/_AnalysisGenerator.tcl','w'); fileID12 = fopen('tcl/_StructureSelfWeight.tcl','w'); fileID13 = fopen('tcl/_GravityRecorder.tcl','w'); Nodes = load('txt/_FULLNodes.txt'); Elements = load('txt/_FULLElements.txt');

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Key Parameters Calculation

HalfModelWidth = OutF_X + LFoundationX/2; HalfFoundationWidth = LFoundationY/2; FullFoundationWidth = LFoundationX; FoundationDepth = LFoundationZ; FoundationElementSizeX = FullFoundationWidth/FM;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Write Nodes in .tcl

h = 1; for i = 1:size(Nodes,1) if Nodes(i,3)>=0 nodesrecorder(h,1) = Nodes(i,1); nodesrecorder(h,2) = Nodes(i,2); nodesrecorder(h,3) = Nodes(i,3); nodesrecorder(h,4) = Nodes(i,4); fprintf (fileID1, 'node %d %f %f %f\n',Nodes(i,1),Nodes(i,2),... Nodes(i,3),Nodes(i,4)); h = h + 1; end end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Define Interface Layer

h = 1; for i = 1:size(nodesrecorder,1) if (((nodesrecorder(i,2)==FullFoundationWidth/2+TransLayer)||... (nodesrecorder(i,2)==FullFoundationWidth/2)||... (nodesrecorder(i,2)==-FullFoundationWidth/2-TransLayer)||...

Page 56: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

50

(nodesrecorder(i,2)==-FullFoundationWidth/2))... &&((nodesrecorder(i,3)>=0)&&(nodesrecorder(i,3)<=... HalfFoundationWidth + TransLayer))... &&(nodesrecorder(i,4)>=-LFoundationZ))||... (((nodesrecorder(i,2)<=FullFoundationWidth/2)&&... (nodesrecorder(i,2)>=-FullFoundationWidth/2))... &&((nodesrecorder(i,3)==HalfFoundationWidth)||... (nodesrecorder(i,3)==HalfFoundationWidth + ... TransLayer))&&(nodesrecorder(i,4)>=-LFoundationZ))||... (((nodesrecorder(i,2)<=FullFoundationWidth/2+... TransLayer)&&(nodesrecorder(i,2)>=... -FullFoundationWidth/2-TransLayer))&&(... (nodesrecorder(i,3)<=HalfFoundationWidth+TransLayer)... &&(nodesrecorder(i,3)>=0))&&((nodesrecorder(i,4)... ==-LFoundationZ)||(nodesrecorder(i,4)==-LFoundationZ... -TransLayer))) TransNodes(h,1) = nodesrecorder(i,1); TransNodes(h,2) = nodesrecorder(i,2); TransNodes(h,3) = nodesrecorder(i,3); TransNodes(h,4) = nodesrecorder(i,4); h = h + 1; end end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Find Elements for Half Model

h = 1; for i = 1:size(Elements,1) o = 0; for a = 1:8 if o == a - 1 for j = 1:size(nodesrecorder,1) if Elements(i,a+1)==nodesrecorder(j,1) o = o + 1; end end else continue end if o == 8 HalfElements(h,1) = Elements(i,1); HalfElements(h,2) = Elements(i,2); HalfElements(h,3) = Elements(i,3); HalfElements(h,4) = Elements(i,4); HalfElements(h,5) = Elements(i,5); HalfElements(h,6) = Elements(i,6); HalfElements(h,7) = Elements(i,7); HalfElements(h,8) = Elements(i,8); HalfElements(h,9) = Elements(i,9); h = h + 1; end end end

Page 57: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

51

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Create Foundation, Interface, and Soil Elements

h = 1; k = 1; for i = 1:size(HalfElements,1) o = 0; p = 0; for a = 1:8 if o == a - 1 for j = 1:size(FootingNodes,1) if HalfElements(i,a+1)==FootingNodes(j,1) o = o + 1; end end else continue end end

for a = 1:8 if p == a - 1 for j = 1:size(TransNodes,1) if HalfElements(i,a+1)==TransNodes(j,1) p = p + 1; end end else continue end end

if o == 8 %Footing Elements elementnum1(h) = HalfElements(i,1); h = h + 1; fprintf (fileID2, 'element stdBrick %d %d %d %d %d %d %d %d %d 2

$gravityX $gravityY $gravityZ \n',HalfElements(i,1),HalfElements(i,2),

HalfElements(i,3),HalfElements(i,4),HalfElements(i,5),HalfElements(i,6),HalfE

lements(i,7),HalfElements(i,8),HalfElements(i,9)); elseif p == 8 %Trans Elements elementnum2(k) = HalfElements(i,1); k = k + 1; fprintf (fileID2, 'element stdBrick %d %d %d %d %d %d %d %d %d 1

$gravityX $gravityY $gravityZ \n',HalfElements(i,1),HalfElements(i,2),

HalfElements(i,3),HalfElements(i,4),HalfElements(i,5),HalfElements(i,6),HalfE

lements(i,7),HalfElements(i,8),HalfElements(i,9)); else fprintf (fileID2, 'element stdBrick %d %d %d %d %d %d %d %d %d 1

$gravityX $gravityY $gravityZ \n',HalfElements(i,1),HalfElements(i,2),

HalfElements(i,3),HalfElements(i,4),HalfElements(i,5),HalfElements(i,6),

HalfElements(i,7),HalfElements(i,8),HalfElements(i,9)); end

end

Page 58: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

52

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Generate Fixity for Boundaries

for i = 1:size(nodesrecorder,1) if nodesrecorder(i,4)==-LModelZ fprintf (fileID3, 'fix %d 1 1 1\n',nodesrecorder(i,1)); elseif (nodesrecorder(i,4)~=-LModelZ)&&((nodesrecorder(i,2)==... HalfModelWidth)||(nodesrecorder(i,2)==-HalfModelWidth))&&... (nodesrecorder(i,3)~=HalfModelWidth) fprintf (fileID3, 'fix %d 1 1 0\n',nodesrecorder(i,1)); elseif (nodesrecorder(i,4)~=-LModelZ)&&(nodesrecorder(i,3)==... HalfModelWidth) fprintf (fileID3, 'fix %d 1 1 0\n',nodesrecorder(i,1)); elseif (nodesrecorder(i,4)~=-LModelZ)&&(nodesrecorder(i,3)==0)&&... (nodesrecorder(i,2)~=HalfModelWidth)&&(nodesrecorder(i,2)~=.. -HalfModelWidth) fprintf (fileID3, 'fix %d 0 1 0\n',nodesrecorder(i,1)); end end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Generate Half Nodes Displacement Recorder

count = 1; for i = 1:size(nodesrecorder,1) if nodesrecorder(i,3)==0 nodedisprecord(count,1) = nodesrecorder(i,1); nodedisprecord(count,2) = nodesrecorder(i,2); nodedisprecord(count,3) = nodesrecorder(i,3); nodedisprecord(count,4) = nodesrecorder(i,4); fprintf (fileID6, '%d %f %f %f\n',nodedisprecord(count,1),... nodedisprecord(count,2),nodedisprecord(count,3),... nodedisprecord(count,4)); count = count + 1; end end

st = ''; for i = 1:size(nodedisprecord,1) re = num2str(nodedisprecord(i,1)); st = strcat(st, {' '}, re); end record = char(st); fprintf (fileID5, 'recorder Node -file [format "Output/displacementFX.out"] -

time -node $FootingCenterNode -dof 1 2 3 disp\n'); fprintf (fileID5, 'recorder Node -file [format

"Output/nodaldisplacementFX.out"] -time -node %s -dof 1 2 3

disp\n',record);

Page 59: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

53

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Generate controlled point and EqualDOFs

n = 100000; d = -FullFoundationWidth/2; a = FoundationElementSizeX;

for j = 1:size(FootingNodes,1) if (FootingNodes(j,2)==0)&&(FootingNodes(j,3)==0)&&... (FootingNodes(j,4)==0) fprintf (fileID3, 'set FootingCenterNode %d \n',FootingNodes(j,1)); FootingCenterNode = FootingNodes(j,1); VR(count,1) = FootingCenterNode; end end

count = 1;

fprintf (fileID4, 'node 50000 0 0 0\n'); fprintf (fileID4, 'fix 50000 0 1 1\n'); fprintf (fileID13, 'recorder Node -file [format "Output/Gdisplacement.out"] -

time -node $FootingCenterNode -dof 1 2 3 disp\n'); fprintf (fileID5, 'recorder Node -file [format "Output/displacementFXC.out"]

-time -node 50000 -dof 1 2 3 disp\n'); fprintf (fileID5, 'recorder Node -file [format "Output/displacementFXCR.out"]

-time -node 50000 -dof 1 2 3 reaction\n');

for j = 1:size(FootingNodes,1) if (FootingNodes(j,1)~=FootingCenterNode)&&(FootingNodes(j,2) == -

LFoundationX/2) fprintf (fileID4, 'equalDOF %d %d 1 2 3\n',50000,FootingNodes(j,1)); count = count + 1; VR(count,1) = FootingNodes(j,1); end

if (FootingNodes(j,1)~=FootingCenterNode)&&(FootingNodes(j,2) ==

LFoundationX/2) fprintf (fileID4, 'equalDOF %d %d 1 2 3\n',50000,FootingNodes(j,1)); count = count + 1; VR(count,1) = FootingNodes(j,1); end end

st = ''; for i = 1:size(VR,1) re = num2str(VR(i,1)); st = strcat(st, {' '}, re); end

record = char(st);

fprintf (fileID5, 'recorder Node -file [format "Output/VerticalReaction.out"]

-time -node %s -dof 1 2 3 reaction\n',record);

Page 60: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

54

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Generate stress recorder for 8 Guassian points

h = 1; for i = 1:size(nodesrecorder,1) if (nodesrecorder(i,3)==0) Edge(h,1) = nodesrecorder(i,1); Edge(h,2) = nodesrecorder(i,2); Edge(h,3) = nodesrecorder(i,3); Edge(h,4) = nodesrecorder(i,4); h = h + 1; end end

h = 1; for i = 1:size(HalfElements,1) o = 0; for a = 1:8 for j = 1:size(Edge,1) if HalfElements(i,a+1)==Edge(j,1) o = o + 1; end end end

for k = 1:size(elementnum1,2) if HalfElements(i,1)== elementnum1(k) o = 0; end end

if o > 0 % Elements on the edge elementnum3(h,1) = HalfElements(i,1); elementnum3(h,2) = HalfElements(i,2); elementnum3(h,3) = HalfElements(i,3); elementnum3(h,4) = HalfElements(i,4); elementnum3(h,5) = HalfElements(i,5); elementnum3(h,6) = HalfElements(i,6); elementnum3(h,7) = HalfElements(i,7); elementnum3(h,8) = HalfElements(i,8); elementnum3(h,9) = HalfElements(i,9); h = h + 1; end

end

st = ''; for i = 1:size(elementnum3,1) re = num2str(elementnum3(i,1)); st = strcat(st, {' '}, re); end

record = char(st); fprintf (fileID7, 'recorder Element -ele %s -time -file [format

"Output/stress1FX.out"] -dT 0.01 material 1 stress\n',record);

Page 61: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

55

fprintf (fileID7, 'recorder Element -ele %s -time -file [format

"Output/stress2FX.out"] -dT 0.01 material 2 stress\n',record); fprintf (fileID7, 'recorder Element -ele %s -time -file [format

"Output/stress3FX.out"] -dT 0.01 material 3 stress\n',record); fprintf (fileID7, 'recorder Element -ele %s -time -file [format

"Output/stress4FX.out"] -dT 0.01 material 4 stress\n',record); fprintf (fileID7, 'recorder Element -ele %s -time -file [format

"Output/stress5FX.out"] -dT 0.01 material 5 stress\n',record); fprintf (fileID7, 'recorder Element -ele %s -time -file [format

"Output/stress6FX.out"] -dT 0.01 material 6 stress\n',record); fprintf (fileID7, 'recorder Element -ele %s -time -file [format

"Output/stress7FX.out"] -dT 0.01 material 7 stress\n',record); fprintf (fileID7, 'recorder Element -ele %s -time -file [format

"Output/stress8FX.out"] -dT 0.01 material 8 stress\n',record);

count = 1; for i = 1:size(elementnum3,1) fprintf (fileID8,

'%d %d %d %d %d %d %d %d %d\n',elementnum3(count,1),elementnum3(count,2),elem

entnum3(count,3),elementnum3(count,4),elementnum3(count,5),elementnum3(count,

6),elementnum3(count,7),elementnum3(count,8),elementnum3(count,9)); count = count + 1; end

end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% Generate System Settings and Monotonic Loading Pattern

fprintf (fileID10, 'pattern Plain 100 Linear {\n'); fprintf (fileID10, 'load 50000 10.0 0.0 0.0\n'); fprintf (fileID10, '}\n'); fprintf (fileID11, 'system ProfileSPD\n'); fprintf (fileID11, 'test EnergyIncr 1e-5 1000 1\n'); fprintf (fileID11, 'constraints Penalty 1.e18 1.e18 \n'); fprintf (fileID11, 'integrator DisplacementControl 50000 1 %f\n',stepsizeFX); fprintf (fileID11, 'algorithm ModifiedNewton\n'); fprintf (fileID11, 'numberer RCM\n'); fprintf (fileID11, 'analysis Static\n'); fprintf (fileID11, 'analyze %d;\n',stepFX); fprintf (fileID12, 'pattern Plain 101 Constant {\n'); fprintf (fileID12, 'load $FootingCenterNode 0.0 0.0 -143.135\n'); fprintf (fileID12, '}\n');

fclose all;

Page 62: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

56

Appendix B: Scripts for FEM Analysis

_V2.tcl: Master File for FEM Analysis

wipe;

file mkdir Output;

model BasicBuilder -ndm 3 -ndf 3

##############################################################

# Setting parameters

source tcl/Soil_Properties.tcl

set accGravity 0;

set pi 3.1415926535;

set inclination 0;

set gravityX 0.0;

set gravityY 0.0;

set gravityZ [expr -$accGravity*cos($inclination/180.0*$pi)]

source tcl/_HalfNodes.tcl

puts "Finished creating Nodes..."

set Econc 1000000000; # 40 times of Econc

set vconc 0.00;

set rhoconc 10;

nDMaterial ElasticIsotropic 2 $Econc $vconc $rhoconc

source tcl/_HalfElements.tcl

puts "Finished creating all Soil Elements..."

source tcl/_HalfFix.tcl

puts "Finished creating Fixity"

source tcl/_GravityRecorder.tcl

##############################################################

# Analysis for Stage 1 & 2

numberer RCM

system ProfileSPD

test NormDispIncr 1.0e-6 20 1

algorithm Newton

constraints Transformation

integrator LoadControl 1 1 1 1

analysis Static

updateMaterialStage -material 1 -stage 0

analyze 1 # Analysis for Stage 1 – Gravity Load

source tcl/_StructureSelfWeight.tcl

updateMaterialStage -material 1 -stage 1

analyze 1 # Analysis for Stage 2 – Self-weight analysis

##############################################################

# Analysis for Stage 3

setTime 0.0

wipeAnalysis

loadConst -time 0.0

remove recorders

source tcl/_BeamElementGenerator.tcl

source tcl/_HalfNodeDispRecorder.tcl

source tcl/_EdgeStressStrainRecorder.tcl

source tcl/_LoadingPattern.tcl

source tcl/_AnalysisGenerator.tcl

wipe

Page 63: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

57

Appendix C: Scripts for Post-processing

dispPlotFX.m: Sample MATLAB script for generating Load-Deformation curves

function dispPlotFX()

% load recorded nodal data backbone = load('Output/displacementFX.out'); force = backbone (:,1); % remove force column from data acc(:,1) = []; % data descriptors [nStep, nAcc] = size(backbone); nDOF = 3; nNode = nAcc/nDOF; a = reshape(backbone, nStep, nDOF, nNode); plot(a(:,1,1),2*force*10, '-r','linewidth',1.5) savefig('Postprocessing/BBFX.fig')

end

PostprocessingFX.m: Sample MATLAB script for generating Stress-Deformation Plot

function PostprocessingFX(LFoundationZ,LFoundationX,factor,step) clc clear all; close all;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Load Output Files

Nodes = load('txt/_HalfNodeDispRecorder.txt'); soildisp = load('Output/nodaldisplacementFX.out'); Elements = load('txt/_EdgeStressStrainRecorder.txt'); stpt1 = load('Output/stress1FX.out'); stpt2 = load('Output/stress2FX.out'); stpt3 = load('Output/stress3FX.out'); stpt4 = load('Output/stress4FX.out'); stpt5 = load('Output/stress5FX.out'); stpt6 = load('Output/stress6FX.out'); stpt7 = load('Output/stress7FX.out'); stpt8 = load('Output/stress8FX.out');

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Key Parameters

FullFoundationWidth = LFoundationX; FoundationDepth = LFoundationZ;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Output Data Processing stpt1(:,1) = []; stpt2(:,1) = []; stpt3(:,1) = [];

Page 64: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

58

stpt4(:,1) = []; stpt5(:,1) = []; stpt6(:,1) = []; stpt7(:,1) = []; stpt8(:,1) = [];

% data descriptors [nStep, nAcc] = size(stpt1); nDOF = 7; nNode = nAcc/nDOF;

s1 = reshape(stpt1, nStep, nDOF, nNode); s2 = reshape(stpt2, nStep, nDOF, nNode); s3 = reshape(stpt3, nStep, nDOF, nNode); s4 = reshape(stpt4, nStep, nDOF, nNode); s5 = reshape(stpt5, nStep, nDOF, nNode); s6 = reshape(stpt6, nStep, nDOF, nNode); s7 = reshape(stpt7, nStep, nDOF, nNode); s8 = reshape(stpt8, nStep, nDOF, nNode);

% remove time column from data soildisp(:,1) = []; % data descriptors [nStep1, nAcc1] = size(soildisp); nDOF1 = 3; nNode1 = nAcc1/nDOF1; b = reshape(soildisp, nStep1, nDOF1, nNode1);

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Calculate Octahedral Stress at each Gaussian Point

i = step; f = i; for numNodes = 1:nNode p1=(s1(i,1,numNodes)+s1(i,2,numNodes)+s1(i,3,numNodes))/3; q1(numNodes, 1)=numNodes; q1(numNodes, 2)=(s1(i,1,numNodes)-s1(i,2,numNodes))^2 +

(s1(i,2,numNodes)-s1(i,3,numNodes))^2 + (s1(i,3,numNodes)-

s1(i,1,numNodes))^2.... + 6.0* (s1(i,4,numNodes)^2+s1(i,5,numNodes)^2+s1(i,6,numNodes)^2); q1(numNodes, 2)=sign(s1(i,6,numNodes))*1/3.0*q1(numNodes, 2)^0.5;

end

for numNodes = 1:nNode p2=(s2(i,1,numNodes)+s2(i,2,numNodes)+s2(i,3,numNodes))/3; q2(numNodes, 1)=numNodes; q2(numNodes, 2)=(s2(i,1,numNodes)-s2(i,2,numNodes))^2 +

(s2(i,2,numNodes)-s2(i,3,numNodes))^2 + (s2(i,3,numNodes)-

s2(i,1,numNodes))^2.... + 6.0* (s2(i,4,numNodes)^2+s2(i,5,numNodes)^2+s2(i,6,numNodes)^2); q2(numNodes, 2)=sign(s2(i,6,numNodes))*1/3.0*q2(numNodes, 2)^0.5;

end

Page 65: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

59

for numNodes = 1:nNode p3=(s3(i,1,numNodes)+s3(i,2,numNodes)+s3(i,3,numNodes))/3; q3(numNodes, 1)=numNodes; q3(numNodes, 2)=(s3(i,1,numNodes)-s3(i,2,numNodes))^2 +

(s3(i,2,numNodes)-s3(i,3,numNodes))^2 + (s3(i,3,numNodes)-

s3(i,1,numNodes))^2.... + 6.0* (s3(i,4,numNodes)^2+s3(i,5,numNodes)^2+s3(i,6,numNodes)^2); q3(numNodes, 2)=sign(s3(i,6,numNodes))*1/3.0*q3(numNodes, 2)^0.5;

end

for numNodes = 1:nNode p4=(s4(i,1,numNodes)+s4(i,2,numNodes)+s4(i,3,numNodes))/3; q4(numNodes, 1)=numNodes; q4(numNodes, 2)=(s4(i,1,numNodes)-s4(i,2,numNodes))^2 +

(s4(i,2,numNodes)-s4(i,3,numNodes))^2 + (s4(i,3,numNodes)-

s4(i,1,numNodes))^2.... + 6.0* (s4(i,4,numNodes)^2+s4(i,5,numNodes)^2+s4(i,6,numNodes)^2); q4(numNodes, 2)=sign(s4(i,6,numNodes))*1/3.0*q4(numNodes, 2)^0.5;

end

for numNodes = 1:nNode p5=(s5(i,1,numNodes)+s5(i,2,numNodes)+s5(i,3,numNodes))/3; q5(numNodes, 1)=numNodes; q5(numNodes, 2)=(s5(i,1,numNodes)-s5(i,2,numNodes))^2 +

(s5(i,2,numNodes)-s5(i,3,numNodes))^2 + (s5(i,3,numNodes)-

s5(i,1,numNodes))^2.... + 6.0* (s5(i,4,numNodes)^2+s5(i,5,numNodes)^2+s5(i,6,numNodes)^2); q5(numNodes, 2)=sign(s5(i,6,numNodes))*1/3.0*q5(numNodes, 2)^0.5;

end

for numNodes = 1:nNode p6=(s2(i,1,numNodes)+s6(i,2,numNodes)+s6(i,3,numNodes))/3; q6(numNodes, 1)=numNodes; q6(numNodes, 2)=(s6(i,1,numNodes)-s6(i,2,numNodes))^2 +

(s6(i,2,numNodes)-s6(i,3,numNodes))^2 + (s6(i,3,numNodes)-

s6(i,1,numNodes))^2.... + 6.0* (s6(i,4,numNodes)^2+s6(i,5,numNodes)^2+s6(i,6,numNodes)^2); q6(numNodes, 2)=sign(s6(i,6,numNodes))*1/3.0*q6(numNodes, 2)^0.5;

end

for numNodes = 1:nNode p7=(s7(i,1,numNodes)+s7(i,2,numNodes)+s7(i,3,numNodes))/3; q7(numNodes, 1)=numNodes; q7(numNodes, 2)=(s7(i,1,numNodes)-s7(i,2,numNodes))^2 +

(s7(i,2,numNodes)-s7(i,3,numNodes))^2 + (s7(i,3,numNodes)-

s7(i,1,numNodes))^2.... + 6.0* (s7(i,4,numNodes)^2+s7(i,5,numNodes)^2+s7(i,6,numNodes)^2); q7(numNodes, 2)=sign(s7(i,6,numNodes))*1/3.0*q7(numNodes, 2)^0.5;

end

Page 66: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

60

for numNodes = 1:nNode p8=(s8(i,1,numNodes)+s8(i,2,numNodes)+s8(i,3,numNodes))/3; q8(numNodes, 1)=numNodes; q8(numNodes, 2)=(s8(i,1,numNodes)-s8(i,2,numNodes))^2 +

(s8(i,2,numNodes)-s8(i,3,numNodes))^2 + (s8(i,3,numNodes)-

s8(i,1,numNodes))^2.... + 6.0* (s8(i,4,numNodes)^2+s8(i,5,numNodes)^2+s8(i,6,numNodes)^2); q8(numNodes, 2)=sign(s8(i,6,numNodes))*1/3.0*q8(numNodes, 2)^0.5;

end %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Plot Stress and Deformation of Nodes

h = 1; for d = 1:size(Nodes,1) if (Nodes(d,2) < FullFoundationWidth/2)&&(Nodes(d,2) >... -FullFoundationWidth/2)&&(Nodes(d,4) > -FoundationDepth) continue end

noder = Nodes(d,1); k = 1; for i = 1:size(Elements,1) if (noder == Elements(i,2)) av(k) = q1(i,2); k = k + 1; elseif (noder == Elements(i,3)) av(k) = q2(i,2); k = k + 1; elseif (noder == Elements(i,4)) av(k) = q3(i,2); k = k + 1; elseif (noder == Elements(i,5)) av(k) = q4(i,2); k = k + 1; elseif (noder == Elements(i,6)) av(k) = q5(i,2); k = k + 1; elseif (noder == Elements(i,7)) av(k) = q6(i,2); k = k + 1; elseif (noder == Elements(i,8)) av(k) = q7(i,2); k = k + 1; elseif (noder == Elements(i,9)) av(k) = q8(i,2); k = k + 1; end

end q(h,1) = h; q(h,2) = mean(av); q(h,3) = Nodes(d,2); q(h,4) = Nodes(d,4); h = h + 1; clear av;

Page 67: A Software Tool for Automatic Modelling of Soil and …kwon/docs/BASc_Xiao_2019.pdfstructural seismic response, the concept of Soil-Structure-Interaction (SSI) has been brought up

61

end

for i = 1:size(Nodes,1) delta(i,1) = Nodes(i,1); delta(i,2) = Nodes(i,2) + factor * b(f,1,i); delta(i,3) = Nodes(i,4) + factor * b(f,3,i); end

h = 1; for i = 1:size(Elements,1) bb = 1; o = 0; for a = 1:8 for j = 1:size(Nodes,1) if Elements(i,a+1)==Nodes(j,1) o = o + 1; record(bb)= Nodes(j,1); x(bb) = Nodes(j,2); y(bb) = Nodes(j,4); bb = bb + 1; end end end

for k = 1:size(delta,1) for a = 1:4 if record(a) == delta(k,1) dx(a) = delta(k,2); dy(a) = delta(k,3); end end end for l = 1:size(q,1) if (x(1) == q(l,3))&&(y(1) == q(l,4)) h1 = q(l,2); elseif (x(2) == q(l,3))&&(y(2) == q(l,4)) h2 = q(l,2); elseif (x(4) == q(l,3))&&(y(4)== q(l,4)) h3 = q(l,2); elseif (x(3) == q(l,3))&&(y(3) == q(l,4)) h4 = q(l,2); end end vertices = [dx(1) dy(1); dx(2) dy(2); dx(4) dy(4); dx(3) dy(3)]; faces = [1 2 3 4]; C = [h1; h2; h3; h4]; p = patch('Faces',faces,'Vertices',vertices,'FaceVertexCData',C,... 'FaceColor', 'interp');

end colorbar caxis([-100 100]) end fclose all;

end