CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Problems with implementing sink term in Gamma-Re-Theta turbulence model

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   August 9, 2022, 15:27
Default Problems with implementing sink term in Gamma-Re-Theta turbulence model
  #1
New Member
 
Sumedh S.
Join Date: Aug 2022
Posts: 2
Rep Power: 0
sumedhss is on a distinguished road
Hello all,
I'm trying to augment the Gamma-Re-Theta model to include crossflow effects as per Langtry (Langtry, Robin. "Extending the gamma-rethetat correlation based transition model for crossflow effects." In 45th AIAA fluid dynamics conference, p. 2474. 2015.) In this approach, an additional sink term D_{SCF} is added to the transport equation for \tilde{Re_{\theta t}}, which is described as-
D_{SCF} = c_{\theta t}\frac{\rho}{t}min(Re_{SCF}-\tilde{Re_{\theta t}},0)F_{\theta t 2}

Here, Re_{SCF} is the stationery crossflow Reynolds number, which is computed implicitly using a correlation. Since Re_{\theta t 0} (freestream transition momentum thickness Reynolds number) is also computed implicitly, I defined Re_{SCF} in a similar fashion as
Re_{\theta t 0} and called it in
Code:
correctReThetatGammaInt()
, but I get the following warning while compiling-
Code:
In file included from ../turbulenceModels/lnInclude/kOmegaSSTLMN.H:320,
                 from turbulentTransportModels/myTurbulentTransportModels.C:60:
../turbulenceModels/lnInclude/kOmegaSSTLMN.C: In instantiation of ‘Foam::tmp<Foam::DimensionedField<double, Foam::volMesh> > Foam::RASModels::kOmegaSSTLMN<BasicTurbulenceModel>::ReSCF(const Internal&, const Internal&, const Internal&) const [with BasicTurbulenceModel = Foam::IncompressibleTurbulenceModel<Foam::transportModel>; Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::Internal = Foam::DimensionedField<double, Foam::volMesh>]’:
../turbulenceModels/lnInclude/kOmegaSSTLMN.C:707:21:   required from ‘void Foam::RASModels::kOmegaSSTLMN<BasicTurbulenceModel>::correctReThetatGammaInt() [with BasicTurbulenceModel = Foam::IncompressibleTurbulenceModel<Foam::transportModel>]’
../turbulenceModels/lnInclude/kOmegaSSTLMN.C:785:5:   required from ‘void Foam::RASModels::kOmegaSSTLMN<BasicTurbulenceModel>::correct() [with BasicTurbulenceModel = Foam::IncompressibleTurbulenceModel<Foam::transportModel>]’
../turbulenceModels/lnInclude/kOmegaSSTLMN.C:768:6:   required from here
I tried running simulations with this model, but they would crash instantly with the error log mentioning Re_{SCF}. When I replaced Re_{SCF} with a constant value in
Code:
correctReThetatGammaInt()
, the model compiles without issues and simulations also run without issues. It is clear that the problem is related to the instantiation of the function template, but I am not able to pinpoint the exact reason. I have attached the code and header file along with the post. I'm using OpenFOAM v2012. Any help on this topic would be sincerely appreciated.
Thanks a lot!
Attached Files
File Type: c kOmegaSSTLMN.C (20.6 KB, 1 views)
File Type: h kOmegaSSTLMN.H (9.4 KB, 1 views)

Last edited by sumedhss; August 10, 2022 at 03:57. Reason: Latex error
sumedhss is offline   Reply With Quote

Old   August 10, 2022, 07:10
Default
  #2
Senior Member
 
Domenico Lahaye
Join Date: Dec 2013
Posts: 798
Blog Entries: 1
Rep Power: 17
dlahaye is on a distinguished road
Not sure.

Does its make sense to look into fvOptions to include an additional source term?
dlahaye is offline   Reply With Quote

Old   August 13, 2022, 04:34
Default
  #3
New Member
 
Sumedh S.
Join Date: Aug 2022
Posts: 2
Rep Power: 0
sumedhss is on a distinguished road
Quote:
Originally Posted by dlahaye View Post
Not sure.

Does its make sense to look into fvOptions to include an additional source term?
Can fvOptions access protected member functions? All the constants required for the source terms are protected class members in this case.
sumedhss is offline   Reply With Quote

Old   August 31, 2022, 11:24
Default
  #4
Super Moderator
 
Tobi's Avatar
 
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52
Tobi has a spectacular aura aboutTobi has a spectacular aura aboutTobi has a spectacular aura about
Send a message via ICQ to Tobi Send a message via Skype™ to Tobi
You can redefine the constants in the coded FO.
__________________
Keep foaming,
Tobias Holzmann
Tobi is offline   Reply With Quote

Reply

Tags
gamma rethetat, gamma theta model, transition model, transition sst, turbulence models


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
SST k-omega model, definition of gamma or alpha in the production term blyatman Main CFD Forum 13 October 25, 2022 21:13
[swak4Foam] swakExpression not writing to log alexfells OpenFOAM Community Contributions 3 March 16, 2020 19:19
Gamma Theta Model Error dl467 CFX 4 November 26, 2015 08:52
K - epsilon VS SST turbulence model Maicol Main CFD Forum 0 November 30, 2012 17:25
Discussion: Reason of Turbulence!! Wen Long Main CFD Forum 3 May 15, 2009 10:52


All times are GMT -4. The time now is 23:40.