Nektar++
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Nektar::CFSBndCond Class Referenceabstract

Encapsulates the user-defined boundary conditions for compressible flow solver. More...

#include <CFSBndCond.h>

Inheritance diagram for Nektar::CFSBndCond:
[legend]

Public Member Functions

virtual ~CFSBndCond ()
 
void Apply (Array< OneD, Array< OneD, NekDouble > > &Fwd, Array< OneD, Array< OneD, NekDouble > > &physarray, const NekDouble &time=0)
 Apply the boundary condition. More...
 

Protected Member Functions

 CFSBndCond (const LibUtilities::SessionReaderSharedPtr &pSession, const Array< OneD, MultiRegions::ExpListSharedPtr > &pFields, const Array< OneD, Array< OneD, NekDouble > > &pTraceNormals, const int pSpaceDim, const int bcRegion, const int cnt)
 Constructor. More...
 
virtual void v_Apply (Array< OneD, Array< OneD, NekDouble > > &Fwd, Array< OneD, Array< OneD, NekDouble > > &physarray, const NekDouble &time)=0
 

Protected Attributes

LibUtilities::SessionReaderSharedPtr m_session
 Session reader. More...
 
Array< OneD, MultiRegions::ExpListSharedPtrm_fields
 Array of fields. More...
 
Array< OneD, Array< OneD, NekDouble > > m_traceNormals
 Trace normals. More...
 
int m_spacedim
 Space dimension. More...
 
VariableConverterSharedPtr m_varConv
 Auxiliary object to convert variables. More...
 
NekDouble m_gamma
 Parameters of the flow. More...
 
NekDouble m_rhoInf
 
NekDouble m_pInf
 
Array< OneD, NekDoublem_velInf
 
int m_bcRegion
 Id of the boundary region. More...
 
int m_offset
 Offset. More...
 

Detailed Description

Encapsulates the user-defined boundary conditions for compressible flow solver.

Definition at line 70 of file CFSBndCond.h.

Constructor & Destructor Documentation

◆ ~CFSBndCond()

virtual Nektar::CFSBndCond::~CFSBndCond ( )
inlinevirtual

Definition at line 73 of file CFSBndCond.h.

References Apply().

73 {}

◆ CFSBndCond()

Nektar::CFSBndCond::CFSBndCond ( const LibUtilities::SessionReaderSharedPtr pSession,
const Array< OneD, MultiRegions::ExpListSharedPtr > &  pFields,
const Array< OneD, Array< OneD, NekDouble > > &  pTraceNormals,
const int  pSpaceDim,
const int  bcRegion,
const int  cnt 
)
protected

Constructor.

Definition at line 47 of file CFSBndCond.cpp.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), m_gamma, m_pInf, m_rhoInf, m_session, m_spacedim, m_varConv, and m_velInf.

53  : m_session(pSession),
54  m_fields(pFields),
55  m_traceNormals(pTraceNormals),
56  m_spacedim(pSpaceDim),
57  m_bcRegion(bcRegion),
58  m_offset(cnt)
59 {
60  m_velInf = Array<OneD, NekDouble> (m_spacedim, 0.0);
61  m_session->LoadParameter("Gamma", m_gamma, 1.4);
62  m_session->LoadParameter("rhoInf", m_rhoInf, 1.225);
63  m_session->LoadParameter("pInf", m_pInf, 101325);
64  m_session->LoadParameter("uInf", m_velInf[0], 0.1);
65  if (m_spacedim >= 2)
66  {
67  m_session->LoadParameter("vInf", m_velInf[1], 0.0);
68  }
69  if (m_spacedim == 3)
70  {
71  m_session->LoadParameter("wInf", m_velInf[2], 0.0);
72  }
73 
74  // Create auxiliary object to convert variables
77 }
int m_spacedim
Space dimension.
Definition: CFSBndCond.h:89
LibUtilities::SessionReaderSharedPtr m_session
Session reader.
Definition: CFSBndCond.h:83
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array of fields.
Definition: CFSBndCond.h:85
NekDouble m_pInf
Definition: CFSBndCond.h:96
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.
NekDouble m_gamma
Parameters of the flow.
Definition: CFSBndCond.h:94
VariableConverterSharedPtr m_varConv
Auxiliary object to convert variables.
Definition: CFSBndCond.h:91
Array< OneD, NekDouble > m_velInf
Definition: CFSBndCond.h:97
int m_offset
Offset.
Definition: CFSBndCond.h:102
NekDouble m_rhoInf
Definition: CFSBndCond.h:95
Array< OneD, Array< OneD, NekDouble > > m_traceNormals
Trace normals.
Definition: CFSBndCond.h:87
int m_bcRegion
Id of the boundary region.
Definition: CFSBndCond.h:100

Member Function Documentation

◆ Apply()

void Nektar::CFSBndCond::Apply ( Array< OneD, Array< OneD, NekDouble > > &  Fwd,
Array< OneD, Array< OneD, NekDouble > > &  physarray,
const NekDouble time = 0 
)

Apply the boundary condition.

Parameters
bcRegionid of the boundary region
cnt
Fwd
physarray
time

Definition at line 86 of file CFSBndCond.cpp.

References v_Apply().

Referenced by ~CFSBndCond().

90 {
91  v_Apply(Fwd, physarray, time);
92 }
virtual void v_Apply(Array< OneD, Array< OneD, NekDouble > > &Fwd, Array< OneD, Array< OneD, NekDouble > > &physarray, const NekDouble &time)=0

◆ v_Apply()

virtual void Nektar::CFSBndCond::v_Apply ( Array< OneD, Array< OneD, NekDouble > > &  Fwd,
Array< OneD, Array< OneD, NekDouble > > &  physarray,
const NekDouble time 
)
protectedpure virtual

Member Data Documentation

◆ m_bcRegion

int Nektar::CFSBndCond::m_bcRegion
protected

◆ m_fields

Array<OneD, MultiRegions::ExpListSharedPtr> Nektar::CFSBndCond::m_fields
protected

◆ m_gamma

NekDouble Nektar::CFSBndCond::m_gamma
protected

◆ m_offset

int Nektar::CFSBndCond::m_offset
protected

◆ m_pInf

NekDouble Nektar::CFSBndCond::m_pInf
protected

Definition at line 96 of file CFSBndCond.h.

Referenced by CFSBndCond(), and Nektar::RiemannInvariantBC::v_Apply().

◆ m_rhoInf

NekDouble Nektar::CFSBndCond::m_rhoInf
protected

Definition at line 95 of file CFSBndCond.h.

Referenced by CFSBndCond(), and Nektar::RiemannInvariantBC::v_Apply().

◆ m_session

LibUtilities::SessionReaderSharedPtr Nektar::CFSBndCond::m_session
protected

◆ m_spacedim

int Nektar::CFSBndCond::m_spacedim
protected

◆ m_traceNormals

Array<OneD, Array<OneD, NekDouble> > Nektar::CFSBndCond::m_traceNormals
protected

◆ m_varConv

VariableConverterSharedPtr Nektar::CFSBndCond::m_varConv
protected

◆ m_velInf

Array<OneD, NekDouble> Nektar::CFSBndCond::m_velInf
protected