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

How to control the fvcgrad scheme

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 13, 2008, 07:18
Default Hi to everybody! I need to co
  #1
Senior Member
 
Ivan Flaminio Cozza
Join Date: Mar 2009
Location: Torino, Piemonte, Italia
Posts: 207
Rep Power: 8
ivan_cozza is on a distinguished road
Send a message via MSN to ivan_cozza
Hi to everybody!
I need to control explicitly the interpolation scheme used in the fvc::grad operator. I read that if I use fvc::grad(phi), where phi is a vol<type>Field, the gradient is performed with the linear interpolation of phi on the cell-faces, while if I whant to control the interpolation scheme I have to set phi to a surface<type>Field.
The problem is that if I put

surfaceTensorField phi = mesh.Sf()*u1;

it doesn't work!
What's wrong?
Thank you, Ivan
ivan_cozza is offline   Reply With Quote

Old   October 14, 2008, 09:57
Default Ivan, Actually, grad(phi) use
  #2
Member
 
David P. Schmidt
Join Date: Mar 2009
Posts: 70
Rep Power: 7
schmidt_d is on a distinguished road
Ivan,
Actually, grad(phi) uses the corresponding technique stipulated in the fvSchemes file, which is not always linear interpolation. You can control this behavior by changing inputs, not code.
-DPS
schmidt_d is offline   Reply With Quote

Old   October 14, 2008, 10:30
Default David, you mean that if I wan
  #3
Senior Member
 
Ivan Flaminio Cozza
Join Date: Mar 2009
Location: Torino, Piemonte, Italia
Posts: 207
Rep Power: 8
ivan_cozza is on a distinguished road
Send a message via MSN to ivan_cozza
David,
you mean that if I want to compute my gradient of volScalarField p with a (for example) cubic scheme I just have to write:

fvc::grad(p)

and after in the fvSchemes I have to write

gradSchemes
{
default Gauss cubic;
}

?
If it is, I misunderstood the programmer's guide passage in which it says that if put a vol<type>Field in a fvc::div or in a fvc:grad, the code uses by default a linear centred interpolation for the variables...
ivan_cozza 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
AUSM scheme ? Central Scheme boling Main CFD Forum 5 September 9, 2009 19:06
control volume leo FLUENT 0 November 1, 2007 10:54
Solver Control Anantha CFX 1 September 4, 2007 13:30
control question Pratap Main CFD Forum 2 August 4, 2004 09:25
Help!explicit multistage scheme with upwind scheme D .T. Main CFD Forum 1 June 4, 2003 03:42


All times are GMT -4. The time now is 10:42.