42 double AxisymmetricPoroelasticityEquations::
43 Default_youngs_modulus_value = 1.0;
48 double AxisymmetricPoroelasticityEquations::
49 Default_lambda_sq_value=1.0;
54 double AxisymmetricPoroelasticityEquations::
55 Default_density_ratio_value=1.0;
61 double AxisymmetricPoroelasticityEquations::
62 Default_permeability_value=1.0;
70 double AxisymmetricPoroelasticityEquations::
71 Default_permeability_ratio_value=1.0;
76 double AxisymmetricPoroelasticityEquations::
77 Default_alpha_value=1.0;
82 double AxisymmetricPoroelasticityEquations::
83 Default_porosity_value=1.0;
91 const Shape &q_basis_local,
110 const unsigned n_q_basis = this->
nq_basis();
113 for(
unsigned l=0;l<n_q_basis;l++)
116 for(
unsigned i=0;
i<2;
i++)
124 for(
unsigned i=0;
i<2;
i++)
127 for(
unsigned j=0;j<2;j++)
131 double jac_trans = jacobian(j,
i)/det;
134 for(
unsigned l=0;l<n_q_basis;l++)
137 q_basis(l,
i) += jac_trans*q_basis_local(l,j);
155 const unsigned &nplot)
169 for(
unsigned iplot=0;iplot<num_plot_points;iplot++)
175 for(
unsigned i=0;
i<2;
i++)
181 for(
unsigned i=0;
i<2;
i++)
187 for(
unsigned i=0;
i<2;
i++)
200 outfile << du_dt[0] <<
" ";
201 outfile << du_dt[1] <<
" ";
203 outfile << std::endl;
216 std::ostream &outfile,
217 const unsigned &nplot,
235 for(
unsigned iplot=0;iplot<num_plot_points;iplot++)
244 (*exact_soln_pt)(x,exact_soln);
247 for(
unsigned i=0;
i<2;
i++)
249 outfile << x[
i] <<
" ";
251 for(
unsigned i=0;
i<13;
i++)
253 outfile << exact_soln[
i] <<
" ";
255 outfile << std::endl;
267 std::ostream &outfile,
268 const unsigned &nplot,
287 for(
unsigned iplot=0;iplot<num_plot_points;iplot++)
296 (*exact_soln_pt)(time,x,exact_soln);
299 for(
unsigned i=0;
i<2;
i++)
301 outfile << x[
i] <<
" ";
303 for(
unsigned i=0;
i<13;
i++)
305 outfile << exact_soln[
i] <<
" ";
307 outfile << std::endl;
319 std::ostream &outfile,
324 for(
unsigned i=0;
i<3;
i++)
339 outfile <<
"ZONE" << std::endl;
345 for(
unsigned ipt=0;ipt<n_intpt;ipt++)
348 for(
unsigned i=0;
i<2;
i++)
366 (*exact_soln_pt)(x,exact_soln);
369 for(
unsigned i=0;
i<2;
i++)
371 norm[0]+=exact_soln[
i]*exact_soln[
i]*
W;
378 for(
unsigned i=0;
i<2;
i++)
380 norm[1]+=exact_soln[2+
i]*exact_soln[2+
i]*
W;
387 norm[1]+=exact_soln[2*2]*exact_soln[2*2]*
W;
392 norm[2]+=exact_soln[2*2+1]*exact_soln[2*2+1]*
W;
397 for(
unsigned i=0;
i<2;
i++)
399 outfile << x[
i] <<
" ";
403 for(
unsigned i=0;
i<2;
i++)
409 for(
unsigned i=0;
i<2;
i++)
417 outfile << std::endl;
426 std::ostream &outfile,
432 for(
unsigned i=0;
i<3;
i++)
447 outfile <<
"ZONE" << std::endl;
453 for(
unsigned ipt=0;ipt<n_intpt;ipt++)
456 for(
unsigned i=0;
i<2;
i++)
474 (*exact_soln_pt)(time,x,exact_soln);
477 for(
unsigned i=0;
i<2;
i++)
479 norm[0]+=exact_soln[
i]*exact_soln[
i]*
W;
486 for(
unsigned i=0;
i<2;
i++)
488 norm[1]+=exact_soln[2+
i]*exact_soln[2+
i]*
W;
495 norm[1]+=exact_soln[2*2]*exact_soln[2*2]*
W;
500 norm[2]+=exact_soln[2*2+1]*exact_soln[2*2+1]*
W;
505 for(
unsigned i=0;
i<2;
i++)
507 outfile << x[
i] <<
" ";
511 for(
unsigned i=0;
i<2;
i++)
517 for(
unsigned i=0;
i<2;
i++)
525 outfile << std::endl;
540 const unsigned n_node =
nnode();
541 const unsigned n_q_basis =
nq_basis();
543 const unsigned n_p_basis =
np_basis();
547 u_basis(n_node), u_test(n_node),
548 q_basis(n_q_basis,2), q_test(n_q_basis,2),
549 p_basis(n_p_basis), p_test(n_p_basis),
550 div_q_basis_ds(n_q_basis), div_q_test_ds(n_q_basis);
552 DShape dpsidx(n_node,2), du_basis_dx(n_node,2), du_test_dx(n_node,2);
567 double mass_source_local=0.0;
570 double nu_local = this->
nu();
575 youngs_modulus_local*nu_local/(1.0+nu_local)/(1.0-2.0*nu_local);
577 double mu = youngs_modulus_local/2.0/(1.0+nu_local);
599 double rho_f_over_rho = density_ratio/(1.0+porosity*(density_ratio-1.0));
605 int local_eqn = 0, local_unknown = 0;
608 for(
unsigned ipt=0;ipt<n_intpt;ipt++)
622 du_basis_dx,du_test_dx,
625 div_q_basis_ds,div_q_test_ds);
631 double interpolated_div_du_dt_dx=0.0;
632 double interpolated_du_r_dt=0.0;
635 double interpolated_div_q_ds=0.0;
640 for(
unsigned l=0;l<n_node;l++)
643 for(
unsigned i=0;
i<2;
i++)
646 interpolated_d2u_dt2[
i] += this->
d2u_dt2(l,
i)*u_basis(l);
649 const double u_value =
651 interpolated_u[
i] += u_value*u_basis(l);
654 for(
unsigned j=0;j<2;j++)
656 interpolated_du_dx(
i,j) += u_value*du_basis_dx(l,j);
660 interpolated_div_du_dt_dx += this->
du_dt(l,
i)*du_basis_dx(l,
i);
664 interpolated_du_r_dt +=
du_dt(l,0)*u_basis(l);
669 for(
unsigned i=0;
i<2;
i++)
672 for(
unsigned l=0;l<n_q_basis_edge;l++)
674 interpolated_q[
i] +=
q_edge(l)*q_basis(l,
i);
678 for(
unsigned l=n_q_basis_edge;l<n_q_basis;l++)
680 interpolated_q[
i] +=
q_internal(l-n_q_basis_edge)*q_basis(l,
i);
686 for(
unsigned l=0;l<n_p_basis;l++)
688 interpolated_p +=
p_value(l)*p_basis(l);
693 for(
unsigned l=0;l<n_q_basis_edge;l++)
695 interpolated_div_q_ds +=
q_edge(l)*div_q_basis_ds(l);
697 for(
unsigned l=n_q_basis_edge;l<n_q_basis;l++)
699 interpolated_div_q_ds +=
q_internal(l-n_q_basis_edge)*div_q_basis_ds(l);
709 this->
mass_source(time,interpolated_x,mass_source_local);
711 double r=interpolated_x[0];
716 double u_r=interpolated_u[0];
717 double du_r_dr=interpolated_du_dx(0,0);
718 double du_r_dz=interpolated_du_dx(0,1);
719 double du_z_dr=interpolated_du_dx(1,0);
720 double du_z_dz=interpolated_du_dx(1,1);
725 for(
unsigned l=0;l<n_node;l++)
727 for(
unsigned a=0;a<2;a++)
733 residuals[local_eqn] +=
735 (interpolated_d2u_dt2[a] +
736 rho_f_over_rho*local_permeability*interpolated_dq_dt[a])
737 - f_solid[a])*u_test(l)*r*w*J;
742 residuals[local_eqn] +=
745 2.0*du_r_dr*du_test_dx(l,0)+
746 du_test_dx(l,1)*(du_r_dz+du_z_dr)+
747 2.0*u_test(l)/pow(r,2)*(u_r)
750 lambda*(du_r_dr+u_r/r+du_z_dz)
751 -alpha*interpolated_p
753 *(du_test_dx(l,0)+u_test(l)/r)
758 residuals[local_eqn] +=
761 du_test_dx(l,0)*(du_r_dz+du_z_dr)
763 2.0*du_z_dz*du_test_dx(l,1)
766 lambda*(du_r_dr+u_r/r+du_z_dz)
776 "a should equal 0 or 1",
777 OOMPH_CURRENT_FUNCTION,
778 OOMPH_EXCEPTION_LOCATION);
785 for(
unsigned l2=0;l2<n_node;l2++)
792 2.0*du_basis_dx(l2,0)*du_test_dx(l,0)+
793 du_test_dx(l,1)*du_basis_dx(l2,1)+
794 2*u_test(l)/pow(r,2)*u_basis(l2)
797 lambda*(du_basis_dx(l2,0)+u_basis(l2)/r)
798 )*(du_test_dx(l,0)+u_test(l)/r)
806 mu*du_test_dx(l,1)*du_basis_dx(l2,0)+
807 lambda*du_basis_dx(l2,1)*(du_test_dx(l,0)+u_test(l)/r)
814 mu*du_test_dx(l,0)*du_basis_dx(l2,1)+
815 lambda*(du_basis_dx(l2,0)+u_basis(l2)/r)*du_test_dx(l,1)
820 du_test_dx(l,0)*du_basis_dx(l2,0)+
821 2.0*du_basis_dx(l2,1)*du_test_dx(l,1)
823 +lambda*du_basis_dx(l2,1)*du_test_dx(l,1)
830 for(
unsigned c=0;c<2;c++)
838 jacobian(local_eqn,local_unknown) += G_r;
842 jacobian(local_eqn,local_unknown) += G_z;
849 for(
unsigned l2=0;l2<n_q_basis;l2++)
853 if(l2<n_q_basis_edge)
868 jacobian(local_eqn,local_unknown)+=
869 lambda_sq*rho_f_over_rho*
870 local_permeability*timestepper_pt->
weight(1,0)*
871 q_basis(l2,a)*u_test(l)*r*w*J;
876 for(
unsigned l2=0;l2<n_p_basis;l2++)
883 jacobian(local_eqn,local_unknown)-=
884 alpha*p_basis(l2)*(du_test_dx(l,0)+u_test(l)/r)*r*w*J;
888 jacobian(local_eqn,local_unknown)-=
889 alpha*p_basis(l2)*du_test_dx(l,1)*r*w*J;
903 for(
unsigned l=0;l<n_q_basis;l++)
917 for(
unsigned i=0;
i<2;
i++)
919 residuals[local_eqn] +=
921 rho_f_over_rho*lambda_sq*
922 (interpolated_d2u_dt2[
i]+
923 (local_permeability/
porosity)*interpolated_dq_dt[
i])
925 local_permeability_ratio-rho_f_over_rho*f_fluid[
i]
931 residuals[local_eqn] -=
932 interpolated_p*div_q_test_ds(l)*r*w;
935 residuals[local_eqn] -=
936 interpolated_p*q_test(l,0)*w*J;
942 for(
unsigned l2=0;l2<n_node;l2++)
944 for(
unsigned c=0;c<2;c++)
950 jacobian(local_eqn,local_unknown)+=
951 rho_f_over_rho*lambda_sq*
953 u_basis(l2)*q_test(l,c)*r*w*J;
959 for(
unsigned l2=0;l2<n_q_basis;l2++)
963 if(l2<n_q_basis_edge)
978 for(
unsigned c=0;c<2;c++)
980 jacobian(local_eqn,local_unknown)+=
981 q_basis(l2,c)*q_test(l,c)*
982 (1.0/local_permeability_ratio+
983 rho_f_over_rho*lambda_sq*local_permeability*
990 for(
unsigned l2=0;l2<n_p_basis;l2++)
996 jacobian(local_eqn,local_unknown)-=
1008 for(
unsigned l=0;l<n_p_basis;l++)
1017 residuals[local_eqn] +=alpha*interpolated_div_du_dt_dx*p_test(l)*r*w*J;
1018 residuals[local_eqn] += alpha*interpolated_du_r_dt*p_test(l)*w*J;
1020 residuals[local_eqn] +=
1021 local_permeability*interpolated_div_q_ds*p_test(l)*r*w;
1023 residuals[local_eqn] +=
1024 local_permeability*interpolated_q[0]*p_test(l)*w*J;
1025 residuals[local_eqn] -= mass_source_local*p_test(l)*r*w*J;
1031 for(
unsigned l2=0;l2<n_node;l2++)
1033 for(
unsigned c=0;c<2;c++)
1038 if(local_unknown>=0)
1040 jacobian(local_eqn,local_unknown)+=
1042 du_basis_dx(l2,c)*p_test(l)*r*w*J;
1047 jacobian(local_eqn,local_unknown)+=
1049 u_basis(l2)*p_test(l)*w*J;
1056 for(
unsigned l2=0;l2<n_q_basis;l2++)
1058 if(l2<n_q_basis_edge)
1067 if(local_unknown>=0)
1069 jacobian(local_eqn,local_unknown)+=
1070 (div_q_basis_ds(l2)*r
1072 )*local_permeability*p_test(l)*w;
virtual unsigned q_internal_index() const =0
Return the index of the internal data where the q internal degrees of freedom are stored...
virtual std::string tecplot_zone_string(const unsigned &nplot) const
Return string for tecplot zone header (when plotting nplot points in each "coordinate direction") ...
double raw_nodal_value(const unsigned &n, const unsigned &i) const
Return the i-th value stored at local node n but do NOT take hanging nodes into account.
virtual unsigned nq_basis_edge() const =0
Return the number of edge basis functions for q.
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...
void compute_error(std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, Vector< double > &error, Vector< double > &norm)
Compute the error between the FE solution and the exact solution using the H(div) norm for q and L^2 ...
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 ...
const double & youngs_modulus() const
Access function to non-dim Young's modulus (ratio of actual Young's modulus to reference stress used ...
void output_fct(std::ostream &outfile, const unsigned &nplot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Output FE representation of exact soln: x,y,u1,u2,div_q,p at Nplot^2 plot points. ...
virtual unsigned np_basis() const =0
Return the total number of pressure basis functions.
void(* UnsteadyExactSolutionFctPt)(const double &, const Vector< double > &, Vector< double > &)
Function pointer for function that computes Vector-valued time-dependent function as ...
virtual double p_value(const unsigned &j) const =0
Return the jth pressure value.
void interpolated_du_dt(const Vector< double > &s, Vector< double > &du_dt) const
Calculate the FE representation of du_dt.
const double & alpha() const
Access function for alpha, the Biot parameter.
virtual int p_local_eqn(const unsigned &j) const =0
Return the equation number of the j-th pressure degree of freedom.
virtual double weight(const unsigned &i) const =0
Return weight of i-th integration point.
const double & permeability_ratio() const
Access function for the ratio of the material's actual permeability to the permeability used in the n...
virtual unsigned q_edge_node_number(const unsigned &j) const =0
Return the number of the node where the jth edge unknown is stored.
virtual unsigned nplot_points(const unsigned &nplot) const
Return total number of plot points (when plotting nplot points in each "coordinate direction") ...
double dq_edge_dt(const unsigned &n) const
dq_edge/dt for the n-th edge degree of freedom
virtual double local_to_eulerian_mapping(const DShape &dpsids, DenseMatrix< double > &jacobian, DenseMatrix< double > &inverse_jacobian) const
Calculate the mapping from local to Eulerian coordinates, given the derivatives of the shape function...
TimeStepper *& time_stepper_pt()
Access function for pointer to time stepper: Null if object is not time-dependent.
const double & nu() const
Access function for Poisson's ratio.
double d2u_dt2(const unsigned &n, const unsigned &i) const
d^2u/dt^2 at local node 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.
virtual void scale_basis(Shape &basis) const =0
Scale the edge basis to allow arbitrary edge mappings.
virtual void transform_derivatives(const DenseMatrix< double > &inverse_jacobian, DShape &dbasis) const
Convert derivative w.r.t.local coordinates to derivatives w.r.t the coordinates used to assemble the ...
virtual double q_edge(const unsigned &j) const =0
Return the values of the j-th edge (flux) degree of freedom.
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
virtual void fill_in_generic_residual_contribution(Vector< double > &residuals, DenseMatrix< double > &jacobian, bool flag)
Fill in residuals and, if flag==true, jacobian.
void fluid_body_force(const double &time, const Vector< double > &x, Vector< double > &b) const
Indirect access to the fluid body force function - returns 0 if no forcing function has been set...
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"...
double du_dt(const unsigned &n, const unsigned &i) const
du/dt at local node n
virtual void dshape_local(const Vector< double > &s, Shape &psi, DShape &dpsids) const
Function to compute the geometric shape functions and derivatives w.r.t. local coordinates at local c...
void interpolated_q(const Vector< double > &s, Vector< double > &q) const
Calculate the FE representation of q.
double dq_internal_dt(const unsigned &n) const
dq_internal/dt for the n-th internal degree of freedom
double & time()
Return the current value of the continuous time.
double transform_basis(const Vector< double > &s, const Shape &q_basis_local, Shape &psi, DShape &dpsi, Shape &q_basis) const
Performs a div-conserving transformation of the vector basis functions from the reference element to ...
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
virtual int q_internal_local_eqn(const unsigned &j) const =0
Return the equation number of the j-th internal degree of freedom.
const double & lambda_sq() const
Access function for timescale ratio (nondim density)
virtual unsigned u_index_axisym_poroelasticity(const unsigned &j) const =0
Return the nodal index of the j-th solid displacement unknown.
virtual double shape_basis_test_local_at_knot(const unsigned &ipt, Shape &psi, DShape &dpsi, Shape &u_basis, Shape &u_test, DShape &du_basis_dx, DShape &du_test_dx, Shape &q_basis, Shape &q_test, Shape &p_basis, Shape &p_test, Shape &div_q_basis_ds, Shape &div_q_test_ds) const =0
Compute the geometric basis, and the q, p and divergence basis functions and test functions at integr...
virtual unsigned nweight() const =0
Return the number of integration points of the scheme.
Time *const & time_pt() const
Access function for the pointer to time (const version)
TimeStepper *& time_stepper_pt()
Return the pointer to the timestepper.
const double & permeability() const
Access function for the nondim permeability.
void interpolated_div_q(const Vector< double > &s, double &div_q) const
Calculate the FE representation of div u.
void interpolated_u(const Vector< double > &s, Vector< double > &disp) const
Calculate the FE representation of u.
virtual int q_edge_local_eqn(const unsigned &j) const =0
Return the equation number of the j-th edge (flux) degree of freedom.
const double & density_ratio() const
Access function for the density ratio (fluid to solid)
void mass_source(const double &time, const Vector< double > &x, double &b) const
Indirect access to the mass source function - returns 0 if no mass source function has been set...
unsigned nnode() const
Return the number of nodes.
Base class for time-stepping schemes. Timestepper provides an approximation of the temporal derivativ...
virtual double weight(const unsigned &i, const unsigned &j) const
Access function for j-th weight for the i-th derivative.
void output(std::ostream &outfile)
Output with default number of plot points.
virtual unsigned nq_basis() const
Return the total number of computational basis functions for q.
const double & porosity() const
Access function for the porosity.
virtual double q_internal(const unsigned &j) const =0
Return the values of the j-th internal degree of freedom.
virtual double J_eulerian(const Vector< double > &s) const
Return the Jacobian of mapping from local to global coordinates at local position s...
void solid_body_force(const double &time, const Vector< double > &x, Vector< double > &b) const
Indirect access to the solid body force function - returns 0 if no forcing function has been set...
void interpolated_p(const Vector< double > &s, double &p) const
Calculate the FE representation of p.
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...