Bergh-Tijdeman Solution: Extended Kutin-Svete Formulation
Version 1.0.1 (34.8 KB) by
Emma Farnan
For calculating the frequency response of a line-cavity system with N tubes and cavities in series.
Compute the System Response of Line-Cavity Systems
A system of tubes and cavities aligned in series will impose resonance peaks and phase shifts to pressure fluctuations occurring at the entrance of the system. Understanding this frequency response is critical for unsteady measurements using pitot tubes or recessed surface probes. Bergh and Tijdeman developed a recursive analytical solution to predict the response of such systems. Kutin and Svete later proposed an alternate form to this soltion that uses volume-averaged parameters to better capture the fluctuations within the transducer cavities. The Kutin-Svete formulation has been extended to be compatible with multi-tube/cavity systems.
INPUTS / OUTPUTS
INPUTS:
- Tubes: [meters] 2D Matrix of the lengths and Radii of the "thin tubes". Should be in [2 x N] matrix where N is the number of tube/cavity pairs. Top row indicates tube radii from Tube 1 to Tube N, Bottom row is tube length from Tube 1 to Tube N. Dimensions expected in meters.
- Vols: [meters] 2D Matrix of the lengths and Radii of the "transducer cavities". Should be in [2 x N] matrix. Top row indicates cavity radii from Cavity 1 to N, Bottom row is cavity lengths. Radius and length can be set to 0 to represent a discontinuity in radius between two adjacent tubes.
- f: [Hz] Vector of frequencies to compute system response at. Input as either 1D vector, or 2 values representing upper and lower frequency bounds of response.
- med: Properties of the working fluid within the system. Variety of input methods - look at Gas Properties Import for more information.
- doplots: [logical] Set as false to supress all automatically generated figures in the function.
OUTPUTS:
- G: Complex system response computed at each frequency. For multi-tube systems, the output is a complex matrix with dimensions [N x length(f)]. Each of N columns represents system response up to the given tube. Ex: with N = 5, the response defined by G(5,:) represents P5/P4 - the response of the 5th tubing/cavity pair, G(3,:) represents P5/P2, and G(1,:) represents P5/P0 - the response of the overall system. Thus, if only the total system response is desired, only first row of G will ever be needed.
Gas Properties Import
To add flexibility for users, the gas properties can be set a variety of ways (via the 'med' input variable)
STRING INPUT: sets the gas properties for 1 of 5 common gases at 20 C and 101.325 kPa. The available gases and their corresponding strings are:
- 'Air' - Dry Air
- 'N2' - Pure Nitrogen
- 'O2' - Pure Oxygen
- 'Ar' - Pure Argon
- 'He' - Pure Helium
STRUCTURE INPUT: Allows for manually setting gas properties. For air, many properties can be calculated from just temperature and pressure. For other gases, several properties are required inputs.
Required Structure/fields for air properties
- med.gas = 'Air'
- med.T = Temperature between 50 and 1400 [K]
- med.P = Pressure below ~200 [kPa]
Required structure fields for all other gases
- med.T = Temperature (K)
- med.P = Pressure (kPa)
- med.R = Individual Gas Constant (J/kg•K)
- med.mu = Dynamic Viscosity: μ (Pa•s aka N•s/m^2)
- med.gamma = Ratio of Specific Heats: γ = Cp/Cv (Unitless)
- med.Cp = Isobaric Specific Heat Capacity (J/kg•K)
- med.lambda = Thermal Conductivity: λ (W/m•K)
- med.gas = OPTIONAL: Name of working gas (string)
ADDITIONAL FILES
Required:
- besselzero.m = For the Nth zero of the Bessel Functions (needed for computing the thermodynamic index of cavities: n_v)
Optional:
- AirProperties_kPaK.m = Used to compute air properties near STP (250 K < Temp < 600 K) if only inputting temperature and pressure. Allows for inputting humidity, Dew Temperature, and mole fraction of CO2
- AirPropTable2.m = Used to compute air properties over greater range (50 K < Temp < 1400 K) if only inputting temperature and pressure.
- DrawTubeVolSystem.m = For generating a scaled drawing of the described geometry
REFERENCES
- Bergh, H., and Tijdeman, H. Theoretical and Experimental Results for the Dynamic Response of Pressure Measuring Systems. https://vegvesen.brage.unit.no/vegvesen-xmlui/bitstream/handle/11250/193925/NLR%20TR%20F.238.pdf?sequence=1.
- Kutin, J., and Svete, A. “On the Theory of the Frequency Response of Gas and Liquid Pressure Measurement Systems with Connecting Tubes.” Measurement science & technology, Vol. 29, No. 12, 2018, p. 125108. https://doi.org/10.1088/1361-6501/aae884
- SFitz (2023). Calculation of air properties (https://github.com/sjfitz/AirProperties/releases/tag/v2.0.1), GitHub. Retrieved January 27, 2023.
- Keenan, J. H., Chao, J., and Kaye, J., "Gas Tables: International Version: Thermodynamic Properties of Air, Products of Combustion and Component Gases, Compressible Flow Functions: Including Those of Ascher H. Shapiro and Gilbert M. Edelman," John Wiley & Sons, 1983.
% EXAMPLE INPUT TO FUNCTION
tubes = [0.8, 1.2; 250, 750]./1000; % Tube 1: 250 mm long, 0.8 mm radius. Tube 2: 750 mm long, 1.2 mm radius.
vols = [0, 2.1; 0 8]./1000; % Cavity 1: not present = tube discontinuity. Cavity 2: 8 mm long, 2.1 mm radius.
f = linspace(1,5000,1001); % Frequencies from 1 Hz to 5000 Hz
med.gas = 'Air'; med.T = 300; med.P = 98; % Air at 300 K and 98 kPa
% Call function
Gtemp = BerghTijdeman_KSimproved(tubes,vols,f,med,false); % Call the function but supress the plotting
G = Gtemp(1,:); % Isolate the system response of the tubing
% Plot the magnitude and phase
figure; loglog(f,abs(G)); % Magnitude
figure; semilogx(f,unwrap(angle(G))); % Phase lag
Cite As
Emma Farnan (2024). Bergh-Tijdeman Solution: Extended Kutin-Svete Formulation (https://www.mathworks.com/matlabcentral/fileexchange/169653-bergh-tijdeman-solution-extended-kutin-svete-formulation), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R2023a
Compatible with any release
Platform Compatibility
Windows macOS LinuxTags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.