CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Bugs

Problem in fvschemes divSchemes cannot use Gauss linearUpwind

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

Like Tree13Likes

Reply
 
LinkBack Thread Tools Display Modes
Old   October 18, 2007, 09:57
Default Hello, Looking at the UserG
  #1
Member
 
nicolas
Join Date: Mar 2009
Location: Glasgow
Posts: 42
Rep Power: 8
nico765 is on a distinguished road
Hello,

Looking at the UserGuide, it's something I should be able to do.
I want to use the linear Upwind scheme for div(phi,U).

Using simpleFoam in Openfoam 1.4.1 on linux 64bit.


div(phi,U) Gauss linear;
div(phi,U) Gauss linear corrected;
div(phi,U) Gauss QUICK;

works fine. But

div(phi,U) Gauss linearUpwind;

does not.



I get:

--> FOAM FATAL IO ERROR : Grad scheme not specified

Valid grad schemes are :

8
(
cellMDLimited
extendedLeastSquares
faceMDLimited
leastSquares
fourth
faceLimited
cellLimited
Gauss
)


file: /home/nr/OpenFOAM/nrousselon-1.4.1/run/ccm2foam4/system/fvSchemes::div(phi,U) at line 40.

From function gradScheme<type>::New(Istream& schemeData)
in file /home/nr/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude/gradScheme.C at line 65.

FOAM exiting








/*---------------------------------------------------------------------------*\
| ========= | |
| \ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \ / O peration | Version: 1.4 |
| \ / A nd | Web: http://www.openfoam.org |
| \/ M anipulation | |
\*---------------------------------------------------------------------------*/

FoamFile
{
version 2.0;
format ascii;

root "";
case "";
instance "";
local "";

class dictionary;
object fvSchemes;
}

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
default steadyState;
}

gradSchemes
{
default Gauss linear;
grad(p) Gauss linear;
grad(U) Gauss linear;
}

divSchemes
{
default none;
div(phi,U) Gauss linear corrected;
div(phi,k) Gauss upwind;
div(phi,epsilon) Gauss upwind;
div(phi,R) Gauss upwind;
div(R) Gauss linear;
div(phi,nuTilda) Gauss upwind;
div((nuEff*dev(grad(U).T()))) Gauss linear;
}

laplacianSchemes
{
default none;
laplacian(nuEff,U) Gauss linear corrected;
laplacian((1|A(U)),p) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected;
laplacian(DepsilonEff,epsilon) Gauss linear corrected;
laplacian(DREff,R) Gauss linear corrected;
laplacian(DnuTildaEff,nuTilda) Gauss linear corrected;
}

interpolationSchemes
{
default linear;
interpolate(U) linear;
}

snGradSchemes
{
default corrected;
}

fluxRequired
{
default no;
p;
}


// ************************************************** *********************** //
vbnhfylbh likes this.
nico765 is offline   Reply With Quote

Old   October 18, 2007, 10:13
Default You need to specify the grad-s
  #2
Senior Member
 
Join Date: Mar 2009
Posts: 854
Rep Power: 13
henry is on a distinguished road
You need to specify the grad-scheme used by linearUpwind, e.g.

div(phi,U) Gauss linearUpwind Gauss linear;

or

div(phi,U) Gauss linearUpwind leastSquares;

or if you want to limit the gradient used by the linearUpwind scheme which is often beneficial

div(phi,U) Gauss linearUpwind cellLimited Gauss linear 1;

etc.
hua1015 likes this.
henry is offline   Reply With Quote

Old   October 24, 2007, 07:18
Default Thanks, just what I needed.
  #3
Member
 
nicolas
Join Date: Mar 2009
Location: Glasgow
Posts: 42
Rep Power: 8
nico765 is on a distinguished road
Thanks,

just what I needed.

Nicolas
nico765 is offline   Reply With Quote

Old   January 18, 2010, 10:45
Default
  #4
Member
 
Join Date: Nov 2009
Location: Munich
Posts: 43
Rep Power: 7
sErik is on a distinguished road
I have the same problem and tried to adapte it on my case with the bouyantBoussinesqSimpleFoam, but it didn't work.
This is what I get:
Quote:
...

