120 likes | 134 Views
ME 595M: Computational Methods for Nanoscale Thermal Transport Lecture 9: Boundary Conditions, BTE Code. J. Murthy Purdue University. Boundary Conditions. P. b. Thermalizing boundary conditions: T=T b Energy balance for CV around P: For directions incoming to domain:
E N D
ME 595M: Computational Methods for Nanoscale Thermal TransportLecture 9: Boundary Conditions,BTE Code J. Murthy Purdue University ME 595M J.Murthy
Boundary Conditions P b Thermalizing boundary conditions: T=Tb • Energy balance for CV around P: • For directions incoming to domain: • For directions outgoing to domain: ME 595M J.Murthy
Boundary Conditions (cont’d) y P si sir x • Specular boundary condition For directions incoming to domain: For directions outgoing to domain • For reflections in the (x,y) plane only changes. ME 595M J.Murthy
Boundary Conditions (cont’d) P • Diffuse boundary condition For a direction incoming to domain: For directions outgoing to domain: ME 595M J.Murthy
Boundary Conditions (cont’d) • Partially specular with specular fraction p For all directions incoming to the domain: For all directions outgoing to domain: ME 595M J.Murthy
Gray BTE Code: Overall Description • Finite volume method • 2D, steady, gray, Cartesian • Written in Fortran 77 • Divided into two parts: main and user • Main part does not change from problem to problem. • User part can be changed to set up different domain sizes, boundary conditions, source terms, properties • Uses a sequential solver which solves each direction in turn. • In each direction, a linear algebraic set of equations is solved using a line-by-line tridiagonal matrix algorithm. ME 595M J.Murthy
Structure Main Subroutines main solve reset setup1 setup2 ugrid print block data User Subroutines grid start update sources ME 595M J.Murthy
Main Subroutine Functions • main: contains the overall iterative loop • solve: contains the LBL-TDMA solver with a block correction • reset: resets coefficient matrix to zero • setup1: calculate geometric quantities associated with spatial and angular mesh • setup2: does one call of BTE’s in all directions. Discretizes equations and solves them sequentially for each direction. • ugrid: generates uniform Cartesian grid in each coordinate direction • print: prints the e” field if desired • block data: sets defaults ME 595M J.Murthy
User Subroutine Functions • grid: initializes all variables necessary to generate spatial and angular mesh. • start: is called once by main after grid has been created. Used to initialize solution and to set boundary conditions and properties that do not change with iteration. • update: is called once per iteration. This is a good place to put in updates of boundary conditions that change iteration to iteration, as well as any monitoring and printing. • sources: is called once per iteration per direction. This is a good place to put in scattering source terms. ME 595M J.Murthy
Sources • In subroutine sources: ME 595M J.Murthy
Assignment Problem Specular or diffuse T=310 K T=300 K Specular or diffuse • Solve the gray BTE using the code in the domain shown: • Investigate acoustic thickesses L/(vgeff) =0.01,0.1,1,10,100 • Plot dimensionless “temperature” versus x/L on horizontal centerline • Program diffuse boundary conditions instead of specular, and investigate the same range of acoustic thicknesses. • Plot dimensionless “temperature” on horizontal centerline again. • Submit commented copy of user subroutines (not main code) with your plots. ME 595M J.Murthy
Conclusions • In this lecture, we considered boundary conditions and also looked a gray BTE code. • Code structure and logic was discussed • Detailed nomenclature for the code was provided. • In the next lecture, we will talk about extensions to the gray model and to numerics ME 595M J.Murthy