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

Field operations on cell zones

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 7, 2018, 09:03
Default Field operations on cell zones
  #1
Senior Member
 
Andrea Ferrari
Join Date: Dec 2010
Posts: 319
Rep Power: 17
Andrea_85 is on a distinguished road
Hi Foamers,

Are field operations on cell zones allowed in openFOAM?
I mean, if a have 2 volScalarField, namely A and B, and i create a third volScalarField C as:

Code:
volScalarField C = A + B
OF will automatically calculate C on every internal cell and every boundary face based on internal values and boundary values of fields A and B.

Now i want to perform the same calculation on cell zones. Something like

Code:
ForAll zones
C[zoneI] = A[zoneI] + B[zoneI]
Is there a way to do that without looping over all the cells of zoneI?

Thanks,
Andrea
Andrea_85 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
[Other] Contribution a new utility: refine wall layer mesh based on yPlus field lakeat OpenFOAM Community Contributions 58 December 23, 2021 03:36
How to use "translation" in solidBodyMotionFunction in OpenFOAM rupesh_w OpenFOAM Running, Solving & CFD 5 August 16, 2016 05:27
Setting Initial Temperatures of Cell Zones, Help Needed UWBCFD FLUENT 1 March 3, 2016 02:25
"Mobile" entities: cell zones, sources, etc... r08n OpenFOAM Programming & Development 0 March 26, 2010 13:23
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 07:51


All times are GMT -4. The time now is 15:46.