OpenFOAMでのエラーを教えて下さい

724 views
Skip to first unread message

takemitsu

unread,
Mar 6, 2020, 4:27:43 AM3/6/20
to OpenFOAM
初めまして
現在大学でOpenFOAMを用いて流体の解析を行っているのですが,CFD初心者なのでエラーに関しての知識も乏しくエラーの修正方法がわからず困っています.
使用しているバージョンは1806で使用しているソルバーはbuoyantPimpleFoamです.
エラー内容は以下です. 
--> FOAM Warning : 
--> FOAM FATAL IO ERROR: 
wrong token type - expected Scalar, found on line 5286952: punctuation '-'

file: /home/0.05/p at line 5286952.

    From function Foam::Istream& Foam::operator>>(Foam::Istream&, Foam::doubleScalar&)
    in file lnInclude/Scalar.C at line 147.

このエラーがparaviewの時や壁面の熱流束を計算する際に出てきます.
分かる方,ぜひ教えて下さい.よろしくおねがいします.

takemitsu

unread,
Mar 14, 2020, 4:47:10 AM3/14/20
to OpenFOAM
エラーの原因は圧力の計算がおかしいという事まではわかりました.
原因は周期境界条件にしている計算領域の底の面で起きており,圧力が0もしくはNANになっていることだと考えられます.
これは,メッシュに問題があるのでしょうか?checkMeshでは問題なかったのでその可能性は薄い気がするのですが…
もしくは計算領域,初期条件の設定が不適切なのでしょうか?
以下にblockMeshDictと初期条件を載せます.
dimensions      [1 -1 -2 0 0 0 0];

internalField   uniform 100000.000;

boundaryField
{

    cylinder1
    {
        type            zeroGradient;
    }
    cylinder2
    {
        type            zeroGradient;
    }
    inlet
    {
        type            zeroGradient;
    }

    outlet
    {
        type            fixedValue;
        value           uniform 100000.000;
    }

    symFront
    {
        type            zeroGradient;
    }

    symBack
    {
        type            zeroGradient;
    }

    bottom
    {
        type            fixedJump;
        patchType       cyclic;
        jump            uniform 0;
    }

    top
    {
        type            fixedJump;
        patchType       cyclic;
    }
}

// ************************************************************************* //

BlockMesh
onvertToMeters 0.01;

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

blocks
(
    hex (0 12 13 3 4 15 14 7) (150 100 40) simpleGrading (1 1 1)
    hex (12 9 8 13 15 11 10 14) (200 100 40)
simpleGrading
 (
  (
  //x
  (1 1 1)
  )
  (
  //y
  (1 1 1)
  )
  (
  //z
  (1 1 1)
  )
 )
    hex (9 1 2 8 11 5 6 10) (350 100 40) simpleGrading (1 1 1)

);

edges
(
);

boundary
(
    bottom
    {
        type cyclic;
        neighbourPatch  top;
        faces
        (
            (1 5 11 9)
            (9 11 15 12)
            (12 15 4 0)
        );
    }
    top
    {
        type cyclic;
        neighbourPatch  bottom;
        faces
        (
            (2 8 10 6)
            (8 13 14 10)
            (13 3 7 14)
        );
    }
     inlet
    {
        type patch;
        faces
        (
            (0 4 7 3)
        );
    }

    outlet
    {
        type patch;
        faces
        (
            (2 6 5 1)
        );
    }

    symFront
    {
        type patch;
        faces
        (
            (4 15 14 7)
            (15 11 10 14)
            (11 5 6 10)
        );
    }

    symBack
    {
        type patch;
        faces
        (
            (0 12 13 3)
            (12 9 8 13)
            (9 1 2 8)
        );
    }
);

mergePatchPairs
(
);

// ************************************************************************* //
また,計算は圧力が適切に計算されてなくても行われ,圧力の計算で0やNANが起きるのはある時間のときのみです.以下に例を示します.
t=0.0002
boundaryField
{
    bottom
    {
        type            fixedJump;
        patchType       cyclic;
        jump            uniform 0;
        value           nonuniform List<scalar> 
56000
(
100176
100176
100176
100176
100176
100176
100176
100176
100176
100176
100176
100176
100176
100176
100176

t=0.0003
boundaryField
{
    bottom
    {
        type            fixedJump;
        patchType       cyclic;
        jump            nonuniform List<scalar> 
56000
(
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

ぜひどなたかアドバイスくださいよろしくお願いします.

2020年3月6日金曜日 18時27分43秒 UTC+9 takemitsu:

sariew8

unread,
Mar 17, 2020, 2:24:28 AM3/17/20
to OpenFOAM
blockMeshDict中のパッチ(境界)数と0/p中の境界の数が異なっており、
助言しにくくなっています。

もうすこし詳細を明らかにされてはいかがか?

2020年3月14日土曜日 17時47分10秒 UTC+9 takemitsu:

takemitsu

unread,
Apr 16, 2020, 4:19:06 AM4/16/20
to OpenFOAM
 sariew8さん返信ありがとうございます
あれから自分の方で色々試行錯誤をした結果,pの境界条件にfixedJumpを使用することをやめ,patchのtype
をcyclicに戻して計算を実行しました.すると圧力の周期境界条件が反映されていたのでそちらの方で計算を続けるという形を取ることにしました.本当にすみません.
Reply all
Reply to author
Forward
0 new messages