44 std::string RCROutflow::className
48 "RCR outflow boundary condition");
74 int omega,
int offset,
int n)
89 NekDouble RT=((vessel[0]->GetBndCondExpansions())[n])->GetCoeffs()[0];
90 NekDouble C=((vessel[1]->GetBndCondExpansions())[n])->GetCoeffs()[0];
99 int nq = vessel[0]->GetTotPoints();
101 A_l = inarray[0][offset+nq-1];
102 u_l = inarray[1][offset+nq-1];
105 c_0 = sqrt(beta[omega][nq-1]/(2*
m_rho))*sqrt(sqrt(A_0[omega][nq-1]));
109 R1 = rho*c_0/A_0[omega][nq-1];
122 (vessel[0]->UpdateBndCondExpansion(n))->UpdatePhys()[0] = A_r;
123 (vessel[1]->UpdateBndCondExpansion(n))->UpdatePhys()[0] = u_r;
147 c_l = sqrt(beta/(2*rho))*sqrt(sqrt(A_l));
154 while ((proceed) && (iter < MAX_ITER))
158 fa = R*W1*A_calc-4*R*sqrt(beta/(2*rho))*A_calc*sqrt(sqrt(A_calc))-pext-beta*(sqrt(A_calc)-sqrt(A_0))+pout;
159 dfa = R*W1-5*R*sqrt(beta/(2*rho))*sqrt(sqrt(A_calc))-beta/(2*sqrt(A_calc));
160 delta_A_calc = fa/dfa;
161 A_calc = A_calc - delta_A_calc;
163 if (sqrt(delta_A_calc*delta_A_calc) < Tol)
169 u_u=(pext+beta*(sqrt(A_calc)-sqrt(A_0))-pout)/(R*A_calc);
LibUtilities::SessionReaderSharedPtr m_session
Array< OneD, MultiRegions::ExpListSharedPtr > m_vessels
boost::shared_ptr< SessionReader > SessionReaderSharedPtr
BoundaryFactory & GetBoundaryFactory()
boost::shared_ptr< PulseWavePressureArea > PulseWavePressureAreaSharedPtr
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)
void R_RiemannSolver(NekDouble R, NekDouble A_l, NekDouble u_l, NekDouble A_0, NekDouble beta, NekDouble pout, NekDouble &A_u, NekDouble &u_u)
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, tDescription pDesc="")
Register a class with the factory.