TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
ALE_BeamCoupling.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#ifndef ALE_BeamCoupling_included
16#define ALE_BeamCoupling_included
17
18#include <Beam_model.h>
19#include <TRUSTTab.h>
20#include <Noms.h>
21#include <Entree.h>
22#include <Bords.h>
23#include <vector>
24
26class Equation_base;
27
28// Owns and manages all beam mechanical models attached to the ALE domain.
29// Handles input parsing, fluid force computation, time-step estimation,
30// and interpolation helpers used by Champ_front_ALE_Beam.
32{
33public:
34
35 ALE_BeamCoupling() = default;
36
37 void read(Entree& is, int nb_bords_ALE, const Bords& les_bords_ALE);
38
39 // Accessors
40 inline const int& getNbBeam () const { return nbBeam_; }
41 inline const Nom& getName (const int& i) const { return beam_[i].getBeamName(); }
42 inline const int& getNbModes (const int& i) const { return beam_[i].getNbModes(); }
43 inline const int& getNbPlanes(const int& i) const { return beam_[i].getNbPlanes(); }
44 inline const int& getLongitudinalAxis (const int& i) const { return beam_[i].getLongitudinalAxis(); }
45 inline const int& getBendingDirection (const int& i, const int& idx) const { return beam_[i].getBendingDirection(idx); }
46 inline const DoubleTab& getDisplacement(const int& i, const int& j) const { return beam_[i].getDisplacement(j); }
47 inline const DoubleTab& getRotation (const int& i, const int& j) const { return beam_[i].getRotation(j); }
48
49
50 DoubleTab& getVelocity(const int& i, const double& tps, const double& dt,
51 Equation_base* eqn, bool is_resumption,
52 int nb_bords_ALE, const Bords& les_bords_ALE);
53
54 void computeFluidForce(const int& i, Equation_base& eqn,
55 bool is_resumption,
56 int nb_bords_ALE, const Bords& les_bords_ALE);
57
58 double computeDt(Domaine_dis_base& le_domaine_dis, const int& i) const;
59
60
61 DoubleTab interpolationOnThe3DSurface (const int& i, const double& x, const double& y,
62 const double& z, const DoubleTab& u,
63 const DoubleTab& R) const;
64 double interpolationPhiOnThe3DSurface(const int& i, const double& x, const double& y,
65 const double& z, const int& comp,
66 const DoubleTab& u) const;
67
68 inline void clear() { nbBeam_ = 0; beam_.clear(); }
69
70private:
71
72 int nbBeam_ = 0;
73 std::vector<Beam_model> beam_;
74};
75
76#endif /* ALE_BeamCoupling_included */
const int & getLongitudinalAxis(const int &i) const
DoubleTab interpolationOnThe3DSurface(const int &i, const double &x, const double &y, const double &z, const DoubleTab &u, const DoubleTab &R) const
const int & getNbBeam() const
const DoubleTab & getRotation(const int &i, const int &j) const
void read(Entree &is, int nb_bords_ALE, const Bords &les_bords_ALE)
const DoubleTab & getDisplacement(const int &i, const int &j) const
const Nom & getName(const int &i) const
DoubleTab & getVelocity(const int &i, const double &tps, const double &dt, Equation_base *eqn, bool is_resumption, int nb_bords_ALE, const Bords &les_bords_ALE)
double interpolationPhiOnThe3DSurface(const int &i, const double &x, const double &y, const double &z, const int &comp, const DoubleTab &u) const
const int & getBendingDirection(const int &i, const int &idx) const
void computeFluidForce(const int &i, Equation_base &eqn, bool is_resumption, int nb_bords_ALE, const Bords &les_bords_ALE)
const int & getNbPlanes(const int &i) const
ALE_BeamCoupling()=default
double computeDt(Domaine_dis_base &le_domaine_dis, const int &i) const
const int & getNbModes(const int &i) const
classe Domaine_dis_base Cette classe est la base de la hierarchie des domaines discretisees.
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
classe Equation_base Le role d'une equation est le calcul d'un ou plusieurs champs....
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31