65 [[maybe_unused]]
const NekDouble time,
int omega,
int offset,
int n)
91 NekDouble RT = ((vessel[0]->GetBndCondExpansions())[n])->GetCoeffs()[0];
92 NekDouble C = ((vessel[1]->GetBndCondExpansions())[n])->GetCoeffs()[0];
93 int nq = vessel[0]->GetTotPoints();
96 A_l = inarray[0][offset + nq - 1];
97 u_l = inarray[1][offset + nq - 1];
101 A_0[omega][nq - 1], alpha[omega][nq - 1]);
105 R1 = rho * c_0 / A_0[omega][nq - 1];
117 alpha[omega][nq - 1],
m_pc, A_u, u_u);
129 (vessel[0]->UpdateBndCondExpansion(n))->UpdatePhys()[0] = A_r;
130 (vessel[1]->UpdateBndCondExpansion(n))->UpdatePhys()[0] = u_r;
163 while ((proceed) && (iter < MAX_ITER))
171 FA = R * A_calc * (W1 - I) -
P + POut;
172 dFdA = R * (W1 - I - c) - c * c * rho / A_calc;
173 delta_A_calc = FA / dFdA;
174 A_calc -= delta_A_calc;
176 if (
sqrt(delta_A_calc * delta_A_calc) < Tol)
185 u_u = (
P - POut) / (R * A_calc);
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
Array< OneD, MultiRegions::ExpListSharedPtr > m_vessels
PulseWavePressureAreaSharedPtr m_pressureArea
LibUtilities::SessionReaderSharedPtr m_session
void R_RiemannSolver(NekDouble R, NekDouble A_l, NekDouble u_l, NekDouble A_0, NekDouble beta, NekDouble alpha, NekDouble POut, NekDouble &A_u, NekDouble &u_u)
static std::string className
void v_DoBoundary(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &A_0, Array< OneD, Array< OneD, NekDouble > > &beta, Array< OneD, Array< OneD, NekDouble > > &alpha, const NekDouble time, int omega, int offset, int n) override
RCROutflow(Array< OneD, MultiRegions::ExpListSharedPtr > pVessel, const LibUtilities::SessionReaderSharedPtr pSession, PulseWavePressureAreaSharedPtr pressureArea)
static PulseWaveBoundarySharedPtr create(Array< OneD, MultiRegions::ExpListSharedPtr > &pVessel, const LibUtilities::SessionReaderSharedPtr &pSession, PulseWavePressureAreaSharedPtr &pressureArea)
std::shared_ptr< SessionReader > SessionReaderSharedPtr
@ beta
Gauss Radau pinned at x=-1,.
@ P
Monomial polynomials .
std::shared_ptr< PulseWavePressureArea > PulseWavePressureAreaSharedPtr
BoundaryFactory & GetBoundaryFactory()
scalarT< T > sqrt(scalarT< T > in)