# Need Help to define mixing efficiency in supersonic combustion model in CFD-Post

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

May 2, 2023, 07:26
Need Help to define mixing efficiency in supersonic combustion model in CFD-Post
#1
New Member

Quoc-Viet Le
Join Date: Mar 2023
Posts: 11
Rep Power: 2
Hello guys, I want to define mixing efficiency of ethylene with if-condition

How can I define this in CFD-Post?

I tried to define like this:

areaInt((if (C2h4.Mass Fraction <= 0.06796, C2h4.Mass Fraction, (C2h4.Mass Fraction*(C2h4.Mass Fraction-1)/(1-0.06796))))* Density * Velocity u)@ Plane 140

But it seems wrong.
Attached Images
 Screenshot 2023-05-02 145148.png (79.3 KB, 4 views)

 May 8, 2023, 09:30 #2 Senior Member   Gert-Jan Join Date: Oct 2012 Location: Europe Posts: 1,772 Rep Power: 25 Better ask these things in the CFX forum. These guys have most experience in CFD-Post. Nevertheless, an If statement does not exists in Post. However, you can use a step function. which is 1 when the argument is larger than 0. And it is zero below zero. It should be something like 1. Define a variable func 2. func = Step(0.06796-C2h4.Mass Fraction)*C2h4.Mass Fraction + Step(C2h4.Mass Fraction0.06796-)*(C2h4.Mass Fraction*(C2h4.Mass Fraction-1)/(1-0.06796))))* Density * Velocity u) 3. areaInt(func)@ Plane 140 Regarding the step function, I'm not completely sure I did it correctly. Best to try the function in Excel first to graphically make sure everything is okay. Last edited by Gert-Jan; May 31, 2023 at 04:23.