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

how to interpolate grad(p)

Register Blogs Community New Posts Updated Threads Search

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   August 31, 2012, 20:59
Default how to interpolate grad(p)
  #1
New Member
 
Lun Yu
Join Date: Aug 2012
Posts: 8
Rep Power: 13
victorconan is on a distinguished road
Hi, everyone,
I am new to openfoam. I wanna interpolate the grad(p) but I don't know how to do this. I tried to use fvc::interpolate(fvc::grad(p)), but it does not work. Could anyone do me a favor to teach me how to do this?
Thanks!

PS:I also tried to build a volScalarField and interpolate it, but it did not work. I tried this:
volScalarField surfP
(
IOobject
(
"surfP",
runTime.timeName(),
mesh,
IOobject::NO_READ,
IOobject::AUTO_WRITE
),
mesh,
dimensionedScalar("zero",dimensionSet(0,1,-2,0,0,0,0),0.0)
);
surfP.internalField()=fvc::grad(p);
I suppose there is something wrong with the surfP.internalField()=fvc::grad(p), could anyone tell me how to correct it? Thanks!

Last edited by victorconan; August 31, 2012 at 21:29.
victorconan is offline   Reply With Quote

 

Tags
interpolate


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
Interpolate in some points ivan_cozza OpenFOAM Post-Processing 2 April 22, 2009 08:58
Interpolate a boundary condition Xabi OpenFOAM Pre-Processing 0 April 9, 2009 04:23
overflow when interpolate initial result richard CFX 1 June 11, 2008 07:36
GradP in channeloodles nikos_fb16 OpenFOAM Running, Solving & CFD 1 September 4, 2007 10:52
Interpolate Stex CFX 2 June 30, 2003 08:04


All times are GMT -4. The time now is 07:46.