//Initialize Coordinates public void InitCoords(VecI initUcell, double density) { int nx, ny, nz; VecR c, gap; int n = 0; Console.WriteLine("density = " + density); gap = new VecR(region.x / initUcell.x, region.y / initUcell.y, region.z / initUcell.z); for (nz = 0; nz < initUcell.z; nz++) { for (ny = 0; ny < initUcell.y; ny++) { for (nx = 0; nx < initUcell.x; nx++) { c.x = nx + 0.5; c.y = ny + 0.5; c.z = nz + 1.5; c.x *= gap.x; c.y *= gap.y; c.z *= gap.z; c.x += -0.5 * region.x; c.y += -0.5 * region.y; c.z += -0.5 * region.z; Node b = new Node(c, c, c); nodes.Add(b); //Introduce connection if (nx > 0.5) { nodes[n - 1].AddCon(n); nodes[n].AddCon(n - 1); } n++; } } } }
public void SetParams() { //Cut-off radius rCut = Math.Pow(2.0, 1.0 / 6.0); density = 0.8; initUcell = new VecI(3, 3, 3); //Firstly manually assign the cell nMol = initUcell.x * initUcell.y * initUcell.z; velMag = Math.Sqrt(NDIM * (1.0 - 1.0 / nMol) * temperature); double fac = 1.0 / Math.Pow(density, 1.0 / 3.0); region = new VecR(fac * initUcell.x, fac * initUcell.y, fac * initUcell.z); }
public void SetParams() { //Cut-off radius rCut = Math.Pow(2.0, 1.0 / 6.0); // density = 0.85; initUcell = new VecI(3, 3, 3); //Firstly manually assign the cell nMol = initUcell.x * initUcell.y * initUcell.z; velMag = Math.Sqrt(NDIM * (1.0 - 1.0 / nMol) * temperature); double fac = 1.0 / Math.Pow(density, 1.0 / 3.0); region = new VecR(fac * initUcell.x, fac * initUcell.y, fac * initUcell.z); //Set Diffusion Params nValDiffuse = 10; nBuffDiffuse = 1; limitDiffusivaAv = 100; stepDiffuse = 10; }