23 #ifndef _MSTRUCT_GENERATEUR_DCR_
24 #define _MSTRUCT_GENERATEUR_DCR_
26 #include "chrono/physics/ChSystemNSC.h"
27 #include "chrono_irrlicht/ChIrrApp.h"
31 class MSTRUCT_CHRONO_PARTICULE
34 MSTRUCT_CHRONO_PARTICULE(std::shared_ptr<chrono::ChBody> particule);
35 std::shared_ptr<chrono::ChBody> get_ChBody(
void);
36 bool est_porosite(
void);
37 void est_porosite(
bool porosite);
39 std::shared_ptr<chrono::ChBody> m_particule;
43 class MSTRUCT_GROUPE_PARTICULE
46 MSTRUCT_GROUPE_PARTICULE(std::string nom,
int type_particule);
47 ~MSTRUCT_GROUPE_PARTICULE(
void);
48 std::vector<MSTRUCT_CHRONO_PARTICULE*>* get_vector_particule(
void);
49 std::string get_nom(
void);
50 int get_type_particule(
void);
54 std::vector<MSTRUCT_CHRONO_PARTICULE*> m_vector_particule_chrono;
57 class MSTRUCT_CHRONO_PARTICULE_SPHERE:
public MSTRUCT_CHRONO_PARTICULE
60 MSTRUCT_CHRONO_PARTICULE_SPHERE(std::shared_ptr<chrono::ChBody> particule,
double rayon_ini,
double rayon_sim);
61 double get_rayon_ini(
void);
62 double get_rayon_sim(
void);
68 class MSTRUCT_CHRONO_PARTICULE_CYLINDRE:
public MSTRUCT_CHRONO_PARTICULE
71 MSTRUCT_CHRONO_PARTICULE_CYLINDRE(std::shared_ptr<chrono::ChBody> particule,
double rayon_ini,
double rayon_sim,
double longueur_ini,
double longueur_sim);
72 double get_rayon_ini(
void);
73 double get_rayon_sim(
void);
74 double get_longueur_ini(
void);
75 double get_longueur_sim(
void);
79 double m_longueur_ini;
80 double m_longueur_sim;
86 MSTRUCT_GENERATEUR_DCR(
MG_GESTIONNAIRE* mg_gestionnaire,
char* nom_mgcg_modele);
87 ~MSTRUCT_GENERATEUR_DCR(
void);
89 void change_friction(
double friction);
90 void change_facteur_reduction_vitesse(
double facteur_reduction_vitesse);
91 void change_eps_vitesse(
double eps_vitesse);
92 void change_pas_temps(
double pas_temps);
93 void change_temps_max_sim(
double temps);
94 int ajouter_spheres(std::string nom,
95 double mu_rayon,
double sigma_rayon,
int type_distribution_rayon,
96 double fraction_volumique_cible,
double eps_frac_vol,
bool porosite=
false);
97 int ajouter_cylindres(std::string nom,
98 double mu_rayon,
double sigma_rayon,
int type_distribution_rayon,
99 double mu_longueur,
double sigma_longueur,
int type_distribution_longueur,
100 double mu_theta,
double sigma_theta,
int type_distribution_theta,
101 double mu_phi,
double sigma_phi,
int type_distribution_phi,
102 double fraction_volumique_cible,
double eps_frac_vol,
bool porosite=
false);
103 int lancer_simulation(
void);
104 int generer_geometrie(
void);
105 int generer_geometrie_avec_changement(
void);
106 int changement_geometrie(
void);
108 void active_interface_graphique(
bool avec_interface_graphique);
111 int creer_systeme_physique(
void);
112 int creer_frontiere_boite(
void);
113 int cree_interface_graphique(
void);
114 void ralentir_particules(
void);
116 bool m_avec_interface_graphique;
118 double m_facteur_reduction_vitesse;
119 double m_eps_vitesse;
121 double m_temps_max_sim;
122 chrono::ChSystemNSC *m_systeme_physique;
123 chrono::irrlicht::ChIrrApp *m_irrapp;
124 std::vector<std::shared_ptr<chrono::ChBody>> m_vector_particule_chrono;
125 std::map<std::string,MSTRUCT_GROUPE_PARTICULE*> m_map_groupe_particule;
virtual int construire(MSTRUCT_VES *ves)=0
virtual int get_type(void)=0