26#ifndef OOMPH_FSI_HEADER
27#define OOMPH_FSI_HEADER
31#include <oomph-lib-config.h>
241 const double&
q()
const
559 namespace FSI_functions
600 template<
class FLUID_ELEMENT,
unsigned DIM_FLUID>
606 const unsigned&
face = 0)
631 template<
class FLUID_ELEMENT,
unsigned DIM_FLUID>
637 const unsigned&
face = 0)
664 template<
class SOLID_ELEMENT,
unsigned DIM_SOLID>
691 template<
class SOLID_ELEMENT,
unsigned DIM_SOLID>
747 << doc_info.
number() <<
".dat";
759 for (
unsigned j = 0;
j <
nnod;
j++)
799 ->external_halo_element_pt(d,
e)
812 for (
unsigned e = 0;
e <
nelem;
e++)
818 << doc_info.
number() <<
"-" <<
e <<
".dat";
847 for (
unsigned i = 0;
i <
nint;
i++)
875 for (
unsigned i = 0;
i <
nint;
i++)
883 el_pt->external_element_local_coord(
face,
i));
903 el_pt->external_interaction_field_data_pt());
905 external_interaction_field_data_pt.
size();
908 data_count[external_interaction_field_data_pt[
l]]++;
910 [external_interaction_field_data_pt[
l]] != 0)
914 [external_interaction_field_data_pt[
l]]]++;
921 el_pt->external_interaction_geometric_data_pt());
923 external_interaction_geometric_data_pt.
size();
926 data_count[external_interaction_geometric_data_pt[
l]]++;
928 [external_interaction_geometric_data_pt[
l]] != 0)
932 [external_interaction_geometric_data_pt[
l]]]++;
939 for (std::map<Data*, unsigned>::iterator
it =
data_count.begin();
965 some_file <<
"CS=GRID, HU=FRAME, H=2.5, AN=MIDCENTER, C=GREEN "
966 <<
"T=\"" <<
it->second <<
"\"" << std::endl;
989 s_fluid[
k] = 0.5 * (s_max + s_min) + 0.1 * (s_max - s_min);
997 some_file <<
"CS=GRID, HU=FRAME, H=2.5, AN=MIDCENTER, C=BLUE "
998 <<
"T=\"" <<
it->second
1010 std::ostringstream error_message;
1012 <<
"Data that affects the load on an FSIWallElement\n"
1013 <<
"is neither a (fluid) Node, nor a SolidNode nor\n"
1014 <<
"internal Data in a (fluid) element\n"
1015 <<
"I don't think this should happen..." << std::endl;
1030 some_file <<
"CS=GRID, HU=FRAME, H=2.5, AN=MIDCENTER, C=RED "
1031 <<
"T=\"" <<
it->second <<
"\"" << std::endl;
1078 for (
unsigned i = 0;
i <
ngeom;
i++)
1092 for (std::map<Data*, unsigned>::iterator
it =
data_count.begin();
1108 some_file <<
"CS=GRID, HU=FRAME, H=2.5, AN=MIDCENTER, C=GREEN "
1120 <<
"Info: Position of a fluid node is affected by Data that"
1121 <<
"is not a SolidNode --> Can't plot this Data. \n\n"
1122 <<
"(You may also want to check if this is exepcted or likely "
1124 <<
"indicate a bug in your code...)" << std::endl;
1126 "FSI_functions::doc_fsi()",
A class that represents a collection of data; each Data object may contain many different individual ...
Information for documentation of results: Directory and file number to enable output in the form RESL...
std::string directory() const
Output directory.
unsigned & number()
Number used (e.g.) for labeling output files.
This is a base class for all elements that require external sources (e.g. FSI, multi-domain problems ...
void fill_in_jacobian_from_external_interaction_by_fd(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Calculate the contributions to the jacobian from all external interaction degrees of freedom (geometr...
bool Add_external_interaction_data
Boolean flag to indicate whether to include the external data.
The FSIFluidElement class is a base class for all fluid finite elements that apply a load (traction) ...
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 operator=(const FSIFluidElement &)=delete
Broken assignment operator.
FSIFluidElement()
Constructor.
FSIFluidElement(const FSIFluidElement &)=delete
Broken copy constructor.
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 identify_pressure_data(std::set< std::pair< Data *, unsigned > > &paired_pressure_data)=0
Add to the set paired_pressure_data pairs containing.
This is a base class for all SolidFiniteElements that participate in FSI computations....
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_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 ...
FSIWallElement(const FSIWallElement &)=delete
Broken copy constructor.
void reset_after_nodal_fd()
Function that is call after the finite differencing of the nodal data. This may be overloaded to rese...
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...
void reset_after_external_fd()
Function that is call after the finite differencing of the external data. This may be overloaded to r...
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 o...
void update_in_external_interaction_geometric_fd(const unsigned &i)
After an external geometric data change, update the nodal positions.
virtual ~FSIWallElement()
Empty virtual destructor for safety.
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...
bool only_front_is_loaded_by_fluid() const
Is the element exposed to (and hence loaded by) fluid only on its "front"? True by default....
void reset_after_external_interaction_field_fd()
Function that is call after the finite differencing of the external interaction data associated with ...
void disable_shear_stress_in_jacobian()
Call this function to ignore shear stress component of load when calculating the Jacobian,...
void include_external_load_data()
Include all external fluid data that affects the load in the computation of the element's Jacobian ma...
bool Ignore_shear_stress_in_jacobian
Set this flag to true to ignore shear stress component of load when calculating the Jacobian,...
void operator=(const FSIWallElement &)=delete
Broken assignment operator.
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Fill in the element's contribution to the Jacobian matrix and the residual vector: Done by finite dif...
void update_in_external_fd(const unsigned &i)
After an external data change, update the nodal positions.
void enable_shear_stress_in_jacobian()
Call thi function to re-enable calculation of the shear stress componnent of load when calculating th...
void exclude_external_load_data()
Do not include any external data that affects the load in the computation of element's Jacobian matri...
const double & q() const
Return the ratio of the stress scales used to non-dimensionalise the fluid and solid equations....
void reset_in_external_interaction_geometric_fd(const unsigned &i)
Function called within the finite difference loop for external interaction data after the values in t...
void reset_in_solid_position_fd(const unsigned &i)
Function called within the finite difference loop for solid position data after the values in the i-t...
void reset_after_internal_fd()
Function that is call after the finite differencing of the internal data. This may be overloaded to r...
void update_in_external_interaction_field_fd(const unsigned &i)
After an external field data change, update the nodal positions.
double * Q_pt
Pointer to the ratio, , of the stress used to non-dimensionalise the fluid stresses to the stress us...
static double Default_Q_Value
Static default value for the ratio of stress scales used in the fluid and solid equations (default is...
void reset_after_external_interaction_geometric_fd()
Function that is call after the finite differencing of the external interaction data associated with ...
void reset_in_external_interaction_field_fd(const unsigned &i)
Function called within the finite difference loop for external interaction data after the values in t...
void update_in_nodal_fd(const unsigned &i)
After a nodal data change, update the nodal positions.
void update_in_solid_position_fd(const unsigned &i)
After an internal data change, update the nodal positions.
FSIWallElement()
Constructor. Note that element is not fully-functional until its setup_fsi_wall_element() function ha...
void update_in_internal_fd(const unsigned &i)
After an internal data change, update the nodal positions.
static bool Dont_warn_about_missing_adjacent_fluid_elements
Static flag that allows the suppression of warning messages.
void reset_after_solid_position_fd()
Function that is call after the finite differencing of the solid position data. This may be overloade...
void node_update_adjacent_fluid_elements()
Update the nodal positions in all fluid elements that affect the traction on this FSIWallElement.
void reset_in_internal_fd(const unsigned &i)
Function called within the finite difference loop for internal data after the values in the i-th exte...
double *& q_pt()
Return a pointer the ratio of stress scales used to non-dimensionalise the fluid and solid equations.
bool Only_front_is_loaded_by_fluid
Is the element exposed to (and hence loaded by) fluid only on its "front"? True by default....
void reset_in_nodal_fd(const unsigned &i)
Function called within the finite difference loop for nodal data after the i-th nodal values is reset...
void reset_in_external_fd(const unsigned &i)
Function called within the finite difference loop for external data after the values in the i-th exte...
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 ...
A general Finite Element class.
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
Data * geom_data_pt(const unsigned &j)
A standard FiniteElement is fixed, so there are no geometric data when viewed in its GeomObject incar...
virtual double s_min() const
Min value of local coordinate.
double size() const
Calculate the size of the element (length, area, volume,...) in Eulerian computational coordinates....
virtual void fill_in_jacobian_from_nodal_by_fd(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Calculate the contributions to the jacobian from the nodal degrees of freedom using finite difference...
virtual double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s.
unsigned dim() const
Return the spatial dimension of the element, i.e. the number of local coordinates required to paramet...
unsigned nnode() const
Return the number of nodes.
virtual double s_max() const
Max. value of local coordinate.
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
unsigned nodal_dimension() const
Return the required Eulerian dimension of the nodes in this element.
unsigned ngeom_data() const
A standard FiniteElement is fixed, so there are no geometric data when viewed in its GeomObject incar...
void fill_in_jacobian_from_external_by_fd(Vector< double > &residuals, DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
Calculate the contributions to the jacobian from the external degrees of freedom using finite differe...
bool is_halo() const
Is this element a halo?
virtual void fill_in_contribution_to_residuals(Vector< double > &residuals)
Add the elemental contribution to the residuals vector. Note that this function will NOT initialise t...
void fill_in_jacobian_from_internal_by_fd(Vector< double > &residuals, DenseMatrix< double > &jacobian, const bool &fd_all_data=false)
Calculate the contributions to the jacobian from the internal degrees of freedom using finite differe...
unsigned ndof() const
Return the number of equations/dofs in the element.
Data *& internal_data_pt(const unsigned &i)
Return a pointer to i-th internal data object.
virtual void get_residuals(Vector< double > &residuals)
Calculate the vector of residuals of the equations in the element. By default initialise the vector t...
unsigned ninternal_data() const
Return the number of internal data objects.
unsigned ndim() const
Access function to # of Eulerian coordinates.
virtual double knot(const unsigned &i, const unsigned &j) const =0
Return local coordinate s[j] of i-th integration point.
virtual unsigned nweight() const =0
Return the number of integration points of the scheme.
Nodes are derived from Data, but, in addition, have a definite (Eulerian) position in a space of a gi...
double & x(const unsigned &i)
Return the i-th nodal coordinate.
An OomphLibError object which should be thrown when an run-time error is encountered....
An OomphLibWarning object which should be created as a temporary object to issue a warning....
////////////////////////////////////////////////////////////////// //////////////////////////////////...
SolidFiniteElement class.
bool Solve_for_consistent_newmark_accel_flag
Flag to indicate which system of equations to solve when assigning initial conditions for time-depend...
virtual void fill_in_jacobian_from_solid_position_by_fd(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Use finite differences to calculate the Jacobian entries corresponding to the solid positions....
void fill_in_jacobian_for_newmark_accel(DenseMatrix< double > &jacobian)
Fill in the contributions of the Jacobian matrix for the consistent assignment of the initial "accele...
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
void output(std::ostream &outfile)
Output function: x,y,u or x,y,z,u.
A slight extension to the standard template vector class so that we can include "graceful" array rang...
double Strouhal_for_no_slip
Strouhal number St = a/(UT) for application of no slip condition. Initialised to 1....
void setup_solid_elements_for_displacement_bc(Problem *problem_pt, const Vector< unsigned > &b_solid_fsi, Mesh *const &solid_mesh_pt, Vector< Mesh * > &lagrange_multiplier_mesh_pt)
Setup multi-domain interaction required for imposition of solid displacements onto the pseudo-solid f...
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 = ...
void setup_fluid_load_info_for_solid_elements(Problem *problem_pt, Vector< unsigned > &boundary_in_fluid_mesh, Mesh *const &fluid_mesh_pt, Vector< Mesh * > &solid_mesh_pt, const unsigned &face=0)
Set up the information that the FSIWallElements in the specified solid mesh require to obtain the flu...
void doc_fsi(Mesh *fluid_mesh_pt, SolidMesh *wall_mesh_pt, DocInfo &doc_info)
Doc FSI:
void setup_bulk_elements_adjacent_to_face_mesh(Problem *problem_pt, Vector< unsigned > &boundary_in_bulk_mesh, Mesh *const &bulk_mesh_pt, Vector< Mesh * > &face_mesh_pt, const unsigned &interaction=0)
Identify the FaceElements (stored in the mesh pointed to by face_mesh_pt) that are adjacent to the bu...
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).