Hello everyone,
I am stumped and could use some assistance. I cannot understand how to define the regions for assigning boundary conditions for a 3D mesh of a cylinder.
The mesh is created as follows:
load “msh3”
load “medit”
// ------ Geometry -------
real d = 3.02.54/100, h = 0.072.54/100;
// Parameters
int nni = 9; // number of elements along circumference (90 degree arc)
int nnr = 7; // number of radial elements
int nnz = 5; // number of elements through the thickness
func zmin = 0;
func zmax = 2*pi;
/* the geometry will be built using radial symmetry.
A square of dimensions d/2xh is rotated about the z axis
The whole thing will then be rotated so the Z-Axis is the through thickness axis
This hopefully will allow sides to be defined for boundary conditions */
// mesh 2D
mesh Th = square(nnr, nnz, [(d/2)x, hy]); // cross section for axial symmetry
// mesh 3D
int[int] rup = [0, 3]; // The element faces on the upper surface,
int[int] rlo = [0, 1]; // The element faces on the lower surface,
int[int] rmid = [0, 4]; // The elements along the axial centerline
func fx = xcos(z);
func fy = xsin(z);
func fz = y;
mesh3 Th3 = buildlayers(Th, 36, zbound=[zmin, zmax], transfo=[fx,fy,fz], labelup = rup, labeldown = rlo, labelmid = rmid);
The 2D rectangular mesh is rotated from the X-Y plane to the X-Z plane, the rotated around the Z axis. I would like to be able to apply boundary conditions to the bottom circular face, the top circular face, and the axial centerline - however this code won’t get me there.
I would really appreciate some advice on how to identify the three regions for defining the boundary conditions.
Thank you immensely.
Ed
