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

PANS turbulence models

Register Blogs Community New Posts Updated Threads Search

Like Tree22Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   February 6, 2016, 22:45
Default PANS turbulence models
  #1
New Member
 
Helio Villanueva
Join Date: Apr 2013
Location: Brazil
Posts: 14
Rep Power: 13
HelioVillanueva is on a distinguished road
Hi all.

I implemented the Partially-Averaged Navier-Stokes (PANS) methodology in OpenFOAM-3.0.x for the kEpsilon and kOmegaSST turbulence models. I didn't rigorously validate the code, just tested on the pitzDaily tutorial for LES and the results seems to agree well for the mean velocity but with the big advantage in processing time. While the LES tutorial took 1hr and 24 mins, the kEpsilonPANS and kOmegaSSTPANS took aprox 15 mins. Although it's a simple tutorial case, the results are promising. Here is a video comparing the models.

Since the implementation was done using a lot of information available online (credits below), I hope that the validation and improvement of the code could also be done with the community help. For now, there is the need to copy the k and epsilon/omega files in 0 folder and rename to kU and epsilonU/omegaU to run a case. I think it would be nice if don't, but I couldn't manage to initialize the kU and epsilonU/omegaU fields with the NO_READ option in a way that was possible to use the turbulentMixingLenghtFrequencyInlet and turbulentMixingLenghtDissipationRateInlet bcs.

Another thing is the fK value. In the papers some use a constant value or a fK field. The second approach is implemented but it is possible to use a constant fK by specifying a narrow limit in constant/turbulenceProperties. See the case example provided with the code.

Code: here
it should compile just coping the directories to your OF user folder and run the Allmake script.

Hakan Nillson's phd cfd course at Chalmers. Report by Guglielmo Minelli
http://www.tfd.chalmers.se/~hani/kur.../OF_report.pdf

Abdol-Hamid, Girimaji 2005
http://ntrs.nasa.gov/archive/nasa/ca...0050182919.pdf

Lakshmipathy, Girimaji 2006
http://arc.aiaa.org/doi/abs/10.2514/6.2006-119

SUNIL LAKSHMIPATHY PHD Thesis:
http://oaktrust.library.tamu.edu/bit...pdf?sequence=2

About implementing new turbulence models in OF-3.0.x:
http://www.cfd-online.com/Forums/ope...tml#post578372
HelioVillanueva is offline   Reply With Quote

Old   February 13, 2016, 05:43
Default
  #2
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 848
Rep Power: 18
sharonyue is on a distinguished road
Hi Helio,

Good job! Thanks for sharing the code. It will be also interesting to expand this PANS model into two-phase solver.
__________________
My OpenFOAM algorithm website: http://dyfluid.com
By far the largest Chinese CFD-based forum: http://www.cfd-china.com/category/6/openfoam
We provide lots of clusters to Chinese customers, and we are considering to do business overseas: http://dyfluid.com/DMCmodel.html
sharonyue is offline   Reply With Quote

Old   February 13, 2016, 10:11
Default
  #3
New Member
 
Helio Villanueva
Join Date: Apr 2013
Location: Brazil
Posts: 14
Rep Power: 13
HelioVillanueva is on a distinguished road
I haven't worked with multiphase problems yet so little experience in that field but I think the code is actually capable of handling such problems. Since I used as a start point the standard implementations of OF-3.0.x, kU, epsilonU and omegaU equations have the alpha variable in the operators, for example:

Quote:
// Unresolved Turbulent kinetic energy equation
tmp<fvScalarMatrix> kUEqn
(
fvm::ddt(alpha, rho, kU_)
+ fvm::div(alphaRhoPhi, kU_)
- fvm::laplacian(alpha*rho*DkUEff(), kU_)
==
alpha*rho*G
- fvm::SuSp((2.0/3.0)*alpha*rho*divU, kU_)
- fvm::Sp(alpha*rho*epsilonU_/kU_, kU_)
+ kSource()
);
So I think the VoF method should work well. Again, this is not a validation (far from it) but the attached case example adapted from tutorial
Code:
OpenFOAM-3.0.x/tutorials/multiphase/interFoam/les/nozzleFlow2D
seems to run ok with similar results from LES.
Attached Files
File Type: gz nozzleFlow2DPANS.tar.gz (4.0 KB, 52 views)
HelioVillanueva is offline   Reply With Quote

Old   February 13, 2016, 10:51
Default
  #4
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 848
Rep Power: 18
sharonyue is on a distinguished road
Hi Helio,

