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

Entry 'U' not found in dictionary ""

Register Blogs Community New Posts Updated Threads Search

Like Tree3Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 2, 2020, 15:06
Default Entry 'U' not found in dictionary ""
  #1
Member
 
Join Date: Jun 2020
Posts: 37
Rep Power: 6
efsolat is on a distinguished road
Hello all,
I have recently started to learn OF. I have made a geometry using topoSet and the conditions using changeDictionary. The solver is porousSimpleFoam.

when I run Allrun, the following error appears:


Create time
Create mesh for time = 0

SIMPLE: no convergence criteria found. Calculations will run for 10 steps.

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type laminar
Selecting laminar stress model Stokes
No MRF models present

No finite volume options present
Creating porosity model list from porosityProperties

Porosity region porosity1:
selecting model: DarcyForchheimer
creating porous zone: InternalSpace
origin: (0 0 0) e1: (1 0 0) e2: (0 1 0)
local bounds: (0.0003007 0.000259944 0.00025)

Using pressure explicit porosity

Starting time loop

Time = 0.01

--> FOAM FATAL IO ERROR:
Entry 'U' not found in dictionary ""

From function const Foam::dictionary& Foam::dictionary::subDict(const Foam::word&, Foam::keyType:ption) const
in file db/dictionary/dictionary.C at line 532.

FOAM exiting


Any help would be appreciable
Regards
efsolat is offline   Reply With Quote

Old   August 5, 2020, 19:15
Default
  #2
New Member
 
Anup Singh
Join Date: Mar 2020
Posts: 22
Rep Power: 6
Anup Singh is on a distinguished road
It seems like you are missing entries for U in your dictionary files ...
Supposedly in one of the source or include dictionary files like transport properties..
efsolat likes this.
Anup Singh is offline   Reply With Quote

Old   August 6, 2020, 04:07
Question
  #3
Member
 
Join Date: Jun 2020
Posts: 37
Rep Power: 6
efsolat is on a distinguished road
Thank you for your reply.
I think the the transport dictionary does not include any information about U. In my problem it is as below:


transportModel Newtonian;
nu 1e-6;
rho 1000;


I don't know which dictionaries i should search for missed U?
The BC of each region is put in changeDictionaryDict, and the P and U dictionaries exist in 0 folder.
Regards
efsolat is offline   Reply With Quote

Old   August 6, 2020, 05:36
Default
  #4
New Member
 
Anup Singh
Join Date: Mar 2020
Posts: 22
Rep Power: 6
Anup Singh is on a distinguished road
BC are defined in the 0 folder for the considered variable (in your case P and U) or you can modify them in solver as per your coding convenience. I have no idea how are you defining your BC elsewhere . ...



It seems like you are using some OF based source includes in your solution which some times require some feedback from the current data for adjustment of sources per iteration..


Try to look carefully if your are missing something there...
efsolat likes this.
Anup Singh is offline   Reply With Quote

Old   August 7, 2020, 04:15
Unhappy
  #5
Member
 
Join Date: Jun 2020
Posts: 37
Rep Power: 6
efsolat is on a distinguished road
The error still exists. Any help might be useful.
Thanks
efsolat is offline   Reply With Quote

Old   August 7, 2020, 05:30
Default
  #6
New Member
 
Anup Singh
Join Date: Mar 2020
Posts: 22
Rep Power: 6
Anup Singh is on a distinguished road
If its possible for you to upload your case along with solver, then I can try to take a look.
Anup Singh is offline   Reply With Quote

Old   August 8, 2020, 11:54
Default
  #7
Member
 
