MAST
Multidisciplinary-design Adaptation and Sensitivity Toolkit (MAST)
solid_2d_section_element_property_card.cpp
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 // MAST includes
24 #include "base/elem_base.h"
25 
26 
27 namespace MAST {
28  namespace Solid2DSectionProperty {
29 
31  public MAST::FieldFunction<RealMatrixX> {
32  public:
34  const MAST::FieldFunction<Real>& h);
35 
37 
38  virtual void operator() (const libMesh::Point& p,
39  const Real t,
40  RealMatrixX& m) const;
41 
42  virtual void derivative ( const MAST::FunctionBase& f,
43  const libMesh::Point& p,
44  const Real t,
45  RealMatrixX& m) const;
46 
47  protected:
48 
51  };
52 
53 
54 
56  public MAST::FieldFunction<RealMatrixX> {
57  public:
60  const MAST::FieldFunction<Real>& off);
61 
63 
64 
65  virtual void operator() (const libMesh::Point& p,
66  const Real t,
67  RealMatrixX& m) const;
68 
69  virtual void derivative ( const MAST::FunctionBase& f,
70  const libMesh::Point& p,
71  const Real t,
72  RealMatrixX& m) const;
73 
74  protected:
75 
78  };
79 
80 
81  class BendingStiffnessMatrix: public MAST::FieldFunction<RealMatrixX> {
82  public:
85  const MAST::FieldFunction<Real>& off);
86 
87 
89 
90  virtual void operator() (const libMesh::Point& p,
91  const Real t,
92  RealMatrixX& m) const;
93 
94  virtual void derivative ( const MAST::FunctionBase& f,
95  const libMesh::Point& p,
96  const Real t,
97  RealMatrixX& m) const;
98 
99  protected:
100 
103  };
104 
105 
106 
107 
108  class TransverseStiffnessMatrix: public MAST::FieldFunction<RealMatrixX> {
109  public:
111  const MAST::FieldFunction<Real>& h,
112  const MAST::FieldFunction<Real>& kappa):
113  MAST::FieldFunction<RealMatrixX>("TransverseStiffnessMatrix2D"),
114  _material_stiffness(mat),
115  _h(h), _kappa(kappa) {
116  _functions.insert(&mat);
117  _functions.insert(&h);
118  _functions.insert(&kappa);
119  }
120 
121 
123 
124  virtual void operator() (const libMesh::Point& p,
125  const Real t,
126  RealMatrixX& m) const {
127  Real h, kappa;
128  _h(p, t, h);
129  _kappa(p, t, kappa);
130  _material_stiffness(p, t, m);
131  //m = m*h*kappa;
132  m *= h;
133  m *= kappa;
134  }
135 
136  virtual void derivative ( const MAST::FunctionBase& f,
137  const libMesh::Point& p,
138  const Real t,
139  RealMatrixX& m) const {
140  RealMatrixX dm;
141  Real h, dh, kappa, dkappa;
142  _h(p, t, h); _h.derivative(f, p, t, dh);
143  _kappa(p, t, kappa); _kappa.derivative(f, p, t, dkappa);
144  _material_stiffness(p, t, m); _material_stiffness.derivative( f, p, t, dm);
145 
146  // dm = dm*h*kappa + m*dh*kappa + m*h*dkappa
147  m *= (dh*kappa + h*dkappa);
148  m += dm*h*kappa;
149  }
150 
151  protected:
152 
156  };
157 
158 
159  class InertiaMatrix: public MAST::FieldFunction<RealMatrixX> {
160  public:
162  const MAST::FieldFunction<Real>& h,
163  const MAST::FieldFunction<Real>& off);
164 
165 
166  virtual ~InertiaMatrix() { }
167 
168 
169  virtual void operator() (const libMesh::Point& p,
170  const Real t,
171  RealMatrixX& m) const;
172 
173  virtual void derivative ( const MAST::FunctionBase& f,
174  const libMesh::Point& p,
175  const Real t,
176  RealMatrixX& m) const;
177 
178  protected:
179 
181  };
182 
183 
184 
185  class ThermalExpansionAMatrix: public MAST::FieldFunction<RealMatrixX> {
186  public:
188  const MAST::FieldFunction<RealMatrixX>& mat_expansion,
189  const MAST::FieldFunction<Real>& h);
190 
191 
193 
194 
195 
196  virtual void operator() (const libMesh::Point& p,
197  const Real t,
198  RealMatrixX& m) const;
199 
200 
201  virtual void derivative ( const MAST::FunctionBase& f,
202  const libMesh::Point& p,
203  const Real t,
204  RealMatrixX& m) const;
205 
206  protected:
207 
211  };
212 
213 
214 
215  class ThermalExpansionBMatrix: public MAST::FieldFunction<RealMatrixX> {
216  public:
218  const MAST::FieldFunction<RealMatrixX>& mat_expansion,
219  const MAST::FieldFunction<Real>& h,
220  const MAST::FieldFunction<Real>& off);
221 
222 
224 
225 
226  virtual void operator() (const libMesh::Point& p,
227  const Real t,
228  RealMatrixX& m) const;
229 
230 
231  virtual void derivative ( const MAST::FunctionBase& f,
232  const libMesh::Point& p,
233  const Real t,
234  RealMatrixX& m) const;
235 
236 
237  protected:
238 
242  };
243 
244 
245 
246 
248  public MAST::FieldFunction<RealMatrixX> {
249  public:
252  const MAST::FieldFunction<Real>& h);
253 
254 
255  virtual ~PrestressAMatrix() { }
256 
257  virtual void operator() (const libMesh::Point& p,
258  const Real t,
259  RealMatrixX& m) const;
260 
261  virtual void derivative ( const MAST::FunctionBase& f,
262  const libMesh::Point& p,
263  const Real t,
264  RealMatrixX& m) const;
265 
266  //virtual void convert_to_vector(const RealMatrixX& m, DenseRealVector& v) const;
267 
268  protected:
269 
272  };
273 
274 
275 
277  public MAST::FieldFunction<RealMatrixX> {
278  public:
281  const MAST::FieldFunction<Real>& h,
282  const MAST::FieldFunction<Real>& off);
283 
284 
285  virtual ~PrestressBMatrix() { }
286 
287  virtual void operator() (const libMesh::Point& p,
288  const Real t,
289  RealMatrixX& m) const;
290 
291  virtual void derivative ( const MAST::FunctionBase& f,
292  const libMesh::Point& p,
293  const Real t,
294  RealMatrixX& m) const;
295 
296  //virtual void convert_to_vector(const RealMatrixX& m, DenseRealVector& v) const;
297 
298  protected:
299 
302  };
303 
304 
306  public MAST::FieldFunction<RealMatrixX> {
307 
308  public:
309 
311  const MAST::FieldFunction<Real>& h);
312 
313 
314  virtual ~ThermalConductanceMatrix();
315 
316  virtual void operator() (const libMesh::Point& p,
317  const Real t,
318  RealMatrixX& m) const;
319 
320 
321 
322  virtual void derivative ( const MAST::FunctionBase& f,
323  const libMesh::Point& p,
324  const Real t,
325  RealMatrixX& m) const;
326 
327  protected:
328 
330 
332  };
333 
334 
335 
336 
338  public MAST::FieldFunction<RealMatrixX> {
339 
340  public:
341 
343  const MAST::FieldFunction<Real>& h);
344 
345 
346  virtual ~ThermalCapacitanceMatrix();
347 
348  virtual void operator() (const libMesh::Point& p,
349  const Real t,
350  RealMatrixX& m) const;
351 
352 
353 
354  virtual void derivative ( const MAST::FunctionBase& f,
355  const libMesh::Point& p,
356  const Real t,
357  RealMatrixX& m) const;
358 
359  protected:
360 
362 
364  };
365  }
366 }
367 
368 
369 
370 
371 bool
373 
374  return _material->depends_on(f) || // check if the material property depends on the function
375  MAST::ElementPropertyCardBase::depends_on(f); // check with this property card
376 }
377 
378 
379 
380 
383  const MAST::FieldFunction<Real>& h):
384 MAST::FieldFunction<RealMatrixX> ("ExtensionStiffnessMatrix2D"),
386 _h(h) {
387  _functions.insert(&mat);
388  _functions.insert(&h);
389 }
390 
391 
392 
393 void
396  const Real t,
397  RealMatrixX& m) const {
398  // [C]*h
399  Real h;
400  _h(p, t, h);
401  _material_stiffness(p, t, m);
402  m *= h;
403 }
404 
405 
406 
407 
408 void
411  const libMesh::Point& p,
412  const Real t,
413  RealMatrixX& m) const {
414  RealMatrixX dm;
415  Real h, dhdf;
416  _h(p, t, h); _h.derivative( f, p, t, dhdf);
417  _material_stiffness(p, t, m); _material_stiffness.derivative( f, p, t, dm);
418 
419  // [C]*dh
420  m *= dhdf;
421 
422  // += [dC]*h
423  m += h*dm;
424 }
425 
426 
427 
428 
429 
430 
433  const MAST::FieldFunction<Real>& h,
434  const MAST::FieldFunction<Real>& off):
435 MAST::FieldFunction<RealMatrixX> ("ExtensionBendingStiffnessMatrix2D"),
437 _h(h),
438 _off(off) {
439  _functions.insert(&mat);
440  _functions.insert(&h);
441  _functions.insert(&off);
442 }
443 
444 
445 
446 void
449  const Real t,
450  RealMatrixX& m) const {
451  // [C]*h
452  Real h, off;
453  _h(p, t, h);
454  _off(p, t, off);
455  _material_stiffness(p, t, m);
456  m *= h*off;
457 }
458 
459 
460 
461 
462 void
465  const libMesh::Point& p,
466  const Real t,
467  RealMatrixX& m) const {
468  RealMatrixX dm;
469  m = RealMatrixX::Zero(3,3); dm = RealMatrixX::Zero(3, 3);
470  Real h, off, dh, doff;
471 
472  _h(p, t, h); _h.derivative( f, p, t, dh);
473  _off(p, t, off); _off.derivative( f, p, t, doff);
474  _material_stiffness(p, t, m); _material_stiffness.derivative( f, p, t, dm);
475  m *= dh*off + h*doff;
476  m += h*off*dm;
477 }
478 
479 
480 
481 
484  const MAST::FieldFunction<Real>& h,
485  const MAST::FieldFunction<Real>& off):
486 MAST::FieldFunction<RealMatrixX> ("BendingStiffnessMatrix2D"),
488 _h(h),
489 _off(off) {
490  _functions.insert(&mat);
491  _functions.insert(&h);
492  _functions.insert(&off);
493 }
494 
495 
496 
497 void
499 BendingStiffnessMatrix::operator() (const libMesh::Point& p,
500  const Real t,
501  RealMatrixX& m) const {
502  // [C]*h
503  Real h, off;
504  _h(p, t, h);
505  _off(p, t, off);
506  _material_stiffness(p, t, m);
507  m *= (pow(h,3)/12. + h*pow(off,2));
508 }
509 
510 
511 
512 
513 void
516  const libMesh::Point& p,
517  const Real t,
518  RealMatrixX& m) const {
519  RealMatrixX dm;
520  m = RealMatrixX::Zero(3,3); dm = RealMatrixX::Zero(3, 3);
521  Real h, dhdf, off, doff;
522  _h(p, t, h); _h.derivative( f, p, t, dhdf);
523  _off(p, t, off); _off.derivative( f, p, t, doff);
524  _material_stiffness(p, t, m); _material_stiffness.derivative( f, p, t, dm);
525 
526  // [C]*dh
527  m *= (pow(h,2)/4.*dhdf + dhdf*pow(off,2) + h*2.*off*doff);
528 
529  // += [dC]*h
530  m += (pow(h,3)/12. + h*pow(off, 2))* dm;
531 }
532 
533 
534 
535 
536 
539  const MAST::FieldFunction<Real>& h,
540  const MAST::FieldFunction<Real>& off):
541 MAST::FieldFunction<RealMatrixX>("InertiaMatrix2D"),
542 _rho(rho),
543 _h(h),
544 _off(off) {
545  _functions.insert(&rho);
546  _functions.insert(&h);
547  _functions.insert(&off);
548 }
549 
550 
551 
552 
553 void
555 InertiaMatrix::operator() (const libMesh::Point& p,
556  const Real t,
557  RealMatrixX& m) const {
558  m = RealMatrixX::Zero(6, 6);
559  Real h, rho, off;
560  _h(p, t, h);
561  _off(p, t, off);
562  _rho(p, t, rho);
563 
564  for (unsigned int i=0; i<3; i++)
565  m(i,i) = h;
566 
567  m(0,4) = off*h; m(4,0) = m(0,4); // extension-bending coupling
568  m(1,3) = -off*h; m(3,1) = m(1,3); // extension-bending coupling
569  m(3,3) = pow(h,3)/12. + h*pow(off,2); // rotary inertia
570  m(4,4) = pow(h,3)/12. + h*pow(off,2); // rotary inertia
571  m(5,5) = pow(h,3)/12.*1.0e-6; // neglect the rotary inertia wrt theta_z
572  // FIXME: The line above, a small value in m(5,5) can cause many artificial eigenvalues around the true one. Resulting in difficult to interpret modal
573  m *= rho;
574 }
575 
576 
577 
578 
579 
580 void
583  const libMesh::Point& p,
584  const Real t,
585  RealMatrixX& m) const {
586  m = RealMatrixX::Zero(6,6);
587  Real h, dhdf, rho, drhodf, off, doff;
588  _h(p, t, h); _h.derivative( f, p, t, dhdf);
589  _off(p, t, off); _off.derivative( f, p, t, doff);
590  _rho(p, t, rho); _rho.derivative( f, p, t, drhodf);
591 
592  for (unsigned int i=0; i<3; i++)
593  m(i,i) = drhodf*h + rho*dhdf;
594 
595  m(0,4) = doff*h+off*dhdf; m(4,0) = m(0,4); // extension-bending coupling
596  m(1,3) = -doff*h-off*dhdf; m(3,1) = m(1,3); // extension-bending coupling
597  m(3,3) = drhodf*pow(h,3)/12.+rho*pow(h,2)/4.*dhdf; // rotary inertia
598  m(4,4) = drhodf*pow(h,3)/12.+rho*pow(h,2)/4.*dhdf; // rotary inertia
599  m(5,5) = (drhodf*pow(h,3)/12.+rho*pow(h,2)/4.*dhdf)*1.0e-6; // neglect the rotary inertia wrt theta_z
600  // FIXME: The line above, a small value in m(5,5) can cause many artificial eigenvalues around the true one. Resulting in difficult to interpret modal
601 }
602 
603 
604 
605 
608  const MAST::FieldFunction<RealMatrixX>& mat_expansion,
609  const MAST::FieldFunction<Real>& h):
610 MAST::FieldFunction<RealMatrixX>("ThermalExpansionAMatrix2D"),
611 _material_stiffness(mat_stiff),
612 _material_expansion(mat_expansion),
613 _h(h) {
614  _functions.insert(&mat_stiff);
615  _functions.insert(&mat_expansion);
616  _functions.insert(&h);
617 }
618 
619 
620 
621 
622 void
624 ThermalExpansionAMatrix::operator() (const libMesh::Point& p,
625  const Real t,
626  RealMatrixX& m) const {
627  RealMatrixX at;
628  Real h;
629  _h(p, t, h);
630  _material_stiffness(p, t, m);
631  _material_expansion(p, t, at);
632 
633  m *= at;
634  m *= h;
635 }
636 
637 
638 
639 
640 
641 
642 void
645  const libMesh::Point& p,
646  const Real t,
647  RealMatrixX& m) const {
648  RealMatrixX m1, at, dm, dat;
649  Real h, dh;
650  _h(p, t, h); _h.derivative( f, p, t, dh);
651  _material_stiffness(p, t, m1); _material_stiffness.derivative( f, p, t, dm);
652  _material_expansion(p, t, at); _material_expansion.derivative( f, p, t, dat);
653 
654  m = m1;
655 
656  m *= at;
657  m *= dh;
658 
659  m1 *= dat;
660  dm *= at;
661  m1 += dm;
662 
663  m += h*m1;
664 }
665 
666 
667 
668 
671  const MAST::FieldFunction<RealMatrixX>& mat_expansion,
672  const MAST::FieldFunction<Real>& h,
673  const MAST::FieldFunction<Real>& off):
674 MAST::FieldFunction<RealMatrixX>("ThermalExpansionBMatrix2D"),
675 _material_stiffness(mat_stiff),
676 _material_expansion(mat_expansion),
677 _h(h),
678 _off(off) {
679  _functions.insert(&mat_stiff);
680  _functions.insert(&mat_expansion);
681  _functions.insert(&h);
682  _functions.insert(&off);
683 }
684 
685 
686 
687 
688 void
690 ThermalExpansionBMatrix::operator() (const libMesh::Point& p,
691  const Real t,
692  RealMatrixX& m) const {
693  RealMatrixX at;
694  Real h, off;
695  _h(p, t, h);
696  _off(p, t, off);
697  _material_stiffness(p, t, m);
698  _material_expansion(p, t, at);
699 
700  m *= at;
701  m *= h*off;
702 }
703 
704 
705 
706 
707 
708 void
711  const libMesh::Point& p,
712  const Real t,
713  RealMatrixX& m) const {
714  RealMatrixX m1, at, dm, dat;
715  Real h, dh, off, doff;
716  _h(p, t, h); _h.derivative( f, p, t, dh);
717  _off(p, t, off); _off.derivative( f, p, t, doff);
718  _material_stiffness(p, t, m1); _material_stiffness.derivative( f, p, t, dm);
719  _material_expansion(p, t, at); _material_expansion.derivative( f, p, t, dat);
720 
721  m = m1;
722 
723  m *= at;
724  m *= (dh*off+h*doff);
725 
726  m1 *= dat;
727  dm *= at;
728  m1 += dm;
729 
730  m += h*off*m1;
731 }
732 
733 
734 
735 
739  const MAST::FieldFunction<Real>& h):
740 MAST::FieldFunction<RealMatrixX>("PrestressAMatrix2D"),
741 _prestress(prestress),
742 _T(T),
743 _h(h) {
744  _functions.insert(&prestress);
745  _functions.insert(&T);
746  _functions.insert(&h);
747 }
748 
749 
750 
751 
752 void
754 PrestressAMatrix::operator() (const libMesh::Point& p,
755  const Real t,
756  RealMatrixX& m) const {
757  RealMatrixX s, T;
758  m = RealMatrixX::Zero(2, 2);
759  Real h;
760  _h(p, t, h);
761  _prestress(p, t, s);
762  _T(p, t, T);
763 
764  // convert the stress to the local coordinate
765  s *= T;
766  s = T.transpose() * s;
767 
768  for (unsigned int i=0; i<2; i++)
769  for (unsigned int j=0; j<2; j++)
770  m(i,j) = s(i,j)*h;
771 }
772 
773 
774 
775 
776 
777 
778 void
781  const libMesh::Point& p,
782  const Real t,
783  RealMatrixX& m) const {
784  RealMatrixX s, ds, T, dT;
785  m = RealMatrixX::Zero(2, 2);
786  Real h, dh;
787  _h(p, t, h); _h.derivative( f, p, t, dh);
788  _prestress(p, t, s); _prestress.derivative( f, p, t, ds);
789  _T(p, t, T); _T.derivative( f, p, t, dT);
790 
791  // convert the stress to the local coordinate
792  s *= T;
793  s = T.transpose() * s;
794 
795  // ds = dT^T s T + T^T s dT + T^T ds T
796  RealMatrixX tmp;
797  ds *= T;
798  ds = T.transpose()*ds;
799 
800  tmp = s;
801  tmp *= dT;
802  tmp = T.transpose() * tmp;
803  ds += tmp;
804 
805  tmp = s;
806  tmp *= T;
807  tmp = dT.transpose() * tmp;
808  ds += tmp;
809 
810 
811 
812  for (unsigned int i=0; i<2; i++)
813  for (unsigned int j=0; j<2; j++)
814  m(i,j) = ds(i,j)*h + s(i,j)*dh;
815 }
816 
817 
818 
819 
820 //void
821 //MAST::Solid2DSectionProperty::
822 //PrestressAMatrix::convert_to_vector(const RealMatrixX &m,
823 // RealVectorX &v) const {
824 // libmesh_assert_equal_to(m.rows(), 2);
825 // libmesh_assert_equal_to(m.cols(), 2);
826 // v.resize(3);
827 // v(0) = m(0,0); // sigma x
828 // v(2) = m(1,1); // sigma y
829 // v(2) = m(0,1); // tau xy
830 //}
831 
832 
833 
834 
838  const MAST::FieldFunction<Real>& h,
839  const MAST::FieldFunction<Real>& off):
840 MAST::FieldFunction<RealMatrixX>("PrestressBMatrix2D"),
841 _prestress(prestress),
842 _T(T),
843 _h(h),
844 _off(off) {
845  _functions.insert(&prestress);
846  _functions.insert(&T);
847  _functions.insert(&h);
848  _functions.insert(&off);
849 }
850 
851 
852 
853 
854 void
856 PrestressBMatrix::operator() (const libMesh::Point& p,
857  const Real t,
858  RealMatrixX& m) const {
859  RealMatrixX s, T;
860  m = RealMatrixX::Zero(2, 2);
861  Real h, off;
862  _h(p, t, h);
863  _off(p, t, off);
864  _prestress(p, t, s);
865  _T(p, t, T);
866 
867  // convert the stress to the local coordinate
868  s *= T;
869  s = T.transpose() * s;
870 
871  for (unsigned int i=0; i<2; i++)
872  for (unsigned int j=0; j<2; j++)
873  m(i,j) = s(i,j)*(h*off);
874 }
875 
876 
877 
878 
879 
880 void
883  const libMesh::Point& p,
884  const Real t,
885  RealMatrixX& m) const {
886  RealMatrixX s, ds, T, dT;
887  m = RealMatrixX::Zero(2, 2);
888  Real h, dh, off, doff;
889  _h(p, t, h); _h.derivative( f, p, t, dh);
890  _off(p, t, off); _off.derivative( f, p, t, doff);
891  _prestress(p, t, s); _prestress.derivative( f, p, t, ds);
892  _T(p, t, T); _T.derivative( f, p, t, dT);
893 
894  // convert the stress to the local coordinate
895  s *= T;
896  s = T.transpose() * s;
897 
898  // ds = dT^T s T + T^T s dT + T^T ds T
899  RealMatrixX tmp;
900  ds *= T;
901  ds = T.transpose() * ds;
902 
903  tmp = s;
904  tmp *= dT;
905  tmp = dT.transpose() * tmp;
906  ds += tmp;
907 
908  tmp = s;
909  tmp *= T;
910  tmp = T.transpose()*tmp;
911  ds += tmp;
912 
913 
914 
915  for (unsigned int i=0; i<2; i++)
916  for (unsigned int j=0; j<2; j++)
917  m(i,j) = ds(i,j)*(h*off) + s(i,j)*(dh*off+h*doff);
918 }
919 
920 
921 
922 
925  const MAST::FieldFunction<Real>& h):
926 MAST::FieldFunction<RealMatrixX>("ThermalConductanceMatrix"),
927 _mat_cond(mat_cond),
928 _h(h) {
929  _functions.insert(&mat_cond);
930  _functions.insert(&h);
931 }
932 
933 
934 
937 
938 
939 void
941 operator() (const libMesh::Point& p,
942  const Real t,
943  RealMatrixX& m) const {
944 
945  m = RealMatrixX::Zero(2, 2);
946  Real h;
947  _mat_cond(p, t, m);
948  _h(p, t, h);
949 
950  m *= h;
951 }
952 
953 
954 
955 
956 void
958  const libMesh::Point& p,
959  const Real t,
960  RealMatrixX& m) const {
961  m = RealMatrixX::Zero(2, 2);
962  RealMatrixX dm;
963  Real h, dh;
964  _mat_cond(p, t, m);
965  _mat_cond.derivative( f, p, t, dm);
966  _h(p, t, h);
967  _h.derivative( f, p, t, dh);
968 
969  m *= dh;
970  m += dm*h;
971 }
972 
973 
974 
975 
976 
979  const MAST::FieldFunction<Real>& h):
980 MAST::FieldFunction<RealMatrixX>("ThermalCapacitanceMatrix"),
981 _mat_cap(mat_cap),
982 _h(h) {
983  _functions.insert(&mat_cap);
984  _functions.insert(&h);
985 }
986 
987 
988 
991 
992 
993 void
995 operator() (const libMesh::Point& p,
996  const Real t,
997  RealMatrixX& m) const {
998 
999  m = RealMatrixX::Zero(1, 1);
1000  Real h;
1001  _mat_cap(p, t, m);
1002  _h(p, t, h);
1003 
1004  m *= h;
1005 }
1006 
1007 
1008 
1009 
1010 void
1013  const libMesh::Point& p,
1014  const Real t,
1015  RealMatrixX& m) const {
1016 
1017  m = RealMatrixX::Zero(1, 1);
1018  RealMatrixX dm;
1019  Real h, dh;
1020  _mat_cap(p, t, m);
1021  _mat_cap.derivative( f, p, t, dm);
1022  _h(p, t, h);
1023  _h.derivative( f, p, t, dh);
1024 
1025  m *= dh;
1026  m += dm*h;
1027 }
1028 
1029 
1030 
1031 //void
1032 //MAST::Solid2DSectionProperty::
1033 //PrestressBMatrix::convert_to_vector(const RealMatrixX &m,
1034 // RealVectorX &v) const {
1035 // // nothing to be done for a symmetric section
1036 // v.resize(3);
1037 //}
1038 
1039 
1040 
1041 
1042 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
1045 
1048  (_material->stiffness_matrix(2, _if_plane_stress),
1049  this->get<const FieldFunction<Real> >("h"));
1050 
1051  return std::unique_ptr<MAST::FieldFunction<RealMatrixX> > (rval);
1052 }
1053 
1054 
1055 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
1058 
1061  (_material->stiffness_matrix(2, _if_plane_stress),
1062  this->get<const FieldFunction<Real> >("h"));
1063 
1064  return std::unique_ptr<MAST::FieldFunction<RealMatrixX> > (rval);
1065 }
1066 
1067 
1068 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
1071 
1074  (_material->stiffness_matrix(2, _if_plane_stress),
1075  this->get<FieldFunction<Real> >("h"),
1076  this->get<FieldFunction<Real> >("off"));
1077 
1078  return std::unique_ptr<MAST::FieldFunction<RealMatrixX> > (rval);
1079 }
1080 
1081 
1082 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
1085 
1088  (_material->stiffness_matrix(2, _if_plane_stress),
1089  this->get<FieldFunction<Real> >("h"),
1090  this->get<FieldFunction<Real> >("off"));
1091 
1092  return std::unique_ptr<MAST::FieldFunction<RealMatrixX> > (rval);
1093 }
1094 
1095 
1096 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
1099 
1100 
1103  (_material->stiffness_matrix(2, _if_plane_stress),
1104  this->get<FieldFunction<Real> >("h"),
1105  this->get<FieldFunction<Real> >("off"));
1106 
1107  return std::unique_ptr<MAST::FieldFunction<RealMatrixX> > (rval);
1108 }
1109 
1110 
1111 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
1114 
1115 
1118  (_material->stiffness_matrix(2, _if_plane_stress),
1119  this->get<FieldFunction<Real> >("h"),
1120  this->get<FieldFunction<Real> >("off"));
1121 
1122  return std::unique_ptr<MAST::FieldFunction<RealMatrixX> > (rval);
1123 }
1124 
1125 
1126 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
1129 
1130  libmesh_error();
1131 
1132  return std::unique_ptr<MAST::FieldFunction<RealMatrixX> > (nullptr);
1133 }
1134 
1135 
1136 
1137 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
1140 
1141 
1144  (_material->get<FieldFunction<Real> >("rho"),
1145  this->get<FieldFunction<Real> >("h"),
1146  this->get<FieldFunction<Real> >("off"));
1147 
1148  return std::unique_ptr<MAST::FieldFunction<RealMatrixX> > (rval);
1149 }
1150 
1151 
1152 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
1155 
1156 
1159  (_material->get<FieldFunction<Real> >("rho"),
1160  this->get<FieldFunction<Real> >("h"),
1161  this->get<FieldFunction<Real> >("off"));
1162 
1163  return std::unique_ptr<MAST::FieldFunction<RealMatrixX> > (rval);
1164 }
1165 
1166 
1167 
1168 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
1171 
1174  (_material->stiffness_matrix(2, _if_plane_stress),
1175  _material->thermal_expansion_matrix(2),
1176  this->get<FieldFunction<Real> >("h"));
1177 
1178  return std::unique_ptr<MAST::FieldFunction<RealMatrixX> > (rval);
1179 }
1180 
1181 
1182 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
1185 
1188  (_material->stiffness_matrix(2, _if_plane_stress),
1189  _material->thermal_expansion_matrix(2),
1190  this->get<FieldFunction<Real> >("h"));
1191 
1192  return std::unique_ptr<MAST::FieldFunction<RealMatrixX> > (rval);
1193 }
1194 
1195 
1196 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
1199 
1200 
1203  (_material->stiffness_matrix(2, _if_plane_stress),
1204  _material->thermal_expansion_matrix(2),
1205  this->get<FieldFunction<Real> >("h"),
1206  this->get<FieldFunction<Real> >("off"));
1207 
1208  return std::unique_ptr<MAST::FieldFunction<RealMatrixX> > (rval);
1209 }
1210 
1211 
1212 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
1215 
1216 
1219  (_material->stiffness_matrix(2, _if_plane_stress),
1220  _material->thermal_expansion_matrix(2),
1221  this->get<FieldFunction<Real> >("h"),
1222  this->get<FieldFunction<Real> >("off"));
1223 
1224  return std::unique_ptr<MAST::FieldFunction<RealMatrixX> > (rval);
1225 }
1226 
1227 
1228 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
1231 
1232 
1235  (_material->transverse_shear_stiffness_matrix(),
1236  this->get<FieldFunction<Real> >("h"),
1237  this->get<FieldFunction<Real> >("kappa")
1238  );
1239 
1240  return std::unique_ptr<MAST::FieldFunction<RealMatrixX> > (rval);
1241 }
1242 
1243 
1244 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
1247 
1248 
1251  (_material->transverse_shear_stiffness_matrix(),
1252  this->get<FieldFunction<Real> >("h"),
1253  this->get<FieldFunction<Real> >("kappa")
1254  );
1255 
1256  return std::unique_ptr<MAST::FieldFunction<RealMatrixX> > (rval);
1257 }
1258 
1259 
1260 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
1263 
1265  // TODO: figure out the interface for prestress and T matrix
1266  libmesh_assert(false);
1267  // = new MAST::Solid2DSectionProperty::PrestressAMatrix
1268  // (this->get<MAST::FieldFunction<RealMatrixX> >("prestress"),
1269  // e.local_elem().T_matrix(),
1270  // this->get<FieldFunction<Real> >("h"));
1271 
1272  return std::unique_ptr<MAST::FieldFunction<RealMatrixX> > (rval);
1273 }
1274 
1275 
1276 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
1279 
1281  // TODO: figure out the interface for prestress and T matrix
1282  libmesh_assert(false);
1283  // = new MAST::Solid2DSectionProperty::PrestressBMatrix
1284  // (this->get<MAST::FieldFunction<RealMatrixX> >("prestress"),
1285  // e.local_elem().T_matrix(),
1286  // this->get<FieldFunction<Real> >("h"),
1287  // this->get<FieldFunction<Real> >("off"));
1288 
1289  return std::unique_ptr<MAST::FieldFunction<RealMatrixX> > (rval);
1290 }
1291 
1292 
1293 
1294 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
1297 
1298 
1301  (_material->conductance_matrix(2),
1302  this->get<FieldFunction<Real> >("h"));
1303 
1304  return std::unique_ptr<MAST::FieldFunction<RealMatrixX> > (rval);
1305 }
1306 
1307 
1308 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
1311 
1312 
1315  (_material->conductance_matrix(2),
1316  this->get<FieldFunction<Real> >("h"));
1317 
1318  return std::unique_ptr<MAST::FieldFunction<RealMatrixX> > (rval);
1319 }
1320 
1321 
1322 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
1325 
1326 
1329  (_material->capacitance_matrix(2),
1330  this->get<FieldFunction<Real> >("h"));
1331 
1332  return std::unique_ptr<MAST::FieldFunction<RealMatrixX> > (rval);
1333 }
1334 
1335 
1336 std::unique_ptr<MAST::FieldFunction<RealMatrixX> >
1339 
1340 
1343  (_material->capacitance_matrix(2),
1344  this->get<FieldFunction<Real> >("h"));
1345 
1346  return std::unique_ptr<MAST::FieldFunction<RealMatrixX> > (rval);
1347 }
1348 
1351 section(const MAST::ElementBase& e) const {
1352 
1353  return &(this->get<FieldFunction<Real>>("h"));
1354 }
ExtensionBendingStiffnessMatrix(const MAST::FieldFunction< RealMatrixX > &mat, const MAST::FieldFunction< Real > &h, const MAST::FieldFunction< Real > &off)
BendingStiffnessMatrix(const MAST::FieldFunction< RealMatrixX > &mat, const MAST::FieldFunction< Real > &h, const MAST::FieldFunction< Real > &off)
ExtensionStiffnessMatrix(const MAST::FieldFunction< RealMatrixX > &mat, const MAST::FieldFunction< Real > &h)
virtual void derivative(const MAST::FunctionBase &f, const libMesh::Point &p, const Real t, RealMatrixX &m) const
calculates the value of the derivative of function with respect to the function f at the specified po...
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > stiffness_A_matrix() const
virtual void derivative(const MAST::FunctionBase &f, const libMesh::Point &p, const Real t, RealMatrixX &m) const
calculates the value of the derivative of function with respect to the function f at the specified po...
std::set< const MAST::FunctionBase * > _functions
set of functions that this function depends on
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > damping_matrix(const MAST::ElementBase &e) const
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > thermal_expansion_B_matrix() const
virtual void derivative(const MAST::FunctionBase &f, ValType &v) const
calculates the value of the function derivative and returns it in v.
virtual void operator()(const libMesh::Point &p, const Real t, RealMatrixX &m) const
calculates the value of the function at the specified point, p, and time, t, and returns it in v...
libMesh::Real Real
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > inertia_matrix() const
virtual void operator()(const libMesh::Point &p, const Real t, RealMatrixX &m) const
calculates the value of the function at the specified point, p, and time, t, and returns it in v...
virtual void derivative(const MAST::FunctionBase &f, const libMesh::Point &p, const Real t, RealMatrixX &m) const
calculates the value of the derivative of function with respect to the function f at the specified po...
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > thermal_capacitance_matrix() const
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > stiffness_D_matrix() const
PrestressBMatrix(const MAST::FieldFunction< RealMatrixX > &prestress, const MAST::FieldFunction< RealMatrixX > &T, const MAST::FieldFunction< Real > &h, const MAST::FieldFunction< Real > &off)
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > transverse_shear_stiffness_matrix() const
virtual void operator()(const libMesh::Point &p, const Real t, RealMatrixX &m) const
calculates the value of the function at the specified point, p, and time, t, and returns it in v...
virtual void derivative(const MAST::FunctionBase &f, const libMesh::Point &p, const Real t, RealMatrixX &m) const
calculates the value of the derivative of function with respect to the function f at the specified po...
virtual void derivative(const MAST::FunctionBase &f, const libMesh::Point &p, const Real t, RealMatrixX &m) const
calculates the value of the derivative of function with respect to the function f at the specified po...
virtual void derivative(const MAST::FunctionBase &f, const libMesh::Point &p, const Real t, RealMatrixX &m) const
calculates the value of the derivative of function with respect to the function f at the specified po...
virtual void operator()(const libMesh::Point &p, const Real t, RealMatrixX &m) const
calculates the value of the function at the specified point, p, and time, t, and returns it in v...
Matrix< Real, Dynamic, Dynamic > RealMatrixX
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > prestress_A_matrix(MAST::ElementBase &e) const
virtual void operator()(const libMesh::Point &p, const Real t, RealMatrixX &m) const
calculates the value of the function at the specified point, p, and time, t, and returns it in v...
This creates the base class for functions that have a saptial and temporal dependence, and provide sensitivity operations with respect to the functions and parameters.
PrestressAMatrix(const MAST::FieldFunction< RealMatrixX > &prestress, const MAST::FieldFunction< RealMatrixX > &T, const MAST::FieldFunction< Real > &h)
ThermalConductanceMatrix(const MAST::FieldFunction< RealMatrixX > &mat_cond, const MAST::FieldFunction< Real > &h)
virtual void operator()(const libMesh::Point &p, const Real t, RealMatrixX &m) const
calculates the value of the function at the specified point, p, and time, t, and returns it in v...
virtual void operator()(const libMesh::Point &p, const Real t, RealMatrixX &m) const
calculates the value of the function at the specified point, p, and time, t, and returns it in v...
virtual bool depends_on(const MAST::FunctionBase &f) const
returns true if the property card depends on the function f
virtual const MAST::FieldFunction< Real > * section(const MAST::ElementBase &e) const
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > thermal_conductance_matrix() const
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > stiffness_B_matrix() const
ThermalExpansionAMatrix(const MAST::FieldFunction< RealMatrixX > &mat_stiff, const MAST::FieldFunction< RealMatrixX > &mat_expansion, const MAST::FieldFunction< Real > &h)
ThermalCapacitanceMatrix(const MAST::FieldFunction< RealMatrixX > &mat_cond, const MAST::FieldFunction< Real > &h)
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > prestress_B_matrix(MAST::ElementBase &e) const
virtual void operator()(const libMesh::Point &p, const Real t, RealMatrixX &m) const
calculates the value of the function at the specified point, p, and time, t, and returns it in v...
virtual std::unique_ptr< MAST::FieldFunction< RealMatrixX > > thermal_expansion_A_matrix() const
virtual void operator()(const libMesh::Point &p, const Real t, RealMatrixX &m) const
calculates the value of the function at the specified point, p, and time, t, and returns it in v...
virtual void derivative(const MAST::FunctionBase &f, const libMesh::Point &p, const Real t, RealMatrixX &m) const
calculates the value of the derivative of function with respect to the function f at the specified po...
virtual void derivative(const MAST::FunctionBase &f, const libMesh::Point &p, const Real t, RealMatrixX &m) const
calculates the value of the derivative of function with respect to the function f at the specified po...
virtual void derivative(const MAST::FunctionBase &f, const libMesh::Point &p, const Real t, RealMatrixX &m) const
calculates the value of the derivative of function with respect to the function f at the specified po...
InertiaMatrix(const MAST::FieldFunction< Real > &rho, const MAST::FieldFunction< Real > &h, const MAST::FieldFunction< Real > &off)
virtual void derivative(const MAST::FunctionBase &f, const libMesh::Point &p, const Real t, RealMatrixX &m) const
calculates the value of the derivative of function with respect to the function f at the specified po...
TransverseStiffnessMatrix(const MAST::FieldFunction< RealMatrixX > &mat, const MAST::FieldFunction< Real > &h, const MAST::FieldFunction< Real > &kappa)
virtual void operator()(const libMesh::Point &p, const Real t, RealMatrixX &m) const
calculates the value of the function at the specified point, p, and time, t, and returns it in v...
ThermalExpansionBMatrix(const MAST::FieldFunction< RealMatrixX > &mat_stiff, const MAST::FieldFunction< RealMatrixX > &mat_expansion, const MAST::FieldFunction< Real > &h, const MAST::FieldFunction< Real > &off)
virtual void derivative(const MAST::FunctionBase &f, const libMesh::Point &p, const Real t, RealMatrixX &m) const
calculates the value of the derivative of function with respect to the function f at the specified po...
virtual bool depends_on(const MAST::FunctionBase &f) const
returns true if the property card depends on the function f
This is the base class for elements that implement calculation of finite element quantities over the ...
Definition: elem_base.h:72