MAST
Multidisciplinary-design Adaptation and Sensitivity Toolkit (MAST)
solid_element_3d.h
Go to the documentation of this file.
1 /*
2  * MAST: Multidisciplinary-design Adaptation and Sensitivity Toolkit
3  * Copyright (C) 2013-2020 Manav Bhatia and MAST authors
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
18  */
19 
20 #ifndef __mast__solid_element_3d__
21 #define __mast__solid_element_3d__
22 
25 
26 // Forward declerations
27 class FEMOperatorMatrix;
28 
29 namespace MAST {
30 
31  // Forward declerations
32  class BoundaryConditionBase;
33 
34 
37 
38  public:
40  const MAST::GeomElem& elem,
42 
43 
44  virtual ~StructuralElement3D();
45 
49  virtual bool inertial_residual (bool request_jacobian,
50  RealVectorX& f,
51  RealMatrixX& jac_xddot,
52  RealMatrixX& jac_xdot,
53  RealMatrixX& jac);
54 
55 
60  virtual bool internal_residual(bool request_jacobian,
61  RealVectorX& f,
62  RealMatrixX& jac);
63 
69  virtual void
71  const unsigned int s,
73  bool request_jacobian,
74  RealVectorX& f,
75  RealMatrixX& jac) {
76  libmesh_assert(false);
77  }
78 
84  bool request_jacobian,
85  RealVectorX& f,
86  RealMatrixX& jac);
87 
91  virtual bool
93  libmesh_assert(false); // to be implemented for 3D elements
94  }
95 
99  virtual bool prestress_residual (bool request_jacobian,
100  RealVectorX& f,
101  RealMatrixX& jac);
102 
103 
107  virtual bool prestress_residual_sensitivity (const MAST::FunctionBase& p,
108  bool request_jacobian,
109  RealVectorX& f,
110  RealMatrixX& jac);
111 
112 
113 
118  virtual bool if_incompatible_modes() const {
119  return false;
120  }
121 
122 
126  virtual unsigned int incompatible_mode_size() const {
127  return 30;
128  }
129 
135  virtual void update_incompatible_mode_solution(const RealVectorX& dsol);
136 
137  virtual void
140  libmesh_error(); // to be implemented
141  }
142 
143  virtual void
145  RealMatrixX& m) {
146  libmesh_error(); // to be implemented
147  }
148 
149  protected:
150 
154  virtual bool
155  surface_traction_residual(bool request_jacobian,
156  RealVectorX& f,
157  RealMatrixX& jac,
158  const unsigned int side,
160 
161 
166  virtual bool
168  bool request_jacobian,
169  RealVectorX& f,
170  RealMatrixX& jac,
171  const unsigned int side,
173 
174 
179  virtual bool
181  RealVectorX& f,
182  RealMatrixX& jac,
183  const unsigned int side,
185 
190  virtual bool
192  bool request_jacobian,
193  RealVectorX& f,
194  RealMatrixX& jac,
195  const unsigned int side,
197 
198 
199 
203  bool surface_pressure_residual(bool request_jacobian,
204  RealVectorX &f,
205  RealMatrixX &jac,
206  const unsigned int side,
208 
212  virtual bool
214  bool request_jacobian,
215  RealVectorX& f,
216  RealMatrixX& jac,
217  const unsigned int side,
219 
220 
224  virtual bool thermal_residual(bool request_jacobian,
225  RealVectorX& f,
226  RealMatrixX& jac,
228 
233  virtual bool thermal_residual_sensitivity(const MAST::FunctionBase& p,
234  bool request_jacobian,
235  RealVectorX& f,
236  RealMatrixX& jac,
238 
244  const unsigned int s,
247  bool request_jacobian,
248  RealVectorX& f,
249  RealMatrixX& jac) {
250 
251  libmesh_assert(false); // to be implemented
252  }
253 
261  virtual bool piston_theory_residual(bool request_jacobian,
262  RealVectorX &f,
263  RealMatrixX& jac_xdot,
264  RealMatrixX& jac,
266  libmesh_error_msg("Invalid Function Call: Piston theory force \
267  is not defined for solid element volume.");
268  }
269 
270 
279  bool request_jacobian,
280  RealVectorX &f,
281  RealMatrixX& jac_xdot,
282  RealMatrixX& jac,
284 
285  libmesh_error_msg("Invalid Function Call: Piston theory force \
286  is not defined for solid element volume.");
287  }
288 
295  virtual bool piston_theory_residual(bool request_jacobian,
296  RealVectorX &f,
297  RealMatrixX& jac_xdot,
298  RealMatrixX& jac,
299  const unsigned int side,
301 
308  virtual bool
310  bool request_jacobian,
311  RealVectorX &f,
312  RealMatrixX& jac_xdot,
313  RealMatrixX& jac,
314  const unsigned int side,
316 
317 
322  virtual bool
324  (bool request_jacobian,
325  ComplexVectorX& f,
326  ComplexMatrixX& jac,
327  const unsigned int side,
329 
330  libmesh_error(); // to be implemented
331  return false;
332  }
333 
334 
335 
340  virtual bool
343  bool request_jacobian,
344  ComplexVectorX& f,
345  ComplexMatrixX& jac,
346  const unsigned int side,
348 
349  libmesh_error(); // to be implemented
350  return false;
351  }
352 
353 
354 
358  virtual bool calculate_stress(bool request_derivative,
359  const MAST::FunctionBase* p,
361 
366  virtual void
369  const unsigned int s,
370  const MAST::FieldFunction<RealVectorX>& vel_f) {
371 
372  libmesh_error(); // to be implemented
373  }
374 
378  void initialize_strain_operator (const unsigned int qp,
379  const MAST::FEBase& fe,
380  FEMOperatorMatrix& Bmat);
381 
386  void initialize_green_lagrange_strain_operator(const unsigned int qp,
387  const MAST::FEBase& fe,
388  const RealVectorX& local_disp,
389  RealVectorX& epsilon,
390  RealMatrixX& mat_x,
391  RealMatrixX& mat_y,
392  RealMatrixX& mat_z,
393  MAST::FEMOperatorMatrix& Bmat_lin,
394  MAST::FEMOperatorMatrix& Bmat_nl_x,
395  MAST::FEMOperatorMatrix& Bmat_nl_y,
396  MAST::FEMOperatorMatrix& Bmat_nl_z,
397  MAST::FEMOperatorMatrix& Bmat_nl_u,
398  MAST::FEMOperatorMatrix& Bmat_nl_v,
399  MAST::FEMOperatorMatrix& Bmat_nl_w);
400 
404  void initialize_incompatible_strain_operator(const unsigned int qp,
405  const MAST::FEBase& fe,
406  FEMOperatorMatrix& Bmat,
407  RealMatrixX& G_mat);
408 
412  void _init_incompatible_fe_mapping( const libMesh::Elem& e);
413 
414 
419 
420  };
421 }
422 
423 #endif // __mast__solid_element_3d__
virtual void thermal_residual_boundary_velocity(const MAST::FunctionBase &p, const unsigned int s, const MAST::FieldFunction< RealVectorX > &vel_f, MAST::BoundaryConditionBase &bc, bool request_jacobian, RealVectorX &f, RealMatrixX &jac)
Calculates the sensitivity of force vector and Jacobian due to thermal stresses.
Data structure provides the mechanism to store stress and strain output from a structural analysis...
RealMatrixX _T0_inv_tr
Jacobian matrix at element center needed for incompatible modes.
virtual bool linearized_frequency_domain_surface_pressure_residual_sensitivity(const MAST::FunctionBase &p, bool request_jacobian, ComplexVectorX &f, ComplexMatrixX &jac, const unsigned int side, MAST::BoundaryConditionBase &bc)
Calculates the sensitivity of force vector and Jacobian due to small is applicable for perturbation s...
virtual bool if_incompatible_modes() const
virtual bool calculate_stress(bool request_derivative, const MAST::FunctionBase *p, MAST::StressStrainOutputBase &output)
Calculates the stress tensor.
virtual bool inertial_residual(bool request_jacobian, RealVectorX &f, RealMatrixX &jac_xddot, RealMatrixX &jac_xdot, RealMatrixX &jac)
Calculates the inertial force and the Jacobian matrices.
virtual bool internal_residual_sensitivity(const MAST::FunctionBase &p, bool request_jacobian, RealVectorX &f, RealMatrixX &jac)
Calculates the sensitivity of internal residual vector and Jacobian due to strain energy...
virtual bool linearized_frequency_domain_surface_pressure_residual(bool request_jacobian, ComplexVectorX &f, ComplexMatrixX &jac, const unsigned int side, MAST::BoundaryConditionBase &bc)
Calculates the force vector and Jacobian due to small perturbation surface pressure.
virtual bool surface_pressure_residual_sensitivity(const MAST::FunctionBase &p, bool request_jacobian, RealVectorX &f, RealMatrixX &jac, const unsigned int side, MAST::BoundaryConditionBase &bc)
Calculates the force vector and Jacobian due to surface pressure.
Matrix< Complex, Dynamic, 1 > ComplexVectorX
virtual bool surface_traction_residual_sensitivity(const MAST::FunctionBase &p, bool request_jacobian, RealVectorX &f, RealMatrixX &jac, const unsigned int side, MAST::BoundaryConditionBase &bc)
Calculates the sensitivity of element vector and matrix quantities for surface traction boundary cond...
virtual bool piston_theory_residual_sensitivity(const MAST::FunctionBase &p, bool request_jacobian, RealVectorX &f, RealMatrixX &jac_xdot, RealMatrixX &jac, MAST::BoundaryConditionBase &bc)
Calculates the force vector and Jacobian sensitivity due to piston-theory based surface pressure on t...
virtual bool internal_residual_jac_dot_state_sensitivity(RealMatrixX &jac)
calculates d[J]/d{x} .
virtual unsigned int incompatible_mode_size() const
StructuralElement3D(MAST::SystemInitialization &sys, const MAST::GeomElem &elem, const MAST::ElementPropertyCardBase &p)
void initialize_strain_operator(const unsigned int qp, const MAST::FEBase &fe, FEMOperatorMatrix &Bmat)
initialize strain operator matrix
void _init_incompatible_fe_mapping(const libMesh::Elem &e)
initialize the Jacobian needed for incompatible modes
void initialize_incompatible_strain_operator(const unsigned int qp, const MAST::FEBase &fe, FEMOperatorMatrix &Bmat, RealMatrixX &G_mat)
initialize incompatible strain operator
virtual bool piston_theory_residual(bool request_jacobian, RealVectorX &f, RealMatrixX &jac_xdot, RealMatrixX &jac, MAST::BoundaryConditionBase &bc)
Calculates the force vector and Jacobian due to piston-theory based surface pressure on the entire el...
virtual bool surface_traction_residual_shifted_boundary(bool request_jacobian, RealVectorX &f, RealMatrixX &jac, const unsigned int side, MAST::BoundaryConditionBase &bc)
Calculates the sensitivity of force vector and Jacobian due to surface traction and sensitiity due to...
virtual void calculate_stress_boundary_velocity(const MAST::FunctionBase &p, MAST::StressStrainOutputBase &output, const unsigned int s, const MAST::FieldFunction< RealVectorX > &vel_f)
Calculates the boundary velocity term contributions to the sensitivity of stress at the specified bou...
virtual bool thermal_residual_sensitivity(const MAST::FunctionBase &p, bool request_jacobian, RealVectorX &f, RealMatrixX &jac, MAST::BoundaryConditionBase &bc)
Calculates the sensitivity of residual vector and Jacobian due to thermal stresses.
Matrix< Real, Dynamic, Dynamic > RealMatrixX
Matrix< Complex, Dynamic, Dynamic > ComplexMatrixX
virtual void internal_residual_boundary_velocity(const MAST::FunctionBase &p, const unsigned int s, const MAST::FieldFunction< RealVectorX > &vel_f, bool request_jacobian, RealVectorX &f, RealMatrixX &jac)
calculates the term on side s: .
virtual bool internal_residual(bool request_jacobian, RealVectorX &f, RealMatrixX &jac)
Calculates the internal residual vector and Jacobian due to strain energy.
bool surface_pressure_residual(bool request_jacobian, RealVectorX &f, RealMatrixX &jac, const unsigned int side, MAST::BoundaryConditionBase &bc)
Calculates the force vector and Jacobian due to surface pressure.
virtual bool thermal_residual(bool request_jacobian, RealVectorX &f, RealMatrixX &jac, MAST::BoundaryConditionBase &bc)
Calculates the residual vector and Jacobian due to thermal stresses.
Matrix< Real, Dynamic, 1 > RealVectorX
virtual bool prestress_residual(bool request_jacobian, RealVectorX &f, RealMatrixX &jac)
Calculates the prestress residual vector and Jacobian.
This class acts as a wrapper around libMesh::Elem for the purpose of providing a uniform interface fo...
Definition: geom_elem.h:59
void initialize_green_lagrange_strain_operator(const unsigned int qp, const MAST::FEBase &fe, const RealVectorX &local_disp, RealVectorX &epsilon, RealMatrixX &mat_x, RealMatrixX &mat_y, RealMatrixX &mat_z, MAST::FEMOperatorMatrix &Bmat_lin, MAST::FEMOperatorMatrix &Bmat_nl_x, MAST::FEMOperatorMatrix &Bmat_nl_y, MAST::FEMOperatorMatrix &Bmat_nl_z, MAST::FEMOperatorMatrix &Bmat_nl_u, MAST::FEMOperatorMatrix &Bmat_nl_v, MAST::FEMOperatorMatrix &Bmat_nl_w)
initialize the strain operator matrices for the Green-Lagrange strain matrices
const MAST::GeomElem & elem() const
Definition: elem_base.h:109
virtual void thermal_residual_temperature_derivative(const MAST::FEBase &fe_thermal, RealMatrixX &m)
virtual void calculate_stress_temperature_derivative(MAST::FEBase &fe_thermal, MAST::StressStrainOutputBase &output)
virtual bool surface_traction_residual_shifted_boundary_sensitivity(const MAST::FunctionBase &p, bool request_jacobian, RealVectorX &f, RealMatrixX &jac, const unsigned int side, MAST::BoundaryConditionBase &bc)
Calculates the sensitivity of force vector and Jacobian due to surface traction and sensitiity due to...
virtual bool surface_traction_residual(bool request_jacobian, RealVectorX &f, RealMatrixX &jac, const unsigned int side, MAST::BoundaryConditionBase &bc)
Calculates the force vector and Jacobian due to surface traction.
virtual void update_incompatible_mode_solution(const RealVectorX &dsol)
updates the incompatible solution for this element.
virtual bool prestress_residual_sensitivity(const MAST::FunctionBase &p, bool request_jacobian, RealVectorX &f, RealMatrixX &jac)
Calculates the sensitivity prestress residual vector and Jacobian.