axisym_cylindrical_solid_elements.cc
Go to the documentation of this file.
1// LIC// ====================================================================
2// LIC// This file forms part of oomph-lib, the object-oriented,
3// LIC// multi-physics finite-element library, available
4// LIC// at http://www.oomph-lib.org.
5// LIC//
6// LIC// Copyright (C) 2006-2026 Matthias Heil and Andrew Hazel
7// LIC//
8// LIC// This library is free software; you can redistribute it and/or
9// LIC// modify it under the terms of the GNU Lesser General Public
10// LIC// License as published by the Free Software Foundation; either
11// LIC// version 2.1 of the License, or (at your option) any later version.
12// LIC//
13// LIC// This library is distributed in the hope that it will be useful,
14// LIC// but WITHOUT ANY WARRANTY; without even the implied warranty of
15// LIC// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16// LIC// Lesser General Public License for more details.
17// LIC//
18// LIC// You should have received a copy of the GNU Lesser General Public
19// LIC// License along with this library; if not, write to the Free Software
20// LIC// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21// LIC// 02110-1301 USA.
22// LIC//
23// LIC// The authors may be contacted at oomph-lib@maths.man.ac.uk.
24// LIC//
25// LIC//====================================================================
26
27// Non-inline functions for axisymmetric solid mechanics elements
28
31
32namespace oomph
33{
34 /// Static default value for the timescale ratio
36
37 /// Static default value for the damping parameters
39
40 /// Static default value for the timescale ratio
41 double
43 1.0;
44
45 /// Static default value for the damping parameters
47 0.0;
48
49 //====================================================================
50 /// Residuals for AxisymCylindricalPVDWithPressureElements
51 //====================================================================
54 DenseMatrix<double>& jacobian,
55 const unsigned& flag)
56 {
57 // Set the number of Lagrangian coordinates
58 unsigned n_lagrangian = 2;
59 // Find out how many nodes there are
60 unsigned n_node = nnode();
61
62 // Integers to store local equation number and local unknown
63 int local_eqn = 0, local_unknown = 0;
64
65 // Set up memory for the shape functions
68
69 // Timescale ratio (non-dim density)
70 double lambda_sq = this->lambda_sq();
71
72 // Set the value of n_intpt
73 unsigned n_intpt = integral_pt()->nweight();
74
75 // Get the mass damping parameter
76 const double eta_M = eta_mass();
77
78 // Time factor
79 double time_factor = 0.0;
80 if (lambda_sq > 0)
81 {
83 }
84
85 // Loop over the integration points
86 for (unsigned ipt = 0; ipt < n_intpt; ipt++)
87 {
88 // Get the integral weight
89 double w = integral_pt()->weight(ipt);
90 // Call the derivatives of the shape functions
92 // Premultiply the weights and the Jacobian
93 double W = w * J;
94
95 // Calculate the local Lagrangian coordinates, position components
96 // and the derivatives of global position components
97 // wrt lagrangian coordinates, as well as acceleration
100 Vector<double> accel(2, 0.0);
103
104 // Calculate displacements and derivatives
105 for (unsigned l = 0; l < n_node; l++)
106 {
107 // Loop over displacement components (deformed position)
108 for (unsigned i = 0; i < 2; i++)
109 {
110 // Set the value of the lagrangian coordinate
112 // Set the value of the position component
114 // Set accel.
115 accel[i] += dnodal_position_dt(l, 2, i) * psi(l);
116 // Set velocity
118 // Loop over Lagrangian derivative directions
119 for (unsigned j = 0; j < 2; j++)
120 {
121 // Calculate dX[i]/dxi_{j}
123 }
124 }
125 }
126
127 // We are now in a position to calculate the undeformed metric tensor
129 // r row
130 g(0, 0) = 1.0;
131 g(0, 1) = 0.0;
132 g(0, 2) = 0.0;
133 // z row
134 g(1, 0) = 0.0;
135 g(1, 1) = 1.0;
136 g(1, 2) = 0.0;
137 // phi row
138 g(2, 0) = 0.0;
139 g(2, 1) = 0.0;
140 g(2, 2) = interpolated_xi[0] * interpolated_xi[0];
141
142 // Now multiply the weight by the square-root of the undeformed metric
143 // tensor r
144 double detg = g(0, 0) * g(1, 1) * g(2, 2);
145 W *= sqrt(detg);
146
147 // Now calculate the deformed metric tensor
149 // r row
150 G(0, 0) = interpolated_dXdxi(0, 0) * interpolated_dXdxi(0, 0) +
152 G(0, 1) = interpolated_dXdxi(0, 0) * interpolated_dXdxi(0, 1) +
154 G(0, 2) = 0.0;
155 // z row
156 G(1, 0) = G(0, 1);
157 G(1, 1) = interpolated_dXdxi(0, 1) * interpolated_dXdxi(0, 1) +
159 G(1, 2) = 0.0;
160 // phi row
161 G(2, 0) = 0.0;
162 G(2, 1) = 0.0;
163 G(2, 2) = interpolated_X[0] * interpolated_X[0];
164
165 // Now calculate the stress tensor from the constitutive law
166 DenseMatrix<double> sigma(3, 3, 0.0);
167 get_stress(g, G, sigma);
168
169 // If we're calculating the Jacobian, will need derivative of stress
170 // tensor w.r.t. the deformed metric tensor
171 RankFourTensor<double> d_stress_dG(3, 3, 3, 3, 0.0);
172 RankFourTensor<double> dG_dX(n_node, 2, 3, 3, 0.0);
173
174 if (flag == 1)
175 {
176 // Get the "upper triangular"
177 // entries of the derivatives of the stress tensor with
178 // respect to G
179 this->get_d_stress_dG_upper(g, G, sigma, d_stress_dG);
180
181 // Construct upper triangle of dGdX
182 // Loop over nodes
183 for (unsigned m = 0; m < n_node; m++)
184 {
185 // Loops over directions
186 for (unsigned i = 0; i < 2; i++)
187 {
188 for (unsigned a = 0; a < 2; a++)
189 {
190 for (unsigned b = a; b < 2; b++)
191 {
192 dG_dX(m, i, a, b) = interpolated_dXdxi(i, a) * dpsidxi(m, b) +
193 interpolated_dXdxi(i, b) * dpsidxi(m, a);
194 }
195 }
196 }
197
198 // Accounting for axisymmetric coord system
199 dG_dX(m, 0, 2, 2) = 2.0 * interpolated_X[0] * psi(m);
200 }
201 }
202
203 // Get body force at current time
204 Vector<double> b(2, 0.0);
205 this->body_force(interpolated_xi, b);
206
207 // Loop over the test functions, nodes of the element
208 for (unsigned l = 0; l < n_node; l++)
209 {
210 // Loop over displacement components
211 for (unsigned i = 0; i < 2; i++)
212 {
213 // Get the local eqn
215
216 // If not a boundary condition
217 if (local_eqn >= 0)
218 {
219 // Forcing/inertial contributions
221 (lambda_sq * (accel[i] + eta_M * interpolated_dXdt[i]) - b[i]) *
222 psi(l) * W;
223
224 // Stress term
225 for (unsigned a = 0; a < 2; a++)
226 {
227 for (unsigned b = 0; b < 2; b++)
228 {
230 sigma(a, b) * dpsidxi(l, b) * interpolated_dXdxi(i, a) * W;
231 }
232 }
233
234 // Additional stress term if it's the r component
235 if (i == 0)
236 {
238 sigma(2, 2) * interpolated_X[0] * psi(l) * W;
239 }
240
241 // Get Jacobian too?
242 if (flag == 1)
243 {
244 // Loop over the nodes of the element again
245 for (unsigned ll = 0; ll < n_node; ll++)
246 {
247 // Loop over the displacement components again
248 for (unsigned ii = 0; ii < 2; ii++)
249 {
250 // Get the number of the unknown
252
253 /*IF it's not a boundary condition*/
254 if (local_unknown >= 0)
255 {
256 // General stress term
257 //--------------------
258 double sum = 0.0;
259 for (unsigned a = 0; a < 2; a++)
260 {
261 for (unsigned b = a; b < 2; b++)
262 {
263 double factor = dG_dX(l, i, a, b);
264 if (a == b) factor *= 0.5;
265
266 for (unsigned aa = 0; aa < 3; aa++)
267 {
268 // Only upper half of derivatives w.r.t.
269 // symm tensor
270 for (unsigned bb = aa; bb < 3; bb++)
271 {
272 sum += factor * d_stress_dG(a, b, aa, bb) *
273 dG_dX(ll, ii, aa, bb);
274 }
275 }
276 }
277 }
278
279 // Contribution accounting for axisymmetry
280 if (i == 0)
281 {
282 double factor = 0.5 * dG_dX(l, i, 2, 2);
283 for (unsigned aa = 0; aa < 3; aa++)
284 {
285 // Only upper half of derivatives w.r.t.
286 // symm tensor
287 for (unsigned bb = aa; bb < 3; bb++)
288 {
289 sum += factor * d_stress_dG(2, 2, aa, bb) *
290 dG_dX(ll, ii, aa, bb);
291 }
292 }
293 }
294
295 // Multiply by weight and add contribution
296 // (Add directly because this bit is nonsymmetric)
297 jacobian(local_eqn, local_unknown) += sum * W;
298
299 // Only upper triangle (no separate test for bc as
300 // local_eqn is already nonnegative). Can be done
301 // for remaining terms as they are symmetric
302 if ((i == ii) && (local_unknown >= local_eqn))
303 {
304 // Initialise contribution
305 double sum = 0.0;
306
307 // Inertia term
308 sum += lambda_sq * time_factor * psi(ll) * psi(l);
309
310 // Stress term
311 for (unsigned a = 0; a < 2; a++)
312 {
313 for (unsigned b = 0; b < 2; b++)
314 {
315 sum += sigma(a, b) * dpsidxi(ll, a) * dpsidxi(l, b);
316 }
317 }
318
319 // Accounting for axisymmetry
320 if (i == 0)
321 {
322 sum += sigma(2, 2) * psi(l) * psi(ll);
323 }
324
325 // Multiply by weights to form contribution
326 double sym_entry = sum * W;
327 // Add contribution to jacobian
328 jacobian(local_eqn, local_unknown) += sym_entry;
329 // Add to lower triangular entries
331 {
332 jacobian(local_unknown, local_eqn) += sym_entry;
333 }
334 }
335 } // End of if not boundary condition
336 } // End of second displacement component loop
337 } // End of second node loop
338 } // End of Jacobian
339 } // End of if not a boundary condition
340 } // End of loop over displacement components
341 } // End of loop over test functions
342 } // End of loop over integration points
343 }
344
345 //====================================================================
346 /// Residuals for Refineable AxisymCylindricalPVDWithPressureElements
347 //====================================================================
351 DenseMatrix<double>& jacobian,
352 const unsigned& flag)
353 {
354 // Set the number of Lagrangian coordinates
355 unsigned n_lagrangian = 2;
356 // Find out how many nodes there are
357 unsigned n_node = nnode();
358
359 // Integers to store local equation number and local unknown
360 int local_eqn = 0, local_unknown = 0;
361
362 // Find out how many pressure dofs there are
363 const unsigned n_solid_pres = this->nsolid_pres();
364
365 // Set up memory for the shape functions
368
369 // Set up memory for the pressure shape functions
371
372 // Timescale ratio (non-dim density)
373 double lambda_sq = this->lambda_sq();
374
375 // Set the value of n_intpt
376 unsigned n_intpt = integral_pt()->nweight();
377
378 // Get the mass damping parameter
379 const double eta_M = eta_mass();
380
381 // Time factor
382 double time_factor = 0.0;
383 if (lambda_sq > 0)
384 {
386 }
387
388 // Loop over the integration points
389 for (unsigned ipt = 0; ipt < n_intpt; ipt++)
390 {
391 // Get the integral weight
392 double w = integral_pt()->weight(ipt);
393 // Call the derivatives of the shape functions
395 // Premultiply the weights and the Jacobian
396 double W = w * J;
397
398 // Call the pressure shape functions
400
401 // Calculate the local Lagrangian coordinates, position components
402 // and the derivatives of global position components
403 // wrt lagrangian coordinates, as well as acceleration
406 Vector<double> accel(2, 0.0);
409 double interpolated_solid_p = 0.0;
410
411 // Calculate displacements and derivatives
412 for (unsigned l = 0; l < n_node; l++)
413 {
414 // Loop over displacement components (deformed position)
415 for (unsigned i = 0; i < 2; i++)
416 {
417 // Set the value of the lagrangian coordinate
419 // Set the value of the position component
421 // Set accel.
422 accel[i] += dnodal_position_dt(l, 2, i) * psi(l);
423 // Set velocity
425 // Loop over Lagrangian derivative directions
426 for (unsigned j = 0; j < 2; j++)
427 {
428 // Calculate dX[i]/dxi_{j}
430 }
431 }
432 }
433
434 // Calculate the local internal pressure
435 for (unsigned l = 0; l < n_solid_pres; l++)
436 {
438 }
439
440 // We are now in a position to calculate the undeformed metric tensor
442 // r row
443 g(0, 0) = 1.0;
444 g(0, 1) = 0.0;
445 g(0, 2) = 0.0;
446 // z row
447 g(1, 0) = 0.0;
448 g(1, 1) = 1.0;
449 g(1, 2) = 0.0;
450 // phi row
451 g(2, 0) = 0.0;
452 g(2, 1) = 0.0;
453 g(2, 2) = interpolated_xi[0] * interpolated_xi[0];
454
455 // Now multiply the weight by the square-root of the undeformed metric
456 // tensor r
457 double detg = g(0, 0) * g(1, 1) * g(2, 2);
458 W *= sqrt(detg);
459
460 // Now calculate the deformed metric tensor
462 // r row
463 G(0, 0) = interpolated_dXdxi(0, 0) * interpolated_dXdxi(0, 0) +
465 G(0, 1) = interpolated_dXdxi(0, 0) * interpolated_dXdxi(0, 1) +
467 G(0, 2) = 0.0;
468 // z row
469 G(1, 0) = G(0, 1);
470 G(1, 1) = interpolated_dXdxi(0, 1) * interpolated_dXdxi(0, 1) +
472 G(1, 2) = 0.0;
473 // phi row
474 G(2, 0) = 0.0;
475 G(2, 1) = 0.0;
476 G(2, 2) = interpolated_X[0] * interpolated_X[0];
477
478 // Now calculate the deviatoric stress tensor from the constitutive law
480 double detG = 0.0, gen_dil = 0.0, inv_kappa = 0.0;
481 // If it's incompressible call one form of the constitutive law
482 if (Incompressible)
483 {
485 }
486 // Otherwise call another form
487 else
488 {
490 }
491
492 // Build the stress tensor up from its pressure and deviatoric
493 // components
494 DenseMatrix<double> sigma(3, 3, 0.0);
495 for (unsigned i = 0; i < 3; i++)
496 {
497 for (unsigned j = 0; j < 3; j++)
498 {
499 sigma(i, j) =
500 -1.0 * interpolated_solid_p * Gup(i, j) + sigma_dev(i, j);
501 }
502 }
503
504 // If we're calculating the Jacobian, will need derivative of stress
505 // tensor w.r.t. the deformed metric tensor
506 RankFourTensor<double> d_stress_dG(3, 3, 3, 3, 0.0);
507 RankFourTensor<double> dG_dX(n_node, 2, 3, 3, 0.0);
510
511 if (flag == 1)
512 {
513 // If incompressible, call the incompressible form
514 if (Incompressible)
515 {
518 }
519 else
520 // Otherwise call the near-incompressible form
521 {
522 this->get_d_stress_dG_upper(g,
523 G,
524 sigma,
525 gen_dil,
526 inv_kappa,
530 }
531
532 // Construct upper triangle of dGdX
533 // Loop over nodes
534 for (unsigned m = 0; m < n_node; m++)
535 {
536 // Loops over directions
537 for (unsigned i = 0; i < 2; i++)
538 {
539 for (unsigned a = 0; a < 2; a++)
540 {
541 for (unsigned b = a; b < 2; b++)
542 {
543 dG_dX(m, i, a, b) = interpolated_dXdxi(i, a) * dpsidxi(m, b) +
544 interpolated_dXdxi(i, b) * dpsidxi(m, a);
545 }
546 }
547 }
548
549 // Accounting for axisymmetric coord system
550 dG_dX(m, 0, 2, 2) = 2.0 * interpolated_X[0] * psi(m);
551 }
552 }
553
554 // Get body force at current time
555 Vector<double> b(2, 0.0);
556 this->body_force(interpolated_xi, b);
557
558 // Loop over the test functions, nodes of the element
559 for (unsigned l = 0; l < n_node; l++)
560 {
561 // Loop over displacement components
562 for (unsigned i = 0; i < 2; i++)
563 {
564 // Get the local eqn
566
567 // If not a boundary condition
568 if (local_eqn >= 0)
569 {
570 // Forcing/inertial contributions
572 (lambda_sq * (accel[i] + eta_M * interpolated_dXdt[i]) - b[i]) *
573 psi(l) * W;
574
575 // Stress term
576 for (unsigned a = 0; a < 2; a++)
577 {
578 for (unsigned b = 0; b < 2; b++)
579 {
581 sigma(a, b) * dpsidxi(l, b) * interpolated_dXdxi(i, a) * W;
582 }
583 }
584
585 // Additional stress term if it's the r component
586 if (i == 0)
587 {
589 sigma(2, 2) * interpolated_X[0] * psi(l) * W;
590 }
591
592 // Get Jacobian too?
593 if (flag == 1)
594 {
595 // Loop over the nodes of the element again
596 for (unsigned ll = 0; ll < n_node; ll++)
597 {
598 // Loop over the displacement components again
599 for (unsigned ii = 0; ii < 2; ii++)
600 {
601 // Get the number of the unknown
603
604 /*IF it's not a boundary condition*/
605 if (local_unknown >= 0)
606 {
607 // General stress term
608 //--------------------
609 double sum = 0.0;
610 for (unsigned a = 0; a < 2; a++)
611 {
612 for (unsigned b = a; b < 2; b++)
613 {
614 double factor = dG_dX(l, i, a, b);
615 if (a == b) factor *= 0.5;
616
617 for (unsigned aa = 0; aa < 3; aa++)
618 {
619 // Only upper half of derivatives w.r.t.
620 // symm tensor
621 for (unsigned bb = aa; bb < 3; bb++)
622 {
623 sum += factor * d_stress_dG(a, b, aa, bb) *
624 dG_dX(ll, ii, aa, bb);
625 }
626 }
627 }
628 }
629
630 // Contribution accounting for axisymmetry
631 if (i == 0)
632 {
633 double factor = 0.5 * dG_dX(l, i, 2, 2);
634 for (unsigned aa = 0; aa < 3; aa++)
635 {
636 // Only upper half of derivatives w.r.t.
637 // symm tensor
638 for (unsigned bb = aa; bb < 3; bb++)
639 {
640 sum += factor * d_stress_dG(2, 2, aa, bb) *
641 dG_dX(ll, ii, aa, bb);
642 }
643 }
644 }
645
646 // Multiply by weight and add contribution
647 // (Add directly because this bit is nonsymmetric)
648 jacobian(local_eqn, local_unknown) += sum * W;
649
650 // Only upper triangle (no separate test for bc as
651 // local_eqn is already nonnegative). Can be done
652 // for remaining terms as they are symmetric
653 if ((i == ii) && (local_unknown >= local_eqn))
654 {
655 // Initialise contribution
656 double sum = 0.0;
657
658 // Inertia term
659 sum += lambda_sq * time_factor * psi(ll) * psi(l);
660
661 // Stress term
662 for (unsigned a = 0; a < 2; a++)
663 {
664 for (unsigned b = 0; b < 2; b++)
665 {
666 sum += sigma(a, b) * dpsidxi(ll, a) * dpsidxi(l, b);
667 }
668 }
669
670 // Accounting for axisymmetry
671 if (i == 0)
672 {
673 sum += sigma(2, 2) * psi(l) * psi(ll);
674 }
675
676 // Multiply by weights to form contribution
677 double sym_entry = sum * W;
678 // Add contribution to jacobian
679 jacobian(local_eqn, local_unknown) += sym_entry;
680 // Add to lower triangular entries
682 {
683 jacobian(local_unknown, local_eqn) += sym_entry;
684 }
685 }
686 } // End of if not boundary condition
687 }
688 }
689
690 // Can add in the pressure jacobian terms
691 // Loop over the pressure nodes
692 for (unsigned l2 = 0; l2 < n_solid_pres; l2++)
693 {
695
696 // If it's not a boundary condition
697 if (local_unknown >= 0)
698 {
699 // Add the pressure terms to the jacobian
700 for (unsigned a = 0; a < 2; a++)
701 {
702 for (unsigned b = 0; b < 2; b++)
703 {
704 jacobian(local_eqn, local_unknown) -=
705 psisp(l2) * Gup(a, b) * interpolated_dXdxi(i, a) *
706 dpsidxi(l, b) * W;
707 }
708 }
709
710 // Additional contribution for axisymmetry
711 if (i == 0)
712 {
713 jacobian(local_eqn, local_unknown) -=
714 psisp(l2) * Gup(2, 2) * interpolated_X[0] * psi(l) * W;
715 }
716 }
717 } // End of loop over pressure dofs
718 } // End of Jacobian
719 }
720 } // End of loop over displacement components
721 } // End of loop over test functions
722
723 // Now loop over the pressure dofs
724 for (unsigned l = 0; l < n_solid_pres; l++)
725 {
727
728 // Pinned (unlikely, actually) or real dof?
729 if (local_eqn >= 0)
730 {
731 // For true incompressibility we need to conserve volume
732 // so the determinant of the deformed metric tensor
733 // needs to be equal to that of the undeformed one, which
734 // is equal to the volumetric growth factor
735 if (this->Incompressible)
736 {
737 residuals[local_eqn] += (detG / detg - 1.0) * psisp[l] * W;
738
739 // Add in Jacobian terms
740 if (flag == 1)
741 {
742 // Loop over the nodes of the element again
743 for (unsigned ll = 0; ll < n_node; ll++)
744 {
745 // Loop over the displacement components again
746 for (unsigned ii = 0; ii < 2; ii++)
747 {
748 // Get the number of the unknown
749 int local_unknown = this->position_local_eqn(ll, 0, ii);
750
751 /*IF it's not a boundary condition*/
752 if (local_unknown >= 0)
753 {
754 // General stress term
755 //--------------------
756 double sum = 0.0;
757
758 for (unsigned aa = 0; aa < 3; aa++)
759 {
760 // Only upper half of derivatives w.r.t.
761 // symm tensor
762 for (unsigned bb = aa; bb < 3; bb++)
763 {
764 sum += d_detG_dG(aa, bb) * dG_dX(ll, ii, aa, bb) *
765 psisp(l) / detg;
766 }
767 }
768 jacobian(local_eqn, local_unknown) += sum * W;
769 }
770 }
771 }
772 // No Jacobian terms due to pressure since it does not feature
773 // in the incompressibility constraint
774 }
775 }
776 else
777 {
780
781 // Add in the jacobian terms
782 if (flag == 1)
783 {
784 // Loop over the nodes of the element again
785 for (unsigned ll = 0; ll < n_node; ll++)
786 {
787 // Loop over the displacement components again
788 for (unsigned ii = 0; ii < 2; ii++)
789 {
790 // Get the number of the unknown
792
793 /*IF it's not a boundary condition*/
794 if (local_unknown >= 0)
795 {
796 // General stress term
797 double sum = 0.0;
798 for (unsigned aa = 0; aa < 3; aa++)
799 {
800 // Only upper half
801 for (unsigned bb = aa; bb < 3; bb++)
802 {
803 sum += d_gen_dil_dG(aa, bb) * dG_dX(ll, ii, aa, bb) *
804 psisp(l);
805 }
806 }
807 jacobian(local_eqn, local_unknown) += sum * W;
808 }
809 }
810 }
811
812 // Loop over the pressure nodes again
813 for (unsigned l2 = 0; l2 < n_solid_pres; l2++)
814 {
816
817 // If it's not a boundary condition
818 if (local_unknown >= 0)
819 {
820 jacobian(local_eqn, local_unknown) +=
821 inv_kappa * psisp(l2) * psisp(l) * W;
822 }
823 } // End of loop over pressure dofs
824 } // End of Jacobian
825 }
826 } // End of if not boundary condition
827 } // End of loop over pressure dofs
828 } // End of loop over integration points
829 }
830
831 //====================================================================
832 /// Data for the number of Variables at each node
833 //====================================================================
834 const unsigned
836 1, 0, 1, 0, 0, 0, 1, 0, 1};
837
838 //==========================================================================
839 /// Conversion from pressure dof to Node number at which pressure is stored
840 //==========================================================================
842 0, 2, 6, 8};
843
844 //=======================================================================
845 /// Data for the number of variables at each node
846 //=======================================================================
848 1, 1, 1, 0, 0, 0};
849
850 //=======================================================================
851 /// Data for the pressure conversion array
852 //=======================================================================
853 const unsigned TAxisymCylindricalPVDWithPressureElement::Pconv[3] = {0, 1, 2};
854
855 //==================================================================
856 /// Solid pressure shape function evaluated at integration point
857 //==================================================================
859 const unsigned& ipt, Shape& psi) const
860 {
861 // Storage for local coordinates of the integration point
862 Vector<double> s(2);
863 // Set the local coordinates
864 for (unsigned i = 0; i < 2; i++)
865 {
866 s[i] = this->integral_pt()->knot(ipt, i);
867 }
868 // Get the shape function
870 }
871
872 // Build required templates
873 template class TAxisymCylindricalPVDElement<3>;
875
876} // namespace oomph
static char t char * s
Definition cfortran.h:568
cstr elem_len * i
Definition cfortran.h:603
void get_stress(const DenseMatrix< double > &g, const DenseMatrix< double > &G, DenseMatrix< double > &sigma)
Return the stress tensor, as calculated from the constitutive law.
static double Default_lambda_sq_value
Static default value for timescale ratio (1.0 – for natural scaling)
double eta_mass()
Return the mass damping parameter.
void body_force(const Vector< double > &xi, Vector< double > &b) const
Evaluate body force at Lagrangian coordinate xi at present time (returns zero vector if no body force...
virtual void fill_in_contribution_to_residuals_axisym_pvd(Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag)
Return the residuals for the equations of solid mechanics.
const double & lambda_sq() const
Access function for timescale ratio (nondim density)
void get_d_stress_dG_upper(const DenseMatrix< double > &g, const DenseMatrix< double > &G, const DenseMatrix< double > &sigma, RankFourTensor< double > &d_sigma_dG)
Return the derivatives of the 2nd Piola Kirchhoff stress tensor, as calculated from the constitutive ...
static double Default_eta_value
Static default value for damping parameters.
void body_force(const Vector< double > &xi, Vector< double > &b) const
Evaluate body force at Lagrangian coordinate xi at present time (returns zero vector if no body force...
void get_stress(const DenseMatrix< double > &g, const DenseMatrix< double > &G, DenseMatrix< double > &sigma, DenseMatrix< double > &Gup, double &pressure_stress, double &kappa)
Return the stress tensor, as calculated from the constitutive law in the Near-incompresible formulati...
virtual void solid_pshape(const Vector< double > &s, Shape &psi) const =0
Return the solid pressure shape functions.
double interpolated_solid_p(const Vector< double > &s) const
Return the interpolated_solid_pressure.
void solid_pshape_at_knot(const unsigned &ipt, Shape &psi) const
Return the stored solid shape functions at the knots.
virtual int solid_p_local_eqn(const unsigned &i) const =0
Access function that returns the local equation number for the n-th solid pressure value.
void get_d_stress_dG_upper(const DenseMatrix< double > &g, const DenseMatrix< double > &G, const DenseMatrix< double > &sigma, const double &gen_dil, const double &inv_kappa, const double &interpolated_solid_p, RankFourTensor< double > &d_sigma_dG, DenseMatrix< double > &d_gen_dil_dG)
Return the derivative of the deviatoric part of the 2nd Piola Kirchhoff stress tensor,...
virtual double solid_p(const unsigned &l) const =0
Return the lth solid pressures.
static double Default_eta_value
Static default value for damping parameters.
bool Incompressible
Boolean to determine whether the solid is incompressible or not.
static double Default_lambda_sq_value
Static default value for timescale ratio (1.0 – for natural scaling)
virtual void fill_in_contribution_to_residuals_axisym_pvd_with_pressure(Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag)
Return the residuals for the equations of solid mechanics.
virtual unsigned nsolid_pres() const =0
Return the number of solid pressure degrees of freedom.
const double & lambda_sq() const
Access function for timescale ratio (nondim density)
A Class for the derivatives of shape functions The class design is essentially the same as Shape,...
Definition shape.h:278
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
Definition elements.h:1967
unsigned nnode() const
Return the number of nodes.
Definition elements.h:2214
double nodal_position(const unsigned &n, const unsigned &i) const
Return the i-th coordinate at local node n. If the node is hanging, the appropriate interpolation is ...
Definition elements.h:2321
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
Definition elements.h:2179
double dnodal_position_dt(const unsigned &n, const unsigned &i) const
Return the i-th component of nodal velocity: dx/dt at local node n.
Definition elements.h:2337
virtual double knot(const unsigned &i, const unsigned &j) const =0
Return local coordinate s[j] of i-th integration point.
virtual unsigned nweight() const =0
Return the number of integration points of the scheme.
virtual double weight(const unsigned &i) const =0
Return weight of i-th integration point.
TimeStepper *& position_time_stepper_pt()
Return a pointer to the position timestepper.
Definition nodes.h:1022
static const unsigned Initial_Nvalue[]
Static array of ints to hold number of variables at node.
static const unsigned Pconv[]
Static array of ints to hold conversion from pressure node numbers to actual node numbers.
A Class for shape functions. In simple cases, the shape functions have only one index that can be tho...
Definition shape.h:76
double lagrangian_position(const unsigned &n, const unsigned &i) const
Return i-th Lagrangian coordinate at local node n.
Definition elements.h:3909
int position_local_eqn(const unsigned &n, const unsigned &k, const unsigned &j) const
Access function that returns the local equation number that corresponds to the j-th coordinate of the...
Definition elements.h:4141
virtual double interpolated_xi(const Vector< double > &s, const unsigned &i) const
Return i-th FE-interpolated Lagrangian coordinate xi[i] at local coordinate s.
Definition elements.cc:7135
virtual double dshape_lagrangian_at_knot(const unsigned &ipt, Shape &psi, DShape &dpsidxi) const
Return the geometric shape functions and also first derivatives w.r.t. Lagrangian coordinates at ipt-...
Definition elements.cc:6768
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
static const unsigned Initial_Nvalue[]
Static array of ints to hold number of variables at node.
static const unsigned Pconv[]
Static array of ints to hold conversion from pressure node numbers to actual node numbers.
virtual double weight(const unsigned &i, const unsigned &j) const
Access function for j-th weight for the i-th derivative.
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).