Join Date: Jun 2020
Posts: 37
Rep Power: 6
efsolat is on a distinguished road
Dear Anup Singh
Thank you very much for your response.
My case consists of 4 regions including 3 partial cylinder full of fluid and a half cubic porous media in which the fluid is penetrated from 2 of the cylinders and removed to the third one. for the internal media i set the following BC in changeDictionaryDict
Code:
dictionaryReplacement
{
   U
{
    internalField   uniform (0 0 0);
    boundaryField
    {
        ".*"
        {
            type    zeroGradient; 
         }
       InternalSpace_to_PA1
       { 
            type         porousBafflePressure;
            patchType    cyclic; 
            jump         uniform -1000;
            D            2e20;
            I            0.9e10;
            length       250e-6;
            value        uniform 0;
        }
       InternalSpace_to_PA2 
          { 
            type         porousBafflePressure;
            patchType    cyclic; 
            jump         uniform -1000;
            D            2e20;
            I            0.9e10;
            length       250e-6;
            value        uniform 0;
          }
        InternalSpace_to_PV 
           { 
            type         porousBafflePressure;
            patchType    cyclic; 
            jump         uniform 1000;
            D            2e20;
            I            0.9e10;
            length       250e-6;
            value        uniform 0;
           }
      }
}
epsilon
{
    internalField   uniform 0.01;
    boundaryField
    {
        ".*"
        {
            type            epsilonWallFunction;
            value           uniform 0.01;
        }
    }
}

k
{
    internalField   uniform 0.1;
    boundaryField
    {
        ".*"
        {
            type            kqRWallFunction;
            value           uniform 0.1;
        }
    }
}

p_rgh
{
    internalField   fixedValue;
    value  10000;
    boundaryField
    {
        ".*"
        {
            type            fixedFluxPressure;
        }
       InternalSpace_to_PA1
       { 
         type    fixedGradient;
         gradient   unifoem -1000;
       }
       InternalSpace_to_PA2
       { 
         type    fixedGradient;
         gradient   uniform -1000;
       }
       InternalSpace_to_PV
       { 
         type    fixedGradient;
         gradient   uniform 1000;
       }
    }
}
p
{
    internalField   uniform 10000;
    boundaryField
    {
        ".*"
        {
            type            calculated;
            value           uniform 0;
        }
    }
}
}

and for the partial cylinders the changeDictionaryDict is as below except that for the output conduit the values are opposed:


Code:
dictionaryReplacement
{
   U
 {
    internalField   uniform (0 0 18e-6);
    boundaryField
    {
        ".*"
         {
            type    fixedValue;
            value   $internalValue;
         }
       sides
         {
            type    zeroGradient; 
          }
       PA1_to_InternalSpace
           { 
            type         porousBafflePressure;
            patchType    cyclic; 
            jump         uniform 1000;
            D            2e20;
            I            0.9e10;
            length       250e-6;
            value        uniform 0;
           }
     }
}
epsilon
  {
    internalField   uniform 0.01;
    boundaryField
    {
        ".*"
        {
            type            epsilonWallFunction;
            value           uniform 0.01;
        }
    }
 }
k
{
    internalField   uniform 0.1;
    boundaryField
    {
        ".*"
        {
            type            kqRWallFunction;
            value           uniform 0.1;
        }
    }
}
 p_rgh
 {
    internalField   calculated;
    value           uniform 0;
    boundaryField
    {
        ".*"
        {
          type    fixedFluxPressure;
        }
       PA1_to_InternalSpace
       { 
         type         fixedGradient;
         gradient   unifoem 1000;
       }
     }
 }
 p
  {
    internalField   calculated;
    value           uniform 0;
    boundaryField
    {
        ".*"
        {
            type    calculated;
            value   uniform 0;
        }
    }
  }
}
and about the solver,



Code:
solvers
{
     p
    {
        solver          GAMG;
        tolerance       1e-03;
        relTol          0.1;
        smoother        GaussSeidel;
        nCellsInCoarsestLevel 20;
    }
    "(U|k|epsilon)"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        nSweeps         2;
        tolerance       1e-03;
        relTol          0.1;
    }
}

  SIMPLE
 {
    nUCorrectors    4;
    nNonOrthogonalCorrectors 4;
    convergenceCriterion 1.0e-5;
    pRefCell 0;
    pRefValue 0;
   residualControl
   {
    p 1e-4;
    U 1e-4;
   }
}
relaxationFactors
{
    fields
    {
        p               0.3;
    }
    equations
    {
        U               0.3;
        k               0.7;
        epsilon         0.7;
    }
}
Kind Regards

Last edited by efsolat; August 10, 2020 at 16:56.
efsolat is offline   Reply With Quote

Old   August 10, 2020, 13:23
Default
  #8
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
Please !!! use code tags for formatting your post. Please correct your above post and add the code tags.

