-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14607 from bwspenc/conv_flux
Add option for temperature-dependent convective heat transfer coefficient
- Loading branch information
Showing
6 changed files
with
197 additions
and
12 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
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
99 changes: 99 additions & 0 deletions
99
modules/heat_conduction/test/tests/convective_flux_function/convective_flux_function.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,99 @@ | ||
# This is a test of the ConvectiveFluxFunction BC. | ||
# There is a single 1x1 element with a prescribed temperature | ||
# on the left side and a convective flux BC on the right side. | ||
# The temperature on the left is 100, and the far-field temp is 200. | ||
# The conductance of the body (conductivity * length) is 10 | ||
# | ||
# If the conductance in the BC is also 10, the temperature on the | ||
# right side of the solid element should be 150 because half of the | ||
# temperature drop should occur over the body and half in the BC. | ||
# | ||
# The integrated flux is deltaT * conductance, or -50 * 10 = -500. | ||
# The negative sign indicates that heat is going into the body. | ||
# | ||
# The conductance is defined multiple ways using this input, and | ||
# as long as it evaluates to 10, the result described above will | ||
# be obtained. | ||
|
||
[Mesh] | ||
type = GeneratedMesh | ||
dim = 2 | ||
nx = 1 | ||
ny = 1 | ||
[] | ||
|
||
[Problem] | ||
extra_tag_vectors = 'bcs' | ||
[] | ||
|
||
[Variables] | ||
[temp] | ||
initial_condition = 100.0 | ||
[] | ||
[] | ||
|
||
[AuxVariables] | ||
[flux] | ||
[] | ||
[] | ||
|
||
[AuxKernels] | ||
[flux] | ||
type = TagVectorAux | ||
variable = flux | ||
v = temp | ||
vector_tag = 'bcs' | ||
execute_on = timestep_end | ||
[] | ||
[] | ||
|
||
[Kernels] | ||
[heat_conduction] | ||
type = HeatConduction | ||
variable = temp | ||
[] | ||
[] | ||
|
||
[Materials] | ||
[thermal] | ||
type = HeatConductionMaterial | ||
thermal_conductivity = 10.0 | ||
[] | ||
[] | ||
|
||
[BCs] | ||
[left] | ||
type = DirichletBC | ||
variable = temp | ||
boundary = left | ||
value = 100.0 | ||
[] | ||
[right] | ||
type = ConvectiveFluxFunction | ||
variable = temp | ||
boundary = right | ||
T_infinity = 200.0 | ||
coefficient = 10.0 #This will behave as described in the header of this file if this evaluates to 10 | ||
extra_vector_tags = 'bcs' | ||
[] | ||
[] | ||
|
||
[Postprocessors] | ||
[integrated_flux] | ||
type = NodalSum | ||
variable = flux | ||
boundary = right | ||
[] | ||
[] | ||
|
||
[Executioner] | ||
type = Transient | ||
start_time = 0.0 | ||
end_time = 1.0 | ||
dt = 1.0 | ||
nl_rel_tol=1e-12 | ||
[] | ||
|
||
[Outputs] | ||
csv = true | ||
[] |
3 changes: 3 additions & 0 deletions
3
...heat_conduction/test/tests/convective_flux_function/gold/convective_flux_function_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,3 @@ | ||
time,integrated_flux | ||
0,0 | ||
1,-500 |
26 changes: 26 additions & 0 deletions
26
modules/heat_conduction/test/tests/convective_flux_function/tests
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,26 @@ | ||
[Tests] | ||
design = 'ConvectiveFluxFunction.md' | ||
issues = '#14418' | ||
[./constant] | ||
type = 'CSVDiff' | ||
input = 'convective_flux_function.i' | ||
csvdiff = 'convective_flux_function_out.csv' | ||
requirement = 'The system shall allow prescribing a convective flux boundary condition using a constant heat transfer coefficient.' | ||
[../] | ||
[./time_dependent] | ||
prereq = constant | ||
type = 'CSVDiff' | ||
input = 'convective_flux_function.i' | ||
cli_args = "BCs/right/coefficient='t*10.0'" | ||
csvdiff = 'convective_flux_function_out.csv' | ||
requirement = 'The system shall allow prescribing a convective flux boundary condition using a heat transfer coefficient that is a function of position and time.' | ||
[../] | ||
[./temperature_dependent] | ||
prereq = time_dependent | ||
type = 'CSVDiff' | ||
input = 'convective_flux_function.i' | ||
cli_args = "BCs/right/coefficient='t/15.0' BCs/right/coefficient_function_type=TEMPERATURE" | ||
csvdiff = 'convective_flux_function_out.csv' | ||
requirement = 'The system shall allow prescribing a convective flux boundary condition using a heat transfer coefficient that is a function of temperature.' | ||
[../] | ||
[] |