CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   3 discretisation solving questions (https://www.cfd-online.com/Forums/openfoam-solving/58473-3-discretisation-solving-questions.html)

kar April 26, 2008 10:21

Hello, I would be happy to
 
Hello,

I would be happy to read some answer to these 3 things currently confusing me:

1. Whats the point of ddtSchemes subdictionary (userguide u-109), if actual discretisation scheme is what's written by constructing fvMatrix?

2. May I call OpenFOAM a implementation of *linear* FVM? Is there anything really quadratic (or more) about it? (what are cubicCorrection, fourth?)

3. Is it necessary to use fvm::{Su/Sp/SuSp}, if matrices are somehow preconditioned? For example, if momentum equation includes volume and body force (or some heat sources)?

Thank you.

kar May 3, 2008 13:21

Ok, one question: are phi (sur
 
Ok, one question: are phi (surface field representing mass / volume flux) and U & mesh.Sf() supposed to be equal after PISO loop (U is velocity, of course)? Please answer to this!

dbxmcf May 3, 2008 20:30

Phi does not necessarily to be
 
Phi does not necessarily to be equal, however, it should obey the continuity after the 2 PISO correction steps, which is the key issue of the Pressure-Velocity correction procedure.

kar May 4, 2008 06:34

Another "mystery" related to t
 
Another "mystery" related to this is a steady solution of cavity - when using linear interpolation for convection, I get this ugly solution:

http://www.cfd-online.com/OpenFOAM_D...ges/1/7551.jpg

but, the problem is, when use some limited scheme, say GammaV 1, they do not disappear! When solving in transient regime, this problem vanishes -- why? Could you explain, please?

dbxmcf May 4, 2008 11:26

Hi, I don't know the exactly p
 
Hi, I don't know the exactly problem you have, my suggestion might be wrong, but I just think something "might" affect your solution. Then continuity equation is:

ddt(rho)+div(rho, U)=0

If you have compressible flow, phi should be rho*U which is interpolated to the face? Is your fluid density a constant? If not, then ddt(rho) might have an effect?

kar May 4, 2008 12:01

A simple case, where rho is co
 
A simple case, where rho is constant. Just for testing, so I can see if things work well, but they don't in fact.

Currently I've managed to crash icoFoam (and my own solvers) (see "OpenFOAM crashes when input is a steady solution!!").

A more constructive question would be: how to calculate phi field, if *only* U field is given (say, for initial conditions)? U&Sf result is different from solved one...

dbxmcf May 4, 2008 17:28

Hi, I think the U field is int
 
Hi, I think the U field is interpolated to the control volume surface while calculating the phi. Since your rho is a constant, the phi is using the interpolated surface U times the surface area, that is why phi is coded as "surfaceScalarField" when used in the convection term (both in the pressure correction equation and the pseudo whole N-S equation for the PISO loop), I think a complete phi expression (for the compressible flow) should be:

linearinterpolate(rho*U) & mesh.Sf()

Correct me if I am wrong, thanks!

kar May 5, 2008 04:11

Well, I already did that. Sinc
 
Well, I already did that. Since my solver is incompressible, I used fvc::interpolate(U)&mesh.Sf() and that doesn't give me the same result for saved, converged U field as PISO loop does!
So I ask again: why there is difference and how should I calculate phi from U?

kar May 7, 2008 04:17

To display difference field, I
 
To display difference field, I used div( interpolate_lin(U)&mesh.Sf() - phi ) and result looks like a fluctuations around zero. Also boundaries look problematic for some reason I don't know...

Here's a sample:

http://www.cfd-online.com/OpenFOAM_D...ges/1/7585.jpg

hjasak May 7, 2008 04:27

(as Bernhard says: Warning - a
 
(as Bernhard says: Warning - advertising own stuff!)

Have a look at my Thesis - the bit about pressure-velocity coupling, or try to dig out my CFD lecture material from somewhere. It will tell you what the difference between the interpolated velocity and face flux is and what to do if you insist on full consistency. For reference, this is to do with Rhie-Chow treatment.

Hrv

ivan_cozza October 14, 2008 06:11

Karlis, did you find out what
 
Karlis,
did you find out what happens if you choose cubicCorrection as interpolation scheme?
I'm facing a similar and strange problem:
I'm solving linearized Euler equations for a Gaussian acoustic pulse, and I tryied linear :

gradSchemes
{
default Gauss linear;
}

divSchemes
{
default Gauss linear;
// div(phi,utfold) Gauss limitedLinear 1;
}

laplacianSchemes
{
default none;
}

interpolationSchemes
{
default cubic;
}

and cubic schemes:

gradSchemes
{
default Gauss cubic;
}

divSchemes
{
default Gauss cubic;
// div(phi,utfold) Gauss limitedLinear 1;
}

laplacianSchemes
{
default none;
}

interpolationSchemes
{
default cubic;
}

and the results are the same!!
I'm wondering what I'm wrong in it...
Have a good day!


All times are GMT -4. The time now is 17:00.