Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
Fumiya Nozaki
2014/04/27,1st ed.
OpenFOAM v2.3.0
回転領域を含む計算
Keywords:
• OpenFOAM
• SRF
• MRF
2
回転体周りの流れ場の計算|分類
計算領域全体が回転領域
計算領域に回転領域と静止領域の両方が存在
http://www.pumped101.com/pumpintro.pdf
例)インペラ単独の解析
例)インペラとボリュートとを併せた解析
...
3
計算領域全体が回転領域の計算
 回転領域と一緒に回転する座標系で計算を行うことにより,メッシュの移動
をせずに回転領域を取り扱うことができます.
Single Rotating Frame (SRF)
SRFSimpleFoam
SRFP...
4
SRFSimpleFoam | 概要
 SRFSimpleFoamの支配方程式 (定常,非圧縮)
𝒖 𝑅 ∙ 𝛻 𝒖 𝑅 + 2𝜴 × 𝒖 𝑅 + 𝜴 × 𝜴 × 𝒓 = −𝛻𝑝 + 𝛻 ∙ 𝜈 𝑒𝑓𝑓 𝛻𝒖 𝑅 + 𝛻𝒖 𝑅
𝑇
𝛻 ∙...
5
SRFSimpleFoam | 設定
 constant ディレクトリの『SRFProperties』ファイルで回転速度に関する
