immersed_rigid_body_elements.h
Go to the documentation of this file.
1 // LIC// ====================================================================
2 // LIC// This file forms part of oomph-lib, the object-oriented,
3 // LIC// multi-physics finite-element library, available
4 // LIC// at http://www.oomph-lib.org.
5 // LIC//
6 // LIC// Copyright (C) 2006-2022 Matthias Heil and Andrew Hazel
7 // LIC//
8 // LIC// This library is free software; you can redistribute it and/or
9 // LIC// modify it under the terms of the GNU Lesser General Public
10 // LIC// License as published by the Free Software Foundation; either
11 // LIC// version 2.1 of the License, or (at your option) any later version.
12 // LIC//
13 // LIC// This library is distributed in the hope that it will be useful,
14 // LIC// but WITHOUT ANY WARRANTY; without even the implied warranty of
15 // LIC// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 // LIC// Lesser General Public License for more details.
17 // LIC//
18 // LIC// You should have received a copy of the GNU Lesser General Public
19 // LIC// License along with this library; if not, write to the Free Software
20 // LIC// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
21 // LIC// 02110-1301 USA.
22 // LIC//
23 // LIC// The authors may be contacted at oomph-lib@maths.man.ac.uk.
24 // LIC//
25 // LIC//====================================================================
26 // Header file for Rigid Body Elements that are immersed in an external fluid
27 #ifndef OOMPH_IMMERSED_RIGID_BODY_ELEMENTS_HEADER
28 #define OOMPH_IMMERSED_RIGID_BODY_ELEMENTS_HEADER
29 
30 
31 // Config header generated by autoconfig
32 #ifdef HAVE_CONFIG_H
33 #include <oomph-lib-config.h>
34 #endif
35 
36 #include "../generic/elements.h"
37 #include "../generic/triangle_mesh.h"
38 #include "../generic/fsi.h"
39 
40 namespace oomph
41 {
42  //=====================================================================
43  // DOXYERROR: I removed a \f from the formula \f$\mbox{\boldmath$F$} = \mbox{\boldmath$F$}^{*}/\mu U\f$ below because it broke doxygen. Someone
44  // who knows the maths should check that this still makes sense.
91  //=====================================================================
93  {
94  public:
97  typedef void (*ExternalForceFctPt)(const double& time,
98  Vector<double>& external_force);
99 
102  typedef void (*ExternalTorqueFctPt)(const double& time,
103  double& external_torque);
104 
105  protected:
111  Data* const& centre_displacement_data_pt = 0)
112  : Initial_Phi(0.0),
113  Mass(0.0),
114  Moment_of_inertia(0.0),
116  Geom_object_pt(0),
119  Drag_mesh_pt(0),
126  {
127  this->initialise(time_stepper_pt);
128  }
129 
130  public:
133  ImmersedRigidBodyElement(GeomObject* const& geom_object_pt,
135  Data* const& centre_displacement_data_pt = 0)
136  : Initial_Phi(0.0),
137  Mass(0.0),
138  Moment_of_inertia(0.0),
140  Geom_object_pt(geom_object_pt),
143  Drag_mesh_pt(0),
150  {
151  this->initialise(time_stepper_pt);
152  }
153 
156  {
158  }
159 
163  {
165  }
166 
168  double& initial_phi()
169  {
170  return Initial_Phi;
171  }
172 
174  double& initial_centre_of_mass(const unsigned& i)
175  {
176  return Initial_centre_of_mass[i];
177  }
178 
180  const double& initial_centre_of_mass(const unsigned& i) const
181  {
182  return Initial_centre_of_mass[i];
183  }
184 
186  void position(const Vector<double>& xi, Vector<double>& r) const
187  {
188  Vector<double> initial_x(2);
189  Geom_object_pt->position(xi, initial_x);
190  this->apply_rigid_body_motion(0, initial_x, r);
191  }
192 
194  void position(const unsigned& t,
195  const Vector<double>& xi,
196  Vector<double>& r) const
197  {
198  Vector<double> initial_x(2);
199  Geom_object_pt->position(xi, initial_x);
200  this->apply_rigid_body_motion(t, initial_x, r);
201  }
202 
203 
205  void dposition_dt(const Vector<double>& zeta,
206  const unsigned& j,
207  Vector<double>& drdt);
208 
211  {
213  {
215  // Null out the pointer stored as internal data
216  this->internal_data_pt(0) = 0;
217  }
218  }
219 
222  double& mass_shape()
223  {
224  return Mass;
225  }
226 
229  {
230  return Moment_of_inertia;
231  }
232 
236  {
238  }
239 
242  {
244  }
245 
248  {
250  }
251 
254  {
256  }
257 
260  {
261  Vector<double> cog(2);
262  for (unsigned i = 0; i < 2; i++)
263  {
264  cog[i] = Initial_centre_of_mass[i] +
266  }
267  return cog;
268  }
269 
271  void pin_centre_of_mass_coordinate(const unsigned& i)
272  {
274  }
275 
277  void unpin_centre_of_mass_coordinate(const unsigned& i)
278  {
280  }
281 
284  {
286  }
287 
290  {
292  }
293 
295  void output_centre_of_gravity(std::ostream& outfile);
296 
299  {
300  // Get generic function without jacobian terms
302  residuals, GeneralisedElement::Dummy_matrix, false);
303  }
304 
305 
308  DenseMatrix<double>& jacobian)
309  {
310  // Get generic function, but don't bother to get jacobian terms
311  bool flag = false;
312  get_residuals_rigid_body_generic(residuals, jacobian, flag);
313  // Get the internal effects by FD, because a change in internal
314  // data can change the fluid loading, so this is one of those
315  // subtle interactions
316  this->fill_in_jacobian_from_internal_by_fd(residuals, jacobian);
317  // Get the effect of the fluid loading on the rigid body
318  this->fill_in_jacobian_from_external_by_fd(residuals, jacobian);
319  }
320 
325  {
326  // If there is no drag mesh then do nothing
327  if (Drag_mesh_pt == 0)
328  {
329  return;
330  }
331  // Otherwise update the elements adjacent to the rigid body
332  //(all the elements adjacent to those in the drag mesh)
333  else
334  {
335  unsigned nel = Drag_mesh_pt->nelement();
336  for (unsigned e = 0; e < nel; e++)
337  {
338  dynamic_cast<FaceElement*>(Drag_mesh_pt->element_pt(e))
339  ->bulk_element_pt()
340  ->node_update();
341  }
342  }
343  }
344 
345 
347  inline void update_in_external_fd(const unsigned& i)
348  {
350  }
351 
353  inline void reset_in_external_fd(const unsigned& i) {}
354 
358  {
360  }
361 
363  inline void update_in_internal_fd(const unsigned& i)
364  {
366  }
367 
369  inline void reset_in_internal_fd(const unsigned& i) {}
370 
374  {
376  }
377 
380  void get_force_and_torque(const double& time,
381  Vector<double>& force,
382  double& torque);
383 
387  {
388  return External_force_fct_pt;
389  }
390 
394  {
395  return External_torque_fct_pt;
396  }
397 
400  Mesh* const& drag_mesh_pt()
401  {
402  return Drag_mesh_pt;
403  }
404 
407  void set_drag_mesh(Mesh* const& drag_mesh_pt);
408 
411  {
412  // Delete the hijacked data created as the load
414  // Flush the external data
415  this->flush_external_data();
416  // Set the Drag_mesh pointer to null
417  Drag_mesh_pt = 0;
418  }
419 
421  unsigned ngeom_data() const
422  {
423  return 1;
424  }
425 
428  Data* geom_data_pt(const unsigned& j)
429  {
430  return this->Centre_displacement_data_pt;
431  }
432 
435  {
436  return G_pt;
437  }
438 
440  const Vector<double>& g() const
441  {
442  return *G_pt;
443  }
444 
446  double*& re_pt()
447  {
448  return Re_pt;
449  }
450 
452  const double& re() const
453  {
454  return *Re_pt;
455  }
456 
458  double*& st_pt()
459  {
460  return St_pt;
461  }
462 
464  const double& st() const
465  {
466  return *St_pt;
467  }
468 
471  double*& re_invfr_pt()
472  {
473  return ReInvFr_pt;
474  }
475 
477  const double& re_invfr()
478  {
479  return *ReInvFr_pt;
480  }
481 
483  double*& density_ratio_pt()
484  {
485  return Density_ratio_pt;
486  }
487 
489  const double& density_ratio() const
490  {
491  return *Density_ratio_pt;
492  }
493 
494  protected:
498  inline void apply_rigid_body_motion(const unsigned& t,
499  const Vector<double>& initial_x,
500  Vector<double>& r) const
501  {
502  // Scale relative to the centre of mass
503  double X = initial_x[0] - Initial_centre_of_mass[0];
504  double Y = initial_x[1] - Initial_centre_of_mass[1];
505 
506  // Find the original angle and radius
507  double phi_orig = atan2(Y, X);
508  double r_orig = sqrt(X * X + Y * Y);
509 
510  // Updated position vector
511  r[0] = Initial_centre_of_mass[0] +
512  this->Centre_displacement_data_pt->value(t, 0);
513 
514  r[1] = Initial_centre_of_mass[1] +
515  this->Centre_displacement_data_pt->value(t, 1);
516 
517  // Add in the rotation terms if there are to be included
519  {
520  r[0] += r_orig *
521  cos(phi_orig + this->Centre_displacement_data_pt->value(t, 2));
522  r[1] += r_orig *
523  sin(phi_orig + this->Centre_displacement_data_pt->value(t, 2));
524  }
525  else
526  {
527  r[0] += r_orig * cos(phi_orig);
528  r[1] += r_orig * sin(phi_orig);
529  }
530  }
531 
532 
533  private:
537  inline int centre_displacement_local_eqn(const unsigned& i)
538  {
540  {
542  }
543  else
544  {
546  }
547  }
548 
550  void initialise(TimeStepper* const& time_stepper_pt);
551 
554  DenseMatrix<double>& jacobian,
555  const bool& flag);
556 
559  std::list<unsigned> List_of_external_hijacked_data;
560 
563  {
564  for (std::list<unsigned>::iterator it =
566  it != List_of_external_hijacked_data.end();
567  ++it)
568  {
569  // Delete the associated external data
570  delete this->external_data_pt(*it);
571  this->external_data_pt(*it) = 0;
572  }
573  // Now clear the list
575  }
576 
577  protected:
580 
582  double Initial_Phi;
583 
584  // Mass of body
585  double Mass;
586 
589 
593 
594  private:
597 
601 
605 
609 
612 
614  double* Re_pt;
615 
617  double* St_pt;
618 
620  double* ReInvFr_pt;
621 
624 
627 
630 
633 
637 
640 
644  };
645 
646 
647  //=====================================================================
661  //=====================================================================
664  {
665  public:
675  const Vector<double>& hole_center,
676  const Vector<TriangleMeshCurveSection*>& boundary_polyline_pt,
678  Data* const& centre_displacement_data_pt = 0);
679 
682 
684  void position(const Vector<double>& xi, Vector<double>& r) const
685  {
686  Vector<double> initial_x(2);
687  this->get_initial_position(xi, initial_x);
688  this->apply_rigid_body_motion(0, initial_x, r);
689  }
690 
691 
693  void position(const unsigned& t,
694  const Vector<double>& xi,
695  Vector<double>& r) const
696  {
697  Vector<double> initial_x(2);
698  this->get_initial_position(xi, initial_x);
699  this->apply_rigid_body_motion(t, initial_x, r);
700  }
701 
702 
708 
709  private:
712  {
713  // Find the number of polylines (boundaries)
714  unsigned n_poly = this->npolyline();
715 
716  // The boundary coordinate will be contiguous from polyline to
717  // polyline and each polyline will have the scaled arclength coordinate
718  // in the range 0->1.
719 
720  // Find the maximum coordinate
721  double zeta_max = Zeta_vertex[n_poly - 1].back();
722 
723  // If we are above the maximum complain
724  if (xi[0] > zeta_max)
725  {
726  std::ostringstream error_message;
727  error_message << "Value of intrinsic coordinate " << xi[0]
728  << "greater than maximum " << zeta_max << "\n";
729  throw OomphLibError(error_message.str(),
730  "TriangleMeshPolygon::position()",
732  }
733 
734  // If equal to the maximum, return the final vertex
735  if (xi[0] == zeta_max)
736  {
737  unsigned n_vertex = this->polyline_pt(n_poly - 1)->nvertex();
738  r = this->polyline_pt(n_poly - 1)->vertex_coordinate(n_vertex - 1);
739  return;
740  }
741 
742  // Otherwise
743 
744  // Find out which polyline we are in
745  // If we've got here this should be less than n_poly
746  unsigned p = static_cast<unsigned>(floor(xi[0]));
747 
748  // If we are "above" the last polyline then throw an error
749  // This should have been caught by the trap above
750  if (p >= n_poly)
751  {
752  std::ostringstream error_message;
753  error_message
754  << "Something has gone wrong.\n"
755  << "The integer part of the input intrinsic coordinate is " << p
756  << "\nwhich is equal to or greater than the number of polylines, "
757  << n_poly << ".\n"
758  << "This should have triggered an earlier error\n";
759 
760 
761  throw OomphLibError(error_message.str(),
764  }
765 
766  // Cache the appropriate polyline
767  TriangleMeshPolyLine* const line_pt = this->polyline_pt(p);
768 
769  // If we are at the first vertex in the polyline, return it
770  if (xi[0] == Zeta_vertex[p][0])
771  {
772  r = line_pt->vertex_coordinate(0);
773  return;
774  }
775 
776  // Otherwise loop over the other points to find the appropriate
777  // segment
778 
779  // Find the number of vertices in the chosen polyline
780  unsigned n_vertex = line_pt->nvertex();
781  // Now start from the first node in the appropriate polyline and loop up
782  for (unsigned v = 1; v < n_vertex; v++)
783  {
784  // First time that zeta falls below the vertex coordinate
785  // we have something
786  if (xi[0] < Zeta_vertex[p][v])
787  {
788  double fraction = (xi[0] - Zeta_vertex[p][v - 1]) /
789  (Zeta_vertex[p][v] - Zeta_vertex[p][v - 1]);
790  Vector<double> first = line_pt->vertex_coordinate(v - 1);
792  r.resize(2);
793  for (unsigned i = 0; i < 2; i++)
794  {
795  r[i] = first[i] + fraction * (last[i] - first[i]);
796  }
797  return;
798  }
799  }
800  }
801 
802 
806  void assign_zeta()
807  {
808  // Find the number of polylines
809  unsigned n_poly = this->npolyline();
810 
811  // Allocate appropriate storage for the zeta values
812  Zeta_vertex.resize(n_poly);
813 
814  // Temporary storage for the vertex coordinates
815  Vector<double> vertex_coord_first;
816  Vector<double> vertex_coord_next;
817 
818  // Set the initial value of zeta
819  double zeta_offset = 0.0;
820 
821  // Loop over the polylines
822  for (unsigned p = 0; p < n_poly; ++p)
823  {
824  // Cache the pointer to the polyline
825  TriangleMeshPolyLine* const line_pt = this->polyline_pt(p);
826 
827  // Find the number of vertices in the polyline
828  unsigned n_vertex = line_pt->nvertex();
829 
830  // Allocate storage and set initial value
831  Zeta_vertex[p].resize(n_vertex);
832  Zeta_vertex[p][0] = 0.0;
833 
834  // Loop over the vertices in the polyline and calculate the length
835  // between each for use as the intrinsic coordinate
836  vertex_coord_first = line_pt->vertex_coordinate(0);
837  for (unsigned v = 1; v < n_vertex; v++)
838  {
839  vertex_coord_next = line_pt->vertex_coordinate(v);
840  double length =
841  sqrt(pow(vertex_coord_next[0] - vertex_coord_first[0], 2.0) +
842  pow(vertex_coord_next[1] - vertex_coord_first[1], 2.0));
843  Zeta_vertex[p][v] = Zeta_vertex[p][v - 1] + length;
844  vertex_coord_first = vertex_coord_next;
845  }
846 
847  // Now scale the length to unity and add the offset
848  Zeta_vertex[p][0] += zeta_offset;
849  for (unsigned v = 1; v < n_vertex; v++)
850  {
851  Zeta_vertex[p][v] /= Zeta_vertex[p][n_vertex - 1];
852  Zeta_vertex[p][v] += zeta_offset;
853  }
854  zeta_offset += 1.0;
855  } // End of loop over polylines
856  }
857 
860  };
861 
862 } // namespace oomph
863 #endif
AnnoyingScalar cos(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:136
AnnoyingScalar atan2(const AnnoyingScalar &y, const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:139
AnnoyingScalar sin(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:137
AnnoyingScalar sqrt(const AnnoyingScalar &x)
Definition: AnnoyingScalar.h:134
Array< int, Dynamic, 1 > v
Definition: Array_initializer_list_vector_cxx11.cpp:1
int i
Definition: BiCGSTAB_step_by_step.cpp:9
Array< double, 1, 3 > e(1./3., 0.5, 2.)
float * p
Definition: Tutorial_Map_using.cpp:9
Definition: nodes.h:86
void pin(const unsigned &i)
Pin the i-th stored variable.
Definition: nodes.h:385
void unpin(const unsigned &i)
Unpin the i-th stored variable.
Definition: nodes.h:391
double * value_pt(const unsigned &i) const
Definition: nodes.h:324
double value(const unsigned &i) const
Definition: nodes.h:293
Definition: elements.h:4338
virtual void node_update()
Definition: elements.cc:5072
Definition: elements.h:73
void flush_external_data()
Flush all external data.
Definition: elements.cc:387
Data *& external_data_pt(const unsigned &i)
Return a pointer to i-th external data object.
Definition: elements.h:659
Data *& internal_data_pt(const unsigned &i)
Return a pointer to i-th internal data object.
Definition: elements.h:622
int internal_local_eqn(const unsigned &i, const unsigned &j) const
Definition: elements.h:267
static DenseMatrix< double > Dummy_matrix
Definition: elements.h:227
void fill_in_jacobian_from_external_by_fd(Vector< double > &residuals, DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
Definition: elements.cc:1199
void fill_in_jacobian_from_internal_by_fd(Vector< double > &residuals, DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
Definition: elements.cc:1102
int external_local_eqn(const unsigned &i, const unsigned &j)
Definition: elements.h:311
Definition: geom_objects.h:101
virtual void position(const Vector< double > &zeta, Vector< double > &r) const =0
Parametrised position on object at current time: r(zeta).
TimeStepper *& time_stepper_pt()
Definition: geom_objects.h:192
Definition: immersed_rigid_body_elements.h:93
const Vector< double > & g() const
Access function for gravity.
Definition: immersed_rigid_body_elements.h:440
ExternalTorqueFctPt & external_torque_fct_pt()
Definition: immersed_rigid_body_elements.h:393
ImmersedRigidBodyElement(TimeStepper *const &time_stepper_pt, Data *const &centre_displacement_data_pt=0)
Definition: immersed_rigid_body_elements.h:110
Vector< double > centre_of_gravity()
Get current centre of gravity.
Definition: immersed_rigid_body_elements.h:259
double & mass_shape()
Definition: immersed_rigid_body_elements.h:222
bool Include_geometric_rotation
Definition: immersed_rigid_body_elements.h:643
void position(const Vector< double > &xi, Vector< double > &r) const
Overload the position to apply the rotation and translation.
Definition: immersed_rigid_body_elements.h:186
double * St_pt
Strouhal number of external fluid.
Definition: immersed_rigid_body_elements.h:617
Vector< double > *& g_pt()
Access function to the direction of gravity.
Definition: immersed_rigid_body_elements.h:434
void pin_centre_of_mass_coordinate(const unsigned &i)
Pin the i-th coordinate of the centre of mass.
Definition: immersed_rigid_body_elements.h:271
static double Default_Physical_Constant_Value
Static default value for physical constants.
Definition: immersed_rigid_body_elements.h:626
void flush_drag_mesh()
Function to clear the drag mesh and all associated external data.
Definition: immersed_rigid_body_elements.h:410
void initialise(TimeStepper *const &time_stepper_pt)
Initialisation function.
Definition: immersed_rigid_body_elements.cc:266
void dposition_dt(const Vector< double > &zeta, const unsigned &j, Vector< double > &drdt)
Work out the position derivative, including rigid body motion.
Definition: immersed_rigid_body_elements.cc:45
double & initial_centre_of_mass(const unsigned &i)
Access function for the initial centre of mass.
Definition: immersed_rigid_body_elements.h:174
void reset_after_internal_fd()
Definition: immersed_rigid_body_elements.h:373
ExternalTorqueFctPt External_torque_fct_pt
Definition: immersed_rigid_body_elements.h:604
void(* ExternalTorqueFctPt)(const double &time, double &external_torque)
Definition: immersed_rigid_body_elements.h:102
double *& re_invfr_pt()
Definition: immersed_rigid_body_elements.h:471
unsigned ngeom_data() const
The position of the object depends on one data item.
Definition: immersed_rigid_body_elements.h:421
void update_in_external_fd(const unsigned &i)
After an external data change, update the nodal positions.
Definition: immersed_rigid_body_elements.h:347
void reset_in_external_fd(const unsigned &i)
Do nothing to reset within finite-differencing of external data.
Definition: immersed_rigid_body_elements.h:353
double * ReInvFr_pt
Reynolds number divided by Froude number of external fluid.
Definition: immersed_rigid_body_elements.h:620
void delete_external_hijacked_data()
Delete the storage for the external data formed from hijacked data.
Definition: immersed_rigid_body_elements.h:562
~ImmersedRigidBodyElement()
Destuctor: Cleanup if required.
Definition: immersed_rigid_body_elements.h:210
double & centre_y_displacement()
y-displacement of centre of mass
Definition: immersed_rigid_body_elements.h:247
double *& re_pt()
Access function for the pointer to the fluid Reynolds number.
Definition: immersed_rigid_body_elements.h:446
double Initial_Phi
Original rotation angle.
Definition: immersed_rigid_body_elements.h:582
void reset_in_internal_fd(const unsigned &i)
Do nothing to reset within finite-differencing of internal data.
Definition: immersed_rigid_body_elements.h:369
bool Displacement_data_is_internal
Boolean flag to indicate whether data is internal.
Definition: immersed_rigid_body_elements.h:639
void reset_after_external_fd()
Definition: immersed_rigid_body_elements.h:357
void get_residuals_rigid_body_generic(Vector< double > &residuals, DenseMatrix< double > &jacobian, const bool &flag)
Get residuals and/or Jacobian.
Definition: immersed_rigid_body_elements.cc:304
void(* ExternalForceFctPt)(const double &time, Vector< double > &external_force)
Definition: immersed_rigid_body_elements.h:97
void output_centre_of_gravity(std::ostream &outfile)
Output position velocity and acceleration of centre of gravity.
Definition: immersed_rigid_body_elements.cc:121
const double & st() const
Access function for the fluid Strouhal number.
Definition: immersed_rigid_body_elements.h:464
double *& density_ratio_pt()
Access function for the pointer to the density ratio.
Definition: immersed_rigid_body_elements.h:483
Data * Centre_displacement_data_pt
Definition: immersed_rigid_body_elements.h:592
void unpin_rotation_angle()
Unpin the rotation angle.
Definition: immersed_rigid_body_elements.h:289
unsigned Index_for_centre_displacement
Definition: immersed_rigid_body_elements.h:636
double * Re_pt
Reynolds number of external fluid.
Definition: immersed_rigid_body_elements.h:614
static Vector< double > Default_Gravity_vector
Static default value for gravity.
Definition: immersed_rigid_body_elements.h:632
void update_in_internal_fd(const unsigned &i)
After an internal data change, update the nodal positions.
Definition: immersed_rigid_body_elements.h:363
GeomObject * Geom_object_pt
Underlying geometric object.
Definition: immersed_rigid_body_elements.h:596
void pin_rotation_angle()
Pin the rotation angle.
Definition: immersed_rigid_body_elements.h:283
double & initial_phi()
Access function for the initial angle.
Definition: immersed_rigid_body_elements.h:168
ExternalForceFctPt External_force_fct_pt
Definition: immersed_rigid_body_elements.h:600
int centre_displacement_local_eqn(const unsigned &i)
Definition: immersed_rigid_body_elements.h:537
const double & re() const
Access function for the fluid Reynolds number.
Definition: immersed_rigid_body_elements.h:452
double Moment_of_inertia
Polar moment of inertia of body.
Definition: immersed_rigid_body_elements.h:588
Mesh *const & drag_mesh_pt()
Definition: immersed_rigid_body_elements.h:400
ExternalForceFctPt & external_force_fct_pt()
Definition: immersed_rigid_body_elements.h:386
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Get the contribution to the residuals.
Definition: immersed_rigid_body_elements.h:298
void unset_geometric_rotation()
Definition: immersed_rigid_body_elements.h:162
Data *& centre_displacement_data_pt()
Definition: immersed_rigid_body_elements.h:235
double Mass
Definition: immersed_rigid_body_elements.h:585
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Get residuals including contribution to jacobian.
Definition: immersed_rigid_body_elements.h:307
double & moment_of_inertia_shape()
Access to dimensionless polar "moment of inertia" shape parameter.
Definition: immersed_rigid_body_elements.h:228
double & centre_rotation_angle()
rotation of centre of mass
Definition: immersed_rigid_body_elements.h:253
void position(const unsigned &t, const Vector< double > &xi, Vector< double > &r) const
Overload to include the time history of the motion of the object.
Definition: immersed_rigid_body_elements.h:194
const double & re_invfr()
Access to the fluid inverse Froude number.
Definition: immersed_rigid_body_elements.h:477
Vector< double > * G_pt
The direction of gravity.
Definition: immersed_rigid_body_elements.h:611
double & centre_x_displacement()
x-displacement of centre of mass
Definition: immersed_rigid_body_elements.h:241
ImmersedRigidBodyElement(GeomObject *const &geom_object_pt, TimeStepper *const &time_stepper_pt, Data *const &centre_displacement_data_pt=0)
Definition: immersed_rigid_body_elements.h:133
void set_drag_mesh(Mesh *const &drag_mesh_pt)
Definition: immersed_rigid_body_elements.cc:206
Data * geom_data_pt(const unsigned &j)
Definition: immersed_rigid_body_elements.h:428
Mesh * Drag_mesh_pt
Definition: immersed_rigid_body_elements.h:608
void get_force_and_torque(const double &time, Vector< double > &force, double &torque)
Definition: immersed_rigid_body_elements.cc:153
const double & density_ratio() const
Access function for the the density ratio.
Definition: immersed_rigid_body_elements.h:489
void apply_rigid_body_motion(const unsigned &t, const Vector< double > &initial_x, Vector< double > &r) const
Definition: immersed_rigid_body_elements.h:498
const double & initial_centre_of_mass(const unsigned &i) const
Access function for the initial centre of mass (const version)
Definition: immersed_rigid_body_elements.h:180
double *& st_pt()
Access function for the pointer to the fluid Strouhal number.
Definition: immersed_rigid_body_elements.h:458
static double Default_Physical_Ratio_Value
Static default value for physical ratios.
Definition: immersed_rigid_body_elements.h:629
Vector< double > Initial_centre_of_mass
X-coordinate of initial centre of gravity.
Definition: immersed_rigid_body_elements.h:579
void node_update_adjacent_fluid_elements()
Definition: immersed_rigid_body_elements.h:324
std::list< unsigned > List_of_external_hijacked_data
Definition: immersed_rigid_body_elements.h:559
double * Density_ratio_pt
Density ratio of the solid to the external fluid.
Definition: immersed_rigid_body_elements.h:623
void set_geometric_rotation()
Set the rotation of the object to be included.
Definition: immersed_rigid_body_elements.h:155
void unpin_centre_of_mass_coordinate(const unsigned &i)
Unpin the i-th coordinate of the centre of mass.
Definition: immersed_rigid_body_elements.h:277
Definition: immersed_rigid_body_elements.h:664
void assign_zeta()
Definition: immersed_rigid_body_elements.h:806
void position(const Vector< double > &xi, Vector< double > &r) const
Overload (again) the position to apply the rotation and translation.
Definition: immersed_rigid_body_elements.h:684
ImmersedRigidBodyTriangleMeshPolygon(const Vector< double > &hole_center, const Vector< TriangleMeshCurveSection * > &boundary_polyline_pt, TimeStepper *const &time_stepper_pt, Data *const &centre_displacement_data_pt=0)
Definition: immersed_rigid_body_elements.cc:387
Vector< Vector< double > > Zeta_vertex
Vector of intrisic coordinate values at the nodes.
Definition: immersed_rigid_body_elements.h:859
void reset_reference_configuration()
Definition: immersed_rigid_body_elements.cc:549
~ImmersedRigidBodyTriangleMeshPolygon()
Empty Destuctor.
Definition: immersed_rigid_body_elements.h:681
void get_initial_position(const Vector< double > &xi, Vector< double > &r) const
Get the initial position of the polygon.
Definition: immersed_rigid_body_elements.h:711
void position(const unsigned &t, const Vector< double > &xi, Vector< double > &r) const
Overload (again) the position to apply the rotation and translation.
Definition: immersed_rigid_body_elements.h:693
Definition: mesh.h:67
GeneralisedElement *& element_pt(const unsigned long &e)
Return pointer to element e.
Definition: mesh.h:448
unsigned long nelement() const
Return number of elements in the mesh.
Definition: mesh.h:590
Definition: oomph_definitions.h:222
Definition: timesteppers.h:231
Class defining a polyline for use in Triangle Mesh generation.
Definition: unstructured_two_d_mesh_geometry_base.h:868
unsigned nvertex() const
Number of vertices.
Definition: unstructured_two_d_mesh_geometry_base.h:904
Vector< double > vertex_coordinate(const unsigned &i) const
Coordinate vector of i-th vertex (const version)
Definition: unstructured_two_d_mesh_geometry_base.h:929
Class defining a closed polygon for the Triangle mesh generation.
Definition: unstructured_two_d_mesh_geometry_base.h:1451
unsigned npolyline() const
Number of constituent polylines.
Definition: unstructured_two_d_mesh_geometry_base.h:1482
TriangleMeshPolyLine * polyline_pt(const unsigned &i) const
Pointer to i-th constituent polyline.
Definition: unstructured_two_d_mesh_geometry_base.h:1488
static constexpr const last_t last
Definition: IndexedViewHelper.h:48
#define X
Definition: icosphere.cpp:20
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 floor(const bfloat16 &a)
Definition: BFloat16.h:643
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 pow(const bfloat16 &a, const bfloat16 &b)
Definition: BFloat16.h:625
EIGEN_STRONG_INLINE const Eigen::CwiseBinaryOp< Eigen::internal::scalar_zeta_op< typename DerivedX::Scalar >, const DerivedX, const DerivedQ > zeta(const Eigen::ArrayBase< DerivedX > &x, const Eigen::ArrayBase< DerivedQ > &q)
Definition: SpecialFunctionsArrayAPI.h:152
r
Definition: UniformPSDSelfTest.py:20
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
t
Definition: plotPSD.py:36
#define OOMPH_EXCEPTION_LOCATION
Definition: oomph_definitions.h:61
#define OOMPH_CURRENT_FUNCTION
Definition: oomph_definitions.h:86
const char Y
Definition: test/EulerAngles.cpp:32
std::ptrdiff_t j
Definition: tut_arithmetic_redux_minmax.cpp:2