Selecting RAS turbulence model kEpsilon
kEpsilonCoeffs
{
Cmu 0.09;
C1 1.44;
C2 1.92;
sigmaEps 1.3;
}

Calculating field beta*(g.h)


Starting time loop

Time = 5e-07



attempt to read beyond EOF

file: /home/fa1/OpenFOAM/eschirach/run/buoyantBoussinesqSimpleFoam/BMW_Zulauf_klein/system/fvSchemes::gradSchemes::default at line 25.

From function ITstream::read(token& t)
in file db/IOstreams/Tstreams/ITstream.C at line 84.

FOAM exiting
Line 25 is the one with the default gradSchemes. My fvSchemes file is:
Quote:
ddtSchemes
{
default steadyState;
}

gradSchemes
{
default Gauss linearUpwind;
}

divSchemes
{
default none;
div(phi,U) Gauss linearUpwind Gauss cellLimited linear 1;
div(phi,T) Gauss linearUpwind Gauss cellLimited linear 1;
div(phi,k) Gauss linearUpwind Gauss cellLimited linear 1;
div(phi,epsilon) Gauss linearUpwind Gauss cellLimited linear 1;
div(phi,R) Gauss linearUpwind Gauss cellLimited linear 1;
div(R) Gauss linear;
div((nuEff*dev(grad(U).T()))) Gauss linear;

}

laplacianSchemes
{
default none;
laplacian(nuEff,U) Gauss linear corrected;
laplacian((1|A(U)),p) Gauss linear corrected;
laplacian(kappaEff,T) Gauss linear corrected;
laplacian(DkEff,k) Gauss linear corrected;
laplacian(DepsilonEff,epsilon) Gauss linear corrected;
laplacian(DREff,R) Gauss linear corrected;
}

interpolationSchemes
{
default linearUpwind;
}

snGradSchemes
{
default corrected;
}

fluxRequired
{
default no;
p ;
}
sErik is offline   Reply With Quote

Old   January 19, 2010, 05:11
Default
  #5
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,758
Rep Power: 21
hjasak will become famous soon enough
You messed up the order: cellLimited is a modifier for a gradient scheme, so it comes first. Think about which class should contain which.

div(phi,U) Gauss linearUpwind cellLimited Gauss linear 1;

Enjoy,

Hrv
hua1015 and sharonyue like this.
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   January 22, 2010, 04:26
Default
  #6
Member
 
Join Date: Nov 2009
Location: Munich
Posts: 43
Rep Power: 7
sErik is on a distinguished road
Hi Hrvoje,

thank you. Stupid mistake. Now it's running! :-)

Regards,
Erik
sErik is offline   Reply With Quote

Old   September 26, 2010, 15:55
Default
  #7
Senior Member
 
Claus Meister
Join Date: Aug 2009
Location: Wiesbaden, Germany
Posts: 241
Rep Power: 8
idrama is on a distinguished road
Hello!

I got a question. Does div(phi,U) Gauss linearUpwind fourth mean that with order fourt the velocity field is approximated?

Cheers
idrama is offline   Reply With Quote

Old   September 27, 2010, 03:07
Default
  #8
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26
alberto will become famous soon enoughalberto will become famous soon enough
No, it means you use a fourth-order scheme to compute the gradients, but clearly the order of the linearUpwind stays unchanged.
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
OpenQBMM - An open-source implementation of quadrature-based moment methods
alberto is offline   Reply With Quote

Old   September 27, 2010, 03:31
Default
  #9
Senior Member
 
Claus Meister
Join Date: Aug 2009
Location: Wiesbaden, Germany
Posts: 241
Rep Power: 8
idrama is on a distinguished road
I think I have to learn something. Could you send me a reference which contains the derivation of this kind of scheme?
idrama is offline   Reply With Quote

Old   February 21, 2011, 08:21
Default
  #10
jms
Member
 
José
Join Date: Jan 2011
Posts: 73
Rep Power: 6
jms is on a distinguished road
Could you please have a look at this thread I just created?
fvSchemes
thanks!
jms is offline   Reply With Quote

Old   November 12, 2011, 11:53
Default fvSchemes in OF20
  #11
TKE
New Member
 
