44 string PulseWavePropagation::className =
46 "PulseWavePropagation", PulseWavePropagation::create,
47 "Pulse Wave Propagation equation.");
62 PulseWavePropagation::PulseWavePropagation(
84 ASSERTL0(
false,
"Implicit Pulse Wave Propagation not set up.");
95 riemName =
"UpwindPulse";
100 ASSERTL0(
false,
"populate switch statement for upwind flux");
154 for (
int omega = 0; omega <
m_nDomains; ++omega)
161 physarray[i] = inarray[i] + cnt;
162 out[i] = outarray[i] + cnt;
188 Vmath::Vcopy(inarray[i].num_elements(), inarray[i], 1, outarray[i], 1);
218 for (
int j = 0; j < 2; ++j)
221 vessel[0]->GetBndConditions()[j]->GetUserDefined();
225 BCType =
"NoUserDefined";
232 if (BCType ==
"Q-inflow")
234 vessel[0]->GetBndConditions()[j]->SetIsTimeDependent(
true);
236 if (BCType ==
"A-inflow")
238 vessel[0]->GetBndConditions()[j]->SetIsTimeDependent(
true);
240 if (BCType ==
"U-inflow")
242 vessel[1]->GetBndConditions()[j]->SetIsTimeDependent(
true);
244 else if (BCType ==
"RCR-terminal")
246 vessel[0]->GetBndConditions()[j]->SetIsTimeDependent(
true);
257 for (
int n = 0; n < 2; ++n)
262 offset +=
m_vessels[2 * omega]->GetTotPoints();
284 for (
int j = 0; j < nq; j++)
286 flux[0][0][j] = physfield[0][j] * physfield[1][j];
288 ASSERTL0(physfield[0][j] >= 0,
"Negative A not allowed.");
294 p_t = (physfield[1][j] * physfield[1][j]) / 2 + p /
m_rho;
Array< OneD, Array< OneD, NekDouble > > m_beta_trace
#define ASSERTL0(condition, msg)
UpwindTypePulse m_upwindTypePulse
std::shared_ptr< MeshGraph > MeshGraphSharedPtr
Array< OneD, NekDouble > & GetA0()
virtual ~PulseWavePropagation()
void SetPulseWaveBoundaryConditions(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
LibUtilities::TimeIntegrationSchemeOperators m_ode
The time integration scheme operators to use.
std::vector< std::pair< std::string, std::string > > SummaryList
SolverUtils::RiemannSolverSharedPtr m_riemannSolver
Array< OneD, Array< OneD, NekDouble > > m_trace_fwd_normal
SolverUtils::AdvectionSharedPtr m_advObject
virtual void v_InitObject()
void GetFluxVector(const Array< OneD, Array< OneD, NekDouble > > &physfield, Array< OneD, Array< OneD, Array< OneD, NekDouble > > > &flux)
DG Pulse Wave Propagation routines:
void EnforceInterfaceConditions(const Array< OneD, const Array< OneD, NekDouble > > &fields)
virtual void v_GenerateSummary(SolverUtils::SummaryList &s)
BoundaryFactory & GetBoundaryFactory()
Array< OneD, Array< OneD, NekDouble > > m_A_0_trace
void DoOdeRhs(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
Array< OneD, NekDouble > & GetN()
virtual void v_InitObject()
Base class for unsteady solvers.
void DefineProjection(FuncPointerT func, ObjectPointerT obj)
virtual SOLVER_UTILS_EXPORT void v_GenerateSummary(SummaryList &s)
Print a summary of time stepping parameters.
void DoOdeProjection(const Array< OneD, const Array< OneD, NekDouble > > &inarray, Array< OneD, Array< OneD, NekDouble > > &outarray, const NekDouble time)
tBaseSharedPtr CreateInstance(tKey idKey, tParam... args)
Create an instance of the class referred to by idKey.
bool m_explicitAdvection
Indicates if explicit or implicit treatment of advection is used.
void DefineOdeRhs(FuncPointerT func, ObjectPointerT obj)
Array< OneD, Array< OneD, NekDouble > > m_A_0
RiemannSolverFactory & GetRiemannSolverFactory()
Array< OneD, NekDouble > & GetBeta()
int m_spacedim
Spatial dimension (>= expansion dim).
AdvectionFactory & GetAdvectionFactory()
Gets the factory for initialising advection objects.
void Neg(int n, T *x, const int incx)
Negate x = -x.
EquationSystemFactory & GetEquationSystemFactory()
SOLVER_UTILS_EXPORT void SetBoundaryConditions(NekDouble time)
Evaluates the boundary conditions at the given time.
Array< OneD, Array< OneD, NekDouble > > m_beta
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array holding all dependent variables.
LibUtilities::SessionReaderSharedPtr m_session
The session reader.
PressureAreaFactory & GetPressureAreaFactory()
Array< OneD, PulseWaveBoundarySharedPtr > m_Boundary
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Array< OneD, MultiRegions::ExpListSharedPtr > m_vessels
PulseWavePressureAreaSharedPtr m_pressureArea
std::shared_ptr< SessionReader > SessionReaderSharedPtr