Skip to content
Snippets Groups Projects
Commit ff06f9b9 authored by Christophe Geuzaine's avatar Christophe Geuzaine
Browse files

remove file

parent adc22116
Branches
Tags
No related merge requests found
SetFactory("OpenCASCADE");
DefineConstant[
rmin = {0.03, Min 0.01, Max 0.9, Step 0.01, Name "Min radius"}
rmax = {0.1, Min 0.01, Max 0.9, Step 0.01, Name "Max radius"}
n = {100, Min 1, Max 100, Step 1, Name "Number of spheres"}
];
Mesh.CharacteristicLengthExtendFromBoundary = 0;
For i In {1:n}
r = rmin + Rand(rmax - rmin);
x = Rand(1);
y = Rand(1);
z = Rand(1);
Sphere(i) = {x, y, z, r};
//Sphere(i) = {x, y, z, r, -Pi/3, Pi/3};
//Cylinder(i) = {x-r, y, z, x+r, y, z, r};
Point(i) = {x, y, z};
Field[i] = Attractor;
Field[i].NodesList = {i};
Field[n+i] = Threshold;
Field[n+i].IField = i;
Field[n+i].LcMin = r / 6;
Field[n+i].LcMax = 0.3;
Field[n+i].DistMin = r;
Field[n+i].DistMax = 4*r;
EndFor
Block(n+1) = {-2*rmax,-2*rmax,-2*rmax, 1+2*rmax,1+2*rmax,1+2*rmax};
BooleanFragments{ Volume{n+1}; Delete; }{ Volume{1:n}; Delete; }
Field[2*n+1] = Min;
Field[2*n+1].FieldsList = {n+1:2*n};
Background Field = 2*n+1;
//Field[2*n+2] = Octree;
//Field[2*n+2].InField = 2*n+1;
//Background Field = 2*n+2;
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment