|
[Sponsors] |
May 18, 2007, 13:36 |
Hello
I am running the damB
|
#1 |
New Member
weiyan
Join Date: Mar 2009
Posts: 10
Rep Power: 17 |
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 |
|
May 18, 2007, 13:47 |
I got the problem.
Thanks
|
#2 |
New Member
weiyan
Join Date: Mar 2009
Posts: 10
Rep Power: 17 |
I got the problem.
Thanks |
|
May 18, 2007, 23:53 |
From memory, this is something
|
#3 |
New Member
Richard Morgans
Join Date: Mar 2009
Posts: 16
Rep Power: 17 |
From memory, this is something to do with not copying gamma.org to gamma (check out the Allrun script).
Rick |
|
July 30, 2009, 08:01 |
|
#4 |
New Member
Join Date: Jul 2009
Posts: 1
Rep Power: 0 |
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 |
|
October 6, 2009, 14:16 |
|
#5 |
Super Moderator
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,097
Rep Power: 34 |
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 08:37. |
|
December 2, 2009, 07:33 |
|
#6 |
Senior Member
Claus Meister
Join Date: Aug 2009
Location: Wiesbaden, Germany
Posts: 241
Rep Power: 18 |
Hey there!
the copying help. cheers, Claus |
|
December 2, 2009, 07:49 |
|
#7 |
Super Moderator
Philip Cardiff
Join Date: Mar 2009
Location: Dublin, Ireland
Posts: 1,097
Rep Power: 34 |
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 08:06. |
|
December 14, 2010, 17:05 |
|
#8 |
Senior Member
|
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... |
|
December 8, 2014, 22:39 |
|
#9 | |
Senior Member
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18 |
Quote:
Create mesh for time = 0.00 Reading set description: WP1 WP3 Time = 0.00 --> FOAM FATAL IO ERROR: size 30000 is not equal to the given value of 80000 file: /home/cfsengineers/OpenFOAM/cfsengineers-2.2.1/run/tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/0.00/alpha1 from line 18 to line 30046. From function Field<Type>::Field(const word& keyword, const dictionary&, const label) in file /home/opencfd/OpenFOAM/OpenFOAM-2.2.1/src/OpenFOAM/lnInclude/Field.C at line 236. |
||
December 9, 2014, 08:08 |
|
#10 |
Senior Member
|
Copy alpha* from 0.org to 0. Is this large pink font really necessary? It hurts in the eyes .
__________________
Blog: sourceflux.de/blog "The OpenFOAM Technology Primer": sourceflux.de/book Twitter: @sourceflux_de Interested in courses on OpenFOAM? |
|
December 9, 2014, 09:46 |
|
#11 |
Senior Member
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18 |
||
December 9, 2014, 09:53 |
|
#12 |
Senior Member
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18 |
My ./Allrun looks like this, where I have copied alpha1.org to aplha1.
#!/bin/sh cd ${0%/*} || exit 1 # run from this directory # Source tutorial run functions . $WM_PROJECT_DIR/bin/tools/RunFunctions runApplication blockMesh cp 0/alpha1.org 0/alpha1 runApplication setFields runApplication `getApplication` # ----------------------------------------------------------------- end-of-file But OpenFoam still complains. Any other suggestions? |
|
December 9, 2014, 09:58 |
|
#13 | |
Senior Member
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18 |
Quote:
Code is in FORTRAN 90: write(*,*) 'Cleaning files from previous run' call system(cd_command // './Allclean') ! clean all files from previous run. write(*,*) 'Running blockMesh' call system(cd_command // 'blockMesh') ! set up the tank geometry and mesh size write(*,*) 'recover phase file and run setFields' call system(cd_command // 'cp 0/alpha1.org 0/alpha1') ! create new alpha1 file from alpha1.org file call system(cd_command // 'setFields') ! coordinate mesh between geometry and phase file write(*,*) 'Decompose subdomains for parallel processing' call system(cd_command // 'decomposePar') |
||
December 9, 2014, 15:42 |
|
#14 |
Senior Member
|
check your alpha field before you run setFields. If it's not uniform, then you have found the source of your problem.
__________________
Blog: sourceflux.de/blog "The OpenFOAM Technology Primer": sourceflux.de/book Twitter: @sourceflux_de Interested in courses on OpenFOAM? |
|
December 12, 2014, 09:08 |
|
#15 |
Senior Member
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18 |
Thankyou for your advice. I made sure that the alpha field is ok, Then I noted that there were some extra folders with alpha in them that OpenFOAM was trying to read. The alpha field had the mesh from the previous models. I deleted those and now the code runs fine. I guess you can never check the codes enough to make sure that there are no glitches during run time.
|
|
December 13, 2014, 08:10 |
|
#16 |
Senior Member
|
Great that you made it work. But I doubt that this is a "glitch at runtime", as this is coded to work like that. On purpose . Otherwise you would not be able to proceed from a previous state.
__________________
Blog: sourceflux.de/blog "The OpenFOAM Technology Primer": sourceflux.de/book Twitter: @sourceflux_de Interested in courses on OpenFOAM? |
|
December 15, 2014, 09:13 |
|
#17 |
Senior Member
musaddeque hossein
Join Date: Mar 2009
Posts: 309
Rep Power: 18 |
You are right. There were two files left over from a previous model/run which was the source of the misread by OpenFOAM. So no glitches there.I just have to make sure that there are no leftover files or data from other runs and models that may affect the new run.
|
|
July 12, 2016, 12:55 |
|
#18 |
New Member
Madeleine
Join Date: Jun 2016
Posts: 14
Rep Power: 10 |
Hi to all,
I've got a familiar problem. I translate my mesh, with transformPoints -translate ... so that my coordinate system is in the outlet. But now I my setFields doesnt work anymore. I doenst write in the alpha.water case and the box which is in the case doesnt fit with the coordinates i put in setFields. Can someone help me? Thanks |
|
August 28, 2017, 08:42 |
I just need to use new mesh
|
#19 |
New Member
Gustavo Cordoba
Join Date: Aug 2017
Location: Pasto, Colombia
Posts: 9
Rep Power: 9 |
Dear all,
I am trying to run the compressible shocktube example, bu using a gmsh generated mesh. I cannot follow your advices, because I think there is no point on copying 0/* exactly from the original problem. How can I get correctly modified 0/*s? Btw, setFields reports: ------------------ --> FOAM FATAL IO ERROR: size 200 is not equal to the given value of 81612 ----------- because the original shocktube problem has 200 cells, whereas my problem contains 81612 cells. Any idea? Thanks. |
|
January 24, 2018, 11:06 |
Setfields no rewriting alpha.water file
|
#20 |
Member
Shafik Walakaka
Join Date: Oct 2017
Posts: 38
Rep Power: 9 |
Hi all,
I modified the dambreak case to simulate a two-phase flow for a horizontal pipe. My mesh seems ok in Parafoam after running blockMesh. However, when I run setFields, the alpha.water files are not being re-written. Therefore my horizontal pipe is still completely filled with water (alpha = 1) even after I tried making the top half air using boxtocell. Anyone has got any idea what I'm missing? (It works perfectly fine for the dambreak case) Regards Shafik |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
SetFields runs with no errors but doesnbt change fields | adamsview | OpenFOAM Pre-Processing | 3 | December 12, 2014 22:03 |
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 11:05 |
Regarding setFields file | 21kalee | OpenFOAM Running, Solving & CFD | 0 | January 14, 2008 06:42 |
problem in solving "wave generation" problem | san | FLUENT | 2 | April 4, 2006 00:37 |