CFD Online URL
[Sponsors]
Home > Forums > OpenFOAM Running, Solving & CFD

Basic Questions about fvSchemes file

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree1Likes
  • 1 Post By akidess

Reply
 
LinkBack Thread Tools Display Modes
Old   August 29, 2013, 04:32
Default Basic Questions about fvSchemes file
  #1
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,024
Rep Power: 15
RodriguezFatz will become famous soon enough
Dear All,

I am quite active in the Fluent section of this forum, but now I try to get OpenFoam running. So my first test case is a bended pipe and I am trying to reconstruct Fluent's results...

I have several things that I possibly understood, but I am not pretty sure... I hope someone can help me with that:

1) If I set "div(phi,U) ...", does that mean "phi" (in Navier-Stokes equations) gets "rho * U_x", "rho * U_y" ... ? So by "div(phi,U)" I refer to cell to face interpolation of all values "phi*U" in momentum equations?
2) Does OpenFoam use the same interpolation method for "phi" as for "U"?
3) If (1) is correct, I guess "div(phi,k)" means the same for the k-equation...?
4) I found some explanations here: http://www.openfoam.org/docs/user/fvSchemes.php
In the forums I found many other possibilities, such as "linearUpwindV". Where can I get some information about that?
5) For the "default" value I always need to type "upwind phi". In the other lines a simple "upwind" is sufficient. What does this syntax mean? Why is this necessary?

Thank you for your help!
Philipp.
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   August 29, 2013, 05:42
Default
  #2
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,024
Rep Power: 15
RodriguezFatz will become famous soon enough
One additional question that confuses me:
6) Why do I need to specify a "value ..." after I already chose "type calculated"? Such as:
type calculated;
value uniform 0;
Is "value" used at any time?
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   August 29, 2013, 06:38
Default
  #3
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 918
Rep Power: 16
akidess will become famous soon enough
1) phi = U*Sf (i.e. surface flux)
2) Not necessarily
3) see 1)
4) Probably the forum or the source code unfortunately
5) My guess: The default divergence scheme also applies to entries such as div(X). Thus you are forced to explicitly state a flux field based on which the upwinding is performed.
6) I'm guessing it's used on the very first iteration and later filled with the calculated values. But I've never used that BC myself.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
*Check out the scientific computing exchange http://scicomp.stackexchange.com
akidess is offline   Reply With Quote

Old   August 29, 2013, 07:34
Default
  #4
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,024
Rep Power: 15
RodriguezFatz will become famous soon enough
Hi Anton,
Thanks for your help.
May I ask some more questions?

to 1) and 3) So with the "div(phi,U)" I set the node to face interpolation method of phi, but what does OpenFoam use for "U"? The "interpolationSchemes"?

to 6) I use it for "k" where I don't want a wall function. At least I hope
pipe_wall
{
type fixedValue;
value uniform 1.0e-12;
}

is the correct way...
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   August 29, 2013, 08:55
Default
  #5
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 918
Rep Power: 16
akidess will become famous soon enough
div(phi,U) Gauss upwind will mean we interpolate U using the upwind scheme based on the flux phi (note that phi already lives on the faces, thus does not need interpolation). Phi is calculated using an explicit fvc::interpoate(U), so you would select a scheme using interpolationSchemes{} in fvSchemes.

As for your second question: I believe that should work, but I haven't done any RANS work in OpenFOAM.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
*Check out the scientific computing exchange http://scicomp.stackexchange.com
akidess is offline   Reply With Quote

Old   August 29, 2013, 09:12
Default
  #6
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,024
Rep Power: 15
RodriguezFatz will become famous soon enough
Ok, now this is the opposite of what I understood. Great!

Let's say for the "u_x" momentum equation, we have to linearize the convective part. We get "rho * u_x * u_x", with u_x the depending variable (which has to be solved by the linear solver) and u_x the "constant" (at least during the linear iterations). Now, by the "divScheme" we choose the way OpenFoam interpolates this "constant" u_x to the faces. And by "interpolationScheme" we choose how OpenFoam interpolates "rho * u_x" to the faces. Is that correct?

Any Fluent user here? Does that mean, the "interpolationScheme" is what we can choose in Fluent under "Discretization"?
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   August 29, 2013, 11:51
Default
  #7
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 918
Rep Power: 16
akidess will become famous soon enough
First of all keep in mind not all solvers explicitly carry rho in the divergence term. Furthermore, I think you still have it backwards, i.e. not as I explained in my previous post.

Have a look at the programmers guide section 2.4.2 (P-34, PDF only!). The term you call constant is lumped together into a term "F" in equation 2.16. The interpolation for this term is selected by an entry in the "interpolationScheme" section of fvSchemes. The dependent variable (called phi_f in the programmers guide) is evaluated by a scheme selected in the "divSchemes" section.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
*Check out the scientific computing exchange http://scicomp.stackexchange.com
akidess is offline   Reply With Quote

Old   August 30, 2013, 09:51
Default
  #8
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,024
Rep Power: 15
RodriguezFatz will become famous soon enough
Thank you very much Anton for your explanations. Your reputation has just rised ...

Edit:
Taking your last sentence: Is the dependent variable in the programmers guide "phi_f" the same as "U" in the user documents (http://www.openfoam.org/docs/user/fvSchemes.php) / Section 4.45 ?
So the "Phi" in the user documents is the "F" in the programmers guide, but not the phi_f?
Is that correct?
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   September 2, 2013, 05:12
Default
  #9
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Delft, Netherlands
Posts: 918
Rep Power: 16
akidess will become famous soon enough
Yes, that's correct.
RodriguezFatz likes this.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
*Check out the scientific computing exchange http://scicomp.stackexchange.com
akidess is offline   Reply With Quote

Old   September 2, 2013, 05:14
Default
  #10
Senior Member
 
RodriguezFatz's Avatar
 
Philipp
Join Date: Jun 2011
Location: Germany
Posts: 1,024
Rep Power: 15
RodriguezFatz will become famous soon enough
Thank you Anton... I was already dispairing.
__________________
The skeleton ran out of shampoo in the shower.
RodriguezFatz is offline   Reply With Quote

Old   September 2, 2013, 06:04
Default
  #11
Senior Member
 
romant's Avatar
 
Roman Thiele
Join Date: Aug 2009
Location: Stockholm, Sweden
Posts: 345
Rep Power: 10
romant is on a distinguished road
Quote:
Originally Posted by RodriguezFatz View Post
Thank you Anton... I was already dispairing.
One way of finding all the other schemes for a certain interpolation, divergence and so on is by typing "banana" or any other word instead of Gauss upwind, this will give you all the available schemes. And some more information can be found here http://www.openfoam.org/docs/user/fv...hp#x20-1070235
__________________
~roman
romant is offline   Reply With Quote

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
groovyBC in openFOAM-2.0 for parabolic velocity bc ofslcm OpenFOAM 22 August 26, 2013 12:06
swak4Foam-groovyBC build problem zxj160 OpenFOAM 18 July 30, 2013 14:14
error message with modeling a cube with a hold at the center hsingtzu OpenFOAM Native Meshers: blockMesh 2 March 14, 2012 11:56
Problem installing on Ubuntu 9.10 -> 'Cannot open : No such file or directory' mfiandor OpenFOAM Installation 2 January 25, 2010 10:50
ParaView Compilation jakaranda OpenFOAM Installation 3 October 27, 2008 13:46


All times are GMT -4. The time now is 14:34.