16#include <Schema_Temps_IJK_base.h>
17#include <Probleme_FTD_IJK_base.h>
20#include <Perf_counters.h>
28 os <<
"dt " <<
dt_ << finl;
30 os <<
"tinit " <<
tinit_ << finl;
37 os <<
"cfl " <<
cfl_ << finl ;
38 os <<
"fo " <<
fo_ << finl ;
39 os <<
"oh " <<
oh_ << finl ;
46 Cerr <<
"Reading of data for a " <<
que_suis_je() <<
" time scheme" << finl;
49 param.lire_avec_accolades_depuis(is);
110 statistics().begin_count(STD_COUNTERS::compute_dt,statistics().get_last_opened_counter_level()+1);
116 double dxmin = 1.e20;
120 double lg_cube_raw = 1.;
121 for (
int dir = 0; dir < 3; dir++)
124 double max_v = 1.e-20;
125 const int ni = v.
ni();
126 const int nj = v.
nj();
127 const int nk = v.
nk();
128 for (
int k = 0; k < nk; k++)
129 for (
int j = 0; j < nj; j++)
130 for (
int i = 0; i < ni; i++)
131 max_v = std::max(max_v, fabs(v(i, j, k)));
137 const ArrOfDouble& tab_dz=geom.
get_delta(dir);
140 lg_cube *= 1.7 * delta;
141 lg_cube_raw *= delta;
142 dxmin = std::min(delta, dxmin);
153 dt_fo_liq_ = dxmin * dxmin / ((mu_l / rho_l) + 1.e-20) * fo * 0.125;
154 dt_fo_vap_ = dxmin * dxmin / ((mu_v / rho_v) + 1.e-20) * fo * 0.125;
163 double ideal_length_factor = 1.7;
168 double max_sigma = -1e10;
186 dt_oh_ = sqrt((rho_l + rho_v) / (2 * M_PI) * lg_cube_raw * pow(ideal_length_factor, 3) / (max_sigma + 1e-20)) * oh;
188 dt_oh_ = sqrt((rho_l + rho_v) / 2. * lg_cube / (max_sigma + 1e-20)) * oh;
198 double dt_thermals = 1.e20;
206 const double dt = std::min({max_timestep,
timestep_facsec_ * std::min(dt_eq_velocity, dt_thermals), dt_max_for_simu_time});
213 SFichier fic = Ouvrir_fichier(
".dt_ev",
"tstep\ttime\ttimestep\tdt_cfl\tdt_fo\tdt_oh\tdt_diff_th", reset);
216 fic <<
" " << dt_thermals;
220 statistics().end_count(STD_COUNTERS::compute_dt);
227 temps_cpu_ecoule_ = statistics().get_time_since_last_open(STD_COUNTERS::total_execution_time);
244 if (!get_disable_stop())
253 envoyer_broadcast(stop_i, 0);
257 Cerr <<
"---------------------------------------------------------" << finl
258 <<
"The problem " <<
pb_base().
le_nom() <<
" wants to stop : stop file detected" << finl << finl;
266 Cerr <<
"---------------------------------------------------------" << finl
267 <<
"The problem " <<
pb_base().
le_nom() <<
" wants to stop : the maximum number of time steps reached" << finl << finl;
274 Cerr <<
"---------------------------------------------------------" << finl
275 <<
"The problem " <<
pb_base().
le_nom() <<
" wants to stop : final time reached" << finl << finl;
282 Cerr <<
"---------------------------------------------------------" << finl
283 <<
"The problem " <<
pb_base().
le_nom() <<
" wants to stop : max cpu time reached" << finl << finl;
This class encapsulates all the information related to the eulerian mesh for TrioIJK.
double get_constant_delta(int direction) const
Returns the size of cells in a direction.
const ArrOfDouble & get_delta(int direction) const
Returns the array of mesh cell sizes in requested direction.
Fichier en lecture Cette classe est a la classe C++ ifstream ce que la classe Entree est a la.
virtual int ouvrir(const char *name, IOS_OPEN_MODE mode=ios::in)
Class defining operators and methods for all reading operation in an input flow (file,...
double get_mu_vapour() const
double get_rho_vapour() const
double get_mu_liquid() const
double get_rho_liquid() const
const Domaine_IJK & get_domaine() const
void compute_timestep(double &dt_thermals, const double dxmin)
int get_disable_convection_qdm() const
const IJK_Field_vector3_double & get_velocity() const
int get_disable_diffusion_qdm() const
const Nom & que_suis_je() const
renvoie la chaine identifiant la classe.
virtual Entree & readOn(Entree &)
Lecture d'un Objet_U sur un flot d'entree Methode a surcharger.
static const Nom & nom_du_cas()
Renvoie une reference constante vers le nom du cas.
virtual Sortie & printOn(Sortie &) const
Ecriture de l'objet sur un flot de sortie Methode a surcharger.
Helper class to factorize the readOn method of Objet_U classes.
void ajouter_flag(const char *keyword, const bool *value)
Register a boolean flag whose mere presence switches it to true.
void ajouter(const char *keyword, const int *value, Param::Nature nat=Param::OPTIONAL)
Register an integer parameter.
void ajouter_non_std(const char *keyword, const Objet_U *value, Param::Nature nat=Param::OPTIONAL)
Register a keyword handled by Objet_U::lire_motcle_non_standard.
Fluide_Diphasique_IJK & milieu_ijk()
bool has_interface() const
const Navier_Stokes_FTD_IJK & eq_ns() const
const Remaillage_FT_IJK & get_remaillage_ft_ijk() const
bool has_thermals() const
const IJK_Thermals & get_ijk_thermals() const
const Nom & le_nom() const override
Donne le nom de l'Objet_U Methode a surcharger : renvoie "neant" dans cette implementation.
static double mp_min(double)
static double mp_max(double)
static int je_suis_maitre()
renvoie 1 si on est sur le processeur maitre du groupe courant (c'est a dire me() == 0),...
const double & get_facteur_longueur_ideale() const
Cette classe est a la classe C++ ofstream ce que la classe Sortie est a la classe C++ ostream Elle re...
bool first_step_interface_smoothing_
double get_max_simu_time() const
int get_nb_timesteps() const
double computeTimeStep(bool &stop) const override
void completer() override
void set_param_reprise_pb(Param &)
double find_timestep(const double max_timestep, const double cfl, const double fo, const double oh)
void check_stop_criteria(bool &stop) const
bool enable_dt_oh_ideal_length_factor_
void set_param(Param &) const override
double get_current_time() const
double dt_
Pas de temps de calcul.
virtual int stop() const
Renvoie 1 si il y lieu de stopper le calcul pour differente raisons: - le temps final est atteint.
Probleme_base & pb_base()
bool ind_temps_cpu_max_atteint
Classe de base des flux de sortie.