Esempio n. 1
0
const Matrix &
BeamContact2D::getTangentStiff(void)
// this function computes the tangent stiffness matrix for the element
{
	mTangentStiffness.Zero();

	if (inContact) {
		Matrix Cmat = theMaterial->getTangent();

		double Css = Cmat(1,1);
		double Csn = Cmat(1,2);

		for (int i = 0; i < BC2D_NUM_DOF-2; i++) {
			for (int j = 0; j < BC2D_NUM_DOF-2; j++) {

				mTangentStiffness(i,j) = mBs(i)*mBs(j)*Css;
			}
		}
		for (int i = 0; i < BC2D_NUM_DOF-2; i++) {
			mTangentStiffness(8,i) = -mBn(i);
			mTangentStiffness(i,8) = -mBn(i) + Csn*mBs(i);
		}
		mTangentStiffness(9,9) = 1.0;

	} else {
		mTangentStiffness(8,8) = 1.0;
		mTangentStiffness(9,9) = 1.0;
	}

	return mTangentStiffness;
}
Esempio n. 2
0
const Vector &
BeamContact2D::getResistingForce()
// this function computes the resisting force vector for the element
{
	mInternalForces.Zero();

	// get contact "stress" vector
	Vector stress = theMaterial->getStress();

	if (inContact) {

		for (int i = 0; i < BC2D_NUM_DOF - 2; i++) {
			mInternalForces(i) = -mLambda*mBn(i) + stress(1)*mBs(i);
		}

		mInternalForces(BC2D_NUM_DOF - 2) = -mGap;

	} else {

		mInternalForces(BC2D_NUM_DOF - 2) = mLambda;
	
	}

	return mInternalForces;
}
Esempio n. 3
0
const Matrix &
BeamContact2Dp::getTangentStiff(void)
// this function computes the tangent stiffness matrix for the element
{
	mTangentStiffness.Zero();

	if (inContact) {
		Matrix Cmat = theMaterial->getTangent();

		double Css = Cmat(1,1);
		double Csn = Cmat(1,2);

		for (int i = 0; i < BC2D_NUM_DOF; i++) {
			for (int j = 0; j < BC2D_NUM_DOF; j++) {

				mTangentStiffness(i,j) = mBs(i)*mBs(j)*Css - mPenalty*(Csn*mBs(i)*mBn(j) - mBn(i)*mBn(j));
			}
		}
	}

	return mTangentStiffness;
}
Esempio n. 4
0
void
BeamContact2Dp::ComputeB(void)
// this function computes the finite element equation vectors Bn and Bs
{
    double Ka1n;
	double Kb1n;
	double Ka1g;
	double Kb1g;
	Vector a1(BC2D_NUM_DIM);
	Vector b1(BC2D_NUM_DIM);

	// initialize Bn and Bs
	mBn.Zero();
	mBs.Zero();

	// get tangent vectors
	a1 = Geta1();
	b1 = Getb1();

	// compute terms for vector Bn
    Ka1n = (mEyeS*a1)^mNormal;
	Kb1n = (mEyeS*b1)^mNormal;
	
	mBn(0) = -mShape(0)*mNormal(0);
	mBn(1) = -mShape(0)*mNormal(1);
	mBn(2) = -mShape(1)*mLength*Ka1n;
	mBn(3) = -mShape(2)*mNormal(0);
	mBn(4) = -mShape(2)*mNormal(1);
	mBn(5) = -mShape(3)*mLength*Kb1n;
	mBn(6) = mNormal(0);
	mBn(7) = mNormal(1);

	// compute terms for vector Bs
	Ka1g = (mEyeS*a1)^mg_xi;
	Kb1g = (mEyeS*b1)^mg_xi;

	mBs(0) = -mg_xi(0)*(mShape(0) + mRadius*mDshape(0));
	mBs(1) = -mg_xi(1)*(mShape(0) + mRadius*mDshape(0));
	mBs(2) = -Ka1g*mLength*(mShape(1) + mRadius*mDshape(1));
	mBs(3) = -mg_xi(0)*(mShape(2) + mRadius*mDshape(2));
	mBs(4) = -mg_xi(1)*(mShape(2) + mRadius*mDshape(2));
	mBs(5) = -Kb1g*mLength*(mShape(3) + mRadius*mDshape(3));
    mBs(6) = mg_xi(0);
	mBs(7) = mg_xi(1);

	return;
}