TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Neumann_sortie_libre.h
1/****************************************************************************
2* Copyright (c) 2024, 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 Neumann_sortie_libre_included
17#define Neumann_sortie_libre_included
18
19#include <Neumann_val_ext.h>
20
21/*! @brief Neumann_sortie_libre This class represents an open boundary without imposed velocity.
22 *
23 * For Navier-Stokes equations, pressure must be imposed on such a boundary.
24 * To handle the hydraulics, the class Sortie_libre_pression_imposee is derived from Neumann_sortie_libre.
25 * Boundary conditions of type Neumann_sortie_libre or derived types result in zero diffusive fluxes.
26 * However, the treatment of convective fluxes requires knowing the convected field outside the boundary in case of fluid re-entry.
27 * This is why the class carries an OWN_PTR(Champ_front_base) (member le_champ_ext).
28 *
29 * In the computation operators, boundary conditions of type Neumann_sortie_libre and derived types will be treated identically.
30 *
31 * @sa Neumann Sortie_libre_pression_imposee
32 */
34{
35 Declare_instanciable(Neumann_sortie_libre);
36public:
37 const DoubleTab& tab_ext() const override;
38 DoubleTab& tab_ext() override;
39
40 double val_ext(int i) const override;
41 double val_ext(int i, int j) const override;
42 const DoubleTab& val_ext() const;
43 int initialiser(double temps) override;
44 void associer_fr_dis_base(const Frontiere_dis_base&) override;
45 void verifie_ch_init_nb_comp() const override;
46
47 void fixer_nb_valeurs_temporelles(int nb_cases) override;
48 void mettre_a_jour(double temps) override;
49 void set_temps_defaut(double temps) override;
50 void changer_temps_futur(double temps, int i) override;
51 int avancer(double temps) override;
52 int reculer(double temps) override;
53
54protected:
56 mutable DoubleTab val_ext_; // Stores all boundary condition values on all faces of the boundary (no assumption of a uniform field). Useful for GPU.
57};
58
59#endif
class Champ_front_base Base class for the hierarchy of boundary fields.
class Frontiere_dis_base Class representing a discretized boundary.
Neumann_sortie_libre This class represents an open boundary without imposed velocity.
int avancer(double temps) override
Rotates the wheel of the BC.
void mettre_a_jour(double temps) override
Performs a time update of the boundary condition.
const DoubleTab & val_ext() const
void changer_temps_futur(double temps, int i) override
Changes the i-th future time of the BC.
int initialiser(double temps) override
Initialization at the beginning of the calculation.
void associer_fr_dis_base(const Frontiere_dis_base &) override
Associates the boundary with the object.
const DoubleTab & tab_ext() const override
void verifie_ch_init_nb_comp() const override
Calls the verification of the field read through the equation for which the boundary condition is con...
int reculer(double temps) override
Rotates the wheel of the BC.
void set_temps_defaut(double temps) override
Changes the i-th future time of the BC.
OWN_PTR(Champ_front_base) le_champ_ext
void fixer_nb_valeurs_temporelles(int nb_cases) override
Called by Conds_lim::completer. Calls cha_front_base::fixer_nb_valeurs_temporelles.
Classe Neumann_val_ext This class is the base class of the hierarchy of.