Good day!
I've been trying to figure out how to create my own element and studies
ChElementBeamEuler to understand how to construct it correctly.
First, I was trying to determine all the coordinates systems for components of the equations (in particularly for ShapeFunction) and meet the following code
void ChElementBeamEuler_63::GetStateBlock(chrono::ChVectorDynamic<> &mD) {
mD.resize(9);
ChVector<> delta_rot_dir;
double delta_rot_angle;
// Node 0, displacement (in local element frame, corotated back)
// d = [Atw]' Xt - [A0w]'X0
ChVector<> displ = this->q_element_abs_rot.RotateBack(nodeA->Frame().GetPos())
-
this->q_element_ref_rot.RotateBack(nodeA->GetX0().GetPos());
mD.segment(0, 3) = displ.eigen();
...
If I understand everything correctly
[Atw]' Xt - is current position of nodeA rotated into the current element orientation
[A0w]'X0 - is the original position of nodeA rotated into the original element position
Since
Xt = nodeA->Frame().GetPos()
X0 = nodeA->GetX0().GetPos()
Xt and X0 are both in the same (world) frame (coordinate system)
But again the [Atw] != [A0w] and we get that vector [Atw]' Xt and [A0w]'X0 are in different coordinate systems!!!!
How comes?!!
Maybe I miss something... If anyone knows what's going on, please explain=)