surfactant_transport_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 specific (two-dimensional) fluid free surface elements
27 
28 // Include guards, to prevent multiple includes
29 #ifndef OOMPH_SURFACTANT_TRANSPORT_ELEMENTS_HEADER
30 #define OOMPH_SURFACTANT_TRANSPORT_ELEMENTS_HEADER
31 
32 
33 // Config header generated by autoconfig
34 #ifdef HAVE_CONFIG_H
35 #include <oomph-lib-config.h>
36 #endif
37 
38 // OOMPH-LIB headers
40 
41 namespace oomph
42 {
43  //==================================================================
47  //=================================================================
49  {
50  private:
52  double* Beta_pt;
53 
55  double* Peclet_S_pt;
56 
59 
60  protected:
64 
65 
68 
70  double interpolated_C(const Vector<double>& s);
71 
73  double dcdt_surface(const unsigned& l) const;
74 
78  double sigma(const Vector<double>& s);
79 
82  virtual double dsigma_dC(const Vector<double>& s)
83  {
84  return -this->beta();
85  }
86 
91  Vector<double>& residuals,
92  DenseMatrix<double>& jacobian,
93  const unsigned& flag,
94  const Shape& psif,
95  const DShape& dpsifds,
96  const DShape& dpsifdS,
97  const DShape& dpsifdS_div,
98  const Vector<double>& s,
100  const Vector<double>& interpolated_n,
101  const double& W,
102  const double& J);
103 
104 
108  Vector<double>& residuals,
109  DenseMatrix<double>& jacobian,
110  DenseMatrix<double>& mass_matrix)
111  {
112  // Add the contribution to the jacobian
113  this->fill_in_contribution_to_jacobian(residuals, jacobian);
114  // No mass matrix terms, but should probably do kinematic bit here
115  }
116 
117  public:
121  {
122  // Initialise the values
126  }
127 
128  // Set the c_index
129  inline void set_c_index(const Vector<unsigned>& c_index)
130  {
131  this->C_index = c_index;
132  }
133 
135  double beta()
136  {
137  return *Beta_pt;
138  }
139 
141  double peclet_s()
142  {
143  return *Peclet_S_pt;
144  }
145 
148  {
149  return *Peclet_Strouhal_S_pt;
150  }
151 
153  double*& beta_pt()
154  {
155  return Beta_pt;
156  }
157 
159  double*& peclet_s_pt()
160  {
161  return Peclet_S_pt;
162  }
163 
166  {
167  return Peclet_Strouhal_S_pt;
168  }
169 
170 
172  void output(std::ostream& outfile)
173  {
174  FiniteElement::output(outfile);
175  }
176 
177  void output(std::ostream& outfile, const unsigned& n_plot);
178 
180  void output(FILE* file_pt)
181  {
182  FiniteElement::output(file_pt);
183  }
184 
186  void output(FILE* file_pt, const unsigned& n_plot)
187  {
188  FiniteElement::output(file_pt, n_plot);
189  }
190 
192  double integrate_c();
193  };
194 
195 
199  //=============================================================================
200  template<>
202  {
203  public:
205 
206  inline unsigned nadditional_values(const unsigned& n)
207  {
208  return 1;
209  }
210 
212  SurfactantTransportInterfaceElement* const& element_pt,
213  const unsigned& id)
214  {
215  const unsigned n_node = element_pt->nnode();
216  Vector<unsigned> c_index(n_node);
217  for (unsigned n = 0; n < n_node; n++)
218  {
219  c_index[n] = dynamic_cast<BoundaryNodeBase*>(element_pt->node_pt(n))
220  ->index_of_first_value_assigned_by_face_element(id);
221  }
222 
223  element_pt->set_c_index(c_index);
224  }
225  };
226 
227 
228  //-------------------------------GEOMETRIC SPECIALISATIONS----------------
229 
231  template<class ELEMENT>
234  SurfactantTransportInterfaceElement,
235  LineDerivatives,
236  ELEMENT>
237  {
238  public:
240  FiniteElement* const& element_pt, const int& face_index)
243  ELEMENT>(element_pt, face_index)
244  {
245  }
246  };
247 
248 
249  // Define the bounding element type for the line elements
250  template<class ELEMENT>
254  ELEMENT>>
256  {
257  public:
261  ELEMENT>>()
263  {
264  }
265  };
266 
267 
269  template<class ELEMENT>
272  SurfactantTransportInterfaceElement,
273  AxisymmetricDerivatives,
274  ELEMENT>
275  {
276  public:
278  FiniteElement* const& element_pt, const int& face_index)
281  ELEMENT>(element_pt, face_index)
282  {
283  }
284  };
285 
286 
287  // Define the bounding element type for the axisymmetric surface
288  template<class ELEMENT>
292  ELEMENT>>
294  {
295  public:
299  ELEMENT>>()
301  {
302  }
303  };
304 
306  template<class ELEMENT>
309  SurfactantTransportInterfaceElement,
310  AxisymmetricDerivatives,
311  ELEMENT>
312  {
313  public:
315  FiniteElement* const& element_pt, const int& face_index)
318  ELEMENT>(element_pt, face_index)
319  {
320  }
321  };
322 
323 
324  // Define the bounding element type for the axisymmetric surface
325  template<class ELEMENT>
329  ELEMENT>>
331  {
332  public:
336  ELEMENT>>()
338  {
339  }
340  };
341 
342 
344  template<class ELEMENT>
347  SurfactantTransportInterfaceElement,
348  SurfaceDerivatives,
349  ELEMENT>
350  {
351  public:
353  FiniteElement* const& element_pt, const int& face_index)
356  ELEMENT>(element_pt, face_index)
357  {
358  }
359  };
360 
361 
362  // Define the bounding element type for the 2D surface
363  template<class ELEMENT>
367  ELEMENT>>
369  {
370  public:
374  ELEMENT>>()
376  {
377  }
378  };
379 
380 
381 } // namespace oomph
382 
383 #endif
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
JacobiRotation< float > J
Definition: Jacobi_makeJacobi.cpp:3
Definition: interface_elements.h:685
Definition: nodes.h:1996
Definition: specific_node_update_interface_elements.h:55
Definition: shape.h:278
Specialise to the Axisymmetric geometry.
Definition: surfactant_transport_elements.h:312
ElasticAxisymmetricSurfactantTransportInterfaceElement(FiniteElement *const &element_pt, const int &face_index)
Definition: surfactant_transport_elements.h:314
Pseudo-elasticity version of the PointFluidInterfaceBoundingElement.
Definition: specific_node_update_interface_elements.h:1042
Definition: specific_node_update_interface_elements.h:676
int & face_index()
Definition: elements.h:4626
double interpolated_x(const Vector< double > &s, const unsigned &i) const
Definition: elements.h:4528
Definition: elements.h:1313
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Definition: elements.h:1735
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
Definition: elements.h:2175
virtual void output(std::ostream &outfile)
Definition: elements.h:3050
unsigned nnode() const
Return the number of nodes.
Definition: elements.h:2210
void setup_equation_indices(SurfactantTransportInterfaceElement *const &element_pt, const unsigned &id)
Definition: surfactant_transport_elements.h:211
unsigned nadditional_values(const unsigned &n)
Definition: surfactant_transport_elements.h:206
Definition: specific_node_update_interface_elements.h:72
Definition: interface_elements.h:321
Definition: interface_elements.h:661
Definition: shape.h:76
Specialise to the Axisymmetric geometry.
Definition: surfactant_transport_elements.h:275
SpineAxisymmetricSurfactantTransportInterfaceElement(FiniteElement *const &element_pt, const int &face_index)
Definition: surfactant_transport_elements.h:277
Spine version of the LineFluidInterfaceBoundingElement.
Definition: specific_node_update_interface_elements.h:489
Specialise to the Line geometry.
Definition: surfactant_transport_elements.h:237
SpineLineSurfactantTransportInterfaceElement(FiniteElement *const &element_pt, const int &face_index)
Definition: surfactant_transport_elements.h:239
Spine version of the PointFluidInterfaceBoundingElement.
Definition: specific_node_update_interface_elements.h:425
Specialise to surface geometry.
Definition: surfactant_transport_elements.h:350
SpineSurfaceSurfactantTransportInterfaceElement(FiniteElement *const &element_pt, const int &face_index)
Definition: surfactant_transport_elements.h:352
Definition: specific_node_update_interface_elements.h:156
Definition: interface_elements.h:709
Definition: surfactant_transport_elements.h:49
double sigma(const Vector< double > &s)
Definition: surfactant_transport_elements.cc:95
double *& peclet_s_pt()
Access function for pointer to the surface Peclet number.
Definition: surfactant_transport_elements.h:159
Vector< unsigned > C_index
Definition: surfactant_transport_elements.h:63
void output(std::ostream &outfile)
Overload the output function.
Definition: surfactant_transport_elements.h:172
void output(FILE *file_pt)
Overload the C-style output function.
Definition: surfactant_transport_elements.h:180
virtual double dsigma_dC(const Vector< double > &s)
Definition: surfactant_transport_elements.h:82
double * Peclet_Strouhal_S_pt
Pointer to the surface Peclect Strouhal number.
Definition: surfactant_transport_elements.h:58
double *& beta_pt()
Access function for pointer to the Elasticity number.
Definition: surfactant_transport_elements.h:153
double * Peclet_S_pt
Pointer to Surface Peclet number.
Definition: surfactant_transport_elements.h:55
double integrate_c()
Compute the concentration intergated over the surface area.
Definition: surfactant_transport_elements.cc:358
double beta()
Return the Elasticity number.
Definition: surfactant_transport_elements.h:135
double dcdt_surface(const unsigned &l) const
The time derivative of the surface concentration.
Definition: surfactant_transport_elements.cc:67
void fill_in_contribution_to_jacobian_and_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
Definition: surfactant_transport_elements.h:107
double *& peclet_strouhal_s_pt()
Access function for pointer to the surface Peclet x Strouhal number.
Definition: surfactant_transport_elements.h:165
SurfactantTransportInterfaceElement()
Definition: surfactant_transport_elements.h:120
double interpolated_C(const Vector< double > &s)
Get the surfactant concentration.
Definition: surfactant_transport_elements.cc:40
void set_c_index(const Vector< unsigned > &c_index)
Definition: surfactant_transport_elements.h:129
double * Beta_pt
Pointer to an Elasticity number.
Definition: surfactant_transport_elements.h:52
double peclet_s()
Return the surface peclect number.
Definition: surfactant_transport_elements.h:141
double peclet_strouhal_s()
Return the surface peclect strouhal number.
Definition: surfactant_transport_elements.h:147
void output(FILE *file_pt, const unsigned &n_plot)
C-style Output function.
Definition: surfactant_transport_elements.h:186
void add_additional_residual_contributions_interface(Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag, const Shape &psif, const DShape &dpsifds, const DShape &dpsifdS, const DShape &dpsifdS_div, const Vector< double > &s, const Vector< double > &interpolated_x, const Vector< double > &interpolated_n, const double &W, const double &J)
Definition: surfactant_transport_elements.cc:121
static double Default_Physical_Constant_Value
Default value of the physical constants.
Definition: surfactant_transport_elements.h:67
RealScalar s
Definition: level1_cplx_impl.h:130
@ W
Definition: quadtree.h:63
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10