Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ REACTOR := no
RDG := no
RICHARDS := no
STOCHASTIC_TOOLS := no
THERMAL_HYDRAULICS := no
THERMAL_HYDRAULICS := yes
TENSOR_MECHANICS := no
XFEM := no

Expand Down
7 changes: 4 additions & 3 deletions input/AForm.i
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[Mesh]
type = FileMesh
file = ../mesh/vac_oval_coil_solid_target_coarse.e
file = ../mesh/vac_oval_coil_solid_target.e
second_order = true
[]

Expand Down Expand Up @@ -73,8 +73,9 @@
[plane]
type = VectorCurlPenaltyDirichletBC
variable = A
boundary = 'coil_in coil_out terminal_plane'
penalty = 1e14
# boundary = 'terminal_face coil_in coil_out'
boundary = 'coil_in coil_out'
penalty = 1e8
[]
[]

Expand Down
9 changes: 9 additions & 0 deletions input/Parameters.i
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,19 @@ copper_capacity = 385 # J/(kg*K)

room_temperature = 293.15 # K

innerpipe_len = 0.15 # m
innerpipe_diameter = 10e-3 # m
innerpipe_area = ${fparse pi*(innerpipe_diameter/2)^2 } # m^2
inlet_temp = 293.15 # K
vol_flowrate_Lmin = 40 # L/min
vol_flowrate = ${fparse vol_flowrate_Lmin*1.66667e-5} # m^3/s
outlet_pressure = 2e5 # Pa

voltage_amplitude = 1 # V
voltage_frequency = 1e5 # Hz
voltage_wfrequency = ${fparse 2*pi*voltage_frequency} # rad/s
voltage_period = ${fparse 1/voltage_frequency} # s

end_t = ${fparse voltage_period} # s
delta_t = ${fparse voltage_period/10} # s
dt_fluid = ${fparse voltage_period}
86 changes: 83 additions & 3 deletions input/THeat.i
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[Mesh]
type = FileMesh
file = ../mesh/vac_oval_coil_solid_target_coarse.e
file = ../mesh/vac_oval_coil_solid_target.e
second_order = true
[]

Expand All @@ -19,6 +19,36 @@
family = MONOMIAL
order = CONSTANT
[]
[temp_received]
# order = CONSTANT
order = FIRST
family = LAGRANGE
initial_condition = ${room_temperature}
[]
[aux_flux]
order = CONSTANT
family = MONOMIAL
[]
[aux_flux_boundary]
order = FIRST
family = LAGRANGE
[]
[]

[AuxKernels]
[aux_flux_kernel_proj]
type = ProjectionAux
variable = aux_flux_boundary
v = aux_flux
[]
[aux_flux_kernel]
type = DiffusionFluxAux
diffusion_variable = T
component = normal
diffusivity = thermal_conductivity
variable = aux_flux
boundary = "inner_pipe"
[]
[]

[Kernels]
Expand Down Expand Up @@ -56,23 +86,46 @@
[plane]
type = DirichletBC
variable = T
boundary = 'coil_in coil_out terminal_plane'
# boundary = 'coil_in coil_out terminal_face'
boundary = 'coil_in coil_out'
value = ${room_temperature}
[]
[temp_inner_pipe_from_multiapp]
type = FunctorDirichletBC
variable = T
boundary = 'inner_pipe'
functor = temp_received
[]
[]

[Executioner]
type = Transient
solve_type = LINEAR
solve_type = NEWTON
petsc_options_iname = -pc_type
petsc_options_value = hypre
start_time = 0.0
end_time = ${end_t}
dt = ${delta_t}

nl_abs_tol = 1e-6
nl_rel_tol = 1e-8
l_tol = 1e-6
[]

[Postprocessors]
[max-T]
type = NodalExtremeValue
variable = T
[]
[max-flux]
type = NodalExtremeValue
variable = aux_flux_boundary
[]
[]

[Outputs]
exodus = true
csv = true
[]

[MultiApps]
Expand All @@ -81,6 +134,13 @@
input_files = AForm.i
execute_on = timestep_begin
[]
[flow_channel]
type = TransientMultiApp
input_files = coolant.i
execute_on = 'timestep_end'
sub_cycling = true
max_procs_per_app = 1 #8
[]
[]

[Transfers]
Expand All @@ -90,4 +150,24 @@
source_variable = P
variable = P
[]

