14 if(p<0 && p >
pNPart())
return;
23 for(
int s=0;s<
NEdge;s++){
24 for(
int ss=0;ss<
NEdge;ss++){
25 Pm[s*NEdge+ss].
Pos[2] = .5+.1*sin(s*
Dx*60.*INV_DUE_PI+
Time)*sin(ss*
Dx*30.*INV_DUE_PI+
Time);
30 for(
int p=0;p<
pNPart();p++){
32 double SenTh = sqrt(1 - QUAD(CosTh));
37 if(
pType(p) != 2)
Pm[p].Typ = 0;
44 if(
Pm[p].Pos[0] >
Nano[n].Pos[0])
61 if(
Pm[p].Pos[0] >
Nano[n].Pos[0])
66 Fm[p+1].Dir[0] +=
Kf.
Cont*SenTh*Sign;
76 for(
int p=0;p<
pNPart();p++){
77 if(
Pm[p].Typ == 2)
continue;
78 double Dist = sqrt(SQR(
Pm[p].Pos[0]-
Nano[n].Pos[0])+SQR(
Pm[p].Pos[1]-
Nano[n].Pos[1]));
79 if(Dist >
Nano[n].Rad)
continue;
80 double Zed = (
Nano[n].
Rad-Dist)*tan(
Nano[n].Hamaker*DUE_PI/360.);
92 for(
int n=0;n<
pNNano();n++){
93 if(fabs(Pos[dir] -
Nano[n].Pos[dir]) <
Nano[n].
Rad){
98 double yNano = Pos[dir2] -
Nano[nNano].
Pos[dir2];
99 double Lat1 =
Nano[nNano].
Pos[dir] - sqrt(SQR(
Nano[nNano].Rad)-SQR(yNano) ) - Pos[dir];
100 double Lat2 =
Nano[nNano].
Pos[dir] + sqrt(SQR(
Nano[nNano].Rad)-SQR(yNano) ) - Pos[dir];
101 double Dist = MIN(fabs(Lat1),fabs(Lat2));
104 double Zed = Dist*tan(
Nano[nNano].Hamaker*DUE_PI/360.);
109 for(
int p=0;p<
pNPart();p++){
110 if(
Pm[p].Typ == 2)
continue;
111 double Dist = sqrt(SQR(
Pm[p].Pos[0]-
Nano[n].Pos[0])+SQR(
Pm[p].Pos[1]-
Nano[n].Pos[1]));
112 if(Dist >
Nano[n].Rad)
continue;
118 for(
int p=0;p<
pNPart();p++){
119 if(
Pm[p].Typ == 2)
continue;
122 for(
int n=0;n<
pNNano();n++){
123 if(VAR_IF_TYPE(
Nano[n].Shape,SHAPE_SPH)){
126 else if(VAR_IF_TYPE(
Nano[n].Shape,SHAPE_CYL)){
129 else if(VAR_IF_TYPE(
Nano[n].Shape,SHAPE_PORE)){
double Cont
Contact/Friction.
double Vel[4]
xyzr Velocity of the particle
void AddRigid()
Add all rigid bodies as a boundary condition.
NANO * Nano
Extra particle.
void PullBead()
Move a particle.
double HeightBoundary(double *Pos, int dir)
Height of the boundary condition depending on the direction.
double Height
Height of the cylinder.
int pType(int p)
Return the type.
double Pos[3]
xyz Position of the particle
double Dx
Spatial separation between particles.
void PushBead()
Move a particle.
int NEdge
Number of particles per edge.
KFORCES Kf
Prefactor of the forces.
double IncrDist
Step to move a particle.
int Old2Move
Old part to move.
int SysShape
Shape of system.
int pNNano()
Number of nanoparticles.
void AddPore(int nNano)
Add a pore as a boundary condition.
void Wave()
Sinusoidal surface wave.
double pPos(int p, int d)
Return back folded position.
void AddCylinder(int nNano)
Add a cylinder as a boundary condition.
void SelectBead(int p)
Select a particle.
PART * Pm
Particle information of all particle.
void AddCircle(int nNano)
Add a circle as a boundary condition.
FORCES * Fm
Array containing the forces for each particle.
int Bead2Move
Bead to move.
int pNPart()
Number of particle.