CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM (http://www.cfd-online.com/Forums/openfoam/)
-   -   Compiling buoyantPisoRadiationFoam (http://www.cfd-online.com/Forums/openfoam/72524-compiling-buoyantpisoradiationfoam.html)

maruthamuthu_venkatraman February 9, 2010 04:52

Compiling buoyantPisoRadiationFoam
 
Hello Foamers,
I am quite new to compile the solvers in OpenFoam for new applications. So if there is any flaws in my compilation let me know. I tried to make a copy of BuoyantPisoFoam in my user directory and include radiation for the same.The application is created with two warnings. Give me your comments.

Thanks.

Compilation Message
Making dependency list for source file buoyantPisoFoam.C
SOURCE=buoyantPisoFoam.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasin
g -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRep
ository -ftemplate-depth-40 -I../buoyantPisoFoam -I/usr/local/OpenFOAM/OpenFOAM-
1.6.x/src/thermophysicalModels/basic/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-1.
6.x/src/thermophysicalModels/radiation/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-
1.6.x/src/turbulenceModels/compressible/turbulenceModel -I/usr/local/OpenFOAM/Op
enFOAM-1.6.x/src/finiteVolume/cfdTools -I/usr/local/OpenFOAM/OpenFOAM-1.6.x/src/
finiteVolume/lnInclude -IlnInclude -I. -I/usr/local/OpenFOAM/OpenFOAM-1.6.x/src/
OpenFOAM/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-1.6.x/src/OSspecific/POSIX/lnI
nclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/buoyantPisoFoam.o
/usr/local/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/readPISOControls.H
: In function ‘int main(int, char**)’:
/usr/local/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/readPISOControls.H
:11: warning: unused variable ‘transonic’
/usr/local/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude/readPISOControls.H
:14: warning: unused variable ‘nOuterCorr’
g++ -m64 -Dlinux64 -DWM_DP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parame
ter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-40
-I../buoyantPisoFoam -I/usr/local/OpenFOAM/OpenFOAM-1.6.x/src/thermophysicalMode
ls/basic/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-1.6.x/src/thermophysicalModels
/radiation/lnInclude -I/usr/local/OpenFOAM/OpenFOAM-1.6.x/src/turbulenceModels/c
ompressible/turbulenceModel -I/usr/local/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolum
e/cfdTools -I/usr/local/OpenFOAM/OpenFOAM-1.6.x/src/finiteVolume/lnInclude -IlnI
nclude -I. -I/usr/local/OpenFOAM/OpenFOAM-1.6.x/src/OpenFOAM/lnInclude -I/usr/lo
cal/OpenFOAM/OpenFOAM-1.6.x/src/OSspecific/POSIX/lnInclude -fPIC Make/linux64G
ccDPOpt/buoyantPisoFoam.o -L/usr/local/OpenFOAM/OpenFOAM-1.6.x/lib/linux64GccDPO
pt \
-lmeshTools -lbasicThermophysicalModels -lspecie -lradiation -lcomp
ressibleRASModels -lcompressibleLESModels -lfiniteVolume -lOpenFOAM -liberty -ld
l -lm -o /home/muthu/OpenFOAM/muthu-1.6.x/applications/bin/linux64GccDPOpt/buo
yantPisoRadiationFoam

---------------------------------------------------------------------------------------------------



Changes made
h.Eqn.H
{
fvScalarMatrix hEqn
(
fvm::ddt(rho, h)
+ fvm::div(phi, h)
- fvm::laplacian(turbulence->alphaEff(), h)
==
DpDt
+ radiation->Sh(thermo) // added by me
);
hEqn.relax();
hEqn.solve();
thermo.correct();
radiation->correct();
}

buoyantPisoFoam.C

\*---------------------------------------------------------------------------*/
#include "fvCFD.H"
#include "basicRhoThermo.H"
#include "turbulenceModel.H"
#include "fixedGradientFvPatchFields.H"
#include "radiationModel.H" // added by me
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "createRadiationModel.H" // added by me
#include "initContinuityErrs.H"
#include "readTimeControls.H"
#include "compressibleCourantNo.H"
#include "setInitialDeltaT.H"
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Info<< "\nStarting time loop\n" << endl;
while (runTime.run())
{
#include "readTimeControls.H"
#include "readPISOControls.H"
#include "compressibleCourantNo.H"
#include "setDeltaT.H"
runTime++;
Info<< "Time = " << runTime.timeName() << nl << endl;
#include "rhoEqn.H"
#include "UEqn.H"
#include "hEqn.H"
// --- PISO loop
for (int corr=0; corr<nCorr; corr++)
{
#include "pEqn.H"
}
turbulence->correct();
rho = thermo.rho();
runTime.write();
Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
<< " ClockTime = " << runTime.elapsedClockTime() << " s"
<< nl << endl;
}
Info<< "End\n" << endl;
return 0;
}

// ************************************************** *********************** //
Option file :

EXE_INC = \
-I../buoyantPisoFoam \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \
-I$(LIB_SRC)/turbulenceModels/compressible/turbulenceModel \
-I$(LIB_SRC)/finiteVolume/cfdTools \
-I$(LIB_SRC)/finiteVolume/lnInclude
EXE_LIBS = \
-lmeshTools \
-lbasicThermophysicalModels \
-lspecie \
-lradiation \
-lcompressibleRASModels \
-lcompressibleLESModels \
-lfiniteVolume
//

wyldckat February 9, 2010 07:11

Greetings maruthamuthu_venkatraman,

I remember seeing those two warnings when we build the original version, so it's nothing new there. They just mean that those two variables are defined but never used.

As for the modification, I can't say anything about it, since I don't have experience in merging solvers :(

Best regards,
Bruno Santos

maruthamuthu_venkatraman February 9, 2010 10:46

Thank You!

The solver runs without any problems. However i need to make some more validations before to say anything. I want to check the wallHeatFlux but i dont know how to use that utility in OpenFOAM 1.6.

Regards


All times are GMT -4. The time now is 18:02.