46 "Template to add a new Pressure-Area relation");
124 while ((proceed) && (iter < MAX_ITER))
131 FA = I - ((W1 - W2) / 2);
137 if (
sqrt(dA * dA) < Tol)
168 for (
int i = 1; i < n; ++i)
180 I += ((c /
A) + (c0 / A0)) / 2;
188 const std::string type)
197 if (type ==
"Bifurcation")
202 for (
int i = 0; i < 3; ++i)
204 GetC(c[i],
beta[i], Au[i], A0[i], alpha[i]);
210 J.SetValue(0, 3, c[0] / Au[0]);
218 J.SetValue(1, 4, -c[1] / Au[1]);
226 J.SetValue(2, 5, -c[2] / Au[2]);
228 J.SetValue(3, 0, Au[0]);
229 J.SetValue(3, 1, -Au[1]);
230 J.SetValue(3, 2, -Au[2]);
231 J.SetValue(3, 3, uu[0]);
232 J.SetValue(3, 4, -uu[1]);
233 J.SetValue(3, 5, -uu[2]);
235 J.SetValue(4, 0, 2 * uu[0]);
236 J.SetValue(4, 1, -2 * uu[1]);
238 J.SetValue(4, 3, 2 * c[0] * c[0] / Au[0]);
239 J.SetValue(4, 4, -2 * c[1] * c[1] / Au[1]);
242 J.SetValue(5, 0, 2 * uu[0]);
244 J.SetValue(5, 2, -2 * uu[2]);
245 J.SetValue(5, 3, 2 * c[0] * c[0] / Au[0]);
247 J.SetValue(5, 5, -2 * c[2] * c[2] / Au[2]);
252 else if (type ==
"Merge")
257 for (
int i = 0; i < 3; ++i)
259 GetC(c[i],
beta[i], Au[i], A0[i], alpha[i]);
265 J.SetValue(0, 3, -c[0] / Au[0]);
273 J.SetValue(1, 4, c[1] / Au[1]);
281 J.SetValue(2, 5, c[2] / Au[2]);
283 J.SetValue(3, 0, Au[0]);
284 J.SetValue(3, 1, -Au[1]);
285 J.SetValue(3, 2, -Au[2]);
286 J.SetValue(3, 3, uu[0]);
287 J.SetValue(3, 4, -uu[1]);
288 J.SetValue(3, 5, -uu[2]);
290 J.SetValue(4, 0, 2 * uu[0]);
291 J.SetValue(4, 1, -2 * uu[1]);
293 J.SetValue(4, 3, 2 * c[0] * c[0] / Au[0]);
294 J.SetValue(4, 4, -2 * c[1] * c[1] / Au[1]);
297 J.SetValue(5, 0, 2 * uu[0]);
299 J.SetValue(5, 2, -2 * uu[2]);
300 J.SetValue(5, 3, 2 * c[0] * c[0] / Au[0]);
302 J.SetValue(5, 5, -2 * c[2] * c[2] / Au[2]);
307 else if (type ==
"Interface")
312 for (
int i = 0; i < 2; ++i)
314 GetC(c[i],
beta[i], Au[i], A0[i], alpha[i]);
319 J.SetValue(0, 2, c[0] / Au[0]);
325 J.SetValue(1, 3, -c[1] / Au[1]);
327 J.SetValue(2, 0, Au[0]);
328 J.SetValue(2, 1, -Au[1]);
329 J.SetValue(2, 2, uu[0]);
330 J.SetValue(2, 3, -uu[1]);
332 J.SetValue(3, 0, 2 * uu[0]);
333 J.SetValue(3, 1, -2 * uu[1]);
334 J.SetValue(3, 2, 2 * c[0] * c[0] / Au[0]);
335 J.SetValue(3, 3, -2 * c[1] * c[1] / Au[1]);
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)
virtual void v_GetW1(NekDouble &W1, const NekDouble &u, const NekDouble &beta, const NekDouble &A, const NekDouble &A0, const NekDouble &alpha=0.5) override
virtual void v_GetUFromChars(NekDouble &u, const NekDouble &W1, const NekDouble &W2) override
virtual void v_GetC(NekDouble &c, const NekDouble &beta, const NekDouble &A, const NekDouble &A0, const NekDouble &alpha=0.5) override
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) override
virtual void v_GetAFromChars(NekDouble &A, const NekDouble &W1, const NekDouble &W2, const NekDouble &beta, const NekDouble &A0, const NekDouble &alpha=0.5) override
virtual void v_GetW2(NekDouble &W2, const NekDouble &u, const NekDouble &beta, const NekDouble &A, const NekDouble &A0, const NekDouble &alpha=0.5) override
virtual 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
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) override
TemplatePressureArea(Array< OneD, MultiRegions::ExpListSharedPtr > pVessel, const LibUtilities::SessionReaderSharedPtr pSession)
virtual ~TemplatePressureArea()
std::shared_ptr< SessionReader > SessionReaderSharedPtr
@ beta
Gauss Radau pinned at x=-1,.
@ P
Monomial polynomials .
PressureAreaFactory & GetPressureAreaFactory()
scalarT< T > sqrt(scalarT< T > in)