TRUST 1.9.8
HPC thermohydraulic platform
Loading...
Searching...
No Matches
Robin_VEF.h
1/****************************************************************************
2* Copyright (c) 2025, 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 Robin_VEF_included
17#define Robin_VEF_included
18
19#include <Cond_lim_base.h>
20#include <Champ_front_txyz.h>
21
22/*! @brief Class Robin_VEF for Robin boundary conditions
23 *
24 * Robin boundary conditions functions are set as it follows :
25 * g = \alpha( \nu \dn u \cdot n - p ) + u \cdot n
26 * xi = \beta( \nu \dn u \times n) + u \times n
27 *
28 * with \dn = \nabla \cdot n
29 *
30 * The parameters \alpha, \beta, and the functions g and xi comes from the data file e.g.
31 *
32 * Conditions_limites {
33 * Robin_boudary_name {
34 * alpha val
35 * beta val
36 * champ_front_normal_et_tangentiel_robin champ_front_fonc_xyz 4 (in 3D, 2 in 2D) normal_field1D, tangential_field_X, tangential_field_Y, tangential_field_Z (tangential_fiel_1D for 2D)
37 * }
38 * }
39 *
40 * @sa Cond_lim_base Robin_VEF
41 */
42
43class Robin_VEF : public Cond_lim_base// , Champ_front_txyz
44{
45
46 Declare_instanciable( Robin_VEF ) ;
47
48public :
49
50 void completer() override;
51
52 inline double get_alpha_cl() const { return alpha_robin_cl_; } ;
53 inline double get_beta_cl() const { return beta_robin_cl_; };
54
55 // get the normal and the tangential flux
56 double flux_robin_normal_et_trangentiel_imp(int i, int j) const;
57
58 // get the normal flux
59 double flux_normal_imp(int i) const;
60
61 // get the tangential flux
62 double flux_tangentiel_imp(int i, int j ) const;
63
64 // udapte time data
65 void mettre_a_jour(double temps) override;
66
67 // for domain decomposition, not implemented yet
68 double flux_robin_imp_au_temps(double temps, int i) const ;
69 double flux_robin_imp_au_temps(double temps, int i, int j ) const;
70
71 const DoubleTab& flux_robin_normal_imp() const;
72 const DoubleTab& flux_robin_tangentiel_imp() const;
73
74 inline double increment_pression_bord(int face) const { return 0.; } ;
75
76protected :
77
78 double alpha_robin_cl_ = -123. ;
79 double beta_robin_cl_ = -123. ;
80 // Champ_front_normal_robin champ_normal_robin_cl_;
81 // Champ_front_tangentiel_robin champ_tangent_robin_cl_;
82 mutable DoubleTab flux_normal_impose_; // Stocke toutes les valeurs du flux sur toutes les faces de la frontiere (pas d'hypothese sur un champ uniforme). Utile pour le GPU.
83 mutable DoubleTab flux_tangentiel_impose_; // Stocke toutes les valeurs du flux sur toutes les faces de la frontiere (pas d'hypothese sur un champ uniforme). Utile pour le GPU.
84};
85
86#endif /* Robin_VEF_included */
classe Cond_lim_base Classe de base pour la hierarchie des classes qui representent les differentes c...
Class Robin_VEF for Robin boundary conditions.
Definition Robin_VEF.h:44
double increment_pression_bord(int face) const
Definition Robin_VEF.h:74
double get_beta_cl() const
Definition Robin_VEF.h:53
double flux_tangentiel_imp(int i, int j) const
Returns the value of the imposed tangential flux on the (i,j)-th component of the field representing ...
double flux_robin_imp_au_temps(double temps, int i) const
const DoubleTab & flux_robin_tangentiel_imp() const
Updates and returns the imposed flux array.
double flux_robin_normal_et_trangentiel_imp(int i, int j) const
Returns the value of the imposed normal and tangential Robin flux on the (i,j)-th component of the fi...
Definition Robin_VEF.cpp:79
DoubleTab flux_normal_impose_
Definition Robin_VEF.h:82
void completer() override
NE FAIT RIEN A surcharger dans les classes derivees.
Definition Robin_VEF.cpp:59
DoubleTab flux_tangentiel_impose_
Definition Robin_VEF.h:83
const DoubleTab & flux_robin_normal_imp() const
Updates and returns the imposed flux array.
double alpha_robin_cl_
Definition Robin_VEF.h:78
double flux_normal_imp(int i) const
Returns the value of the imposed normal flux on the i-th component of the field representing the flux...
void mettre_a_jour(double temps) override
Effectue une mise a jour en temps de la condition aux limites.
double beta_robin_cl_
Definition Robin_VEF.h:79
double get_alpha_cl() const
Definition Robin_VEF.h:52