# coolant transfers
[T_from_child]
type = MultiAppGeneralFieldNearestLocationTransfer
from_multi_app = flow_channel
# distance_weighted_average = true
source_variable = 'T'
variable = temp_received
to_boundaries = "inner_pipe"
num_nearest_points = 1
[]
[heatflux_from_parent_to_child]
type = MultiAppGeneralFieldNearestLocationTransfer
to_multi_app = flow_channel
# distance_weighted_average = true
source_variable = aux_flux_boundary # *from variable*
from_boundaries = "inner_pipe"
variable = q_wall # *to variable*
num_nearest_points = 1
[]
[]
2 changes: 1 addition & 1 deletion input/VLaplace.i
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Mesh]
type = FileMesh
file = ../mesh/vac_oval_coil_solid_target_coarse.e
file = ../mesh/vac_oval_coil_solid_target.e
second_order = true
[]

Expand Down
105 changes: 105 additions & 0 deletions input/coolant.i
Original file line number Diff line number Diff line change
@@ -0,0 +1,105 @@
!include Parameters.i

[GlobalParams]
initial_p = ${outlet_pressure}
initial_vel = 0.
initial_T = ${inlet_temp}

closures = simple_closures
[]

[FluidProperties]
[water]
type = SimpleFluidProperties
[]
[]

[Closures]
[simple_closures]
type = Closures1PhaseSimple
[]
[]


[Functions]
[water-htc-function]
type = PiecewiseLinear
scale_factor = 1.0
data_file = "../matprops/water_htc.csv"
[]
[]

[Components]
[pipe1]
type = FlowChannel1Phase
position = '0.0 -0.075 0'
orientation = '0 1 0'
length = ${innerpipe_len}
n_elems = 50

A = ${innerpipe_area}
D_h = ${innerpipe_diameter}
f = 0.01 # friction factor

fp = water # fluid properties
[]

[hxconn]
type = HeatTransferFromExternalAppHeatFlux1Phase
flow_channel = pipe1
Hw = water-htc-function
P_hf = ${fparse pi*innerpipe_diameter}
[]

[inlet]
type = InletVelocityTemperature1Phase
input = 'pipe1:in'
vel = ${fparse vol_flowrate / innerpipe_area}
T = ${inlet_temp}
[]

[outlet]
type = Outlet1Phase
input = 'pipe1:out'
p = ${outlet_pressure}
[]
[]

[Executioner]
type="Transient"
start_time="0"
end_time = ${end_t}
dtmin="1e-09"
solve_type="NEWTON"
line_search="basic"
nl_abs_tol="1e-05"
nl_rel_tol="1e-07"
nl_max_its="10"
l_max_its="100"

petsc_options_iname = '-pc_type'
petsc_options_value = ' lu'

[./TimeStepper]
type = ConstantDT
dt = ${dt_fluid}
cutback_factor_at_failure = 0.1
[../]
[]

[Postprocessors]
[max-T]
type = ElementExtremeValue
variable = T
[]
[max-flux]
type = ElementExtremeValue
variable = q_wall
[]
[]

