<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:'Times New Roman',Times,serif;" dir="ltr">
<p>Hello Ruth,</p>
<p><br>
</p>
<p>Yes, changing the mesh size worked in my computer . Thank you very much. I have another small question, in case </p>
<p>I want to include both surface and volume in boolean fragments , it is possible , something like this </p>
<p><br>
</p>
<p></p>
<div>aa() = BooleanFragments{ Volume{1}; Delete; }{ Volume{2,3,4,5}; Surface{170,180,190,210,211,212}; Delete;};</div>
<div><br>
</div>
I want to include both cylinders and a surfaces on each face. However , gmsh says surfaces 170-212 are Unknown.
<p></p>
<p>Please let me know !</p>
<p><br>
</p>
<p>Full code below : </p>
<p><br>
</p>
<p></p>
<div>SetFactory("OpenCASCADE");</div>
<div>Mesh.Algorithm3D = 4; // 3D mesh algorithm (1=Delaunay, 4=Frontal, 5=Frontal Delaunay, 6=Frontal Hex, 7=MMG3D, 9=R-tree)</div>
<div>R = 0.01;</div>
<div>R1 = 0.05;</div>
<div>w = R;</div>
<div>Box(1) = {-R1,-R1,-R1, 2*R1,2*R1,2*R1};</div>
<div><br>
</div>
<div>Cylinder(2) = {0, 0, -0.9*R1, 0, 0, 1.6*R1, 0.2*R, 2*Pi}; // inner cylinder</div>
<div>Cylinder(3) = {0, 0, -0.9*R1, 0, 0, 1.6*R1, 0.25*R, 2*Pi}; // inner cylinder</div>
<div>Cylinder(4) = {0, 0, -0.9*R1, 0, 0, 1.6*R1, 0.9*R, 2*Pi}; // inner cylinder</div>
<div>Cylinder(5) = {0, 0, -0.9*R1, 0, 0, 1.6*R1, 1*R, 2*Pi}; //outer cylinder</div>
<div><br>
</div>
<div>//----------------------------------------------------------------------------------</div>
<div><br>
</div>
<div>q = 0.005;</div>
<div><br>
</div>
<div>/* Right electrode */</div>
<div>RE = 300;</div>
<div><br>
</div>
<div>Point(RE+1) = { R1, R1/2, R1/2, q};</div>
<div>Point(RE+2) = { R1, -R1/2, R1/2, q};</div>
<div>Point(RE+3) = { R1, -R1/2, -R1/2, q};</div>
<div>Point(RE+4) = { R1, R1/2, -R1/2, q};</div>
<div>Line(RE+13) = {RE+4, RE+1};</div>
<div>Line(RE+14) = {RE+1, RE+2};</div>
<div>Line(RE+15) = {RE+2, RE+3};</div>
<div>Line(RE+16) = {RE+3, RE+4};</div>
<div>Line Loop(RE+7) = {RE+16, RE+13, RE+14, RE+15};</div>
<div>Plane Surface(170) = {RE+7};</div>
<div><br>
</div>
<div>/* Left electrode */</div>
<div><br>
</div>
<div>RE = 400;</div>
<div><br>
</div>
<div>Point(RE+1) = { -R1, R1/2, R1/2, q};</div>
<div>Point(RE+2) = { -R1, -R1/2, R1/2, q};</div>
<div>Point(RE+3) = { -R1, -R1/2, -R1/2, q};</div>
<div>Point(RE+4) = { -R1, R1/2, -R1/2, q};</div>
<div>Line(RE+13) = {RE+4, RE+1};</div>
<div>Line(RE+14) = {RE+1, RE+2};</div>
<div>Line(RE+15) = {RE+2, RE+3};</div>
<div>Line(RE+16) = {RE+3, RE+4};</div>
<div>Line Loop(RE+7) = {RE+16, RE+13, RE+14, RE+15};</div>
<div>Plane Surface(180) = {RE+7};</div>
<div><br>
</div>
<div><br>
</div>
<div>// create plate electrodes</div>
<div>/* back electrode */</div>
<div><br>
</div>
<div>RE = 500;</div>
<div><br>
</div>
<div>Point(RE+1) = { R1/2, -R1, R1/2, q};</div>
<div>Point(RE+2) = { -R1/2, -R1, R1/2, q};</div>
<div>Point(RE+3) = { -R1/2, -R1,-R1/2, q};</div>
<div>Point(RE+4) = { R1/2, -R1, -R1/2, q};</div>
<div>Line(RE+13) = {RE+4, RE+1};</div>
<div>Line(RE+14) = {RE+1, RE+2};</div>
<div>Line(RE+15) = {RE+2, RE+3};</div>
<div>Line(RE+16) = {RE+3, RE+4};</div>
<div>Line Loop(RE+7) = {RE+16, RE+13, RE+14, RE+15};</div>
<div>Plane Surface(190) = {RE+7};</div>
<div><br>
</div>
<div><br>
</div>
<div>/* front electrode */</div>
<div><br>
</div>
<div>RE = 600;</div>
<div><br>
</div>
<div>Point(RE+1) = { R1/2, R1, R1/2, q};</div>
<div>Point(RE+2) = { -R1/2, R1, R1/2, q};</div>
<div>Point(RE+3) = { -R1/2, R1,-R1/2, q};</div>
<div>Point(RE+4) = { R1/2, R1, -R1/2, q};</div>
<div>Line(RE+13) = {RE+4, RE+1};</div>
<div>Line(RE+14) = {RE+1, RE+2};</div>
<div>Line(RE+15) = {RE+2, RE+3};</div>
<div>Line(RE+16) = {RE+3, RE+4};</div>
<div>Line Loop(RE+7) = {RE+16, RE+13, RE+14, RE+15};</div>
<div>Plane Surface(210) = {RE+7};</div>
<div><br>
</div>
<div>/* top electrode */</div>
<div><br>
</div>
<div>RE = 700;</div>
<div><br>
</div>
<div>Point(RE+1) = { R1/2,R1/2,R1, q};</div>
<div>Point(RE+2) = { -R1/2,R1/2, R1,q};</div>
<div>Point(RE+3) = { -R1/2, -R1/2,R1, q};</div>
<div>Point(RE+4) = { R1/2, -R1/2,R1, q};</div>
<div>Line(RE+13) = {RE+4, RE+1};</div>
<div>Line(RE+14) = {RE+1, RE+2};</div>
<div>Line(RE+15) = {RE+2, RE+3};</div>
<div>Line(RE+16) = {RE+3, RE+4};</div>
<div>Line Loop(RE+7) = {RE+16, RE+13, RE+14, RE+15};</div>
<div>Plane Surface(211) = {RE+7};</div>
<div><br>
</div>
<div><br>
</div>
<div>/* bottom electrode */</div>
<div><br>
</div>
<div>RE = 800;</div>
<div><br>
</div>
<div>Point(RE+1) = { R1/2,R1/2,-R1, q};</div>
<div>Point(RE+2) = { -R1/2,R1/2, -R1,q};</div>
<div>Point(RE+3) = { -R1/2, -R1/2,-R1, q};</div>
<div>Point(RE+4) = { R1/2, -R1/2,-R1, q};</div>
<div>Line(RE+13) = {RE+4, RE+1};</div>
<div>Line(RE+14) = {RE+1, RE+2};</div>
<div>Line(RE+15) = {RE+2, RE+3};</div>
<div>Line(RE+16) = {RE+3, RE+4};</div>
<div>Line Loop(RE+7) = {RE+16, RE+13, RE+14, RE+15};</div>
<div>Plane Surface(212) = {RE+7};</div>
<div><br>
</div>
<div>//---------------------------------------------------------------</div>
<div><br>
</div>
<div>aa() = BooleanFragments{ Volume{1}; Delete; }{ Volume{2,3,4,5}; Surface{170,180,190,210,211,212}; Delete;};</div>
<div>Physical Volume(600) = {aa(0)};</div>
<div>Physical Volume(601) = {aa(1)};</div>
<div>Physical Volume(602) = {aa(2)};</div>
<div>Physical Volume(603) = {aa(3)};</div>
<div>Physical Volume(604) = {aa(4)};</div>
<div>Mesh.CharacteristicLengthMax = 0.001;</div>
<div>Characteristic Length { PointsOf{ Volume{aa({0,2:4})}; } } = 0.001; // inside the box</div>
<br>
<p></p>
<p><br>
</p>
<div id="Signature">
<div name="divtagdefaultwrapper" style="font-family:Calibri,Arial,Helvetica,sans-serif; font-size:; margin:0">
<div name="divtagdefaultwrapper" style="margin:0px"><font face="Times New Roman, Times, serif" color="#0000ff"><br>
</font></div>
<div name="divtagdefaultwrapper" style="margin:0px">
<hr>
</div>
<blockquote style="margin:0 0 0 40px; border:none; padding:0px">
<div name="divtagdefaultwrapper" style="margin:0px"><font face="Times New Roman, Times, serif">Best Regards,</font></div>
<div name="divtagdefaultwrapper" style="margin:0px"><font face="Times New Roman, Times, serif"><br>
</font></div>
<div name="divtagdefaultwrapper" style="margin:0px"><span style="font-family:"Times New Roman",Times,serif">Sathyanarayan Rao, PhD student</span></div>
<div name="divtagdefaultwrapper" style="margin:0px"><span style="font-family:"Times New Roman",Times,serif; background-color:rgb(255,255,255); white-space:pre-wrap">Earth and Life Institute/Environmental Sciences (ELI-e)</span></div>
<div name="divtagdefaultwrapper" style="margin:0px"><span style="background-color:rgb(255,255,255); font-family:"Times New Roman",Times,serif; white-space:pre-wrap">Université catholique de Louvain</span></div>
<div name="divtagdefaultwrapper" style="margin:0px"><span style="font-family:"Times New Roman",Times,serif; white-space:pre-wrap; background-color:rgb(255,255,255)">c.037, Croix du Sud 2, Louvain-la-Neuve, Belgium
</span></div>
<div name="divtagdefaultwrapper" style="margin:0px"><span style="background-color:rgb(255,255,255); white-space:pre-wrap">Phone: 010473827 ( intercom 73827)</span></div>
</blockquote>
<div name="divtagdefaultwrapper" style="margin:0px">
<div>
<pre cols="72" style="white-space:pre-wrap; background-color:rgb(255,255,255)"><hr></pre>
</div>
</div>
</div>
</div>
</div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Ruth Vazquez Sabariego <ruth.sabariego@kuleuven.be><br>
<b>Sent:</b> 10 February 2018 08:47:24<br>
<b>To:</b> Sathyanarayan Rao<br>
<b>Cc:</b> gmsh@onelab.info; gmsh@ace20.montefiore.ulg.ac.be<br>
<b>Subject:</b> Re: [Gmsh] gmsh Digest, Vol 181, Issue 20</font>
<div> </div>
</div>
<div>
<div class="">Hi, </div>
<div class=""><br class="">
</div>
<div class="">What you’ve done works properly in my computer. You may adapt the size of the mesh a bit better by defining it per volume. </div>
<div class="">For instance:</div>
<div class="">Mesh.CharacteristicLengthMax = 0.001;</div>
<div class="">Characteristic Length { PointsOf{ Volume{aa({0,2:4})}; } } = 0.001; // inside the box</div>
<div class=""><br class="">
</div>
<div class="">Ruth</div>
<br class="">
<div class="">
<div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<div style="color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
—<br class="">
Prof. Ruth V. Sabariego<br class="">
KU Leuven <br class="">
Dept. Electrical Engineering ESAT/Electa, EnergyVille<br class="">
<a href="http://www.esat.kuleuven.be/electa" class="">http://www.esat.kuleuven.be/electa</a></div>
<div style="orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<a href="http://www.energyville.be" class="">http://www.energyville.be</a></div>
<div style="color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
<br class="">
</div>
<div style="color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; orphans: auto; text-align: start; text-indent: 0px; widows: auto; word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class="">
Free software: <a href="http://gmsh.info" class="">http://gmsh.info</a> | <a href="http://getdp.info" class="">http://getdp.info</a> | <a href="http://onelab.info" class="">http://onelab.info</a><br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
</div>
</div>
</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 9 Feb 2018, at 18:49, Sathyanarayan Rao <<a href="mailto:sathyanarayan.rao@uclouvain.be" class="">sathyanarayan.rao@uclouvain.be</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size: 12pt; font-family: "Times New Roman", Times, serif;" class="">
<div style="margin-top: 0px; margin-bottom: 0px;" class="">Hello Ruth Vazquez ,</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">Thank you very much. If I use the same procedure (boolean fragments) to enclose a concentric cylinders within </div>
<div style="margin-top: 0px; margin-bottom: 0px;" class="">a cube, it results in 2D meshes. Can you please let me know what I am doing wrong here ?</div>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<p style="margin-top: 0px; margin-bottom: 0px;" class=""></p>
<div class="">SetFactory("OpenCASCADE");</div>
<div class="">Mesh.Algorithm3D = 4; // 3D mesh algorithm (1=Delaunay, 4=Frontal, 5=Frontal Delaunay, 6=Frontal Hex, 7=MMG3D, 9=R-tree)</div>
<div class="">R = 0.01;</div>
<div class="">R1 = 0.05;</div>
<div class="">w = R;</div>
<div class="">Box(1) = {-R1,-R1,-R1, 2*R1,2*R1,2*R1};</div>
<div class=""><br class="">
</div>
<div class="">Cylinder(2) = {0, 0, -0.9*R1, 0, 0, 1.6*R1, 0.2*R, 2*Pi}; // inner cylinder</div>
<div class="">Cylinder(3) = {0, 0, -0.9*R1, 0, 0, 1.6*R1, 0.25*R, 2*Pi}; // inner cylinder</div>
<div class="">Cylinder(4) = {0, 0, -0.9*R1, 0, 0, 1.6*R1, 0.9*R, 2*Pi}; // inner cylinder</div>
<div class="">Cylinder(5) = {0, 0, -0.9*R1, 0, 0, 1.6*R1, 1*R, 2*Pi}; //outer cylinder</div>
<div class=""><br class="">
</div>
<div class="">aa() = BooleanFragments{ Volume{1}; Delete; }{ Volume{2,3,4,5}; Delete;};</div>
<div class=""><br class="">
</div>
<div class="">Physical Volume(600) = {aa(0)};</div>
<div class="">Physical Volume(601) = {aa(1)};</div>
<div class="">Physical Volume(602) = {aa(2)};</div>
<div class="">Physical Volume(603) = {aa(3)};</div>
<div class="">Physical Volume(604) = {aa(4)};</div>
<div class=""><br class="">
</div>
<div class="">Mesh.CharacteristicLengthMax = 0.001;</div>
<br class="">
<p style="margin-top: 0px; margin-bottom: 0px;" class=""></p>
<div style="margin-top: 0px; margin-bottom: 0px;" class=""><br class="">
</div>
<div id="x_Signature" class="">
<div name="x_divtagdefaultwrapper" style="font-family: Calibri, Arial, Helvetica, sans-serif; margin: 0px;" class="">
<div name="x_divtagdefaultwrapper" style="margin: 0px;" class=""><font face="Times New Roman, Times, serif" color="#0000ff" class=""><br class="">
</font></div>
<div name="x_divtagdefaultwrapper" style="margin: 0px;" class="">
<hr class="">
</div>
<blockquote style="margin: 0px 0px 0px 40px; border: none; padding: 0px;" class="">
<div name="x_divtagdefaultwrapper" style="margin: 0px;" class=""><font face="Times New Roman, Times, serif" class="">Best Regards,</font></div>
<div name="x_divtagdefaultwrapper" style="margin: 0px;" class=""><font face="Times New Roman, Times, serif" class=""><br class="">
</font></div>
<div name="x_divtagdefaultwrapper" style="margin: 0px;" class=""><span style="font-family: "Times New Roman", Times, serif;" class="">Sathyanarayan Rao, PhD student</span></div>
<div name="x_divtagdefaultwrapper" style="margin: 0px;" class=""><span style="font-family: "Times New Roman", Times, serif; background-color: rgb(255, 255, 255); white-space: pre-wrap;" class="">Earth and Life Institute/Environmental Sciences (ELI-e)</span></div>
<div name="x_divtagdefaultwrapper" style="margin: 0px;" class=""><span style="background-color: rgb(255, 255, 255); font-family: "Times New Roman", Times, serif; white-space: pre-wrap;" class="">Université catholique de Louvain</span></div>
<div name="x_divtagdefaultwrapper" style="margin: 0px;" class=""><span style="font-family: "Times New Roman", Times, serif; white-space: pre-wrap; background-color: rgb(255, 255, 255);" class="">c.037, Croix du Sud 2, Louvain-la-Neuve, Belgium
</span></div>
<div name="x_divtagdefaultwrapper" style="margin: 0px;" class=""><span style="background-color: rgb(255, 255, 255); white-space: pre-wrap;" class="">Phone: 010473827 ( intercom 73827)</span></div>
</blockquote>
<div name="x_divtagdefaultwrapper" style="margin: 0px;" class="">
<div class="">
<pre cols="72" style="white-space: pre-wrap; background-color: rgb(255, 255, 255);" class=""><hr class=""></pre>
</div>
</div>
</div>
</div>
</div>
<hr tabindex="-1" style="display: inline-block; width: 862.390625px;" class="">
<div id="x_divRplyFwdMsg" dir="ltr" class=""><font face="Calibri, sans-serif" style="font-size: 11pt;" class=""><b class="">From:</b><span class="Apple-converted-space"> </span>gmsh <<a href="mailto:gmsh-bounces@ace20.montefiore.ulg.ac.be" class="">gmsh-bounces@ace20.montefiore.ulg.ac.be</a>>
on behalf of<span class="Apple-converted-space"> </span><a href="mailto:gmsh-request@ace20.montefiore.ulg.ac.be" class="">gmsh-request@ace20.montefiore.ulg.ac.be</a><span class="Apple-converted-space"> </span><<a href="mailto:gmsh-request@ace20.montefiore.ulg.ac.be" class="">gmsh-request@ace20.montefiore.ulg.ac.be</a>><br class="">
<b class="">Sent:</b><span class="Apple-converted-space"> </span>09 February 2018 14:39:01<br class="">
<b class="">To:</b><span class="Apple-converted-space"> </span><a href="mailto:gmsh@onelab.info" class="">gmsh@onelab.info</a><br class="">
<b class="">Subject:</b><span class="Apple-converted-space"> </span>gmsh Digest, Vol 181, Issue 20</font>
<div class=""> </div>
</div>
</div>
<font size="2" style="font-family: Helvetica; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class=""><span style="font-size: 10pt;" class="">
<div class="PlainText">Send gmsh mailing list submissions to<br class="">
<span class="Apple-converted-space"> </span><a href="mailto:gmsh@onelab.info" class="">gmsh@onelab.info</a><br class="">
<br class="">
To subscribe or unsubscribe via the World Wide Web, visit<br class="">
<span class="Apple-converted-space"> </span><a href="http://onelab.info/mailman/listinfo/gmsh" class="">http://onelab.info/mailman/listinfo/gmsh</a><br class="">
or, via email, send a message with subject or body 'help' to<br class="">
<span class="Apple-converted-space"> </span><a href="mailto:gmsh-request@onelab.info" class="">gmsh-request@onelab.info</a><br class="">
<br class="">
You can reach the person managing the list at<br class="">
<span class="Apple-converted-space"> </span><a href="mailto:gmsh-owner@onelab.info" class="">gmsh-owner@onelab.info</a><br class="">
<br class="">
When replying, please edit your Subject line so it is more specific<br class="">
than "Re: Contents of gmsh digest..."<br class="">
<br class="">
<br class="">
Today's Topics:<br class="">
<br class="">
1. Re: Create a 3D cube with each face having a physical surface<br class="">
(Ruth Vazquez Sabariego)<br class="">
<br class="">
<br class="">
----------------------------------------------------------------------<br class="">
<br class="">
Message: 1<br class="">
Date: Fri, 9 Feb 2018 13:34:20 +0000<br class="">
From: Ruth Vazquez Sabariego <<a href="mailto:ruth.sabariego@kuleuven.be" class="">ruth.sabariego@kuleuven.be</a>><br class="">
To: Sathyanarayan Rao <<a href="mailto:sathyanarayan.rao@uclouvain.be" class="">sathyanarayan.rao@uclouvain.be</a>><br class="">
Cc: "<a href="mailto:gmsh@onelab.info" class="">gmsh@onelab.info</a>" <<a href="mailto:gmsh@onelab.info" class="">gmsh@onelab.info</a>><br class="">
Subject: Re: [Gmsh] Create a 3D cube with each face having a physical<br class="">
surface<br class="">
Message-ID: <<a href="mailto:00C42B21-C06B-4419-AED8-9752CD5A868B@kuleuven.be" class="">00C42B21-C06B-4419-AED8-9752CD5A868B@kuleuven.be</a>><br class="">
Content-Type: text/plain; charset="utf-8"<br class="">
<br class="">
Using your second option, you may use BooleanFragments.<br class="">
Try at the end of your file:<br class="">
<br class="">
// Surface{7,8,9,10,11,12} In Volume{1}; // Comment out this line<br class="">
Physical Volume(100) = {1};<br class="">
<br class="">
aux() = BooleanFragments{ Volume{1}; Delete; }{ Surface{7:12}; Delete;};<br class="">
Printf("", aux()); // For checking the numbers of the generated geometrical entities<br class="">
<br class="">
// For visibility<br class="">
Recursive Color Red{Volume{1};}<br class="">
Recursive Color Yellow{Surface{7:12};}<br class="">
<br class="">
With regard to your first option, you can only create rectangles in the XY plane, but you can translate and rotate to place them where you want.<br class="">
<br class="">
HTH<br class="">
Ruth<br class="">
<br class="">
?<br class="">
Prof. Ruth V. Sabariego<br class="">
KU Leuven<br class="">
Dept. Electrical Engineering ESAT/Electa, EnergyVille<br class="">
<a href="http://www.esat.kuleuven.be/electa" class="">http://www.esat.kuleuven.be/electa</a><br class="">
<a href="http://www.energyville.be/" class="">http://www.energyville.be</a><br class="">
<br class="">
Free software:<span class="Apple-converted-space"> </span><a href="http://gmsh.info/" class="">http://gmsh.info</a><span class="Apple-converted-space"> </span>|<span class="Apple-converted-space"> </span><a href="http://getdp.info/" class="">http://getdp.info</a><span class="Apple-converted-space"> </span>|<span class="Apple-converted-space"> </span><a href="http://onelab.info/" class="">http://onelab.info</a><br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
On 8 Feb 2018, at 22:13, Sathyanarayan Rao <<a href="mailto:sathyanarayan.rao@uclouvain.be" class="">sathyanarayan.rao@uclouvain.be</a><<a href="mailto:sathyanarayan.rao@uclouvain.be" class="">mailto:sathyanarayan.rao@uclouvain.be</a>>> wrote:<br class="">
<br class="">
Dear GMSH team,<br class="">
<br class="">
I am trying to generate a cube with each face having a rectangular surface that will be later identified as a sensor.<br class="">
<br class="">
1) In case I want to use rectangle command of opencascade is it possible to create rectangle other than in XY plane ?<br class="">
<br class="">
<br class="">
<br class="">
```<br class="">
SetFactory("OpenCASCADE");<br class="">
Mesh.Algorithm3D = 4; // 3D mesh algorithm (1=Delaunay, 4=Frontal, 5=Frontal Delaunay, 6=Frontal Hex, 7=MMG3D, 9=R-tree)<br class="">
R = 0.05;<br class="">
w = R;<br class="">
Box(1) = {-R,-R,-R, 2*R,2*R,2*R};<br class="">
Rectangle(10) = {-R/2,-R/2,-R, R,R};<br class="">
Rectangle(11) = {-R/2,-R/2,R, R,R};<br class="">
```<br class="">
<br class="">
2) When I manually create surfaces in each face of the cube, they come as separate regions in 3D mesh.<br class="">
<br class="">
```<br class="">
SetFactory("OpenCASCADE");<br class="">
Mesh.Algorithm3D = 4; // 3D mesh algorithm (1=Delaunay, 4=Frontal, 5=Frontal Delaunay, 6=Frontal Hex, 7=MMG3D, 9=R-tree)<br class="">
R = 0.05;<br class="">
R1 = R;<br class="">
w = R;<br class="">
Box(1) = {-R,-R,-R, 2*R,2*R,2*R};<br class="">
q = 0.005;<br class="">
<br class="">
/* Right electrode */<br class="">
RE = 300;<br class="">
<br class="">
Point(RE+1) = { R1, R1/2, R1/2, q};<br class="">
Point(RE+2) = { R1, -R1/2, R1/2, q};<br class="">
Point(RE+3) = { R1, -R1/2, -R1/2, q};<br class="">
Point(RE+4) = { R1, R1/2, -R1/2, q};<br class="">
Line(RE+13) = {RE+4, RE+1};<br class="">
Line(RE+14) = {RE+1, RE+2};<br class="">
Line(RE+15) = {RE+2, RE+3};<br class="">
Line(RE+16) = {RE+3, RE+4};<br class="">
Line Loop(RE+7) = {RE+16, RE+13, RE+14, RE+15};<br class="">
Plane Surface(7) = {RE+7};<br class="">
Physical Surface(10000) = {7};<br class="">
<br class="">
/* Left electrode */<br class="">
<br class="">
RE = 400;<br class="">
<br class="">
Point(RE+1) = { -R1, R1/2, R1/2, q};<br class="">
Point(RE+2) = { -R1, -R1/2, R1/2, q};<br class="">
Point(RE+3) = { -R1, -R1/2, -R1/2, q};<br class="">
Point(RE+4) = { -R1, R1/2, -R1/2, q};<br class="">
Line(RE+13) = {RE+4, RE+1};<br class="">
Line(RE+14) = {RE+1, RE+2};<br class="">
Line(RE+15) = {RE+2, RE+3};<br class="">
Line(RE+16) = {RE+3, RE+4};<br class="">
Line Loop(RE+7) = {RE+16, RE+13, RE+14, RE+15};<br class="">
Plane Surface(8) = {RE+7};<br class="">
Physical Surface(10001) = {8};<br class="">
<br class="">
<br class="">
// create plate electrodes<br class="">
/* back electrode */<br class="">
<br class="">
RE = 500;<br class="">
<br class="">
Point(RE+1) = { R1/2, -R1, R1/2, q};<br class="">
Point(RE+2) = { -R1/2, -R1, R1/2, q};<br class="">
Point(RE+3) = { -R1/2, -R1,-R1/2, q};<br class="">
Point(RE+4) = { R1/2, -R1, -R1/2, q};<br class="">
Line(RE+13) = {RE+4, RE+1};<br class="">
Line(RE+14) = {RE+1, RE+2};<br class="">
Line(RE+15) = {RE+2, RE+3};<br class="">
Line(RE+16) = {RE+3, RE+4};<br class="">
Line Loop(RE+7) = {RE+16, RE+13, RE+14, RE+15};<br class="">
Plane Surface(9) = {RE+7};<br class="">
Physical Surface(10002) = {9};<br class="">
<br class="">
<br class="">
/* front electrode */<br class="">
<br class="">
RE = 600;<br class="">
<br class="">
Point(RE+1) = { R1/2, R1, R1/2, q};<br class="">
Point(RE+2) = { -R1/2, R1, R1/2, q};<br class="">
Point(RE+3) = { -R1/2, R1,-R1/2, q};<br class="">
Point(RE+4) = { R1/2, R1, -R1/2, q};<br class="">
Line(RE+13) = {RE+4, RE+1};<br class="">
Line(RE+14) = {RE+1, RE+2};<br class="">
Line(RE+15) = {RE+2, RE+3};<br class="">
Line(RE+16) = {RE+3, RE+4};<br class="">
Line Loop(RE+7) = {RE+16, RE+13, RE+14, RE+15};<br class="">
Plane Surface(10) = {RE+7};<br class="">
Physical Surface(10003) = {10};<br class="">
<br class="">
/* top electrode */<br class="">
<br class="">
RE = 700;<br class="">
<br class="">
Point(RE+1) = { R1/2,R1/2,R1, q};<br class="">
Point(RE+2) = { -R1/2,R1/2, R1,q};<br class="">
Point(RE+3) = { -R1/2, -R1/2,R1, q};<br class="">
Point(RE+4) = { R1/2, -R1/2,R1, q};<br class="">
Line(RE+13) = {RE+4, RE+1};<br class="">
Line(RE+14) = {RE+1, RE+2};<br class="">
Line(RE+15) = {RE+2, RE+3};<br class="">
Line(RE+16) = {RE+3, RE+4};<br class="">
Line Loop(RE+7) = {RE+16, RE+13, RE+14, RE+15};<br class="">
Plane Surface(11) = {RE+7};<br class="">
Physical Surface(10004) = {11};<br class="">
<br class="">
<br class="">
/* bottom electrode */<br class="">
<br class="">
RE = 800;<br class="">
<br class="">
Point(RE+1) = { R1/2,R1/2,-R1, q};<br class="">
Point(RE+2) = { -R1/2,R1/2, -R1,q};<br class="">
Point(RE+3) = { -R1/2, -R1/2,-R1, q};<br class="">
Point(RE+4) = { R1/2, -R1/2,-R1, q};<br class="">
Line(RE+13) = {RE+4, RE+1};<br class="">
Line(RE+14) = {RE+1, RE+2};<br class="">
Line(RE+15) = {RE+2, RE+3};<br class="">
Line(RE+16) = {RE+3, RE+4};<br class="">
Line Loop(RE+7) = {RE+16, RE+13, RE+14, RE+15};<br class="">
Plane Surface(12) = {RE+7};<br class="">
Physical Surface(10005) = {12};<br class="">
<br class="">
Surface{7,8,9,10,11,12} In Volume{1};<br class="">
Physical Volume(100) = {1};<br class="">
```<br class="">
<br class="">
Somehow the command "Surface{} In Volume" seems to not care for what I want. Please let me know<br class="">
how can I get a cube with each face having a rectangular surface with its own physical number.<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
<br class="">
________________________________<br class="">
Best Regards,<br class="">
<br class="">
Sathyanarayan Rao, PhD student<br class="">
Earth and Life Institute/Environmental Sciences (ELI-e)<br class="">
Universit? catholique de Louvain<br class="">
c.037, Croix du Sud 2, Louvain-la-Neuve, Belgium<br class="">
Phone: 010473827 ( intercom 73827)<br class="">
<br class="">
________________________________<br class="">
<br class="">
_______________________________________________<br class="">
gmsh mailing list<br class="">
<a href="mailto:gmsh@onelab.info" class="">gmsh@onelab.info</a><<a href="mailto:gmsh@onelab.info" class="">mailto:gmsh@onelab.info</a>><br class="">
<a href="http://onelab.info/mailman/listinfo/gmsh" class="">http://onelab.info/mailman/listinfo/gmsh</a><br class="">
<br class="">
-------------- next part --------------<br class="">
An HTML attachment was scrubbed...<br class="">
URL: <<a href="http://onelab.info/pipermail/gmsh/attachments/20180209/e0eb17ae/attachment.html" class="">http://onelab.info/pipermail/gmsh/attachments/20180209/e0eb17ae/attachment.html</a>><br class="">
<br class="">
------------------------------<br class="">
<br class="">
Subject: Digest Footer<br class="">
<br class="">
_______________________________________________<br class="">
gmsh mailing list<br class="">
<a href="mailto:gmsh@onelab.info" class="">gmsh@onelab.info</a><br class="">
<a href="http://onelab.info/mailman/listinfo/gmsh" class="">http://onelab.info/mailman/listinfo/gmsh</a><br class="">
<br class="">
<br class="">
------------------------------<br class="">
<br class="">
End of gmsh Digest, Vol 181, Issue 20<br class="">
*************************************<br class="">
</div>
</span></font><span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">_______________________________________________</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<span style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; float: none; display: inline !important;" class="">gmsh
mailing list</span><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<a href="mailto:gmsh@onelab.info" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">gmsh@onelab.info</a><br style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;" class="">
<a href="http://onelab.info/mailman/listinfo/gmsh" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">http://onelab.info/mailman/listinfo/gmsh</a></div>
</blockquote>
</div>
<br class="">
</div>
</body>
</html>