|
[Sponsors] |
December 16, 2016, 14:28 |
Controlling pressure drop with source terms
|
#1 |
Member
Howard
Join Date: Jun 2012
Posts: 43
Rep Power: 14 |
Hello!!!
So, I'm trying to simulate a filter and to do that I need to be able to control the pressure drop across a narrow region. I've been trying to do that by using a source term and the DEFINE_SOURCE macro. My problem has been that I can't seem to specify the delta P values. For example: DEFINE_SOURCE(cake_resist_x,c,t,dS,eqn) { real source; real dx=0.01; source=-1/dx; return source; } I'm applying this momentum source on the first layer of cell next to a surface. So the dx variable represents the depth of that first layer (each cell is like a cube of side 0.01). I expect that the value of the pressure drop between the inlet and outlet to be eventually 1. And it does converge to a value, but it is never very precise and it never gets to 1. Usually it goes to 0.5. So that's my problem. I need to control the pressure drop between the inlet and the outlet. I've been trying with a source term but it doesnt seem to be working very well or very precisely. Has anyone done something like this? Am I missing something obvious? Is there a better way? Am I ignoring some variable that effects the delta P other than the source term? My understanding is that: source*DX=dP where DX is the distance over which the source term is applied and dP is the pressure diffference that this adds. Any ideas are welcome |
|
December 16, 2016, 14:40 |
|
#2 |
Member
Howard
Join Date: Jun 2012
Posts: 43
Rep Power: 14 |
So, I attached a graph of the pressure drop as a function of time... I start to apply the source term at 0.1 s into the simulation. and this is running a source term very similar to the one above.
A bit more info: the mesh is basically rectangular, with the inlet a square 1 m2, then 0.1 m forward a porous jump with 0 dp and 0.1 m after the outlet; the fluid speed is 0.1 m/s; fluid is air; energy equation off; laminar; the walls dont add friction; |
|
December 19, 2016, 09:16 |
|
#3 |
Senior Member
Kevin
Join Date: Dec 2016
Posts: 138
Rep Power: 10 |
Can't you simply use a Porous Jump boundary condition if all you want to do is to reproduce a pressure drop?
|
|
December 20, 2016, 06:37 |
|
#4 |
Member
Howard
Join Date: Jun 2012
Posts: 43
Rep Power: 14 |
That was my first thought... unfortunately I can't figure out how to link the pressure drop of the porous jump to the "mass" saved in the UDMI. Do you know how to change the dP of a pressure drop using a UDF?
|
|
December 20, 2016, 10:55 |
|
#5 |
Senior Member
Kevin
Join Date: Dec 2016
Posts: 138
Rep Power: 10 |
I don't think you can hook an UDF to the input parameters of a Porous Jump. I've never done anything like that. You can do it with a Porous Zone however. You probably achieve something similar as a Porous Jump with a Porous Zone. Just let your inertial resistance parameter depend on the streamwise coordinate, and create for example a block function, where it has a desired value over a narrow region and zero outside of that region.
Not sure if this is any helpful though. I'd need more details in order to try to help you out better. |
|
December 20, 2016, 21:22 |
|
#6 |
Member
Howard
Join Date: Jun 2012
Posts: 43
Rep Power: 14 |
That's very helpful... I have been using a source term, but a porous zone might work better... do you know if you can modify the resistance values from within the code? Do you have any examples?
|
|
December 21, 2016, 07:18 |
|
#7 |
Senior Member
Kevin
Join Date: Dec 2016
Posts: 138
Rep Power: 10 |
I've never used an UDF for the resistance factors myself, but you can connect a profile to it so you've got all the freedom to do with the factors as you'd have with an inlet condition for example. So you can have it depend on your coordinates, or some flow properties. Not sure what else you'd mean with "modify the resistance values from within the code"?
|
|
December 21, 2016, 09:07 |
|
#8 |
Member
Howard
Join Date: Jun 2012
Posts: 43
Rep Power: 14 |
I meant control the resistance factor... just what you said... So I tried last night: unfortunately I can't seem to hook the macro to fluent... The idea is to go to the fluid zone you want, turn on porous zone, and then go to the resistance factors and change from "constant" to "user defined function". That second option doesn't show up... any ideas?
|
|
December 21, 2016, 09:31 |
|
#9 |
Senior Member
Kevin
Join Date: Dec 2016
Posts: 138
Rep Power: 10 |
Did you use the DEFINE_PROFILE macro? And did you compile it? If so, what Fluent version are you using? I'm using Fluent 15 and I see the UDF option whenever I compiled a DEFINE_PROFILE macro.
|
|
December 21, 2016, 10:24 |
|
#10 |
Member
Howard
Join Date: Jun 2012
Posts: 43
Rep Power: 14 |
Actually... yeah... i got it... ill try and get back to you guys... thanks a bunch
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Custom Thermophysical Properties | wsmith02 | OpenFOAM | 4 | June 1, 2023 15:30 |
question regarding LES of pipe flow - pimpleFoam | Dan1788 | OpenFOAM Running, Solving & CFD | 37 | December 26, 2017 15:42 |
polynomial BC | srv537 | OpenFOAM Pre-Processing | 4 | December 3, 2016 10:07 |
[OpenFOAM.org] Error creating ParaView-4.1.0 OpenFOAM 2.3.0 | tlcoons | OpenFOAM Installation | 13 | April 20, 2016 18:34 |
DxFoam reader update | hjasak | OpenFOAM Post-Processing | 69 | April 24, 2008 02:24 |