Lethe Open-Source Library version 1.2.0
Developer Guide
Loading...
Searching...
No Matches
navier_stokes_cls_assemblers.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: Copyright (c) 2021-2026 The Lethe Authors
2// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception OR LGPL-2.1-or-later
3
4#ifndef lethe_navier_stokes_cls_assemblers_h
5#define lethe_navier_stokes_cls_assemblers_h
6
9
10#include <solvers/copy_data.h>
14
15
16/**
17 * @brief Assembles the core of the Navier-Stokes equation with
18 * free surface using CLS modeling.
19 * According to the following weak form:
20 * \f$ \nabla \cdot \mathbf{u} + \rho \mathbf{u} \cdot \nabla
21 * \mathbf{u} + \nabla p - \mu \nabla\cdot (\nabla \mathbf{u} +
22 * (\nabla \mathbf{u})^T) = 0 \f$ with an SUPG and PSPG stabilization
23 *
24 * @tparam dim An integer that denotes the number of spatial dimensions
25 *
26 * @ingroup assemblers
27 */
28template <int dim>
30{
31public:
33 const std::shared_ptr<SimulationControl> &simulation_control,
34 const SimulationParameters<dim> &nsparam)
36 , cls_parameters(nsparam.multiphysics.cls_parameters)
37 {}
38
39 /**
40 * @brief assemble_matrix Assembles the matrix
41 * @param scratch_data (see base class)
42 * @param copy_data (see base class)
43 */
44 virtual void
46 StabilizedMethodsTensorCopyData<dim> &copy_data) override;
47
48 /**
49 * @brief assemble_rhs Assembles the rhs
50 * @param scratch_data (see base class)
51 * @param copy_data (see base class)
52 */
53 virtual void
55 StabilizedMethodsTensorCopyData<dim> &copy_data) override;
56
57 const bool SUPG = true;
58
59 const std::shared_ptr<SimulationControl> simulation_control;
61};
62
63
64/**
65 * @brief Assembles the transient time arising from BDF time
66 * integration for the Navier-Stokes equation with
67 * free surface using CLS modeling. For example, if a BDF1 scheme is
68 * chosen, the following is assembled
69 * \f$\frac{(\rho \mathbf{u})^{t+\Delta t}-(\rho \mathbf{u})^{t}}{\Delta t} \f$
70 *
71 * @tparam dim An integer that denotes the number of spatial dimensions
72 *
73 * @ingroup assemblers
74 */
75template <int dim>
77{
78public:
80 const std::shared_ptr<SimulationControl> &simulation_control)
82 {}
83
84 /**
85 * @brief assemble_matrix Assembles the matrix
86 * @param scratch_data (see base class)
87 * @param copy_data (see base class)
88 */
89 virtual void
91 StabilizedMethodsTensorCopyData<dim> &copy_data) override;
92
93 /**
94 * @brief assemble_rhs Assembles the rhs
95 * @param scratch_data (see base class)
96 * @param copy_data (see base class)
97 */
98 virtual void
100 StabilizedMethodsTensorCopyData<dim> &copy_data) override;
101
102 const std::shared_ptr<SimulationControl> simulation_control;
103};
104
105
106/**
107 * @brief Assembles a phase change Darcy forcing term for a CLS two-fluid
108 * simulation. The term \f$-\phi \beta_D \mathbf{u} \f$ is added to the right
109 * hand-side of the Navier-Stokes equations to prohibit the motion of a
110 * material. In the phase change model, the value of the \f$ \beta_D \f$
111 * coefficient depends on the temperature field and the material (fluid)
112 * properties. Generally, this is used to impose the stasis in the solid
113 * phase. This generally leads to a better conditioning of the linear
114 * system than increasing the viscosity of the solid phase.
115 *
116 *
117 * @tparam dim An integer that denotes the number of spatial dimensions
118 *
119 * @ingroup assemblers
120 */
121template <int dim>
123{
124public:
131
132 /**
133 * @brief assemble_matrix Assembles the matrix of: \f$-\beta_D \mathbf{u}\f$.
134 * @param scratch_data (see base class)
135 * @param copy_data (see base class)
136 */
137 virtual void
139 StabilizedMethodsTensorCopyData<dim> &copy_data) override;
140
141
142 /**
143 * @brief assemble_rhs Assembles the weak form of: \f$-\beta_D \mathbf{u} \f$
144 * @param scratch_data (see base class)
145 * @param copy_data (see base class)
146 */
147 virtual void
148 assemble_rhs(const NavierStokesScratchData<dim> &scratch_data,
149 StabilizedMethodsTensorCopyData<dim> &copy_data) override;
150
151private:
152 /*
153 * Phase change parameters are kept within the assembler and are used to
154 * calculate, on the fly, the inverse permeability (\f$ \beta_D \f$).
155 */
156 const std::vector<Parameters::PhaseChange> phase_change_parameters_vector;
157
158 /**
159 * Enable the multiplication of the Darcy force term
160 * (\f$\vec{F}_\mathrm{Darcy}\f$) by the density for dimensional consistency
161 * when solving the pressure rather than the kinematic pressure in the
162 * momentum balance.
163 *
164 * \f[
165 * \vec{F}_\mathrm{Darcy} = \rho K \vec{u}
166 * \f]
167 *
168 * with \f$\rho\f$ the density, \f$K\f$ the Darcy penalty, and \f$\vec{u}\f$
169 * the velocity.
170 */
172};
173
174/**
175 * @brief Assembler of the non-linear Carman-Kozeny permeability model for CLS
176 * simulations with phase change.
177 *
178 * @tparam dim An integer that denotes the number of spatial dimensions
179 */
180template <int dim>
182 : public NavierStokesAssemblerBase<dim>
183{
184public:
185 /**
186 * @brief Assembler for the Carman-Kozeny permeability source term used for
187 * phase change modelling.
188 *
189 * \f[
190 * \boldsymbol{F}_\mathrm{Carman-Kozeny} = \frac{-\mu}{A_\mathrm{perm}}
191 * \left[ \frac{(1-\alpha_\mathrm{l})^2}{(\alpha_\mathrm{l})^3 +
192 * \delta}\right] \boldsymbol{u}
193 * \f]
194 *
195 * with \f$\mu\f$ the dynamic viscosity, \f$A_\mathrm{perm}\f$ the
196 * permeability area, \f$\alpha_\mathrm{l}\f$ the liquid fraction,
197 * \f$\delta\f$ a tolerance to avoid division by zero in the solid, and
198 * \f$\boldsymbol{u}\f$ the velocity.
199 *
200 * @param[in] fluid_with_phase_change Indicates which fluid(s) has/have phase
201 * change.
202 * @param[in] carman_kozeny_permeability_area Vector of permeability area
203 * values of the solids (pseudo-porous media).
204 * @param[in] carman_kozeny_tolerance Vector of tolerances to avoid division
205 * by zero in the solid regions.
206 * @param[in] phase_change_parameters_vector Vector of phase change parameters
207 * of all fluids.
208 */
210 const Parameters::FluidIndicator &fluid_with_phase_change,
211 const std::vector<double> &carman_kozeny_permeability_area,
212 const std::vector<double> &carman_kozeny_tolerance,
213 const std::vector<Parameters::PhaseChange> &phase_change_parameters_vector)
215 fluid_with_phase_change,
218 compute_permeability_area_inverse(carman_kozeny_permeability_area))
221 {}
222
223 /**
224 * @brief Assembles the matrix of:
225 * \f[
226 * \boldsymbol{F}_\mathrm{Carman-Kozeny} = \frac{-\mu}{A_\mathrm{perm}}
227 * \left[ \frac{(1-\alpha_\mathrm{l})^2}{(\alpha_\mathrm{l})^3 +
228 * \delta}\right] \boldsymbol{u} \f]
229 *
230 * with \f$\mu\f$ the dynamic viscosity, \f$A_\mathrm{perm}\f$ the
231 * permeability area, \f$\alpha_\mathrm{l}\f$ the liquid fraction,
232 * \f$\delta\f$ a tolerance to avoid division by zero in the solid, and
233 * \f$\boldsymbol{u}\f$ the velocity.
234 *
235 * @param[in] scratch_data Scratch data containing the information required
236 * for system assembly.
237 * It is important to note that the scratch data has to have been re-inited
238 * before calling for matrix assembly.
239 * @param[in,out] copy_data Destination where the local_matrix is copied to.
240 */
241 virtual void
243 StabilizedMethodsTensorCopyData<dim> &copy_data) override;
244
245 /**
246 * @brief Assemble the right-hand side (rhs) of:
247 * \f[
248 * \boldsymbol{F}_\mathrm{Carman-Kozeny} = \frac{-\mu}{A_\mathrm{perm}}
249 * \left[ \frac{(1-\alpha_\mathrm{l})^2}{(\alpha_\mathrm{l})^3 +
250 * \delta}\right] \boldsymbol{u} \f]
251 *
252 * with \f$\mu\f$ the dynamic viscosity, \f$A_\mathrm{perm}\f$ the
253 * permeability area, \f$\alpha_\mathrm{l}\f$ the liquid fraction,
254 * \f$\delta\f$ a tolerance to avoid division by zero in the solid, and
255 * \f$\boldsymbol{u}\f$ the velocity.
256 *
257 * @param[in] scratch_data Scratch data containing the information required
258 * for system assembly.
259 * It is important to note that the scratch data has to have been re-inited
260 * before calling for rhs assembly.
261 * @param[in,out] copy_data Destination where the local_rhs is copied to.
262 */
263 virtual void
264 assemble_rhs(const NavierStokesScratchData<dim> &scratch_data,
265 StabilizedMethodsTensorCopyData<dim> &copy_data) override;
266
267private:
268 /**
269 * @brief Compute the inverse values of the Carman-Kozeny permeability areas.
270 *
271 * @param[in] carman_kozeny_permeability_area Vector of the Carman-Kozeny
272 * permeability area values.
273 *
274 * @return Vector of inverse values of the Carman-Kozeny permeability areas.
275 */
276 static std::vector<double>
278 const std::vector<double> &carman_kozeny_permeability_area)
279 {
280 std::vector<double> carman_kozeny_permeability_area_inverse(
281 carman_kozeny_permeability_area.size());
282
283 for (unsigned int i = 0; i < carman_kozeny_permeability_area.size(); ++i)
284 carman_kozeny_permeability_area_inverse[i] =
285 1 / carman_kozeny_permeability_area[i];
286
287 return carman_kozeny_permeability_area_inverse;
288 }
289
290 /**
291 * @brief Checks which fluid(s) has/have phase change and returns a vector of
292 * boolean indicating if each fluid has phase change (@p true) or not
293 * (@p false). The indices of the vector correspond to the fluid ID.
294 *
295 * @param[in] fluid_with_phase_change Indicates which fluid(s) has/have phase
296 * change.
297 * @param[in] n_fluids Number of fluids.
298 *
299 * @return Vector of boolean indicating which fluid(s) has/have phase change.
300 */
301 static std::vector<bool>
303 const Parameters::FluidIndicator fluid_with_phase_change,
304 const unsigned int n_fluids)
305 {
306 std::vector<bool> enable_phase_change_vector(n_fluids, false);
307
308 if (fluid_with_phase_change == Parameters::FluidIndicator::fluid_0)
309 enable_phase_change_vector[0] = true;
310 else if (fluid_with_phase_change == Parameters::FluidIndicator::fluid_1)
311 enable_phase_change_vector[1] = true;
312 else // fluid_with_phase_change == Parameters::FluidIndicator::both
313 enable_phase_change_vector.assign(n_fluids, true);
314 return enable_phase_change_vector;
315 }
316
317 /**
318 * Vector where each bool indicates if the corresponding fluid has phase
319 * change or not.
320 */
321 const std::vector<bool> fluid_has_phase_change;
322
323 /**
324 * Vector of one over the permeability area of the pseudo-porous bed
325 * (solid phase) for each simulated fluid.
326 */
327 const std::vector<double> carman_kozeny_permeability_area_inv;
328
329 /**
330 * Vector of tolerances in the Carman-Kozeny source term that avoids division
331 * by zero in the solid phase for each simulated fluid.
332 */
333 const std::vector<double> carman_kozeny_tolerance;
334
335 /**
336 * Phase change parameters for the liquidus and solidus temperature of each
337 * fluid.
338 */
339 const std::vector<Parameters::PhaseChange> phase_change_parameters_vector;
340};
341
342
343/**
344 * @brief Assembles the Surface Tension Force (STF) for the
345 * Navier-Stokes equations according to the following equation:
346 *
347 * \f$\mathbf{F_{CSV}}=\sigma k \nabla \phi \frac{2 \rho}{\rho_0 + \rho_1} \f$
348 *
349 * @tparam dim An integer that denotes the number of spatial dimensions
350 *
351 * @ingroup assemblers
352 */
353template <int dim>
355{
356public:
358 const std::shared_ptr<SimulationControl> &p_simulation_control,
359 const SimulationParameters<dim> &nsparam)
360 : simulation_control(p_simulation_control)
361 , STF_parameters(nsparam.multiphysics.cls_parameters.surface_tension_force)
362 {}
363
364 /**
365 * @brief assemble_matrix Adds the surface tension force to the strong
366 * residual used by the stabilization terms of the Jacobian. The force does
367 * not depend on the velocity or the pressure, so nothing is added to the
368 * local matrix.
369 * @param scratch_data (see base class)
370 * @param copy_data (see base class)
371 */
372 virtual void
374 StabilizedMethodsTensorCopyData<dim> &copy_data) override;
375
376 /**
377 * @brief assemble_rhs Assembles the rhs
378 * @param scratch_data (see base class)
379 * @param copy_data (see base class)
380 */
381 virtual void
382 assemble_rhs(const NavierStokesScratchData<dim> &scratch_data,
383 StabilizedMethodsTensorCopyData<dim> &copy_data) override;
384
385 const std::shared_ptr<SimulationControl> simulation_control;
386
387 // Surface tension force (STF)
389};
390
391
392/**
393 * @brief Assembles the Marangoni effect for the
394 * Navier-Stokes equations according to the following equation:
395 *
396 * \f$\mathbf{F_{Ma}}= \frac{\partial \sigma}{\partial T} \left[ \nabla T
397 * - \frac{\nabla \phi}{| \nabla \phi |} \left( \frac{ \nabla \phi }
398 * {| \nabla \phi |} \cdot \nabla T \right) \right] | \nabla \phi |
399 * \frac{2 \rho}{\rho_0 + \rho_1} \f$
400 *
401 * @tparam dim An integer that denotes the number of spatial dimensions
402 *
403 * @ingroup assemblers
404 */
405template <int dim>
407 : public NavierStokesAssemblerBase<dim>
408{
409public:
411 const std::shared_ptr<SimulationControl> &p_simulation_control,
413 : simulation_control(p_simulation_control)
414 , STF_properties(p_STF_properties)
415 {}
416
417 /**
418 * @brief assemble_matrix Adds the surface tension and Marangoni forces to the
419 * strong residual used by the stabilization terms of the Jacobian. The forces
420 * do not depend on the velocity or the pressure, so nothing is added to the
421 * local matrix.
422 * @param scratch_data (see base class)
423 * @param copy_data (see base class)
424 */
425 virtual void
427 StabilizedMethodsTensorCopyData<dim> &copy_data) override;
428
429 /**
430 * @brief assemble_rhs Assembles the rhs
431 * @param scratch_data (see base class)
432 * @param copy_data (see base class)
433 */
434 virtual void
435 assemble_rhs(const NavierStokesScratchData<dim> &scratch_data,
436 StabilizedMethodsTensorCopyData<dim> &copy_data) override;
437
438 const std::shared_ptr<SimulationControl> simulation_control;
439
440 // Surface tension force (STF)
442};
443
444
445/**
446 * @brief Assembles the momentum source due to evaporation for the
447 * Navier-Stokes equations.
448 *
449 * @tparam dim An integer that denotes the number of spatial dimensions
450 *
451 * @param simulation_control Shared pointer of the SimulationControl object
452 * controlling the current simulation
453 * @param p_evaporation Struct that holds all evaporation model
454 * parameters
455 *
456 * @ingroup assemblers
457 */
458template <int dim>
460 : public NavierStokesAssemblerBase<dim>
461{
462public:
464 const std::shared_ptr<SimulationControl> &p_simulation_control,
465 const Parameters::Evaporation &p_evaporation)
466 : simulation_control(p_simulation_control)
467 {
468 this->evaporation_model = EvaporationModel::model_cast(p_evaporation);
469 }
470
471 /**
472 * @brief assemble_matrix Adds the recoil pressure force to the strong
473 * residual used by the stabilization terms of the Jacobian. The force does
474 * not depend on the velocity or the pressure, so nothing is added to the
475 * local matrix.
476 * @param scratch_data (see base class)
477 * @param copy_data (see base class)
478 */
479 virtual void
481 StabilizedMethodsTensorCopyData<dim> &copy_data) override;
482
483 /**
484 * @brief assemble_rhs Assembles the rhs
485 * @param scratch_data (see base class)
486 * @param copy_data (see base class)
487 */
488 virtual void
489 assemble_rhs(const NavierStokesScratchData<dim> &scratch_data,
490 StabilizedMethodsTensorCopyData<dim> &copy_data) override;
491
492private:
493 const std::shared_ptr<SimulationControl> simulation_control;
494
495 // Evaporation model
496 std::shared_ptr<EvaporationModel> evaporation_model;
497};
498
499/**
500 * @brief Assembles the core of the Navier-Stokes equation
501 * using a Rheological model to predict non-Newtonian behaviors
502 *
503 * @tparam dim An integer that denotes the number of spatial dimensions
504 *
505 * @ingroup assemblers
506 */
507template <int dim>
509 : public NavierStokesAssemblerBase<dim>
510{
511public:
513 const std::shared_ptr<SimulationControl> &simulation_control,
514 const SimulationParameters<dim> &nsparam)
516 , cls_parameters(nsparam.multiphysics.cls_parameters)
517 {}
518
519 /**
520 * @brief Calculates an approximation of the gradient of the viscosity
521 * @param velocity_gradient The velocity gradient tensor on the quadrature point
522 @param velocity_hessians The velocity hessian tensor on the quadrature point
523 @param non_newtonian_viscosity The viscosity at which the gradient is calculated
524 @param d_gamma_dot Th difference in the shear rate magnitude to approximate the
525 viscosity variation with a slight change in the shear_rate magnitude
526 */
527 inline Tensor<1, dim>
529 const Tensor<2, dim> &velocity_gradient,
530 const Tensor<3, dim> &velocity_hessians,
531 const double shear_rate_magnitude,
532 const double grad_kinematic_viscosity_shear_rate) const
533 {
534 // Calculates an approximation of the shear rate magnitude gradient using
535 // the derived form, since it does not change with rheological models
536 Tensor<1, dim> grad_shear_rate;
537 for (int d = 0; d < dim; ++d)
538 {
539 if (dim == 2)
540 {
541 for (int k = 0; k < dim; ++k)
542 {
543 grad_shear_rate[d] +=
544 2 * (velocity_gradient[k][k] * velocity_hessians[k][d][k]) /
545 shear_rate_magnitude;
546 }
547 grad_shear_rate[d] +=
548 (velocity_gradient[0][1] + velocity_gradient[1][0]) *
549 (velocity_hessians[0][d][1] + velocity_hessians[1][d][0]) /
550 shear_rate_magnitude;
551 }
552 else
553 {
554 for (int k = 0; k < dim; ++k)
555 {
556 grad_shear_rate[d] +=
557 2 * (velocity_gradient[k][k] * velocity_hessians[k][d][k]) /
558 shear_rate_magnitude +
559 (velocity_gradient[(k + 1) % dim][(k + 2) % dim] +
560 velocity_gradient[(k + 2) % dim][(k + 1) % dim]) *
561 (velocity_hessians[(k + 1) % dim][d][(k + 2) % dim] +
562 velocity_hessians[(k + 2) % dim][d][(k + 1) % dim]) /
563 shear_rate_magnitude;
564 }
565 }
566 }
567 return grad_shear_rate * grad_kinematic_viscosity_shear_rate;
568 };
569
570 /**
571 * @brief assemble_matrix Assembles the matrix
572 * @param scratch_data (see base class)
573 * @param copy_data (see base class)
574 */
575 virtual void
577 StabilizedMethodsTensorCopyData<dim> &copy_data) override;
578
579 /**
580 * @brief assemble_rhs Assembles the rhs
581 * @param scratch_data (see base class)
582 * @param copy_data (see base class)
583 */
584 virtual void
585 assemble_rhs(const NavierStokesScratchData<dim> &scratch_data,
586 StabilizedMethodsTensorCopyData<dim> &copy_data) override;
587
588 /**
589 * Enables SUPG stabilization for the Navier-Stokes formulation.
590 * We have not found any scenarios where it is relevant not to use SUPG
591 * stabilization yet.
592 */
593 const bool SUPG = true;
594
595 const std::shared_ptr<SimulationControl> simulation_control;
597};
598
599
600/**
601 * @brief Assembles the thermal buoyancy source term for CLS simulations.
602 * This assembler includes density explicitly in the buoyancy term since
603 * the CLS momentum equation is written as:
604 * \f$ \rho \frac{\partial \mathbf{u}}{\partial t} + \rho \mathbf{u} \cdot
605 * \nabla \mathbf{u} = ... \f$
606 *
607 * The weak form assembled is:
608 * \f$ -\rho \mathbf{g} \beta (T - T_0) \f$
609 *
610 * where \f$ \rho \f$ is the phase-indicator-weighted density.
611 *
612 * @tparam dim An integer that denotes the number of spatial dimensions
613 *
614 * @ingroup assemblers
615 */
616template <int dim>
618{
619public:
626
627 /**
628 * @brief assemble_matrix Adds the buoyancy force to the strong residual used
629 * by the stabilization terms of the Jacobian. The force does not depend on
630 * the velocity or the pressure, so nothing is added to the local matrix.
631 * @param scratch_data (see base class)
632 * @param copy_data (see base class)
633 */
634 virtual void
636 StabilizedMethodsTensorCopyData<dim> &copy_data) override;
637
638 /**
639 * @brief assemble_rhs Assembles the weak form of:
640 * \f$-\rho \mathbf{g} \beta (T - T_0)\f$
641 * @param scratch_data (see base class)
642 * @param copy_data (see base class)
643 */
644 virtual void
645 assemble_rhs(const NavierStokesScratchData<dim> &scratch_data,
646 StabilizedMethodsTensorCopyData<dim> &copy_data) override;
647
648private:
649 const std::shared_ptr<SimulationControl> simulation_control;
651};
652
653#endif
static std::shared_ptr< EvaporationModel > model_cast(const Parameters::Evaporation &evaporation_parameters)
Instantiates and returns a pointer to an EvaporationModel object by casting it to the proper child cl...
virtual void assemble_matrix(const NavierStokesScratchData< dim > &scratch_data, StabilizedMethodsTensorCopyData< dim > &copy_data) override
assemble_matrix Assembles the matrix
GLSNavierStokesCLSAssemblerBDF(const std::shared_ptr< SimulationControl > &simulation_control)
const std::shared_ptr< SimulationControl > simulation_control
virtual void assemble_rhs(const NavierStokesScratchData< dim > &scratch_data, StabilizedMethodsTensorCopyData< dim > &copy_data) override
assemble_rhs Assembles the rhs
GLSNavierStokesCLSAssemblerCore(const std::shared_ptr< SimulationControl > &simulation_control, const SimulationParameters< dim > &nsparam)
const std::shared_ptr< SimulationControl > simulation_control
virtual void assemble_rhs(const NavierStokesScratchData< dim > &scratch_data, StabilizedMethodsTensorCopyData< dim > &copy_data) override
assemble_rhs Assembles the rhs
virtual void assemble_matrix(const NavierStokesScratchData< dim > &scratch_data, StabilizedMethodsTensorCopyData< dim > &copy_data) override
assemble_matrix Assembles the matrix
virtual void assemble_matrix(const NavierStokesScratchData< dim > &scratch_data, StabilizedMethodsTensorCopyData< dim > &copy_data) override
assemble_matrix Adds the surface tension and Marangoni forces to the strong residual used by the stab...
GLSNavierStokesCLSAssemblerMarangoni(const std::shared_ptr< SimulationControl > &p_simulation_control, Parameters::CLS_SurfaceTensionForce p_STF_properties)
const Parameters::CLS_SurfaceTensionForce STF_properties
const std::shared_ptr< SimulationControl > simulation_control
virtual void assemble_rhs(const NavierStokesScratchData< dim > &scratch_data, StabilizedMethodsTensorCopyData< dim > &copy_data) override
assemble_rhs Assembles the rhs
virtual void assemble_matrix(const NavierStokesScratchData< dim > &scratch_data, StabilizedMethodsTensorCopyData< dim > &copy_data) override
assemble_matrix Assembles the matrix
virtual void assemble_rhs(const NavierStokesScratchData< dim > &scratch_data, StabilizedMethodsTensorCopyData< dim > &copy_data) override
assemble_rhs Assembles the rhs
GLSNavierStokesCLSAssemblerNonNewtonianCore(const std::shared_ptr< SimulationControl > &simulation_control, const SimulationParameters< dim > &nsparam)
Tensor< 1, dim > get_kinematic_viscosity_gradient(const Tensor< 2, dim > &velocity_gradient, const Tensor< 3, dim > &velocity_hessians, const double shear_rate_magnitude, const double grad_kinematic_viscosity_shear_rate) const
Calculates an approximation of the gradient of the viscosity.
const std::shared_ptr< SimulationControl > simulation_control
const std::shared_ptr< SimulationControl > simulation_control
GLSNavierStokesCLSAssemblerSTF(const std::shared_ptr< SimulationControl > &p_simulation_control, const SimulationParameters< dim > &nsparam)
const Parameters::CLS_SurfaceTensionForce STF_parameters
virtual void assemble_matrix(const NavierStokesScratchData< dim > &scratch_data, StabilizedMethodsTensorCopyData< dim > &copy_data) override
assemble_matrix Adds the surface tension force to the strong residual used by the stabilization terms...
virtual void assemble_rhs(const NavierStokesScratchData< dim > &scratch_data, StabilizedMethodsTensorCopyData< dim > &copy_data) override
assemble_rhs Assembles the rhs
NavierStokesCLSAssemblerEvaporation(const std::shared_ptr< SimulationControl > &p_simulation_control, const Parameters::Evaporation &p_evaporation)
virtual void assemble_matrix(const NavierStokesScratchData< dim > &scratch_data, StabilizedMethodsTensorCopyData< dim > &copy_data) override
assemble_matrix Adds the recoil pressure force to the strong residual used by the stabilization terms...
virtual void assemble_rhs(const NavierStokesScratchData< dim > &scratch_data, StabilizedMethodsTensorCopyData< dim > &copy_data) override
assemble_rhs Assembles the rhs
const std::shared_ptr< SimulationControl > simulation_control
std::shared_ptr< EvaporationModel > evaporation_model
Class that stores the information required by the assembly procedure for a Navier-Stokes equation....
static std::vector< double > compute_permeability_area_inverse(const std::vector< double > &carman_kozeny_permeability_area)
Compute the inverse values of the Carman-Kozeny permeability areas.
virtual void assemble_rhs(const NavierStokesScratchData< dim > &scratch_data, StabilizedMethodsTensorCopyData< dim > &copy_data) override
Assemble the right-hand side (rhs) of:
virtual void assemble_matrix(const NavierStokesScratchData< dim > &scratch_data, StabilizedMethodsTensorCopyData< dim > &copy_data) override
Assembles the matrix of:
const std::vector< double > carman_kozeny_permeability_area_inv
PhaseChangeCarmanKozenyCLSAssembler(const Parameters::FluidIndicator &fluid_with_phase_change, const std::vector< double > &carman_kozeny_permeability_area, const std::vector< double > &carman_kozeny_tolerance, const std::vector< Parameters::PhaseChange > &phase_change_parameters_vector)
Assembler for the Carman-Kozeny permeability source term used for phase change modelling.
const std::vector< Parameters::PhaseChange > phase_change_parameters_vector
static std::vector< bool > indentify_fluid_with_phase_change(const Parameters::FluidIndicator fluid_with_phase_change, const unsigned int n_fluids)
Checks which fluid(s) has/have phase change and returns a vector of boolean indicating if each fluid ...
virtual void assemble_matrix(const NavierStokesScratchData< dim > &scratch_data, StabilizedMethodsTensorCopyData< dim > &copy_data) override
assemble_matrix Assembles the matrix of: .
PhaseChangeDarcyCLSAssembler(const std::vector< Parameters::PhaseChange > &phase_change_parameters_vector, const bool enable_darcy_multiply_by_density)
const std::vector< Parameters::PhaseChange > phase_change_parameters_vector
virtual void assemble_rhs(const NavierStokesScratchData< dim > &scratch_data, StabilizedMethodsTensorCopyData< dim > &copy_data) override
assemble_rhs Assembles the weak form of:
Class responsible for storing the information calculated using the assembly of stabilized Tensor<1,...
Definition copy_data.h:166
virtual void assemble_rhs(const NavierStokesScratchData< dim > &scratch_data, StabilizedMethodsTensorCopyData< dim > &copy_data) override
assemble_rhs Assembles the weak form of:
ThermalBuoyancyAssemblyCLS(const std::shared_ptr< SimulationControl > &simulation_control, const double reference_temperature)
virtual void assemble_matrix(const NavierStokesScratchData< dim > &scratch_data, StabilizedMethodsTensorCopyData< dim > &copy_data) override
assemble_matrix Adds the buoyancy force to the strong residual used by the stabilization terms of the...
const std::shared_ptr< SimulationControl > simulation_control
FluidIndicator
Class to account for different fluid indicators. This is used for multiphase simulations in PostProce...
Definition parameters.h:75
PhysicsAssemblerBase< NavierStokesScratchData< dim >, StabilizedMethodsTensorCopyData< dim > > NavierStokesAssemblerBase
A pure virtual class that serves as an interface for all of the assemblers for the Navier-Stokes Equa...
Simulation control classes for managing time-stepping and iteration control in Lethe.
Parameters for the calculation of surface tension force in the CLS solver.
CLS - Defines the parameters for free surface simulations using the CLS method. Has to be declared be...
Evaporation - Defines the subparameters for the evaporation cooling and recoil pressure at the free s...