46 "Beta law pressure area relationship for the arterial system");
66 gamma * dAUdx /
sqrt(
A);
133 const std::string &type)
144 if (type ==
"Bifurcation")
150 for (
int i = 0; i < 3; ++i)
152 GetC(c[i],
beta[i], Au[i], A0[i], alpha[i]);
155 k = c[0] * Au[1] * c[2] + Au[0] * c[2] * c[1] + Au[2] * c[0] * c[1];
156 K[0] = (c[0] - uu[0]) * k;
157 K[1] = (c[1] + uu[1]) * k;
158 K[2] = (c[2] + uu[2]) * k;
161 (-c[1] * uu[0] * c[2] * Au[0] +
162 Au[2] * c[1] * c[0] * c[0] +
163 Au[1] * c[0] * c[0] * c[2]) /
165 invJ.SetValue(0, 1, Au[1] * (c[1] - uu[1]) * c[0] * c[2] / K[0]);
166 invJ.SetValue(0, 2, Au[2] * (c[2] - uu[2]) * c[0] * c[1] / K[0]);
167 invJ.SetValue(0, 3, c[0] * c[1] * c[2] / K[0]);
168 invJ.SetValue(0, 4, -0.5 * c[0] * Au[1] * c[2] / K[0]);
169 invJ.SetValue(0, 5, -0.5 * Au[2] * c[0] * c[1] / K[0]);
171 invJ.SetValue(1, 0, Au[0] * (c[0] + uu[0]) * c[1] * c[2] / K[1]);
173 (c[0] * uu[1] * c[2] * Au[1] +
174 Au[2] * c[0] * c[1] * c[1] +
175 c[2] * c[1] * c[1] * Au[0]) /
177 invJ.SetValue(1, 2, -Au[2] * (c[2] - uu[2]) * c[0] * c[1] / K[1]);
178 invJ.SetValue(1, 3, -c[0] * c[1] * c[2] / K[1]);
179 invJ.SetValue(1, 4, -0.5 * (c[0] * Au[2] + Au[0] * c[2]) * c[1] / K[1]);
180 invJ.SetValue(1, 5, 0.5 * Au[2] * c[0] * c[1] / K[1]);
182 invJ.SetValue(2, 0, Au[0] * (c[0] + uu[0]) * c[1] * c[2] / K[2]);
183 invJ.SetValue(2, 1, -Au[1] * (c[1] - uu[1]) * c[0] * c[2] / K[2]);
185 (c[0] * c[1] * uu[2] * Au[2] +
186 c[0] * Au[1] * c[2] * c[2] +
187 c[1] * c[2] * c[2] * Au[0]) /
189 invJ.SetValue(2, 3, -c[0] * c[1] * c[2] / K[2]);
190 invJ.SetValue(2, 4, 0.5 * c[0] * Au[1] * c[2] / K[2]);
191 invJ.SetValue(2, 5, -0.5 * (Au[1] * c[0] + c[1] * Au[0]) * c[2] / K[2]);
195 (Au[0] * c[2] * c[1] - uu[0] * c[2] * Au[1] -
196 uu[0] * c[1] * Au[2]) /
198 invJ.SetValue(3, 1, -Au[0] * Au[1] * (c[1] - uu[1]) * c[2] / K[0]);
199 invJ.SetValue(3, 2, -Au[0] * Au[2] * (c[2] - uu[2]) * c[1] / K[0]);
200 invJ.SetValue(3, 3, -Au[0] * c[2] * c[1] / K[0]);
201 invJ.SetValue(3, 4, 0.5 * Au[0] * Au[1] * c[2] / K[0]);
202 invJ.SetValue(3, 5, 0.5 * Au[0] * c[1] * Au[2] / K[0]);
204 invJ.SetValue(4, 0, Au[0] * Au[1] * (c[0] + uu[0]) * c[2] / K[1]);
207 (c[0] * Au[1] * c[2] + c[0] * uu[1] * Au[2] +
208 c[2] * uu[1] * Au[0]) /
210 invJ.SetValue(4, 2, -Au[2] * Au[1] * (c[2] - uu[2]) * c[0] / K[1]);
211 invJ.SetValue(4, 3, -c[0] * Au[1] * c[2] / K[1]);
213 -0.5 * Au[1] * (c[0] * Au[2] + Au[0] * c[2]) / K[1]);
214 invJ.SetValue(4, 5, 0.5 * Au[2] * Au[1] * c[0] / K[1]);
216 invJ.SetValue(5, 0, Au[0] * Au[2] * (c[0] + uu[0]) * c[1] / K[2]);
217 invJ.SetValue(5, 1, -Au[2] * Au[1] * (c[1] - uu[1]) * c[0] / K[2]);
220 (Au[2] * c[0] * c[1] + c[0] * uu[2] * Au[1] +
221 c[1] * uu[2] * Au[0]) /
223 invJ.SetValue(5, 3, -Au[2] * c[0] * c[1] / K[2]);
224 invJ.SetValue(5, 4, 0.5 * Au[2] * Au[1] * c[0] / K[2]);
226 -0.5 * Au[2] * (Au[1] * c[0] + c[1] * Au[0]) / K[2]);
228 else if (type ==
"Merge")
234 for (
int i = 0; i < 3; ++i)
236 GetC(c[i],
beta[i], Au[i], A0[i], alpha[i]);
239 k = c[0] * Au[1] * c[2] + Au[0] * c[2] * c[1] + Au[2] * c[0] * c[1];
240 K[0] = (c[0] - uu[0]) * k;
241 K[1] = (c[1] + uu[1]) * k;
242 K[2] = (c[2] + uu[2]) * k;
245 (-c[1] * uu[0] * c[2] * Au[0] +
246 Au[2] * c[1] * c[0] * c[0] +
247 Au[1] * c[0] * c[0] * c[2]) /
249 invJ.SetValue(0, 1, Au[1] * (c[1] - uu[1]) * c[0] * c[2] / K[0]);
250 invJ.SetValue(0, 2, Au[2] * (c[2] - uu[2]) * c[0] * c[1] / K[0]);
251 invJ.SetValue(0, 3, c[0] * c[1] * c[2] / K[0]);
252 invJ.SetValue(0, 4, -0.5 * c[0] * Au[1] * c[2] / K[0]);
253 invJ.SetValue(0, 5, -0.5 * Au[2] * c[0] * c[1] / K[0]);
255 invJ.SetValue(1, 0, Au[0] * (c[0] + uu[0]) * c[1] * c[2] / K[1]);
257 (c[0] * uu[1] * c[2] * Au[1] +
258 Au[2] * c[0] * c[1] * c[1] +
259 c[2] * c[1] * c[1] * Au[0]) /
261 invJ.SetValue(1, 2, -Au[2] * (c[2] - uu[2]) * c[0] * c[1] / K[1]);
262 invJ.SetValue(1, 3, -c[0] * c[1] * c[2] / K[1]);
263 invJ.SetValue(1, 4, -0.5 * (c[0] * Au[2] + Au[0] * c[2]) * c[1] / K[1]);
264 invJ.SetValue(1, 5, 0.5 * Au[2] * c[0] * c[1] / K[1]);
266 invJ.SetValue(2, 0, Au[0] * (c[0] - uu[0]) * c[1] * c[2] / K[2]);
267 invJ.SetValue(2, 1, -Au[1] * (c[1] + uu[1]) * c[0] * c[2] / K[2]);
269 -(c[0] * uu[2] * c[1] * Au[2] -
270 Au[1] * c[0] * c[2] * c[2] -
271 c[1] * c[2] * c[2] * Au[0]) /
273 invJ.SetValue(2, 3, -c[0] * c[1] * c[2] / K[2]);
274 invJ.SetValue(2, 4, -0.5 * Au[1] * c[0] * c[2] / K[2]);
275 invJ.SetValue(2, 5, 0.5 * (Au[1] * c[0] + Au[0] * c[1]) * c[2] / K[2]);
279 (Au[0] * c[2] * c[1] + uu[0] * c[2] * Au[1] +
280 uu[0] * c[1] * Au[2]) /
282 invJ.SetValue(3, 1, Au[0] * Au[1] * (c[1] + uu[1]) * c[2] / K[0]);
284 invJ.SetValue(3, 2, -Au[0] * Au[2] * (c[2] - uu[2]) * c[1] / K[0]);
285 invJ.SetValue(3, 3, -Au[0] * c[2] * c[1] / K[0]);
286 invJ.SetValue(3, 4, 0.5 * Au[0] * Au[1] * c[2] / K[0]);
287 invJ.SetValue(3, 5, 0.5 * Au[0] * c[1] * Au[2] / K[0]);
289 invJ.SetValue(4, 0, Au[0] * Au[1] * (c[0] + uu[0]) * c[2] / K[1]);
292 (c[0] * Au[1] * c[2] + c[0] * uu[1] * Au[2] +
293 c[2] * uu[1] * Au[0]) /
295 invJ.SetValue(4, 2, -Au[2] * Au[1] * (c[2] - uu[2]) * c[0] / K[1]);
296 invJ.SetValue(4, 3, -c[0] * Au[1] * c[2] / K[1]);
298 -0.5 * Au[1] * (c[0] * Au[2] + Au[0] * c[2]) / K[1]);
299 invJ.SetValue(4, 5, 0.5 * Au[2] * Au[1] * c[0] / K[1]);
301 invJ.SetValue(5, 0, Au[0] * Au[2] * (c[0] + uu[0]) * c[1] / K[2]);
302 invJ.SetValue(5, 1, -Au[2] * Au[1] * (c[1] - uu[1]) * c[0] / K[2]);
305 (Au[2] * c[0] * c[1] + c[0] * uu[2] * Au[1] +
306 c[1] * uu[2] * Au[0]) /
308 invJ.SetValue(5, 3, -Au[2] * c[0] * c[1] / K[2]);
309 invJ.SetValue(5, 4, 0.5 * Au[2] * Au[1] * c[0] / K[2]);
311 -0.5 * Au[2] * (Au[1] * c[0] + c[1] * Au[0]) / K[2]);
313 else if (type ==
"Interface")
319 for (
int i = 0; i < 2; ++i)
321 GetC(c[i],
beta[i], Au[i], A0[i], alpha[i]);
324 k = (c[0] * Au[1] + Au[0] * c[1]);
325 K[0] = (c[0] + uu[0]) * k;
326 K[1] = (c[1] + uu[1]) * k;
329 (Au[1] * c[0] * c[0] - c[1] * uu[0] * Au[0]) / K[0]);
330 invJ.SetValue(0, 1, Au[1] * (c[1] - uu[1]) * c[0] / K[0]);
331 invJ.SetValue(0, 2, c[0] * c[1] / K[0]);
332 invJ.SetValue(0, 3, -0.5 * c[0] * Au[1] / K[0]);
334 invJ.SetValue(1, 0, Au[0] * (c[0] + uu[0]) * c[1] / K[1]);
336 (c[0] * uu[1] * Au[1] + c[1] * c[1] * Au[0]) / K[1]);
337 invJ.SetValue(1, 2, -c[0] * c[1] / K[1]);
338 invJ.SetValue(1, 3, -0.5 * Au[0] * c[1] / K[1]);
340 invJ.SetValue(2, 0, Au[0] * (Au[0] * c[1] - uu[0] * Au[1]) / K[0]);
341 invJ.SetValue(2, 1, -Au[0] * Au[1] * (c[1] - uu[1]) / K[0]);
342 invJ.SetValue(2, 2, -Au[0] * c[1] / K[0]);
343 invJ.SetValue(2, 3, 0.5 * Au[1] * Au[0] / K[0]);
345 invJ.SetValue(3, 0, Au[0] * Au[1] * (c[0] + uu[0]) / K[1]);
346 invJ.SetValue(3, 1, -Au[1] * (c[0] * Au[1] + uu[1] * Au[0]) / K[1]);
347 invJ.SetValue(3, 2, -c[0] * Au[1] / K[1]);
348 invJ.SetValue(3, 3, -0.5 * Au[1] * Au[0] / K[1]);
BetaPressureArea(Array< OneD, MultiRegions::ExpListSharedPtr > pVessel, const LibUtilities::SessionReaderSharedPtr pSession)
~BetaPressureArea() override
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_GetCharIntegral(NekDouble &I, const NekDouble &beta, const NekDouble &A, const NekDouble &A0, const NekDouble &alpha=0.5) override
static PulseWavePressureAreaSharedPtr create(Array< OneD, MultiRegions::ExpListSharedPtr > &pVessel, const LibUtilities::SessionReaderSharedPtr &pSession)
static std::string className
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_GetUFromChars(NekDouble &u, const NekDouble &W1, const NekDouble &W2) override
void v_GetC(NekDouble &c, 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 v_GetW1(NekDouble &W1, 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
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
void GetCharIntegral(NekDouble &I, const NekDouble &beta, const NekDouble &A, const NekDouble &A0, const NekDouble &alpha=0.5)
void GetC(NekDouble &c, const NekDouble &beta, const NekDouble &A, const NekDouble &A0, const NekDouble &alpha=0.5)
std::shared_ptr< SessionReader > SessionReaderSharedPtr
@ beta
Gauss Radau pinned at x=-1,.
@ P
Monomial polynomials .
PressureAreaFactory & GetPressureAreaFactory()
scalarT< T > sqrt(scalarT< T > in)