Permalink
Browse files

Merge pull request #12661 from tophmatthews/test_fixes_12633

Loosened test tolerances and added tests for diffusion in Misc
  • Loading branch information...
lindsayad committed Jan 9, 2019
2 parents 0ae60f0 + aab0200 commit cc9c7e9a4c8ea5a1e0c16e33106a617e74da41ea
Showing with 226 additions and 201 deletions.
  1. +0 −54 modules/combined/test/tests/coef_diffusion/coef_diffusion_test.i
  2. +0 −62 modules/combined/test/tests/coef_diffusion/func_diffusion_test.i
  3. BIN modules/combined/test/tests/coef_diffusion/gold/out.e
  4. BIN modules/combined/test/tests/coef_diffusion/square.e
  5. +0 −15 modules/combined/test/tests/coef_diffusion/tests
  6. +2 −0 modules/heat_conduction/test/tests/heat_source_bar/tests
  7. +4 −0 modules/heat_conduction/test/tests/verify_against_analytical/tests
  8. +5 −6 modules/misc/doc/content/source/kernels/CoefDiffusion.md
  9. +81 −0 modules/misc/test/tests/kernels/diffusion/1D_transient.i
  10. +86 −0 modules/misc/test/tests/kernels/diffusion/2d_steady_state_final_prob.i
  11. +7 −7 modules/misc/test/tests/kernels/{ad_mat_diffusion → diffusion}/ad_1D_transient.i
  12. +2 −0 modules/misc/test/tests/kernels/{ad_mat_diffusion → diffusion}/ad_2d_steady_state_final_prob.i
  13. BIN modules/misc/test/tests/kernels/diffusion/gold/1D_transient_out.e
  14. BIN modules/misc/test/tests/kernels/diffusion/gold/2d_steady_state_final_prob_out.e
  15. +1 −0 modules/misc/test/tests/kernels/diffusion/gold/ad_1D_transient_out.e
  16. +1 −0 modules/misc/test/tests/kernels/diffusion/gold/ad_2d_steady_state_final_prob_out.e
  17. +35 −0 modules/misc/test/tests/kernels/diffusion/tests
  18. BIN modules/misc/test/tests/kernels/simple_diffusion/gold/simple_diffusion_out.e
  19. +0 −50 modules/misc/test/tests/kernels/simple_diffusion/simple_diffusion.i
  20. +0 −7 modules/misc/test/tests/kernels/simple_diffusion/tests
  21. +2 −0 modules/misc/test/tests/kernels/thermo_diffusion/tests

This file was deleted.

Oops, something went wrong.

This file was deleted.

Oops, something went wrong.
Binary file not shown.
Binary file not shown.

This file was deleted.

Oops, something went wrong.
@@ -3,6 +3,7 @@
type = 'Exodiff'
input = 'heat_source_bar.i'
exodiff = 'heat_source_bar_out.e'
abs_zero = 1e-7
requirement = 'MOOSE shall reproduce an analytical solution of a heat source in a 1D ceramic bar'
design = "\HeatSource.md"
issues = "#2582"
@@ -11,6 +12,7 @@
type = 'Exodiff'
input = 'ad_heat_source_bar.i'
exodiff = 'ad_heat_source_bar_out.e'
abs_zero = 1e-7
requirement = 'MOOSE shall reproduce an analytical solution of a heat source in a 1D ceramic bar using AD kernels'
design = "\ADMatHeatSource"
issues = "#12633"
@@ -3,6 +3,7 @@
type = 'Exodiff'
input = '1D_transient.i'
exodiff = '1D_transient_out.e'
abs_zero = 1e-8
requirement = "Heat conduction shall match the answer from an analytical solution"
design = "HeatConduction.md"
issues = "#5975"
@@ -11,6 +12,7 @@
type = 'Exodiff'
input = 'ad_1D_transient.i'
exodiff = 'ad_1D_transient_out.e'
abs_zero = 1e-8
requirement = "Heat conduction from an AD kernel shall get the same answer as a traditional kernel"
design = "jacobian_definition.md"
issues = "#5658 #12633"
@@ -20,6 +22,7 @@
type = 'Exodiff'
input = '2d_steady_state_final_prob.i'
exodiff = '2d_steady_state_final_prob_out.e'
abs_zero = 1e-8
requirement = "Heat conduction shall match the answer from an analytical solution"
design = "HeatConduction.md"
issues = "#8194"
@@ -28,6 +31,7 @@
type = 'Exodiff'
input = 'ad_2d_steady_state_final_prob.i'
exodiff = 'ad_2d_steady_state_final_prob_out.e'
abs_zero = 1e-8
requirement = "Heat conduction from an AD kernel shall get the same answer as a traditional kernel"
design = "jacobian_definition.md"
issues = "#5658 #12633"
@@ -2,12 +2,11 @@

