CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

Implementation of 2nd order upwind scheme

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 12, 2013, 19:36
Default Implementation of 2nd order upwind scheme
  #1
New Member
 
Jason Pearl
Join Date: Jul 2013
Location: Burlington
Posts: 10
Rep Power: 13
jaason is on a distinguished road
Hi FOAMers,
I want to implement a 2nd order upwind scheme. However i get the error message below whenever I try to use a scheme like QUICK or linearUpwind for my InterpolationSchemes, gradSchemes or my LaplacianSchemes. I can only implement a second order upwind scheme in the divergence section. My fvSchemes file is pasted below

Code:
attempt to read beyond EOF

file: /home/owner/OpenFOAM/owner-2.2.0/run/Thesis/sonicFoam/Sept12/system/fvSchemes.interpolationSchemes.interpolate(U_0) at line 59.

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

FOAM exiting
Code:
ddtSchemes
{
    default         Euler;
}

gradSchemes
{
    default         none;
    grad(U)        Gauss upwind phi;
    grad(p)        Gauss upwind phi;
    grad(e)        Gauss upwind phi;
}

divSchemes
{
    default         none;
    div(phi,U)      Gauss upwind phi;
    div(phid,p)     Gauss upwind phi;
    div(phi,e)      Gauss upwind phi;
    div(phi,K)      Gauss upwind phi;
    div(phiv,p)     Gauss upwind phi;
    div((muEff*dev2(T(grad(U))))) Gauss linear 1;
}

laplacianSchemes
{
    default                 none;
    laplacian(muEff,U)        Gauss linear corrected;
    laplacian(alphaEff,e)    Gauss linear corrected;
    laplacian(Dp,p)        Gauss linear corrected;
}

interpolationSchemes
{
    default                         none;
    interpolate(rho)                 upwind phi;
    interpolate(rho_0)                 upwind phi;
    interpolate((((1|A(U))*rho_0)*U_0))        upwind phi;
    interpolate(HbyA)                upwind phi;
    interpolate(((1|A(U))*rho_0))            upwind phi;
    interpolate(thermo:psi)            upwind phi;
    interpolate(U_0)                 QUICK;
}

snGradSchemes
{
    default         corrected;
}

fluxRequired
{
    default         no;
    p               ;
}

what I want to do is substitute linearUpwind for all upwind terms in the code as to make it second order and therefore have to deal with less diffusion type inaccuracies. any suggestions??
Am I going about implementing a second order upwind scheme incorrectly?

I am using sonicFoam as a solver but I had the same problems with rhoCentralFoam

any help would be greatly appreciated.
jaason is offline   Reply With Quote

Old   June 11, 2014, 17:14
Default Same Problem
  #2
New Member
 
Join Date: Apr 2012
Posts: 21
Rep Power: 14
Yahoo is on a distinguished road
Hey,
Were you able to solve this error. I am getting the same one?

Quote:
Originally Posted by jaason View Post
Hi FOAMers,
I want to implement a 2nd order upwind scheme. However i get the error message below whenever I try to use a scheme like QUICK or linearUpwind for my InterpolationSchemes, gradSchemes or my LaplacianSchemes. I can only implement a second order upwind scheme in the divergence section. My fvSchemes file is pasted below

Code:
attempt to read beyond EOF

file: /home/owner/OpenFOAM/owner-2.2.0/run/Thesis/sonicFoam/Sept12/system/fvSchemes.interpolationSchemes.interpolate(U_0) at line 59.

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

FOAM exiting
Code:
ddtSchemes
{
    default         Euler;
}

gradSchemes
{
    default         none;
    grad(U)        Gauss upwind phi;
    grad(p)        Gauss upwind phi;
    grad(e)        Gauss upwind phi;
}

divSchemes
{
    default         none;
    div(phi,U)      Gauss upwind phi;
    div(phid,p)     Gauss upwind phi;
    div(phi,e)      Gauss upwind phi;
    div(phi,K)      Gauss upwind phi;
    div(phiv,p)     Gauss upwind phi;
    div((muEff*dev2(T(grad(U))))) Gauss linear 1;
}

laplacianSchemes
{
    default                 none;
    laplacian(muEff,U)        Gauss linear corrected;
    laplacian(alphaEff,e)    Gauss linear corrected;
    laplacian(Dp,p)        Gauss linear corrected;
}

