126 using DESCRIPTOR =
typename CELL::descriptor_t;
128 cell.template getFieldPointer<descriptors::BOUZIDI_VELOCITY>();
129 const V tuner =
parameters.template get<descriptors::BOUZIDI_TUNER>();
130 const V lambda =
parameters.template get<descriptors::LAMBDA>();
131 const V conversionFactorVelocity =
132 parameters.template get<descriptors::CONVERSION_FACTOR_VELOCITY>();
133 const V conversionFactorLength =
134 parameters.template get<descriptors::CONVERSION_FACTOR_LENGTH>();
135 const V charLength =
parameters.template get<descriptors::CHAR_LENGTH>();
136 const int fd_degree =
parameters.template get<
146 cell.computeU(u0_latt.data());
147 u0_phys = u0_latt * conversionFactorVelocity;
151 for (
int iPop = 1; iPop < DESCRIPTOR::q; ++iPop) {
154 const auto opp_bouzidi_dist =
155 cell.template getFieldComponent<descriptors::BOUZIDI_DISTANCE>(
157 normal = cell.template getField<
161 if (normal_norm != V {0.}) {
162 normal = normal / normal_norm;
177 if ((opp_bouzidi_dist >= 0) && (normal_norm != 0)) {
184 if (
norm(distance) != V {0.}) {
188 u1_phys = u1_latt * conversionFactorVelocity;
189 distance = V(2) * delta * normal + distance_bc;
194 u2_phys = u2_latt * conversionFactorVelocity;
196 if (u1_phys > u2_phys) {
204 if (
norm(u1_phys) > 0) {
206 tangent = u1_phys - normal * (u1_phys[0] * normal[0] +
207 u1_phys[1] * normal[1] +
208 u1_phys[2] * normal[2]);
209 tangent /=
norm(tangent);
210 if (tangent[1] < 1e-3) {
213 if (tangent[2] < 1e-3) {
216 tangent /=
norm(tangent);
219 auto kn = lambda / charLength;
220 V lambda_eff = lambda;
222 lambda_eff = 1 / (1 / lambda + tuner / charLength);
226 if (fd_degree == 0) {
227 us_phys = tuner * u1_phys;
229 else if (fd_degree == 1) {
232 (lambda_eff + delta * conversionFactorLength *
norm(normal)) *
235 else if (fd_degree == 2) {
236 us_phys = sign * lambda_eff /
238 delta * conversionFactorLength *
norm(normal)) *
239 (2 * u1_phys - 0.5 * u2_phys);
252 us_t_phys = us_phys - (us_phys * normal) * normal;
258 us_t_phys / conversionFactorVelocity;
259 cell.template setField<descriptors::VELOCITY2>(us_t_phys);
262 V vel_slip_coeff = c * us_t_lattice;
263 bouzidiVel[iPop_opposite] = vel_slip_coeff;
271 cell.template setField<descriptors::NORMAL>(normal);
272 cell.template setField<TANGENT>(tangent);