44 std::string RCROutflow::className =
46 "RCR-terminal", RCROutflow::create,
"RCR outflow boundary condition");
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];
100 m_pressureArea->GetC(c_0, beta[omega][nq - 1], A_0[omega][nq - 1], A_0[omega][nq - 1], alpha[omega][nq - 1]);
104 R1 = rho * c_0 / A_0[omega][nq - 1];
116 alpha[omega][nq - 1],
m_pc, A_u, u_u);
128 (vessel[0]->UpdateBndCondExpansion(n))->UpdatePhys()[0] = A_r;
129 (vessel[1]->UpdateBndCondExpansion(n))->UpdatePhys()[0] = u_r;
162 while ((proceed) && (iter < MAX_ITER))
170 FA = R * A_calc * (W1 - I) -
P + POut;
171 dFdA = R * (W1 - I - c) - c * c * rho / A_calc;
172 delta_A_calc = FA / dFdA;
173 A_calc -= delta_A_calc;
175 if (
sqrt(delta_A_calc * delta_A_calc) < Tol)
184 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)
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, Array< OneD, Array< OneD, NekDouble > > &alpha, const NekDouble time, int omega, int offset, int n)
std::shared_ptr< SessionReader > SessionReaderSharedPtr
The above copyright notice and this permission notice shall be included.
std::shared_ptr< PulseWavePressureArea > PulseWavePressureAreaSharedPtr
BoundaryFactory & GetBoundaryFactory()
scalarT< T > sqrt(scalarT< T > in)