TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Vitesse_derive_Ishii.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 <Vitesse_derive_Ishii.h>
17#include <cmath>
18
19Implemente_instanciable(Vitesse_derive_Ishii, "Vitesse_relative_derive_Ishii", Vitesse_derive_base);
20
23
25{
26 param.ajouter("subcooled_boiling", &sb_, Param::REQUIRED);
28}
29
31{
32 const int D = dimension;
33 const double norm_g = sqrt(local_carre_norme_vect(input.g));
34
35 int N = input.v.dimension(0);
36 int ind_trav = 0 ; // Et oui ! matrice triang sup !
37 if (n_g>n_l) ind_trav = (n_l*(N-1)-(n_l-1)*(n_l)/2) + (n_g-n_l-1);
38 else ind_trav = (n_g*(N-1)-(n_g-1)*(n_g)/2) + (n_l-n_g-1);
39
40 /* distribution parameter */
41 C0 = ( Cinf + (1.0 - Cinf) * std::sqrt(input.rho(n_g) / input.rho(n_l)) ) * (1.0 - sb_ * exp(-zeta * input.alpha(n_g)));
42
43 /* drift velocity */
44 double dv = std::sqrt(2.0) * pow((input.rho(n_l) - input.rho(n_g)) * norm_g * input.sigma(ind_trav) / input.rho(n_l) / input.rho(n_l), 0.25) * pow(1.0 - input.alpha(n_g), theta);
45 for (int d = 0; d < D; d++) vg0(d) = - dv * input.g(d) / norm_g;
46}
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
static int dimension
Definition Objet_U.h:99
virtual Entree & readOn(Entree &)
Lecture d'un Objet_U sur un flot d'entree Methode a surcharger.
Definition Objet_U.cpp:293
virtual Sortie & printOn(Sortie &) const
Ecriture de l'objet sur un flot de sortie Methode a surcharger.
Definition Objet_U.cpp:282
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
void ajouter(const char *keyword, const int *value, Param::Nature nat=Param::OPTIONAL)
Register an integer parameter.
Definition Param.cpp:364
@ REQUIRED
Definition Param.h:115
Classe de base des flux de sortie.
Definition Sortie.h:52
_SIZE_ dimension(int d) const
Definition TRUSTTab.tpp:133
classe Vitesse_derive_Ishii
void evaluate_C0_vg0(const input_t &input) const override
void set_param(Param &param) const override
classe Vitesse_derive_base
void set_param(Param &param) const override