ブラウン運動を考慮した粒子追跡について

304 views
Skip to first unread message

md

unread,
May 19, 2023, 4:15:21 AM5/19/23
to OpenFOAM
いつもお世話になっております.

OpenFAOMを用いた粒子追跡に関する質問です。

流れ場を計算し、その流れ場の中に粒子を入れたときの運動を解析したいと考えています。粒子から流れ場への影響はないものとし(oneway coupling)、かなり小さい粒子を考えたいため、ブラウン運動による拡散も考慮した計算を行いたいです。

私の調べた限りでは、icoUncoupledKinematicParcelFoamが該当すると考えていますが、
icoUncoupledKinematicParcelFoamでそのような計算は可能でしょうか。
ブラウン運動を入れることができるものがあるのかがよくわかりませんでした。

また、他のソルバを用いる必要があればご教授いただけると幸いです。
よろしくお願いいたします。

k k

unread,
May 22, 2023, 8:28:55 AM5/22/23
to OpenFOAM
こんにちは。kです。
期待通りかわかりませんが。こちらの記事を参考でどうでしょうか?
加えて既に計算した流れに乗った粒子を計算したい場合は、例で以下に手順を記します。

■(例)キャビティ流れで解析した結果に乗った粒子の運動
・キャビティ流れをコピー
cp -r $FOAM_TUTORIALS/incompressible/icoFoam/cavity/cavity 001_cavity 
・粒子追跡用のチュートリアルをコピー
cp -r /$FOAM_TUTORIALS/lagrangian/icoUncoupledKinematicParcelFoam/hopper . 
cp -r hopper/hopperInitialState 002_particle  

・キャビティ流れを実行
cd 001_cavity 
blockMesh
icoFoam  

・キャビティ流れの情報を粒子追跡用にコピー
cd ../002_particle
cp -r ../001_cavity/constant/polyMesh constant/ 
cp -r ../001_cavity/0 .    

・キャビティ流れの流速を粒子追跡用にマッピング
mapFields ../001_cavity -sourceTime 0.5 -consistent

・粒子の配置(適当に設定)
constant/kinematicCloudPositions

(
(0.025 0.08 0.05)
(0.050 0.08 0.05)
(0.075 0.08 0.05)
)  

・粒子の設定(適当に設定)
solution
{
    active          true;
    coupled         true;
    transient       yes;
    cellValueSourceCorrection off;

    interpolationSchemes
    {
        rho             cell;
        U               cellPoint;
        mu              cell;
    }

    integrationSchemes
    {
        U               Euler;
    }
    sourceTerms
    {
    /*
    //U のスキームには "explicit"
    と "semiImplicit" が選べる。
    スキームの後の数値は緩和係数らしい。
    */
    schemes
        {
            U           explicit 1;
        }
    }
}

constantProperties
{
    parcelTypeId    1;

    rhoMin          1e-15;
    minParticleMass 1e-15;

    rho0            964;
    youngsModulus   6e8;
    poissonsRatio   0.35;

    constantVolume  false;
}

subModels
{
    particleForces
    {
        sphereDrag;
        gravity;
    }

    injectionModels
    {
        model1
        {
            type manualInjection;
            massTotal       0;
            parcelBasisType fixed;
            nParticle       1;
            SOI             0;
            positionsFile   "kinematicCloudPositions";
            U0              ( 0 0 0 );
            sizeDistribution
            {
                type        fixedValue;
                fixedValueDistribution
                {
                    value   0.02;
                }
            }
        }
    }
    dispersionModel none;

    patchInteractionModel standardWallInteraction;

    heatTransferModel none;

    surfaceFilmModel none;

    stochasticCollisionModel none;

    collisionModel pairCollision;

    radiation off;

    pairCollisionCoeffs
    {
        // Maximum possible particle diameter expected at any time
        maxInteractionDistance  0.02;

        writeReferredParticleCloud no;

        pairModel pairSpringSliderDashpot;

        pairSpringSliderDashpotCoeffs
        {
            useEquivalentSize   no;
            alpha               0.12;
            b                   1.5;
            mu                  0.52;
            cohesionEnergyDensity 0;
            collisionResolutionSteps 12;
        };

        wallModel wallLocalSpringSliderDashpot;

        wallLocalSpringSliderDashpotCoeffs
        {
            useEquivalentSize no;
            collisionResolutionSteps 12;
            movingWall
            {
                youngsModulus   1e10;
                poissonsRatio   0.23;
                alpha           0.12;
                b               1.5;
                mu              0.43;
                cohesionEnergyDensity 0;
            }
            fixedWalls
            {
                youngsModulus   1e10;
                poissonsRatio   0.23;
                alpha           0.12;
                b               1.5;
                mu              0.43;
                cohesionEnergyDensity 0;
            }
            frontAndBack
            {
                youngsModulus   1e10;
                poissonsRatio   0.23;
                alpha           0.12;
                b               1.5;
                mu              0.1;
                cohesionEnergyDensity 0;
            }
        };
    }

    standardWallInteractionCoeffs
    {
        type            rebound;
    }
}

