| 674 | } |
| 675 | |
| 676 | int |
| 677 | ComponentElement2d::addLoad(ElementalLoad *theLoad, double loadFactor) |
| 678 | { |
| 679 | int type; |
| 680 | const Vector &data = theLoad->getData(type, loadFactor); |
| 681 | double L = theCoordTransf->getInitialLength(); |
| 682 | |
| 683 | if (type == LOAD_TAG_Beam2dUniformLoad) { |
| 684 | double wt = data(0)*loadFactor; // Transverse (+ve upward) |
| 685 | double wa = data(1)*loadFactor; // Axial (+ve from node I to J) |
| 686 | |
| 687 | double V = 0.5*wt*L; |
| 688 | double M = V*L/6.0; // wt*L*L/12 |
| 689 | double P = wa*L; |
| 690 | |
| 691 | // Reactions in basic system |
| 692 | p0[0] -= P; |
| 693 | p0[1] -= V; |
| 694 | p0[2] -= V; |
| 695 | |
| 696 | // Fixed end forces in basic system |
| 697 | q0[0] -= 0.5*P; |
| 698 | q0[1] -= M; |
| 699 | q0[2] += M; |
| 700 | } |
| 701 | |
| 702 | else if (type == LOAD_TAG_Beam2dPointLoad) { |
| 703 | double P = data(0)*loadFactor; |
| 704 | double N = data(1)*loadFactor; |
| 705 | double aOverL = data(2); |
| 706 | |
| 707 | if (aOverL < 0.0 || aOverL > 1.0) |
| 708 | return 0; |
| 709 | |
| 710 | double a = aOverL*L; |
| 711 | double b = L-a; |
| 712 | |
| 713 | // Reactions in basic system |
| 714 | p0[0] -= N; |
| 715 | double V1 = P*(1.0-aOverL); |
| 716 | double V2 = P*aOverL; |
| 717 | p0[1] -= V1; |
| 718 | p0[2] -= V2; |
| 719 | |
| 720 | double L2 = 1.0/(L*L); |
| 721 | double a2 = a*a; |
| 722 | double b2 = b*b; |
| 723 | |
| 724 | // Fixed end forces in basic system |
| 725 | q0[0] -= N*aOverL; |
| 726 | double M1 = -a * b2 * P * L2; |
| 727 | double M2 = a2 * b * P * L2; |
| 728 | q0[1] += M1; |
| 729 | q0[2] += M2; |
| 730 | } |
| 731 | |
| 732 | else { |
| 733 | opserr << "ComponentElement2d::addLoad() -- load type unknown for element with tag: " << this->getTag() << endln; |
nothing calls this directly
no test coverage detected