### How to evaluate an expression on an internal boundary?

239

views

0

Suppose I have a mesh with internal boundary which facets are marked with a MeshFunction. What is the syntax for evaluating an expression on these facets?

From the physical perspective I have some E-field distribution in a simulation with different dielectics. I want to calculate the Maxwell's stress tensor and the force acting on these boundaries that exists at the discontinuities of the dielectric permittivity.

My not ideal ideas are:

1. Extract a SubMesh and then the BoundaryMesh from the sumbesh and define a function on that BoundaryMesh but this seems rather convoluted and I do not know how to go back to the original mesh for further calculations and plotting.

2. I could extract the vertices from the marked facets and manipulate them separately, but then I loose the abstraction of FEniCS Function which would be convenient for further processing.

Thank you,

Marcin

From the physical perspective I have some E-field distribution in a simulation with different dielectics. I want to calculate the Maxwell's stress tensor and the force acting on these boundaries that exists at the discontinuities of the dielectric permittivity.

My not ideal ideas are:

1. Extract a SubMesh and then the BoundaryMesh from the sumbesh and define a function on that BoundaryMesh but this seems rather convoluted and I do not know how to go back to the original mesh for further calculations and plotting.

2. I could extract the vertices from the marked facets and manipulate them separately, but then I loose the abstraction of FEniCS Function which would be convenient for further processing.

Thank you,

Marcin

Community: FEniCS Project

### 1 Answer

1

Please login to add an answer/comment or follow this question.

I am very interested in also calculating the stress tensor but have problems with the notation in fenics.

I would greatly appreciate if you could give a simple example, maybe related to the poisson-tutorials?!

Thank you in advance,

HoWil