TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Echange_interne_impose.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 Echange_interne_impose_included
17#define Echange_interne_impose_included
18
19#include <Echange_externe_impose.h>
20#include <TRUST_Ref.h>
21
22class Champ_Don_base;
23
24/*! @brief class Echange_interne_impose
25 *
26 * This class represents the special case of Echange_externe_impose
27 * where the exchange wall is internal to the domain.
28 * The external temperature defined in Echange_externe_impose becomes the
29 * temperature located on the other side of the internal wall.
30 * When the temperature is at the element center (e.g. VDF), the provided h_gap
31 * is also modified to account for the half-cell on the other side of the wall.
32 *
33 * @sa Echange_impose_base Echange_global_impose
34 */
36{
37 Declare_instanciable(Echange_interne_impose);
38public:
39 int initialiser(double temps) override;
40 void completer() override;
41 void mettre_a_jour(double tps) override;
42
43 virtual void init();
44
45 void verifie_ch_init_nb_comp() const override;
46
47 // Overriden in Echange_interne_parfait to have h_gap=+infinity:
48 virtual double calcul_h_imp(const double h_gap, const double invLambda) const;
49
50 const DoubleTab& inv_lambda() const { return inv_lambda_; }
51
52 // re-implemented to account for the second OWN_PTR(Champ_front_base) in the class (h_gap_):
53 void set_temps_defaut(double temps) override;
54 void fixer_nb_valeurs_temporelles(int nb_cases) override;
55 void changer_temps_futur(double temps, int i) override;
56 int avancer(double temps) override;
57 int reculer(double temps) override;
58 void associer_fr_dis_base(const Frontiere_dis_base& fr) override;
59
60protected:
61 virtual void update_inv_lambda();
62
64 OBS_PTR(Champ_Don_base) lambda_ref_; // reference to the field of thermic conductivity
65 DoubleTab inv_lambda_; // = e/lambda on the internal boundary
66};
67
68#endif
class Champ_Don_base base class of Given Fields (not calculated)
class Champ_front_base Base class for the hierarchy of boundary fields.
Classe Echange_externe_impose: This class represents the special case of the class.
class Echange_interne_impose
void fixer_nb_valeurs_temporelles(int nb_cases) override
Called by Conds_lim::completer. Calls cha_front_base::fixer_nb_valeurs_temporelles.
void mettre_a_jour(double tps) override
Performs a time update of the boundary conditions.
OWN_PTR(Champ_front_base) h_gap_
int avancer(double temps) override
Rotates the wheel of the BC.
int reculer(double temps) override
Rotates the wheel of the BC.
int initialiser(double temps) override
Initialization at the beginning of the calculation.
void associer_fr_dis_base(const Frontiere_dis_base &fr) override
Associates the boundary with the object.
void set_temps_defaut(double temps) override
Changes the i-th future time of the BC.
OBS_PTR(Champ_Don_base) lambda_ref_
void completer() override
DOES NOTHING must be overridden in derived classes.
void changer_temps_futur(double temps, int i) override
Changes the i-th future time of the BC.
virtual double calcul_h_imp(const double h_gap, const double invLambda) const
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...
const DoubleTab & inv_lambda() const
class Frontiere_dis_base Class representing a discretized boundary.