70 double& error,
double& norm)
84 outfile <<
"ZONE" << std::endl;
90 for(
unsigned ipt=0;ipt<n_intpt;ipt++)
94 for(
unsigned i=0;
i<2;
i++)
112 (*exact_soln_pt)(time,x,exact_soln);
115 for(
unsigned i=0;
i<2;
i++)
117 norm+=exact_soln[
i]*exact_soln[
i]*
W;
123 for(
unsigned i=0;
i<2;
i++)
125 outfile << x[
i] <<
" ";
129 for(
unsigned i=0;
i<2;
i++)
134 outfile << std::endl;
147 double& error,
double& norm)
162 outfile <<
"ZONE" << std::endl;
168 for(
unsigned ipt=0;ipt<n_intpt;ipt++)
172 for(
unsigned i=0;
i<2;
i++)
190 (*exact_soln_pt)(x,exact_soln);
193 for(
unsigned i=0;
i<2;
i++)
195 norm+=exact_soln[
i]*exact_soln[
i]*
W;
201 for(
unsigned i=0;
i<2;
i++)
203 outfile << x[
i] <<
" ";
207 for(
unsigned i=0;
i<2;
i++)
212 outfile << std::endl;
224 const unsigned &nplot,
242 for (
unsigned iplot=0;iplot<num_plot_points;iplot++)
252 (*exact_soln_pt)(x,exact_soln);
255 for(
unsigned i=0;
i<2;
i++)
257 outfile << x[
i] <<
" ";
261 for(
unsigned i=0;
i<exact_soln.size();
i++)
263 outfile << exact_soln[
i] <<
" ";
266 outfile << std::endl;
280 const unsigned &nplot,
299 for (
unsigned iplot=0;iplot<num_plot_points;iplot++)
309 (*exact_soln_pt)(time,x,exact_soln);
312 for(
unsigned i=0;
i<2;
i++)
314 outfile << x[
i] <<
" ";
318 for(
unsigned i=0;
i<exact_soln.size();
i++)
320 outfile << exact_soln[
i] <<
" ";
323 outfile << std::endl;
341 const unsigned& nplot,
346 unsigned n_node =
nnode();
361 for (
unsigned iplot=0;iplot<num_plot_points;iplot++)
371 for(
unsigned i=0;
i<2;
i++)
373 interpolated_x[
i]=0.0;
374 interpolated_u[
i]=0.0;
376 for(
unsigned l=0;l<n_node;l++)
378 interpolated_u[
i] +=
u_pnst(t,l,
i)*psi[l];
384 for(
unsigned i=0;
i<2;
i++)
386 outfile << interpolated_x[
i] <<
" ";
390 for(
unsigned i=0;
i<2;
i++)
392 outfile << interpolated_u[
i] <<
" ";
395 outfile << std::endl;
411 const unsigned &nplot)
422 for (
unsigned iplot=0;iplot<num_plot_points;iplot++)
429 const double Alpha =
alpha();
432 double theta = Alpha*phi;
435 outfile << r*cos(theta) <<
" " << r*sin(theta) <<
" ";
467 outfile << 0 <<
" " << 1 <<
" ";
470 outfile << r <<
" " << phi <<
" ";
472 outfile << std::endl;
474 outfile << std::endl;
485 //==============================================================
486 void PolarNavierStokesEquations::output(std::ostream &outfile,
487 const unsigned &nplot)
490 //Vector of local coordinates
493 // Tecplot header info
494 outfile << tecplot_zone_string(nplot);
496 // Loop over plot points
497 unsigned num_plot_points=nplot_points(nplot);
498 for (unsigned iplot=0;iplot<num_plot_points;iplot++)
501 // Get local coordinates of plot point
502 get_s_plot(iplot,nplot,s);
504 //Work out global physical coordinate
505 const double Alpha = alpha();
506 double r = interpolated_x(s,0);
507 double phi = interpolated_x(s,1);
508 double theta = Alpha*phi;
511 outfile << r*cos(theta) << " " << r*sin(theta) << " ";
514 outfile << interpolated_u_pnst(s,0)*cos(theta) - interpolated_u_pnst(s,1)*sin(theta)
516 outfile << interpolated_u_pnst(s,0)*sin(theta) + interpolated_u_pnst(s,1)*cos(theta)
520 outfile << interpolated_p_pnst(s) << " ";
522 // Radial and Azimuthal velocities
523 outfile << interpolated_u_pnst(s,0) << " " << interpolated_u_pnst(s,1) << " ";
525 // I need to add exact pressure, radial velocity and radial velocity derivatives here
526 // Plus the error from these
528 double mu=(1./(sin(m)-m*cos(m)));
529 double exact_u=(mu/r)*(cos(m*phi)-cos(m));
530 double exact_p=(2.*mu)*((cos(m*phi)/(r*r))-cos(m));
531 double exact_dudr=-(exact_u/r);
532 double exact_dudphi=-mu*m*sin(m*phi)/r;
534 // If we don't have Stokes flow then we need to overwrite the Stokes solution by
535 // reading in the correct similarity solution from file
536 const double Re = re();
539 double similarity_solution,dsimilarity_solution;
540 get_similarity_solution(theta,Alpha,similarity_solution,dsimilarity_solution);
541 double A = Global_Physical_Variables::P2/Alpha;
543 exact_u = similarity_solution/(r*Alpha);
544 exact_p = 2.*(exact_u/r)-(A/(2.*Alpha*Alpha))*((1./(r*r))-1.);
545 exact_dudr = -(exact_u/r);
546 exact_dudphi = dsimilarity_solution/(r*Alpha);
549 // exact pressure and error
550 outfile << exact_p << " " << (interpolated_p_pnst(s)-exact_p) << " ";
552 // r and theta for better plotting
553 outfile << r << " " << phi << " ";
555 // exact and oomph du/dr and du/dphi?
556 outfile << exact_u << " " << (interpolated_u_pnst(s,0)-exact_u) << " ";
557 outfile << exact_dudr << " " << (interpolated_dudx_pnst(s,0,0)-exact_dudr) << " ";
558 outfile << exact_dudphi << " " << (interpolated_dudx_pnst(s,0,1)-exact_dudphi) << " ";
560 outfile << std::endl;
562 outfile << std::endl;
572 const unsigned &nplot)
584 for (
unsigned iplot=0;iplot<num_plot_points;iplot++)
591 for(
unsigned i=0;
i<2;
i++)
598 for(
unsigned i=0;
i<2;
i++)
608 fprintf(file_pt,
"\n");
620 const unsigned &nplot)
636 unsigned n_node =
nnode();
644 for (
unsigned iplot=0;iplot<num_plot_points;iplot++)
661 for(
unsigned i=0;
i<2;
i++)
666 for(
unsigned j=0;j<2;j++)
668 interpolated_dudx(
i,j) = 0.0;
675 for(
unsigned l=0;l<n_node;l++)
678 for(
unsigned i=0;
i<2;
i++)
685 for(
unsigned j=0;j<2;j++)
687 interpolated_dudx(
i,j) +=
u_pnst(l,
i)*dpsifdx(l,j);
695 for(
unsigned i=0;
i<2;
i++)
698 for (
unsigned k=0;k<2;k++)
700 dudt_ALE[
i]-=mesh_veloc[k]*interpolated_dudx(
i,k);
706 for(
unsigned i=0;
i<2;
i++)
712 for(
unsigned i=0;
i<2;
i++)
721 for(
unsigned i=0;
i<2;
i++)
723 outfile << dudt_ALE[
i] <<
" ";
730 outfile << std::endl;
752 for(
unsigned ipt=0;ipt<n_intpt;ipt++)
756 for(
unsigned i=0;
i<2;
i++)
773 double local_diss=0.0;
774 for(
unsigned i=0;
i<2;
i++)
776 for(
unsigned j=0;j<2;j++)
778 local_diss+=2.0*strainrate(
i,j)*strainrate(
i,j);
782 diss+=local_diss*w*J;
807 for (
unsigned i=0;
i<2;
i++)
809 traction[
i]=-press*N[
i];
810 for (
unsigned j=0;j<2;j++)
812 traction[
i]+=2.0*strainrate(
i,j)*N[j];
828 double local_diss=0.0;
829 for(
unsigned i=0;
i<2;
i++)
831 for(
unsigned j=0;j<2;j++)
833 local_diss+=2.0*strainrate(
i,j)*strainrate(
i,j);
849 if ((strainrate.
ncol()!=2)||(strainrate.
nrow()!=2))
851 std::ostringstream error_stream;
852 error_stream <<
"Wrong size " << strainrate.
ncol() <<
" " 853 << strainrate.
nrow() << std::endl;
855 OOMPH_CURRENT_FUNCTION,
856 OOMPH_EXCEPTION_LOCATION);
864 unsigned n_node =
nnode();
874 unsigned u_nodal_index[2];
884 for(
unsigned i=0;
i<2;
i++)
886 interpolated_u[
i] = 0.0;
887 interpolated_x[
i] = 0.0;
888 for(
unsigned j=0;j<2;j++)
890 interpolated_dudx(
i,j) = 0.0;
896 for(
unsigned l=0;l<n_node;l++)
899 for(
unsigned i=0;
i<2;
i++)
903 interpolated_u[
i] += u_value*psif[l];
907 for(
unsigned j=0;j<2;j++)
909 interpolated_dudx(i,j) += u_value*dpsifdx(l,j);
914 const double Alpha =
alpha();
916 strainrate(0,0)=interpolated_dudx(0,0);
917 strainrate(1,1)=(1./(Alpha*interpolated_x[0]))*interpolated_dudx(1,1)+(interpolated_u[0]/interpolated_x[0]);
918 strainrate(1,0)=0.5*(interpolated_dudx(1,0)-(interpolated_u[1]/interpolated_x[0])+(1./(Alpha*interpolated_x[0]))*interpolated_dudx(0,1));
919 strainrate(0,1)=strainrate(1,0);
932 if ((strainrate.
ncol()!=2)||(strainrate.
nrow()!=2))
934 std::ostringstream error_stream;
935 error_stream <<
"Wrong size " << strainrate.
ncol() <<
" " 936 << strainrate.
nrow() << std::endl;
938 OOMPH_CURRENT_FUNCTION,
939 OOMPH_EXCEPTION_LOCATION);
947 unsigned n_node =
nnode();
957 unsigned u_nodal_index[2];
967 for(
unsigned i=0;
i<2;
i++)
969 interpolated_u[
i] = 0.0;
970 interpolated_x[
i] = 0.0;
971 for(
unsigned j=0;j<2;j++)
973 interpolated_dudx(
i,j) = 0.0;
979 for(
unsigned l=0;l<n_node;l++)
982 for(
unsigned i=0;
i<2;
i++)
986 interpolated_u[
i] += u_value*psif[l];
990 for(
unsigned j=0;j<2;j++)
992 interpolated_dudx(i,j) += u_value*dpsifdx(l,j);
997 const double Alpha =
alpha();
999 strainrate(0,0)=interpolated_dudx(0,0);
1000 strainrate(1,1)=(1./(Alpha*interpolated_x[0]))*interpolated_dudx(1,1)+(interpolated_u[0]/interpolated_x[0]);
1001 strainrate(1,0)=0.5*(interpolated_dudx(1,0)-(interpolated_u[1]/interpolated_x[0])+(1./(Alpha*interpolated_x[0]))*interpolated_dudx(0,1));
1002 strainrate(0,1)=strainrate(1,0);
1004 strainrate(0,0)*=interpolated_x[0];
1005 strainrate(1,1)*=interpolated_x[0];
1006 strainrate(1,0)*=interpolated_x[0];
1007 strainrate(0,1)*=interpolated_x[0];
1032 for(
unsigned ipt=0;ipt<n_intpt;ipt++)
1035 for(
unsigned i=0;
i<2;
i++)
1047 double veloc_squared=0.0;
1048 for(
unsigned i=0;
i<2;
i++)
1053 kin_en+=0.5*veloc_squared*w*J;
1076 for(
unsigned ipt=0;ipt<n_intpt;ipt++)
1080 for(
unsigned i=0;
i<2;
i++)
1127 unsigned n_node =
nnode();
1133 unsigned u_nodal_index[2];
1137 Shape psif(n_node), testf(n_node);
1138 DShape dpsifdx(n_node,2), dtestfdx(n_node,2);
1141 Shape psip(n_pres), testp(n_pres);
1150 const double Re =
re();
1151 const double Alpha =
alpha();
1152 const double Re_St =
re_st();
1155 int local_eqn=0, local_unknown=0;
1158 for(
unsigned ipt=0;ipt<n_intpt;ipt++)
1177 double interpolated_p=0.0;
1185 for(
unsigned i=0;
i<2;
i++)
1189 interpolated_u[
i] = 0.0;
1190 interpolated_x[
i] = 0.0;
1191 for(
unsigned j=0;j<2;j++)
1193 interpolated_dudx(
i,j) = 0.0;
1198 for(
unsigned l=0;l<n_pres;l++) interpolated_p +=
p_pnst(l)*psip[l];
1203 for(
unsigned l=0;l<n_node;l++)
1206 for(
unsigned i=0;
i<2;
i++)
1209 double u_value = this->
nodal_value(l,u_nodal_index[
i]);
1210 interpolated_u[
i] += u_value*psif[l];
1216 for(
unsigned j=0;j<2;j++)
1218 interpolated_dudx(i,j) += u_value*dpsifdx(l,j);
1227 for(
unsigned l=0;l<n_node;l++)
1238 residuals[local_eqn] += ((interpolated_p/interpolated_x[0])
1239 - ((1.+
Gamma[i])/pow(interpolated_x[0],2.))*((1./Alpha)*interpolated_dudx(1,1)+interpolated_u[0]))
1240 *testf[l]*interpolated_x[0]*Alpha*
W;
1243 residuals[local_eqn] += (interpolated_p - (1.+
Gamma[
i])*interpolated_dudx(0,0))
1244 *dtestfdx(l,0)*interpolated_x[0]*Alpha*
W;
1247 residuals[local_eqn] -= ((1./(interpolated_x[0]*Alpha))*interpolated_dudx(0,1)
1248 - (interpolated_u[1]/interpolated_x[0])
1249 +
Gamma[i]*interpolated_dudx(1,0))
1250 *(1./(interpolated_x[0]*Alpha))*dtestfdx(l,1)*interpolated_x[0]*Alpha*
W;
1253 residuals[local_eqn] -= Re*(interpolated_u[0]*interpolated_dudx(0,0)
1254 +(interpolated_u[1]/(interpolated_x[0]*Alpha))*interpolated_dudx(0,1)
1255 -(pow(interpolated_u[1],2.)/interpolated_x[0]))
1256 *testf[l]*interpolated_x[0]*Alpha*
W;
1263 for(
unsigned l2=0;l2<n_node;l2++)
1270 if(local_unknown >= 0)
1273 jacobian(local_eqn,local_unknown)
1274 -= (1.+
Gamma[
i])*(psif[l2]/pow(interpolated_x[0],2.))*testf[l]*interpolated_x[0]*Alpha*W;
1276 jacobian(local_eqn,local_unknown)
1277 -= (1.+
Gamma[
i])*dpsifdx(l2,0)*dtestfdx(l,0)*interpolated_x[0]*Alpha*
W;
1279 jacobian(local_eqn,local_unknown)
1280 -= (1./(interpolated_x[0]*Alpha))*dpsifdx(l2,1)*(1./(interpolated_x[0]*Alpha))*dtestfdx(l,1)*interpolated_x[0]*Alpha*
W;
1283 jacobian(local_eqn,local_unknown)
1284 -= Re*(psif[l2]*interpolated_dudx(0,0)+interpolated_u[0]*dpsifdx(l2,0)
1285 +(interpolated_u[1]/(interpolated_x[0]*Alpha))*dpsifdx(l2,1))*testf[l]*interpolated_x[0]*Alpha*W;
1290 mass_matrix(local_eqn, local_unknown) +=
1291 Re_St*psif[l2]*testf[l]*interpolated_x[0]*Alpha*
W;
1302 if(local_unknown >= 0)
1305 jacobian(local_eqn,local_unknown)
1306 -= ((1.+
Gamma[
i])/(pow(interpolated_x[0],2.)*Alpha))*dpsifdx(l2,1)*testf[l]*interpolated_x[0]*Alpha*
W;
1308 jacobian(local_eqn,local_unknown)
1309 -= (-(psif[l2]/interpolated_x[0])+
Gamma[i]*dpsifdx(l2,0))
1310 *(1./(interpolated_x[0]*Alpha))*dtestfdx(l,1)*interpolated_x[0]*Alpha*
W;
1313 jacobian(local_eqn,local_unknown)
1314 -= Re*((psif[l2]/(interpolated_x[0]*Alpha))*interpolated_dudx(0,1)-2*interpolated_u[1]*(psif[l2]/interpolated_x[0]))
1315 *testf[l]*interpolated_x[0]*Alpha*
W;
1324 for(
unsigned l2=0;l2<n_pres;l2++)
1328 if(local_unknown >= 0)
1330 jacobian(local_eqn,local_unknown)
1331 += (psip[l2]/interpolated_x[0])*testf[l]*interpolated_x[0]*Alpha*W;
1333 jacobian(local_eqn,local_unknown)
1334 += psip[l2]*dtestfdx(l,0)*interpolated_x[0]*Alpha*
W;
1349 residuals[local_eqn] += ((1./(pow(interpolated_x[0],2.)*Alpha))*interpolated_dudx(0,1)
1350 -(interpolated_u[1]/pow(interpolated_x[0],2.))
1351 +
Gamma[i]*(1./interpolated_x[0])*interpolated_dudx(1,0))
1352 *testf[l]*interpolated_x[0]*Alpha*W;
1355 residuals[local_eqn] -= (interpolated_dudx(1,0)
1356 +
Gamma[
i]*((1./(interpolated_x[0]*Alpha))*interpolated_dudx(0,1)-(interpolated_u[1]/interpolated_x[0])))
1357 *dtestfdx(l,0)*interpolated_x[0]*Alpha*
W;
1360 residuals[local_eqn] += (interpolated_p
1361 -(1.+
Gamma[
i])*((1./(interpolated_x[0]*Alpha))*interpolated_dudx(1,1)+(interpolated_u[0]/interpolated_x[0])))
1362 *(1./(interpolated_x[0]*Alpha))*dtestfdx(l,1)*interpolated_x[0]*Alpha*
W;
1365 residuals[local_eqn] -= Re*(interpolated_u[0]*interpolated_dudx(1,0)
1366 +(interpolated_u[1]/(interpolated_x[0]*Alpha))*interpolated_dudx(1,1)
1367 +((interpolated_u[0]*interpolated_u[1])/interpolated_x[0]))
1368 *testf[l]*interpolated_x[0]*Alpha*W;
1374 for(
unsigned l2=0;l2<n_node;l2++)
1381 if(local_unknown >= 0)
1384 jacobian(local_eqn,local_unknown)
1385 += (1./(pow(interpolated_x[0],2.)*Alpha))*dpsifdx(l2,1)
1386 *testf[l]*interpolated_x[0]*Alpha*
W;
1388 jacobian(local_eqn,local_unknown)
1389 -=
Gamma[
i]*(1./(interpolated_x[0]*Alpha))*dpsifdx(l2,1)
1390 *dtestfdx(l,0)*interpolated_x[0]*Alpha*
W;
1392 jacobian(local_eqn,local_unknown)
1393 -= (1+
Gamma[
i])*(psif[l2]/interpolated_x[0])*(1./(interpolated_x[0]*Alpha))
1394 *dtestfdx(l,1)*interpolated_x[0]*Alpha*
W;
1397 jacobian(local_eqn,local_unknown)
1398 -= Re*(psif[l2]*interpolated_dudx(1,0)+(psif[l2]*interpolated_u[1]/interpolated_x[0]))
1399 *testf[l]*interpolated_x[0]*Alpha*
W;
1408 if(local_unknown >= 0)
1411 jacobian(local_eqn,local_unknown)
1412 += (-(psif[l2]/pow(interpolated_x[0],2.))+
Gamma[i]*(1./interpolated_x[0])*dpsifdx(l2,0))
1413 *testf[l]*interpolated_x[0]*Alpha*W;
1415 jacobian(local_eqn,local_unknown)
1416 -= (dpsifdx(l2,0)-
Gamma[
i]*(psif[l2]/interpolated_x[0]))
1417 *dtestfdx(l,0)*interpolated_x[0]*Alpha*
W;
1419 jacobian(local_eqn,local_unknown)
1420 -= (1.+
Gamma[
i])*(1./(interpolated_x[0]*Alpha))*dpsifdx(l2,1)
1421 *(1./(interpolated_x[0]*Alpha))*dtestfdx(l,1)*interpolated_x[0]*Alpha*
W;
1424 jacobian(local_eqn,local_unknown)
1425 -= Re*(interpolated_u[0]*dpsifdx(l2,0)+(psif[l2]/(interpolated_x[0]*Alpha))*interpolated_dudx(1,1)
1426 +(interpolated_u[1]/(interpolated_x[0]*Alpha))*dpsifdx(l2,1)+(interpolated_u[0]*psif[l2]/interpolated_x[0]))
1427 *testf[l]*interpolated_x[0]*Alpha*
W;
1432 mass_matrix(local_eqn, local_unknown)
1433 += Re_St*psif[l2]*testf[l]*interpolated_x[0]*Alpha*
W;
1443 for(
unsigned l2=0;l2<n_pres;l2++)
1447 if(local_unknown >= 0)
1449 jacobian(local_eqn,local_unknown)
1450 += (psip[l2]/interpolated_x[0])*(1./Alpha)*dtestfdx(l,1)*interpolated_x[0]*Alpha*
W;
1466 for(
unsigned l=0;l<n_pres;l++)
1472 residuals[local_eqn] += (interpolated_dudx(0,0)+(interpolated_u[0]/interpolated_x[0])+(1./(interpolated_x[0]*Alpha))*interpolated_dudx(1,1))
1473 *testp[l]*interpolated_x[0]*Alpha*W;
1480 for(
unsigned l2=0;l2<n_node;l2++)
1486 if(local_unknown >= 0)
1488 jacobian(local_eqn,local_unknown)
1489 += (dpsifdx(l2,0)+(psif[l2]/interpolated_x[0]))*testp[l]*interpolated_x[0]*Alpha*
W;
1497 if(local_unknown >= 0)
1499 jacobian(local_eqn,local_unknown)
1500 += (1./(interpolated_x[0]*Alpha))*dpsifdx(l2,1)*testp[l]*interpolated_x[0]*Alpha*
W;
1522 ={2,2,2,2,2,2,2,2,2};
1529 {
return Initial_Nvalue[n];}
1540 unsigned n_node = this->
nnode();
1541 for(
unsigned n=0;n<n_node;n++)
1545 for(
unsigned i=0;
i<2;
i++)
1547 paired_load_data.insert(std::make_pair(this->
node_pt(n),
i));
1553 for(
unsigned l=0;l<n_internal;l++)
1557 for (
unsigned j=0;j<nval;j++)
1584 unsigned n_node = this->
nnode();
1585 for(
unsigned n=0;n<n_node;n++)
1589 for(
unsigned i=0;
i<2;
i++)
1591 paired_load_data.insert(std::make_pair(this->
node_pt(n),
i));
1597 for(
unsigned l=0;l<n_pres;l++)
1601 paired_load_data.insert(std::make_pair(this->
node_pt(Pconv[l]),2));
virtual std::string tecplot_zone_string(const unsigned &nplot) const
Return string for tecplot zone header (when plotting nplot points in each "coordinate direction") ...
void get_load_data(std::set< std::pair< Data *, unsigned > > &paired_load_data)
Add to the set paired_load_data pairs of pointers to data objects and unsigned integers that index th...
void full_output(std::ostream &outfile)
Full output function: x,y,[z],u,v,[w],p,du/dt,dv/dt,[dw/dt],dissipation in tecplot format...
unsigned long nrow() const
Return the number of rows of the matrix.
static int Pressure_not_stored_at_node
Static "magic" number that indicates that the pressure is not stored at a node.
unsigned long ncol() const
Return the number of columns of the matrix.
virtual void get_s_plot(const unsigned &i, const unsigned &nplot, Vector< double > &s, const bool &shifted_to_interior=false) const
Get cector of local coordinates of plot point i (when plotting nplot points in each "coordinate direc...
virtual unsigned npres_pnst() const =0
Function to return number of pressure degrees of freedom.
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 ...
void interpolated_u_pnst(const Vector< double > &s, Vector< double > &veloc) const
Compute vector of FE interpolated velocity u at local coordinate s.
static double Default_Physical_Constant_Value
Static default value for the physical constants (all initialised to zero)
void output_veloc(std::ostream &outfile, const unsigned &nplot, const unsigned &t)
Output function: x,y,[z],u,v,[w] in tecplot format. nplot points in each coordinate direction at time...
void(* UnsteadyExactSolutionFctPt)(const double &, const Vector< double > &, Vector< double > &)
Function pointer for function that computes Vector-valued time-dependent function as ...
const double & alpha() const
Alpha.
virtual void pshape_pnst(const Vector< double > &s, Shape &psi) const =0
Compute the pressure shape functions at local coordinate s.
virtual double p_pnst(const unsigned &n_p) const =0
Pressure at local pressure "node" n_p Uses suitably interpolated value for hanging nodes...
unsigned nvalue() const
Return number of values stored in data object (incl pinned ones).
virtual double weight(const unsigned &i) const =0
Return weight of i-th integration point.
void get_load_data(std::set< std::pair< Data *, unsigned > > &paired_load_data)
Add to the set paired_load_data pairs of pointers to data objects and unsigned integers that index th...
virtual unsigned nplot_points(const unsigned &nplot) const
Return total number of plot points (when plotting nplot points in each "coordinate direction") ...
virtual void fill_in_generic_residual_contribution(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix, unsigned flag)
Compute the residuals for the Navier–Stokes equations; flag=1(or 0): do (or don't) compute the Jacob...
void get_traction(const Vector< double > &s, const Vector< double > &N, Vector< double > &traction)
Compute traction (on the viscous scale) at local coordinate s for outer unit normal N...
void(* SteadyExactSolutionFctPt)(const Vector< double > &, Vector< double > &)
Function pointer for function that computes vector-valued steady "exact solution" as ...
virtual double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s.
double dshape_eulerian(const Vector< double > &s, Shape &psi, DShape &dpsidx) const
Compute the geometric shape functions and also first derivatives w.r.t. global coordinates at local c...
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
virtual double knot(const unsigned &i, const unsigned &j) const =0
Return local coordinate s[j] of i-th integration point.
Data *& internal_data_pt(const unsigned &i)
Return a pointer to i-th internal data object.
virtual void write_tecplot_zone_footer(std::ostream &outfile, const unsigned &nplot) const
Add tecplot zone "footer" to output stream (when plotting nplot points in each "coordinate direction"...
virtual unsigned u_index_pnst(const unsigned &i) const
Return the index at which the i-th unknown velocity component.
static const unsigned Pconv[]
Static array of ints to hold conversion from pressure node numbers to actual node numbers...
static double Default_Physical_Ratio_Value
Static default value for the physical ratios (all are initialised to one)
double dissipation() const
Return integral of dissipation over element.
static Vector< double > Gamma
Vector to decide whether the stress-divergence form is used or not.
double pressure_integral() const
Integral of pressure over element.
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
double nodal_value(const unsigned &n, const unsigned &i) const
Return the i-th value stored at local node n. Produces suitably interpolated values for hanging nodes...
void strain_rate_by_r(const Vector< double > &s, DenseMatrix< double > &strain_rate) const
Function to return polar strain multiplied by r.
double du_dt_pnst(const unsigned &n, const unsigned &i) const
i-th component of du/dt at local node n. Uses suitably interpolated value for hanging nodes...
static Vector< double > Default_Gravity_vector
Static default value for the gravity vector.
const double & re() const
Reynolds number.
virtual double dshape_and_dtest_eulerian_at_knot_pnst(const unsigned &ipt, Shape &psi, DShape &dpsidx, Shape &test, DShape &dtestdx) const =0
Compute the shape functions and derivatives w.r.t. global coords at ipt-th integration point Return J...
unsigned ninternal_data() const
Return the number of internal data objects.
void output(std::ostream &outfile)
Output functionget_vels(const Vector<double>& x_to_get, Vector<double>& vels): x,y,[z],u,v,[w],p in tecplot format. Default number of plot points.
virtual int p_local_eqn(const unsigned &n)=0
Access function for the local equation number information for the pressure. p_local_eqn[n] = local eq...
void compute_error(std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
Validate against exact solution at given time Solution is provided via function pointer. Plot at a given number of plot points and compute L2 error and L2 norm of velocity solution over element.
virtual unsigned nweight() const =0
Return the number of integration points of the scheme.
const double & re_st() const
Product of Reynolds and Strouhal number (=Womersley number)
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.
void output_fct(std::ostream &outfile, const unsigned &nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Output exact solution specified via function pointer at a given number of plot points. Function prints as many components as are returned in solution Vector.
virtual double u_pnst(const unsigned &n, const unsigned &i) const =0
Velocity i at local node n. Uses suitably interpolated value for hanging nodes.
static const unsigned Initial_Nvalue[]
Static array of ints to hold required number of variables at nodes.
unsigned nnode() const
Return the number of nodes.
double kin_energy() const
Get integral of kinetic energy over element.
double interpolated_p_pnst(const Vector< double > &s) const
Return FE interpolated pressure at local coordinate s.
virtual double J_eulerian(const Vector< double > &s) const
Return the Jacobian of mapping from local to global coordinates at local position s...
static const unsigned Initial_Nvalue[]
Static array of ints to hold number of variables at node.
virtual unsigned required_nvalue(const unsigned &n) const
Number of values (pinned or dofs) required at local node n.
virtual void shape(const Vector< double > &s, Shape &psi) const =0
Calculate the geometric shape functions at local coordinate s. This function must be overloaded for e...
void strain_rate(const Vector< double > &s, DenseMatrix< double > &strain_rate) const
Strain-rate tensor: Now returns polar strain.
int nodal_local_eqn(const unsigned &n, const unsigned &i) const
Return the local equation number corresponding to the i-th value at the n-th local node...