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-2019 Manav Bhatia
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:
41  const MAST::GeomElem& elem,
43 
44 
45  virtual ~StructuralElement3D();
46 
50  virtual bool inertial_residual (bool request_jacobian,
51  RealVectorX& f,
52  RealMatrixX& jac_xddot,
53  RealMatrixX& jac_xdot,
54  RealMatrixX& jac);
55 
56 
61  virtual bool internal_residual(bool request_jacobian,
62  RealVectorX& f,
63  RealMatrixX& jac);
64 
70  virtual void
72  const unsigned int s,
74  bool request_jacobian,
75  RealVectorX& f,
76  RealMatrixX& jac) {
77  libmesh_assert(false);
78  }
79 
85  bool request_jacobian,
86  RealVectorX& f,
87  RealMatrixX& jac);
88 
92  virtual bool
94  libmesh_assert(false); // to be implemented for 3D elements
95  }
96 
100  virtual bool prestress_residual (bool request_jacobian,
101  RealVectorX& f,
102  RealMatrixX& jac);
103 
104 
108  virtual bool prestress_residual_sensitivity (const MAST::FunctionBase& p,
109  bool request_jacobian,
110  RealVectorX& f,
111  RealMatrixX& jac);
112 
113 
114 
119  virtual bool if_incompatible_modes() const {
120  return false;
121  }
122 
123 
127  virtual unsigned int incompatible_mode_size() const {
128  return 30;
129  }
130 
136  virtual void update_incompatible_mode_solution(const RealVectorX& dsol);
137 
138  virtual void
141  libmesh_error(); // to be implemented
142  }
143 
144  virtual void
146  RealMatrixX& m) {
147  libmesh_error(); // to be implemented
148  }
149 
150  protected:
151 
155  bool surface_pressure_residual(bool request_jacobian,
156  RealVectorX &f,
157  RealMatrixX &jac,
158  const unsigned int side,
160 
164  virtual bool
166  bool request_jacobian,
167  RealVectorX& f,
168  RealMatrixX& jac,
169  const unsigned int side,
171 
172 
176  virtual bool thermal_residual(bool request_jacobian,
177  RealVectorX& f,
178  RealMatrixX& jac,
180 
185  virtual bool thermal_residual_sensitivity(const MAST::FunctionBase& p,
186  bool request_jacobian,
187  RealVectorX& f,
188  RealMatrixX& jac,
190 
196  const unsigned int s,
199  bool request_jacobian,
200  RealVectorX& f,
201  RealMatrixX& jac) {
202 
203  libmesh_assert(false); // to be implemented
204  }
205 
213  virtual bool piston_theory_residual(bool request_jacobian,
214  RealVectorX &f,
215  RealMatrixX& jac_xdot,
216  RealMatrixX& jac,
218  libmesh_error_msg("Invalid Function Call: Piston theory force \
219  is not defined for solid element volume.");
220  }
221 
222 
231  bool request_jacobian,
232  RealVectorX &f,
233  RealMatrixX& jac_xdot,
234  RealMatrixX& jac,
236 
237  libmesh_error_msg("Invalid Function Call: Piston theory force \
238  is not defined for solid element volume.");
239  }
240 
247  virtual bool piston_theory_residual(bool request_jacobian,
248  RealVectorX &f,
249  RealMatrixX& jac_xdot,
250  RealMatrixX& jac,
251  const unsigned int side,
253 
260  virtual bool
262  bool request_jacobian,
263  RealVectorX &f,
264  RealMatrixX& jac_xdot,
265  RealMatrixX& jac,
266  const unsigned int side,
268 
269 
274  virtual bool
276  (bool request_jacobian,
277  ComplexVectorX& f,
278  ComplexMatrixX& jac,
279  const unsigned int side,
281 
282  libmesh_error(); // to be implemented
283  return false;
284  }
285 
286 
287 
292  virtual bool
295  bool request_jacobian,
296  ComplexVectorX& f,
297  ComplexMatrixX& jac,
298  const unsigned int side,
300 
301  libmesh_error(); // to be implemented
302  return false;
303  }
304 
305 
306 
310  virtual bool calculate_stress(bool request_derivative,
311  const MAST::FunctionBase* p,
313 
318  virtual void
321  const unsigned int s,
322  const MAST::FieldFunction<RealVectorX>& vel_f) {
323 
324  libmesh_error(); // to be implemented
325  }
326 
330  void initialize_strain_operator (const unsigned int qp,
331  const MAST::FEBase& fe,
332  FEMOperatorMatrix& Bmat);
333 
338  void initialize_green_lagrange_strain_operator(const unsigned int qp,
339  const MAST::FEBase& fe,
340  const RealVectorX& local_disp,
341  RealVectorX& epsilon,
342  RealMatrixX& mat_x,
343  RealMatrixX& mat_y,
344  RealMatrixX& mat_z,
345  MAST::FEMOperatorMatrix& Bmat_lin,
346  MAST::FEMOperatorMatrix& Bmat_nl_x,
347  MAST::FEMOperatorMatrix& Bmat_nl_y,
348  MAST::FEMOperatorMatrix& Bmat_nl_z,
349  MAST::FEMOperatorMatrix& Bmat_nl_u,
350  MAST::FEMOperatorMatrix& Bmat_nl_v,
351  MAST::FEMOperatorMatrix& Bmat_nl_w);
352 
356  void initialize_incompatible_strain_operator(const unsigned int qp,
357  const MAST::FEBase& fe,
358  FEMOperatorMatrix& Bmat,
359  RealMatrixX& G_mat);
360 
364  void _init_incompatible_fe_mapping( const libMesh::Elem& e);
365 
366 
371 
372  };
373 }
374 
375 #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.
const MAST::GeomElem & elem() const
Definition: elem_base.h:117
Matrix< Complex, Dynamic, 1 > ComplexVectorX
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} .
void initialize_strain_operator(const unsigned int qp, const MAST::FEBase &fe, FEMOperatorMatrix &Bmat)
initialize strain operator matrix
MAST::AssemblyBase & assembly()
Definition: elem_base.h:103
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 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 unsigned int incompatible_mode_size() const
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
StructuralElement3D(MAST::SystemInitialization &sys, MAST::AssemblyBase &assembly, const MAST::GeomElem &elem, const MAST::ElementPropertyCardBase &p)
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 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.