simpleFoam を用いた複雑地形周りの流れ場解析について

715 views
Skip to first unread message

f8ku...@gmail.com

unread,
Mar 12, 2013, 5:17:20 AM3/12/13
to open...@googlegroups.com
初めまして 國家と申します。

現在 simpleFoam を用いて複雑地形周りの解析を行っているのですが
圧力の残差が比較的大きい状態で発散してしまいます。
 比較的早いステップ数で発散しているので境界条件に
問題があるのではないかと考えていますが。それ以外は、全く分からない
状況です。
 ご助言や参考にできるようなテストケース等ございましたらご教授の程
宜しくお願いいたします。


-------- simpleFoam のログ -------
     …略…

Time = 15

DILUPBiCG:  Solving for Ux, Initial residual = 0.0036488715, Final residual = 4.1016306e-06, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.00216278, Final residual = 2.7409738e-06, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.0053750231, Final residual = 6.309574e-06, No Iterations 1
GAMG:  Solving for p, Initial residual = 0.60335121, Final residual = 0.0044655876, No Iterations 6
time step continuity errors : sum local = 2.1734947e-06, global = 3.3579872e-09, cumulative = 2.177199e-07
DILUPBiCG:  Solving for epsilon, Initial residual = 0.0044132011, Final residual = 2.3807785e-06, No Iterations 1
DILUPBiCG:  Solving for k, Initial residual = 0.021036575, Final residual = 2.4524958e-05, No Iterations 1
ExecutionTime = 33.12 s  ClockTime = 35 s

Time = 16

DILUPBiCG:  Solving for Ux, Initial residual = 0.012700422, Final residual = 2.0988058e-05, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.004792062, Final residual = 7.6294694e-06, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.012770395, Final residual = 2.2439709e-05, No Iterations 1
GAMG:  Solving for p, Initial residual = 0.42690988, Final residual = 0.0030467843, No Iterations 6
time step continuity errors : sum local = 1.9588846e-06, global = 1.0767051e-08, cumulative = 2.2848695e-07
DILUPBiCG:  Solving for epsilon, Initial residual = 0.0043687357, Final residual = 2.3748426e-06, No Iterations 1
DILUPBiCG:  Solving for k, Initial residual = 0.020523383, Final residual = 2.396988e-05, No Iterations 1
ExecutionTime = 35.25 s  ClockTime = 37 s

Time = 17

DILUPBiCG:  Solving for Ux, Initial residual = 0.022661781, Final residual = 3.8711732e-05, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.0077138561, Final residual = 1.2922734e-05, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.021839509, Final residual = 3.9832655e-05, No Iterations 1
Mar 12 17:13:18 2013 19899 4 7.06 handleTSRegisterTerm(): TS reports task <0> pid <19918> on host<j005.p> killed or core dumped


--------- 圧力の境界条件 -----------
internalField   uniform 0;

boundaryField
{
    x_
    {
        type            fixedValue;
        value           uniform 0;
    }
    _x
    {
        type            fixedValue;
        value           uniform 0;
    }
    y_
    {
        type            outletInlet;
        outletValue     uniform 0;
        value           uniform 0;
    }
    _y
    {
        type            outletInlet;
        outletValue     uniform 0;
        value           uniform 0;
    }
    _z
    {
        type            slip;
    }
    ".*"
    {
        type            zeroGradient;
    }
}

ohbuchi

unread,
Mar 14, 2013, 3:28:46 AM3/14/13
to open...@googlegroups.com
 こんにちは。Uの方はどうなっていますか?
pについては、slip以外全て0固定になるので、問題がありそうです。

f8ku...@gmail.com

unread,
Mar 18, 2013, 7:59:07 PM3/18/13
to open...@googlegroups.com
ご回答有難うございます. Uの初期条件は,setDiscreteFieldsDictで以下の様に与えております.


