|
[Sponsors] |
Error: undefined in dictionary ...fvsolution.solvers |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 5, 2017, 23:24 |
Error: undefined in dictionary ...fvsolution.solvers
|
#1 |
New Member
Lieh
Join Date: Mar 2017
Posts: 26
Rep Power: 9 |
Hello
I have coded a new solver based on interFOAM, the new solver gets wmake(ed) fine, no errors. When I want to run a case with the solver I get the error as --> FOAM FATAL IO ERROR: keyword H is undefined in dictionary "/home/Dropbox/OpenFoam/system/fvSolution.solvers" file: /home/Dropbox/OpenFoam/system/fvSolution.solvers from line 22 to line 63. From function const Foam::dictionary& Foam::dictionary::subDict(const Foam::word&) const in file db/dictionary/dictionary.C at line 642. FOAM exiting I am confused since "H" should not appear in my "fvsolution" file, it is just a parameter coded in my solver, so I believe there should not be a requirement for a keyword as H. Can you give me a hint on how to find the problem and resolve the issue? If you want I can even send you the new solver that I have written for your review. Thanks |
|
June 6, 2017, 14:58 |
|
#2 |
New Member
Lieh
Join Date: Mar 2017
Posts: 26
Rep Power: 9 |
Actually now I just define H in the "fvsolutions" similar to say "U" as
Code:
H { solver smoothSolver; smoother symGaussSeidel; tolerance 1e-06; relTol 0; } My surprise is that, why there should be the need for defining H, because H in my solver is not solved actually and it is defined, it is basically a Heaviside function, so no need for specifying solver. Probably I have messed up somewhere and that's why OF considers H as a parameter that needs to be solved, but I cannot find out where I have made this mistake. Any hints helping to find this bug would be appreciated. Thanks |
|
June 6, 2017, 17:28 |
|
#3 |
Member
Lilian Chabannes
Join Date: Apr 2017
Posts: 58
Rep Power: 9 |
Hi,
Far from being an expert , did you set up H in createFields ? How is it coded in the solver.C file ? |
|
June 6, 2017, 22:07 |
|
#4 |
New Member
Lieh
Join Date: Mar 2017
Posts: 26
Rep Power: 9 |
in createfields.H it is as
Code:
Info<< "Reading field H\n" << endl; volScalarField H ( IOobject ( "H", runTime.timeName(), mesh, IOobject::NO_READ, IOobject::AUTO_WRITE ), mesh, dimensionedScalar("H",dimless, 0.0) ); Code:
// update Heaviside function forAll(mesh.cells(),celli) { if(psi[celli] < -epsilon.value()) H[celli] = double(0); else if(epsilon.value() < psi[celli]) H [celli] = double(1); else H[celli] = double(0.75); }; |
|
June 7, 2017, 03:37 |
|
#5 |
Senior Member
|
Hi all,
@akesm And these are the only additions you have made? Is there a possibility that as a result of copy-paste you have another field named H in registry for which you actually solve linear equation? (variable name for the field in your solver could be named differently). |
|
June 7, 2017, 17:54 |
|
#6 |
New Member
Lieh
Join Date: Mar 2017
Posts: 26
Rep Power: 9 |
Thanks for your reply.
But my new solver is based on interFoam, which does not have any field named as H, so I barely think that my introduced parameter H is being mistaken with an already existing field named as H. If it helps I can post, or upload either my solver or the changes I have made! |
|
June 7, 2017, 18:10 |
|
#7 |
Senior Member
|
Well, it YOU, who has strange behaviour of new solver. So it is up to YOU to decide either you are happy with small addition to fvSolution file, or you would like to resolve this problem. Either the thread can be closed, or you post a link to your repository with code, so people can take a look and figure out why OpenFOAM(TM) needs addition to solvers dictionary in fvSolution file (and maybe propose solution).
|
|
June 7, 2017, 18:25 |
|
#8 |
New Member
Lieh
Join Date: Mar 2017
Posts: 26
Rep Power: 9 |
Now when I am looking carefully, at a point of my code I give H to explicit solve in the way below
Code:
MULES::explicitSolve(H, phi, phiH, 1, 0); |
|
Tags |
fvsolutions, openfoam 4.0.0 |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
ill defined primitiveEntry starting at keyword 'value' on line 197 ChangeDictionary | Struggle_Achieve | OpenFOAM Pre-Processing | 2 | December 20, 2017 04:58 |
Including lists in a dictionary. | Divyaprakash | OpenFOAM Programming & Development | 0 | June 18, 2015 07:14 |
New Boundary Condition: Reading Dictionary Problem | Koga | OpenFOAM Programming & Development | 0 | November 26, 2012 06:01 |
Problem with rhoSimpleFoam | matteo_gautero | OpenFOAM Running, Solving & CFD | 0 | February 28, 2008 07:51 |
FoamX error aachenBomb case | Ervin Adorean (Adorean) | OpenFOAM Pre-Processing | 13 | March 7, 2005 04:50 |