TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
MuLambda_TBLE_Fcts_T.cpp
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#include <MuLambda_TBLE_Fcts_T.h>
17#include <Eq_couch_lim.h>
18#include <Fluide_Incompressible.h>
19#include <Champ_Uniforme.h>
20
21Implemente_instanciable(MuLambda_TBLE_Fcts_T,"MuLambda_TBLE_Fcts_T",MuLambda_TBLE_base);
22
23
25{
26 return os;
27}
28
30{
31 return is;
32}
33
34
35void MuLambda_TBLE_Fcts_T::setFcts(Nom& ch_mu, Nom& ch_lambda)
36{
37 chaine_mu = ch_mu;
38 chaine_lambda = ch_lambda;
39}
40
42{
43 p_mu.setNbVar(1);
44 p_mu.setString(chaine_mu);
45 p_mu.addVar("val");
46 p_mu.parseString();
47
48 p_lambda.setNbVar(1);
49 p_lambda.setString(chaine_lambda);
50 p_lambda.addVar("val");
51 p_lambda.parseString();
52
53 if (!sub_type(Champ_Uniforme,milieu.masse_volumique()))
54 {
55 Cerr << "Variable volume mass is not possible yet with TBLE law." << finl;
57 }
58 rho = milieu.masse_volumique().valeurs()(0,0);
59 if (!sub_type(Champ_Uniforme,milieu.capacite_calorifique()))
60 {
61 Cerr << "Variable capacity heat exchange is not possible yet with TBLE law." << finl;
63 }
64 rhoCp = rho*milieu.capacite_calorifique().valeurs()(0,0);
65}
66
67double MuLambda_TBLE_Fcts_T::getNu(OBS_PTR(Eq_couch_lim) eq_T, int ind)
68{
69 double T = eq_T->get_Unp1(0,ind);
70 p_mu.setVar(0, T);
71 return p_mu.eval()/rho;
72}
73
74double MuLambda_TBLE_Fcts_T::getAlpha(OBS_PTR(Eq_couch_lim) eq_T, int ind)
75{
76 double T = eq_T->get_Unp1(0,ind);
77 p_lambda.setVar(0, T);
78 return p_lambda.eval()/rhoCp;
79}
DoubleTab & valeurs() override
Surcharge Champ_base::valeurs() Renvoie le tableau des valeurs.
virtual DoubleTab & valeurs()=0
classe Champ_Uniforme Represente un champ constant dans l'espace et dans le temps.
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
double get_Unp1(int j, int i)
classe Milieu_base Cette classe est la base de la hierarchie des milieux (physiques)
Definition Milieu_base.h:50
virtual const Champ_Don_base & capacite_calorifique() const
Renvoie la capacite calorifique du milieu.
virtual const Champ_base & masse_volumique() const
Renvoie la masse volumique du milieu.
Classe MuLambda_TBLE_Fcts_T Classe abstraite calculant Mu et Lambda suivant une fonction de T.
void initialiser(const Milieu_base &) override
double getNu(OBS_PTR(Eq_couch_lim) eq_T, int ind) override
double getAlpha(OBS_PTR(Eq_couch_lim) eq_T, int ind) override
Classe MuLambda_TBLE_base Classe abstraite calculant Mu et Lambda sur le maillage TBLE.
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
virtual Entree & readOn(Entree &)
Lecture d'un Objet_U sur un flot d'entree Methode a surcharger.
Definition Objet_U.cpp:293
virtual Sortie & printOn(Sortie &) const
Ecriture de l'objet sur un flot de sortie Methode a surcharger.
Definition Objet_U.cpp:282
static void exit(int exit_code=-1)
Routine de sortie de TRUST dans une region Kokkos.
Definition Process.cpp:455
Classe de base des flux de sortie.
Definition Sortie.h:52