From: Lesage,Anne Cecile J Sent: Tuesday, March 29, 2022 8:42 AM To: Konstantinos Poulios <logar...@googlemail.com> Subject: RE: [EXT] Re: rigid contact with arbitrary surface
Dear Kostas Both contacts are really usefull for me 3d to 2d and 3d to 3d But 3d to 3d is kind of priority 3d to 2d is great because it saves time if we can prove that the 3d solid around the organ of interest is not moving much In my recent published worked I used 3d to 3d for brain shift and 3d to 2d for minimally invasive lung surgery Best regards Thank you AC From: Konstantinos Poulios <logar...@googlemail.com<mailto:logar...@googlemail.com>> Sent: Tuesday, March 29, 2022 6:53 AM To: Lesage,Anne Cecile J <ajles...@mdanderson.org<mailto:ajles...@mdanderson.org>> Subject: Re: [EXT] Re: rigid contact with arbitrary surface WARNING: This email originated from outside of MD Anderson. Please validate the sender's email address before clicking on links or attachments as they may not be safe. Dear Anne-Cecile If you are actually interested in contact between solid and solid, then you do not need anything else than finding the problem with the 3 functions that you have tried to use. Implementing contact between a 3D solid and a 2D surface is a corner case which will not help you later. The full 3D solid against 3D solid case is well supported in GetFEM and the 3 methods that you mentioned should all work, so let us try to debug your issues with these. Best regards Kostas On Tue, Mar 29, 2022 at 1:37 AM Lesage,Anne Cecile J <ajles...@mdanderson.org<mailto:ajles...@mdanderson.org>> wrote: Dear Konstantinos I shall be able to generate the obs array exteriorly What do you mean by signed distance? I often simulate organs that can move inside a 2D surface cavity So the distance shall have always the same sign isn’t it? I have worked a lot with level sets. So the algorithm distance from a point to a surface (surface being defined by a triangle collection) I know it almost by heart I could implement it in getfem I am aiming to study the source code of getfem these next weeks My principal investigator is requiring that I develop the competence to change getfem So that there is no limit to what I can do Just that I need to refresh my C++ with tutorials Rigid contact is a way to start easy with mastering contact methods in getfem However my ultimate goal is to be able to model contact between two 3D objects but I did not have any success with it My python script lines are those 3 options Option 1 generates a core file Option 2 is not the correct syntax Option 3 takes forever to converge and complains about tetrahedra orientation optslcont=3 print(" optslcont ", optslcont) if optslcont==1: md.add_penalized_contact_between_nonmatching_meshes_brick(mimu3h, "uh", "ub", "penal_r", HEAD_BOUND, BRAIN_BOUND) elif optslcont==2: md.add_integral_contact_between_nonmatching_meshes_brick(mimu3h, "uh", "ub", "penal_r", HEAD_BOUND, BRAIN_BOUND) elif optslcont==3: release_dist = 1. aug_factor = 0.1; md.add_initialized_data('r', aug_factor * Muh * (3*Lambdah + 2*Muh) / (Lambdah + Muh) ) md.add_initialized_data('f_coeff', 0.) md.add_initialized_data('alpha', 1.) ibc = md.add_integral_large_sliding_contact_brick_raytracing('r', release_dist, 'f_coeff', 'alpha', 0) md.add_filtered_fem_variable('multcontactb', mfub, BRAIN_BOUND) md.add_slave_contact_boundary_to_large_sliding_contact_brick(ibc, mimu3b, BRAIN_BOUND, 'ub', 'multcontactb', '') md.add_master_contact_boundary_to_large_sliding_contact_brick(ibc, mimu3h, HEAD_BOUND, 'uh', '') Regards Thank you Anne-Cecile From: Konstantinos Poulios <logar...@googlemail.com<mailto:logar...@googlemail.com>> Sent: Monday, March 28, 2022 5:27 PM To: Lesage,Anne Cecile J <ajles...@mdanderson.org<mailto:ajles...@mdanderson.org>> Cc: getfem-users@nongnu.org<mailto:getfem-users@nongnu.org> Subject: [EXT] Re: rigid contact with arbitrary surface WARNING: This email originated from outside of MD Anderson. Please validate the sender's email address before clicking on links or attachments as they may not be safe. Dear Anne-Cecile A good starting point for modelling contact in GetFEM is this example: https://git.savannah.nongnu.org/cgit/getfem.git/tree/interface/tests/python/demo_static_contact.py<https://urldefense.com/v3/__https:/git.savannah.nongnu.org/cgit/getfem.git/tree/interface/tests/python/demo_static_contact.py__;!!PfbeBCCAmug!wc8N1td17ljT06BFVOR95XSIu5kfttp1QaHlR3sE4g3AM9NpBj14GS59wt6uZn7IJw$> The special thing in your case is that you would like to have contact between a 3D solid and a 2D surface, which AFAIR is a case that is not directly available, but everything is possible. For example if you are interested in small-deformation (i.e. linearized kinematics) then this is how contact is defined, in the demo I gave you above OBS = mfd.eval(obstacle) md.add_initialized_fem_data('obstacle', mfd, OBS) md.add_integral_contact_with_rigid_obstacle_brick(mim_friction, 'u', 'lambda_n', 'obstacle', 'r', GAMMAC, version-4); In your case, "u" will be a displacement variable describing the deformation of the solid, "lambda_n" will be a scalar multiplier defined on the surface of the (deformable) 3D solid, mfd will be a scalar mesh_fem, defined on the same (3D solid) mesh as "u". The only special thing for your case will be how you calculate the array OBS. This array must contain the (signed) distance of every node of (the 3D solid) mesh_fem mfd from your rigid 2D obstacle surface. AFAIR GetFEM does not have a convenience function for calculating the distance between points in a 3D solid mesh and a 2D surface mesh. The raytracing interpolation available in GetFEM allows only to calculate distances from the surface of a 3D solid to the surface of another 3D solid. So unless you find another way to calculate your OBS array, we will need to do some modification in GetFEM to make this easier. Best regards Kostas On Mon, Mar 28, 2022 at 10:48 PM Lesage,Anne Cecile J <ajles...@mdanderson.org<mailto:ajles...@mdanderson.org>> wrote: Dear all Is it possible in getfem to impose a contact with a rigid arbitrary surface defined by a 2D triangle mesh for example? Regards Anne-Cecile The information contained in this e-mail message may be privileged, confidential, and/or protected from disclosure. This e-mail message may contain protected health information (PHI); dissemination of PHI should comply with applicable federal and state laws. If you are not the intended recipient, or an authorized representative of the intended recipient, any further review, disclosure, use, dissemination, distribution, or copying of this message or any attachment (or the information contained therein) is strictly prohibited. If you think that you have received this e-mail message in error, please notify the sender by return e-mail and delete all references to it and its contents from your systems. The information contained in this e-mail message may be privileged, confidential, and/or protected from disclosure. This e-mail message may contain protected health information (PHI); dissemination of PHI should comply with applicable federal and state laws. If you are not the intended recipient, or an authorized representative of the intended recipient, any further review, disclosure, use, dissemination, distribution, or copying of this message or any attachment (or the information contained therein) is strictly prohibited. If you think that you have received this e-mail message in error, please notify the sender by return e-mail and delete all references to it and its contents from your systems. The information contained in this e-mail message may be privileged, confidential, and/or protected from disclosure. This e-mail message may contain protected health information (PHI); dissemination of PHI should comply with applicable federal and state laws. If you are not the intended recipient, or an authorized representative of the intended recipient, any further review, disclosure, use, dissemination, distribution, or copying of this message or any attachment (or the information contained therein) is strictly prohibited. If you think that you have received this e-mail message in error, please notify the sender by return e-mail and delete all references to it and its contents from your systems.