Skip to content

Commit

Permalink
Towards #198 --- Add primitive BC for isothermal wall
Browse files Browse the repository at this point in the history
  • Loading branch information
trevilo committed May 15, 2023
1 parent d9a1949 commit 6d68dd8
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 0 deletions.
24 changes: 24 additions & 0 deletions src/wallBC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 2 additions & 0 deletions src/wallBC.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down

0 comments on commit 6d68dd8

Please sign in to comment.