CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Oscillating Pressure Gradient at the inlet

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By steezorigineez

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 2, 2014, 10:26
Default Oscillating Pressure Gradient at the inlet
  #1
New Member
 
Harish Dixit
Join Date: Feb 2014
Posts: 2
Rep Power: 0
hdixit is on a distinguished road
Hello all,

I have a uniform inlet flow which is oscillating as U=U_{\infty} + A \sin(\omega t). If I use the continuity and the momentum equation, I get \partial u/\partial x=0. My x-momentum equation reduces to \partial p/\partial x = -\partial u/\partial t.

This gives me \partial p/\partial x = -A \omega \cos(\omega t). How do I put in such an oscillating pressure gradient at the inlet? I am looking for something along the lines of OscillatingFixedValue for inputting Dirchelet boundary conditions.

Please note that I have ignored (the constant) density in the above discussion since this can be absorbed in the case of incompressible Newtonian flow.

Thanks,
Harish
hdixit is offline   Reply With Quote

Old   October 10, 2014, 20:07
Default
  #2
Member
 
Nevada
Join Date: Apr 2014
Posts: 32
Rep Power: 12
razi.me05 is on a distinguished road
Hi Harish,

Did you get any solution to your problem? I'm facing exactly the same kind of problem.
razi.me05 is offline   Reply With Quote

Old   November 12, 2014, 18:14
Default
  #3
New Member
 
Ian Pond
Join Date: Jan 2013
Posts: 11
Rep Power: 13
steezorigineez is on a distinguished road
Hi Guys,

I am currently simulating a pulsatile channel flow using a modified pimpleFoam solver. I am simulating a 2D periodic channel with a cosinusoidal pressure gradient. Using LaunderSharma KE turb model and the mesh is 256 in the wall normal direction and 8 in the axial direction. The inlet and outlet are set as cyclic BCs.

The way I have it set up now is I created a new solver by copying the pimpleFoam solver and adding a pressure gradient with a cosine term to the momentum equation in Ueqn.C. I believe this is the correct way to setup a flow with an oscillating pressure gradient.

I am having trouble in terms of convergence of the phases over each period at the moment.

Let me know if you have any thoughts or questions.
steezorigineez is offline   Reply With Quote

Old   November 16, 2014, 20:25
Default
  #4
New Member
 
Ian Pond
Join Date: Jan 2013
Posts: 11
Rep Power: 13
steezorigineez is on a distinguished road
Just wanted to update you and let you know that I was able to successfully get a pulsating channel running and the convergence issue is fixed. Let me know if you want the code.

-Ian
steezorigineez is offline   Reply With Quote

Old   May 26, 2015, 06:02
Default need code
  #5
Member
 
SM
Join Date: Dec 2010
Posts: 97
Rep Power: 15
canopus is on a distinguished road
Hi Ian
Can you please share the code?
I have sent you a pm.
Regards
SM
canopus is offline   Reply With Quote

Old   May 26, 2015, 11:35
Default
  #6
New Member
 
Ian Pond
Join Date: Jan 2013
Posts: 11
Rep Power: 13
steezorigineez is on a distinguished road
Here is the git link to the code that I have used to successfully simulate a pulsating channel flow with an oscillating pressure gradient. It also includes the transport of scalar temperature. Let me know if you have any questions or comments.

https://github.com/ianbpond/pimpleFoamPulsTemp
canopus likes this.
steezorigineez is offline   Reply With Quote

Old   May 27, 2015, 18:24
Default questions
  #7
Member
 
SM
Join Date: Dec 2010
Posts: 97
Rep Power: 15
canopus is on a distinguished road
Hi Ian
I checked out the code and could run it on the test case provided along with.
Sorry for stupid questions as this is my first brush with OF application development

1. I guess you are solving for U=U_{\infty} + A \sin(\omega t) where U_{\infty} = 0 ?

2. what does fvOptions(U) do in UEqn.h?
Code:
 fvm::ddt(U) + fvm::div(phi, U) + turbulence->divDevReff(U)
 ==    fvOptions(U) + dpdx*cos(Freq*runTime.time().value())
3.
Code:
dpdx*cos(Freq*runTime.time().value())
is added as a source to momentum equation in UEqn.h and implies pressure gradient is set as 1/\rho( \partial p/\partial x) = -A \omega \cos(\omega t)?

