|
[Sponsors] |
February 2, 2010, 18:05 |
Interpolate scalars on boundary faces
|
#1 |
Senior Member
|
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 |
|
February 3, 2010, 12:37 |
|
#2 |
Senior Member
|
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 |
|
April 19, 2011, 13:22 |
|
#3 |
New Member
Ali Q Raeini
Join Date: Feb 2010
Posts: 24
Rep Power: 16 |
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. |
|
July 12, 2020, 22:40 |
|
#4 |
Member
Bidesh Sengupta
Join Date: Sep 2018
Location: Sngapore
Posts: 76
Rep Power: 7 |
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()) ); 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; 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 } |
|
|
|
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 |