| 951 | } |
| 952 | |
| 953 | int |
| 954 | ComponentElement3d::addLoad(ElementalLoad *theLoad, double loadFactor) |
| 955 | { |
| 956 | int type; |
| 957 | const Vector &data = theLoad->getData(type, loadFactor); |
| 958 | double L = theCoordTransf->getInitialLength(); |
| 959 | |
| 960 | if (type == LOAD_TAG_Beam3dUniformLoad) { |
| 961 | double wy = data(0)*loadFactor; // Transverse |
| 962 | double wz = data(1)*loadFactor; // Transverse |
| 963 | double wx = data(2)*loadFactor; // Axial (+ve from node I to J) |
| 964 | |
| 965 | double Vy = 0.5*wy*L; |
| 966 | double Mz = Vy*L/6.0; // wy*L*L/12 |
| 967 | double Vz = 0.5*wz*L; |
| 968 | double My = Vz*L/6.0; // wz*L*L/12 |
| 969 | double P = wx*L; |
| 970 | |
| 971 | // Reactions in basic system |
| 972 | p0[0] -= P; |
| 973 | p0[1] -= Vy; |
| 974 | p0[2] -= Vy; |
| 975 | p0[3] -= Vz; |
| 976 | p0[4] -= Vz; |
| 977 | |
| 978 | // Fixed end forces in basic system |
| 979 | q0[0] -= 0.5*P; |
| 980 | if (end1zHinge != 0 && end2zHinge != 0) { |
| 981 | q0[1] -= Mz; |
| 982 | q0[2] += Mz; |
| 983 | } |
| 984 | if (end1zHinge == 0 && end2zHinge != 0) { |
| 985 | q0[2] += wy*L*L/8; |
| 986 | } |
| 987 | if (end1zHinge != 0 && end2zHinge == 0) { |
| 988 | q0[1] -= wy*L*L/8; |
| 989 | } |
| 990 | |
| 991 | if (end1yHinge != 0 && end2yHinge != 0) { |
| 992 | q0[3] += My; |
| 993 | q0[4] -= My; |
| 994 | } |
| 995 | if (end1yHinge == 0 && end2yHinge != 0) { |
| 996 | q0[4] -= wz*L*L/8; |
| 997 | } |
| 998 | if (end1yHinge != 0 && end2yHinge == 0) { |
| 999 | q0[3] += wz*L*L/8; |
| 1000 | } |
| 1001 | } |
| 1002 | |
| 1003 | else { |
| 1004 | opserr << "ComponentElement3d::addLoad() -- load type unknown for element with tag: " << this->getTag() << endln; |
| 1005 | return -1; |
| 1006 | } |
| 1007 | |
| 1008 | return 0; |
| 1009 | } |
| 1010 |
nothing calls this directly
no test coverage detected