Great!

In my research area (solving PBM), epsilon should be known in order to solve PBM. But these value can not be acquired from LES, at least from the code directly! It will be interesting to combine PANS model with PBM. Now there is only OpenFOAM-2.2.x and OpenFOAM-dev in my computer. I'll try it in the future when I install OpenFOAM-3.0.x...

BTW, do you have interest to try it with twoPhaseEulerFoam? There is a 2Dmixer test case in the tutorial. Thanks!

Best,
__________________
My OpenFOAM algorithm website: http://dyfluid.com
By far the largest Chinese CFD-based forum: http://www.cfd-china.com/category/6/openfoam
We provide lots of clusters to Chinese customers, and we are considering to do business overseas: http://dyfluid.com/DMCmodel.html
sharonyue is offline   Reply With Quote

Old   February 15, 2016, 21:02
Default
  #5
New Member
 
Helio Villanueva
Join Date: Apr 2013
Location: Brazil
Posts: 14
Rep Power: 13
HelioVillanueva is on a distinguished road
Hi Dongyue Li,

OpenFOAM-dev and 3.0.x actually have (at least almost) the same file structure with respect turbulence modeling, so the code should work on OF-dev as well.

About the multiphase solvers, I see two directions: one simpler than the other.

The twoPhaseEulerFoam is very specific since it has its own turbulence models as we can see in file phaseCompressibleTurbulenceModels.C in
Code:
$FOAM_APP/solvers/multiphase/twoPhaseEulerFoam/phaseCompressibleTurbulenceModels/phaseCompressibleTurbulenceModels.C
In this file the turbulence models are made available to the run-time selection table. So in order to make the PANS code available to this solver and don't mess with the OF installation, you'll have to make your own copy of the solver in your user dir, add the turbulence model in phaseCompressibleTurbulenceModels.C in a similar way as the models already there, add the path to the PANS code in file
Code:
YOURtwoPhaseEulerFoam/phaseCompressibleTurbulenceModels/Make/options
and compile the new solver after compiling the PANS code. I didn't try it so maybe there are other things to do.

The easy alternative would be if you could use multiphaseEulerFoam instead. This solver uses the general turbulence models, so only compiling the PANS code would work. If you happen to test the PANS code in any multiphase solver, it would be nice if you share your experience.

Best regards,
Helio
HelioVillanueva is offline   Reply With Quote

Old   February 20, 2016, 05:44
Default
  #6
Senior Member
 
Dongyue Li
Join Date: Jun 2012
Location: Beijing, China
Posts: 848
Rep Power: 18
sharonyue is on a distinguished road
Hi Helio,

Thank you for your information. I just came back from London. I will test it next week and give u a feedback.

Best,
__________________
My OpenFOAM algorithm website: http://dyfluid.com
By far the largest Chinese CFD-based forum: http://www.cfd-china.com/category/6/openfoam
We provide lots of clusters to Chinese customers, and we are considering to do business overseas: http://dyfluid.com/DMCmodel.html
sharonyue is offline   Reply With Quote

Old   March 5, 2016, 04:18
Default
  #7
New Member
 
Yue Wang
Join Date: Sep 2009
Posts: 14
Rep Power: 17
popstar0426 is on a distinguished road
Hi, Helio:

How does PANS methodology solve the laminar-turbulent transition process?

Best regards!
Yue
popstar0426 is offline   Reply With Quote

Old   March 5, 2016, 22:59
Default
  #8
New Member
 
Yue Wang
Join Date: Sep 2009
Posts: 14
Rep Power: 17
popstar0426 is on a distinguished road
Hi, Helio:

Could you tell me email address?
Mine is 282186964@qq.com.

Best regards!
Yue
popstar0426 is offline   Reply With Quote

Old   June 3, 2016, 11:46
Default
  #9
New Member
 
Peter Bishop
Join Date: Jan 2012
Posts: 20
Rep Power: 14
PeterBishop is on a distinguished road
Hi Helio,
I downloaded your files and tried to compile but when compiling kOmegaSSTPANS I get the following warning.