4. Is -A/\rho \omega lumped together in dpdx which is set to 1 in constant/transportProperties? (dpdx sounds bit confusing)

5. constant/transportProperties:alphaPuls is not used ?

Thanks
SM
canopus is offline   Reply With Quote

Old   May 27, 2015, 19:29
Default
  #8
New Member
 
Ian Pond
Join Date: Jan 2013
Posts: 11
Rep Power: 13
steezorigineez is on a distinguished road
Hi canopus,

1. I designed this code to match a DNS simulation which solves the Navier Stokes eqn in the following form.

\frac{\partial u_i}{\partial t} + u_j\frac{\partial u_i}{\partial x_j} = -\cos(\omega t) +\frac{1}{Re}\frac{\partial^2 u_i}{\partial x_j^2}

where \nu = 1/Re

2. The fvOptions(U) doesn't do anything as far as I know, I just left it in there. It could be removed I believe.

3. Yes that is the added source term which represents the -\cos(\omega t) in the above equation.

4. For our simulation \rho = 1, so the dpdx term is just an amplitude of the pressure, equal to 1 for our case, I don't have the extra \omega term as you do.

5. You are correct, alphaPuls is not used

Let me know if you still have questions.
steezorigineez is offline   Reply With Quote

Old   May 29, 2015, 11:32
Default
  #9
Member
 
SM
Join Date: Dec 2010
Posts: 97
Rep Power: 15
canopus is on a distinguished road
Thank you!
Could you please point to the DNS and your own work
in case they are available in public domain?
canopus is offline   Reply With Quote

Old   June 8, 2015, 10:45
Default
  #10
New Member
 
Ian Pond
Join Date: Jan 2013
Posts: 11
Rep Power: 13
steezorigineez is on a distinguished road
Hi Canopus,

At the moment, the DNS data are not available in the pulbic domain. However, I will update when they do become available.
steezorigineez is offline   Reply With Quote

Old   June 26, 2015, 11:34
Default
  #11
New Member
 
Ian Pond
Join Date: Jan 2013
Posts: 11
Rep Power: 13
steezorigineez is on a distinguished road
I believe I may have an error in my referenced equation that is being solved. Sorry for any confusion. I will reply with the corrected equation soon.

Last edited by steezorigineez; June 26, 2015 at 11:39. Reason: Need to rewrite equation
steezorigineez is offline   Reply With Quote

Old   June 26, 2015, 13:50
Default
  #12
New Member
 
Ian Pond
Join Date: Jan 2013
Posts: 11
Rep Power: 13
steezorigineez is on a distinguished road
Please take note of an error in my original equation. It should be as follows.

\frac{\partial u_i}{\partial t} + u_j\frac{\partial u_i}{\partial x_j} = -\frac{dP}{dx} +\frac{1}{Re}\frac{\partial^2 u_i}{\partial x_j^2}

where,

-\frac{dP}{dx} = A \cos(\omega t)

with A = 1.

I apologize for any confusion.
steezorigineez is offline   Reply With Quote

Old   June 26, 2015, 19:47
Default
  #13
Senior Member
 
Bernhard Linseisen
Join Date: May 2010
Location: Heilbronn
Posts: 183
Blog Entries: 1
Rep Power: 15
Linse is on a distinguished road
Concerning the fvOptions-part: If I am not mistaken, this is part of one of the latest flexibility additions in OpenFOAM. This entry looks for runTime-Code in the case structure. This way it is possible to add entries/source terms to the different equations without fully recompiling the code.

Please do not ask me further questions about this capability! I am right at the beginning of looking into it...
Linse is offline   Reply With Quote

Reply

Tags
icofoam, openfoam


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
"Pressure Inlet" Boundary Setup Wijaya FLUENT 15 May 18, 2016 10:08
vortex cause pressure gradient or pressure gradient induce vortex? fruitkiwi Main CFD Forum 4 June 12, 2012 01:12
Pulsatile pressure inlet with pressure outlet a.lynchy FLUENT 3 March 23, 2012 13:45
BC: inlet pressure gradient val17lr FLUENT 2 July 6, 2010 03:49
what the result is negatif pressure at inlet chong chee nan FLUENT 0 December 29, 2001 05:13


All times are GMT -4. The time now is 09:56.