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

Some questions about buoyantBoussinesqPimpleFoam

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By alexeym

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 19, 2018, 13:10
Default Some questions about buoyantBoussinesqPimpleFoam
  #1
Member
 
Join Date: Jun 2017
Posts: 58
Rep Power: 8
sturgeon is on a distinguished road
I'm trying to make a solver similar to bBPF, but with some additional forces. I'm having difficulty, so I'm trying to start out by modifying pimpleFoam to match bBPF, reasoning that if I can get these modifications to work, I can understand how to add additional forces.

To do this I'm referencing the source code, along with the detailed explanation of the buoyantBoussenesqPisoFoam (http://openfoamwiki.net/index.php/Bu...sinesqPisoFoam).

My first question is about the buoyancy force term. In the piso version, it is added to the momentum predictor as:

Code:
fvc::interpolate(rhok)*(g & mesh.Sf())
and in the corrector:

Code:
rUAf*fvc::interpolate(rhok)*(g & mesh.Sf());
But in bBPF, the terms are:

Code:
- ghf*fvc::snGrad(rhok)
and

Code:
phig(-rAUf*ghf*fvc::snGrad(rhok)*mesh.magSf());
Why is the term negative in pimple, but not in piso?

My other question is about adjustPhi. As I understand it, adjustPhi will adjust mass outflow to ensure continuity across adjustable outlets like boundaries of zeroGradient for U within a certain tolerance. pimpleFoam contains this adjustPhi, however, bBPF does not. Why is this?

I'm using the hotRoom tutorial as a testcase to compare my own version of the code to bBPF. If I leave the adjustPhi term in, I immediately get a mass discontinuity error. I've discovered the error is linearly proportional to the temperature advantage of the faces set by setFields, and the solver executes fine if I remove this temperature advantage, so clearly it is something to do with that. If I remove adjustPhi from the code entirely, the solver executes, albeit with nonphysical results, but I guess that may be to do with subsequent errors.

I also tried modifying bBPF to include an adjustPhi term, and when I used it to execute hotRoom, it also met with similar mass discontinuity errors.

Apologies for the long post. In short, my questions are:

1) Why is the buoyancy term in bBPF negative, whereas in piso, it is not?
2) Why is adjustPhi not present in bBPF?

Thank you
sturgeon is offline   Reply With Quote

Old   March 20, 2018, 03:48
Default
  #2
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

1.

\mathtt{p\_rgh} = p - \rho_k\vec{g}\cdot\vec{h}

so

\vec\nabla\mathtt{p\_rgh} = \vec\nabla{p} - \vec\nabla\left(\rho_k\vec{g}\cdot\vec{h}\right) = \vec\nabla{p} - \left(\vec{g}\cdot\vec{h}\right)\vec\nabla\rho_k - \rho_k\vec{g}

and so, due to formulation, your pressure gradient has extra term, which should be removed. I.e. on openfoamwiki you add buoyancy term, in bBPF you have buoyancy term automatically but have to remove extra term.

2. There is constrainPressure call with comment

Code:
Update the pressure BCs to ensure flux consistency
Since pressure in bBPF is not pure pressure, you cannot simply redistribute phi between patches.
sturgeon likes this.
alexeym is offline   Reply With Quote

Old   March 20, 2018, 07:19
Default
  #3
Member
 
Join Date: Jun 2017
Posts: 58
Rep Power: 8
sturgeon is on a distinguished road
Thank you!

Quote:
Since pressure in bBPF is not pure pressure, you cannot simply redistribute phi between patches.
This makes sense. Does this mean that solvers which cannot use adjustPhi are inherently less stable?
sturgeon is offline   Reply With Quote

Old   March 21, 2018, 07:23
Default
  #4
Senior Member
 
Alexey Matveichev
Join Date: Aug 2011
Location: Nancy, France
Posts: 1,930
Rep Power: 38
alexeym has a spectacular aura aboutalexeym has a spectacular aura about
Send a message via Skype™ to alexeym
Hi,

I do not think so. You can compare stability of the solvers: take pimpleFoam case, suppress buoyancy (either by setting beta to 0, or avoiding temperature gradients), run it with buoyantBoussinesqPimpleFoam, and compare.
alexeym 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
Frequently Asked Questions about Installing OpenFOAM wyldckat OpenFOAM Installation 3 November 14, 2023 11:58
Map of the OpenFOAM Forum - Understanding where to post your questions! wyldckat OpenFOAM 10 September 2, 2021 05:29
Couple of quick Lagrangian questions ecbmxer OpenFOAM Running, Solving & CFD 0 June 25, 2014 16:02
possible interview questions atturh Main CFD Forum 1 February 21, 2012 08:53
NACA0012 Validation Case Questions ozzythewise Main CFD Forum 3 August 3, 2010 14:39


All times are GMT -4. The time now is 02:55.