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

Komega equation

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   July 17, 2007, 18:53
Default Hi all, I'm trying to code
  #1
Member
 
Doug Hunsaker
Join Date: Mar 2009
Location: Logan, UT
Posts: 63
Rep Power: 17
doug is on a distinguished road
Hi all,

I'm trying to code in a k-omega model. The model compiles, but during runtime I get the following error:

Time = 1

DILUPBiCG: Solving for Ux, Initial residual = 1, Final residual = 0.0529457, No Iterations 1
DILUPBiCG: Solving for Uy, Initial residual = 1, Final residual = 0.0290519, No Iterations 1
DICPCG: Solving for p, Initial residual = 1, Final residual = 0.0083708, No Iterations 171
time step continuity errors : sum local = 0.146471, global = -0.000598041, cumulative = -0.000598041
DILUPBiCG: Solving for omega, Initial residual = 0.183509, Final residual = 0.0054477, No Iterations 1


--> FOAM FATAL ERROR : incompatible fields for operation
[k] == [omega]#0 Foam::error::printStack(Foam:stream&)
#1 Foam::error::abort()
#2 void Foam::checkMethod<double>(Foam::fvMatrix<double> const&, Foam::fvMatrix<double> const&, char const*)
#3 Foam::turbulenceModels::myKOmega::correct()
#4 main
#5 __libc_start_main
#6 __gxx_personality_v0 at /usr/src/packages/BUILD/glibc-2.3/csu/../sysdeps/i386/elf/start.S:122


From function checkMethod(const fvMatrix<type>&, const fvMatrix<type>&)
in file /home/doug/OpenFOAM/OpenFOAM-1.4/src/finiteVolume/lnInclude/fvMatrix.C at line 1005.

FOAM aborting

From the error message it is apparent that the error happens in the myKOmega::correct() function. I've tried adding print statements to see exactly where the error occurs, but haven't figured out how to get things to print to the screen. I tried Info<<"here"<<endl; statements, but they didn't work. Any ideas on how I might track down this runtime error?

Here is the portion of the code I think it is breaking at in case anyone can spot the error from the code. However, I'm not sure if it's breaking here because I can't figure out at what line the program aborts.

// 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(Cmu*k_, omega_)
);

Thanks in advance.

Doug
doug is offline   Reply With Quote

Old   July 17, 2007, 18:57
Default Easy: you are building a matri
  #2
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Easy: you are building a matrix for k_ and the last term is implicit in omega_ - you cannot add it to this matrix.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   July 17, 2007, 19:13
Default Thanks for the quick reply. So
  #3
Member
 
Doug Hunsaker
Join Date: Mar 2009
Location: Logan, UT
Posts: 63
Rep Power: 17
doug is on a distinguished road
Thanks for the quick reply. So how would you write Cmu*k_*omega_ ?
I tried fvc::Sp(Cmu*k_, omega_) and it didn't work either.

It must be obvious from that line of code what I'm trying to do (?).

-Doug
doug is offline   Reply With Quote

Old   July 17, 2007, 19:27
Default How about Cmu*omega_, k)? H
  #4
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
How about Cmu*omega_, k)?

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak is offline   Reply With Quote

Old   July 17, 2007, 19:35
Default You mean fvm::Sp(Cmu*omega_,k_
  #5
Member
 
Doug Hunsaker
Join Date: Mar 2009
Location: Logan, UT
Posts: 63
Rep Power: 17
doug is on a distinguished road
You mean fvm::Sp(Cmu*omega_,k_) right? I tried that too and it gives the same error. This is very similar to the code that kOmegaSST.C uses in its correct() function. So, I'm not sure what is causing the error. Any other ideas? Is there a way to print statements to the screen so I can track down which line it is aborting on?

Thanks again.
doug is offline   Reply With Quote

Old   July 18, 2007, 04:02
Default Hi Doug, that correction is w
  #6
Member
 
cosimo bianchini
Join Date: Mar 2009
Location: Florence, Tuscany, Italy
Posts: 88
Rep Power: 17
cosimobianchini is on a distinguished road
Send a message via Skype™ to cosimobianchini
Hi Doug,
that correction is what you need to avoid the error you are referring.
I mean: fvm::Sp(Cmu*omega_,k_).

And you are right, this is a way you can add printouts:
Info << "Solving for k_" << endl;

Are you sure you manage to correctly compile the update version of your turbulence model?
Don't know what else could be.
Good luck,
Cosimo
__________________
Cosimo Bianchini

Ergon Research s.r.l.
Via Panciatichi, 92
50127 Florence - ITALY
Tel: +39 055 0763716
Mob: +39 320 9460153
e-mail: cosimo.bianchini@ergonresearch.it
URL: www.ergonresearch.it
cosimobianchini is offline   Reply With Quote

Old   July 18, 2007, 04:09
Default Well Doug, you've got a proble
  #7
Senior Member
 
Hrvoje Jasak
Join Date: Mar 2009
Location: London, England
Posts: 1,907
Rep Power: 33
hjasak will become famous soon enough
Well Doug, you've got a problem - I am not guessing what's wrong: I actually know for a fact (been writing this code since 1993). The solution is fvm::Sp(Cmu*omega_,k_). Check the file, check the compilation, check that you are running what you think you are running etc.

Hrv
__________________
Hrvoje Jasak
Providing commercial FOAM/OpenFOAM and CFD Consulting: http://wikki.co.uk
hjasak 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
KOmega Turbulence model from wwwopenFOAMWikinet philippose OpenFOAM Running, Solving & CFD 30 August 4, 2010 11:26
Has anyone tried a delta form of pressure equation pressurecorrection equation with OpenFOAM sek OpenFOAM Running, Solving & CFD 2 July 24, 2007 08:53
Komega turbulence model jasonb OpenFOAM Running, Solving & CFD 6 August 29, 2006 09:46
KEpsilon and KOmega larry OpenFOAM Running, Solving & CFD 3 June 29, 2006 02:38
Komega turbulent viscosity model guggi OpenFOAM Running, Solving & CFD 3 May 18, 2006 21:07


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