UDF boundary condition
Hi everyone,
I am doing 2D rotating detonation engine (RDE) simulation in ANSYS Fluent. For inlet boundary condition, there are three possible cases: 1. Pi > Po, where Pi is the pressure inside the domain immediately at the inlet and Po is the total inflow pressure. In this case the pressure inside the RDE at this point is very high and blocks inflow of new mixture through the inlet face. The inlet boundary acts as a wall. 2. Pcr < Pi < Po, where Pcr is the critical pressure. In this case the inlet is not chocked and new mixture flows into the RDE according to: mass flow rate = the integral of (rho*u*dA). 3. Pi < Pcr, in this case the pressure inside the domain is low. The inlet at this point is choked, so maximum flow rate of fuel is flowing into the domain. Pcr is calculated from isentropic relation. It is quite challenge for me to construct UDF for this inlet condition. It would be very appreciate if someone could help me out!!! |
As I understand it is a transient simulation so you can calculate at which time step these pressure values are occuring and use Transient Table Data boundary condition for specific time step at your inlet.
Also you can use named expression for this boundary condition to like this IF(t=2s, 1 mPa, 0mPa) You can find its tutorial here too (https://www.youtube.com/watch?v=XKmcISqR9Q4&t=417s) hope these helps. |
Pressure Inlet
You don't need a UDF for that. Just use Pressure Inlet. It allows flow only if the pressure inside is lower than that at the boundary. Do note that it allows flow-out but you can block that.
|
Thank you for the reply!
Is the pressure inside compares with critical pressure, which calculated from gauge total pressure (stagnation pressure) and the supersonic gauge pressure (static pressure) on the inlet pressure boundary? Regards, Tianxu |
Quote:
Yes, it is a transient simulation. I'll go through that! Regards, Tianxu |
Sorry but I forgot to add this, really sorrry
Here is transient table data boundary condition tutorial: https://www.youtube.com/watch?v=6iiHqOGkPCE&t=291s |
Quote:
Is the pressure inside compares with critical pressure, which calculated from gauge total pressure (stagnation pressure) and the supersonic gauge pressure (static pressure) on the inlet pressure boundary? Regards, Tianxu |
Ideal Gas
Critical pressures have no significance for ideal gases. In other words, it does not make sense to talk of critical pressure while assuming that the gas is ideal. If you want to study the flow around the critical pressure, you have to use real-gas models. Otherwise, just the pressure inlet will work. If you are worried about choking, ideal gas will do that if Mach number approaches unity.
|
Quote:
For the critical pressure, I mean that is the critical pressure of the inflow which is calculated from isentropic relation. So basically, if pressure inside is higher than total pressure at inlet boundary, the Pressure Inlet will block the inflow? Regards, Tianxu |
Pressure Inlet
If the pressure inside the chamber is higher than the total pressure applied at the boundary, then the flow will begin to come out. However, Fluent has option where you can opt not to allow the fluid to reverse at the inlet. As far as choking condition is concerned, Pressure Inlet takes care of it.
|
Quote:
|
Quote:
I actually didn't find an option for blocking back flow for pressure inlet. Do i need to use some text command to activate that? Thanks! |
Prevent Reverse Flow
The option to prevent reverse flow at pressure inlet is not available in older versions, only in newer ones, most likely after 19.2 or 19.3.
|
Quote:
I'm using 19.2, unfortunately I didn't find that... So in this case, the only way to achieve that is to write UDF? Regards, Tianxu |
Beta
I don't have 19.2, but you can try to enable beta features. It is possible that the option is available as beta feature in 19.2. If it is not available, then, UDF would be required to block the flow.
|
Quote:
I don't have experiences with beta feature. Do you mind explaining on it? How does it help for blocking the reverse inlet flow. Thank you very much! |
Beta Feature
Issue the following command in Fluent
def bfa yes ok Then, go to pressure inlet and see if it shows the option to prevent reverse flow or not. If it is available as beta feature, it will show the option otherwise not. |
Quote:
How can I disable beta feature btw? Thanks! |
Beta feature
You can use the same command to disable it. Just use no in place of yes.
|
Quote:
|
All times are GMT -4. The time now is 04:07. |