LifeV
OneDFSIPhysics.hpp
Go to the documentation of this file.
1 //@HEADER
2 /*
3 *******************************************************************************
4 
5  Copyright (C) 2004, 2005, 2007 EPFL, Politecnico di Milano, INRIA
6  Copyright (C) 2010 EPFL, Politecnico di Milano, Emory University
7 
8  This file is part of LifeV.
9 
10  LifeV is free software; you can redistribute it and/or modify
11  it under the terms of the GNU Lesser General Public License as published by
12  the Free Software Foundation, either version 3 of the License, or
13  (at your option) any later version.
14 
15  LifeV is distributed in the hope that it will be useful,
16  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18  Lesser General Public License for more details.
19 
20  You should have received a copy of the GNU Lesser General Public License
21  along with LifeV. If not, see <http://www.gnu.org/licenses/>.
22 
23 *******************************************************************************
24 */
25 //@HEADER
26 
27 /*!
28  * @file
29  * @brief File containing a base class providing physical operations for the 1D model data.
30  *
31  * @version 1.0
32  * @date 01-07-2004
33  * @author Vincent Martin
34  *
35  * @version 2.0
36  * @date 13-04-2010
37  * @author Cristiano Malossi <cristiano.malossi@epfl.ch>
38  *
39  * @contributor Simone Rossi <simone.rossi@epfl.ch>
40  * @maintainer Cristiano Malossi <cristiano.malossi@epfl.ch>
41  */
42 
43 #ifndef OneDFSIPhysics_H
44 #define OneDFSIPhysics_H
45 
46 #include <lifev/one_d_fsi/solver/OneDFSIData.hpp>
47 
48 namespace LifeV
49 {
50 
51 //! OneDFSIPhysics - Base class providing physical operations for the 1D model data.
52 /*!
53  * @author Vincent Martin, Cristiano Malossi
54  * @see Equations and networks of 1-D models \cite FormaggiaLamponi2003
55  * @see Geometrical multiscale coupling of 1-D models \cite Malossi2011Algorithms \cite Malossi2011Algorithms1D \cite BonnemainMalossi2012LVAD
56  *
57  * It contains the following methods:
58  * <ol>
59  * <li> utilities for converting Riemann variables to physical quantities (and viceversa);
60  * <li> utilities to compute the different pressure components (and derivatives).
61  * </ol>
62  *
63  * \cond
64  * TODO: This class should be splitted in two separate classes
65  * <ol>
66  * <li> one class (no derivation) for the wall physics with a name like OneDFSIWallPhysics
67  * <li> a set of classes for the Riemann conversions like OneDFSIRiemannConverter and derived Linear/NonLinear versions.
68  * </ol>
69  * \endcond
70  */
72 {
73 public :
74  //! @name Type definitions and Enumerators
75  //@{
76 
78 
81 
84 
85  //@}
86 
87 
88  //! @name Constructors & Destructor
89  //@{
90 
91  //! Empty constructor
93 
94  //! Constructor
95  /*!
96  * @param dataPtr pointer to the data container of the problem
97  */
98  explicit OneDFSIPhysics ( const dataPtr_Type dataPtr ) : M_dataPtr ( dataPtr ), M_previousAreaPtr() {}
99 
100  //! Destructor
101  virtual ~OneDFSIPhysics() {}
102 
103  //@}
104 
105 
106  //! @name Conversion methods
107  //@{
108 
109  //! Compute \f$\mathbf U\f$ from \f$\mathbf W\f$
110  /*!
111  * @param U1 first physical variable
112  * @param U2 second physical variable
113  * @param W1 first Riemann variable
114  * @param W2 second Riemann variable
115  * @param iNode node of the mesh
116  */
117  virtual void fromWToU ( Real& U1, Real& U2, const Real& W1, const Real& W2, const UInt& iNode ) const = 0;
118 
119  //! Compute \f$\mathbf W\f$ from \f$\mathbf U\f$
120  /*!
121  * @param W1 first Riemann variable
122  * @param W2 second Riemann variable
123  * @param U1 first physical variable
124  * @param U2 second physical variable
125  * @param iNode node of the mesh
126  */
127  virtual void fromUToW ( Real& W1, Real& W2, const Real& U1, const Real& U2, const UInt& iNode ) const = 0;
128 
129  //! Compute \f$P\f$ from \f$\mathbf W\f$
130  /*!
131  * @param W1 first Riemann variable
132  * @param W2 second Riemann variable
133  * @param iNode node of the mesh
134  * @return pressure
135  */
136  virtual Real fromWToP ( const Real& W1, const Real& W2, const UInt& iNode ) const = 0;
137 
138  //! Compute \f$W_1\f$ or \f$W_2\f$ from \f$P\f$
139  /*!
140  * @param P pressure
141  * @param W Riemann variable
142  * @param iW Riemann variable ID (0 for \f$W_1\f$, 1 or \f$W_2\f$)
143  * @param iNode node of the mesh
144  * @return the other Riemann variable
145  */
146  virtual Real fromPToW ( const Real& P, const Real& W, const ID& iW, const UInt& iNode ) const = 0;
147 
148  //! Compute \f$W_1\f$ or \f$W_2\f$ from \f$Q\f$
149  /*!
150  * @param Q pressure
151  * @param W_tn Riemann variable at time \f$t^n\f$
152  * @param W Riemann variable
153  * @param iW Riemann variable ID (0 for \f$W_1\f$, 1 or \f$W_2\f$)
154  * @param iNode node of the mesh
155  * @return the other Riemann variable
156  */
157  virtual Real fromQToW ( const Real& Q, const Real& W_tn, const Real& W, const ID& iW, const UInt& iNode ) const = 0;
158 
159  //! Compute the area \f$A\f$ given the elastic pressure \f$P_\mathrm{elastic}\f$.
160  /*!
161  * To be used in initialization, when time derivative of A is supposed equal to zero.
162  *
163  * @param P elastic pressure
164  * @param timeStep the time step
165  * @param iNode node of the mesh
166  * @param elasticExternalNodes consider elastic the external nodes (neglect viscoelasticity)
167  * @return \f$ A = A^0 \left( \displaystyle\frac{P_\mathrm{elastic} - P_\mathrm{ext}}{\beta_0} + 1 \right)^{\left(\displaystyle\frac{1}{\beta_1}\right)} \f$
168  */
169 #ifdef HAVE_NEUMANN_VISCOELASTIC_BC
170  Real fromPToA ( const Real& P, const Real& timeStep, const UInt& iNode, const bool& elasticExternalNodes = false ) const;
171 #else
172  Real fromPToA ( const Real& P, const Real& timeStep, const UInt& iNode, const bool& elasticExternalNodes = true ) const;
173 #endif
174 
175  //@}
176 
177 
178  //! @name Derivatives methods
179  //@{
180 
181  //! Compute the derivative of the area with respect to the time using a first order finite difference
182  /*!
183  * @param Anp1 area at time \f$t^{n+1}\f$
184  * @param timeStep the time step
185  * @param iNode node of the mesh
186  * @return \f$\displaystyle\frac{dA(t)}{dt}\f$
187  */
188  Real dAdt ( const Real& Anp1, const Real& timeStep, const UInt& iNode ) const;
189 
190  //! Compute the derivative of pressure with respect to \f$ \mathbf W\f$
191  /*!
192  * @param W1 first Riemann variable
193  * @param W2 second Riemann variable
194  * @param iW Riemann derivative ID (0 for \f$\displaystyle\frac{dP}{dW_1}\f$, 1 or \f$\displaystyle\frac{dP}{dW_2}\f$)
195  * @param iNode node of the mesh
196  * @return \f$\displaystyle\frac{dP}{dW_1}\f$ or \f$\displaystyle\frac{dP}{dW_2}\f$
197  */
198  virtual Real dPdW ( const Real& W1, const Real& W2, const ID& iW, const UInt& iNode ) const = 0;
199 
200  //! Compute the derivative of the pressure with respect to \f$A\f$
201  /*!
202  * @param A area
203  * @param timeStep the time step
204  * @param iNode node of the mesh
205  * @param elasticExternalNodes consider elastic the external nodes (neglect viscoelasticity)
206  * @return \f$\displaystyle\frac{dP(A)}{dA} = \displaystyle\frac{dP_\mathrm{elastic}(A)}{dA} + \displaystyle\frac{dP_\mathrm{viscoelastic}(A)}{dA}\f$
207  */
208 #ifdef HAVE_NEUMANN_VISCOELASTIC_BC
209  Real dPdA ( const Real& A, const Real& timeStep, const UInt& iNode, const bool& elasticExternalNodes = false ) const;
210 #else
211  Real dPdA ( const Real& A, const Real& timeStep, const UInt& iNode, const bool& elasticExternalNodes = true ) const;
212 #endif
213 
214  //! Compute the derivative of the elastic pressure with respect to \f$A\f$
215  /*!
216  * @param A area
217  * @param iNode node of the mesh
218  * @return \f$\displaystyle\frac{dP_\mathrm{elastic}(A)}{dA} = \displaystyle\frac{\beta_1 \beta_0 ( \displaystyle\frac{A}{A^0} )^{\beta_1}}{A}\f$
219  */
220  Real dPdAelastic ( const Real& A, const UInt& iNode ) const;
221 
222  //! Compute the derivative of the viscoelastic pressure with respect to \f$A\f$
223  /*!
224  * @param A area
225  * @param timeStep the time step
226  * @param iNode node of the mesh
227  * @param elasticExternalNodes consider elastic the external nodes (neglect viscoelasticity)
228  * @return \f$\displaystyle\frac{dP_\mathrm{viscoelastic}(A)}{dA} = \displaystyle\frac{\gamma}{A^{3/2}} \left( \displaystyle\frac{1}{\Delta t} -
229  * \displaystyle\frac{dA}{dt} \displaystyle\frac{3}{2A} \right)\f$
230  */
231 #ifdef HAVE_NEUMANN_VISCOELASTIC_BC
232  Real dPdAviscoelastic ( const Real& A, const Real& timeStep, const UInt& iNode, const bool& elasticExternalNodes = false ) const;
233 #else
234  Real dPdAviscoelastic ( const Real& A, const Real& timeStep, const UInt& iNode, const bool& elasticExternalNodes = true ) const;
235 #endif
236 
237  //! Compute the derivative of the area with respect to \f$P\f$
238  /*!
239  * @param P pressure
240  * @param timeStep the time step
241  * @param iNode node of the mesh
242  * @param elasticExternalNodes consider elastic the external nodes (neglect viscoelasticity)
243  * @return \f$\displaystyle\frac{dA(P)}{dP} = \displaystyle\frac{dA(P)}{dP_\mathrm{elastic}} +
244  * \displaystyle\frac{dA(P)}{dP_\mathrm{viscoelastic}}\f$, with \f$\displaystyle\frac{dA(P)}{dP_\mathrm{elastic}} = \displaystyle\frac{A^0}{\beta_0 \beta_1} \left( 1 +
245  * \displaystyle\frac{ P - P_\mathrm{ext} }{ \beta_0 }\right)^{\displaystyle\frac{1}{\beta_1} - 1}\f$
246  */
247 #ifdef HAVE_NEUMANN_VISCOELASTIC_BC
248  Real dAdP ( const Real& P, const Real& timeStep, const UInt& iNode, const bool& elasticExternalNodes = false ) const;
249 #else
250  Real dAdP ( const Real& P, const Real& timeStep, const UInt& iNode, const bool& elasticExternalNodes = true ) const;
251 #endif
252 
253  //! Compute the derivative of total pressure with respect to \f$A\f$ or \f$Q\f$.
254  /*!
255  * @param A area
256  * @param Q flow rate
257  * @param timeStep the time step
258  * @param variable ID (0 for \f$A\f$, 1 or \f$Q\f$)
259  * @param iNode node of the mesh
260  * @return \f$\displaystyle\frac{dP_t}{dA}\f$ or \f$\displaystyle\frac{dP_t}{dQ}\f$
261  */
262  Real dPTdU ( const Real& A, const Real& Q, const Real& timeStep, const ID& id, const UInt& iNode ) const;
263 
264  //@}
265 
266 
267  //! @name Methods
268  //@{
269 
270  //! Compute the reference celerity.
271  /*!
272  * @param iNode node of the mesh
273  * @return reference celerity
274  */
275  Real celerity0 ( const UInt& iNode ) const;
276 
277  //! Compute the pressure.
278  /*!
279  * Includes the contribution of the external, elastic and viscoelastic pressure.
280  * @param A area
281  * @param timeStep the time step
282  * @param iNode node of the mesh
283  * @param elasticExternalNodes consider elastic the external nodes (neglect viscoelasticity)
284  * @return \f$P = P_\mathrm{elastic} + P_\mathrm{viscoelastic} + P_\mathrm{external}\f$
285  */
286 #ifdef HAVE_NEUMANN_VISCOELASTIC_BC
287  Real pressure ( const Real& A, const Real& timeStep, const UInt& iNode, const bool& elasticExternalNodes = false ) const;
288 #else
289  Real pressure ( const Real& A, const Real& timeStep, const UInt& iNode, const bool& elasticExternalNodes = true ) const;
290 #endif
291 
292  //! Return the external pressure.
293  /*!
294  * @return \f$P_\mathrm{external}\f$
295  */
296  const Real& externalPressure() const
297  {
298  return M_dataPtr->externalPressure();
299  }
300 
301  //! Return the venous pressure.
302  /*!
303  * @return \f$P_\mathrm{venous}\f$
304  */
305  const Real& venousPressure() const
306  {
307  return M_dataPtr->venousPressure();
308  }
309 
310  //! Compute the elastic pressure.
311  /*!
312  * @param A area
313  * @param iNode node of the mesh
314  * @return \f$P_\mathrm{elastic} = \beta_0 \left( \left( \displaystyle\frac{A}{A^0} \right)^{\beta_1} - 1 \right)\f$
315  */
316  Real elasticPressure ( const Real& A, const UInt& iNode ) const;
317 
318  //! Compute the viscoelastic pressure.
319  /*!
320  * @param A area
321  * @param timeStep the time step
322  * @param iNode node of the mesh
323  * @param elasticExternalNodes consider elastic the external nodes (neglect viscoelasticity)
324  * @return \f$P_\mathrm{viscoelastic} = \gamma \displaystyle\frac{1}{2\sqrt{\pi A}} \displaystyle\frac{dA}{dt}\f$
325  */
326 #ifdef HAVE_NEUMANN_VISCOELASTIC_BC
327  Real viscoelasticPressure ( const Real& A, const Real& timeStep, const UInt& iNode, const bool& elasticExternalNodes = false ) const;
328 #else
329  Real viscoelasticPressure ( const Real& A, const Real& timeStep, const UInt& iNode, const bool& elasticExternalNodes = true ) const;
330 #endif
331 
332  //! Compute the total pressure
333  /*!
334  * @param A area
335  * @param Q flow rate
336  * @param iNode node of the mesh
337  * @return \f$P_t = P + \displaystyle\frac{\rho}{2} \left(\displaystyle\frac{Q}{A}\right)^2\f$
338  */
339  Real totalPressure ( const Real& A, const Real& Q, const UInt& iNode ) const;
340 
341  //@}
342 
343 
344  //! @name Set Methods
345  //@{
346 
347  //! Set the data container of the problem.
348  /*!
349  * @param dataPtr pointer to the data container of the problem
350  */
351  void setData ( const dataPtr_Type& dataPtr )
352  {
353  M_dataPtr = dataPtr;
354  }
355 
356  //! Set the area at time \f$t^n\f$.
357  /*!
358  * This parameter is required for computing the derivative of the area in time.
359  * @param area_tn \f$A^{n}\f$
360  */
361  void setArea_tn ( const vector_Type& area_tn )
362  {
363  M_previousAreaPtr.reset ( new vector_Type ( area_tn ) );
364  }
365 
366  //@}
367 
368  //! @name Get Methods
369  //@{
370 
371  //! Get the data container of the problem.
372  /*!
373  * @return shared pointer to the data container of the problem
374  */
376  {
377  return M_dataPtr;
378  }
379 
380  //@}
381 
382 protected:
383 
385 
386 private:
387 
388  //! @name Unimplemented Methods
389  //@{
390 
391  explicit OneDFSIPhysics ( const OneDFSIPhysics& physics );
392 
393  OneDFSIPhysics& operator= ( const OneDFSIPhysics& physics );
394 
395  //@}
396 
398 };
399 
400 // ===================================================
401 // Inline conversion methods
402 // ===================================================
403 inline Real
404 OneDFSIPhysics::fromPToA ( const Real& P, const Real& timeStep, const UInt& iNode, const bool& elasticExternalNodes ) const
405 {
406  if ( !M_dataPtr->viscoelasticWall() || ( ( iNode == 0 || iNode == M_dataPtr->numberOfNodes() - 1 ) && elasticExternalNodes ) )
407  {
408  return ( M_dataPtr->area0 ( iNode ) * OneDFSI::pow20 ( ( P - externalPressure() ) / M_dataPtr->beta0 ( iNode ) + 1, 1 / M_dataPtr->beta1 ( iNode ) ) );
409  }
410  else
411  {
412  // Newton method to solve the non linear equation
413  Real tolerance (1e-6);
414  Real maxIT (100);
415  UInt i (0);
416 
417  Real A ( M_dataPtr->area0 ( iNode ) );
418  Real newtonUpdate (0);
419  for ( ; i < maxIT ; ++i )
420  {
421  if ( std::abs ( pressure ( A, timeStep, iNode, elasticExternalNodes ) - P ) < tolerance )
422  {
423  break;
424  }
425 
426  newtonUpdate = ( pressure ( A, timeStep, iNode, elasticExternalNodes ) - P ) / dPdA ( A, timeStep, iNode, elasticExternalNodes );
427  if ( A - newtonUpdate <= 0 )
428  {
429  A /= 2.0; // Bisection
430  }
431  else
432  {
433  A -= newtonUpdate; // Newton
434  }
435  }
436  if ( i == maxIT )
437  {
438  std::cout << "!!! Warning: conversion fromPToA below tolerance !!! " << std::endl;
439  std::cout << "Tolerance: " << tolerance << "; Residual: " << std::abs ( pressure ( A, timeStep, iNode, elasticExternalNodes ) - P ) << std::endl;
440  }
441 
442  return A;
443  }
444 }
445 
446 // ===================================================
447 // Inline derivatives methods
448 // ===================================================
449 inline Real
450 OneDFSIPhysics::dAdt ( const Real& Anp1, const Real& timeStep, const UInt& iNode ) const
451 {
452  return ( Anp1 - (*M_previousAreaPtr) [iNode] ) / timeStep;
453 }
454 
455 inline Real
456 OneDFSIPhysics::dPdA ( const Real& A, const Real& timeStep, const UInt& iNode, const bool& elasticExternalNodes ) const
457 {
458  return dPdAelastic ( A, iNode ) + dPdAviscoelastic ( A, timeStep, iNode, elasticExternalNodes );
459 }
460 
461 inline Real
462 OneDFSIPhysics::dPdAelastic ( const Real& A, const UInt& iNode ) const
463 {
464  return M_dataPtr->beta0 ( iNode ) * M_dataPtr->beta1 ( iNode ) * OneDFSI::pow05 ( A / M_dataPtr->area0 ( iNode ), M_dataPtr->beta1 ( iNode ) ) / A;
465 }
466 
467 inline Real
468 OneDFSIPhysics::dPdAviscoelastic ( const Real& A, const Real& timeStep, const UInt& iNode, const bool& elasticExternalNodes ) const
469 {
470  if ( !M_dataPtr->viscoelasticWall() || ( ( iNode == 0 || iNode == M_dataPtr->numberOfNodes() - 1 ) && elasticExternalNodes ) )
471  {
472  return 0;
473  }
474  else
475  {
476  return M_dataPtr->viscoelasticCoefficient ( iNode ) / ( A * std::sqrt ( A ) ) * ( 1 / timeStep - 3 * dAdt ( A, timeStep, iNode ) / ( 2 * A ) );
477  }
478 }
479 
480 inline Real
481 OneDFSIPhysics::dAdP ( const Real& P, const Real& timeStep, const UInt& iNode, const bool& elasticExternalNodes ) const
482 {
483  if ( !M_dataPtr->viscoelasticWall() || ( ( iNode == 0 || iNode == M_dataPtr->numberOfNodes() - 1 ) && elasticExternalNodes ) )
484  {
485  return M_dataPtr->area0 ( iNode ) / ( M_dataPtr->beta0 ( iNode ) * M_dataPtr->beta1 ( iNode ) )
486  * OneDFSI::pow10 ( 1 + ( P - externalPressure() )
487  / M_dataPtr->beta0 ( iNode ), 1 / M_dataPtr->beta1 ( iNode ) - 1 );
488  }
489  else
490  {
491  // Finite difference approach
492  return ( fromPToA ( P + M_dataPtr->jacobianPerturbationStress(), timeStep, iNode, elasticExternalNodes ) - fromPToA ( P, timeStep, iNode, elasticExternalNodes ) )
493  / M_dataPtr->jacobianPerturbationStress();
494  }
495 }
496 
497 inline Real
498 OneDFSIPhysics::dPTdU ( const Real& A, const Real& Q, const Real& timeStep, const ID& id, const UInt& iNode ) const
499 {
500  if ( id == 0 ) // dPt/dA
501  {
502  return dPdA ( A, timeStep, iNode ) - M_dataPtr->densityRho() * Q * Q / ( A * A * A );
503  }
504 
505  if ( id == 1 ) // dPt/dQ
506  {
507  return M_dataPtr->densityRho() * Q / ( A * A );
508  }
509 
510  ERROR_MSG ("Total pressure's differential function has only 2 components.");
511  return -1.;
512 }
513 
514 // ===================================================
515 // Inline methods
516 // ===================================================
517 inline Real
518 OneDFSIPhysics::celerity0 ( const UInt& iNode ) const
519 {
520  return std::sqrt ( M_dataPtr->beta0 ( iNode ) * M_dataPtr->beta1 ( iNode ) / M_dataPtr->densityRho() );
521 }
522 
523 inline Real
524 OneDFSIPhysics::pressure ( const Real& A, const Real& timeStep, const UInt& iNode, const bool& elasticExternalNodes ) const
525 {
526  return elasticPressure ( A, iNode ) + viscoelasticPressure ( A, timeStep, iNode, elasticExternalNodes ) + externalPressure();
527 }
528 
529 inline Real
530 OneDFSIPhysics::elasticPressure ( const Real& A, const UInt& iNode ) const
531 {
532  return ( M_dataPtr->beta0 ( iNode ) * ( OneDFSI::pow05 ( A / M_dataPtr->area0 ( iNode ), M_dataPtr->beta1 ( iNode ) ) - 1 ) );
533 }
534 
535 inline Real
536 OneDFSIPhysics::viscoelasticPressure ( const Real& A, const Real& timeStep, const UInt& iNode, const bool& elasticExternalNodes ) const
537 {
538  if ( !M_dataPtr->viscoelasticWall() || ( ( iNode == 0 || iNode == M_dataPtr->numberOfNodes() - 1 ) && elasticExternalNodes ) )
539  {
540  return 0;
541  }
542  else
543  {
544  return M_dataPtr->viscoelasticCoefficient ( iNode ) / ( A * std::sqrt ( A ) ) * dAdt ( A, timeStep, iNode );
545  }
546 }
547 
548 inline Real
549 OneDFSIPhysics::totalPressure ( const Real& A, const Real& Q, const UInt& iNode ) const
550 {
551  return elasticPressure ( A, iNode ) + M_dataPtr->densityRho() / 2 * Q * Q / ( A * A );
552 }
553 
554 }
555 
556 #endif // OneDFSIPhysics_H
VectorEpetra - The Epetra Vector format Wrapper.
virtual Real fromPToW(const Real &P, const Real &W, const ID &iW, const UInt &iNode) const =0
Compute or from .
OneDFSIPhysics - Base class providing physical operations for the 1D model data.
virtual Real fromWToP(const Real &W1, const Real &W2, const UInt &iNode) const =0
Compute from .
FactorySingleton< Factory< OneDFSIPhysics, OneDFSI::physicsType_Type > > factoryPhysics_Type
Real dPdAviscoelastic(const Real &A, const Real &timeStep, const UInt &iNode, const bool &elasticExternalNodes=true) const
Compute the derivative of the viscoelastic pressure with respect to .
virtual void fromWToU(Real &U1, Real &U2, const Real &W1, const Real &W2, const UInt &iNode) const =0
Compute from .
OneDFSIData - Class which read and holds all the data for the One Dimensional Model Solver...
virtual Real fromQToW(const Real &Q, const Real &W_tn, const Real &W, const ID &iW, const UInt &iNode) const =0
Compute or from .
OneDFSIPhysics()
Empty constructor.
void setArea_tn(const vector_Type &area_tn)
Set the area at time .
const Real & externalPressure() const
Return the external pressure.
Real fromPToA(const Real &P, const Real &timeStep, const UInt &iNode, const bool &elasticExternalNodes=true) const
Compute the area given the elastic pressure .
OneDFSIPhysics(const dataPtr_Type dataPtr)
Constructor.
Real celerity0(const UInt &iNode) const
Compute the reference celerity.
virtual ~OneDFSIPhysics()
Destructor.
const Real & venousPressure() const
Return the venous pressure.
void updateInverseJacobian(const UInt &iQuadPt)
std::shared_ptr< data_Type > dataPtr_Type
vectorPtr_Type M_previousAreaPtr
#define ERROR_MSG(A)
Definition: LifeAssert.hpp:69
Real totalPressure(const Real &A, const Real &Q, const UInt &iNode) const
Compute the total pressure.
uint32_type ID
IDs.
Definition: LifeV.hpp:194
void setData(const dataPtr_Type &dataPtr)
Set the data container of the problem.
Real pressure(const Real &A, const Real &timeStep, const UInt &iNode, const bool &elasticExternalNodes=true) const
Compute the pressure.
Real dAdP(const Real &P, const Real &timeStep, const UInt &iNode, const bool &elasticExternalNodes=true) const
Compute the derivative of the area with respect to .
OneDFSIPhysics(const OneDFSIPhysics &physics)
Real viscoelasticPressure(const Real &A, const Real &timeStep, const UInt &iNode, const bool &elasticExternalNodes=true) const
Compute the viscoelastic pressure.
Real dAdt(const Real &Anp1, const Real &timeStep, const UInt &iNode) const
Compute the derivative of the area with respect to the time using a first order finite difference...
OneDFSIPhysics & operator=(const OneDFSIPhysics &physics)
double Real
Generic real data.
Definition: LifeV.hpp:175
virtual Real dPdW(const Real &W1, const Real &W2, const ID &iW, const UInt &iNode) const =0
Compute the derivative of pressure with respect to .
dataPtr_Type data() const
Get the data container of the problem.
Real dPdAelastic(const Real &A, const UInt &iNode) const
Compute the derivative of the elastic pressure with respect to .
Real elasticPressure(const Real &A, const UInt &iNode) const
Compute the elastic pressure.
Real dPdA(const Real &A, const Real &timeStep, const UInt &iNode, const bool &elasticExternalNodes=true) const
Compute the derivative of the pressure with respect to .
Real dPTdU(const Real &A, const Real &Q, const Real &timeStep, const ID &id, const UInt &iNode) const
Compute the derivative of total pressure with respect to or .
uint32_type UInt
generic unsigned integer (used mainly for addressing)
Definition: LifeV.hpp:191
virtual void fromUToW(Real &W1, Real &W2, const Real &U1, const Real &U2, const UInt &iNode) const =0
Compute from .
std::shared_ptr< vector_Type > vectorPtr_Type