Next: II.B Plotting Up: II. Basic Acoustics Previous: II. Basic Acoustics

II.A Plane-Wave Resonator

We begin with a lossy plane-wave resonator, driven from one end by a piston with a fixed volumetric velocity. We call the input file planewav.in (included in the examples directory or folder). This input file could have been created from scratch using any text editor, though this one was made by editing one of DELTAE's own output files.

TITLE     Example 1:  Plane-wave resonator                                     

BEGIN      Initialize things   0   
1.000E+05 a Mean P    Pa         
100.      b Freq.     Hz        
300.      c T-beg      K            
1000.     d |p|@0     Pa          
90.       e Ph(p)0    deg         
1.000E-02 f |U|@0    m^3/s            
.000      g Ph(U)0    deg           
helium  

ENDCAP     First end            1   
1.000E-02 a Area     m^2          
helium   

ISODUCT    Duct                 2  
1.000E-02 a Area     m^2               
.354      b Perim     m             
5.00      c Length    m            
helium     

ENDCAP     Second End           3   
1.000E-02 a Area     m^2               
helium     

HARDEND                         4    
.000     a R(1/Z)                  
.000     b I(1/Z)             
helium   

! The restart information below was generated by a previous run
! You may wish to delete this information before starting a run
INVARS      2  0  4  0  5
TARGS       2  4  1  4  2
SPECIALS    0

