CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

How to update surfaceScalarField boundary values in parallel cyclicBC?

Register Blogs Members List Search Today's Posts Mark Forums Read

LinkBack Thread Tools Search this Thread Display Modes
Old   September 7, 2022, 04:59
Default How to update surfaceScalarField boundary values in parallel cyclicBC?
New Member
Sreehari Perumanath
Join Date: Jun 2022
Posts: 28
Rep Power: 4
sreehahaha is on a distinguished road
Dear Foamers,

I'm new to use OF and I'm developing my own solver for my problem. In it, I have to define a 'surfaceScalarField payal' and I want to give pre-calculated values to it at every time step.

To give values to the internal faces, it is simple. I give values to the boundary patch faces with:
// to loop over all boundary faces
forAll(payal.boundaryFieldRef(), patchID)
But I use cyclicBC, so I have to do something like below for two neighbourPatches with patchIDs 0,1:
// set values on patchID=1 same as patchID=0, because cyclicBC between patches 0,1
and likewise for other pairs of neighbourPatches (I have a very simple geometry of a cube). This works fine in a serial run. But, I imagine this would be problematic in a parallel run, as both patches may be dealt with by different processes. Can somebody please suggest an elegant way which works for both serial and parallel runs? It would be very helpful.

Many thanks and have a great day/weekend!

Last edited by sreehahaha; September 22, 2022 at 04:46.
sreehahaha is offline   Reply With Quote


boundary patch, cyclic boundary condition, parallel code, surfacescalarfield, version 6

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
Update Pressure values for unsteady, multiphase, parallel - not updating properly dhaya400 Fluent UDF and Scheme Programming 6 June 7, 2021 01:43
Explicitly filtered LES saeedi Main CFD Forum 16 October 14, 2015 11:58
Radiation interface hinca CFX 15 January 26, 2014 17:11
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 17:44
parallel code samiam1000 SU2 3 March 25, 2013 04:55

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