Nektar++
Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Private Attributes | List of all members
Nektar::PowerPressureArea Class Reference

#include <PowerPressureArea.h>

Inheritance diagram for Nektar::PowerPressureArea:
[legend]

Public Member Functions

 PowerPressureArea (Array< OneD, MultiRegions::ExpListSharedPtr > pVessel, const LibUtilities::SessionReaderSharedPtr pSession)
 
 ~PowerPressureArea () override
 
- Public Member Functions inherited from Nektar::PulseWavePressureArea
 PulseWavePressureArea (Array< OneD, MultiRegions::ExpListSharedPtr > &pVessel, const LibUtilities::SessionReaderSharedPtr &pSession)
 
virtual ~PulseWavePressureArea ()
 
void GetPressure (NekDouble &P, const NekDouble &beta, const NekDouble &A, const NekDouble &A0, const NekDouble &dAUdx, const NekDouble &gamma=0, const NekDouble &alpha=0.5)
 
void GetC (NekDouble &c, const NekDouble &beta, const NekDouble &A, const NekDouble &A0, const NekDouble &alpha=0.5)
 
void GetW1 (NekDouble &W1, const NekDouble &u, const NekDouble &beta, const NekDouble &A, const NekDouble &A0, const NekDouble &alpha=0.5)
 
void GetW2 (NekDouble &W2, const NekDouble &u, const NekDouble &beta, const NekDouble &A, const NekDouble &A0, const NekDouble &alpha=0.5)
 
void GetAFromChars (NekDouble &A, const NekDouble &W1, const NekDouble &W2, const NekDouble &beta, const NekDouble &A0, const NekDouble &alpha=0.5)
 
void GetUFromChars (NekDouble &u, const NekDouble &W1, const NekDouble &W2)
 
void GetCharIntegral (NekDouble &I, const NekDouble &beta, const NekDouble &A, const NekDouble &A0, const NekDouble &alpha=0.5)
 
void GetJacobianInverse (NekMatrix< NekDouble > &invJ, const Array< OneD, NekDouble > &Au, const Array< OneD, NekDouble > &uu, const Array< OneD, NekDouble > &beta, const Array< OneD, NekDouble > &A0, const Array< OneD, NekDouble > &alpha, const std::string &type)
 

Static Public Member Functions

static PulseWavePressureAreaSharedPtr create (Array< OneD, MultiRegions::ExpListSharedPtr > &pVessel, const LibUtilities::SessionReaderSharedPtr &pSession)
 

Static Public Attributes

static std::string className
 

Protected Member Functions

void v_GetPressure (NekDouble &P, const NekDouble &beta, const NekDouble &A, const NekDouble &A0, const NekDouble &dAUdx, const NekDouble &gamma=0, const NekDouble &alpha=0.5) override
 
void v_GetC (NekDouble &c, const NekDouble &beta, const NekDouble &A, const NekDouble &A0, const NekDouble &alpha=0.5) override
 
void v_GetW1 (NekDouble &W1, const NekDouble &u, const NekDouble &beta, const NekDouble &A, const NekDouble &A0, const NekDouble &alpha=0.5) override
 
void v_GetW2 (NekDouble &W2, const NekDouble &u, const NekDouble &beta, const NekDouble &A, const NekDouble &A0, const NekDouble &alpha=0.5) override
 
void v_GetAFromChars (NekDouble &A, const NekDouble &W1, const NekDouble &W2, const NekDouble &beta, const NekDouble &A0, const NekDouble &alpha=0.5) override
 
void v_GetUFromChars (NekDouble &u, const NekDouble &W1, const NekDouble &W2) override
 
void v_GetCharIntegral (NekDouble &I, const NekDouble &beta, const NekDouble &A, const NekDouble &A0, const NekDouble &alpha=0.5) override
 
void v_GetJacobianInverse (NekMatrix< NekDouble > &invJ, const Array< OneD, NekDouble > &Au, const Array< OneD, NekDouble > &uu, const Array< OneD, NekDouble > &beta, const Array< OneD, NekDouble > &A0, const Array< OneD, NekDouble > &alpha, const std::string &type) override
 
void GetC0 (NekDouble &c0, const NekDouble &beta, const NekDouble &A0)
 
void GetB (NekDouble &b, const NekDouble &c0)
 
virtual void v_GetPressure (NekDouble &P, const NekDouble &beta, const NekDouble &A, const NekDouble &A0, const NekDouble &dAUdx, const NekDouble &gamma=0, const NekDouble &alpha=0.5)=0
 
