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

Averaging due to parallel running - cuttingPlane

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes
  • 1 Post By woody
  • 2 Post By woody

 
 
LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old   December 8, 2010, 07:42
Default Averaging due to parallel running - cuttingPlane
  #1
Member
 
Tobias Holzinger
Join Date: Mar 2009
Location: Munich, Germany
Posts: 46
Rep Power: 17
woody is on a distinguished road
Dear All,

I am actually implementing a boundary condition that accesses some Field values like p, U, rho from cutting planes inside the mesh. As only the average of the cut Field is of interest, I have to create some kind of weighting factor for each processor part.

So far the Code looks like this:

Code:
   // Create the cutting Planes
   point planeLocation = planeLocations[planeI];
   plane extPlane(planeLocation,orientPatch);
   cuttingPlane cuttedPlane(extPlane,this->dimensionedInternalField().mesh());
    
   vector averageUPRho(0.0,0.0,0.0);

   scalar weigthPatch;

   // Compute the the cut of each processor
   if (cuttedPlane.cut()== 1)
   {
    
    averageUPRho.component(0)= (average(cuttedPlane.sample(Ufield)) & orientPatch); // The mean Velocity in normal Direction
    averageUPRho.component(1)= average(cuttedPlane.sample(pfield));// The mean Pressure
    averageUPRho.component(2)=average(cuttedPlane.sample(rhofield));// The mean Density 
    weigthPatch= cuttedPlane.size(); // The weighting factor
    }
    else
    {
    weigthPatch=0;
    }
Now I forward the averageUPRho and the weigthPatch to the Master and do the averaging with

rhoMean=sum(averageUPRho*weigthPatch)/sum(weigthPatch);

unfortunately I weight by the number of faces and not by their Area (magSf for patches works ... not for planes?).

How can I acces them??

Any hints?
solefire likes this.
woody is offline   Reply With Quote

 

Tags
area, averaging, cuttingplane, parallel processing


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
Running decomposePar / reconstructPar as parallel apps? carcass OpenFOAM Running, Solving & CFD 3 January 17, 2024 07:19
Segmentation fault when running dieselFoam or dieselEngineFoam in parallel francesco OpenFOAM Bugs 4 May 2, 2017 21:59
Issue with running in parallel on multiple nodes daveatstyacht OpenFOAM 7 August 31, 2010 17:16
Error while running in PARALLEL Ravi Duggirala FLUENT 4 August 3, 2010 10:01
Parallel CFD Conference Abstracts Due Feb 5th Pat Fox Main CFD Forum 1 January 21, 1999 14:01


All times are GMT -4. The time now is 23:08.