If you are using 3 regions you need to have the following structure:

Code:
0
|- fluidRegion1
|  |-> U
|  |-> p
|  |-> ...
|- fluidRegion2
|  |-> U
|  |-> p
|  |-> ...
|- solidRegion1
|  |-> T
|  |-> p
|- solidRegion2
|  |-> T
|  |-> p
...
Your dictionaries don´t give us the information how your case looks like after executing.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   August 10, 2020, 17:05
Default
  #9
Member
 
Join Date: Jun 2020
Posts: 37
Rep Power: 6
efsolat is on a distinguished road
Thank you for reply. I have edited the previous post.

it seems that the changeDictionaryDict is not recognized by the solver and i don't know whether it is required or not to add something to the controlDict or somewhere else for the changeDictionaryDict to be recognized.
Regards
efsolat is offline   Reply With Quote

Old   August 11, 2020, 05:05
Default
  #10
Member
 
Join Date: Jun 2020
Posts: 37
Rep Power: 6
efsolat is on a distinguished road
Hello all
Now i can take a step farther and say that i almost found out where the problem originates from but don't know how to resolve it!
As i described a few posts earlier, my case includes 4 zones, 3 fluid conduits and a porous media. For all zones, the Navier-Stokes or+Darcy Eqs are to be solved. therefore i concluded that just 1 region exists in my case and i didn't used regionProperties.
when running

Code:
changeDictionary -region <zone>
changeDictionary content is not replaced in the 0/<zone> and the following warning is in the logchengeDictionary:
Code:
FOAM Warning : 
    From function int main(int, char**)
    in file changeDictionary.C at line 709
    Requested field to change dictionaryReplacement does not exist in "/home/efsol/Desktop/case/0/<zonenam>"
The question is" how should i define regions in regionProperties /"
I tried

Code:
changeDictionary  <zone>
but it didn't work.


Any help/suggestion is kindly appreciated
Regards
efsolat is offline   Reply With Quote

Old   August 17, 2020, 12:19
Default
  #11
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Hello efsolat!


Which solver are you using?


Regards,
Yann
Yann is offline   Reply With Quote

Old   August 17, 2020, 12:57
Default
  #12
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
As it is written, you need the files in

Code:
0/yourZone/

in which you should have your boundary fields such as, T, U, p, k, omega ...

Code:
0/yourZone/U
0/yourZone/T
.
.
.
The changeDictionary application will not create these files for you!
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Old   August 23, 2020, 02:33
Default
  #13
Member
 
Join Date: Jun 2020
Posts: 37
Rep Power: 6
efsolat is on a distinguished road
Hi Yann
I used the porousSimpleFoam.
efsolat is offline   Reply With Quote

Old   August 23, 2020, 02:40
Default
  #14
Member
 
Join Date: Jun 2020
Posts: 37
Rep Power: 6
efsolat is on a distinguished road
Quote:
Originally Posted by Tobi View Post
As it is written, you need the files in

Code:
0/yourZone/
in which you should have your boundary fields such as, T, U, p, k, omega ...

Code:
0/yourZone/U
0/yourZone/T
.
.
.
The changeDictionary application will not create these files for you!



Hi Tobi


Thanks for the reply.
I had made the files you mentioned in all 0/zones and i found and resolved the changeDictionary problem. now, changeDictionary works properly and replaces the BCs in the related files of 0 folder.

But the error
'Entry 'U' not found in dictionary ""'
remains unchanged!!


Regards
efsolat is offline   Reply With Quote

Old   August 24, 2020, 05:04
Default
  #15
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Hi Efsolat,

I think there is a confusion about what is a region in OpenFOAM.
The example given by Tobias with the "0/zone/" structure is only valid for multiregion solvers (like the chtMultiRegion(Simple)Foam solvers). But AFAIK, porousSimpleFoam is not a multiregion solver and your variable files should be located in 0/ directory.

You can set your BC directly in the files located in 0/, or you can use the changeDictionary utility to modify these files. This is a trick used in some tutorials, but it is not mandatory and it's perfectly fine to manually edit the files in 0/.

Could you post a case here so we can have a look at what might cause your problem? (ideally a light version of your case just to reproduce the error)

Regards,
Yann
efsolat likes this.
Yann is offline   Reply With Quote

