31 #ifndef OOMPH_AXISYMM_ELASTICITY_ELEMENTS_HEADER 32 #define OOMPH_AXISYMM_ELASTICITY_ELEMENTS_HEADER 36 #include <oomph-lib-config.h> 40 #include "../generic/Qelements.h" 41 #include "../generic/hermite_elements.h" 42 #include "../constitutive/constitutive_laws.h" 75 if(Constitutive_law_pt==0)
78 "Elements derived from AxisymmetricPVDEquations";
79 error_message +=
" must have a constitutive law :\n ";
81 "set one using the constitutive_law_pt() member function\n";
84 OOMPH_CURRENT_FUNCTION,
85 OOMPH_EXCEPTION_LOCATION);
102 unsigned n_lagrangian=2;
104 unsigned n_node =
nnode();
112 Shape psi(n_node,n_position_type);
113 DShape dpsidxi(n_node,n_position_type,n_lagrangian);
119 for(
unsigned ipt=0;ipt<n_intpt;ipt++)
132 double interpolated_X[2]={0.0,0.0};
133 double interpolated_dXdxi[2][2];
136 for(
unsigned i=0;
i<2;
i++)
138 for(
unsigned j=0;j<2;j++)
140 interpolated_dXdxi[
i][j] = 0.0;
145 for(
unsigned l=0;l<n_node;l++)
148 for(
unsigned k=0;k<n_position_type;k++)
151 for(
unsigned i=0;
i<2;
i++)
158 for(
unsigned j=0;j<2;j++)
161 interpolated_dXdxi[
i][j] +=
176 g(1,1) = interpolated_xi[0]*interpolated_xi[0];
181 g(2,2) = interpolated_xi[0]*interpolated_xi[0]*
182 sin(interpolated_xi[1])*sin(interpolated_xi[1]);
186 W *= sqrt(g(0,0)*g(1,1)*g(2,2));
191 G(0,0) = interpolated_dXdxi[0][0]*interpolated_dXdxi[0][0]
192 +interpolated_dXdxi[1][0]*interpolated_dXdxi[1][0];
193 G(0,1) = interpolated_dXdxi[0][0]*
194 (interpolated_dXdxi[0][1] - interpolated_X[1])
195 + interpolated_dXdxi[1][0]*
196 (interpolated_dXdxi[1][1] + interpolated_X[0]);
200 G(1,1) = (interpolated_dXdxi[0][1] - interpolated_X[1])*
201 (interpolated_dXdxi[0][1] - interpolated_X[1])
202 + (interpolated_dXdxi[1][1] + interpolated_X[0])*
203 (interpolated_dXdxi[1][1] + interpolated_X[0]);
208 G(2,2) = (interpolated_X[0]*sin(interpolated_xi[1])
209 +interpolated_X[1]*cos(interpolated_xi[1]))*
210 (interpolated_X[0]*sin(interpolated_xi[1])
211 +interpolated_X[1]*cos(interpolated_xi[1]));
221 for(
unsigned l=0;l<n_node;l++)
224 for(
unsigned k=0;k<n_position_type;k++)
233 residuals[local_eqn] +=
234 (sigma(0,1)*interpolated_dXdxi[1][0] +
235 sigma(1,1)*(interpolated_dXdxi[1][1] + interpolated_X[0]) +
236 sigma(2,2)*sin(interpolated_xi[1])*
237 (interpolated_X[0]*sin(interpolated_xi[1]) +
238 interpolated_X[1]*cos(interpolated_xi[1])))*
242 for(
unsigned j=0;j<2;j++)
244 residuals[local_eqn] +=
245 (sigma(j,0)*interpolated_dXdxi[0][0] +
246 sigma(j,1)*(interpolated_dXdxi[0][1] - interpolated_X[1]))*
258 residuals[local_eqn] +=
259 (-sigma(0,1)*interpolated_dXdxi[0][0] -
260 sigma(1,1)*(interpolated_dXdxi[0][1] - interpolated_X[1]) +
261 sigma(2,2)*cos(interpolated_xi[1])*
262 (interpolated_X[0]*sin(interpolated_xi[1]) +
263 interpolated_X[1]*cos(interpolated_xi[1])))*
267 for(
unsigned j=0;j<2;j++)
269 residuals[local_eqn] +=
270 (sigma(j,0)*interpolated_dXdxi[1][0] +
271 sigma(j,1)*(interpolated_dXdxi[1][1] + interpolated_X[0]))*
287 unsigned n_node =
nnode();
288 unsigned n_position_type = 1;
291 Shape psi(n_node,n_position_type);
292 DShape dpsidxi(n_node,n_position_type,2);
301 for(
unsigned ipt=0;ipt<n_intpt;ipt++)
314 double interpolated_X[2]={0.0,0.0};
315 double interpolated_dXdxi[2][2];
318 for(
unsigned i=0;
i<2;
i++)
320 for(
unsigned j=0;j<2;j++)
322 interpolated_dXdxi[
i][j] = 0.0;
327 for(
unsigned l=0;l<n_node;l++)
330 for(
unsigned k=0;k<n_position_type;k++)
333 for(
unsigned i=0;
i<2;
i++)
340 for(
unsigned j=0;j<2;j++)
343 interpolated_dXdxi[
i][j] +=
353 G(0,0) = interpolated_dXdxi[0][0]*interpolated_dXdxi[0][0]
354 +interpolated_dXdxi[1][0]*interpolated_dXdxi[1][0];
355 G(0,1) = interpolated_dXdxi[0][0]*
356 (interpolated_dXdxi[0][1] - interpolated_X[1])
357 + interpolated_dXdxi[1][0]*
358 (interpolated_dXdxi[1][1] + interpolated_X[0]);
362 G(1,1) = (interpolated_dXdxi[0][1] - interpolated_X[1])*
363 (interpolated_dXdxi[0][1] - interpolated_X[1])
364 + (interpolated_dXdxi[1][1] + interpolated_X[0])*
365 (interpolated_dXdxi[1][1] + interpolated_X[0]);
370 G(2,2) = (interpolated_X[0]*sin(interpolated_xi[1])
371 +interpolated_X[1]*cos(interpolated_xi[1]))*
372 (interpolated_X[0]*sin(interpolated_xi[1])
373 +interpolated_X[1]*cos(interpolated_xi[1]));
376 double detG = G(0,0)*G(1,1)*G(2,2) - G(0,1)*G(1,0)*G(2,2);
409 void output(std::ostream &outfile,
const unsigned &n_plot)
415 outfile <<
"ZONE I=" << n_plot <<
", J=" << n_plot << std::endl;
418 for(
unsigned l2=0;l2<n_plot;l2++)
420 s[1] = -1.0 + l2*2.0/(n_plot-1);
421 for(
unsigned l1=0;l1<n_plot;l1++)
423 s[0] = -1.0 + l1*2.0/(n_plot-1);
429 outfile << x_r*sin(theta) + x_theta*cos(theta) <<
" " <<
430 x_r*cos(theta) - x_theta*sin(theta) <<
" ";
434 outfile << std::endl;
437 outfile << std::endl;
446 void output(FILE* file_pt,
const unsigned &n_plot)
452 fprintf(file_pt,
"ZONE I=%i, J=%i\n",n_plot,n_plot);
455 for(
unsigned l2=0;l2<n_plot;l2++)
457 s[1] = -1.0 + l2*2.0/(n_plot-1);
458 for(
unsigned l1=0;l1<n_plot;l1++)
460 s[0] = -1.0 + l1*2.0/(n_plot-1);
468 fprintf(file_pt,
"%g %g ",
469 x_r*sin(theta) + x_theta*cos(theta),
470 x_r*cos(theta) - x_theta*sin(theta));
475 fprintf(file_pt,
"\n");
478 fprintf(file_pt,
"\n");
502 void output(std::ostream &outfile,
const unsigned &n_plot)
509 void output(FILE* file_pt,
const unsigned &n_plot)
541 void output(std::ostream &outfile,
const unsigned &n_plot)
547 outfile <<
"ZONE I=" << n_plot <<
", J=" << n_plot << std::endl;
550 for(
unsigned l2=0;l2<n_plot;l2++)
552 s[1] = 0.0 + l2*1.0/(n_plot-1);
553 for(
unsigned l1=0;l1<n_plot;l1++)
555 s[0] = 0.0 + l1*1.0/(n_plot-1);
561 outfile << x_r*sin(theta) + x_theta*cos(theta) <<
" " <<
562 x_r*cos(theta) - x_theta*sin(theta) <<
" ";
566 outfile << std::endl;
569 outfile << std::endl;
578 void output(FILE* file_pt,
const unsigned &n_plot)
584 fprintf(file_pt,
"ZONE I=%i, J=%i\n",n_plot,n_plot);
587 for(
unsigned l2=0;l2<n_plot;l2++)
589 s[1] = -1.0 + l2*2.0/(n_plot-1);
590 for(
unsigned l1=0;l1<n_plot;l1++)
592 s[0] = -1.0 + l1*2.0/(n_plot-1);
600 fprintf(file_pt,
"%g %g ",
601 x_r*sin(theta) + x_theta*cos(theta),
602 x_r*cos(theta) - x_theta*sin(theta));
607 fprintf(file_pt,
"\n");
610 fprintf(file_pt,
"\n");
648 virtual int solid_p_local_eqn(
const unsigned &
i)=0;
654 void solid_pshape_at_knot(
const unsigned &ipt,
Shape &psi)
const;
660 Incompressible(false) {}
669 double &pressure_stress,
double &kappa)
673 if(Constitutive_law_pt == 0)
676 "Elements derived from AxisymmetricPVDEquationsWithPressure";
677 error_message +=
" must have a constitutive law :\n ";
679 "set one using the constitutive_law_pt() member function\n";
682 OOMPH_CURRENT_FUNCTION,
683 OOMPH_EXCEPTION_LOCATION);
686 Constitutive_law_pt->
687 calculate_second_piola_kirchhoff_stress(g,G,sigma,Gup,
688 pressure_stress,kappa);
699 if(Constitutive_law_pt == 0)
702 "Elements derived from AxisymmetricPVDEquationsWithPressure";
703 error_message +=
" must have a constitutive law :\n ";
705 "set one using the constitutive_law_pt() member function\n";
708 OOMPH_CURRENT_FUNCTION,
709 OOMPH_EXCEPTION_LOCATION);
712 Constitutive_law_pt->
713 calculate_second_piola_kirchhoff_stress(g,G,sigma,Gup,detG);
726 virtual unsigned nsolid_pres()
const=0;
729 virtual double solid_p(
const unsigned &l)=0;
736 fill_in_generic_residual_contribution_axisym_pvd_with_pressure(
745 fill_in_generic_residual_contribution_axisym_pvd_with_pressure(residuals,
759 unsigned n_lagrangian=2;
761 unsigned n_node =
nnode();
765 unsigned n_solid_pres = nsolid_pres();
768 int local_eqn=0,local_unknown=0;
771 Shape psi(n_node,n_position_type);
772 DShape dpsidxi(n_node,n_position_type,n_lagrangian);
775 Shape psisp(n_solid_pres);
781 for(
unsigned ipt=0;ipt<n_intpt;ipt++)
788 solid_pshape_at_knot(ipt,psisp);
797 double interpolated_X[2]={0.0,0.0};
798 double interpolated_dXdxi[2][2];
799 double interpolated_solid_p = 0.0;
802 for(
unsigned i=0;
i<2;
i++)
804 for(
unsigned j=0;j<2;j++)
806 interpolated_dXdxi[
i][j] = 0.0;
811 for(
unsigned l=0;l<n_node;l++)
814 for(
unsigned k=0;k<n_position_type;k++)
817 for(
unsigned i=0;
i<2;
i++)
824 for(
unsigned j=0;j<2;j++)
827 interpolated_dXdxi[
i][j] +=
835 for(
unsigned l=0;l<n_solid_pres;l++)
836 {interpolated_solid_p += solid_p(l)*psisp[l];}
846 g(1,1) = interpolated_xi[0]*interpolated_xi[0];
851 g(2,2) = interpolated_xi[0]*interpolated_xi[0]*
852 sin(interpolated_xi[1])*sin(interpolated_xi[1]);
855 double detg = g(0,0)*g(1,1)*g(2,2);
864 G(0,0) = interpolated_dXdxi[0][0]*interpolated_dXdxi[0][0]
865 +interpolated_dXdxi[1][0]*interpolated_dXdxi[1][0];
866 G(0,1) = interpolated_dXdxi[0][0]*
867 (interpolated_dXdxi[0][1] - interpolated_X[1])
868 + interpolated_dXdxi[1][0]*
869 (interpolated_dXdxi[1][1] + interpolated_X[0]);
873 G(1,1) = (interpolated_dXdxi[0][1] - interpolated_X[1])*
874 (interpolated_dXdxi[0][1] - interpolated_X[1])
875 + (interpolated_dXdxi[1][1] + interpolated_X[0])*
876 (interpolated_dXdxi[1][1] + interpolated_X[0]);
881 G(2,2) = (interpolated_X[0]*sin(interpolated_xi[1])
882 +interpolated_X[1]*cos(interpolated_xi[1]))*
883 (interpolated_X[0]*sin(interpolated_xi[1])
884 +interpolated_X[1]*cos(interpolated_xi[1]));
889 double detG=0.0, pressure_stress=0.0, kappa=0.0;
898 get_stress(g,G,sigma,Gup,pressure_stress,kappa);
905 for(
unsigned l=0;l<n_node;l++)
908 for(
unsigned k=0;k<n_position_type;k++)
917 residuals[local_eqn] +=
918 ((sigma(0,1) + interpolated_solid_p*Gup(0,1))*
919 interpolated_dXdxi[1][0] +
920 (sigma(1,1) + interpolated_solid_p*Gup(1,1))*
921 (interpolated_dXdxi[1][1] + interpolated_X[0]) +
922 (sigma(2,2) + interpolated_solid_p*Gup(2,2))*
923 sin(interpolated_xi[1])*
924 (interpolated_X[0]*sin(interpolated_xi[1]) +
925 interpolated_X[1]*cos(interpolated_xi[1])))*
929 for(
unsigned j=0;j<2;j++)
931 residuals[local_eqn] +=
932 ((sigma(j,0) + interpolated_solid_p*Gup(j,0))*
933 interpolated_dXdxi[0][0] +
934 (sigma(j,1) + interpolated_solid_p*Gup(j,1))*
935 (interpolated_dXdxi[0][1] - interpolated_X[1]))*
943 for(
unsigned l2=0;l2<n_solid_pres;l2++)
945 local_unknown = solid_p_local_eqn(l2);
947 if(local_unknown >= 0)
949 jacobian(local_eqn,local_unknown)
950 += (psisp[l2]*Gup(0,1)*interpolated_dXdxi[1][0] +
952 (interpolated_dXdxi[1][1] + interpolated_X[0]) +
953 psisp[l2]*Gup(2,2)*sin(interpolated_xi[1])*
954 (interpolated_X[0]*sin(interpolated_xi[1]) +
955 interpolated_X[1]*cos(interpolated_xi[1])))*
959 for(
unsigned j=0;j<2;j++)
961 jacobian(local_eqn,local_unknown)
962 += (psisp[l2]*Gup(j,0)*interpolated_dXdxi[0][0] +
964 (interpolated_dXdxi[0][1] - interpolated_X[1]))*
979 residuals[local_eqn] +=
980 (-(sigma(0,1) + interpolated_solid_p*Gup(0,1))*
981 interpolated_dXdxi[0][0] -
982 (sigma(1,1) + interpolated_solid_p*Gup(1,1))*
983 (interpolated_dXdxi[0][1] - interpolated_X[1]) +
984 (sigma(2,2) + interpolated_solid_p*Gup(2,2))
985 *cos(interpolated_xi[1])*
986 (interpolated_X[0]*sin(interpolated_xi[1]) +
987 interpolated_X[1]*cos(interpolated_xi[1])))*
991 for(
unsigned j=0;j<2;j++)
993 residuals[local_eqn] +=
994 ((sigma(j,0) + interpolated_solid_p*Gup(j,0))*
995 interpolated_dXdxi[1][0] +
996 (sigma(j,1) + interpolated_solid_p*Gup(j,1))*
997 (interpolated_dXdxi[1][1] + interpolated_X[0]))*
1005 for(
unsigned l2=0;l2<n_solid_pres;l2++)
1007 local_unknown = solid_p_local_eqn(l2);
1009 if(local_unknown >= 0)
1012 jacobian(local_eqn,local_unknown)
1013 += (-psisp[l2]*Gup(0,1)*interpolated_dXdxi[0][0] -
1015 (interpolated_dXdxi[0][1] - interpolated_X[1]) +
1016 psisp[l2]*Gup(2,2)*cos(interpolated_xi[1])*
1017 (interpolated_X[0]*sin(interpolated_xi[1]) +
1018 interpolated_X[1]*cos(interpolated_xi[1])))*
1022 for(
unsigned j=0;j<2;j++)
1024 jacobian(local_eqn,local_unknown)
1025 += (psisp[l2]*Gup(j,0)*interpolated_dXdxi[1][0] +
1027 (interpolated_dXdxi[1][1] + interpolated_X[0]))*
1042 for(
unsigned l=0;l<n_solid_pres;l++)
1044 local_eqn = solid_p_local_eqn(l);
1052 residuals[local_eqn] += (detG/detg - 1.0)*psisp[l]*
W;
1061 residuals[local_eqn] +=
1062 (kappa*interpolated_solid_p - pressure_stress)*psisp[l]*W;
1068 for(
unsigned l2=0;l2<n_solid_pres;l2++)
1070 local_unknown = solid_p_local_eqn(l2);
1072 if(local_unknown >= 0)
1074 jacobian(local_eqn,local_unknown)
1075 += kappa*psisp[l2]*psisp[l]*
W;
1094 unsigned n_node =
nnode();
1095 unsigned n_position_type = 1;
1098 Shape psi(n_node,n_position_type);
1099 DShape dpsidxi(n_node,n_position_type,2);
1108 for(
unsigned ipt=0;ipt<n_intpt;ipt++)
1121 double interpolated_X[2]={0.0,0.0};
1122 double interpolated_dXdxi[2][2];
1125 for(
unsigned i=0;
i<2;
i++)
1127 for(
unsigned j=0;j<2;j++)
1129 interpolated_dXdxi[
i][j] = 0.0;
1134 for(
unsigned l=0;l<n_node;l++)
1137 for(
unsigned k=0;k<n_position_type;k++)
1140 for(
unsigned i=0;
i<2;
i++)
1147 for(
unsigned j=0;j<2;j++)
1150 interpolated_dXdxi[
i][j] +=
1160 G(0,0) = interpolated_dXdxi[0][0]*interpolated_dXdxi[0][0]
1161 +interpolated_dXdxi[1][0]*interpolated_dXdxi[1][0];
1162 G(0,1) = interpolated_dXdxi[0][0]*
1163 (interpolated_dXdxi[0][1] - interpolated_X[1])
1164 + interpolated_dXdxi[1][0]*
1165 (interpolated_dXdxi[1][1] + interpolated_X[0]);
1169 G(1,1) = (interpolated_dXdxi[0][1] - interpolated_X[1])*
1170 (interpolated_dXdxi[0][1] - interpolated_X[1])
1171 + (interpolated_dXdxi[1][1] + interpolated_X[0])*
1172 (interpolated_dXdxi[1][1] + interpolated_X[0]);
1177 G(2,2) = (interpolated_X[0]*sin(interpolated_xi[1])
1178 +interpolated_X[1]*cos(interpolated_xi[1]))*
1179 (interpolated_X[0]*sin(interpolated_xi[1])
1180 +interpolated_X[1]*cos(interpolated_xi[1]));
1183 double detG = G(0,0)*G(1,1)*G(2,2) - G(0,1)*G(1,0)*G(2,2);
1186 sum += W*sqrt(detG);
1197 unsigned n_solid_pres = nsolid_pres();
1199 Shape psisp(n_solid_pres);
1201 solid_pshape(s,psisp);
1204 double interpolated_solid_p = 0.0;
1206 for(
unsigned l=0;l<n_solid_pres;l++)
1208 interpolated_solid_p += solid_p(l)*psisp[l];
1211 return(interpolated_solid_p);
1218 void output(std::ostream &outfile,
const unsigned &n_plot)
1224 outfile <<
"ZONE I=" << n_plot <<
", J=" << n_plot << std::endl;
1227 for(
unsigned l2=0;l2<n_plot;l2++)
1229 s[1] = -1.0 + l2*2.0/(n_plot-1);
1230 for(
unsigned l1=0;l1<n_plot;l1++)
1232 s[0] = -1.0 + l1*2.0/(n_plot-1);
1238 outfile << x_r*sin(theta) + x_theta*cos(theta) <<
" " <<
1239 x_r*cos(theta) - x_theta*sin(theta) <<
" ";
1240 outfile << interpolated_solid_p(s) <<
" ";
1244 outfile << std::endl;
1247 outfile << std::endl;
1255 void output(FILE* file_pt,
const unsigned &n_plot)
1261 fprintf(file_pt,
"ZONE I=%i, J=%i\n",n_plot,n_plot);
1264 for(
unsigned l2=0;l2<n_plot;l2++)
1266 s[1] = -1.0 + l2*2.0/(n_plot-1);
1267 for(
unsigned l1=0;l1<n_plot;l1++)
1269 s[0] = -1.0 + l1*2.0/(n_plot-1);
1277 fprintf(file_pt,
"%g %g ",
1278 x_r*sin(theta) + x_theta*cos(theta),
1279 x_r*cos(theta) - x_theta*sin(theta));
1284 fprintf(file_pt,
"\n");
1287 fprintf(file_pt,
"\n");
1343 void output(std::ostream &outfile,
const unsigned &n_plot)
1351 void output(FILE* file_pt,
const unsigned &n_plot)
double value(const unsigned &i) const
Return i-th stored value. This function is not virtual so that it can be inlined. This means that if ...
bool has_internal_solid_data()
There is internal solid data so we can't use the automatic assignment of consistent initial condition...
void output(std::ostream &outfile)
Overload the output function.
void output(std::ostream &outfile, const unsigned &n_plot)
Output function.
AxisymmetricPVDEquationsWithPressure()
Constructor, by default the element is not incompressible.
void output(FILE *file_pt)
Overload the output function.
void output(std::ostream &outfile)
Overload the output function.
virtual void output(std::ostream &outfile)
Output the element data — typically the values at the nodes in a format suitable for post-processing...
void output(std::ostream &outfile)
Overload the output function.
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Assign the contribution to the residual using only finite differences.
AxisymmetricPVDEquations()
Constructor.
void output(FILE *file_pt, const unsigned &n_plot)
Output function.
ConstitutiveLaw * Constitutive_law_pt
Pointer to constitutive law.
const double Pi
50 digits from maple
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...
void get_stress(const DenseMatrix< double > &g, const DenseMatrix< double > &G, DenseMatrix< double > &sigma, DenseMatrix< double > &Gup, double &detG)
Return the stress tensor, as calculated from the constitutive law in the "true" incompresible formula...
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Fill in the residuals by calling the generic function.
double solid_p(const unsigned &l)
Return the l-th pressure value.
void output(FILE *file_pt)
Overload the output function.
void output(FILE *file_pt, const unsigned &n_plot)
Output function.
virtual double weight(const unsigned &i) const =0
Return weight of i-th integration point.
void output(std::ostream &outfile, const unsigned &n_plot)
Output function.
void output(std::ostream &outfile)
Overload the output function.
void pin(const unsigned &i)
Pin the i-th stored variable.
double compute_physical_size() const
Overload/implement the size function.
void fix_solid_pressure(const unsigned &l, const double &pvalue)
Fix the pressure dof l to the value pvalue.
unsigned nnodal_position_type() const
Return the number of coordinate types that the element requires to interpolate the geometry between t...
ConstitutiveLaw *& constitutive_law_pt()
Return the constitutive law pointer.
AxisymDiagHermitePVDElement()
Constructor, there are no internal data points.
bool is_incompressible() const
Return whether the material is incompressible.
virtual double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s.
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Return the residuals and the jacobian.
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Return the residuals.
virtual void calculate_second_piola_kirchhoff_stress(const DenseMatrix< double > &g, const DenseMatrix< double > &G, DenseMatrix< double > &sigma)=0
Calculate the contravariant 2nd Piola Kirchhoff stress tensor. Arguments are the covariant undeformed...
void output(std::ostream &outfile, const unsigned &n_plot)
Output function.
unsigned P_solid_internal_index
Internal index that indicates at which internal data value the solid pressure is stored.
double lagrangian_position_gen(const unsigned &n, const unsigned &k, const unsigned &i) const
Return Generalised Lagrangian coordinate at local node n. `Direction' i, `Type' k.
void output(FILE *file_pt, const unsigned &n_plot)
Output function.
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
virtual void fill_in_jacobian_from_solid_position_by_fd(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Use finite differences to calculate the Jacobian entries corresponding to the solid positions...
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-...
void get_stress(const DenseMatrix< double > &g, const DenseMatrix< double > &G, DenseMatrix< double > &sigma)
Return the stress tensor, as calculated from the constitutive law.
void set_value(const unsigned &i, const double &value_)
Set the i-th stored data value to specified value. The only reason that we require an explicit set fu...
Data *& internal_data_pt(const unsigned &i)
Return a pointer to i-th internal data object.
void output(FILE *file_pt, const unsigned &n_plot)
Output function.
A class that represents a collection of data; each Data object may contain many different individual ...
ConstitutiveLaw * Constitutive_law_pt
Pointer to constitutive law.
void fill_in_generic_residual_contribution_axisym_pvd_with_pressure(Vector< double > &residuals, DenseMatrix< double > &jacobian, unsigned flag)
Return the residuals for the equations of solid mechanics formulated in the incompressible case! ...
void output(std::ostream &outfile)
Overload the output function.
void set_compressible()
Set the material to be compressible.
AxisymQPVDElement()
Constructor, there are no internal data points.
void set_incompressible()
Set the material to be incompressible.
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...
void output(FILE *file_pt)
Overload the output function.
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.
AxisymQPVDElementWithPressure()
Constructor, there are 3 internal data items.
void fill_in_jacobian_for_newmark_accel(DenseMatrix< double > &jacobian)
Fill in the contributions of the Jacobian matrix for the consistent assignment of the initial "accele...
void output(std::ostream &outfile, const unsigned &n_plot)
Output function.
ConstitutiveLaw *& constitutive_law_pt()
Return the constitutive law pointer.
double interpolated_solid_p(const Vector< double > &s)
Return the interpolated_solid_pressure.
double nodal_position_gen(const unsigned &n, const unsigned &k, const unsigned &i) const
Return the value of the k-th type of the i-th positional variable at the local node n...
bool Solve_for_consistent_newmark_accel_flag
Flag to indicate which system of equations to solve when assigning initial conditions for time-depend...
int solid_p_local_eqn(const unsigned &i)
Overload the access function for the solid pressure equation numbers.
double compute_physical_size() const
Overload/implement the function to calculate the volume of the element.
virtual unsigned nweight() const =0
Return the number of integration points of the scheme.
std::string string(const unsigned &i)
Return the i-th string or "" if the relevant string hasn't been defined.
bool Incompressible
Boolean to determine whether the solid is incompressible or not.
void fill_in_contribution_to_residuals_axisym_pvd(Vector< double > &residuals)
Return the residuals for the equations of solid mechanics.
unsigned add_internal_data(Data *const &data_pt, const bool &fd=true)
Add a (pointer to an) internal data object to the element and return the index required to obtain it ...
void output(FILE *file_pt)
Overload the output function.
void output(FILE *file_pt)
Overload the output function.
unsigned nnode() const
Return the number of nodes.
unsigned nsolid_pres() const
Return number of pressure values.
SolidFiniteElement class.
void solid_pshape(const Vector< double > &s, Shape &psi) const
Return the pressure shape functions.
void output(FILE *file_pt, const unsigned &n_plot)
Output function.
static DenseMatrix< double > Dummy_matrix
Empty dense matrix used as a dummy argument to combined residual and jacobian functions in the case w...
void output(std::ostream &outfile, const unsigned &n_plot)
Output function.
int internal_local_eqn(const unsigned &i, const unsigned &j) const
Return the local equation number corresponding to the j-th value stored at the i-th internal data...