From 6d68dd8544c1d2568447b735824ad19852671e20 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 | 2 ++ 2 files changed, 26 insertions(+) diff --git a/src/wallBC.cpp b/src/wallBC.cpp index ce5a5e0e7..c7dbb966c 100644 --- a/src/wallBC.cpp +++ b/src/wallBC.cpp @@ -236,6 +236,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 elementIndexingData &elem_index_data, ParGridFunction *Up, ParGridFunction *gradUp, const boundaryFaceIntegrationData &boundary_face_data, const int &maxIntPoints, const int &maxDofs) { diff --git a/src/wallBC.hpp b/src/wallBC.hpp index 4f30870ea..e0664d3a3 100644 --- a/src/wallBC.hpp +++ b/src/wallBC.hpp @@ -90,8 +90,10 @@ class WallBC : public BoundaryCondition { const boundaryFaceIntegrationData &boundary_face_data, const int &maxIntPoints, bool axisym); ~WallBC(); + void computeBdrFlux(Vector &normal, Vector &stateIn, DenseMatrix &gradState, double radius, Vector transip, double delta, Vector &bdrFlux); + void computeBdrPrimitiveStateForGradient(const Vector &primIn, Vector &primBC) const override; virtual void initBCs();