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

Error size 400 is not equal to the given value of 1681

Register Blogs Community New Posts Updated Threads Search

Like Tree9Likes
  • 1 Post By alimansouri
  • 1 Post By RobertHB
  • 6 Post By RobertHB
  • 1 Post By A H Gazi

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 31, 2008, 15:04
Default Hi guys I am working on my
  #1
New Member
 
Ali Mansouri
Join Date: Mar 2009
Posts: 15
Rep Power: 17
alimansouri is on a distinguished road
Hi guys

I am working on my first tutorial (lidcavity) and I changed the mesh density from 20*20 to 41*41
and I got this error


size 400 is not equal to the given value of 1681


could you help and let me know what I am missing?

thank you!
flynno2 likes this.
alimansouri is offline   Reply With Quote

Old   January 6, 2009, 06:32
Default Hi , I m not sure just delete
  #2
Member
 
Sachin Kanetkar
Join Date: Mar 2009
Posts: 57
Rep Power: 17
sachin is on a distinguished road
Hi ,
I m not sure just delete all other files other than blockMeshdict from polyMesh folder and again run blockMesh...
i hope u ran blockMesh command after editing meshdict
sachin is offline   Reply With Quote

Old   January 7, 2009, 04:58
Default The initialization of gamma is
  #3
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20
sega is on a distinguished road
The initialization of gamma is done in a list containing 20*20 values. If you change the cell to 41*41 there are more cells than values for gamma.

You have to set the gamma field to the new mesh using setFields or funkySetFields.

Tell me if this works out.
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   December 2, 2009, 06:40
Default
  #4
Senior Member
 
Claus Meister
Join Date: Aug 2009
Location: Wiesbaden, Germany
Posts: 241
Rep Power: 17
idrama is on a distinguished road
Thanks a lot!

It had worked.

cheers
idrama is offline   Reply With Quote

Old   August 6, 2018, 01:12
Default
  #5
New Member
 
Ainal Hoque Gazi
Join Date: May 2018
Location: India
Posts: 27
Rep Power: 7
A H Gazi is on a distinguished road
Quote:
Originally Posted by idrama View Post
Thanks a lot!

It had worked.

cheers



Hi sir i am facing same error in twoPhaseEulerFoam.how did you solve your problem ?please help. i am very new in openfoam. where to change gamma value i am not able to find out.i am using openFoam 5.0.
....size 6000 is not equal to the given value of 49600
Thanks and please reply .
A H Gazi is offline   Reply With Quote

Old   August 6, 2018, 05:08
Default
  #6
Senior Member
 
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 11
RobertHB is on a distinguished road
As Sebastian wrote in 2009, your gamma file contains less values than you have grid points. This is most likely because you changed the mesh of the case that you are using. Create a "empty" gamma file in your 0 folder. Similar to the other variables there, with only your boundaries. If you need a patch value or internal field, define it there. But dont use the gamma file with a list of values that dont match your mesh.
Alternatively, you can try mapping the lower resolution list onto your new mesh using map fields.
A H Gazi likes this.
__________________
If you liked my answer to your question, please consider leaving a "Like" in return
RobertHB is offline   Reply With Quote

Old   August 6, 2018, 09:19
Default
  #7
New Member
 
Ainal Hoque Gazi
Join Date: May 2018
Location: India
Posts: 27
Rep Power: 7
A H Gazi is on a distinguished road
Quote:
Originally Posted by RobertHB View Post
As Sebastian wrote in 2009, your gamma file contains less values than you have grid points. This is most likely because you changed the mesh of the case that you are using. Create a "empty" gamma file in your 0 folder. Similar to the other variables there, with only your boundaries. If you need a patch value or internal field, define it there. But dont use the gamma file with a list of values that dont match your mesh.
Alternatively, you can try mapping the lower resolution list onto your new mesh using map fields.



Thank you very much sir, for your quick reply.As i said i am very new in openFoam.Will you please give me a example. after making gamma file and putting my boundary condition what will be the gamma value??sorry for my little knowledge.
Regard
A H Gazi is offline   Reply With Quote

Old   August 7, 2018, 03:16
Default
  #8
