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

Adding new term in to K eqn of K-Epsilon turbuelnce model

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 9, 2012, 06:29
Default Adding new term in to K eqn of K-Epsilon turbulence model
  #1
New Member
 
neeraj's Avatar
 
OpenFoam
Join Date: Jul 2012
Posts: 24
Rep Power: 14
neeraj is on a distinguished road
Hi all,
i have made a copy of existing kepsilon model and renamed as mykEpsilon. Now i want to add compressibility correction factor Ym=2*epsilon*(M^2) ,where M=sqrt(k/(a^2)) in to the k equation.
Now i have to define a new dimensioned scalar constant "a" (velocity of sound= 350 m/s). can someone help me in doing this?
how should i define "a"?
where should i give its dimension?
etc..
Plz help..!

Last edited by neeraj; October 10, 2012 at 06:01.
neeraj is offline   Reply With Quote

Old   October 10, 2012, 02:44
Default My try...!
  #2
New Member
 
neeraj's Avatar
 
OpenFoam
Join Date: Jul 2012
Posts: 24
Rep Power: 14
neeraj is on a distinguished road
I tried by adding these lines to mykEpsilon.C
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
airvel_
(
dimensioned<scalar>::lookupOrAddToDict
(
"airvel",
coeffDict_, //added by me //
117649
)
),
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


and by adding these line to mykEpsilon.H class protected data
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensionedScalar airvel_;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //



Also added the dimensions into transportproperties in the pitzDaily/Constant
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
transportModel Newtonian;

nu nu [ 0 2 -1 0 0 0 0 ] 1e-05;
airvel_ airvel_ [ 0 2 -2 0 0 0 0 ] 117649;
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //


But i am getting error as follows:::
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting RAS turbulence model mykEpsilon
mykEpsilonCoeffs
{
Cmu 0.09;
C1 1.44;
C2 1.92;
sigmaEps 1.3;
airvel 117649;
}

Defining my own kEpsilon model
No field sources present


SIMPLE: convergence criteria
field p tolerance 0.01
field U tolerance 0.001
field "(k|epsilon|omega)" tolerance 0.001


Starting time loop

Time = 1

DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 0.0606635, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 0.0316293, No Iterations 1
DICPCG: Solving for p, Initial residual = 1, Final residual = 0.00922589, No Iterations 161
time step continuity errors : sum local = 0.58783, global = -0.001983, cumulative = -0.001983
DILUPBiCG: Solving for epsilon, Initial residual = 0.225166, Final residual = 0.0179849, No Iterations 1


--> FOAM FATAL ERROR:
incompatible dimensions for operation
[k[0 2 -3 0 0 0 0] ] - [k[0 4 -5 0 0 0 0] ]

From function checkMethod(const fvMatrix<Type>&, const fvMatrix<Type>&)
in file /home/opencfd/OpenFOAM/OpenFOAM-2.1.1/src/finiteVolume/lnInclude/fvMatrix.C at line 1316.

FOAM aborting

#0 Foam::error:rintStack(Foam::Ostream&) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::error::abort() in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 void Foam::checkMethod<double>(Foam::fvMatrix<double> const&, Foam::fvMatrix<double> const&, char const*) in "/opt/openfoam211/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so"
#3 at mykEpsilon.C:0
#4 Foam::incompressible::RASModels::mykEpsilon::corre ct() in "/home/http/OpenFOAM/http-2.1.1/platforms/linux64GccDPOpt/lib/libmyTurbulenceModels.so"
#5
in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/simpleFoam"
#6 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#7
in "/opt/openfoam211/platforms/linux64GccDPOpt/bin/simpleFoam"
Aborted (core dumped)
neeraj is offline   Reply With Quote

Old   October 10, 2012, 02:45
Default new k-eqn
  #3
New Member
 
neeraj's Avatar
 
OpenFoam
Join Date: Jul 2012
Posts: 24
Rep Power: 14
neeraj is on a distinguished road
// Turbulent kinetic energy equation

tmp<fvScalarMatrix> kEqn
(
fvm::ddt(k_)
+ fvm::div(phi_, k_)
- fvm::Sp(fvc::div(phi_), k_)
- fvm::laplacian(DkEff(), k_)
==
G
- fvm::Sp(epsilon_/k_, k_)
- fvm::Sp(2*epsilon_/airvel_, k_) //***added Ym compressibilty effect***//
);
neeraj is offline   Reply With Quote

Old   October 11, 2012, 08:18
Default
  #4
New Member
 
neeraj's Avatar
 
OpenFoam
Join Date: Jul 2012
Posts: 24
Rep Power: 14
neeraj is on a distinguished road
plz reply... if you want any more details please ask.... i think the basic problem is where to define the new variable "airvel"
neeraj 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
Help regarding K Epsilon model go2saqi Main CFD Forum 2 January 23, 2012 12:59
Curvature Effects using the Standard K Epsilon Model syler3321 CFX 2 October 19, 2010 21:53
The effect of E term in the EPSILON equation Valdemir G. Ferreira Main CFD Forum 6 June 7, 2000 03:37
Extra term in Epsilon equation Valdemir G. Ferreira Main CFD Forum 0 April 30, 2000 09:57
bouyancy term in epsilon equation Michael Main CFD Forum 1 June 25, 1999 11:20


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