How to mark circumferential slice of my domain

24 days ago by
Hi there ,

I have a truncated ellipsoid (cup shape with open top) mesh as my domain. I am using it to solve a nonlinear elasticity problem. I have segregated and marked the base , the inner boundary and the outer boundary through following code:-

mesh = Mesh('abc.xml')
a1 = 0.02 + 0.013 	; c1 = 0.06 + 0.01	# m (principal axes for big)
a2 = 0.02  			; c2 = 0.06 		# m (principal axes for small)

# Marking boundaries 
class Outer(SubDomain): 			
	def inside(self, x, on_boundry):
		return on_boundry

class Inner(SubDomain): 			
	def inside(self, x, on_boundry):
		return (x[0]*x[0]+x[2]*x[2] < (a2*a2)*(1.0-(x[1]*x[1])/(c2*c2)) + 1e-7) and on_boundry

class Top(SubDomain): 		
	def inside(self, x, on_boundry):
		return (x[1] > -1e-7) and on_boundry

def Make_SubDomains(mesh):
	mf = FacetFunction("size_t", mesh)
	Outer().mark(mf, 40)  		                # Outside
	Inner().mark(mf, 30)		                # Inside
	Top().mark(mf,10) 				# Base/Top
	for facet in facets(mesh):, mf[facet]), 2)

	return mf

I want to mark a circumferential slice in the middle portion of my domain (which is a truncated ellipsoid or simply a cup shape feature) .
Can any one guide .. how can i do that ? .

Community: FEniCS Project
Please login to add an answer/comment or follow this question.

Similar posts:
Search »