CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > CFX

Controlling Total Pressure using Conditional Loops

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 10, 2015, 06:41
Default Controlling Total Pressure using Conditional Loops
  #1
New Member
 
Engineer
Join Date: Mar 2013
Posts: 18
Rep Power: 12
nnprashant is on a distinguished road
Hallo,

I am trying to simulate a model with massflow inlet (2 inlets) and a single static pressure outlet. Saying that I need to have an absolute total pressure at my inlet of 1.0 bar. I have achieved it by monitoring the total pressure at inlet and then decreasing my relative static pressure at outlet.

Instead of doing it manually, is it possible to write a CEL using so that it monitors the total pressure at inlet and thereby reduces the static pressure at outlet by an user-defined factor say for every 50 Iterations.

Any help would be much appreciated.
nnprashant is offline   Reply With Quote

Old   April 10, 2015, 06:47
Default
  #2
Senior Member
 
JuPa's Avatar
 
Mr CFD
Join Date: Jun 2012
Location: Britain
Posts: 361
Rep Power: 14
JuPa is on a distinguished road
Yes I think you can do what you want using simple CEL expressions.

There is an example in the CFX reference guide which uses variable inlet Temperature (and not mass flow rate). In your case replace temperature with mass flow rate since the theory is the same.

In the reference guide it's located in:

14.3.2. Example: Feedback to Control Inlet Temperature
JuPa is offline   Reply With Quote

Old   April 10, 2015, 06:58
Default
  #3
New Member
 
Engineer
Join Date: Mar 2013
Posts: 18
Rep Power: 12
nnprashant is on a distinguished road
Hallo RicochetJ

Thanks for the info. I have gone through the example, but the value of temperature is a step function which fluctuates between two values. In my case, to have a desired total pressure at inlet, i do not have a limit (say lower) limit for my static pressure. I do not know before hand for what value of static pressure would i get a absolute total pressure of 1 bar at inlet.

Is it possible to write a If loop for example,

if(massFlowAve(Total Pressure)@Inlet ==1.0[bar],DoNotChangeStaticPressure,ChangemyStaticPressureb ya Factor)
nnprashant is offline   Reply With Quote

Old   April 10, 2015, 09:01
Default
  #4
Member
 
Peter
Join Date: Sep 2011
Location: Germany
Posts: 39
Rep Power: 14
PeMo is on a distinguished road
Maybe you can try:

statOut=areaAve(Pressure)@Outlet
staticPressOut=if(massFlowAve(Total Pressure)@Inlet <1.0[bar],statOut,factor1*statOut)
where factor1<1
This works only if your coming from a high pressure. When you want to regulate from both sides (as you intended with ==1bar) you have to use sth like:

staticPressOut=if(massFlowAve(Total Pressure)@Inlet ==1.0[bar],statOut,changepressure)
changePressure=if(massFlowAve(Total Pressure)@Inlet >1.0[bar], factor1*statOut, factor2*statOut)
where factor1<1 and factor2>1
But in this case it is probably getting unstable since you never reach exactly 1bar.
(Not tested, just a guess)
PeMo is offline   Reply With Quote

Old   April 10, 2015, 09:38
Default
  #5
Senior Member
 
JuPa's Avatar
 
Mr CFD
Join Date: Jun 2012
Location: Britain
Posts: 361
Rep Power: 14
JuPa is on a distinguished road
I just realised something...

If you want 1.0 bar at the outlet, and you don't know what to have on the inlet then just simply do this:

Set the outlet as a pressure outlet with a pressure of -1.0 bar

Set the inlets as openings with a pressure of 0 bar.

The solver will automatically determine the mass flow rates and pressures needed at the opening to maintain continuity.
JuPa is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Total pressure and mass flow boundary condition at inlet bscphil OpenFOAM Pre-Processing 3 July 9, 2017 15:39
"Pressure Inlet" Boundary Setup Wijaya FLUENT 15 May 18, 2016 11:08
Total pressure BC with simple foam duri OpenFOAM Running, Solving & CFD 1 March 20, 2012 09:05
rotating frame of reference and total pressure viking ANSYS 1 November 24, 2010 00:25
total pressure in CFX Atit Koonsrisuk CFX 0 January 1, 2005 06:46


All times are GMT -4. The time now is 06:01.