Implementing Radiation Model into buoyantBoussinesqPisoFoam compiling error
I am trying to implement a radiation model into the existing buoyantBoussinesqPisoFoam solver. I have just recently started to work with OpenFOAM and this is the first time for me to try to build my own solver; hence please excuse some beginner mistakes...
I copied the directory "OpenFOAM/OpenFOAM-1.6/applications/solvers/heatTransfer/buoyantBoussinesqPisoFoam" to "OpenFOAM/fhampp-1.6/applications/solvers/" and renamed the directory and accordingly the .C file to "buoyantBoussinesqPisoRadiationFoam". Then I changed the files "Make/files" and "Make/options" as follows.
EXE = $FOAM_USER_SOLVERS/buoyantBoussinesqPisoRadiationFoam
EXE_INC = \
EXE_LIBS = \
I also copied the readTransportProperties.H file from the directory "OpenFOAM/OpenFOAM-1.6/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam" into my directory
singlePhaseTransportModel laminarTransport(U, phi);
// Thermal expansion coefficient [1/K]
// Reference temperature [K]
// Laminar Prandtl number
// Turbulent Prandtl number
Then I modified my .C file corresponding to the buoyantSimpleRadiationFoam.C as follows (red text is added)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv)
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
Info<< "Time = " << runTime.timeName() << nl << endl;
// --- PISO loop
for (int corr=0; corr<nCorr; corr++)
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
Info<< "End\n" << endl;
I also copied hEqn.H from the solver "buoyantPisoFoam" and modified it according to "buoyantSimpleRadiationFoam" as follows.
+ fvm::div(phi, h)
- fvm::laplacian(turbulence->alphaEff(), h)
Now things starting to get complicated, at least with my programming knowledge.
This is the compiling error:
Making dependency list for source file buoyantBoussinesqPisoRadiationFoam.C
SOURCE=buoyantBoussinesqPisoRadiationFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40 -IOAM_SOLVERS/heatTransfer/buoyantBoussinesqSimpleFoam -I/home/fhampp/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/cfdTools -I/home/fhampp/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude -I/home/fhampp/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/basic/lnInclude -I/home/fhampp/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/radiation/lnInclude -I/home/fhampp/OpenFOAM/OpenFOAM-1.6/src/turbulenceModels -I/home/fhampp/OpenFOAM/OpenFOAM-1.6/src/turbulenceModels/incompressible/RAS/lnInclude -I/home/fhampp/OpenFOAM/OpenFOAM-1.6/src/transportModels -I/home/fhampp/OpenFOAM/OpenFOAM-1.6/src/transportModels/incompressible/singlePhaseTransportModel -IlnInclude -I. -I/home/fhampp/OpenFOAM/OpenFOAM-1.6/src/OpenFOAM/lnInclude -I/home/fhampp/OpenFOAM/OpenFOAM-1.6/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/buoyantBoussinesqPisoRadiationFoam.o
In file included from buoyantBoussinesqPisoRadiationFoam.C:65:
/home/fhampp/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/radiation/lnInclude/createRadiationModel.H: In function ‘int main(int, char**)’:
/home/fhampp/OpenFOAM/OpenFOAM-1.6/src/thermophysicalModels/radiation/lnInclude/createRadiationModel.H:3: error: ‘thermo’ was not declared in this scope
buoyantBoussinesqPisoRadiationFoam.C:85: error: ‘rho’ was not declared in this scope
In file included from buoyantBoussinesqPisoRadiationFoam.C:88:
hEqn.H:4: error: ‘h’ was not declared in this scope
hEqn.H:6: error: ‘class Foam::incompressible::RASModel’ has no member named ‘alphaEff’
hEqn.H:8: error: ‘DpDt’ was not declared in this scope
/home/fhampp/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H:11: warning: unused variable ‘transonic’
/home/fhampp/OpenFOAM/OpenFOAM-1.6/src/finiteVolume/lnInclude/readPISOControls.H:14: warning: unused variable ‘nOuterCorr’
make: *** [Make/linux64GccDPOpt/buoyantBoussinesqPisoRadiationFoam.o] Error 1
Here my questions:
1st:do I have to solve the enthalpy or only if I have compressible flow?
2nd: as far as I understand the first error, I have to declare "thermo" before I use "createRadiationModel.H" but I have no idea where.
3rd:I guess similar problem with hEqn.H
4th: Is it even possible to combine those two models in a relatively easy way or do I have to start from scratch writing a new solver?
5th: Can you recommend any good programming tutorials for OpenFOAM?
I appreciate any help and if you need any further details, please let me know.
Thanks a lot in advance,
best regards, Fabian
|All times are GMT -4. The time now is 10:28.|