CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM Pre-Processing (
-   -   New case (

Constantinos Zervides (Zervides) May 31, 2004 08:25

Dear all, i have a new case t
Dear all, i have a new case that i wish to use in FoamX. when i use runFoamx i can not use the case .I can mesh it from runFoamX but i can not do anything else. The error message i get is:
Exec : FoamXCaseServer /home/mpp03cz/foam/mpp03cz2.2/run/Sheffield/continuumFoam continuumTube70-40-7 -open
Date : May 31 2004
Time : 13:16:04
Host : mpp03cz_linux
PID : 6368
Root : /home/mpp03cz/foam/mpp03cz2.2/run/Sheffield/continuumFoam
Case : continuumTube70-40-7
Nprocs : 1
Caught FoamXError exception in FoamXCaseServer::main(int argc, char **argv) :
FoamXError "Application class entry not found in '/home/mpp03cz/foam/mpp03cz2.2/run/Sheffield/continuumFoam/continuumTube70-40-7/system/controlDict'"
In function "FoamX::ICaseServerImpl::ICaseServerImpl(Orb& orb, const fileName& rootDir, const fileName& caseName, const word& mode, const word& appClass)"
in file "ICaseServerImpl.C" at line 383
Finishing FoamXCaseServer::main(int argc, char **argv)

What do i have to do in order to correct that?
(i can run the case from the terminal (meshing and getting results) but i need to use it in FoamX)

Mattijs Janssens (Mattijs) May 31, 2004 09:23

The controlDict needs to cont
The controlDict needs to contain an entry called 'applicationClass'. Have a look at e.g. $FOAM_TUTORIALS/icoFoam/cavity/system/controlDict.

This is used by FoamX to determine what solver the case is going to be used by h and hence what fields and boundary conditions are needed/allowed.

The application class (e.g. icoFoam) needs to be known by FoamX. Have a look at previous discussions on how to add your own solver as a separate application class to FoamX.


wikstrom October 19, 2005 05:57

Hi, this is not really the th
this is not really the thread to be in, but didn't want to start another one... So:

Wouln't it be possible to modify e.g. the "lookup" members to, given a "runtime swich" generate instead of read a dictionary file/item?

like, "I'm performing a lookup in transportProperties and it's not there. Create it;
OK now it's there and I want to read nu. Insert a template for it (nu nu [0 0 0 0 0 0] 0.0;)."

If so, the creation of a new, code specific case would be extremely simple.

Just a thought, but unfortunately I do not grasp the (extremely nice) lookup funktionality.


mattijs October 20, 2005 05:03

Hi Niklas, no. Dictionar
Hi Niklas,


Dictionaries have no notion how to interpret what is inside them. They just read anything as a list of tokens.

It is the classes on top that read and interpret it.

If I understand correctly you want if you have in your code something like:

dimensionedScalar vis(dimXXX, dict.lookup("nu"));

it to write to the file the dict was read from an entry for nu with the correct syntax and a default value.

This would require you to change all classes that read from dictionary to be able to dump a default entry to the dictionary (or rather the file the dictionary was read from). Could possibly be done but would be a lot of work.

How about you develop FoamX config files together with your code? In that way you'll never have problems generating a default case ;-)

eugene October 20, 2005 08:58

Hi Niklas, Mattijs is right
Hi Niklas,

Mattijs is right, dictionary.lookup() doesnt know what it is looking up, it only reads tokens which are interpreted after the fact.

What you can do, is to add entries to a dictionary with the .add() functions. You can write these to the dictionary file as well (dont remember how though), but it would all have to be done in the top level code.

What I would like is for utilities that use dictionaries to copy these dictionaries from their default locations to the right place if they are not present.

e.g. if I run decomposePar without copying the decomposeParDict dictionary to the system directory, I would like the code to do so and to inform me of the fact before it crashes. This too would have to be done in the top level (or would it?). Wishful thinking until I get a minute of time I can call my own.

wikstrom October 24, 2005 03:34

Hi Eugene and Mattijs, than
Hi Eugene and Mattijs,

thank you for responding! I understan the difficulties... but I'll have a look at the .add() functions. When there's time.

FoamX is a nice tool sometimes, and certainly one should allways keep a FoamX config uptodate with a "new" app. This might however also be "Wishful thinking" as application codes, in my case, tend to be a tad dynamical. I'll try, I will try :-)


All times are GMT -4. The time now is 07:15.