TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Conduction.h
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#ifndef Conduction_included
17#define Conduction_included
18
19#include <Traitement_particulier_Solide_base.h>
20#include <Schema_Temps_base.h>
21#include <Operateur_Diff.h>
22#include <Equation_base.h>
23#include <TRUST_Deriv.h>
24#include <TRUST_Ref.h>
25
26
27class Milieu_base;
28class Solide;
29
30/*! @brief Class Conduction: represents the temperature evolution equation
31 *
32 * in a solid with conductivity k, density rho, and specific heat Cp:
33 * (rho.Cp) . dT/dt - div (k grad T) = (rho.Cp) . f
34 * The rho and Cp terms may be non-uniform because this class does not
35 * take the shortcut of computing the diffusivity k/(rho*Cp).
36 *
37 *
38 * @sa Equation_base, Conduction
39 */
41{
42 Declare_instanciable_sans_constructeur(Conduction);
43public:
45 void set_param(Param&) const override;
46 int lire_motcle_non_standard(const Motcle&, Entree&) override;
47 void associer_solide(const Solide& );
48 void associer_milieu_base(const Milieu_base& ) override;
49 const Milieu_base& milieu() const override;
50 Milieu_base& milieu() override;
51 const Solide& solide() const;
52 Solide& solide();
53 int nombre_d_operateurs() const override;
54 const Operateur& operateur(int) const override;
55 Operateur& operateur(int) override;
56 inline const Champ_Inc_base& inconnue() const override;
57 inline Champ_Inc_base& inconnue() override;
58 void discretiser() override;
59 int impr(Sortie& os) const override;
60
61 const Motcle& domaine_application() const override;
62 void mettre_a_jour(double temps) override;
63 virtual const Champ_Don_base& diffusivite_pour_transport() const;
64 virtual const Champ_base& diffusivite_pour_pas_de_temps() const;
65
66 // Methods of the post-processable field interface
67 /////////////////////////////////////////////////////
68 // creer_champ method not implemented; override if needed
69 void creer_champ(const Motcle& motlu) override;
70 const Champ_base& get_champ(const Motcle& nom) const override;
71 void get_noms_champs_postraitables(Noms& nom,Option opt=NONE) const override;
72 bool has_champ(const Motcle& nom, OBS_PTR(Champ_base) &ref_champ) const override;
73 bool has_champ(const Motcle& nom) const override;
74 /////////////////////////////////////////////////////
75
76private :
77 OBS_PTR(Solide) le_solide;
78 OWN_PTR(Champ_Inc_base) la_temperature;
79 OWN_PTR(Champ_Fonc_base) temperature_paroi_;
80 Operateur_Diff terme_diffusif;
81
82protected :
83 OWN_PTR(Traitement_particulier_Solide_base) le_traitement_particulier;
84};
85
86/*! @brief Returns the unknown field of the equation, i.e. the temperature.
87 *
88 * @return (Champ_Inc_base&) the unknown field of the equation: the temperature
89 */
91{
92 return la_temperature;
93}
94
95/*! @brief Returns the unknown field of the equation, i.e. the temperature (const version).
96 *
97 * @return (Champ_Inc_base&) the unknown field of the equation: the temperature
98 */
100{
101 return la_temperature;
102}
103
104#endif /* Conduction_included */
class Champ_Don_base base class of Given Fields (not calculated)
class Champ_Fonc_base Base class of fields that are functions of a calculated quantity
Class Champ_Inc_base.
class Champ_base This class is the base of the fields hierarchy.
Definition Champ_base.h:43
int nombre_d_operateurs() const override
Returns the number of operators in the equation. For the standard conduction equation this is always ...
void set_param(Param &) const override
void mettre_a_jour(double temps) override
The value of the unknown at the time step has been calculated.
void creer_champ(const Motcle &motlu) override
const Solide & solide() const
Returns the solid medium associated with the equation (const version).
const Champ_Inc_base & inconnue() const override
Returns the unknown field of the equation, i.e. the temperature (const version).
Definition Conduction.h:99
void associer_solide(const Solide &)
Associates the solid medium 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.
virtual const Champ_Don_base & diffusivite_pour_transport() const
bool has_champ(const Motcle &nom, OBS_PTR(Champ_base) &ref_champ) const override
OWN_PTR(Traitement_particulier_Solide_base) le_traitement_particulier
void associer_milieu_base(const Milieu_base &) override
Associates a physical medium with the equation; the medium is cast to Solide.
int impr(Sortie &os) const override
Prints the diffusive term to an output stream.
virtual const Champ_base & diffusivite_pour_pas_de_temps() const
const Champ_base & get_champ(const Motcle &nom) const override
void get_noms_champs_postraitables(Noms &nom, Option opt=NONE) const override
const Motcle & domaine_application() const override
Returns the application domain name of the equation.
const Operateur & operateur(int) const override
Returns the operator at the given index in the equation (const version).
void discretiser() override
Discretises the equation.
const Milieu_base & milieu() const override
Returns the physical medium associated with the equation (const version).
class Equation_base The role of an equation is the calculation of one or more fields....
Milieu_base This class is the base of the (physical) medium hierarchy.
Definition Milieu_base.h:50
A character string (Nom) in uppercase.
Definition Motcle.h:26
An array of character strings (VECT(Nom)).
Definition Noms.h:26
friend class Entree
Definition Objet_U.h:71
friend class Sortie
Definition Objet_U.h:70
Operateur_Diff Generic class of the hierarchy of operators representing a diffusion.
class Operateur Generic class of the operator hierarchy.
Definition Operateur.h:39
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
Class Solide: represents a solid medium and its physical properties.
Definition Solide.h:26
Base class for special post-processing treatments on solid equations.