TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Op_Dift_VEF_base.h
1/****************************************************************************
2* Copyright (c) 2025, 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 Op_Dift_VEF_base_included
17#define Op_Dift_VEF_base_included
18
19#include <Op_Diff_Turbulent_base.h>
20#include <Modele_turbulence_hyd_base.h>
21#include <Op_Diff_VEF_base.h>
22#include <TRUST_Ref.h>
23
25{
26 Declare_base(Op_Dift_VEF_base);
27public:
28
29 double calculer_dt_stab() const override;
30 void calculer_pour_post(Champ_base& espace_stockage, const Nom& option, int comp) const override;
31
32 void associer_diffusivite(const Champ_base& diffu) override { diffusivite_ = diffu; }
33 inline const Champ_base& diffusivite() const override { return diffusivite_.valeur(); }
34
35 inline double diffusivite(int) const
36 {
37 return (diffusivite().valeurs().nb_dim() == 1) ? (diffusivite().valeurs())(0) : (diffusivite().valeurs())(0, 0);
38 }
39
40 inline void dimensionner(Matrice_Morse& matrice) const override
41 {
42 Op_VEF_Face::dimensionner(le_dom_vef.valeur(), la_zcl_vef.valeur(), matrice);
43 }
44
45 inline void modifier_pour_Cl(Matrice_Morse& matrice, DoubleTab& secmem) const override
46 {
47 Op_VEF_Face::modifier_pour_Cl(le_dom_vef.valeur(), la_zcl_vef.valeur(), matrice, secmem);
48 }
49
50 void calculer_borne_locale(DoubleVect& ,double ,double ) const override;
52 void mettre_a_jour(double temps) override;
53 void associer(const Domaine_dis_base& , const Domaine_Cl_dis_base& , const Champ_Inc_base& ) override;
54 void completer() override;
55
56 const DoubleTab& get_tau_tan() const { return tau_tan_; }
57 const Modele_turbulence_hyd_base& get_modele_turbulence() const { return le_modele_turbulence.valeur(); }
58
59protected:
60 OBS_PTR(Modele_turbulence_hyd_base) le_modele_turbulence; // To be moved into Op_Diff_turb ?
61 OBS_PTR(Champ_base) diffusivite_;
62 DoubleTab tau_tan_;
63
64 double calculer_dt_stab_P1NCP1B() const;
65};
66
67#endif /* Op_Dift_VEF_base_included */
Class Champ_Inc_base.
virtual DoubleTab & valeurs()=0
class Champ_base This class is the base of the fields hierarchy.
Definition Champ_base.h:43
class Domaine_Cl_dis_base Domaine_Cl_dis_base objects represent discretized boundary conditions
class Domaine_dis_base This class is the base of the hierarchy of discretized domains.
Matrice_Morse class - Represents a (sparse) matrix M, not necessarily square,.
Base class for the turbulence model hierarchy for Navier-Stokes equations.
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
Base class for diffusion operators in a turbulent flow.
class Op_Diff_VEF_base
void dimensionner(Matrice_Morse &matrice) const override
DOES NOTHING - to override in derived classes.
void associer(const Domaine_dis_base &, const Domaine_Cl_dis_base &, const Champ_Inc_base &) override
void mettre_a_jour(double temps) override
DOES NOTHING - to override in derived classes.
void completer() override
Associates the operator with the domaine_dis, the domaine_Cl_dis, and the unknown of its equation.
const Champ_base & diffusivite() const override
void calculer_borne_locale(DoubleVect &, double, double) const override
OBS_PTR(Modele_turbulence_hyd_base) le_modele_turbulence
OBS_PTR(Champ_base) diffusivite_
const DoubleTab & get_tau_tan() const
double calculer_dt_stab() const override
Computes dt_stab.
double calculer_dt_stab_P1NCP1B() const
void associer_diffusivite(const Champ_base &diffu) override
void associer_modele_turbulence(const Modele_turbulence_hyd_base &)
double diffusivite(int) const
const Modele_turbulence_hyd_base & get_modele_turbulence() const
void calculer_pour_post(Champ_base &espace_stockage, const Nom &option, int comp) const override
void modifier_pour_Cl(Matrice_Morse &matrice, DoubleTab &secmem) const override
DOES NOTHING - to override in derived classes.
void dimensionner(const Domaine_VEF &, const Domaine_Cl_VEF &, Matrice_Morse &) const
Dimensioning of the matrix that will receive the coefficients from convection and diffusion for the f...
void modifier_pour_Cl(const Domaine_VEF &, const Domaine_Cl_VEF &, Matrice_Morse &, DoubleTab &) const
Modify the matrix coefficients and the right-hand side for Dirichlet boundary conditions.