What I get right now looks more like a cantilever (mp4 on google drive). Say the beam has 21 nodes. It seems that node #19 is somehow restrained, not the center node #10 or the end node #21. This can be clearly seen for higher-order modes, i.e. when the end node's displacement is larger.
I'm using Chrono v9.0.1. The main code block is attached here.
Thank you,
Haifei
=========================================
ChBuilderBeamEuler builder;
builder.BuildBeam(mesh, section, nelem,
ChVector3d(xstart, 0, 0),
ChVector3d(xstart+beam_L, 0, 0),
ChVector3d(0, 1, 0)
);
auto ground = chrono_types::make_shared<ChBody>();
sys.AddBody(ground);
ground->SetPos(ChVector3d(xstart+beam_L/2, 0, 0));
ground->SetFixed(true);
int ind = 0;
for (auto node: builder.GetLastBeamNodes())
{
// restrain horizontal bending
{
auto ylink = chrono_types::make_shared<ChLinkMateGeneric>();
ylink->Initialize(node, ground, ChFrame<>(node->GetPos(), QUNIT));
ylink->SetConstrainedCoords(false, true, false, true, false, false);
sys.Add(ylink);
}
// constraint for the center node
if (ind == int(nelem/2))
{
auto my_center = chrono_types::make_shared<ChLinkMateGeneric>();
my_center->Initialize(node, ground, ChFrame<>(node->GetPos(), QUNIT));
my_center->SetConstrainedCoords(true, false, false, false, false, false);
sys.Add(my_center);
}
ind++;
}