TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Implicit_steady.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
17#ifndef Implicit_steady_included
18#define Implicit_steady_included
19
20#include <Simpler.h>
21#include <Navier_Stokes_std.h>
22#include <Nom.h>
23
24// Like the Implicite algorithm (Piso with avancement_crank_=0), IMPLICITE_STEADY
25// splits into a prediction step and a correction step.
26// The scalar time step dt is replaced by a vector of local time steps (one per face).
27// The pressure matrix (B*(M/dt_loc)^-1*Bt) is reassembled when dt_loc changes significantly.
28
30{
31
32 Declare_instanciable_sans_constructeur(Implicit_steady);
33
34public :
35
37 //Modification of the projection and correction steps for the taking into account of a local time step
38 void iterer_NS(Equation_base&, DoubleTab& current, DoubleTab& pression, double, Matrice_Morse&, double, DoubleTrav&,int nb_iter,int& converge, int& ok) override;
39 // Compute M/dt_loc = rho * V_entrelace * porosite / dt_loc per face
40 void calcul_mat_masse_diviser_par_dt(Navier_Stokes_std& eqnNS, DoubleVect& m_dt, const DoubleVect& dt_loc);
41
42 inline const Nom& le_nom() const override
43 {
44 static Nom nom="Implicit_steady";
45 return nom;
46 };
47
48
49
50protected:
51 double seuil_variation_dt_ = 0.25; // 25% variation triggers reassembly (max safe with security_factor=0.8)
52 int reassembly_interval_ = 100; // reassemble at most every N time steps
53};
54
55
56
57
58
59
60#endif
61
classe Equation_base Le role d'une equation est le calcul d'un ou plusieurs champs....
const Nom & le_nom() const override
Donne le nom de l'Objet_U Methode a surcharger : renvoie "neant" dans cette implementation.
void iterer_NS(Equation_base &, DoubleTab &current, DoubleTab &pression, double, Matrice_Morse &, double, DoubleTrav &, int nb_iter, int &converge, int &ok) override
void calcul_mat_masse_diviser_par_dt(Navier_Stokes_std &eqnNS, DoubleVect &m_dt, const DoubleVect &dt_loc)
Classe Matrice_Morse Represente une matrice M (creuse), non necessairement carree.
classe Navier_Stokes_std Cette classe porte les termes de l'equation de la dynamique
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31