CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Making Openfoam radiation solver (https://www.cfd-online.com/Forums/openfoam-solving/196991-making-openfoam-radiation-solver.html)

kane December 24, 2017 02:01

Only radiation validation problem
 
1 Attachment(s)
HI all
I am trying to make only radiation solver, so far with little success.
Here are the codes.

1. radiation.C
Code:

\*---------------------------------------------------------------------------*/

#include "fvCFD.H"
#include "radiationModel.H"
#include "simpleControl.H"
#include "fvOptions.H"

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

int main(int argc, char *argv[])
{
    #include "setRootCase.H"
    #include "createTime.H"
    #include "createMesh.H"
    #include "createFvOptions.H"
    #include "initContinuityErrs.H"
    #include "createControl.H"


        Info<< "Reading Temperature field\n" << endl;
        volScalarField T
        (
                IOobject
                (
                        "T",
                        runTime.timeName(),
                        mesh,
                        IOobject::MUST_READ,
                        IOobject::AUTO_WRITE
                ),
        mesh
        );

        autoPtr<radiation::radiationModel> radiation
        (
                radiation::radiationModel::New(T)
        );


    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

    Info<< "\nStarting time loop\n" << endl;

    while (simple.loop())
    {
        Info<< "Time = " << runTime.timeName() << nl << endl;
        {
                radiation->correct();
        }

        runTime.write();

        Info<< "ExecutionTime = " << runTime.elapsedCpuTime() << " s"
            << "  ClockTime = " << runTime.elapsedClockTime() << " s"
            << nl << endl;
    }

    Info<< "End\n" << endl;

    return 0;
}

2. Make/files

Code:

radiationFoam.C

EXE = $(FOAM_USER_APPBIN)/radiationFoam

3. Make/options
Code:

EXE_INC = \
    -I$(LIB_SRC)/finiteVolume/lnInclude \
    -I$(LIB_SRC)/sampling/lnInclude \
    -I$(LIB_SRC)/meshTools/lnInclude \
    -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
    -I$(LIB_SRC)/thermophysicalModels/radiation/lnInclude \

EXE_LIBS = \
    -lfiniteVolume \
    -lfvOptions \
    -lsampling \
    -lmeshTools \
    -lfluidThermophysicalModels \
    -lspecie \
    -lradiationModels \
    -lmeshTools

Also I'm trying to solve a simple radiation case with radiation solver.
I have tried Fvdom radiation model and finally I want to know heat flux on walls.

I have attached the following case named Enclosure.

Problem :
1. I don't know if only radiation solver is correct. So plz tell me errors or bugs

2. I want to know heat flux on walls. As a result of paraview program, I think 'qin' means 'heat flux on walls'. Is it correct?

3. After running this case with paraview, I checked that qin of front and back walls is different from other walls. Why it happens ??

I'm very confused with only radiation solver and case.
Plz help me !!

Happly christmas

jaydeep February 3, 2018 19:25

Hi Kane,

If you want to solve radiation only -- I would recommend using any of the heat transfer solvers. For e.g. you can pick up buoyantSimpleFoam, and turn "FrozenFlow" on in fvSolution. It will stop mass momentum equations and will only solve energy.

p.s. I used the same approach with chtMultiRegionSimpleFoam


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