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

Interpolation cell -> face

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 28, 2016, 09:27
Default Interpolation cell -> face
  #1
Member
 
Join Date: Jun 2012
Posts: 76
Rep Power: 13
maHein is on a distinguished road
Hello everybody,

interpolation of cell values (e.g. volScalarField) to face values (e.g. surfaceScalarField) for the complete domain is quite straightforward - see rhoCentralFoam:

Code:
surfaceScalarField rho_pos
(
    fvc::interpolate(rho, pos, "reconstruct(rho)")
);
However, I just need a single interpolated face value of a specific faceI. Is there a way to perform such an interpolation for a single face? This way I can skip the computational expensive cell->face interpolation of the whole domain.

Kind regards

Martin
maHein is offline   Reply With Quote

Old   April 22, 2018, 16:37
Default
  #2
New Member
 
Yuchen Zhang
Join Date: Apr 2018
Posts: 3
Rep Power: 8
joytonight is on a distinguished road
you can use ref() to get a reference to its Internal field and then you can access each value surface value.

for example,

surfaceScalarField gradU(...);
ScalarField gradUIn=gradU.ref();
gradUIn[faceI]= ...;
joytonight 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
udf problem jane Fluent UDF and Scheme Programming 37 February 20, 2018 04:17
[snappyHexMesh] No layers in a small gap bobburnquist OpenFOAM Meshing & Mesh Conversion 6 August 26, 2015 09:38
[blockMesh] non-orthogonal faces and incorrect orientation? nennbs OpenFOAM Meshing & Mesh Conversion 7 April 17, 2013 05:42
Hydrostatic Pressure and Gravity miliante OpenFOAM Running, Solving & CFD 132 October 7, 2012 22:50
How to determine the direction of cell face vectors on processor patches sebastian_vogl OpenFOAM Running, Solving & CFD 0 October 27, 2009 08:47


All times are GMT -4. The time now is 13:55.