TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Transport_K_ou_Eps Class Reference

classe Transport_K_ou_Eps Cette classe represente l'equation de transport de l'energie cinetique More...

#include <Transport_K_ou_Eps.h>

Inheritance diagram for Transport_K_ou_Eps:
[legend]
Collaboration diagram for Transport_K_ou_Eps:
[legend]

Public Member Functions

void set_param (Param &param) const override
int lire_motcle_non_standard (const Motcle &, Entree &) override
 Reads non-simple-type parameters of an Objet_U from an input stream.
void associer_Champ_Inconnu (const Champ_Inc_base &)
 Associe un champ de vitesse (transportante)a l'equation.
void associer_modele_turbulence (const Modele_turbulence_hyd_2_eq_base &) override
 Associe un modele de turbulence K-epsilon a l'equation.
int nombre_d_operateurs () const override
 Renvoie le nombre d'operateurs de l'equation.
const Operateuroperateur (int) const override
 Renvoie l'operateur specifie par son index: renvoie terme_diffusif si i = 0.
Operateuroperateur (int) override
 Renvoie l'operateur specifie par son index: renvoie terme_diffusif si i = 0.
const Motcledomaine_application () const override
 Renvoie le nom du domaine d'application de l'equation.
DoubleTab & corriger_derivee_impl (DoubleTab &d) override
Public Member Functions inherited from Transport_K_ou_Eps_base
void discretiser () override
 Discretizes the equation.
void set_param (Param &param) const override
virtual int controler_variable ()
 Controle le champ inconnue K-epsilon en forcant a zero les valeurs du champ.
void valider_iteration () override
 on remet eps et K positifs
const Champ_Inc_baseinconnue () const override
 Renvoie le champ inconnue de l'equation.
Champ_Inc_baseinconnue () override
 Renvoie le champ inconnue de l'equation.
const Champ_baseget_champ (const Motcle &nom) const override
bool has_champ (const Motcle &nom, OBS_PTR(Champ_base) &ref_champ) const override
bool has_champ (const Motcle &nom) const override
bool transporte_t_il_K () const
void set_K_equation ()
Public Member Functions inherited from Transport_2eq_base
void associer (const Equation_base &)
void associer_vitesse (const Champ_base &)
void associer_milieu_base (const Milieu_base &) override
 Associe un milieu physique a l'equation.
Milieu_basemilieu () override
 Renvoie le milieu (fluide) associe a l'equation.
const Milieu_basemilieu () const override
 Renvoie le milieu (fluide) associe a l'equation.
double calculer_pas_de_temps () const override
 Calculation of the next time step.
const Modele_turbulence_hyd_2_eq_basemodele_turbulence () const
 Renvoie le modele de turbulence associe a l'equation.
Modele_turbulence_hyd_2_eq_basemodele_turbulence ()
 Renvoie le modele de turbulence associe a l'equation.
Public Member Functions inherited from Equation_base
void nommer (const Nom &nom) override
 Method called when the object instance is created in the data file (Interprete::ajouter).
virtual void avancer (int i=1)
virtual void reculer (int i=1)
virtual int nombre_d_operateurs_tot () const
virtual const Operateuroperateur_fonctionnel (int) const
virtual Operateuroperateur_fonctionnel (int)
virtual std::vector< YAML_datadata_a_sauvegarder () const
 for PDI IO: retrieve name, type and dimensions of the data to save/restore. This has to be overrode for all the equations that either:
int sauvegarder (Sortie &) const override
 We save the unknown, then the source terms to an output stream.
int reprendre (Entree &) override
 We resume the unknown from an input stream.
Nom create_polymacfamily_syno (const Nom &field_tag) const
 Create a synonym of a field name in order to ensure backward compatibility with old names of the PolyMAC discretisation family.
virtual void init_save_file ()
virtual void close_save_file ()
int limpr () const
 Ask the time scheme if an output is needed.
virtual void imprimer (Sortie &os) const
 Prints the equation operators if the time scheme indicates it is necessary.
virtual int impr (Sortie &os) const
 Prints the equation operators to an output stream, unconditionally.
virtual void associer_milieu_equation ()
virtual DoubleTab & derivee_en_temps_inco (DoubleTab &)
 Returns the time derivative of the unknown I of the equation: dI/dt = M-1*(sum(operators(I) + sources)).
