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

Adding gravitational acceleration inside a turbulence model

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 31, 2018, 04:02
Default Adding gravitational acceleration inside a turbulence model
  #1
Senior Member
 
CFD_Lovers
Join Date: Mar 2015
Posts: 168
Rep Power: 11
sinatahmooresi is on a distinguished road
Hi dear Foamers!
I want to add g (gravity) to my own turbulence model.
As far as I know and considering what I’ve done before in solver modification, adding g consist of two steps:
1 : adding
#include "readGravitionalAcceleration.H" in creatField.H or Ueqn.H (depend on where you are using g).

2: adding
g file inside the constant directory of running case.

But what if I want to make my own turbulence model read g?
is it possible to define it like a local dimensionedScalar but as volVectorField?

Regards
sinatahmooresi is offline   Reply With Quote

Old   October 31, 2018, 05:05
Default
  #2
Senior Member
 
CFD_Lovers
Join Date: Mar 2015
Posts: 168
Rep Power: 11
sinatahmooresi is on a distinguished road
Hi I just found that it could be done like this:


dimensionedVector g
(
"g"
dimensionSet (0, 1, -2, 0, 0),
vector (0, -9.81, 0)
);
I just have another question. I want to use the transpose of g. As I know it can be done by : g.T()
applying this makes error !
sinatahmooresi is offline   Reply With Quote

Reply


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
Adding a Turbulence Model doug OpenFOAM Running, Solving & CFD 11 May 21, 2018 13:54
NEW turbulence TRANSITIONAL model giammy92 OpenFOAM 3 June 30, 2016 09:47
chtMultiRegionSimpleFoam samiam1000 OpenFOAM Running, Solving & CFD 39 March 31, 2016 08:43
Wrong flow in ratating domain problem Sanyo CFX 17 August 15, 2015 06:20
Compressible turbulence model issues 351Cleveland OpenFOAM 5 October 24, 2013 15:41


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