[Gmsh] Composite RVE (Hossam Ragheb)

Hossam Ragheb har1g15 at soton.ac.uk
Fri Dec 18 16:31:16 CET 2020


Hi Baptiste,

Apologies for the delayed response. Thank you so much for spending your 
time to create the python version, I really appreciate it.

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?

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.

Regards,

Hossam

On 14/12/2020 08:01, Baptiste DURAND wrote:
> *CAUTION:* This e-mail originated outside the University of Southampton.
> Hi Hossam,
>
> Controlling the mesh density with the options 
> "Mesh.CharacteristicLengthMin" and "Mesh.CharacteristicLengthMax" may 
> be too stringent. It may be better to use the "mesh size field" 
> feature if you want to impose a mesh density.
> Also, (I'm not sure about that) the last fragment operation with 
> "Delete" specified might mess up the physical group.
>
> 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.
> 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 (https://gitlab.enpc.fr/baptiste.durand/HO_homog 
> <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>).
>
> Regards,
>
> Baptiste Durand
>
>
> –––––
> Baptiste Durand
> Doctorant – Laboratoire Navier 
> <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>
> baptiste.durand at enpc.fr <mailto:baptiste.durand at enpc.fr> – 01 64 15 37 
> 21 <tel:+33164153721> (06 58 88 05 41 <tel:+33658880541>) – 
> linkedin.com/in/ 
> <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>bd1747 
> <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>
>
> ------------------------------------------------------------------------
>
> Today's Topics:
>
>    1. Composite RVE (Hossam Ragheb)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Thu, 10 Dec 2020 13:34:34 +0000
> From: Hossam Ragheb <har1g15 at soton.ac.uk>
> To: gmsh at onelab.info
> Subject: [Gmsh] Composite RVE
> Message-ID: <8b4e55e8-f24a-5e9e-b0da-b21288631289 at soton.ac.uk>
> Content-Type: text/plain; charset="utf-8"; Format="flowed"
>
> Hi,
>
> I am new to gmsh, so apologies if the answer to my question is obvious.
>
> I coded a .geo file (Attached) to create 3D RVE with fibers in a matrix
> that includes voids.
>
> The process simply is :
>
>  ??? 1- Create box of the matrix material.
>
>  ??? 2- Create voids using Sphere command and BooleanDifference to
> remove these from the matrix material.
>
>  ??? 3- Create fibers as Cylinders and and utilise BooleanFragments to
> include the cylinders in the matrix.
>
> I have one persistent problem, once the mesh is created the fibers are
> meshed as hollow cylinders, however i need them to be solid.
>
> Its interesting behavior. Last thing to note that mesh size affects the
> outcome, for example when the min/max mesh size is 2, the result is
> solid cylinders, but with mesh size of 1, it becomes hollow.
>
> It there a way to force the meshing algorithm to mesh the cylinder as
> solid object?
>
> I have attached the .geo file, please let me know if you can help.
>
> Any suggestions?
>
> Thanks,
>
> Hossam Ragheb
>
> -------------- next part --------------
> //------------------------------------------------------------------------------
> //
> // Gmsh Stochastic Composite RVE
> //
> // Constructive Solid Geometry, OpenCASCADE geometry kernel
> //
> //------------------------------------------------------------------------------
>
> SetFactory("OpenCASCADE");
>
> Mesh.Tetrahedra = 1;
> Mesh.Triangles = 1;
> fac = 1;
> Mesh.CharacteristicLengthMin = 2*fac;
> Mesh.CharacteristicLengthMax = 2*fac;
> voiden = 0.01;
> Vf = 0.7;
> // Coefficent of variation of the fibre diameter
> cvf = 0.17;
> Vlratio = 20;
> Cube = 75*fac;
> frmean = 5.0 * fac;
> frmin = frmean - (frmean*cvf);
> frmax = frmean + (frmean*cvf);
> vrmin = 2.5*fac;
> vrmax = 5.0*fac;
> R = Cube;
> nSvoid = Floor((voiden*2*R*2*R*2*R)/((4/3)*3.1415926*vrmax*vrmax*vrmax));
> nFibre = Floor((Vf*2*R*2*R*2*R)/(3.1415926*frmax*frmax*2*R));
> dims = Floor(Sqrt(nFibre));
> Box(1) = {-R,-R,-R, 2*R,2*R,2*R};
> For s In {2:nSvoid}
>   If (s < nSvoid)
>     r = vrmin +Rand(vrmax-vrmin);
>     x = -R + Rand(2*R);
>     y = -R + Rand(2*R);
>     z = -R + Rand(2*R);
>     Sphere(s) = {x, y, z, r};
>   EndIf
>   If (s == nSvoid)
>     r = vrmin +Rand(vrmax-vrmin);
>     x = -R + Rand(2*R);
>     y = -R + Rand(2*R);
>     z = -R + Rand(2*R);
>     Sphere(s) = {x, y, z, r};
>     Dilate {{x, y, z}, {Vlratio, 1, 0.5}} { Volume{s}; }
>   EndIf
>   Physical Volume(s) = {s};
> EndFor
> BooleanDifference(nSvoid+1) = { Volume{1}; Delete; }{ 
> Volume{2:nSvoid}; Delete; };
>
> dx = (2*R)/dims;
> count = 0;
> For i In {0:dims-1}
>   For j In {0:dims-1}
>     // Fibre diameter
>     Fr = frmin +Rand(frmax-frmin);
>     // Center of grid box in the RVE
>     cgx = (-R + 0.5*dx) + j * dx;
>     cgy = (-R + 0.5*dx) + i * dx;
>     // Center of cylinder base
>     xF = (cgx - 0.5*dx + Fr) + Rand(dx-2*Fr);
>     yF = (cgy - 0.5*dx + Fr) + Rand(dx-2*Fr);
>     zF = -R;
>     // Cylinder axis dx,dy,dz
>     dxF = 0;
>     dyF = 0;
>     dzF = 2*R;
>     Cylinder(nSvoid+2+count) = {xF,yF,zF,dxF,dyF,dzF,Fr};
>     Physical Volume(nSvoid+2+count) = {nSvoid+2+count};
>     count = count +1;
>   EndFor
> EndFor
> BooleanDifference(1000) = 
> {Volume{nSvoid+1};Delete;}{Volume{nSvoid+2:nSvoid+1+count};};
> Physical Volume("Matrix") = {1000};
> Physical Volume("Fibres") = {nSvoid+2:nSvoid+1+count};
> f() = 
> BooleanFragments{Volume{1000};Delete;}{Volume{nSvoid+2:nSvoid+1+count};Delete;};
>
> ------------------------------
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://onelab.info/pipermail/gmsh/attachments/20201218/ae557429/attachment-0001.html>


More information about the gmsh mailing list