|
[Sponsors] |
![]() |
![]() |
#1 |
Member
Join Date: Sep 2018
Posts: 53
Rep Power: 7 ![]() |
Hello everyone, I'm simulating 2D flow in a channel with OpenFOAM 6 and am trying to interpolate some field variables onto a plane and integrate. I do this by including the following function object in my controlDict file.
Code:
cuttingplane { type surfaceFieldValue; libs ("libfieldFunctionObjects.so"); log true; writeControl timeStep; writeInterval 1; writeFields true; // Type of source: patch/faceZone/sampledSurface surfaceFormat vtk; regionType sampledSurface; name mySurface; sampledSurfaceDict { type cuttingPlane; planeType pointAndNormal; pointAndNormalDict { basePoint (0.01 0 0); normalVector (1 0 0); } source cells; // sample cells or boundaryFaces interpolate true; } // Operation: areaAverage/sum/weightedAverage ... operation areaIntegrate; fields ( U ); } Why is this happening? channel.jpg channel2.jpg cuttingPlane.jpg cuttingPlane2.jpg Last edited by tecmul; August 22, 2019 at 16:26. |
|
![]() |
![]() |
![]() |
![]() |
#2 | |
Senior Member
Syavash Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 17 ![]() |
Quote:
|
||
![]() |
![]() |
![]() |
![]() |
#3 |
Member
Join Date: Sep 2018
Posts: 53
Rep Power: 7 ![]() |
||
![]() |
![]() |
![]() |
![]() |
#4 |
New Member
Luiz Oliveira
Join Date: Aug 2018
Location: Napoli, Italy
Posts: 24
Rep Power: 7 ![]() |
Did someone work on the problem?
From my experience the area value is different for single/parallel mode, where the single mode gives the correct area. My guess is that the decompose method should be modified although I do not have any idea of what to use instead of scotch. My function is similar to the others: Code:
velocityInterface { type surfaceFieldValue; libs (fieldFunctionObjects); fields (absUy); operation areaIntegrate; regionType sampledSurface; sampledSurfaceDict { type plane; planeType pointAndNormal; pointAndNormalDict { point (0 0.3 0); normal (0 1 0); } zone interfaceSelection; interpolate true; } name interface; timeStart 0; executeControl timeStep; executeInterval 1; writeControl timeStep; writeInterval 1; writeFields false; }
__________________
Luiz Oliveira PhD. Student in Environmental Fluid Dynamics University of Napoli: Federico II |
|
![]() |
![]() |
![]() |
![]() |
#5 |
Senior Member
Syavash Asgari
Join Date: Apr 2010
Posts: 473
Rep Power: 17 ![]() |
One solution is to create baffles or faceZone for sampling the desired region. Then in the decomposeParDict, use the "preservePatches" or other similar options to put the baffle or faceZone in one single process altogether.
I tried and it worked for me. Bests Last edited by syavash; February 8, 2021 at 07:16. |
|
![]() |
![]() |
![]() |
Tags |
cuttingplane, slice, surfacefieldvalue, wrong surface |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
export calculated variable with cuttingPlane | Eloise | OpenFOAM Post-Processing | 0 | June 16, 2014 10:59 |
How to plot variable (alpha1) on cuttingPlane (runtime postprocessing) | pythag0ra5 | OpenFOAM Post-Processing | 1 | September 26, 2013 08:46 |
Creating Surfaces in Fluid Body | Jenny_W | Main CFD Forum | 2 | June 5, 2012 05:05 |
Modeling both radiation and convection on surfaces - Ansys Transient Thermal R13 | s.mishra | ANSYS | 0 | March 31, 2012 04:12 |
Problem in running ICEM grid in Openfoam | Tarak | OpenFOAM | 6 | September 9, 2011 17:51 |