CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

How to add Radiation to existing buoyantBoussinesqSimpleFoam solver

Register Blogs Members List Search Today's Posts Mark Forums Read

Like Tree4Likes
  • 3 Post By hanness
  • 1 Post By dzi

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 13, 2013, 11:30
Default How to add Radiation to existing buoyantBoussinesqSimpleFoam solver
  #1
New Member
 
Masoud Ami
Join Date: Sep 2013
Posts: 15
Rep Power: 12
MasAmi is on a distinguished road
Hello All
Hope you are fine and happy.
I have made a case based on buoyantBoussinesqSimpleFoam solver (which as you know is an incompressible one) and now I want to add Radiation to this case. For this purpose, I used buoyantSimpleRadiationFoam solver in order to make a new solver again based on buoyantBoussinesqSimpleFoam. I tried to add any part of buoyantSimpleRadiationFoam that doesn't exist in my new solver. These are as follows (red lines):

mybuoyantBoussinesqRadiationSimpleFoam.C file:

#include "fvCFD.H"
#include "singlePhaseTransportModel.H"
#include "basicPsiThermo.H" //I know that it's for compressible analysis.
#include "RASModel.H"
#include "simpleControl.H"
#include "radiationModel.H"
#include "fixedGradientFvPatchFields.H"

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