HTML Code:
/OpenFOAM/OpenFOAM-3.0.x/src/TurbulenceModels/turbulenceModels/lnInclude/RASModel.H:111:9:   required from ‘Foam::RASModel<BasicTurbulenceModel>::adddictionaryConstructorToTable<RASModelType>::adddictionaryConstructorToTable(const Foam::word&) [with RASModelType = Foam::RASModels::kOmegaSSTPANS<Foam::EddyDiffusivity<Foam::ThermalDiffusivity<Foam::CompressibleTurbulenceModel<Foam::fluidThermo> > > >; BasicTurbulenceModel = Foam::EddyDiffusivity<Foam::ThermalDiffusivity<Foam::CompressibleTurbulenceModel<Foam::fluidThermo> > >]’
makeMyCompressibleTurbulenceModel.C:72:1:   required from here
../turbulenceModels/RAS/kOmegaSSTPANS/kOmegaSSTPANS.H:182:35: warning: ‘Foam::RASModels::kOmegaSSTPANS<Foam::EddyDiffusivity<Foam::ThermalDiffusivity<Foam::CompressibleTurbulenceModel<Foam::fluidThermo> > > >::y_’ will be initialized after [-Wreorder]
             const volScalarField& y_;
                                   ^
../turbulenceModels/RAS/kOmegaSSTPANS/kOmegaSSTPANS.H:170:31: warning:   ‘Foam::dimensionedScalar Foam::RASModels::kOmegaSSTPANS<Foam::EddyDiffusivity<Foam::ThermalDiffusivity<Foam::CompressibleTurbulenceModel<Foam::fluidThermo> > > >::fEpsilon_’ [-Wreorder]
             dimensionedScalar fEpsilon_;
                               ^
In file included from ../turbulenceModels/RAS/kOmegaSSTPANS/kOmegaSSTPANS.H:354:0,
                 from makeMyCompressibleTurbulenceModel.C:71:
../turbulenceModels/RAS/kOmegaSSTPANS/kOmegaSSTPANS.C:197:1: warning:   when initialized here [-Wreorder]
 kOmegaSSTPANS<BasicTurbulenceModel>::kOmegaSSTPANS
 ^
In file included from makeMyCompressibleTurbulenceModel.C:71:0:
../turbulenceModels/RAS/kOmegaSSTPANS/kOmegaSSTPANS.H:189:28: warning: ‘Foam::RASModels::kOmegaSSTPANS<Foam::EddyDiffusivity<Foam::ThermalDiffusivity<Foam::CompressibleTurbulenceModel<Foam::fluidThermo> > > >::omega_’ will be initialized after [-Wreorder]
             volScalarField omega_;
                            ^
../turbulenceModels/RAS/kOmegaSSTPANS/kOmegaSSTPANS.H:188:28: warning:   ‘Foam::volScalarField Foam::RASModels::kOmegaSSTPANS<Foam::EddyDiffusivity<Foam::ThermalDiffusivity<Foam::CompressibleTurbulenceModel<Foam::fluidThermo> > > >::kU_’ [-Wreorder]
             volScalarField kU_;
                            ^
In file included from ../turbulenceModels/RAS/kOmegaSSTPANS/kOmegaSSTPANS.H:354:0,
                 from makeMyCompressibleTurbulenceModel.C:71:
../turbulenceModels/RAS/kOmegaSSTPANS/kOmegaSSTPANS.C:197:1: warning:   when initialized here [-Wreorder]
 kOmegaSSTPANS<BasicTurbulenceModel>::kOmegaSSTPANS
Any help? Thanks
PeterBishop is offline   Reply With Quote

Old   August 29, 2016, 12:30
Default
  #10
New Member
 
Helio Villanueva
Join Date: Apr 2013
Location: Brazil
Posts: 14
Rep Power: 13
HelioVillanueva is on a distinguished road
Hi PeterBishop.

The code was a little messy, that was the cause of the warnings. I reviewed it and pushed in the same place (here).

Another thing is it no longer needs the unresolved fields in the 0/ case folder (kU epsilonU/omegaU) but it is not possible to use the turbulentMixingLenghtFrequencyInlet and turbulentMixingLenghtDissipationRateInlet bcs. The same seems to happen with the qZeta model already implemented. I think it is less confusing to calculate and just give a fixedValue at the inlet for the regular k/epsilon/omega fileds than to have to specify the unresolved fields too.

Helio
HelioVillanueva is offline   Reply With Quote

Old   September 19, 2016, 15:18
Default
  #11
New Member
 
Michael Leck
Join Date: Feb 2014
Posts: 15
Rep Power: 12
Micha69822 is on a distinguished road
Hi,

I tried the model for the cht-solver but it didn't know the turbulence models. If I try the test case it work.

What should I change for use it with the cht-solver?
__________________
Best regards
Michael
Micha69822 is offline   Reply With Quote

