feat: add boundary conditons for closed cases in independent functions

This commit is contained in:
Hannes Signer 2023-07-26 22:17:37 +02:00
parent 7cf4ad4772
commit 049fc319db

View File

@ -62,9 +62,14 @@ double calcHorizontalChangeLeftBoundaryConstant(Grid grid, Boundary bc, int row,
return result; return result;
} }
// TODO: REVIEW
double calcHorizontalChangeLeftBoundaryClosed(Grid grid, int row, int col) {
double calcHorizontalChangeLeftBoundaryClosed() { double result =
return 0; calcAlphaIntercell(grid.getAlphaX()(row, col+1), grid.getAlphaX()(row, col))
* (grid.getConcentrations()(row, col+1) - grid.getConcentrations()(row, col));
return result;
} }
@ -83,9 +88,14 @@ double calcHorizontalChangeRightBoundaryConstant(Grid grid, Boundary bc, int row
return result; return result;
} }
// TODO: REVIEW
double calcHorizontalChangeRightBoundaryClosed(Grid grid, int row, int col) {
double calcHorizontalChangeRightBoundaryClosed() { double result =
return 0; - (calcAlphaIntercell(grid.getAlphaX()(row, col-1), grid.getAlphaX()(row, col))
* (grid.getConcentrations()(row, col) - grid.getConcentrations()(row, col-1)));
return result;
} }
@ -104,9 +114,14 @@ double calcVerticalChangeTopBoundaryConstant(Grid grid, Boundary bc, int row, in
return result; return result;
} }
// TODO: REVIEW
double calcVerticalChangeTopBoundaryClosed(Grid grid, int row, int col) {
double calcVerticalChangeTopBoundaryClosed() { double result =
return 0; calcAlphaIntercell(grid.getAlphaY()(row+1, col), grid.getConcentrations()(row, col))
* (grid.getConcentrations()(row+1, col) - grid.getConcentrations()(row, col));
return result;
} }
@ -125,9 +140,14 @@ double calcVerticalChangeBottomBoundaryConstant(Grid grid, Boundary bc, int row,
return result; return result;
} }
// TODO: REVIEW
double calcVerticalChangeBottomBoundaryClosed(Grid grid, int row, int col) {
double calcVerticalChangeBottomBoundaryClosed() { double result =
return 0; - (calcAlphaIntercell(grid.getAlphaY()(row, col), grid.getAlphaY()(row-1, col))
* (grid.getConcentrations()(row, col) - grid.getConcentrations()(row-1, col)));
return result;
} }