int main(int argc, char *argv[])
{
#include "setRootCase.H"
#include "createTime.H"
#include "createMesh.H"
#include "readGravitationalAcceleration.H"
#include "createFields.H"
#include "createRadiationModel.H"
#include "initContinuityErrs.H"
.
.
.
Info<< "\nStarting time loop\n" << endl;

while (simple.loop())
{
Info<< "Time = " << runTime.timeName() << nl << endl;

// Pressure-velocity SIMPLE corrector
{
#include "UEqn.H"
#include "TEqn.H"
#include "pEqn.H"
#include "hEqn.H"
}

turbulence->correct();

runTime.write();

Make/files :
mybuoyantBoussinesqRadiationSimpleFoam.C

EXE = $(FOAM_USER_APPBIN)/mybuoyantBoussinesqRadiationSimpleFoam

Make/options :
EXE_INC = \
-I../buoyantBoussinesqSimpleFoam \
-I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
-I$(LIB_SRC)/thermophysicalModels/radiationModels/lnInclude \

-I$(LIB_SRC)/finiteVolume/lnInclude \
-I$(LIB_SRC)/finiteVolume/cfdTools \
-I$(LIB_SRC)/turbulenceModels \
-I$(LIB_SRC)/turbulenceModels/incompressible/RAS/lnInclude \
-I$(LIB_SRC)/transportModels \
-I$(LIB_SRC)/transportModels/incompressible/singlePhaseTransportModel

EXE_LIBS = \
-lbasicThermophysicalModels \
-lspecie \
-lradiationModels \

-lfiniteVolume \
-lmeshTools \
-lincompressibleTurbulenceModel \
-lincompressibleRASModels \
-lincompressibleTransportModels

hEqn.H
{
fvScalarMatrix hEqn
(
fvm::div(phi, h)
- fvm::Sp(fvc::div(phi), h)
- fvm::laplacian(turbulence->alphaEff(), h)
==
- fvc::div(phi, 0.5*magSqr(U), "div(phi,K)")
+ radiation->Sh(thermo)
);

hEqn.relax();

hEqn.solve();

thermo.correct();

radiation->correct();
}

After I compiled my new solver I encountered these errors:

P { margin-bottom: 0.08in; } In file included from mybuoyantBoussinesqRadiationSimpleFoam.C:66:0:
/opt/openfoam211/src/thermophysicalModels/radiationModels/lnInclude/createRadiationModel.H: In function ‘int main(int, char**)’:
/opt/openfoam211/src/thermophysicalModels/radiationModels/lnInclude/createRadiationModel.H:3:40: error: ‘thermo’ was not declared in this scope
In file included from mybuoyantBoussinesqRadiationSimpleFoam.C:85:0:
hEqn.H:4:23: error: ‘h’ was not declared in this scope
hEqn.H:4:23: note: suggested alternative:
/opt/openfoam211/src/OpenFOAM/lnInclude/fundamentalConstants.H:52:36: note: ‘Foam::constant::universal::h’
hEqn.H:6:36: error: ‘class Foam::incompressible::RASModel’ has no member named ‘alphaEff’
make: *** [Make/linuxGccDPOpt/mybuoyantBoussinesqRadiationSimpleFoam.o] Error 1

My questions are :
1. What are these errors? I couldn't understand them.
2. I have used a compressible based solver for updating an incompressible solver in order to make a new solver. What are the things I have to change? Where and how can I omit the compressibilty related parts without making a problem?
3. Generaly what is the best way for adding Radiation to my new solver?
4. What paremeters should I bring to my case after comiling my solver succesfully?

I have actually followed a thread here started by Fabian and also I have read the Chalmers university "Radiation Heat Transfer in OpenFOAM" note but I couldn't find any solutions.
I would be grateful if you please tell me the steps I should follow.
Thank you all very much,
Best Regards,
Mas
MasAmi is offline   Reply With Quote

Old   September 19, 2013, 05:01
Default
  #2
Senior Member
 
Join Date: Aug 2013
Posts: 407
Rep Power: 15
Antimony is on a distinguished road
Hi,

I am just curious why you would want to do it that way? I suspect you will run into a whole lot of errors as you have. Most of it, if I am not mistaken, deal with the thermodynamic relationship that the solver has to use for the energy equation.

Have you considered factoring radiation as a heat flux instead (define a heat flux in T file)? That is generally considered an easier way to deal with radiation than using the full radiation solver.

If you really need the radiation model and solver, my suggestion would be to go compressible all the way and use the buoyantSimpleRadiationFoam solver.

Hope this helps.
Antimony is offline   Reply With Quote

Old   September 20, 2013, 09:07
Default
  #3
Member
 
hannes
Join Date: Mar 2013
Posts: 47
Rep Power: 13
hanness is on a distinguished road
Hi Masoud,

As far as I understand the simples approach would be to update to OF 2.2.1 where the radiation is included in all buoyancy-solvers. There is no differentiation between the solvers (buoyantSimpleRadiationFoam does not any longer exist). You just have to specify in constant/radiationProperties whether you want to use it or not.

Hannes
hanness is offline   Reply With Quote

Old   September 25, 2013, 03:43
Default
  #4
Member
 
hannes
Join Date: Mar 2013
Posts: 47
Rep Power: 13
hanness is on a distinguished road
Hi Masoud,

my previous post was probably a little bit too fast, I've been using the buoyantSimpleFoam, buoyantPimpleFoam and buoyantBoussinesqPimpleFoam solvers of the current release and radiation is included in all of them (but it was not in the 2.1 release). Thus, I think it is actually a missing feature which should be included in future releases (see also a post which I started with exactly this question http://www.cfd-online.com/Forums/openfoam-bugs/123927-radiation-missing-buoyantboussinesqsimplefoam.html). However, concerning your approach to include radiation yourself I would suggest the following (although I'm not an expert on this):
In the Boussinesq-solver family the energy equation is solved in TEqn, so there is no need for an hEqn (compare to buoyantBoussinesqPimpleFoam). In this file the reference to the radiation is missing. So you should include it here, it should look like this:
Code:
    fvScalarMatrix TEqn
    (
        fvm::div(phi, T)
      - fvm::laplacian(alphaEff, T)
     ==
        radiation->ST(rhoCoRef, T)
      + fvOptions(T)
    );
I think the #include radiationModel.h in your myBuoyantBoussinesqSimpleFoam.C is correct however, you should check with the respective Pimple-solver to see whether anything else is missing.

Hope this reply is a little bit more helpful then the previous.

Hannes
MasAmi, vs1 and Ramzy1990 like this.
hanness is offline   Reply With Quote

Old   January 16, 2014, 07:17
Default related radiation question in another thread
  #5
dzi
Member
 
Join Date: Nov 2011
Location: Berlin
Posts: 31
Rep Power: 14
dzi is on a distinguished road
Hello,
fyi i put a related radiation question to another thread
http://www.cfd-online.com/Forums/ope...blem-5.html#99
thanks dirk
Ramzy1990 likes this.
dzi is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple radiation validation problem Logan Page OpenFOAM Running, Solving & CFD 20 June 15, 2022 04:20
How to add a wall momentum source to a solver boeleman OpenFOAM Programming & Development 1 February 6, 2013 20:32
Modeling both radiation and convection on surfaces - Ansys Transient Thermal R13 s.mishra ANSYS 0 March 31, 2012 05:12
Getting too many iterations by velocity solving (aborting). Changing U - Solver? suitup OpenFOAM Running, Solving & CFD 0 January 20, 2010 08:45
Add user define monitor in CFX Solver Zaidun CFX 0 April 17, 2006 15:57


All times are GMT -4. The time now is 22:28.