<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Good Afternoon,
<div class=""><br class="">
</div>
<div class="">I am having issues with meshing a certain model. The model is a cube within a cube, however the smaller cube is not fully contained within the larger cube. Instead, only one of the surfaces of the smaller cube can be seen (see image attached,
 this shows a clip of the model). Each cube is then defined as a separate volume, so 2 volumes - Large cube minus the small cube (blue in image), and small cube (red in image).</div>
<div class=""><br class="">
</div>
<div class="">The problem I am having is when both volumes are present, the meshing isn’t working for me. The surface mesh looks fine, but the volume mesh is too coarse. I can mesh both volumes independently ok. However when both volumes are present the meshing
 isn’t working. Below is the script I have used. I first define all the planes that make up the small cube. Then I define the planes to make the larger volume (large cube - small cube). Note that Plane Surface(41) is where the top surface of the small cube
 is subtracted. The large volume is then made, and then the small cube.</div>
<div class=""><br class="">
</div>
<div class="">
<div class="">Geometry.AutoCoherence=0;</div>
<div class="">Lc1 = 0.05;</div>
<div class="">Lc2 = 0.5;</div>
<div class="">Point(1)={0.5,0.5,0, Lc1};</div>
<div class="">Point(2)={0.5,1.5,0, Lc1};</div>
<div class="">Point(3)={1.5,1.5,0, Lc1};</div>
<div class="">Point(4)={1.5,0.5,0, Lc1};</div>
<div class="">Line(1)={1,2};</div>
<div class="">Line(2)={2,3};</div>
<div class="">Line(3)={3,4};</div>
<div class="">Line(4)={4,1};</div>
<div class="">Line Loop(1)={1,2,3,4};</div>
<div class="">Plane Surface(1)={1};</div>
<div class="">Point(5)={0.5,0.5,1, Lc1};</div>
<div class="">Point(6)={0.5,1.5,1, Lc1};</div>
<div class="">Point(7)={1.5,1.5,1, Lc1};</div>
<div class="">Point(8)={1.5,0.5,1, Lc1};</div>
<div class="">Line(5)={5,6};</div>
<div class="">Line(6)={6,7};</div>
<div class="">Line(7)={7,8};</div>
<div class="">Line(8)={8,5};</div>
<div class="">Line Loop(2)={5,6,7,8};</div>
<div class="">Plane Surface(2)={2};</div>
<div class="">Line(9)={1,5};</div>
<div class="">Line(10)={6,2};</div>
<div class="">Line(11)={2,1};</div>
<div class="">Line Loop(3)={9,5,10,11};</div>
<div class="">Plane Surface(3)={3};</div>
<div class="">Line(12)={3,7};</div>
<div class="">Line(13)={7,6};</div>
<div class="">Line Loop(4)={2,12,13,10};</div>
<div class="">Plane Surface(4)={4};</div>
<div class="">Line(14)={8,4};</div>
<div class="">Line(15)={4,3};</div>
<div class="">Line Loop(5)={12,7,14,15};</div>
<div class="">Plane Surface(5)={5};</div>
<div class="">Line(16)={5,8};</div>
<div class="">Line Loop(6)={14,4,9,16};</div>
<div class="">Plane Surface(6)={6};</div>
<div class=""><br class="">
</div>
<div class="">Point(41)={0.1,0.1,0, Lc2};</div>
<div class="">Point(42)={0.1,1.9,0, Lc2};</div>
<div class="">Point(43)={1.9,1.9,0, Lc2};</div>
<div class="">Point(44)={1.9,0.1,0, Lc2};</div>
<div class="">Line(41)={41,42};</div>
<div class="">Line(42)={42,43};</div>
<div class="">Line(43)={43,44};</div>
<div class="">Line(44)={44,41};</div>
<div class="">Line Loop(41)={41,42,43,44};</div>
<div class="">Plane Surface(41)={41,-1};</div>
<div class="">Point(45)={0.1,0.1,1.1, Lc2};</div>
<div class="">Point(46)={0.1,1.9,1.1, Lc2};</div>
<div class="">Point(47)={1.9,1.9,1.1, Lc2};</div>
<div class="">Point(48)={1.9,0.1,1.1, Lc2};</div>
<div class="">Line(45)={45,46};</div>
<div class="">Line(46)={46,47};</div>
<div class="">Line(47)={47,48};</div>
<div class="">Line(48)={48,45};</div>
<div class="">Line Loop(42)={45,46,47,48};</div>
<div class="">Plane Surface(42)={42};</div>
<div class="">Line(49)={41,45};</div>
<div class="">Line(50)={46,42};</div>
<div class="">Line(51)={42,41};</div>
<div class="">Line Loop(43)={49,45,50,51};</div>
<div class="">Plane Surface(43)={43};</div>
<div class="">Line(52)={43,47};</div>
<div class="">Line(53)={47,46};</div>
<div class="">Line Loop(44)={42,52,53,50};</div>
<div class="">Plane Surface(44)={44};</div>
<div class="">Line(54)={48,44};</div>
<div class="">Line(55)={44,43};</div>
<div class="">Line Loop(45)={52,47,54,55};</div>
<div class="">Plane Surface(45)={45};</div>
<div class="">Line(56)={45,48};</div>
<div class="">Line Loop(46)={54,44,49,56};</div>
<div class="">Plane Surface(46)={46};</div>
<div class="">Surface Loop(1)={41,42,43,44,45,46,2,3,4,5,6};</div>
<div class="">Volume(1)={1};</div>
<div class="">Physical Volume(1)={1};</div>
<div class=""><br class="">
</div>
<div class="">Surface Loop(2)={1,2,3,4,5,6};</div>
<div class="">Volume(2)={2};</div>
<div class="">Physical Volume(2)={2};</div>
<div class=""><br class="">
</div>
<div class="">Field[1] = MathEval;</div>
<div class="">Field[1].F = "0.5";</div>
<div class="">Field[2] = Restrict;</div>
<div class="">Field[2].IField = 1;</div>
<div class="">Field[2].RegionsList = {1};</div>
<div class="">Field[3] = MathEval;</div>
<div class="">Field[3].F = "0.5";</div>
<div class="">Field[4] = Restrict;</div>
<div class="">Field[4].IField = 3;</div>
<div class="">Field[4].EdgesList = {41:56};</div>
<div class="">Field[4].FacesList = {41:46};</div>
<div class=""><br class="">
</div>
<div class="">Field[5] = MathEval;</div>
<div class="">Field[5].F = "0.05";</div>
<div class="">Field[6] = Restrict;</div>
<div class="">Field[6].IField = 5;</div>
<div class="">Field[6].RegionsList = {2};</div>
<div class="">Field[7] = MathEval;</div>
<div class="">Field[7].F = "0.05";</div>
<div class="">Field[8] = Restrict;</div>
<div class="">Field[8].IField = 7;</div>
<div class="">Field[8].EdgesList = {1:16};</div>
<div class="">Field[8].FacesList = {1:6};</div>
<div class=""><br class="">
</div>
<div class="">Field[9] = Min;</div>
<div class="">Field[9].FieldsList = {2,4,6,8};</div>
<div class="">Background Field = 9;</div>
<div class="">Mesh.CharacteristicLengthExtendFromBoundary = 0.;</div>
<div class="">Coherence;</div>
</div>
<div class=""><br class="">
</div>
<div class=""><br class="">
</div>
<div class="">Any help you may be able to give me would be greatly appreciated.</div>
<div class=""><br class="">
</div>
<div class="">Kind Regards,</div>
<div class=""><br class="">
</div>
<div class="">Richard</div>
<div class=""><br class="">
</div>
<div class=""><img height="534" width="529" apple-width="yes" apple-height="yes" apple-inline="yes" id="3CAA56CB-8A9B-44AA-AA20-1A662227C400" src="cid:DE0E2E8D-F682-49AA-B0A1-02867F33CFD1@shef.ac.uk" class=""></div>
<div class=""><br class="">
</div>
</body>
</html>