interface_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-2025 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 (one-dimensional) free surface elements
27// Include guards, to prevent multiple includes
28#ifndef OOMPH_INTERFACE_ELEMENTS_HEADER
29#define OOMPH_INTERFACE_ELEMENTS_HEADER
30
31// Config header
32#ifdef HAVE_CONFIG_H
33#include <oomph-lib-config.h>
34#endif
35
36#include "generic/elements.h"
37#include "generic/spines.h"
38#include "generic/shape.h"
40
41namespace oomph
42{
43 //========================================================================
44 /// Base class for elements at the boundary of free surfaces or interfaces,
45 /// used typically to impose contact angle boundary conditions.
46 /// The elemental dimensions are one less than those of the
47 /// surface elements, or two less than those of the original bulk elements.
48 /// Thus in two-dimensional and axi-symmetric problems, are points,
49 /// but in three-dimensional problems, they are lines.
50 /// These boundaries may be in contact with a solid surface, in which case
51 /// the normal to that surface must be provided.
52 //=========================================================================
54 {
55 private:
56 /// Function pointer to a wall unit normal function. Returns the
57 /// unit normal on the wall, at the specified Eulerian coordinate.
60
61 /// Pointer to a wall normal function that returns
62 /// the wall unit normal as a function of position in global
63 /// Eulerian coordinates.
65
66 /// Pointer to the desired value of the contact angle (if any)
68
69 /// Pointer to the desired value of the capillary number
70 double* Ca_pt;
71
72 protected:
73 /// Flag used to determine whether the contact angle is to be
74 /// used (0 if not), and whether it will be applied weakly as a force term
75 /// in the momentum equations (1) or by hijacking the kinematic
76 /// condition (2).
78
79 /// Index at which the i-th velocity component is stored in the
80 /// element's nodes
82
83 /// Function that is used to determine the local equation number of
84 /// the kinematic equation associated with the nodes of the element
85 /// This must be overloaded depending on the node update scheme
86 virtual int kinematic_local_eqn(const unsigned& n) = 0;
87
88 /// Function that returns the unit normal of the bounding wall
89 /// directed out of the fluid
91 {
92#ifdef PARANOID
94 {
95#endif
96 (*Wall_unit_normal_fct_pt)(x, normal);
97#ifdef PARANOID
98 }
99 else
100 {
101 throw OomphLibError("Wall unit normal fct has not been set",
102 "FluidInterfaceBoundingElement::wall_unit_normal()",
104 }
105#endif
106 }
107
108 /// The geometric data of the parent element is included as
109 /// external data and so a (bulk) node update must take place after
110 /// the variation of any of this external data
111 inline void update_in_external_fd(const unsigned& i)
112 {
113 // Update the bulk element
115 }
116
117 /// The only external data are these geometric data so
118 /// We can omit the reset function (relying on the next update
119 // function to take care of the remesh)
120 inline void reset_in_external_fd(const unsigned& i) {}
121
122 /// We require a final node update in the bulk element
123 /// after all finite differencing
125 {
126 // Update the bulk element
128 }
129
130 public:
131 /// Constructor
139
140 /// Access function: Pointer to wall unit normal function
145
146 /// Access function: Pointer to wall unit normal function. Const version
151
152 /// Access for nodal index at which the velocity components are stored
157
158 /// Set a pointer to the desired contact angle. Optional boolean
159 /// (defaults to true)
160 /// chooses strong imposition via hijacking (true) or weak imposition
161 /// via addition to momentum equation (false). The default strong imposition
162 /// is appropriate for static contact angle problems.
163 void set_contact_angle(double* const& angle_pt, const bool& strong = true);
164
165 /// Access function to the pointer specifying the prescribed contact angle
167 {
168 return Contact_angle_pt;
169 }
170
171 /// Access function to the pointer specifying the capillary number
172 double*& ca_pt()
173 {
174 return Ca_pt;
175 }
176
177 /// Return the value of the capillary number
178 double ca()
179 {
180#ifdef PARANOID
181 if (Ca_pt != 0)
182 {
183#endif
184 return *Ca_pt;
185#ifdef PARANOID
186 }
187 else
188 {
189 throw OomphLibError("Capillary number has not been set",
190 "FluidInterfaceBoundingElement::ca()",
192 }
193#endif
194 }
195
196
197 /// Return value of the contact angle
199 {
200#ifdef PARANOID
201 if (Contact_angle_pt == 0)
202 {
203 std::string error_message = "Contact angle not set\n";
204 error_message +=
205 "Please use FluidInterfaceBoundingElement::set_contact_angle()\n";
206 throw OomphLibError(
208 }
209#endif
210 return *Contact_angle_pt;
211 }
212
213 /// Calculate the residuals
220
221 /// Calculate the generic residuals contribution
224 DenseMatrix<double>& jacobian,
225 unsigned flag) = 0;
226
227
228 /// Empty helper function to calculate the additional contributions
229 /// arising from the node update strategy to the Jacobian within the
230 /// integration loop. This will be overloaded by elements that require
231 /// contributions to their underlying equations from boundary integrals.
232 /// The shape functions, their derivatives w.r.t. to the local coordinates,
233 /// the unit normal and integral weight are passed in so that they do not
234 /// have to be recalculated.
237 DenseMatrix<double>& jacobian,
238 const unsigned& flag,
239 const Shape& psif,
240 const DShape& dpsifds,
242 const double& W)
243 {
244 }
245
246 /// Overload the output function
247 void output(std::ostream& outfile)
248 {
250 }
251
252 /// Output function
253 void output(std::ostream& outfile, const unsigned& n_plot)
254 {
256 }
257
258 /// Overload the C-style output function
263
264 /// C-style Output function
265 void output(FILE* file_pt, const unsigned& n_plot)
266 {
268 }
269 };
270
271
272 //==========================================================================
273 /// Specialisation of the interface boundary constraint to a point
274 //==========================================================================
277 {
278 protected:
279 /// Overload the helper function to calculate the residuals and
280 /// (if flag==1) the Jacobian -- this function only deals with
281 /// the part of the Jacobian that can be handled generically.
282 /// Specific additional contributions may be provided in
283 /// add_additional_residual_contributions_interface_boundary(...)
285 Vector<double>& residuals, DenseMatrix<double>& jacobian, unsigned flag);
286
287 public:
288 /// Constructor
290 };
291
292
293 //==========================================================================
294 /// Specialisation of the interface boundary constraint to a line
295 //==========================================================================
297 {
298 protected:
299 /// Overload the helper function to calculate the residuals and
300 /// (if flag==true) the Jacobian -- this function only deals with
301 /// the part of the Jacobian that can be handled generically.
302 /// Specific additional contributions may be provided in
303 /// add_additional_residual_contributions_interface_boundary()
305 Vector<double>& residuals, DenseMatrix<double>& jacobian, unsigned flag);
306
307 public:
308 /// Constructor
310 };
311
312
313 //=======================================================================
314 /// Base class establishing common interfaces and functions for all
315 /// Navier-Stokes-like fluid
316 /// interface elements. Namely, elements that represent either a free
317 /// surface or an interface between two fluids that have distinct
318 /// momentum-like equation for each velocity component.
319 //======================================================================
320 class FluidInterfaceElement : public virtual FaceElement
321 {
322 // Make the bounding element class a friend
324
325 private:
326 /// Pointer to the Capillary number
327 double* Ca_pt;
328
329 /// Pointer to the Strouhal number
330 double* St_pt;
331
332 /// Default value for physical constants
334
335
336 protected:
337 /// Nodal index at which the i-th velocity component is stored.
339
340 /// The Data that contains the external pressure is stored
341 /// as external Data for the element. Which external Data item is it?
342 /// (int so it can be initialised to -1, indicating that external
343 /// pressure hasn't been set).
345
346 /// Pointer to the Data item that stores the external pressure
348
349 /// Which of the values in Pext_data_pt stores the external pressure
351
352 /// Access function that returns the local equation number
353 /// for the (scalar) kinematic equation associated with the j-th local
354 /// node. This must be overloaded by specific interface elements
355 /// and depends on the method for handing the free-surface deformation.
356 virtual int kinematic_local_eqn(const unsigned& n) = 0;
357
358 /// Access function for the local equation number that
359 /// corresponds to the external pressure.
361 {
362#ifdef PARANOID
364 {
365 throw OomphLibError("No external pressure has been set\n",
368 }
369#endif
372 }
373
374 /// Helper function to calculate the residuals and
375 /// (if flag==1) the Jacobian of the equations.
376 /// This is implemented generically using the surface
377 /// divergence information that is overloaded in each element
378 /// i.e. axisymmetric, two- or three-dimensional.
380 Vector<double>& residuals, DenseMatrix<double>& jacobian, unsigned flag);
381
382 /// Compute the surface gradient and surface divergence
383 /// operators given the shape functions, derivatives,
384 /// tangent vectors and position. All derivatives and
385 /// tangent vectors should be formed
386 /// with respect to the local coordinates.
387 ///
388 /// Return the jacobian of the surface, as well
389 /// as the dpsidS, and dpsidS_div objects.
390 ///
391 /// This is the only
392 /// function that needs to be overloaded to specify
393 /// different geometries.
394 ///
395 /// In order to compute the surface gradient of a scalar
396 /// function one needs only compute the sum over the nodes
397 /// of dpsidS(l,i) * nodal_value(l,scalar_index)
398 /// To compute the surface divergence of a vector quantity
399 /// one computes a sum over nodes and coordinate directions
400 /// dpsidS_div(l,i) * nodal_value(l,vector_index[i])
401 /// In Cartesian cordinates the two surface derivatives are the
402 /// same, but in Axisymmetric coordinates they are not!
404 const Shape& psi,
405 const DShape& dpsids,
408 DShape& dpsidS,
409 DShape& dpsidS_div) = 0;
410
411 /// Helper function to calculate the additional contributions
412 /// to the resisuals and Jacobian that arise from specific node update
413 /// strategies. This is called within the integration loop over the
414 /// element (for efficiency) and therefore requires a fairly large
415 /// number of input parameters:
416 /// - the velocity shape functions and their derivatives w.r.t.
417 /// the local coordinates
418 /// - the surface gradient and divergence of the velocity shape
419 /// functions
420 /// - The local and Eulerian coordinates,
421 /// - the outer unit normal,
422 /// - the integration weight from the integration scheme
423 /// - the Jacobian of the mapping between the local and global coordinates
424 /// along the element. (Note that in the axisymmmetric case this
425 /// includes the r term)!
428 DenseMatrix<double>& jacobian,
429 const unsigned& flag,
430 const Shape& psif,
431 const DShape& dpsifds,
432 const DShape& dpsifdS,
433 const DShape& dpsifdS_div,
434 const Vector<double>& s,
437 const double& W,
438 const double& J)
439 {
440 }
441
442 public:
443 /// Constructor, set the default values of the booleans and pointers (null)
445 {
446 // Initialise pointer to capillary number
447 Ca_pt = 0;
448
449 // Set the Strouhal number to the default value
451 }
452
453 /// Virtual function that specifies the non-dimensional
454 /// surface tension as a function of local position within the element.
455 /// The default behaviour is a constant surface tension of value 1.0
456 /// This function can be overloaded in more specialised elements to
457 /// incorporate variations in surface tension.
458 virtual double sigma(const Vector<double>& s_local)
459 {
460 return 1.0;
461 }
462
463 /// Calculate the residuals by calling the generic residual contribution.
470
471
472 /// The value of the Capillary number
473 const double& ca() const
474 {
475#ifdef PARANOID
476 if (Ca_pt != 0)
477 {
478#endif
479 return *Ca_pt;
480#ifdef PARANOID
481 }
482 else
483 {
484 throw OomphLibError("Capillary number has not been set",
485 "FluidInterfaceElement::ca()",
487 }
488#endif
489 }
490
491 /// Pointer to the Capillary number
492 double*& ca_pt()
493 {
494 return Ca_pt;
495 }
496
497 /// The value of the Strouhal number
498 const double& st() const
499 {
500 return *St_pt;
501 }
502
503 /// The pointer to the Strouhal number
504 double*& st_pt()
505 {
506 return St_pt;
507 }
508
509 /// Return the i-th velocity component at local node j.
510 double u(const unsigned& j, const unsigned& i)
511 {
512 return node_pt(j)->value(U_index_interface[i]);
513 }
514
515 /// Calculate the i-th velocity component at the local coordinate s.
516 double interpolated_u(const Vector<double>& s, const unsigned& i);
517
518 /// Return the value of the external pressure
519 double pext() const
520 {
521 // If the external pressure has not been set, then return a
522 // default value of zero.
523 if (Pext_data_pt == 0)
524 {
525 return 0.0;
526 }
527 // Otherwise return the appropriate value
528 else
529 {
531 }
532 }
533
534 /// Set the Data that contains the single pressure value
535 /// that specifies the "external pressure" for the
536 /// interface/free-surface. Setting this only makes sense
537 /// if the interface is, in fact, a free surface (well,
538 /// an interface to another inviscid fluid if you want to be picky).
540 {
541#ifdef PARANOID
542 if (external_pressure_data_pt->nvalue() != 1)
543 {
544 std::ostringstream error_message;
545 error_message
546 << "External pressure Data must only contain a single value!\n"
547 << "This one contains " << external_pressure_data_pt->nvalue()
548 << std::endl;
549
550 throw OomphLibError(error_message.str(),
553 }
554#endif
555
556 // Store pointer explicitly
558
559 // Add the external pressure to the element's external Data?
560 // But do not finite-difference with respect to it
561 this->add_external_data(Pext_data_pt, false);
562
563 // The external pressure has just been promoted to become
564 // external Data of this element -- what is its number?
566
567 // Index of pressure value in Data object
568 Index_of_external_pressure_value = 0;
569 }
570
571 /// Set the Data that contains the pressure value
572 /// that specifies the "external pressure" for the
573 /// interface/free-surface. Setting this only makes sense
574 /// if the interface is, in fact, a free surface (well,
575 /// an interface to another inviscid fluid if you want to be picky).
576 /// Second argument specifies the index of the pressure
577 /// value within the Data object.
580 const unsigned& index_of_external_pressure_value)
581 {
582 // Index of pressure value in Data object
584
585#ifdef PARANOID
588 {
589 std::ostringstream error_message;
590 error_message << "External pressure Data only contains "
591 << external_pressure_data_pt->nvalue() << " values\n"
592 << "You have declared value "
594 << " to be the value representing the pressure\n"
595 << std::endl;
596 throw OomphLibError(error_message.str(),
599 }
600#endif
601
602 // Store pointer explicitly
604
605 // Add the external pressure to the element's external Data?
606 // But do not finite-difference with respect to it
607 this->add_external_data(Pext_data_pt, false);
608
609 // The external pressure has just been promoted to become
610 // external Data of this element -- what is its number?
612 }
613
614
615 /// Create a bounding element e.g. to apply a contact angle boundary
616 /// condition
618 const int& face_index)
619 {
620 throw OomphLibError("Virtual function not yet implemented",
623 return 0;
624 }
625
626
627 /// Hijack the kinematic condition at the node numbers passed in
628 /// the vector. The node numbers correspond to the local numbers of
629 /// nodes in the associated bulk element.
630 /// This is required so that contact-angle conditions can be applied
631 /// by the FluidInterfaceBoundingElements.
634
635 /// Overload the output function
636 void output(std::ostream& outfile)
637 {
639 }
640
641 /// Output function
642 void output(std::ostream& outfile, const unsigned& n_plot);
643
644 /// Overload the C-style output function
649
650 /// C-style Output function
651 void output(FILE* file_pt, const unsigned& n_plot);
652 };
653
654
655 //=============================================================
656 /// Class that establishes the surface derivative functions for
657 /// LineElements. These are defined in a separate class so that
658 /// they can be used by other interface equation-type classes.
659 //=============================================================
661 {
662 public:
663 // Empty Constructor
665
666 protected:
667 /// Fill in the specific surface derivative calculations
669 const Shape& psi,
670 const DShape& dpsids,
672 const Vector<double>& interpolated_x,
675 };
676
677
678 //=============================================================
679 /// Class that establishes the surface derivative functions for
680 /// AxisymmetricInterfaceElements.
681 /// These are defined in a separate class so that
682 /// they can be used by other interface equation-type classes.
683 //=============================================================
685 {
686 public:
687 // Empty Constructor
689
690 protected:
691 /// Fill in the specific surface derivative calculations
693 const Shape& psi,
694 const DShape& dpsids,
696 const Vector<double>& interpolated_x,
699 };
700
701
702 //=============================================================
703 /// Class that establishes the surface derivative functions for
704 /// SurfaceInterfaceElements (2D surfaces in 3D space)
705 /// These are defined in a separate class so that
706 /// they can be used by other interface equation-type classes.
707 //=============================================================
709 {
710 public:
711 // Empty Constructor
713
714 protected:
715 /// Fill in the specific surface derivative calculations
717 const Shape& psi,
718 const DShape& dpsids,
720 const Vector<double>& interpolated_x,
723 };
724
725
726} // namespace oomph
727
728#endif
static char t char * s
Definition cfortran.h:568
cstr elem_len * i
Definition cfortran.h:603
Class that establishes the surface derivative functions for AxisymmetricInterfaceElements....
double compute_surface_derivatives(const Shape &psi, const DShape &dpsids, const DenseMatrix< double > &interpolated_t, const Vector< double > &interpolated_x, DShape &surface_gradient, DShape &surface_divergence)
Fill in the specific surface derivative calculations.
A Class for the derivatives of shape functions The class design is essentially the same as Shape,...
Definition shape.h:278
A class that represents a collection of data; each Data object may contain many different individual ...
Definition nodes.h:86
double value(const unsigned &i) const
Return i-th stored value. This function is not virtual so that it can be inlined. This means that if ...
Definition nodes.h:293
FaceElements are elements that coincide with the faces of higher-dimensional "bulk" elements....
Definition elements.h:4342
int & face_index()
Index of the face (a number that uniquely identifies the face in the element)
Definition elements.h:4630
double interpolated_x(const Vector< double > &s, const unsigned &i) const
Return FE interpolated coordinate x[i] at local coordinate s. Overloaded to get information from bulk...
Definition elements.h:4532
unsigned & bulk_node_number(const unsigned &n)
Return the bulk node number that corresponds to the n-th local node number.
Definition elements.h:4829
FiniteElement *& bulk_element_pt()
Pointer to higher-dimensional "bulk" element.
Definition elements.h:4739
virtual void output(std::ostream &outfile)
Output the element data — typically the values at the nodes in a format suitable for post-processing.
Definition elements.h:3054
Node *& node_pt(const unsigned &n)
Return a pointer to the local node n.
Definition elements.h:2179
virtual void node_update()
Update the positions of all nodes in the element using each node update function. The default impleme...
Definition elements.cc:5102
Base class for elements at the boundary of free surfaces or interfaces, used typically to impose cont...
Vector< unsigned > U_index_interface_boundary
Index at which the i-th velocity component is stored in the element's nodes.
void(* WallUnitNormalFctPt)(const Vector< double > &x, Vector< double > &unit_normal)
Function pointer to a wall unit normal function. Returns the unit normal on the wall,...
virtual int kinematic_local_eqn(const unsigned &n)=0
Function that is used to determine the local equation number of the kinematic equation associated wit...
void wall_unit_normal(const Vector< double > &x, Vector< double > &normal)
Function that returns the unit normal of the bounding wall directed out of the fluid.
double *& contact_angle_pt()
Access function to the pointer specifying the prescribed contact angle.
double * Contact_angle_pt
Pointer to the desired value of the contact angle (if any)
WallUnitNormalFctPt wall_unit_normal_fct_pt() const
Access function: Pointer to wall unit normal function. Const version.
virtual void add_additional_residual_contributions_interface_boundary(Vector< double > &residuals, DenseMatrix< double > &jacobian, const unsigned &flag, const Shape &psif, const DShape &dpsifds, const Vector< double > &interpolated_n, const double &W)
Empty helper function to calculate the additional contributions arising from the node update strategy...
Vector< unsigned > & u_index_interface_boundary()
Access for nodal index at which the velocity components are stored.
virtual void fill_in_generic_residual_contribution_interface_boundary(Vector< double > &residuals, DenseMatrix< double > &jacobian, unsigned flag)=0
Calculate the generic residuals contribution.
void reset_after_external_fd()
We require a final node update in the bulk element after all finite differencing.
void reset_in_external_fd(const unsigned &i)
The only external data are these geometric data so We can omit the reset function (relying on the nex...
void output(std::ostream &outfile)
Overload the output function.
void set_contact_angle(double *const &angle_pt, const bool &strong=true)
Set a pointer to the desired contact angle. Optional boolean (defaults to true) chooses strong imposi...
void output(FILE *file_pt)
Overload the C-style output function.
double *& ca_pt()
Access function to the pointer specifying the capillary number.
void update_in_external_fd(const unsigned &i)
The geometric data of the parent element is included as external data and so a (bulk) node update mus...
WallUnitNormalFctPt Wall_unit_normal_fct_pt
Pointer to a wall normal function that returns the wall unit normal as a function of position in glob...
double * Ca_pt
Pointer to the desired value of the capillary number.
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Calculate the residuals.
double ca()
Return the value of the capillary number.
WallUnitNormalFctPt & wall_unit_normal_fct_pt()
Access function: Pointer to wall unit normal function.
void output(FILE *file_pt, const unsigned &n_plot)
C-style Output function.
double & contact_angle()
Return value of the contact angle.
void output(std::ostream &outfile, const unsigned &n_plot)
Output function.
unsigned Contact_angle_flag
Flag used to determine whether the contact angle is to be used (0 if not), and whether it will be app...
Base class establishing common interfaces and functions for all Navier-Stokes-like fluid interface el...
virtual double compute_surface_derivatives(const Shape &psi, const DShape &dpsids, const DenseMatrix< double > &interpolated_t, const Vector< double > &interpolated_x, DShape &dpsidS, DShape &dpsidS_div)=0
Compute the surface gradient and surface divergence operators given the shape functions,...
virtual 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)
Helper function to calculate the additional contributions to the resisuals and Jacobian that arise fr...
double *& ca_pt()
Pointer to the Capillary number.
unsigned Index_of_external_pressure_value
Which of the values in Pext_data_pt stores the external pressure.
int External_data_number_of_external_pressure
The Data that contains the external pressure is stored as external Data for the element....
const double & ca() const
The value of the Capillary number.
const double & st() const
The value of the Strouhal number.
void fill_in_contribution_to_residuals(Vector< double > &residuals)
Calculate the residuals by calling the generic residual contribution.
FluidInterfaceElement()
Constructor, set the default values of the booleans and pointers (null)
double u(const unsigned &j, const unsigned &i)
Return the i-th velocity component at local node j.
double *& st_pt()
The pointer to the Strouhal number.
virtual int kinematic_local_eqn(const unsigned &n)=0
Access function that returns the local equation number for the (scalar) kinematic equation associated...
Vector< unsigned > U_index_interface
Nodal index at which the i-th velocity component is stored.
void set_external_pressure_data(Data *external_pressure_data_pt)
Set the Data that contains the single pressure value that specifies the "external pressure" for the i...
double pext() const
Return the value of the external pressure.
virtual double sigma(const Vector< double > &s_local)
Virtual function that specifies the non-dimensional surface tension as a function of local position w...
virtual void hijack_kinematic_conditions(const Vector< unsigned > &bulk_node_number)=0
Hijack the kinematic condition at the node numbers passed in the vector. The node numbers correspond ...
void set_external_pressure_data(Data *external_pressure_data_pt, const unsigned &index_of_external_pressure_value)
Set the Data that contains the pressure value that specifies the "external pressure" for the interfac...
double interpolated_u(const Vector< double > &s, const unsigned &i)
Calculate the i-th velocity component at the local coordinate s.
Data * Pext_data_pt
Pointer to the Data item that stores the external pressure.
virtual FluidInterfaceBoundingElement * make_bounding_element(const int &face_index)
Create a bounding element e.g. to apply a contact angle boundary condition.
void output(std::ostream &outfile)
Overload the output function.
int pext_local_eqn()
Access function for the local equation number that corresponds to the external pressure.
void output(FILE *file_pt)
Overload the C-style output function.
double * Ca_pt
Pointer to the Capillary number.
static double Default_Physical_Constant_Value
Default value for physical constants.
double * St_pt
Pointer to the Strouhal number.
virtual void fill_in_generic_residual_contribution_interface(Vector< double > &residuals, DenseMatrix< double > &jacobian, unsigned flag)
Helper function to calculate the residuals and (if flag==1) the Jacobian of the equations....
unsigned nexternal_data() const
Return the number of external data objects.
Definition elements.h:816
static DenseMatrix< double > Dummy_matrix
Empty dense matrix used as a dummy argument to combined residual and jacobian functions in the case w...
Definition elements.h:227
int external_local_eqn(const unsigned &i, const unsigned &j)
Return the local equation number corresponding to the j-th value stored at the i-th external data.
Definition elements.h:311
unsigned add_external_data(Data *const &data_pt, const bool &fd=true)
Add a (pointer to an) external data object to the element and return its index (i....
Definition elements.cc:312
Class that establishes the surface derivative functions for LineElements. These are defined in a sepa...
double compute_surface_derivatives(const Shape &psi, const DShape &dpsids, const DenseMatrix< double > &interpolated_t, const Vector< double > &interpolated_x, DShape &surface_gradient, DShape &surface_divergence)
Fill in the specific surface derivative calculations.
Specialisation of the interface boundary constraint to a line.
void fill_in_generic_residual_contribution_interface_boundary(Vector< double > &residuals, DenseMatrix< double > &jacobian, unsigned flag)
Overload the helper function to calculate the residuals and (if flag==true) the Jacobian – this funct...
double value(const unsigned &i) const
Return i-th value (dofs or pinned) at this node either directly or via hanging node representation....
Definition nodes.cc:2408
An OomphLibError object which should be thrown when an run-time error is encountered....
Specialisation of the interface boundary constraint to a point.
void fill_in_generic_residual_contribution_interface_boundary(Vector< double > &residuals, DenseMatrix< double > &jacobian, unsigned flag)
Overload the helper function to calculate the residuals and (if flag==1) the Jacobian – this function...
A Class for shape functions. In simple cases, the shape functions have only one index that can be tho...
Definition shape.h:76
Class that establishes the surface derivative functions for SurfaceInterfaceElements (2D surfaces in ...
double compute_surface_derivatives(const Shape &psi, const DShape &dpsids, const DenseMatrix< double > &interpolated_t, const Vector< double > &interpolated_x, DShape &surface_gradient, DShape &surface_divergence)
Fill in the specific surface derivative calculations.
TAdvectionDiffusionReactionElement<NREAGENT,DIM,NNODE_1D> elements are isoparametric triangular DIM-d...
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).