|
[Sponsors] |
February 12, 2018, 14:30 |
Keyword div is undefined in dictionary
|
#1 | |
New Member
Joanne
Join Date: Aug 2017
Location: Ireland
Posts: 6
Rep Power: 9 |
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) ); Code:
volScalarField rhoE = A * B; However, whenI run the solver, it states: Quote:
If anyone has any advice, I'd be truly grateful. Kind regards |
||
February 13, 2018, 03:58 |
|
#2 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
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. |
|
February 13, 2018, 04:42 |
|
#3 | |
New Member
Joanne
Join Date: Aug 2017
Location: Ireland
Posts: 6
Rep Power: 9 |
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:
I'm not exactly sure how to deal with this. Kind regards, Joanne |
||
February 15, 2018, 10:31 |
|
#4 |
Senior Member
Robert
Join Date: May 2015
Location: Bremen, GER
Posts: 292
Rep Power: 12 |
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.
|
|
February 15, 2018, 11:36 |
|
#5 |
Senior Member
Anton Kidess
Join Date: May 2009
Location: Germany
Posts: 1,377
Rep Power: 30 |
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.
__________________
*On twitter @akidTwit *Spend as much time formulating your questions as you expect people to spend on their answer. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
LEMOS InflowGenerator | r_gordon | OpenFOAM Running, Solving & CFD | 103 | December 18, 2018 01:58 |
OpenFOAM 1.6-ext git installation on Ubuntu 11.10 x64 | Attesz | OpenFOAM Installation | 45 | January 13, 2012 13:38 |
OpenFOAM on MinGW crosscompiler hosted on Linux | allenzhao | OpenFOAM Installation | 127 | January 30, 2009 20:08 |
Problem with rhoSimpleFoam | matteo_gautero | OpenFOAM Running, Solving & CFD | 0 | February 28, 2008 07:51 |
G95 + CGNS | Bruno | Main CFD Forum | 1 | January 30, 2007 01:34 |