All of these things are possible in FEniCSx. I’m not aware of an example in 2D, although there may be one out there somewhere. For a 3D example, you could see my post here. It should be fairly straightforward to adapt to 2D. You’ll need to:
- Change the mesh (obviously) from the 3D mesh generated by
create_box
to something 2D. In order to model the holes and components, you’ll probably want to use Gmsh. - Change the weak forms
k_form
andm_form
from the solid-type formulation to a shell-type formulation.
You may also be interested in another of my posts which describes how to model a distributed mass, although it is written for old FEniCS, not FEniCSx. (This might be useful for modeling the added mass of a component placed on the board.)