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

trying to understand the boundary condition "pressureGradientExplicitSource" code

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By wyldckat

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 2, 2015, 01:17
Default trying to understand the boundary condition "pressureGradientExplicitSource" code
  #1
Senior Member
 
Huynh Phong Thanh
Join Date: Aug 2013
Location: Ho Chi Minh City
Posts: 105
Rep Power: 12
hiuluom is on a distinguished road
Greeting all,

I am using OF2.2.2 on Ubuntu 14.04. I saw the the "pressureGradientExplicitSource.C" has the inverse matrix:

Code:
const scalarField& rAU = invAPtr_().internalField();
and the "pressureGradientExplicitSource.H" explanied:

Code:
//- Matrix 1/A coefficients field pointer
        autoPtr<volScalarField> invAPtr_;
I looked up in the forum at the link http://www.cfd-online.com/Forums/ope...ning-ueqn.html. If I correct, rAU = 1/U. Why does rAU need to calculate pressure gradient in periodic equation?

Anybody can help me to understood this missed?

Thank you,
Thanh
hiuluom is offline   Reply With Quote

Old   November 3, 2015, 11:40
Default
  #2
Senior Member
 
Huynh Phong Thanh
Join Date: Aug 2013
Location: Ho Chi Minh City
Posts: 105
Rep Power: 12
hiuluom is on a distinguished road
Hi all again,

I see in the channelFoam OF 2.1.1 (http://www.cfd-online.com/Forums/ope...tml#post485952) to calculate the pressure gradient use rAU or rUA
Code:
dimensionedScalar gragPplus =
            (magUbar - magUbarStar)/rUA.weightedAverage(mesh.V());
an in the OF2.2.2 also use rAU
Code:
dGradP_ = (mag(Ubar_) - magUbarAve)/rAUave;
Does anybody understand the formula to compute the pressure gradient in periodic condition?

Thank you so much,
Thanh.
hiuluom is offline   Reply With Quote

Old   November 8, 2015, 10:09
Default
  #3
Senior Member
 
Huynh Phong Thanh
Join Date: Aug 2013
Location: Ho Chi Minh City
Posts: 105
Rep Power: 12
hiuluom is on a distinguished road
Dear all,

Some bodies can give me a document mention of gradient pressure in periodic condition?

Thank you so much,
Thanh
hiuluom is offline   Reply With Quote

Old   November 8, 2015, 10:46
Default
  #4
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answer: This fvOption was renamed to "meanVelocityForce" some weeks ago in OpenFOAM-dev and it's now part of OpenFOAM 3.0.
The commit in question was this: https://github.com/OpenFOAM/OpenFOAM...898bec5fac74ad

As for why this calculation gives you the pressure gradient, you will have to take a look at the pressure equation in the solvers, because those use "rAU" for those equations. For example, take a look at this wiki page: https://openfoamwiki.net/index.php/IcoFoam
ancipdp likes this.
wyldckat is offline   Reply With Quote

Old   November 8, 2015, 11:15
Default
  #5
Senior Member
 
Huynh Phong Thanh
Join Date: Aug 2013
Location: Ho Chi Minh City
Posts: 105
Rep Power: 12
hiuluom is on a distinguished road
Dear Bruno,

Thank you so much your answer for me.

I would like build "meanVelocityForce" to check it but I see the "patchMeanVelocityForce". What is it and how to correctly build "meanVelocityForce".

Best regards,
Thanh
hiuluom is offline   Reply With Quote

Old   November 8, 2015, 11:26
Default
  #6
Retired Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,975
Blog Entries: 45
Rep Power: 128
wyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to allwyldckat is a name known to all
Quick answers:
  1. "patchMeanVelocityForce" is simply another "fvOption" that allows for enforcing the mean velocity on a particular patch, while operating onto a group of selected cells.
  2. "meanVelocityForce" is simply a renamed version of "pressureGradientExplicitSource". There were no changes made in the source code for it, it was all only aesthetic.
  3. Compiling the source code for "meanVelocityForce" in OpenFOAM 2.2 isn't very simple. A few changes need to be done the source code in "meanVelocityForce" for it to build with OpenFOAM 2.2.
    • It would be easier if you simply downloaded and installed OpenFOAM 3.0.0... at least easier for me
wyldckat is offline   Reply With Quote

Reply


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
sliding mesh problem in CFX Saima CFX 46 September 11, 2021 07:38
Wind turbine simulation Saturn CFX 58 July 3, 2020 01:13
mixed inflow/outflow downstream boundary condition question peob OpenFOAM Running, Solving & CFD 3 February 3, 2017 10:54
Slip boundary condition what is inside normunds OpenFOAM Running, Solving & CFD 2 June 4, 2007 06:45
The Boundary Condition about the Flat Plate boing Main CFD Forum 1 January 6, 2002 16:53


All times are GMT -4. The time now is 19:59.