-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
770f25c
commit 9828400
Showing
8 changed files
with
328 additions
and
2,882 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,41 @@ | ||
SetFactory("OpenCASCADE"); | ||
gridsize = 100/3; | ||
|
||
// Face | ||
// -- Points | ||
Point(1) = {0,0,0,gridsize}; | ||
Point(2) = {0,0,100,gridsize}; | ||
Point(3) = {0,100,100,gridsize}; | ||
Point(4) = {0,100,0,gridsize}; | ||
|
||
// -- Line | ||
Line(5) = {1,2}; | ||
Line(6) = {2,3}; | ||
Line(7) = {3,4}; | ||
Line(8) = {4,1}; | ||
Line Loop(9) = {5,6,7,8}; | ||
|
||
// -- Surface | ||
Plane Surface(10) = {9}; | ||
Recombine Surface{10}; | ||
|
||
// Extrude to 3D | ||
bodyExtrusion[] = | ||
Extrude { 100,0,0 } | ||
{ | ||
Surface{10}; | ||
Layers{100/gridsize}; | ||
Recombine; | ||
}; | ||
|
||
// Boundaries | ||
Physical Surface("back") = {10}; | ||
Physical Surface("right") = {bodyExtrusion[2]}; | ||
Physical Surface("top") = {bodyExtrusion[3]}; | ||
Physical Surface("left") = {bodyExtrusion[4]}; | ||
Physical Surface("bottom") = {bodyExtrusion[5]}; | ||
Physical Surface("front") = {bodyExtrusion[0]}; | ||
|
||
// Volume | ||
Physical Volume("mesh") = {bodyExtrusion[1]}; | ||
// Hexahedral cube mesh | ||
|
||
Point(1) = {0, 0, 0, 1.0}; | ||
Point(2) = {1, 0, 0, 1.0}; | ||
Point(3) = {1, 1, 0, 1.0}; | ||
Point(4) = {0, 1, 0, 1.0}; | ||
|
||
Characteristic Length {:} = 0.25; | ||
|
||
Line(1) = {1, 2}; | ||
Line(2) = {2, 3}; | ||
Line(3) = {3, 4}; | ||
Line(4) = {4, 1}; | ||
|
||
Curve Loop(1) = {1, 2, 3, 4}; | ||
Plane Surface(1) = {1}; | ||
Transfinite Surface {1}; | ||
|
||
Recombine Surface {1}; | ||
out[] = Extrude {0, 0, 1} { Surface{1}; Layers{4}; Recombine; }; | ||
|
||
Physical Volume(1) = {out[1]}; | ||
Physical Surface(1) = {1}; // back | ||
Physical Surface(2) = {out[5]}; // front | ||
Physical Surface(3) = {out[4]}; // left | ||
Physical Surface(4) = {out[2]}; // right | ||
Physical Surface(5) = {out[0]}; // bottom | ||
Physical Surface(6) = {out[3]}; // top | ||
|
||
Mesh 3; | ||
Coherence Mesh; | ||
Mesh.MshFileVersion = 2.2; | ||
|
||
/* | ||
Physical Surface: | ||
back => 1 | ||
bottom => 13 => out[0] | ||
right => 17 => out[2] | ||
top => 21 => out[3] | ||
left => 25 => out[4] | ||
front => 26 => out[5] | ||
*/ |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.