September 25, 2023, 00:03
|
Integrating over cells instead of nodes
|
#21
|
Senior Member
Farzad Faraji
Join Date: Nov 2019
Posts: 204
Rep Power: 7
|
Dear Oliveira
Thanks for your piece of code, but it integrate over points and not cells. Do you know how can I use this code but integrate over cells instead of nodes?
Thanks,
Farzad
Quote:
Originally Posted by t.oliveira
This is an updated version that works with OpenFOAM 5.x:
Code:
functions
{
flux
{
functionObjectLibs ("libfieldFunctionObjects.so");
type surfaceFieldValue;
enabled true;
writeControl outputTime;
writeInterval 1;
writeFields false;
name myName;
// regionType: patch/faceZone/sampledSurface
regionType sampledSurface;
sampledSurfaceDict
{
type plane;
planeType pointAndNormal;
pointAndNormalDict
{
point (0.1 0 0);
normal (1 0 0);
};
interpolate false;
}
// Operation: areaAverage/sum/weightedAverage/...
operation areaNormalIntegrate;
fields
(
U
);
}
}
Use it executing:
Code:
postProcess -fields "(U)" -dict system/integrateOnSurfaceDict
Best wishes,
Thomas
|
|
|
|