CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > OpenFOAM Pre-Processing

Problem about setFields

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

Reply
 
LinkBack Thread Tools Display Modes
Old   May 18, 2007, 12:36
Default Hello I am running the damB
  #1
New Member
 
weiyan
Join Date: Mar 2009
Posts: 10
Rep Power: 6
williamscn is on a distinguished road
Hello

I am running the damBreakFine case. When I run:
setFields . damBreakFine
I get following error:
--> FOAM FATAL IO ERROR : size 2268 is not equal to the given value of 7700

How to do with this?

Thanks
williamscn is offline   Reply With Quote

Old   May 18, 2007, 12:47
Default I got the problem. Thanks
  #2
New Member
 
weiyan
Join Date: Mar 2009
Posts: 10
Rep Power: 6
williamscn is on a distinguished road
I got the problem.
Thanks
williamscn is offline   Reply With Quote

Old   May 18, 2007, 22:53
Default From memory, this is something
  #3
New Member
 
Richard Morgans
Join Date: Mar 2009
Posts: 16
Rep Power: 6
rmorgans is on a distinguished road
From memory, this is something to do with not copying gamma.org to gamma (check out the Allrun script).

Rick
rmorgans is offline   Reply With Quote

Old   July 30, 2009, 07:01
Default
  #4
New Member
 
Join Date: Jul 2009
Posts: 1
Rep Power: 0
student0815 is on a distinguished road
Hi,

I got the same problem.

Followed instructions as told in the tutorial, but the same error occures.

Unfortunately no solution is given in this thread.

Anybody who can help?

Greetz
student0815 is offline   Reply With Quote

Old   October 6, 2009, 13:16
Default
  #5
Senior Member
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin,Ireland
Posts: 428
Rep Power: 9
bigphil is on a distinguished road
I assume you have sorted the problem but for anyone else who has the same problem, you must copy gamma.org over gamma
ie cp 0/gamma.org 0/gamma
and type yes when it asks if you want to overwrite 0/gamma.

gamma starts off as a file with patch conditions (zeroGradient,symmetry,empty), then when setFields is run it reads this file and overwrites it with what I'm guessing is the values for the internal cells and the patches values are at the bottom.

So if you want to run setFields again (like if you changed your mesh) then you should copy gamma.org to gamma. gamma.org is a copy of the original gamma.

Hopefully this will help somebody.
Philip

Last edited by bigphil; October 9, 2009 at 07:37.
bigphil is offline   Reply With Quote

Old   December 2, 2009, 06:33
Default
  #6
Senior Member
 
Claus Meister
Join Date: Aug 2009
Location: Wiesbaden, Germany
Posts: 240
Rep Power: 6
idrama is on a distinguished road
Hey there!

the copying help.

cheers,

Claus
idrama is offline   Reply With Quote

Old   December 2, 2009, 06:49
Default
  #7
Senior Member
 
bigphil's Avatar
 
Philip Cardiff
Join Date: Mar 2009
Location: Dublin,Ireland
Posts: 428
Rep Power: 9
bigphil is on a distinguished road
Hi Claus,

As far as I know, the origin of the error is that the mesh (or mesh density) has been changed since the 'setFields' was last ran.

Is it the 'damBreak' case you are trying?

When you copy 'damBreak' from the '$FOAM_TUTORIALS/interFoam/' directory, you run 'blockMesh' first and then 'setFields', does 'setFields' work fine then?

Are you then changing the mesh density?

If you now run 'setFields' you will get the error above, so assuming 'gamma.org' was not altered, if you 'cp 0/gamma.org 0/gamma' then when you run 'setFields' it will work (I had a quick go with damBreak now and after copying the gamma.org file then 'setFields' works without the error).

In case 'gamma.org' was for some reason altered, just get it from $FOAM_TUTORIALS again ie 'cp $FOAM_TUTORIALS/interFoam/damBreak/0/gamma.org 0/gamma'


Hopefully this helps,
Btw I am assuming you are using the 'damBreak' case, let me know if the above doesn't help of if you are using a different case,

Philip

Last edited by bigphil; December 2, 2009 at 07:06.
bigphil is offline   Reply With Quote

Old   December 14, 2010, 16:05
Default
  #8
Senior Member
 
Bernhard Linseisen
Join Date: May 2010
Location: Geneva
Posts: 116
Blog Entries: 1
Rep Power: 5
Linse is on a distinguished road
Though it might be necromancy to get back a thread nobody posted in for that long a time:

I do not remember which one it actually was, but one of the two things happened:
Either the files in the "polyMesh" directory remained the same and deleting those (make a copy of your blockMeshDict and do rm casename/constant/polyMesh/* ) helped.
Or it was necessary to renew the files of the variables in the casename/0 directory, as these are altered by earlier setFields-commands. Again: Keep a copy of the original files (before altering them with setFields) and just make "rm casename/0/*".

In both cases you have to copy back the "old" files to the directory where they are needed. If you then do a "blockMesh -case casename" and a "setFields -case casename" everything should be okay again.

In case I forget, remind me via private message, and I will upload a small script I wrote for these things...
Linse is offline   Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SetFields runs with no errors but doesnbt change fields adamsview OpenFOAM Pre-Processing 2 September 24, 2010 04:30
InterDyMFoam and problem with setFields chris_sev OpenFOAM Running, Solving & CFD 1 March 23, 2009 22:23
Setfields inoutlet and water and air patches erik023 OpenFOAM Pre-Processing 1 September 29, 2008 10:05
Regarding setFields file 21kalee OpenFOAM Running, Solving & CFD 0 January 14, 2008 05:42
problem in solving "wave generation" problem san FLUENT 2 April 3, 2006 23:37


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