interpolationSchemes
{
    default                         none;
    interpolate(rho)                 upwind phi;
    interpolate(rho_0)                 upwind phi;
    interpolate((((1|A(U))*rho_0)*U_0))        upwind phi;
    interpolate(HbyA)                upwind phi;
    interpolate(((1|A(U))*rho_0))            upwind phi;
    interpolate(thermo:psi)            upwind phi;
    interpolate(U_0)                 QUICK;
}

snGradSchemes
{
    default         corrected;
}

fluxRequired
{
    default         no;
    p               ;
}
what I want to do is substitute linearUpwind for all upwind terms in the code as to make it second order and therefore have to deal with less diffusion type inaccuracies. any suggestions??
Am I going about implementing a second order upwind scheme incorrectly?

I am using sonicFoam as a solver but I had the same problems with rhoCentralFoam

any help would be greatly appreciated.
Yahoo is offline   Reply With Quote

Old   June 12, 2014, 06:25
Default
  #3
Senior Member
 
Bernhard
Join Date: Sep 2009
Location: Delft
Posts: 790
Rep Power: 22
Bernhard is on a distinguished road
Without looking I would say you have to supply "QUICK phi" instead of just "QUICK", because you need to tell the solver with respect to which variable it has to take the upwind values. This is a feature. The error message shown it the one you typically get when you have too little arguments in a line in a sub-dictionary.
Bernhard is offline   Reply With Quote

Old   July 2, 2014, 07:48
Default
  #4
Member
 
Ron
Join Date: Jul 2014
Location: Japan
Posts: 40
Rep Power: 12
ron_OFuser is on a distinguished road
Hello everyone,

I am a newbie..
What is the difference between the following categories.

(1)

divSchemes
{
default none;
div(phi,U) Gauss upwind phi;
div(phid,p) Gauss upwind phi;
div(phi,e) Gauss upwind phi;
div(phi,K) Gauss upwind phi;
div(phiv,p) Gauss upwind phi;
div((muEff*dev2(T(grad(U))))) Gauss linear 1;
}

(2)

interpolationSchemes
{
default none;
interpolate(rho) upwind phi;
interpolate(rho_0) upwind phi;
interpolate((((1|A(U))*rho_0)*U_0)) upwind phi;
interpolate(HbyA) upwind phi;
interpolate(((1|A(U))*rho_0)) upwind phi;
interpolate(thermosi) upwind phi;
interpolate(U_0) QUICK phi;
}

Any help will be greatly appreciated.

Thank you
ron_OFuser is offline   Reply With Quote

Old   February 6, 2015, 18:40
Default
  #5
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 848
Rep Power: 18
sharonyue is on a distinguished road
Quote:
Originally Posted by ron_OFuser View Post
Hello everyone,

I am a newbie..
What is the difference between the following categories.

(1)

divSchemes
{
default none;
div(phi,U) Gauss upwind phi;
div(phid,p) Gauss upwind phi;
div(phi,e) Gauss upwind phi;
div(phi,K) Gauss upwind phi;
div(phiv,p) Gauss upwind phi;
div((muEff*dev2(T(grad(U))))) Gauss linear 1;
}

(2)

interpolationSchemes
{
default none;
interpolate(rho) upwind phi;
interpolate(rho_0) upwind phi;
interpolate((((1|A(U))*rho_0)*U_0)) upwind phi;
interpolate(HbyA) upwind phi;
interpolate(((1|A(U))*rho_0)) upwind phi;
interpolate(thermosi) upwind phi;
interpolate(U_0) QUICK phi;
}

Any help will be greatly appreciated.

Thank you
Hello,

the entry in interpolationSchemes is for some terms which need to get values from cell centres to faces. It includes all the terms in it.
In divSchemes, it only include the schemes for convections.

eg,

interpolate(HbyA) upwind phi;

This will call upwind scheme when u wanna get HbyA's face value from the centers. U can only define it here instead of defining it in divSchemes, cause HbyA is not a convection term

Best,
sharonyue is offline   Reply With Quote

Reply

Tags
fvschemes, rhocentralfoam, second order accuracy, second order upwind, upwind


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


Similar Threads
Thread Thread Starter Forum Replies Last Post
High Resolution (CFX) vs 2nd Order Upwind (Fluent) gravis ANSYS 3 March 24, 2011 03:43
2nd order conservative schemes taw Main CFD Forum 1 September 16, 2008 08:05
2nd order interpolation for NS solver Quarkz Main CFD Forum 6 July 15, 2005 22:50
1st order temporal & 2nd order spatial Prateep Chatterjee FLUENT 0 January 19, 2003 01:31
second order FD upwind scheme Heinz Wilkening Main CFD Forum 2 November 3, 1998 15:33


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