virtual DoubleTab & derivee_en_temps_inco_transport (DoubleTab &derivee)
virtual DoubleTab & corriger_derivee_expl (DoubleTab &)
virtual void mettre_a_jour (double temps)
 The value of the unknown at the time step has been calculated.
virtual void abortTimeStep ()
 Reinitialize what must be.
virtual void resetTime (double time)
 Reset current time of the equation. Used from ICoCo. See documentation of Problem_base::resetTime().
virtual int preparer_calcul ()
 Everything that does not depend on other possible problems.
virtual bool initTimeStep (double dt)
 Allocation and initialization of the unknown and boundary conditions until present+dt.
virtual bool updateGivenFields ()
virtual void associer_pb_base (const Probleme_base &)
 Associates with the Problem passed as parameter.
virtual void completer ()
 Completes the construction (initialization) of objects associated with the equation.
void calculer_pas_de_temps_locaux (DoubleTab &) const
Sourcessources ()
 Returns the source terms associated with the equation.
const Sourcessources () const
 Returns the source terms associated with the equation (const version).
Solveur_Masse_basesolv_masse ()
 Returns the mass solver associated with the equation.
const Solveur_Masse_basesolv_masse () const
 Returns the mass solver associated with the equation (const version).
Probleme_baseprobleme ()
 Returns the problem associated with the equation.
const Probleme_baseprobleme () const
 Returns the problem associated with the equation.
Schema_Temps_baseschema_temps ()
 Returns the time scheme associated with the equation.
const Schema_Temps_baseschema_temps () const
 Returns the time scheme associated with the equation.
virtual void associer_sch_tps_base (const Schema_Temps_base &)
 Associates the time scheme with the equation.
virtual void associer_domaine_dis (const Domaine_dis_base &)
 Associates the discretized domain with the equation.
const Discretisation_basediscretisation () const
 Returns the discretization associated with the equation.
virtual Domaine_Cl_dis_basedomaine_Cl_dis ()
 Returns the discretized boundary condition domain associated with the equation.
virtual const Domaine_Cl_dis_basedomaine_Cl_dis () const
 Returns the discretized boundary condition domain associated with the equation (const version).
Domaine_dis_basedomaine_dis ()
 Returns the discretized domain associated with the equation.
const Domaine_dis_basedomaine_dis () const
 Returns the discretized domain associated with the equation.
const Nomle_nom () const override
 Returns the name of the equation.
DoubleVect & get_residu ()
DoubleVect & residu_initial ()
void initialise_residu (int=0)
virtual void imprime_residu (SFichier &)
virtual Nom expression_residu ()
virtual void dimensionner_matrice (Matrice_Morse &mat_morse)
virtual void dimensionner_matrice_sans_mem (Matrice_Morse &mat_morse)
virtual void assembler (Matrice_Morse &mat_morse, const DoubleTab &present, DoubleTab &secmem)
virtual void modifier_pour_Cl (Matrice_Morse &mat_morse, DoubleTab &secmem) const
virtual void assembler_avec_inertie (Matrice_Morse &mat_morse, const DoubleTab &present, DoubleTab &secmem)
virtual void dimensionner_termes_croises (Matrice_Morse &matrice, const Probleme_base &autre_pb, int nl, int nc)
virtual void ajouter_termes_croises (const DoubleTab &inco, const Probleme_base &autre_pb, const DoubleTab &autre_inco, DoubleTab &resu) const
virtual void contribuer_termes_croises (const DoubleTab &inco, const Probleme_base &autre_pb, const DoubleTab &autre_inco, Matrice_Morse &matrice) const
virtual int has_interface_blocs () const
virtual double get_time_factor () const
virtual void dimensionner_blocs (matrices_t matrices, const tabs_t &semi_impl={}) const
virtual void assembler_blocs (matrices_t matrices, DoubleTab &secmem, const tabs_t &semi_impl={}) const
virtual void assembler_blocs_avec_inertie (matrices_t matrices, DoubleTab &secmem, const tabs_t &semi_impl={})
Champ_Inc_basechamp_conserve () const
int has_champ_conserve () const
void init_champ_conserve () const
virtual std::pair< std::string, fonc_calc_t > get_fonc_champ_conserve () const
virtual Champ_Inc_basechamp_convecte () const
virtual int has_champ_convecte () const
virtual void init_champ_convecte () const
virtual void mettre_a_jour_champs_conserves (double temps, int reset=0)
void creer_champ (const Motcle &motlu) override
void get_noms_champs_postraitables (Noms &nom, Option opt=NONE) const override
bool has_champ (const Motcle &nom, OBS_PTR(Champ_base) &ref_champ) const override
virtual void verifie_ch_init_nb_comp (const Champ_Inc_base &ch_ref, const int nb_comp) const
 Verification of the number of components read for the specification of a field.