Senior Member
 
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 11
RobertHB is on a distinguished road
Quote:
Originally Posted by A H Gazi View Post
Thank you very much sir, for your quick reply.As i said i am very new in openFoam.Will you please give me a example. after making gamma file and putting my boundary condition what will be the gamma value??sorry for my little knowledge.
Regard
Is it really a file named "gamma" giving you problems? Your error code should tell you which files are not matching you mesh. Anyhow, here is an example from a case of mine (variable and size will not match yours). I'm pretty sure that the file giving you trouble will look something like this
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    location    "686";
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 -1 0 0 0 0];

internalField   nonuniform List<vector> 
40707
(
(5.75351e-08 1.78608e-13 -1.29983e-08)
(4.34756e-08 -1.68768e-11 1.1458e-08)
(6.87797e-08 -1.31685e-11 -1.64066e-08)
(1.26222e-07 1.20794e-11 -2.15262e-09)
(8.19207e-08 6.92902e-12 1.65675e-08)
(3.25676e-08 -2.42031e-11 -9.9565e-10)
(3.88896e-07 -1.56001e-11 3.71109e-08)
(3.39852e-07 7.24725e-12 1.21746e-08)
(3.42452e-07 1.10985e-11 7.22658e-09)
[...]
(1.25084e-06 -1.60452e-10 1.37135e-09)
(1.16599e-06 6.83278e-11 -6.65523e-09)
(1.25118e-06 1.34288e-10 1.54835e-09)
(1.16659e-06 -2.39878e-11 2.30208e-09)
)
;

boundaryField
{
    front
    {
        type            slip;
    }
    back
    {
        type            slip;
    }
    inlet
    {
        type            fixedValue;
        value           nonuniform List<vector> 
            92
            (
            (3.9921e-07 9.41269e-12 3.60087e-08)
            (9.47981e-07 -1.95452e-12 4.31057e-08)
            (1.35416e-06 -1.04229e-11 3.00812e-08)
            [...]
            (1.16941e-06 -5.50304e-11 4.28134e-08)
            (1.2247e-06 -3.0136e-10 4.27937e-08)
            );
    }
    
    outlet
    {
        type            inletOutlet;
        inletValue      uniform (0 0 0);
        value           nonuniform List<vector> 
            74
            (
            (4.53798e-07 -2.58165e-10 4.07981e-08)
            (9.47981e-07 -1.95452e-12 4.31057e-08)
            [...]
            (1.58258e-06 -1.05756e-14 4.61522e-09)
            (1.05566e-06 2.77257e-11 4.06847e-08)
            (1.05562e-06 5.70094e-11 4.06854e-08)
            (9.4798e-07 7.00389e-12 4.30221e-08)
            );
    }
    
    top
    {
        type            slip;
    }
    
    lowerWall
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
}
It contains data from a previous run or timestep. In total my file contains 40707 points for the internal field and a few points for a patch called inlet and outlet. If i would copy this file into a different case where the internal mesh does not have 40707 points in the internalField i would get an error like you. It might read "size 40707 is not equal to the given value of 4096" or something like that. If i remove all data points from my file i get a variable file containing only the bounary conditions. Like this:
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    location    "1";
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0.000625 0 0);

boundaryField
{
    bottom
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
    top
    {
        type            slip;
    }
    inlet
    {
        type            cyclic;
    }
    outlet
    {
        type            cyclic;
    }
    front
    {
        type            slip;
    }
    back
    {
        type            slip;
    }
    lowerWall
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
 }
Try it for your own files and boundary conditions. I'd be surprised if it doesnt fix your problems.

If you need further help,dont hesitate to ask, but provide more detail. For example post the error OpenFoam gives you. Or post the file that gives your problems.
__________________
If you liked my answer to your question, please consider leaving a "Like" in return
RobertHB is offline   Reply With Quote

Old   August 7, 2018, 07:26
Thumbs up
  #9
New Member
 
Ainal Hoque Gazi
Join Date: May 2018
Location: India
Posts: 27
Rep Power: 7
A H Gazi is on a distinguished road
Quote:
Originally Posted by RobertHB View Post
Is it really a file named "gamma" giving you problems? Your error code should tell you which files are not matching you mesh. Anyhow, here is an example from a case of mine (variable and size will not match yours). I'm pretty sure that the file giving you trouble will look something like this
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    location    "686";
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 -1 0 0 0 0];

