[Top][All Lists]

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

Re: compute node normal on exterior surface of mesh

From: Konstantinos Poulios
Subject: Re: compute node normal on exterior surface of mesh
Date: Fri, 4 Feb 2022 09:37:16 +0100

Dear Anne-Cecile

It is easy to get averaged normals on a mesh_fem:

m=gf.Mesh("load", "ladder.mesh")
mf.export_to_vtu("normals.vtu", mf, U, "Normals")


you can then interpolate U on some given points with computer_interpolate_on.

However, I would rather recommend a solution with faces rather than points. Averaging unit vectors leads in general to non-unit vectors. Moreover, points in general do not make sense in a physical world. Surfaces and volumes do. I would recommend you to use the outer_faces_with_direction function. For example with


you can define a region with outer normals pointing approximately in the positive Y direction.

Best regards

On Thu, Feb 3, 2022 at 12:22 AM Lesage,Anne Cecile J <> wrote:

Dear all


I see in the python documentation that  the mesh class has a function normal_of_face


I would like to compute the mean normal at node points (mean of the faces normal to which this point belong) on the exterior surface of the mesh

I have the list of those points id


This is to do a direction test for setting boundary conditions


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]