Hi,
I had a question about the function getDisp and generally computing displacement vector. So I am gonna write what I did to obtain the displacements and please verify my approach:
In order to get the resisting forces of my element I used the following:
p += this->k*(displacement - this->laststep); (1)
The vector "displacement" is the total displacements of the element at the end of ith substep which is computed as follows:
const Vector &disp1 = theNodes[0]->getTrialDisp();
const Vector &disp2 = theNodes[1]->getTrialDisp();
displacement(0)=disp1(0);
displacement(1)=disp1(1);
displacement(2)=disp1(2);
displacement(3)=disp2(0);
displacement(4)=disp2(1);
displacement(5)=disp2(2);
There remains the vecotr laststep in eq. (1) which is the total displacements of the element at the end of (i-1)th substep which is computed as follows:
const Vector last1 = theNodes[0]->getDisp() ;
const Vector last2 = theNodes[1]->getDisp();
laststep(0)=last1(0);
laststep(1)= last1(1);
laststep(2)= last1(2);
laststep(3)= last2(0);
laststep(4)= last2(1) ;
laststep(5)= last2(2);
The displacements computed using this approach do not result is correct resisting forces which I think has something to do with wrong computation of laststep vector.
Generally a question arises here which is " How I can get the displacements at the end of the (i-1)th substep?"
Please note that the following declarations had been done prior to these codes:
Matrix k ;
Vector p, laststep, Displacement;
getDisp Function
Moderators: silvia, selimgunay, Moderators