TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Portance_interfaciale_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 Portance_interfaciale_base_included
17#define Portance_interfaciale_base_included
18#include <Correlation_base.h>
19#include <TRUSTTab.h>
20
21/*! @brief Base class for interfacial lift force operators of the form:
22 *
23 * F_{0l} = - F_{l0} = C_{0l} (u_l - u_0) x rot(u_0), where phase
24 * 0 is the carrier phase and l != 0 is any other phase.
25 * This class defines a coefficient function C_{kl} depending on:
26 * alpha, p, T -> unknowns (one value per phase each)
27 * rho, mu, sigma -> physical properties (same)
28 * ndv(k, l) -> ||v_k - v_l||, filled for k < l
29 * output:
30 * coeff(k, l, 0/1) -> coefficient C_{kl} and its derivative w.r.t. ndv(k, l), filled for k < l
31 *
32 *
33 */
34
36{
37 Declare_base(Portance_interfaciale_base);
38public:
39 struct input_t
40 {
41 double dh; // hydraulic diameter
42 DoubleTab alpha; // alpha[n] : void fraction of phase n
43 DoubleTab T; // T[n] : temperature of phase n
44 DoubleTab p; // pressure
45 DoubleTab nv; // nv[k, l] : norm of ||v_k - v_l||
46 DoubleTab mu; // mu[n] : dynamic viscosity of phase n
47 DoubleTab rho; // rho[n] : density of phase n
48 DoubleTab sigma; // sigma[ind_trav]: surface tension sigma(ind_trav), ind_trav = (n*(N-1)-(n-1)*(n)/2) + (m-n-1)
49 DoubleTab k_turb; // k_turb[n] : turbulent kinetic energy of phase n
50 DoubleTab d_bulles;//d_bulles[n] : bubble diameter of phase n
51 int e; // element index
52 };
53 /* output values */
54 struct output_t
55 {
56 DoubleTab Cl; //Cl(k, l) : lift coefficient between phases k and l
57 };
58
59 virtual void coefficient(const input_t& input, output_t& output) const = 0;
60
61protected:
62 /*! @brief Finds the continuous liquid phase index in a multiphase problem. */
63 int find_liquid_phase() const;
64};
65
66#endif
Base class for interfacial lift force operators of the form:
virtual void coefficient(const input_t &input, output_t &output) const =0
int find_liquid_phase() const
Finds the continuous liquid phase index in a multiphase problem.