Writing an expression for fully developed flow!
Hi guys, i am simulating a flow on a backward facing step. I want to impose fully developed flow at the inlet in a rectangular duct. In CFX tutorials (i think its tutorial 9) where it tells us how to write an expression for a circular pipe. But can i use that expression for a rectangular duct??
I think i cant use it! How can i then write an expression for a fully developed flow at the inlet of rectangular duct. 
Re: Writing an expression for fully developed flow
Hi Usman,
Instead of using an expression, specify the inlet static pressure and pick the zero gradient option for velocity and turbulence, this will result in a fully developed velocity profile (on any cross section). Note that you will need to specify the flow rate at the outlet. For the zero gradient option to work properly you must have a grid which is orthogonal to the inlet. If you have a hex mesh, you'll be OK. If it is unstructured, you'll need to add inflation at the inlet. CycLone 
Re: Writing an expression for fully developed flow
Hi CycLone
Thank you for your answer. Can you enlighten me on how to calculate mass flow rate at the outlet of duct when the simulation is unsteady. For unsteady simulation mass entering the domain is not same as mass leaving the domain. Usman 
Re: Writing an expression for fully developed flow
Usman,
Is there any reason why your mass flow is not same when it's entering and leaving the domain under an unsteady situation? 
Re: Writing an expression for fully developed flow
Hi Jakjak,
If the flow is incompressible, or the density varies with temperature, it's possible to accumulate mass within the domain in a transient simulation. Usman, If that is the case you won't be able to use the approach I described, but how would you have fully developed flow at the inlet if it is changing in time? CycLone 
Re: Writing an expression for fully developed flow
Yes, exactly for unsteady flow mass accumulates within a domain. I guess the only option i am left with is either to make my duct longer OR i can look into CEL function. Anyways thanks for help guys!
Usman 
Re: Writing an expression for fully developed flow
For the CEL expression, just make the velocity a function of the distance from the wall using the appropriate algebraic relationship for the profile. If you locate a local coordinate system at the boundary, you can use this for the boundary condition and specify the functions relative to this coordinate system.
Alternatively, you could still use the static pressure option, but make the static pressure a function of the local mass flow rate. If you have specific flow rate which is desired, you can set the pressure to increase or decrease as it deviates from this mass flow, but you'll have to be careful about how you do this. Just keep in mind that when you integrate quantities at a boundary, such as calculating the total mass flow or the average pressure, the expression will return the values from the old timestep. In other words, these values are not active. Here's an example of how to make the inlet pressure respond to the mass flow rate so as to match a desired flow rate. In a steady state simulation this would settle down to a specific flow rate, but it may not get your flow rate exactly in the transient simulation. Ps old = areaAve(p)@inlet Mdot spec = 1 [kg/s] Mdot old = massFlow()@inlet Ps spec = Ps old + A*(Mdot old  Mdot new) A = 5 [Pa/(kg/s)] In the above expressions, Ps spec is the specified boundary value (i.e. put this expression in the boundary condition), and Mdot spec is the desired mass flow rate. A is a linearization coefficient which determines how the pressure will respond. I put a value here for A, but you'll need to determine one that gives you the right behavior. Ideally, this should be a function of the timestep and represents the dynamic response of the upstream system to a change in mass flow rate. You could derive an approximate algebraic relationship for A by integrating the NavierStokes equations over the upstream system. See equations 4, 5, & 6 from the Discretization and Solution Theory or refer to any fluids textbook. By doing so, you are effectively adding a control volume upstream of the boundary. CycLone 
Re: Writing an expression for fully developed flow
Thank you so much for your help Cyclone. Stay in touch!
Usman 
Re: Writing an expression for fully developed flow
Hi,
instead of using a cel expression, you could also use a BC profile of a fully developed flow on your inlet boundary. Just model a straight duct with the crosssection of your inlet, and export the velocity profile of the outlet with CFXPost in a file and import this file as an inlet profile for your backward facing step problem. The length of your duct should be larger than 0.06*Reynolds_Number*Hydraulic_Diameter. Regards, Greg 
Re: Writing an expression for fully developed flow
If you take this approach, just extrude a cross section of the inlet and make a mesh with one element in the extruded dimension. Set the model up as linear peridic (in the extruded direction) and specify either a pressure drop or target mass flow on the interface. You'll end up with a fully developed profile which you can use as Greg describes.
CycLone 
Re: Writing an expression for fully developed flow
Thank you Greg and Cyclone, i will look into this option as well. My static pressure option seems to be working for now!

Re: Writing an expression for fully developed flow
CycLone:
hi, i have a quesetion about your cel function, how to get Mdot new ? would you tell me the CEL expression? thanks! 
Re: Writing an expression for fully developed flow
Sorry, that should have been "Mdot spec", since the "new" mass flow is desired to be your specified mass flow.
Ps old = areaAve(p)@inlet Mdot spec = 1 [kg/s] Mdot old = massFlow()@inlet Ps spec = Ps old + A*(Mdot old  Mdot spec) A = 5 [Pa/(kg/s) CycLone 
All times are GMT 4. The time now is 11:47. 