CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   fvSchemes in bubbleFoam (http://www.cfd-online.com/Forums/openfoam-solving/97749-fvschemes-bubblefoam.html)

 enoch February 23, 2012 18:37

fvSchemes in bubbleFoam

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,

Rca = Rca + ...;

I would really appreciate that if you could give some commenst to me.

 alberto February 24, 2012 03:51

Quote:
 Originally Posted by enoch (Post 346007) 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;     div((-nuEffb*T(grad(Ub)))) 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,

 All times are GMT -4. The time now is 20:22.