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

Interpolate scalars on boundary faces

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 2, 2010, 18:05
Default Interpolate scalars on boundary faces
  #1
Senior Member
 
Ivan Flaminio Cozza
Join Date: Mar 2009
Location: Torino, Piemonte, Italia
Posts: 207
Rep Power: 14
ivan_cozza is on a distinguished road
Send a message via MSN to ivan_cozza
Hi Foamers,
I need to write a b.c. for a scalar field for which the boundary field must be an accurate interpolation of the internal field.
Is there any ready to use interpolation tool?
I'm managing to use linearInterpolation(), like in phi construction, but does it use only linear scheme? What I have to do to use higher order schemes (cubic)?

Thanks, Ivan
ivan_cozza is offline   Reply With Quote

Old   February 3, 2010, 12:37
Default
  #2
Senior Member
 
Ivan Flaminio Cozza
Join Date: Mar 2009
Location: Torino, Piemonte, Italia
Posts: 207
Rep Power: 14
ivan_cozza is on a distinguished road
Send a message via MSN to ivan_cozza
Ok, yesterday I wrote down some errors (the stuff about linearInterpolate).

Now my question is: is possible using fvc::interpolate() to extrapolate the boundary field of a volScalarField starting from the internal field values?

To add some infos, I need to do it as in a piece of my codes there's a scalar field that's not a solution of a PDE, but is just evaluated algebrically, and I need some good extimation of its boundary values in order to do some other calculations (zeroGradient b.c. it's not enough and the field is time-varying, so I cannot impose at the beginnig the value).

Thank for the help!!!
Ivan
ivan_cozza is offline   Reply With Quote

Old   April 19, 2011, 13:22
Default
  #3
New Member
 
Ali Q Raeini
Join Date: Feb 2010
Posts: 24
Rep Power: 12
aliqasemi is on a distinguished road
This is an old post but:

for any field X, the function fvc::interpolate(X) should consider the boundary conditions specified for X to interpolate it to boundary faces. i.e. if you assign a correct boundary condition it will evaluate the values at boundary faces correctly. I am not so good at the boundary conditions to help you in choosing the correct BC. By default, it uses zeroGradient BC, I think.
aliqasemi is offline   Reply With Quote

Old   July 12, 2020, 22:40
Default
  #4
Member
 
Bidesh Sengupta
Join Date: Sep 2018
Posts: 68
Rep Power: 3
BSengupta is on a distinguished road
Hi! I am sorry to bump into such old post. But I am getting similar problem.


I am having a velocity quantity named URel and b.c. at wall is zeroGradient. I need to calculate a quanity name betta, which is given by:


Code:
betta = rho*URel.n/(U_Inf*rho_Inf)


where n is unit normal from wall.



I am defining betta_surf as:


Code:
surfaceScalarField betta_surf
     (
         IOobject
         (
             "betta_surf",
             runTime.timeName(),
             mesh,
             IOobject::NO_READ,
             IOobject::NO_WRITE
         ),
         (fvc::interpolate(URel))&(mesh.Sf()/mesh.magSf())
     );
I am trying to print its value at wall by:


Code:
Info<<"betta surf : "<<betta_surf.boundaryField()[wallID]<<endl;

But I am always getting it to be zero


Code:
betta surf : type            calculated;
 value           uniform 0;
although the cell center value of all cells adjacent to wall is non zero.


What mistake am I making, can anyone kindly let me know if possible. If any other information is required I shall be happy to share.


Thank you.
p { margin-bottom: 0.1in; line-height: 115% } a:link { so-language: zxx }
p { margin-bottom: 0.1in; line-height: 115% } a:link { so-language: zxx }
p { margin-bottom: 0.1in; line-height: 115% } a:link { so-language: zxx }
BSengupta is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
mass flow in is not equal to mass flow out saii CFX 12 March 19, 2018 05:21
Implementation of boundary conditions for FVM Tom Main CFD Forum 7 August 26, 2014 05:58
extending boundary layer to mesh faces kb FLUENT 0 September 28, 2007 03:26
Solver error message!!! IoSa CFX 1 September 14, 2006 04:48
Boundary conditions? Tom Main CFD Forum 0 November 5, 2002 01:54


All times are GMT -4. The time now is 20:45.