設定を行います.
/*--------------------------------*- C++ -*--...
6
SRFSimpleFoam | 実装
𝒖 𝑅 ∙ 𝛻 𝒖 𝑅 + 2𝜴 × 𝒖 𝑅 + 𝜴 × 𝜴 × 𝒓 = −𝛻𝑝 + 𝛻 ∙ 𝜈 𝑒𝑓𝑓 𝛻𝒖 𝑅 + 𝛻𝒖 𝑅
𝑇
𝛻 ∙ 𝒖 𝑅 = 0
// Relative momentum p...
7
SRFSimpleFoam|チュートリアル
 tutorials/incompressible/SRFSimpleFoam/mixer
反時計回りに 5000rpm で回転
outlet
outerWall
innerWall
cycli...
8
SRFSimpleFoam|チュートリアル
cyclic_half1
cyclic_half0
周期境界条件
 境界条件
innerWall
𝒖 𝑅 = 𝟎
outerWall
𝒖 = 𝟎inlet
𝒖 = 0 0 − 10
手前側から奥...
9
SRFVelocity 境界条件
 mixer チュートリアルでは,inlet と outerWall において『SRFVelocity』
という境界条件を使用しています.
inlet
{
type
inletValue
relative...
10
SRFVelocity 境界条件の実装
void Foam::SRFVelocityFvPatchVectorField::updateCoeffs()
{
if (updated())
{
return;
}
// If not rel...
11
outerWall 上の流速
慣性座標系での流速分布
回転座標系での流速分布
outerWall の半径が 0.1 m
𝒖 = 𝟎
𝒖 𝒓 = 𝒖 − 𝛀 × 𝒓
= 523.6 ∙ 0.1 = 52.36 [𝑚/𝑠]
ベクトルは,𝒖 𝑟...
12
計算領域に回転領域と静止領域の両方が存在する計算
 回転領域のメッシュの移動を伴うか否かで大きく2つの方法に分類できます.
メッシュの移動を伴わない方法
メッシュの移動を伴う方法
回転領域は,SRF と同様に回転座標系で解き,
静止領域...
13
Multiple Reference Frame (MRF)
回転領域
静止領域
 MRF モデルをイメージで描くと・・・
14
Multiple Reference Frame (MRF)
 OpenFOAM v2.3.0 では,fvOptions の機能を使用して,標準のソルバー
の支配方程式にソース項を付加することで,MRF モデルを取り扱います.
 sy...
15
MRF モデル|概要
 支配方程式(非圧縮)
𝒖 𝑅 ∙ 𝛻 𝒖 − 𝛀 × 𝒖 = −𝛻𝑝 + 𝛻 ∙ 𝜈 𝑒𝑓𝑓 𝛻𝒖 + 𝛻𝒖 𝑇
𝛻 ∙ 𝒖 𝑅 = 0
コリオリ力 (静止領域では0)
 通常の simpleFoam の支配方...
355 void Foam::MRFZone::addCoriolis(fvVectorMatrix& UEqn, const bool rhs) const
356 {
357 if (cellZoneID_ == -1)
358 {
359...
17
MRF モデル|実装
34 template<class RhoFieldType>
35 void Foam::MRFZone::makeRelativeRhoFlux
36 (
37 const RhoFieldType& rho,
...
18
MRF, AMI etc. について
To be continued.
Upcoming SlideShare
Loading in …5
×

OpenFOAM -回転領域を含む流体計算 (Rotating Geometry)-

8,927 views

Published on

This slide is describing how to set up the OpenFOAM simulations including rotating geometries.
The SRF (Single Rotating Frame) is covered and MRF (Multiple Reference Frame).will be covered in it.

Published in: Technology, Business
  • Follow the link, new dating source: ❶❶❶ http://bit.ly/2F90ZZC ❶❶❶
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Dating for everyone is here: ♥♥♥ http://bit.ly/2F90ZZC ♥♥♥
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD THAT BOOKS INTO AVAILABLE FORMAT (2019 Update) ......................................................................................................................... ......................................................................................................................... Download Full PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download Full doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download PDF EBOOK here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download EPUB Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... Download doc Ebook here { http://bit.ly/2m6jJ5M } ......................................................................................................................... ......................................................................................................................... ................................................................................................................................... eBook is an electronic version of a traditional print book that can be read by using a personal computer or by using an eBook reader. (An eBook reader can be a software application for use on a computer such as Microsoft's free Reader application, or a book-sized computer that is used solely as a reading device such as Nuvomedia's Rocket eBook.) Users can purchase an eBook on diskette or CD, but the most popular method of getting an eBook is to purchase a downloadable file of the eBook (or other reading material) from a Web site (such as Barnes and Noble) to be read from the user's computer or reading device. Generally, an eBook can be downloaded in five minutes or less ......................................................................................................................... .............. Browse by Genre Available eBooks .............................................................................................................................. Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, ......................................................................................................................... ......................................................................................................................... .....BEST SELLER FOR EBOOK RECOMMEND............................................................. ......................................................................................................................... Blowout: Corrupted Democracy, Rogue State Russia, and the Richest, Most Destructive Industry on Earth,-- The Ride of a Lifetime: Lessons Learned from 15 Years as CEO of the Walt Disney Company,-- Call Sign Chaos: Learning to Lead,-- StrengthsFinder 2.0,-- Stillness Is the Key,-- She Said: Breaking the Sexual Harassment Story That Helped Ignite a Movement,-- Atomic Habits: An Easy &amp; Proven Way to Build Good Habits &amp; Break Bad Ones,-- Everything Is Figureoutable,-- What It Takes: Lessons in the Pursuit of Excellence,-- Rich Dad Poor Dad: What the Rich Teach Their Kids About Money That the Poor and Middle Class Do Not!,-- The Total Money Makeover: Classic Edition: A Proven Plan for Financial Fitness,-- Shut Up and Listen!: Hard Business Truths that Will Help You Succeed, ......................................................................................................................... .........................................................................................................................
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD FULL BOOKS, INTO AVAILABLE Format, ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • DOWNLOAD FULL BOOKS, INTO AVAILABLE Format, ......................................................................................................................... ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. PDF EBOOK here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. EPUB Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... 1.DOWNLOAD FULL. doc Ebook here { https://tinyurl.com/y6a5rkg5 } ......................................................................................................................... ......................................................................................................................... ......................................................................................................................... .............. Browse by Genre Available eBooks ......................................................................................................................... Art, Biography, Business, Chick Lit, Children's, Christian, Classics, Comics, Contemporary, Cookbooks, Crime, Ebooks, Fantasy, Fiction, Graphic Novels, Historical Fiction, History, Horror, Humor And Comedy, Manga, Memoir, Music, Mystery, Non Fiction, Paranormal, Philosophy, Poetry, Psychology, Religion, Romance, Science, Science Fiction, Self Help, Suspense, Spirituality, Sports, Thriller, Travel, Young Adult,
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here

OpenFOAM -回転領域を含む流体計算 (Rotating Geometry)-

  1. 1. Fumiya Nozaki 2014/04/27,1st ed. OpenFOAM v2.3.0 回転領域を含む計算 Keywords: • OpenFOAM • SRF • MRF
  2. 2. 2 回転体周りの流れ場の計算|分類 計算領域全体が回転領域 計算領域に回転領域と静止領域の両方が存在 http://www.pumped101.com/pumpintro.pdf 例)インペラ単独の解析 例)インペラとボリュートとを併せた解析 インペラ(回転領域) ボリュート(静止領域) 1 2
  3. 3. 3 計算領域全体が回転領域の計算  回転領域と一緒に回転する座標系で計算を行うことにより,メッシュの移動 をせずに回転領域を取り扱うことができます. Single Rotating Frame (SRF) SRFSimpleFoam SRFPimpleFoam 定常計算用 非定常計算用
  4. 4. 4 SRFSimpleFoam | 概要  SRFSimpleFoamの支配方程式 (定常,非圧縮) 𝒖 𝑅 ∙ 𝛻 𝒖 𝑅 + 2𝜴 × 𝒖 𝑅 + 𝜴 × 𝜴 × 𝒓 = −𝛻𝑝 + 𝛻 ∙ 𝜈 𝑒𝑓𝑓 𝛻𝒖 𝑅 + 𝛻𝒖 𝑅 𝑇 𝛻 ∙ 𝒖 𝑅 = 0 𝒖 = 𝒖 𝑅 + 𝜴 × 𝒓 𝜴 :角速度 回転軸 𝒓 慣性座標系での流速 回転座標系での流速 コリオリ力 遠心力 :軸からの位置ベクトル
  5. 5. 5 SRFSimpleFoam | 設定  constant ディレクトリの『SRFProperties』ファイルで回転速度に関する 設定を行います. /*--------------------------------*- 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 SRFProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // SRFModel rpm; axis ( 0 0 1 ); rpmCoeffs { rpm 5000; } // ************************************************************************* // 回転速度を,1分当たりの回転の回数 (RPM)で指定 回転軸ベクトル 5000 rpm ⇒ 5000 ∗ 2π 60 = 523.6 [rad/s] 回転軸ベクトルが自分の方を向いている視点で, • rpm>0 ⇒ 反時計回り • rpm<0 ⇒ 時計回り 回転の向き
  6. 6. 6 SRFSimpleFoam | 実装 𝒖 𝑅 ∙ 𝛻 𝒖 𝑅 + 2𝜴 × 𝒖 𝑅 + 𝜴 × 𝜴 × 𝒓 = −𝛻𝑝 + 𝛻 ∙ 𝜈 𝑒𝑓𝑓 𝛻𝒖 𝑅 + 𝛻𝒖 𝑅 𝑇 𝛻 ∙ 𝒖 𝑅 = 0 // Relative momentum predictor tmp<fvVectorMatrix> UrelEqn ( fvm::div(phi, Urel) + turbulence->divDevReff(Urel) + SRF->Su() == fvOptions(Urel) ); UrelEqn.H Foam::tmp<Foam::DimensionedField<Foam::vector, Foam::volMesh> > Foam::SRF::SRFModel::Su() const { return Fcoriolis() + Fcentrifugal(); } SRFModel.H 2.0*omega_ ^ Urel_ omega_ ^ (omega_ ^ mesh_.C()) 126行 147行 慣性座標系での流速 (Uabs) の計算 Urel + SRF->U() SRFSimpleFoam.C omega_ ^ (mesh_.C() - axis_*(axis_ & mesh_.C()))
  7. 7. 7 SRFSimpleFoam|チュートリアル  tutorials/incompressible/SRFSimpleFoam/mixer 反時計回りに 5000rpm で回転 outlet outerWall innerWall cyclic_half1 cyclic_half0 非表示にしている手前側の面が inlet
  8. 8. 8 SRFSimpleFoam|チュートリアル cyclic_half1 cyclic_half0 周期境界条件  境界条件 innerWall 𝒖 𝑅 = 𝟎 outerWall 𝒖 = 𝟎inlet 𝒖 = 0 0 − 10 手前側から奥向き
  9. 9. 9 SRFVelocity 境界条件  mixer チュートリアルでは,inlet と outerWall において『SRFVelocity』 という境界条件を使用しています. inlet { type inletValue relative value } outerWall { type inletValue relative value } SRFVelocity; uniform ( 0 0 -10 ); no; uniform ( 0 0 0 ); SRFVelocity; uniform ( 0 0 0 ); no; uniform ( 0 0 0 ); 𝒖 = 𝟎 の条件(慣性座標系で静止) 𝒖 = 0 0 − 10 の条件 (慣性座標系で Z 方向に一様に流入) 『relative』で『no』と設定 慣性座標系での流速により, 𝒖 𝑟 に関する境界条件を 設定できます. この境界条件の実装部分を次のページ に示します.
  10. 10. 10 SRFVelocity 境界条件の実装 void Foam::SRFVelocityFvPatchVectorField::updateCoeffs() { if (updated()) { return; } // If not relative to the SRF include the effect of the SRF if (!relative_) { // Get reference to the SRF model const SRF::SRFModel& srf = db().lookupObject<SRF::SRFModel>("SRFProperties"); // Determine patch velocity due to SRF const vectorField SRFVelocity(srf.velocity(patch().Cf())); operator==(-SRFVelocity + inletValue_); } // If already relative to the SRF simply supply the inlet value as a fixed // value else { operator==(inletValue_); } fixedValueFvPatchVectorField::updateCoeffs(); } 『relative』が『no』の場合 『relative』が『yes』の場合 SRFModel.C の 160 行目 𝜴 × 𝒓 の計算 𝒖 𝑅 = −𝜴 × 𝒓 + 𝒖
  11. 11. 11 outerWall 上の流速 慣性座標系での流速分布 回転座標系での流速分布 outerWall の半径が 0.1 m 𝒖 = 𝟎 𝒖 𝒓 = 𝒖 − 𝛀 × 𝒓 = 523.6 ∙ 0.1 = 52.36 [𝑚/𝑠] ベクトルは,𝒖 𝑟 を表しています. 当然ですが,回転座標系で観測すれば, outerWall は回転方向と逆方向に 回転して見えます. 回転方向
  12. 12. 12 計算領域に回転領域と静止領域の両方が存在する計算  回転領域のメッシュの移動を伴うか否かで大きく2つの方法に分類できます. メッシュの移動を伴わない方法 メッシュの移動を伴う方法 回転領域は,SRF と同様に回転座標系で解き, 静止領域は静止座標系で解きます. Multiple Reference Frame (MRF) 複数の座標系を用いるため Arbitrary Mesh Interface(AMI) + dynamicMesh 回転領域のメッシュ移動を dynamicMesh (solidBodyMotionFvMesh 等) で行い,回転領域と静止領域間の補間を AMI で行います.
  13. 13. 13 Multiple Reference Frame (MRF) 回転領域 静止領域  MRF モデルをイメージで描くと・・・
  14. 14. 14 Multiple Reference Frame (MRF)  OpenFOAM v2.3.0 では,fvOptions の機能を使用して,標準のソルバー の支配方程式にソース項を付加することで,MRF モデルを取り扱います.  system ディレクトリ内の『fvOptions』ファイルで設定を行います. MRF1 { type active selectionMode cellZone MRFSourceCoeffs { origin axis omega } } MRFSource; true; cellZone; rotor; (0 0 0); (0 0 1); 104.72; 回転領域を cellZone により 指定しています.この領域に 含まれるセルにコリオリ力が ソース項として作用します. rotor
  15. 15. 15 MRF モデル|概要  支配方程式(非圧縮) 𝒖 𝑅 ∙ 𝛻 𝒖 − 𝛀 × 𝒖 = −𝛻𝑝 + 𝛻 ∙ 𝜈 𝑒𝑓𝑓 𝛻𝒖 + 𝛻𝒖 𝑇 𝛻 ∙ 𝒖 𝑅 = 0 コリオリ力 (静止領域では0)  通常の simpleFoam の支配方程式と異なる点 • 回転領域においてコリオリ力が加わる • 回転領域における流束 これらの処理について次の2ページに示します. 静止領域では,𝒖
  16. 16. 355 void Foam::MRFZone::addCoriolis(fvVectorMatrix& UEqn, const bool rhs) const 356 { 357 if (cellZoneID_ == -1) 358 { 359 return; 360 } 361 362 const labelList& cells = mesh_.cellZones()[cellZoneID_]; 363 const scalarField& V = mesh_.V(); 364 vectorField& Usource = UEqn.source(); 365 const vectorField& U = UEqn.psi(); 366 367 const vector Omega = this->Omega(); 368 369 if (rhs) 370 { 371 forAll(cells, i) 372 { 373 label celli = cells[i]; 374 Usource[celli] += V[celli]*(Omega ^ U[celli]); 375 } 376 } 377 else 378 { 379 forAll(cells, i) 380 { 381 label celli = cells[i]; 382 Usource[celli] -= V[celli]*(Omega ^ U[celli]); 383 } 384 } 385 } 16 MRF モデル|実装 MRFZone.C  回転領域におけるコリオリ力の計算 cells は,cellZone に 含まれるセルの番号の リストです. cellZone に含まれるセルに 対して,コリオリ力をソース として加えています.
  17. 17. 17 MRF モデル|実装 34 template<class RhoFieldType> 35 void Foam::MRFZone::makeRelativeRhoFlux 36 ( 37 const RhoFieldType& rho, 38 surfaceScalarField& phi 39 ) const 40 { 41 const surfaceVectorField& Cf = mesh_.Cf(); 42 const surfaceVectorField& Sf = mesh_.Sf(); 43 44 const vector Omega = omega_->value(mesh_.time().timeOutputValue())*axis_; 45 46 const vectorField& Cfi = Cf.internalField(); 47 const vectorField& Sfi = Sf.internalField(); 48 scalarField& phii = phi.internalField(); 49 50 // Internal faces 51 forAll(internalFaces_, i) 52 { 53 label facei = internalFaces_[i]; 54 phii[facei] -= rho[facei]*(Omega ^ (Cfi[facei] - origin_)) & Sfi[facei]; 55 } 56 57 makeRelativeRhoFlux(rho.boundaryField(), phi.boundaryField()); 58 }  回転領域における流束の修正 MRFZoneTemplates.C
  18. 18. 18 MRF, AMI etc. について To be continued.

×