TrioCFD 1.9.9_beta
TrioCFD documentation
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 Relative velocity correlations of the form ur = (v_k - v_l).
23 *
24 *
25 */
26
28{
29 Declare_base(Vitesse_relative_base);
30
31public:
32 struct input_t
33 {
34 double dh = 0.0; // hydraulic diameter
35 DoubleTab sigma; // surface tension sigma(ind_trav), ind_trav = (n*(N-1)-(n-1)*(n)/2) + (m-n-1)
36 DoubleTab alpha; // void fraction
37 DoubleTab rho; // density
38 DoubleTab mu; // viscosity
39 DoubleTab d_bulles; // bubble diameter
40 DoubleTab k; // turbulent kinetic energy
41 DoubleTab nut; // turbulent viscosity
42 DoubleTab v; // v(n, d) : velocity of phase n in direction d
43 DoubleTab gradAlpha;// gradAlpha(n,d) : gradient of void fraction; computed only if required by the correlation
44 DoubleTab vort; // vort(n,d) : vorticity; computed only if required by the correlation
45 DoubleVect g; // gravity vector
46 };
47 /* output values */
48 struct output_t
49 {
50 DoubleTab vr; // vr(n, m, d) : relative velocity of phases n and m in direction d (v(n, d) - v(m, d))
51 DoubleTab dvr;//dvr(n, m, d, D*l+d2) : derivative of the relative velocity of phases n and m in direction d (v(n, d) - v(m, d))
52 // with respect to the velocity of phase l in direction d2
53 };
54 virtual void vitesse_relative(const input_t& input, output_t& output) const = 0;
55 virtual bool needs_grad_alpha() const {return 0;};
56 virtual bool needs_vort() const {return 0;};
57 virtual void set_param(Param& param) const override { /* do nothing */ }
58
59protected:
60 int n_l = -1, n_g = -1; // treated phases: liquid / continuous gas
61};
62
63#endif /* Vitesse_relative_base_included */
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
Relative velocity correlations of the form ur = (v_k - v_l).
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