NotDrJeff |
February 24, 2021 11:57 |
postProcess Utility Errors
Hello,
I am working on a case were I have defined some function objects in my controlDict including forces, fieldAverage, and some probes etc.
Code:
forces_object
{
type forces;
libs ("libforces.so");
patches ("square");
p p;
U U;
rho rhoInf; //only use rhoInf for incompressible flows
rhoInf 1000;
CofR (0 0 0); //Centre of rotation
enabled true;
}
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
probes1
{
type probes;
libs ("libsampling.so");
//dictionary probesDict;
probeLocations
(
(0.025 0 0)
(0.05 0 0)
(0.075 0 0)
(0.1 0 0)
(0.15 0 0)
(0.3 0 0)
(0.5 0 0)
);
fields
(
p pMean pPrime2Mean
U UMean UPrime2Mean
k kMean kPrime2Mean
omega omegaMean omegaPrime2Mean
);
}
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
yplus
{
type yPlus;
libs (fieldFunctionObjects);
enabled true;
writeControl writeTime;
}
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
Q
{
type Q;
libs (fieldFunctionObjects);
enabled true;
writeControl writeTime;
}
///////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////
fieldAverage
{
type fieldAverage;
libs (fieldFunctionObjects);
fields
(
U
{
mean yes;
prime2Mean yes;
base time;
}
p
{
mean yes;
prime2Mean yes;
base time;
}
k
{
mean yes;
prime2Mean yes;
base time;
}
omega
{
mean yes;
prime2Mean yes;
base time;
}
);
enabled true;
timeStart 0.1;
writeControl writeTime;
}
I forgot to make a change to my fieldAverage sub-dictionary before running my solver which means averages weren't calculated (I had a startTime of 100 when I was only running the case for 10s. The above was corrected after the simulation was complete).
No problem. I can just run the postProcessing utility and calculate these values after the fact can't I?
But I ran into an error. I think the error is something to do with the forces. This is strange as the forces were calculated during the actual run.
Code:
Create time
--> FOAM Warning :
From void Foam::Time::setControls()
in file db/Time/Time.C at line 244
Increasing the timePrecision from 6 to 16 to support the formatting of the current time directory 10.00012
Create mesh for time = 0
forces forces_object:
p: p
U: U
rho: rhoInf
Freestream density (rhoInf) set to 1000
Not including porosity effects
fieldAverage fieldAverage:
Restarting averaging for fields:
U: starting averaging at time 0
p: starting averaging at time 0
k: starting averaging at time 0
omega: starting averaging at time 0
Time = 0
Reading fields:
Executing functionObjects
--> FOAM FATAL ERROR:
Could not find U: U or p:p in database
From void Foam::functionObjects::forces::initialise()
in file forces/forces.C at line 227.
FOAM exiting
Strange, but I don't care about the forces. I just need to calculate my fieldAverages, then probe those values.
So I try entering
Code:
postProcess -func fieldAverage
I assumed that this would look in the controlDict first for parameters. Am I correct?
The utility runs, but doesn't actually calculate anything. Here's an extract:
Code:
Time = 9.60012
Reading fields:
Executing functionObjects
Time = 9.70012
Reading fields:
Executing functionObjects
Time = 9.80012
Reading fields:
Executing functionObjects
Time = 9.90012
Reading fields:
Executing functionObjects
Time = 10.00012
Reading fields:
Executing functionObjects
End
What am I missing?
Thanks, :)
Jeffrey
|