Raw data and python scripts to generate the images of the article "Viscous heat backflow and temperature resonances in extreme thermal conductors" by Jan Dragasevic, Bogdan Rajkov, and Michele Simoncelli.


The data is organized as follows
#################################################
raw_data/
#################################################
	Folder containing the raw data i.e. the parameters entering the viscous heat equations for graphite with natural isotopic content, pure graphite, and hexagonal boron nitrade (h11BN) respectively:
		
		graphite_transport_coefficients.csv
		graphite_transport_coefficients_isopure_80K.csv
		hBN_transport_coefficients.csv

	All the Mathematica notebooks in the other folders use these parameters to solve the viscous heat equations. See the Supplementary Material for details.

#################################################
fig1_temp_inversion/
#################################################
	Folder containing the Mathematica notebook (fig1_temp_inversion.nb) for generation of the (CSV) data used by the python script (main.py) to plot the viscous heat backflow and temperature inversion depicted as in-plane heat flow streamlines and colouring of the graphitic tunnel-chamber device. To produce the figure:

		1. run the Mathematica notebook generating the CSV results (stream_Fourier.csv, stream_VHE_finite_slip.csv, vorticity_VHE_finite_slip.csv)
		2. plot the results by running `python3 plot.py` which creates fig1.pdf (and secondary files in .npy format)

	pyproject.toml contains the requirements of the python environment.
	The plotting directory contains helper scripts used by `plot.py` to prepare the data for plotting (csv2npy.py, postprocessing.py), show the streamlines (streamlines.py), and implement the multiscale plotting style (plot.mplstyle, colorbar.py).
	The current Mathematica notebook is reliably running on the Wolfram Mathematica 13.0 version (on Windows 11).

#################################################
fig2_transient_backflow/
#################################################
	Folder containing the data (data1.csv, data2.csv, data3.csv, data4.csv) that represents the temperature profile of the graphitic device at four time instants explained in the paper.

		Subfolder code/:
			fig2_transient_backflow.nb The Mathematica notebook that solves the transient viscous heat equations (using the transport coefficients in the raw_data/ folder) and generates an output in CSV format. The rendering of final figures at the bottom of the file takes a long time because of the custom color function; to speed up the process, the setting "StreamPoints -> Coarse" is used here for plotting, instead of "StreamPoints -> Fine" as for the figures in the article.
			plot_3d_t1.py, plot_3d_t2.py, plot_3d_t3.py, plot_3d_t4.py are the python scripts that use the data files to produce the 3-dimensional plots in the first column of the figure 2.
		
		Subfolder subfigs/: Contains all the 12 subplots used in the figure.
			t1_3d.pdf, t2_3d.pdf, t3_3d.pdf, t4_3d.pdf: first column subplots of the temperature profile generated by the python scripts;
			t1_1.pdf, t2_1.pdf, t3_1.pdf, t4_1.pdf: second column subplots of the temperature gradient heat-flux exported directly from the Mathematica notebook;
			t1_2.pdf, t2_2.pdf, t3_2.pdf, t4_2.pdf: third column subplots of the drifting heat flux exported directly from the Mathematica notebook.
			
			All subplots are labelled by timestamps (t1-t4) corresponding to the times explicitly stated in the final figure.

#################################################
fig3_resonance/
#################################################
	Folder containing the Mathematica notebooks (fig3_resonance_VHE_nat.nb, fig3_resonance_DPLE.nb, fig3_resonance_VHE_hBN.nb, fig3_resonance_VHE_pure.nb) for generation of the data files:

		rectc_Fourier_nat_80.0000000000000000_6.csv
		rectc_Fourier_pure_80.0000000000000000_6.csv
		rectc_DPLE_nat_80.0000000000000000_6.csv
		rectc_VHE_hBN_60.0000000000000000_4.csv
		rectc_VHE_nat_80.0000000000000000_6.csv
		rectc_VHE_pure_80.0000000000000000_6.csv
		
	The keywords in the name represent respectively: the shape of the device (rectangular in all cases), equations being solved, material type (natural graphite, pure graphite or h11BN), temperature (the excess zeros are a Mathematica variable remnant) and radius.

	fig3_main.py, fig3_inset_b.py, fig3_inset_c.py The python scripts that use the CSV data files to plot the respective subfigures (fig3_main.pdf, fig3_inset_b.pdf, fig3_inset_c.pdf) depicting the resonant amplification of temperature waves for the stated conditions and materials.

#################################################
fig4_resonance_vs_temp_vs_size/
#################################################
	Folder containing the data files that represent the resonant amplification as a function of average temperature and size of the devices organised by material type and equations used for modelling:

		isopure_hBN_sigma_VHE.csv
		isopure_sigma_VHE.csv
		natab_sigma_DPLE.csv
		natab_sigma_VHE.csv

	The data was created by systematically running the simulation in Fig. 3 on a supercomputer.
	
	exp.csv is the experimental data extracted from the relevant papers cited in the main text.
	
	1_DPLE_graphite_natural.py, 2_VHE_graphite_natural.py, 3_VHE_graphite_pure.py, 4_VHE_hBN.py are the python scripts that use the CSV data files to plot the respective subfigures (1_DPLE_graphite_natural.pdf, 2_VHE_graphite_natural.pdf, 3_VHE_graphite_pure.pdf, 4_VHE_hBN.pdf).