Average velocity or cup-mixing temper... Log Out | Topics | Search
Moderators | Register | Edit Profile

FlexPDE User's Forum » User Postings » Average velocity or cup-mixing temperature « Previous Next »

Author Message
Top of pagePrevious messageNext messageBottom of page Link to this message

Renato Pantuliani (cheng)
New member
Username: cheng

Post Number: 1
Registered: 11-2007
Posted on Saturday, November 03, 2007 - 03:34 am:   

I'm dealing with a simple laminar flow in a duct.
I would like to evaluate the average temperature at each position along the z-axis.
It is defined as
Tb=r_Integral(2*r*vz*T)/r1^2*vz0
in which vz0 is the average velocity (a constant in my case).
I tried to introduce a new variable in my problem, and the related equation is
dr(Tb)-2/(r1^2*vz0)*r*vz*T=0.
However, I get very large oscillation in the value of Tb. Is there a simple way to solve the problem?
Here is the whole program:

=============
TITLE 'Heat transfer Flow in a Tube'
COORDINATES ycylinder('r','z')
VARIABLES vr vz p T Tb
DEFINITIONS
L=1.3e-2 r1=5.0e-3
vz0=1e-4 visc=1e-3 dens=1e3
cond=0.6 Cp=4100 rcp=dens*Cp
T0=300 Tw=350
natp=0

EQUATIONS
vr: dr(p)- visc*[ 1/r*dr(r*dr(vr))- vr/r^2+ dzz(vr)]=0
vz: dz(p)- visc*[ 1/r*dr(r*dr(vz))+ dzz(vz)]=0
p: 1/r*dr( r*dr(p))+ dzz(p)- 1e4*visc/L^2* div_v=0
T: -cond*[ 1/r*dr(r*dr(T))+ dzz(T)]+ rcp*[ vr*dr( T)+ vz*dz( T)]=0
Tb: dr(Tb)-2/(r1^2*vz0)*r*vz*T=0

BOUNDARIES
region 'domain' start 'outer' (0,-L)
natural(vr)=0 value(vz)=vz0 value(T)=T0 natural(p)=natp value(Tb)=0 line to (r1,-L) { In }
value(vr)=0 value(vz)=0 value(T)=Tw natural(p)=natp natural(Tb)=0 line to (r1,L) { Wall }
value(vr)=0 natural(vz)=0 natural(T)=0 value(p)=0 natural(Tb)=0 line to (0,L) { Out }
value(vr)=0 natural(vz)=0 natural(T)=0 natural(p)=0 value(Tb)=0 line to close { Axis }
PLOTS
elevation(Tb) from (r1,-L) to (r1,L) export file='Tb.tbl'

END

================
Top of pagePrevious messageNext messageBottom of page Link to this message

Robert G. Nelson (rgnelson)
Moderator
Username: rgnelson

Post Number: 982
Registered: 06-2003
Posted on Saturday, November 03, 2007 - 02:58 pm:   

1.
Your boundary conditions on TB are wrong. TB is not zero along the bottom boundary. This introduces a condition that cannot be met, so the trial solution oscillates strongly.

2.
Introducing the equation dr(Tb) = Q*v*T does not simply define Tb, it imposes the constraint that v*T = dr(Tb)/Q. Nonlinear problems require a reasonable starting value to guarantee convergence, and Tb=0 is not a good starting estimate of Tb.

There are several ways to deal with this issue:

1.
Simply create two scripts. Exclude Tb from the first script, and TRANSFER the results to a file. Copy the first script to the second. Instead of solving for Vr,Vz,P and T in the second script, simply TRANSFER them in. Use only the Tb equation to solve for Tb.

2.
Alternatively, you can use STAGES to eliminate the coupling to Tb from the first stage. Include it in the second stage, after the primary variables have established their proper values. The attached script shows this method. The parameter "switch" turns off the nonlinear coupling to Tb in the first stage.

I have also added a small z-diffusion term in the Tb equation. Finite element equations are based on integrals over the volume surrounding each mesh node. If there is no coupling in one of the spatial dimensions, the integrals can support oscillatory solutions in this dimension. Since your Tb equation has no z-derivative terms, I have added a small one to couple the z dimension. Use a coefficient equal to the square of the distance over which oscillations should be smoothed. (See Tech Note "Smoothing Operators in PDE's")

There are still some oscillations in the resulting Tb plot. This is due to insufficient mesh density to model the shape exactly. If you are using the Student version of FlexPDE, there is not much you can do about this. If you are using the professional version, try using RESOLVE TB.


application/octet-stream
test2.pde (1.2 k)

Add Your Message Here
Post:
Username: Posting Information:
This is a private posting area. Only registered users and moderators may post messages here.
Password:
Options: Enable HTML code in message
Automatically activate URLs in message
Action:

Topics | Last Day | Last Week | Tree View | Search | Help/Instructions | Program Credits Administration