MAST
Multidisciplinary-design Adaptation and Sensitivity Toolkit (MAST)
structural_element_1d.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__structural_element_1d__
21 #define __mast__structural_element_1d__
22 
23 // MAST includes
25 
26 
27 
28 
29 namespace MAST {
30 
31  // Forward declerations
32  class BendingOperator1D;
33  class BoundaryConditionBase;
34  class FEMOperatorMatrix;
35 
36 
39 
40  public:
42  const MAST::GeomElem& elem,
44 
45 
46  virtual ~StructuralElement1D();
47 
48 
53  virtual unsigned int n_direct_strain_components() {
54  return 2;
55  }
56 
60  virtual unsigned int n_von_karman_strain_components() {
61  return 2;
62  }
63 
68  virtual bool internal_residual(bool request_jacobian,
69  RealVectorX& f,
70  RealMatrixX& jac);
71 
77  bool request_jacobian,
78  RealVectorX& f,
79  RealMatrixX& jac);
80 
86  virtual void
88  const unsigned int s,
90  bool request_jacobian,
91  RealVectorX& f,
92  RealMatrixX& jac) {
93  libmesh_assert(false);
94  }
95 
99  virtual bool
101 
106  virtual bool prestress_residual (bool request_jacobian,
107  RealVectorX& f,
108  RealMatrixX& jac);
109 
114  virtual bool prestress_residual_sensitivity (const MAST::FunctionBase& p,
115  bool request_jacobian,
116  RealVectorX& f,
117  RealMatrixX& jac);
118 
123  virtual bool if_incompatible_modes() const {
124  return false;
125  }
126 
132  virtual bool calculate_stress(bool request_derivative,
133  const MAST::FunctionBase* p,
135 
140  virtual void
143  const unsigned int s,
144  const MAST::FieldFunction<RealVectorX>& vel_f) {
145  libmesh_error(); // to be implemented
146  }
147 
148  virtual void
151  libmesh_error(); // to be implemented
152  }
153 
154  virtual void
156  RealMatrixX& m) {
157  libmesh_error(); // to be implemented
158  }
159 
160  protected:
161 
165  virtual bool
166  surface_traction_residual(bool request_jacobian,
167  RealVectorX& f,
168  RealMatrixX& jac,
169  const unsigned int side,
170  MAST::BoundaryConditionBase& bc){ return false;}
171 
172 
177  virtual bool
179  bool request_jacobian,
180  RealVectorX& f,
181  RealMatrixX& jac,
182  const unsigned int side,
184 
185 
190  virtual bool
192  RealVectorX& f,
193  RealMatrixX& jac,
194  const unsigned int side,
196 
201  virtual bool
203  bool request_jacobian,
204  RealVectorX& f,
205  RealMatrixX& jac,
206  const unsigned int side,
208 
209 
210 
214  bool surface_pressure_residual(bool request_jacobian,
215  RealVectorX &f,
216  RealMatrixX &jac,
217  const unsigned int side,
219 
223  virtual bool
225  bool request_jacobian,
226  RealVectorX& f,
227  RealMatrixX& jac,
228  const unsigned int side,
230 
231 
235  virtual bool thermal_residual(bool request_jacobian,
236  RealVectorX& f,
237  RealMatrixX& jac,
239 
244  virtual bool thermal_residual_sensitivity(const MAST::FunctionBase& p,
245  bool request_jacobian,
246  RealVectorX& f,
247  RealMatrixX& jac,
249 
250 
256  const unsigned int s,
259  bool request_jacobian,
260  RealVectorX& f,
261  RealMatrixX& jac) {
262 
263  libmesh_assert(false); // to be implemented
264  }
265 
273  virtual bool piston_theory_residual(bool request_jacobian,
274  RealVectorX &f,
275  RealMatrixX& jac_xdot,
276  RealMatrixX& jac,
278 
279 
287  virtual bool
289  bool request_jacobian,
290  RealVectorX &f,
291  RealMatrixX& jac_xdot,
292  RealMatrixX& jac,
294 
295 
302  virtual bool piston_theory_residual(bool request_jacobian,
303  RealVectorX &f,
304  RealMatrixX& jac_xdot,
305  RealMatrixX& jac,
306  const unsigned int side,
308 
309  libmesh_error_msg("Invalid Function Call: Piston theory force \
310  is not defined for 1D element side.");
311  }
312 
313 
321  bool request_jacobian,
322  RealVectorX &f,
323  RealMatrixX& jac_xdot,
324  RealMatrixX& jac,
325  const unsigned int side,
327 
328  libmesh_error_msg("Invalid Function Call: Piston theory force sensitivity \
329  is not defined for 1D element side.");
330  }
331 
332 
337  virtual bool
339  (bool request_jacobian,
340  ComplexVectorX& f,
341  ComplexMatrixX& jac,
342  const unsigned int side,
344 
345  libmesh_error(); // to be implemented
346  }
347 
348 
349 
354  virtual bool
357  bool request_jacobian,
358  ComplexVectorX& f,
359  ComplexMatrixX& jac,
360  const unsigned int side,
362 
363  libmesh_error(); // to be implemented
364  }
365 
366 
370  virtual void initialize_direct_strain_operator(const unsigned int qp,
371  const MAST::FEBase& fe,
373 
380  virtual void
381  initialize_von_karman_strain_operator(const unsigned int qp,
382  const MAST::FEBase& fe,
383  RealVectorX& vk_strain,
384  RealMatrixX& vk_dvdxi_mat,
385  RealMatrixX& vk_dwdxi_mat,
386  MAST::FEMOperatorMatrix& Bmat_v_vk,
387  MAST::FEMOperatorMatrix& Bmat_w_vk);
388 
394  void
396  (const unsigned int qp,
397  const MAST::FEBase& fe,
398  RealMatrixX& vk_dvdxi_mat_sens,
399  RealMatrixX& vk_dwdxi_mat_sens);
400 
401 
407  virtual void _internal_residual_operation(bool if_vk,
408  const unsigned int n2,
409  const unsigned int qp,
410  const MAST::FEBase& fe,
411  const std::vector<Real>& JxW,
412  bool request_jacobian,
413  RealVectorX& local_f,
414  RealMatrixX& local_jac,
415  MAST::BendingOperator1D* bend_op,
416  MAST::FEMOperatorMatrix& Bmat_mem,
417  MAST::FEMOperatorMatrix& Bmat_bend_v,
418  MAST::FEMOperatorMatrix& Bmat_bend_w,
419  MAST::FEMOperatorMatrix& Bmat_v_vk,
420  MAST::FEMOperatorMatrix& Bmat_w_vk,
421  RealMatrixX& stress,
422  RealMatrixX& stress_l,
423  RealMatrixX& vk_dvdxi_mat,
424  RealMatrixX& vk_dwdxi_mat,
425  RealMatrixX& material_A_mat,
426  RealMatrixX& material_B_mat,
427  RealMatrixX& material_D_mat,
428  RealVectorX& vec1_n1,
429  RealVectorX& vec2_n1,
430  RealVectorX& vec3_n2,
431  RealVectorX& vec4_2,
432  RealVectorX& vec5_2,
433  RealMatrixX& mat1_n1n2,
434  RealMatrixX& mat2_n2n2,
435  RealMatrixX& mat3,
436  RealMatrixX& mat4_2n2);
437 
438 
439 
444  RealVectorX& vec) const;
445 
450  RealVectorX& vec) const;
451 
452  };
453 }
454 
455 
456 #endif // __mast__structural_element_1d__
virtual void initialize_direct_strain_operator(const unsigned int qp, const MAST::FEBase &fe, MAST::FEMOperatorMatrix &Bmat)
initialize membrane strain operator matrix
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 unsigned int n_direct_strain_components()
row dimension of the direct strain matrix, also used for the bending operator row dimension ...
Data structure provides the mechanism to store stress and strain output from a structural analysis...
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 bool prestress_residual(bool request_jacobian, RealVectorX &f, RealMatrixX &jac)
Calculates the internal force vector and Jacobian due to strain energy coming from a prestress...
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 sensitivity of force vector and Jacobian due to piston-theory based surface pressure o...
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...
Matrix< Complex, Dynamic, 1 > ComplexVectorX
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 thermal_residual_sensitivity(const MAST::FunctionBase &p, bool request_jacobian, RealVectorX &f, RealMatrixX &jac, MAST::BoundaryConditionBase &bc)
Calculates the sensitivity of force vector and the Jacobian due to thermal stresses.
virtual void _internal_residual_operation(bool if_vk, const unsigned int n2, const unsigned int qp, const MAST::FEBase &fe, const std::vector< Real > &JxW, bool request_jacobian, RealVectorX &local_f, RealMatrixX &local_jac, MAST::BendingOperator1D *bend_op, MAST::FEMOperatorMatrix &Bmat_mem, MAST::FEMOperatorMatrix &Bmat_bend_v, MAST::FEMOperatorMatrix &Bmat_bend_w, MAST::FEMOperatorMatrix &Bmat_v_vk, MAST::FEMOperatorMatrix &Bmat_w_vk, RealMatrixX &stress, RealMatrixX &stress_l, RealMatrixX &vk_dvdxi_mat, RealMatrixX &vk_dwdxi_mat, RealMatrixX &material_A_mat, RealMatrixX &material_B_mat, RealMatrixX &material_D_mat, RealVectorX &vec1_n1, RealVectorX &vec2_n1, RealVectorX &vec3_n2, RealVectorX &vec4_2, RealVectorX &vec5_2, RealMatrixX &mat1_n1n2, RealMatrixX &mat2_n2n2, RealMatrixX &mat3, RealMatrixX &mat4_2n2)
performs integration at the quadrature point for the provided matrices.
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 void calculate_stress_temperature_derivative(MAST::FEBase &fe_thermal, MAST::StressStrainOutputBase &output)
void initialize_von_karman_strain_operator_sensitivity(const unsigned int qp, const MAST::FEBase &fe, RealMatrixX &vk_dvdxi_mat_sens, RealMatrixX &vk_dwdxi_mat_sens)
initialze the sensitivity of von Karman operator matrices needed for Jacobian calculation.
virtual bool internal_residual_jac_dot_state_sensitivity(RealMatrixX &jac)
calculates d[J]/d{x} .
virtual bool if_incompatible_modes() const
Matrix< Real, Dynamic, Dynamic > RealMatrixX
Matrix< Complex, Dynamic, Dynamic > ComplexMatrixX
virtual bool piston_theory_residual_sensitivity(const MAST::FunctionBase &p, bool request_jacobian, RealVectorX &f, RealMatrixX &jac_xdot, RealMatrixX &jac, const unsigned int side, MAST::BoundaryConditionBase &bc)
Calculates the force vector and Jacobian due to piston-theory sensitivity based surface pressure on t...
Bending strain operator for 1D element.
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 prestress_residual_sensitivity(const MAST::FunctionBase &p, bool request_jacobian, RealVectorX &f, RealMatrixX &jac)
Calculates the internal force vector and Jacobian due to strain energy coming from a prestress...
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...
Matrix< Real, Dynamic, 1 > RealVectorX
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.
virtual void thermal_residual_temperature_derivative(const MAST::FEBase &fe_thermal, RealMatrixX &m)
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 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: .
This class acts as a wrapper around libMesh::Elem for the purpose of providing a uniform interface fo...
Definition: geom_elem.h:59
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:109
virtual bool piston_theory_residual(bool request_jacobian, RealVectorX &f, RealMatrixX &jac_xdot, RealMatrixX &jac, const unsigned int side, MAST::BoundaryConditionBase &bc)
Calculates the force vector and Jacobian due to piston-theory based surface pressure on the side iden...
virtual unsigned int n_von_karman_strain_components()
row dimension of the von Karman strain matrix
virtual bool thermal_residual(bool request_jacobian, RealVectorX &f, RealMatrixX &jac, MAST::BoundaryConditionBase &bc)
Calculates the force vector and Jacobian due to thermal stresses.
virtual bool calculate_stress(bool request_derivative, const MAST::FunctionBase *p, MAST::StressStrainOutputBase &output)
Calculates the stress tensor.
virtual void initialize_von_karman_strain_operator(const unsigned int qp, const MAST::FEBase &fe, RealVectorX &vk_strain, RealMatrixX &vk_dvdxi_mat, RealMatrixX &vk_dwdxi_mat, MAST::FEMOperatorMatrix &Bmat_v_vk, MAST::FEMOperatorMatrix &Bmat_w_vk)
initialze the von Karman strain in vK_strain, the operator matrices needed for Jacobian calculation...
virtual bool internal_residual_sensitivity(const MAST::FunctionBase &p, bool request_jacobian, RealVectorX &f, RealMatrixX &jac)
Calculates the sensitivity internal force 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.
StructuralElement1D(MAST::SystemInitialization &sys, const MAST::GeomElem &elem, const MAST::ElementPropertyCardBase &p)
void _convert_prestress_B_mat_to_vector(const RealMatrixX &mat, RealVectorX &vec) const
converts the prestress stress tensor to a vector representation
virtual bool internal_residual(bool request_jacobian, RealVectorX &f, RealMatrixX &jac)
Calculates the internal force vector and Jacobian due to strain energy.
void _convert_prestress_A_mat_to_vector(const RealMatrixX &mat, RealVectorX &vec) const
converts the prestress stress tensor to a vector representation