FoamFile
{
version 2.0;
format  ascii;
class   dictionary;
object  setDiscreteFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

Fields
(
Uprofile
{
field U;
type vector;
direction "z";
internal true;
patchNames
(
y_
);
profile
(
(8000 -8000  750.00 0  0     0)
(8000 -8000  753.20 0 -0.610 0)
(8000 -8000  754.40 0 -0.632 0)
(8000 -8000  755.40 0 -0.651 0)
(8000 -8000  755.90 0 -0.663 0)
(8000 -8000  757.40 0 -0.679 0)
(8000 -8000  760.00 0 -0.724 0)
(8000 -8000  765.00 0 -0.773 0)
(8000 -8000  770.00 0 -0.824 0)
(8000 -8000  780.00 0 -0.913 0)
(8000 -8000  790.00 0 -0.964 0)
(8000 -8000  800.00 0 -1.033 0)
(8000 -8000  810.00 0 -1.077 0)
(8000 -8000  820.00 0 -1.128 0)
(8000 -8000  830.00 0 -1.176 0)
(8000 -8000  840.00 0 -1.203 0)
(8000 -8000  850.00 0 -1.203 0)
(8000 -8000  950.00 0 -1.203 0)
(8000 -8000  1100.00 0 -1.203 0)
(8000 -8000 1250.00 0 -1.203 0)
(8000 -8000 1350.00 0 -1.203 0)
);
}
kProfile
{
field k;
type scalar;
direction "z";
internal true;
patchNames
(
y_
);
profile
(
(8000 -8000  750.00 0)
(8000 -8000  753.20 1.435)
(8000 -8000  754.40 1.507)
(8000 -8000  755.40 1.607)
(8000 -8000  755.90 1.634)
(8000 -8000  757.40 1.690)
(8000 -8000  760.00 1.868)
(8000 -8000  765.00 1.876)
(8000 -8000  770.00 1.957)
(8000 -8000  780.00 1.882)
(8000 -8000  790.00 1.724)
(8000 -8000  800.00 1.647)
(8000 -8000  810.00 1.497)
(8000 -8000  820.00 1.283)
(8000 -8000  830.00 1.005)
(8000 -8000  840.00 0.802)
(8000 -8000  850.00 0.802)
(8000 -8000  950.00 0.802)
(8000 -8000  1100.00 0.802)
(8000 -8000 1250.00 0.802)
(8000 -8000 1350.0 0.802)
);
}
epsilonProfile
{
field epsilon;
type scalar;
direction "z";
internal true;
patchNames
(
y_
);
profile
(
(8000 -8000  750.00 0)
(8000 -8000  753.20 9.699)
(8000 -8000  754.40 6.600)
(8000 -8000  755.40 5.000)
(8000 -8000  755.90 3.800)
(8000 -8000  757.40 2.800)
(8000 -8000  760.00 2.000)
(8000 -8000  765.00 1.400)
(8000 -8000  770.00 1.000)
(8000 -8000  780.00 0.800)
(8000 -8000  790.00 0.600)
(8000 -8000  800.00 0.450)
(8000 -8000  810.00 0.300)
(8000 -8000  820.00 0.200)
(8000 -8000  830.00 0.100)
(8000 -8000  840.00 0.050)
(8000 -8000  850.00 0.050)
(8000 -8000  950.00 0.050)
(8000 -8000  1100.00 0.050)
(8000 -8000 1250.00 0.050)
(8000 -8000 1350.00 0.050)
);
}
);

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


2013年3月14日木曜日 16時28分46秒 UTC+9 ohbuchi:

すもも

unread,
Mar 18, 2013, 10:50:01 PM3/18/13
to open...@googlegroups.com
p の outletInlet のところを zeroGradient にしたらダメでしょうか?

f8ku...@gmail.com

unread,
Mar 19, 2013, 12:37:48 AM3/19/13
to open...@googlegroups.com
ご回答ありがとうございます. pのoutletInletをzeroGradientに変えてみましたが
同じような状況です.


Time = 15

DILUPBiCG:  Solving for Ux, Initial residual = 0.0036488715, Final residual = 4.1016306e-06, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.00216278, Final residual = 2.7409738e-06, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.0053750231, Final residual = 6.309574e-06, No Iterations 1
GAMG:  Solving for p, Initial residual = 0.60335121, Final residual = 0.0044655876, No Iterations 6
time step continuity errors : sum local = 2.1734947e-06, global = 3.3579872e-09, cumulative = 2.177199e-07
DILUPBiCG:  Solving for epsilon, Initial residual = 0.0044132011, Final residual = 2.3807785e-06, No Iterations 1
DILUPBiCG:  Solving for k, Initial residual = 0.021036575, Final residual = 2.4524958e-05, No Iterations 1
ExecutionTime = 34.34 s  ClockTime = 36 s

Time = 16

DILUPBiCG:  Solving for Ux, Initial residual = 0.012700422, Final residual = 2.0988058e-05, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.004792062, Final residual = 7.6294694e-06, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 0.012770395, Final residual = 2.2439709e-05, No Iterations 1
GAMG:  Solving for p, Initial residual = 0.42690988, Final residual = 0.0030467843, No Iterations 6
time step continuity errors : sum local = 1.9588846e-06, global = 1.0767051e-08, cumulative = 2.2848695e-07
DILUPBiCG:  Solving for epsilon, Initial residual = 0.0043687357, Final residual = 2.3748426e-06, No Iterations 1
DILUPBiCG:  Solving for k, Initial residual = 0.020523383, Final residual = 2.396988e-05, No Iterations 1
ExecutionTime = 36.74 s  ClockTime = 38 s

Time = 17

Mar 19 13:33:29 2013 30336 4 7.06 handleTSRegisterTerm(): TS reports task <0> pid <30355> on host<j005.p> killed or core dumped

2013年3月19日火曜日 11時50分01秒 UTC+9 すもも:

すもも

unread,
Mar 19, 2013, 2:07:38 AM3/19/13
to open...@googlegroups.com
はじめのログをちゃんと見てなかったですが、
変わったエラーメッセージですね。

並列計算ですか?
もしそうだったら、並列なしで計算できますか?

f8ku...@gmail.com

unread,
Mar 20, 2013, 9:41:36 PM3/20/13
to open...@googlegroups.com
並列無(1ノード)での計算でも同じような状況です.

---- log.simpleFoam ---
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  1.7.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 1.7.1-03e7e056c215
Exec   : simpleFoam
Date   : Mar 21 2013
Time   : 10:37:15
Host   : f007.p
PID    : 7646
Case   : /home1/gyim/uyim0021/windSim/saiseki_slope/after
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting RAS turbulence model kEpsilon
kEpsilonCoeffs
{
    Cmu             0.09;
    C1              1.44;
    C2              1.92;
    sigmaEps        1.3;
}


Starting time loop

Time = 1

DILUPBiCG:  Solving for Ux, Initial residual = 1, Final residual = 0.00032321628, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.0053395226, Final residual = 2.7830389e-06, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 1, Final residual = 0.00029794833, No Iterations 1
GAMG:  Solving for p, Initial residual = 1, Final residual = 0.0096558316, No Iterations 6
time step continuity errors : sum local = 9.5403323e-06, global = 3.767261e-06, cumulative = 3.767261e-06
#0  Foam::error::printStack(Foam::Ostream&) in "/home1/gyim/share/openfoam/1.7.1/lib/linux64GccDPOpt/libOpenFOAM.so"
#1  Foam::sigFpe::sigFpeHandler(int) in "/home1/gyim/share/openfoam/1.7.1/lib/linux64GccDPOpt/libOpenFOAM.so"
#2  __restore_rt at sigaction.c:0
#3  Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/home1/gyim/share/openfoam/1.7.1/lib/linux64GccDPOpt/libOpenFOAM.so"
#4  void Foam::divide<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/home1/gyim/share/openfoam/1.7.1/lib/linux64GccDPOpt/libincompressibleRASModels.so"
#5  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/home1/gyim/share/openfoam/1.7.1/lib/linux64GccDPOpt/libincompressibleRASModels.so"
#6  Foam::incompressible::RASModels::kEpsilon::correct() in "/home1/gyim/share/openfoam/1.7.1/lib/linux64GccDPOpt/libincompressibleRASModels.so"
#7  main in "/home1/gyim/share/openfoam/1.7.1/applications/bin/linux64GccDPOpt/simpleFoam"
#8  __libc_start_main in "/lib64/libc.so.6"
#9  Foam::regIOobject::writeObject(Foam::IOstream::streamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType) const in "/home1/gyim/share/openfoam/1.7.1/applications/bin/linux64GccDPOpt/simpleFoam"


---- 圧力の初期条件 (org0/p) ---
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  1.7                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    location    "0";
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [ 0 2 -2 0 0 0 0 ];

internalField   uniform 0;

boundaryField
{
    x_
    {
        type            fixedValue;
        value           uniform 0;
    }
    _x
    {
        type            fixedValue;
        value           uniform 0;
    }
    y_
    {
        type            fixedValue;
        value           uniform 0;
    }
    _y
    {
        type            fixedValue;
        value           uniform 0;
    }
    _z
    {
        type            slip;
    }
    ".*"
    {
        type            zeroGradient;
    }
}


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

---- 流速の初期条件 (org0/U) ---
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  1.7                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    location    "0";
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform ( 0 0 0 );

boundaryField
{
    x_
    {
        type            zeroGradient;
    }
    _x
    {
        type            zeroGradient;
    }
    y_
    {
        type            zeroGradient;
    }
    _y
    {
        type            zeroGradient;
    }
    _z
    {
        type            slip;
    }
    ".*"
    {
        type            fixedValue;
        value           uniform ( 0 0 0 );
    }
}


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

---- system/setDiscreteFieldsDict ---
FoamFile
{
version 2.0;
format  ascii;
class   dictionary;
object  setDiscreteFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

Fields
(
Uprofile
{
field U;
type vector;
direction "z";
internal true;
patchNames
(
_y
);
profile
(
(8000 -8000  700.00 0  0     0)
(8000 -8000  708.20 0 0.610 0)
(8000 -8000  714.40 0 0.632 0)
(8000 -8000  720.40 0 0.651 0)
(8000 -8000  725.90 0 0.663 0)
(8000 -8000  732.40 0 0.679 0)
(8000 -8000  740.00 0 0.724 0)
(8000 -8000  750.00 0 0.773 0)
(8000 -8000  760.00 0 0.824 0)
(8000 -8000  775.00 0 0.913 0)
(8000 -8000  790.00 0 0.964 0)
(8000 -8000  800.00 0 1.033 0)
(8000 -8000  810.00 0 1.077 0)
(8000 -8000  820.00 0 1.128 0)
(8000 -8000  830.00 0 1.176 0)
(8000 -8000  840.00 0 1.203 0)
(8000 -8000  850.00 0 1.203 0)
(8000 -8000  950.00 0 1.203 0)
(8000 -8000  1100.00 0 1.203 0)
(8000 -8000 1250.00 0 1.203 0)
(8000 -8000 1350.00 0 1.203 0)
);
}
kProfile
{
field k;
type scalar;
direction "z";
internal true;
patchNames
(
_y
);
profile
(
(8000 -8000  700.00 0)
(8000 -8000  708.20 1.435)
(8000 -8000  714.40 1.507)
(8000 -8000  720.40 1.607)
(8000 -8000  725.90 1.634)
(8000 -8000  732.40 1.690)
(8000 -8000  740.00 1.868)
(8000 -8000  750.00 1.876)
(8000 -8000  760.00 1.957)
(8000 -8000  775.00 1.882)
(8000 -8000  790.00 1.724)
(8000 -8000  800.00 1.647)
(8000 -8000  810.00 1.497)
(8000 -8000  820.00 1.283)
(8000 -8000  830.00 1.005)
(8000 -8000  840.00 0.802)
(8000 -8000  850.00 0.802)
(8000 -8000  950.00 0.802)
(8000 -8000  1100.00 0.802)
(8000 -8000 1250.00 0.802)
(8000 -8000 1350.0 0.802)
);
}
epsilonProfile
{
field epsilon;
type scalar;
direction "z";
internal true;
patchNames
(
_y
);
profile
(
(8000 -8000  700.00 0)
(8000 -8000  708.20 9.699)
(8000 -8000  714.40 6.600)
(8000 -8000  720.40 5.000)
(8000 -8000  725.90 3.800)
(8000 -8000  732.40 2.800)
(8000 -8000  740.00 2.000)
(8000 -8000  750.00 1.400)
(8000 -8000  760.00 1.000)
(8000 -8000  775.00 0.800)
(8000 -8000  790.00 0.600)
(8000 -8000  800.00 0.450)
(8000 -8000  810.00 0.300)
(8000 -8000  820.00 0.200)
(8000 -8000  830.00 0.100)
(8000 -8000  840.00 0.050)
(8000 -8000  850.00 0.050)
(8000 -8000  950.00 0.050)
(8000 -8000  1100.00 0.050)
(8000 -8000 1250.00 0.050)
(8000 -8000 1350.00 0.050)
);
}
);

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


2013年3月19日火曜日 15時07分38秒 UTC+9 すもも:

ohbuchi

unread,
Mar 20, 2013, 10:05:39 PM3/20/13
to open...@googlegroups.com
問題の系は、_yパッチから流入し、y_パッチから流出するものでしょうか。
そうであれば、
_y: U,k,epsilonはfixedValueでプロファイルを指定、
   pはzeroGradient
y_:U,k,epsilonはzeroGradient
     pはfixedValue
とすると良いでしょう。_x,x_の流入・流出がなければslipでも良いと思います。

最初のログは15ステップまで計算できていましたが、シリアル計算のログでは初回ステップ
の乱流計算時に浮動小数点エラーが発生しています。これは、k,epsilonの初期値や境界値に
ゼロが設定されているときによくあるエラーです。ご確認下さい。

以上、ご参考まで。




2013年3月12日火曜日 18時17分20秒 UTC+9 f8ku...@gmail.com:

ohbuchi

unread,
Mar 20, 2013, 10:09:13 PM3/20/13
to open...@googlegroups.com
ちなみに、先程の投稿は、地形はz_にあって_zは上空の境界と理解して書いたものです。


2013年3月12日火曜日 18時17分20秒 UTC+9 f8ku...@gmail.com:
Message has been deleted

f8ku...@gmail.com

unread,
Mar 21, 2013, 1:47:01 AM3/21/13
to open...@googlegroups.com
ohbuchi様

 浮動小数点例外の原因を教えて頂きありがとうございました.
当方の説明不足と未熟さで混乱を招く質問の仕方となっていました.
すみません.以下に補足と新たな質問を記述させていただきます.


>問題の系は、_yパッチから流入し、y_パッチから流出するものでしょうか。
 _yパッチから流入y_パッチから流出です._x,x_パッチからの流出入は無いので,slipに変えたいと思います.
_zが上空の面,".*"の面が地形を表すSTLファイル,z_が地面下の一番下の面です.
snappyHexMeshを用いてメッシュの細分化を行いlocationInMeshにて地形以上の点を指定して,地形下のメッシュを削除しております.
本来ならばx方向を主流方向とするのが普通ですがSTLファイルの都合上この様になっております.

> _yパッチのU,k,epsilon は,fixedValueでプロファイルを指定,
この解析では,setDiscreteFieldsにてU,k,epsilonの初期値をセットしようとしています.
この場合どのような指定になるのでしょうか?
恐らく初歩的な質問で恐縮なのですがsetDiscreteFieldsを用いた風況解析のサンプル等ございませんでしょうか?
現在当方では,OpenCAE学会が公表されているAIJガイダンスによる解析を参考にさせていただいています.

2013年3月21日木曜日 11時09分13秒 UTC+9 ohbuchi:

ohbuchi

unread,
Mar 21, 2013, 3:04:07 AM3/21/13
to open...@googlegroups.com
ご指摘のガイダンスは試したことがないのですが、下記CASE Aを見ると
  流入:U-fixedValue (0 0 0),  p-zeroGradient
  流出:U-zeroGradient, p-fixedValue
となっています。
その後、setDiscreteFieldで初期条件および境界パッチの値が書き換えられる
のですね。
これと同じ様にすれば良いと思います。

setDiscreteFieldは標準ユーティリティではなく、OpenCAE学会の今野様が
公開しているものですね。
http://openfoamwiki.net/index.php/Contrib_setDiscreteFields

また、setDiscreteFieldsDictの中身を比べて気になったのが、プロファイル
Zmaxのk,epsilonが0になっていることで、CASE Aでは非ゼロです。
これは直した方が良いでしょう。


以上、ご参考まで。




2013年3月12日火曜日 18時17分20秒 UTC+9 f8ku...@gmail.com:
初めまして 國家と申します。

f8ku...@gmail.com

unread,
Mar 21, 2013, 5:25:31 AM3/21/13
to open...@googlegroups.com
ohbuchi様

ご回答ありがとうございます.
k,epsilonが0の点は,修正致しました.
U,pについては,CaseAに習って
>流入:U-fixedValue (0 0 0),  p-zeroGradient
>流出:U-zeroGradient, p-fixedValue
のように修正したところ.simpleFoamのログで流出していない旨のログが出ている状況です.
Uの境界条件も入力ミス等は無いようです.

-- setDiscreteFieldsDIct --
FoamFile
{
version 2.0;
format  ascii;
class   dictionary;
object  setDiscreteFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

Fields
(
Uprofile
{
field U;
type vector;
direction "z";
internal true;
patchNames
(
_y
);
profile
(
(8000 -8000  700.00 0  0     0)
(8000 -8000  708.20 0 -0.610 0)
(8000 -8000  714.40 0 -0.632 0)
(8000 -8000  720.40 0 -0.651 0)
(8000 -8000  725.90 0 -0.663 0)
(8000 -8000  732.40 0 -0.679 0)
(8000 -8000  740.00 0 -0.724 0)
(8000 -8000  750.00 0 -0.773 0)
(8000 -8000  760.00 0 -0.824 0)
(8000 -8000  775.00 0 -0.913 0)
(8000 -8000  790.00 0 -0.964 0)
(8000 -8000  800.00 0 -1.033 0)
(8000 -8000  810.00 0 -1.077 0)
(8000 -8000  820.00 0 -1.128 0)
(8000 -8000  830.00 0 -1.176 0)
(8000 -8000  840.00 0 -1.203 0)
(8000 -8000  850.00 0 -1.203 0)
(8000 -8000  950.00 0 -1.203 0)
(8000 -8000  1100.00 0 -1.203 0)
(8000 -8000 1250.00 0 -1.203 0)
(8000 -8000 1350.00 0 -1.203 0)
);
}
kProfile
{
field k;
type scalar;
direction "z";
internal true;
patchNames
(
_y
);
profile
(
(8000 -8000  700.00 1.435)
(8000 -8000  700.00 9.699)
(8000 -8000  708.20 9.699)
(8000 -8000  714.40 6.600)
(8000 -8000  720.40 5.000)
(8000 -8000  725.90 3.800)
(8000 -8000  732.40 2.800)
(8000 -8000  740.00 2.000)
(8000 -8000  750.00 1.400)
(8000 -8000  760.00 1.000)
(8000 -8000  775.00 0.800)
(8000 -8000  790.00 0.600)
(8000 -8000  800.00 0.450)
(8000 -8000  810.00 0.300)
(8000 -8000  820.00 0.200)
(8000 -8000  830.00 0.100)
(8000 -8000  840.00 0.050)
(8000 -8000  850.00 0.050)
(8000 -8000  950.00 0.050)
(8000 -8000  1100.00 0.050)
(8000 -8000 1250.00 0.050)
(8000 -8000 1350.00 0.050)
);
}
);

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


-- log.simpleFoam --
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  1.7.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : 1.7.1-03e7e056c215
Exec   : simpleFoam
Date   : Mar 21 2013
Time   : 17:50:50
Host   : f007.p
PID    : 25245
Case   : /home1/gyim/uyim0021/windSim/saiseki_slope/after
nProcs : 1
SigFpe : Enabling floating point exception trapping (FOAM_SIGFPE).

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting RAS turbulence model kEpsilon
kEpsilonCoeffs
{
    Cmu             0.09;
    C1              1.44;
    C2              1.92;
    sigmaEps        1.3;
}


Starting time loop

Time = 1

DILUPBiCG:  Solving for Ux, Initial residual = 1, Final residual = 0.00033090375, No Iterations 1
DILUPBiCG:  Solving for Uy, Initial residual = 0.0016737572, Final residual = 4.9070919e-07, No Iterations 1
DILUPBiCG:  Solving for Uz, Initial residual = 1, Final residual = 0.00027626322, No Iterations 1


--> FOAM FATAL ERROR: 
Continuity error cannot be removed by adjusting the outflow.
Please check the velocity boundary conditions and/or run potentialFoam to initialise the outflow.
Total flux              : 1.13254e+08
Specified mass inflow   : 1.35694e+06
Specified mass outflow  : 0
Adjustable mass outflow : 3.38958e-26


    From function adjustPhi(surfaceScalarField& phi, const volVectorField& U,const volScalarField& p
    in file cfdTools/general/adjustPhi/adjustPhi.C at line 115.

FOAM exiting

-- org0/p --
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  1.7                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    location    "0";
    object      p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [ 0 2 -2 0 0 0 0 ];

internalField   uniform 0;

boundaryField
{
    x_
    {
        type            slip;
    }
    _x
    {
        type            slip;
    }
    y_
    {
        type            fixedValue;
        value           uniform 0;
    }
    _y
    {
        type            zeroGradient;
    }
    _z
    {
        type            slip;
    }
    ".*"
    {
        type            zeroGradient;
    }
}


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


-- org0/U --
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  1.7                                   |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    location    "0";
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform ( 0 0 0 );

boundaryField
{
    x_
    {
        type            slip;
    }
    _x
    {
        type            slip;
    }
    y_
    {
        type            zeroGradient;
    }
    _y
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
    _z
    {
        type            slip;
    }
    ".*"
    {
        type            fixedValue;
        value           uniform ( 0 0 0 );
    }
}


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



2013年3月21日木曜日 16時04分07秒 UTC+9 ohbuchi:

すもも

unread,
Mar 21, 2013, 5:58:11 AM3/21/13
to open...@googlegroups.com
_y と y_ がそれぞれどちらを向いているのかがわかりませんが、
setDiscreteFields を使わずに一様流速にすれば計算は流れるのですよね?

ohbuchi

unread,
Mar 22, 2013, 1:15:47 AM3/22/13
to open...@googlegroups.com
org0/p,Uでなく、setDiscreteFieldsを実行した後の0/p,Uは意図通りになっているのでしょうか?


2013年3月12日火曜日 18時17分20秒 UTC+9 f8ku...@gmail.com:

Masashi Imano

unread,
Mar 23, 2013, 6:37:49 AM3/23/13
to open...@googlegroups.com
今野です。

エラーの原因と直接関係ないのですが、
最近のOpenFOAMのバージョンでは、時空間的にデータを補完して境界に与える
timeVaryingMappedFixedValue 型があるので、この境界条件で流入風のプロファイル分布
が与えられます。また、時系列を与える事も可能です。

setDiscreteFields や makeStructuredGridMesh.py のような非標準のユーティリティを
用いず、snappyHexMeshで格子を生成し、さらに timeVaryingMappedFixedValue で
流入風プロファイルを与えるCase Aのケース CaseA-snappyHexMesh を
オープンCAE学会のOpenFOAM V&V SIGのレポジトリにコミットしておきました。

http://www.opencae.jp/wiki/OpenFOAM-VandV-SIG/AIJ-PWEAB

http://www.opencae.jp/svn/OpenFOAM-VandV-SIG/AIJ-PWEAB/trunk/CaseA-snappyHexMesh/

参考まで。

2013年3月22日 14:15 ohbuchi <ohbu...@gmail.com>:
> --
> このメールは Google グループのグループ「OpenFOAM」の登録者に送られています。
> このグループから退会し、メールの受信を停止するには、openfoam+u...@googlegroups.com にメールを送信します。
> このグループに投稿するには、open...@googlegroups.com にメールを送信してください。
> http://groups.google.com/group/openfoam?hl=ja からこのグループにアクセスしてください。
> その他のオプションについては、https://groups.google.com/groups/opt_out にアクセスしてください。
>
>



--
IMANO Masashi, Ph.D.

Hayato Kuniie

unread,
Mar 23, 2013, 11:27:15 AM3/23/13
to open...@googlegroups.com
すもも様

 setDiscreteFieldsを用いずに流入パッチにfixedValueで一様流を与えてみたのですが1回目の計算から連続式が満たせない旨のログが出ており、詳しく見ると流出流束が0になっていることが分かっていますが、どうすればいいのかわからない状況です。

すみません。実際のログファイルが示せる状況に現在なので簡単な経過報告とさせていただきます。度々のご回答ありがとうございます。


2013年3月21日 18:58 すもも <penguin...@gmail.com>:
_y と y_ がそれぞれどちらを向いているのかがわかりませんが、
setDiscreteFields を使わずに一様流速にすれば計算は流れるのですよね?

Hayato Kuniie

unread,
Mar 23, 2013, 11:30:08 AM3/23/13
to open...@googlegroups.com
ohbuchi様

度々のご回答ありがとうございます。paraviewにて確認してみます。




2013年3月22日 14:15 ohbuchi <ohbu...@gmail.com>:
org0/p,Uでなく、setDiscreteFieldsを実行した後の0/p,Uは意図通りになっているのでしょうか?


2013年3月12日火曜日 18時17分20秒 UTC+9 f8ku...@gmail.com:

Hayato Kuniie

unread,
Mar 23, 2013, 11:37:42 AM3/23/13
to open...@googlegroups.com
今野様

 ご回答ならびに新しいCase Aのコミットありがとうございます。 timeVaryingMappedFixedValue型は知りませんでした、拝見させていただきます。

大渕真志

unread,
Mar 23, 2013, 4:59:38 PM3/23/13
to open...@googlegroups.com
もしかしたらy_パッチのフェース数がゼロだったりしませんか?
boundaryファイルで確認して見て下さい。

iPhoneから送信

2013/03/24 0:27、Hayato Kuniie <hayat...@gmail.com> のメッセージ:

f8ku...@gmail.com

unread,
Mar 24, 2013, 9:53:16 PM3/24/13
to open...@googlegroups.com
ohbuchi様

 y_ のフェース数確認しましたが問題無い様です.

國家

-constant/polyMesh/boundary-
.....
    y_
    {
        type            patch;
        nFaces          4649;
        startFace       3668389;
    }
.....

2013年3月24日日曜日 5時59分38秒 UTC+9 ohbuchi:
もしかしたらy_パッチのフェース数がゼロだったりしませんか?
boundaryファイルで確認して見て下さい。

iPhoneから送信

2013/03/24 0:27、Hayato Kuniie <hayat...@gmail.com> のメッセージ:

すもも様

 setDiscreteFieldsを用いずに流入パッチにfixedValueで一様流を与えてみたのですが1回目の計算から連続式が満たせない旨のログが出ており、詳しく見ると流出流束が0になっていることが分かっていますが、どうすればいいのかわからない状況です。

すみません。実際のログファイルが示せる状況に現在なので簡単な経過報告とさせていただきます。度々のご回答ありがとうございます。
2013年3月21日 18:58 すもも <penguin...@gmail.com>:
_y と y_ がそれぞれどちらを向いているのかがわかりませんが、
setDiscreteFields を使わずに一様流速にすれば計算は流れるのですよね?

--
このメールは Google グループのグループ「OpenFOAM」の登録者に送られています。
このグループから退会し、メールの受信を停止するには、openfoam+unsubscribe@googlegroups.com にメールを送信します。

このグループに投稿するには、open...@googlegroups.com にメールを送信してください。
http://groups.google.com/group/openfoam?hl=ja からこのグループにアクセスしてください。
その他のオプションについては、https://groups.google.com/groups/opt_out にアクセスしてください。
 
 

--
このメールは Google グループのグループ「OpenFOAM」の登録者に送られています。
このグループから退会し、メールの受信を停止するには、openfoam+unsubscribe@googlegroups.com にメールを送信します。

f8ku...@gmail.com

unread,
Mar 24, 2013, 10:45:11 PM3/24/13
to open...@googlegroups.com
ohbuchi様

 「0」のpおよびUについて、paraview で確認したところ「org0」と同じ様になっておりました。

國家

2013年3月24日日曜日 0時30分08秒 UTC+9 Hayato:
ohbuchi様

度々のご回答ありがとうございます。paraviewにて確認してみます。




このグループから退会し、メールの受信を停止するには、openfoam+unsubscribe@googlegroups.com にメールを送信します。

すもも

unread,
Mar 25, 2013, 12:49:34 AM3/25/13
to open...@googlegroups.com
なにが問題か見当がつきませんが、
U で流入速度を指定し、p の境界をすべて zeroGradient にしたら、
icoFoam で同じエラーを再現できました。


--> FOAM FATAL ERROR:
Continuity error cannot be removed by adjusting the outflow.
Please check the velocity boundary conditions and/or run potentialFoam to initialise the outflow.
Total flux              : 0.00686533
Specified mass inflow   : 0.1
Specified mass outflow  : 0
Adjustable mass outflow : 3.24166e-35

参考になれば…。

Reply all
Reply to author
Forward
0 new messages