forked from idaholab/TMAP8
-
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.
Showing
4 changed files
with
141 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# val-1e | ||
|
||
# Diffusion in a composite layer | ||
Documentation is missing! | ||
|
||
### Notes | ||
|
||
The trapping test features some oscillations in the solution for whatever | ||
reason. In order for the oscillations to not take over the simulation, it seems | ||
that the ratio of the **inverse of the Fourier number** must be kept | ||
sufficiently high, e.g. `h^2 / (D * dt)`. Included in this directory are three | ||
`png` files that show the permeation for different `h` and `dt` values. They are | ||
summarized below: | ||
|
||
- `nx-80.png`: `nx = 80` and `dt = .0625` | ||
- `nx-40.png`: `nx = 40` and `dt = .25` | ||
- `nx-20.png`: `nx = 20` and `dt = 1` | ||
|
||
The oscillations in the permeation graph go away with increasing fineness in the | ||
mesh and in `dt`. | ||
|
||
!bibtex bibliography |
Binary file not shown.
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,11 @@ | ||
[Tests] | ||
design = 'Diffusion.md TimeDerivative.md DirichletBC.md' | ||
issues = '#12' | ||
[exo] | ||
type = Exodiff | ||
input = val-1e.i | ||
exodiff = val-1e_out.e | ||
cli_args = 'Executioner/dt=1 Mesh/nx=198' | ||
requirement = 'The system shall be able to model transient diffusion through a composite slab with a constant concentration boundary condition as the species source.' | ||
[] | ||
[] |
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,108 @@ | ||
[Mesh] | ||
type = GeneratedMesh | ||
dim = 1 | ||
nx = 1000 | ||
xmax = 99e-6 #========================= | ||
[] | ||
|
||
[Variables] | ||
[./u] | ||
[../] | ||
[] | ||
|
||
[AuxVariables] | ||
[./flux_x] | ||
order = FIRST | ||
family = MONOMIAL | ||
[../] | ||
[] | ||
|
||
[Functions] | ||
[diffusivity_value] | ||
type = ParsedFunction | ||
value = 'if(x<33e-6, 1.274e-7, 2.622e-11)' #========================= | ||
[] | ||
[] | ||
|
||
[Kernels] | ||
[./diff] | ||
type = Diffusion | ||
variable = u | ||
[../] | ||
[./time] | ||
type = TimeDerivative | ||
variable = u | ||
[../] | ||
[] | ||
|
||
[AuxKernels] | ||
[./flux_x] | ||
type = DiffusionFluxAux | ||
diffusivity = diffusivity_value | ||
variable = flux_x | ||
diffusion_variable = u | ||
component = x | ||
[../] | ||
[] | ||
|
||
[BCs] | ||
[./left] | ||
type = DirichletBC | ||
variable = u | ||
boundary = left | ||
value = 3.0537 #========================= | ||
[../] | ||
[./right] | ||
type = DirichletBC | ||
variable = u | ||
boundary = right | ||
value = 0 | ||
[../] | ||
[] | ||
|
||
[VectorPostprocessors] | ||
[line] | ||
type = LineValueSampler | ||
start_point = '0 0 0' | ||
end_point = '99e-6 0 0' #========================= | ||
num_points = 199 | ||
sort_by = 'x' | ||
variable = u | ||
[] | ||
[] | ||
|
||
[Postprocessors] | ||
[conc_point1] | ||
type = PointValue | ||
variable = u | ||
point = '40.5e-6 0 0' #========================= | ||
[] | ||
[flux_point2] | ||
type = PointValue | ||
variable = flux_x | ||
point = '40.5e-6 0 0' #========================= | ||
[] | ||
[] | ||
|
||
[Executioner] | ||
type = Transient | ||
end_time = 50 | ||
dt = .1 | ||
solve_type = NEWTON | ||
petsc_options_iname = '-pc_type -pc_hypre_type' | ||
petsc_options_value = 'hypre boomeramg' | ||
l_tol = 1e-8 | ||
scheme = 'crank-nicolson' | ||
nl_abs_tol = 1e-14 #========================= | ||
automatic_scaling = true | ||
compute_scaling_once = true | ||
[] | ||
|
||
[Outputs] | ||
exodus = true | ||
[csv] | ||
type = CSV | ||
interval = 10 | ||
[] | ||
perf_graph = true | ||
[] |