internalField   nonuniform List<vector> 
40707
(
(5.75351e-08 1.78608e-13 -1.29983e-08)
(4.34756e-08 -1.68768e-11 1.1458e-08)
(6.87797e-08 -1.31685e-11 -1.64066e-08)
(1.26222e-07 1.20794e-11 -2.15262e-09)
(8.19207e-08 6.92902e-12 1.65675e-08)
(3.25676e-08 -2.42031e-11 -9.9565e-10)
(3.88896e-07 -1.56001e-11 3.71109e-08)
(3.39852e-07 7.24725e-12 1.21746e-08)
(3.42452e-07 1.10985e-11 7.22658e-09)
[...]
(1.25084e-06 -1.60452e-10 1.37135e-09)
(1.16599e-06 6.83278e-11 -6.65523e-09)
(1.25118e-06 1.34288e-10 1.54835e-09)
(1.16659e-06 -2.39878e-11 2.30208e-09)
)
;

boundaryField
{
    front
    {
        type            slip;
    }
    back
    {
        type            slip;
    }
    inlet
    {
        type            fixedValue;
        value           nonuniform List<vector> 
            92
            (
            (3.9921e-07 9.41269e-12 3.60087e-08)
            (9.47981e-07 -1.95452e-12 4.31057e-08)
            (1.35416e-06 -1.04229e-11 3.00812e-08)
            [...]
            (1.16941e-06 -5.50304e-11 4.28134e-08)
            (1.2247e-06 -3.0136e-10 4.27937e-08)
            );
    }
    
    outlet
    {
        type            inletOutlet;
        inletValue      uniform (0 0 0);
        value           nonuniform List<vector> 
            74
            (
            (4.53798e-07 -2.58165e-10 4.07981e-08)
            (9.47981e-07 -1.95452e-12 4.31057e-08)
            [...]
            (1.58258e-06 -1.05756e-14 4.61522e-09)
            (1.05566e-06 2.77257e-11 4.06847e-08)
            (1.05562e-06 5.70094e-11 4.06854e-08)
            (9.4798e-07 7.00389e-12 4.30221e-08)
            );
    }
    
    top
    {
        type            slip;
    }
    
    lowerWall
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
}
It contains data from a previous run or timestep. In total my file contains 40707 points for the internal field and a few points for a patch called inlet and outlet. If i would copy this file into a different case where the internal mesh does not have 40707 points in the internalField i would get an error like you. It might read "size 40707 is not equal to the given value of 4096" or something like that. If i remove all data points from my file i get a variable file containing only the bounary conditions. Like this:
Code:
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    location    "1";
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0.000625 0 0);

boundaryField
{
    bottom
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
    top
    {
        type            slip;
    }
    inlet
    {
        type            cyclic;
    }
    outlet
    {
        type            cyclic;
    }
    front
    {
        type            slip;
    }
    back
    {
        type            slip;
    }
    lowerWall
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
 }
Try it for your own files and boundary conditions. I'd be surprised if it doesnt fix your problems.

If you need further help,dont hesitate to ask, but provide more detail. For example post the error OpenFoam gives you. Or post the file that gives your problems.



I got it, the error has gone now.Thank you very much for your detail explanation,I really appreciate.
flynno2 likes this.
A H Gazi 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
FOAM FATAL IO ERROR size 1 is not equal to the given value of 26776 hariya03 OpenFOAM Pre-Processing 3 June 14, 2013 02:11
Strange results from interFoam solution converges but sum of all forces not equal to zero nicasch OpenFOAM Running, Solving & CFD 0 April 15, 2008 02:01
[blockMesh] BlockMesh error with growing mesh size kian OpenFOAM Meshing & Mesh Conversion 4 September 24, 2007 16:00
Error while using size function(urgent!) Neo FLUENT 0 June 16, 2007 12:24
Error: insufficient catalogue size Anurag CFX 1 January 7, 2005 09:01


All times are GMT -4. The time now is 02:20.