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/)
-   -   sampleDict error (https://www.cfd-online.com/Forums/openfoam-post-processing/183766-sampledict-error.html)

KateEisenhower February 13, 2017 09:37

sampleDict error
 
Dear OpenFOAM users,

I am running 4.0 and have a problem with the sampleDict file:

Step 1: I start with an empty sampleDict file:
Of course OF yields an error message:

Code:

--> FOAM FATAL IO ERROR:
keyword type is undefined in dictionary ".functions.sampleDict"

Step 2: My sampleDict file now looks like this:

Code:

type asdf;
Now it runs and as expected I get the following error message for every timestep:

Code:

--> FOAM Warning :
    From function bool Foam::dictionary::add(Foam::entry*, bool)
    in file db/dictionary/dictionary.C at line 807
    Reading "" from line 18 to line 18
    attempt to add entry functions which already exists in dictionary ""
--> FOAM Warning :
    From function bool Foam::functionObjectList::read()
    in file db/functionObjects/functionObjectList/functionObjectList.C at line 644
    Caught FatalError
--> FOAM FATAL ERROR:
Unknown function type asdf

Valid functions are :

8
(
forceCoeffs
forces
patchProbes
probes
psiReactionThermoMoleFractions
rhoReactionThermoMoleFractions
sets
surfaces
)

Step 3: No my sampleDict file looks like this:

Code:

type probes;
As expected, I get the following:

Code:

--> FOAM FATAL IO ERROR:
keyword probeLocations is undefined in dictionary ".functions.sampleDict"

file: .functions.sampleDict from line 18 to line 18.

    From function const Foam::entry& Foam::dictionary::lookupEntry(const Foam::word&, bool, bool) const
    in file db/dictionary/dictionary.C at line 441.

Step 4: Now it gets interesting. My sampleDict looks like this:

Code:

type surfaces;
I get the following error for every timestep:

Code:

--> FOAM Warning :
    From function bool Foam::dictionary::add(Foam::entry*, bool)
    in file db/dictionary/dictionary.C at line 807
    Reading "" from line 18 to line 18
    attempt to add entry functions which already exists in dictionary ""

Can someone explain this? Why don't I get a similar error as in step 3?

Best regards and thank you in advance,

Kate Eisenhower

Joshua14 April 4, 2017 09:59

KateEisenhower,

I am not sure how sampleDict works, but I would recommend using the surfaces function object. It will let you right planes, patches, or isosurfaces at time steps independent or at write times with little difficulty.

Joshua

sitajeje August 9, 2017 08:15

Hallo Kate,

Have you solved your problem? I have the same problem as you described. I copied the "probes" file into "system" folder as the user guide described, and add functions {#includeFunc probes} into "controlDict". After I ran the postProcess -func probes, I saw the same warning message as you described. One "postProcessing/probes" folder was created. However the data was not saved in one single file, but different time folders were created, where the "U" file with one single data for the corresponding time was saved.

I ran also pimpleDyMFoam -postProcess, but nothing happened, the #includeFunc seemed to be absent.

I continued to run the case with "probes" and it functioned as described in the user guide: only one "U" file was created with all time and value listed.

I would appreciate if you have some suggestions for me. Thank you very much in advance!

Best regards,

sitajeje

ch_jaehnel October 17, 2018 03:19

Quote:

Originally Posted by sitajeje (Post 660024)
Hallo Kate,

Have you solved your problem? I have the same problem as you described. I copied the "probes" file into "system" folder as the user guide described, and add functions {#includeFunc probes} into "controlDict". After I ran the postProcess -func probes, I saw the same warning message as you described. One "postProcessing/probes" folder was created. However the data was not saved in one single file, but different time folders were created, where the "U" file with one single data for the corresponding time was saved.

I ran also pimpleDyMFoam -postProcess, but nothing happened, the #includeFunc seemed to be absent.

I continued to run the case with "probes" and it functioned as described in the user guide: only one "U" file was created with all time and value listed.

I would appreciate if you have some suggestions for me. Thank you very much in advance!

Best regards,

sitajeje


Did you find any solution for this? I have no clue, what this error could say to me:


Code:

--> FOAM Warning :
    From function bool Foam::dictionary::add(Foam::entry *, bool)
    in file db/dictionary/dictionary.C at line 884
    Reading "" from line 19 to line 41
    attempt to add entry functions which already exists in dictionary ""


I already found out, that it only shows up for time directories with a "uniform" directory in it. It's strange that some directories have it and some not... Any help is appreciated!



I want to use it for a interDyMFoam simulation in OF5.0.


Thank you!

JMcnetee October 18, 2021 10:56

Any solutions to this?
 
I am having the same problem.

Any insights?

Actually, I can run the surface sample while running openFoam, but not afterwards with postProcess.

JMcnetee October 18, 2021 13:39

Fixed it
 
I think I fixed the problem.

It may be the case that the dictionary file itself needs to be named "surfaces" for the postProcess to work.

seems like a bug, but it works.


All times are GMT -4. The time now is 03:29.