- This topic has 2 replies, 2 voices, and was last updated 4 years, 7 months ago by .
Viewing 3 posts - 1 through 3 (of 3 total)
Viewing 3 posts - 1 through 3 (of 3 total)
- You must be logged in to reply to this topic.
Home › Forum › SOFA › Using SOFA › Move a beam node with ‘LinearMovementConstraint’
Hello,
I would like to set up a simple beam model where:
1. one end of the beam is blocked (Dirichlet boundary condition),
2. the other end is moved by a certain distance (another Dirichlet boundary condition).
I implement the BC 1. with beamI.createObject('FixedConstraint', indices='0', name='FixedConstraint')
For the BC 2., I tried using the LinearMovementConstraint
as follows:
keyTimes = '0 2'
movements = '0 0 0 0 0 0 0 0 0.1 0 0 0'
beamI.createObject('LinearMovementConstraint', keyTimes=keyTimes, template='Rigid3d', movements=movements, indices=str(nn-1))
but I get the following error message at each time increment:
[ERROR] [LinearMovementConstraint(LinearMovementConstraint)] applyConstraint(mparams, matrix) not implemented.
So my question is: what is the methodology/ies to impose displacements or rotations to beams’ nodes?
The scene I am using can be found here
Thanks in advance for your help.
Apparently the problem was caused by the solver that was unfitted.
I replaced:
beamI.createObject('BTDLinearSolver', printLog='false', template='BTDMatrix6d', verbose='false')
with beamI.createObject('CGLinearSolver', threshold='1.0e-9', tolerance='1.0e-9', name='linear solver', iterations='25')
Cheers
Hi @marcomag
Thank you for reporting this error.
The error looks like the constraint is not implemented for this specific template (Rigid3d). More specifically, I would guess that the matrix structure from the BTD (using the block Matrix6d) is too specific and the constraint can not be properly applied.
We would need to implement this applyConstraint() for the BTD as well, even if this is very specific to beam problems.
Thanks again for pointing this out.
I just created an issue here.
Hugo
WARNING
The forum has been moved to GitHub Discussions.
Old topics and replies are kept here as an archive.