You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am not sure what the z extent is supposed to be in the CPU version of DPStokes, but it seems like it is somewhat ignoring the zmin, zmax parameters. See for instance this snippet:
domType='DP'nP=2#Number of particleshas_torque=False# Set to True if angular displacements are neededviscosity=0.957e-3#Simulation domain limitsL=128xmin=-L/2; xmax=L/2ymin=-L/2; ymax=L/2H=32zmin=0; zmax=H# Initialize the solver with all the parameterssolver=FCMJoint('cpu')
#Initialize can be called several times in order to change the parameterssolver.Initialize(numberParticles=nP, hydrodynamicRadius=1.0155, kernType=0,
domType=domType, has_torque=has_torque,
xmin=xmin, xmax=xmax, ymin=ymin, ymax=ymax, zmin=zmin, zmax=zmax,
viscosity=viscosity, optInd=0, ref=False)
xP=np.zeros(3*nP, dtype=np.double)
xP[4] +=1.000000;
forces=np.random.normal(0, 1, 3*nP)*0forces[2] =1;
forzzinnp.linspace(zmin, zmax, 10):
xP[2::3]=zzsolver.SetPositions(xP)
V,T=solver.Mdot(forces, np.empty(0))
print('%g %g %g %g\n'% (zz, V[0], V[1], V[2]))
The output of this snippet is:
Setting the unit cell...
unit cell := [-64.0000,64.0000]x[-64.0000,64.0000]x[0.0000,32.0000]
Determining the grid and configuring kernels...
Optimal grid with adjusted extent (optInd=-1):
L_x L_y N_x N_y h %-err
128.08932363729969 128.08932363729969 196 196 0.6535169573331617 0.021627
Candidate grids with user-defined extent (optInd=0,1,..):
N_x h %-err
196 0.6530612244897959 0.021895
200 0.64 0.028949
210 0.6095238095238096 0.049185
216 0.5925925925925926 0.13212
224 0.5714285714285714 0.31513
225 0.5688888888888889 0.34143
240 0.5333333333333333 0.8184
243 0.5267489711934157 0.93652
245 0.5224489795918368 1.0176
250 0.512 1.2257
Adjusting requested Ly for integer grid size...
Final kernel settings:
R_h w_m beta_m
1.0155 6 10.250524583972947
Final grid settings for No wall domain (DP):
(Nx, Ny, Nz) = (196, 197, 91)
hxy = 0.6530612244897959
Lx = 128.0000000000000000
Ly = 128.6530612244897895
z_a = 0.0000000000000000
z_b = 37.8775510204081627
Initializing force grid...
Precomputing solver and planning FFTs...
Solver is ready
Setting initial positions...
Building monopole particle-grid search structures...
Initialization complete.
0 -7.53011e-16 -9.45097e-17 53.3175
3.55556 1.49863e-16 1.10917e-15 53.3178
7.11111 -7.26801e-16 -3.19069e-16 53.9481
Position is outside of z extent Exiting ...
There are some issues with this:
The code seems to recognize the z extend as [zmin, zmax+something]. But should it not be adding a buffer below zmin?
The code fails when given z coordinates clearly inside the zmin, zmax range
For some reason the grid is "corrected" in the Y direction, even when Lx=Ly, and moreover it is setting ny as and odd number!
I am not sure what the z extent is supposed to be in the CPU version of DPStokes, but it seems like it is somewhat ignoring the zmin, zmax parameters. See for instance this snippet:
The output of this snippet is:
There are some issues with this:
@snatesh Could you give me some insights?
Thanks.
The text was updated successfully, but these errors were encountered: