Sie sind auf Seite 1von 29

Brian England

Objective
 Process of whiskey maturation & Current Efforts to
improve
 Comparison Goals
 Modeling nonlinear Diffusion
 Cylindrical Coordinates
 Initial and Boundary Conditions
 Methodologies and Computational Results
 Finite Difference
 Finite Volume
 Function Space
 Final Comparison and Conclusion
Maturation of Whiskey
 Driven by two processes
 Diffusion of Oak barrel goodness
 Short time scales
 Chemical reaction
 Long time scales

 Current Efforts
 Diffusion
 Wooden inserts , tastes more processed and is lacking
 Chemical Reactions
 Pressure vessels / burners to shift % yields and reaction rates
 Much better and they’re improving on this front
Comparison Goal
 General Comparisons
 Accuracy
 Stability
 Computational Efficiency

 I will primarily deal with Computational Efficiency


 Validate a methodology for utilization in future work
Modeling Nonlinear Diffusion
 What makes the Diffusion Nonlinear?
 Changes in differential operators

 Best coordinate system


 Ellipsoidal
 Much more Complex

 Cylindrical Coordinates
 Easier & exact solution are readily available
Cylindrical Coordinates
 Differential Operator Adjustments

U 1 U U
 Gradient U  , ,
r r  z

 Divergence 1   rFr  1 F Fz


 F   
r r r  z

 Curl  1 Fz F   Fr Fz  1    rF  Fr 


 F    ,  ,   
 r  z   z r  r  r  

 Laplacian 1     rU   1  2U  2U
 
  U    2
r r  r  r  2
 2
z
Initial and Boundary Conditions
 First Comparisons
 Boundary Conditions
 Chosen to ensure an equilibrium
 
U (t ,1, , z )  cos   sin  z
2 
U (t , r , , 1)  cos  r 

 Initial Condition

U (0, r , , z)  0
Finite Difference Approach
 General PDE U 1 U  2U 1  2U  2U
  2  2  2
t r r r r  2
z

 Centered Difference Spatial Discretizations


 2U U i 1, j ,k  U i , j ,k  U i 1, j ,k U U i 1, j ,k  U i 1, j ,k
 
r 2
 
 r
2 r 2r

 Forward Euler in Time


U
 f (U , r )  U n 1  U n  (t ) f (U , r )
t
Stability
 The discretization

U  2U  U in1  2U in  U in1 
  2  U  U   (t ) 
n 1 n

t x  x 2

 Requirement for Stability t  x 2

2

 For our PDE, the largest linearized coefficient is the


most restrictive
1  2U 1 r 4
   2  t 
rmin 
2 2
r 2
Good news (->Stability)
 Can get away with ~ dR = 0.05 & dt = 0.000625
 Wall Clock time = 36.68 Seconds
 Tolerance set to Flux/function values of 0.01
Finite Volume Method
 More work apriori!
 Approach PDE with Gauss’ Law & Integral Form
 Our PDE in Integral Form

 U 
V  t 
dV  K   U dV


V

 The Integral Form allows us to represent the average


value of our function
U   1 U
V t dV  t V UdV  V t  V  V UdV  V t
Final Exact Formulation
 Utilizing Gauss’ Law    FdV   F  dS
V S

 Making appropriate substitutions

    K U  dV  K  U   dS
V S

U K 6
 We obtain the final form 
   U  dSi
t V i 1 Si

Finite Volume Approximations
n 1 K  
 Difference in time U  U  t
n
 Net Flux 
V

U U in1  U in
 Differences on the boundaries 
r r

 Calculation of Fluxes   SZ U j 1  2U j  U i 1 
Net Axial


Net Azimuthal

Sr 
r
U j 1  2U j  U i 1 

  Sr  (r  dr / 2)(U i 1  U i )  (r  dr / 2)(U i  U i 1 ) 
Net Radial
Cell Volume & Surface Integrals
V   rout  rin2  z  r zr
1 2
 Volume
2

 Axial Surface SZ 
2

1 2
rout  rin2    r r

 Radial Surfaces Sr  r z

 Azimuthal Surfaces S  r z
Items of Note
 Method is fully conservative
 Only approximations lie in the derivative at the cell
surfaces
 When proper substitutions of the volume / surfaces is
performed, it’s almost identical to finite difference
 What benefits are there?
 We’re still approximating derivatives
 Leads to order of accuracies
 Computations is about the same
Results
 Same scenario as finite difference
 Stability –
 Required dt = 0.0001
 1/6th the dt
 There may have been corner issues
 Wall Clock 359 Seconds
 10 times as long
 Even if the dt was matched, this method would still be
slower
 For now
Function Space Methods
 Rely on Eigen function products
 Coefficients are solved via inner products
 Integrals are approximated by function evaluations at
collocation points
 Our Problem - Diffusion Equation in Cylindrical Coordinates
 Choice of Eigenfunctions
 Radial - Bessel functions of the first kind
 Azimuthal – Trigonometric
 Axial – Trigonometric
 Temporal - Exponential
Exact Solution
 Fundamental Technique
 Principle of Superposition
 Handle a separate problem for each boundary and
initial state for a steady state solution and transient
U (t , r, ,1)  ftop (r,  ) U (t ,1, , z)  f Lat ( , z)

U (t , r , , 1)  fbot (r , ) U (0, r , , z )  f Lat (r, , z )


General Solution
 Step by step “Separation of Variables”
 First Time U (t , r , , z )  T (t ) (r , , z )
 Which Gives T (t )
 (r ,  , z )  T (t )2 (r , , z )
 Separating and solving t
 t 1   2 1  2  2
T (t )  e  2  2
r r r r  2
 2    0
