forked from idaholab/moose
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Doco and tests of ConservativeAdvection
Fixes idaholab#11852
- Loading branch information
Showing
20 changed files
with
569 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+26.1 KB
framework/doc/content/media/framework/kernels/conservative_advection_1d_1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+32.1 KB
framework/doc/content/media/framework/kernels/conservative_advection_1d_5.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
test/tests/kernels/conservative_advection/full_upwinding_1D.i
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# ConservativeAdvection with upwinding_type = full | ||
# Apply a velocity = (1, 0, 0) and see a pulse advect to the right | ||
# Note that the pulse diffuses more than with no upwinding, | ||
# but there are no overshoots and undershoots and that the | ||
# center of the pulse at u=0.5 advects with the correct velocity | ||
[Mesh] | ||
type = GeneratedMesh | ||
dim = 1 | ||
nx = 10 | ||
[] | ||
|
||
[Variables] | ||
[./u] | ||
[../] | ||
[] | ||
|
||
[BCs] | ||
[./u_fixed_left] | ||
type = DirichletBC | ||
boundary = left | ||
variable = u | ||
value = 1 | ||
[../] | ||
[] | ||
|
||
[Kernels] | ||
[./udot] | ||
type = MassLumpedTimeDerivative | ||
variable = u | ||
[../] | ||
[./advection] | ||
type = ConservativeAdvection | ||
variable = u | ||
velocity = '1 0 0' | ||
upwinding_type = full | ||
[../] | ||
[] | ||
|
||
[Executioner] | ||
type = Transient | ||
solve_type = LINEAR | ||
dt = 0.1 | ||
end_time = 1 | ||
[] | ||
|
||
[Outputs] | ||
exodus = true | ||
[] |
47 changes: 47 additions & 0 deletions
47
test/tests/kernels/conservative_advection/full_upwinding_2D.i
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# 2D test of advection with full upwinding | ||
# Note there are no overshoots or undershoots | ||
# but there is numerical diffusion. | ||
# The center of the blob advects with the correct velocity | ||
[Mesh] | ||
type = GeneratedMesh | ||
dim = 2 | ||
nx = 40 | ||
ny = 40 | ||
[] | ||
|
||
[Variables] | ||
[./u] | ||
[../] | ||
[] | ||
|
||
[ICs] | ||
[./u_blob] | ||
type = FunctionIC | ||
variable = u | ||
function = 'if(x<0.2,if(y<0.2,1,0),0)' | ||
[../] | ||
[] | ||
|
||
[Kernels] | ||
[./udot] | ||
type = MassLumpedTimeDerivative | ||
variable = u | ||
[../] | ||
[./advection] | ||
type = ConservativeAdvection | ||
variable = u | ||
upwinding_type = full | ||
velocity = '2 1 0' | ||
[../] | ||
[] | ||
|
||
[Executioner] | ||
type = Transient | ||
solve_type = LINEAR | ||
dt = 0.01 | ||
end_time = 0.1 | ||
[] | ||
|
||
[Outputs] | ||
exodus = true | ||
[] |
53 changes: 53 additions & 0 deletions
53
test/tests/kernels/conservative_advection/full_upwinding_jacobian.i
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
# Test of advection with full upwinding | ||
[Mesh] | ||
type = GeneratedMesh | ||
dim = 3 | ||
nx = 3 | ||
ny = 2 | ||
nz = 1 | ||
[] | ||
|
||
[Variables] | ||
[./u] | ||
[../] | ||
[] | ||
|
||
[ICs] | ||
[./u] | ||
type = RandomIC | ||
variable = u | ||
[../] | ||
[] | ||
|
||
[BCs] | ||
[./u_fixed_left] | ||
type = DirichletBC | ||
boundary = left | ||
variable = u | ||
value = 1 | ||
[../] | ||
[] | ||
|
||
[Kernels] | ||
[./advection] | ||
type = ConservativeAdvection | ||
variable = u | ||
upwinding_type = full | ||
velocity = '2 -1.1 1.23' | ||
[../] | ||
[] | ||
|
||
[Preconditioning] | ||
[./andy] | ||
type = SMP | ||
[../] | ||
[] | ||
|
||
[Executioner] | ||
type = Transient | ||
solve_type = NEWTON | ||
petsc_options_iname = '-snes_type' | ||
petsc_options_value = 'test' | ||
dt = 2 | ||
end_time = 2 | ||
[] |
Binary file added
BIN
+23.2 KB
test/tests/kernels/conservative_advection/gold/full_upwinding_1D_out.e
Binary file not shown.
Binary file added
BIN
+232 KB
test/tests/kernels/conservative_advection/gold/full_upwinding_2D_out.e
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
12 changes: 12 additions & 0 deletions
12
test/tests/kernels/conservative_advection/gold/none_in_none_out_out.csv
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
time,total_mass | ||
0,0 | ||
1,25 | ||
2,25 | ||
3,25 | ||
4,25 | ||
5,25 | ||
6,25 | ||
7,25 | ||
8,25 | ||
9,25 | ||
10,25 |
45 changes: 45 additions & 0 deletions
45
test/tests/kernels/conservative_advection/no_upwinding_1D.i
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
# ConservativeAdvection with upwinding_type = None | ||
# Apply a velocity = (1, 0, 0) and see a pulse advect to the right | ||
# Note there are overshoots and undershoots | ||
[Mesh] | ||
type = GeneratedMesh | ||
dim = 1 | ||
nx = 10 | ||
[] | ||
|
||
[Variables] | ||
[./u] | ||
[../] | ||
[] | ||
|
||
[BCs] | ||
[./u_fixed_left] | ||
type = DirichletBC | ||
boundary = left | ||
variable = u | ||
value = 1 | ||
[../] | ||
[] | ||
|
||
[Kernels] | ||
[./udot] | ||
type = TimeDerivative | ||
variable = u | ||
[../] | ||
[./advection] | ||
type = ConservativeAdvection | ||
variable = u | ||
velocity = '1 0 0' | ||
[../] | ||
[] | ||
|
||
[Executioner] | ||
type = Transient | ||
solve_type = LINEAR | ||
dt = 0.1 | ||
end_time = 1 | ||
[] | ||
|
||
[Outputs] | ||
exodus = true | ||
[] |
Oops, something went wrong.