virtual void v_GetC (NekDouble &c, const NekDouble &beta, const NekDouble &A, const NekDouble &A0, const NekDouble &alpha=0.5)=0
 
virtual void v_GetW1 (NekDouble &W1, const NekDouble &u, const NekDouble &beta, const NekDouble &A, const NekDouble &A0, const NekDouble &alpha=0.5)=0
 
virtual void v_GetW2 (NekDouble &W2, const NekDouble &u, const NekDouble &beta, const NekDouble &A, const NekDouble &A0, const NekDouble &alpha=0.5)=0
 
virtual void v_GetAFromChars (NekDouble &A, const NekDouble &W1, const NekDouble &W2, const NekDouble &beta, const NekDouble &A0, const NekDouble &alpha=0.5)=0
 
virtual void v_GetUFromChars (NekDouble &u, const NekDouble &W1, const NekDouble &W2)=0
 
virtual void v_GetCharIntegral (NekDouble &I, const NekDouble &beta, const NekDouble &A, const NekDouble &A0, const NekDouble &alpha=0.5)=0
 
virtual void v_GetJacobianInverse (NekMatrix< NekDouble > &invJ, const Array< OneD, NekDouble > &Au, const Array< OneD, NekDouble > &uu, const Array< OneD, NekDouble > &beta, const Array< OneD, NekDouble > &A0, const Array< OneD, NekDouble > &alpha, const std::string &type)=0
 

Private Attributes

NekDouble P_Collapse
 

Additional Inherited Members

- Protected Attributes inherited from Nektar::PulseWavePressureArea
Array< OneD, MultiRegions::ExpListSharedPtrm_vessels
 
LibUtilities::SessionReaderSharedPtr m_session
 
NekDouble m_PExt
 
NekDouble m_rho
 

Detailed Description

Definition at line 52 of file PowerPressureArea.h.

Constructor & Destructor Documentation

◆ PowerPressureArea()

Nektar::PowerPressureArea::PowerPressureArea ( Array< OneD, MultiRegions::ExpListSharedPtr pVessel,
const LibUtilities::SessionReaderSharedPtr  pSession 
)

Definition at line 47 of file PowerPressureArea.cpp.

50 : PulseWavePressureArea(pVessel, pSession)
51{
52 m_session->LoadParameter("P_Collapse", P_Collapse,
53 -13.3322); // -10mmHg converted to kg / (cm s^2)
54}
LibUtilities::SessionReaderSharedPtr m_session
PulseWavePressureArea(Array< OneD, MultiRegions::ExpListSharedPtr > &pVessel, const LibUtilities::SessionReaderSharedPtr &pSession)

References Nektar::PulseWavePressureArea::m_session, and P_Collapse.

◆ ~PowerPressureArea()

Nektar::PowerPressureArea::~PowerPressureArea ( )
override

Definition at line 56 of file PowerPressureArea.cpp.

57{
58}

Member Function Documentation

◆ create()

static PulseWavePressureAreaSharedPtr Nektar::PowerPressureArea::create ( Array< OneD, MultiRegions::ExpListSharedPtr > &  pVessel,
const LibUtilities::SessionReaderSharedPtr pSession 
)
inlinestatic

Definition at line 56 of file PowerPressureArea.h.

59 {
61 pSession);
62 }
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr().

◆ GetB()

void Nektar::PowerPressureArea::GetB ( NekDouble b,
const NekDouble c0 
)
protected

◆ GetC0()

void Nektar::PowerPressureArea::GetC0 ( NekDouble c0,
const NekDouble beta,
const NekDouble A0 
)
protected

Definition at line 300 of file PowerPressureArea.cpp.

302{
303 // Reference c0 from the beta law
304 c0 = sqrt(beta * sqrt(A0) / (2 * m_rho));
305
306 /*
307 // Empirical approximation from Olufsen et al (1999)
308 NekDouble k1 = 3E3;
309 NekDouble k2 = -9;
310 NekDouble k3 = 337;
311 NekDouble PI = 3.14159265359;
312
313 NekDouble R0 = sqrt(A0 / PI);
314
315 c0 = sqrt(2 / (3 * m_rho) * (k1 * exp(k2 * R0) + k3));
316 */
317}
@ beta
Gauss Radau pinned at x=-1,.
Definition: PointsType.h:59
scalarT< T > sqrt(scalarT< T > in)
Definition: scalar.hpp:294

References Nektar::LibUtilities::beta, Nektar::PulseWavePressureArea::m_rho, and tinysimd::sqrt().

Referenced by v_GetAFromChars(), v_GetC(), v_GetCharIntegral(), and v_GetPressure().

◆ v_GetAFromChars()

void Nektar::PowerPressureArea::v_GetAFromChars ( NekDouble A,
const NekDouble W1,
const NekDouble W2,
const NekDouble beta,
const NekDouble A0,
const NekDouble alpha = 0.5 
)
overrideprotectedvirtual

Implements Nektar::PulseWavePressureArea.

Definition at line 111 of file PowerPressureArea.cpp.

116{
117 NekDouble c0 = 0.0;
118 GetC0(c0, beta, A0);
119
120 NekDouble b = 0.0;
121 GetB(b, c0);
122
123 A = A0 * pow(((b / (8 * c0)) * (W1 - W2) + 1), 4 / b);
124}
void GetC0(NekDouble &c0, const NekDouble &beta, const NekDouble &A0)
void GetB(NekDouble &b, const NekDouble &c0)
double NekDouble

References Nektar::LibUtilities::beta, GetB(), and GetC0().

◆ v_GetC()

void Nektar::PowerPressureArea::v_GetC ( NekDouble c,
const NekDouble beta,
const NekDouble A,
const NekDouble A0,
const NekDouble alpha = 0.5 
)
overrideprotectedvirtual

Implements Nektar::PulseWavePressureArea.

Definition at line 78 of file PowerPressureArea.cpp.

81{
82 NekDouble c0 = 0.0;
83 GetC0(c0, beta, A0);
84
85 NekDouble b = 0.0;
86 GetB(b, c0);
87
88 c = c0 * pow((A / A0), b / 4); // Elastic
89}

References Nektar::LibUtilities::beta, GetB(), and GetC0().

◆ v_GetCharIntegral()

void Nektar::PowerPressureArea::v_GetCharIntegral ( NekDouble I,
const NekDouble beta,
const NekDouble A,
const NekDouble A0,
const NekDouble alpha = 0.5 
)
overrideprotectedvirtual

Implements Nektar::PulseWavePressureArea.

Definition at line 132 of file PowerPressureArea.cpp.

135{
136 NekDouble c = 0.0;
137 NekDouble c0 = 0.0;
138
139 GetC0(c0, beta, A0);
140 GetC(c, beta, A, A0);
141
142 NekDouble b = 0.0;
143 GetB(b, c0);
144
145 I = (4 / b) * (c - c0);
146}
void GetC(NekDouble &c, const NekDouble &beta, const NekDouble &A, const NekDouble &A0, const NekDouble &alpha=0.5)

References Nektar::LibUtilities::beta, GetB(), Nektar::PulseWavePressureArea::GetC(), and GetC0().

◆ v_GetJacobianInverse()

void Nektar::PowerPressureArea::v_GetJacobianInverse ( NekMatrix< NekDouble > &  invJ,
const Array< OneD, NekDouble > &  Au,
const Array< OneD, NekDouble > &  uu,
const Array< OneD, NekDouble > &  beta,
const Array< OneD, NekDouble > &  A0,
const Array< OneD, NekDouble > &  alpha,
const std::string &  type 
)
overrideprotectedvirtual

Implements Nektar::PulseWavePressureArea.

Definition at line 148 of file PowerPressureArea.cpp.

