[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: brain anatomy boundary conditions

From: Konstantinos Poulios
Subject: Re: brain anatomy boundary conditions
Date: Fri, 19 Nov 2021 00:11:13 +0100

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);

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


On Thu, Nov 18, 2021 at 9:37 PM Lesage,Anne Cecile J <> wrote:

Dear all


To describe a brain geometrical space contrains, I have three meshes part in my python script






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





# 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




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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]