|
[Sponsors] |
June 18, 2012, 14:46 |
Adding graviational acc. to turbulence model
|
#1 |
Member
Fatih Ertinaz
Join Date: Feb 2011
Location: Istanbul
Posts: 64
Rep Power: 15 |
Hi,
I am trying to modify the standard kEps model to attain the influence of the buoyancy related turbulence. I followed a few different methods however all seemed to fail. 1- Using readGravitationalAcceleration.H : --> FOAM FATAL ERROR: request for dictionary gravitationalProperties from objectRegistry region0 failed available objects of type dictionary are 4 ( RASProperties fvSchemes fvSolution transportProperties ) 2 - Reading from transportProperties: --> FOAM FATAL ERROR: LHS and RHS of + have different dimensions The solver works fine with the standard kEps so I don't think that I have to change the solver or B.C's. 3- Creating a file called "g" and reading via lookupObject<uniformDimensionedVectorField>("g") : Unknow type uniformDimensionedVectorField 4- Linking as a field by lookupObject<volVectorField>("g") : gives an error during the runTime since g is a uniformDimensionedVectorField I guess one other way would be to use a hard-coded vector but I don't want to do that. Any help is appreciated. OF version: 1.6.x OS: CentOS 5 Thanks a lot, Fatih. |
|
March 13, 2015, 06:08 |
|
#2 |
New Member
F.F.
Join Date: Dec 2011
Posts: 14
Rep Power: 14 |
Facing the same problem. Did you find a solution?
I prefer to add Code:
#include "UniformDimensionedField.H" Code:
const uniformDimensionedVectorField& g_ = db().lookupObject<uniformDimensionedVectorField>("g"); |
|
March 13, 2015, 06:26 |
|
#3 |
Senior Member
|
Hi,
You should include another file Code:
#include "UniformDimensionedFields.H" Code:
UniformDimensionedField<vector> And if you are adding gravitation to turbulence model: http://www.cfd-online.com/Forums/ope...nce-model.html http://openfoamwiki.net/index.php/Co...EpsilonViollet |
|
March 13, 2015, 06:49 |
|
#4 |
New Member
F.F.
Join Date: Dec 2011
Posts: 14
Rep Power: 14 |
Hi Alexey,
thanks for your quick response. I guess you meant Code:
#include "uniformDimensionedFields.H" Code:
const uniformDimensionedVectorField& g_ = db().lookupObject<uniformDimensionedVectorField>("g"); Code:
kEpsilonBuoyant/kEpsilonBuoyant.C: In Elementfunktion »virtual void Foam::compressible::RASModels::kEpsilonBuoyant::correct()«: kEpsilonBuoyant/kEpsilonBuoyant.C:324:47: Fehler: Referenz auf »db« ist mehrdeutig /opt/openfoam230/src/OpenFOAM/lnInclude/IOobject.H:250:35: Fehler: Kandidaten sind: const Foam::objectRegistry& Foam::IOobject::db() const /opt/openfoam230/src/OpenFOAM/lnInclude/IOobject.H:250:35: Fehler: const Foam::objectRegistry& Foam::IOobject::db() const kEpsilonBuoyant/kEpsilonBuoyant.C:324:94: Fehler: expected primary-expression before »>« token |
|
March 13, 2015, 07:02 |
|
#5 |
Senior Member
|
Yes, you are right about header name.
Well, kEpsilonViollet was developed for 1.7, guess that time RASModel was a little bit simpler. Right now it is a child of turbulenceModel and IOobject. Each of parents has db method. So you can either create g_ property of your class and initialize it in constructor with something like: Code:
g_ ( IOobject ( "g", runTime_.constant(), mesh_, IOobject::MUST_READ_IF_MODIFIED, IOobject::NO_WRITE ) ) Code:
const uniformDimensionedVectorField& g_ = mesh_.thisDb().lookupObject<uniformDimensionedVectorField>("g"); |
|
March 13, 2015, 07:26 |
|
#6 |
New Member
F.F.
Join Date: Dec 2011
Posts: 14
Rep Power: 14 |
Model runs. Thank you a lot!
To sum it up: Inculding gravity acceleration in turbulence models by adding in the .H-file: Code:
#include "uniformDimensionedFields.H" Code:
const uniformDimensionedVectorField& g_ = mesh_.thisDb().lookupObject<uniformDimensionedVectorField>("g"); |
|
December 12, 2020, 01:04 |
|
#7 |
New Member
Join Date: Nov 2020
Posts: 2
Rep Power: 0 |
what is uniformdimensioned vector field and why is it used in terms of g?
|
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Use of k-epsilon and k-omega Models | Jade M | Main CFD Forum | 40 | January 27, 2023 08:18 |
Fluent :- turbulence Model | prince_pahariaa | FLUENT | 9 | May 20, 2016 04:41 |
SimpleFoam case with SpalartAllmaras turbulence model implemented | nedved | OpenFOAM Running, Solving & CFD | 2 | November 30, 2014 23:43 |
Low Reynolds k-epsilon model | YJZ | ANSYS | 1 | August 20, 2010 14:57 |
KOmega Turbulence model from wwwopenFOAMWikinet | philippose | OpenFOAM Running, Solving & CFD | 30 | August 4, 2010 11:26 |