Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
S
SWE
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Gaurav Kukreja
SWE
Commits
29bafe20
Commit
29bafe20
authored
May 02, 2013
by
breuera
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed boundary conditions for dimensional splitting.
parent
c8bb78ac
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
51 additions
and
9 deletions
+51
-9
SWE_Block.cpp
src/blocks/SWE_Block.cpp
+51
-9
No files found.
src/blocks/SWE_Block.cpp
View file @
29bafe20
...
@@ -295,6 +295,13 @@ void SWE_Block::setBoundaryBathymetry()
...
@@ -295,6 +295,13 @@ void SWE_Block::setBoundaryBathymetry()
}
}
}
}
// set corner values
b
[
0
][
0
]
=
b
[
1
][
1
];
b
[
0
][
ny
+
1
]
=
b
[
1
][
ny
];
b
[
nx
+
1
][
0
]
=
b
[
nx
][
1
];
b
[
nx
+
1
][
ny
+
1
]
=
b
[
nx
][
ny
];
// synchronize after an external update of the bathymetry
// synchronize after an external update of the bathymetry
synchBathymetryAfterWrite
();
synchBathymetryAfterWrite
();
}
}
...
@@ -470,7 +477,7 @@ void SWE_Block::setBoundaryConditions() {
...
@@ -470,7 +477,7 @@ void SWE_Block::setBoundaryConditions() {
// CONNECT boundary conditions are set in the calling function setGhostLayer
// CONNECT boundary conditions are set in the calling function setGhostLayer
// PASSIVE boundary conditions need to be set by the component using SWE_Block
// PASSIVE boundary conditions need to be set by the component using SWE_Block
//
Linker Rand
//
left boundary
switch
(
boundary
[
BND_LEFT
])
{
switch
(
boundary
[
BND_LEFT
])
{
case
WALL
:
case
WALL
:
{
{
...
@@ -498,7 +505,7 @@ void SWE_Block::setBoundaryConditions() {
...
@@ -498,7 +505,7 @@ void SWE_Block::setBoundaryConditions() {
break
;
break
;
};
};
//
Rechter Rand
//
right boundary
switch
(
boundary
[
BND_RIGHT
])
{
switch
(
boundary
[
BND_RIGHT
])
{
case
WALL
:
case
WALL
:
{
{
...
@@ -526,7 +533,7 @@ void SWE_Block::setBoundaryConditions() {
...
@@ -526,7 +533,7 @@ void SWE_Block::setBoundaryConditions() {
break
;
break
;
};
};
//
Unterer Rand
//
bottom boundary
switch
(
boundary
[
BND_BOTTOM
])
{
switch
(
boundary
[
BND_BOTTOM
])
{
case
WALL
:
case
WALL
:
{
{
...
@@ -554,7 +561,7 @@ void SWE_Block::setBoundaryConditions() {
...
@@ -554,7 +561,7 @@ void SWE_Block::setBoundaryConditions() {
break
;
break
;
};
};
//
Oberer Rand
//
top boundary
switch
(
boundary
[
BND_TOP
])
{
switch
(
boundary
[
BND_TOP
])
{
case
WALL
:
case
WALL
:
{
{
...
@@ -582,12 +589,47 @@ void SWE_Block::setBoundaryConditions() {
...
@@ -582,12 +589,47 @@ void SWE_Block::setBoundaryConditions() {
break
;
break
;
};
};
// only required for visualisation: set values in corner ghost cells
/*
h
[
0
][
0
]
=
h
[
1
][
1
];
* Set values in corner ghost cells. Required for dimensional splitting and visualizuation.
h
[
0
][
ny
+
1
]
=
h
[
1
][
ny
];
* The quantities in the corner ghost cells are chosen to generate a zero Riemann solutions
h
[
nx
+
1
][
0
]
=
h
[
nx
][
1
];
* (steady state) with the neighboring cells. For the lower left corner (0,0) using
h
[
nx
+
1
][
ny
+
1
]
=
h
[
nx
][
ny
];
* the values of (1,1) generates a steady state (zero) Riemann problem for (0,0) - (0,1) and
* (0,0) - (1,0) for both outflow and reflecting boundary conditions.
*
* Remark: Unsplit methods don't need corner values.
*
* Sketch (reflecting boundary conditions, lower left corner):
* <pre>
* **************************
* * _ _ * _ _ *
* Ghost * | h | * | h | *
* cell ------> * | -hu | * | hu | * <------ Cell (1,1) inside the domain
* (0,1) * |_ hv _| * |_ hv _| *
* * * *
* **************************
* * _ _ * _ _ *
* Corner Ghost * | h | * | h | *
* cell ------> * | hu | * | hu | * <----- Ghost cell (1,0)
* (0,0) * |_ hv _| * |_-hv _| *
* * * *
* **************************
* </pre>
*/
h
[
0
][
0
]
=
h
[
1
][
1
];
hu
[
0
][
0
]
=
hu
[
1
][
1
];
hv
[
0
][
0
]
=
hv
[
1
][
1
];
h
[
0
][
ny
+
1
]
=
h
[
1
][
ny
];
hu
[
0
][
ny
+
1
]
=
hu
[
1
][
ny
];
hv
[
0
][
ny
+
1
]
=
hv
[
1
][
ny
];
h
[
nx
+
1
][
0
]
=
h
[
nx
][
1
];
hu
[
nx
+
1
][
0
]
=
hu
[
nx
][
1
];
hv
[
nx
+
1
][
0
]
=
hv
[
nx
][
1
];
h
[
nx
+
1
][
ny
+
1
]
=
h
[
nx
][
ny
];
hu
[
nx
+
1
][
ny
+
1
]
=
hu
[
nx
][
ny
];
hv
[
nx
+
1
][
ny
+
1
]
=
hv
[
nx
][
ny
];
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment