Forum Replies Created
-
AuthorPosts
-
Pasquale94Blocked
@olivier-goury thanks for the tips, I will try in this week to apply your advices.
Thank you very much.
I will let you know soon.
Anyway, seems that the pressure input works also with CGLinear solver, at least for me worked.
CheersPasquale94BlockedHello @olivier-goury,
Thanks for the reply. I tried but still using the SparseLDL the DOF are not respected, it isotropically expand and then explodes, also at very low pressures.
Instead with CGLinear the actuator bends in a planar way, as i want, so it means that the multimaterial simulation is working, because i have this behaviour also on the real actuator.
Actually if you see, it is cylindrical, with an external reinforcement that creates anisotropy in DOF (planar bending), so i don’t know if the geometry matters for the convergence of the linear solver. Also for me it results strange, but I really resolved the actuator simulation just changing the linear solver. I am also preparing a publication on that, in case would be a “problem” of SparseLDL linear solver for this specific geometry let me know.
Maybe i tag also @hugo on that. Please use the scene coded in Python3.Pasquale94BlockedHello @olivier-goury and @felixvanneste, any updates on that?
Pasquale94BlockedHello @DiegoMtz ,
See this other post opened by me on the argument, it resolved all my issue.
Animation issue Error in phase 3 of MOR plugin. Please Help!
Pasquale94BlockedHello @mikhail,
here my code to retrieve a volumetric mesh:
import SofaRuntime SofaRuntime.importPlugin("SofaComponentAll") # to add elements like Node or objects import Sofa.Core import os path = os.path.dirname(os.path.abspath(__file__))+'/design/' def createScene(rootNode): rootNode.addObject('RequiredPlugin' ,pluginName='SofaExporter') rootNode.addObject('VisualStyle',displayFlags="hideVisual") rootNode.addObject('RequiredPlugin', pluginName="CGALPlugin") rootNode.addObject('RequiredPlugin', name="SofaOpenglVisual") rootNode.addObject('MeshObjLoader', name="loader", filename="design/BSPA_New_Design_Outer.obj") rootNode.addObject('MechanicalObject', name="dofs", position="@loader.position") #rootNode.addObject('TriangleSetTopologyContainer', name="topo", triangles="@loader.triangles") #rootNode.addObject('TriangleSetTopologyModifier' , name="Modifier") #rootNode.addObject('TriangleSetTopologyAlgorithms', name="TopoAlgo", template="Vec3d") #rootNode.addObject('TriangleSetGeometryAlgorithms', template="Vec3d" ,name="GeomAlgo", drawTriangles="1") rootNode.addObject('MeshGenerationFromPolyhedron', name="gen", inputPoints="@loader.position", inputTriangles="@loader.triangles",facetSize="0.75",facetApproximation="1",cellRatio="2", cellSize="2") rootNode.addObject('Mesh', name ='topo', position='@gen.outputPoints', tetrahedra='@gen.outputTetras') rootNode.addObject('VTKExporter', filename='finger',src = '@topo', edges='0', exportAtBegin='1') rootNode.addObject('OglModel', color=[0.3, 0.2, 0.2, 0.6]) return rootNode
here i produce from triangles, the tetrahedrons.
You have to produce from quads, hexahedrons.
Anyway, if you have blender, is also easier to voxelize or produce an hexahedral mesh.
I hope this helps you.
Cheers.Pasquale94BlockedHello @mikhail,
In Sofa Is possible to use Hexahedral meshes (cubes).
You Need Just to modify the code that generate volumetric meshes from a surface One.Cheers
21 May 2021 at 13:33 in reply to: Issues with running examples on SOFA_v20.12.02_Defrost_Linux #19529Pasquale94BlockedHello @mohshaw ,
I use the binary codes of Sofa with Python3.7 as well.
to make the plugin SofaPython3 work in ubuntu, for the bynary code sofa version i wrote these two lines in the terminal:
export PYTHONPATH=/home/pasquale/SOFA_v20.12.02_Linux/plugins/SofaPython3/lib/python3/site-packages/
then :
export SOFA_ROOT=/home/pasquale/SOFA_v20.12.02_Linux/
then relaunch again sofa with this:
./runSofa -l /home/pasquale/SOFA_v20.12.02_Linux/plugins/SofaPython3/lib/libSofaPython3.so
Let me know if then you can open the python examples without issues.
29 April 2021 at 12:35 in reply to: [SOLVED] Animation issue Error in phase 3 of MOR plugin. Please Help! #19347Pasquale94BlockedHello @felixvanneste,
Thanks for all the help and advice.I will close the topic, the issue is solved.
28 April 2021 at 18:31 in reply to: [SOLVED] Animation issue Error in phase 3 of MOR plugin. Please Help! #19343Pasquale94BlockedHello @felixvanneste .
This is the last question then i will close the topic ahah. Thanjks for your help.
Once I produced the reduced_scene, can i integer the scene in a Python 3 scripting?
Or I have to use always a scene coded in python 2?Thank you for the help.
28 April 2021 at 15:31 in reply to: [SOLVED] Animation issue Error in phase 3 of MOR plugin. Please Help! #19338Pasquale94BlockedHello @felixvanneste,
Now the code produce the reduced_test.py scene, but when i launch the scene in sofa it don’t actuate the pneunet.
So I have to add a python controller to the scene?
Thanks a lot for the help!
28 April 2021 at 14:09 in reply to: [SOLVED] Animation issue Error in phase 3 of MOR plugin. Please Help! #19336Pasquale94BlockedHello @felixvanneste,
I applied your modifications, but using the Generic Constraint solver the finger is not animated (seen in the debug scene).
Anyway using both Linear or Generic Solvers I have always this error when the phase2 starts:
Executing readStateFilesAndComputeModes.py Arguments : INPUT : in stateFilePath : /home/pasquale/sofa-new-python2/src/applications/plugins/ModelOrderReduction/python/Thick_finger/debug/stateFile.state with arguments : -tolerance : 0.001 OUTPUT : -modesFileName : /home/pasquale/sofa-new-python2/src/applications/plugins/ModelOrderReduction/python/Thick_finger/data/modes.txt ################################################### Reading file '/home/pasquale/sofa-new-python2/src/applications/plugins/ModelOrderReduction/python/Thick_finger/debug/stateFile.state': XO NOT FOUND Traceback (most recent call last): File "ModelOrderReduction.py", line 68, in <module> reduceMyModel.phase2() File "/home/pasquale/sofa-new-python2/src/applications/plugins/ModelOrderReduction/python/mor/reduction/reduceModel.py", line 294, in phase2 raise ValueError("problem of execution of readStateFilesAndComputeModes") ValueError: problem of execution of readStateFilesAndComputeModes
What does it mean? Then I seen that the file stateFile.state in debug folder starts from a T = 6 while i would expect that was T = 0 as first increment.
Thank you for the help. Do you had the same error with my scene?
26 April 2021 at 10:33 in reply to: [SOLVED] Animation issue Error in phase 3 of MOR plugin. Please Help! #19312Pasquale94Blocked23 April 2021 at 11:34 in reply to: [SOLVED] Animation issue Error in phase 3 of MOR plugin. Please Help! #19282Pasquale94BlockedHello @felixvanneste ,
i created a github repo, so you can dowload the files, the scene is thicker_finger.py
Thanks again!
During the installation of MOR plugin I had problem with Sofa.Gl library apparently in my sofa 20.12 (ubuntu version) is not present.
Maybe this can be the origin of the issue.23 April 2021 at 10:57 in reply to: [SOLVED] Animation issue Error in phase 3 of MOR plugin. Please Help! #19280Pasquale94BlockedHello @felixvanneste ,
Is good for you if I contact you by email sending the scene?
Many Thanks for the help!
Pasquale
Pasquale94BlockedYes, i would like for example to add a Maxwell modeling to the Hyperelastic forcefield , to have the kinematic and Dynamic modeling of the material working toghether.
Is this possibile to add such Mass -spring – dumping model to my forcefield?For example introducing a variabile “viscolelasticity” in the force field?
Thanks a lot for the answer Hugo!.
Pasquale94BlockedHey Hugo,
I Will open One today.
Thanks.
Pasquale94BlockedI need more the tracking of the position of my finger with the camera.
On PointCloudProcessing.cpp I had also a code error.
Can I write everything in the github issue?
Thanks a lot!
Pasquale.
Pasquale94BlockedHello @hugo,
I explain a bit how I am conducting my research.
I am basically demostrating on how the soft robotic controllers can be more accurate if we have a good model of the material that we generally use… Also because as you might know, I am working for particular materials.
For a kinematic control, i started from static test on my material (unaxial, shear test and so on), so for now the effect of viscosity in static condition is not so relevant, so i choose to model my material as an hyperelastic one. So i produced experimental data (mechanical test) fitted the curve in Abaqus and retrieve the constitutive law with material constant… Put everything in sofa and make the controller and so on.
Then, I want to pass to build a dynamic controller, so i need the dynamical behaviour of my material, uder creep and stress relaxation test for example. The material scientists working with me already know that our materials have a viscoelastic nature if it undergoes into dynamic test.
In abaqus, for the dynamic responce modeling of my material I have introduce the hyperelastic model already calculated from static test plus the creep test experimental data to calculate the viscoelastic calculation.
Then Abaqus made the fitting for viscoelastic parameters, basically he build a Prony series.
or if I use the stress relaxation test instead of a creep test, abaqus can make the Maxwell modeling parameter simulation.
So, I am asking, if it is possible to enter to define viscoelasticity of my material or using prony series parameters or Maxwell modeling. (Actually the maxwell modeling is such a mass spring-damping system, so i think that you Damping solution is near to the maxwell modeling of viscoelasticity).
I hope that is clear. Thanks you in advance. I link you wikipedia page about viscoelasticity to understand of what I am talking about.
Pasquale94BlockedHello Everyone,
Yeah as Said many people before me, GitHub discussions offer a Better tracking of the problems and what people are working on.
It would be good also to have like a sort of “Discord” or Telegram Group,where people can ask for technical issue about Sofa and resolve the problem/get answers in short-time.Keep me updated.
Success
Pasquale.22 December 2020 at 13:51 in reply to: [SOLVED] How to make a PythonScript controller with SofaPython3 #18077Pasquale94BlockedHello guys,
Sorry for the late reply @amackeith but I started my Christmas holydays some days ago, I hope that the problem is resolved.Merry Christmas everyone.
Pasquale6 December 2020 at 17:12 in reply to: [SOLVED] How to make a PythonScript controller with SofaPython3 #17958Pasquale94Blockedhello everyone!
I feel stupid but I resolved by myself ahaha.
I will close the topic
3 November 2020 at 16:01 in reply to: Question about Neo-Hookean Strain Energy function implemented in Sofa. #17537Pasquale94BlockedHello @nicklj !
Thank you for the answer.
Yes Indeed from coefficients that i obtained in Abaqus i made the transformations that you mentioned.
In this period i noticed that i made some stupid errors in Sofa parameters convertions.
Now i correct them, and the two Fem simulator, Abaqus and Sofa, for the design that I am trying, gives the same results. So I am glad of this!Anyway, I am still curious about the nature of Hyperelastic models equations. And I am agree with you that is a Nightmare in to orient in !
Thank you for the kind and precise answer!
Pasquale.
Pasquale94BlockedHello @Hugo ,
Now I am concentrating on damage tracking and not on damage simulation, so for now I change a bit the road to model the self healing process step by step .
Thank you,
Pasquale94BlockedI resolved by my self, putting in the CMakeLists.txt of src folder the following line :
option(SOFA_BUILD_METIS "Compile Metis Library" OFF)
I close the issue, for someone is building the 20.06 version can be useful.
19 July 2020 at 01:19 in reply to: [SOLVED] Harmonic excitation with constantForceField (Python Controller) #16902Pasquale94BlockedHello Everyone.
I know the topic is old ,but I was searching a solution to impose a sinusoidal force field to my project too, for this reason I read this topic ahah.
Anyway, I find the solution that can solve your issue @Nasim, I wrote the controller in this way:
import sys import Sofa import math class controller(Sofa.PythonScriptController): def initGraph(self,node): self.node = node self.body = self.node.getChild('ElasticBody') self.dofs = self.body.getObject('dofs') self.CFF = self.body.createObject('ConstantForceField', name="CFF" ,indices="14", force=[0,0,0]) self.currentTime = 0.0 self.scaleFactor = 1000.0 return 0 def onBeginAnimationStep(self, dt): self.currentTime += dt if (self.currentTime > 0): self.CFF.findData('force').value = [0,10000000*math.sin((self.currentTime*self.scaleFactor*math.pi)/180),0]
-
AuthorPosts