Several features of DELTAE input files are illustrated here. Input files should be named something.IN. These files consist of a set of segments whose order and format are important. The initial (or `zeroth') segment is always the BEGIN segment, and the last segment is usually HARDEnd (or SOFTEnd to be discussed in Chapter V). Intervening segments describe the geometry and other properties of the acoustic engine. The number and order of data in each segment is crucial. All units are MKS. Within each line, only the first number (e.g., ``1.e5" or ``100.") or word (e.g., ``helium" or ``BEGIN") is important; the rest of the line can be used as a comment field, with, for example, the units or name of the variable whose value appears. Whole-line comments can appear anywhere if they begin with ``!" or with 20 or more blanks. Numbers can be in fixed or exponential format. Segment names are all uppercase, and only the first five characters are interpreted (hence, the convention here is to write segment names longer then 5 characters with trailing lower case letters, e.g., HARDEnd. All other words must have correct CASE and spelling.

The file shown below works just as well in the computer as the one shown above. However, with fewer comment annotations and only the minimal 5-character segment names, it is harder for humans to follow; it also lacks restart information, so DELTAE might have to prompt us for some more information before proceeding.

TITLE

BEGIN
1.e5   
100.  
300.  
1000.    
90.  
1.0e-2   
.0  
helium 

ENDCA 
0.01  
helium 

ISODU
0.01    
.354     
5.00   
helium 

ENDCA
0.01   
helium 

HARDE 
.0 
0. 
helium

BEGIN sets the stage, in this case, with 1-bar room temperature helium gas being driven at 100 Hz with a pressure amplitude of 1000 Pa and, at the same phase, a volume velocity of 0.01 cubic m/s.

Since BEGIN has no geometrical properties, an ENDCAp comes next to account for oscillatory thermal losses at the first end of the resonator. An endcap is just a surface area giving dissipation. In this example, because we are beginning with a nonzero volume velocity, ENDCAp can be imagined as the face of the piston.

A lossy isothermal duct ISODUct comes next. Here, we have made the perimeter , to make this a circular duct.

The resonator ends with another ENDCAp for oscillatory pressure dissipation.

The input file then ends with the required HARDEnd segment. Its two lines are the real and imaginary parts of the inverse of the end impedance. Since we have set these two equal to zero, this is simply a hard end, with zero volume velocity.

Note that the special segments BEGIN and HARDEnd have no geometrical properties; so ENDCAps are needed to put the thermal dissipation loss at the ends of the resonator.

Figures II.1 show the acoustician's usual cartoon of a driven plane-wave resonator and a pictorial representation of how we modeled this resonator for DELTAE. Throughout this tutorial we use generally conventional symbols to represent ordinary segments such as ducts, horns, and heat exchangers.

A plane-wave resonator; conventional and DELTAE representation

This input file overdetermines the acoustic system because only some of the variables listed can be specified independently. You can choose which of these variables DELTAE will regard as fixed, which it will regard as initial guesses at solution values, and, occasionally, which it will ignore.

Execute DELTAE and respond planwave to the prompt for an input file (on a MacIntosh, double-click planwave.in, or open it using the ``New Model'' menu). You may also type DELTAE planwave, or DELTAE planwave.in, to load the file directly. DELTAE will respond with:

Loading planwave.in . . .
Example 1:  Plane-wave resonator
Ready.
DELTAE can accept either .in or .out files as input files. If you do not type the file suffix, DELTAE looks first for a .out file. If it does not find it, it looks next for a .in file; if this is not found, DELTAE reprompts for the file name. (On a MacIntosh, all of these steps are replaced by a standard file selection dialog.)

On a keyboard menu system (e.g., PC-compatible, VMS, Unix, etc.), the menu is displayed next, giving the following options:

Main Menu:
   r  (r)un model                      p      (p)lot another parameter      
   w  (w)rite current model state      P      (P)lot status summary         
   n  (n)ew model input file           c      (c)lear from vectors and plots
   T  (T)olerances/debugging           C      (C)lear|set all guesses&targets
   g  (g)eometry file                  u      (u)se in guess/target vector  
   d  (d)isplay                        v      (v)ector status summary       
   o  (o)utput to printer              m      (m)odify parameter value      
   f  (f)orm feed printer              s      (s)pecial modes editing       
   t  (t)hermophysical properties      D      (D)OS command shell
   e  (e)xit DeltaE                    ?      show this menu 

MAIN:  (rpwPncTCgudvomfstDe?)>
(On the MacIntosh, similar options are available on the menu bar for mouse selection.)

Now select ``vector status summary" by typing "v":

Iteration Vectors Summary: 
GUESS      0d          0e 
name  BEGIN:|p|@0 BEGIN:Ph(p) 
value    1.00E+03     90.     
units     Pa          deg  

TARGET      4a          4b 
name  HARDE:R(1/Z HARDE:I(1/Z 
units            
value     .00         .00    

Potential TARGETS still available are:
Addr Seg:Par-Type    Current Value

The GUESS vector, which has two components in this example, shows what DELTAE will regard as solution variables: the magnitude and phase of the beginning pressure. Their initial guesses are also shown. (This particular two-dimensional guess vector came from the computer-generated table at the bottom of the input file. This table is explained in Section III.B. If your input file has no such table, DELTAE can make a reasonable guess at the guess variables you might want when you select (C)lear|set all guesses&targets with no guesses defined yet.)

Further, we insist that DELTAE refine this two-dimensional GUESS vector to find a solution to this acoustics problem by arriving at the HARDEnd with zero complex volume velocity. This is accomplished by getting the `0' values of the real and imaginary parts of the inverse of the impedance in the HARDEnd segment into DELTAE's two-dimensional TARGET vector, as shown in this vector summary table.

The last two lines indicate unselected, still-available targets. These are the only remaining output values for which DELTAE has a reserved input variable available to compare with it.

Most of the thought required to successfully run DELTAE occurs while staring at this vector status summary table, trying to figure out which of the variables are appropriate guesses and targets. While the choice of variables is almost entirely arbitrary, as long as the number of guesses equals the number of targets, some choices for the guess vector would have little or no effect on the desired result. For example, allowing DELTAE to try to achieve resonance in a given length by varying the areas of the endcaps would be futile. For the examples in subsequent Chapters, the choice of good guess and target vector members is not always as obvious as it is here.

For now, we will keep these vectors. ``Run" the code (type `r'), and ``(e)xit" from DELTAE to the operating system to inspect its results, which DELTAE has put in two new files, planewav.dat and planewav.out. planewav.dat looks like this:

-= Example 1:  Plane-wave resonator                                         =-
 frequency=     100.000Hz     mean pressure=   1.000E+05Pa

  T(K)          p(Pa)                U(m^3/s)             hdot(W)   wdot(W)

   300.0      2933.    2586.6      0.01000  0.00000          14.7     14.67

 ENDCAP    First end           

   300.0      2933.    2586.6      0.00997 -0.00002          14.6     14.59

 ISODUCT   Duct                
 Duct wavvec =(   0.623    ,  -6.207E-03) m^-1

   300.0     -2931.   -2588.9     -0.00003 -0.00002           0.1      0.07

 ENDCAP    Second End          

   300.0     -2931.   -2588.9      0.00000  0.00000           0.0      0.00

 HARDEND   Final               
 inverse impedance (rho a U/p A)=(  -5.898E-08,   6.704E-08)

   300.0     -2931.   -2588.9      0.00000  0.00000           0.0      0.00

Examination of planewav.dat will show that the solution is Re(p) = 2933 Pa, Im(p) = 2587 Pa. Also shown are temperature, complex p, and complex U, work flow, and enthalpy flow at the beginning and end of each segment. You can see, for instance, that the driver delivers 14.7 Watts of power to the resonator, that 0.1 Watts is absorbed on each end, and that 14.5 Watts is absorbed by the duct.

The output model file, planewav.out, is shown below:

TITLE     Example 1:  Plane-wave resonator                                        
!------------------------------------------------------------------------
 BEGIN      Initial              0
   1.000E+05 a Mean P    Pa               3.911E+03 A |p|@0  G( 0d)     P   
    100.     b Freq.     Hz                41.4     B Ph(p)0 G( 0e)     P   
    300.     c T-beg     K              
   3.911E+03 d |p|@0     Pa     G       
    41.4     e Ph(p)0    deg    G       
   1.000E-02 f |U|@0    m^3/s           
   0.000     g Ph(U)0    deg            
 helium     Gas type
 ideal      Solid type
!------------------------------------------------------------------------
 ENDCAP     First end            1
   1.000E-02 a Area      m^2              3.911E+03 A |p|       Pa          
                                           41.4     B Ph(p)     deg         
                                          9.972E-03 C |U|     m^3/s         
                                         -0.143     D Ph(U)     deg         
                                           14.6     E Hdot      W           
                                           14.6     F Work      W           
 helium     Gas type
 ideal      Solid type
!------------------------------------------------------------------------
 ISODUCT    Duct                 2
   1.000E-02 a Area      m^2              3.910E+03 A |p|       Pa          
   0.354     b Perim      m               -139.     B Ph(p)     deg         
    5.00     c Length     m               3.748E-05 C |U|     m^3/s         
                                          -139.     D Ph(U)     deg         
                                          7.328E-02 E Hdot      W           
                                          7.328E-02 F Work      W           
 helium     Gas type
 ideal      Solid type
!------------------------------------------------------------------------
 ENDCAP     Second End           3
   1.000E-02 a Area      m^2              3.910E+03 A |p|       Pa          
                                          -139.     B Ph(p)     deg         
                                          2.135E-08 C |U|     m^3/s         
                                          -7.20     D Ph(U)     deg         
                                         -2.757E-05 E Hdot      W           
                                         -2.757E-05 F Work      W           
 helium     Gas type
 ideal      Solid type
!------------------------------------------------------------------------
 HARDEND    Final                4
   0.000     a R(1/Z)          = 4G?      3.910E+03 A |p|       Pa          
   0.000     b I(1/Z)          = 4H?      -139.     B Ph(p)     deg         
                                          2.135E-08 C |U|     m^3/s         
                                          -7.20     D Ph(U)     deg         
                                         -2.757E-05 E Hdot      W           
                                         -2.757E-05 F Work      W           
                                         -5.898E-08 G R(1/Z)                
                                          6.704E-08 H I(1/Z)                
 helium     Gas type
 ideal      Solid type

! The restart information below was generated by a previous run
! You may wish to delete this information before starting a run
! where you will (interactively) specify a different iteration
! mode.  Edit this table only if you really know your model!
INVARS      2  0  4  0  5
TARGS       2  4  1  4  2
SPECIALS    0

Examination of planewav.out will show that it is a slightly modified version of our planewav.in: It includes the solution values for magnitude and phase of beginning pressure, replacing our original guesses. DELTAE would have made this file as it is even if we had used the bare-bones, unannotated version of the input file. In *.out files, DELTAE numbers the segments and `letters' the lines in each segment for our convenience, and displays names and units for all variables. It adds the obscure table that reflects our choice of guess and target vectors. The format of DELTAE's .out file is acceptable as an input file, so renaming this file something.in can save the user a lot of work.

As a new example, we will find the resonance frequency f, which we guess is near 100 Hz. We'll use the same old planewav.in, so execute DELTAE again and select it. Display the vector status summary again.

Iteration Vectors Summary: 
GUESS      0d          0e 
name  BEGIN:|p|@0 BEGIN:Ph(p) 
value    1.00E+03     90.     
units     Pa          deg  
TARGET      4a          4b 
name  HARDEND  :R(1/Z HARDEND  :I(1/Z 
units    
value     .00         .00

Now we want f, |p|in segment BEGIN as the 2 components of the guess vector. We will fix the phase of the beginning p at 0, because having p and Uin phase at the driver is the condition for resonance. So we want to change this table to look like this:

0.8

Iteration Vectors Summary: 
GUESS      0b          0d 
name  BEGIN:Freq. BEGIN:|p|@0 
value    1.00E+02    1.00E+03 
units    Hz        Pa  
TARGET      4a          4b 
name  HARDEND  :R(1/Z HARDEND  :I(1/Z 
units     
value     .00         .00

We can this change in guess vector by a ``(c)lear" of 0e from the guess vector; ``(u)se" 0b instead; and ``(m)odify" 0e to be zero degrees instead of 90. (These vectors happen to be identical to DELTAE's default, so we could have generated this table by selecting (C)lear|set twice-first to wipe out the old vectors, and then again to set the defaults.) Now, ``(r)un" the calculation. Inspect the results by using ``(d)isplay'' from within DELTAE (or by escaping to the operating system). You will find that the resonance frequency is 100.9 Hz.

If you can't remember the number-letter code for the variable you want when modifying the vectors, ``(d)isplay" all segments, or ``(d)isplay" a selected segment number to see a list of the variables. For example, ``(d)isplay" segment 0 to find out which number-letter code is for frequency:

INPUT     # ParType Units  Status      OUTPUT    # ParType Units  Status
------------------------------------------------------------------------
BEGIN      Initialize things    0  
1.000E+05 a Mean P    Pa                .000     A |p|@0     0d      P 
100.      b Freq.     Hz                .000     B Ph(p)0    0e      P      
300.      c T-beg     K             
1.000E+03 d |p|@0     Pa      G       
90.0      e Ph(p)0    deg     G      
1.000E-02 f |U|@0    m^3/s           
.000      g Ph(U)0    deg          
helium     Gas type
ideal      Solid type

DELTAE can use any physically appropriate variables in the guess vector. You can determine what temperature makes the model resonate at 100 H, by putting 0c in the guess vector. (The answer is 290.7 Kelvin.) Or, by putting 2c in the guess vector, we could have found out what length the model needs to be to resonant at 100 Hz at 300 K. An advanced feature to be discussed in Chapter IV allows use of the concentration in a binary gas mixture to be used (as a member of the guess vector) so that we could determine the argon concentration that would be required in the helium to make the resonance at 100 Hz.



Next: Plotting Up: Basic Acoustics Previous: Basic Acoustics


ww@lanl.gov
Tue Jul 26 15:29:48 MDT 1994