<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p><font face="Times New Roman, Times, serif">Hi Baptiste,</font></p>
<p><font face="Times New Roman, Times, serif">Apologies for the
delayed response. Thank you so much for spending your time to
create the python version, I really appreciate it. <br>
</font></p>
<p><font face="Times New Roman, Times, serif">That works now,
however the triangle elements are not created anymore in the
model any idea how to create triangle elements on the surface
boundary?</font></p>
<p><font face="Times New Roman, Times, serif">I looked at the
HO-homog, it seems very interesting. I will have a look at it,
and i am sure it will be very useful for my future work.</font></p>
<p><font face="Times New Roman, Times, serif">Regards,</font></p>
<p><font face="Times New Roman, Times, serif">Hossam</font><br>
</p>
<div class="moz-cite-prefix">On 14/12/2020 08:01, Baptiste DURAND
wrote:<br>
</div>
<blockquote type="cite" cite="mid:555275604.2449702.1607932919290.JavaMail.zimbra@enpc.fr">
<div style="padding-bottom: 10px; padding-top: 5px;">
<div style="padding:12px; border:1px solid #8D3970;
background-color:#F7F9FA; color:#8D3970; font-size:14px;
line-height:22px; font-family: Calibri, Arial, Helvetica,
sans-serif;">
<strong>CAUTION:</strong> This e-mail originated outside the
University of Southampton.
</div>
</div>
<div>
<div style="font-family: tahoma,new york,times,serif; font-size:
12pt; color: #000000">
<div data-marker="__QUOTED_TEXT__">
<div style="font-family: tahoma,new york,times,serif;
font-size: 12pt; color: #000000">
<div>
<div style="font-family: tahoma,new york,times,serif;
font-size: 12pt; color: #000000">
<div>Hi Hossam,<br>
</div>
<br>
<div>Controlling the mesh density with the options
"Mesh.CharacteristicLengthMin" and
"Mesh.CharacteristicLengthMax" may be too
<span class="headword hdb tw-bw dhw dpos-h_hw "><span class="hw dhw">stringent. It may be better to
use the "mesh size field" feature if you want to
impose a mesh density.</span></span><br>
</div>
<div>Also, (I'm not sure about that) the last fragment
operation with "Delete" specified might mess up the
physical group.</div>
<br>
<div>I convert your .geo file to a python script in
order to test your code via the gmsh python API. You
can find attached this .py file.<br>
What you are trying to do seems somehow similar to
what I do with gmsh and FEniCS (periodic
homogenization for linear elasticity). You could be
interested by some features of the python package
HO-homog that we develop (<a href="https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.enpc.fr%2Fbaptiste.durand%2FHO_homog&data=04%7C01%7Char1g15%40soton.ac.uk%7C0c27591122224949e36a08d8a0068ae8%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637435297257308285%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=bu0gnZTrbMpgNF5jkCBnLXniTVInUyJMGszH8SQdnGw%3D&reserved=0" originalsrc="https://gitlab.enpc.fr/baptiste.durand/HO_homog" shash="IiioewrLuBGeqqNCj1HOWnJgUtxivvQpr+86h2qjqtBcmAK/YkTdzJrnTPhDNNY4VekML64jUgIwXVOxqqp1nLHqaQcoDiRrvaE+ZPGnCoMcR6HvCf41FcfucqD8mMuaxfaye0O8pmflSQjkHrirxZxxLYcfzGvSNZ810gY5DvE=" target="_blank" moz-do-not-send="true">https://gitlab.enpc.fr/baptiste.durand/HO_homog</a>).<br>
<br>
Regards, <br>
<br>
Baptiste Durand<br>
</div>
<br>
<br>
<div>
<div><span style="color: #333333; font-family:
tahoma, 'new york', times, serif;">–––––</span></div>
<div><span style="color: #333333; font-family:
tahoma, 'new york', times, serif;">Baptiste
Durand</span><br>
<span style="font-family: tahoma, 'new york',
times, serif; color: #333333;">Doctorant –
<a href="https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fnavier-lab.fr%2F&data=04%7C01%7Char1g15%40soton.ac.uk%7C0c27591122224949e36a08d8a0068ae8%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637435297257318278%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=W3eBZJEVJQ2Q1zr4uL8AwOu6zTsmQUDOK%2BTQttTygOY%3D&reserved=0" originalsrc="https://navier-lab.fr/" shash="uiTm3ffbSOIdk2VXwbnokmRQJiiB4Qv2M+X5CPU1XVSRoKTwE9ImXjgo587YaymRcnHqzcT6I1t5Z/lZV1b+lb7NrF58eJDyrZe69pZXZf29QdmoauImGWk2YaVDfRDNTIPy1OIBAKCiwUJE84bGmLduRWazc2XrmLmqPbQxO1w=" target="_blank" style="color: #333333;" moz-do-not-send="true">Laboratoire Navier</a></span><br>
<span style="color: #000000;"><span style="font-family: tahoma, 'new york', times,
serif;"><a href="mailto:baptiste.durand@enpc.fr" style="color: #000000;" target="_blank" moz-do-not-send="true">baptiste.durand@enpc.fr</a>
–
<a href="tel:+33164153721" style="color:
#000000;" target="_blank" moz-do-not-send="true">01 64 15 37 21</a> (<a href="tel:+33658880541" style="color:
#000000;" target="_blank" moz-do-not-send="true">06 58 88 05 41</a>) –
</span><a href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Flinkedin.com%2Fin%2Fbd1747&data=04%7C01%7Char1g15%40soton.ac.uk%7C0c27591122224949e36a08d8a0068ae8%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637435297257318278%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=Bmw1u4MR0cn9%2BXEHNwCVlRAYfQe0xpLTFv5VBG5BVH0%3D&reserved=0" originalsrc="http://linkedin.com/in/bd1747" shash="Jxg3+CYdygedPWhMbdr0CvPZmACY3we+rjCUph7rPMNfjArtmqkCd1IV/2gmpx17SvzrNKkYjU3cXZT8w4r2Le6oOVtkJAAo8FMfJrPmMIO4wXUaFnSFEC80KHd/qrf+uuriw9V0zssVQsqK0dNe6VB+AuIoXUy+fJhaRiMYsG8=" title="linkedin.com/in/bd1747" style="color:
#000000;" target="_blank" moz-do-not-send="true"><span style="font-family: tahoma, 'new york',
times, serif;">linkedin.com/in/</span></a><a href="https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Flinkedin.com%2Fin%2Fbd1747&data=04%7C01%7Char1g15%40soton.ac.uk%7C0c27591122224949e36a08d8a0068ae8%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637435297257328274%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=bXE0u%2Bp5M2RjdvAOM6GucVDY%2BIto0i6S4NUetG%2BpIEM%3D&reserved=0" originalsrc="http://linkedin.com/in/bd1747" shash="CCrco+1wsJBygb2W6/0zp+x8of4itGRsngexcD3qotK135vfREFyNrq78S79QRn66SBQitrXeD/KUJjxeyf49/nF5WLrCjbKpaRg6oSU5c3opC2bVc1ALN+hMaJgljzwY14S7eTHbbWNVs27wpC716K0rT1XRkhVUJU8lmBQjx8=" title="linkedin.com/in/bd1747" style="color:
#000000;" target="_blank" moz-do-not-send="true"><span class="vanity-name__domain"></span><span class="vanity-name__domain"></span><span class="vanity-name__display-name">bd1747</span></a></span><br>
</div>
</div>
<br>
<hr id="zwchr">
<br>
<div>Today's Topics:<br>
<br>
1. Composite RVE (Hossam Ragheb)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Thu, 10 Dec 2020 13:34:34 +0000<br>
From: Hossam Ragheb <a class="moz-txt-link-rfc2396E" href="mailto:har1g15@soton.ac.uk"><har1g15@soton.ac.uk></a><br>
To: <a class="moz-txt-link-abbreviated" href="mailto:gmsh@onelab.info">gmsh@onelab.info</a><br>
Subject: [Gmsh] Composite RVE<br>
Message-ID:
<a class="moz-txt-link-rfc2396E" href="mailto:8b4e55e8-f24a-5e9e-b0da-b21288631289@soton.ac.uk"><8b4e55e8-f24a-5e9e-b0da-b21288631289@soton.ac.uk></a><br>
Content-Type: text/plain; charset="utf-8";
Format="flowed"<br>
<br>
Hi,<br>
<br>
I am new to gmsh, so apologies if the answer to my
question is obvious.<br>
<br>
I coded a .geo file (Attached) to create 3D RVE with
fibers in a matrix <br>
that includes voids.<br>
<br>
The process simply is :<br>
<br>
??? 1- Create box of the matrix material.<br>
<br>
??? 2- Create voids using Sphere command and
BooleanDifference to <br>
remove these from the matrix material.<br>
<br>
??? 3- Create fibers as Cylinders and and utilise
BooleanFragments to <br>
include the cylinders in the matrix.<br>
<br>
I have one persistent problem, once the mesh is
created the fibers are <br>
meshed as hollow cylinders, however i need them to
be solid.<br>
<br>
Its interesting behavior. Last thing to note that
mesh size affects the <br>
outcome, for example when the min/max mesh size is
2, the result is <br>
solid cylinders, but with mesh size of 1, it becomes
hollow.<br>
<br>
It there a way to force the meshing algorithm to
mesh the cylinder as <br>
solid object?<br>
<br>
I have attached the .geo file, please let me know if
you can help.<br>
<br>
Any suggestions?<br>
<br>
Thanks,<br>
<br>
Hossam Ragheb<br>
<br>
-------------- next part --------------<br>
//------------------------------------------------------------------------------<br>
//<br>
// Gmsh Stochastic Composite RVE<br>
//<br>
// Constructive Solid Geometry, OpenCASCADE geometry
kernel<br>
//<br>
//------------------------------------------------------------------------------<br>
<br>
SetFactory("OpenCASCADE");<br>
<br>
Mesh.Tetrahedra = 1;<br>
Mesh.Triangles = 1;<br>
fac = 1;<br>
Mesh.CharacteristicLengthMin = 2*fac;<br>
Mesh.CharacteristicLengthMax = 2*fac;<br>
voiden = 0.01;<br>
Vf = 0.7;<br>
// Coefficent of variation of the fibre diameter<br>
cvf = 0.17;<br>
Vlratio = 20;<br>
Cube = 75*fac;<br>
frmean = 5.0 * fac;<br>
frmin = frmean - (frmean*cvf);<br>
frmax = frmean + (frmean*cvf);<br>
vrmin = 2.5*fac;<br>
vrmax = 5.0*fac;<br>
R = Cube;<br>
nSvoid =
Floor((voiden*2*R*2*R*2*R)/((4/3)*3.1415926*vrmax*vrmax*vrmax));<br>
nFibre =
Floor((Vf*2*R*2*R*2*R)/(3.1415926*frmax*frmax*2*R));<br>
dims = Floor(Sqrt(nFibre));<br>
Box(1) = {-R,-R,-R, 2*R,2*R,2*R};<br>
For s In {2:nSvoid}<br>
If (s < nSvoid)<br>
r = vrmin +Rand(vrmax-vrmin);<br>
x = -R + Rand(2*R);<br>
y = -R + Rand(2*R);<br>
z = -R + Rand(2*R);<br>
Sphere(s) = {x, y, z, r};<br>
EndIf<br>
If (s == nSvoid)<br>
r = vrmin +Rand(vrmax-vrmin);<br>
x = -R + Rand(2*R);<br>
y = -R + Rand(2*R);<br>
z = -R + Rand(2*R);<br>
Sphere(s) = {x, y, z, r};<br>
Dilate {{x, y, z}, {Vlratio, 1, 0.5}} {
Volume{s}; }<br>
EndIf<br>
Physical Volume(s) = {s};<br>
EndFor<br>
BooleanDifference(nSvoid+1) = { Volume{1}; Delete;
}{ Volume{2:nSvoid}; Delete; };<br>
<br>
dx = (2*R)/dims;<br>
count = 0;<br>
For i In {0:dims-1}<br>
For j In {0:dims-1}<br>
// Fibre diameter<br>
Fr = frmin +Rand(frmax-frmin);<br>
// Center of grid box in the RVE<br>
cgx = (-R + 0.5*dx) + j * dx;<br>
cgy = (-R + 0.5*dx) + i * dx;<br>
// Center of cylinder base<br>
xF = (cgx - 0.5*dx + Fr) + Rand(dx-2*Fr);<br>
yF = (cgy - 0.5*dx + Fr) + Rand(dx-2*Fr);<br>
zF = -R;<br>
// Cylinder axis dx,dy,dz<br>
dxF = 0;<br>
dyF = 0;<br>
dzF = 2*R;<br>
Cylinder(nSvoid+2+count) =
{xF,yF,zF,dxF,dyF,dzF,Fr};<br>
Physical Volume(nSvoid+2+count) =
{nSvoid+2+count};<br>
count = count +1;<br>
EndFor<br>
EndFor<br>
BooleanDifference(1000) =
{Volume{nSvoid+1};Delete;}{Volume{<a class="moz-txt-link-freetext" href="nSvoid+2:nSvoid+1+count">nSvoid+2:nSvoid+1+count</a>};};<br>
Physical Volume("Matrix") = {1000};<br>
Physical Volume("Fibres") =
{<a class="moz-txt-link-freetext" href="nSvoid+2:nSvoid+1+count">nSvoid+2:nSvoid+1+count</a>};<br>
f() =
BooleanFragments{Volume{1000};Delete;}{Volume{<a class="moz-txt-link-freetext" href="nSvoid+2:nSvoid+1+count">nSvoid+2:nSvoid+1+count</a>};Delete;};<br>
<br>
------------------------------<br>
</div>
</div>
</div>
</div>
<br>
</div>
</div>
</div>
</blockquote>
</body>
</html>