TrioCFD 1.9.9_beta
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
class Equation_base The role of an equation is the calculation of one or more fields....
A character string (Nom) in uppercase.
Definition Motcle.h:26
Helper class to factorize the readOn method of Objet_U classes.
Definition Param.h:112
class Probleme_base It is a Probleme_U that is not a coupling.
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
Updates the current time (t+=dt) and the number of time steps performed (nb_pas_dt_++).
int stop() const override
Returns 1 if it is necessary to stop the computation for various reasons:
void changer_temps_courant(const double t) override
Changes the current time.
OWN_PTR(Schema_Temps_base) schema_convection_
bool corriger_dt_calcule(double &dt) const override
Corrects the computed time step passed as parameter and verifies it is not "too" small (< dt_min_).
int lire_motcle_non_standard(const Motcle &, Entree &) override
Reads non-simple-type parameters of an Objet_U from an input stream.
void imprimer(Sortie &os) const override
Prints the time step to an output stream if appropriate.
class Schema_Cahn_Hilliard. Il herite de schema Euler semi implicite et ne s'applique qu'à Cahn-Hilli...
class Schema_Temps_base
Base class for output streams.
Definition Sortie.h:52