40 namespace FSI_functions
57 unsigned ndim=node_pt->
ndim();
59 for (
unsigned i=0;
i<ndim;
i++)
88 describe_solid_local_dofs(out,current_string);
90 const unsigned n_external_field_data = nexternal_interaction_field_data();
92 for(
unsigned i=0;
i<n_external_field_data;
i++)
94 std::stringstream conversion;
95 conversion<<
" of External Interaction Field Data "<<
i<<current_string;
97 External_interaction_field_data_pt[
i]->describe_dofs(out,in);
101 unsigned n_external_geom_data = nexternal_interaction_geometric_data();
104 for(
unsigned i=0;
i<n_external_geom_data;
i++)
106 std::stringstream conversion;
107 conversion<<
" of External Interaction Geometric Data "<<
i<<current_string;
109 External_interaction_geometric_data_pt[
i]->describe_dofs(out,in);
125 const unsigned& ndim_fluid)
129 set_nlagrangian_and_ndim(nlagr_solid, ndim_fluid);
132 this->set_ninteraction(1);
145 Only_front_is_loaded_by_fluid=
false;
148 this->set_ninteraction(2);
172 unsigned n_load=load.size();
175 for (
unsigned i=0;
i<n_load;
i++) load[
i]=0.0;
181 unsigned n_loaded_face=2;
182 if (Only_front_is_loaded_by_fluid) n_loaded_face=1;
184 for (
unsigned face=0;face<n_loaded_face;face++)
188 Vector<double> s_adjacent(external_element_local_coord(face,intpt));
192 (external_element_pt(face,intpt));
195 el_f_pt->
get_load(s_adjacent,N,fluid_load);
200 if (!Dont_warn_about_missing_adjacent_fluid_elements)
202 std::ostringstream warning_stream;
204 <<
"Info: No adjacent element set in FSIWallElement.\n\n" 205 <<
"Note: you can disable this message by setting \n " 206 <<
"FSIWallElement::Dont_warn_about_missing_adjacent_fluid_elements" 207 <<
"\n to true or recompiling without PARANOID.\n";
209 "FSIWallElement::fluid_load_vector()",
210 OOMPH_EXCEPTION_LOCATION);
219 if (face==1) sign=-1.0;
222 for(
unsigned i=0;
i<n_load;
i++)
224 load[
i] += fluid_load[
i]*sign*q();
239 std::map<FSIFluidElement*,bool> done;
242 unsigned n_intpt=integral_pt()->nweight();
245 unsigned n_loaded_face=2;
246 if (Only_front_is_loaded_by_fluid) n_loaded_face=1;
247 for (
unsigned face=0;face<n_loaded_face;face++)
251 for (
unsigned iint=0;iint<n_intpt;iint++)
255 (external_element_pt(face,iint));
287 Vector<std::set<FiniteElement*> >
const &external_elements_pt,
288 std::set<std::pair<Data*,unsigned> > &paired_interaction_data)
291 const unsigned n_interaction = this->ninteraction();
292 for(
unsigned i=0;
i<n_interaction;
i++)
295 for(std::set<FiniteElement*>::const_iterator it=
296 external_elements_pt[
i].begin();
297 it != external_elements_pt[
i].end(); it++)
304 if (Ignore_shear_stress_in_jacobian)
324 Vector<std::set<FiniteElement*> >
const &external_elements_pt,
325 std::set<Data*> &external_geometric_data_pt)
329 if(Ignore_shear_stress_in_jacobian)
336 const unsigned n_interaction = this->ninteraction();
337 for(
unsigned i=0;
i<n_interaction;
i++)
340 for(std::set<FiniteElement*>::const_iterator it=
341 external_elements_pt[
i].begin();
342 it != external_elements_pt[
i].end(); it++)
344 (*it)->identify_geometric_data(external_geometric_data_pt);
void node_update_adjacent_fluid_elements()
Update the nodal positions in all fluid elements that affect the traction on this FSIWallElement...
double dposition_dt(const unsigned &i) const
Return the i-th component of nodal velocity: dx/dt, either directly or via hanging node representatio...
virtual void get_load(const Vector< double > &s, const Vector< double > &N, Vector< double > &load)=0
Compute the load vector that is applied by current element (at its local coordinate s) onto the adjac...
virtual void describe_local_dofs(std::ostream &out, const std::string ¤t_string) const
Function to describe the local dofs of the element[s]. The ostream specifies the output stream to whi...
void setup_fsi_wall_element(const unsigned &nlagr_solid, const unsigned &ndim_fluid)
Setup: Assign storage – pass the Eulerian dimension of the "adjacent" fluid elements and the number ...
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
void apply_no_slip_on_moving_wall(Node *node_pt)
Apply no-slip condition for N.St. on a moving wall node, u = St dR/dt, where the Strouhal number St =...
virtual void identify_pressure_data(std::set< std::pair< Data *, unsigned > > &paired_pressure_data)=0
Add to the set paired_pressure_data pairs containing.
virtual void identify_load_data(std::set< std::pair< Data *, unsigned > > &paired_load_data)=0
Add to the set paired_load_data pairs containing.
void describe_local_dofs(std::ostream &out, const std::string ¤t_string) const
Function to describe the local dofs of the element. The ostream specifies the output stream to which ...
unsigned ndim() const
Return (Eulerian) spatial dimension of the node.
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...
void fluid_load_vector(const unsigned &intpt, const Vector< double > &N, Vector< double > &load)
Get FE Jacobian by systematic finite differencing w.r.t. nodal positition Data, internal and external...
void enable_fluid_loading_on_both_sides()
Allow element to be loaded by fluid on both sides. (Resizes containers for lookup schemes and initial...
void identify_all_geometric_data_for_external_interaction(Vector< std::set< FiniteElement *> > const &external_elements_pt, std::set< Data *> &external_geometric_data_pt)
Function that must return all geometric data involved in the desired interactions from the external e...
std::string string(const unsigned &i)
Return the i-th string or "" if the relevant string hasn't been defined.
void identify_all_field_data_for_external_interaction(Vector< std::set< FiniteElement *> > const &external_elements_pt, std::set< std::pair< Data *, unsigned > > &paired_iteraction_data)
Overload the function that must return all field data involved in the interactions from the external ...
static bool Dont_warn_about_missing_adjacent_fluid_elements
Static flag that allows the suppression of warning messages.
double Strouhal_for_no_slip
Strouhal number St = a/(UT) for application of no slip condition. Initialised to 1.0.
static double Default_Q_Value
Static default value for the ratio of stress scales used in the fluid and solid equations (default is...
The FSIFluidElement class is a base class for all fluid finite elements that apply a load (traction) ...
virtual void node_update()
Update the positions of all nodes in the element using each node update function. The default impleme...