getDisp Function

For developers writing C++, Fortran, Java, code who have questions or comments to make.

Moderators: silvia, selimgunay, Moderators

Post Reply
mehdikia2519
Posts: 39
Joined: Sun Apr 19, 2009 12:03 am
Location: Iran

getDisp Function

Post by mehdikia2519 »

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;
fmk
Site Admin
Posts: 5884
Joined: Fri Jun 11, 2004 2:33 pm
Location: UC Berkeley
Contact:

Post by fmk »

you cannot get the last trial step from the nodes, only the last committed step.

if you need the last trial step either store them yourself or compute them using the currebt trial and the incr delta disp.
Post Reply