CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

FOAM Warning : Field " " not found in database for averaging

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 22, 2023, 14:13
Default FOAM Warning : Field " " not found in database for averaging
  #1
New Member
 
Khaled
Join Date: Jun 2023
Location: Hannover
Posts: 7
Rep Power: 2
elbatawy is on a distinguished road
Hello,



i have created source code to define fields/terms, then compiling these src and using the lib.so later in the post-processing by using `rhoPimpleFoam`. I am using OpenFOAM 1612+

The problem that when i am trying to write these fields in the `field` for averaging function in the `controlDict` , it is returning me always this warning

Code:
--> FOAM Warning : 
    From function void Foam::functionObjects::fieldAverage::initialize()
    in file fieldAverage/fieldAverage.C at line 95
    Field UU not found in database for averaging
But it is showing in the the start that , UU could be found as follow

Code:
Starting time loop

fieldAverage fieldAverage1:
    Restarting averaging for fields:
        U: starting averaging at time 0
        p: starting averaging at time 0
        T: starting averaging at time 0
        rho: starting averaging at time 0
        UU: starting averaging at time 0
I am adding it in the `controlDict` as follow:

Code:
functions
{

 ....


     fieldAverage1
    {
        type fieldAverage;
        libs ("libfieldFunctionObjects.so" "libMTSFunctionObjects.so");
        writeControl writeTime;

        fields
        (
...


           UU
                      {
                mean        on;
                prime2Mean  on;
                base        time;
          }

        );
    }

}
Where `UU` is one of the fields that has been defined in src. It is working with no warnings for `U`, `p` and `rho`.
I have tried everything, i have used `write()` function to write it in the desk as `UU.write();` .
The compiling proceed with no errors or warnings.

Update:

when i have tried to call `UU' in the function before `fieldAverage`, it is calculating UU normally with no problems, but still the same warning when averaging:
Code:
Current time: 0.02
calc() function called
UU calc starting
Calculated UU tensor: dimensions      [1 -1 -2 0 0 0 0];

internalField   nonuniform List<tensor> 
742716
Thank you very much if someone could suggest or help.

Best regards,
Khaled

Last edited by elbatawy; July 24, 2023 at 09:56. Reason: improving the writing way
elbatawy is offline   Reply With Quote

Old   July 24, 2023, 13:41
Default
  #2
Senior Member
 
Mark Olesen
Join Date: Mar 2009
Location: https://olesenm.github.io/
Posts: 1,695
Rep Power: 40
olesen has a spectacular aura aboutolesen has a spectacular aura about
Check that your "UU" field is registered and also that it is still in scope (ie, you haven't accidentally destroyed it).
olesen is offline   Reply With Quote

Reply

Tags
controldict, openfaom, rhopimplefoam

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Building OpenFOAM1.7.0 from source ata OpenFOAM Installation 46 March 6, 2022 13:21
[mesh manipulation] RefineMesh Error and Foam warning jiahui_93 OpenFOAM Meshing & Mesh Conversion 4 March 3, 2018 11:32
[Other] Mesh Importing Problem cuteapathy ANSYS Meshing & Geometry 2 June 24, 2017 05:29
8x icoFoam speed up with Cufflink CUDA solver library kmooney OpenFOAM Running, Solving & CFD 42 November 6, 2012 11:37
Warning 097- AB Siemens 6 November 15, 2004 04:41


All times are GMT -4. The time now is 08:15.