Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
fluid_dynamics_vans_matrix_free_operators.cc
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) 2025-2026 The Lethe Authors
2// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
3
5
6template <int dim, typename number>
7void
9 const VectorType &newton_step)
10{
11 // Assert that a correct stabilization method is used
12 // Currently the VANS solver only supports pspg_supg
13 AssertThrow(this->stabilization ==
15 ExcMessage(
16 "PSPG-SUPG stabilization is the only stabilization method"
17 " currently supported by the VANS matrix-free solver"));
18
21
22 // Evaluate the grad-div stabilization constant
23 const unsigned int n_cells = this->matrix_free.n_cell_batches();
24 FECellIntegrator integrator(this->matrix_free);
25
26 grad_div_gamma.reinit(n_cells, integrator.n_q_points);
27
28 const double kinematic_viscosity =
29 this->properties_manager->get_rheology()->get_kinematic_viscosity();
30
31 for (unsigned int cell = 0; cell < n_cells; ++cell)
32 {
33 integrator.reinit(cell);
34 integrator.read_dof_values_plain(newton_step);
35
36 // Integrator must update the values since the velocity
37 // magnitude is used to calculate the grad-div stabilization constant.
38 integrator.evaluate(EvaluationFlags::values);
39 for (const auto q : integrator.quadrature_point_indices())
40 {
41 // Get the velocity magnitude to calculate the grad_div constant
42 VectorizedArray<number> u_mag_squared = 0;
43 for (int k = 0; k < dim; ++k)
44 u_mag_squared +=
45 Utilities::fixed_power<2>(integrator.get_value(q)[k]);
46 VectorizedArray<number> u = std::sqrt(u_mag_squared);
47 grad_div_gamma(cell, q) =
48 kinematic_viscosity + cfd_dem_parameters.cstar * u;
49 }
50 }
51}
52
53template <int dim, typename number>
54void
56{
58
59 if (!this->forcing_function)
60 return;
61
62 const unsigned int n_cells = this->matrix_free.n_cell_batches() +
63 this->matrix_free.n_ghost_cell_batches();
64
65 FECellIntegrator integrator(this->matrix_free);
66
67 mass_source_terms.reinit(n_cells, integrator.n_q_points);
68
69 for (unsigned int cell = 0; cell < n_cells; ++cell)
70 {
71 integrator.reinit(cell);
72 for (const auto q : integrator.quadrature_point_indices())
73 {
74 // The mass source term is the last component of the forcing function
75 mass_source_terms(cell, q) =
77 integrator.quadrature_point(q),
78 dim);
79 }
80 }
81}
82
83template <int dim, typename number>
84void
86 const DoFHandler<dim> &void_fraction_dof_handler,
87 const LinearAlgebra::distributed::Vector<double> &void_fraction_solution,
88 const LinearAlgebra::distributed::Vector<double>
89 &time_derivative_void_fraction_solution)
90{
91 this->timer.enter_subsection("operator::compute_void_fraction");
92
93 const unsigned int n_cells = this->matrix_free.n_cell_batches();
94 FECellIntegrator integrator(this->matrix_free);
95
96
97 void_fraction.reinit(n_cells, integrator.n_q_points);
98 void_fraction_gradient.reinit(n_cells, integrator.n_q_points);
99 time_derivative_void_fraction.reinit(n_cells, integrator.n_q_points);
100
101
102 FEValues<dim> fe_values(*(this->matrix_free.get_mapping_info().mapping),
103 void_fraction_dof_handler.get_fe(),
104 this->matrix_free.get_quadrature(),
105 update_values | update_gradients);
106
107 std::vector<double> cell_void_fraction(fe_values.n_quadrature_points);
108 std::vector<double> cell_time_derivative_void_fraction(
109 fe_values.n_quadrature_points);
110
111 std::vector<Tensor<1, dim>> cell_void_fraction_gradient(
112 fe_values.n_quadrature_points);
113
114 // When the operator is built on a multigrid level (LSMG), the cell iterator
115 // returned by the MatrixFree is a level iterator (inactive on coarser
116 // levels). In that case we must construct a level DoF cell iterator on the
117 // auxiliary DoFHandler manually; as_dof_handler_iterator() only works for
118 // active cells. We also cannot use FEValues::get_function_values(global_vec)
119 // because its size check compares against dh.n_dofs() rather than
120 // dh.n_dofs(level); we go through get_function_values_from_local_dof_values
121 // instead, fed by the level cell's mg dof values.
122 const unsigned int mg_level = this->matrix_free.get_mg_level();
123 const bool on_mg_level = mg_level != numbers::invalid_unsigned_int;
124
125 const unsigned int dofs_per_cell =
126 void_fraction_dof_handler.get_fe().n_dofs_per_cell();
127 Vector<double> local_void_fraction(dofs_per_cell);
128 Vector<double> local_time_derivative_void_fraction(dofs_per_cell);
129 std::vector<types::global_dof_index> level_dof_indices(dofs_per_cell);
130
131 for (unsigned int cell = 0; cell < n_cells; ++cell)
132 {
133 for (auto lane = 0u;
134 lane < this->matrix_free.n_active_entries_per_cell_batch(cell);
135 lane++)
136 {
137 const auto tria_cell =
138 this->matrix_free.get_cell_iterator(cell, lane);
139
140 // Branch that is taken when LSMG preconditioner is used
141 if (on_mg_level)
142 {
143 typename DoFHandler<dim>::level_cell_iterator dof_cell(
144 &tria_cell->get_triangulation(),
145 tria_cell->level(),
146 tria_cell->index(),
147 &void_fraction_dof_handler);
148 fe_values.reinit(dof_cell);
149
150 // get_dof_values() asserts is_active() in deal.II 9.8 and above
151 // so we gather level dof values manually via the mg indices.
152 dof_cell->get_mg_dof_indices(level_dof_indices);
153 for (unsigned int i = 0; i < dofs_per_cell; ++i)
154 {
155 const auto idx = level_dof_indices[i];
156 local_void_fraction[i] = void_fraction_solution[idx];
157 local_time_derivative_void_fraction[i] =
158 time_derivative_void_fraction_solution[idx];
159 }
160
161 // Evaluate at quadrature points from the local mg dof values
162 // (FEValuesBase::get_function_values_from_local_dof_values is
163 // not available, so we do it via shape functions directly).
164 for (const auto q : fe_values.quadrature_point_indices())
165 {
166 cell_void_fraction[q] = 0.;
167 cell_time_derivative_void_fraction[q] = 0.;
168 cell_void_fraction_gradient[q] = 0.;
169 for (unsigned int i = 0; i < dofs_per_cell; ++i)
170 {
171 const double phi = fe_values.shape_value(i, q);
172 const auto gphi = fe_values.shape_grad(i, q);
173 cell_void_fraction[q] += local_void_fraction[i] * phi;
174 cell_time_derivative_void_fraction[q] +=
175 local_time_derivative_void_fraction[i] * phi;
176 cell_void_fraction_gradient[q] +=
177 local_void_fraction[i] * gphi;
178 }
179 }
180 } // on_mg_level
181 // Branch that is used when GCMG preconditioner is used
182 else
183 {
184 fe_values.reinit(
185 tria_cell->as_dof_handler_iterator(void_fraction_dof_handler));
186
187 fe_values.get_function_values(void_fraction_solution,
188 cell_void_fraction);
189 fe_values.get_function_values(
190 time_derivative_void_fraction_solution,
191 cell_time_derivative_void_fraction);
192 fe_values.get_function_gradients(void_fraction_solution,
193 cell_void_fraction_gradient);
194 }
195
196 for (const auto q : fe_values.quadrature_point_indices())
197 {
198 for (int c = 0; c < dim; ++c)
199 void_fraction_gradient[cell][q][c][lane] =
200 cell_void_fraction_gradient[q][c];
201
202 void_fraction[cell][q][lane] = cell_void_fraction[q];
203 time_derivative_void_fraction[cell][q][lane] =
204 cell_time_derivative_void_fraction[q];
205 }
206 }
207 }
208
209 this->timer.leave_subsection("operator::compute_void_fraction");
210}
211
212template <int dim, typename number>
213void
215 const DoFHandler<dim> &fp_force_dof_handler,
216 const LinearAlgebra::distributed::Vector<double> &fp_force_solution,
217 const DoFHandler<dim> &fp_drag_dof_handler,
218 const LinearAlgebra::distributed::Vector<double> &fp_drag_solution,
219 const DoFHandler<dim> &particle_velocity_dof_handler,
220 const LinearAlgebra::distributed::Vector<double> &particle_velocity_solution,
221 const DoFHandler<dim> &momentum_transfer_coefficient_dof_handler,
222 const LinearAlgebra::distributed::Vector<double>
223 &momentum_transfer_coefficient_solution)
224{
225 this->timer.enter_subsection("operator::compute_particle_fluid_forces");
226
227
228 // If the coupling is explicit, we do not need to gather the momentum transfer
229 // and the particle velocity. Consequently, these FEValues will never be
230 // reinit and used.
231 const bool is_explicit = cfd_dem_parameters.drag_coupling ==
233
234 // If the coupling is implicit, we do not need to gather the drag force since
235 // the drag is calculated from the momentum_transfer term. Consequently, this
236 // FEValues will never be reinit and used.
237 const bool is_implicit = cfd_dem_parameters.drag_coupling !=
239
240 // The calculation of the volumetric source term arising from the force
241 // requires the density of the fluid at the particle location. Right now the
242 // model only supports the usage of a constant density. Consequently, we can
243 // gather the reference density as a constant density.
244 AssertThrow(
245 this->properties_manager->density_is_constant(),
246 ExcMessage(
247 "The matrix-free VANS operator does not support variable density. Simulation will abort"));
248 const double inv_density =
249 1. / this->properties_manager->get_density()->get_density_ref();
250 // Ensure that the inverse density is well-defined before moving on to
251 // gathering the terms.
252 AssertIsFinite(inv_density);
253
254 const unsigned int n_cells = this->matrix_free.n_cell_batches();
255 FECellIntegrator integrator(this->matrix_free);
256
257 particle_fluid_force.reinit(n_cells, integrator.n_q_points);
258 particle_fluid_drag.reinit(n_cells, integrator.n_q_points);
259 particle_velocity.reinit(n_cells, integrator.n_q_points);
260 momentum_transfer_coefficient.reinit(n_cells, integrator.n_q_points);
261
262
263 // We create one FE_values per field that we wish to interpolate. This comes
264 // with a significant overhead, but that's life.
265 FEValues<dim> fe_values_force(*(this->matrix_free.get_mapping_info().mapping),
266 fp_force_dof_handler.get_fe(),
267 this->matrix_free.get_quadrature(),
268 update_values);
269
270 FEValues<dim> fe_values_drag(*(this->matrix_free.get_mapping_info().mapping),
271 fp_drag_dof_handler.get_fe(),
272 this->matrix_free.get_quadrature(),
273 update_values);
274
275 FEValues<dim> fe_values_particle_velocity(
276 *(this->matrix_free.get_mapping_info().mapping),
277 particle_velocity_dof_handler.get_fe(),
278 this->matrix_free.get_quadrature(),
279 update_values);
280
281 FEValues<dim> fe_values_momentum_transfer_coefficient(
282 *(this->matrix_free.get_mapping_info().mapping),
283 momentum_transfer_coefficient_dof_handler.get_fe(),
284 this->matrix_free.get_quadrature(),
285 update_values);
286
287 // Data structures for the information we will gather from the FEValues.
288 // These will be stored within tables stored within the operator.
289 std::vector<Tensor<1, dim>> cell_fp_force(
290 fe_values_force.n_quadrature_points);
291 std::vector<Tensor<1, dim>> cell_fp_drag(fe_values_drag.n_quadrature_points);
292 std::vector<Tensor<1, dim>> cell_particle_velocity(
293 fe_values_particle_velocity.n_quadrature_points);
294 std::vector<double> cell_momentum_transfer_coefficient(
295 fe_values_force.n_quadrature_points, 0.);
296
297 // Extractor for the velocity
298 constexpr FEValuesExtractors::Vector vector_index(0);
299
300 // When the operator is built on a multigrid level (LSMG), the cell iterator
301 // returned by the MatrixFree is a level iterator (inactive on coarser
302 // levels). In that case we must construct level DoF cell iterators on the
303 // auxiliary DoFHandlers manually, and gather dof values via the level cell
304 // iterator (which respects level_dof_access=true); FEValues' global
305 // get_function_values would otherwise fail its size check against
306 // dh.n_dofs() rather than dh.n_dofs(level).
307 const unsigned int mg_level = this->matrix_free.get_mg_level();
308 const bool on_mg_level = mg_level != numbers::invalid_unsigned_int;
309
310 // Data structures for the information we will gather for the lsmg.
311 Vector<double> local_fp_force(
312 fp_force_dof_handler.get_fe().n_dofs_per_cell());
313 Vector<double> local_fp_drag(fp_drag_dof_handler.get_fe().n_dofs_per_cell());
314 Vector<double> local_particle_velocity(
315 particle_velocity_dof_handler.get_fe().n_dofs_per_cell());
316 Vector<double> local_momentum_transfer_coefficient(
317 momentum_transfer_coefficient_dof_handler.get_fe().n_dofs_per_cell());
318
319 for (unsigned int cell = 0; cell < n_cells; ++cell)
320 {
321 for (auto lane = 0u;
322 lane < this->matrix_free.n_active_entries_per_cell_batch(cell);
323 lane++)
324 {
325 const auto tria_cell =
326 this->matrix_free.get_cell_iterator(cell, lane);
327
328 // Branch that is used in the case of the LSMG preconditioner
329 if (on_mg_level)
330 {
331 // Helper that gathers level dof values via mg indices
332 // and evaluates a vector-valued field at the
333 // quadrature points. We also avoid the FEValuesViews
334 // '_from_local_dof_values' overload because it is not
335 // instantiated for our Vector<double> input type.
336 const auto gather_and_eval_vector =
337 [&](FEValues<dim> &fev,
338 const DoFHandler<dim> &dh,
339 const LinearAlgebra::distributed::Vector<double> &vec,
340 Vector<double> &local,
341 std::vector<Tensor<1, dim>> &output) {
342 typename DoFHandler<dim>::level_cell_iterator dof_cell(
343 &tria_cell->get_triangulation(),
344 tria_cell->level(),
345 tria_cell->index(),
346 &dh);
347 fev.reinit(dof_cell);
348
349 const unsigned int dpc = dh.get_fe().n_dofs_per_cell();
350 std::vector<types::global_dof_index> indices(dpc);
351 dof_cell->get_mg_dof_indices(indices);
352 for (unsigned int i = 0; i < dpc; ++i)
353 local[i] = vec[indices[i]];
354
355 for (const auto q : fev.quadrature_point_indices())
356 {
357 Tensor<1, dim> v;
358 for (unsigned int i = 0; i < dpc; ++i)
359 v += local[i] * fev[vector_index].value(i, q);
360 output[q] = v;
361 }
362 };
363
364 gather_and_eval_vector(fe_values_force,
365 fp_force_dof_handler,
366 fp_force_solution,
367 local_fp_force,
368 cell_fp_force);
369
370 if (is_explicit)
371 {
372 gather_and_eval_vector(fe_values_drag,
373 fp_drag_dof_handler,
374 fp_drag_solution,
375 local_fp_drag,
376 cell_fp_drag);
377 }
378
379 if (is_implicit)
380 {
381 gather_and_eval_vector(fe_values_particle_velocity,
382 particle_velocity_dof_handler,
383 particle_velocity_solution,
384 local_particle_velocity,
385 cell_particle_velocity);
386
387 // Momentum transfer coefficient (scalar, single-component
388 // FESystem): same gather pattern, but evaluate a scalar.
389 typename DoFHandler<dim>::level_cell_iterator dof_cell_mtc(
390 &tria_cell->get_triangulation(),
391 tria_cell->level(),
392 tria_cell->index(),
393 &momentum_transfer_coefficient_dof_handler);
394 fe_values_momentum_transfer_coefficient.reinit(dof_cell_mtc);
395
396 const unsigned int mtc_dofs_per_cell =
397 momentum_transfer_coefficient_dof_handler.get_fe()
398 .n_dofs_per_cell();
399 std::vector<types::global_dof_index> mtc_indices(
400 mtc_dofs_per_cell);
401 dof_cell_mtc->get_mg_dof_indices(mtc_indices);
402 for (unsigned int i = 0; i < mtc_dofs_per_cell; ++i)
403 local_momentum_transfer_coefficient[i] =
404 momentum_transfer_coefficient_solution[mtc_indices[i]];
405
406 for (const auto q : fe_values_momentum_transfer_coefficient
407 .quadrature_point_indices())
408 {
409 cell_momentum_transfer_coefficient[q] = 0.;
410 for (unsigned int i = 0; i < mtc_dofs_per_cell; ++i)
411 cell_momentum_transfer_coefficient[q] +=
412 local_momentum_transfer_coefficient[i] *
413 fe_values_momentum_transfer_coefficient.shape_value(
414 i, q);
415 }
416 }
417 } // on_mg_level
418 // Branch that is used for GCMG preconditioner
419 else
420 {
421 // Reinit the particle-fluid force
422 fe_values_force.reinit(
423 tria_cell->as_dof_handler_iterator(fp_force_dof_handler));
424
425 fe_values_force[vector_index].get_function_values(
426 fp_force_solution, cell_fp_force);
427
428 // Drag only needs to be re-init and collected if the drag model
429 // is explicit
430 if (is_explicit)
431 {
432 fe_values_drag.reinit(
433 tria_cell->as_dof_handler_iterator(fp_drag_dof_handler));
434
435 fe_values_drag[vector_index].get_function_values(
436 fp_drag_solution, cell_fp_drag);
437 }
438
439 if (is_implicit)
440 {
441 // Reinit the particle velocity
442 fe_values_particle_velocity.reinit(
443 tria_cell->as_dof_handler_iterator(
444 particle_velocity_dof_handler));
445
446 fe_values_particle_velocity[vector_index].get_function_values(
447 particle_velocity_solution, cell_particle_velocity);
448
449 // Reinit the momentum transfer coefficient
450 fe_values_momentum_transfer_coefficient.reinit(
451 tria_cell->as_dof_handler_iterator(
452 momentum_transfer_coefficient_dof_handler));
453
454 fe_values_momentum_transfer_coefficient.get_function_values(
455 momentum_transfer_coefficient_solution,
456 cell_momentum_transfer_coefficient);
457 }
458 }
459
460 for (const auto q : fe_values_force.quadrature_point_indices())
461 {
462 for (int c = 0; c < dim; ++c)
463 {
464 // The force applied on the fluid from the particle is (-) the
465 // force applied on the particles by the fluid following
466 // Newton's third law. They are also divided by the density of
467 // the fluid phase.
468 particle_fluid_force[cell][q][c][lane] =
469 -cell_fp_force[q][c] * inv_density;
470 particle_fluid_drag[cell][q][c][lane] =
471 -cell_fp_drag[q][c] * inv_density;
472
473 // The particle velocity is not divided by the fluid density.
474 particle_velocity[cell][q][c][lane] =
475 cell_particle_velocity[q][c];
476 }
477 // The momentum transfer coefficient does not need to be divided
478 // by the density since it is by construction divided by density.
479 // This is something to keep in mind later on if we allow for
480 // a variable density.
481 momentum_transfer_coefficient[cell][q][lane] =
482 cell_momentum_transfer_coefficient[q];
483 }
484 }
485 }
486
487 this->timer.leave_subsection("operator::compute_particle_fluid_forces");
488}
489
490/**
491 * Calculates the Jacobian of the VANS equations (model A). Here, we note f_pf
492 * the forces from the particles to the fluid (including the drag β(u_p-u)),
493 * f the body force (forcing function and dynamic flow control force), m the
494 * mass source term (last component of the forcing function) and
495 * (∇u)_ik = ∂u_i/∂x_k. The viscous terms are the weak form of
496 * -εν∇·(∇u+∇u^T), that is ν(∇v,ε(∇u+∇u^T)) + ν(v,(∇u+∇u^T)·∇ε).
497 * The expressions calculated in this cell integral are:
498 * (Continuity equation)
499 * (q,ε∇·δu) + (q,δu·∇ε) +
500 * (VANS equations)
501 * \+ (v, ε ∂t δu) -> Time derivative
502 * \+ (v, ε (u·∇)δu) + (v, ε (δu·∇)u) -> Advection
503 * \- (∇·v, ε δp) - (v,δp∇ε) -> Pressure
504 * \+ (v, βδu) -> Drag force (positive since the drag in f_pf is β(u_p-u))
505 * \+ (v, m δu) -> Momentum of the mass source m
506 * \+ ν(∇v,ε∇δu) + ν(∇v,ε∇δu^T) + ν(v,∇δu·∇ε) + ν(v,∇δu^T·∇ε) -> Viscous
507 * plus three additional terms in the case of SUPG-PSPG stabilization:
508 * \+ (ε∂t δu + ε(u·∇)δu + ε(δu·∇)u + ε∇δp - εν∆δu - νɛ∇(∇·δu) + βδu + mδu)
509 * τ∇q (PSPG Jacobian)
510 * \+ (ε∂t δu + ε(u·∇)δu + ε(δu·∇)u + ε∇δp - εν∆δu - νɛ∇(∇·δu) + βδu + mδu)
511 * τ(u·∇)v (SUPG Jacobian P.1)
512 * \+ (ε∂t u + ε(u·∇)u + ε∇p - εν∆u - νɛ∇(∇·u) - εf - f_pf + mu)τ(δu·∇)v
513 * (SUPG Jacobian P.2),
514 * and in the case of additional grad-div stabilization:
515 * \+ (∇·v,γ(ɛ∇·δu+δu·∇ɛ)) (grad-div term)
516 * The derivatives of τ and γ with respect to u are neglected.
517 */
518template <int dim, typename number>
519void
521 FECellIntegrator &integrator) const
522{
523 if (this->enable_hessians_jacobian)
524 integrator.evaluate(EvaluationFlags::values | EvaluationFlags::gradients |
525 EvaluationFlags::hessians);
526 else
527 integrator.evaluate(EvaluationFlags::values | EvaluationFlags::gradients);
528
529 const unsigned int cell = integrator.get_current_cell_index();
530
531 // Solid-cell mask (1.0 for fluid lanes, 0.0 for solid lanes).
532 VectorizedArray<number> cell_mask(1.0);
533 if (this->has_solids)
534 {
535 AssertIndexRange(cell, this->solid_cell_mask.size());
536 cell_mask = this->solid_cell_mask[cell];
537 }
538
539 // To identify whether the problem is transient or steady
540 bool transient =
541 (time_stepping_is_bdf(this->simulation_control->get_assembly_method())) ?
542 true :
543 false;
544
545 const double kinematic_viscosity =
546 this->properties_manager->get_rheology()->get_kinematic_viscosity();
547
548 // Vector for BDF coefficients
549 const Vector<double> *bdf_coefs;
550 if (transient)
551 bdf_coefs = &this->simulation_control->get_bdf_coefficients();
552
553 for (const auto q : integrator.quadrature_point_indices())
554 {
555 // Gather void fraction value and gradient
556 auto vf_value = this->void_fraction(cell, q);
557 auto vf_gradient = this->void_fraction_gradient(cell, q);
558
559 Tensor<1, dim, VectorizedArray<number>> source_value;
560
561 // Gather particle-fluid force, will be zero if they have not been
562 // been projected or if there are no particles in the simulation.
563 auto pf_force_value = this->particle_fluid_force(cell, q);
564 auto pf_drag_value = this->particle_fluid_drag(cell, q);
565 auto p_velocity = this->particle_velocity(cell, q);
566 auto beta_momentum_transfer =
567 this->momentum_transfer_coefficient(cell, q);
568
569 // Add to source term the particle-fluid force and the explicit drag
570 // force
571 source_value = pf_force_value + pf_drag_value;
572
573 // Evaluate source term function if enabled
574 VectorizedArray<number> mass_source = 0.;
575 if (this->forcing_function)
576 {
577 source_value += vf_value * this->forcing_terms(cell, q);
578 mass_source = this->mass_source_terms(cell, q);
579 }
580
581 // Add to source term the dynamic flow control force (zero if not
582 // enabled)
583 source_value += vf_value * this->beta_force;
584
585 // Gather the original value/gradient
586 typename FECellIntegrator::value_type value = integrator.get_value(q);
587 typename FECellIntegrator::gradient_type gradient =
588 integrator.get_gradient(q);
589 typename FECellIntegrator::gradient_type hessian_diagonal;
590 typename FECellIntegrator::hessian_type hessian;
591
592 // The strong form of the residual requires both the laplacian
593 // and the gradient of the divergence of the velocity field. The
594 // hessians are only evaluated if they are enabled in the Jacobian. This
595 // flag differs from the residual one on the multigrid levels.
596 if (this->enable_hessians_jacobian)
597 {
598 hessian_diagonal = integrator.get_hessian_diagonal(q);
599 hessian = integrator.get_hessian(q);
600 }
601
602 // Result value/gradient we will use
603 typename FECellIntegrator::value_type value_result;
604 typename FECellIntegrator::gradient_type gradient_result;
605 typename FECellIntegrator::hessian_type hessian_result;
606
607 // Gather previous values of the velocity and the pressure
608 auto previous_values = this->nonlinear_previous_values(cell, q);
609 auto previous_gradient = this->nonlinear_previous_gradient(cell, q);
610 auto previous_hessian_diagonal =
612 auto previous_hessian = this->nonlinear_previous_hessian(cell, q);
613
614 // Add the drag force with the momentum coupling
615 for (int d = 0; d < dim; ++d)
616 source_value[d] +=
617 beta_momentum_transfer * (p_velocity[d] - previous_values[d]);
618
619 Tensor<1, dim + 1, VectorizedArray<number>> previous_time_derivatives;
620 if (transient)
621 previous_time_derivatives =
623
624 // Get stabilization parameter
625 const auto tau = this->stabilization_parameter[cell][q];
626
627 // Weak form Jacobian
628 value_result[dim] = 0;
629 for (int i = 0; i < dim; ++i)
630 {
631 // The first two calculations are assignments (=) instead of sums
632 // (+=) since they are the first contributions to the results.
633 // ν(∇v,ɛ∇δu)
634 gradient_result[i] = kinematic_viscosity * vf_value * gradient[i];
635 // -(v,δp∇ɛ)
636 value_result[i] = -vf_gradient[i] * value[dim];
637 // -(∇·v,ɛδp)
638 gradient_result[i][i] += -vf_value * value[dim];
639 // +(q,ɛ∇·δu)
640 value_result[dim] += vf_value * gradient[i][i];
641 // +(q,∇ɛ·δu)
642 value_result[dim] += vf_gradient[i] * value[i];
643 // +(v, βδu)
644 value_result[i] += beta_momentum_transfer * value[i];
645 // +(v, mδu)
646 value_result[i] += mass_source * value[i];
647
648 for (int k = 0; k < dim; ++k)
649 {
650 // +(v,ɛ(u·∇)δu + ɛ(δu·∇)u)
651 value_result[i] +=
652 vf_value * (gradient[i][k] * previous_values[k] +
653 previous_gradient[i][k] * value[k]);
654 // ν(∇v,ɛ∇δu^T)
655 gradient_result[i][k] +=
656 kinematic_viscosity * vf_value * gradient[k][i];
657 // ν(v,∇δu^T·∇ɛ)
658 value_result[i] +=
659 kinematic_viscosity * vf_gradient[k] * gradient[k][i];
660 // ν(v,∇δu·∇ɛ)
661 value_result[i] +=
662 kinematic_viscosity * vf_gradient[k] * gradient[i][k];
663 }
664 // +(v,ɛ ∂t δu)
665 if (transient)
666 value_result[i] += vf_value * (*bdf_coefs)[0] * value[i];
667 }
668
669 // PSPG Jacobian
670 for (int i = 0; i < dim; ++i)
671 {
672 for (int k = 0; k < dim; ++k)
673 {
674 // (τ∇q,(-νɛ∆δu - νɛ∇(∇·δu) + ɛ(u·∇)δu + ɛ(δu·∇)u))
675 gradient_result[dim][i] +=
676 tau * vf_value *
677 (-kinematic_viscosity *
678 (hessian_diagonal[i][k] + hessian[k][k][i]) +
679 gradient[i][k] * previous_values[k] +
680 previous_gradient[i][k] * value[k]);
681 }
682 // +ɛ(∂t δu)·τ∇q
683 if (transient)
684 gradient_result[dim][i] +=
685 tau * vf_value * (*bdf_coefs)[0] * value[i];
686
687 // +βδu·τ∇q
688 gradient_result[dim][i] += tau * beta_momentum_transfer * value[i];
689
690 // +mδu·τ∇q
691 gradient_result[dim][i] += tau * mass_source * value[i];
692 }
693 // (ɛ∇δp)τ·∇q
694 gradient_result[dim] += tau * vf_value * gradient[dim];
695
696 // Grad-div stabilization Jacobian
697 // (∇·v,γ(ɛ∇·δu+δu·∇ɛ))
698 if (cfd_dem_parameters.grad_div == true)
699 {
700 for (int i = 0; i < dim; ++i)
701 {
702 for (int k = 0; k < dim; ++k)
703 {
704 gradient_result[i][i] +=
705 grad_div_gamma(cell, q) *
706 (vf_value * gradient[k][k] + value[k] * vf_gradient[k]);
707 }
708 }
709 }
710
711 // SUPG Jacobian
712 for (int i = 0; i < dim; ++i)
713 {
714 for (int k = 0; k < dim; ++k)
715 {
716 // Part 1
717 for (int l = 0; l < dim; ++l)
718 {
719 // +(τ(u·∇)v,(ɛ(u·∇)δu + ɛ(δu·∇)u - νɛ∆δu -νɛ∇(∇·δu)))
720 gradient_result[i][k] +=
721 tau * vf_value * previous_values[k] *
722 (gradient[i][l] * previous_values[l] +
723 previous_gradient[i][l] * value[l] -
724 kinematic_viscosity *
725 (hessian_diagonal[i][l] + hessian[l][l][i]));
726 }
727 // +(ɛ∇δp)τ(u·∇)v
728 gradient_result[i][k] +=
729 tau * vf_value * previous_values[k] * (gradient[dim][i]);
730
731 // +(ɛ∂t δu)τ(u·∇)v
732 if (transient)
733 gradient_result[i][k] += tau * previous_values[k] * vf_value *
734 ((*bdf_coefs)[0] * value[i]);
735
736 // +(βδu)τ(u·∇)v
737 gradient_result[i][k] +=
738 beta_momentum_transfer * value[i] * tau * previous_values[k];
739
740 // +(mδu)τ(u·∇)v
741 gradient_result[i][k] +=
742 mass_source * value[i] * tau * previous_values[k];
743
744 // Part 2
745 for (int l = 0; l < dim; ++l)
746 {
747 // +(ɛ(u·∇)u - νɛ∆u)τ(δu·∇)v
748 gradient_result[i][k] +=
749 tau * value[k] * vf_value *
750 (previous_gradient[i][l] * previous_values[l] -
751 kinematic_viscosity * previous_hessian_diagonal[i][l]);
752
753 // (-νɛ∇(∇·u))τ(δu·∇)v
754 gradient_result[i][k] += -tau * kinematic_viscosity *
755 vf_value * value[k] *
756 previous_hessian[l][l][i];
757 }
758 // +(ɛ∇p - f_pf - ɛf)τ(δu·∇)v
759 gradient_result[i][k] +=
760 tau * value[k] *
761 (vf_value * previous_gradient[dim][i] - source_value[i]);
762
763 // +(mu)τ(δu·∇)v
764 gradient_result[i][k] +=
765 tau * value[k] * mass_source * previous_values[i];
766
767 // +(ɛ∂t u)τ(δu·∇)v
768 if (transient)
769 gradient_result[i][k] += tau * value[k] * vf_value *
770 ((*bdf_coefs)[0] * previous_values[i] +
771 previous_time_derivatives[i]);
772 }
773 }
774
775 if (this->has_solids)
776 {
777 gradient_result = gradient_result * cell_mask;
778 value_result = value_result * cell_mask;
779 if (this->enable_hessians_jacobian)
780 hessian_result = hessian_result * cell_mask;
781 }
782
783 integrator.submit_gradient(gradient_result, q);
784 integrator.submit_value(value_result, q);
785
786 if (this->enable_hessians_jacobian)
787 integrator.submit_hessian(hessian_result, q);
788 }
789
790 if (this->enable_hessians_jacobian)
791 integrator.integrate(EvaluationFlags::values | EvaluationFlags::gradients |
792 EvaluationFlags::hessians);
793 else
794 integrator.integrate(EvaluationFlags::values | EvaluationFlags::gradients);
795}
796
797/**
798 * Calculates the residual of the VANS equations (model A), with the same
799 * notation as the Jacobian above. The expressions calculated in this cell
800 * integral are:
801 * (q, ∂tɛ) + (q, ɛ ∇·u) + (q, u·∇ɛ) - (q, m) (Continuity equation)
802 * \+(v,ɛ∂t u) + (v,ɛ(u·∇)u) + (v, mu) - (∇·v,ɛp) - (v,p∇ɛ)
803 * \+ ν(∇v,ɛ∇u) + ν(∇v,ɛ∇u^T) + ν(v,∇u·∇ɛ) + ν(v,∇u^T·∇ɛ)
804 * \- (v, f_pf) - (v,ɛf) (Weak form of VANS),
805 * plus two additional terms in the case of SUPG-PSPG stabilization:
806 * \+ (ɛ∂t u + ɛ(u·∇)u + mu + ɛ∇p - νɛ∆u - νɛ∇(∇·u) - f_pf - ɛf)τ∇q
807 * (PSPG term)
808 * \+ (ɛ∂t u + ɛ(u·∇)u + mu + ɛ∇p - νɛ∆u - νɛ∇(∇·u) - f_pf - ɛf)τ(u·∇)v
809 * (SUPG term),
810 * and in the case of additional grad-div stabilization:
811 * \+ (∇·v,γ(∂tɛ+ɛ∇·u+u·∇ɛ-m)) (grad-div term)
812 */
813template <int dim, typename number>
814void
816 const MatrixFree<dim, number> &matrix_free,
817 VectorType &dst,
818 const VectorType &src,
819 const std::pair<unsigned int, unsigned int> &range) const
820{
821 FECellIntegrator integrator(matrix_free);
822
823 const double kinematic_viscosity =
824 this->properties_manager->get_rheology()->get_kinematic_viscosity();
825
826 for (unsigned int cell = range.first; cell < range.second; ++cell)
827 {
828 integrator.reinit(cell);
829 integrator.read_dof_values_plain(src);
830
831 if (this->enable_hessians_residual)
832 integrator.evaluate(EvaluationFlags::values |
833 EvaluationFlags::gradients |
834 EvaluationFlags::hessians);
835 else
836 integrator.evaluate(EvaluationFlags::values |
837 EvaluationFlags::gradients);
838
839 // Solid-cell mask (1.0 for fluid lanes, 0.0 for solid lanes).
840 VectorizedArray<number> cell_mask(1.0);
841 if (this->has_solids)
842 {
843 Assert(cell < this->solid_cell_mask.size(),
844 ExcDimensionMismatch(cell, this->solid_cell_mask.size()));
845 cell_mask = this->solid_cell_mask[cell];
846 }
847
848 // To identify whether the problem is transient or steady
849 bool transient = (time_stepping_is_bdf(
850 this->simulation_control->get_assembly_method())) ?
851 true :
852 false;
853
854 // Vector for BDF coefficients
855 const Vector<double> *bdf_coefs;
856 if (transient)
857 bdf_coefs = &this->simulation_control->get_bdf_coefficients();
858
859 for (const auto q : integrator.quadrature_point_indices())
860 {
861 // Gather particle-fluid force and drag force, will be zero if they
862 // have not been gathered.
863 auto pf_force_value = this->particle_fluid_force(cell, q);
864 auto pf_drag_value = this->particle_fluid_drag(cell, q);
865 auto p_velocity = this->particle_velocity(cell, q);
866 auto beta_momentum_transfer =
867 this->momentum_transfer_coefficient(cell, q);
868
869 // Add the particle-fluid force and the explicit drag
870 Tensor<1, dim, VectorizedArray<number>> source_value =
871 pf_force_value + pf_drag_value;
872
873 // Gather void fraction value and gradient
874 auto vf_value = this->void_fraction(cell, q);
875 auto vf_gradient = this->void_fraction_gradient(cell, q);
876 auto vf_time_derivative =
877 this->time_derivative_void_fraction(cell, q);
878
879 // Evaluate source term function if enabled
880 VectorizedArray<number> mass_source = 0.;
881 if (this->forcing_function)
882 {
883 source_value += this->forcing_terms(cell, q) * vf_value;
884 mass_source = this->mass_source_terms(cell, q);
885 }
886
887 // Add to source term the dynamic flow control force (zero if
888 // not enabled)
889 source_value += this->beta_force * vf_value;
890
891 // Gather the original value/gradient
892 typename FECellIntegrator::value_type value = integrator.get_value(q);
893 typename FECellIntegrator::gradient_type gradient =
894 integrator.get_gradient(q);
895 typename FECellIntegrator::gradient_type hessian_diagonal;
896 typename FECellIntegrator::hessian_type hessian;
897
898 // Add the implicit drag force with the momentum coupling
899 for (int d = 0; d < dim; ++d)
900 source_value[d] +=
901 beta_momentum_transfer * (p_velocity[d] - value[d]);
902
903 // The strong form of the residual requires both the laplacian
904 // and the gradient of the divergence of the velocity field.
905 if (this->enable_hessians_residual)
906 {
907 hessian_diagonal = integrator.get_hessian_diagonal(q);
908 hessian = integrator.get_hessian(q);
909 }
910
911 // Time derivatives of previous solutions
912 Tensor<1, dim + 1, VectorizedArray<number>> previous_time_derivatives;
913 if (transient)
914 previous_time_derivatives =
916
917 // Get stabilization parameter
918 const auto tau = this->stabilization_parameter[cell][q];
919
920 // Result value/gradient we will use
921 typename FECellIntegrator::value_type value_result;
922 typename FECellIntegrator::gradient_type gradient_result;
923 typename FECellIntegrator::hessian_type hessian_result;
924
925 // +(q,∂t ɛ)
926 value_result[dim] = vf_time_derivative;
927
928 // -(q,m)
929 value_result[dim] -= mass_source;
930
931 // Weak form
932 for (int i = 0; i < dim; ++i)
933 {
934 // ν(∇v,ɛ∇u)
935 gradient_result[i] = kinematic_viscosity * vf_value * gradient[i];
936
937 // -(∇·v,ɛp)
938 gradient_result[i][i] += -vf_value * value[dim];
939
940 // -(v,f_pf + ɛf)
941 value_result[i] = -source_value[i];
942
943 // -(v,p∇ɛ)
944 value_result[i] += -vf_gradient[i] * value[dim];
945
946 // +(v,mu)
947 value_result[i] += mass_source * value[i];
948
949 // +(v,ɛ∂t u)
950 if (transient)
951 {
952 value_result[i] += vf_value * ((*bdf_coefs)[0] * value[i] +
953 previous_time_derivatives[i]);
954 }
955
956 // +(q,ɛ∇·u)
957 value_result[dim] += vf_value * gradient[i][i];
958 // +(q,∇ɛ·u)
959 value_result[dim] += value[i] * vf_gradient[i];
960
961 for (int k = 0; k < dim; ++k)
962 {
963 // ν(v,∇u·∇ɛ)
964 value_result[i] +=
965 kinematic_viscosity * gradient[i][k] * vf_gradient[k];
966
967 // ν(v,∇u^T·∇ɛ)
968 value_result[i] +=
969 kinematic_viscosity * gradient[k][i] * vf_gradient[k];
970
971 // ν(∇v,ɛ∇u^T)
972 gradient_result[i][k] +=
973 kinematic_viscosity * vf_value * gradient[k][i];
974
975 // +(v,ɛ(u·∇)u)
976 value_result[i] += vf_value * gradient[i][k] * value[k];
977 }
978 }
979
980 // PSPG term
981 for (int i = 0; i < dim; ++i)
982 {
983 for (int k = 0; k < dim; ++k)
984 {
985 // (τ∇q,(-νɛ∆u -νɛ∇(∇·u) + ɛ(u·∇)u))
986 gradient_result[dim][i] +=
987 tau * vf_value *
988 (-kinematic_viscosity *
989 (hessian_diagonal[i][k] + hessian[k][k][i]) +
990 gradient[i][k] * value[k]);
991 }
992 // +(-f_pf - ɛf)·τ∇q
993 gradient_result[dim][i] += tau * (-source_value[i]);
994
995 // +(mu)·τ∇q
996 gradient_result[dim][i] += tau * mass_source * value[i];
997
998 // +(ɛ∂t u)·τ∇q
999 if (transient)
1000 gradient_result[dim][i] +=
1001 tau * vf_value *
1002 ((*bdf_coefs)[0] * value[i] + previous_time_derivatives[i]);
1003 }
1004 // +(ɛ∇p)·τ∇q
1005 gradient_result[dim] += tau * vf_value * gradient[dim];
1006
1007 // Grad-div stabilization
1008 // (∇·v,γ(∂tɛ+ɛ∇·u+u·∇ɛ-m))
1009 if (cfd_dem_parameters.grad_div == true)
1010 {
1011 // Strong form of the continuity equation ∂tɛ+ɛ∇·u+u·∇ɛ-m
1012 auto continuity_residual = vf_time_derivative - mass_source;
1013 for (int k = 0; k < dim; ++k)
1014 continuity_residual +=
1015 vf_value * gradient[k][k] + value[k] * vf_gradient[k];
1016
1017 for (int i = 0; i < dim; ++i)
1018 gradient_result[i][i] +=
1019 grad_div_gamma(cell, q) * continuity_residual;
1020 }
1021
1022 // SUPG term
1023 for (int i = 0; i < dim; ++i)
1024 {
1025 for (int k = 0; k < dim; ++k)
1026 {
1027 for (int l = 0; l < dim; ++l)
1028 {
1029 // (τ(u·∇)v,-νɛ∆u -νɛ∇(∇·u))
1030 gradient_result[i][k] +=
1031 -tau * kinematic_viscosity * vf_value * value[k] *
1032 (hessian_diagonal[i][l] + hessian[l][l][i]);
1033
1034 // + (τ(u·∇)v,(ɛ(u·∇)u))
1035 gradient_result[i][k] +=
1036 tau * vf_value * value[k] * gradient[i][l] * value[l];
1037 }
1038 // + (τ(u·∇)v,ɛ∇p - f_pf - ɛf)
1039 gradient_result[i][k] +=
1040 tau * value[k] *
1041 (vf_value * gradient[dim][i] - source_value[i]);
1042
1043 // + (τ(u·∇)v,mu)
1044 gradient_result[i][k] +=
1045 tau * value[k] * mass_source * value[i];
1046
1047 // + (τ(u·∇)v,ɛ∂t u)
1048 if (transient)
1049 gradient_result[i][k] += tau * value[k] * vf_value *
1050 ((*bdf_coefs)[0] * value[i] +
1051 previous_time_derivatives[i]);
1052 }
1053 }
1054
1055 if (this->has_solids)
1056 {
1057 gradient_result = gradient_result * cell_mask;
1058 value_result = value_result * cell_mask;
1059 if (this->enable_hessians_residual)
1060 hessian_result = hessian_result * cell_mask;
1061 }
1062
1063 integrator.submit_gradient(gradient_result, q);
1064 integrator.submit_value(value_result, q);
1065 if (this->enable_hessians_residual)
1066 integrator.submit_hessian(hessian_result, q);
1067 }
1068
1069 if (this->enable_hessians_residual)
1070 integrator.integrate_scatter(EvaluationFlags::values |
1071 EvaluationFlags::gradients |
1072 EvaluationFlags::hessians,
1073 dst);
1074 else
1075 integrator.integrate_scatter(EvaluationFlags::values |
1076 EvaluationFlags::gradients,
1077 dst);
1078 }
1079}
1080
1081template class VANSOperator<2, double>;
1082template class VANSOperator<3, double>;
1083template class VANSOperator<2, float>;
1084template class VANSOperator<3, float>;
Table< 2, Tensor< 1, dim+1, Tensor< 1, dim, VectorizedArray< number > > > > nonlinear_previous_gradient
Table with correct alignment for vectorization to store the gradients of the previous newton step.
Table< 2, Tensor< 1, dim, VectorizedArray< number > > > forcing_terms
Table with precomputed forcing term values.
virtual void evaluate_non_linear_term_and_calculate_tau(const VectorType &newton_step)
Store relevant values of the vector of the last newton step to use it in the Jacobian and pre-calcula...
Table< 2, Tensor< 1, dim+1, VectorizedArray< number > > > nonlinear_previous_values
Table with correct alignment for vectorization to store the values of the previous newton step.
std::shared_ptr< PhysicalPropertiesManager > properties_manager
Object pointing to the physical properties manager of the matrix free class.
bool enable_hessians_jacobian
Flag to turn hessian terms from jacobian on or off.
bool enable_hessians_residual
Flag to turn hessian terms from residual on or off.
std::shared_ptr< Function< dim > > forcing_function
Force function or source function for the Navier-Stokes equations.
Table< 2, Tensor< 1, dim+1, Tensor< 2, dim, VectorizedArray< number > > > > nonlinear_previous_hessian
Table with correct alignment for vectorization to store the hessian of the previous newton step.
AlignedVector< VectorizedArray< number > > solid_cell_mask
Per-cell-batch mask used to suppress contributions from solid cells (material_id > 0) inside the cell...
Table< 2, Tensor< 1, dim+1, VectorizedArray< number > > > time_derivatives_previous_solutions
Table with correct alignment for vectorization to store the time derivatives of previous solutions.
virtual void compute_forcing_term()
Precompute forcing term at the quadrature points. This is called when the operator is initialized and...
TimerOutput timer
Timer for internal operator calls.
StabilizationType stabilization
Stabilization type needed to add or remove terms from operator.
std::shared_ptr< SimulationControl > simulation_control
Object storing the information regarding the time stepping method.
bool has_solids
Flag indicating whether the simulation contains any solid region (material_id > 0)....
Table< 2, Tensor< 1, dim+1, Tensor< 1, dim, VectorizedArray< number > > > > nonlinear_previous_hessian_diagonal
Table with correct alignment for vectorization to store the hessian diagonal of the previous newton s...
Tensor< 1, dim, VectorizedArray< number > > beta_force
Additional source term in the case of dynamic flow control.
Table< 2, VectorizedArray< number > > stabilization_parameter
Table with correct alignment for vectorization to store the values of the stabilization parameter tau...
MatrixFree< dim, number > matrix_free
Object storing all the relevant data needed for the matrix free implementation.
Implements the matrix-free operator for the VANS equations.
void local_evaluate_residual(const MatrixFree< dim, number > &matrix_free, VectorType &dst, const VectorType &src, const std::pair< unsigned int, unsigned int > &range) const override
Perform cell integral on a cell batch with gathering and scattering the values, and according to the ...
void compute_particle_fluid_interaction(const DoFHandler< dim > &fp_force_dof_handler, const LinearAlgebra::distributed::Vector< double > &fp_force_solution, const DoFHandler< dim > &fp_drag_dof_handler, const LinearAlgebra::distributed::Vector< double > &fp_drag_solution, const DoFHandler< dim > &particle_velocity_dof_handler, const LinearAlgebra::distributed::Vector< double > &particle_velocity_solution, const DoFHandler< dim > &momentum_transfer_coefficient_dof_handler, const LinearAlgebra::distributed::Vector< double > &momentum_transfer_coefficient_solution)
Compute the terms required to assemble the particle-fluid forces at the gauss points....
void compute_forcing_term() override
Precompute the forcing term at the quadrature points. In addition to the momentum forcing term,...
LinearAlgebra::distributed::Vector< number > VectorType
Table< 2, VectorizedArray< number > > grad_div_gamma
Table< 2, Tensor< 1, dim, VectorizedArray< number > > > particle_fluid_force
Table< 2, Tensor< 1, dim, VectorizedArray< number > > > particle_velocity
Table< 2, VectorizedArray< number > > time_derivative_void_fraction
Table< 2, Tensor< 1, dim, VectorizedArray< number > > > void_fraction_gradient
const Parameters::CFDDEM cfd_dem_parameters
Table< 2, VectorizedArray< number > > momentum_transfer_coefficient
FEEvaluation< dim, -1, 0, dim+1, number > FECellIntegrator
Table< 2, Tensor< 1, dim, VectorizedArray< number > > > particle_fluid_drag
Table< 2, VectorizedArray< number > > mass_source_terms
void do_cell_integral_local(FECellIntegrator &integrator) const override
Perform cell integral on a cell batch without gathering and scattering the values,...
Table< 2, VectorizedArray< number > > void_fraction
virtual void evaluate_non_linear_term_and_calculate_tau(const VectorType &newton_step) override
Store relevant values of the vector of the last newton step to use it in the Jacobian and pre-calcula...
void compute_void_fraction(const DoFHandler< dim > &void_fraction_dof_handler, const LinearAlgebra::distributed::Vector< double > &void_fraction_solution, const LinearAlgebra::distributed::Vector< double > &time_derivative_void_fraction_solution)
Compute the void fraction at the fluid quadrature point. This essentially calculates the void fractio...
VectorizedArray< Number > evaluate_function(const Function< dim > &function, const Point< dim, VectorizedArray< Number > > &p_vectorized, const unsigned int component=0)
Evaluate the value of a function at a batch of points to obtain a vectorized array of numbers.
@ void_fraction
@ fully_explicit
Explicit drag coupling.
bool time_stepping_is_bdf(const Parameters::SimulationControl::TimeSteppingMethod method)
Determines if the time integration method is within the bdf family.