時間ステップの設定に関して

1,272 views
Skip to first unread message

kwck

unread,
Jan 20, 2016, 1:50:46 AM1/20/16
to OpenFOAM
お世話になっております。

時間ステップの自動設定について質問があり投稿させていただきます。
現在、sonicFoamを使って計算をしているのですが,計算の途中でクーラン数が大きくなってしまい計算が発散してしまいます。

そこで過去の投稿やユーザーガイド(2.3.6節)を参考にmaxCoが0.5になるように時間ステップの自動設定をしたのですが、
下記のように最大クーラン数が14を超えてしまいコアダンプしてしまいました。

この場合、contorolDict内の記述に問題があるのでしょうか。
contorolDict内の記述もあわせて下に記載させていただきます。

お分かりの方がいらっしゃいましたら、ご指摘いただけますでしょうか。よろしくお願いいたします。


----------------------------------------------------------------------------------------------------------------------------------------------------------------------
Time = 0.000382

Courant Number mean: 0.00151812 max: 14.283
diagonal:  Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
PIMPLE: iteration 1
smoothSolver:  Solving for Ux, Initial residual = 0.00190212, Final residual = 4.4762e-06, No Iterations 5
smoothSolver:  Solving for Uy, Initial residual = 0.00192935, Final residual = 2.99301e-06, No Iterations 9
smoothSolver:  Solving for Uz, Initial residual = 0.00127902, Final residual = 6.96045e-06, No Iterations 5
smoothSolver:  Solving for e, Initial residual = 0.00396257, Final residual = 1.22378e+206, No Iterations 1000


--> FOAM FATAL ERROR:
Maximum number of iterations exceeded

    From function thermo<Thermo, Type>::T(scalar f, scalar T0, scalar (thermo<Thermo, Type>::*F)(const scalar) const, scalar (thermo<Thermo, Type>::*dFdT)(const scalar) const, scalar (thermo<Thermo, Type>::*limit)(const scalar) const) const
    in file /home/opencfd/OpenFOAM/OpenFOAM-2.3.0/src/thermophysicalModels/specie/lnInclude/thermoI.H at line 76.

FOAM aborting

#0  Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::error::abort() in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2  Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy>::T(double, double, double, double (Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy>::*)(double, double) const, double (Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy>::*)(double, double) const, double (Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy>::*)(double) const) const in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libfluidThermophysicalModels.so"
#3  Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::constTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::calculate() in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libfluidThermophysicalModels.so"
#4  Foam::hePsiThermo<Foam::psiThermo, Foam::pureMixture<Foam::constTransport<Foam::species::thermo<Foam::hConstThermo<Foam::perfectGas<Foam::specie> >, Foam::sensibleInternalEnergy> > > >::correct() in "/opt/openfoam230/platforms/linux64GccDPOpt/lib/libfluidThermophysicalModels.so"
#5 
 in "/opt/openfoam230/platforms/linux64GccDPOpt/bin/sonicFoam"
#6  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#7 
 in "/opt/openfoam230/platforms/linux64GccDPOpt/bin/sonicFoam"
中止 (コアダンプ)
----------------------------------------------------------------------------------------------------------------------------------------------------------------------

----▼contorolDict内の記述▼--------------------------------------------------------------------------------------------
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "system";
    object      controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application     sonicFoam;

startFrom       startTime;

startTime       0;

stopAt          endTime;

endTime         0.01;



deltaT          5e-08;



writeControl    adjustableRunTime;

writeInterval   0.00005;

purgeWrite      0;

writeFormat     ascii;

writePrecision  6;

writeCompression off;

timeFormat      general;

timePrecision   6;

runTimeModifiable true;
adjustTimeStep yes;
maxCo 0.5;

maxDeltaT 1e-07;

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

ohbuchi

unread,
Jan 22, 2016, 12:49:02 AM1/22/16
to OpenFOAM
こんにちは。
エネルギー方程式の計算が原因で発散しているので、クーラン条件というよりも境界条件に問題がありそうです。
また、PIMPLEアルゴリズムを使っているので、時間刻みよりも、fvSolutionのPIMPLEセクションの各反復数を増やしたり
relaxationFactorを小さくする方が安定化に寄与すると思います。
ご参考まで。



2016年1月20日水曜日 15時50分46秒 UTC+9 kwck:

kwck

unread,
Jan 22, 2016, 3:02:56 AM1/22/16
to OpenFOAM
ohbuchi様

貴重なご指摘誠にありがとうございます。
再度境界条件を見直して計算をしてみます。

参考までにお聞きしたいのですが、maxCoを超えないように時間ステップを自動調整するのは
contorolDictの記述だけでよいのでしょうか。

今回の計算ではtutorialのsonicFoamをコピーしてきてcontorolDictに下の記述を加えただけです。
この方法だけでは時間ステップの自動調整はできないのでしょうか。
------------------------------------

runTimeModifiable true;
adjustTimeStep yes;
maxCo 0.5;

maxDeltaT 1e-07;
------------------------------------

Hiroaki Fujio

unread,
Jan 22, 2016, 3:46:33 AM1/22/16
to open...@googlegroups.com
sonicFoamはsetDeltaT.Hをインクルードしていませんので、時間ステップの自動調節はできません。
rhoPimpleFoam等を参考にsonicFoamを改造する必要があります。

ところでthermoPhysicalPropertiesはどのようになっていますでしょうか。
hConstかeConstをお使いであれば、Hfの値を0にすることで発散が防げるかもしれません。

--
このメールは Google グループのグループ「OpenFOAM」に登録しているユーザーに送られています。
このグループから退会し、グループからのメールの配信を停止するには openfoam+u...@googlegroups.com にメールを送信してください。
このグループに投稿するには open...@googlegroups.com にメールを送信してください。
https://groups.google.com/group/openfoam からこのグループにアクセスしてください。
その他のオプションについては https://groups.google.com/d/optout にアクセスしてください。

kwck

unread,
Jan 22, 2016, 5:10:17 AM1/22/16
to OpenFOAM
Hiroaki Fujiko 様

丁寧なご回答ありがとうございます。

チュートリアルから持ってきたsonicFoamでは時間ステップの自動調整はできないのですね。
すべてのソルバーで時間ステップの自動調整ができるものかと思っておりました。

thermoPhysicalPropertiesはtutorialのまま得に変更しておらず、以下のように記述しています。


/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.3.0                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    location    "constant";
    object      thermophysicalProperties;

}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

thermoType
{
    type            hePsiThermo;
    mixture         pureMixture;
    transport       const;
    thermo          hConst;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleInternalEnergy;
}

mixture
{
    specie
    {
        nMoles          1;
        molWeight       28.9;
    }
    thermodynamics
    {
        Cp              1005;
        Hf              0;
    }
    transport
    {
        mu              1.8e-05;
        Pr              0.7;
    }
}
Reply all
Reply to author
Forward
0 new messages