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

Write a fvc::Xxx function to do a vol to surface field calculation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 31, 2014, 07:26
Question Write a fvc::Xxx function to do a vol to surface field calculation
  #1
Member
 
Lianhua Zhu
Join Date: Aug 2011
Location: Wuhan, China
Posts: 35
Rep Power: 14
zhulianhua is on a distinguished road
Hi,

I want to write a explicit Filed operating function. It calculates as surfaceScalar Field from a volScalarField.

The input parameters are :

volScalarField vf;
dimensionedVector d; // a distance smaller than cell size

The output field is :

volScalarField vs;

The calculation procedure is:

For each cell face center x_s: vs(x_s) = vf(x_s - d),
as d is small enough, x_s - d is located in one of the neighbor cell of the cell face, say cell N.
The vf field value at (x_s -d) is interpolated from the center of cell N.

What is simplest way to write this function?


Best,

Lianhua
zhulianhua 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
whats the cause of error? immortality OpenFOAM Running, Solving & CFD 13 March 24, 2021 07:15
[swak4Foam] installation problem with version 0.2.3 Claudio87 OpenFOAM Community Contributions 9 May 8, 2013 10:20
[blockMesh] non-orthogonal faces and incorrect orientation? nennbs OpenFOAM Meshing & Mesh Conversion 7 April 17, 2013 05:42
is internalField(U) equivalent to zeroGradient? immortality OpenFOAM Running, Solving & CFD 7 March 29, 2013 01:27
CFX4.3 -build analysis form Chie Min CFX 5 July 12, 2001 23:19


All times are GMT -4. The time now is 17:09.