Pile Group Tool  2.0.3
Educational tool demonstrating behavior of pile groups in layered soil
pilefeamodeler.h
1 #ifndef PILEFEAMODELER_H
2 #define PILEFEAMODELER_H
3 
4 //#include <QVector>
5 #include <QMap>
6 #include <QFile>
7 
8 #include "pilegrouptool_parameters.h"
9 #include "soilmat.h"
10 
11 #define CHECK_STATE(X) modelState.value(X)
12 #define ENABLE_STATE(X) modelState[X]=true
13 #define DISABLE_STATE(X) modelState[X]=false
14 
15 enum class PilePlotData {
16  LateralDisplacement,
17  AxialDisplacement,
18  PileMoment,
19  PileShear,
20  PileAxialForce,
21  SoilStress,
22  Pultimate,
23  Y50,
24  Tultimate,
25  Z50
26 };
27 
28 enum class AnalysisState {
29  solutionAvailable,
30  solutionValid,
31  dataExtracted,
32  meshValid,
33  loadValid,
34  analysisValid
35 };
36 
37 class Domain;
38 class StaticAnalysis;
39 
41 {
42 public:
44  ~PileFEAmodeler();
45 
47  {
48  public:
49  SoilMotionData() { delta0=0.0; delta1=0.0;zmax=999999.0;};
50  SoilMotionData(double d0, double d1, double zm) { delta0=d0; delta1=d1;zmax=zm;};
51 
52  double delta0;
53  double delta1;
54  double zmax;
55  };
56 
58  {
59  public:
60  SoilNodeData() {ID=-1; depth=0;};
61  SoilNodeData(int id, double z) {ID=id; depth=z;};
62 
63  int ID;
64  double depth;
65  };
66 
67  void updatePiles(QVector<PILE_INFO> &);
68  void updateSwitches(bool useToe, bool assumeRigidHead);
69  void setLoadType(LoadControlType);
70  void updateLoad(double, double, double);
71  void updateSoil(QVector<soilLayer> &);
72  void updateGWtable(double );
73  void updateDisplacement(double ux=0.0, double uy=0.0);
74  void updateDispProfile(QVector<double> &);
75  void setAnalysisType(QString);
76  void setDefaultParameters(void);
77  bool doAnalysis();
78 
79  void writeFEMinput(QString filename);
80  void dumpDomain(QString filename);
81 
82  int getExitStatus();
83 
84  void buildMesh();
85  void buildLoad();
86  void buildAnalysis();
87 
88  void updateMotionData(void);
89  double shift(double z);
90 
91  QList<QVector<QVector<double> *> *> getLateralDisplacements();
92  QList<QVector<QVector<double> *> *> getAxialDisplacements();
93  QList<QVector<QVector<double> *> *> getMoment();
94  QList<QVector<QVector<double> *> *> getShear();
95  QList<QVector<QVector<double> *> *> getForce();
96  QList<QVector<QVector<double> *> *> getStress();
97  QList<QVector<QVector<double> *> *> getPult();
98  QList<QVector<QVector<double> *> *> getY50();
99  QList<QVector<QVector<double> *> *> getTult();
100  QList<QVector<QVector<double> *> *> getZ50();
101 
102 private:
103  int extractPlotData();
104  void clearPlotBuffers();
105 
106 protected:
107  // load control
108  LoadControlType loadControlType;
109 
110  QMap<AnalysisState, bool> modelState;
111 
112  double P; // lateral force on pile cap
113  double PV; // vertical force on pile cap
114  double PMom; // applied moment on pile cap
115 
116  double excentricity; // horizontal offset of the first pile from the center of the pile cap
117 
118  double HDisp; // prescribed horizontal displacement
119  double VDisp; // prescriber vertical displacement
120 
121  double surfaceDisp; // prescribed soil surface displacement
122  double percentage12; // percentage of surface displacement at 1st layer interface
123  double percentage23; // percentage of surface displacement at 2nd layer interface
124  double percentageBase; // percentage of surface displacement at base of soil column
125 
126  QVector<double> soilMotion = QVector<double>(MAXLAYERS+1, 0.0);
127  QVector<SoilMotionData> motionData = QVector<SoilMotionData>(MAXLAYERS);
128 
129  // get parameters
130  double gwtDepth; // depth of ground water table below the surface
131  int numPileElements;
132  int numPiles;
133 
134  // states
135  bool assumeRigidPileHeadConnection = false;
136  bool useToeResistance = true;
137  int puSwitch;
138  int kSwitch;
139  int gwtSwitch;
140 
141  // soil layers and related methods
142  QVector<soilLayer> mSoilLayers;
143 
144  void setupLayers();
145 
146  // temporary variables
147  double gSoil;
148 
149  double zCoord = 0.0; // z-coordinate of point. Negative if below the surface
150  double eleSize; // effective element length for p-y and t-z springs
151  double sigV; // effective stress at p-y and t-z springs
152  double pult, y50; // lateral resistance
153  double tult, z50; // shaft friction
154  double qult, z50q; // toe resistance
155 
156  // meshing parameters
157  int minElementsPerLayer = MIN_ELEMENTS_PER_LAYER;
158  int maxElementsPerLayer = MAX_ELEMENTS_PER_LAYER;
159  int numElementsInAir = NUM_ELEMENTS_IN_AIR;
160 
161  PILE_FEA_INFO pileInfo[MAXPILES];
162 
163  int numNodePiles;
164 
165  // pile head parameters
166  double EI = 1.;
167  double EA = 1.;
168  double GJ = 1.0e12;
169 
170  // others
171  QVector<HEAD_NODE_TYPE> headNodeList = QVector<HEAD_NODE_TYPE>(MAXPILES, {-1,-1,0.0, 1.0, 1.0});
172  QList<CAP_NODE_TYPE> capNodeList;
173 
174  Domain *theDomain;
175  StaticAnalysis *theAnalysis = NULL;
176 
177  int numLoadedNode;
178  QVector<double> depthOfLayer = QVector<double>(4, 0.0);
179 
180  // data containers
181  QVector<QVector<double> *> locList;
182  QVector<QVector<double> *> lateralDispList;
183  QVector<QVector<double> *> axialDispList;
184  QVector<QVector<double> *> MomentList;
185  QVector<QVector<double> *> ShearList;
186  QVector<QVector<double> *> AxialList;
187  QVector<QVector<double> *> StressList;
188 
189  QVector<QVector<double> *> pultList;
190  QVector<QVector<double> *> y50List;
191  QVector<QVector<double> *> tultList;
192  QVector<QVector<double> *> z50List;
193 
194  QList<SoilNodeData> soilNodes;
195 
196  //
197  // state switches
198  bool dumpFEMinput;
199  QFile *FEMfile = NULL;
200 };
201 
202 #endif // PILEFEAMODELER_H
Definition: pilefeamodeler.h:40
Definition: pilegrouptool_parameters.h:52
Definition: pilefeamodeler.h:46
Definition: pilefeamodeler.h:57