The geometry that will be solved in this example is indicated in Figure 1. ![]() In this case the tool that will be used is called GMsh, although it is also possible to use more general CAD software to define the geometry which will be demonstrated in future posts specifically for 3D problems. The finite-element method allows the solution of these problems for more complex geometries too, and this will be the focus of this post.įEniCS has the ability to import a mesh, this means that it is possible to define the geometry of a problem and generate a mesh using external tools. That particular geometry was chosen for two reasons first was because it is a simple problem for which there is a well known analytical formula and second because it allowed the mesh to be generated from within FEniCS as it was just a rectangle. All codes including geo file are posted.PIn the previous post the Laplace equation was solved between two infinite parallel plates subject to certain boundary conditions using FEniCS. To sum up the story, I want to understand how to successfully imply load on a point, or an edge of the cantilever beam when the code is imported from gmsh. Now, according to what I understand, this should have worked, but it doesn't. I also defined the edge on free end as a 'physical line' to try loading an edge. However, things are not clear when importing the mesh from gmsh.Ģ) To apply a point load on free end - I defined one of the corner vertices on the free end of beam as a 'physical point' in gmsh. I used this approach successfully for a beam mesh defined in Fenics itself (code posted in repository). I understand that DOLFIN predefines the “measures” dx, ds and dS representing integration over cells, exterior facets (that is, facets on the boundary) and interior facets, respectively. So we would represent this in variational form as: a = dot(grad(v), sigma(U))*dx with subdomains:įrom what I learnt from the variational formulation shown above, for the elasticity problem, I would need to define boundaries as ' ds' on the RHS, and tag them to apply force or displacement selectively on a boundary. I came across THIS example of solving Poisson eqn. Regards answered by multigrid202 FEniCS User ( 3,780 points) If you then post those files here, it will be much easier for me to help. one example for neumann conditions, one example for volume conditions, etc. But firstI suggest that you split your problem up into several minimum examples, each containing only one of the problems that you are working on, i.e. ![]() geo file in gmsh, add a few faces in one of the corners and then use those to define a volume. If you decide that you realy need them (from gmsh input), then you should try to define something other than the whole cube as your volume. I sometimes do, but never from gmsh input. In my opinion, it would make sense to first figure out if you actually need volume boundary conditions. So you would be applying specific displacements to the whole cube, which makes using a finite element code kindof pointless, because there is nothing left to solve. geo file, you only define a single volume, i.e. This is ok from a mathematical point of view, but I'm not sure why you want to do it. Is there a reason, why you want to apply boundary conditions to a volume. L = inner(force, w)*ds(4, domain=mesh, subdomain_data=boundaries)įor Dirichlet conditions, your approach seems ok. forces), I do boundaries = MeshFunction("uint", mesh, mesh_input_file_base +"_facet_region.xml ") If I want to impose a load on the top EDGE of the beam (which I have defined as a physical edge above) can I code it like this? boundaries = MeshFunction("size_t", mesh, "beam_facet_region.xml") I saw this being implemented in linear elasticity (Fig 26.2) of Fenics Book.īc2 = DirichletBC(V, u2, DomainBoundary())ĭoes this return the entire boundary of the domain, i.e, all edges in case of 2D and the entire volume in case of 3D)? Please shed some light on inbuilt function DomainBoundary() in Fenics. Should I use CellFunction in the above statement?īc1 = DirichletBC(V, u1, boundaries, 2) #boundary condition for boundary (face of cube)īc2 = DirichletBC(V, u2, subdomains, 0) #boundary condition for volume ![]() Subdomains = MeshFunction("size_t", mesh, "beam_physical_region.xml") Should I use Facetfunction in the above statement? I believe that to impose Drichlet BC on a physical surface and volume, I can do the following: mesh = Mesh("beam.xml")īoundaries = MeshFunction("size_t", mesh, "beam_facet_region.xml") So, I have a unit cube in gmsh with the following physical surfaces and volumes: Physical Surface(0) = /Upper edge of right face of cantilever beam I have been though the following link and even participated on the discussion in there, but I am confused as to how to enforce boundary condition on physical volume.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |