TrioCFD 1.9.9_beta
TrioCFD documentation
Loading...
Searching...
No Matches
Navier_Stokes_QC.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 <Fluide_Quasi_Compressible.h>
17#include <Discretisation_base.h>
18#include <Navier_Stokes_QC.h>
19
20Implemente_instanciable(Navier_Stokes_QC,"Navier_Stokes_QC",Navier_Stokes_Fluide_Dilatable_base);
21// XD navier_stokes_QC navier_stokes_standard navier_stokes_QC INHERITS_BRACE Navier-Stokes equation for a
22// XD_CONT quasi-compressible fluid.
23
25{
27}
28
30{
32 assert(le_fluide);
33 if (!sub_type(Fluide_Quasi_Compressible,le_fluide.valeur()))
34 {
35 Cerr<<"ERROR : the Navier_Stokes_QC equation can be associated only to a quasi compressible fluid."<<finl;
37 }
38 return is;
39}
40
41/*! @brief Completes the base equation: associates pressure, completes divergence, gradient and pressure solver.
42 *
43 * Adds two source terms: one representing the centrifugal force in the axisymmetric case, the other involved in the 2D axisymmetric resolution.
44 *
45 */
47{
48 Cerr<<"Navier_Stokes_QC::completer"<<finl;
49 if (le_fluide->a_gravite())
50 {
51 Cerr << "Gravity = " << le_fluide->gravite() << finl;
52 Cerr << "Creation of the buoyancy source term for the Navier_Stokes_QC equation : " << finl;
53 Source t;
54 Source& so=les_sources.add(t);
55 Nom type_so = "Source_QC_Gravite_";
57 if (disc=="VEFPreP1B") disc = "VEF";
58 type_so += disc;
59 so.typer_direct(type_so);
60 so->associer_eqn(*this);
61 Cerr << so->que_suis_je() << finl;
62 }
64}
65
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.
Sources les_sources
Base class carrying the terms of the momentum equation for a fluid without turbulence modelling under...
void completer() override
Completes the base equation: associates the pressure, completes the divergence, gradient and pressure...
int impr(Sortie &os) const override
Prints the equation operators to an output stream, unconditionally.
Carries the terms of the momentum equation for a quasi-compressible fluid without turbulence modellin...
void completer() override
Completes the base equation: associates pressure, completes divergence, gradient and pressure solver.
int impr(Sortie &os) const override
Prints the equation operators to an output stream, unconditionally.
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
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
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