cloudFunctions
{}

・計算実行
  icoUncoupledKinematicParcelFoam

・VTKに変換
foamToVTK

・ParaViewで確認
こちらを参考


2023年5月19日金曜日 17:15:21 UTC+9 md:

md

unread,
May 24, 2023, 3:33:03 AM5/24/23
to OpenFOAM
k 様

お世話になっております.ご返信ありがとうございます.

この記事を見たことがありましたが、事前に計算した流れ場をどのように
反映するか分からなかったので、丁寧に解説いただきありがとうございます.
mapfieldを使えばよいということですね.

あと現時点で分かっていのが粒子の拡散をどのように入れるかということです.
以下のユーザーガイドのp101のLagrange型粒子追跡ライブラリのところにブラウン運動との記述があるので
できるような気もしますがよくわかっていません.

何か知っていることがありましたら、ご教授いただけると幸いです.
よろしくお願いいたします.


2023年5月22日月曜日 21:28:55 UTC+9 k k:

k k

unread,
May 24, 2023, 7:36:20 AM5/24/23
to OpenFOAM
こんにちは。
こちらのBrownianMotionForceことでしょうか。

詳しくなくお力になれませんが、情報提供程度でこちらも貼っておきます。
また、わかったことあれば是非ご報告ください。
よろしくお願いいたします。
2023年5月24日水曜日 16:33:03 UTC+9 md:

md

unread,
May 24, 2023, 11:14:48 AM5/24/23
to OpenFOAM
k様 
ご返信ありがとうございます.

icoUncoupledKinematicParcelFoamではなく、reactingParcelFoamのようですね.
情報のご提供ありがとうございます.

一度試してみて何か分かったことがありましたらまたご報告させていただきます.
よろしくお願いいたします.


2023年5月24日水曜日 20:36:20 UTC+9 k k:

md

unread,
May 30, 2023, 6:32:49 AM5/30/23
to OpenFOAM
お世話になっております.
上記の手順で粒子の計算を行おうとしていますが、最初の段階でつまづいてしまいうまくいっておりません。

・mapFieldsを使用すると以下のように実行できましたが、paraviewで確認しても流れ場が表示できませんでした。なぜ表示できないのかわかる方がいましたら教えていただきたいです。

Create databases as time

Source time: 20
Target time: 0
Create meshes

Source mesh size: 67514 Target mesh size: 25366


Consistently creating and mapping fields for time 20

    interpolating p
    interpolating static(p)_coeff
    interpolating vorticity
    interpolating U

End

・icoUncoupledKinematicParcelFoamを実行すると次のようなエラーメッセージが表示されます。
Create time

Create mesh for time = 0


Reading g
Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type laminar
Selecting laminar stress model Stokes
Constructing kinematicCloud kinematicCloud
Constructing particle forces
    Selecting particle force sphereDrag
Constructing cloud functions
    Selecting cloud function ReynoldsNumber1 of type ReynoldsNumber
Constructing particle injection models
Creating injector: model1
Selecting injection model patchInjection
    Constructing 2-D injection
    Choosing nParticle to be a fixed value, massTotal variable now does not determine anything.
Selecting distribution model fixedValue
Selecting dispersion model none
Selecting patch interaction model localInteraction
    Interaction fields will not be written