virtual void verifie_ch_init_nb_comp_cl (const Champ_Inc_base &ch_ref, const int nb_comp, const Cond_lim_base &cl) const
DoubleTab & derivee_en_temps_conv (DoubleTab &, const DoubleTab &)
 Add convection term In: solution is the unknown I.
void Gradient_conjugue_diff_impl (DoubleTrav &secmem, DoubleTab &solution)
void Gradient_conjugue_diff_impl (DoubleTrav &secmem, DoubleTab &solution, const DoubleTab &terme_mul)
 OWN_PTR (Parametre_equation_base) &parametre_equation()
const OWN_PTR (Parametre_equation_base) &parametre_equation() const
virtual const RefObjU & get_modele (Type_modele type) const
virtual int equation_non_resolue () const
int disable_equation_residual () const
virtual const Champ_Inc_basederivee_en_temps () const
virtual Champ_Inc_basederivee_en_temps ()
void set_calculate_time_derivative (int i)
int calculate_time_derivative () const
void set_residuals (const DoubleTab &residual)
virtual bool positive_unkown ()
void add_champs_compris (const Champ_base &ch)
void set_diffusion_multi_scalaire (bool flg=true)
const bool & diffusion_multi_scalaire () const
public_for_cuda void Gradient_conjugue_diff_impl (DoubleTrav &secmem, DoubleTab &solution, int size_terme_mul, const DoubleTab &term_mul)
 Solve: (1/dt + M-1*L)*dI = M-1 * secmem with a Conjugate Gradient matrix-free algorithm by default.
Public Member Functions inherited from Champs_compris_interface
virtual ~Champs_compris_interface ()
virtual bool has_champ (const Motcle &nom, OBS_PTR(Champ_base)&ref_champ) const =0
Public Member Functions inherited from Objet_U
 ~Objet_U () override
 Destructor. Removes the object from the list of objects registered in "memory".
int numero () const
 Returns the index of the object in Memoire::data.
virtual int duplique () const =0
virtual SortieprintOn (Sortie &) const
 Writes the object to an output stream. Virtual method to override.
virtual EntreereadOn (Entree &)
 Reads an Objet_U from an input stream. Virtual method to override.
virtual unsigned taille_memoire () const =0
virtual int est_egal_a (const Objet_U &) const
 Returns 1 if x and *this are the same instance (same memory address).
int get_object_id () const
 Returns the unique identifier of the object (object_id_).
virtual const Type_infoget_info () const
 Returns type information for the Objet_U.
const Nomque_suis_je () const
 Returns the string identifying the class.
const char * le_type () const
 Returns the type name of the Objet_U.
virtual int change_num (const int *const)
 Changes the internal number of the Objet_U.
virtual int associer_ (Objet_U &)
 Associates the Objet_U with another Objet_U. Virtual method to override.
const Interpreteinterprete () const
Interpreteinterprete ()
Public Member Functions inherited from Process
virtual ~Process ()

Protected Member Functions

 OBS_PTR (Champ_Inc_base) inco_eqn_associee
 OWN_PTR (Champ_Don_base) Champ_don_nul_
Protected Member Functions inherited from Transport_K_ou_Eps_base
 OWN_PTR (Champ_Inc_base) le_champ_
 OWN_PTR (Champ_Fonc_base) residu_
Protected Member Functions inherited from Transport_2eq_base
void get_position_cells (Nom &, int &)
void get_position_faces (Nom &, int &)
Entreelire_op_diff_turbulent (Entree &is)
 OBS_PTR (Milieu_base) le_fluide
 OBS_PTR (Champ_Inc_base) la_vitesse_transportante
 OBS_PTR (Modele_turbulence_hyd_2_eq_base) mon_modele
