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

Reading temperature in compressible k-omega SST

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 13, 2019, 23:28
Question Reading temperature in compressible k-omega SST
  #1
Member
 
Join Date: Dec 2012
Posts: 33
Rep Power: 13
mechkween is on a distinguished road
Hi all,
I'm trying to modify and build a version of k-omega SST (compressible) where I need to compute temperature gradients to evaluate and construct a new turbulent Prandtl number. I'm not sure how to get the turbulence solver to read in the temperature field to perform the processing. I tried adding T using:


Code:
 

rhoKOmegaSSTAlt
        (   
            const volScalarField& rho,
            const volVectorField& U,
            const surfaceScalarField& phi,
            const volScalarField& T,
            const fluidThermo& thermophysicalModel,
            const word& turbulenceModelName = turbulenceModel::typeName,
            const word& modelName = typeName
        );


but the compilation fails saying no matching function call which leads me to RASModel.H where the T line doesn't exist. I could modify that as well but seems like a complicated thing. Is there a simpler way to read the temperature field into the solver?


Thanks
mechkween is offline   Reply With Quote

Old   October 14, 2019, 06:47
Default
  #2
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
You can lookup T by
Code:
 volScalarField  Thelp =  U.mesh().lookupObject<volScalarField>("T");
mAlletto is offline   Reply With Quote

Old   October 15, 2019, 01:08
Default
  #3
Member
 
Join Date: Dec 2012
Posts: 33
Rep Power: 13
mechkween is on a distinguished road
Hi Michael,


Thanks for this, I can confirm I was able to compile the solver with a slight modification:
Code:
 volScalarField THelp = U_.mesh().lookupObject<volScalarField>("T");
However the solver isn't behaving as expected. The Prt I'm building is not getting updated even though I do Prt_.correctBoundaryConditions(), which leads me to believe maybe the THelp is not getting updated? Would this looking up for T update THelp or I require a correctBoundaryConditions() call on THelp as well?
mechkween is offline   Reply With Quote

Old   October 15, 2019, 01:16
Default
  #4
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 615
Rep Power: 15
mAlletto will become famous soon enough
What you're getting is the temperature which is stored in the database. It is a constant reference. It means it cannot be modified. The temperature is updated only when the temperature equation is solved.
mAlletto is offline   Reply With Quote

Old   October 15, 2019, 18:26
Default
  #5
Member
 
Join Date: Dec 2012
Posts: 33
Rep Power: 13
mechkween is on a distinguished road
I understand. I fixed the issue and now it updates the Prt every iteration.

The issue came from the fact the updating was happening in a conditional loop which wasn't being entered into.


Thanks for the help Michael!
mechkween is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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
k and omega at inlet for k-omega SST driu OpenFOAM Running, Solving & CFD 10 March 5, 2021 10:48
Temperature loss in compressible solvers in high speed flows vkrastev OpenFOAM Running, Solving & CFD 1 June 16, 2018 07:10
At high Y+ values does the K Omega SST model just behave like the K Epsilon model? JuPa CFX 0 December 22, 2015 06:44
Temperature increment at wall in compressible flow Yogini CFX 1 April 1, 2015 17:52
Temperature field error in compressible LES aljo OpenFOAM Running, Solving & CFD 4 December 10, 2013 03:30


All times are GMT -4. The time now is 07:39.