b2api
B2000++ API Reference Manual, VERSION 4.6
 
Loading...
Searching...
No Matches
b2material_stress_2d_mesh_deform.H
1//------------------------------------------------------------------------
2// b2material_stress_2d_mesh_deform.H --
3//
4// Material used for 2D Mesh Deformation (Aero-Elasticity).
5//
6// written by Thomas Ludwig
7// Neda Ebrahimi Pour <neda.ebrahimipour@dlr.de>
8//
9// (c) 2009-2012,2016 SMR Engineering & Development SA
10// 2502 Bienne, Switzerland
11//
12// (c) 2023 Deutsches Zentrum für Luft- und Raumfahrt (DLR) e.V.
13// Linder Höhe, 51147 Köln
14//
15// All Rights Reserved. Proprietary source code. The contents of
16// this file may not be disclosed to third parties, copied or
17// duplicated in any form, in whole or in part, without the prior
18// written permission of SMR.
19//------------------------------------------------------------------------
20
21#ifndef B2MATERIAL_STRESS_2D_MESH_DEFORM_H_
22#define B2MATERIAL_STRESS_2D_MESH_DEFORM_H_
23
24#include "elements/properties/b2solid_mechanics.H"
26
27namespace b2000 {
28
29class MaterialStress2DMeshDeform : public SolidMechanics2D<double> {
30public:
31 void get_stress(
32 Model* model, const bool linear, const EquilibriumSolution equilibrium_solution,
33 const double time, const double delta_time, GradientContainer* gradient_container,
34 SolverHints* solver_hints, const Element* element, const double el_coordinates[2],
35 const b2linalg::Vector<double, b2linalg::Vdense_constref> nodes_interpolation,
36 const int layer_id, const double bg_coordinates[3], const double covariant_base[2][2],
37 const bool use_covariant_base, const double volume,
38 const double displacement_gradient[2][2], const double strain[3],
39 const double strain_dot[3], const double velocity[2], const double acceleration[2],
40 double stress[3], double d_stress_d_strain[6], double d_stress_d_strain_dot[6],
41 double d_stress_d_time[3], double inertia_force[2], double& density);
42
43 inline void s_eq_c_mul_e(double s[3], const double c[6], const double e[3]) {
44 const int ind[3][3] = {{0, 1, 2}, {1, 3, 4}, {2, 4, 5}};
45 for (int i = 0; i < 3; ++i) {
46 double value = 0.0;
47
48 const int* iind = ind[i];
49 for (int j = 0; j < 3; ++j) { value += c[iind[j]] * e[j]; }
50 s[i] = value;
51 }
52 }
53
54 // Transform the 2nd Piola-Kirchhoff stress to the Cauchy
55 // stress. The stresses are in the Voight notation [sxx, syy,
56 // sxy].
57 static inline void piola_2_stress_to_cauchy_stress(
58 const double F[2][2], // Deformation gradient, column-major.
59 const double S[3], // 2nd Piola-Kirchhoff stress (Voight not.).
60 double T[3] // Cauchy stress (Voight notation).
61 ) {
62 const double f00 = F[0][0];
63 const double f01 = F[0][1];
64 const double f10 = F[1][0];
65 const double f11 = F[1][1];
66
67 // Get the determinant of the deformation gradient tensor..
68 const double det = determinant_2_2(F);
69 const double det_inv = 1.0 / det;
70
71 T[0] = f00 * f00 * S[0] + f10 * f10 * S[1] + 2 * f00 * f10 * S[2];
72
73 T[1] = f01 * f01 * S[0] + f11 * f11 * S[1] + 2 * f01 * f11 * S[2];
74
75 T[2] = f00 * f01 * S[0] + f10 * f11 * S[1] + (f00 * f11 + f10 * f01) * S[2];
76
77 for (int i = 0; i < 3; ++i) { T[i] *= det_inv; }
78 }
79
80public:
81 double mat_e;
82 double mat_p;
83 double mat_density;
84};
85
86} // namespace b2000
87
88#endif // B2_MATERIAL_STRESS_2D_MESH_DEFORM_H_
virtual LinearType linear(const int layer_id=-1) const
Definition b2solid_mechanics.H:573
Contains the base classes for implementing Finite Elements.
Definition b2boundary_condition.H:32
T determinant_2_2(const T a[2][2])
Definition b2tensor_calculus.H:683