CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Post-Processing (https://www.cfd-online.com/Forums/openfoam-post-processing/)
-   -   Cannot find registered field matching Umean (https://www.cfd-online.com/Forums/openfoam-post-processing/220168-cannot-find-registered-field-matching-umean.html)

delcmo August 27, 2019 09:44

Cannot find registered field matching Umean
 
Hello,

I am trying to get the time-average velocity along a line plot using the singleGrap capability. When I postprocess the simulation, I get the following error message:
Code:

Cannot find registered field matching Umean
I am running the channel395 tutorial and typed the following at the command line:
Code:

pimpleFoam -postProcess
It works fine it I postprocess the velocity U or the pressure p. For derived/computed variables it does not work.

I found a thread or the workaround is to rename UMean file to U and postprocess U.

What would be the right syntax to postprocess UMean?

Thanks,

Marco

Za-ck August 27, 2019 17:07

Hi,

maybe this works:

Code:

pimpleFoam -postProcess -fields "(Umean)"
or

Code:

postProcess -fields "(Umean)"
Cheers,
Za-ck

delcmo August 27, 2019 23:22

Zach,

thanks for your help. I tried this combination as well but it does not work. The output of the command line
Code:

pimpleFoam -postProcess -fields "(UMean)"
is:

Code:

--> FOAM Warning :
    From function Foam::label Foam::sampledSets::classifyFields()
    in file sampledSet/sampledSets/sampledSetsGrouping.C at line 140
    Cannot find registered field matching UMean
yPlus yPlus write:
    writing object yPlus
    patch bottomWall y+ : min = 1.31693, max = 4.19688, average = 2.16715
    patch topWall y+ : min = 1.21137, max = 4.10959, average = 2.18857

wallShearStress wallShearStress write:
    writing object wallShearStress
    min/max(bottomWall) = (-0.000305541 -5.14375e-06 -5.34327e-05), (-2.97267e-05 8.33523e-06 8.07104e-05)
    min/max(topWall) = (-0.000293085 -6.82135e-06 -8.57931e-05), (-2.48279e-05 5.54267e-06 6.45946e-05)

    functionObjects::myTurbKineticNrg myTurbKineticNrg writing field: myTurbKineticNrg
    Reading/initialising field UMean
    Reading/initialising field pMean
    Reading/initialising field yPlusMean
    Reading/initialising field wallShearStressMean
    Reading/initialising field myTurbKineticNrgMean
    Reading/initialising field UPrime2Mean
    Reading/initialising field pPrime2Mean
fieldAverage fieldAverage1 write:
    Calculating averages

    Writing average fields

It seams the time-averaged variables are initialized after the call of the singleGraph file (see above). Again I am not sure how to fix it.

Marco

tomf August 28, 2019 08:01

Hi,

I think the order of the functionObjects within the functions subDict of the controlDict is important. So you first need to have the fieldAveraging and after that the sampling.

If you would have had fieldAverage before wallShearStress (or yPlus) you would not be able to take the average of that either (or maybe with a delay of 1 iteration, if you are lucky)

Regards,
Tom

delcmo August 28, 2019 08:34

Tom,

thanks for you help. You are right, I moved
Code:

#includeFunc  singleGraph
after fieldAverage block in controlDict file and it runs fine.

Thanks for the help,

Marco

Dmarcohe December 20, 2019 08:41

Hi, ich have kind of the same problem. I calculated Umean and UPrime2Mean while calculating and now i want to sample them. I use the sampledict with the field entries U, Umean and UPrime2Mean but it only samples U. For the other the terminal told me:

--> FOAM Warning :
From function Foam::label Foam::sampledSets::classifyFields()
in file sampledSet/sampledSets/sampledSetsGrouping.C at line 140
Cannot find registered field matching UMean

same for UPrime2Mean

delcmo December 20, 2019 09:07

Could you please provide the command lines you used and the exact error message?

Dmarcohe December 20, 2019 09:39

here is my terminal output

....
Reading set description:
y=0H
y=40H
y=61H
y=82H
y=103H
y=124H
y=145H

--> FOAM Warning :
From function Foam::label Foam::sampledSets::classifyFields()
in file sampledSet/sampledSets/sampledSetsGrouping.C at line 140
Cannot find registered field matching UMean
--> FOAM Warning :
From function Foam::label Foam::sampledSets::classifyFields()
in file sampledSet/sampledSets/sampledSetsGrouping.C at line 140
Cannot find registered field matching UPrime2Mean

End

command line: pimpleFoam -postProcess -func sampleDict -latestTime

Dmarcohe December 20, 2019 09:40

and here my sampleDict:

FoamFile
{
version 2.0;
format ascii;
class dictionary;
object sampleDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

type sets;
libs ("libsampling.so")
writeControl latestTime;

// Set output format : choice of
// xmgr
// jplot
// gnuplot
// raw
setFormat raw;

// Surface output format. Choice of
// null : suppress output
// foamFile : separate points, faces and values file
// dx : DX scalar or vector format
// vtk : VTK ascii format
// raw : x y z value format for use with e.g. gnuplot 'splot'.
// stl : ascii stl. Does not contain values!
surfaceFormat foamFile;

// interpolationScheme. choice of
// cell : use cell-centre value only; constant over cells (default)
// cellPoint : use cell-centre and vertex values
// cellPointFace : use cell-centre, vertex and face values.
// 1] vertex values determined from neighbouring cell-centre values
// 2] face values determined using the current face interpolation scheme
// for the field (linear, gamma, etc.)
//interpolationScheme cell;
//interpolationScheme cellPoint;
interpolationScheme cellPointFace;

// Fields to sample.
fields
(
U
UMean
UPrime2Mean
);

// Set sampling definition: choice of
// uniform evenly distributed points on line
// face one point per face intersection
// midPoint one point per cell, inbetween two face intersections
// midPointAndFace combination of face and midPoint
//
// curve specified points, not nessecary on line, uses
// tracking
// cloud specified points, uses findCell
//
// axis: how to write point coordinate. Choice of
// - x/y/z: x/y/z coordinate only
// - xyz: three columns
// (probably does not make sense for anything but raw)
// - distance: distance from start of sampling line (if uses line) or
// distance from first specified sampling point
//
// type specific:
// uniform, face, midPoint, midPointAndFace : start and end coordinate
// uniform: extra number of sampling points
// curve, cloud: list of coordinates
sets
(
y=0H
{
type lineCell;
axis x;
start (-0.036 0.09 0);
end (0.036 0.09 0);
}
y=40H
{
type lineCell;
axis x;
start (-0.036 0.05 0);
end (0.036 0.05 0);
}
y=61H
{
type lineCell;
axis x;
start (-0.036 0.029 0);
end (0.036 0.029 0);
}
y=82H
{
type lineCell;
axis x;
start (-0.036 0.008 0);
end (0.036 0.008 0);
}
y=103H
{
type lineCell;
axis x;
start (-0.036 -0.013 0);
end (0.036 -0.013 0);
}
y=124H
{
type lineCell;
axis x;
start (-0.036 -0.034 0);
end (0.036 -0.034 0);
}
y=145H
{
type lineCell;
axis x;
start (-0.036 -0.055 0);
end (0.036 -0.055 0);
}
);

// Surface sampling definition: choice of
// plane : values on plane defined by point, normal.
// patch : values on patch.
//
// 1] planes are triangulated by default
// 2] patches are not triangulated by default
//surfaces
//(
//);



// ************************************************** ********************* //

U works perfect...

CFDanielGER May 24, 2021 08:05

I have the same problem.

When I include singleGraph for UMean in the controlDict file the postProcessing works perfectly. But at some lines there is missing data and I want to postProcess it after the simulation with:
Code:

pisoFoam -postProcess -func singleGraph -latestTime
I get the following error:

No finite volume options present
--> FOAM Warning :
From Foam::label Foam::sampledSets::classifyFields()
in file sampledSet/sampledSets/sampledSetsGrouping.C at line 83

Cannot find registered field matching 1(UMean)

Does anybody know how to fix this problem?

EDIT:

Using

Code:

postProcess -func singleGraph -latestTime
instead of

Code:

pisoFoam -postProcess -func singleGraph -latestTime
works for me. But I cannot tell why it works for on but not the other. Maybe someone can explain what the difference is when using the solver in front of the postProcess call, I am curious.


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