MAGiC  V5.0
Mailleurs Automatiques de Géometries intégrés à la Cao
mstruct_analyse_modules_elasticite.cpp
Aller à la documentation de ce fichier.
1 //####//------------------------------------------------------------
2 //####//------------------------------------------------------------
3 //####// MAGiC
4 //####// Jean Christophe Cuilliere et Vincent FRANCOIS
5 //####// Departement de Genie Mecanique - UQTR
6 //####//------------------------------------------------------------
7 //####// MAGIC est un projet de recherche de l equipe ERICCA
8 //####// du departement de genie mecanique de l Universite du Quebec a Trois Rivieres
9 //####// http://www.uqtr.ca/ericca
10 //####// http://www.uqtr.ca/
11 //####//------------------------------------------------------------
12 //####//------------------------------------------------------------
13 //####//
14 //####// mstruct_analyse_modules_elasticite.cpp
15 //####//
16 //####//------------------------------------------------------------
17 //####//------------------------------------------------------------
18 //####// COPYRIGHT 2000-2024
19 //####// jeu 13 jun 2024 11:58:57 EDT
20 //####//------------------------------------------------------------
21 //####//------------------------------------------------------------
23 #include "mstruct_analyse_champ.h"
24 #include "ot_boite_3d.h"
25 #include "mstruct_definition.h"
26 
28 {
29 }
30 
31 
33  MSTRUCT_ANALYSE_CHAMP* epsilon_sph,
34  MSTRUCT_ANALYSE_CHAMP* sigma_sph,
35  MSTRUCT_ANALYSE_CHAMP* epsilon_dev,
36  MSTRUCT_ANALYSE_CHAMP* sigma_dev): MSTRUCT_ANALYSE(identifiant)
37 {
38  if(epsilon_sph->get_boite_analyse()!=NULL) change_boite_analyse(*epsilon_sph->get_boite_analyse());
40  m_epsilon_sph=epsilon_sph;
41  m_sigma_sph=sigma_sph;
42  m_epsilon_dev=epsilon_dev;
43  m_sigma_dev=sigma_dev;
44  m_Kapp=0;
45  m_Gapp=0;
46  m_Eapp=0;
47  m_Nuapp=0;
48 }
49 
51 {
52 }
53 
55 {
56  return m_Kapp;
57 }
58 
60 {
61  return m_Gapp;
62 }
63 
65 {
66  return m_Nuapp;
67 }
68 
70 {
71  return m_Eapp;
72 }
73 
75 {
77 }
78 
80 {
82  m_Gapp = (1./3.)*((m_sigma_dev->get_moyenne()[3]/(2.0*m_epsilon_dev->get_moyenne()[3]))+
84  (m_sigma_dev->get_moyenne()[5]/(2.0*m_epsilon_dev->get_moyenne()[5])));
85  m_Eapp = (9.0*m_Kapp*m_Gapp)/(3.0*m_Kapp+m_Gapp);
86  m_Nuapp = (3.0*m_Kapp-2.0*m_Gapp)/(2.0*(3.0*m_Kapp+m_Gapp));
87 }
88 
89 
90 void MSTRUCT_ANALYSE_MODULES_ELASTICITE::exporter(std::ofstream& ofstrm, long i, bool avec_entete, bool avec_graph, char* prefix_graph)
91 {
92  if(avec_entete) ofstrm << "#(1) Eapp(2) Nuapp(3) Gapp(4) Kapp(5)" << std::endl;
93  ofstrm << i << " "
94  << m_Eapp << " "
95  << m_Nuapp << " "
96  << m_Gapp << " "
97  << m_Kapp << " " << std::endl;
98 }
99 
101 {
102  long type_analyse=get_type();
103  ofstrm.write((char*)&type_analyse,sizeof(long));
105  ofstrm.write((char*)&m_Eapp,sizeof(double));
106  ofstrm.write((char*)&m_Nuapp,sizeof(double));
107  ofstrm.write((char*)&m_Gapp,sizeof(double));
108  ofstrm.write((char*)&m_Kapp,sizeof(double));
109 }
110 
112 {
113  MSTRUCT_ANALYSE::ouvrir(ifstrm);
114  ifstrm.read((char*)&m_Eapp,sizeof(double));
115  ifstrm.read((char*)&m_Nuapp,sizeof(double));
116  ifstrm.read((char*)&m_Gapp,sizeof(double));
117  ifstrm.read((char*)&m_Kapp,sizeof(double));
118 }
119 
120 
MSTRUCT::MODULES_ELASTICITE
@ MODULES_ELASTICITE
Definition: mstruct_definition.h:65
mstruct_analyse_modules_elasticite.h
MSTRUCT_ANALYSE_MODULES_ELASTICITE::ouvrir
virtual void ouvrir(std::ifstream &ifstrm)
Definition: mstruct_analyse_modules_elasticite.cpp:111
MSTRUCT_ANALYSE_MODULES_ELASTICITE::exporter
void exporter(std::ofstream &ofstrm, long i, bool avec_entete=false, bool avec_graph=false, char *prefix_graph=(char *)"")
Definition: mstruct_analyse_modules_elasticite.cpp:90
MSTRUCT_ANALYSE::enregistrer
virtual void enregistrer(std::ofstream &ofstrm)
Definition: mstruct_analyse.cpp:100
MSTRUCT_ANALYSE_MODULES_ELASTICITE::get_Nuapp
double get_Nuapp(void)
Definition: mstruct_analyse_modules_elasticite.cpp:64
MSTRUCT_ANALYSE_CHAMP::get_moyenne
virtual double * get_moyenne(void)
Definition: mstruct_analyse_champ.cpp:139
MSTRUCT_ANALYSE_MODULES_ELASTICITE::~MSTRUCT_ANALYSE_MODULES_ELASTICITE
~MSTRUCT_ANALYSE_MODULES_ELASTICITE(void)
Definition: mstruct_analyse_modules_elasticite.cpp:50
MSTRUCT_ANALYSE::get_boite_analyse
virtual BOITE_3D * get_boite_analyse(void)
Definition: mstruct_analyse.cpp:85
MSTRUCT_ANALYSE_MODULES_ELASTICITE::executer
virtual void executer(void)
Definition: mstruct_analyse_modules_elasticite.cpp:79
MSTRUCT_ANALYSE_MODULES_ELASTICITE::m_Eapp
double m_Eapp
Definition: mstruct_analyse_modules_elasticite.h:49
MSTRUCT_ANALYSE_MODULES_ELASTICITE::get_Eapp
double get_Eapp(void)
Definition: mstruct_analyse_modules_elasticite.cpp:69
MSTRUCT_ANALYSE
Definition: mstruct_analyse.h:30
MSTRUCT_ANALYSE::get_nom_groupe_forme
virtual std::string get_nom_groupe_forme(void)
Definition: mstruct_analyse.cpp:95
MSTRUCT_ANALYSE_MODULES_ELASTICITE::get_Kapp
double get_Kapp(void)
Definition: mstruct_analyse_modules_elasticite.cpp:54
MSTRUCT_ANALYSE_MODULES_ELASTICITE::m_epsilon_sph
MSTRUCT_ANALYSE_CHAMP * m_epsilon_sph
Definition: mstruct_analyse_modules_elasticite.h:51
mstruct_definition.h
MSTRUCT_ANALYSE_CHAMP
Definition: mstruct_analyse_champ.h:28
MSTRUCT_ANALYSE_MODULES_ELASTICITE::MSTRUCT_ANALYSE_MODULES_ELASTICITE
MSTRUCT_ANALYSE_MODULES_ELASTICITE(void)
Definition: mstruct_analyse_modules_elasticite.cpp:27
ot_boite_3d.h
MSTRUCT_ANALYSE_MODULES_ELASTICITE::m_sigma_dev
MSTRUCT_ANALYSE_CHAMP * m_sigma_dev
Definition: mstruct_analyse_modules_elasticite.h:54
MSTRUCT_ANALYSE::change_boite_analyse
virtual void change_boite_analyse(BOITE_3D boite_3d)
Definition: mstruct_analyse.cpp:79
MSTRUCT_ANALYSE::change_nom_groupe_forme
virtual void change_nom_groupe_forme(std::string nom_groupe_forme)
Definition: mstruct_analyse.cpp:90
MSTRUCT_ANALYSE_MODULES_ELASTICITE::m_sigma_sph
MSTRUCT_ANALYSE_CHAMP * m_sigma_sph
Definition: mstruct_analyse_modules_elasticite.h:52
MSTRUCT_ANALYSE_MODULES_ELASTICITE::get_Gapp
double get_Gapp(void)
Definition: mstruct_analyse_modules_elasticite.cpp:59
MSTRUCT_ANALYSE_MODULES_ELASTICITE::m_Nuapp
double m_Nuapp
Definition: mstruct_analyse_modules_elasticite.h:50
mstruct_analyse_champ.h
MSTRUCT_ANALYSE::ouvrir
virtual void ouvrir(std::ifstream &ifstrm)
Definition: mstruct_analyse.cpp:131
MSTRUCT_ANALYSE_MODULES_ELASTICITE::m_Kapp
double m_Kapp
Definition: mstruct_analyse_modules_elasticite.h:47
MSTRUCT_ANALYSE_MODULES_ELASTICITE::get_type
virtual long get_type(void)
Definition: mstruct_analyse_modules_elasticite.cpp:74
MSTRUCT_ANALYSE_MODULES_ELASTICITE::m_epsilon_dev
MSTRUCT_ANALYSE_CHAMP * m_epsilon_dev
Definition: mstruct_analyse_modules_elasticite.h:53
MSTRUCT_ANALYSE_MODULES_ELASTICITE::enregistrer
virtual void enregistrer(std::ofstream &ofstrm)
Definition: mstruct_analyse_modules_elasticite.cpp:100
MSTRUCT_ANALYSE_MODULES_ELASTICITE::m_Gapp
double m_Gapp
Definition: mstruct_analyse_modules_elasticite.h:48