CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   CFX (https://www.cfd-online.com/Forums/cfx/)
-   -   Trouble Using Pressure In Expression For BC (https://www.cfd-online.com/Forums/cfx/25962-trouble-using-pressure-expression-bc.html)

Nolan June 17, 2008 10:01

Trouble Using Pressure In Expression For BC
 
Hello,

I am running CFX v.11 and trying to set a fuel injector to a certain pressure based on the mass flow rate of the incoming air. With Temperature and velocity specified, this pressure will define my fuel mass flow rate at the desired equivalence ratio.

I am attempting to do this with built in CFX expressions, but when I try to use "p" in an expression, I get the following error in the .out file:

-------------------------------------------------------- Error processing expression 'Relative Static Pressure'.

The expression is invalid because:

p is not available for use in this term

--------------------------------------------------------

Even if I try something simple, like setting the pressure of the injector equal to the exit pressure of my domain, ie:

psIn = areaAve(p)@outlet

I get the same error...I have no such problems with setting temperature or velocity in this same manner.

Any suggestions?


CycLone June 17, 2008 11:10

Re: Trouble Using Pressure In Expression For BC
 
Hi Nolan,

There are no solver rules preventing the use of pressure in this manner. I'm not sure why you are getting this error, I certainly can't reproduce it.

That said, if your trying to specify the pressure based on mass flow rate, why do you need pressure in your expression?

Also, to prevent instability, you may want to include a relaxation in your pressure condition. Create an expression for PsIn as a function of mass flow rate where PsIn is your desired pressure and let PsOld and PsSpec be the current pressure and the specified pressure respectively.

PsSpec = PsOld + (Psin - PsOld)*PsRelax

Set PsRelax to a value between zero and one and use PsSpec as you boundary condition value.

-CycLone

Nolan June 17, 2008 11:46

Re: Trouble Using Pressure In Expression For BC
 
Thanks for the quick reply...

I'm not really sure why I can't use pressure at all in an expression that is then used to set my 'Relative Pressure' BC...has me completely stumped.

We typically use pressure (while holding fuel temp and velocity fixed) at the face of our supersonic injectors as a control for their flowrate. Since mass flow will scale directly with this pressure, this function would take the injector pressure (from the previous timestep) and multiply it by the ratio of (desired injector equivalence ratio/equivalence ratio from previous timestep).

Equivalence ratio is 1.0 for stoiciometric flow...and it is based on the inlet air mass flow and fuel flow rate on the injector.

For example, say at a given timestep the currently calculated ER for a given injector is 0.5 (using the fuel flow rate, inlet air mass flow rate, and the stoich. ratio for the given fuel). If my desired ER is 1.0, the pressure will be doubled on the next iteration. I felt this would probably cause instability, so thanks for the recommendation to use relaxation to slowing run the pressure up.

My problem still persists, I cannot define my pressure BC at my injector using the "p" variable in anyway. I even tried using "pabs" to no avail. Like I said, if I wanted to set the fuel temperature to some average (say tinj = areaAve(T)@inlet) it has no problem.

Hmmmm...very stumped.

CycLone June 17, 2008 19:29

Re: Trouble Using Pressure In Expression For BC
 
It may not be available for supersonic inlets. But if you inlet is supersonic, you have control over the pressure, temperature and velocity, so you should be able to compute the values needed to achieve your mass flow rate.


Nolan June 23, 2008 16:10

Re: Trouble Using Pressure In Expression For BC
 
Just as an update, I received some help from ANSYS tech support on this issue and they were able to reproduce the problem. They told me it was a bug in the solver, and posted a .ccl file to load in with my run as a workaround.

Here is the ccl: -------------------------------------------- RULES: PARAMETER: Relative Static Pressure

Parameter Type = Real

Solver Name = PRES

Quantity Type = Pressure

Dependency List = ANY

Profile Variables List = p,Pressure

Dynamic Reread Item = Yes END END --------------------------------------------

It is loaded with -ccl *.ccl added at the command line to your run. Hope it helps...


All times are GMT -4. The time now is 12:38.