@@ -132,71 +132,6 @@ void MicropolarModel_Bender2017::step()
132132 delta_angAcceli_avx += ((vi_avx - vj_avx) % V_gradW) * (nut_density_i_intertiaInverse * density0_avx);
133133 );
134134
135- // ////////////////////////////////////////////////////////////////////////
136- // Boundary
137- // ////////////////////////////////////////////////////////////////////////
138- if (sim->getBoundaryHandlingMethod () == BoundaryHandlingMethods::Akinci2012)
139- {
140- forall_boundary_neighbors_avx (
141- const Vector3f8 vj_avx = convertVec_zero (&sim->getNeighborList (fluidModelIndex, pid, i)[j], &bm_neighbor->getVelocity (0 ), count);
142-
143- // Viscosity
144- const Vector3f8 xixj = xi_avx - xj_avx;
145- const Vector3f8 &omegaij = omegai_avx; // ToDo: omega_j
146- const Scalarf8 Vj_avx = convert_zero (&sim->getNeighborList (fluidModelIndex, pid, i)[j], &bm_neighbor->getVolume (0 ), count);
147- const Vector3f8 gradW = CubicKernel_AVX::gradW (xixj);
148- const Scalarf8 mj_avx = density0_avx * Vj_avx;
149-
150- // XSPH for angular velocity field
151- // delta_angAcceli_avx -= omegaij * factor_avx * (mj_avx / density_i_avx) * CubicKernel_AVX::W(xixj);
152-
153- // difference curl
154- const Vector3f8 a = (omegaij % gradW) * (nut_density_i * mj_avx);
155- delta_ai_avx += a;
156- delta_angAcceli_avx += ((vi_avx - vj_avx) % gradW) * (nut_density_i_intertiaInverse * mj_avx);
157- bm_neighbor->addForce (xj_avx, -a * mi_avx, count);
158- );
159- }
160- else if (sim->getBoundaryHandlingMethod () == BoundaryHandlingMethods::Koschier2017)
161- {
162- forall_density_maps (
163- Vector3r vj;
164- bm_neighbor->getPointVelocity (xi, vj);
165- const Vector3r &omegaij = omegai; // ToDo: omega_j
166-
167- // XSPH for angular velocity field
168- // angAcceli -= invDt * m_inertiaInverse * zeta * (density0 / density_i) * omegaij * rho;
169-
170- // difference curl
171- const Vector3r a = nu_t * density0 / density_i * (omegaij.cross (gradRho));
172- ai += a;
173- angAcceli += nu_t * density0 / density_i * m_inertiaInverse * ((vi - vj).cross (gradRho));
174-
175- bm_neighbor->addForce (xj, -m_model->getMass (i) * a);
176- );
177- }
178- else if (sim->getBoundaryHandlingMethod () == BoundaryHandlingMethods::Bender2019)
179- {
180- forall_volume_maps (
181- Vector3r vj;
182- bm_neighbor->getPointVelocity (xj, vj);
183- const Vector3r omegaij = omegai; // ToDo: omega_j
184-
185- const Vector3r xij = xi - xj;
186- const Vector3r gradW = sim->gradW (xij);
187-
188- // XSPH for angular velocity field
189- // angAcceli -= (invDt * m_inertiaInverse * zeta * (density0 * Vj / density_i) * sim->W(xij)) * omegaij;
190-
191- // difference curl
192- const Vector3r a = (nu_t * 1.0 / density_i * density0 * Vj) * (omegaij.cross (gradW));
193- ai += a;
194- angAcceli += (nu_t * 1.0 / density_i * m_inertiaInverse * density0 * Vj) * (vi - vj).cross (gradW);
195-
196- bm_neighbor->addForce (xj, -m_model->getMass (i) * a);
197- );
198- }
199-
200135 ai[0 ] += delta_ai_avx.x ().reduce ();
201136 ai[1 ] += delta_ai_avx.y ().reduce ();
202137 ai[2 ] += delta_ai_avx.z ().reduce ();
@@ -283,73 +218,6 @@ void MicropolarModel_Bender2017::step()
283218 angAcceli += nu_t * 1.0 /density_i * m_inertiaInverse * (m_model->getMass (neighborIndex) * (vi - vj).cross (gradW));
284219 );
285220
286- // ////////////////////////////////////////////////////////////////////////
287- // Boundary
288- // ////////////////////////////////////////////////////////////////////////
289- if (sim->getBoundaryHandlingMethod () == BoundaryHandlingMethods::Akinci2012)
290- {
291- forall_boundary_neighbors (
292- const Vector3r &vj = bm_neighbor->getVelocity (neighborIndex);
293- const Vector3r &omegaj = Vector3r::Zero ();// m_omega[neighborIndex];
294-
295- // Viscosity
296- const Vector3r xij = xi - xj;
297- const Vector3r omegaij = omegai - omegaj;
298- const Vector3r gradW = sim->gradW (xij);
299-
300- // XSPH for angular velocity field
301- // angAcceli -= invDt * m_inertiaInverse * zeta * (density0 * bm_neighbor->getVolume(neighborIndex) / density_i) * omegaij * sim->W(xij);
302-
303- // Viscosity
304- // angAcceli += d * m_inertiaInverse * zeta * (density0 * bm_neighbor->getVolume(neighborIndex) / density_i) * omegaij.dot(xij) / (xij.squaredNorm() + 0.01*h2) * gradW;
305-
306- // difference curl
307- const Vector3r a = nu_t * 1.0 / density_i * density0 * bm_neighbor->getVolume (neighborIndex) * (omegaij.cross (gradW));
308- ai += a;
309- angAcceli += nu_t * 1.0 / density_i * m_inertiaInverse * (density0 * bm_neighbor->getVolume (neighborIndex) * (vi - vj).cross (gradW));
310-
311- bm_neighbor->addForce (xj, -model->getMass (i) * a);
312- );
313- }
314- else if (sim->getBoundaryHandlingMethod () == BoundaryHandlingMethods::Koschier2017)
315- {
316- forall_density_maps (
317- Vector3r vj;
318- bm_neighbor->getPointVelocity (xi, vj);
319- const Vector3r omegaij = omegai; // ToDo: omega_j
320-
321- // // XSPH for angular velocity field
322- // angAcceli -= invDt * m_inertiaInverse * zeta * (density0 / density_i) * omegaij * rho;
323-
324- // difference curl
325- const Vector3r a = nu_t * density0 / density_i * (omegaij.cross (gradRho));
326- ai += a;
327- angAcceli += nu_t * density0 / density_i * m_inertiaInverse * ((vi - vj).cross (gradRho));
328-
329- bm_neighbor->addForce (xj, -model->getMass (i) * a);
330- );
331- }
332- else if (sim->getBoundaryHandlingMethod () == BoundaryHandlingMethods::Bender2019)
333- {
334- forall_volume_maps (
335- Vector3r vj;
336- bm_neighbor->getPointVelocity (xj, vj);
337- const Vector3r &omegaij = omegai; // ToDo: omega_j
338-
339- const Vector3r xij = xi - xj;
340- const Vector3r gradW = sim->gradW (xij);
341-
342- // // XSPH for angular velocity field
343- // angAcceli -= invDt * m_inertiaInverse * zeta * (density0 * Vj / density_i) * omegaij * sim->W(xij);
344-
345- // difference curl
346- const Vector3r a = nu_t * 1.0 / density_i * density0 * Vj * (omegaij.cross (gradW));
347- ai += a;
348- angAcceli += nu_t * 1.0 / density_i * m_inertiaInverse * (density0 * Vj * (vi - vj).cross (gradW));
349-
350- bm_neighbor->addForce (xj, -model->getMass (i) * a);
351- );
352- }
353221 angAcceli -= 2.0 * m_inertiaInverse * nu_t * omegai;
354222 }
355223 }
0 commit comments