Skip to content

Element layers not mantained in the 3D mesh

Hello,

Here's my script:

`SetFactory("OpenCASCADE");

s=0.01;

//Well 01

Point(2) = {0, 0, 0, s};

Point(3) = {0, 60, 0, s};

Point(5) = {60, -40, 0, s};

Point(6) = {-60, -40, 0, s};

Line(1) = {2, 3};

Line(2) = {2, 6};

Line(3) = {6, 3};

Line(4) = {5, 3};

Line(5) = {5, 2};

Line(6) = {6, 5};

//Top well

Line Loop(1) = {3, 1, 2};

Plane Surface(1) = {1};

Line Loop(2) = {5, 1, 4};

Plane Surface(2) = {2};

Line Loop(3) = {6, 5, 2};

Plane Surface(3) = {3};

Extrude {0, 0, -3500} { Surface{3}; Surface{2}; Surface{1}; Layers{8}; }

//Well 02

Point(1) = {707, 707, 0, s};

Point(20) = {707, 767, 0, s};

Point(21) = {767, 667, 0, s};

Point(22) = {647, 667, 0, s};

Line(17) = {20, 1};

Line(18) = {1, 21};

Line(19) = {21, 20};

Line(20) = {20, 22};

Line(21) = {22, 1};

Line(22) = {22, 21};

Line Loop(14) = {20, 21, 17};

Plane Surface(13) = {14};

Line Loop(15) = {18, 19, 17};

Plane Surface(14) = {15};

Line Loop(16) = {22, 18, 21};

Plane Surface(15) = {16};

Extrude {0, 0, -3500} { Surface{15}; Surface{13}; Surface{14}; Layers{8}; }

//Box model

Point(27) = {5000, 5000, 0, s};

Point(28) = {-5000, -5000, 0, s};

Point(29) = {5000, -5000, 0, s};

Point(30) = {-5000, 5000, 0, s};

Line(33) = {28, 30};

Line(34) = {27, 30};

Line(35) = {28, 29};

Line(36) = {29, 27};

Line Loop(26) = {34, -33, 35, 36};

Plane Surface(25) = {26};

Extrude {0, 0, -3450} { Surface{25}; }

Extrude {0, 0, -100} { Surface{30}; }

Extrude {0, 0, -100} { Surface{35}; Layers{1}; }

Extrude {0, 0, -100} { Surface{40}; Layers{1}; }

Extrude {0, 0, -1000} { Surface{45}; Layers{2}; }

BooleanFragments { Volume{7,8}; Delete; }{ Volume{1:6}; Delete; }

//Lateral surface

Physical Surface(1) = {48, 56, 84, 38, 43};

//Top surface

Physical Surface(2) = {54};

//Well01 Injection

Physical Surface(3) = {72, 76, 79};

//Well02 Production

Physical Surface(4) = {70, 67, 63};

//Bottom surface

Physical Surface(5) = {50};

//Lateral surface

Physical Surface(6) = {49, 44, 39, 82, 52};

//Lateral surface

Physical Surface(7) = {46, 41, 36, 81, 51};

//Lateral surface

Physical Surface(8) = {47, 42, 37, 83, 53};

//Caprockout

Physical Volume(1) = {12};

//Basement

Physical Volume(2) = {11};

//ReservoirLayer3

Physical Volume(3) = {10};

//ReservoirLayer2

Physical Volume(4) = {9};

//ReservoirLayer3

Physical Volume(5) = {19};

//Well01

Physical Volume(6) = {24};

Physical Volume(7) = {23};

Physical Volume(8) = {25};

Physical Volume(9) = {16};

Physical Volume(10) = {17};

Physical Volume(11) = {18};

//Well02

Physical Volume(12) = {13};

Physical Volume(13) = {14};

Physical Volume(14) = {15};

Physical Volume(15) = {20};

Physical Volume(16) = {21};

Physical Volume(17) = {22};

Mesh.Algorithm = 1;

Mesh.Algorithm3D= 1;

Mesh.RecombinationAlgorithm = 0;

Mesh.CharacteristicLengthMin = 200;

Mesh.CharacteristicLengthMax = 5000;

`

I assign 8 as number of elements' layers to the wells structure(the prisms embedded in the box model), but the 3D mesh contains only 2 layers of elements in the prisms while the box has more layers. How can I fix it? I also tried to set the element layers in the box model, but it ends with errors.

Thank you.

Edited by ML