Stiffness issue #4069
Replies: 4 comments
-
To create an heterogeneous object, you have two ways of doing it:
yourSkin.addObject('EulerImplicitSolver', name="odesolver", rayleighStiffness="0.01", rayleighMass="0.01") #added the 2 params
yourSkin.addObject('CGLinearSolver', iterations="25", name="EpiLinearsolver", tolerance="1.0e-9", threshold="1.0e-9")
# Volumetric mesh loader
yourSkin.addObject('MeshGmshLoader', name='volumeLoader', filename="C:\sofa\src\VirtualSkinV4\mesh\skin_volume_403020_05", scale3d=scale3d)
# Tetrahedra container
yourSkin.addObject('TetrahedronSetTopologyContainer', src='@volumeLoader', name='TetraContainer')
yourSkin.addObject('TetrahedronSetGeometryAlgorithms', template='Vec3d')
yourSkin.addObject('TetrahedronSetTopologyModifier')
# Mechanical object and mass
yourSkin.addObject('MechanicalObject', name='SkinMechObj', template='Vec3d')
yourSkin.addObject('DiagonalMass', name="SkinMass", massDensity="1.0")
# Forces
yourSkin.addObject('TetrahedronFEMForceField', template='Vec3d', name='FEM', method='large', youngModulus=skin_youngModulus, poissonRatio=skin_poissonRatio)
yourSkin.addObject('LinearSolverConstraintCorrection')
# Fixed box for constraints
yourSkin.addObject('BoxROI', name='boxROI', box=fixingBox, drawBoxes='false', computeTriangles='true')
yourSkin.addObject('RestShapeSpringsForceField', name='rest', points='@boxROI.indices', stiffness='1e12', angularStiffness='1e12')
#SubNode with the sphere to add stiffness and mass
stifferSphere = yourSkin.addChild("StifferSphereInsideSkin")
stifferSphere.addObject('MeshGmshLoader', name='sphereLoader', filename="YourVolumetricMeshFileOfSphere.msh")
stifferSphere.addObject('TetrahedronSetTopologyContainer', src='@volumeLoader', name='TetraContainer')
stifferSphere.addObject('TetrahedronSetGeometryAlgorithms', template='Vec3d')
stifferSphere.addObject('TetrahedronSetTopologyModifier')
# Mechanical object and mass
yourSkin.addObject('MechanicalObject', name='SphereMechObj', template='Vec3d')
yourSkin.addObject('DiagonalMass', name="SkinMass", massDensity="1.0")
# Forces
yourSkin.addObject('TetrahedronFEMForceField', template='Vec3d', name='FEM', method='large', youngModulus=sphere_youngModulus, poissonRatio=sphere_poissonRatio)
yourSkin.addObject('BarycentricMapping', template='Vec3d', name='mapping', input='@.', output="@../") I hope this helps |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
Hi there,
I'm trying to reproduce a nodule on SOFA v22.12.
I created the skin with a value of stiffness and a sphere inside with a different stiffness's value, but I'm not able to "feel" the latter. I mean I feel the skin through the Geomagic but not the sphere.
What can I do?
Here there's a piece of the code:
Beta Was this translation helpful? Give feedback.
All reactions