Home › Forum › SOFA › Building SOFA › Problem for beam-mass simulation.
- This topic has 7 replies, 2 voices, and was last updated 3 years, 7 months ago by Hugo.
-
AuthorPosts
-
3 February 2021 at 18:20 #18480eaparraBlocked
I have a drawback to be able to simulate a cantilever beam, fixed-free confuguration, with a mass at the free end of the beam.
The idea is to simulate a beam, where one end of the beam is fixed and the other is free, and a mass is fixed at its free end
When I did the tutorials that I found in the examples folder, I was able to refer to several examples in order to carry out the simulation. Among those that I found BilateralInteractionConstraint.scn, BilateralInteractionConstraint_Rigid.scn and AttachConstraint.scn.
But whe I click animate button, it is not possible to simulate how the mass, which is at the free end, affects the behavior of the beam.
You can see how the mass is held in the free end but there is no bending due to the mass. In my simulation I used BilateralInteractionConstraint and AttachConstraint.I know, it is a easy simulation, but I have had many problems in getting the simulation done well, I may not be taking something into account and I hope that one of you can do me a favor and help me.
I attach the code and thanks so much for your help.
<!-- BeamFEMForceField example --> <Node name="root" gravity="0 0 -9.81" dt="0.01"> <RequiredPlugin name="SofaOpenglVisual"/> <VisualStyle displayFlags="showBehaviorModels showForceFields showCollision" /> <OglGrid size="0.5" name="grid"/> <OglLineAxis size="@grid.size"/> <OglSceneFrame/> <GenericConstraintSolver tolerance="0.001" maxIterations="1000"/> <DefaultPipeline depth="6" verbose="0" draw="0" /> <BruteForceDetection name="Detection" /> <MinProximityIntersection name="Proximity" alarmDistance="0.1" contactDistance="0.02" /> <DefaultContactManager name="Response" response="default" /> <DefaultCollisionGroupManager name="Group" /> <Node name="NoAttach"> <!-- Beam without mass at free end --> <EulerImplicitSolver rayleighStiffness="0.1" printLog="false" rayleighMass="0.1" /> <BTDLinearSolver template="BTDMatrix6d" printLog="false" verbose="false" /> <Node name="beam"> <MechanicalObject template="Rigid3d" name="beam_DOFs" position="0 0 0 0 0 0 1 0.1047 0 0 0 0 0 1 0.20956 0 0 0 0 0 1 0.3141 0 0 0 0 0 1 0.4188 0 0 0 0 0 1 0.5235 0 0 0 0 0 1 0.6282 0 0 0 0 0 1 0.7329 0 0 0 0 0 1" /> <MeshTopology name="lines" lines="0 1 1 2 2 3 3 4 4 5 5 6 6 7" /> <UniformMass vertexMass="0.022375 1 [0.001 0 0,0 0.001 0,0 0 0.001]" /> <BeamFEMForceField name="FEM" radius="0.0025" youngModulus="70e9" poissonRatio="0.3"/> <LinearSolverConstraintCorrection /> <FixedConstraint name="FixedConstraint" indices="0" /> </Node> </Node> <Node name="AttachOneWay"> <!-- Beam with mass at free end --> <EulerImplicitSolver rayleighStiffness="0.1" printLog="false" rayleighMass="0.1" /> <BTDLinearSolver template="BTDMatrix6d" printLog="false" verbose="false" /> <Node name="beam"> <MechanicalObject template="Rigid3d" name="beam_DOFs" position="0 0.25 0 0 0 0 1 0.1047 0.25 0 0 0 0 1 0.20956 0.25 0 0 0 0 1 0.3141 0.25 0 0 0 0 1 0.4188 0.25 0 0 0 0 1 0.5235 0.25 0 0 0 0 1 0.6282 0.25 0 0 0 0 1 0.7329 0.25 0 0 0 0 1" /> <MeshTopology name="lines" lines="0 1 1 2 2 3 3 4 4 5 5 6 6 7" /> <UniformMass vertexMass="0.022375 1 [0.001 0 0,0 0.001 0,0 0 0.001]" /> <BeamFEMForceField name="FEM" radius="0.0025" youngModulus="70e9" poissonRatio="0.3"/> <LinearSolverConstraintCorrection /> <FixedConstraint name="FixedConstraint" indices="0" /> <Node name="ConstraintPoint"> <MechanicalObject template="Rigid3d" name="dof" /> <SphereCollisionModel radius="0.02" group="1"/> <RigidRigidMapping index="7" /> </Node> </Node> <Node name="mass_1"> <MechanicalObject template="Rigid3d" name="mass1_DOFs" position="0.7329 0.25 0 0 0 0 1"/> <UniformMass vertexMass="200 10 0.01 0 0 0 0.01 0 0 0 0.01 0" printLog="false" /> <LinearSolverConstraintCorrection /> <SphereCollisionModel radius="0.02" group="1"/> <Node name="ConstraintPoint"> <MechanicalObject template="Rigid3d" name="dof" /> <SphereCollisionModel radius="0.02" group="1"/> <RigidRigidMapping index="0" /> </Node> </Node> <BilateralInteractionConstraint template="Rigid3d" object1="@beam/ConstraintPoint/dof" object2="@mass_1/ConstraintPoint/dof" first_point="0" second_point="0" /> </Node> <Node name="AttachTwoWay"> <!-- Beam with mass at free end --> <EulerImplicitSolver rayleighStiffness="0" printLog="false" rayleighMass="0.1" /> <CGLinearSolver template="CompressedRowSparseMatrix3d" iterations="25" name="linear solver" tolerance="1.0e-9" threshold="1.0e-9" /> <Node name="beam2"> <MechanicalObject template="Rigid3d" name="DOFs" position="0 0.5 0 0 0 0 1 0.1047 0.5 0 0 0 0 1 0.20956 0.5 0 0 0 0 1 0.3141 0.5 0 0 0 0 1 0.4188 0.5 0 0 0 0 1 0.5235 0.5 0 0 0 0 1 0.6282 0.5 0 0 0 0 1 0.7329 0.5 0 0 0 0 1" /> <MeshTopology name="lines" lines="0 1 1 2 2 3 3 4 4 5 5 6 6 7" /> <UniformMass vertexMass="0.022375 1 0.001 0 0 0 0.001 0 0 0 0.001" /> <BeamFEMForceField name="FEM" radius="0.0025" youngModulus="70e9" poissonRatio="0.3"/> <FixedConstraint name="FixedConstraint" indices="0" /> </Node> <Node name="mass_1"> <MechanicalObject template="Rigid3d" name="mass_1" /> <UniformMass vertexMass="100 1 0.01 0 0 0 0.01 0 0 0 0.01 0" printLog="false" /> <SphereCollisionModel radius="0.02" group="1"/> </Node> <AttachConstraint object1="@beam2" object2="@mass_1" indices1="7" indices2="0" /> </Node> </Node>
4 February 2021 at 18:46 #18504eaparraBlockedHi @hugo.
I hope you have a good day.
Converning that I asked before about Problem for beam-mass simulation, I wanted to know if you can help me.
Thank you very much.9 February 2021 at 16:47 #18559eaparraBlockedHi @hugo.
I have a drawback to be able to simulate a cantilever beam, fixed-free confuguration, with a mass at the free end of the beam. Concerning that I asked before about Problem for beam-mass simulation, I wanted to know if you can help me.
Thank you very much.17 February 2021 at 09:37 #18697HugoKeymasterHi @eaparra
Thank you for your question and thank you for providing the scene files, it helps a lot!
In mechanics, the cantilever beam is a well-known example. Usually, the mass at the end is modeled as a force (F = mg) applied at the extremity of the beam. Do you really need to model the full mass object at the extremity or a force would do it?
Your scene using the projective AttachConstraint works well.
The case of a coupling using the BilateralInteractionConstraint can not work. BilateralInteractionConstraint belongs to the constraints solved using the Lagrange multiplier approach. It therefore requires the two step resolution (free + correction motion) implemented in the FreeMotionAnimationLoop with a ConstraintSolver.
I plan to write a doc page about it in the coming days, your post just motivates me more.
I hope this helps.
BestHugo
PS: We try to answer as quickly as possible on the forum, but do no worry: we notice each one of your posts here. Just be comprehensive, technical support is free, it is not our only task and our manpower remains limited. We are in the process of providing a closer and more robust support for the community.
Anyway, feel free to get involved as well or ask your institution to support us to get more manpower on the open-source!10 March 2021 at 16:54 #18835eaparraBlockedHi @Hugo.
Thanks so much for your help.
Yes, I have to model the full mass object at the end, and along, the beam.
The idea is to simulate and demostrate how I can change the sttiffness changing the full mass object location along the beam.
This fisrt approch is thought for modeling a quadruped robot trunk.The problem using AttachConstraint is that I can’t simulate how with mass and without mass is modified the bending of the beam. It appears that the full mass object isn’t at the end of the beam and therefore it doesn’t effect the beam.
I undestand that you help as quickly as possible, sorry I didn’t want to bother you.
Thank you very much for your help and I look forward to your response.
Greetings.
17 March 2021 at 22:46 #18877HugoKeymasterHi @eaparra
You are never bothering! We are now trying to browse all forum questions once a week, to improve our support quality.
I am not sure to understand what you mean by a simulation “with mass and without mass”.
Do you want to run a dynamic and a static simulation?Best wishes,
Hugo
18 March 2021 at 11:59 #18910eaparraBlockedHi @Hugo
Yes, we would like to do two simulations, one without mass and the other one with mass.
The idea is to investigate how, with the mass at the end, we can change the stiffness of the system.
Yes, in dynamic simulation.I attach the paper, which explains what we want to simulate, but of course, with SOFA to go further.
A Bio-inspired Quasi-resonant Compliant Backbone for Low Power Consumption Quadrupedal Locomotion
https://www.scitepress.org/Link.aspx?doi=10.5220/0009770402420249
Thank you for your help and I look forward to your response.
Greetings.
31 March 2021 at 23:29 #19039HugoKeymasterHi @eaparra
I am sorry I can not access the full article.
But, since you seem to be aiming at attaching a mass at the beam extremity (in one point), I think a good and simpler way of modeling it, would be to define a force corresponding to the mass density x gravitational acceleration. Such a force would mimic the effect of an attached mass.
How would this sound ?
Best wishes,
Hugo
-
AuthorPosts
- You must be logged in to reply to this topic.