z

 Letting  (r, , z)  R(r )( )Z ( z)


1 R(r ) 1  2 R( r ) 1  2( ) 1  2 Z ( z)
  2   
rR(r ) r R(r ) r 2
r ( )  2
Z ( z ) z 2
General Solution
 You can show that our ODE’s
1  2( ) 1  2 Z ( z)
m
 l 2
Z ( z ) z 2
( )  2

 2 R(r ) R(r )
 Provides r2
 r  
 (   m) r 2
 l 2
 R(r )  0
r 2
r

 General Solution – depends on our BC-s


Solution
 Primary Case - Initial Conditions with homogenous BC=0
 
  
  

U (t , r ,  , z )    Almn e  lmn t
cos  mz  J l   m r S in  l  
2

l 0 m0 n 0  2  
 
  
  

   Blmn e lmnt cos  mz  J l   m 2 r Cos  l  
l 0 m 0 n 0  2  
 l = is an integer greater than or equal to 0.
 kl ,n , is the nth root of the Bessel function of the first kind
of order L
 m is an integer greater than or equal to 0.
 Finally lmn  kl ,n  m
2
Constants
 The constants are solved via
1
1 0 0
2
U (0,
1
r ,  , z ) cos


2
mz

 l

J    m 2

r sin  l  rdrd dz
Almn 
1 2 1
cos 2 
1 0 0  2  l mz
 2
J    m 2
r 
sin 2
 l  rdrd dz

1
1 0 0
2
U
1
(0, r ,  , z ) cos


2
mz




J l   m 2

r cos  l  rdrd dz
Blmn 
1 2 1
cos 2 
1 0 0  2  l mz J
 2
  m 2
r cos 2
 l  rdrd dz
Collocation Points
 Azimuthal Fourier  j  2 / N
 Evenly distributed
 Axial fourier  2 j 1 
 Chebyshev nodal locations
x j  cos  
 2Nz 
 Radial – Bessel
 Roots of m’th order Bessel function
 Best used in tabular form to save on computations
Collocation Methods
 Numerous Integration techniques
 Quadrature at collocation points for A and B
 Standard – Gaussian Quadrature
 Radial and Axial Weights
 Polynomial Approximations
 Azimuthal Weights
 Trigonometric Approximation
 We’ll use nodal locations, i,j,k, to calculate weights
2   
f (r , , z )rdrd dz   wijk f (ri , j , zk )
1 1
  
1 0 0
i 1 j 1 k 1
Separation of Variables
 Through some integration and appropriate initial
conditions we can state
 1   
 1 Z 0 ( z ) cos  mz  dz 

2  

0
2
0 ( )sin  l  d   R ( r ) J 
0
1
0 l  
  m 2 r rdr

 
Almn 1

0
J l2   m2 r rdr

 1   
 1 Z 0 ( z ) cos  mz  dz 

2  
 2

0
0 ( ) cos  l  d   R ( r ) J 
1

0 0 l  
  m 2 r rdr

 
Blmn 1
 0
J l2   m2 r rdr

 We can now approach each integral with our


approximation
Weight Calculation (Axial)
 A bit of matrix manipulation and brute force

 With fixed nodes


 1 inverse and done!

 1 1 ... 1 1   c1   11 
 x  
 1 x2 ... xN 1 xN   c2   21 
 ...
 N 2
... ... ...
  

...   ...    ...  1   1

n

 x1 x2N  2 ... xNN 12 xNN  2  cN 1  ( N  1) 1 
 x1N 1 x2N 1 ... xNN 11 xNN 1   cN   N 1 
Weight Calculation (Azimuthal)
 Trigonometric Gaussian Quadrature
 Maximal Trigonometric Degree of Exactness
 New Quadrature Methodologies
 “Trigonometric Orthogonal Systems and Quadrature
Formulae with Maximal Trigonometric Degree of Exactness”
 Gradimir V. Milovanovic  

 Easier assumption   sin(n )d   wi f (i ) i 1

 Requires proper initial conditions


 1 1 ... 1 1   w1   11 
 sin x  
 1 sin x2 ... sin xN 1 sin xN   w2   21 
 ... ...   ...    ...   1
n1
... ... ...
 N 2    
sin x1 sin x2N  2 ... sin xNN 12 sin xNN  2   wN 1  ( N  1) 1 
 sin x1N 1 sin x2N 1 ... sin xNN 11 sin xNN 1   wN   N 1 
Weight Calculation (Radial)
 Requires Bessel functions

J n (r )dr   wi f n (ri )
1
 0
i 1

 1
2 m n
 1
m m
1   x 
 1 
  dr  
1

0
J n (r )dr  J * N
0  
m 0 m !( m  n  1)  2 
 
m 0 m !( m  n  1)  2m  n  1 

 J 0 ( x1 ) J 0 ( x2 ) ... J 0 ( xN 1 ) J 0 ( xN )   w1   J1* 
 J (x )  
 1 1 J1 ( x2 ) ... J1 ( xN 1 ) J1 ( xN )   w2   J 2* 
 ... ... ... ... ...   ...    ... 
    
 J N 1 ( x1 ) J N 1 ( x2 ) ... J N 1 ( xN 1 ) J N 1 ( xN )   wN 1   J N* 1 
 J N ( x1 ) J N ( x2 ) ... J N ( xN 1 ) J N ( xN )   wN   J N* 
Conclusion
 Function Space methods
 Very time consuming apriori
 Didn’t get to finish
 Expectation of fast convergence
 Approximation lies only with initial / boundary
conditions
 Exact solution for all time after (for the given approx)

Das könnte Ihnen auch gefallen