74 ASSERTL0(
false,
"Implicit Pulse Wave Propagation not set up.");
93 Array<
OneD, Array<OneD, NekDouble> >&outarray,
98 Array<OneD, Array<OneD, NekDouble> > physarray(
m_nVariables);
99 Array<OneD, Array<OneD, NekDouble> > modarray (
m_nVariables);
101 Array<OneD, NekDouble> tmpArray;
120 physarray[i] = inarray[i]+cnt;
121 modarray[i] = Array<OneD, NekDouble>(ncoeffs);
138 m_vessels[omega*m_nVariables+i]->MultiplyByElmtInvMass(modarray[i],modarray[i]);
139 m_vessels[omega*m_nVariables+i]->BwdTrans(modarray[i],tmpArray = outarray[i]+cnt);
146 Array<
OneD, Array<OneD, NekDouble> >&outarray,
152 Vmath::Vcopy(inarray[i].num_elements(),inarray[i],1,outarray[i],1);
163 const Array<
OneD,
const Array<OneD, NekDouble> >&inarray,
164 Array<
OneD, Array<OneD, NekDouble> >&outarray,
170 Array<OneD, MultiRegions::ExpListSharedPtr> vessel(2);
183 for(
int j = 0; j < 2; ++j)
185 std::string BCType = vessel[0]->GetBndConditions()[j]->
186 GetBndTypeAsString(vessel[0]->GetBndConditions()[j]->GetUserDefined());
198 for(
int n = 0; n < 2; ++n)
202 offset +=
m_vessels[2*omega]->GetTotPoints();
219 Array<
OneD, Array<OneD, NekDouble> > &flux)
229 for (
int j = 0; j < nq; j++)
231 flux[0][j] = physfield[0][j]*physfield[1][j];
237 for (
int j = 0; j < nq; j++)
239 ASSERTL0(physfield[0][j]>=0,
"Negative A not allowed.");
244 p_t = (physfield[1][j]*physfield[1][j])/2 + p/
m_rho;
250 ASSERTL0(
false,
"GetFluxVector: illegal vector index");
263 Array<
OneD, Array<OneD, NekDouble> > &numflux)
273 Fwd[i] = Array<OneD, NekDouble>(nTracePts);
274 Bwd[i] = Array<OneD, NekDouble>(nTracePts);
281 GetFwdBwdTracePhys(physfield[i],Fwd[i],Bwd[i]);
288 for (i = 0; i < nTracePts; ++i)
302 ASSERTL0(
false,
"populate switch statement for upwind flux");
306 numflux[0][i] = Aflux;
307 numflux[1][i] = uflux;
330 Array<OneD, NekDouble> W(2);
331 Array<OneD, NekDouble> upwindedphysfield(2);
346 cL = sqrt(beta*sqrt(AL)/(2*rho))*n;
347 cR = sqrt(beta*sqrt(AR)/(2*rho))*n;
349 ASSERTL1(fabs(cL+cR) > fabs(uL+uR),
"Conditions are not sub-sonic");
362 upwindedphysfield[0]= w0mw1*fac;
363 upwindedphysfield[1]= 0.5*(W[0] + W[1]);
366 Aflux = upwindedphysfield[0] * upwindedphysfield[1]*n;
367 p = pext + beta*(sqrt(upwindedphysfield[0]) - sqrt(A_0));
368 p_t = 0.5*(upwindedphysfield[1]*upwindedphysfield[1]) + p/rho;