# fvSchemes in bubbleFoam

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 February 23, 2012, 18:37 fvSchemes in bubbleFoam #1 Member   Jeong Kim Join Date: Feb 2010 Posts: 42 Rep Power: 9 Sponsored Links I was trying to modify bubbleFoam before going to more complex problems. When I looked at "fvSchmes" located in the systmes foler of bubbleFoam, I was not sure about it. Here are two questions. Q1. I think I have to consider below shemes for Rca and Rcb, respectively, but why are they not included in the schemes? ... div(phiRa, Ua) Gauss limitedLinearV 1; //why is it not included? div(phiRb, Ub) Gauss limitedLinearV 1; //why is it not included? ... div(phir, alpha) Gauss limitedLinear01 1; //Need for alpha continuity equation? ... Q2. I think I could use div(Rca) and div(Rcb), but it could not work. The solver looked for div(-nuEffa*grad(Ua).T()) and div(-nuEffb*grad(Ub).T()). In UEqns.H, volTensorField Rca = -nuEffa*(fvc::grad(Ua)().T()); Rca = Rca + ...; I would really appreciate that if you could give some commenst to me.

February 24, 2012, 03:51
#2
Senior Member

Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,910
Rep Power: 28
Quote:
 Originally Posted by enoch I was trying to modify bubbleFoam before going to more complex problems. When I looked at "fvSchmes" located in the systmes foler of bubbleFoam, I was not sure about it. Here are two questions. Q1. I think I have to consider below shemes for Rca and Rcb, respectively, but why are they not included in the schemes? ... div(phiRa, Ua) Gauss limitedLinearV 1; //why is it not included? div(phiRb, Ub) Gauss limitedLinearV 1; //why is it not included?
The piece of code in the equation says:

Code:
`fvm::div(phiRa, Ua, "div(phia,Ua)")`
so the scheme specified for div(phia,Ua) is used for this term too.

Quote:
 ... div(phir, alpha) Gauss limitedLinear01 1; //Need for alpha continuity equation? ...
The code for the alphaEqn contains

Code:
`fvm::div(-fvc::flux(-phir, beta, scheme), alpha, scheme)`
where

Code:
`word scheme("div(phi,alpha)");`
So, it is sufficient to specify a scheme for div(phi,alpha). This is done for consistency of the discretisation.

Quote:
 Q2. I think I could use div(Rca) and div(Rcb), but it could not work. The solver looked for div(-nuEffa*grad(Ua).T()) and div(-nuEffb*grad(Ub).T()). In UEqns.H, volTensorField Rca = -nuEffa*(fvc::grad(Ua)().T()); Rca = Rca + ...; I would really appreciate that if you could give some commenst to me.
If you look at the tutorial case, these schemes are specified:

Code:
```    div((-nuEffa*T(grad(Ua)))) Gauss linear;
However, in general, if you define a field, its string name is used to look up in the dictionaries, and not its variable name. For example, if you define

Code:
`volScalarField a = -b*c;`
the code won't look for "a", but for an expression derived from the calculation. If you want to fix this problem, simply assign a name to your field:

Code:
```volScalarField a
(
"a",
-b*c
);```
and the code will look for "a" in the dictionaries, instead than for the, usually complicated, expression.

Best,
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as in both physical and virtual formats.
OpenQBMM - An open-source implementation of quadrature-based moment methods.

To obtain more accurate answers, please specify the version of OpenFOAM you are using.

 Thread Tools Display Modes Linear Mode

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

 Similar Threads Thread Thread Starter Forum Replies Last Post renyun0511 OpenFOAM Running, Solving & CFD 23 August 3, 2011 04:07 xck1986 OpenFOAM 1 June 21, 2011 09:30 Meratb OpenFOAM Running, Solving & CFD 2 June 9, 2011 07:35 rans2009 OpenFOAM 0 October 8, 2009 07:59 rans2009 OpenFOAM 3 October 5, 2009 04:28