153{
154 // General formulation
155 if (type == "Bifurcation")
156 {
157 NekMatrix<NekDouble> J(6, 6);
158 Array<OneD, NekDouble> c(3);
159
160 for (int i = 0; i < 3; ++i)
161 {
162 GetC(c[i], beta[i], Au[i], A0[i], alpha[i]);
163 }
164
165 J.SetValue(0, 0, 1);
166 J.SetValue(0, 1, 0);
167 J.SetValue(0, 2, 0);
168 J.SetValue(0, 3, c[0] / Au[0]);
169 J.SetValue(0, 4, 0);
170 J.SetValue(0, 5, 0);
171
172 J.SetValue(1, 0, 0);
173 J.SetValue(1, 1, 1);
174 J.SetValue(1, 2, 0);
175 J.SetValue(1, 3, 0);
176 J.SetValue(1, 4, -c[1] / Au[1]);
177 J.SetValue(1, 5, 0);
178
179 J.SetValue(2, 0, 0);
180 J.SetValue(2, 1, 0);
181 J.SetValue(2, 2, 1);
182 J.SetValue(2, 3, 0);
183 J.SetValue(2, 4, 0);
184 J.SetValue(2, 5, -c[2] / Au[2]);
185
186 J.SetValue(3, 0, Au[0]);
187 J.SetValue(3, 1, -Au[1]);
188 J.SetValue(3, 2, -Au[2]);
189 J.SetValue(3, 3, uu[0]);
190 J.SetValue(3, 4, -uu[1]);
191 J.SetValue(3, 5, -uu[2]);
192
193 J.SetValue(4, 0, 2 * uu[0]);
194 J.SetValue(4, 1, -2 * uu[1]);
195 J.SetValue(4, 2, 0);
196 J.SetValue(4, 3, 2 * c[0] * c[0] / Au[0]);
197 J.SetValue(4, 4, -2 * c[1] * c[1] / Au[1]);
198 J.SetValue(4, 5, 0);
199
200 J.SetValue(5, 0, 2 * uu[0]);
201 J.SetValue(5, 1, 0);
202 J.SetValue(5, 2, -2 * uu[2]);
203 J.SetValue(5, 3, 2 * c[0] * c[0] / Au[0]);
204 J.SetValue(5, 4, 0);
205 J.SetValue(5, 5, -2 * c[2] * c[2] / Au[2]);
206
207 invJ = J;
208 invJ.Invert();
209 }
210 else if (type == "Merge")
211 {
212 NekMatrix<NekDouble> J(6, 6);
213 Array<OneD, NekDouble> c(3);
214
215 for (int i = 0; i < 3; ++i)
216 {
217 GetC(c[i], beta[i], Au[i], A0[i], alpha[i]);
218 }
219
220 J.SetValue(0, 0, 1);
221 J.SetValue(0, 1, 0);
222 J.SetValue(0, 2, 0);
223 J.SetValue(0, 3, -c[0] / Au[0]);
224 J.SetValue(0, 4, 0);
225 J.SetValue(0, 5, 0);
226
227 J.SetValue(1, 0, 0);
228 J.SetValue(1, 1, 1);
229 J.SetValue(1, 2, 0);
230 J.SetValue(1, 3, 0);
231 J.SetValue(1, 4, c[1] / Au[1]);
232 J.SetValue(1, 5, 0);
233
234 J.SetValue(2, 0, 0);
235 J.SetValue(2, 1, 0);
236 J.SetValue(2, 2, 1);
237 J.SetValue(2, 3, 0);
238 J.SetValue(2, 4, 0);
239 J.SetValue(2, 5, c[2] / Au[2]);
240
241 J.SetValue(3, 0, Au[0]);
242 J.SetValue(3, 1, -Au[1]);
243 J.SetValue(3, 2, -Au[2]);
244 J.SetValue(3, 3, uu[0]);
245 J.SetValue(3, 4, -uu[1]);
246 J.SetValue(3, 5, -uu[2]);
247
248 J.SetValue(4, 0, 2 * uu[0]);
249 J.SetValue(4, 1, -2 * uu[1]);
250 J.SetValue(4, 2, 0);
251 J.SetValue(4, 3, 2 * c[0] * c[0] / Au[0]);
252 J.SetValue(4, 4, -2 * c[1] * c[1] / Au[1]);
253 J.SetValue(4, 5, 0);
254
255 J.SetValue(5, 0, 2 * uu[0]);
256 J.SetValue(5, 1, 0);
257 J.SetValue(5, 2, -2 * uu[2]);
258 J.SetValue(5, 3, 2 * c[0] * c[0] / Au[0]);
259 J.SetValue(5, 4, 0);
260 J.SetValue(5, 5, -2 * c[2] * c[2] / Au[2]);
261
262 invJ = J;
263 invJ.Invert();
264 }
265 else if (type == "Interface")
266 {
267 NekMatrix<NekDouble> J(4, 4);
268 Array<OneD, NekDouble> c(2);
269
270 for (int i = 0; i < 2; ++i)
271 {
272 GetC(c[i], beta[i], Au[i], A0[i], alpha[i]);
273 }
274
275 J.SetValue(0, 0, 1);
276 J.SetValue(0, 1, 0);
277 J.SetValue(0, 2, c[0] / Au[0]);
278 J.SetValue(0, 3, 0);
279
280 J.SetValue(1, 0, 0);
281 J.SetValue(1, 1, 1);
282 J.SetValue(1, 2, 0);
283 J.SetValue(1, 3, -c[1] / Au[1]);
284
285 J.SetValue(2, 0, Au[0]);
286 J.SetValue(2, 1, -Au[1]);
287 J.SetValue(2, 2, uu[0]);
288 J.SetValue(2, 3, -uu[1]);
289
290 J.SetValue(3, 0, 2 * uu[0]);
291 J.SetValue(3, 1, -2 * uu[1]);
292 J.SetValue(3, 2, 2 * c[0] * c[0] / Au[0]);
293 J.SetValue(3, 3, -2 * c[1] * c[1] / Au[1]);
294
295 invJ = J;
296 invJ.Invert();
297 }
298}