TKE's Avatar
 
Jozsef Rideg
Join Date: Feb 2011
Location: Budapest, Hungary
Posts: 21
Rep Power: 6
TKE is on a distinguished road
"
div(phi,U) Gauss linearUpwind Gauss linear;

or

div(phi,U) Gauss linearUpwind leastSquares;

or if you want to limit the gradient used by the linearUpwind scheme which is often beneficial

div(phi,U) Gauss linearUpwind cellLimited Gauss linear 1;

etc.[/QUOTE]"

Does anyone know, how should the same fvSchemes be set in the 2.0 version of OpenFOAM?
TKE is offline   Reply With Quote

Old   November 12, 2011, 16:16
Default
  #12
Senior Member
 
Dr. Alexander Vakhrushev
Join Date: Mar 2009
Posts: 213
Rep Power: 10
makaveli_lcf is on a distinguished road
Send a message via ICQ to makaveli_lcf
Hi!

Code:
gradSchemes
{
    default         cellLimited leastSquares 1;
}

divSchemes
{
    default        none;
    div(phi,epsilon) Gauss linearUpwind grad(epsilon);  // OF20x syntax
    div(phi,k)       Gauss linearUpwind grad(k);  // OF20x syntax
    div(phi,U)       Gauss linearUpwind grad(U);  // OF20x syntax
    div((nuEff*dev(T(grad(U)))))     Gauss linear;  // OF20x syntax
}
My example which I use with pimpleFoam.
__________________
Best regards,

Dr. Alexander VAKHRUSHEV

Christian Doppler Laboratory for "Advanced Process Simulation of
Solidification and Melting"

Simulation and Modelling of Metallurgical Processes
Department of Metallurgy
University of Leoben

Franz-Josef-Str. 18
A - 8700 Leoben
Österreich / Austria
Tel.: +43 3842 - 402 - 3125
http://smmp.unileoben.ac.at
makaveli_lcf is offline   Reply With Quote

Old   November 14, 2011, 13:16
Default
  #13
New Member
 
Felipe
Join Date: Apr 2010
Posts: 13
Rep Power: 7
fippo_dk is on a distinguished road
Could you help me with this:

Implementing: laplacian(nuEff,U) Gauss linear Gauss fourth;

gives:

[0] --> FOAM FATAL IO ERROR:
[0] Unknown discretisation scheme fourth

Valid schemes are :

3
(
corrected
limited
uncorrected
)

but it should be able to work with fourth...

Thanks
fippo_dk is offline   Reply With Quote

Old   November 14, 2011, 13:21
Default
  #14
Senior Member
 
Alberto Passalacqua
Join Date: Mar 2009
Location: Ames, Iowa, United States
Posts: 1,894
Rep Power: 26
alberto will become famous soon enoughalberto will become famous soon enough
Quote:
Originally Posted by fippo_dk View Post
Could you help me with this:

Implementing: laplacian(nuEff,U) Gauss linear Gauss fourth;

gives:

[0] --> FOAM FATAL IO ERROR:
[0] Unknown discretisation scheme fourth

Valid schemes are :

3
(
corrected
limited
uncorrected
)

but it should be able to work with fourth...

Thanks
The correct syntax is

Gauss <scheme> <correction option>;

so

Gauss linear corrected;

For fourth-order it is:

Gauss cubic corrected;

Best,
sh.d and babala like this.
__________________
Alberto Passalacqua

GeekoCFD - A free distribution based on openSUSE 64 bit with CFD tools, including OpenFOAM. Available as live DVD/USB, hard drive image and virtual image.
OpenQBMM - An open-source implementation of quadrature-based moment methods
alberto is offline   Reply With Quote

Old   November 14, 2011, 14:02
Default
  #15
New Member
 
Felipe
Join Date: Apr 2010
Posts: 13
Rep Power: 7
fippo_dk is on a distinguished road
Thanks Alberto for your reply

Now it is running, so I hope my solution will improve.

Thanks

Felipe
fippo_dk is offline   Reply With Quote

Old   November 14, 2011, 17:39
Default Thanks
  #16
TKE
New Member
 
TKE's Avatar
 