Old   September 24, 2016, 22:04
Default cht
  #12
New Member
 
Helio Villanueva
Join Date: Apr 2013
Location: Brazil
Posts: 14
Rep Power: 13
HelioVillanueva is on a distinguished road
Hi Micha.

cht solvers are compressible. I tried the PANS code with tutorial "heatExchanger"
Code:
tutorials/heatTransfer/chtMultiRegionSimpleFoam/heatExchanger
Everything looks ok. In the controlDict file you have to specify the correct lib though (the compressible one).
Code:
libs ("libmycompressibleturbulenceModels.so");
The PANS model is supposed to be used in transient simulations so in the tutorial mentioned changes in this regard are needed too.

Hope this helps!
HelioVillanueva is offline   Reply With Quote

Old   October 10, 2016, 03:40
Default
  #13
New Member
 
Rajesh Kumar
Join Date: Apr 2009
Posts: 25
Rep Power: 17
rajeshkunwar is on a distinguished road
Hi,
Thank you for sharing the code. I tried to install it in OpenFOAM 4.0. The following errors appeared.

rajesh@rajesh-Precision-Tower-7810:~/OpenFOAM/helio-3.0.x-master/src/TurbulenceModels$ ./Allwmake
+ wmake libso ../findroot/
'/home/rajesh/OpenFOAM/rajesh-4.0/platforms/linux64GccDPInt32Opt/lib/libfindroot.so' is up to date.
+ wmake libso incompressible
g++ -std=c++0x -m64 -Dlinux64 -DWM_ARCH_OPTION=64 -DWM_DP -DWM_LABEL_SIZE=32 -Wall -Wextra -Wold-style-cast -Wnon-virtual-dtor -Wno-unused-parameter -Wno-invalid-offsetof -O3 -DNoRepository -ftemplate-depth-100 -I../turbulenceModels/RAS/kEpsilonPANS -I../turbulenceModels/RAS/kOmegaSSTSASnew -I../turbulenceModels/RAS/kOmegaSSTPANS -I../turbulenceModels/RAS/kOmegaSSTgammaReTheta -I/opt/openfoam4/src/transportModels -I/opt/openfoam4/src/finiteVolume/lnInclude -I/opt/openfoam4/src/meshTools/lnInclude -I/opt/openfoam4/src/TurbulenceModels/turbulenceModels/lnInclude -I/opt/openfoam4/src/TurbulenceModels/incompressible/lnInclude -I/home/rajesh/OpenFOAM/rajesh-4.0/run/../src/findroot -IlnInclude -I. -I/opt/openfoam4/src/OpenFOAM/lnInclude -I/opt/openfoam4/src/OSspecific/POSIX/lnInclude -fPIC -c makeMyIncompressibleTurbulenceModel.C -o Make/linux64GccDPInt32Opt/makeMyIncompressibleTurbulenceModel.o
In file included from makeMyIncompressibleTurbulenceModel.C:74:0:
../turbulenceModels/RAS/kOmegaSSTgammaReTheta/kOmegaSSTgammaReTheta.H:124:22: fatal error: findRoot.H: No such file or directory
compilation terminated.
/opt/openfoam4/wmake/rules/General/transform:8: recipe for target 'Make/linux64GccDPInt32Opt/makeMyIncompressibleTurbulenceModel.o' failed
make: *** [Make/linux64GccDPInt32Opt/makeMyIncompressibleTurbulenceModel.o] Error 1
rajeshkunwar is offline   Reply With Quote

Old   October 12, 2016, 17:11
Default
  #14
New Member
 
Helio Villanueva
Join Date: Apr 2013
Location: Brazil
Posts: 14
Rep Power: 13
HelioVillanueva is on a distinguished road
Hi rajeshkunwar,

You tried to compile the code in the cloned git folder (rajesh@rajesh-Precision-Tower-7810:~/OpenFOAM/helio-3.0.x-master/src/TurbulenceModels$ ./Allwmake ). The contents of this folder is supposed to be copied to your OpenFOAM user folder (/home/rajesh/OpenFOAM/rajesh-4.0) and then you compile.

Another thing is OF4 have several things different between OF3 including in turbulence models. Here you find the implementation of kEpsilonPANS for OF4.
HelioVillanueva is offline   Reply With Quote

Old   October 30, 2016, 22:21
Default
  #15
New Member
 
Yue Wang
Join Date: Sep 2009
Posts: 14
Rep Power: 17
popstar0426 is on a distinguished road
Dear Helio:

Have you done any compressible flow simulations?

