diff --git a/doc/content/verification/val-1e.md b/doc/content/verification/val-1e.md new file mode 100644 index 00000000..1d255c4c --- /dev/null +++ b/doc/content/verification/val-1e.md @@ -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 diff --git a/test/tests/val-1e/gold/val-1e_out.e b/test/tests/val-1e/gold/val-1e_out.e new file mode 100644 index 00000000..6236e0d1 Binary files /dev/null and b/test/tests/val-1e/gold/val-1e_out.e differ diff --git a/test/tests/val-1e/tests b/test/tests/val-1e/tests new file mode 100644 index 00000000..d7e48649 --- /dev/null +++ b/test/tests/val-1e/tests @@ -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.' + [] +[] diff --git a/test/tests/val-1e/val-1e.i b/test/tests/val-1e/val-1e.i new file mode 100644 index 00000000..dfaa511a --- /dev/null +++ b/test/tests/val-1e/val-1e.i @@ -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 +[]