LoginSignup

This article is a Private article. Only a writer and users who know the URL can access it.
Please change open range to public in publish setting if you want to share this article with other users.

More than 5 years have passed since last update.

[OpenFOAM+ on Rescale w/Azure] STEP3: テンプレート

Last updated at Posted at 2018-06-28

1. テンプレートのアップロード

1.1 テンプレート化した境界条件設定ファイル "utemplate" のアップロード

Kobito.h08PnA.png

  1. テンプレートをクリックします
  2. ファイルをアップロード をクリックし"utemplate" をアップロードします (ハンズオンでは クラウドからファイルを選択 をクリックし対象のファイルを指定します)
  3. ファイルが正しくアップロードされていることを確認します
  4. 以下の文字列(パス/ファイル名)を入力します

    ファイル名の入力
    airfoil2D_DOE/0/U
    

NOTE

  • 計算が実行されると airfoil2D_DOE.zip が計算ノード内に自動的に解凍され"airfoil2D_DOE" というディレクトリーがで上がります。
  • このテンプレートは、実際のパラメータが自動で代入されると同時に、このディレクトリー内 ./airfoil2D_DOE/0/U として保存されます。
  • 実際の業務を想定した場合、ユーザ自身がこのzipファイルを作るため、ディレクトリairfoil2D_DOEと境界条件設定ファイルであるUの相対パス関係を把握できているはずで、テンプレートがどういう名前でどこに保存されるかを意識する必要があります。

1.2 "utemplate" の内容とその記載方法

テンプレートの内容(下記に記載)を確認すると、${Xvelocity}${Yvelocity} が見て取れます。

  • シミュレーション時は、ここにCSVで定義した実際の数値に置き換えられ、設定したケース分のファイルが作成されます。。
  • XvelocityYvelocity の変数で先程アップロードしたCSVファイルの1行目とヒモ付されています。
  • 詳細はこちらを参考にしてください
U.inp_template
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2.0.1                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform (${Xvelocity} ${Yvelocity} 0);

boundaryField
{
    inlet
    {
        type            freestream;
        freestreamValue uniform (${Xvelocity} ${Yvelocity} 0);
    }

    outlet
    {
        type            freestream;
        freestreamValue uniform (${Xvelocity} ${Yvelocity} 0);
    }

    wall
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }

    frontAndBack
    {
        type            empty;
    }
}

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

完了: 次のステップへ

一度トップ画面に戻って次へ進んでください。

0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up