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. #FENICS AND GMSH CODE#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 #FENICS AND GMSH HOW TO#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 |