(Deleted) How can I use a gmsh converted mesh of two volumes in simulation of the entire domain (vol 1 + vol 2)?


30
views
0
7 weeks ago by
Hi all,
I am trying to set up a model of a thin spherical shell composed of two distinct parts and different properties to investigate the structure's stresses when exposed to internal pressure.

I am using gmsh to construct a quarter of the sphere to exploit the two symmetry planes:
SetFactory("OpenCASCADE");
//+
Circle(1) = {0, 0, 0, 0.5, 0, Pi};
//+
Dilate {{0, 0, 0}, {.8, .8, .8}} {
  Duplicata { Line{1}; }
}
//+
Line(3) = {1, 3};
//+
Line(4) = {4, 2};
//+
Line Loop(1) = {1, -4, -2, -3};
//+
Plane Surface(1) = {1};
//+
Extrude {{1, 0, 0}, {0, 0, 0}, Pi/2} {
  Surface{1}; 
}
//+
Cone(2) = {.5, 0, 0, -0.5, 0, 0, 0.2, 0, 2*Pi};
//+
Dilate {{0, 0, 0}, {1, 0.5, 1}} {
  Volume{2}; 
}
//+
BooleanDifference{ Volume{1}; }{ Volume{2}; }
//+
BooleanIntersection{ Volume{1}; Delete; }{ Volume{2}; Delete; }​
 I then use
dolfin-convert mesh.msh mesh.xml​

to convert into FEniCS, or better DOLFIN friendly format and, for testing purposes, use the standard elasticity tutorial case with these two modifications:

#mesh = BoxMesh(Point(0, 0, 0), Point(L, W, W), 10, 3, 3)
mesh = Mesh('mesh.xml')​

and

#def clamped_boundary(x, on_boundary):
#   return on_boundary and x[0] < tol

def clamped_boundary(x, on_boundary):
    return on_boundary and x[0] < -0.4​


but get a divergence of the solution with a max displacement of ~10^12.
This is the most reduced version of my problem. If I fuse the two volumes or remove the small conical part in gmsh, the above simulation runs without issue.

Ultimately I would like to use MeshFunction and the functionality of physical volumes in gmsh to identify subdomains to assign BCs in FEniCS but I can't even get past this initial hurdle after a long time of going through documentation, forum entries and such in an attempt to solve it myself but I got nowhere

I thought without using the volume tags the above would still produce one coherent mesh that would be recognized as such, but I must be missing something.
I'm grateful for any hints

I am running FEniCS through Docker

Many thanks already

Markus

Community: FEniCS Project
Please login to add an answer/comment or follow this question.
The thread is closed. No new answer/comment may be added.

Similar posts:
Search »
  • Nothing matches yet.