[Outputs]
exodus = true
vtk = true
csv = true
[]
2 changes: 2 additions & 0 deletions matprops/water_htc.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
2.931499999999999773e+02,2.941499999999999773e+02,2.951499999999999773e+02,2.961499999999999773e+02,2.971499999999999773e+02,2.981499999999999773e+02,2.991499999999999773e+02,3.001499999999999773e+02,3.011499999999999773e+02,3.021499999999999773e+02,3.031499999999999773e+02,3.041499999999999773e+02,3.051499999999999773e+02,3.061499999999999773e+02,3.071499999999999773e+02,3.081499999999999773e+02,3.091499999999999773e+02,3.101499999999999773e+02,3.111499999999999773e+02,3.121499999999999773e+02,3.131499999999999773e+02,3.141499999999999773e+02,3.151499999999999773e+02,3.161499999999999773e+02,3.171499999999999773e+02,3.181499999999999773e+02,3.191499999999999773e+02,3.201499999999999773e+02,3.211499999999999773e+02,3.221499999999999773e+02,3.231499999999999773e+02,3.241499999999999773e+02,3.251499999999999773e+02,3.261499999999999773e+02,3.271499999999999773e+02,3.281499999999999773e+02,3.291499999999999773e+02,3.301499999999999773e+02,3.311499999999999773e+02,3.321499999999999773e+02,3.331499999999999773e+02,3.341499999999999773e+02,3.351499999999999773e+02,3.361499999999999773e+02,3.371499999999999773e+02,3.381499999999999773e+02,3.391499999999999773e+02,3.401499999999999773e+02,3.411499999999999773e+02,3.421499999999999773e+02,3.431499999999999773e+02,3.441499999999999773e+02,3.451499999999999773e+02,3.461499999999999773e+02,3.471499999999999773e+02,3.481499999999999773e+02,3.491499999999999773e+02,3.501499999999999773e+02,3.511499999999999773e+02,3.521499999999999773e+02,3.531499999999999773e+02,3.541499999999999773e+02,3.551499999999999773e+02,3.561499999999999773e+02,3.571499999999999773e+02,3.581499999999999773e+02,3.591499999999999773e+02,3.601499999999999773e+02,3.611499999999999773e+02,3.621499999999999773e+02,3.631499999999999773e+02,3.641499999999999773e+02,3.651499999999999773e+02,3.661499999999999773e+02,3.671499999999999773e+02,3.681499999999999773e+02,3.691499999999999773e+02,3.701499999999999773e+02,3.711499999999999773e+02,3.721499999999999773e+02,3.731499999999999773e+02,3.741499999999999773e+02,3.751499999999999773e+02,3.761499999999999773e+02,3.771499999999999773e+02,3.781499999999999773e+02,3.791499999999999773e+02,3.801499999999999773e+02,3.811499999999999773e+02,3.821499999999999773e+02,3.831499999999999773e+02,3.841499999999999773e+02,3.851499999999999773e+02,3.861499999999999773e+02,3.871499999999999773e+02,3.881499999999999773e+02,3.891499999999999773e+02,3.901499999999999773e+02,3.911499999999999773e+02,3.921499999999999773e+02,3.931499999999999773e+02,3.941499999999999773e+02,3.951499999999999773e+02,3.961499999999999773e+02,3.971499999999999773e+02,3.981499999999999773e+02,3.991499999999999773e+02,4.001499999999999773e+02,4.011499999999999773e+02,4.021499999999999773e+02,4.031499999999999773e+02,4.041499999999999773e+02,4.051499999999999773e+02,4.061499999999999773e+02,4.071499999999999773e+02,4.081499999999999773e+02,4.091499999999999773e+02,4.101499999999999773e+02,4.111499999999999773e+02,4.121499999999999773e+02,4.131499999999999773e+02,4.141499999999999773e+02,4.151499999999999773e+02,4.161499999999999773e+02,4.171499999999999773e+02,4.181499999999999773e+02,4.191499999999999773e+02,4.201499999999999773e+02,4.211499999999999773e+02,4.221499999999999773e+02,4.231499999999999773e+02,4.241499999999999773e+02,4.251499999999999773e+02,4.261499999999999773e+02,4.271499999999999773e+02,4.281499999999999773e+02,4.291499999999999773e+02,4.301499999999999773e+02,4.311499999999999773e+02,4.321499999999999773e+02,4.331499999999999773e+02,4.341499999999999773e+02,4.351499999999999773e+02,4.361499999999999773e+02,4.371499999999999773e+02,4.381499999999999773e+02,4.391499999999999773e+02,4.401499999999999773e+02,4.411499999999999773e+02,4.421499999999999773e+02,4.431499999999999773e+02,4.441499999999999773e+02,4.451499999999999773e+02,4.461499999999999773e+02,4.471499999999999773e+02,4.481499999999999773e+02,4.491499999999999773e+02,4.501499999999999773e+02,4.511499999999999773e+02,4.521499999999999773e+02,4.531499999999999773e+02,4.541499999999999773e+02,4.551499999999999773e+02,4.561499999999999773e+02,4.571499999999999773e+02,4.581499999999999773e+02,4.591499999999999773e+02,4.601499999999999773e+02,4.611499999999999773e+02,4.621499999999999773e+02,4.631499999999999773e+02,4.641499999999999773e+02,4.651499999999999773e+02,4.661499999999999773e+02,4.671499999999999773e+02,4.681499999999999773e+02,4.691499999999999773e+02,4.701499999999999773e+02,4.711499999999999773e+02,4.721499999999999773e+02,4.731499999999999773e+02,4.741499999999999773e+02,4.751499999999999773e+02,4.761499999999999773e+02,4.771499999999999773e+02,4.781499999999999773e+02,4.791499999999999773e+02,4.801499999999999773e+02,4.811499999999999773e+02,4.821499999999999773e+02,4.831499999999999773e+02,4.841499999999999773e+02,4.851499999999999773e+02,4.861499999999999773e+02,4.871499999999999773e+02,4.881499999999999773e+02,4.891499999999999773e+02,4.901499999999999773e+02,4.911499999999999773e+02,4.921499999999999773e+02,4.931499999999999773e+02,4.941499999999999773e+02,4.951499999999999773e+02,4.961499999999999773e+02,4.971499999999999773e+02,4.981499999999999773e+02,4.991499999999999773e+02,5.001499999999999773e+02,5.011499999999999773e+02,5.021499999999999773e+02,5.031499999999999773e+02,5.041499999999999773e+02,5.051499999999999773e+02,5.061499999999999773e+02,5.071499999999999773e+02,5.081499999999999773e+02,5.091499999999999773e+02,5.101499999999999773e+02,5.111499999999999773e+02,5.121499999999999773e+02
2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.420000000000000000e+04,2.451700000000000000e+04,2.546500000000000000e+04,2.703400000000000000e+04,2.920600000000000000e+04,3.195700000000000000e+04,3.525800000000000000e+04,3.907200000000000000e+04,4.335700000000000000e+04,4.806700000000000000e+04,5.315000000000000000e+04,5.855000000000000000e+04,6.420800000000000000e+04,7.006200000000000000e+04,7.604800000000000000e+04,8.210000000000000000e+04,8.815200000000000000e+04,9.413800000000000000e+04,9.999200000000000000e+04,1.056500000000000000e+05,1.110500000000000000e+05,1.161300000000000000e+05,1.208400000000000000e+05,1.251300000000000000e+05,1.289400000000000000e+05,1.322400000000000000e+05,1.349900000000000000e+05,1.371700000000000000e+05,1.387300000000000000e+05,1.396800000000000000e+05,1.400000000000000000e+05,1.399700000000000000e+05,1.398600000000000000e+05,1.396900000000000000e+05,1.394500000000000000e+05,1.391500000000000000e+05,1.387800000000000000e+05,1.383400000000000000e+05,1.378300000000000000e+05,1.372600000000000000e+05,1.366200000000000000e+05,1.359200000000000000e+05,1.351600000000000000e+05,1.343400000000000000e+05,1.334500000000000000e+05,1.325100000000000000e+05,1.315100000000000000e+05,1.304500000000000000e+05,1.293400000000000000e+05,1.281700000000000000e+05,1.269500000000000000e+05,1.256800000000000000e+05,1.243600000000000000e+05,1.230000000000000000e+05,1.215900000000000000e+05,1.201300000000000000e+05,1.186400000000000000e+05,1.171000000000000000e+05,1.155300000000000000e+05,1.139300000000000000e+05,1.122900000000000000e+05,1.106200000000000000e+05,1.089200000000000000e+05,1.072000000000000000e+05,1.054500000000000000e+05,1.036800000000000000e+05,1.019000000000000000e+05,1.000900000000000000e+05,9.827800000000000000e+04,9.645000000000000000e+04,9.461300000000000000e+04,9.277100000000000000e+04,9.092400000000000000e+04,8.907600000000000000e+04,8.722900000000000000e+04,8.538700000000000000e+04,8.355000000000000000e+04,8.172200000000000000e+04,7.990600000000000000e+04,7.810300000000000000e+04,7.631700000000000000e+04,7.454900000000000000e+04,7.280300000000000000e+04,7.107900000000000000e+04,6.938200000000000000e+04,6.771300000000000000e+04,6.607400000000000000e+04,6.446800000000000000e+04,6.289700000000000000e+04,6.136300000000000000e+04,5.986800000000000000e+04,5.841400000000000000e+04,5.700400000000000000e+04,5.563800000000000000e+04,5.431900000000000000e+04,5.305000000000000000e+04,5.183000000000000000e+04,5.066300000000000000e+04,4.954900000000000000e+04,4.849100000000000000e+04,4.748900000000000000e+04,4.654600000000000000e+04,4.566100000000000000e+04,4.483800000000000000e+04,4.407600000000000000e+04,4.337600000000000000e+04,4.274100000000000000e+04,4.217000000000000000e+04,4.166400000000000000e+04,4.122400000000000000e+04,4.085100000000000000e+04,4.054500000000000000e+04,4.030700000000000000e+04,4.013700000000000000e+04,4.003400000000000000e+04,4.000000000000000000e+04,4.003400000000000000e+04,4.013700000000000000e+04,4.030700000000000000e+04,4.054500000000000000e+04,4.085100000000000000e+04,4.122400000000000000e+04,4.166400000000000000e+04,4.217000000000000000e+04,4.274100000000000000e+04,4.337600000000000000e+04,4.407600000000000000e+04,4.483800000000000000e+04,4.566100000000000000e+04,4.654600000000000000e+04,4.748900000000000000e+04,4.849100000000000000e+04,4.954900000000000000e+04,5.066300000000000000e+04,5.183000000000000000e+04,5.305000000000000000e+04,5.431900000000000000e+04,5.563800000000000000e+04,5.700400000000000000e+04,5.841400000000000000e+04
Binary file not shown.
Binary file removed mesh/vac_oval_coil_solid_target_coarse.e
Binary file not shown.