References Nektar::LibUtilities::beta, and Nektar::PulseWavePressureArea::GetC().

◆ v_GetPressure()

void Nektar::PowerPressureArea::v_GetPressure ( NekDouble P,
const NekDouble beta,
const NekDouble A,
const NekDouble A0,
const NekDouble dAUdx,
const NekDouble gamma = 0,
const NekDouble alpha = 0.5 
)
overrideprotectedvirtual

Implements Nektar::PulseWavePressureArea.

Definition at line 60 of file PowerPressureArea.cpp.

65{
66 NekDouble c0 = 0.0;
67 GetC0(c0, beta, A0);
68
69 NekDouble b = 0.0;
70 GetB(b, c0);
71
72 P = m_PExt +
73 (2 * m_rho * c0 * c0 / b) *
74 (pow((A / A0), b / 2) - 1) // Power law by Smith/Canic/Mynard
75 - A0 * gamma * dAUdx / (A * sqrt(A)); // Viscoelasticity
76}
@ P
Monomial polynomials .
Definition: BasisType.h:62

References Nektar::LibUtilities::beta, GetB(), GetC0(), Nektar::PulseWavePressureArea::m_PExt, Nektar::PulseWavePressureArea::m_rho, Nektar::LibUtilities::P, and tinysimd::sqrt().

◆ v_GetUFromChars()

void Nektar::PowerPressureArea::v_GetUFromChars ( NekDouble u,
const NekDouble W1,
const NekDouble W2 
)
overrideprotectedvirtual

Implements Nektar::PulseWavePressureArea.

Definition at line 126 of file PowerPressureArea.cpp.

128{
129 u = (W1 + W2) / 2;
130}

◆ v_GetW1()

void Nektar::PowerPressureArea::v_GetW1 ( NekDouble W1,
const NekDouble u,
const NekDouble beta,
const NekDouble A,
const NekDouble A0,
const NekDouble alpha = 0.5 
)
overrideprotectedvirtual

Implements Nektar::PulseWavePressureArea.

Definition at line 91 of file PowerPressureArea.cpp.

94{
95 NekDouble I = 0.0;
96 GetCharIntegral(I, beta, A, A0, alpha);
97
98 W1 = u + I; // Elastic and assumes u0 = 0
99}
void GetCharIntegral(NekDouble &I, const NekDouble &beta, const NekDouble &A, const NekDouble &A0, const NekDouble &alpha=0.5)

References Nektar::LibUtilities::beta, and Nektar::PulseWavePressureArea::GetCharIntegral().

◆ v_GetW2()

void Nektar::PowerPressureArea::v_GetW2 ( NekDouble W2,
const NekDouble u,
const NekDouble beta,
const NekDouble A,
const NekDouble A0,
const NekDouble alpha = 0.5 
)
overrideprotectedvirtual

Implements Nektar::PulseWavePressureArea.

Definition at line 101 of file PowerPressureArea.cpp.

104{
105 NekDouble I = 0.0;
106 GetCharIntegral(I, beta, A, A0, alpha);
107
108 W2 = u - I; // Elastic and assumes u0 = 0
109}

References Nektar::LibUtilities::beta, and Nektar::PulseWavePressureArea::GetCharIntegral().

Member Data Documentation

◆ className

std::string Nektar::PowerPressureArea::className
static
Initial value:
=
"Power law pressure area relationship for the arterial system")
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
static PulseWavePressureAreaSharedPtr create(Array< OneD, MultiRegions::ExpListSharedPtr > &pVessel, const LibUtilities::SessionReaderSharedPtr &pSession)
PressureAreaFactory & GetPressureAreaFactory()

Definition at line 65 of file PowerPressureArea.h.

◆ P_Collapse

NekDouble Nektar::PowerPressureArea::P_Collapse
private

Definition at line 113 of file PowerPressureArea.h.

Referenced by GetB(), and PowerPressureArea().