# CoefDiffusion

!alert construction title=Undocumented Class
The CoefDiffusion has not been documented. The content contained on this page
includes the basic documentation associated with a MooseObject; however, what is contained is
ultimately determined by what is necessary to make the documentation clear for users.

!syntax description /Kernels/CoefDiffusion
`CoefDiffusion` implements the term
\begin{equation}
\nabla D(a,b,\dots) \nabla c,
\end{equation}
where the diffusion coefficient $D$ (`diffusivity`) is provided by a function or constant.

!syntax parameters /Kernels/CoefDiffusion

@@ -0,0 +1,81 @@
# This test solves a 1D transient heat equation
# The error is caclulated by comparing to the analytical solution
# The problem setup and analytical solution are taken from "Advanced Engineering
# Mathematics, 10th edition" by Erwin Kreyszig.
# http://www.amazon.com/Advanced-Engineering-Mathematics-Erwin-Kreyszig/dp/0470458364
# It is Example 1 in section 12.6 on page 561

[Mesh]
type = GeneratedMesh
dim = 1
nx = 160
xmax = 80
[]

[Variables]
[./T]
[../]
[]

[ICs]
[./T_IC]
type = FunctionIC
variable = T
function = '100*sin(pi*x/80)'
[../]
[]

[Kernels]
[./diff]
type = CoefDiffusion
variable = T
coef = 0.9
function = 0.05
[../]
[./dt]
type = CoefTimeDerivative
variable = T
Coefficient = 0.82064
[../]
[]

[BCs]
[./left]
type = DirichletBC
variable = T
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = T
boundary = right
value = 0
[../]
[]

[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]

[Executioner]
type = Transient
dt = 1e-2
end_time = 1
[]

[Postprocessors]
[./error]
type = NodalL2Error
function = '100*sin(pi*x/80)*exp(-0.95/(0.092*8.92)*pi^2/80^2*t)'
variable = T
outputs = console
[../]
[]

[Outputs]
exodus = true
[]
@@ -0,0 +1,86 @@
# This test solves a 2D steady state heat equation
# The error is found by comparing to the analytical solution

# Note that the thermal conductivity, specific heat, and density in this problem
# Are set to 1, and need to be changed to the constants of the material being
# Analyzed

[Mesh]
type = GeneratedMesh
dim = 2
nx = 30
ny = 30
xmax = 2
ymax = 2
[]

[Variables]
[./T]
[../]
[]

[Kernels]
[./diff]
type = CoefDiffusion
variable = T
coef = 0.9
function = 0.05
[../]
[]

[BCs]
[./left]
type = DirichletBC
variable = T
boundary = left
value = 0
[../]
[./right]
type = DirichletBC
variable = T
boundary = right
value = 0
[../]
[./bottom]
type = DirichletBC
variable = T
boundary = bottom
value = 0
[../]
[./top]
type = FunctionDirichletBC
variable = T
boundary = top
function = '10*sin(pi*x*0.5)'
[../]
[]

[Postprocessors]
[./nodal_error]
type = NodalL2Error
function = '10/(sinh(pi))*sin(pi*x*0.5)*sinh(pi*y*0.5)'
variable = T
outputs = console
[../]
[./elemental_error]
type = ElementL2Error
function = '10/(sinh(pi))*sin(pi*x*0.5)*sinh(pi*y*0.5)'
variable = T
outputs = console
[../]
[]

[Preconditioning]
[./full]
type = SMP
full = true
[../]
[]

[Executioner]
type = Steady
[]

[Outputs]
exodus = true
[]
Oops, something went wrong.

0 comments on commit cc9c7e9

Please sign in to comment.