예제 #1
0
//send back the strain
const XC::Vector &XC::DruckerPragerPlaneStrain::getStrain() 
{
	strain(0) = mEpsilon(0);
	strain(1) = mEpsilon(1);
	strain(2) = mEpsilon(3);
	
    return strain;
} 
예제 #2
0
//get the strain and integrate plasticity equations
int XC::DruckerPragerPlaneStrain::setTrialStrain(const Vector &strain_from_element) 
{
	mEpsilon.Zero();
	mEpsilon(0) = strain_from_element(0);
	mEpsilon(1) = strain_from_element(1);
	mEpsilon(3) = strain_from_element(2);

    this->plastic_integrator();
	
	return 0;
}
예제 #3
0
int DruckerPrager::recvSelf(int commitTag, Channel &theChannel, FEM_ObjectBroker &theBroker)    
{
	int res = 0;

	// receive data
	static Vector data(45);
	res = theChannel.recvVector(this->getDbTag(), commitTag, data);
	if (res < 0) {
		opserr << "WARNING: DruckerPrager::recvSelf - failed to receive vector from channel" << endln;
		return -1;
	}

    // set member variables
	this->setTag((int)data(0));
	mKref      = data(1);
    mGref      = data(2);
    mK         = data(3);
    mG         = data(4);
    msigma_y   = data(5);
    mrho       = data(6);
    mrho_bar   = data(7);
    mKinf      = data(8);
    mKo        = data(9);
    mdelta1    = data(10);
    mdelta2    = data(11);
    mHard      = data(12);
    mtheta     = data(13);
    massDen    = data(14);
	mPatm      = data(15);
	mTo        = data(16);
	mHprime    = data(17);
    mAlpha1_n  = data(18);
    mAlpha2_n  = data(19);
	mElastFlag = (int)data(20);
	mFlag      = (int)data(21);

	mEpsilon(0) = data(22);
	mEpsilon(1) = data(23);
	mEpsilon(2) = data(24);
	mEpsilon(3) = data(25);
	mEpsilon(4) = data(26);
	mEpsilon(5) = data(27);

	mEpsilon_n_p(0) = data(28);
	mEpsilon_n_p(1) = data(29);
	mEpsilon_n_p(2) = data(30);
	mEpsilon_n_p(3) = data(31);
	mEpsilon_n_p(4) = data(32);
	mEpsilon_n_p(5) = data(33);

	mBeta_n(0) = data(34);
	mBeta_n(1) = data(35);
	mBeta_n(2) = data(36);
	mBeta_n(3) = data(37);
	mBeta_n(4) = data(38);
	mBeta_n(5) = data(39);

	mState(0) = data(40);
	mState(1) = data(41);
	mState(2) = data(42);
	mState(3) = data(43);
	mState(4) = data(44);

	mCe  = mK*mIIvol + 2*mG*mIIdev;
    mCep = mCe;

	return 0;
}
예제 #4
0
int DruckerPrager::sendSelf(int commitTag, Channel &theChannel)
{
	int res = 0;

    // place data in a vector
	static Vector data(45);
	data(0) = this->getTag();
    data(1)  = mKref;
    data(2)  = mGref;
    data(3)  = mK;
    data(4)  = mG;
    data(5)  = msigma_y;
    data(6)  = mrho;
    data(7)  = mrho_bar;
    data(8)  = mKinf;
    data(9)  = mKo;
    data(10) = mdelta1;
    data(11) = mdelta2;
    data(12) = mHard;
    data(13) = mtheta;
    data(14) = massDen;
	data(15) = mPatm;
	data(16) = mTo;
	data(17) = mHprime;	
    data(18) = mAlpha1_n;
    data(19) = mAlpha2_n;
	data(20) = mElastFlag;
	data(21) = mFlag;

	data(22) = mEpsilon(0);
	data(23) = mEpsilon(1);
	data(24) = mEpsilon(2);
	data(25) = mEpsilon(3);
	data(26) = mEpsilon(4);
	data(27) = mEpsilon(5);

	data(28) = mEpsilon_n_p(0);
	data(29) = mEpsilon_n_p(1);
	data(30) = mEpsilon_n_p(2);
	data(31) = mEpsilon_n_p(3);
	data(32) = mEpsilon_n_p(4);
	data(33) = mEpsilon_n_p(5);

	data(34) = mBeta_n(0);
	data(35) = mBeta_n(1);
	data(36) = mBeta_n(2);
	data(37) = mBeta_n(3);
	data(38) = mBeta_n(4);
	data(39) = mBeta_n(5);

	data(40) = mState(0);
	data(41) = mState(1);
	data(42) = mState(2);
	data(43) = mState(3);
	data(44) = mState(4);
	
	res = theChannel.sendVector(this->getDbTag(), commitTag, data);
	if (res < 0) {
		opserr << "WARNING: DruckerPrager::sendSelf - failed to send vector to channel" << endln;
		return -1;
    }
    
    return 0;
}