TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Dispersion_bulles_base.h
1/****************************************************************************
2* Copyright (c) 2026, CEA
3* All rights reserved.
4*
5* Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
6* 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7* 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
8* 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
9*
10* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
11* IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
12* OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
13*
14*****************************************************************************/
15
16#ifndef Dispersion_bulles_base_included
17#define Dispersion_bulles_base_included
18
19#include <Correlation_base.h>
20#include <TRUSTTab.h>
21
22/*! @brief Base class for turbulent bubble dispersion operators, where the force
23 *
24 * exerted on the gas by the liquid takes the form:
25 * F_{kl} = - F_{lk} = - C_{kl} grad(alpha{k}) + C_{lk} grad(alpha{l})
26 * where phase l is the continuous liquid phase and k != 0 is any other phase.
27 * This class defines a function C_{kl}!=C_{lk} depending on:
28 * alpha, p, T -> unknowns (one value per phase each)
29 * rho, mu, sigma, nut, k_turb -> physical properties (same)
30 * ndv(k, l) -> ||v_k - v_l||, to fill for k < l
31 * output:
32 * coeff(k, l, 0/1) -> coefficient C_{kl} and its derivative w.r.t. ndv(k, l), filled for k < l
33 *
34 *
35 */
36
38{
39 Declare_base(Dispersion_bulles_base);
40public:
41 struct input_t
42 {
43 double dh = 0.; // hydraulic diameter
44 DoubleTab alpha; // alpha[n] : void fraction of phase n
45 DoubleTab T; // T[n] : temperature of phase n
46 DoubleTab p; // pressure
47 DoubleTab rho; // rho[n] : density of phase n
48 DoubleTab mu; // mu[n] : dynamic viscosity of phase n
49 DoubleTab sigma; // sigma[ind_trav]: surface tension sigma(ind_trav), ind_trav = (n*(N-1)-(n-1)*(n)/2) + (m-n-1)
50 DoubleTab k_turb; // k_turb[n] : turbulent kinetic energy of phase n
51 DoubleTab nut; // nut[n] : turbulent viscosity of phase n
52 DoubleTab d_bulles;//d_bulles[n] : bubble diameter of phase n
53 DoubleTab nv; // nv(k, l) : norm of ||v_k - v_l||
54 int e; // element index
55 double k_WIT; // bubble-induced turbulent kinetic energy (WIT component)
56 };
57 /* output values */
58 struct output_t
59 {
60 DoubleTab Ctd; //Ctd(k, l) : turbulent dispersion coefficient between phases k and l
61 };
62
63 virtual void coefficient(const input_t& input, output_t& output) const = 0;
64
65protected:
66 /*! @brief Finds the continuous liquid phase index in a multiphase problem.
67 *
68 * Searches for a phase whose name starts with "liquide", preferring
69 * those ending with "continu". Exits if the problem is single-phase
70 * or no liquid phase is found.
71 */
72 int find_liquid_phase() const;
73};
74
75#endif
Base class for turbulent bubble dispersion operators, where the force.
int find_liquid_phase() const
Finds the continuous liquid phase index in a multiphase problem.
virtual void coefficient(const input_t &input, output_t &output) const =0