Nektar++
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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:
Inheritance graph
[legend]
Collaboration diagram for Nektar::WallViscousBC:
Collaboration graph
[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::ExpListSharedPtr
m_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 48 of file WallViscousBC.h.

Constructor & Destructor Documentation

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 53 of file WallViscousBC.cpp.

59  : CFSBndCond(pSession, pFields, pTraceNormals, pSpaceDim, bcRegion, cnt)
60 {
61 }
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:51
virtual Nektar::WallViscousBC::~WallViscousBC ( void  )
inlineprivatevirtual

Definition at line 86 of file WallViscousBC.h.

86 {};

Member Function Documentation

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 55 of file WallViscousBC.h.

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

60  {
62  AllocateSharedPtr(pSession, pFields,
63  pTraceNormals, pSpaceDim, bcRegion, cnt);
64  return p;
65  }
static boost::shared_ptr< DataType > AllocateSharedPtr()
Allocate a shared pointer from the memory pool.
boost::shared_ptr< CFSBndCond > CFSBndCondSharedPtr
A shared pointer to a boundary condition object.
Definition: CFSBndCond.h:49
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 63 of file WallViscousBC.cpp.

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

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

Friends And Related Function Documentation

friend class MemoryManager< WallViscousBC >
friend

Definition at line 52 of file WallViscousBC.h.

Member Data Documentation

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

Definition at line 69 of file WallViscousBC.h.

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

Name of the class.

Definition at line 68 of file WallViscousBC.h.