diff --git a/Makefile b/Makefile index 3226049f..1e5457f0 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ CONTACT := no EXTERNAL_PETSC_SOLVER := no FLUID_PROPERTIES := no FUNCTIONAL_EXPANSION_TOOLS := no -HEAT_CONDUCTION := no +HEAT_CONDUCTION := yes LEVEL_SET := no MISC := no NAVIER_STOKES := no diff --git a/doc/config.yml b/doc/config.yml index 8e06a4b9..4832f503 100644 --- a/doc/config.yml +++ b/doc/config.yml @@ -1,6 +1,7 @@ Content: - ${ROOT_DIR}/doc/content - ${MOOSE_DIR}/framework/doc/content + - ${MOOSE_DIR}/modules/heat_conduction/doc/content Renderer: type: MooseDocs.base.MaterializeRenderer Extensions: @@ -31,6 +32,7 @@ Extensions: categories: framework: !include ${MOOSE_DIR}/framework/doc/sqa_framework.yml tmap: !include ${ROOT_DIR}/doc/sqa_tmap.yml + heat_conduction: !include ${MOOSE_DIR}/modules/heat_conduction/doc/sqa_heat_conduction.yml repos: default: https://github.com/idaholab/TMAP8 reports: !include ${ROOT_DIR}/doc/sqa_reports.yml diff --git a/doc/content/verification/bibfile.bib b/doc/content/verification/bibfile.bib index 72766bdd..b31a1e6d 100644 --- a/doc/content/verification/bibfile.bib +++ b/doc/content/verification/bibfile.bib @@ -4,9 +4,20 @@ @techreport{longhurst1992verification year={1992}, institution={EG and G Idaho, Inc., Idaho Falls, ID (United States)} } + +@techreport{ambrosek2008verification, + title={Verification and Validation of TMAP7}, + author={Ambrosek, James and Longhurst, GR}, + year={2008}, + number = "INEEL/EXT-04-01657", + month = "December", + publisher = "INL Technical Report", + institution = "Idaho National Laboratory" +} + @article{longhurst2005verification, title={Verification and validation of the tritium transport code TMAP7}, - author={Longhurst, Glen R and Ambrosek, James}, + author={Ambrosek, James and Longhurst, Glen R}, journal={Fusion science and technology}, volume={48}, number={1}, diff --git a/doc/content/verification/figures/val-1fa_comparison_temperature.png b/doc/content/verification/figures/val-1fa_comparison_temperature.png new file mode 100644 index 00000000..63b6e5cc Binary files /dev/null and b/doc/content/verification/figures/val-1fa_comparison_temperature.png differ diff --git a/doc/content/verification/figures/val-1fb_comparison_temperature.png b/doc/content/verification/figures/val-1fb_comparison_temperature.png new file mode 100644 index 00000000..40ccef5e Binary files /dev/null and b/doc/content/verification/figures/val-1fb_comparison_temperature.png differ diff --git a/doc/content/verification/val-1fa.md b/doc/content/verification/val-1fa.md new file mode 100644 index 00000000..8841be83 --- /dev/null +++ b/doc/content/verification/val-1fa.md @@ -0,0 +1,34 @@ +# val-1fa + +# Heat Conduction with Heat Generation + +This heat transfer verification problem is taken from [!cite](longhurst1992verification). In this problem heat conduction through a slab is modeled. The slab has heat generation. One end of the slab is kept at a constant temperature of 300K while the other end acts as an adiabatic surface. The analytical solution for this case is given as: + +\begin{equation} +T = T_s \;+\; \frac{QL^2}{2k} \left(1-\frac{x^2}{L^2}\right) +\end{equation} + +where: + + $Q$ : internal heat generation rate (10,000 W/m$^3$) + + $L$ : length of the slab (1.6 m) + + $k$ : thermal conductivity (10 W/m-K) + + $T_s$ : imposed surface temperature (300 K) + + +The slab is assumed to have a density of 1 kg/m$^3$ and a specific heat capabity of 1 J/kg-K. + +Comparison of the temperature computed through TMAP8 and calculated analytically is shown in +[val-1fa_comparison_temperature]. The TMAP8 code predictions match very well with +the analytical solution. + +!media figures/val-1fa_comparison_temperature.png + style=width:60%;margin-bottom:2% + id=val-1fa_comparison_temperature + caption=Comparison of temperature along the slab calculated + through TMAP8 and analytically + +!bibtex bibliography diff --git a/doc/content/verification/val-1fb.md b/doc/content/verification/val-1fb.md new file mode 100644 index 00000000..ed50560b --- /dev/null +++ b/doc/content/verification/val-1fb.md @@ -0,0 +1,48 @@ +# val-1fb + +# Thermal Transient in a Slab + +This verification problem is taken from [!cite](ambrosek2008verification). In this problem thermal transient in a slab is modeled. The ends of a slab are kept fixed at different temperatures. The temperature distribution in the slab evolves from an initial state to steady-state. The analytical solution for this case is given as: + +\begin{equation} +T(x,t) = T_o \;+\; (T_1-T_o)\Bigg\{1-\frac{x}{L}-\frac{2}{L}\sum_{m=1}^{\infty} \left(\frac{1}{\lambda_m} \sin(\lambda_m x) \exp(-\alpha \lambda_m^2 t) \right)\Bigg\} +\end{equation} + +where: + + + $T$ : temperature in the slab (K) + + + $x$ : distance across the slab (m) + + $t$ : time (seconds) + + $T_o$ : fixed temperature at one end of the slab (400 K) + + $T_1$ : fixed temperature at the other end of the slab (300 K) + + $L$ : length of the slab (4.0 m) + + $\lambda_m$ : $\frac{m\pi}{L}$ + + $\alpha$ : thermal diffusivity (1.0 m$^2$/s) where + +\begin{equation} +\alpha = \frac{k}{\rho C_p} +\end{equation} + +$k$ is the thermal conductivity, $\rho$ is the density and $C_p$ is the specific heat capacity of the slab material. + +# + + +Comparison of the temperature distribution in the slab, computed through TMAP8 and calculated analytically, is shown in [val-1fb_comparison_temperature]. The TMAP8 code predictions match very well with the analytical solution. + +!media figures/val-1fb_comparison_temperature.png + style=width:60%;margin-bottom:2% + id=val-1fb_comparison_temperature + caption=Comparison of temperature distribution in the slab calculated + through TMAP8 and analytically + +!bibtex bibliography diff --git a/doc/content/verification/val-list.md b/doc/content/verification/val-list.md index 35843f99..39f14494 100644 --- a/doc/content/verification/val-list.md +++ b/doc/content/verification/val-list.md @@ -6,3 +6,5 @@ | val-1b | [Diffusion Problem with Constant Source Boundary Condition](val-1b.md) | | val-1c | [Diffusion Problem with Partially Preloaded Slab](val-1c.md) | | val-1d | [Permeation Problem with Trapping](val-1d.md) | +| val-1fa | [Heat Conduction with Heat Generation](val-1fa.md) | +| val-1fb | [Thermal Transient](val-1fb.md) | diff --git a/test/tests/val-1fa/comparison_val-1fa.py b/test/tests/val-1fa/comparison_val-1fa.py new file mode 100644 index 00000000..697b6f9e --- /dev/null +++ b/test/tests/val-1fa/comparison_val-1fa.py @@ -0,0 +1,36 @@ +import csv +import matplotlib.pyplot as plt +import numpy as np +from matplotlib import gridspec +import pandas as pd +from scipy import special + + + +fig = plt.figure(figsize=[6.5,5.5]) +gs = gridspec.GridSpec(1,1) +ax = fig.add_subplot(gs[0]) + +analytical_x = np.linspace(0.0, 1.6, 40) +Ts = 300 +k = 10 +L = 1.6 +Q = 10000 +analytical_temp = Ts + Q*L**2 * (1- analytical_x**2/L**2) / (2*k) +ax.scatter(analytical_x,analytical_temp,label=r"Analytical",c='k', marker='^') + +tmap_sol = pd.read_csv("./gold/u_vs_x.csv") +tmap_x = tmap_sol['id'] +tmap_temp = tmap_sol['temp'] +ax.plot(tmap_x,tmap_temp,label=r"TMAP8",c='tab:gray') + +ax.set_xlabel(u'Distance along slab (m)') +ax.set_ylabel(u"Temperature (K)") +ax.legend(loc="best") +#ax.set_xlim(left=0) +ax.set_ylim(bottom=0) +plt.grid(visible=True, which='major', color='0.65', linestyle='--', alpha=0.3) + +ax.minorticks_on() +plt.savefig('val-1fa_comparison_temperature.png', bbox_inches='tight'); +plt.close(fig) diff --git a/test/tests/val-1fa/gold/u_vs_x.csv b/test/tests/val-1fa/gold/u_vs_x.csv new file mode 100644 index 00000000..8cbbd01d --- /dev/null +++ b/test/tests/val-1fa/gold/u_vs_x.csv @@ -0,0 +1,41 @@ +id,temp,x,y,z +0,1579.9999253845,0,0,0 +0.041025641025641,1578.3588998614,0.041025641025641,0,0 +0.082051282051282,1576.553771786,0.082051282051282,0,0 +0.12307692307692,1571.630695216,0.12307692307692,0,0 +0.16410256410256,1566.3794135412,0.16410256410256,0,0 +0.20512820512821,1558.1742859222,0.20512820512821,0,0 +0.24615384615385,1549.4768506453,0.24615384615385,0,0 +0.28717948717949,1537.9896719737,0.28717948717949,0,0 +0.32820512820513,1525.8460830905,0.32820512820513,0,0 +0.36923076923077,1511.0768533612,0.36923076923077,0,0 +0.41025641025641,1495.4871108659,0.41025641025641,0,0 +0.45128205128205,1477.4358300725,0.45128205128205,0,0 +0.49230769230769,1458.3999339575,0.49230769230769,0,0 +0.53333333333333,1437.0666020922,0.53333333333333,0,0 +0.57435897435897,1414.5845523486,0.57435897435897,0,0 +0.61538461538462,1389.9691694025,0.61538461538462,0,0 +0.65641025641026,1364.0409660198,0.65641025641026,0,0 +0.6974358974359,1336.1435319825,0.6974358974359,0,0 +0.73846153846154,1306.7691749489,0.73846153846154,0,0 +0.77948717948718,1275.5896898089,0.77948717948718,0,0 +0.82051282051282,1242.7691791112,0.82051282051282,0,0 +0.86153846153846,1208.307642856,0.86153846153846,0,0 +0.9025641025641,1172.0409784799,0.9025641025641,0,0 +0.94358974358974,1134.2973910957,0.94358974358974,0,0 +0.98461538461538,1094.5845730256,0.98461538461538,0,0 +1.025641025641,1053.5589344981,1.025641025641,0,0 +1.0666666666667,1010.3999627174,1.0666666666667,0,0 +1.1076923076923,966.09227303116,1.1076923076923,0,0 +1.1487179487179,919.48714752242,1.1487179487179,0,0 +1.1897435897436,871.8974066612,1.1897435897436,0,0 +1.2307692307692,821.84612740614,1.2307692307692,0,0 +1.2717948717949,770.97433535315,1.2717948717949,0,0 +1.3128205128205,717.47690233283,1.3128205128205,0,0 +1.3538461538462,663.32305907068,1.3538461538462,0,0 +1.3948717948718,606.37947226561,1.3948717948718,0,0 +1.4358974358974,548.94357777648,1.4358974358974,0,0 +1.4769230769231,488.55383716672,1.4769230769231,0,0 +1.5179487179487,427.83589143245,1.5179487179487,0,0 +1.5589743589744,363.99999699781,1.5589743589744,0,0 +1.6,300,1.6,0,0 diff --git a/test/tests/val-1fa/gold/val-1fa_out.e b/test/tests/val-1fa/gold/val-1fa_out.e new file mode 100644 index 00000000..7c8794f8 Binary files /dev/null and b/test/tests/val-1fa/gold/val-1fa_out.e differ diff --git a/test/tests/val-1fa/tests b/test/tests/val-1fa/tests new file mode 100644 index 00000000..96e74d8b --- /dev/null +++ b/test/tests/val-1fa/tests @@ -0,0 +1,11 @@ +[Tests] + design = 'HeatConduction.md HeatConductionTimeDerivative.md HeatSource.md' + issues = '#12' + [heat_conduction_generation] + type = Exodiff + input = val-1fa.i + exodiff = val-1fa_out.e + requirement = 'The system shall be able to model heat conduction in a slab that has heat generation' + verification = 'val-1fa.md' + [] +[] diff --git a/test/tests/val-1fa/val-1fa.i b/test/tests/val-1fa/val-1fa.i new file mode 100644 index 00000000..6c9bbf28 --- /dev/null +++ b/test/tests/val-1fa/val-1fa.i @@ -0,0 +1,96 @@ +[Mesh] + type = GeneratedMesh + dim = 1 + xmax = 1.6 + nx = 20 +[] + +[Variables] + [./temp] + initial_condition = 300.0 + [../] +[] + +[Kernels] + [./heat] + type = HeatConduction + variable = temp + [../] + [./heatsource] + type = HeatSource + function = volumetric_heat + variable = temp + [../] + [./HeatTdot] + type = HeatConductionTimeDerivative + variable = temp + [../] +[] + +[BCs] + [./lefttemp] + type = DirichletBC + boundary = right + variable = temp + value = 300 + [../] + [./rightflux] + type = NeumannBC + boundary = left + variable = temp + value = 0 + [../] +[] + +[Materials] + [./density] + type = GenericConstantMaterial + prop_names = 'density thermal_conductivity specific_heat' + prop_values = '1.0 10.0 1.0' + [../] +[] + +[Functions] + [./volumetric_heat] + type = ParsedFunction + value = 1.0e4 + [../] +[] + +[Preconditioning] + [./SMP] + type = SMP + full = true + [../] +[] + +[Executioner] + type = Transient + scheme = bdf2 + solve_type = PJFNK + petsc_options_iname = '-pc_type -ksp_grmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap' + petsc_options_value = 'asm 101 preonly ilu 1' + nl_rel_tol = 1e-8 + nl_abs_tol = 1e-10 + l_tol = 1e-4 + dt = 1 + end_time = 10 + automatic_scaling = true +[] + +[VectorPostprocessors] + [line] + type = LineValueSampler + start_point = '0 0 0' + end_point = '1.6 0 0' + num_points = 40 + sort_by = 'x' + variable = temp + [] +[] + +[Outputs] + execute_on = FINAL + exodus = false + csv = true +[] diff --git a/test/tests/val-1fb/comparison_val-1fb.py b/test/tests/val-1fb/comparison_val-1fb.py new file mode 100644 index 00000000..f6c1ad87 --- /dev/null +++ b/test/tests/val-1fb/comparison_val-1fb.py @@ -0,0 +1,65 @@ +import csv +import matplotlib.pyplot as plt +import numpy as np +from matplotlib import gridspec +import pandas as pd +from scipy import special + + + +fig = plt.figure(figsize=[6.5,5.5]) +gs = gridspec.GridSpec(1,1) +ax = fig.add_subplot(gs[0]) + +num_summation_terms = 10 + +def summation_terms(n, x, t, alph): + sum = 0.0 + for m in range(1, n): + lambdaa = m * np.pi / L + sum += np.sin(lambdaa * x) * np.exp(-1 * alph * lambdaa**2 * t) / lambdaa + return sum + +analytical_x = np.linspace(0.0, 4.0, 40) +To = 300 +T1 = 400 +alpha = 1.0 +L = 4.0 +time = [0.1, 0.5, 1.0, 5.0] + +analytical_temp =[] +for i in range(len(time)): + analytical_temp.append(To + (T1-To) * (1 - (analytical_x/L) - (2/L) * summation_terms(num_summation_terms, analytical_x, time[i], alpha))) + +ax.scatter(analytical_x,analytical_temp[0],label=r"Analytical 0.1 seconds",c='k', marker='^') +ax.scatter(analytical_x,analytical_temp[1],label=r"Analytical 0.5 seconds",c='r', marker='^') +ax.scatter(analytical_x,analytical_temp[2],label=r"Analytical 1.0 seconds",c='b', marker='^') +ax.scatter(analytical_x,analytical_temp[3],label=r"Analytical 5.0 seconds",c='c', marker='^') + +tmap_temp = [] +tmap_sol = pd.read_csv("./gold/u_vs_x_0pt1sec.csv") +tmap_x = tmap_sol['id'] +tmap_temp.append(tmap_sol['temp']) +tmap_sol = pd.read_csv("./gold/u_vs_x_0pt5sec.csv") +tmap_temp.append(tmap_sol['temp']) +tmap_sol = pd.read_csv("./gold/u_vs_x_1pt0sec.csv") +tmap_temp.append(tmap_sol['temp']) +tmap_sol = pd.read_csv("./gold/u_vs_x_5pt0sec.csv") +tmap_temp.append(tmap_sol['temp']) + +ax.plot(tmap_x,tmap_temp[0],label=r"TMAP8 0.1 seconds",c='k') +ax.plot(tmap_x,tmap_temp[1],label=r"TMAP8 0.5 seconds",c='r') +ax.plot(tmap_x,tmap_temp[2],label=r"TMAP8 1.0 seconds",c='b') +ax.plot(tmap_x,tmap_temp[3],label=r"TMAP8 5.0 seconds",c='c') + + +ax.set_xlabel(u'Distance along slab (m)') +ax.set_ylabel(u"Temperature (K)") +ax.legend(loc="best") +#ax.set_xlim(left=0) +ax.set_ylim(bottom=300) +plt.grid(visible=True, which='major', color='0.65', linestyle='--', alpha=0.3) + +ax.minorticks_on() +plt.savefig('val-1fb_comparison_temperature.png', bbox_inches='tight'); +plt.close(fig) diff --git a/test/tests/val-1fb/gold/u_vs_x_0pt1sec.csv b/test/tests/val-1fb/gold/u_vs_x_0pt1sec.csv new file mode 100644 index 00000000..6e8106cf --- /dev/null +++ b/test/tests/val-1fb/gold/u_vs_x_0pt1sec.csv @@ -0,0 +1,41 @@ +id,temp,x,y,z +0,400,0,0,0 +0.1025641025641,382.41237566061,0.1025641025641,0,0 +0.20512820512821,364.97258672902,0.20512820512821,0,0 +0.30769230769231,350.34167054564,0.30769230769231,0,0 +0.41025641025641,336.17029532073,0.41025641025641,0,0 +0.51282051282051,326.13478872202,0.51282051282051,0,0 +0.61538461538462,316.76972045802,0.61538461538462,0,0 +0.71794871794872,311.20380275736,0.71794871794872,0,0 +0.82051282051282,306.26611794932,0.82051282051282,0,0 +0.92307692307692,303.84136471173,0.92307692307692,0,0 +1.025641025641,301.82207061707,1.025641025641,0,0 +1.1282051282051,301.01915395115,1.1282051282051,0,0 +1.2307692307692,300.39839256849,1.2307692307692,0,0 +1.3333333333333,300.20266018008,1.3333333333333,0,0 +1.4358974358974,300.06349204211,1.4358974358974,0,0 +1.5384615384615,300.0293717978,1.5384615384615,0,0 +1.6410256410256,300.00723142725,1.6410256410256,0,0 +1.7435897435897,300.00306086735,1.7435897435897,0,0 +1.8461538461538,300.00060275471,1.8461538461538,0,0 +1.9487179487179,300.00023763316,1.9487179487179,0,0 +2.0512820512821,300.00004196511,2.0512820512821,0,0 +2.1538461538462,300.00001575057,2.1538461538462,0,0 +2.2564102564103,300.00000291885,2.2564102564103,0,0 +2.3589743589744,300.00000103673,2.3589743589744,0,0 +2.4615384615385,300.00000020281,2.4615384615385,0,0 +2.5641025641026,300.00000006768,2.5641025641026,0,0 +2.6666666666667,300.00000001408,2.6666666666667,0,0 +2.7692307692308,300.00000000437,2.7692307692308,0,0 +2.8717948717949,300.00000000098,2.8717948717949,0,0 +2.974358974359,300.00000000028,2.974358974359,0,0 +3.0769230769231,300.00000000007,3.0769230769231,0,0 +3.1794871794872,300.00000000002,3.1794871794872,0,0 +3.2820512820513,300,3.2820512820513,0,0 +3.3846153846154,300,3.3846153846154,0,0 +3.4871794871795,300,3.4871794871795,0,0 +3.5897435897436,300,3.5897435897436,0,0 +3.6923076923077,300,3.6923076923077,0,0 +3.7948717948718,300,3.7948717948718,0,0 +3.8974358974359,300,3.8974358974359,0,0 +4,300,4,0,0 diff --git a/test/tests/val-1fb/gold/u_vs_x_0pt5sec.csv b/test/tests/val-1fb/gold/u_vs_x_0pt5sec.csv new file mode 100644 index 00000000..f2567af6 --- /dev/null +++ b/test/tests/val-1fb/gold/u_vs_x_0pt5sec.csv @@ -0,0 +1,41 @@ +id,temp,x,y,z +0,400,0,0,0 +0.1025641025641,391.97829393712,0.1025641025641,0,0 +0.20512820512821,383.9690488407,0.20512820512821,0,0 +0.30769230769231,376.19656210691,0.30769230769231,0,0 +0.41025641025641,368.47208846426,0.41025641025641,0,0 +0.51282051282051,361.17973264176,0.51282051282051,0,0 +0.61538461538462,353.99675869374,0.61538461538462,0,0 +0.71794871794872,347.43361536777,0.71794871794872,0,0 +0.82051282051282,341.06022142646,0.82051282051282,0,0 +0.92307692307692,335.44582502383,0.92307692307692,0,0 +1.025641025641,330.09652332678,1.025641025641,0,0 +1.1282051282051,325.5425057465,1.1282051282051,0,0 +1.2307692307692,321.30084185347,1.2307692307692,0,0 +1.3333333333333,317.78800323066,1.3333333333333,0,0 +1.4358974358974,314.59799545463,1.4358974358974,0,0 +1.5384615384615,312.00753067975,1.5384615384615,0,0 +1.6410256410256,309.71857909567,1.6410256410256,0,0 +1.7435897435897,307.88189729776,1.7435897435897,0,0 +1.8461538461538,306.30528334645,1.8461538461538,0,0 +1.9487179487179,305.04653009652,1.9487179487179,0,0 +2.0512820512821,303.99826733115,2.0512820512821,0,0 +2.1538461538462,303.16049505034,2.1538461538462,0,0 +2.2564102564103,302.48448576944,2.2564102564103,0,0 +2.3589743589744,301.94082803392,2.3589743589744,0,0 +2.4615384615385,301.5162668624,2.4615384615385,0,0 +2.5641025641026,301.17110340022,2.5641025641026,0,0 +2.6666666666667,300.91051316765,2.6666666666667,0,0 +2.7692307692308,300.69546236641,2.7692307692308,0,0 +2.8717948717949,300.5386287355,2.8717948717949,0,0 +2.974358974359,300.40674532045,2.974358974359,0,0 +3.0769230769231,300.31382745474,3.0769230769231,0,0 +3.1794871794872,300.23389810547,3.1794871794872,0,0 +3.2820512820513,300.17931944709,3.2820512820513,0,0 +3.3846153846154,300.13107846143,3.3846153846154,0,0 +3.4871794871795,300.09872907043,3.4871794871795,0,0 +3.5897435897436,300.06918407847,3.5897435897436,0,0 +3.6923076923077,300.04890192075,3.6923076923077,0,0 +3.7948717948718,300.02964896682,3.7948717948718,0,0 +3.8974358974359,300.01471093289,3.8974358974359,0,0 +4,300,4,0,0 diff --git a/test/tests/val-1fb/gold/u_vs_x_1pt0sec.csv b/test/tests/val-1fb/gold/u_vs_x_1pt0sec.csv new file mode 100644 index 00000000..937bceea --- /dev/null +++ b/test/tests/val-1fb/gold/u_vs_x_1pt0sec.csv @@ -0,0 +1,41 @@ +id,temp,x,y,z +0,400,0,0,0 +0.1025641025641,394.24508749799,0.1025641025641,0,0 +0.20512820512821,388.49570468303,0.20512820512821,0,0 +0.30769230769231,382.85138592213,0.30769230769231,0,0 +0.41025641025641,377.22858389728,0.41025641025641,0,0 +0.51282051282051,371.79943249678,0.51282051282051,0,0 +0.61538461538462,366.4165083565,0.61538461538462,0,0 +0.71794871794872,361.29553869074,0.71794871794872,0,0 +0.82051282051282,356.25158369759,0.82051282051282,0,0 +0.92307692307692,351.51568739484,0.92307692307692,0,0 +1.025641025641,346.89046093959,1.025641025641,0,0 +1.1282051282051,342.59724402682,1.1282051282051,0,0 +1.2307692307692,338.44784707563,1.2307692307692,0,0 +1.3333333333333,334.63403003476,1.3333333333333,0,0 +1.4358974358974,330.9934908459,1.4358974358974,0,0 +1.5384615384615,327.67475338224,1.5384615384615,0,0 +1.6410256410256,324.55234502942,1.6410256410256,0,0 +1.7435897435897,321.72443034289,1.7435897435897,0,0 +1.8461538461538,319.10751291995,1.8461538461538,0,0 +1.9487179487179,316.74848104138,1.9487179487179,0,0 +2.0512820512821,314.60572231478,2.0512820512821,0,0 +2.1538461538462,312.67923674016,2.1538461538462,0,0 +2.2564102564103,310.96497579666,2.2564102564103,0,0 +2.3589743589744,309.42435318772,2.3589743589744,0,0 +2.4615384615385,308.08364166346,2.4615384615385,0,0 +2.5641025641026,306.87620419568,2.5641025641026,0,0 +2.6666666666667,305.84987039718,2.6666666666667,0,0 +2.7692307692308,304.92105395908,2.7692307692308,0,0 +2.8717948717949,304.15012647346,2.8717948717949,0,0 +2.974358974359,303.44686568175,2.974358974359,0,0 +3.0769230769231,302.8758680017,3.0769230769231,0,0 +3.1794871794872,302.34895802554,3.1794871794872,0,0 +3.2820512820513,301.92785176173,3.2820512820513,0,0 +3.3846153846154,301.53319642601,3.3846153846154,0,0 +3.4871794871795,301.21800236557,3.4871794871795,0,0 +3.5897435897436,300.91683088312,3.5897435897436,0,0 +3.6923076923077,300.66912976997,3.6923076923077,0,0 +3.7948717948718,300.42736980897,3.7948717948718,0,0 +3.8974358974359,300.21296503124,3.8974358974359,0,0 +4,300,4,0,0 diff --git a/test/tests/val-1fb/gold/u_vs_x_5pt0sec.csv b/test/tests/val-1fb/gold/u_vs_x_5pt0sec.csv new file mode 100644 index 00000000..996b8d60 --- /dev/null +++ b/test/tests/val-1fb/gold/u_vs_x_5pt0sec.csv @@ -0,0 +1,41 @@ +id,temp,x,y,z +0,400,0,0,0 +0.1025641025641,397.20342277944,0.1025641025641,0,0 +0.20512820512821,394.40713182979,0.20512820512821,0,0 +0.30769230769231,391.61628002741,0.30769230769231,0,0 +0.41025641025641,388.82655919983,0.41025641025641,0,0 +0.51282051282051,386.04701714533,0.51282051282051,0,0 +0.61538461538462,383.26996739864,0.61538461538462,0,0 +0.71794871794872,380.50704072954,0.71794871794872,0,0 +0.82051282051282,377.7484163824,0.82051282051282,0,0 +0.92307692307692,375.00700132311,0.92307692307692,0,0 +1.025641025641,372.27205571616,1.025641025641,0,0 +1.1282051282051,369.55651846626,1.1282051282051,0,0 +1.2307692307692,366.8498631533,1.2307692307692,0,0 +1.3333333333333,364.16393235984,1.3333333333333,0,0 +1.4358974358974,361.48941358124,1.4358974358974,0,0 +1.5384615384615,358.83608854449,1.5384615384615,0,0 +1.6410256410256,356.19668427086,1.6410256410256,0,0 +1.7435897435897,353.57816114194,1.7435897435897,0,0 +1.8461538461538,350.97590142333,1.8461538461538,0,0 +1.9487179487179,348.39351920624,1.9487179487179,0,0 +2.0512820512821,345.82943193762,2.0512820512821,0,0 +2.1538461538462,343.28363961747,2.1538461538462,0,0 +2.2564102564103,340.75772315189,2.2564102564103,0,0 +2.3589743589744,338.24806874912,2.3589743589744,0,0 +2.4615384615385,335.75929207357,2.4615384615385,0,0 +2.5641025641026,333.28443388283,2.5641025641026,0,0 +2.6666666666667,330.83076433821,2.6666666666667,0,0 +2.7692307692308,328.38850406458,2.7692307692308,0,0 +2.8717948717949,325.96696185927,2.8717948717949,0,0 +2.974358974359,323.5542988261,2.974358974359,0,0 +3.0769230769231,321.16103688227,3.0769230769231,0,0 +3.1794871794872,318.77424196823,3.1794871794872,0,0 +3.2820512820513,316.40464896923,3.2820512820513,0,0 +3.3846153846154,314.03935644901,3.3846153846154,0,0 +3.4871794871795,311.68818034271,3.4871794871795,0,0 +3.5897435897436,309.33949536829,3.5897435897436,0,0 +3.6923076923077,307.00098404075,3.6923076923077,0,0 +3.7948717948718,304.66360311841,3.7948717948718,0,0 +3.8974358974359,302.33165849861,3.8974358974359,0,0 +4,300,4,0,0 diff --git a/test/tests/val-1fb/gold/val-1fb_out.e b/test/tests/val-1fb/gold/val-1fb_out.e new file mode 100644 index 00000000..bb4b7adf Binary files /dev/null and b/test/tests/val-1fb/gold/val-1fb_out.e differ diff --git a/test/tests/val-1fb/tests b/test/tests/val-1fb/tests new file mode 100644 index 00000000..be95476e --- /dev/null +++ b/test/tests/val-1fb/tests @@ -0,0 +1,11 @@ +[Tests] + design = 'HeatConduction.md HeatConductionTimeDerivative.md' + issues = '#12' + [thermal_transient] + type = Exodiff + input = val-1fb.i + exodiff = val-1fb_out.e + requirement = 'The system shall be able to model thermal transient in a slab that has temperatures fixed at both the ends' + verification = 'val-1fb.md' + [] +[] \ No newline at end of file diff --git a/test/tests/val-1fb/val-1fb.i b/test/tests/val-1fb/val-1fb.i new file mode 100644 index 00000000..3c036ae0 --- /dev/null +++ b/test/tests/val-1fb/val-1fb.i @@ -0,0 +1,84 @@ +[Mesh] + type = GeneratedMesh + dim = 1 + xmax = 4.0 + nx = 20 +[] + +[Variables] + [./temp] + initial_condition = 300.0 + [../] +[] + +[Kernels] + [./heat] + type = HeatConduction + variable = temp + [../] + [./HeatTdot] + type = HeatConductionTimeDerivative + variable = temp + [../] +[] + +[BCs] + [./lefttemp] + type = DirichletBC + boundary = right + variable = temp + value = 300 + [../] + [./rightflux] + type = DirichletBC + boundary = left + variable = temp + value = 400 + [../] +[] + +[Materials] + [./diffusivity] + type = GenericConstantMaterial + prop_names = 'density thermal_conductivity specific_heat' + prop_values = '1.0 10.0 10.0' # arbitrary values for diffusivity (=k/rho-Cp) to be 1.0 + [../] +[] + +[Preconditioning] + [./SMP] + type = SMP + full = true + [../] +[] + +[Executioner] + type = Transient + scheme = bdf2 + solve_type = PJFNK + petsc_options_iname = '-pc_type -ksp_grmres_restart -sub_ksp_type -sub_pc_type -pc_asm_overlap' + petsc_options_value = 'asm 101 preonly ilu 1' + nl_rel_tol = 1e-8 + nl_abs_tol = 1e-10 + l_tol = 1e-4 + dt = 0.01 + end_time = 10 + automatic_scaling = true +[] + +[VectorPostprocessors] + [line] + type = LineValueSampler + start_point = '0 0 0' + end_point = '4.0 0 0' + num_points = 40 + sort_by = 'x' + variable = temp + [] +[] + +[Outputs] + #execute_on = FINAL + exodus = true + csv = false +[]