Old   October 9, 2020, 15:56
Default
  #16
Member
 
Join Date: Jun 2020
Posts: 37
Rep Power: 6
efsolat is on a distinguished road
Quote:
Originally Posted by Yann View Post
Hi Efsolat,

I think there is a confusion about what is a region in OpenFOAM.
The example given by Tobias with the "0/zone/" structure is only valid for multiregion solvers (like the chtMultiRegion(Simple)Foam solvers). But AFAIK, porousSimpleFoam is not a multiregion solver and your variable files should be located in 0/ directory.

You can set your BC directly in the files located in 0/, or you can use the changeDictionary utility to modify these files. This is a trick used in some tutorials, but it is not mandatory and it's perfectly fine to manually edit the files in 0/.

Could you post a case here so we can have a look at what might cause your problem? (ideally a light version of your case just to reproduce the error)

Regards,
Yann
Hi Yann
Thank you very much for your reply.
As you said my case is a multi zone model in which one zone is porous and the others are fluid filled. I do not know whether it could be considered muiti zone or not.
I had defined the region properties as below:
Code:
regions
(
    fluid    (zone1 zone2 zone3 zone4)
    solid    ()
);
How can i find some information about region definition in OpenFoam?


The other thing is that i firstly defined a block and then divided it into four zones using topoSet utility. Each zone has different boundary conditions i.g the top face is divided into four and each partition has its own boundary condition which i put them in the 0/zone/U,.... I don't know how to set the BCs of zones if i have to define all in 0/U,....
I used the recommendation of this thread (Two porous zone buoyantSimpleFoam) and defined the BCs of the initial block in the files located in 0/. The BCs of each zone is defined in 0/zone/. I am not sure about it.

I have edited my case as a single region and now it runs.
This is the log result up to the first time step but it goes to the end of time loop:

Code:
Create time

Create mesh for time = 0


SIMPLE: convergence criteria
    field p     tolerance 1e-08
    field U     tolerance 1e-08

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type laminar
Selecting laminar stress model Stokes
No MRF models present

No finite volume options present
Creating porosity model list from porosityProperties

Porosity region porosity1:
    selecting model: DarcyForchheimer
    creating porous zone: InternalSpace
    origin: (0 0 0) e1: (1 0 0) e2: (0 1 0)
    local bounds: (0.0003007 0.000259944 0.00025)

Using pressure implicit porosity

Starting time loop

Time = 0.1

GAMG:  Solving for p, Initial residual = 7.43343e-07, Final residual = 1.80714e-07, No Iterations 1000
GAMG:  Solving for p, Initial residual = 2.9989e-07, Final residual = 9.36922e-08, No Iterations 414
GAMG:  Solving for p, Initial residual = 2.03912e-07, Final residual = 9.76252e-08, No Iterations 153
GAMG:  Solving for p, Initial residual = 1.90802e-07, Final residual = 9.39956e-08, No Iterations 8
GAMG:  Solving for p, Initial residual = 1.67922e-07, Final residual = 8.89795e-08, No Iterations 114
GAMG:  Solving for p, Initial residual = 1.67383e-07, Final residual = 9.12886e-08, No Iterations 133
GAMG:  Solving for p, Initial residual = 1.63465e-07, Final residual = 8.78786e-08, No Iterations 9
GAMG:  Solving for p, Initial residual = 1.70195e-07, Final residual = 9.91503e-08, No Iterations 2
GAMG:  Solving for p, Initial residual = 1.63968e-07, Final residual = 9.8325e-08, No Iterations 216
time step continuity errors : sum local = 4.1674e-17, global = 3.07302e-18, cumulative = 3.07302e-18
ExecutionTime = 694.54 s  ClockTime = 698 s

Any help is greatly appreciated.

Kindly Redards
Efsolat
efsolat is offline   Reply With Quote

Old   October 10, 2020, 08:06
Default
  #17
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Hello Efsolat,

porousSimpleFoam is not a multi region solver. the regionProperties file is meant to be used with the chtMultiRegion solvers and it is useless with porousSimpleFoam.

To model porous zone, we use cellZone, which is basically a group of cells in your domain where you want to apply a source term to simulate a porous media using a model such as Darcy-Forchheimer.

