00001 /* 00002 %M This module contains the load data structure definitions 00003 %a Joao Luiz Elias Campos. 00004 %d September 2nd, 1998. 00005 %r $Id: load.h,v 1.1 2004/06/22 05:29:59 joaoluiz Exp $ 00006 %w (C) COPYRIGHT 1995-1996, Eduardo Nobre Lages. 00007 (C) COPYRIGHT 1997-1998, Joao Luiz Elias Campos. 00008 All Rights Reserved 00009 Duplication of this program or any part thereof without the express 00010 written consent of the author is prohibited. 00011 */ 00012 00013 #ifndef _LOAD_H 00014 #define _LOAD_H 00015 00016 /* 00017 %T Distributed force type 00018 */ 00019 typedef enum _loadtype 00020 { 00021 UNIFORM, 00022 VARIABLE, 00023 AREAUNIFORM, 00024 AREAPRESSURE 00025 } eLoadType; 00026 00027 /* 00028 %T Nodal force type definition 00029 */ 00030 typedef struct _nodalforce 00031 { 00032 int node; 00033 double fx; 00034 double fy; 00035 double fz; 00036 } sNodalForce; 00037 00038 /* 00039 %T Nodal displacement type definition 00040 */ 00041 typedef struct _nodaldisp 00042 { 00043 int node; 00044 double dx; 00045 double dy; 00046 double dz; 00047 } sNodalDisp; 00048 00049 /* 00050 %T Nodal support type definition 00051 */ 00052 typedef struct _nodalsupp 00053 { 00054 int node; 00055 int tx; 00056 int ty; 00057 int tz; 00058 } sNodalSupp; 00059 00060 /* 00061 %T Nodal velocity type definition 00062 */ 00063 typedef struct _nodalvel 00064 { 00065 int node; 00066 double vx; 00067 double vy; 00068 double vz; 00069 } sNodalVel; 00070 00071 /* 00072 %T Nodal potencial type definition 00073 */ 00074 typedef struct _nodalpoten 00075 { 00076 int node; 00077 double phi; 00078 } sNodalPoten; 00079 00080 /* 00081 %T Nodal pressure type definition 00082 */ 00083 typedef struct _nodalpress 00084 { 00085 int node; 00086 double psi; 00087 } sNodalPress; 00088 00089 /* 00090 %T Line force type definition 00091 */ 00092 typedef struct _lineforce 00093 { 00094 int elem; 00095 eLoadType type; 00096 int adj; 00097 int noi; 00098 int noj; 00099 int nok; 00100 int key; 00101 double q1x; 00102 double q1y; 00103 double q1z; 00104 double q2x; 00105 double q2y; 00106 double q2z; 00107 } sLineForce; 00108 00109 /* 00110 %T Area force Uniform type definition 00111 */ 00112 typedef struct _areaforceuniform 00113 { 00114 int elem; 00115 eLoadType type; 00116 int noi; 00117 int noj; 00118 int nok; 00119 int nol; 00120 int key; 00121 double qx; 00122 double qy; 00123 double qz; 00124 } sAreaForceUniform; 00125 00126 /* 00127 %T Area force Pressure type definition 00128 */ 00129 typedef struct _areaforcepressure 00130 { 00131 int elem; 00132 eLoadType type; 00133 int noi; 00134 int noj; 00135 int nok; 00136 int nol; 00137 int key; 00138 double qx; 00139 double qy; 00140 double qz; 00141 } sAreaForcePressure; 00142 00143 /* 00144 %T Elemental pressure type definition 00145 */ 00146 typedef struct _elempress 00147 { 00148 int elem; 00149 double psi; 00150 } sElemPress; 00151 00152 /* 00153 %T Elemental potencial type definition 00154 */ 00155 typedef struct _elempoten 00156 { 00157 int elem; 00158 double phi; 00159 } sElemPoten; 00160 00161 /* 00162 %T Gravity forces 00163 */ 00164 typedef struct _gravforce 00165 { 00166 double gx; 00167 double gy; 00168 double gz; 00169 } sGravForce; 00170 00171 /* 00172 %T Load case definition 00173 */ 00174 typedef struct _loadcase 00175 { 00176 int icase; 00177 char label[20]; 00178 int NumNodalForce; 00179 int NumNodalDisp; 00180 int NumNodalPoten; 00181 int NumNodalPress; 00182 int NumNodalVel; 00183 int NumNodalSupp; 00184 int NumElemPoten; 00185 int NumElemPress; 00186 int NumLineForce; 00187 int NumGravForce; 00188 int NumAreaForceUniform; 00189 int NumAreaForcePressure; 00190 sNodalForce *NodalForce; 00191 sNodalDisp *NodalDisp; 00192 sNodalPress *NodalPress; 00193 sNodalPoten *NodalPoten; 00194 sNodalVel *NodalVel; 00195 sNodalSupp *NodalSupp; 00196 sLineForce *LineForce; 00197 sElemPoten *ElemPoten; 00198 sElemPress *ElemPress; 00199 sGravForce GravForce; 00200 sAreaForceUniform *AreaForceUniform; 00201 sAreaForcePressure *AreaForcePressure; 00202 } sLoadCase; 00203 00204 /* Load case descriptor, its number and the current case id. 00205 */ 00206 extern sLoadCase *LoadCase; 00207 extern int NumLoadCase; 00208 extern int CurrLoadCase; 00209 00210 /* Public functions 00211 */ 00212 void PrescribedValues ( void ); 00213 void UpdatePrescribedValues( double * ); 00214 00215 /* 00216 %K Macro definitions 00217 */ 00218 #define NumNodalForce LoadCase[CurrLoadCase].NumNodalForce 00219 #define NumNodalDisp LoadCase[CurrLoadCase].NumNodalDisp 00220 #define NumNodalVel LoadCase[CurrLoadCase].NumNodalVel 00221 #define NumNodalPoten LoadCase[CurrLoadCase].NumNodalPoten 00222 #define NumNodalPress LoadCase[CurrLoadCase].NumNodalPress 00223 #define NumNodalSupp LoadCase[CurrLoadCase].NumNodalSupp 00224 #define NumLineForce LoadCase[CurrLoadCase].NumLineForce 00225 #define NumElemPoten LoadCase[CurrLoadCase].NumElemPoten 00226 #define NumElemPress LoadCase[CurrLoadCase].NumElemPress 00227 #define NumGravForce LoadCase[CurrLoadCase].NumGravForce 00228 #define NodalPress LoadCase[CurrLoadCase].NodalPress 00229 #define NodalPoten LoadCase[CurrLoadCase].NodalPoten 00230 #define NodalForce LoadCase[CurrLoadCase].NodalForce 00231 #define NodalDisp LoadCase[CurrLoadCase].NodalDisp 00232 #define NodalVel LoadCase[CurrLoadCase].NodalVel 00233 #define NodalSupp LoadCase[CurrLoadCase].NodalSupp 00234 #define LineForce LoadCase[CurrLoadCase].LineForce 00235 #define ElemPoten LoadCase[CurrLoadCase].ElemPoten 00236 #define ElemPress LoadCase[CurrLoadCase].ElemPress 00237 #define GravForce LoadCase[CurrLoadCase].GravForce 00238 00239 #define NumAreaForceUniform LoadCase[CurrLoadCase].NumAreaForceUniform 00240 #define AreaForceUniform LoadCase[CurrLoadCase].AreaForceUniform 00241 #define NumAreaForcePressure LoadCase[CurrLoadCase].NumAreaForcePressure 00242 #define AreaForcePressure LoadCase[CurrLoadCase].AreaForcePressure 00243 00244 #endif 00245