Dear Konstantinos I had to add the definition of EDGE_RG Is it correct to give it an integer value like a boundary condition label?
Thank you Regards Anne-Cecile From: Konstantinos Poulios <[email protected]> Sent: Friday, November 19, 2021 3:19 AM To: Lesage,Anne Cecile J <[email protected]> Cc: [email protected] Subject: [EXT] Re: brain anatomy boundary conditions 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. I just had a mistake in the order of the Interpolate arguments, it should be md.add_interpolate_transformation_from_expression("head_to_tf", meshh, meshtf, "X") md.add_filtered_fem_variable("multmortar", mfutf, EDGE_RG) md.add_nonlinear_generic_assembly_brick(mim, "(u_tf-Interpolate(u_head, head_to_tf)).multmortar", EDGE_RG) On Fri, Nov 19, 2021 at 12:11 AM Konstantinos Poulios <[email protected]<mailto:[email protected]>> wrote: There are different ways to bind a surface mesh to a volume mesh. If your meshes are conformal, i.e. sharing nodes along the interface, you can merge all meshes into one mixed mesh and create a mesh_fem on the combined mesh. The following example shows a mesh_fem defined on a mixed mesh with common nodes between surface and volume elements: import getfem as gf m0 = gf.Mesh('cartesian',[0,1,2,3],[0,1,2],[-1,0]) m0.add_convex(gf.GeoTrans('GT_QK(2,1)'),[[0,0,-.8, -1], [0,1, 0,1.1], [0,0, 0, 0]]) mf0 = gf.MeshFem(m0); mf0.set_classical_fem(1) mf0.export_to_vtk('mixed_mesh.vtk','ascii') print(mf0.nbdof()) The other approach, which is more general is to keep the separate meshes and implement a mortar condition between the edge of the surface mesh and the volume mesh. To implement such a condition you will need to define a multiplier and an interpolation operation between the two domains with something like md.add_interpolate_transformation_from_expression("head_to_tf", meshh, meshtf, "X") md.add_filtered_fem_variable("multmortar", mfutf, EDGE_RG) md.add_nonlinear_generic_assembly_brick(mim, "(u_tf-Interpolate(head_to_tf,u_head)).multmortar", EDGE_RG) Haven't tested it but conceptually it should work BR Kostas On Thu, Nov 18, 2021 at 9:37 PM Lesage,Anne Cecile J <[email protected]<mailto:[email protected]>> wrote: Dear all To describe a brain geometrical space contrains, I have three meshes part in my python script meshb=gf.Mesh('import','gid','brainr25tet4h5.GiD.msh') meshtf=gf.Mesh('import','gid','tentoriumfalxr25h5.GiD.msh') meshh=gf.Mesh('import','gid','headr25tet4h5.GiD.msh') meshb and mesh are 3d and meshtf is a fine membrane described by a triangle mesh surface mesh and meshtf are attached at several places (nodes in common), how do I ensure that the fem takes this boundary condition in account? To set up that the brain is sliding without friction inside the head, I wrote the following python lines fbb = meshb.outer_faces() # Boundary of the brain fbh = meshh.outer_faces() # Boundary of the head HEAD_BOUND = 1; BRAIN_BOUND = 2; # selection of faces for contact condition meshh.set_region(HEAD_BOUND, fbh) meshb.set_region(BRAIN_BOUND, fbb) md.add_penalized_contact_between_nonmatching_meshes_brick(mim3h, uh, ub, datanamer, HEAD_BOUND, BRAIN_BOUND, 1, lambda1_n) Is it a good option? How to choose the parameters datanamer and lambda1? I would like the brain to slide along the whole meshtf. How to define a set of faces that contains the entire triangles mesh? Thank you 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.
