New Reply

How to check my iteration results

 
Share Thread Thread Tools
Apr14-11, 12:50 AM   #1
 

How to check my iteration results


I'm working on an interaction project for my propulsion class. I am to do an analysis on a quasi-one-dimensional air flow in a duct that is 1 meter long.

Length 1 meter
Isentropic flow
no work interaction
[tex]P_0=101325[/tex]Pa
[tex]T_0=288[/tex]K
Mach=0.5
cross-section area at inlet=0.1 m^2
cross-section area at exit=0.4345 m^2

I'm to perform 100,000 iterations from the inlet to the exit to calculate the exit conditions

P, T, velocity, Mach, P total, T total.

We are to use differential analysis. I wrote MATLAB code to perform this analysis but I'm also required to check my results against analytical results.

Could someone explain to me how to calculate the analytical results?

The exit conditions as calculated from my program are as follow below. Attached is my code.


Exit pressure = 101325.9571 Pa
Exit temperature = 288.0015 K
Exit velocity = 168.8889 m/s
Exit Mach = 0.49997
Exit total pressure = 191802.8588 Pa
Exit total temperature = 86.3911 K
Exit density = 0.28613 kg/m^3
P/P*= 0.99999
rho/rho*= 4.3448
T/T*= 0.99999
U/U*= 1.0001
Pt/Pt*= 0.62665
Tt/Tt*= 3.5004
Attached Files
File Type: m aeromidterm2.m (1.7 KB, 7 views)
PhysOrg.com
PhysOrg
science news on PhysOrg.com

>> Bird's playlist could signal mental strengths and weaknesses
>> Minus environment, patterns still emerge: Computational study tracks E. coli cells' regulatory mechanisms
>> Bacterium uses natural 'thermometer' to trigger diarrheal disease, scientists find
Apr14-11, 07:04 AM   #2
 
Recognitions:
Science Advisor Science Advisor
I suppose the first thing you would need to do is check to see if your exit area is smaller than the critical area. If not, then you should be able to just use Mach tables to find your exit conditions given your area ratio.

Have you done a sanity check on your results? Your exit area is more than 4x larger, but your exit Mach is only 0.0003 different.
Apr14-11, 09:06 AM   #3
 
I was thinking the same thing about the area and Mach. I've worked with these equations about 5 times now. I'll have to post later my steps for coming up with the equations used for the iterations.
Apr14-11, 03:53 PM   #4
 

How to check my iteration results


So I went through the algebra again and came up with a different equation for my velocity but now my Mach number increased. Something is seriously wrong. Here is my work.

As we move along the nozzle for each iteration, the area increases by dA.
steps=100,001

A variable with subscript i represents the value of the variable at the current step.
A variable with subscript j represents the value of the variable at the previous step, i-1.

[tex]dA=(A_{exit} - A_{inlet})/(steps-1)[/tex]
So at any iteration step, the area can be calculated by,

[tex]A_i=A_j+dA[/tex]

Given:
[tex]\frac{d\rho}{\rho}+\frac{dU}{U}+\frac{dA}{A}=0[/tex]

But [tex]\frac{d\rho}{\rho}=\frac{\rho_i-\rho_j}{\rho_j}[/tex], like wise for the other terms.

[tex]\frac{\rho_i-\rho_j}{\rho_j}+\frac{U_i-U_j}{U_j}+\frac{A_i-A_j}{A_j}=0[/tex]

Simplifying and solving for [tex]\frac{\rho_i}{\rho_j}[/tex]

(1) [tex]\frac{\rho_i}{\rho_j}=3-\frac{U_i}{U_j}-\frac{A_i}{A_j}[/tex]

Given:
[tex]\frac{dP}{\rho}+UdU=\frac{-\tau_w*C*dx}{\rho{A}}+\eta*dw[/tex]

(*) [tex]\frac{P_i-P_j}{P_j}+U_j(U_i-U_j)=\frac{-\tau_w*C_i*dx}{\rho_j*A_j}+\eta*dw[/tex]

[tex]dS*\tau_w=1/2*C_f*\rho_j*U_j^2*C_i*dx[/tex]

[tex]dS=C*dx[/tex]

So then [tex]\tau_w=1/2*C_f*\rho_j*U_j^2[/tex]

Plugging into (*) and simplifying.

[tex]\frac{P_i-P_j}{P_j}+U_j(U_i-U_j)=\frac{-1/2*C_f*U_j^2*C_i*dx}{A_j}+\eta*dw[/tex]

