TrioCFD 1.9.8
TrioCFD documentation
Loading...
Searching...
No Matches
Milieu_Elasticite.h
1/****************************************************************************
2* Copyright (c) 2026, 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 Milieu_Elasticite_included
17#define Milieu_Elasticite_included
18
19#include <Milieu_base.h>
20
21/*! @brief Isotropic small-strain linear elastic medium.
22 *
23 * Stores and updates the material properties used by `Equation_Navier_Cauchy`.
24 *
25 * Primary input fields (uniform or space-dependent):
26 * - ch_E_: Young's modulus \f$E\f$ [Pa]
27 * - ch_nu_: Poisson's ratio \f$\nu\f$ [-]
28 *
29 * Convenience / derived fields:
30 * - ch_lambda_lame_: first Lamé parameter \f$\lambda\f$ [Pa]
31 * - ch_mu_: second Lamé parameter (shear modulus) \f$\mu\f$ [Pa]
32 * - ch_K_: bulk modulus \f$K\f$ [Pa]
33 *
34 * Optional coupling fields:
35 * - ch_coeff_dilatation_th_: linear thermal expansion coefficient \f$\alpha\f$ [1/K]
36 * - ch_rho_lag_: Lagrangian density \f$\rho_\text{lag}\f$ [kg/m^3]
37 */
39{
40 Declare_instanciable(Milieu_Elasticite);
41
42public:
43 void set_param(Param& param) const override;
44 void creer_champs_non_lus() override;
45 void discretiser(const Probleme_base& pb, const Discretisation_base& dis) override;
46 int initialiser(const double temps) override;
47 void mettre_a_jour(double temps) override;
48 bool initTimeStep(double dt) override;
49
50 const Champ_Don_base& young_modulus() const { return ch_E_.valeur(); }
51 Champ_Don_base& young_modulus() { return ch_E_.valeur(); }
52
53 const Champ_Don_base& poisson_ratio() const { return ch_nu_.valeur(); }
54 Champ_Don_base& poisson_ratio() { return ch_nu_.valeur(); }
55
56 const Champ_Don_base& lambda_lame() const { return ch_lambda_lame_.valeur(); }
57 Champ_Don_base& lambda_lame() { return ch_lambda_lame_.valeur(); }
58
59 const Champ_Don_base& mu_lame() const { return ch_mu_.valeur(); }
60 Champ_Don_base& mu_lame() { return ch_mu_.valeur(); }
61
62 const Champ_Don_base& bulk_modulus() const { return ch_K_.valeur(); }
63 Champ_Don_base& bulk_modulus() { return ch_K_.valeur(); }
64
65 const Champ_Don_base& thermal_expansion() const { return ch_coeff_dilatation_th_.valeur(); }
66 Champ_Don_base& thermal_expansion() { return ch_coeff_dilatation_th_.valeur(); }
67
68 void update_fields(double temps, bool);
69
70protected:
71 void verifier_coherence_champs(int& err, Nom& message) override;
72
73private:
74 void ensure_rho_field();
75
76 OWN_PTR(Champ_Inc_base) ch_rho_lag_;
77 OWN_PTR(Champ_Don_base) ch_E_;
78 OWN_PTR(Champ_Don_base) ch_nu_;
79 OWN_PTR(Champ_Don_base) ch_lambda_lame_;
80 OWN_PTR(Champ_Don_base) ch_mu_;
81 OWN_PTR(Champ_Don_base) ch_K_;
82 OWN_PTR(Champ_Don_base) ch_coeff_dilatation_th_;
83
84 OBS_PTR(Equation_base) eq_;
85};
86
87#endif
classe Champ_Don_base classe de base des Champs donnes (non calcules)
Classe Champ_Inc_base.
classe Discretisation_base Cette classe represente un schema de discretisation en espace,...
classe Equation_base Le role d'une equation est le calcul d'un ou plusieurs champs....
Isotropic small-strain linear elastic medium.
const Champ_Don_base & lambda_lame() const
void discretiser(const Probleme_base &pb, const Discretisation_base &dis) override
Champ_Don_base & bulk_modulus()
void set_param(Param &param) const override
Champ_Don_base & mu_lame()
int initialiser(const double temps) override
Champ_Don_base & lambda_lame()
void mettre_a_jour(double temps) override
const Champ_Don_base & young_modulus() const
const Champ_Don_base & bulk_modulus() const
void verifier_coherence_champs(int &err, Nom &message) override
const Champ_Don_base & poisson_ratio() const
const Champ_Don_base & thermal_expansion() const
Champ_Don_base & thermal_expansion()
void creer_champs_non_lus() override
void update_fields(double temps, bool)
bool initTimeStep(double dt) override
Champ_Don_base & poisson_ratio()
const Champ_Don_base & mu_lame() const
Champ_Don_base & young_modulus()
classe Milieu_base Cette classe est la base de la hierarchie des milieux (physiques)
Definition Milieu_base.h:50
class Nom Une chaine de caractere pour nommer les objets de TRUST
Definition Nom.h:31
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.