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

Wall boundary conditions for viscous compressible flow problems. More...

#include <WallViscousBC.h>

Inheritance diagram for Nektar::WallViscousBC:
[legend]

Static Public Member Functions

static CFSBndCondSharedPtr create (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)
 Creates an instance of this class. More...
 

Static Public Attributes

static std::string classNameViscous
 Name of the class. More...
 
static std::string classNameAdiabatic
 

Protected Member Functions

virtual void v_Apply (Array< OneD, Array< OneD, NekDouble > > &Fwd, Array< OneD, Array< OneD, NekDouble > > &physarray, const NekDouble &time)
 
- Protected Member Functions inherited from 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)
 Constructor. More...
 

Private Member Functions

 WallViscousBC (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)
 
virtual ~WallViscousBC (void)
 

Friends

class MemoryManager< WallViscousBC >
 

Additional Inherited Members

- Public Member Functions inherited from Nektar::CFSBndCond
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 Attributes inherited from Nektar::CFSBndCond
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

Wall boundary conditions for viscous compressible flow problems.

Definition at line 47 of file WallViscousBC.h.

Constructor & Destructor Documentation

◆ WallViscousBC()

Nektar::WallViscousBC::WallViscousBC ( 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 
)
private

Definition at line 54 of file WallViscousBC.cpp.

60  : CFSBndCond(pSession, pFields, pTraceNormals, pSpaceDim, bcRegion, cnt)
61 {
62 }
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.
Definition: CFSBndCond.cpp:47

◆ ~WallViscousBC()

virtual Nektar::WallViscousBC::~WallViscousBC ( void  )
inlineprivatevirtual

Definition at line 85 of file WallViscousBC.h.

85 {};

Member Function Documentation

◆ create()

static CFSBndCondSharedPtr Nektar::WallViscousBC::create ( 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 
)
inlinestatic

Creates an instance of this class.

Definition at line 54 of file WallViscousBC.h.

References Nektar::MemoryManager< DataType >::AllocateSharedPtr(), and CellMLToNektar.cellml_metadata::p.

59  {
61  AllocateSharedPtr(pSession, pFields,
62  pTraceNormals, pSpaceDim, bcRegion, cnt);
63  return p;
64  }
std::shared_ptr< CFSBndCond > CFSBndCondSharedPtr
A shared pointer to a boundary condition object.
Definition: CFSBndCond.h:48
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.

◆ v_Apply()

void Nektar::WallViscousBC::v_Apply ( Array< OneD, Array< OneD, NekDouble > > &  Fwd,
Array< OneD, Array< OneD, NekDouble > > &  physarray,
const NekDouble time 
)
protectedvirtual

Implements Nektar::CFSBndCond.

Definition at line 64 of file WallViscousBC.cpp.

References Nektar::CFSBndCond::m_bcRegion, Nektar::CFSBndCond::m_fields, Nektar::CFSBndCond::m_offset, Nektar::CFSBndCond::m_spacedim, Vmath::Neg(), Vmath::Vcopy(), and Vmath::Zero().

68 {
69  boost::ignore_unused(time);
70 
71  int i;
72  int nVariables = physarray.num_elements();
73 
74  const Array<OneD, const int> &traceBndMap
75  = m_fields[0]->GetTraceBndMap();
76 
77  // Take into account that for PDE based shock capturing, eps = 0 at the
78  // wall. Adjust the physical values of the trace to take user defined
79  // boundaries into account
80  int e, id1, id2, nBCEdgePts, eMax;
81 
82  eMax = m_fields[0]->GetBndCondExpansions()[m_bcRegion]->GetExpSize();
83 
84  for (e = 0; e < eMax; ++e)
85  {
86  nBCEdgePts = m_fields[0]->GetBndCondExpansions()[m_bcRegion]->
87  GetExp(e)->GetTotPoints();
88  id1 = m_fields[0]->GetBndCondExpansions()[m_bcRegion]->
89  GetPhys_Offset(e);
90  id2 = m_fields[0]->GetTrace()->GetPhys_Offset(traceBndMap[m_offset+e]);
91 
92  // Boundary condition for epsilon term.
93  if (nVariables == m_spacedim+3)
94  {
95  Vmath::Zero(nBCEdgePts, &Fwd[nVariables-1][id2], 1);
96  }
97 
98  // V = - Vin
99  for (i = 0; i < m_spacedim; i++)
100  {
101  Vmath::Neg(nBCEdgePts, &Fwd[i+1][id2], 1);
102  }
103 
104  // Copy boundary adjusted values into the boundary expansion
105  for (i = 0; i < nVariables; ++i)
106  {
107  Vmath::Vcopy(nBCEdgePts, &Fwd[i][id2], 1,
108  &(m_fields[i]->GetBndCondExpansions()[m_bcRegion]->
109  UpdatePhys())[id1], 1);
110  }
111  }
112 }
int m_spacedim
Space dimension.
Definition: CFSBndCond.h:89
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array of fields.
Definition: CFSBndCond.h:85
void Neg(int n, T *x, const int incx)
Negate x = -x.
Definition: Vmath.cpp:399
int m_offset
Offset.
Definition: CFSBndCond.h:102
void Zero(int n, T *x, const int incx)
Zero vector.
Definition: Vmath.cpp:376
void Vcopy(int n, const T *x, const int incx, T *y, const int incy)
Definition: Vmath.cpp:1064
int m_bcRegion
Id of the boundary region.
Definition: CFSBndCond.h:100

Friends And Related Function Documentation

◆ MemoryManager< WallViscousBC >

friend class MemoryManager< WallViscousBC >
friend

Definition at line 51 of file WallViscousBC.h.

Member Data Documentation

◆ classNameAdiabatic

std::string Nektar::WallViscousBC::classNameAdiabatic
static
Initial value:
RegisterCreatorFunction("WallAdiabatic",
"Adiabatic wall boundary condition.")

Definition at line 68 of file WallViscousBC.h.

◆ classNameViscous

std::string Nektar::WallViscousBC::classNameViscous
static
Initial value:
RegisterCreatorFunction("WallViscous",
"No-slip (viscous) wall boundary condition.")

Name of the class.

Definition at line 67 of file WallViscousBC.h.