soluble_surfactant_transport_equations.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 general soluble surfactant transport equations.
27 //These inherit from the insoluble surfactant transport equations
28 //but add a flux term between the surface concentration and a
29 //bulk concentration.
30 
31 //Oomph-lib headers,
32 //We require the generic header
33 #include "generic.h"
34 //The fluid interface elements
35 #include "fluid_interface.h"
36 
37 namespace oomph
38 {
39 
42 
43 {
44 private:
45 
47  double *Bi_pt;
48 
50 double *Ma_pt;
51 
53  double *K_pt;
54 
56  double *Beta_b_pt;
57 
59  unsigned C_bulk_index;
60 
62  unsigned M_index;
63 
64 protected:
65 
68  {
69  //Find number of nodes
70  unsigned n_node = this->nnode();
71 
72  //Get the nodal index at which the unknown is stored
73  const unsigned m_index = M_index;
74 
75  //Local shape function
76  Shape psi(n_node);
77 
78  //Find values of shape function
79  this->shape(s,psi);
80 
81  //Initialise value of m
82  double M = 0.0;
83 
84  //Loop over the local nodes and sum
85  for(unsigned l=0;l<n_node;l++)
86  {
87  M += this->nodal_value(l,m_index)*psi(l);
88  }
89 
90  return(M);
91  }
92 
95  {
96  //Find number of nodes
97  unsigned n_node = this->nnode();
98 
99  //Get the nodal index at which the unknown is stored
100  const unsigned c_index = C_bulk_index;
101 
102  //Local shape function
103  Shape psi(n_node);
104 
105  //Find values of shape function
106  this->shape(s,psi);
107 
108  //Initialise value of C
109  double C = 0.0;
110 
111  //Loop over the local nodes and sum
112  for(unsigned l=0;l<n_node;l++)
113  {
114  C += this->nodal_value(l,c_index)*psi(l);
115  }
116 
117  return(C);
118  }
119 
120 
124  double sigma(const Vector<double> &s)
125  {
126  //Get the value of the concentration
127  const double C = this->interpolated_C(s);
128  //Get the Elasticity numbers
129  const double Beta = this->beta();
130  //Return the variable surface tension
131  return (1.0 + Beta*log(1.0-C));
132  }
133 
134  //Overload the derivative function
135  double dsigma_dC(const Vector<double> &s)
136  {
137  const double C = this->interpolated_C(s);
138  const double Beta = this->beta();
139  return (-Beta/(1.0 - C));
140  }
141 
144  /*void fill_in_contribution_to_jacobian(Vector<double> &residuals,
145  DenseMatrix<double> &jacobian)
146  {
147  //Call the generic routine with the flag set to 1
148  this->fill_in_generic_residual_contribution_interface(residuals,jacobian,1);
149 
150  //Call the external stuff (but there isn't any!)
151  //this->fill_in_jacobian_from_external_by_fd(jacobian);
152  }*/
153 
155  double flux_from_bulk(const double &C, const double &C_bulk)
156  {
157  const double Bi = this->bi();
158  const double K = this->k();
159  return Bi*(K*C_bulk*(1.0 - C) - C);
160  }
161 
164  double dflux_from_bulk_dC_bulk(const double &C, const double &C_bulk)
165  {
166  const double Bi = this->bi();
167  const double K = this->k();
168  return Bi*K*(1.0 - C);
169  }
170 
173  double dflux_from_bulk_dC(const double &C, const double &C_bulk)
174  {
175  const double Bi = this->bi();
176  const double K = this->k();
177  return -Bi*(K*C_bulk + 1.0);
178  }
179 
180 
181 
186  Vector<double> &residuals, DenseMatrix<double> &jacobian,
187  const unsigned &flag,
188  const Shape &psif, const DShape &dpsifds,
189  const DShape &dpsifdS, const DShape &dpsifdS_div,
190  const Vector<double> &s,
192  const Vector<double> &interpolated_n,
193  const double &W,
194  const double &J)
195  {
196  //Call the underlying version from the Surfactant Transport equation
199  residuals,jacobian,flag,psif,dpsifds,dpsifdS, dpsifdS_div,s,
200  interpolated_x,interpolated_n,W,J);
201 
202  //Now we need to add the bulk contribution
203 
204  //Find out how many nodes there are
205  unsigned n_node = this->nnode();
206 
207  //Storage for the local equation numbers and unknowns
208  int local_eqn = 0, local_unknown = 0;
209 
210  //Bulk flux condition
211  //Find the index at which the bulk is stored
212  unsigned c_bulk_index = this->C_bulk_index;
213 
214 
215  //Now calculate the bulk concentration at this point
216  //Assuming the same shape functions are used (which they are)
217  double C_bulk = 0.0;
218  double C = 0.0;
219  for(unsigned l=0;l<n_node;l++)
220  {
221  const double psi_ = psif(l);
222  C_bulk += this->nodal_value(l,c_bulk_index)*psi_;
223  C += this->nodal_value(l,this->C_index[l])*psi_;
224  }
225 
226  //The transport between the two layers is given by the flux
227  const double flux = this->flux_from_bulk(C,C_bulk);
228  //Compute the derivatives if required for the Jacobian
229  const double dflux_dC_bulk = this->dflux_from_bulk_dC_bulk(C,C_bulk);
230  const double dflux_dC = this->dflux_from_bulk_dC(C,C_bulk);
231 
232  //Read out the beta (solubility) parameter
233  const double Beta_b = this->beta_b();
234 
235  //Now we add the flux term to the bulk residuals
236  for(unsigned l=0;l<n_node;l++)
237  {
238  //Read out the apprporiate local equation
239  local_eqn = this->nodal_local_eqn(l,c_bulk_index);
240 
241  //If not a boundary condition
242  if(local_eqn >= 0)
243  {
244  //Add the flux out of the bulk
245  residuals[local_eqn] -= Beta_b*flux*psif(l)*W*J;
246 
247  //We also need to worry about the jacobian terms
248  if(flag)
249  {
250  //Loop over the nodes again
251  for(unsigned l2=0;l2<n_node;l2++)
252  {
253  //Get the unknown
254  local_unknown = this->nodal_local_eqn(l2,c_bulk_index);
255  //If not a boundary condition
256  if(local_unknown >= 0)
257  {
258  jacobian(local_eqn,local_unknown) -=
259  Beta_b*dflux_dC_bulk*psif(l2)*psif(l)*W*J;
260  }
261 
262  local_unknown = this->nodal_local_eqn(l2,this->C_index[l2]);
263  //If not a boundary condition
264  if(local_unknown >= 0)
265  {
266  jacobian(local_eqn,local_unknown) -= Beta_b*dflux_dC*psif(l2)*psif(l)*W*J;
267  }
268  }
269  }
270  }
271  } //End of loop over the nodes
272 
273 
274  //Now we add the flux term to the appropriate residuals
275  for(unsigned l=0;l<n_node;l++)
276  {
277  //Read out the apprporiate local equation
278  local_eqn = this->nodal_local_eqn(l,this->C_index[l]);
279 
280  //If not a boundary condition
281  if(local_eqn >= 0)
282  {
283  //Add the flux term
284  residuals[local_eqn] -= flux*psif(l)*W*J;
285 
286  //We also need to worry about the jacobian terms
287  if(flag)
288  {
289  //Loop over the nodes again
290  for(unsigned l2=0;l2<n_node;l2++)
291  {
292  //Get the unknown c_index
293  local_unknown =this->nodal_local_eqn(l2,this->C_index[l2]);
294 
295  if(local_unknown >=0)
296  {
297  //Add the flux term
298  jacobian(local_eqn,local_unknown) -=
299  dflux_dC*psif(l2)*psif(l)*W*J;
300  }
301 
302  //Local unknown the bulk concentration
303  local_unknown = this->nodal_local_eqn(l2,c_bulk_index);
304  //If not a boundary condition
305  if(local_unknown >= 0)
306  {
307  jacobian(local_eqn,local_unknown) -=
308  dflux_dC_bulk*psif(l2)*psif(l)*W*J;
309  }
310  }
311  }
312  }
313  } //End of loop over the nodes
314 
315  }
316 
317 
321  Vector<double> &residuals, DenseMatrix<double> &jacobian,
322  DenseMatrix<double> &mass_matrix)
323  {
324  //Add the contribution to the jacobian
325  this->fill_in_contribution_to_jacobian(residuals,jacobian);
326  //No mass matrix terms, but should probably do kinematic bit here
327  //for a stability analysis
328  }
329 
330 public:
331 
336  {
337  //Initialise the values
342  //Big Hack
343  M_index = 3;
344  }
345 
346  //set the C bulk index
347  inline void set_c_bulk_index(const unsigned &c_bulk_index)
348  {C_bulk_index = c_bulk_index;}
349 
351  double bi() {return *Bi_pt;}
352 
354  double ma() {return *Ma_pt;}
355 
356 
358  double k() {return *K_pt;}
359 
360  //Return bulk beta
361  double beta_b() {return *Beta_b_pt;}
362 
364  double* &ma_pt() {return Ma_pt;}
365 
367  double* &bi_pt() {return Bi_pt;}
368 
370  double* &k_pt() {return K_pt;}
371 
373  double* &beta_b_pt() {return Beta_b_pt;}
374 
375 
376  //Calculate the mean square deviation from the
377  //uniform state
378  double l2_norm_of_height(const double &h0)
379  {
380  //Find the number of nodes
381  const unsigned n_node = this->nnode();
382 
383  //Find out the number of surface coordinates
384  const unsigned el_dim = this->dim();
385 
386  //Find the nodal dimension
387  const unsigned n_dim = this->node_pt(0)->ndim();
388 
389  //Storage for the Shape functions
390  Shape psif(n_node);
391 
392  //Storage for the local coordinate
394 
395  //Set the value of n_intpt
396  unsigned n_intpt = this->integral_pt()->nweight();
397 
398  //Storage for answer
399  double norm = 0.0;
400 
401  //Work out x distance, assuming this is a line element
402  //which it is
403  double scale = (this->node_pt(n_node-1)->x(0) - this->node_pt(0)->x(0))/2.0;
404 
405  //Loop over the integration points
406  for(unsigned ipt=0;ipt<n_intpt;ipt++)
407  {
408  //Get the value of the local coordiantes at the integration point
409  for(unsigned i=0;i<el_dim;i++) {s[i] = this->integral_pt()->knot(ipt,i);}
410 
411  //Get the integral weight
412  double W = this->integral_pt()->weight(ipt);
413 
414  //Call the derivatives of the shape function
415  this->shape_at_knot(ipt,psif);
416 
417  //Define and zero the tangent Vectors and local velocities
418  Vector<double> interpolated_x(n_dim,0.0);
419 
420  //Loop over the shape functions
421  for(unsigned l=0;l<n_node;l++)
422  {
423  const double psi_ = psif(l);
424  //Loop over directional components
425  for(unsigned i=0;i<n_dim;i++)
426  {
427  // Coordinate
428  interpolated_x[i] += this->nodal_position(l,i)*psi_;
429  }
430  }
431 
432  //Calculate the surface gradient and divergence
433  norm += (interpolated_x[1] - h0)*(interpolated_x[1] - h0)*W*scale;
434  }
435  //Return the computed norm
436  return norm;
437  }
438 
439 
440  //Calculate the total mass over the element
441  double integrated_C()
442  {
443  //Find the number of nodes
444  const unsigned n_node = this->nnode();
445 
446  //Find out the number of surface coordinates
447  const unsigned el_dim = this->dim();
448 
449  //Find the nodal dimension
450  //const unsigned n_dim = this->node_pt(0)->ndim();
451 
452  //Storage for the Shape functions
453  Shape psif(n_node);
454 
455  //Storage for the local coordinate
457 
458  //Set the value of n_intpt
459  unsigned n_intpt = this->integral_pt()->nweight();
460 
461  //Storage for answer
462  double integral = 0.0;
463 
464  //Loop over the integration points
465  for(unsigned ipt=0;ipt<n_intpt;ipt++)
466  {
467  //Get the value of the local coordiantes at the integration point
468  for(unsigned i=0;i<el_dim;i++) {s[i] = this->integral_pt()->knot(ipt,i);}
469 
470  //Get the integral weight
471  double W = this->integral_pt()->weight(ipt);
472 
473  //Calculate the Jacobian of the mapping
474  double J = this->J_eulerian(s);
475 
476  //Call the derivatives of the shape function
477  this->shape_at_knot(ipt,psif);
478 
479  //Define and zero the tangent Vectors and local velocities
480  double interpolated_C=0.0;
481 
482  //Loop over the shape functions
483  for(unsigned l=0;l<n_node;l++)
484  {
485  const double psi_ = psif(l);
486  //Loop over directional components
487  interpolated_C += this->nodal_value(l,this->C_index[l])*psi_;
488  }
489 
490  integral += interpolated_C*W*J;
491  }
492  //Return the computed norm
493  return integral;
494  }
495 
496 
497 
498 void output(std::ostream &outfile, const unsigned &n_plot)
499 {
500  //Set output Vector
501  Vector<double> s(1);
502 
503  //Tecplot header info
504  outfile << "ZONE I=" << n_plot << std::endl;
505 
506  //Loop over plot points
507  for(unsigned l=0;l<n_plot;l++)
508  {
509  s[0] = -1.0 + l*2.0/(n_plot-1);
510 
511  //Output the x,y,u,v
512  for(unsigned i=0;i<2;i++) outfile << this->interpolated_x(s,i) << " ";
513  for(unsigned i=0;i<2;i++) outfile << this->interpolated_u(s,i) << " ";
514  //Output a dummy pressure
515  outfile << 0.0 << " ";
516  const double C = this->interpolated_C(s);
517  const double C_bulk = this->interpolated_C_bulk(s);
518  const double M = this->interpolated_M(s);
519 
520  //Output the concentrations
521  outfile << C << " "
522  << C_bulk << " "
523  << M << " "
524  << this->bi()*(this->k()*C_bulk*(1.0 - C) - C) << std::endl;
525  }
526  outfile << std::endl;
527 }
528 
529 
531  void output(std::ostream &outfile) {FiniteElement::output(outfile);}
532 
534  void output(FILE* file_pt) {FiniteElement::output(file_pt);}
535 
537  void output(FILE* file_pt, const unsigned &n_plot)
538  {FiniteElement::output(file_pt,n_plot);}
539 
540 
541 };
542 
543 
544 
545 
549 //=============================================================================
550 template<>
553  {
554  public:
557 
558  inline unsigned nadditional_values(const unsigned &n) {return 1;}
559 
562  const unsigned &id)
563  {
564  const unsigned n_node = element_pt->nnode();
565  Vector<unsigned> c_index(n_node);
566  for(unsigned n=0;n<n_node;n++)
567  {
568  c_index[n] =
569  dynamic_cast<BoundaryNodeBase*>(element_pt->node_pt(n))
570  ->index_of_first_value_assigned_by_face_element(id);
571  }
572 
573  element_pt->set_c_index(c_index);
574  //This is a hack
575  const unsigned C_bulk_index =
577  element_pt->bulk_element_pt())->c_index_adv_diff_react(0);
578  element_pt->set_c_bulk_index(C_bulk_index);
579 
580  }
581 
582  };
583 
584 
585 //-------------------------------GEOMETRIC SPECIALISATIONS----------------
586 
588 template<class ELEMENT>
591  SolubleSurfactantTransportInterfaceElement,
592  LineDerivatives,ELEMENT>
593  {
594  public:
595 
597  FiniteElement* const &element_pt,
598  const int &face_index) :
600  LineDerivatives,ELEMENT>(element_pt,face_index) {}
601 };
602 
603 
604 //Define the bounding element type for the line elements
605 //This will need to be updated
606 template<class ELEMENT>
610  {
611  public:
612 
616  };
617 
619 template<class ELEMENT>
622  SolubleSurfactantTransportInterfaceElement,
623  LineDerivatives,ELEMENT>
624  {
625  public:
626 
628  FiniteElement* const &element_pt,
629  const int &face_index) :
631  LineDerivatives,ELEMENT>(element_pt,face_index) {}
632  };
633 
634 
635 //Define the bounding element type for the line elements
636 //This will need to be updated
637 template<class ELEMENT>
641  {
642  public:
643 
647  };
648 
649 
650 
652 
653 
654  template<class ELEMENT>
657 
658  {
659  unsigned C_index;
660 
661  public:
662 
666  C_index(0) {}
667 
670  DenseMatrix<double> &jacobian)
671  {
673  fill_in_contribution_to_jacobian(residuals,jacobian);
674 
675  //Make sure to include concentration variations
676  {
677  //Use finite differences to handle bulk concentration variations
678  const unsigned n_node = this->nnode();
679  //Find the number of dofs in the element
680  const unsigned n_dof = this->ndof();
681  //Create newres vector
682  Vector<double> newres(n_dof);
683 
684  //Integer storage for local unknown
685  int local_unknown=0;
686 
687  //Use the default finite difference step
688  const double fd_step = this->Default_fd_jacobian_step;
689 
690 
691  //Use finite differences to handle the interfacial concentration variations
692  //Loop over the nodes again
693  for(unsigned n=0;n<n_node;n++)
694  {
695  //Get the number of values stored at the node
696  unsigned c_index = this->C_index;
697 
698  //Get the local equation number
699  local_unknown = this->nodal_local_eqn(n,c_index);
700  //If it's not pinned
701  if(local_unknown >= 0)
702  {
703  //Store a pointer to the nodal data value
704  double *value_pt = this->node_pt(n)->value_pt(c_index);
705 
706  //Save the old value of the Nodal data
707  double old_var = *value_pt;
708 
709  //Increment the value of the Nodal data
710  *value_pt += fd_step;
711 
712  //Calculate the new residuals
713  this->get_residuals(newres);
714 
715  //Do finite differences
716  for(unsigned m=0;m<n_dof;m++)
717  {
718  double sum = (newres[m] - residuals[m])/fd_step;
719  //Stick the entry into the Jacobian matrix
720  jacobian(m,local_unknown) = sum;
721  }
722 
723  //Reset the Nodal data
724  *value_pt = old_var;
725  }
726  }
727  }
728 
729  }
730 
731  //Allow the concentration index to be set
732  unsigned &c_index_interface_boundary() {return C_index;}
733 
734  };
735 
736 }
737 
738 
739 
740 
741 
742 
743 
744 
745 
int i
Definition: BiCGSTAB_step_by_step.cpp:9
const unsigned n
Definition: CG3DPackingUnitTest.cpp:11
JacobiRotation< float > J
Definition: Jacobi_makeJacobi.cpp:3
Matrix< Scalar, Dynamic, Dynamic > C
Definition: bench_gemm.cpp:49
The matrix class, also used for vectors and row-vectors.
Definition: Eigen/Eigen/src/Core/Matrix.h:186
Definition: advection_diffusion_reaction_elements.h:53
Definition: nodes.h:1996
Definition: specific_node_update_interface_elements.h:55
Definition: shape.h:278
double * value_pt(const unsigned &i) const
Definition: nodes.h:324
Specialise to the Line geometry.
Definition: soluble_surfactant_transport_equations.h:624
ElasticLineSolubleSurfactantTransportInterfaceElement(FiniteElement *const &element_pt, const int &face_index)
Definition: soluble_surfactant_transport_equations.h:627
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
FiniteElement *& bulk_element_pt()
Pointer to higher-dimensional "bulk" element.
Definition: elements.h:4735
double interpolated_x(const Vector< double > &s, const unsigned &i) const
Definition: elements.h:4528
double J_eulerian(const Vector< double > &s) const
Definition: elements.cc:5242
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
double nodal_value(const unsigned &n, const unsigned &i) const
Definition: elements.h:2593
virtual void output(std::ostream &outfile)
Definition: elements.h:3050
virtual void shape(const Vector< double > &s, Shape &psi) const =0
int nodal_local_eqn(const unsigned &n, const unsigned &i) const
Definition: elements.h:1432
unsigned dim() const
Definition: elements.h:2611
unsigned nnode() const
Return the number of nodes.
Definition: elements.h:2210
Integral *const & integral_pt() const
Return the pointer to the integration scheme (const version)
Definition: elements.h:1963
double nodal_position(const unsigned &n, const unsigned &i) const
Definition: elements.h:2317
virtual void shape_at_knot(const unsigned &ipt, Shape &psi) const
Definition: elements.cc:3220
void setup_equation_indices(SolubleSurfactantTransportInterfaceElement *const &element_pt, const unsigned &id)
Definition: soluble_surfactant_transport_equations.h:560
unsigned nadditional_values(const unsigned &n)
Definition: soluble_surfactant_transport_equations.h:558
Definition: specific_node_update_interface_elements.h:72
double interpolated_u(const Vector< double > &s, const unsigned &i)
Calculate the i-th velocity component at the local coordinate s.
Definition: interface_elements.cc:442
static double Default_fd_jacobian_step
Definition: elements.h:1198
unsigned ndof() const
Return the number of equations/dofs in the element.
Definition: elements.h:835
void get_residuals(Vector< double > &residuals)
Definition: hijacked_elements.h:377
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.
virtual double weight(const unsigned &i) const =0
Return weight of i-th integration point.
Definition: interface_elements.h:661
Definition: matrices.h:74
double & x(const unsigned &i)
Return the i-th nodal coordinate.
Definition: nodes.h:1060
unsigned ndim() const
Return (Eulerian) spatial dimension of the node.
Definition: nodes.h:1054
Definition: shape.h:76
Definition: soluble_surfactant_transport_equations.h:43
double interpolated_C_bulk(const Vector< double > &s)
Get the bulk concentration.
Definition: soluble_surfactant_transport_equations.h:94
SolubleSurfactantTransportInterfaceElement()
Definition: soluble_surfactant_transport_equations.h:334
double *& ma_pt()
Access function for pointer to the Marangoni number.
Definition: soluble_surfactant_transport_equations.h:364
double dflux_from_bulk_dC_bulk(const double &C, const double &C_bulk)
Definition: soluble_surfactant_transport_equations.h:164
void output(FILE *file_pt)
Overload the C-style output function.
Definition: soluble_surfactant_transport_equations.h:534
void output(std::ostream &outfile)
Overload the output function.
Definition: soluble_surfactant_transport_equations.h:531
double ma()
Return the Marangoni number.
Definition: soluble_surfactant_transport_equations.h:354
double l2_norm_of_height(const double &h0)
Definition: soluble_surfactant_transport_equations.h:378
void fill_in_contribution_to_jacobian_and_mass_matrix(Vector< double > &residuals, DenseMatrix< double > &jacobian, DenseMatrix< double > &mass_matrix)
Definition: soluble_surfactant_transport_equations.h:320
double *& beta_b_pt()
Access function for pointer.
Definition: soluble_surfactant_transport_equations.h:373
double * Beta_b_pt
Pointer to beta.
Definition: soluble_surfactant_transport_equations.h:56
double flux_from_bulk(const double &C, const double &C_bulk)
Calculate the contribution to the jacobian.
Definition: soluble_surfactant_transport_equations.h:155
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: soluble_surfactant_transport_equations.h:185
double bi()
Return the Biot number.
Definition: soluble_surfactant_transport_equations.h:351
double *& k_pt()
Access function for pointer to the reaction ratios.
Definition: soluble_surfactant_transport_equations.h:370
double k()
Return the reaction ratio.
Definition: soluble_surfactant_transport_equations.h:358
unsigned M_index
Index at which the micelle concentration is stored at the nodes.
Definition: soluble_surfactant_transport_equations.h:62
double integrated_C()
Definition: soluble_surfactant_transport_equations.h:441
double *& bi_pt()
Access function for pointer to the Biot number.
Definition: soluble_surfactant_transport_equations.h:367
double interpolated_M(const Vector< double > &s)
Get the micelle concentration.
Definition: soluble_surfactant_transport_equations.h:67
double dflux_from_bulk_dC(const double &C, const double &C_bulk)
Definition: soluble_surfactant_transport_equations.h:173
double * Ma_pt
Pointer to a Marangoni number.
Definition: soluble_surfactant_transport_equations.h:50
void set_c_bulk_index(const unsigned &c_bulk_index)
Definition: soluble_surfactant_transport_equations.h:347
double beta_b()
Definition: soluble_surfactant_transport_equations.h:361
double * K_pt
Pointer to the reaction ratios.
Definition: soluble_surfactant_transport_equations.h:53
double * Bi_pt
Pointer to a Biot number.
Definition: soluble_surfactant_transport_equations.h:47
double dsigma_dC(const Vector< double > &s)
Definition: soluble_surfactant_transport_equations.h:135
unsigned C_bulk_index
Index at which the bulk concentration is stored at the nodes.
Definition: soluble_surfactant_transport_equations.h:59
void output(std::ostream &outfile, const unsigned &n_plot)
Definition: soluble_surfactant_transport_equations.h:498
double sigma(const Vector< double > &s)
Definition: soluble_surfactant_transport_equations.h:124
Specialise to the Line geometry.
Definition: soluble_surfactant_transport_equations.h:593
SpineLineSolubleSurfactantTransportInterfaceElement(FiniteElement *const &element_pt, const int &face_index)
Definition: soluble_surfactant_transport_equations.h:596
Spine version of the PointFluidInterfaceBoundingElement.
Definition: specific_node_update_interface_elements.h:425
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Calculate the elemental residual vector and the Jacobian.
Definition: specific_node_update_interface_elements.h:459
Old Implementation. Should ultimately be deleted.
Definition: soluble_surfactant_transport_equations.h:658
unsigned C_index
Definition: soluble_surfactant_transport_equations.h:659
SpinePointMarangoniSurfactantFluidInterfaceBoundingElement()
Constructor.
Definition: soluble_surfactant_transport_equations.h:664
unsigned & c_index_interface_boundary()
Definition: soluble_surfactant_transport_equations.h:732
void fill_in_contribution_to_jacobian(Vector< double > &residuals, DenseMatrix< double > &jacobian)
Calculate the elemental residual vector and the Jacobian.
Definition: soluble_surfactant_transport_equations.h:669
Definition: specific_node_update_interface_elements.h:156
Definition: surfactant_transport_elements.h:49
Vector< unsigned > C_index
Definition: surfactant_transport_elements.h:63
double beta()
Return the Elasticity number.
Definition: surfactant_transport_elements.h:135
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
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
int * m
Definition: level2_cplx_impl.h:294
EIGEN_STRONG_INLINE EIGEN_DEVICE_FUNC bfloat16 log(const bfloat16 &a)
Definition: BFloat16.h:618
double Bi
Biot number.
Definition: thermal_fibre.cc:85
double Beta
Definition: ff_step.cc:156
double K
Wave number.
Definition: sphere_scattering.cc:115
void flux(const double &time, const Vector< double > &x, double &flux)
Get flux applied along boundary x=0.
Definition: pretend_melt.cc:59
double Beta_b
Definition: refineable_two_layer_soluble_surfactant.cc:151
@ W
Definition: quadtree.h:63
DRAIG: Change all instances of (SPATIAL_DIM) to (DIM-1).
Definition: AnisotropicHookean.h:10
unsigned el_dim
dimension
Definition: overloaded_cartesian_element_body.h:30