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

Undefined keyword for divergence

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 29, 2014, 16:53
Default Undefined keyword for divergence
  #1
Member
 
Parisa
Join Date: Feb 2013
Posts: 51
Rep Power: 13
Parisa_Khiabani is on a distinguished road
Hello everyone,
The TEqn.H in my solver is as below:

surfaceScalarField kappaf = twoPhaseProperties->kappaf();

fvScalarMatrix TEqn
(
fvm::ddt(rhoCp, T)
+ fvm::div(rhoPhiCpf, T)
- fvm::laplacian(kappaf, T)
);

TEqn.solve();

in system/fvSchemes, I defined:
div (rhophiCpf,T) Gauss upwind;
However, after one iteration, I get a fatal error as: keyword div(rho*phi*Cpf,T) is undefined in dictionary.
I also change the initial form of div (rhophiCpf,T) to div(rho*phi*Cpf,T), but the same error happened. That's weird because I did define the divergence.
I really appreciate if you guys can help me.

Best,
Parisa
Parisa_Khiabani is offline   Reply With Quote

Old   September 30, 2014, 03:53
Default
  #2
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 339
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
Use

Code:
 fvm::div(rhoPhiCpf, T, "div(rhoPhiCpf,T)")

in your code. This way you tell OpenFOAM - via the third argument - specifically what to look for in fvSchemes.

If you omit the string, then OpenFOAM creates an expression based on the operations and variables involved. If, you specify the expression, then OpenFOAM will look for exactly this expression.

If you then still have trouble, the error lies elsewhere.
GerhardHolzinger is offline   Reply With Quote

Old   September 30, 2014, 07:57
Default
  #3
Member
 
Parisa
Join Date: Feb 2013
Posts: 51
Rep Power: 13
Parisa_Khiabani is on a distinguished road
Dear Gerhard,
Thanks a lot for your professional help. Now, the issue has been solved by your assistance.

Best,
Parisa

Quote:
Originally Posted by GerhardHolzinger View Post
Use

Code:
 fvm::div(rhoPhiCpf, T, "div(rhoPhiCpf,T)")

in your code. This way you tell OpenFOAM - via the third argument - specifically what to look for in fvSchemes.

If you omit the string, then OpenFOAM creates an expression based on the operations and variables involved. If, you specify the expression, then OpenFOAM will look for exactly this expression.

If you then still have trouble, the error lies elsewhere.
Parisa_Khiabani 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
Second Derivative Zero - Boundary Condition fu-ki-pa OpenFOAM 11 March 27, 2021 04:28
OpenFOAM 1.6-ext git installation on Ubuntu 11.10 x64 Attesz OpenFOAM Installation 45 January 13, 2012 12:38
Error with Wmake skabilan OpenFOAM Installation 3 July 28, 2009 00:35
OpenFOAM on MinGW crosscompiler hosted on Linux allenzhao OpenFOAM Installation 127 January 30, 2009 19:08
G95 + CGNS Bruno Main CFD Forum 1 January 30, 2007 00:34


All times are GMT -4. The time now is 04:23.