TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Schema_Cahn_Hilliard_Navier_Stokes.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 Schema_Cahn_Hilliard_Navier_Stokes_included
18#define Schema_Cahn_Hilliard_Navier_Stokes_included
19
20#include <Schema_Cahn_Hilliard.h>
21
22/*! @brief : class Schema_CH_NS_Partitionne
23 *
24 * <Description of class Schema_CH_NS_Partitionne>
25 */
26
28{
29
30 Declare_instanciable( Schema_Cahn_Hilliard_Navier_Stokes ) ;
31
32public :
33 void set_param(Param&) const override;
34 int lire_motcle_non_standard(const Motcle&, Entree&) override;
35 void completer() override;
36 void associer_pb(const Probleme_base&) override;
37
38 inline int nb_valeurs_temporelles() const override { return schema_convection_->nb_valeurs_temporelles(); };
39 inline int nb_valeurs_futures() const override { return schema_convection_->nb_valeurs_futures(); };
40 double temps_futur(int i) const override { return schema_convection_->temps_futur(i); };
41 double temps_defaut() const override { return schema_convection_->temps_defaut(); };
42
43 inline const Schema_Temps_base& get_schema_convection() const { return schema_convection_.valeur(); };
44
45 void initialize() override;
46 bool initTimeStep(double dt) override;
47 void changer_temps_courant(const double t) override;
48 bool iterateTimeStep(bool& converged) override;
50 bool corriger_dt_calcule(double& dt) const override;
51 int mettre_a_jour() override;
52 int stop() const override;
53 void imprimer(Sortie& os) const override;
54
55protected :
56 OWN_PTR(Schema_Temps_base) schema_convection_;
57
58};
59
60#endif /* Schema_Cahn_Hilliard_Navier_Stokes_included */
Class defining operators and methods for all reading operation in an input flow (file,...
Definition Entree.h:42
classe Equation_base Le role d'une equation est le calcul d'un ou plusieurs champs....
Une chaine de caractere (Nom) en majuscules.
Definition Motcle.h:26
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
classe Probleme_base C'est un Probleme_U qui n'est pas un couplage.
void associer_pb(const Probleme_base &) override
const Schema_Temps_base & get_schema_convection() const
int faire_un_pas_de_temps_eqn_base(Equation_base &) override
Effectue un pas de temps sur l'equation de Cahn-Hilliard, d'où le test sur le sub_type.
bool iterateTimeStep(bool &converged) override
Calculate the U(n+1) unknown for each equation (if solved) of the problem with the selected time sche...
int mettre_a_jour() override
Mise a jour du temps courant (t+=dt) et du nombre de pas de temps effectue (nb_pas_dt_++).
int stop() const override
Renvoie 1 si il y lieu de stopper le calcul pour differente raisons: - le temps final est atteint.
void changer_temps_courant(const double t) override
Change le temps courant.
OWN_PTR(Schema_Temps_base) schema_convection_
bool corriger_dt_calcule(double &dt) const override
Corrige le pas de temps calcule que l'on passe en parametre et verifie qu'il n'est pas "trop" petit (...
int lire_motcle_non_standard(const Motcle &, Entree &) override
Lecture des parametres de type non simple d'un objet_U a partir d'un flot d'entree.
void imprimer(Sortie &os) const override
Imprime le pas de temps sur un flot de sortie s'il y a lieu.
class Schema_Cahn_Hilliard. Il herite de schema Euler semi implicite et ne s'applique qu'à Cahn-Hilli...
class Schema_Temps_base
Classe de base des flux de sortie.
Definition Sortie.h:52