16#include <Fluide_Dilatable_base.h>
17#include <Champ_Fonc_Tabule.h>
18#include <Loi_Etat_GP_base.h>
19#include <Champ_Uniforme.h>
20#include <Domaine_VF.h>
56 le_fluide->set_Cp(
Cp_);
64 const DoubleTab& tab_Temp = le_fluide->inco_chaleur().valeurs();
65 const DoubleTab& tab_rho = le_fluide->masse_volumique().valeurs();
68 for (
int i=0 ; i<ntot ; i++)
78 const DoubleTab& tab_Temp = le_fluide->inco_chaleur().valeurs();
79 temperature_->valeurs() = tab_Temp;
96 const DoubleTab& tab_mu = mu.
valeurs();
98 DoubleTab& tab_lambda =lambda.
valeurs();
112 double mu0 = tab_mu(0,0);
113 tab_lambda *= (mu0 *
Cp_ /
Pr_);
130 Cerr <<
"If lambda is of type Champ_Uniform, mu must also be of type Champ_Uniforme !"<< finl;
131 Cerr <<
"If needed, you can use a Champ_Fonc_Fonction or a Champ_Fonc_Tabule with a constant for mu."<< finl ;
145 const DoubleTab& tab_lambda = champ_lambda.
valeurs();
147 DoubleTab& tab_alpha = le_fluide->diffusivite().
valeurs();
148 const DoubleTab& tab_rho = le_fluide->masse_volumique().valeurs();
151 if (champ_alpha.
que_suis_je()==
"Champ_Fonc_P0_VDF") isVDF = 1;
152 int n=tab_alpha.
size();
156 ToDo_Kokkos(
"critical");
157 for (
int i=0 ; i<n ; i++)
158 tab_alpha(i,0) = (lambda_uniforme ? tab_lambda(0,0) : tab_lambda(i,0)) / (tab_rho(i,0) *
Cp_);
162 const IntTab& tab_elem_faces = ref_cast(
Domaine_VF,le_fluide->vitesse().domaine_dis_base()).elem_faces();
165 CIntTabView elem_faces = tab_elem_faces.
view_ro();
166 CDoubleTabView lambda = tab_lambda.
view_ro();
167 CDoubleTabView rho = tab_rho.
view_ro();
168 DoubleTabView alpha = tab_alpha.
view_wo();
169 Kokkos::parallel_for(start_gpu_timer(__KERNEL_NAME__), n, KOKKOS_LAMBDA(
173 for (
int face=0; face<nfe; face++) rhoelem += rho(elem_faces(i,face),0);
175 alpha(i,0) = (lambda_uniforme ? lambda(0,0) : lambda(i,0))/ ( rhoelem * Cp );
177 end_gpu_timer(__KERNEL_NAME__);
class Champ_Don_base base class of Given Fields (not calculated)
void mettre_a_jour(double temps) override
Time update.
DoubleTab & valeurs() override
Overrides Champ_base::valeurs() Returns the array of values.
Class Champ_Fonc_Tabule Derived class of Champ_Fonc_base representing.
Class defining operators and methods for all reading operation in an input flow (file,...
Base class for a dilatable fluid, inheriting from Fluide_base.
Base state law class for ideal gases, defining a dilatable fluid with the equation of state: Pth = rh...
void initialiser() override
Initialises the state law by computing Pth.
const Nom type_fluide() const override
Returns the type of fluid associated.
void calculer_lambda() override
Computes the thermal conductivity.
void remplir_T() override
Fills the temperature array: T = temp + 273.15.
void calculer_Cp() override
Computes Cp. Does nothing: Cp is constant.
void associer_fluide(const Fluide_Dilatable_base &) override
Associates the fluid with the state law.
double inverser_Pth(double, double) override
Computes the thermodynamic pressure from temperature and density.
void calculer_alpha() override
Computes the thermal diffusivity.
Base class for the state law hierarchy defining a dilatable fluid.
virtual void associer_fluide(const Fluide_Dilatable_base &)
Associates the fluid with the state law.
class Nom: a character string for naming TRUST objects.
const Nom & que_suis_je() const
Returns the string identifying the class.
virtual Entree & readOn(Entree &)
Reads an Objet_U from an input stream. Virtual method to override.
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Base class for output streams.
std::enable_if_t< is_default_exec_space< EXEC_SPACE >, View< _TYPE_, _SHAPE_ > > view_wo()
std::enable_if_t< is_default_exec_space< EXEC_SPACE >, ConstView< _TYPE_, _SHAPE_ > > view_ro() const
_SIZE_ size_totale() const
virtual void echange_espace_virtuel(IsExchangeBlocking exchange_type=IsExchangeBlocking::DefaultBlocking, const std::string kernel_name="noname")