Home › Forum › SOFA › Using SOFA › Simulating Blood Vessels using Centerline and BeamFEMForceField
Tagged: BeamFEMForceField, Linux_ubuntu, SOFA_2012
- This topic has 1 reply, 2 voices, and was last updated 3 years, 6 months ago by Hugo.
-
AuthorPosts
-
26 May 2021 at 17:45 #19581BenMJacksonBlocked
Hi All,
I have been trying to simulate an a vasculare structure using the following methods:
1. Extracting the centreline using the Skeletonization CGAL method in the SofaSekeleton plugin.
2. Attaching the BeamFEMForceField to the mechanical object representing the centreline
3. Mapping a 3D mesh of the vasculature to the centrelineI can’t get the BeamFEMForceField to interact with the mechanical object stably – either the object reacts violently or the nodes barely react to external forces at all.
I have attached a python3 scene showing my issue below.
def createScene(root): root.addObject('RequiredPlugin', pluginName="SofaGeneralSimpleFem") root.addObject('RequiredPlugin', pluginName="SofaOpenglVisual") root.addObject('RequiredPlugin', pluginName="SofaBoundaryCondition") root.addObject('RequiredPlugin', pluginName="SofaGeneralLinearSolver") root.addObject('RequiredPlugin', pluginName="SofaImplicitOdeSolver") root.addObject('RequiredPlugin', pluginName="SofaMiscCollision") root.addObject('VisualStyle', displayFlags='showVisualModels showBehaviorModels showCollisionModels hideMappings hideForceFields') root.addObject('DefaultPipeline', depth="6", verbose="0", draw="0") root.addObject('BruteForceDetection', name='N2') root.addObject('MinProximityIntersection', name="proximity", alarmDistance="0.3", contactDistance="0.2") root.addObject('DefaultContactManager', name="Response", response="default") root.addObject('DefaultCollisionGroupManager') Vessels = root.addChild('Vessels') Vessels.addObject('EulerImplicitSolver', rayleighStiffness="0.1", printLog="false", rayleighMass="0.1") Vessels.addObject('BTDLinearSolver', printLog="false", verbose="false") Vessels.addObject('MechanicalObject', template="Rigid3d", showObject="true", showVectors="true", name="VesselDOFs", position="45.9384 -38.9165 -11.3011 0 0 0 1 50.5327 -40.1251 -10.5909 0 0 0 1 26.3279 -26.9123 6.38155 0 0 0 1 19.9034 -68.5806 -21.1806 0 0 0 1 82.1159 -61.248 -5.15561 0 0 0 1 20.2767 -95.5472 -39.1948 0 0 0 1 10.074 -67.9846 -0.249046 0 0 0 1 5.45089 -76.2767 -4.04945 0 0 0 1 -87.852 -71.0035 -1.46354 0 0 0 1 24.443 -60.461 -23.2174 0 0 0 1 -103.616 -85.1392 -1.89418 0 0 0 1 -70.5846 -57.3729 -3.72731 0 0 0 1 -78.367 -63.2793 -2.41058 0 0 0 1 -4.40804 -69.2463 3.18586 0 0 0 1 -26.5056 -54.5221 -0.11581 0 0 0 1 -31.2056 -53.9303 -11.2046 0 0 0 1 -26.4985 -54.5275 -0.115843 0 0 0 1 20.5316 -50.6642 -2.21915 0 0 0 1 27.3656 -42.2035 -11.461 0 0 0 1 -23.3634 -21.877 -13.6533 0 0 0 1 19.1806 -22.0507 -14.1092 0 0 0 1 -32.2436 -31.3578 7.50292 0 0 0 1 -30.5041 -21.9297 6.78111 0 0 0 1 39.7909 -39.8316 -10.609 0 0 0 1 14.5384 -60.1784 -1.72936 0 0 0 1 25.8983 -33.271 4.92737 0 0 0 1 11.0507 -65.6483 -0.516643 0 0 0 1 32.2376 -41.6449 -9.16089 0 0 0 1 21.4929 -25.1619 -13.808 0 0 0 1 -63.0036 -51.3481 -6.59929 0 0 0 1 -16.7269 -57.9131 3.03363 0 0 0 1 24.7584 -30.4604 -14.1763 0 0 0 1 21.8826 -47.6462 -1.02917 0 0 0 1 -31.0114 -41.7808 4.37305 0 0 0 1 -7.45276 -62.7375 4.53437 0 0 0 1 24.0196 -42.4415 1.24649 0 0 0 1 -28.6898 -31.2259 -15.2363 0 0 0 1 -34.4547 -39.3324 -13.8233 0 0 0 1 -31.4025 -26.7266 7.38085 0 0 0 1 23.8632 -49.0914 -19.1771 0 0 0 1 93.0955 -68.1495 -5.52487 0 0 0 1 65.2338 -49.5859 -7.18497 0 0 0 1 -107.51 -88.6115 -2.68924 0 0 0 1 -109.744 -90.7828 -3.30177 0 0 0 1 18.2521 -54.5873 -2.67527 0 0 0 1 -26.5021 -54.5246 -0.116004 0 0 0 1 -25.0196 -25.0072 -14.3405 0 0 0 1 -93.7629 -75.7296 -1.3276 0 0 0 1 25.1953 -37.573 3.35878 0 0 0 1 105.982 -76.979 -6.75071 0 0 0 1 18.8743 -89.4536 -32.6021 0 0 0 1 19.952 -23.1562 -13.9702 0 0 0 1 -100.553 -82.2423 -1.44397 0 0 0 1 -29.525 -51.1064 -5.7366 0 0 0 1 -54.3115 -44.6712 -9.77185 0 0 0 1 18.1277 -86.1072 -29.1211 0 0 0 1 24.4025 -35.4378 -14.9281 0 0 0 1 -26.9095 -48.6436 1.19528 0 0 0 1 15.5078 -78.9454 -20.4537 0 0 0 1 -46.5416 -42.4067 -11.3127 0 0 0 1 19.9796 -94.2545 -37.7682 0 0 0 1 ") Vessels.addObject('MeshTopology', drawEdges="1", name="lines", position="@VesselDOFs.position", lines="18 56 40 49 2 25 1 41 0 1 0 23 40 4 60 50 3 58 4 41 58 55 55 50 52 47 6 7 8 12 58 7 42 10 52 10 42 43 28 51 12 11 6 26 39 18 29 54 26 24 24 44 11 29 45 16 13 7 34 30 15 53 44 17 34 13 57 53 45 14 9 39 15 37 23 27 57 33 25 48 31 56 54 59 33 21 18 27 46 19 46 36 32 35 36 37 59 37 28 31 22 38 51 20 21 38 8 47 3 9 35 48 57 30 17 32 60 5 ") Vessels.addObject('UniformMass', vertexMass="1 1 0.1 0 0 0 0.1 0 0 0 0.1") Vessels.addObject('FixedConstraint', name="fixedConstraint", indices="26") Vessels.addObject('BeamFEMForceField', name="BeamFEM", radius="0.001", youngModulus="10000000", poissonRatio="0.49") #Vessles.addObject('LinearSolverConstraintCorrection') #Vessels.addObject('OglModel', name="visual" ) return 0
Is it a case of just tuning parameters in the BeamFEMForceField? or am I missing something fundemental in my scene?
Thanks,
Ben11 June 2021 at 11:07 #19672HugoKeymasterHi @benmjackson
Are you confident in your physical parameters and their units?
Moreover, looking at the high stiffness value you are setting, you might need to use small time steps to ensure convergence of your system.Best,
Hugo
-
AuthorPosts
- You must be logged in to reply to this topic.