|
[Sponsors] |
gmsh crashing during BooleanDifference with many volumes |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
May 12, 2020, 04:14 |
gmsh crashing during BooleanDifference with many volumes
|
#1 |
Member
Adam
Join Date: Nov 2018
Posts: 36
Rep Power: 7 |
Hello,
I am having an issue with gmsh crashing when I try to do many boolean operations. I want to generate a porous volume, where the medium is the empty space around overlapping spheres. My code, below, is meant to subtract the spheres from the starting box. It works fine for N up to 385, but if I used N = 386 or greater, gmsh crashes (on both of my computers). Did I do something wrong? Or is this a limitation with gmsh/OpenCASCADE? At this point, I'm not even meshing, just defining the surfaces so I don't think it's a memory issue. Code:
SetFactory("OpenCASCADE"); // x,y,z positions for the spheres (not shown for brevity) N = 500; // number of spheres R = 0.1; // cylinder radius X = 1; // size of domain in x-direction Y = 1; // size of domain in y-direction Z = 10; // size of domain in z-direction LC = R; // mesh critical length // define entire domain Box(1) = {0,0,0,X,Y,Z}; // define empty list for volume index numbers VolIndex[] = {}; // for loop that places N spheres For t In {1:N} NV = newv; //new volume index Sphere(NV) = {x[t-1], y[t-1], z[t-1], R}; // Defines the Sphere VolIndex[] += NV; //adds this volume index to the list EndFor // Boolean subtraction of the total domain, minus the spheres // both the original domain, and the original spheres are deleted BooleanDifference{ Volume{1}; Delete; }{ Volume{VolIndex[]}; Delete; } |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
[Gmsh] 3D Hex Mesh after BooleanDifference in Gmsh | bhargav1195 | OpenFOAM Meshing & Mesh Conversion | 0 | June 28, 2018 08:39 |
[Gmsh] Converting gmsh to OpenFoam | Friendly | OpenFOAM Meshing & Mesh Conversion | 3 | June 26, 2018 05:46 |
[Gmsh] 2D Mesh Generation Tutorial for GMSH | aeroslacker | OpenFOAM Meshing & Mesh Conversion | 12 | January 19, 2012 03:52 |
[Gmsh] Import problem | ARC | OpenFOAM Meshing & Mesh Conversion | 0 | February 27, 2010 10:56 |
Copying tranfsinite volumes in gmsh | shangzung | Main CFD Forum | 0 | December 10, 2009 03:04 |