TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Convection_Diffusion_Chaleur_WC.cpp
1/****************************************************************************
2* Copyright (c) 2026, 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 <Convection_Diffusion_Fluide_Dilatable_Proto.h>
17#include <Convection_Diffusion_Chaleur_WC.h>
18#include <Discretisation_base.h>
19#include <Op_Conv_negligeable.h>
20
21Implemente_instanciable(Convection_Diffusion_Chaleur_WC,"Convection_Diffusion_Chaleur_WC",Convection_Diffusion_Chaleur_Fluide_Dilatable_base);
22// XD convection_diffusion_chaleur_WC eqn_base convection_diffusion_chaleur_WC INHERITS_BRACE Temperature equation for a
23// XD_CONT weakly-compressible fluid.
24
26{
28}
29
31{
33 return is;
34}
35
40
42{
43 if (mot=="convection")
44 {
46
47 //the weakly-compressible heat equation contains a source term dP_tot/dt
48 Cerr << "Source term creation of the energy equation :"<< finl;
49 Source t;
50 Source& so=les_sources.add(t);
51 Nom type_so = "Source_WC_Chaleur_";
53 if (disc=="VEFPreP1B") disc = "VEF";
54 type_so += disc;
55 so.typer_direct(type_so);
56 so->associer_eqn(*this);
57 Cerr<<so->que_suis_je()<<finl;
58 Cerr << "Typing of the convection operator : ";
59 return 1;
60 }
61 else
63}
64
66{
67 Convection_Diffusion_Chaleur_Fluide_Dilatable_base::completer(); // in practice this calls Equation_base::completer() but that might change someday ...
68
69 // initialise the gradient operator
70 Op_Grad_WC_.associer_eqn(*this);
71 Op_Grad_WC_.typer();
72 Op_Grad_WC_.l_op_base().associer_eqn(*this);
73 const Domaine_dis_base& zdis = domaine_dis();
75 const Champ_Inc_base& inco = inconnue();
76 Op_Grad_WC_->associer(zdis, zcl, inco);
77}
78
83
88
94
99
101{
102 double temps = schema_temps().temps_courant();
103 return Convection_Diffusion_Fluide_Dilatable_Proto::Reprendre_WC(is,temps,*this,le_fluide.valeur(),l_inco_ch,probleme());
104}
Class Champ_Inc_base.
class Champ_base This class is the base of the fields hierarchy.
Definition Champ_base.h:43
Particular case of Convection_Diffusion_std for a quasi-dilatable fluid when the transported scalar i...
int preparer_calcul() override
Everything that does not depend on other possible problems.
int remplir_cl_modifiee()
Fills the modified boundary condition domain with 1 everywhere on the boundary.
Particular case of Convection_Diffusion_Chaleur_Fluide_Dilatable_base for a weakly compressible fluid...
void calculer_div_u_ou_div_rhou(DoubleTab &res) const override
int preparer_calcul() override
Everything that does not depend on other possible problems.
const Champ_base & vitesse_pour_transport() const override
void completer() override
Completes the construction (initialization) of objects associated with the equation.
int lire_motcle_non_standard(const Motcle &, Entree &) override
Reads non-simple-type parameters of an Objet_U from an input stream.
int sauvegarder(Sortie &) const override
Saves an Objet_U to an output stream. Virtual method to override.
int reprendre(Entree &) override
Resumes computation from an input stream.
void calculer_div_rho_u_impl(DoubleTab &res, const Convection_Diffusion_Fluide_Dilatable_base &eqn) const
static int Reprendre_WC(Entree &is, double temps, Convection_Diffusion_std &eq, Fluide_Dilatable_base &fld, Champ_Inc_base &inco, Probleme_base &pb)
static int Sauvegarder_WC(Sortie &os, const Convection_Diffusion_std &eq, const Fluide_Dilatable_base &fld)
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.
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
virtual void set_param(Param &titi) const override
const Discretisation_base & discretisation() const
Returns the discretization associated with the equation.
virtual void completer()
Completes the construction (initialization) of objects associated with the equation.
Sources les_sources
virtual Domaine_Cl_dis_base & domaine_Cl_dis()
Returns the discretized boundary condition domain associated with the equation.
Probleme_base & probleme()
Returns the problem associated with the equation.
int lire_motcle_non_standard(const Motcle &, Entree &) override
Reads non-simple-type parameters of an Objet_U from an input stream.
Schema_Temps_base & schema_temps()
Returns the time scheme associated with the equation.
Domaine_dis_base & domaine_dis()
Returns the discretized domain associated with the equation.
A character string (Nom) in uppercase.
Definition Motcle.h:26
class Nom: a character string for naming TRUST objects.
Definition Nom.h:31
const Nom & que_suis_je() const
Returns the string identifying the class.
Definition Objet_U.cpp:104
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
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
double temps_courant() const
Returns the current time.
Base class for output streams.
Definition Sortie.h:52
Source Generic class of the source term hierarchy. A Source object can.
Definition Source.h:33
void typer_direct(const Nom &)
Definition Source.cpp:41