Solve for [tex]\frac{P_i}{P_j}[/tex]

[tex]\frac{P_i}{P_j}=\frac{-.5*C_f*U_j^2*C_i*dx}{A_j}+\eta*dw-U_j(U_i-U_j)+1[/tex]
I then grouped the non-iterative terms of subscript i (including [tex]C_i[/tex]) into a variable called [tex]\beta[/tex].

[tex]\beta=\frac{-.5*C_f*U_j^2*C_i*dx}{A_j}+\eta*dw+1[/tex]

So now

(2) [tex]\frac{P_i}{P_j}=\beta-U_j(U-i-U_j)[/tex]

Given:
[tex]C_p*dT+UdU=d_q+d_w[/tex]

Solving for [tex]T_i[/tex]

[tex]T_i=\frac{d_q+d_w}{C_p}-\frac{U_j(U_i-U_j)}{C_p}+T_j[/tex]

Letting [tex]\alpha=\frac{d_q+d_w}{C_p}+T_j[/tex]

(3) [tex]T_i=\alpha-\frac{U_j(U_i-U_j)}{C_p}[/tex]

Given:
[tex]\frac{dP}{P}=\frac{d\rho}{\rho}+\frac{dT}{T}[/tex]

[tex]\frac{P_i-P_j}{P_j}=\frac{\rho_i-\rho_j}{\rho_j}+\frac{T_i-T_j}{T_j}[/tex]

Simplifying and solving for [tex]\frac{P_i}{P_j}[/tex]

(4) [tex]\frac{P_i}{P_j}=\frac{\rho_i}{\rho_j}+\frac{T_i}{T_j}-1[/tex]

So, eq (2) into (4):

(5) [tex]\beta-U_j(U_i-U_j)=\frac{\rho_i}{\rho_j}+\frac{T_i}{T_j}-1[/tex]

eq 3) into (5):

(6) [tex]\beta-U_j(U_i-U_j)=\frac{\rho_i}{\rho_j}-\frac{U_j(U_i-U_j)}{T_j*C_p}-1[/tex]

eq (1) into (6):

[tex]\beta-U_j(U_i-U_j)=3-\frac{U_i}{U_j} - \frac{A_i}{A_j} + \frac{\alpha}{T_j} - \frac{U_j(U_i-U_j)}{T_j*C_p} -1[/tex]

Gathering all [tex]U_i]/tex] terms:

[tex]-U_j(U_i-U_j)+\frac{U_i}{U_j}+\frac{U_j(U_i-U_j)}{T_j*C_p}=3-\beta-\frac{A_i}{A_j}+\frac{\alpha}{T_j}-1[/tex]

Factoring the [tex]U_i[/tex] term:

[tex]U_i\left(-U_j+\frac{1}{U_j}+\frac{U_j}{T_j*C_p}\right)=2-\beta-\frac{A_i}{A_j}+\frac{\alpha}{T_j}-U_i^2+\frac{U_i^2}{T_j*C_p}[/tex]

[tex]U_i=\left(2-\beta-\frac{A_i}{A_j}+\frac{\alpha}{T_j}-U_j^2+\frac{U_j^2}{T_j*C_p}\right)\left(-U_j+\frac{1}{U_j}+\frac{U_j}{T_j*C_p}\right)^{-1}[/tex]

To find the other values of the parameters my professor suggested to use these equations:

[tex]\rho_i=\frac{\rho_j*U_j*A_j}{U_i*A_i}[/tex]

[tex]T_i=T_j+\frac{.5*(U_j^2-U_i^2)+dq+dshaft}{C_p}[/tex]

[tex]P_i=\rho_i*R*T_i[/tex]

R=283, and [tex]C_p[/tex]=1004

[tex]M_i=\frac{U_i}{\sqrt{\gamma*R*T_i}}[/tex]

It would be very much appreciated if someone could check over my steps. I've solved through these equations like 6 times and I can't figure out what I'm doing wrong. The only thing I can think of is the term [tex]\frac{-\tau_w*C*dx}{\rho{A}}[/tex] in equation (2). I thinking that maybe the denominator term should be [tex]\rho_i*A_i[/tex]. Any suggestions would be greatly appreciated.
New Reply
Thread Tools


Similar Threads for: How to check my iteration results
Thread Forum Replies
iteration-errors Calculus & Beyond Homework 0
Picard's Iteration Differential Equations 4
iteration General Math 4
how to check implicit differentiation results with calculator? Calculus 1