TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Frottement_interfacial_base.cpp
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#include <Frottement_interfacial_base.h>
17#include <Pb_Multiphase.h>
18
19Implemente_base(Frottement_interfacial_base, "Frottement_interfacial_base", Correlation_base);
20// XD frottement_interfacial source_base frottement_interfacial BRACE Source term which corresponds to the phases
21// XD_CONT friction at the interface
22// XD attr a_res floattant a_res OPT void fraction at which the gas velocity is forced to approach liquid velocity
23// XD_CONT (default alpha_evanescence*100)
24// XD attr dv_min floattant dv_min OPT minimal relative velocity used to linearize interfacial friction at low
25// XD_CONT velocities
26// XD attr exp_res entier exp_res OPT exponent that callibrates intensity of velocity convergence (default 2)
27
29{
30 return os;
31}
32
34{
35 return is;
36}
37
39{
40 const Pb_Multiphase *pbm = sub_type(Pb_Multiphase, pb_.valeur()) ? &ref_cast(Pb_Multiphase, pb_.valeur()) : nullptr;
41 if (!pbm || pbm->nb_phases() == 1)
42 Process::exit(que_suis_je() + " : not needed for single-phase flow!");
43
44 int n_l = -1;
45 for (int n = 0; n < pbm->nb_phases(); n++)
46 if (pbm->nom_phase(n).debute_par("liquide")
47 && (n_l < 0 || pbm->nom_phase(n).finit_par("continu")))
48 n_l = n;
49
50 if (n_l < 0)
51 Process::exit(que_suis_je() + " : liquid phase not found!");
52
53 return n_l;
54}
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
Frottement_interfacial_base class: utility for interfacial friction operators taking the form.
int find_liquid_phase() const
Finds the continuous liquid phase index in a multiphase problem.
virtual int debute_par(const char *const n) const
Definition Nom.cpp:314
const Nom & que_suis_je() const
Returns the string identifying the class.
Definition Objet_U.cpp:104
virtual Entree & readOn(Entree &)
Reads an Objet_U from an input stream. Virtual method to override.
Definition Objet_U.cpp:289
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
Definition Objet_U.cpp:278
Multiphase thermohydraulics problem of type "3*N equations":
const Nom & nom_phase(int i) const
int nb_phases() const
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Definition Process.cpp:466
Base class for output streams.
Definition Sortie.h:52