CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS > FLUENT

Extract pressure gradient from periodic boundary conditions.

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 18, 2018, 14:09
Default Extract pressure gradient from periodic boundary conditions.
  #1
New Member
 
Thijs
Join Date: Nov 2017
Posts: 29
Rep Power: 9
thijs1909 is on a distinguished road
Hello everyone,

I am stuck with obtaining the pressure gradient from a simple fully developed turbulent pipe flow where I specified the mass flow rate.

I modelled a 3d straight pipe geometry with a y+ ~1 and I made the inlet translational periodic with the outlet. Then I specified the correct mass flow rate in kg/s. I used the SIMPLEC algorithm and I obtained good radial velocity profiles as expected. But I can not seem to extract the dp/dx value, while I can not find it.

During calculation, Fluent writes for every iteration a per-pr-grad value, but this value is stuck at 0.00 for every iteration. Besides that I read in the Fluent help manual that under periodic conditions in the boundary conditions tab, you can click update and it will calculate the dp/dx according to current field values. But this does not work.

Does somebody know how to obtain the dp/dx value from my results?

Kind regards,

Thijs
thijs1909 is offline   Reply With Quote

Old   February 19, 2018, 11:49
Default
  #2
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
Probably your case file got corrupted and you might need to rebuild it from scratch.

Try switching the p-v coupling scheme to regular simple, running a few iters and then switching back.

The last ditch effort is to do:
Code:
(rpgetvar 'periodic/pressure-derivative)
(rpgetvar 'periodic/mass-flow)
This will read directly from the case file the per/pr-grad and per/mass-flow values. But probably you will also get 0 for the pr-grad here if your case is corrupt.
LuckyTran is offline   Reply With Quote

Old   April 17, 2018, 17:00
Default
  #3
New Member
 
Thijs
Join Date: Nov 2017
Posts: 29
Rep Power: 9
thijs1909 is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
Probably your case file got corrupted and you might need to rebuild it from scratch.

Try switching the p-v coupling scheme to regular simple, running a few iters and then switching back.

The last ditch effort is to do:
Code:
(rpgetvar 'periodic/pressure-derivative)
(rpgetvar 'periodic/mass-flow)
This will read directly from the case file the per/pr-grad and per/mass-flow values. But probably you will also get 0 for the pr-grad here if your case is corrupt.
Sorry for the late response,

I tried your suggestions but none of them worked. I simulated a 3d laminar tube flow, the result corresponds with Hagen-poiseuille and even the obtained wallshearstress can be rewritten to a darcy friction factor. This value correspond so I conclude that the periodic boundary conditions work correctly.

Typing: (rpgetvar 'periodic/mass-flow) shows me my specified mass flow rate.

(rpgetvar 'periodic/pressure-derivative) remains 0

Anyone a suggestions of what could be wrong?

Kind regards,

Thijs
thijs1909 is offline   Reply With Quote

Old   April 17, 2018, 17:12
Default
  #4
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
What dp-dx do you expect? I suspect the value is too small to print to the screen with the display format.

Yet an even more desperate attempt is to open the .cas file with a text editor. Search for the line that has:
Code:
pressure/periodic-derivative
This is the value stored in the simulation. I am curious what number you find here. If this line is missing (somehow), then your case is corrupt.

You could try to fix it by using rpsetvar or manually adding the line to the .cas file. But you don't know what else might be broken, it's probably worth it to start the .cas file over from scratch. You can still import your latest solution. But given how many months have passed, you could have rerun the entire case many times over already.
LuckyTran is offline   Reply With Quote

Old   April 17, 2018, 17:20
Default
  #5
New Member
 
Thijs
Join Date: Nov 2017
Posts: 29
Rep Power: 9
thijs1909 is on a distinguished road
I opened the .cas file in a text editor. I found the line and it was saying:

Code:
(periodic/pressure-derivative 0.)
Very strange:S
thijs1909 is offline   Reply With Quote

Old   April 17, 2018, 17:27
Default
  #6
Senior Member
 
Lucky
Join Date: Apr 2011
Location: Orlando, FL USA
Posts: 5,761
Rep Power: 66
LuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura aboutLuckyTran has a spectacular aura about
So what dp-dx do you expect? This is now important. If the friction factor makes sense, then back-calculate the dp-dx.

You can manually overwrite the dp-dx value to say 100 and then reiterate. But I suspect you will get 0. again due to limited machine precision.

I am also curious if saving the .cas in binary format allows you to get any output but you will not be able to cross-check since you cannot read binary easily.
LuckyTran is offline   Reply With Quote

Old   April 17, 2018, 17:29
Default
  #7
New Member
 
Thijs
Join Date: Nov 2017
Posts: 29
Rep Power: 9
thijs1909 is on a distinguished road
The dp/dx I expect is dx/dx=227Pa/m
thijs1909 is offline   Reply With Quote

Old   April 18, 2018, 10:40
Default
  #8
New Member
 
Thijs
Join Date: Nov 2017
Posts: 29
Rep Power: 9
thijs1909 is on a distinguished road
Quote:
Originally Posted by LuckyTran View Post
So what dp-dx do you expect? This is now important. If the friction factor makes sense, then back-calculate the dp-dx.

You can manually overwrite the dp-dx value to say 100 and then reiterate. But I suspect you will get 0. again due to limited machine precision.

I am also curious if saving the .cas in binary format allows you to get any output but you will not be able to cross-check since you cannot read binary easily.
I have had contact with ANSYS. And they said it was a known bug in version v18.2. The periodic pressure gradient cannot be extracted and there was no known workaround available.

They suggested to use an earlier version or v19.0. I tried v19.0 and it works, I can run my old .cas file composed in v18.2, but I have to run it over again to calculate the pressure gradient.

But I am happy

Tnx,

Thijs
thijs1909 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 08:38
question regarding LES of pipe flow - pimpleFoam Dan1788 OpenFOAM Running, Solving & CFD 37 December 26, 2017 15:42
Problem in setting Boundary Condition Madhatter92 CFX 12 January 12, 2016 05:39
Problem with SIMPLEC-like finite volume channel flow boundary conditions ghobold Main CFD Forum 3 June 15, 2015 12:14
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 18:44


All times are GMT -4. The time now is 18:49.