TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Terme_Source_Acceleration.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 Terme_Source_Acceleration_included
17#define Terme_Source_Acceleration_included
18
19#include <Champ_Fonc_base.h>
20#include <Source_base.h>
21
22#include <TRUST_Ref.h>
23#include <Motcle.h>
24
26class Probleme_base;
27class Domaine_VF;
28class Champ_Don_base;
29
31{
32 // C'est une classe de base: voir Terme_Source_Acceleration_VDF_Faces
33 Declare_base_sans_constructeur(Terme_Source_Acceleration);
34public:
35
37 void associer_pb(const Probleme_base&) override;
38 DoubleTab& calculer(DoubleTab&) const override;
39 int a_pour_Champ_Fonc(const Motcle& mot, OBS_PTR(Champ_base) &ch_ref) const override;
40 inline const Champ_Don_base& champ_vitesse() const { return champ_vitesse_; }
41 bool has_champ_vitesse() const { return bool(champ_vitesse_); }
42 inline const Champ_Don_base& omega() const { return omega_; }
43 bool has_omega() const { return bool(omega_); }
44
45protected:
46 virtual void lire_data(Entree& s);
47 virtual const Champ_Fonc_base& get_terme_source_post() const;
49 virtual const DoubleTab& calculer_vitesse_faces(DoubleTab& stockage) const = 0;
50 const DoubleTab& calculer_la_source(DoubleTab& src_faces) const;
51 virtual const Navier_Stokes_std& get_eq_hydraulique() const;
52 void mettre_a_jour(double temps) override;
53
54
55private:
56// Le terme source, homogene a d/dt(rho*v) et discretise comme la vitesse,
57// stocke pour pouvoir etre postraite.
58// Il est calcule par ajouter() (voir commentaires dans a_pour_champ_fonc)
59 mutable OWN_PTR(Champ_Fonc_base) terme_source_post_;
60
61 // **********************************************************************
62 // champ de vitesse impose au repere mobile (lu optionnellement
63 // dans le jeu de donnees, non utilise par le terme source mais potentiellement
64 // pour le code pour calculer la vitesse dans le repere fixe)
65 OWN_PTR(Champ_Don_base) champ_vitesse_;
66
67 // champ d'acceleration impose (lu dans le jeu de donnees)
68 // OWN_PTR(Champ_Don_base) lu dans le jeu de donnees, homogene a d/dt(v) en m/(s^2).
69 // Ce doit etre un champ vectoriel uniforme a "dimension" composantes.
70 OWN_PTR(Champ_Don_base) champ_acceleration_;
71
72 // champ de rotation instationnaire:
73
74 // Vitesse de rotation: champ uniforme a trois composantes
75 // (attention: en 2D, vecteur oriente selon Z)
76 OWN_PTR(Champ_Don_base) omega_;
77 // Derivee de la vitesse de rotation par rapport au temps:
78 // champ uniforme a trois composantes
79 OWN_PTR(Champ_Don_base) domegadt_;
80 // Position du centre de rotation:
81 // champ uniforme a "dimension" composantes
82 OWN_PTR(Champ_Don_base) centre_rotation_;
83
84
85 enum Option_TSA { TERME_COMPLET, CORIOLIS_SEUL, ENTRAINEMENT_SEUL };
86 Option_TSA option_ = TERME_COMPLET;
87 // *****************************************************************
88};
89
90#endif
classe Champ_Don_base classe de base des Champs donnes (non calcules)
classe Champ_Fonc_base Classe de base des champs qui sont fonction d'une grandeur calculee
classe Champ_base Cette classe est la base de la hierarchie des champs.
Definition Champ_base.h:43
class Domaine_VF
Definition Domaine_VF.h:44
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
OBS_PTR(Equation_base) mon_equation
Une chaine de caractere (Nom) en majuscules.
Definition Motcle.h:26
classe Navier_Stokes_std Cette classe porte les termes de l'equation de la dynamique
classe Probleme_base C'est un Probleme_U qui n'est pas un couplage.
classe Source_base Un objet Source_base est un terme apparaissant au second membre d'une
Definition Source_base.h:42
const Champ_Don_base & omega() const
const Champ_Don_base & champ_vitesse() const
virtual const Navier_Stokes_std & get_eq_hydraulique() const
Renvoie eq_hydraulique_ !
DoubleTab & calculer(DoubleTab &) const override
resu=0; ajouter(resu); (appel a ajouter() de la classe derivee)
const DoubleTab & calculer_la_source(DoubleTab &src_faces) const
Calcul de la valeur du champ la_source aux faces en fonction de - calculer_vitesse_faces().
int a_pour_Champ_Fonc(const Motcle &mot, OBS_PTR(Champ_base) &ch_ref) const override
Methode surchargee de Source_base.
virtual const DoubleTab & calculer_vitesse_faces(DoubleTab &stockage) const =0
void mettre_a_jour(double temps) override
Evalue les champs d'acceleration et de rotation au temps t.
void associer_pb(const Probleme_base &) override
virtual Champ_Fonc_base & get_set_terme_source_post() const
virtual const Champ_Fonc_base & get_terme_source_post() const
virtual void lire_data(Entree &s)
Methode appelee par readOn des classes derivees Terme_Source_Acceleration_VDF_Face,...