TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Tube_base.h
1/****************************************************************************
2* Copyright (c) 2015 - 2016, 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 Tube_base_included
17#define Tube_base_included
18
19#include <Objet_U.h>
20#include <Linear_algebra_tools.h>
21#include <Noms.h>
22#include <Domaine_IJK.h>
23#include <TRUST_Vector.h>
24#include <TRUST_Deriv.h>
25#include <TRUST_Ref.h>
26
27class Tube_base : public Objet_U
28{
29 Declare_base(Tube_base);
30public:
31 void initialize(const Domaine_IJK&);
33 {
34 return pos_;
35 }
37 {
38 return v_;
39 }
41 {
42 return acceleration_;
43 }
44 double get_omega() const
45 {
46 return omega_;
47 }
48 double get_rayon() const
49 {
50 return rayon_;
51 }
52 // current_time: temps physique actuel du calcul
53 // force appliquee est la force appliquee par le fluide sur le tube
54 // dt intervalle de temps depuis le current_time precedent
55 virtual void update_vitesse_position(double current_time, double dt, const Vecteur3& force_appliquee) = 0;
56 const Nom& nom_du_tube() const
57 {
58 return nom_;
59 }
60protected:
61 OBS_PTR(Domaine_IJK) ref_domaine_;
62 double omega_; // vitesse de rotation du tube en rad/s
63 double rayon_; // rayon du tube
68};
69
70
71class Tube_impose : public Tube_base
72{
73 Declare_instanciable(Tube_impose);
74public:
75 void update_vitesse_position(double current_time, double dt, const Vecteur3& force_appliquee) override;
76protected:
77 // Troix chaines de caracteres (fonctions position(t))
79};
80
81
82class Tube_libre : public Tube_base
83{
84 Declare_instanciable(Tube_libre);
85public:
86 void update_vitesse_position(double current_time, double dt, const Vecteur3& force_appliquee) override;
87protected:
89 bool blocage_[3] = {false};
91
92};
93
94class Faisceau_Tubes : public VECT(OWN_PTR(Tube_base))
95{
96 Declare_instanciable(Faisceau_Tubes);
97};
98
99#endif
This class encapsulates all the information related to the eulerian mesh for TrioIJK.
Definition Domaine_IJK.h:47
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
Un tableau de chaine de caracteres (VECT(Nom)).
Definition Noms.h:26
Objet_U()
Constructeur par defaut : attribue un numero d'identifiant unique a l'objet (object_id_),...
Definition Objet_U.cpp:55
const Vecteur3 & get_current_pos() const
Definition Tube_base.h:32
double get_omega() const
Definition Tube_base.h:44
const Vecteur3 & get_current_acceleration() const
Definition Tube_base.h:40
Vecteur3 pos_
Definition Tube_base.h:64
double get_rayon() const
Definition Tube_base.h:48
Vecteur3 acceleration_
Definition Tube_base.h:66
const Nom & nom_du_tube() const
Definition Tube_base.h:56
virtual void update_vitesse_position(double current_time, double dt, const Vecteur3 &force_appliquee)=0
void initialize(const Domaine_IJK &)
Definition Tube_base.cpp:53
OBS_PTR(Domaine_IJK) ref_domaine_
double rayon_
Definition Tube_base.h:63
const Vecteur3 & get_current_velocity() const
Definition Tube_base.h:36
Vecteur3 v_
Definition Tube_base.h:65
double omega_
Definition Tube_base.h:62
void update_vitesse_position(double current_time, double dt, const Vecteur3 &force_appliquee) override
Noms expressions_position_
Definition Tube_base.h:78
double rho_cylindre_
Definition Tube_base.h:90
Vecteur3 position_equilibre_
Definition Tube_base.h:88
bool blocage_[3]
Definition Tube_base.h:89
double raideur_
Definition Tube_base.h:90
void update_vitesse_position(double current_time, double dt, const Vecteur3 &force_appliquee) override
double amortissement_
Definition Tube_base.h:90