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

first order gradient scheme ??

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

Like Tree1Likes
  • 1 Post By kdarc

Reply
 
LinkBack Thread Tools Display Modes
Old   May 25, 2010, 16:13
Default first order gradient scheme ??
  #1
Member
 
Ken Darcovich
Join Date: Mar 2009
Location: Ottawa, Canada
Posts: 30
Rep Power: 8
kdarc is on a distinguished road
Hi.

I want to implement something seemingly simple, but I've managed to waste half a day on this already...

All I want to do is to implement a gradient scheme for a scalar that is first order upwind. (ie; for a discrete jump in field values, I only want ONE cell to show a value for the gradient)

presumably, something along the lines of:

gradSchemes
{
grad(p) Gauss linearUpwind ;
}


should work, but this takes me down a path of error messages such as:

request for surfaceScalarField Gauss from objectRegistry region0 failed
available objects of type surfaceScalarField are


3
(
weightingFactors
differenceFactors_
phi
)


where following the suggested options leads to nothing useful.

Any help sincerely appreciated.
kdarc is offline   Reply With Quote

Old   May 25, 2010, 22:06
Default
  #2
Member
 
Jinbiao Xiong
Join Date: Oct 2009
Location: China/Japan
Posts: 50
Rep Power: 7
JinBiao is on a distinguished road
Send a message via MSN to JinBiao
I do not know why you need a linear upwind differencing for the pressure gradient. Upwind is applied for the convection term in the N-S equation.

The error message means that the field in the grad operator (in your case p) is not a surfaceScalarField.

I think

gradSchemes
{
grad(p) Gauss linear;
}

will work in your case.

Best,
__________________
Jinbiao
JinBiao is offline   Reply With Quote

Old   May 26, 2010, 09:51
Default
  #3
Member
 
Ken Darcovich
Join Date: Mar 2009
Location: Ottawa, Canada
Posts: 30
Rep Power: 8
kdarc is on a distinguished road
I never said I was solving NS equations, using the scalar p perhaps confuses people.

Let me graphically illustrate what I'm seeking:







kdarc is offline   Reply With Quote

Old   May 26, 2010, 12:08
Default
  #4
Member
 
Ken Darcovich
Join Date: Mar 2009
Location: Ottawa, Canada
Posts: 30
Rep Power: 8
kdarc is on a distinguished road
by just not giving up, I got what I wanted:



the magic code:

grad(s) faceLimited Gauss upwind phi 0;

thanks to all who looked in on this.
kosan likes this.
kdarc 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
How to compute UDS fourth order gradient Emma66 FLUENT 1 April 27, 2010 05:44
divergence with higher order scheme shekharc Main CFD Forum 1 July 23, 2009 13:53
High order scheme vs Specified Blend factor 1 realanony87 CFX 0 June 19, 2009 06:58
Higher order downwind scheme jelmer OpenFOAM Running, Solving & CFD 4 August 9, 2006 06:43
Discretisation scheme in CFX-1st or 2nd order? Pete CFX 10 January 12, 2005 13:48


All times are GMT -4. The time now is 08:55.