TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Discret_Thermique.cpp
1/****************************************************************************
2* Copyright (c) 2024, 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 <Discret_Thermique.h>
17#include <Schema_Temps_base.h>
18#include <Champ_Fonc_Tabule.h>
19
20#include <Milieu_base.h>
21
22
23Implemente_base(Discret_Thermique, "Discret_Thermique", Discretisation_base);
24
25Sortie& Discret_Thermique::printOn(Sortie& s) const { return s; }
26
28
29void Discret_Thermique::temperature(const Schema_Temps_base& sch, Domaine_dis_base& z, OWN_PTR(Champ_Inc_base)& ch, int nb_comp) const
30{
31 Cerr << "Discretising temperature" << finl;
32 discretiser_champ("temperature", z, "temperature", "K", nb_comp, sch.nb_valeurs_temporelles(), sch.temps_courant(), ch);
33}
34
35void Discret_Thermique::enthalpie(const Schema_Temps_base& sch, Domaine_dis_base& z, OWN_PTR(Champ_Inc_base)& ch, int nb_comp) const
36{
37 Cerr << "Discretising enthalpy" << finl;
38 discretiser_champ("temperature" /* same type as T */, z, "enthalpie", "J/kg", nb_comp, sch.nb_valeurs_temporelles(), sch.temps_courant(), ch);
39}
40
42{
43 Cerr << "Discretising temperature fluctuations" << finl;
44 Noms noms(2), unit(2);
45 noms[0] = "variance_temperature";
46 noms[1] = "taux_dissipation_temperature";
47 unit[0] = "K2";
48 unit[1] = "m2s-3";
49 discretiser_champ("temperature", z, multi_scalaire, noms, unit, 2, sch.nb_valeurs_temporelles(), sch.temps_courant(), ch);
50 ch->nommer("Fluctu_Temperature");
51}
53{
54 Cerr << "Discretising turbulent heat flux" << finl;
55 discretiser_champ("vitesse", z, "Flux_Chaleur_Turbulente", "truc1", dimension, sch.nb_valeurs_temporelles(), sch.temps_courant(), ch);
56}
57
58void Discret_Thermique::flux_neutronique(const Schema_Temps_base& sch, Domaine_dis_base& z, OWN_PTR(Champ_Inc_base)& ch, int nb_comp) const
59{
60 Cerr << "Discretising neutron flux" << finl;
61 discretiser_champ("temperature", z, "flux_neutronique", "m-2.s-1", nb_comp, sch.nb_valeurs_temporelles(), sch.temps_courant(), ch);
62}
Class Champ_Inc_base.
Class Discret_Thermique: base class representing a spatial discretisation applied to thermal problems...
void temperature(const Schema_Temps_base &, Domaine_dis_base &, OWN_PTR(Champ_Inc_base)&, int nb_comp=1) const
void Flux_Chaleur_Turb(const Schema_Temps_base &, Domaine_dis_base &, OWN_PTR(Champ_Inc_base)&) const
void enthalpie(const Schema_Temps_base &, Domaine_dis_base &, OWN_PTR(Champ_Inc_base)&, int nb_comp=1) const
void flux_neutronique(const Schema_Temps_base &sch, Domaine_dis_base &z, OWN_PTR(Champ_Inc_base)&ch, int nb_comp=1) const
void Fluctu_Temperature(const Schema_Temps_base &, Domaine_dis_base &, OWN_PTR(Champ_Inc_base)&) const
class Discretisation_base This class represents a spatial discretization scheme, which
void discretiser_champ(const Motcle &directive, const Domaine_dis_base &z, const Nom &nom, const Nom &unite, int nb_comp, int nb_pas_dt, double temps, OWN_PTR(Champ_Inc_base)&champ, const Nom &sous_type=NOM_VIDE) const
class Domaine_dis_base This class is the base of the hierarchy of discretized domains.
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
void nommer(const Nom &) override
Gives a name to the field.
An array of character strings (VECT(Nom)).
Definition Noms.h:26
static int dimension
Definition Objet_U.h:94
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
class Schema_Temps_base
double temps_courant() const
Returns the current time.
virtual int nb_valeurs_temporelles() const =0
Base class for output streams.
Definition Sortie.h:52