FLUKA FLUKA Advanced Biasing FLUKA Users Meeting CERN 31/05/2007.
FHeat3D, a heat transfer code designed for FLUKA and FLAIR FLUKA Collaboration Meeting – 5-7 May...
-
Upload
cori-lambert -
Category
Documents
-
view
331 -
download
6
Transcript of FHeat3D, a heat transfer code designed for FLUKA and FLAIR FLUKA Collaboration Meeting – 5-7 May...
FHeat3D, a heat transfer code designed for FLUKA and FLAIR
FLUKA Collaboration Meeting – 5-7 May 2015
M. Santana Leitner, SLAC Rad Physics group & FLUKA Collaboration
2
Motivation (1/2)
FLUKA has proven accurate capabilities to predict energy deposition (absorbed dose) on matter. Many of the FLUKA users make use of this feature.
Most times, the final goal of such studies is to investigate the peak temperature in a solid, or its temperature at a given location, its cooling needs, and/or the heat fluxes at given interphases.
Thus, a second step is required, in which a heat transfer code reads the FLUKA usrbin fine mesh data set(s) and uses the(o)se as source data for the heat evolution.“FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May
2015
3
Motivation (2/2)
Typically the heat transfer step is carried out by a non-FLUKA user who is not acquainted with Linux, data files, and FLUKA units/normalizations.
That person is often in a different group/department. The full process takes time, since it requires availability of several people, sharing / converting files, etc. (meetings!!). This can be especially painful for the design/optimization phase.
The heat transfer code sometimes freezes with large heat source matrices, but still requires annual licenses which could finance entire FLUKA courses…“FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May
2015
4
Intro. to FHeat3D (1/3) - Scope FHeat3D is a heat transfer evolution code that
has been created to breach the gap between dose and heat evolution.
The goal of FHeat3D is that a FLUKA/FLAIR user can quickly obtain & plot thermal results, without leaving the Linux environment and without losing any resolution in the input dose maps.
This is a tool to optimize accelerator component designs in many practical cases (including some exotic applications). However, some answers (e.g. deformations) and final calculations should be obtained with standard certified CAD software.“FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May
2015
5
Intro. to FHeat3D (2/3) – Generalities Language (English…): FORTRAN if you can
compile FLUKA you can compile FHeat3D Approach: Numeric code, explicit evolution
T(i,j,k,t+Δt)=f(T(i,j,k,t) (slower but more flexible)
Dependencies FLUKA: To get dose rate maps FLAIR: To plot 3D/2D maps USBREA or USBFUF: to convert ascii binary usrbin
FHeat3D.tar.gz FHeat3D.e: Precompiled source code FHeat3Dso.f: User programmable options Material database (in development), currently codded
within FHeat3Dso.f Examples (in development) Tools (in development): 1Dusrb.e, rebin.e,…, gnuplot
scripts README(s), FHeat3D_Manual.pdf (in development)
“FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May 2015
6
Intro. to FHeat3D (3/3) - Capabilities (Thermal) Diffusion (isotropic)
Temperature dependence Also for interphases between different material
Convection at boundaries Can configure at which boundaries
(Thermal) Radiation Can configure at which boundaries Can include re-entrant cavities, etc.
Source (sink) terms: FLUKA Up to 10 usrbin maps User-defined Time modulation and time variation possible
Simulations can be stopped and resumed for same conditions: e.g. to inspect intermediate temp
maps For different conditions: e.g. to represent irradiation
changes Phase Transitions (in development)
“FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May 2015
7
Running FHeat3D – Preparation (1/2)1. Compute FLUKA DOSE estimators [GeV/g/prim] in
cylindrical or Cartesian meshes. Up to 10 adjacent or nested grids in ASCII format, named consecutively, e.g. usrbinf_50, usrbinf_51, usrbinf_52. Tip: compute in binary, then merge and convert to ASCII. FHeat3D reads and combines all grids into one, e.g.:
2. Edit FHeat3Dso.f for any special customization and recompile code (examples shown later)“FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May
2015
8
Running FHeat3D – Preparation (2/2)Existing symmetries reduce the number of nodes, and thus also computation time. Cylindrical coordinates should be used if such
symmetry exists. If symmetry exists in one plane in Cartesian
coordinates Use WHAT(1)=13, 14 or 15 on USRBIN for the FLUKA simulation and define only one half of the MESH
If symmetry exists around two planes in Cartesian coordinates (e.g. box irradiated at axis) do like before* but define just 1/4th of the full MESH
In FHeat3D do not activate heat convection or radiation on those (inner) boundaries of the usrbin meshes
Note: Currently FLUKA allows to score with symmetry around one axis (cylindrical), one plane or one point, but not TWO axis “FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May
2015
9
Running FHeat3D – Execution (1/3)
1. Write binmin binmax: Min and max unit numbers of the FLUKA (ascii) dose maps, e.g. 50 52 (for usrbinf_50, usrbinf_51 and usrbinf_52)> 50 52
2. Beam energy [GeV], power [kW] and frequency [Hz]? e.g. 4 1200 1E6
> 4 120 1E5
Where normalization of the Fluka Result is carried through:
“FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May 2015
10
Running FHeat3D – Execution (2/3)
3. Starting temperature [K] and time [s] … (-) temperature file index?e.g. 298.0 0.0 (for uniform T=298 K at t = 0 s)… -n tn for FLUKA formatted TEMP files……TEMP0nf_b1,TEMP0nf_b2, …… generated in previous stepse.g. -1 0.002
> 300 all nodes would be initialized at 300 K If the simulation is stopped at time tn and then resumed (for the nth time) them, then type –n tn to initialize n+1th step with temperature map from the nth step“FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May
2015
11
Running FHeat3D – Execution (3/3)
4. Material code? (z, or special code)e.g. 13 (Al), 29 (Cu), 316 (ss316L), 1100 (Al-1100)… 999 (custom),… can be overwritten initGRID
> 999 edit text file with material properties for code entry 999: conductivity, emissivity, melting point, specific heat capacity, density
5. Maximum time [s] for evolution? (Not CPU time) … default is 1E5, OR (<) Maximum Peak Temp [K]
> 10 stop evolution at t=10 s (absolute time)Note: The computation can be gently stopped anytime (e.g. when convergence is observed) by creating the file “FHeat3D.stop”“FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May
2015
12
Running FHeat3D – Output files (1/2)
1. Fheat3D_##.inp: contains runtime options used in simulation. E.g. Fheat3D_00.inp for 1st simulation in local folder, Fheat3D_01.inp for 2nd, etc. Useful to track input conditions, to rerun a simulation or to launch a job to a cluster, e.g. > cat Fheat3D_01.inp | ./FHeat3D.e
2. Fheat3D_##.out: time evolution: time[s], Δt[s], Tmax[K], T2max[K] (in a second media, if any), Tmin[K], Radiated Power [W], Convection Power [W] tip: plotting power vs time helps determine evolution convergence Summary balance & statistics
“FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May 2015
13
Running FHeat3D – Output files (2/2)
3. TEMP##f_bin: (e.g. TEMP01f_50,…) contain the temperature meshes corresponding to the DOSE usrbin meshes used for the calculation. When converted to binary (e.g. TEMP01_50) these meshes can be plot with FLAIR (& geoviewer)
4. Trtmax.dat: user definable output file
“FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May 2015
14
Physics – Diffusion (1/3)During Δt the heat diffusion from a node n to the m neighbor nodes, is expressed as:
Where:
“FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May 2015
15
Physics – Diffusion (2/3)In the explicit method, convergence requires that the time step of each node n Δtn is limited to:
Then:
If the mesh is made unnecessarily fine then:• Dose values may have large uncertainties• Many steps are required to reach
convergence• Each step takes longer (larger matrix)
FHeat3D also limits the timestep to 1/f for t<< in order to preserve transients
Tip: 1st rebin and run FHeat3D. Use finer mesh versions for final simulations
“FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May 2015
16
Physics – Diffusion (3/3)
Heat conduction only occurs between nodes of the (merged) grid if those nodes are not filled with air or vacuum
Indents, gaps, re-entrant cavities, etc, can be defined by coding air/vacuum as a function of the voxel pointers (i,j,k)
“FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May 2015
17
Physics – radiation & convection (1/3)Heat radiation can be activated (.TRUE.) for each direction (u, v, w) and end (e.g. umin, vmax). It can also be set between opposed facets in each of the three axis (e.g. raduint, radvint)
u
v
rad
vm
in rad
vm
ax
radumin
radumaxThe same concept is used for convection, e.g.
conumax = .TRUE.“FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May
2015
18
Physics – radiation & convection (2/3) For each facet u of any node at a border
{i,j,k}, the exchanged heat radiation Wru is:
Emissivity:May be
customized in function epsylon
Area of the facet
Exchange Temperature:
• T of opposed facet ||
• T∞ ||• T set by user
in adjustTexch Likewise for convection:
Convection coefficient: Set by user in
hconv“FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May 2015
19
Physics – radiation & convection (3/3)
With cylindrical or Cartesian coordinates some surfaces (e.g. cones) are not described exactly
This has to be taken into account for area cooling, i.e. radiation or convection. For example, the convection coefficient or the emissivity can be reduced by √2 to compensate for the excessive area of cooling
“FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May 2015
20
Physics – customization (1/2) Adding time/node dependent heat/sink heat
sources through function ss, e.g.:
Setting a modulation factor for the DOSE as a function of position and time through fH, e.g.:
*
“FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May 2015
21
Physics – customization (2/2) Setting boundary temperatures through
adjustTEMP, e.g.:
Customizing the output to printout temperature profiles, etc. as a function of time through subroutine printTEMPr
“FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May 2015
22
Benchmarking – test 1 (1/2)
Infinite slab of thickness L with constant temperature at inner surface T(x=0,t)=T1, cooled externally through radiation (only).
Convection coefficient is h, conductivity is k, external temperature is T∞
What is the temperature at T2=T(x=L,t>>)??
(Exact) Analytic solution for equilibrium (t>>):
x T1
T∞
0 L
ε, σSB
T2(t>>)?
“FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May 2015
23
Benchmarking – test 1 (2/2) Script used to fill Cartesian (nx=200 x ny=1 x
nz=1) FLUKA usrbin ascii type file with power deposition=0 in all bins No cooling on y/z + 1 bin y & z ‘inifinte’ plane
Analytical Result
T2 = 953.57 K
FHeat3D Result:
T2 = 953.77 K(evolution: 300 s, CPU = 33 s)
For T1=1000 K, T∞=300.0 K, ε=1, L=10 cm; k/L=0.1
User routine adjustTEMP used to set temperature condition at x=0, IF (i.eq.1) THEN; TEMP(i,j,k) = T1…
Runtime options used to set initial temperature and special material (not in database)
“FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May 2015
24
Benchmarking – test 2 (1/2)Infinite cylindrical shell of inner radius r1 and outer radius r2 with constant temperature at inner surface T(r1,t)=T1, cooled externally through convection (only).
Convection coefficient is h, conductivity is k, external temperature is T∞
What is the temperature T2(r2) for equilibrium??
(Exact) Analytic solution for equilibrium (t>>):
r1
r2
T1T2(t>>)?
T∞
“FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May 2015
25
Benchmarking – test 2 (2/2) Script used to fill cylindrical (nr=200 x nθ=1 x
nz=1) FLUKA usrbin ASCII type file with power deposition=0 in all bins
No cooling on top/bottom + 1 bin only ‘infinite’ cylinder
Analytical Result
T2 = 375.13 KΔT2=-624.87
FHeat3D Result:T2 = 375.49 KΔT2 = -624.51 K(evolution: 200 s, CPU = 23 s)
For T1=1000 K, T∞=323.15 K, k=1, h=0.6, r1=10 cm, r2=2*r1
User routine adjustTEMP used to set temperature condition at r1, IF (i.eq.1) THEN; TEMP(i,j,k) = T1… Runtime option used to set initial temperature and custom material (not in database)
“FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May 2015
26
Benchmarking – test 3 (1/2)Infinite cylinder of radius r0 with initial temperature Ti, cooled externally through convection (only).
Analytic series for temperature evolution:
r0
T1(t)T2(t)?
T∞
Where:
and
are the (infinite) roots of
What is the temperature evolution for T1=T(r=0,t) and T2=T(r0,t)??
“FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May 2015
27
Benchmarking – test 3 (2/2)Parameters used for comparison: Ti=1000 K; T∞=300 K; Bi=1; r0=1 cm; ρ=Cp=k=1 Fo=tEquations computed to fifth order, i.e.
Φ
T [s]
Evolution data obtained with regular FHeat3D output (maxtemp for r=0 and mintemp for r=1)
“FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May 2015
28
Benchmarking – test 4 (1/2)Finite cylinder of radius r0 = 10 cm and height L = 10 cm is heated ‘internally’ by a uniform source of 1 W/cm3, and cooled in all the external faces by the Tamb=300K environment via convection (h=10 W/cm2/K)… how much does the temperature rise at equilibrium? Script used to fill cylindrical (nr=200 x nθ=1 x
nz=200) FLUKA usrbin with uniform power deposition
Runtime option used to set heat power normalization and custom material properties
User settings to activate convection in rmax, zmin,
zmax and to set h & Tamb
r0
T0(t>>)?
Tamb
L/2
L/2
1 W/cm3
“FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May 2015
29
Benchmarking – test 4 (2/2)Finite cylinder of radius r0 = 10 cm and height L = 10 cm is heated ‘internally’ by a uniform source of 1 W/cm3, and cooled in all the external faces by the Tamb=300K environment via convection (h=10 W/cm2/K)… how much does the temperature rise at equilibrium?
r0
T0(t>>)?
Tamb
L/2
L/2
1 W/cm3
FOR K=1 [W/cm/K]; Cv=1 [J/s/K]; ρ=5 [g/cm3]…
FHeat3D:ΔT0 (t= 80 s) = 25.7916 KΔT0 (t=200 s) = 25.7918 K40000 bins
ANSYS16 Workbench:ΔT0 (16371 elem.) = 25.547
KΔT0 (38700 elem.) = 25.602
K“FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May 2015
30
Applications – example 1 (1/2)10 kW, 4 GeV, 1 kHz, 850 μm RMS e- beam on a
multi-foil W target (r=1 cm, L=10 cm)
Temperature map, plot on geometry with FLAIR
geoviewer (same settings)
FLUKA DOSE map, shown over geometry
using FLAIR geoviewer “FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May
2015
31
Applications – example 1 (2/2)10 kW, 4 GeV, 1 kHz, 850 μm RMS e- beam on a
multi-foil W target (r=1 cm, L=10 cm)
Voids between foils are set through material function either manually (e.g. IF (mod(k,2).eq.0) THEN…) or automatically setting a threshold for DOSE under which the region is set to vacuum/air“FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May
2015
32
Applications – example 2 (1/2)
d
• Symmetry Cartesian scoring used to increase FLUKA statistics & reduce FHeat3D CPU time
• Several simulations FLUKA+FHeat3D sent for different impact parameters (d), using batch scripts to send & convert & retrieve & plot data
What is the minimum melt time if a 1.2 MW, 4 GeV, 32 micron e- beam strikes on the jaw of a {2x2x30cm3} Cu collimator?
• Heat radiation neglected & no convection (in vacuum).
“FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May 2015
33
Applications – example 2 (2/2)What is the minimum melt time if a 1.2 MW, 4 GeV, 32 micron e- beam strikes on the jaw of a {2x2x30cm3} Cu collimator?
“FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May 2015
Tim
e to
sta
rt m
elti
ng
[C
]
Ab
sorb
ed p
ow
er [
W]
distance to jaw edge [cm]
34
Applications – example 3 (1/3)Design of LCLS-II beam dump: 120 kW e- at 4 GeV on a Al-1100 cylinder, R=15 cm; L=150 cm – water cooling at 35 C on ~30% of perimeter, h = 7900
Co
nve
ctio
n P
ow
er [
W]
Pea
k Te
mp
erat
ure
[C
]
Analyzing evolution to determine when to stop calculation convection power = deposited power
Time [s]Analyzing the sensitivity of peak temperature to grid size to determine how fine it has to be
dR [cm]P
eak
Tem
per
atu
re [
C]
1 2
“FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May 2015
35
Applications – example 3 (2/3)Design of LCLS-II beam dump: 120 kW e- at 4 GeV on a Al-1100 cylinder, R=15 cm; L=150 cm – water cooling at 35 C on ~30% of perimeter, h = 7900
Melting temperature
Pea
k Te
mp
erat
ure
[C
]
Studying failure cases and sensitivity to parameters, e.g. 2-step FHeat3D to check cooling failure
Time [s]Analyzing effect of R=2.5 beam rastering on dump (source written for FLUKA step)
Time [s]P
eak
Tem
per
atu
re [
C]
3
Cooling is lost here
4Δ
T [
K]
Beam is ra
stered
Beam on dump axis
“FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May 2015
36
Applications – example 3 (3/3)Design of LCLS-II beam dump: 120 kW e- at 4 GeV on a Al-1100 cylinder, R=15 cm; L=150 cm – water cooling at 35 C on ~30% of perimeter, h = 7900
Discrepancies of peak temperature with ANSYS analysis are within <0.3% ΔT
“FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May 2015
37
Closing remarks
FHeat3D can help design accelerator components where energy deposition is a concern. Although it can be used as a stand alone tool, it has been written to be used in conjunction with FLUKA/FLAIR environment and should be easy to use for FLUKA intermediate+ users
License terms are still undefined, but certainly some brush-up is needed prior to any wide distribution
“FHeat3D a heat transfer code for FLUKA & FLAIR” – Mario Santana Leitner – SLAC – FCM May 2015