Reorginzied function objects and updated plot script

This commit is contained in:
mathiasvangoe
2017-07-28 13:25:32 +02:00
parent 46567490e1
commit 134a511488
4 changed files with 45 additions and 9 deletions

View File

@ -57,10 +57,8 @@ libs (
functions
{
#includeFunc flowRatePatch(name=outlet)
#includeFunc patchAverage(alpha.water,name=outlet)
#includeFunc patchAverage(alpha.oil,name=outlet)
#includeFunc patchAverage(alpha.air,name=outlet)
#includeFunc flowRatePatch
#includeFunc patchAverage
}
// ************************************************************************* //

View File

@ -0,0 +1,19 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Web: www.OpenFOAM.org
\\/ M anipulation |
-------------------------------------------------------------------------------
Description
Calculates the flow rate through a specified patch by summing the flux on
patch faces. For solvers where the flux is volumetric, the flow rate is
volumetric; where flux is mass flux, the flow rate is mass flow rate.
\*---------------------------------------------------------------------------*/
name outlet;
#includeEtc "caseDicts/postProcessing/flowRate/flowRatePatch.cfg"
// ************************************************************************* //

View File

@ -0,0 +1,19 @@
/*--------------------------------*- C++ -*----------------------------------*\
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Web: www.OpenFOAM.org
\\/ M anipulation |
-------------------------------------------------------------------------------
Description
Calculates the average value of one or more fields on a patch.
\*---------------------------------------------------------------------------*/
name outlet;
fields (alpha.air alpha.water alpha.oil);
operation average;
#includeEtc "caseDicts/postProcessing/surfaceRegion/patch.cfg"
// ************************************************************************* //

View File

@ -4,11 +4,11 @@ close all
graphics_toolkit gnuplot
time = dlmread('./CFD/postProcessing/flowRatePatch(name=outlet)/0/surfaceRegion.dat','\t',4,0)(:,1);
phi = dlmread('./CFD/postProcessing/flowRatePatch(name=outlet)/0/surfaceRegion.dat','\t',4,1);
alphaAir = dlmread('./CFD/postProcessing/patchAverage(alpha.air,name=outlet)/0/surfaceRegion.dat','\t',4,1);
alphaWater = dlmread('./CFD/postProcessing/patchAverage(alpha.water,name=outlet)/0/surfaceRegion.dat','\t',4,1);
alphaOil = dlmread('./CFD/postProcessing/patchAverage(alpha.oil,name=outlet)/0/surfaceRegion.dat','\t',4,1);
time = dlmread('./CFD/postProcessing/flowRatePatch/0/surfaceRegion.dat','\t',4,0)(:,1);
phi = dlmread('./CFD/postProcessing/flowRatePatch/0/surfaceRegion.dat','\t',4,0)(:,2);
alphaAir = dlmread('./CFD/postProcessing/patchAverage/0/surfaceRegion.dat','\t',4,0)(:,2);
alphaWater = dlmread('./CFD/postProcessing/patchAverage/0/surfaceRegion.dat','\t',4,0)(:,3);
alphaOil = dlmread('./CFD/postProcessing/patchAverage/0/surfaceRegion.dat','\t',4,0)(:,4);
volflowAir = phi.*alphaAir;
volflowWater = phi.*alphaWater;