50 return tag ==
"WallViscous" || tag ==
"WallAdiabatic";
56 return tag ==
"WallAdiabatic";
64 return tag ==
"WallViscous";
67template <
typename ExecSpace,
typename EoSParamType,
typename TData>
70 using MemSpace =
typename ExecSpace::memory_space;
74 const std::vector<std::string> &components)
83 "A compressible wall needs density, one momentum component "
84 "per direction and energy.");
95 static std::unique_ptr<MultiRegions::Operator<TData>>
Instantiate(
97 const std::vector<std::string> &components)
99 return std::make_unique<
133 const unsigned comp)
const override
136 "No boundary storage attached: call SetBndCondPhysOp().");
138 const bool isEnergy = (comp + 1 ==
m_numComp);
142 this->m_bndCondPhysOp->GetBndUserDefined(blk, 0)))
173 const auto numBlocks = this->m_bndCondPhysOp->GetNumBlocks();
175 double sessionTwall = 300.15;
176 m_session->LoadParameter(
"Twall", sessionTwall, sessionTwall);
178 m_Twall.assign(numBlocks, TData(sessionTwall));
180 for (
unsigned blk = 0; blk < numBlocks; ++blk)
182 this->m_bndCondPhysOp->GetBndUserDefinedParam(blk, 0,
"twall",
188 this->m_bndCondPhysOp->GetBndUserDefined(blk, 0)) ||
190 "An isothermal wall needs exactly density, one momentum "
191 "component per direction and energy.");
225 const TData *interior,
const size_t nPts,
226 const size_t compStride)
const override
229 "No boundary storage attached: call SetBndCondPhysOp().");
232 this->m_bndCondPhysOp->GetBndUserDefined(blk, 0)))
237 ImposeIsothermalWallEnergyBlock<ExecSpace>(
239 interior, ext, this->m_opStreamID);
247 "No boundary storage attached: call SetBndCondPhysOp().");
249 const auto numBlocks = this->m_bndCondPhysOp->GetNumBlocks();
250 std::vector<bool> owned(numBlocks,
false);
252 for (
unsigned blk = 0; blk < numBlocks; ++blk)
257 this->m_bndCondPhysOp->GetBndUserDefined(blk, 0));
288 "No boundary storage attached: call SetBndCondPhysOp().");
292 for (
unsigned blk = 0; blk < owned.size(); ++blk)
299 const auto stride = this->m_bndCondPhysOp->GetBlockCompStride(blk);
301 this->m_bndCondPhysOp->UpdateBlockPtr(blk, this->m_opStreamID);
303 ReverseMomentumBlock<ExecSpace>(stride,
m_coordDim, bndPtr,
#define ASSERTL0(condition, msg)
#define ASSERTL1(condition, msg)
Assert Level 1 – Debugging which is used whether in FULLDEBUG or DEBUG compilation mode....
Viscous wall states for the compressible flow solver.
std::vector< LocalRegions::ExpansionSharedPtr > & GetExpVector()
void v_SetBndCondPhysOp() override
Resolve the wall temperature of each region.
void v_ApplyDiffusionExteriorState(const unsigned blk, TData *ext, const TData *interior, const size_t nPts, const size_t compStride) const override
Hold an isothermal wall at Twall, in the diffusion's exterior state only.
void v_Apply() override
Turn the seeded interior state into a no-slip wall state.
static std::string className
BndCondWallCFEOpImpl(const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components)
std::vector< bool > v_GetOwnedBlocks() const override
The blocks this operator owns, i.e. the regions tagged as viscous or adiabatic walls....
bool v_GhostIsReflected() const override
A wall mirrors the interior rather than imposing a target, so what v_Apply() leaves in the storage is...
static std::unique_ptr< MultiRegions::Operator< TData > > Instantiate(const MultiRegions::ExpListSharedPtr &expansionList, const std::vector< std::string > &components)
LibUtilities::SessionReaderSharedPtr m_session
typename ExecSpace::memory_space MemSpace
std::vector< TData > m_Twall
Wall temperature each isothermal region is held at, one per storage block. See v_SetBndCondPhysOp() f...
TData v_BndFluxWeight(const unsigned blk, const unsigned comp) const override
An adiabatic wall carries no heat flux.
bool v_HasDiffusionExteriorState() const override
An isothermal wall acts on the diffusion's exterior state.
std::shared_ptr< SessionReader > SessionReaderSharedPtr
std::shared_ptr< ExpList > ExpListSharedPtr
Shared pointer to an ExpList object.
Collections::Collection GetCollection(MultiRegions::ExpListSharedPtr expansionList, unsigned int block_idx)
bool IsViscousWallTag(const std::string &tag)
Tags this operator claims. Anything else is another operator's business.
void SetUpEquationOfState(LibUtilities::SessionReaderSharedPtr session, IdealGasEoS< TData > &EoS)
bool IsIsothermalWallTag(const std::string &tag)
A plain viscous wall is held at the session temperature Twall. This is the complement of IsAdiabaticW...
bool IsAdiabaticWallTag(const std::string &tag)
An adiabatic wall additionally insulates: no heat flux through it.