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

How can i get faceSet averagedScalar?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 28, 2019, 04:38
Default How can i get faceSet averagedScalar?
  #1
New Member
 
Join Date: Aug 2018
Posts: 18
Rep Power: 8
nago is on a distinguished road
Hi!

I use OF v2.3.1, modify rhoReactingBuoyantFoam.
Now I want to get weightedAverageVaue of internal Face species.
so, I make faceSet which I need weightedvalue of species , by using topoSet.

then I try coding, but I cannot get it!

(first,I cannot be recognized faceSet.
Now I know, cellSet can be recognized as follow

cellSet Any(mesh,"cellSetName");
)


and I want to do like follows.

-------------------------------------------------------------
forAll(face(),fid)
{
if (Any[fid]){
sumOfRhoYValue += fvc::interpolate(Y.Air)[fid] * fvc::interpolate(rho)[fid];
sumOfRhoYValue += fvc::interpolate(rho)[fid];
}
}
weightedAverage=sumOfRhoYValue / sumOfRhoValue;

---------------------------------------------------------------
I know the above has lots of misktake, but i don't know what should I do...

can anyone help me ?

regard.
nago is offline   Reply With Quote

Reply

Tags
average field, facesets, openfoam2.3.1


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
[mesh manipulation] Add / Remove faces from patch , create new djh2 OpenFOAM Meshing & Mesh Conversion 9 November 8, 2020 17:30
topoSet ; faceSet and cellSet Raza Javed OpenFOAM Running, Solving & CFD 2 July 24, 2019 07:56
[Commercial meshers] faceSet of a cutting plane for a internal patch definition RubenGutiii OpenFOAM Meshing & Mesh Conversion 1 April 17, 2019 06:10
select disk with faceSet raffale OpenFOAM Pre-Processing 4 June 8, 2012 09:27
[swak4Foam] Mass flow rate through faceSet using swak4foam CedricVH OpenFOAM Community Contributions 5 May 4, 2012 08:57


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