How to give complex boundary conditions for 3D problem

10 months ago by
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 ?

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 10 months ago by Hamilton  

1 Answer

10 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:

How to get it in to hdf format for parallel processing.
Please login to add an answer/comment or follow this question.

Similar posts:
Search »