TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
MuLambda_TBLE_Cte.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_Cte.h>
17#include <Eq_couch_lim.h>
18#include <Fluide_Incompressible.h>
19#include <Champ_Uniforme.h>
20
21Implemente_instanciable(MuLambda_TBLE_Cte,"MuLambda_TBLE_Cte",MuLambda_TBLE_base);
22
24{
25 return os;
26}
27
29{
30 return is;
31}
32
34{
35 if (!sub_type(Fluide_Incompressible, milieu))
36 {
37 Cerr << "Avec TBLE, vous devez utiliser un fluide incompressible " << finl;
39 }
40
41 const Fluide_base& le_fluide = ref_cast(Fluide_base,milieu);
42 const Champ_Don_base& ch_visco_cin = le_fluide.viscosite_cinematique();
43 if (sub_type(Champ_Uniforme,ch_visco_cin))
44 {
45 const DoubleTab& tab_visco = ch_visco_cin.valeurs();
46
47 nu = std::max(tab_visco(0,0),DMINFLOAT);//visco cinematique supposee cste
48 }
49 else
50 {
51 Cerr << "Viscosite non constante : cas non traite encore dans TBLE" << finl;
53 }
54 if (le_fluide.has_diffusivite())
55 {
56 const Champ_Don_base& ch_alpha = le_fluide.diffusivite();
57 if (sub_type(Champ_Uniforme,ch_alpha))
58 {
59 const DoubleTab& tab_lambda = ch_alpha.valeurs();
60 alpha = std::max(tab_lambda(0,0),DMINFLOAT);//lambda supposee cste
61 }
62 else
63 {
64 Cerr << "Diffusivite non constante : cas non traite encore dans TBLE" << finl;
66 }
67 }
68}
class Champ_Don_base base class of Given Fields (not calculated)
DoubleTab & valeurs() override
Overrides Champ_base::valeurs() Returns the array of values.
Champ_Uniforme Represents a field that is constant in space and time.
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
Represents an incompressible fluid and its properties:
Base class for an incompressible fluid and its properties:
Definition Fluide_base.h:36
const Champ_Don_base & viscosite_cinematique() const
Definition Fluide_base.h:56
Milieu_base This class is the base of the (physical) medium hierarchy.
Definition Milieu_base.h:50
virtual const Champ_Don_base & diffusivite() const
Returns the diffusivity of the medium (const version).
bool has_diffusivite() const
Definition Milieu_base.h:95
Classe MuLambda_TBLE_Cte Classe abstraite calculant Mu et Lambda constant sur le maillage TBLE.
void initialiser(const Milieu_base &) override
Classe MuLambda_TBLE_base Classe abstraite calculant Mu et Lambda sur le maillage TBLE.
virtual Entree & readOn(Entree &)
Reads an Objet_U from an input stream. Virtual method to override.
Definition Objet_U.cpp:289
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
Definition Objet_U.cpp:278
static void exit(int exit_code=-1)
Exit routine for TRUST within a Kokkos region.
Definition Process.cpp:466
Base class for output streams.
Definition Sortie.h:52