45 "Inflow boundary condition");
81 vessel[0]->EvaluateBoundaryConditions(time);
88 Q = (vessel[0]->UpdateBndCondExpansion(n))->GetCoeffs()[0];
90 A_r = inarray[0][offset];
91 u_r = inarray[1][offset];
101 (vessel[0]->UpdateBndCondExpansion(n))->UpdatePhys()[0] = A_l;
102 (vessel[1]->UpdateBndCondExpansion(n))->UpdatePhys()[0] = u_l;
130 W2 = u_r - 4*sqrt(beta/(2*rho))*sqrt(sqrt(A_r));
134 while ((proceed) && (iter < MAX_ITER))
138 fa = Q - W2*A_calc - A_calc*4*sqrt(beta/(2*rho))*sqrt(sqrt(A_calc));
139 dfa = -W2 - 5*sqrt(beta/(2*rho))*sqrt(sqrt(A_calc));
140 delta_A_calc = fa/dfa;
141 A_calc = A_calc - delta_A_calc;
143 if (sqrt(delta_A_calc*delta_A_calc) < Tol)
148 uu = W2+4*sqrt(beta/(2*rho))*sqrt(sqrt(A_calc));
void Q_RiemannSolver(NekDouble Q, NekDouble A_r, NekDouble u_r, NekDouble A_0, NekDouble beta, NekDouble &Au, NekDouble &uu)
static PulseWaveBoundarySharedPtr create(Array< OneD, MultiRegions::ExpListSharedPtr > &pVessel, const LibUtilities::SessionReaderSharedPtr &pSession, PulseWavePressureAreaSharedPtr &pressureArea)
Creates an instance of this class.
QInflow(Array< OneD, MultiRegions::ExpListSharedPtr > pVessel, const LibUtilities::SessionReaderSharedPtr pSession, PulseWavePressureAreaSharedPtr pressureArea)
Array< OneD, MultiRegions::ExpListSharedPtr > m_vessels
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
BoundaryFactory & GetBoundaryFactory()
static std::string className
Name of class.
virtual void v_DoBoundary(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &A_0, Array< OneD, Array< OneD, NekDouble > > &beta, const NekDouble time, int omega, int offset, int n)
boost::shared_ptr< PulseWavePressureArea > PulseWavePressureAreaSharedPtr
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.