Pile Group Tool  2.0.3
Educational tool demonstrating behavior of pile groups in layered soil
mainwindow.h
1 #ifndef MAINWINDOW_H
2 #define MAINWINDOW_H
3 
4 
5 class QNetworkAccessManager;
6 
7 #include <QMainWindow>
8 #include <QtNetwork/QNetworkReply>
9 #include "pilegrouptool_parameters.h"
10 
11 // forward declaration of classes
12 class soilLayer;
13 class QTableWidgetItem;
14 class QSettings;
15 class PileFEAmodeler;
16 class SystemPlotSuper;
17 class ResultPlotSuper;
18 
19 namespace Ui {
20 class MainWindow;
21 }
22 
23 class MainWindow : public QMainWindow
24 {
25 
26 public:
27  explicit MainWindow(bool graphicsModeQCP = false, QWidget *parent = 0);
28  ~MainWindow();
29 
30  void doAnalysis(void);
31  void fetchSettings();
32  void updateUI();
33  void setActiveLayer(int);
34  void updateLayerState();
35  int findActiveLayer();
36  int adjustLayersToPiles();
37  void updateResultPlots();
38  void updateSoilResultPlots(QVector<double> &);
39  void refreshResultPlots();
40 
41 
42 
43 private slots:
44  //
45  // program controls
46  //
47 
48  // menu actions
49  void on_actionExit_triggered();
50  void on_actionNew_triggered();
51  void on_actionSave_triggered();
52  void on_action_Open_triggered();
53  void on_actionExport_to_OpenSees_triggered();
54  void on_actionReset_triggered();
55  void on_actionFEA_parameters_triggered();
56 
57  void on_actionLicense_Information_triggered();
58  void on_actionLicense_triggered();
59  void on_actionProvide_Feedback_triggered();
60 
61  void on_action_About_triggered();
62  void on_actionPreferences_triggered();
63 
64  // check boxes
65  void on_chkBox_assume_rigid_cap_clicked(bool checked);
66  void on_chkBox_include_toe_resistance_clicked(bool checked);
67 
68  // geometry parameters entered/changed
69  void on_pileDiameter_valueChanged(double arg1);
70  void on_embeddedLength_valueChanged(double arg1);
71  void on_freeLength_valueChanged(double arg1);
72  void on_Emodulus_valueChanged(double arg1);
73  void on_groundWaterTable_valueChanged(double arg1);
74  void on_xOffset_valueChanged(double arg1);
75  void on_pileIndex_valueChanged(int arg1);
76 
77  void on_btn_deletePile_clicked();
78  void on_btn_newPile_clicked();
79 
80  // material table slots
81  void on_horizontalForceSlider_valueChanged(int value);
82  void on_verticalForceSlider_valueChanged(int value);
83  void on_momentSlider_valueChanged(int value);
84 
85  void on_appliedHorizontalForce_editingFinished();
86  void on_appliedVerticalForce_editingFinished();
87  void on_appliedMoment_editingFinished();
88 
89  // layer selection slots
90  void on_chkBox_layer1_clicked();
91  void on_chkBox_layer2_clicked();
92  void on_chkBox_layer3_clicked();
93  void on_layerSelectedInSystemPlot(bool selected);
94 
95  // soil property slots
96  void on_layerThickness_valueChanged(double arg1);
97  void on_layerDryWeight_valueChanged(double arg1);
98  void on_layerSaturatedWeight_valueChanged(double arg1);
99  void on_layerFrictionAngle_valueChanged(double arg1);
100  void on_layerShearModulus_valueChanged(double arg1);
101 
102  void on_properties_currentChanged(int index);
103 
104  // Frank's network counter
105  void replyFinished(QNetworkReply*);
106 
107  void on_forceTypeSelector_activated(int index);
108  void on_pushoverDisplacement_editingFinished();
109  void on_pulloutDisplacement_editingFinished();
110  void on_pushoverDisplacementSlider_valueChanged(int value);
111  void on_pulloutDisplacementSlider_valueChanged(int value);
112  void on_surfaceDisplacement_editingFinished();
113  void on_surfaceDisplacementSlider_valueChanged(int value);
114  void on_Interface12_editingFinished();
115  void on_Interface12Slider_valueChanged(int value);
116  void on_Interface23_editingFinished();
117  void on_Interface23Slider_valueChanged(int value);
118  void on_BaseDisplacement_editingFinished();
119  void on_BaseDisplacementSlider_valueChanged(int value);
120 
121  // response to signals from systemPlot
122  void onSystemPlot_pileSelected(int );
123  void onSystemPlot_soilLayerSelected(int );
124  void onSystemPlot_groundWaterSelected();
125 
126 private:
127  Q_OBJECT
128  Ui::MainWindow *ui;
129 
130  SystemPlotSuper *systemPlot = NULL;
131  PileFEAmodeler *pileFEAmodel = NULL;
132 
133  void updateSystemPlot();
134  void refreshUI();
135  bool ReadFile(QString );
136  bool WriteFile(QString );
137 
138  // load control
139  LoadControlType loadControlType;
140 
141  // prescribed loads at the pile head
142  double P; // lateral force on pile cap
143  double PV; // vertical force on pile cap
144  double PMom; // applied moment on pile cap
145 
146  // pile head displacement (push-over analysis)
147  double HDisp; // prescribed horizontal displacement
148  double VDisp; // prescriber vertical displacement
149 
150  // soil motion profile
151  double surfaceDisp; // prescribed soil surface displacement
152  double percentage12; // percentage of surface displacement at 1st layer interface
153  double percentage23; // percentage of surface displacement at 2nd layer interface
154  double percentageBase; // percentage of surface displacement at base of soil column
155 
156  // ground water table
157  double gwtDepth; // depth of ground water table below the surface
158 
159  // general parameters
160  int numPileElements;
161  int numPiles;
162 
163  // states
164  bool assumeRigidPileHeadConnection = false;
165  bool useToeResistance = false;
166  int puSwitch;
167  int kSwitch;
168  int gwtSwitch;
169 
170  // soil layers and related methods
171  QVector<soilLayer> mSoilLayers;
172 
173  void setupLayers();
174 
175  // temporary variables
176  double gSoil;
177 
178  double zCoord = 0.0; // z-coordinate of point. Negative if below the surface
179  double eleSize; // effective element length for p-y and t-z springs
180  double sigV; // effective stress at p-y and t-z springs
181  double pult, y50; // lateral resistance
182  double tult, z50; // shaft friction
183  double qult, z50q; // toe resistance
184 
185  // setup switch
186  bool inSetupState = true;
187 
188  // system conforming settings and parameters
189  QSettings *settings = NULL;
190 
191  // general settings
192  QString useGraphicsLib; // "QCP" or "QwtAll" or "QwtSystem" or "QwtResults"
193  QString useFEAnalyzer; // "OpenSeesInt" is currently the only implemented option
194 
195  // viewer settings
196  bool showDisplacements;
197  bool showPullOut;
198  bool showMoments;
199  bool showShear;
200  bool showAxial;
201  bool showStress;
202  bool showPultimate;
203  bool showY50;
204  bool showTultimate;
205  bool showZ50;
206 
207  // meshing parameters
208  int minElementsPerLayer = MIN_ELEMENTS_PER_LAYER;
209  int maxElementsPerLayer = MAX_ELEMENTS_PER_LAYER;
210  int numElementsInAir = NUM_ELEMENTS_IN_AIR;
211 
212  double L1; // pile length above ground (all the same)
213  double L2[MAXPILES]; // embedded length of pile
214  double pileDiameter[MAXPILES]; // pile diameter
215  double E[MAXPILES]; // pile modulus of elasticity
216  double xOffset[MAXPILES]; // x-offset of pile
217 
218  int activePileIdx;
219  int activeLayerIdx;
220 
221  QNetworkAccessManager *manager;
222 
223  // plot widgets
224  ResultPlotSuper *displPlot;
225  ResultPlotSuper *pullOutPlot;
226  ResultPlotSuper *momentPlot;
227  ResultPlotSuper *shearPlot;
228  ResultPlotSuper *axialPlot;
229  ResultPlotSuper *stressPlot;
230  ResultPlotSuper *pultPlot;
231  ResultPlotSuper *y50Plot;
232  ResultPlotSuper *tultPlot;
233  ResultPlotSuper *z50Plot;
234 
235 };
236 
237 #endif // MAINWINDOW_H
Definition: pilefeamodeler.h:40
Definition: materialdbinterface.h:6
The ResultPlotSuper class is an abstract class implementing simple line plots.
Definition: resultplotsuper.h:8
Definition: soilmat.h:7
Definition: systemplotsuper.h:16
Definition: mainwindow.h:23