31 #ifndef OOMPH_AXISYM_FOEPPLVONKARMAN_ELEMENTS_HEADER 32 #define OOMPH_AXISYM_FOEPPLVONKARMAN_ELEMENTS_HEADER 37 #include <oomph-lib-config.h> 40 #include "../generic/nodes.h" 41 #include "../generic/Qelements.h" 42 #include "../generic/oomph_utilities.h" 43 #include "../generic/element_with_external_element.h" 55 class AxisymFoepplvonKarmanEquations :
public virtual FiniteElement
62 (
const double& r,
double& f);
110 const unsigned n_plot=5;
116 void output(std::ostream &outfile,
const unsigned &n_plot);
121 const unsigned n_plot=5;
127 void output(FILE* file_pt,
const unsigned &n_plot);
130 void output_fct(std::ostream &outfile,
const unsigned &n_plot,
136 virtual void output_fct(std::ostream &outfile,
const unsigned &n_plot,
142 "There is no time-dependent output_fct() for Foeppl von Karman" 144 OOMPH_CURRENT_FUNCTION,
145 OOMPH_EXCEPTION_LOCATION);
151 double& error,
double& norm);
157 const double& time,
double& error,
double& norm)
160 "There is no time-dependent compute_error() for Foeppl von Karman" 162 OOMPH_CURRENT_FUNCTION,
163 OOMPH_EXCEPTION_LOCATION);
188 double& pressure)
const 198 (*Pressure_fct_pt)(r,pressure);
208 double& airy_forcing)
const 218 (*Airy_forcing_fct_pt)(r,airy_forcing);
227 const unsigned n_node =
nnode();
243 for(
unsigned l=0;l<n_node;l++)
245 gradient[0] += this->
nodal_value(l,w_nodal_index)*dpsidr(l,0);
262 const unsigned n_node =
nnode();
274 double interpolated_w = 0.0;
277 for(
unsigned l=0;l<n_node;l++)
279 interpolated_w += this->
nodal_value(l,w_nodal_index)*psi[l];
282 return(interpolated_w);
288 double& sigma_phi_phi);
307 unsigned total_fvk_nodal_indices = 6;
310 unsigned n_node =
nnode();
313 for(
unsigned index=first_fvk_nodal_index+2;
314 index<first_fvk_nodal_index+total_fvk_nodal_indices;
318 for(
unsigned inod=0;inod<n_node;inod++)
343 (
const unsigned &ipt,
380 template <
unsigned NNODE_1D>
389 static const unsigned Initial_Nvalue;
415 {
return Initial_Nvalue;}
425 void output(std::ostream &outfile,
const unsigned &n_plot)
435 void output(FILE* file_pt,
const unsigned &n_plot)
440 void output_fct(std::ostream &outfile,
const unsigned &n_plot,
447 void output_fct(std::ostream &outfile,
const unsigned &n_plot,
451 (outfile,n_plot,time,exact_soln_pt);}
465 (
const unsigned& ipt,
484 template<
unsigned NNODE_1D>
512 template<
unsigned NNODE_1D>
545 template <
unsigned NNODE_1D,
class FLUID_ELEMENT>
559 this->set_ninteraction(1);
567 const double &
q()
const {
return *Q_pt;}
577 return this->
nnode();
603 const unsigned n_node = this->
nnode();
612 this->
shape(zeta,psi);
615 double interpolated_w = 0.0;
616 double interpolated_r = 0.0;
619 for(
unsigned l=0;l<n_node;l++)
621 interpolated_w += this->
nodal_value(t,l,w_nodal_index)*psi[l];
622 interpolated_r += this->
node_pt(l)->
x(t,0)*psi[l];
636 const unsigned n_node = this->
nnode();
645 this->
shape(zeta,psi);
648 double interpolated_dwdt = 0.0;
649 double interpolated_drdt = 0.0;
652 for(
unsigned l=0;l<n_node;l++)
661 const unsigned n_time=time_stepper_pt->
ntstorage();
664 for(
unsigned t=0;
t<n_time;
t++)
667 interpolated_dwdt+=time_stepper_pt->
weight(1,
t)*
674 drdt[0]=interpolated_drdt;
675 drdt[1]=interpolated_dwdt;
686 double& pressure)
const 694 const double q_value=q();
697 FLUID_ELEMENT* ext_el_pt=
698 dynamic_cast<FLUID_ELEMENT*
>(external_element_pt(0,ipt));
709 ext_el_pt->traction(s_ext,normal,traction);
712 pressure-=q_value*traction[1];
720 unsigned nnod=this->
nnode();
728 outfile <<
"ZONE I=" << n_intpt << std::endl;
729 for(
unsigned ipt=0;ipt<n_intpt;ipt++)
737 double interpolated_w = 0.0;
738 double interpolated_r = 0.0;
741 for(
unsigned l=0;l<nnod;l++)
743 interpolated_w += this->
nodal_value(l,w_nodal_index)*psi[l];
744 interpolated_r += this->
node_pt(l)->
x(0)*psi[l];
748 FLUID_ELEMENT* ext_el_pt=
749 dynamic_cast<FLUID_ELEMENT*
>(external_element_pt(0,ipt));
754 ext_el_pt->interpolated_u_axi_nst(s_ext,veloc);
756 ext_el_pt->interpolated_x(s_ext,x);
758 outfile << interpolated_r <<
" " 759 << interpolated_w <<
" " 771 const unsigned& nplot)
775 for(
unsigned ipt=0;ipt<n_intpt;ipt++)
778 FLUID_ELEMENT* ext_el_pt=
779 dynamic_cast<FLUID_ELEMENT*
>(external_element_pt(0,ipt));
782 ext_el_pt->output(outfile,nplot);
790 node_update_adjacent_fluid_elements();
797 node_update_adjacent_fluid_elements();
805 node_update_adjacent_fluid_elements();
813 node_update_adjacent_fluid_elements();
822 std::map<FLUID_ELEMENT*,bool> done;
828 for (
unsigned iint=0;iint<n_intpt;iint++)
831 FLUID_ELEMENT* el_f_pt=
dynamic_cast<FLUID_ELEMENT*
> 832 (external_element_pt(0,iint));
841 el_f_pt->node_update();
851 void output(std::ostream &outfile,
const unsigned &n_plot)
861 for (
unsigned iplot=0;iplot<num_plot_points;iplot++)
871 double sigma_r_r=0.0;
872 double sigma_phi_phi=0.0;
881 << sigma_phi_phi << std::endl;
void output(FILE *file_pt)
C_style output with default number of plot points.
void broken_copy(const std::string &class_name)
Issue error message and terminate execution.
void node_update_adjacent_fluid_elements()
Update the nodal positions in all fluid elements that affect the traction on this element...
void dposition_dt(const Vector< double > &zeta, const unsigned &t, Vector< double > &drdt)
Return the t-th time derivative of the parametrised position of the FiniteElement in its GeomObject i...
bool interpolated_stress(const Vector< double > &s, double &sigma_r_r, double &sigma_phi_phi) const
Compute in-plane stresses. Return boolean to indicate success (false if attempt to evaluate stresses ...
AxisymFoepplvonKarmanEquations()
Constructor (must initialise the Pressure_fct_pt and Airy_forcing_fct_pt to null). Also set physical parameters to their default values.
double * Q_pt
Pointer to the ratio, , of the stress used to non-dimensionalise the fluid stresses to the stress us...
FSIAxisymFoepplvonKarmanElement()
Constructor.
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 double dshape_eulerian_at_knot(const unsigned &ipt, Shape &psi, DShape &dpsidx) const
Return the geometric shape functions and also first derivatives w.r.t. global coordinates at the ipt-...
virtual void get_pressure_fvk(const unsigned &ipt, const double &r, double &pressure) const
Get pressure term at (Eulerian) position r. This function is virtual to allow overloading in multi-ph...
AxisymFoepplvonKarmanElement()
Constructor: Call constructors for QElement and AxisymFoepplvonKarmanEquations.
virtual Data * geom_data_pt(const unsigned &j)
Return pointer to the j-th Data item that the object's shape depends on.
void update_before_external_interaction_geometric_fd()
Perform any auxiliary node update fcts of the adjacent fluid elements.
void position(const Vector< double > &zeta, Vector< double > &r) const
Return the parametrised position of the FiniteElement in its incarnation as a GeomObject, r(zeta). The position is given by the Eulerian coordinate and the intrinsic coordinate (zeta) is the local coordinate of the element (s).
void(* UnsteadyExactSolutionFctPt)(const double &, const Vector< double > &, Vector< double > &)
Function pointer for function that computes Vector-valued time-dependent function as ...
AxisymFoepplvonKarmanPressureFctPt Pressure_fct_pt
Pointer to pressure function:
void dposition_dt(const Vector< double > &zeta, const unsigned &j, Vector< double > &drdt)
j-th time-derivative on object at current time: .
void operator=(const AxisymFoepplvonKarmanElement< NNODE_1D > &)
Broken assignment operator.
void position(const unsigned &t, const Vector< double > &zeta, Vector< double > &r) const
Overloaded position function: Return 2D position vector: (r(zeta),z(zeta)) of material point whose "L...
void output_fct(std::ostream &outfile, const unsigned &n_plot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt)
Output function for a time-dependent exact solution. r,w_exact at n_plot plot points (Calls the stead...
void operator=(const AxisymFoepplvonKarmanEquations &)
Broken assignment operator.
void pin(const unsigned &i)
Pin the i-th stored variable.
virtual unsigned nplot_points(const unsigned &nplot) const
Return total number of plot points (when plotting nplot points in each "coordinate direction") ...
void reset_in_external_interaction_geometric_fd(const unsigned &i)
Perform any auxiliary node update fcts of the adjacent fluid elements.
void output(std::ostream &outfile)
Output with default number of plot points.
void output(FILE *file_pt)
C-style output function: r,w.
AxisymFoepplvonKarmanPressureFctPt pressure_fct_pt() const
Access function: Pointer to pressure function. Const version.
unsigned self_test()
Self-test: Return 0 for OK.
TimeStepper *& time_stepper_pt()
Access function for pointer to time stepper: Null if object is not time-dependent.
virtual double dshape_and_dtest_eulerian_axisym_fvk(const Vector< double > &s, Shape &psi, DShape &dpsidr, Shape &test, DShape &dtestdr) const =0
Shape/test functions and derivs w.r.t. to global coords at local coord. s; return Jacobian of mapping...
double & x(const unsigned &i)
Return the i-th nodal coordinate.
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 unsigned nodal_index_fvk(const unsigned &i=0) const
Return the index at which the i-th unknown value is stored. The default value, i, is appropriate for ...
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)
void update_in_external_interaction_geometric_fd(const unsigned &i)
Perform any auxiliary node update fcts of the adjacent fluid elements.
void output(FILE *file_pt, const unsigned &n_plot)
C-style output function: r,w at n_plot plot points.
virtual double knot(const unsigned &i, const unsigned &j) const =0
Return local coordinate s[j] of i-th integration point.
const double & q() const
Return the ratio of the stress scales used to non-dimensionalise the fluid and elasticity equations...
double dshape_and_dtest_eulerian_axisym_fvk(const Vector< double > &s, Shape &psi, DShape &dpsidr, Shape &test, DShape &dtestdr) const
Shape, test functions & derivs. w.r.t. to global coords. Return Jacobian.
virtual void get_pressure_fvk(const unsigned &ipt, const double &r, double &pressure) const
Overload pressure term at (Eulerian) position r. Adds fluid traction to pressure imposed by "pressure...
void output(std::ostream &outfile, const unsigned &n_plot)
Output FE representation of soln: r,w,dwdt,sigma_r_r,sigma_phi_phi at n_plot plot points...
virtual ~FSIAxisymFoepplvonKarmanElement()
Empty virtual destructor.
A class that represents a collection of data; each Data object may contain many different individual ...
void position(const Vector< double > &zeta, Vector< double > &r) const
Overloaded position function: Return 2D position vector: (r(zeta),z(zeta)) of material point whose "L...
virtual void output_fct(std::ostream &outfile, const unsigned &n_plot, const double &time, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt)
Output exact soln: r,w_exact at n_plot plot points (dummy time-dependent version to keep intel compil...
void compute_error(std::ostream &outfile, FiniteElement::UnsteadyExactSolutionFctPt exact_soln_pt, const double &time, double &error, double &norm)
Dummy, time dependent error checker.
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
virtual unsigned ngeom_data() const
How many items of Data does the shape of the object depend on? All nodal data.
void output_fct(std::ostream &outfile, const unsigned &n_plot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Output function for an exact solution: r,w_exact at n_plot plot points.
virtual double dshape_and_dtest_eulerian_at_knot_axisym_fvk(const unsigned &ipt, Shape &psi, DShape &dpsidr, Shape &test, DShape &dtestdr) const =0
Shape/test functions and derivs w.r.t. to global coords at integration point ipt; return Jacobian of ...
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...
unsigned ntstorage() const
Return the number of doubles required to represent history (one for steady)
double * Eta_pt
Pointer to FvK parameter.
void(* AxisymFoepplvonKarmanPressureFctPt)(const double &r, double &f)
Function pointer to pressure function fct(r,f(r)) – r is a Vector!
unsigned required_nvalue(const unsigned &n) const
Required # of `values' (pinned or dofs) at node n.
void output_adjacent_fluid_elements(std::ostream &outfile, const unsigned &nplot)
Output adjacent fluid elements (for checking of fsi setup)
void output(std::ostream &outfile, const unsigned &n_plot)
Output function: r,w,sigma_r_r,sigma_phi_phi at n_plot plot points.
double *& q_pt()
Return a pointer the ratio of stress scales used to non-dimensionalise the fluid and solid equations...
void broken_assign(const std::string &class_name)
Issue error message and terminate execution.
virtual unsigned nweight() const =0
Return the number of integration points of the scheme.
TimeStepper *& time_stepper_pt()
Return the pointer to the timestepper.
static double Default_Physical_Constant_Value
Default value for physical constants.
AxisymFoepplvonKarmanPressureFctPt Airy_forcing_fct_pt
Pointer to Airy forcing function.
void compute_error(std::ostream &outfile, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt, double &error, double &norm)
Get error against and norm of exact solution.
void output_integration_points(std::ostream &outfile)
Output integration points (for checking of fsi setup)
double *& eta_pt()
Pointer to FvK parameter.
double dshape_and_dtest_eulerian_at_knot_axisym_fvk(const unsigned &ipt, Shape &psi, DShape &dpsidr, Shape &test, DShape &dtestdr) const
Shape, test functions & derivs. w.r.t. to global coords. at integration point ipt. Return Jacobian.
bool Linear_bending_model
Flag which stores whether we are using a linear, pure bending model instead of the full non-linear Fo...
bool is_steady() const
Flag to indicate if a timestepper has been made steady (possibly temporarily to switch off time-depen...
double interpolated_w_fvk(const Vector< double > &s) const
Return FE representation of vertical displacement, w_fvk(s) at local coordinate s.
void get_gradient_of_deflection(const Vector< double > &s, Vector< double > &gradient) const
Get gradient of deflection: gradient[i] = dw/dr_i */.
AxisymFoepplvonKarmanEquations(const AxisymFoepplvonKarmanEquations &dummy)
Broken copy constructor.
AxisymFoepplvonKarmanPressureFctPt airy_forcing_fct_pt() const
Access function: Pointer to Airy forcing function. Const version.
void use_linear_bending_model()
Sets a flag to signify that we are solving the linear, pure bending equations, and pin all the nodal ...
AxisymFoepplvonKarmanPressureFctPt & airy_forcing_fct_pt()
Access function: Pointer to Airy forcing function.
void output(std::ostream &outfile)
Output function: r,w,sigma_r_r,sigma_phi_phi.
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.
virtual void get_airy_forcing_fvk(const unsigned &ipt, const double &r, double &airy_forcing) const
Get Airy forcing term at (Eulerian) position r. This function is virtual to allow overloading in mult...
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 output_fct(std::ostream &outfile, const unsigned &n_plot, FiniteElement::SteadyExactSolutionFctPt exact_soln_pt)
Output exact soln: r,w_exact at n_plot plot points.
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Fill in the residuals with this element's contribution.
void reset_after_external_interaction_geometric_fd()
Perform any auxiliary node update fcts of the adjacent fluid elements.
AxisymFoepplvonKarmanPressureFctPt & pressure_fct_pt()
Access function: Pointer to pressure function.
const double & eta() const
FvK parameter.