|
[Sponsors] |
May 7, 2020, 08:22 |
UDF boundary condition
|
#1 |
New Member
Tianxu Yin
Join Date: May 2020
Posts: 24
Rep Power: 6 |
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!!! |
|
May 7, 2020, 08:50 |
|
#2 |
New Member
Join Date: Oct 2019
Posts: 20
Rep Power: 6 |
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. |
|
May 7, 2020, 09:02 |
Pressure Inlet
|
#3 |
Senior Member
|
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.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
May 7, 2020, 19:54 |
|
#4 |
New Member
Tianxu Yin
Join Date: May 2020
Posts: 24
Rep Power: 6 |
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 |
|
May 7, 2020, 19:58 |
|
#5 | |
New Member
Tianxu Yin
Join Date: May 2020
Posts: 24
Rep Power: 6 |
Quote:
Yes, it is a transient simulation. I'll go through that! Regards, Tianxu |
||
May 8, 2020, 01:34 |
|
#6 |
New Member
Join Date: Oct 2019
Posts: 20
Rep Power: 6 |
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 |
|
May 8, 2020, 01:39 |
|
#7 | |
New Member
Tianxu Yin
Join Date: May 2020
Posts: 24
Rep Power: 6 |
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 |
||
May 8, 2020, 05:18 |
Ideal Gas
|
#8 |
Senior Member
|
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.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
May 8, 2020, 22:05 |
|
#9 | |
New Member
Tianxu Yin
Join Date: May 2020
Posts: 24
Rep Power: 6 |
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 |
||
May 9, 2020, 16:15 |
Pressure Inlet
|
#10 |
Senior Member
|
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.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
May 9, 2020, 21:45 |
|
#11 | |
New Member
Tianxu Yin
Join Date: May 2020
Posts: 24
Rep Power: 6 |
Quote:
|
||
May 26, 2020, 07:48 |
|
#12 | |
New Member
Tianxu Yin
Join Date: May 2020
Posts: 24
Rep Power: 6 |
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! |
||
May 26, 2020, 09:17 |
Prevent Reverse Flow
|
#13 |
Senior Member
|
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.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
May 26, 2020, 09:30 |
|
#14 | |
New Member
Tianxu Yin
Join Date: May 2020
Posts: 24
Rep Power: 6 |
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 |
||
May 26, 2020, 09:34 |
Beta
|
#15 |
Senior Member
|
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.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
May 26, 2020, 09:49 |
|
#16 | |
New Member
Tianxu Yin
Join Date: May 2020
Posts: 24
Rep Power: 6 |
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! |
||
May 26, 2020, 09:54 |
Beta Feature
|
#17 |
Senior Member
|
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.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
May 26, 2020, 10:14 |
|
#18 | |
New Member
Tianxu Yin
Join Date: May 2020
Posts: 24
Rep Power: 6 |
Quote:
How can I disable beta feature btw? Thanks! |
||
May 26, 2020, 10:17 |
Beta feature
|
#19 |
Senior Member
|
You can use the same command to disable it. Just use no in place of yes.
__________________
Regards, Vinerm PM to be used if and only if you do not want something to be shared publicly. PM is considered to be of the least priority. |
|
May 26, 2020, 10:19 |
|
#20 |
New Member
Tianxu Yin
Join Date: May 2020
Posts: 24
Rep Power: 6 |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Cyclic boundary condition in foam-extend 4.0 | rellumeister | OpenFOAM Pre-Processing | 2 | March 3, 2020 08:03 |
Fluent Boundary Condition with UDF | amitjoshi | FLUENT | 0 | November 16, 2018 02:21 |
How do you use heat flux as a boundary condition in a non-wall area in UDF? | JuBong | Fluent UDF and Scheme Programming | 2 | July 2, 2018 21:15 |
Out File does not show Imbalance in % | Mmaragann | CFX | 5 | January 20, 2017 10:20 |
An error has occurred in cfx5solve: | volo87 | CFX | 5 | June 14, 2013 17:44 |