Could you share more examples on rhoPimpleFoam?

Best regards!
popstar0426 is offline   Reply With Quote

Old   March 30, 2017, 08:04
Default compile PANS model problem
  #16
New Member
 
mehrdad
Join Date: Mar 2017
Posts: 3
Rep Power: 9
mehrdadzahir is on a distinguished road
hello.
i had a problem by compiling PANS model of turbulence. i copied the KEpsilonPANS.H and .C to src/TurbulenceModels/turbulenceModels/RAS/ but when i want run program, for example pitzDaily that you run and told about that, i face with this error that say permission denied.
and i read something in some weblogs about a implement a new model of turbulence and the way of compiling, that said do these code in terminal to compile PANS model:

# copy to run directory
$ cp -r $FOAM_SRC/turbulenceModels/incompressible/RAS/realizableKE/ .
# rename all files
$ mv realizableKE myrealizableKE
$ mv myrealizableKE/realizableKE.H myrealizableKE/myrealizableKE.H
$ mv myrealizableKE/realizableKE.C myrealizableKE/myrealizableKE.C
# rename all instances of realizableKE to myrealizableKE
# you can use replace all in your text editor
$ find myrealizableKE -type f -exec sed -i 's/realizableKE/myrealizableKE/g' {} \;

but when i write second command, i face whit this error:

cp: missing destination file operand after '/opt/openfoam4/src/TurbulenceModels/turbulenceModels/RAS/realizableKE/'
Try 'cp --help' for more information.

what can i do? sorry i am a beginner and i just work whit OpenFoam. could you please how to compile the model step by step?
TNX a lot for your helping...
mehrdadzahir is offline   Reply With Quote

Old   June 5, 2017, 22:26
Default PANS airFoil
  #17
New Member
 
mehrdad
Join Date: Mar 2017
Posts: 3
Rep Power: 9
mehrdadzahir is on a distinguished road
hi everyone
i implement the PANS model of turbulence and run the pitzDaily. i dont have any problem with that nonetheless i want to use this model on the other body (airfoil). how to use this model on the airfoil??? what changes i make on the folders of airfoil body??
mehrdadzahir is offline   Reply With Quote

Old   May 20, 2018, 04:09
Default pans-propeller
  #18
New Member
 
Amir-hossein Mokhtari
Join Date: Mar 2015
Posts: 13
Rep Power: 11
kolahefereshte is on a distinguished road
hi brothers and sisters.
help me.
i compiled pans model -In accordance with the instructions given- and i run pitzDailyPANS Without problem.but when i want run my problem :
The program gave me a error -Unfair -.

my solver is simplefoam.3d mesh.i use snappyhex.

Thank you for your time

error:
FOAM FATAL IO ERROR:
keyword epsilonU is undefined in dictionary "/home/sajjad/OpenFOAM/sajjad-3.0.1/run/aaaa/system/fvSolution.solvers"

file: /home/sajjad/OpenFOAM/sajjad-3.0.1/run/aaaa/system/fvSolution.solvers from line 22 to line 65.

From function dictionary::subDict(const word& keyword) const
in file db/dictionary/dictionary.C at line 648.
kolahefereshte is offline   Reply With Quote

Old   February 8, 2019, 10:01
Default
  #19
Senior Member
 
M. Montero
Join Date: Mar 2009
Location: Madrid
Posts: 155
Rep Power: 17
be_inspired is on a distinguished road
Do any of you have some paper or own experience about a comparison between PANS and SAS?

Benefits, Cons, Accuracy....
be_inspired is offline   Reply With Quote

Old   February 21, 2019, 07:55
Default
  #20
Member
 
sajad alimardani
Join Date: Feb 2018
Posts: 31
Rep Power: 8
sajjjad is on a distinguished road
thank you for code.

Last edited by sajjjad; February 21, 2019 at 13:54.
sajjjad is offline   Reply With Quote

Reply


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
different zones, different turbulence models gmwsy FLUENT 5 June 17, 2020 16:42
in k-epsilon wall function approach high Re turbulence models: question of velocity romant OpenFOAM Programming & Development 6 May 26, 2016 10:14
Y plus for various turbulence models taram CFX 8 December 16, 2013 12:44
Zero Equation Turbulence models stefan.gracik OpenFOAM Programming & Development 3 April 17, 2013 15:12
KOmega Turbulence model from wwwopenFOAMWikinet philippose OpenFOAM Running, Solving & CFD 30 August 4, 2010 11:26


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