mirror of
https://git.gfz-potsdam.de/naaice/tug.git
synced 2025-12-13 09:28:23 +01:00
feat: add boundary conditons for closed cases in independent functions
This commit is contained in:
parent
7cf4ad4772
commit
049fc319db
40
src/FTCS.cpp
40
src/FTCS.cpp
@ -62,9 +62,14 @@ double calcHorizontalChangeLeftBoundaryConstant(Grid grid, Boundary bc, int row,
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
double calcHorizontalChangeLeftBoundaryClosed() {
|
||||
return 0;
|
||||
// TODO: REVIEW
|
||||
double calcHorizontalChangeLeftBoundaryClosed(Grid grid, int row, int col) {
|
||||
|
||||
double result =
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
double calcHorizontalChangeRightBoundaryClosed() {
|
||||
return 0;
|
||||
// TODO: REVIEW
|
||||
double calcHorizontalChangeRightBoundaryClosed(Grid grid, int row, int col) {
|
||||
|
||||
double result =
|
||||
- (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;
|
||||
}
|
||||
|
||||
// TODO: REVIEW
|
||||
double calcVerticalChangeTopBoundaryClosed(Grid grid, int row, int col) {
|
||||
|
||||
double result =
|
||||
calcAlphaIntercell(grid.getAlphaY()(row+1, col), grid.getConcentrations()(row, col))
|
||||
* (grid.getConcentrations()(row+1, col) - grid.getConcentrations()(row, col));
|
||||
|
||||
double calcVerticalChangeTopBoundaryClosed() {
|
||||
return 0;
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@ -125,9 +140,14 @@ double calcVerticalChangeBottomBoundaryConstant(Grid grid, Boundary bc, int row,
|
||||
return result;
|
||||
}
|
||||
|
||||
// TODO: REVIEW
|
||||
double calcVerticalChangeBottomBoundaryClosed(Grid grid, int row, int col) {
|
||||
|
||||
double calcVerticalChangeBottomBoundaryClosed() {
|
||||
return 0;
|
||||
double result =
|
||||
- (calcAlphaIntercell(grid.getAlphaY()(row, col), grid.getAlphaY()(row-1, col))
|
||||
* (grid.getConcentrations()(row, col) - grid.getConcentrations()(row-1, col)));
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user