Home › Forum › SOFA › Using SOFA › Model Order reduction problem with CGLinearSolver.
Tagged: Linux_ubuntu, SOFA_2012
- This topic has 5 replies, 2 voices, and was last updated 1 year, 2 months ago by Pasquale94.
12 January 2022 at 16:19 #21379
I made a scene of a pneumatic actuator, present in this github repository. I want to use the MOR plugin on that.
In the repo there is the same scene coded in python3 and python2, called finger_hiprelatic_matlab.py (with a 2 the one in Python2), the code ModelOrderReduction.py that use to proceed with all the phases.
As you can see in the scene coded in python3 i used a CGLinearSolver for the actuator modeling, that is incompatible with the function GenericConstraintCorrection (and i already know that the MOR plugin have problems with LinearConstraintCorrection).
If I use SparseLDLSolver the DOF of the actuator is wrong, and of course if I use the MOR plugin for that Linear solver, the reduced DOF will be wrong.
Then, another problem, the SOFA version that i am using for MOR doesn’t the SubtopologyMapping plugin, it is a multi-material simulation (i have also the new version 21.12, but as far as i know doesn’t work with python2).
I am using Ubuntu 20.04 and for the MOR i am using Sofa 20.12 that has still Python2.7 SOFA plugin.
Can you Help me on that?
I tag @olivier-goury and @felixvanneste that worked on this plugin and already helped me a lot in the past.
P.S. In the repo there are also the mesh files, please when you dowload create a folder called “design” and put these files in it.
Cheers.17 January 2022 at 13:43 #21408
Hello @olivier-goury and @felixvanneste, any updates on that?18 January 2022 at 11:27 #21409olivierBlocked
Sorry for the delay. First of all, before looking at the MOR plugin, you should make sure your SOFA scene is working the way you want.
Having a quick look, I think that first you could simplify your scene:
it doesn’t look like you want to consider contacts, so just remove all that has do do with that (BruteForceDetection,DefautPipeline, DefaultContactManager, LocalMinDistance).
Also, since you want to use an actuator, you can not use an iterative solver like CG, you HAVE to use a direct solver like SparseLDL (because the system matrix has to be built, it is used to solve the constraints).
Let me know how you get on,
Olivier18 January 2022 at 14:42 #21410
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.18 January 2022 at 15:52 #21411olivierBlocked
I don’t get how you can apply the pressure using the CGlinearSolver, because the constraint on pressure cannot be applied.
If your scene does not work with SparseLDL, it means there is a problem somewhere. Looking at your modelSubTopo Node, I think something is strange there. You have an identityMapping between your subtopology Node to the main node (why? I guess it would rather be a subsetMapping) and you have a MechanicalObject and a ForceField, hence mapped through the identityMapping –> This can not work with SparseLDL
To solve that you can:
– Use the component MechanicalMatrixMapper (you can find an example in main SOFA examples)
– Create a subtopology the same way it is done in the scene with the Multigait Soft Robot in the MOR plugin. I would advise this solution which is more simple.
olivier18 January 2022 at 16:02 #21412
@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.
- You must be logged in to reply to this topic.