123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106 |
- /* This file is part of Lemma, a geophysical modelling and inversion API.
- * More information is available at http://lemmasoftware.org
- */
-
- /* This Source Code Form is subject to the terms of the Mozilla Public
- * License, v. 2.0. If a copy of the MPL was not distributed with this
- * file, You can obtain one at http://mozilla.org/MPL/2.0/.
- */
-
- /**
- * @file
- * @date 02/04/2016 02:58:54 PM
- * @version $Id$
- * @author Trevor Irons (ti)
- * @email tirons@egi.utah.edu
- * @copyright Copyright (c) 2016, University of Utah
- * @copyright Copyright (c) 2016, Lemma Software, LLC
- */
-
- radius = 3.25; // Radius of the damn thing
- blc = radius/2; // 0.25; // Target element size
- Box = 3*radius; // The down side of potential
- lc = radius/10; // toroid characteristic length
-
- ts = 1; // height of toroid
- tx = radius; // radial width of toroid, measured in centre of ring
- tl = 0; // centre of rotation
-
- // Total Solution Space
- X0 = -Box;
- X1 = Box;
- Y0 = -Box;
- Y1 = Box;
- Z0 = -Box;
- Z1 = Box;
- /////////////////////////////////////
- // Large Bounding box
- pp = newp;
- Point(pp) = {X0, Y0, Z0, blc};
- Point(pp+1) = {X1, Y0, Z0, blc};
- Point(pp+2) = {X1, Y1, Z0, blc};
- Point(pp+3) = {X0, Y1, Z0, blc};
-
- lv = newl;
- Line(lv) = {pp,pp+1};
- Line(lv+1) = {pp+1,pp+2};
- Line(lv+2) = {pp+2,pp+3};
- Line(lv+3) = {pp+3,pp};
- Line Loop(lv+4) = {lv, lv+1, lv+2, lv+3};
-
- bs = news;
- Plane Surface(bs) = {lv+4};
- v[] = Extrude {0, 0, Z1-Z0} { Surface{bs}; };
-
- tpp = newp;
- Point(tpp ) = { tx, 0, 0, lc};
- Point(tpp+1) = { ts+tx, 0, 0, lc};
- Point(tpp+2) = { tx, ts, 0, lc};
- Point(tpp+3) = { tx, -ts, 0, lc};
- Point(tpp+4) = {-ts+tx, 0, 0, lc};
-
- cc = newc;
- Circle(cc ) = {tpp+1, tpp, tpp+2};
- Circle(cc+1) = {tpp+2, tpp, tpp+4};
- Circle(cc+2) = {tpp+4, tpp, tpp+3};
- Circle(cc+3) = {tpp+3, tpp, tpp+1};
-
- ll = newll;
- Line Loop(ll) = {cc, cc+1, cc+2, cc+3};
- rs = news;
- Ruled Surface (rs) = {ll};
- //Surface Loop(rs) = {ll};
-
- ps = news;
- Plane Surface(ps) = {ll};
-
- tv1[] = Extrude {{0, 1, 0},{-tl,0,0}, 2*Pi/3} { Surface{ps}; };
- //tv2[] = Extrude {{0, 1, 0},{-tl,0,0}, 2*Pi/3} { Surface{28}; };
- //tv3[] = Extrude {{0, 1, 0},{-tl,0,0}, 2*Pi/3} { Surface{50}; };
- //Extrude Surface {ps, {0,1,0}, {-tl,0,0}, 2*Pi/3};// { Recombine ;};
- //Extrude Surface {28, {0,1,0}, {-tl,0,0}, 2*Pi/3}; //{Layers{10,73,1};};
- //Extrude Surface {50, {0,1,0}, {-tl,0,0}, 2*Pi/3}; //{Layers{10,73,1};};
-
-
- /* Make a list of a ring (annulus) of surfaces around the hole */
- //allParts[] = {tv1[1], tv2[1], tv3[1]};
-
- /* Make surfaces to be meshed by transfinite algorithm */
- //Transfinite Surface {allParts[]};
-
- /* The "Recombine Surface" command is issued in order to
- * crate quadrilateral elements.
- */
- //Recombine
- //Surface {allParts[1]};
-
- // Extrude Surface {12, {0,0,1}, {0,0,0}, 2*Pi/3} {
- // Recombine ; Layers { 6, 54, 1 } ;
- // } ;
-
-
- //Surface{ ll+1 } In Volume{v[1]};
- //Surface{cc} In Volume{v[1]};
- Surface{tv1[0]} In Volume{v[1]};
- //Surface{t3[0]} In Volume{v[1]};
- Physical Volume(1) = {v[1]};
|