CFD Online Logo CFD Online URL
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Programming & Development

Add variable coefficient in turbulence model

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

LinkBack Thread Tools Search this Thread Display Modes
Old   September 15, 2020, 06:23
Default Add variable coefficient in turbulence model
New Member
Join Date: Sep 2020
Posts: 1
Rep Power: 0
GiordiR is on a distinguished road
Hi everyone,

I need to add a variable parameter in front of the production term of the omega equation in the k-omega turbulence model.
It should be like

D omega / Dt = beta(x,y) * P(k,omega,U) - D(k,omega;U) + T(k,omega,U)

I'm new to OpenFoam so i thought to add a volScalarField betaNew

kOmega.H as

volScalarField betaNew = 1;

kOmega.C as


What I'm trying to do is:
- initialize betaNew as unit over the domain
- print its distribution on a file
- modify its distribution somehow
- run the case providing a different distribution

Thank you all
GiordiR is offline   Reply With Quote

Old   December 1, 2020, 09:05
Senior Member
René Thibault
Join Date: Dec 2019
Location: Canada
Posts: 114
Rep Power: 6
Tibo99 is on a distinguished road
Hi Riccardo!

Did you find a solution about what you trying to do?

I'm working on something similar, but with the k-epsilon model, and I'm still working on it.

I found something on GitHub about adding a source term in a turbulence model, but the source term is a scalar not function of 'x', 'y' and 'z'. It is relatively simple to understand, but because our variable is function of 'x', 'y' (and possibly 'z'), it's less complicated compare of what we're trying to attempt.

In case you're interested, here is the link:

Applying correction to the k-e transport equation

Distance of a 'North' and 'South' surface of a cell for 2D mesh

Last edited by Tibo99; December 1, 2020 at 14:19.
Tibo99 is offline   Reply With Quote


implementation, turbulence models, volscalarfield

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
Question about adaptive timestepping Guille1811 CFX 25 November 12, 2017 17:38
Multiphase flow - incorrect velocity on inlet Mike_Tom CFX 6 September 29, 2016 01:27
emag beta feature: charge density charlotte CFX 4 March 22, 2011 09:14
Centrifugal Pump and Turbulence Model Michiel CFX 12 January 25, 2010 03:20
Discussion: Reason of Turbulence!! Wen Long Main CFD Forum 3 May 15, 2009 09:52

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