TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
IJK_Thermals.h
1/****************************************************************************
2* Copyright (c) 2023, 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#ifndef IJK_Thermals_included
17#define IJK_Thermals_included
18
19#include <Champs_compris_IJK_interface.h>
20#include <Champs_compris_IJK.h>
21#include <IJK_Thermal_base.h>
22#include <TRUST_List.h>
23#include <System.h>
24
25
28
30{
31
32 Declare_instanciable( IJK_Thermals ) ;
33
34public :
36
37 /*
38 * Surcharge de l'eq base
39 */
40 void set_param(Param& titi) const override { /* Do nothing */ }
41 void completer() override;
42 void associer_pb_base(const Probleme_base&) override;
43 void discretiser() override { /* Do nothing */ }
44 int preparer_calcul() override { return 1; }
45 const Milieu_base& milieu() const override;
46 Milieu_base& milieu() override;
47 void associer_milieu_base(const Milieu_base& ) override ;
48 int nombre_d_operateurs() const override { return -123; }
49 const Operateur& operateur(int) const override { throw; }
50 Operateur& operateur(int) override { throw; }
51 const Champ_Inc_base& inconnue() const override { throw; }
52 Champ_Inc_base& inconnue() override { throw; }
53
54 void verifie_milieu();
55
57 inline const Fluide_Diphasique_IJK& milieu_ijk() const { return ref_cast(Fluide_Diphasique_IJK, milieu()); }
58
59 void set_fichier_reprise(const char *lataname);
60 const Nom& get_fichier_reprise();
61 void associer_post(const Postprocessing_IJK& ijk_ft_post);
62 void associer_switch(const Switch_FT_double& ijk_ft_switch);
63
64 // Interface Champs_compris_IJK_interface:
65 bool has_champ(const Motcle& nom) const override;
66 bool has_champ(const Motcle& nom, OBS_PTR(Champ_base)& ref_champ) const override { /* not used */ throw; }
67 bool has_champ_vectoriel(const Motcle& nom) const override { return false; }
68 const IJK_Field_double& get_IJK_field(const Motcle& nom) override;
69 const IJK_Field_vector3_double& get_IJK_field_vector(const Motcle& nom) override;
70 static void Fill_postprocessable_fields(std::vector<FieldInfo_t>& chps);
71 void get_noms_champs_postraitables(Noms& noms,Option opt=NONE) const override;
72
73 void split_name(const Motcle& nom, Nom& var, int& rank) const;
75 const Intersection_Interface_ijk_face& intersection_ijk_face_);
77 void sauvegarder_temperature(Nom& lata_name, const int& stop);
78 void sauvegarder_thermals(SFichier& fichier);
79 void compute_timestep(double& dt_thermals, const double dxmin);
80 void initialize(const Domaine_IJK& splitting);
87 int size_thermal_problem(Nom thermal_problem);
89 void euler_time_step(const double timestep);
90 void euler_rustine_step(const double timestep);
91 void rk3_sub_step(const int rk_step, const double total_timestep, const double time);
92 void rk3_rustine_sub_step(const int rk_step, const double total_timestep,
93 const double fractionnal_timestep, const double time);
94 void ecrire_statistiques_bulles(int reset, const Nom& nom_cas, const double current_time, const ArrOfDouble& surface);
95 void posttraiter_tous_champs_thermal(Motcles& liste_post_instantanes_);
96 void posttraiter_champs_instantanes_thermal(const Motcles& liste_post_instantanes,
97 const char *lata_name,
98 const int latastep,
99 const double current_time,
100 int& n);
101 void init_switch_thermals(const Domaine_IJK& splitting);
102 void prepare_thermals(const char *lataname);
103 int ghost_fluid_flag();
104 void ecrire_fichier_reprise(SFichier& fichier, const char *lata_name);
105 void compute_ghost_cell_numbers_for_subproblems(const Domaine_IJK& splitting, int ghost_init);
106 int get_probes_ghost_cells(int ghost_init);
107
110
115
116 void set_latastep_reprise(const bool stop);
117 void thermal_subresolution_outputs(const int& dt_post_thermals_probes=0);
119 double get_modified_time();
120 void get_rising_velocities_parameters(int& compute_rising_velocities,
121 int& fill_rising_velocities,
122 int& use_bubbles_velocities_from_interface,
123 int& use_bubbles_velocities_from_barycentres);
125 void create_folders(Nom folder_name_base);
126 void set_first_step_thermals_post(int& first_step_thermals_post);
128 void set_temperature_ini();
129 void compute_new_thermal_field(Switch_FT_double& switch_double_ft,
130 const Domaine_IJK& new_mesh,
131 const Nom& lata_name,
132 DoubleTab& coeff_i,
133 IntTab Indice_i,
134 DoubleTab& coeff_j,
135 IntTab Indice_j,
136 DoubleTab& coeff_k,
137 IntTab Indice_k);
139
140 /*
141 * Pour simplifier la vie
142 */
143 const LIST(OWN_PTR(IJK_Thermal_base))& get_liste_eqs() const { return liste_thermique_; }
144 LIST(OWN_PTR(IJK_Thermal_base))& get_liste_eqs() { return liste_thermique_; }
145 int size() const { return (int)liste_thermique_.size(); }
146 int est_vide() const { return liste_thermique_.est_vide(); }
147
148protected :
149 // All Done here !!
150 LIST(OWN_PTR(IJK_Thermal_base)) liste_thermique_;
151 OBS_PTR(Milieu_base) le_fluide_;
153 OBS_PTR(Postprocessing_IJK) ref_ijk_ft_post_;
154 OBS_PTR(Switch_FT_double) ref_ijk_ft_switch_;
155 OBS_PTR(Intersection_Interface_ijk_cell) ref_intersection_ijk_cell_;
156 OBS_PTR(Intersection_Interface_ijk_face) ref_intersection_ijk_face_;
157
158
160
162
164 LIST(Nom) thermal_rank_folder_;
175
177};
178
179#endif /* IJK_Thermals_included */
Classe Champ_Inc_base.
classe Champ_base Cette classe est la base de la hierarchie des champs.
Definition Champ_base.h:43
Similar to Champs_compris_interface but for IJK scalar and vector fields.
std::tuple< Motcle, Entity, Nature_du_champ, bool > FieldInfo_t
This class encapsulates all the information related to the eulerian mesh for TrioIJK.
Definition Domaine_IJK.h:47
classe Equation_base Le role d'une equation est le calcul d'un ou plusieurs champs....
OWN_PTR(Parametre_equation_base) &parametre_equation()
void thermal_subresolution_outputs(const int &dt_post_thermals_probes=0)
std::vector< int > lata_step_reprise_
void set_first_step_thermals_post(int &first_step_thermals_post)
void associer_switch(const Switch_FT_double &ijk_ft_switch)
void prepare_thermals(const char *lataname)
void associer_post(const Postprocessing_IJK &ijk_ft_post)
OBS_PTR(Postprocessing_IJK) ref_ijk_ft_post_
void create_folders_for_probes()
int preparer_calcul() override
Tout ce qui ne depend pas des autres problemes eventuels.
void compute_ghost_cell_numbers_for_subproblems(const Domaine_IJK &splitting, int ghost_init)
const Fluide_Diphasique_IJK & milieu_ijk() const
void retrieve_ghost_fluid_params()
int get_disable_post_processing_probes_out_files() const
void ecrire_statistiques_bulles(int reset, const Nom &nom_cas, const double current_time, const ArrOfDouble &surface)
bool has_champ_vectoriel(const Motcle &nom) const override
void rk3_rustine_sub_step(const int rk_step, const double total_timestep, const double fractionnal_timestep, const double time)
void verifie_milieu()
void update_intersections()
Nom local_quantities_thermal_lines_time_index_folder_
void get_noms_champs_postraitables(Noms &noms, Option opt=NONE) const override
void set_post_pro_first_call()
void set_fichier_reprise(const char *lataname)
void vide_phase_invalide_cellules_diphasiques()
void set_temperature_ini()
void echange_diph_vers_pure_cellules_finalement_pures()
void get_rising_velocities_parameters(int &compute_rising_velocities, int &fill_rising_velocities, int &use_bubbles_velocities_from_interface, int &use_bubbles_velocities_from_barycentres)
OBS_PTR(Probleme_FTD_IJK_base) ref_ijk_ft_
Champs_compris_IJK_interface::FieldInfo_t FieldInfo_t
Nom local_quantities_thermal_probes_folder_
Nom shell_quantities_thermal_probes_folder_
void echange_pure_vers_diph_cellules_initialement_pures()
void set_param(Param &titi) const override
int get_probes_ghost_cells(int ghost_init)
Nom overall_bubbles_quantities_folder_
System make_dir_for_out_files_
void remplir_tableau_pure_cellules_diphasiques(bool next_time)
void associer_interface_intersections(const Intersection_Interface_ijk_cell &intersection_ijk_cell_, const Intersection_Interface_ijk_face &intersection_ijk_face_)
void associer_milieu_base(const Milieu_base &) override
int ini_folder_out_files_
const IJK_Field_vector3_double & get_IJK_field_vector(const Motcle &nom) override
bool has_champ(const Motcle &nom) const override
LIST(Nom) thermal_rank_folder_
void clean_ijk_intersections()
void sauvegarder_temperature(Nom &lata_name, const int &stop)
void initialize(const Domaine_IJK &splitting)
void euler_rustine_step(const double timestep)
void set_latastep_reprise(const bool stop)
void ecrire_fichier_reprise(SFichier &fichier, const char *lata_name)
void posttraiter_tous_champs_thermal(Motcles &liste_post_instantanes_)
int post_pro_first_call_
void init_switch_thermals(const Domaine_IJK &splitting)
void copy_previous_interface_state()
const Champ_Inc_base & inconnue() const override
const Nom & get_fichier_reprise()
const LIST(OWN_PTR(IJK_Thermal_base)) &get_liste_eqs() const
Nom local_quantities_thermal_probes_time_index_folder_
int size() const
const Operateur & operateur(int) const override
LIST(OWN_PTR(IJK_Thermal_base)) liste_thermique_
const IJK_Field_double & get_IJK_field(const Motcle &nom) override
Nom local_quantities_thermal_slices_folder_
static void Fill_postprocessable_fields(std::vector< FieldInfo_t > &chps)
std::vector< int > lata_step_reprise_ini_
OBS_PTR(Milieu_base) le_fluide_
void sauvegarder_thermals(SFichier &fichier)
Nom local_quantities_thermal_slices_time_index_folder_
int nombre_d_operateurs() const override
void split_name(const Motcle &nom, Nom &var, int &rank) const
OBS_PTR(Intersection_Interface_ijk_cell) ref_intersection_ijk_cell_
Operateur & operateur(int) override
int size_thermal_problem(Nom thermal_problem)
double get_modified_time()
OBS_PTR(Intersection_Interface_ijk_face) ref_intersection_ijk_face_
IJK_Ghost_Fluid_Fields ghost_fluid_fields_
Champ_Inc_base & inconnue() override
bool has_champ(const Motcle &nom, OBS_PTR(Champ_base)&ref_champ) const override
void posttraiter_champs_instantanes_thermal(const Motcles &liste_post_instantanes, const char *lata_name, const int latastep, const double current_time, int &n)
void update_thermal_properties()
void compute_new_thermal_field(Switch_FT_double &switch_double_ft, const Domaine_IJK &new_mesh, const Nom &lata_name, DoubleTab &coeff_i, IntTab Indice_i, DoubleTab &coeff_j, IntTab Indice_j, DoubleTab &coeff_k, IntTab Indice_k)
void compute_eulerian_distance_curvature()
Fluide_Diphasique_IJK & milieu_ijk()
void completer() override
Complete la construction (initialisation) des objets associes a l'equation.
void rk3_sub_step(const int rk_step, const double total_timestep, const double time)
void associer_pb_base(const Probleme_base &) override
S'associe au Probleme passe en parametre.
void create_folders(Nom folder_name_base)
void compute_eulerian_curvature()
void compute_timestep(double &dt_thermals, const double dxmin)
Nom local_quantities_thermal_lines_folder_
Nom interfacial_quantities_thermal_probes_folder_
void compute_eulerian_distance()
void discretiser() override
Discretise l'equation.
LIST(OWN_PTR(IJK_Thermal_base)) &get_liste_eqs()
OBS_PTR(Switch_FT_double) ref_ijk_ft_switch_
int est_vide() const
void recompute_temperature_init()
void compute_eulerian_curvature_from_interface()
const Milieu_base & milieu() const override
void euler_time_step(const double timestep)
void copie_pure_vers_diph_sans_interpolation()
classe Milieu_base Cette classe est la base de la hierarchie des milieux (physiques)
Definition Milieu_base.h:50
Une chaine de caractere (Nom) en majuscules.
Definition Motcle.h:26
Un tableau d'objets de la classe Motcle.
Definition Motcle.h:63
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
Un tableau de chaine de caracteres (VECT(Nom)).
Definition Noms.h:26
classe Operateur Classe generique de la hierarchie des operateurs.
Definition Operateur.h:39
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.
Cette classe est a la classe C++ ofstream ce que la classe Sortie est a la classe C++ ostream Elle re...
Definition SFichier.h:27