Protected Member Functions inherited from Equation_base
 OWN_PTR (Solveur_Masse_base) solveur_masse
 OBS_PTR (Schema_Temps_base) le_schema_en_temps
 OBS_PTR (Domaine_dis_base) le_dom_dis
 OWN_PTR (Domaine_Cl_dis_base) le_dom_Cl_dis
 OBS_PTR (Probleme_base) mon_probleme
virtual Entreelire_sources (Entree &)
 Reading of source terms in an input stream.
virtual Entreelire_cond_init (Entree &)
 Reading of initial conditions in an input stream.
virtual Entreelire_cl (Entree &)
 Reading of boundary conditions in an input stream.
virtual int verif_Cl () const
 Verifies the compatibility of boundary conditions with the equation.
virtual void lire ()
 OWN_PTR (Parametre_equation_base) parametre_equation_
 LIST (RefObjU) liste_modeles_
 OWN_PTR (Champ_Inc_base) champ_conserve_
 OWN_PTR (Champ_Inc_base) champ_convecte_
 OWN_PTR (Champ_Inc_base) derivee_en_temps_
Protected Member Functions inherited from Objet_U
 Objet_U ()
 Default constructor: assigns a unique identifier to the object (object_id_) and registers the object in "memory" by giving it a num_obj number.
 Objet_U (const Objet_U &)
 Copy constructor.
const Objet_Uoperator= (const Objet_U &)
 Assignment operator: does nothing (the number and identifier are preserved).

Protected Attributes

int with_nu_
Protected Attributes inherited from Transport_K_ou_Eps_base
bool transporte_K_ =false
Protected Attributes inherited from Transport_2eq_base
Operateur_Diff terme_diffusif
Operateur_Conv terme_convectif
bool disable_VEF_mean_value_corrections_ = false
Protected Attributes inherited from Equation_base
Nom nom_
Sources les_sources
DoubleList dt_op_bak
int sys_invariant_
int implicite_
bool has_time_factor_
Champs_compris champs_compris_
Champs_Fonc list_champ_combi
Matrice_Morse matrice_stockee
int matrice_init
int calculate_time_derivative_
bool diffusion_multi_scalaire_ = false

Additional Inherited Members

Static Public Member Functions inherited from Equation_base
static void calculer_champ_conserve (const Objet_U &obj, DoubleTab &val, DoubleTab &bval, tabs_t &deriv)
Static Public Member Functions inherited from Objet_U
static const Nomnom_du_cas ()
 Returns a constant reference to the case name. This method is static.
static Nomget_set_nom_du_cas ()
 Returns a non-constant reference to the case name (to allow modification). This method is static.
static const Type_infoinfo ()
 Returns type information for the Objet_U (static version).
static const Objet_Uself_cast (const Objet_U &)
 Method added for casting in Python.
static Objet_Uself_cast (Objet_U &)
Static Public Member Functions inherited from Process
static int me ()
 Returns the rank of the local processor in the current communication group. See Comm_Group::rank() and PE_Groups::current_group().
static int nproc ()
 Returns the number of processors in the current group. See Comm_Group::nproc() and PE_Groups::current_group().
static bool is_parallel ()
static void exit (int exit_code=-1)
 Exit routine for TRUST within a Kokkos region.
static double mp_sum (double)
 Computes the sum of x over all processors in the current group.
static float mp_sum (float)
static trustIdType mp_sum (trustIdType)
 Computes the sum of x over all processors in the current group.
static double mp_max (double)
static double mp_min (double)
static int mp_max (int)
 Returns the maximum value of x across all processors in the current group.
static int mp_min (int)
 Returns the minimum value of x across all processors in the current group.
static double mp_sum_as_double (int v)
static trustIdType mppartial_sum (trustIdType i)
 Computes the partial sum of x over processors 0 to me()-1 (returns 0 on processor 0).
template<typename T>
static void mp_sum_for_each (T &arg1, T &arg2)
 C++14 compatible mp_sum_for_each: combine multiple mp_sum calls into one collective operation Usage: mp_sum_for_each(a, b); mp_sum_for_each(a, b, c); mp_sum_for_each(a, b, c, d); mp_sum_for_each(a, b, c, d, e); All arguments must be of the same type (double or int) and are modified in place. Supports 2-5 parameters.
