### How to give complex boundary conditions for 3D problem

189
views
0
4 months ago by
hi,
I want to know how to implement the boundary conditons for 3d problem. All the demos tell about 2d or some simple 3D problem.
For the 3d problem, how could i implement the boundary conditons. In an other word, how to label different boudnaries.
mesh = Mesh("yourmeshfile.xml")
subdomains = MeshFunction("size_t", mesh, "yourmeshfile_physical_region.xml")
​
The exaplem code above told us how to implement the boundaries.
Do we have some exaplems of the boundarie mesh ?

Best,
Hamilton
Community: FEniCS Project
GMESH can generate 3D mesh, and we can transfer the mesh into .xml by command "dolfin-convert", however, the mesh file does not contain the boundary information.
written 4 months ago by Hamilton

1
4 months ago by
You can apply boundaries in Gmesh using Physical Surface or Physical plane command, when you use dolfin-convert it will output the physical_region.xml file. In Gmesh you specify Physical Surface as 1 or 2 and so on, and in Fenics you call to it in the same manner (I.e. a  boundary 1, 2 etc). Just make sure to start numbering them from 1.

A discussion on this:

https://fenicsproject.org/qa/7853/defining-physical-applying-cantilever-linear-elasticity

How to get it in to hdf format for parallel processing.

https://github.com/nschloe/meshio/issues/43