5/16/2023 0 Comments Define internal surfaces gmshI 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 Traction = Vec((0.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. T = timestep # actual time (used for evaluating d-bndc) Print("\n Starting Netwon iterations:\n") # states - one for each integration point One array for each cell, where each element is an array of material. K = create_sparsity_pattern(dh) # tangent stiffness matrix Δu = zeros(n_dofs) # displacement correction N_dofs = ndofs(dh) # total number of dofs Info : Done reading 'C:\Users\prash\AppData\Local\Temp\jl_GuAloP\mesh.msh'īoundsError: attempt to access 0×0 SparseMatrixCSC() # Linear tet with 2 unknowns/nodĭh = create_dofhandler(grid, interpolation) # JuaFEM helper functionĭbcs = create_bc(dh, grid) # create Dirichlet boundary-conditionsĬellvalues, facevalues = create_values(interpolation) Info : Reading 'C:\Users\prash\AppData\Local\Temp\jl_GuAloP\mesh.msh'. Info : Done writing 'C:\Users\prash\AppData\Local\Temp\jl_GuAloP\mesh.msh' Info : Writing 'C:\Users\prash\AppData\Local\Temp\jl_GuAloP\mesh.msh'. Info : Meshing surface 1 (Plane, Frontal-Delaunay) It would really helpful if someone could find a possible solution for this case. I have posted screenshots of error and also where the error statements have come from. I ran into this error and I was unable to overcome this and find some possible ways to get out of this situation. I was creating a small variation for a project that I am working for J2Plasticity.
0 Comments
Leave a Reply. |