template<typename T>
static void mp_sum_for_each (T &arg1, T &arg2, T &arg3)
template<typename T>
static void mp_sum_for_each (T &arg1, T &arg2, T &arg3, T &arg4)
template<typename T>
static void mp_sum_for_each (T &arg1, T &arg2, T &arg3, T &arg4, T &arg5)
template<typename T>
static void mp_max_for_each (T &arg1, T &arg2)
 C++14 compatible mp_max_for_each: combine multiple mp_max calls into one collective operation.
template<typename T>
static void mp_max_for_each (T &arg1, T &arg2, T &arg3)
template<typename T>
static void mp_max_for_each (T &arg1, T &arg2, T &arg3, T &arg4)
template<typename T>
static void mp_max_for_each (T &arg1, T &arg2, T &arg3, T &arg4, T &arg5)
template<typename T>
static void mp_min_for_each (T &arg1, T &arg2)
 C++14 compatible mp_min_for_each: combine multiple mp_min calls into one collective operation.
template<typename T>
static void mp_min_for_each (T &arg1, T &arg2, T &arg3)
template<typename T>
static void mp_min_for_each (T &arg1, T &arg2, T &arg3, T &arg4)
template<typename T>
static void mp_min_for_each (T &arg1, T &arg2, T &arg3, T &arg4, T &arg5)
template<typename _TYPE_>
static void mp_sum_for_each_item (TRUSTArray< _TYPE_ > &x, int n=-1)
template<typename _TYPE_>
static void mp_max_for_each_item (TRUSTArray< _TYPE_ > &x, int n=-1)
template<typename _TYPE_>
static void mp_min_for_each_item (TRUSTArray< _TYPE_ > &x, int n=-1)
static bool mp_and (bool)
 Computes the logical AND of b across all processors in the current group.
static bool mp_or (bool)
static int check_int_overflow (trustIdType)
static int je_suis_maitre ()
 Returns 1 if on the master processor of the current group (i.e. me() == 0), 0 otherwise.
static KOKKOS_INLINE_FUNCTION void Kokkos_exit (const char *)
 Exit routine for TRUST within a Kokkos region.
static int node_master ()
 Returns 1 if on the NUMA node master processor, 0 otherwise.
static void exit (const Nom &message, int exit_code=-1)
static bool is_sequential ()
static void barrier ()
 Synchronizes all processors in the current group (waits until all processors have reached the barrier).
static void abort ()
 Abort routine for TRUST on a fatal error.
static SortieJournal (int message_level=0)
 Returns a static Sortie object used as an event journal.
static double ram_processeur ()
static void imprimer_ram_totale (int all_process=0)
static bool force_single_file (const int ranks, const Nom &filename)
Public Attributes inherited from Equation_base
Matrice_Morse_Diag diag_
Static Public Attributes inherited from Objet_U
static double precision_geom = 1e-10
static constexpr bool HAS_POINTER = false
static int dimension =0
static int format_precision_geom =11
static int axi =0
static int bidim_axi =0
static int DEACTIVATE_SIGINT_CATCH =0
static Type_info info_obj
static bool disable_TU =false
 Flag to disable or not the writing of the .TU files.
static bool stat_per_proc_perf_log =false
 Flag to enable the writing of the statistics detailed per processor in _csv.TU file.
Static Public Attributes inherited from Process
static int exception_sur_exit =0
static int multiple_files =5120

Detailed Description

classe Transport_K_ou_Eps Cette classe represente l'equation de transport de l'energie cinetique

turbulente K et du taux de dissipation epsilon (eps) associee au modele de turbulence (k,eps). On traite en une seule equation le transport des deux grandeurs turbulentes. Il s'agit donc d'une equation vectorielle, dont le champ inconnue possede 2 composantes: K et epsilon. On instanciera un objet de cette classe uniquement si on utilise le modele (k,eps) pour traiter la turbulence en mode "bicephale"

See also
Equation_base

Definition at line 37 of file Transport_K_ou_Eps.h.

Member Function Documentation

◆ associer_Champ_Inconnu()

void Transport_K_ou_Eps::associer_Champ_Inconnu ( const Champ_Inc_base & vit)
inline

Associe un champ de vitesse (transportante)a l'equation.