You don't need to define boundary conditions at the frontier of your zone because there is no boundary here. It's just a set of cells, the only difference is the source term which is applied to it.

You just have to create as many cellZone as you need (using snappyHexMesh or toposet for instance) and to define the porous model you want to apply on each zone (in constant/porosityProperties if you are using porousSimpleFoam, or in fvOptions for other solvers)

That's it!


Cheers,
Yann
Yann is offline   Reply With Quote

Old   October 10, 2020, 09:35
Default
  #18
Member
 
Join Date: Jun 2020
Posts: 37
Rep Power: 6
efsolat is on a distinguished road
Quote:
Originally Posted by Yann View Post
Hello Efsolat,

porousSimpleFoam is not a multi region solver. the regionProperties file is meant to be used with the chtMultiRegion solvers and it is useless with porousSimpleFoam.

To model porous zone, we use cellZone, which is basically a group of cells in your domain where you want to apply a source term to simulate a porous media using a model such as Darcy-Forchheimer.

You don't need to define boundary conditions at the frontier of your zone because there is no boundary here. It's just a set of cells, the only difference is the source term which is applied to it.

You just have to create as many cellZone as you need (using snappyHexMesh or toposet for instance) and to define the porous model you want to apply on each zone (in constant/porosityProperties if you are using porousSimpleFoam, or in fvOptions for other solvers)

That's it!


Cheers,
Yann



Dear Yann
Thank you very much for your time and reply.
Although cellZones are not necessarily regions but in the case i am to model it seems that different zones should be separated regions because experimentally there are different boundary conditions in the interface of zones.
My simplified case is like this:
Consider a uniformly fluid filled cylinder with permeable wall that is connected to a porous medium and there is a fixed value pressure gradient in their interface. At the other extreme of the porous medium there is an other cylinder with a different fixed value pressure gradient. Moreover, in the first level i defined a uniform velocity in the the input of the cylinders but different for each one, but at last they should be time dependent.
Therefore i separated the zones using

splitMeshRegions -cellZones -overwrite


I don't know is it true to define zones, if not how can i define interfaces pressure gradients and input velocity only for cylinder zones?


Best Regards
efsolat is offline   Reply With Quote

Old   October 11, 2020, 04:45
Default
  #19
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,238
Rep Power: 29
Yann will become famous soon enoughYann will become famous soon enough
Dear Efsolat,

I'm not sure to understand what you are trying to achieve. Could you post a drawing describing your domain and the boundary conditions you want to apply to it?

What I know for sure is that porousSimpleFoam is not designed to work with multiple regions. You won't be able to use it on meshes splitted with splitMeshRegions.

Best regards,
Yann
Yann is offline   Reply With Quote

Old   October 12, 2020, 07:36
Default
  #20
Member
 
Join Date: Jun 2020
Posts: 37
Rep Power: 6
efsolat is on a distinguished road
Quote:
Originally Posted by Yann View Post
Dear Efsolat,

I'm not sure to understand what you are trying to achieve. Could you post a drawing describing your domain and the boundary conditions you want to apply to it?

What I know for sure is that porousSimpleFoam is not designed to work with multiple regions. You won't be able to use it on meshes splitted with splitMeshRegions.

Best regards,
Yann

Dear yann
Thanks for your reply
Here i posted an image of my case geometry. The regions shown in red and blue and yellow are fluid filled and the green volume is porous.


Best Regard
efsolat is offline   Reply With Quote

Reply


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
error in fireFoam, when running the case wallFireSpread2D zhoubiao1088 OpenFOAM Running, Solving & CFD 9 February 1, 2018 19:45
[Other] Mesh Importing Problem cuteapathy ANSYS Meshing & Geometry 2 June 24, 2017 06:29
8x icoFoam speed up with Cufflink CUDA solver library kmooney OpenFOAM Running, Solving & CFD 42 November 6, 2012 12:37
missing vtf3.h BPatch.h papi.h linch OpenFOAM Installation 41 July 24, 2012 15:45
OpenFOAM 1.7.1 installation problem on OpenSUSE 11.3 flakid OpenFOAM Installation 16 December 28, 2010 09:48


All times are GMT -4. The time now is 21:25.