From 7ae03841a7608ace6d7b0bfb8ca1df83511ef14b Mon Sep 17 00:00:00 2001 From: "Todd A. Oliver" Date: Tue, 21 Feb 2023 19:02:41 -0600 Subject: [PATCH] Towards #198 --- Add primitive BC for isothermal wall --- src/wallBC.cpp | 24 ++++++++++++++++++++++++ src/wallBC.hpp | 1 + 2 files changed, 25 insertions(+) diff --git a/src/wallBC.cpp b/src/wallBC.cpp index 13938e0f6..60467e9f2 100644 --- a/src/wallBC.cpp +++ b/src/wallBC.cpp @@ -208,6 +208,30 @@ void WallBC::computeBdrFlux(Vector &normal, Vector &stateIn, DenseMatrix &gradSt } } +void WallBC::computeBdrPrimitiveStateForGradient(const Vector &primIn, Vector &primBC) const { + primBC = primIn; + + switch (wallType_) { + case INV: + // TODO(trevilo): fix + break; + case VISC_ADIAB: + // TODO(trevilo): fix + break; + case VISC_ISOTH: + // no-slip + for (int i = 0; i < nvel_; i++) { + primBC[1 + i] = 0.0; + } + // isothermal + primBC[nvel_ + 1] = wallTemp_; + break; + case VISC_GNRL: + // TODO(trevilo): fix + break; + } +} + void WallBC::integrationBC(Vector &y, const Vector &x, const Array &nodesIDs, const Array &posDofIds, ParGridFunction *Up, ParGridFunction *gradUp, Vector &shapesBC, Vector &normalsWBC, Array &intPointsElIDBC, const int &maxIntPoints, const int &maxDofs) { diff --git a/src/wallBC.hpp b/src/wallBC.hpp index d1cc5f62f..4e83ead0f 100644 --- a/src/wallBC.hpp +++ b/src/wallBC.hpp @@ -78,6 +78,7 @@ class WallBC : public BoundaryCondition { ~WallBC(); void computeBdrFlux(Vector &normal, Vector &stateIn, DenseMatrix &gradState, double radius, Vector &bdrFlux); + void computeBdrPrimitiveStateForGradient(const Vector &primIn, Vector &primBC) const override; virtual void initBCs();