Parameters
(Champ_Inc_base&vit) le champ de vitesse a associer a l'equation

Definition at line 66 of file Transport_K_ou_Eps.h.

◆ associer_modele_turbulence()

void Transport_K_ou_Eps::associer_modele_turbulence ( const Modele_turbulence_hyd_2_eq_base & modele)
overridevirtual

Associe un modele de turbulence K-epsilon a l'equation.

Parameters
(Modele_turbulence_hyd_K_Eps&modele) le modele de turbulence K-epsilon a asoocier a l'equation

Implements Transport_2eq_base.

Definition at line 175 of file Transport_K_ou_Eps.cpp.

◆ corriger_derivee_impl()

DoubleTab & Transport_K_ou_Eps::corriger_derivee_impl ( DoubleTab & d)
overridevirtual

Reimplemented from Equation_base.

Definition at line 268 of file Transport_K_ou_Eps.cpp.

◆ domaine_application()

const Motcle & Transport_K_ou_Eps::domaine_application ( ) const
overridevirtual

Renvoie le nom du domaine d'application de l'equation.

Ici "Transport_Keps".

Returns
(Motcle&) le nom du domaine d'application de l'equation

Reimplemented from Equation_base.

Definition at line 261 of file Transport_K_ou_Eps.cpp.

◆ lire_motcle_non_standard()

int Transport_K_ou_Eps::lire_motcle_non_standard ( const Motcle & motlu,
Entree & is )
overridevirtual

Reads non-simple-type parameters of an Objet_U from an input stream.

Parameters
motluThe name of the keyword to read.
isAn input stream.
Returns
Negative value if the keyword is not understood, otherwise positive value.

Reimplemented from Equation_base.

Definition at line 127 of file Transport_K_ou_Eps.cpp.

◆ nombre_d_operateurs()

int Transport_K_ou_Eps::nombre_d_operateurs ( ) const
overridevirtual

Renvoie le nombre d'operateurs de l'equation.

Ici 2.

Returns
(int) le nombre d'operateurs de l'equation

Implements Equation_base.

Definition at line 194 of file Transport_K_ou_Eps.cpp.

◆ OBS_PTR()

Transport_K_ou_Eps::OBS_PTR ( Champ_Inc_base )
protected

◆ operateur() [1/2]

const Operateur & Transport_K_ou_Eps::operateur ( int i) const
overridevirtual

Renvoie l'operateur specifie par son index: renvoie terme_diffusif si i = 0.

renvoie terme_convectif si i = 1
exit si i>1

(version const)

Parameters
(inti) l'index de l'operateur a renvoyer
Returns
(Operateur&) l'operateur specifie
Exceptions
l'equationn'a pas plus de 2 operateurs

Implements Equation_base.

Definition at line 209 of file Transport_K_ou_Eps.cpp.

◆ operateur() [2/2]

Operateur & Transport_K_ou_Eps::operateur ( int i)
overridevirtual

Renvoie l'operateur specifie par son index: renvoie terme_diffusif si i = 0.

renvoie terme_convectif si i = 1
exit si i>1
Parameters
(inti) l'index de l'operateur a renvoyer
Returns
(Operateur&) l'operateur specifie
Exceptions
l'equationn'a pas plus de 2 operateurs

Implements Equation_base.

Definition at line 236 of file Transport_K_ou_Eps.cpp.

◆ OWN_PTR()

Transport_K_ou_Eps::OWN_PTR ( Champ_Don_base )
protected

◆ set_param()

void Transport_K_ou_Eps::set_param ( Param & param) const
overridevirtual

Reimplemented from Transport_2eq_base.

Definition at line 38 of file Transport_K_ou_Eps.cpp.

Member Data Documentation

◆ with_nu_

int Transport_K_ou_Eps::with_nu_
protected

Definition at line 54 of file Transport_K_ou_Eps.h.


The documentation for this class was generated from the following files:
  • /home/docs/checkouts/readthedocs.org/user_builds/triocfd-documentation/checkouts/next/src/Turbulence/ThHyd/Incompressible/Equations/RANS/Transport_K_ou_Eps.h
  • /home/docs/checkouts/readthedocs.org/user_builds/triocfd-documentation/checkouts/next/src/Turbulence/ThHyd/Incompressible/Equations/RANS/Transport_K_ou_Eps.cpp