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...
 
void ApplyBwdWeight ()
 Apply the Weight of 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 Array< OneD, Array< OneD, NekDouble > > &pGridVelocity, 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
 
virtual void v_ApplyBwdWeight ()
 

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...
 
Array< OneD, Array< OneD, NekDouble > > m_gridVelocityTrace
 Grid Velocity. More...
 
int m_spacedim
 Space dimension. More...
 
VariableConverterSharedPtr m_varConv
 Auxiliary object to convert variables. More...
 
NekDouble m_diffusionAveWeight
 Weight for average calculation of diffusion term. More...
 
NekDouble m_gamma
 Parameters of the flow. More...
 
NekDouble m_rhoInf
 
NekDouble m_pInf
 
NekDouble m_pOut
 
Array< OneD, NekDoublem_velInf
 
NekDouble m_angVel
 
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.

74 {
75 }

◆ CFSBndCond()

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

Constructor.

Definition at line 47 of file CFSBndCond.cpp.

53 : m_session(pSession), m_fields(pFields), m_traceNormals(pTraceNormals),
54 m_gridVelocityTrace(pGridVelocity), m_spacedim(pSpaceDim),
55 m_bcRegion(bcRegion), m_offset(cnt)
56{
57 m_velInf = Array<OneD, NekDouble>(m_spacedim, 0.0);
58 m_session->LoadParameter("Gamma", m_gamma, 1.4);
59 m_session->LoadParameter("rhoInf", m_rhoInf, 1.225);
60 m_session->LoadParameter("pInf", m_pInf, 101325);
61 m_session->LoadParameter("uInf", m_velInf[0], 0.1);
62 if (m_spacedim >= 2)
63 {
64 m_session->LoadParameter("vInf", m_velInf[1], 0.0);
65 }
66 if (m_spacedim == 3)
67 {
68 m_session->LoadParameter("wInf", m_velInf[2], 0.0);
69 }
70
71 // Create auxiliary object to convert variables
74
76
77 // Load parameter for the wall rotational BC
78 // @TODO: Move LoadParameter in to WallRotationalBC.cpp
79 m_session->LoadParameter("AngVel", m_angVel, 0);
80}
NekDouble m_rhoInf
Definition: CFSBndCond.h:106
NekDouble m_diffusionAveWeight
Weight for average calculation of diffusion term.
Definition: CFSBndCond.h:102
LibUtilities::SessionReaderSharedPtr m_session
Session reader.
Definition: CFSBndCond.h:90
NekDouble m_pInf
Definition: CFSBndCond.h:107
int m_spacedim
Space dimension.
Definition: CFSBndCond.h:98
Array< OneD, Array< OneD, NekDouble > > m_gridVelocityTrace
Grid Velocity.
Definition: CFSBndCond.h:96
Array< OneD, Array< OneD, NekDouble > > m_traceNormals
Trace normals.
Definition: CFSBndCond.h:94
Array< OneD, NekDouble > m_velInf
Definition: CFSBndCond.h:109
NekDouble m_gamma
Parameters of the flow.
Definition: CFSBndCond.h:105
int m_bcRegion
Id of the boundary region.
Definition: CFSBndCond.h:113
VariableConverterSharedPtr m_varConv
Auxiliary object to convert variables.
Definition: CFSBndCond.h:100
int m_offset
Offset.
Definition: CFSBndCond.h:115
Array< OneD, MultiRegions::ExpListSharedPtr > m_fields
Array of fields.
Definition: CFSBndCond.h:92
NekDouble m_angVel
Definition: CFSBndCond.h:110
static std::shared_ptr< DataType > AllocateSharedPtr(const Args &...args)
Allocate a shared pointer from the memory pool.

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

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 89 of file CFSBndCond.cpp.

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

References v_Apply().

◆ ApplyBwdWeight()

void Nektar::CFSBndCond::ApplyBwdWeight ( )
inline

Apply the Weight of boundary condition.

Definition at line 83 of file CFSBndCond.h.

84 {
86 }
virtual void v_ApplyBwdWeight()
Definition: CFSBndCond.cpp:103

References v_ApplyBwdWeight().

◆ 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

◆ v_ApplyBwdWeight()

void Nektar::CFSBndCond::v_ApplyBwdWeight ( )
protectedvirtual

@ brief Newly added bc should specify this virtual function if the Bwd/value in m_bndCondExpansions is the target value like Direchlet bc weight should be 1.0. if some average Fwd and Bwd/value in m_bndCondExpansions is the target value like WallViscousBC weight should be 0.5.

Definition at line 103 of file CFSBndCond.cpp.

104{
105 size_t nVariables = m_fields.size();
106 for (int i = 0; i < nVariables; ++i)
107 {
108 m_fields[i]->SetBndCondBwdWeight(m_bcRegion, m_diffusionAveWeight);
109 }
110}

References m_bcRegion, m_diffusionAveWeight, and m_fields.

Referenced by ApplyBwdWeight().

Member Data Documentation

◆ m_angVel

NekDouble Nektar::CFSBndCond::m_angVel
protected

Definition at line 110 of file CFSBndCond.h.

Referenced by CFSBndCond(), and Nektar::WallRotationalBC::WallRotationalBC().

◆ m_bcRegion

int Nektar::CFSBndCond::m_bcRegion
protected

◆ m_diffusionAveWeight

NekDouble Nektar::CFSBndCond::m_diffusionAveWeight
protected

◆ m_fields

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

◆ m_gamma

NekDouble Nektar::CFSBndCond::m_gamma
protected

◆ m_gridVelocityTrace

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

◆ m_offset

int Nektar::CFSBndCond::m_offset
protected

◆ m_pInf

NekDouble Nektar::CFSBndCond::m_pInf
protected

Definition at line 107 of file CFSBndCond.h.

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

◆ m_pOut

NekDouble Nektar::CFSBndCond::m_pOut
protected

Definition at line 108 of file CFSBndCond.h.

◆ m_rhoInf

NekDouble Nektar::CFSBndCond::m_rhoInf
protected

Definition at line 106 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