Nektar++
Static Public Member Functions | Static Public Attributes | Protected Member Functions | Friends | List of all members
Nektar::UInflow Class Reference

A global linear system. More...

#include <UInflow.h>

Inheritance diagram for Nektar::UInflow:
[legend]

Static Public Member Functions

static PulseWaveBoundarySharedPtr create (Array< OneD, MultiRegions::ExpListSharedPtr > &pVessel, const LibUtilities::SessionReaderSharedPtr &pSession, PulseWavePressureAreaSharedPtr &pressureArea)
 Creates an instance of this class. More...
 

Static Public Attributes

static std::string className
 Name of class. More...
 

Protected Member Functions

 UInflow (Array< OneD, MultiRegions::ExpListSharedPtr > pVessel, const LibUtilities::SessionReaderSharedPtr pSession, PulseWavePressureAreaSharedPtr pressureArea)
 
 ~UInflow () override=default
 
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) override
 
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)=0
 

Friends

class MemoryManager< UInflow >
 

Additional Inherited Members

- Public Member Functions inherited from Nektar::PulseWaveBoundary
 PulseWaveBoundary (Array< OneD, MultiRegions::ExpListSharedPtr > &pVessel, const LibUtilities::SessionReaderSharedPtr &pSession, PulseWavePressureAreaSharedPtr &pressureArea)
 
virtual ~PulseWaveBoundary ()=default
 
void 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)
 
- Protected Attributes inherited from Nektar::PulseWaveBoundary
Array< OneD, MultiRegions::ExpListSharedPtrm_vessels
 
LibUtilities::SessionReaderSharedPtr m_session
 
PulseWavePressureAreaSharedPtr m_pressureArea
 
NekDouble m_pext
 
NekDouble m_pout
 
NekDouble m_rho
 

Detailed Description

A global linear system.

Definition at line 51 of file UInflow.h.

Constructor & Destructor Documentation

◆ UInflow()

Nektar::UInflow::UInflow ( Array< OneD, MultiRegions::ExpListSharedPtr pVessel,
const LibUtilities::SessionReaderSharedPtr  pSession,
PulseWavePressureAreaSharedPtr  pressureArea 
)
protected

Definition at line 44 of file UInflow.cpp.

47 : PulseWaveBoundary(pVessel, pSession, pressureArea)
48{
49}
PulseWaveBoundary(Array< OneD, MultiRegions::ExpListSharedPtr > &pVessel, const LibUtilities::SessionReaderSharedPtr &pSession, PulseWavePressureAreaSharedPtr &pressureArea)

◆ ~UInflow()

Nektar::UInflow::~UInflow ( )
overrideprotecteddefault

Member Function Documentation

◆ create()

static PulseWaveBoundarySharedPtr Nektar::UInflow::create ( Array< OneD, MultiRegions::ExpListSharedPtr > &  pVessel,
const LibUtilities::SessionReaderSharedPtr pSession,
PulseWavePressureAreaSharedPtr pressureArea 
)
inlinestatic

Creates an instance of this class.

Definition at line 57 of file UInflow.h.

61 {
62 return MemoryManager<UInflow>::AllocateSharedPtr(pVessel, pSession,
63 pressureArea);
64 }
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr().

◆ v_DoBoundary()

void Nektar::UInflow::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 
)
overrideprotectedvirtual

Implements Nektar::PulseWaveBoundary.

Definition at line 51 of file UInflow.cpp.

57{
58 NekDouble u;
59 NekDouble A_r;
60 NekDouble u_r;
61 NekDouble A_l;
62 NekDouble u_l;
63 Array<OneD, MultiRegions::ExpListSharedPtr> vessel(2);
64
65 vessel[0] = m_vessels[2 * omega];
66 vessel[1] = m_vessels[2 * omega + 1];
67
68 // Evaluates the time-dependent U
69 vessel[1]->EvaluateBoundaryConditions(time);
70
71 // Read the BC values from the input file
72 u = (vessel[1]->UpdateBndCondExpansion(n))->GetCoeffs()[0];
73
74 // Initial conditions in inlet vessel
75 A_r = inarray[0][offset];
76 u_r = inarray[1][offset];
77
78 /* Fix the boundary conditions in the virtual vessel to ensure
79 upwind state matches the boundary condition at the next time step */
80 A_l = A_r;
81 u_l = 2 * u - u_r;
82
83 // Store the updated values in the boundary condition
84 (vessel[0]->UpdateBndCondExpansion(n))->UpdatePhys()[0] = A_l;
85 (vessel[1]->UpdateBndCondExpansion(n))->UpdatePhys()[0] = u_l;
86}
Array< OneD, MultiRegions::ExpListSharedPtr > m_vessels
double NekDouble

References Nektar::PulseWaveBoundary::m_vessels.

Friends And Related Function Documentation

◆ MemoryManager< UInflow >

friend class MemoryManager< UInflow >
friend

Definition at line 48 of file UInflow.h.

Member Data Documentation

◆ className

std::string Nektar::UInflow::className
static
Initial value:
"U-inflow", UInflow::create, "Velocity inflow boundary condition")
tKey RegisterCreatorFunction(tKey idKey, CreatorFunction classCreator, std::string pDesc="")
Register a class with the factory.
static PulseWaveBoundarySharedPtr create(Array< OneD, MultiRegions::ExpListSharedPtr > &pVessel, const LibUtilities::SessionReaderSharedPtr &pSession, PulseWavePressureAreaSharedPtr &pressureArea)
Creates an instance of this class.
Definition: UInflow.h:57
BoundaryFactory & GetBoundaryFactory()

Name of class.

Definition at line 67 of file UInflow.h.