TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Convection_Diffusion_Espece_Multi_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_Espece_Multi_WC.h>
17#include <Navier_Stokes_Fluide_Dilatable_base.h>
18#include <Fluide_Weakly_Compressible.h>
19#include <Loi_Etat_Multi_GP_WC.h>
20#include <Op_Conv_negligeable.h>
21#include <Probleme_base.h>
22#include <TRUSTTrav.h>
23#include <Param.h>
24#include <Discretisation_base.h>
25#include <Perf_counters.h>
26
27Implemente_instanciable(Convection_Diffusion_Espece_Multi_WC,"Convection_Diffusion_Espece_Multi_WC",Convection_Diffusion_Espece_Multi_base);
28// XD convection_diffusion_espece_multi_WC eqn_base convection_diffusion_espece_multi_WC INHERITS_BRACE Species
29// XD_CONT conservation equation for a multi-species weakly-compressible fluid.
30
32{
34}
35
37{
39}
40
42{
43 return le_fluide->nu_sur_Schmidt();
44}
45
47{
48 const Navier_Stokes_std& eqn_hydr = ref_cast(Navier_Stokes_std,probleme().equation(0));
49 return eqn_hydr.rho_la_vitesse() /* rho * u and not u */;
50}
51
52/*! @brief Associates the equation unknown with the state law.
53 *
54 */
56{
59 Loi_Etat_Multi_GP_WC& loi_etat = ref_cast_non_const(Loi_Etat_Multi_GP_WC,le_fluideQC.loi_etat().valeur());
60 loi_etat.associer_inconnue(l_inco_ch.valeur());
61}
62
64{
65 derivee=0.;
66 return derivee_en_temps_inco_sans_solveur_masse_impl(*this,derivee,true /* explicit */);
67}
68
69void Convection_Diffusion_Espece_Multi_WC::assembler( Matrice_Morse& matrice, const DoubleTab& inco, DoubleTab& resu)
70{
72}
73
74void Convection_Diffusion_Espece_Multi_WC::assembler_blocs_avec_inertie(matrices_t matrices, DoubleTab& secmem, const tabs_t& semi_impl)
75{
76 statistics().begin_count(STD_COUNTERS::ajouter_blocs,statistics().get_last_opened_counter_level()+1);
77 Convection_Diffusion_Fluide_Dilatable_Proto::assembler_blocs(*this,matrices, secmem, semi_impl);
78 schema_temps().ajouter_blocs(matrices, secmem, *this);
79
80 if (!discretisation().is_poly_family())
81 {
82 const std::string& nom_inco = inconnue().le_nom().getString();
83 Matrice_Morse *mat = matrices.count(nom_inco) ? matrices.at(nom_inco) : nullptr;
84 modifier_pour_Cl(*mat,secmem);
85 }
86 statistics().end_count(STD_COUNTERS::ajouter_blocs);
87
88}
class Champ_base This class is the base of the fields hierarchy.
Definition Champ_base.h:43
Convection_Diffusion_Espece_Multi_WC class Special case of Convection_Diffusion_Espece_Multi_base.
const Champ_base & vitesse_pour_transport() const override
DoubleTab & derivee_en_temps_inco(DoubleTab &) override
Returns the time derivative of the unknown I of the equation: dI/dt = M-1*(sum(operators(I) + sources...
const Champ_base & diffusivite_pour_pas_de_temps() const override
void assembler_blocs_avec_inertie(matrices_t matrices, DoubleTab &secmem, const tabs_t &semi_impl) override
void assembler(Matrice_Morse &mat_morse, const DoubleTab &present, DoubleTab &secmem) override
void completer() override
Associates the equation unknown with the state law.
Particular case of Convection_Diffusion_Espece_Fluide_Dilatable_base for a quasi-compressible fluid w...
DoubleTab & derivee_en_temps_inco_sans_solveur_masse_impl(Convection_Diffusion_Fluide_Dilatable_base &eqn, DoubleTab &derivee, const bool is_expl)
Returns the time derivative of the equation's unknown.
public_for_cuda void assembler_impl(Convection_Diffusion_Fluide_Dilatable_base &eqn, Matrice_Morse &mat_morse, const DoubleTab &present, DoubleTab &secmem)
void assembler_blocs(Convection_Diffusion_Fluide_Dilatable_base &eqn, matrices_t matrices, DoubleTab &secmem, const tabs_t &semi_impl)
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
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.
virtual void modifier_pour_Cl(Matrice_Morse &mat_morse, DoubleTab &secmem) const
Probleme_base & probleme()
Returns the problem associated with the equation.
Schema_Temps_base & schema_temps()
Returns the time scheme associated with the equation.
const Nom & le_nom() const override
Returns the name of the field.
Fluide_Weakly_Compressible class This class represents a weakly compressible fluid,...
State law class for a mixture of ideal gases in the weakly compressible (WC) framework.
virtual void associer_inconnue(const Champ_Inc_base &inconnue)
Associates the unknown of each mass fraction equation with the state law.
Matrice_Morse class - Represents a (sparse) matrix M, not necessarily square,.
Navier_Stokes_std This class carries the terms of the momentum equation.
virtual const Champ_Inc_base & rho_la_vitesse() const
const std::string & getString() const
Definition Nom.h:92
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
virtual void ajouter_blocs(matrices_t matrices, DoubleTab &secmem, const Equation_base &eqn, const tabs_t &semi_impl={}) const
Base class for output streams.
Definition Sortie.h:52