Selecting stochastic collision model none
Selecting surface film model none
Selecting packing model none
Selecting damping model none
Selecting isotropy model none
Selecting U integration scheme Euler
Selecting collision model pairCollision
Selecting pair model pairSpringSliderDashpot
Selecting wall model wallLocalSpringSliderDashpot
Building InteractionLists with interaction distance 2e-09
    Building referred interaction lists
    Building direct interaction lists
Reading non-inertial frame fields

Starting time loop

forceCoeffs forceCoeffs:
    rho: rhoInf
    Freestream density (rhoInf) set to 1
    Not including porosity effects
    magUInf: 0.1
    lRef   : 0.01
    Aref   : 0.0001
    rhoInf : 1
    Selecting all coefficients
    - Drag force: Cd
    - Drag force front: Cd(f)
    - Drag force rear: Cd(r)
    - Lift force: Cl
    - Lift force front: Cl(f)
    - Lift force rear: Cl(r)
    - Pitch moment: CmPitch
    - Roll moment: CmRoll
    - Yaw moment: CmYaw
    - Side force: Cs
    - Side force front: Cs(f)
    - Side force rear: Cs(r)


pressure pressure:
    Operating mode: staticCoeff
    Not including hydrostatic effects

Time = 0.001

Evolving kinematicCloud

Solving2-D cloud kinematicCloud
Cloud: kinematicCloud
    Current number of parcels       = 0
    Current mass in system          = 0
    Linear momentum                 = (0 0 0)
   |Linear momentum|                = 0
    Linear kinetic energy           = 0
    Average particle per parcel     = 0
    Injector model1:
      - parcels added               = 0
      - mass introduced             = 0
    Parcel fate: system (number, mass)
      - escape                      = 0, 0
    Parcel fate: patch sidewall (number, mass)
      - escape                      = 0, 0
      - stick                       = 0, 0
    Parcel fate: patch inlet (number, mass)
      - escape                      = 0, 0
      - stick                       = 0, 0
    Parcel fate: patch outlet (number, mass)
      - escape                      = 0, 0
      - stick                       = 0, 0
    Parcel fate: patch upperwall (number, mass)
      - escape                      = 0, 0
      - stick                       = 0, 0
    Parcel fate: patch lowerwall (number, mass)
      - escape                      = 0, 0
      - stick                       = 0, 0
    Parcel fate: patch cylinder (number, mass)
      - escape                      = 0, 0
      - stick                       = 0, 0
    Rotational kinetic energy       = 0

ExecutionTime = 0.869 s  ClockTime = 1 s



--> FOAM FATAL ERROR: (openfoam-2206)
Could not find U: U or p:p in database

    From void Foam::functionObjects::forces::initialise()
    in file forces/forces.C at line 172.

FOAM exiting

これはどこのファイルにp,Uが見当たらないエラーなのでしょうか。
ご教授いただけると幸いです。
よろしくお願いいたします。

2023年5月25日木曜日 0:14:48 UTC+9 md:

k k

unread,
May 31, 2023, 1:09:43 AM5/31/23
to open...@googlegroups.com
こんにちは。
controlDictに抗力の圧力を使う設定が残っているからではないでしょうか。
流速しか必要ないので、controlDictの抗力の出力設定が不要かと思います。

ご確認ください。


2023年5月30日(火) 午後7:32 'md' via OpenFOAM <open...@googlegroups.com>:
--
このメールは Google グループのグループ「OpenFOAM」に登録しているユーザーに送られています。
このグループから退会し、グループからのメールの配信を停止するには openfoam+u...@googlegroups.com にメールを送信してください。
このディスカッションをウェブ上で閲覧するには https://groups.google.com/d/msgid/openfoam/a3952561-6937-4ea7-aaa2-b85360c58714n%40googlegroups.com にアクセスしてください。

md

unread,
May 31, 2023, 3:53:50 AM5/31/23
to OpenFOAM
k様

ご返信ありがとうございます。
計算が回るようになりました。ありがとうございます。


2023年5月31日水曜日 14:09:43 UTC+9 k k:
Reply all
Reply to author
Forward
0 new messages