Forum Replies Created
-
AuthorPosts
-
ShanBlocked
Hi Hugo,
The scene seems to work now, I changed the mesh and I believe it was because the mesh for not refined properly that the Sofa scene was giving the error I mentioned above. So I guess the last query is resolved, however if you have any suggestions I would be happy to learn.
Best regards,
Shantanu.ShanBlockedHi Hugo,
Thanks for the reply. I made the changes you suggested, however now I have the following error:-
[ERROR] [TetrahedronFEMForceField(FEM)] object must have a tetrahedric topology. The component is inactivated. To remove this error message please add a tetrahedric topology component to your scene.
I changed the mesh as well, made it finer for collision problem.
Regards,
ShanShanBlockedHi Hugo,
Thanks for the reply. I believe there could be the problem with the mesh. I generated the mesh using Gmsh. Do you have any suggestions, should I make the mesh finer for the collision simulation? I could also send you the geometry for you to check what is wrong with the mesh.
Best regards,
Shan.ShanBlockedHi Hugo,
Thanks for the reply. Yes, I am getting the above mentioned warning in set3.pyscn in the FirstStep tutorial.
My apologies for the late reply, had some coursework to finish.
Best regrads,
Shan.ShanBlockedHi Hugo,
Thanks for the reply. I granted you access to google drive, please check if you can access it.
Regarding the query about rigidification, I did go through the example you mentioned. However I am a bit confused regarding the arguments “indices” and “frames” as I am not sure how to extract it from mesh. The part I want to make rigid is the outer wall of the column so that it does not expand radially though it can still expand axially and also can bend.I understand you guys must be busy with the upcoming events on SOFA training in November, though it would be really helpful if you could explain the functions in Python. I have gone through https://www.sofa-framework.org/api/master/sofa/html/index.html to understand the functions and classes used in SOFA Python, but its not really clear to me.
Looking forward to see you for the training session.
Best regards,
ShanShanBlockedHi,
I would be obliged if someone could advise me on the above mentioned query.
Regards,
ShanShanBlockedHi,
Also I have another question regarding the rigidification, what is the need for creating a simulationNode as given one of the topics in forum.
simulationNode = rootNode.createChild(“Simulation”)
simulationNode.createObject(“EulerImplicitSolver”)
simulationNode.createObject(“CGLinearSolver”)
simulationNode.addChild(o)Best regrads,
ShanShanBlockedHi,
I have been trying to work with tripod tutorial example to rigidify outer boundary of the cylindrical actuator I mentioned earlier. However I am stuck at extracting the “groupIndices” and “frame”. I would be highly obliged if you could help me out here. The code I implemented is as follows:
import Sofa import os #from stlib.visuals import ShowGrid from stlib.scene import MainHeader from stlib.physics.deformable import ElasticMaterialObject #from stlib.physics.constraint import FixedBox from stlib.physics.mixedmaterial import Rigidify from splib.objectmodel import setData def createScene(rootNode): #Another way to add gravity with MainHeader MainHeader(rootNode, gravity=[0.0,0.0,-9810.0]) #MainHeader(rootNode, plugins=["SofaSparseSolver"]) rootNode.createObject('VisualStyle', displayFlags='showForceFields') rootNode.createObject('RequiredPlugin', name='soft', pluginName='SoftRobots') rootNode.createObject('RequiredPlugin', name='SofaPython', pluginName='SofaPython') rootNode.createObject('PythonScriptController', filename="pythonControllers/fingerController.py", classname="controller") rootNode.createObject('FreeMotionAnimationLoop') rootNode.createObject('GenericConstraintSolver', tolerance="1e-12", maxIterations="10000") # Create Actuator mechanical model finger = rootNode.createChild('finger') finger.createObject('MeshVTKLoader', name='loader', filename='data/mesh/TestActuator') finger.createObject('Mesh', src='@loader', name='container') finger.createObject('MechanicalObject', name='tetras', template='Vec3d',showObject='true', showObjectScale='1') #finger.createObject('SubsetMultiMapping', template='Vec3d', indices='1 2 3 100') finger.createObject('TetrahedronFEMForceField', template='Vec3d', name='FEM', method='large', poissonRatio='0.4', youngModulus='1500', drawAsEdges="true") finger.createObject('UniformMass', totalMass='0.0008') finger.createObject('EulerImplicit', name='odesolver', rayleighStiffness='0.1', rayleighMass='0.1') finger.createObject('SparseLDLSolver', name='directSolver') #finger.createObject('CGLinearSolver', name='Solver') # tracking Mesh Nodes 1 2 5 6 8 10 50 55 60 100 tracking = finger.createChild('tracking') tracking.createObject('MechanicalObject', showObject='true', showObjectScale='5') tracking.createObject('SubsetMapping', indices='1 2 5 6 8 10 50 55 60 100') # FixedBox constraint at the bottom of actuator finger.createObject('BoxROI', name='boxROI', box='-10.5 -10.5 -4.5 10.5 10.5 -2', drawBoxes='true', drawSize='0.1') finger.createObject('RestShapeSpringsForceField', points='@boxROI.indices', stiffness='1e12', angularStiffness='1e12') finger.createObject('LinearSolverConstraintCorrection', solverName='directSolver') # FixedBox constraint on top of actuator finger.createObject('BoxROI', name='boxROI1', box='-10.5 -10.5 82.5 10.5 10.5 86', drawBoxes='true', drawSize='0.1') finger.createObject('RestShapeSpringsForceField', points='@boxROI1.indices', stiffness='1e12', angularStiffness='1e12') finger.createObject('LinearSolverConstraintCorrection', solverName='directSolver') # Cavity of elastic cylinder (Actuator) cavity = rootNode.finger.createChild('cavity') cavity.createObject('MeshVTKLoader', name='loader2', filename='data/mesh/TestCavity') cavity.createObject('Mesh', src='@loader2', name='cavityMesh') cavity.createObject('MechanicalObject', name='cavity', showObject='true', showObjectScale='1') cavity.createObject('SurfacePressureConstraint', name="SurfacePressureConstraint", template='Vec3d', value="0.0001", valueType="pressure") cavity.createObject('BarycentricMapping', name='mapping', mapForces='false', mapMasses='false')
The meshed geometry is in this link
https://drive.google.com/drive/folders/1r3zk_WkzGLM0yhyyY7_W996jcpUx0akv?usp=sharingBest regards,
ShanShanBlockedHi Cristian,
I looked at Tripod tutorial and also looked at the following example
However I have questions regarding “frames” and “groupIndices”. Could you please explain what do they mean in terms of the mesh. I looked at few topics on rigidification and it seems to me that it has to do with BoxROI. Since I am an amateur in python so I couldn’t completely understand the code so please pardon my lack of knowledge of python. I am unclear about how to rigidify the surface mesh elements of the the outer boundary of the cylindrical structure.
In short how can I obtain frames and indices from the meshed structure.Best regards,
Shantanu.ShanBlockedHi Christian,
Thanks for the suggestion. I will look into the tutorial example of Tripod to see how to implement “rigidification”. Hope to get back to you with some progress.
Cheers.
ShanShanBlockedThanks. I will update you if I am able to resolve the issue with your suggestion.
-
AuthorPosts