15#include <Navier_Stokes_IBM.h>
16#include <Navier_Stokes_std.h>
17#include <Schema_Temps_base.h>
18#include <Source_PDF_base.h>
19#include <Assembleur_base.h>
20#include <Probleme_base.h>
21#include <Fluide_base.h>
78 Cerr <<
"(IBM) Immersed Interface: modified velocity corrector for initial projection." << finl;
93 Cerr <<
"(IBM) Immersed Interface: compute pressure matrix coefficients." << finl;
101 Cerr <<
"(IBM) Immersed Interface: modified pressure matrix for initial projection." << finl;
115 Cerr <<
"Assembling for quasi-compressible" << finl;
129 le_dom_Cl_dis->mettre_a_jour(temps);
136 Cout <<
"Estimating the pressure field at startup:" << finl;
143 Cerr <<
"(IBM) Immersed Interface: modified pressure gradient for initial pressure computation." << finl;
152 if (le_schema_en_temps->pas_de_temps() == 0)
155 dt = std::min(dt, le_schema_en_temps->pas_temps_max());
156 le_schema_en_temps->set_dt() = (dt);
159 for (
int i = 0; i <
sources().size(); i++)
170 Cerr <<
"(IBM) Immersed Interface: Dirichlet velocity in initial pressure computation for PDF (if any)." << finl;
171 DoubleTrav secmem_pdf(vpoint);
173 vpoint -= secmem_pdf;
175 DoubleTrav secmem_pdf_calculer(vpoint);
177 vpoint += secmem_pdf_calculer;
184 le_schema_en_temps->set_dt() = 0;
187 solveur_masse->appliquer(vpoint);
193 assembleur_pression_->modifier_secmem_pour_incr_p(
la_pression->valeurs(), 1, secmem);
196 Cerr <<
"Pressure increment computed successfully" << finl;
200 Cerr <<
"(IBM) Immersed Interface: correction of initial pressure." << finl;
206 operator_add(
la_pression->valeurs(), inc_pre, VECT_ALL_ITEMS);
222 if (le_traitement_particulier)
223 le_traitement_particulier->preparer_calcul_particulier();
232 Cerr <<
"(IBM) Immersed Interface: H1 penalty of pressure matrix." << finl;
237 Cerr <<
"(IBM) Immersed Interface: modification of pressure matrix." << finl;
242 coeff.echange_espace_virtuel();
257 if (mat_var ==
false)
259 Cerr <<
"(IBM) Immersed Interface: update of pressure matrix coefficents." << finl;
268 Cerr <<
"(IBM) Immersed Interface: update of pressure matrix." << finl;
297 Cerr<<
"*******(IBM) Use an explicit time scheme (at least Euler explicit + diffusion) with Source_PDF_base.*******"<<finl;
static void verifier(const char *const msg, double)
Class defining operators and methods for all reading operation in an input flow (file,...
bool initTimeStep_ibm_proto(double ddt)
void modify_initial_variable_ibm_proto(DoubleTab &)
Entree & readOn_ibm_proto(Entree &is, Equation_base &eq)
void assembler_ibm_proto(Matrice_Morse &mat_morse, const DoubleTab &present, DoubleTab &secmem)
void set_champ_coeff_pdf_som(DoubleTab &coeff)
DoubleTab champ_coeff_pdf_som_
void preparer_calcul_ibm_proto()
void set_param_ibm_proto(Param ¶m) const
DoubleTab & derivee_en_temps_inco_ibm_proto(DoubleTab &)
int correction_variable_initiale_
virtual int equation_non_resolue() const
Sources & sources()
Returns the source terms associated with the equation.
virtual int preparer_calcul()
Everything that does not depend on other possible problems.
Probleme_base & probleme()
Returns the problem associated with the equation.
Schema_Temps_base & schema_temps()
Returns the time scheme associated with the equation.
virtual double calculer_pas_de_temps() const
Calculation of the next time step.
Matrice_Morse class - Represents a (sparse) matrix M, not necessarily square,.
bool initTimeStep(double dt) override
Allocation and initialization of the unknown and boundary conditions until present+dt.
int correction_calcul_pression_initiale_
void assembler(Matrice_Morse &mat_morse, const DoubleTab &present, DoubleTab &secmem) override
void set_param(Param &titi) const override
void modify_initial_gradP(DoubleTrav &) override
int correction_vitesse_projection_initiale_
int preparer_calcul() override
Everything that does not depend on other possible problems.
void verify_scheme() override
void modify_initial_variable() override
void derivee_en_temps_inco_sources(DoubleTrav &) override
int correction_matrice_pression_
int matrice_pression_penalisee_H1_
int correction_matrice_projection_initiale_
int gradient_pression_qdm_modifie_
int correction_pression_modifie_
int correction_vitesse_modifie_
Navier_Stokes_std This class carries the terms of the momentum equation.
const Champ_Inc_base & inconnue() const override
Returns the velocity (unknown field of the equation) (const version).
const Fluide_base & fluide() const
Returns the incompressible fluid (physical medium of the equation) associated with the equation.
virtual void projeter()
Computes the solution U of the equations: | M(U-V)/dt + BtP = 0.
Matrice matrice_pression_
bool initTimeStep(double dt) override
Allocation and initialization of the unknown and boundary conditions until present+dt.
void set_param(Param &titi) const override
virtual int projection_a_faire()
const Operateur & operateur(int) const override
Returns the i-th operator of the equation: - terme_diffusif if i = 0.
Matrice & matrice_pression()
SolveurSys solveur_pression_
virtual void calculer_la_pression_en_pa()
Computes "la_pression_en_pa" from "la_pression".
int nombre_d_operateurs() const override
Returns the number of operators in the equation: 2 for the standard Navier-Stokes equations.
int methode_calcul_pression_initiale_
const Nom & que_suis_je() const
Returns the string identifying the class.
virtual Entree & readOn(Entree &)
Reads an Objet_U from an input stream. Virtual method to override.
virtual Sortie & printOn(Sortie &) const
Writes the object to an output stream. Virtual method to override.
virtual DoubleTab & ajouter(const DoubleTab &, DoubleTab &) const =0
Helper class to factorize the readOn method of Objet_U classes.
void ajouter(const char *keyword, const int *value, Param::Nature nat=Param::OPTIONAL)
Register an integer parameter.
bool is_dilatable() const
static void abort()
Abort routine for TRUST on a fatal error.
double temps_courant() const
Returns the current time.
Base class for output streams.
class Source_PDF_base Base class for the source terms for the penalisation of the momentum in the Imm...
const bool & get_matrice_pression_variable_bool_() const
DoubleTab & calculer_pdf(DoubleTab &) const
virtual DoubleTab compute_coeff_matrice() const
virtual void multiply_coeff_volume(DoubleTab &) const
DoubleTab & calculer(DoubleTab &) const override
virtual void correct_incr_pressure(const DoubleTab &, DoubleTab &) const
void mettre_a_jour(double temps)
Time update of all sources in the list.
virtual void echange_espace_virtuel(IsExchangeBlocking exchange_type=IsExchangeBlocking::DefaultBlocking, const std::string kernel_name="noname")