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

Access to ck or ce of the Smagorinsky in a new solver

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 26, 2013, 13:12
Default Access to ck or ce of the Smagorinsky in a new solver
  #1
Senior Member
 
Jian Zhong
Join Date: Feb 2012
Location: Birmingham
Posts: 109
Rep Power: 6
zxj160 is on a distinguished road
Dear Foamer,

I am trying to set different values of ck or ce of Smagorinsky model in different regions of the domain. I am not sure whether it is possible to access to ck in the main code of a new solver. Does anyone have an idea?

My best regards,
Jian
zxj160 is offline   Reply With Quote

Old   October 26, 2013, 13:21
Default
  #2
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,644
Blog Entries: 39
Rep Power: 99
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Greetings Jian,

Quick question: do you mean you want to access the values for the turbulence model in general or the one on a specific patch?

I ask this because I honestly haven't checked which Smagorinsky model you're referring to...

Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Old   October 26, 2013, 18:17
Default
  #3
Senior Member
 
Jian Zhong
Join Date: Feb 2012
Location: Birmingham
Posts: 109
Rep Power: 6
zxj160 is on a distinguished road
Hi Bruno,

I mean the incompressible::turbulence::LES models::Smagorinsky. Just like using setFields for 'alpha'. I want to select a region (BoxtoCell) and specify a set value of ck/ce. The remaining region are set to another set of value. I am not sure whether it is possible.

My best regards,
Jian
zxj160 is offline   Reply With Quote

Old   October 26, 2013, 18:40
Default
  #4
Super Moderator
 
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 9,644
Blog Entries: 39
Rep Power: 99
wyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nicewyldckat is just really nice
Hi Jian,

From what I can see in the source code:
Both "ce_" and "ck_" are simple scalars and not scalar fields. Which means that as the code is currently defined, it's uniform on all of the domain.


You will have to create a variant of those two classes for them to use "ce" and/or "ck" as scalar fields. Only then will you be able to set values specific to certain locations of the mesh.


Have a look into the code "src/turbulenceModels/compressible/LES/SpalartAllmaras": https://github.com/OpenFOAM/OpenFOAM...palartAllmaras - it uses scalar fields for these variables:
Quote:
Code:
        volScalarField nuTilda_;
        volScalarField dTilda_;
        volScalarField muSgs_;
        volScalarField alphaSgs_;
Best regards,
Bruno
__________________
wyldckat is offline   Reply With Quote

Reply

Tags
change ce, change ck, smagorinsky model

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange residuals of the Density Based Solver Pat84 FLUENT 0 October 22, 2012 15:59
Quarter Burner mesh with periosic condition SamCanuck FLUENT 2 August 31, 2011 11:34
Working directory via command line Luiz CFX 4 March 6, 2011 21:02
why the solver reject it? Anyone with experience? bearcat CFX 6 April 28, 2008 14:08
How to access solver fields from fvPatchField%2360Type derived class that defines BC kar OpenFOAM Running, Solving & CFD 0 February 29, 2008 13:41


All times are GMT -4. The time now is 10:58.