hello,everyone. I am building a network which consists of a cylinder and an array of solid particle in it. I tried to build 3D curve and used tegten to build the mesh. The procedure said that
my whole code is like below,
// test of mmg3d for move objets in a mesh …
load “msh3”
load “tetgen”
load “medit”
load “mmg3d-v4.0”
include “MeshSurface1.idp”
//The surface for cylinder
real r1=0.2;
real hs = 0.1;
border cc(t=0,2pi){x=25cos(t);y=25sin(t);label=0;}
mesh Thcercle = buildmesh(cc(10));
mesh Thcarre=square(50,50,[50x,2piy]);
func f1 = x;
func f2 =25cos(y);
func f3 = 25sin(y);
meshS Thsurf1=movemesh23(Thcarre,transfo=[f1,f2,f3],orientation=-1);// sidewall
meshS Thsurf2=movemesh23(Thcercle,transfo=[0,x,y],orientation=-1);// bottom
meshS Thsurf3=movemesh23(Thcercle,transfo=[50,x,y],orientation=1); //top
meshS Thsurf=Thsurf1+Thsurf2+Thsurf3;// gluing the three meshes together
plot(Thsurf,wait=1);
meshS Th1=Ellipsoide(r1,r1,r1,hs,300,0.2,0.2,0.2,-1);
meshS Th2;
meshS Th3;
for(int i=1;i<5;i++)
{
for(int j=1;j<5;j++)
{
for(int k=1;k<5;k++)
{
Th2=Ellipsoide(r1,r1,r1,hs,300,(2i+1)r1,r1+2jr1,r1+2kr1,-1);
Th1=Th1+Th2;
}
}
}
for(int i=1;i<5;i++)
{
for(int j=1;j<5;j++)
{
for(int k=1;k<5;k++)
{
Th3=Ellipsoide(r1,r1,r1,hs,300,(-2i+1)r1,r1-2jr1,r1-2kr1,-1);
Th1=Th1+Th3;
}
}
}
meshS Th=Th1+Thsurf;
//meshS Th=Thsurf+th111+th211+th311+th411+th511+th611+th711+th811+th911+th1011;
plot(Th);
real[int] domain=[25,0,0,300,0.01];
mesh3 Th3sph=tetg(Th,switch=“paAAQYY”,nbofregions=1,regionlist=domain);
savemesh(Th3sph,“POROUS.msh”);