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

A global linear system. More...

#include <UInflow.h>

Inheritance diagram for Nektar::UInflow:
[legend]

Public Member Functions

 UInflow (Array< OneD, MultiRegions::ExpListSharedPtr > pVessel, const LibUtilities::SessionReaderSharedPtr pSession, PulseWavePressureAreaSharedPtr pressureArea)
 
virtual ~UInflow ()
 
- Public Member Functions inherited from Nektar::PulseWaveBoundary
 PulseWaveBoundary (Array< OneD, MultiRegions::ExpListSharedPtr > &pVessel, const LibUtilities::SessionReaderSharedPtr &pSession, PulseWavePressureAreaSharedPtr &pressureArea)
 
virtual ~PulseWaveBoundary ()
 
void 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)
 

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

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)
 
- Protected Member Functions inherited from Nektar::PulseWaveBoundary
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)=0
 

Additional Inherited Members

- 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 50 of file UInflow.h.

Constructor & Destructor Documentation

◆ UInflow()

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

Definition at line 47 of file UInflow.cpp.

50  : PulseWaveBoundary(pVessel, pSession, pressureArea)
51 {
52  // Constructor
53 }
PulseWaveBoundary(Array< OneD, MultiRegions::ExpListSharedPtr > &pVessel, const LibUtilities::SessionReaderSharedPtr &pSession, PulseWavePressureAreaSharedPtr &pressureArea)

◆ ~UInflow()

Nektar::UInflow::~UInflow ( )
virtual

Definition at line 58 of file UInflow.cpp.

59 {
60  // Destructor
61 }

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 54 of file UInflow.h.

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

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

◆ 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,
const NekDouble  time,
int  omega,
int  offset,
int  n 
)
protectedvirtual

Definition at line 63 of file UInflow.cpp.

References Nektar::PulseWaveBoundary::m_vessels.

68 {
69  NekDouble u;
70  NekDouble A_r;
71  NekDouble u_r;
72  NekDouble A_l;
73  NekDouble u_l;
74  Array<OneD, MultiRegions::ExpListSharedPtr> vessel(2);
75 
76  // Pointers to the domains
77  vessel[0] = m_vessels[2 * omega];
78  vessel[1] = m_vessels[2 * omega + 1];
79 
80  // Evaluates the time-dependent U
81  vessel[1]->EvaluateBoundaryConditions(time);
82 
83  // Read the BC values from the input file
84  u = (vessel[1]->UpdateBndCondExpansion(n))->GetCoeffs()[0];
85 
86  // Initial conditions in inlet vessel
87  A_r = inarray[0][offset];
88  u_r = inarray[1][offset];
89 
90  /* Fix the boundary conditions in the virtual vessel to ensure
91  upwind state matches the boundary condition at the next time step */
92  A_l = A_r;
93  u_l = 2 * u - u_r;
94 
95  // Store the updated values in the boundary condition
96  (vessel[0]->UpdateBndCondExpansion(n))->UpdatePhys()[0] = A_l;
97  (vessel[1]->UpdateBndCondExpansion(n))->UpdatePhys()[0] = u_l;
98 }
Array< OneD, MultiRegions::ExpListSharedPtr > m_vessels
double NekDouble

Member Data Documentation

◆ className

std::string Nektar::UInflow::className
static
Initial value:
"U-inflow", UInflow::create, "Velocity inflow boundary condition")

Name of class.

Definition at line 64 of file UInflow.h.