CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Beginners problems (http://www.cfd-online.com/Forums/openfoam-solving/58640-beginners-problems.html)

nadine August 15, 2008 19:04

Concerning your wmake question
 
Concerning your wmake question: the Programmers Guide (or was it the Users Guide?) contains a section about this tool. You find the guides under the Documentation link at the OF homepage.

Basically, you just have to copy the simpleFoam directory from the applications/... sources, apply your changes to simpleFoam.C and within the simpleFoam directory type

wmake .

Take care, it overrides the standard simpleFoam solver unless you change the name of the output file in simpleFoam/Make/options.

NB

serge August 18, 2008 03:39

Thanks for the reply. I've alr
 
Thanks for the reply. I've already read this section of the usersguide. In the mean while I found my error elsewhere, but i'm getting another error now:

/net/home/campbell/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude/createTime.H: In function 'void runtimecalc(Foam::word, Foam::scalar)':
/net/home/campbell/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude/createTime.H:6 : error: 'args' was not declared in this scope
make: *** [Make/linux64GccDPOpt/runtimecalc.o] Error 1

this variable, what is it used for? Doxygen says something (for me a rather difficult book anyway) that it references Foam::exit and Foam::FatalError. how do I declare it? and why should i in the first place? where is it declared in the simpleFoam.c?
I hope my questions are not too silly.

Serge

nadine August 18, 2008 04:31

The main() routine of simpleFo
 
The main() routine of simpleFoam.C begins with these two lines:

# include "setRootCase.H"
# include "createTime.H"

And if you have a look into setRootCase.H, you find your args:

Foam::argList args(argc, argv);

if (!args.checkRootCase())
{
Foam::FatalError.exit();
}

Have a look at the Doxygen documentation of Foam::argList for details.

NB

nadine August 18, 2008 05:17

Either pass the argc and argv
 
Either pass the argc and argv from main to runtimecalc and there include setRootCase.H before you include createTime.H

Or, if you have setRootCase.H in your main, the "Foam::argList args" will be available there. Pass it to runtimecalc.

NB

karbax July 2, 2009 14:06

Drag too high
 
The drag prediction in an airfoil is generally too high for following reason:

A CFD code can't predict the transition from laminar to turbulent regime in
the trailing edge. So the code applies turbulent regime in all domain.


All times are GMT -4. The time now is 16:05.