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

Keyword div is undefined in dictionary

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By akidess

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 12, 2018, 13:30
Default Keyword div is undefined in dictionary
  #1
New Member
 
Joanne
Join Date: Aug 2017
Location: Ireland
Posts: 6
Rep Power: 8
Joanne is on a distinguished road
I apologise in advance if this has been asked already.

I am building a custom solver based in simpleFoam where I solve a continuity equation along the lines of:

Code:
    fvScalarMatrix rhoEEqn
    (
        fvm::ddt(rhoE)
        - fvc::laplacian(sigma, phiE)
        ==
        - fvc::div(phi, rhoE)
    );
Where rhoE is defined elsewhere in the solver code as:
Code:
volScalarField rhoE = A * B;
Where A and B are calculated, temperature dependent values. This all compiles fine and I have div(phi,rhoE) defined in my fvSchemes and fvSolutions.

However, whenI run the solver, it states:
Quote:
--> FOAM FATAL IO ERROR:
keyword div(phi,(q*(I|((A*pow((((8*k)*T)|(p*m)),0.5))*q))) is undefined in dictionary "/home/OpenFOAM/user/run/test/system/fvSchemes.divSchemes"
so the error brings up rhoE expressed as its component parts, rather than rhoE itself which is defined in createFields and also in fvSchemes and fvSolutions but the case won't run.

If anyone has any advice, I'd be truly grateful.

Kind regards
Joanne is offline   Reply With Quote

Old   February 13, 2018, 02:58
Default
  #2
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29
akidess will become famous soon enough
You need to tell OpenFOAM how to discretize your div-operator. RTM, and understand the fvSchemes file.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess is offline   Reply With Quote

Old   February 13, 2018, 03:42
Default
  #3
New Member
 
Joanne
Join Date: Aug 2017
Location: Ireland
Posts: 6
Rep Power: 8
Joanne is on a distinguished road
Hi Anton,

Thank you for your fast response! I think you might have misunderstood my issue or perhaps I am misunderstanding your response! I apologize!

In my fvSchemes, my div(phi, rhoE) is defined with a discretization scheme.

However, when I run the solver, the error shows rhoE to be made of all it's constituent parts. And that these constituent parts are not defined in fvSchemes, despite div(phi,rhoE) being defined.

I can use the "default ___some_discretization_scheme___" to correct the fvSchemes file, but then the same error shows under fvSolutions>solvers.

Quote:
keyword q*(I|((A*pow((((8*k)*T)|(p*m)),0.5))*q) is undefined in dictionary /home/OpenFOAM/user/run/test/system/fvSolution.solvers"
And here again, a solver type is defined for rhoE, but again rhoE appears as it's total constituent parts.

I'm not exactly sure how to deal with this.

Kind regards,
Joanne
Joanne is offline   Reply With Quote

Old   February 15, 2018, 09:31
Default
  #4
Senior Member
 
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 11
RobertHB is on a distinguished road
Its a crude workaround, but your problem might be fixed by replacing "rhoE" with "q*(I|((A*pow((((8*k)*T)|(p*m)),0.5))*q)" whenever OpenFOAM complains.
RobertHB is offline   Reply With Quote

Old   February 15, 2018, 10:36
Default
  #5
Senior Member
 
akidess's Avatar
 
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 29
akidess will become famous soon enough
You can add e.g. "div(phi,(q*(I|((A*pow((((8*k)*T)|(p*m)),0.5))*q)) ) Gauss upwind" to your fvSchemes and be done with it. You expect to see div(phi, rhoE), but you never explicitly created rhoE, since you constructed it implicity by A*B. If you had defined an IOobject with a name the error message would be different.
salomama likes this.
__________________
*On twitter @akidTwit
*Spend as much time formulating your questions as you expect people to spend on their answer.
akidess 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
LEMOS InflowGenerator r_gordon OpenFOAM Running, Solving & CFD 103 December 18, 2018 00:58
OpenFOAM 1.6-ext git installation on Ubuntu 11.10 x64 Attesz OpenFOAM Installation 45 January 13, 2012 12:38
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 19:08
Problem with rhoSimpleFoam matteo_gautero OpenFOAM Running, Solving & CFD 0 February 28, 2008 06:51
G95 + CGNS Bruno Main CFD Forum 1 January 30, 2007 00:34


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