Beispiel #1
0
int EEBeamColumn2d::setInitialStiff(const Matrix &kbinit)
{
    if (kbinit.noRows() != 3 || kbinit.noCols() != 3)  {
        opserr << "EEBeamColumn2d::setInitialStiff() - "
               << "matrix size is incorrect for element: "
               << this->getTag() << endln;
        return -1;
    }
    kbInit = kbinit;

    // transform stiffness from basic sys B to basic sys A
    static Matrix kbAInit(3,3);
    kbAInit.Zero();
    kbAInit(0,0) = kbInit(0,0);
    kbAInit(1,1) = L*L*kbInit(1,1) + L*(kbInit(1,2)+kbInit(2,1)) + kbInit(2,2);
    kbAInit(1,2) = -L*kbInit(1,2) - kbInit(2,2);
    kbAInit(2,1) = -L*kbInit(2,1) - kbInit(2,2);
    kbAInit(2,2) = kbInit(2,2);

    // transform stiffness from the basic to the global system
    theInitStiff.Zero();
    theInitStiff = theCoordTransf->getInitialGlobalStiffMatrix(kbAInit);

    return 0;
}
Beispiel #2
0
void EEBeamColumn2d::applyIMod()
{
    // get daq displacements
    if (theSite != 0)  {
        (*dbDaq) = theSite->getDisp();
    }
    else  {
        sData[0] = OF_RemoteTest_getDisp;
        theChannel->sendVector(0, 0, *sendData, 0);
        theChannel->recvVector(0, 0, *recvData, 0);
    }

    // correct for displacement control errors using I-Modification
    if ((*dbDaq)[0] != 0.0)  {
        (*qDaq)[0] -= kbInit(0,0)*((*dbDaq)[0] - (*db)[0]);
    }
    if ((*dbDaq)[1] != 0.0)  {
        (*qDaq)[1] -= kbInit(1,1)*((*dbDaq)[1] - (*db)[1]);
        (*qDaq)[2] -= kbInit(2,1)*((*dbDaq)[1] - (*db)[1]);
    }
    if ((*dbDaq)[2] != 0.0)  {
        (*qDaq)[1] -= kbInit(1,2)*((*dbDaq)[2] - (*db)[2]);
        (*qDaq)[2] -= kbInit(2,2)*((*dbDaq)[2] - (*db)[2]);
    }
}
int ElastomericBearing2d::recvSelf(int commitTag, Channel &rChannel,
    FEM_ObjectBroker &theBroker)
{
    // delete material memory
    for (int i=0; i<2; i++)
        if (theMaterials[i] != 0)
            delete theMaterials[i];
    
    // receive element parameters
    static Vector data(9);
    rChannel.recvVector(0, commitTag, data);
    this->setTag((int)data(0));
    k0 = data(1);
    qYield = data(2);
    k2 = data(3);
    shearDistI = data(4);
    addRayleigh = (int)data(5);
    mass = data(6);
    double ke = k0 + k2;
    
    // receive the two end nodes
    rChannel.recvID(0, commitTag, connectedExternalNodes);
    
    // receive the material class tags
    ID matClassTags(2);
    rChannel.recvID(0, commitTag, matClassTags);
    
    // receive the material models
    for (int i=0; i<2; i++)  {
        theMaterials[i] = theBroker.getNewUniaxialMaterial(matClassTags(i));
        if (theMaterials[i] == 0) {
            opserr << "ElastomericBearing2d::recvSelf() - "
                << "failed to get blank uniaxial material.\n";
            return -2;
        }
        theMaterials[i]->recvSelf(commitTag, rChannel, theBroker);
    }
    
    // receive remaining data
    if ((int)data(7) == 3)  {
        x.resize(3);
        rChannel.recvVector(0, commitTag, x);
    }
    if ((int)data(8) == 3)  {
        y.resize(3);
        rChannel.recvVector(0, commitTag, y);
    }
    
    // initialize initial stiffness matrix
    kbInit.Zero();
    kbInit(0,0) = theMaterials[0]->getInitialTangent();
    kbInit(1,1) = ke;
    kbInit(2,2) = theMaterials[1]->getInitialTangent();
    
    // initialize other variables
    this->revertToStart();
    
    return 0;
}
ElastomericBearing2d::ElastomericBearing2d(int tag, int Nd1, int Nd2,
    double ke, double fy, double alpha, UniaxialMaterial **materials,
    const Vector _y, const Vector _x, double sdI, int addRay, double m)
    : Element(tag, ELE_TAG_ElastomericBearing2d),
    connectedExternalNodes(2),
    k0(0.0), qYield(0.0), k2(0.0), x(_x), y(_y),
    shearDistI(sdI), addRayleigh(addRay), mass(m),
    L(0.0), ub(3), ubPlastic(0.0), qb(3), kb(3,3), ul(6),
    Tgl(6,6), Tlb(3,6), ubPlasticC(0.0), kbInit(3,3)
{
    // ensure the connectedExternalNode ID is of correct size & set values
    if (connectedExternalNodes.Size() != 2)  {
        opserr << "ElastomericBearing2d::ElastomericBearing2d() - element: "
            << this->getTag() << " - failed to create an ID of size 2.\n";
    }
    
    connectedExternalNodes(0) = Nd1;
    connectedExternalNodes(1) = Nd2;
    
    // set node pointers to NULL
    for (int i=0; i<2; i++)
        theNodes[i] = 0;
    
    // initialize parameters
    k0 = (1.0-alpha)*ke;
    qYield = (1.0-alpha)*fy;
    k2 = alpha*ke;
    
    // check material input
    if (materials == 0)  {
        opserr << "ElastomericBearing2d::ElastomericBearing2d() - "
            << "null material array passed.\n";
        exit(-1);
    }
    
    // get copies of the uniaxial materials
    for (int i=0; i<2; i++)  {
        if (materials[i] == 0) {
            opserr << "ElastomericBearing2d::ElastomericBearing2d() - "
                "null uniaxial material pointer passed.\n";
            exit(-1);
        }
        theMaterials[i] = materials[i]->getCopy();
        if (theMaterials[i] == 0) {
            opserr << "ElastomericBearing2d::ElastomericBearing2d() - "
                << "failed to copy uniaxial material.\n";
            exit(-1);
        }
    }
    
    // initialize initial stiffness matrix
    kbInit.Zero();
    kbInit(0,0) = theMaterials[0]->getInitialTangent();
    kbInit(1,1) = ke;
    kbInit(2,2) = theMaterials[1]->getInitialTangent();
    
    // initialize other variables
    this->revertToStart();
}
Beispiel #5
0
int EEBearing3d::setInitialStiff(const Matrix& kbinit)
{
    // set initial stiffness matrix in basic system
    if (kbinit.noRows() != 2 || kbinit.noCols() != 2)  {
        opserr << "EEBearing3d::setInitialStiff() - " 
            << "matrix size is incorrect for element: "
            << this->getTag() << ".\n";
        return OF_ReturnType_failed;
    }
    kbInit(0,0) = theMaterials[0]->getInitialTangent();
    kbInit(1,1) = kbinit(0,0);  kbInit(1,2) = kbinit(0,1);
    kbInit(2,1) = kbinit(1,0);  kbInit(2,2) = kbinit(1,1);
    kbInit(3,3) = theMaterials[1]->getInitialTangent();
    kbInit(4,4) = theMaterials[2]->getInitialTangent();
    kbInit(5,5) = theMaterials[3]->getInitialTangent();
    
    // zero the global matrix
    theInitStiff.Zero();
    
    // transform from basic to local system
    static Matrix klInit(12,12);
    klInit.addMatrixTripleProduct(0.0, Tlb, kbInit, 1.0);
    
    // transform from local to global system
    theInitStiff.addMatrixTripleProduct(0.0, Tgl, klInit, 1.0);
    
    return OF_ReturnType_completed;
}
Beispiel #6
0
int EETrussCorot::setInitialStiff(const Matrix& kbinit)
{
    if (kbinit.noRows() != 1 || kbinit.noCols() != 1)  {
        opserr << "EETrussCorot::setInitialStiff(): " 
            << "matrix size is incorrect for element: "
            << this->getTag() << endln;
        return -1;
    }
    kbInit = kbinit;
    
    // transform the stiffness from the basic to the local system
    static Matrix kl(3,3);
    kl.Zero();
    kl(0,0) = kbInit(0,0);
    
    // transform the stiffness from the local to the global system
    static Matrix kg(3,3);
    kg.addMatrixTripleProduct(0.0, R, kl, 1.0);
    
    // copy stiffness into appropriate blocks in element stiffness
    theInitStiff.Zero();
    int numDOF2 = numDOF/2;
    for (int i=0; i<numDIM; i++)  {
        for (int j=0; j<numDIM; j++)  {
            theInitStiff(i,j) = kg(i,j);
            theInitStiff(i,j+numDOF2) = -kg(i,j);
            theInitStiff(i+numDOF2,j) = -kg(i,j);
            theInitStiff(i+numDOF2,j+numDOF2) = kg(i,j);
        }
    }
    
    return 0;
}
Beispiel #7
0
int EETruss::setInitialStiff(const Matrix& kbinit)
{
    if (kbinit.noRows() != 1 || kbinit.noCols() != 1)  {
        opserr << "EETruss::setInitialStiff(): " 
            << "matrix size is incorrect for element: "
            << this->getTag() << endln;
        return -1;
    }
    kbInit = kbinit;
    
    // transform the stiffness from the basic to the global system
    theInitStiff.Zero();
    int numDOF2 = numDOF/2;
    double temp;
    for (int i=0; i<numDIM; i++)  {
        for (int j=0; j<numDIM; j++)  {
            temp = cosX[i]*cosX[j]*kbInit(0,0);
            theInitStiff(i,j) = temp;
            theInitStiff(i+numDOF2,j) = -temp;
            theInitStiff(i,j+numDOF2) = -temp;
            theInitStiff(i+numDOF2,j+numDOF2) = temp;
        }
    }
    
    return 0;
}
Beispiel #8
0
const Matrix& TwoNodeLink::getInitialStiff()
{
    // zero the matrix
    theMatrix->Zero();
    
    // get initial stiffnesses
    Matrix kbInit(numDir,numDir);
    for (int i=0; i<numDir; i++)  {
        kbInit(i,i) = theMaterials[i]->getInitialTangent();
    }
    
    // transform from basic to local system
    Matrix klInit(numDOF,numDOF);
    klInit.addMatrixTripleProduct(0.0, Tlb, kbInit, 1.0);
    
    // transform from local to global system
    theMatrix->addMatrixTripleProduct(0.0, Tgl, klInit, 1.0);
    //Matrix kgInit(numDOF,numDOF);
    //kgInit.addMatrixTripleProduct(0.0, Tgl, klInit, 1.0);
    //theMatrix->addMatrixTranspose(0.5, kgInit, 0.5);
    
    return *theMatrix;
}
Beispiel #9
0
const Matrix& EETrussCorot::getTangentStiff()
{
    // zero the global matrix
    theMatrix->Zero();
    
    if (firstWarning == true)  {
        opserr << "\nWARNING EETrussCorot::getTangentStiff() - "
            << "Element: " << this->getTag() << endln
            << "TangentStiff cannot be calculated." << endln
            << "Return InitialStiff including GeometricStiff instead."
            << endln;
        opserr << "Subsequent getTangentStiff warnings will be suppressed."
            << endln;
        
        firstWarning = false;
    }
    
    // get daq resisting forces
    if (theSite != 0)  {
        (*qDaq) = theSite->getForce();
    }
    else  {
        sData[0] = OF_RemoteTest_getForce;
        theChannel->sendVector(0, 0, *sendData, 0);
        theChannel->recvVector(0, 0, *recvData, 0);
    }
    
    // apply optional initial stiffness modification
    if (iMod == true)  {
        // get daq displacements
        if (theSite != 0)  {
            (*dbDaq) = theSite->getDisp();
        }
        else  {
            sData[0] = OF_RemoteTest_getDisp;
            theChannel->sendVector(0, 0, *sendData, 0);
            theChannel->recvVector(0, 0, *recvData, 0);
        }
        
        // correct for displacement control errors using I-Modification
        qDaq->addMatrixVector(1.0, kbInit, (*dbDaq) - (*db), -1.0);
    }
    
    // transform the stiffness from the basic to the local system
    int i,j;
    static Matrix kl(3,3);
    double EAoverL3 = kbInit(0,0)/(Ln*Ln);
    for (i=0; i<3; i++)
        for (j=0; j<3; j++)
            kl(i,j) = EAoverL3*d21[i]*d21[j];
    
    // add geometric stiffness portion
    double SL = (*qDaq)(0)/Ln;
    double SA = (*qDaq)(0)/(Ln*Ln*Ln);
    for (i=0; i<3; i++)  {
        kl(i,i) += SL;
        for (j=0; j<3; j++)
            kl(i,j) -= SA*d21[i]*d21[j];
    }
    
    // transform the stiffness from the local to the global system
    static Matrix kg(3,3);
    kg.addMatrixTripleProduct(0.0, R, kl, 1.0);
    
    // copy stiffness into appropriate blocks in element stiffness
    int numDOF2 = numDOF/2;
    for (i=0; i<numDIM; i++)  {
        for (j=0; j<numDIM; j++)  {
            (*theMatrix)(i,j) = kg(i,j);
            (*theMatrix)(i,j+numDOF2) = -kg(i,j);
            (*theMatrix)(i+numDOF2,j) = -kg(i,j);
            (*theMatrix)(i+numDOF2,j+numDOF2) = kg(i,j);
        }
    }
    
    return *theMatrix;
}
ElastomericBearingBoucWen2d::ElastomericBearingBoucWen2d(int tag,
    int Nd1, int Nd2, double kInit, double fy, double alpha1,
    UniaxialMaterial **materials, const Vector _y, const Vector _x,
    double alpha2, double _mu, double _eta, double _beta, double _gamma,
    double sdI, int addRay, double m, int maxiter, double _tol)
    : Element(tag, ELE_TAG_ElastomericBearingBoucWen2d),
    connectedExternalNodes(2), k0(0.0), qYield(0.0), k2(0.0), k3(0.0),
    mu(_mu), eta(_eta), beta(_beta), gamma(_gamma), A(1.0), x(_x), y(_y),
    shearDistI(sdI), addRayleigh(addRay), mass(m), maxIter(maxiter), tol(_tol),
    L(0.0), onP0(true), ub(3), z(0.0), dzdu(0.0), qb(3), kb(3,3), ul(6),
    Tgl(6,6), Tlb(3,6), ubC(3), zC(0.0), kbInit(3,3), theLoad(6)
{
    // ensure the connectedExternalNode ID is of correct size & set values
    if (connectedExternalNodes.Size() != 2)  {
        opserr << "ElastomericBearingBoucWen2d::ElastomericBearingBoucWen2d() - element: "
            << this->getTag() << " - failed to create an ID of size 2.\n";
        exit(-1);
    }
    
    connectedExternalNodes(0) = Nd1;
    connectedExternalNodes(1) = Nd2;
    
    // set node pointers to NULL
    for (int i=0; i<2; i++)
        theNodes[i] = 0;
    
    // initialize parameters
    k0 = (1.0-alpha1)*kInit;
    k2 = alpha1*kInit;
    k3 = alpha2*kInit;
    qYield = (1.0-alpha1-alpha2*pow(fy/kInit,mu-1.0))*fy;
    
    // check material input
    if (materials == 0)  {
        opserr << "ElastomericBearingBoucWen2d::ElastomericBearingBoucWen2d() - "
            << "null material array passed.\n";
        exit(-1);
    }
    
    // get copies of the uniaxial materials
    for (int i=0; i<2; i++)  {
        if (materials[i] == 0) {
            opserr << "ElastomericBearingBoucWen2d::ElastomericBearingBoucWen2d() - "
                "null uniaxial material pointer passed.\n";
            exit(-1);
        }
        theMaterials[i] = materials[i]->getCopy();
        if (theMaterials[i] == 0) {
            opserr << "ElastomericBearingBoucWen2d::ElastomericBearingBoucWen2d() - "
                << "failed to copy uniaxial material.\n";
            exit(-1);
        }
    }
    
    // initialize initial stiffness matrix
    kbInit.Zero();
    kbInit(0,0) = theMaterials[0]->getInitialTangent();
    kbInit(1,1) = A*k0 + k2;
    kbInit(2,2) = theMaterials[1]->getInitialTangent();
    
    // initialize other variables
    this->revertToStart();
}
Beispiel #11
0
int SingleFPSimple2d::recvSelf(int commitTag, Channel &rChannel,
    FEM_ObjectBroker &theBroker)
{
    // delete material memory
    for (int i=0; i<2; i++)
        if (theMaterials[i] != 0)
            delete theMaterials[i];
    
    // receive element parameters
    static Vector data(11);
    rChannel.recvVector(0, commitTag, data);
    this->setTag((int)data(0));
    R = data(1);
    h = data(2);
    uy = data(3);
    shearDistI = data(4);
    addRayleigh = (int)data(5);
    mass = data(6);
    maxIter = (int)data(7);
    tol = data(8);
    
    // receive the two end nodes
    rChannel.recvID(0, commitTag, connectedExternalNodes);
    
    // receive the friction model class tag
    ID frnClassTag(1);
    rChannel.recvID(0, commitTag, frnClassTag);
    
    // receive the friction model
    theFrnMdl = theBroker.getNewFrictionModel(frnClassTag(0));
    if (theFrnMdl == 0) {
        opserr << "SingleFPSimple2d::recvSelf() - "
            << "failed to get blank friction model.\n";
        return -1;
    }
    theFrnMdl->recvSelf(commitTag, rChannel, theBroker);
    
    // receive the material class tags
    ID matClassTags(2);
    rChannel.recvID(0, commitTag, matClassTags);
    
    // receive the material models
    for (int i=0; i<2; i++)  {
        theMaterials[i] = theBroker.getNewUniaxialMaterial(matClassTags(i));
        if (theMaterials[i] == 0) {
            opserr << "SingleFPSimple2d::recvSelf() - "
                << "failed to get blank uniaxial material.\n";
            return -2;
        }
        theMaterials[i]->recvSelf(commitTag, rChannel, theBroker);
    }
    
    // receive remaining data
    if ((int)data(9) == 3)  {
        x.resize(3);
        rChannel.recvVector(0, commitTag, x);
    }
    if ((int)data(10) == 3)  {
        y.resize(3);
        rChannel.recvVector(0, commitTag, y);
    }
    
    // initialize initial stiffness matrix
    kbInit.Zero();
    kbInit(0,0) = theMaterials[0]->getInitialTangent();
    kbInit(1,1) = kbInit(0,0)*DBL_EPSILON;
    kbInit(2,2) = theMaterials[1]->getInitialTangent();
    
    // initialize other variables
    this->revertToStart();
    
    return 0;
}
Beispiel #12
0
SingleFPSimple2d::SingleFPSimple2d(int tag, int Nd1, int Nd2,
    FrictionModel &thefrnmdl, double r, double _h, double _uy,
    UniaxialMaterial **materials, const Vector _y, const Vector _x,
    double sdI, int addRay, double m, int maxiter, double _tol)
    : Element(tag, ELE_TAG_SingleFPSimple2d),
    connectedExternalNodes(2), theFrnMdl(0),
    R(r), h(_h), uy(_uy), x(_x), y(_y),
    shearDistI(sdI), addRayleigh(addRay),
    mass(m), maxIter(maxiter), tol(_tol),
    Reff(0.0), L(0.0), ub(3), ubPlastic(0.0), qb(3),
    kb(3,3), ul(6), Tgl(6,6), Tlb(3,6), ubPlasticC(0.0), kbInit(3,3)
{
    // ensure the connectedExternalNode ID is of correct size & set values
    if (connectedExternalNodes.Size() != 2)  {
        opserr << "SingleFPSimple2d::SingleFPSimple2d() - element: "
            << this->getTag() << " failed to create an ID of size 2\n";
    }
    
    connectedExternalNodes(0) = Nd1;
    connectedExternalNodes(1) = Nd2;
    
    // set node pointers to NULL
    for (int i=0; i<2; i++)
        theNodes[i] = 0;
    
	// get a copy of the friction model
	theFrnMdl = thefrnmdl.getCopy();
	if (theFrnMdl == 0)  {
		opserr << "SingleFPSimple2d::SingleFPSimple2d() - "
			<< "failed to get copy of the friction model.\n";
		exit(-1);
	}
    
    // check material input
    if (materials == 0)  {
        opserr << "SingleFPSimple2d::SingleFPSimple2d() - "
            << "null material array passed.\n";
        exit(-1);
    }
    
    // get copies of the uniaxial materials
    for (int i=0; i<2; i++)  {
        if (materials[i] == 0) {
            opserr << "SingleFPSimple2d::SingleFPSimple2d() - "
                "null uniaxial material pointer passed.\n";
            exit(-1);
        }
        theMaterials[i] = materials[i]->getCopy();
        if (theMaterials[i] == 0) {
            opserr << "SingleFPSimple2d::SingleFPSimple2d() - "
                << "failed to copy uniaxial material.\n";
            exit(-1);
        }
    }
    
    // initialize initial stiffness matrix
    kbInit.Zero();
    kbInit(0,0) = theMaterials[0]->getInitialTangent();
    kbInit(1,1) = kbInit(0,0)*DBL_EPSILON;
    kbInit(2,2) = theMaterials[1]->getInitialTangent();
    
    // initialize other variables
    this->revertToStart();
}
Beispiel #13
0
const Vector& EEBeamColumn2d::getResistingForce()
{
    // make sure the coordinate transformation is updated
    theCoordTransf->update();

    // zero the global residual
    theVector.Zero();

    // get daq resisting forces
    if (theSite != 0)  {
        (*qDaq) = theSite->getForce();
    }
    else  {
        sData[0] = OF_RemoteTest_getForce;
        theChannel->sendVector(0, 0, *sendData, 0);
        theChannel->recvVector(0, 0, *recvData, 0);
    }

    // get chord rotation from basic sys A to B
    double alpha = atan2((*db)[1],L+(*db)[0]);

    // apply optional initial stiffness modification
    if (iMod == true)
        this->applyIMod();

    // use elastic axial force if axial force from test is zero
    if (fabs((*qDaq)[0]) < 1.0E-12)  {
        double qA0 = kbInit(0,0)*(sqrt(pow(L+(*db)[0],2)+pow((*db)[1],2))-L);
        (*qDaq)[0] = cos(alpha)*qA0;
        (*qDaq)[1] += sin(alpha)*qA0;
    }

    // save corresponding ctrl response for recorder
    dbCtrl = (*db);
    vbCtrl = (*vb);
    abCtrl = (*ab);

    /* transform forces from basic sys B to basic sys A (linear)
    static Vector qA(3);
    qA(0) = (*qDaq)[0];
    qA(1) = -L*(*qDaq)[1] - (*qDaq)[2];
    qA(2) = (*qDaq)[2];*/

    // transform forces from basic sys B to basic sys A (nonlinear)
    static Vector qA(3);
    qA(0) = cos(alpha)*(*qDaq)[0] + sin(alpha)*(*qDaq)[1];
    qA(1) = (*db)[1]*(*qDaq)[0] - (L+(*db)[0])*(*qDaq)[1] - (*qDaq)[2];
    qA(2) = (*qDaq)[2];

    // add fixed end forces
    for (int i=0; i<3; i++)  {
        qA(i) += qA0[i];
    }

    // Vector for reactions in basic system A
    Vector pA0Vec(pA0, 3);

    // determine resisting forces in global system
    theVector = theCoordTransf->getGlobalResistingForce(qA, pA0Vec);

    // subtract external load
    theVector.addVector(1.0, theLoad, -1.0);

    return theVector;
}
Beispiel #14
0
const Matrix& EEBeamColumn2d::getTangentStiff()
{
    if (firstWarning == true)  {
        opserr << "\nWARNING EEBeamColumn2d::getTangentStiff() - "
               << "Element: " << this->getTag() << endln
               << "TangentStiff cannot be calculated." << endln
               << "Return InitialStiff including GeometricStiff instead."
               << endln;
        opserr << "Subsequent getTangentStiff warnings will be suppressed."
               << endln;

        firstWarning = false;
    }

    // get daq resisting forces
    if (theSite != 0)  {
        (*qDaq) = theSite->getForce();
    }
    else  {
        sData[0] = OF_RemoteTest_getForce;
        theChannel->sendVector(0, 0, *sendData, 0);
        theChannel->recvVector(0, 0, *recvData, 0);
    }

    // get chord rotation from basic sys A to B
    double alpha = atan2((*db)[1],L+(*db)[0]);

    // apply optional initial stiffness modification
    if (iMod == true)
        this->applyIMod();

    // use elastic axial force if axial force from test is zero
    if (fabs((*qDaq)[0]) < 1.0E-12)  {
        double qA0 = kbInit(0,0)*(sqrt(pow(L+(*db)[0],2)+pow((*db)[1],2))-L);
        (*qDaq)[0] = cos(alpha)*qA0;
        (*qDaq)[1] += sin(alpha)*qA0;
    }

    /* transform forces from basic sys B to basic sys A (linear)
    static Vector qA(3);
    qA(0) = (*qDaq)[0];
    qA(1) = -L*(*qDaq)[1] - (*qDaq)[2];
    qA(2) = (*qDaq)[2];*/

    // transform forces from basic sys B to basic sys A (nonlinear)
    static Vector qA(3);
    qA(0) = cos(alpha)*(*qDaq)[0] + sin(alpha)*(*qDaq)[1];
    qA(1) = (*db)[1]*(*qDaq)[0] - (L+(*db)[0])*(*qDaq)[1] - (*qDaq)[2];
    qA(2) = (*qDaq)[2];

    // add fixed end forces
    for (int i=0; i<3; i++)  {
        qA(i) += qA0[i];
    }

    // transform stiffness from basic sys B to basic sys A
    static Matrix kbAInit(3,3);
    kbAInit.Zero();
    kbAInit(0,0) = kbInit(0,0);
    kbAInit(1,1) = L*L*kbInit(1,1) + L*(kbInit(1,2)+kbInit(2,1)) + kbInit(2,2);
    kbAInit(1,2) = -L*kbInit(1,2) - kbInit(2,2);
    kbAInit(2,1) = -L*kbInit(2,1) - kbInit(2,2);
    kbAInit(2,2) = kbInit(2,2);

    return theCoordTransf->getGlobalStiffMatrix(kbAInit, qA);
}
Beispiel #15
0
const Matrix& EEBearing3d::getTangentStiff()
{
    if (firstWarning == true)  {
        opserr << "\nWARNING EEBearing3d::getTangentStiff() - "
            << "Element: " << this->getTag() << endln
            << "TangentStiff cannot be calculated." << endln
            << "Return InitialStiff including GeometricStiff instead." 
            << endln;
        opserr << "Subsequent getTangentStiff warnings will be suppressed." 
            << endln;
        
        firstWarning = false;
    }
    
    // zero the global matrix
    theMatrix.Zero();
    
    // get stiffness matrix in basic system
    static Matrix kb(6,6);
    kb.Zero();
    kb(0,0) = theMaterials[0]->getTangent();
    kb(1,1) = kbInit(1,1);  kb(1,2) = kbInit(1,2);
    kb(2,1) = kbInit(2,1);  kb(2,2) = kbInit(2,2);
    kb(3,3) = theMaterials[1]->getTangent();
    kb(4,4) = theMaterials[2]->getTangent();
    kb(5,5) = theMaterials[3]->getTangent();
    
    // transform from basic to local system
    static Matrix kl(12,12);
    kl.addMatrixTripleProduct(0.0, Tlb, kb, 1.0);
    
    if (Mratio.Size() == 4)  {
        // get daq resisting forces in basic system
        if (theSite != 0)  {
            (*qbDaq) = theSite->getForce();
        }
        else  {
            sData[0] = OF_RemoteTest_getForce;
            theChannel->sendVector(0, 0, *sendData, 0);
            theChannel->recvVector(0, 0, *recvData, 0);
        }
        
        // apply optional initial stiffness modification
        if (iMod == true)
            this->applyIMod();
        
        // use material force if force from test is zero
        if ((*qbDaq)(0) == 0.0)
            (*qbDaq)(0) = theMaterials[0]->getStress();
        if ((*qbDaq)(3) == 0.0)
            (*qbDaq)(3) = theMaterials[1]->getStress();
        if ((*qbDaq)(4) == 0.0)
            (*qbDaq)(4) = theMaterials[2]->getStress();
        if ((*qbDaq)(5) == 0.0)
            (*qbDaq)(5) = theMaterials[3]->getStress();
        
        // add geometric stiffness to local stiffness
        this->addPDeltaStiff(kl);
    }
    
    // transform from local to global system
    theMatrix.addMatrixTripleProduct(0.0, Tgl, kl, 1.0);
    
    return theMatrix;
}