Jozsef Rideg
Join Date: Feb 2011
Location: Budapest, Hungary
Posts: 21
Rep Power: 6
TKE is on a distinguished road
Dear makaveli_lcf,

Thank you for your reply!

Regards,
TKE
TKE is offline   Reply With Quote

Old   November 14, 2011, 18:00
Default
  #17
New Member
 
Felipe
Join Date: Apr 2010
Posts: 13
Rep Power: 7
fippo_dk is on a distinguished road
Hi again Alberto

Well my simulation ran, but I guess I have not achieved what I wanted.

In the attached graph I have made the simulations from 0 to 20 degrees with a step of 2 degrees with OpenFOAM and another CFD code.

I want to use the QUICK scheme, but I am over predicting my solution with OF in comparison to the other CFD code and both over predict lift in comparison to the measurements (Abbot and Doenhoff).

I have my convection terms with QUICK and the diffusion terms with second order scheme (Gauss linear corrected).

Thus I change my diffusion terms to a fourth interpolation scheme in order to improve my solution (QUICK2), and I can see that the curve is lower, but still it can not capture the separation pretty well. In this case my diffusion terms are Gauss cubic corrected.

Do you have any suggestions for improving my results?

Regards

Felipe

ps: I was going to upload the case but due to the size, it did not let allow me to do it. But I could send you a tar file with it (2.7 MB).
Attached Images
File Type: png NACA64618-Coeffs_1.png (65.1 KB, 181 views)
Attached Files
File Type: zip system.zip (8.9 KB, 28 views)
fippo_dk is offline   Reply With Quote

Old   November 15, 2011, 10:25
Default
  #18
Senior Member
 
Dr. Alexander Vakhrushev
Join Date: Mar 2009
Posts: 213
Rep Power: 10
makaveli_lcf is on a distinguished road
Send a message via ICQ to makaveli_lcf
Which OF version do you use?
__________________
Best regards,

Dr. Alexander VAKHRUSHEV

Christian Doppler Laboratory for "Advanced Process Simulation of
Solidification and Melting"

Simulation and Modelling of Metallurgical Processes
Department of Metallurgy
University of Leoben

Franz-Josef-Str. 18
A - 8700 Leoben
Österreich / Austria
Tel.: +43 3842 - 402 - 3125
http://smmp.unileoben.ac.at
makaveli_lcf is offline   Reply With Quote

Old   November 16, 2011, 02:10
Default
  #19
New Member
 
Felipe
Join Date: Apr 2010
Posts: 13
Rep Power: 7
fippo_dk is on a distinguished road
I use 1.7.1
fippo_dk is offline   Reply With Quote

Old   November 16, 2011, 03:28
Default
  #20
Senior Member
 
Dr. Alexander Vakhrushev
Join Date: Mar 2009
Posts: 213
Rep Power: 10
makaveli_lcf is on a distinguished road
Send a message via ICQ to makaveli_lcf
Ok, because in 20x I noticed strange behavior: viscous terms are under-estimated in my case with equal settings I was simulating in v16 and 17x. I will study it in details and also report here on forum.
__________________
Best regards,

Dr. Alexander VAKHRUSHEV

Christian Doppler Laboratory for "Advanced Process Simulation of
Solidification and Melting"

Simulation and Modelling of Metallurgical Processes
Department of Metallurgy
University of Leoben

Franz-Josef-Str. 18
A - 8700 Leoben
Österreich / Austria
Tel.: +43 3842 - 402 - 3125
http://smmp.unileoben.ac.at
makaveli_lcf 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
DivSchemes Gauss limitedLinearV and interfaceCompression nicasch OpenFOAM Running, Solving & CFD 1 July 12, 2010 10:26
FvSchemes sega OpenFOAM Running, Solving & CFD 2 February 15, 2010 12:07
DivSchemes limitedLinearV and interfaceCompression nicasch OpenFOAM 0 February 28, 2008 11:33
Divschemes limitedLinearV 1 and interfaceCompression nicasch OpenFOAM 0 February 27, 2008 13:24
FvSchemes from 12 to 11 fedegavo OpenFOAM Running, Solving & CFD 1 January 20, 2006 14:49


All times are GMT -4. The time now is 21:33.