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

How to control the fvcgrad scheme

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 13, 2008, 08:18
Default Hi to everybody! I need to co
  #1
Senior Member
 
Ivan Flaminio Cozza
Join Date: Mar 2009
Location: Torino, Piemonte, Italia
Posts: 210
Rep Power: 18
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, 10:57
Default Ivan, Actually, grad(phi) use
  #2
Member
 
David P. Schmidt
Join Date: Mar 2009
Posts: 72
Rep Power: 17
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, 11:30
Default David, you mean that if I wan
  #3
Senior Member
 
Ivan Flaminio Cozza
Join Date: Mar 2009
Location: Torino, Piemonte, Italia
Posts: 210
Rep Power: 18
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


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
AUSM scheme ? Central Scheme boling Main CFD Forum 7 January 7, 2016 03:41
control volume leo FLUENT 0 November 1, 2007 10:54
Solver Control Anantha CFX 1 September 4, 2007 14:30
control question Pratap Main CFD Forum 2 August 4, 2004 10:25
Help!explicit multistage scheme with upwind scheme D .T. Main CFD Forum 1 June 4, 2003 04:42


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