TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Vitesse_relative_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 Vitesse_relative_base_included
17#define Vitesse_relative_base_included
18
19#include <Correlation_base.h>
20#include <TRUSTTab.h>
21
22/*! @brief classe Vitesse_relative_base
23 *
24 * correlations de vitesse relative de la forme ur = (v_k - v_l)
25 *
26 */
27
29{
30 Declare_base(Vitesse_relative_base);
31
32public:
33 struct input_t
34 {
35 double dh = 0.0; // diametre hydraulique
36 DoubleTab sigma; // tension superficielle sigma(ind_trav), ind_trav = (n*(N-1)-(n-1)*(n)/2) + (m-n-1)
37 DoubleTab alpha; // taux de vide
38 DoubleTab rho; // masse volumique
39 DoubleTab mu; // viscosite
40 DoubleTab d_bulles; // diametre bulles
41 DoubleTab k; // energie cinetique turbulente
42 DoubleTab nut; // energie cinetique turbulente
43 DoubleTab v; // v(n, d) : vitesse de la phase n dans la direction d
44 DoubleTab gradAlpha;// gradAlpha(n,d) : gradient du taux de vide ; calcule que si requis par la correlation
45 DoubleTab vort; // vort(n,d) : gradient du taux de vide ; calcule que si requis par la correlation
46 DoubleVect g; // vecteur gravite
47 };
48 /* valeurs de sortie */
49 struct output_t
50 {
51 DoubleTab vr; // vr(n, m, d) : vitesse relative des phases n et m dans la direction d (v(n, d) - v(m, d))
52 DoubleTab dvr;//dvr(n, m, d, D*l+d2) : derivee de la vitesse relative des phases n et m dans la direction d (v(n, d) - v(m, d))
53 // par rapport a la vitesse de la phase l selon la direction d2
54 };
55 virtual void vitesse_relative(const input_t& input, output_t& output) const = 0;
56 virtual bool needs_grad_alpha() const {return 0;};
57 virtual bool needs_vort() const {return 0;};
58 virtual void set_param(Param& param) const override { /* do nothing */ }
59
60protected:
61 int n_l = -1, n_g = -1; // phases traitees : liquide / gaz continu
62};
63
64#endif /* Vitesse_relative_base_included */
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
classe Vitesse_relative_base
virtual void set_param(Param &param) const override
virtual bool needs_grad_alpha() const
virtual bool needs_vort() const
virtual void vitesse_relative(const input_t &input, output_t &output) const =0