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

How to write a time-varying pressure gradient inlet?

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 3 Post By Crane_

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   January 8, 2022, 09:53
Default How to write a time-varying pressure gradient inlet?
  #1
New Member
 
Guo Zongchao
Join Date: Nov 2021
Posts: 8
Rep Power: 5
Crane_ is on a distinguished road
Hello, everyone.
I meet a trouble while setting pressure gradient. My inlet pressure gradient is time-varying, and there is a formula looks like dp/dy=acos(ωt). ZeroGradient and fixedGradient are all useless for me. How could I write this inlet condition?
I would appreciate it if someone could give me some ideas.
Crane_ is offline   Reply With Quote

Old   January 10, 2022, 07:58
Default
  #2
Member
 
Lukas
Join Date: Sep 2021
Posts: 36
Rep Power: 5
Pappelau is on a distinguished road
Hello Crane,
i don't know if u already found a solution for your problem, if not :


Go to the userguide for foam there u will find this chapter :
https://cfd.direct/openfoam/user-guide/v9-boundaries/
5.2.3.4 Time-varying boundary conditions (Openfoam 8/9)



I think u find your answer there
Pappelau is offline   Reply With Quote

Old   January 10, 2022, 22:53
Default
  #3
New Member
 
Guo Zongchao
Join Date: Nov 2021
Posts: 8
Rep Power: 5
Crane_ is on a distinguished road
Quote:
Originally Posted by Pappelau View Post
Hello Crane,
i don't know if u already found a solution for your problem, if not :


Go to the userguide for foam there u will find this chapter :
https://cfd.direct/openfoam/user-guide/v9-boundaries/
5.2.3.4 Time-varying boundary conditions (Openfoam 8/9)



I think u find your answer there
Pappelau:
Thank you very much for your kind reply. Actually I know these time-varying boundary conditions, but I think they can only used for pressure condition, instead of pressure gradient condition. For pressure gradient, I only find conditions like zeroGradient and fixedGradient, but they all can't be used for changing gradient.
Crane_ is offline   Reply With Quote

Old   January 11, 2022, 02:39
Default
  #4
Member
 
Lukas
Join Date: Sep 2021
Posts: 36
Rep Power: 5
Pappelau is on a distinguished road
The Function1 should be implemented in FixedGradient also:

find $FOAM_SRC/finiteVolume/fields/fvPatchFields -type f -name "*.H" | xargs grep -l Function1


OpenFOAM-8/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedGradient/uniformFixedGradientFvPatchField.H


at least does the search say so (I never used variable gradients)
Pappelau is offline   Reply With Quote

Old   January 11, 2022, 09:57
Default
  #5
Senior Member
 
Julio Pieri
Join Date: Sep 2017
Posts: 109
Rep Power: 9
JulioPieri is on a distinguished road
Quote:
Originally Posted by Pappelau View Post
The Function1 should be implemented in FixedGradient also:

find $FOAM_SRC/finiteVolume/fields/fvPatchFields -type f -name "*.H" | xargs grep -l Function1


OpenFOAM-8/src/finiteVolume/fields/fvPatchFields/derived/uniformFixedGradient/uniformFixedGradientFvPatchField.H


at least does the search say so (I never used variable gradients)
I believe this is true. Instead of writing

Code:
wall
    {
        type            fixedGradient;
        value           uniform 416.67;
    }
you could replace "uniform" for "table" and write ((1 100)(2 120)), or something like that. Not sure if it will work.

From the UserGuide link provided:
Quote:
table: inline list of (time value) pairs; interpolates values linearly between times.
In any case, this can be very easily done with swak4Foam
JulioPieri is offline   Reply With Quote

Old   January 17, 2022, 03:17
Default
  #6
New Member
 
Guo Zongchao
Join Date: Nov 2021
Posts: 8
Rep Power: 5
Crane_ is on a distinguished road
Thanks for your help. I got some inspiration from both of your replies, and write like this
Code:
 
INLET      
    {
        type            uniformFixedGradient;
        uniformGradient   cosine;
                    frequency        0.2;
                    amplitude        2*pi/5.00*1.00;
                    scale            1;  // Scale factor for current
                    level             0;  // Offset
     }
and I found that pressure changes over time and space. I think it may be true but the final results of my case is still different with existing calculation results. Perhaps there are some errors outside the boundary conditions.
Anyway, thanks for giving me ideas to solve the problem.
JulioPieri, Sakun and Pappelau like this.
Crane_ is offline   Reply With Quote

Old   October 28, 2022, 06:54
Default
  #7
Senior Member
 
Sakun
Join Date: Nov 2019
Location: United Kingdom
Posts: 152
Rep Power: 7
Sakun is on a distinguished road
Hello everyone,


Sorry to jump into this thread,


I am running compressor blade simulation and i need to give total pressure gradually for my simulation. can get some suggestions from your expertise ?


Thanks in advance
Sakun is offline   Reply With Quote

Reply

Tags
pressure gradient, time varying


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
[IHFOAM] The IHFOAM Thread Phicau OpenFOAM Community Contributions 392 September 8, 2023 19:10
Adjuting oulet pressure till inlet pressure reaches a certain value in timestep pvpnrao OpenFOAM Running, Solving & CFD 2 September 11, 2018 11:14
Floating point exception error lpz_michele OpenFOAM Running, Solving & CFD 53 October 19, 2015 03:50
Micro Scale Pore, icoFoam gooya_kabir OpenFOAM Running, Solving & CFD 2 November 2, 2013 14:58
IcoFoam parallel woes msrinath80 OpenFOAM Running, Solving & CFD 9 July 22, 2007 03:58


All times are GMT -4. The time now is 21:03.