CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (http://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Enable LESModel in a foam solver (http://www.cfd-online.com/Forums/openfoam-pre-processing/114366-enable-lesmodel-foam-solver.html)

amir.a.aliabadi March 9, 2013 19:51

Enable LESModel in a foam solver
 
Hello There,

I am new to OpenFoam and interested to use LESModel with buoyantBoussinesqSimpleFoam solver. The standard solver is only equipped with RASModel. Can you advise if it is possible to enable LESModel with this solver? I appreciate if you tell me the steps that I need to take.

I have a rough idea that a few files in the opt/openfoam211 directory have to change, and there are some commands involved. For example I may have to #include "LESModel.H" in buoyantBoussinesqSimpleFoam.C under opt/openfoam211/applications/solvers/heatTransfer/buoyantBoussinesqSimpleFoam. But this is probably not the only step!

Many Thanks

Lieven March 10, 2013 05:46

Hey Amir,

This wouldn't make sense. The simpleFoam solver is a steady state solver (not time derivative in its equations) while LES requires by definition a transient solver.

So, if you want to run a simulation with LES, you should switch to pisoFoam or pimpleFoam. If you are not interested in the transient behaviour but only in the averaged flow field, you can consider using functionObjects.

Cheers,

L

amir.a.aliabadi March 10, 2013 14:11

Hi and Thank You Lieven,

That is a good point. I think I have to start with modifying the buoyantBoussinesqPimpleFoam and create a new application that substitutes RASModel with LESModel. I am just getting a handle of creating a new application and linking libraries using section "3.2 Compiling applications and libraries" in the OpenFoam manual.

Cheers,
aaa

Lieven March 10, 2013 16:05

Well, that's the nice thing of the piso and pimple solvers. The turbulence modelling is generic meaning that both RANS and LES models can be chosen. Just have a look at the tutorials of these solvers on how to do this exactly (you need to set the proper constant/...Dict dictionaries. If any questions arise, feel free to post them.

Cheers,

Lieven

amir.a.aliabadi March 10, 2013 18:18

Thank You Lieven,

It is finally working! I started with channel395 (1 eqn LES) and hotRoom (k-e RAS) and combined the functionalities of both tutorials to be able to create a solver for natural convection problems. A tricky part was to include all proper addresses for header files (*.H) under make/files make/options. The System files, 0 files, and Constant files also needed to be adjusted. I have called this solver: buoyantBoussinesqPimpleLESFoam. If anyone is interested please let me know.

Regards,
aaa

palmerlee December 24, 2013 07:43

Quote:

Originally Posted by amir.a.aliabadi (Post 412987)
Thank You Lieven,

It is finally working! I started with channel395 (1 eqn LES) and hotRoom (k-e RAS) and combined the functionalities of both tutorials to be able to create a solver for natural convection problems. A tricky part was to include all proper addresses for header files (*.H) under make/files make/options. The System files, 0 files, and Constant files also needed to be adjusted. I have called this solver: buoyantBoussinesqPimpleLESFoam. If anyone is interested please let me know.

Regards,
aaa

Hi, aaa!

I am trying to use buoyantBoussinesqPimpleFoam with LES too. Could you please let me know if your buoyantBoussinesqPimpleLESFoam gives good results in LES simulation? So that I can determine that whether or not the modified buoyantBoussinesqPimpleFoam solver is suitable to my case or other LES simulations.

If the solver is suitable to LES, could you let me know which part of the original buoyantBoussinesqPimpleFoam solver need to be modified besides the Make dir and "RASModel" in createFields file?

Thank you!

palmerlee

palmerlee December 24, 2013 07:44

Quote:

Originally Posted by amir.a.aliabadi (Post 412987)
Thank You Lieven,

It is finally working! I started with channel395 (1 eqn LES) and hotRoom (k-e RAS) and combined the functionalities of both tutorials to be able to create a solver for natural convection problems. A tricky part was to include all proper addresses for header files (*.H) under make/files make/options. The System files, 0 files, and Constant files also needed to be adjusted. I have called this solver: buoyantBoussinesqPimpleLESFoam. If anyone is interested please let me know.

Regards,
aaa

Hi, aaa!

I am trying to use buoyantBoussinesqPimpleFoam with LES too. Could you please let me know if your buoyantBoussinesqPimpleLESFoam gives good results in LES simulation? So that I can determine that whether or not the modified buoyantBoussinesqPimpleFoam solver is suitable to my case or other LES simulations.

If the solver is suitable to LES, could you let me know which part of the original buoyantBoussinesqPimpleFoam solver need to be modified besides the Make dir and "RASModel" in createFields file?

Thank you!

palmerlee

Thangam December 27, 2013 02:23

1 Attachment(s)
Quote:

Originally Posted by amir.a.aliabadi (Post 412987)
Thank You Lieven,

It is finally working! I started with channel395 (1 eqn LES) and hotRoom (k-e RAS) and combined the functionalities of both tutorials to be able to create a solver for natural convection problems. A tricky part was to include all proper addresses for header files (*.H) under make/files make/options. The System files, 0 files, and Constant files also needed to be adjusted. I have called this solver: buoyantBoussinesqPimpleLESFoam. If anyone is interested please let me know.

Regards,
aaa

Hi,

I have tried something similar but I have modified the buoyantBoussinesqPisoFoam for the LES capability and I have managed to compile it but still in the process of evaluating it. I found this link very useful for this modification http://openfoamwiki.net/index.php/Bu...sinesqPisoFoam however, some more changes had to be made pertaining to the calculations of p_rgh. I have attched the solver here I would be pleased to have some feedback from the foamers. Also it would be interesting to compare your solver(with PIMPLE equation) if you could make it available on the forum.

Cheers.

Bernhard December 27, 2013 04:58

Hi Thangham

Some hints and question
1. Make sure your solver compiles, without additional work. For me, readTransportProperties.H was missing. Also, update Make/files: now, you would be overwriting your original buoyantBoussinesqPisoFoam, which is undesirable for people downloading the source.
2. wclean would make the tarbal neat.
3. Also, write the solver to $FOAM_USER_APPBIN.

Some questions
1. Which version of OpenFOAM are you using?
2. Which solver did you start from?
3. What specific changes did you make to p_rgh?

Thangam December 27, 2013 05:48

Quote:

Originally Posted by Bernhard (Post 467824)
Hi Thangham

Some hints and question
1. Make sure your solver compiles, without additional work. For me, readTransportProperties.H was missing. Also, update Make/files: now, you would be overwriting your original buoyantBoussinesqPisoFoam, which is undesirable for people downloading the source.
2. wclean would make the tarbal neat.
3. Also, write the solver to $FOAM_USER_APPBIN.

Some questions
1. Which version of OpenFOAM are you using?
2. Which solver did you start from?
3. What specific changes did you make to p_rgh?



Hi Bernhard,

Thanks for your reply.

1. Make sure your solver compiles, without additional work. For me, readTransportProperties.H was missing. Also, update Make/files: now, you would be overwriting your original buoyantBoussinesqPisoFoam, which is undesirable for people downloading the source. - Yes, the solver compiles without any additional work. I dont understand the significance of readTransportProperties.H.On a quick check most of the solvers in heat transfer dont use this file.(please enlighten)

2. wclean would make the tarbal neat.
- My bad. Would do it.

3. Also, write the solver to $FOAM_USER_APPBIN. - Yes, copied.


Some questions
1. Which version of OpenFOAM are you using?
- version 2.1.x

2. Which solver did you start from? - I started with the buoyantBoussinesqPisoFoam solver which was available in a 1.6.x git repository and followed the instructions on the openfoam wiki site (http://openfoamwiki.net/index.php/Bu...sinesqPisoFoam) to have the LES capability.

3. What specific changes did you make to p_rgh? - Though the code compiled without any warnings, when I tried to run the case with this solver, I got the error :
Code:

--> FOAM FATAL IO ERROR:
keyword laplacian((1|A(U)),p) is undefined in dictionary
"/home/thangam/Documents/LES_dec23/system/fvSchemes::laplacianSchemes"

file: /home/thangam/Documents/LES_dec23/system/fvSchemes::laplacianSchemes from line 48 to line 56.

    From function dictionary::lookupEntry(const word&, bool, bool) const
    in file db/dictionary/dictionary.C at line 400.

FOAM exiting

The solver was reading laplacian((1|A(U)),p) though I had laplacian((1|A(U)),p_rgh). Though I had no clue why this was happening, I tried to edit the pEqn.H to its present form. And with this current form, I believe im solving for p_rgh twice! Im ignorant about where Im going wrong.

Bernhard December 27, 2013 06:50

All of the solvers use readTransportProperties.H ! Check createFields.H, line 47.

Ah, you started from the 1.6 version. Why not from the 2.1 version of buoyantBoussinesqPimpleFoam?
Check http://www.openfoam.org/archive/1.7....ease-notes.php "Modifications to multiphase and buoyant solvers". It explains why p has been replaced by p_rgh.

Thangam December 27, 2013 07:42

Thanks Bernhard. I would give it a try and repost on the outcome!

cheers.

Nitin Minocha April 6, 2016 08:30

buoyantBoussinesqPimpleLESfoam
 
Hello
I am using buoyantBoussinesqPimpleLESfoam for solving natural convection problem. I would like to use nuSgs in place of nut in Teq.H
kappat = turbulence->nut()/Prt;
kappat = turbulence->nuSgs()/Prt;

I tried replacing nut by nuSgs but following error is coming.

TEqn.H: In function ‚int main(int, char**)‚:
TEqn.H:2:26: error: ‚class Foam::incompressible::turbulenceModel‚ has no member named ‚nuSgs‚
/home/usr0203/trainee_t2/openfoam/OpenFOAM-2.2.0/src/finiteVolume/lnInclude/readTimeControls.H:38:8: warning: unused variable ‚maxDeltaT‚ [-Wunused-variable]
make: *** [Make/linux64Gcc46DPOpt/buoyantBoussinesqPimpleLESFoam.o] Error 1


All times are GMT -4. The time now is 10:43.