CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   setfileds for cylindrical mesh (http://www.cfd-online.com/Forums/openfoam/82821-setfileds-cylindrical-mesh.html)

aki_yafuji December 7, 2010 02:01

setfileds for cylindrical mesh
 
Hello, everyone!

I am a beginner of OpenFOAM, and I am struggling with it...
If possible, please give me a piece of advice!

Now I am trying to simulate sloshing behavior in a cylindrical tank.
Firstly, I tried to make a cylindrical mesh and fill the tank with water.
Then, I modified blockMeshDict and setFiledsDict in a sloshing tutorial
case as follows.

blockMeshDict
------------------------------------
convertToMeters 1;

vertices
(
(1 0 0) // 0
(2 0 0) // 1
(0 2 0) // 2
(0 1 0) // 3
(1 0 4) // 4
(2 0 4) // 5
(0 2 4) // 6
(0 1 4) // 7
(-2 0 0) // 8
(-1 0 0) // 9
(-2 0 4) // 10
(-1 0 4) // 11
(0 -2 0) // 12
(0 -1 0) // 13
(0 -2 4) // 14
(0 -1 4) // 15
);

blocks
(
hex (0 1 2 3 4 5 6 7) (32 32 64) simpleGrading (1 1 1)
hex (3 2 8 9 7 6 10 11) (32 32 64) simpleGrading (1 1 1)
hex (9 8 12 13 11 10 14 15) (32 32 64) simpleGrading (1 1 1)
hex (13 12 1 0 15 14 5 4) (32 32 64) simpleGrading (1 1 1)
hex (0 3 9 13 4 7 11 15) (32 32 64) simpleGrading (1 1 1)
);

edges
(
arc 0 3 (0.6071 0.6071 0)
arc 1 2 (1.4142 1.4142 0)
arc 4 7 (0.6071 0.6071 4)
arc 5 6 (1.4142 1.4142 4)
arc 3 9 (-0.6071 0.6071 0)
arc 2 8 (-1.4142 1.4142 0)
arc 7 11 (-0.6071 0.6071 4)
arc 6 10 (-1.4142 1.4142 4)
arc 9 13 (-0.6071 -0.6071 0)
arc 8 12 (-1.4142 -1.4142 0)
arc 11 15 (-0.6071 -0.6071 4)
arc 10 14(-1.4142 -1.4142 4)
arc 13 0 (0.6071 -0.6071 0)
arc 12 1 (1.4142 -1.4142 0)
arc 15 4 (0.6071 -0.6071 4)
arc 14 5 (1.4142 -1.4142 4)
);

patches
(
wall walls
(
(1 5 6 2)
(2 6 10 8)
(8 10 14 12)
(12 14 5 1)
(0 1 2 3)
(3 2 8 9)
(9 8 12 13)
(13 12 1 0)
(0 3 9 13)
(4 5 6 7)
(7 6 10 11)
(11 10 14 15)
(15 14 5 4)
(4 7 11 15)
)
);
------------------------------------


setFiledsDict
------------------------------------
defaultFieldValues
(
volScalarFieldValue alpha1 0
);

regions
(
boxToCell
{
box (-3 -3 -1) (3 3 2);
fieldValues
(
volScalarFieldValue alpha1 1
);
}
);
------------------------------------


Cylindrical mesh was generated correctly.
(I can it by using paraview.)
But, once I typed "setFileds", I received the
following error message. How do I work around?


------------------------------------
Reading setFieldsDict

Setting field default values
--> FOAM Warning :
From function void setFieldType(const fvMesh& mesh, const labelList& selectedCells,Istream& fieldValueStream)
in file setFields.C at line 101
Field alpha1 not found


wrong token type - expected word found on line 20 the label 0

file: ::defaultFieldValues at line 20.

From function operator>>(Istream&, word&)
in file primitives/strings/word/wordIO.C at line 77.

FOAM exiting
------------------------------------

I changed parameters in setFiledsDict in several ways,
but I failed to solve the problem. Maybe this arises from
a lack of understanding of OpenFOAM, it would give me
a great deal of pleasure if you give me some advice.
Thanks in advance!

Sincerely yours

aki

MartinB December 7, 2010 03:07

Hi aki,

do you have a file "alpha1" in your "0" directory? I suppose, it's missing... but you can find examples in the tutorials folders...

Martin

aki_yafuji December 9, 2010 22:29

Dear Martin

Thank you very much for prompt reply!
I made an unforced error... You're right, "alpha1" was missing in "0" directory... I'm ashamed of myself.
Thank you very much for your advice!

aki

aki_yafuji December 9, 2010 22:35

Dear Martin

Thank you very much for prompt reply!
I made an unforced error... You're right, "alpha1" was missing in "0" directory... I'm ashamed of myself.
Thank you very much for your advice!

aki


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