Compressible WALE model
Hello to all here at the forum. I am trying to implement the compressible version of the WALE model into OpenFOAM, but thus far haven't found any papers on it. Does anyone know where I can find literature?
Cheers, Deji |
Hallo Deji,
Were you successful in implementing the WALE model for compressible flow in openFOAM I am also interested in the same topic would be interesting if you could give me some pointers about where did you start from and how much have you done till now? Regards, Awais |
And as far as the paper is concerned I think this one is the paper which describes the details. I just matched the author names and the year published and found this paper via google.
http://www.math.univ-montp2.fr/~nicoud/PDF/wale.pdf |
Hello. There isn't a compressible version of the WALE model, so I just coded the incompressible version into my compressible LES solver. It does work okay, I can send you the SGS solver if you would like.
Cheers, Deji |
I also coded the locally dynamic Smagorinsky compressible SGS model and I prefer it over the WALE model.:D
|
I would be very happy if you could send me both the models.
I would like to see how they have been implemented and if I run them I will share the results with you. I am going to send you my email via message. Or you can post them here, this way others will also benefit from your implementation of both the models. Regards, Awais |
Sure thing. I will send you both SGS solvers via email and you can post it on the forum if you like.
Cheers, Deji |
Quote:
Could you please also send me both SGS solvers to me? Thanks in advance. M K Singh |
Hey guys. My apologies for not sending the solvers yesterday, I am trying to clean up the code with comments to make it more understandable. Hence, I will attach it here on the forum this evening at the very latest. My apologies once again and I look forward to you all giving me feedback if there are any problems or bugs in the codes.
Cheers, Deji |
3 Attachment(s)
Hey guys, I have attached the WALE model for the compressible SGS models in OpenFOAM. I have also attached the LESProperties file which gives the needed input for the LES model.
As for the locally dynamic Smagorinsky compressible LES model, I will upload it shortly. I need to make a quick fix to the code. Please let me know if there are any problems. Cheers, Deji |
2 Attachment(s)
Here is the locally dynamic Smagorinksy compressible LES SGS model. The LESProperties that I attached previously also has the necessary coefficients to run this SGS model. I ought to say that I have had problems running dynamic models in OpenFOAM at t=0. Therefore, run any static LES model such as Smagorinksy or the WALE model for one timestep, then you can proceed to utilize the dynamic model thereafter.
Cheers, Deji |
I need sometime I will surely get back to you on this topic. :)
Thanks for sharing them. Regards, Awais |
Dear Deji,
Thanks for your solvers. I will test it and update you in this regard. M K Singh |
Hi deji,
I have never compiled a turbulence model before in openfoam. Can you tell me how should I compile your your code? Regards, Awais |
Hi deji,
I have never compiled a turbulence model before in openfoam. Can you tell me how should I compile your your code? Regards, Awais The LES models I uploaded are for compressible LES solvers in OpenFOAM. You need to copy the code into the directory where the other SGS models are, go through the files in the MAKE directory and add the lines necessary for the compiler to know that it should compile the codes too. Then just type wmake libso, it is quite simple, but you should spend some time going through the directory that has the SGS models. Cheers, Deji |
I also worked in the past a bit on the compressible WALE sgs model.
My solution was indeed closer to original paper notation and slightly more compact, see it below and check if the two versions are equivalent (too much tensorial algebra for me :) ). volSymmTensorField S = symm(gradU); volTensorField Omega = skew(gradU); volTensorField Sd = (S & S) + (Omega & Omega) - 1.0/3.0*I*( (S && S) - (Omega && Omega)); muSgs_ = rho()*sqr(C_omega_*delta())*pow((Sd && Sd),3.0/2.0)/(pow((S && S),5.0/2.0)+pow((Sd && Sd),5.0/4.0)); Concerning your version I do not understand why you need the computation of a transport equation for the subgrid turbulent kinetic energy. The model is a simple algebraic one so it is not clear what is the purpose of the extra transported quantity. Regards, Cosimo |
Concerning your version I do not understand why you need the computation of a transport equation for the subgrid turbulent kinetic energy. The model is a simple algebraic one so it is not clear what is the purpose of the extra transported quantity.
Hey Cosimo. The only reason why the k transport equation is there is for turbulent combustion problems; such problems tend to require a turbulent k field to solve for models such as the eddy dissipation combustion model.:) Sorry for the late response. Cheers, Deji |
Thanks Dejio for your work, you are really filling the gap.
Preferring the local dyn. Smagorinsky I think you might be interested in the WALE-Similarity Mixed model, if you are not tired of it jet: http://link.springer.com/chapter/10....LI=true#page-1 |
Quote:
I can be reached at 'sagnikmazumdar@gmail.com'. Thanks for all the help. Sagnik |
Hi Deji, I got the files. I did not see it was already attached to another post. Thanks for the help.
Sagnik |
2 Attachment(s)
Here is an updated compressible dynamic smagorinsky LES model with the inclusion of a SGS K equation solved by feeding the locally dynamic muSgs coefficient into the K equation.
This code was utilized for OpenFOAM 1.7, and it needs to be slightly modified for OpenFOAM 2.1. Cheers, Deji |
Thanks a lot. We implemented your old version in OpenFOAM 2.1 and it works great. We would surely modify it and use this new version. I undertand that this is exactly the same at the previous 'dynLocalAverageSmagorinsky' except for the change you specified. Is there something else that's new in this new version !
Thanks again for all the help. Sagnik |
Dear Deji,
Could you please also nicely share us the Make folder (files and options) for the dynamic Smag Model: dynLocalAverageSmagorinsky.C Thank you so much! flames |
Hello, everyone!
I tried to complied the dynLocalAverageSmagorinsky Model into openfoam 2.1.1. But I still met some problem when I run my case. I put the .H and .C in the following path: Code:
/home/user/OpenFOAM/user-2.1.1/src/turbulenceModels/compressible/LES/dynLocalAverageSmagorinsky Code:
dynLocalAverageSmagorinsky (folder), Make (folder) Code:
dynLocalAverageSmagorinsky/dynLocalAverageSmagorinsky.C Code:
EXE_INC = \ Code:
/home/user/OpenFOAM/user-2.1.1/platforms/linux64IccDPOpt/lib Code:
libs ("libcompressibleLESModels_user.so"); Code:
LESModel dynLocalAverageSmagorinsky; //Smagorinsky; //oneEqEddy; Code:
[0] best regards, f ++++++++++++++++++++++++++++++++++++++++++++++++++ +++++++++++++++++++++++++++++++++++++++++++++++++= The above procedure should be correct. The reason why the error comes from is that I use pisoFoam to test the LES model, which obviously cannot be found by pisoFoam. A stupid error. |
Nobody knows something about the errors which make the compiliation not successfully? Thanks.
|
Dynamic SGS model
Since it seems you are interested in more sophisticated SGS models, please have a look at the LEMOS extensions for OpenFOAM: Dynamic Mixed Model, Lagrangian Dynamic Mixed Model and Hybrid URANS-LES models with dynamic Smagorinsky :-)
http://www.lemos.uni-rostock.de/en/d...nfoam-content/ |
Thank you for your information. Are they for compressible or incompressible LES?
cheers, f |
sorry, my mistake, only incompressible as far as I know
|
Dear Deji,
About the calculating the dynamic parameters Cd and Ci for the Smagorinksy compressible LES SGS model, I think I have the following difference for my implementation: First CI, the beta should be calculated as: Code:
volScalarField beta = 2*sqr(2*delta())*filter_(rho())*sqr(mag(filter_(rho()*D)/filter_(rho()))); thank you so much! For clearance, I post the function I am using to predict Cd and Ci: Code:
volScalarField dynLocalAverageSmagorinsky::cD_(const volSymmTensorField& D) const Code:
volScalarField dynLocalAverageSmagorinsky::cI_(const volSymmTensorField& D) const Quote:
|
Problem in compiling dynLocalAverageSmagorinsky in OF 2.0.1
Hello everyone,
I am having problem in compiling the dynLocalAverageSmagorinsky model in openfoam 2.0.1. Following is the error trace [narya@localhost dynLocalAverageSmagorinsky]$ wmake libso SOURCE=dynLocalAverageSmagorinsky.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/home1/narya/OpenFOAM/OpenFOAM-2.0.1/src/turbulenceModels -I/home1/narya/OpenFOAM/OpenFOAM-2.0.1/src/turbulenceModels/LES/LESdeltas/lnInclude -I/home1/narya/OpenFOAM/OpenFOAM-2.0.1/src/turbulenceModels/LES/LESfilters/lnInclude -I/home1/narya/OpenFOAM/OpenFOAM-2.0.1/src/thermophysicalModels/basic/lnInclude -I/home1/narya/OpenFOAM/OpenFOAM-2.0.1/src/turbulenceModels/compressible/LES/lnInclude -I/home1/narya/OpenFOAM/OpenFOAM-2.0.1/src/finiteVolume/lnInclude -I/home1/narya/OpenFOAM/OpenFOAM-2.0.1/src/meshTools/lnInclude -IlnInclude -I. -I/home1/narya/OpenFOAM/OpenFOAM-2.0.1/src/OpenFOAM/lnInclude -I/home1/narya/OpenFOAM/OpenFOAM-2.0.1/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/dynLocalAverageSmagorinsky.o dynLocalAverageSmagorinsky.C: In constructor âFoam::compressible::LESModels::dynLocalAverageSma gorinsky::dynLocalAverageSmagorinsky(const Foam::volScalarField&, const Foam::volVectorField&, const Foam::surfaceScalarField&, const Foam::basicThermo&, const Foam::word&, const Foam::word&)â: dynLocalAverageSmagorinsky.C:142: error: no matching function for call to âFoam::compressible::LESModel::LESModel(const Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, const Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>&, const Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>&, const Foam::basicThermo&, const Foam::word&, const Foam::word&)â /home1/narya/OpenFOAM/OpenFOAM-2.0.1/src/turbulenceModels/compressible/LES/lnInclude/LESModel.H:134: note: candidates are: Foam::compressible::LESModel::LESModel(const Foam::word&, const Foam::volScalarField&, const Foam::volVectorField&, const Foam::surfaceScalarField&, const Foam::basicThermo&, const Foam::word&) /home1/narya/OpenFOAM/OpenFOAM-2.0.1/src/turbulenceModels/compressible/LES/lnInclude/LESModel.H:101: note: Foam::compressible::LESModel::LESModel(const Foam::compressible::LESModel&) make: *** [Make/linux64GccDPOpt/dynLocalAverageSmagorinsky.o] Error 1.. anyone please help. Kafka. |
Quote:
Dear Deji, I tried to complied the dynLocalAverageSmagorinsky Model into openfoam 2.1.1. But I am having problem.Following is the error: wmakeLnInclude: linking include files to ./lnInclude SOURCE=dynLocalAverageSmagorinsky/dynLocalAverageSmagorinsky.C ; g++ -m64 -Dlinux64 -DWM_DP -Wall -Wextra -Wno-unused-parameter -Wold-style-cast -Wnon-virtual-dtor -O3 -DNoRepository -ftemplate-depth-100 -I/opt/openfoam211/src/turbulenceModels -I/opt/openfoam211/src/turbulenceModels/LES/LESdeltas/lnInclude -I/opt/openfoam211/src/turbulenceModels/LES/LESfilters/lnInclude -I/opt/openfoam211/src/thermophysicalModels/basic/lnInclude -I/opt/openfoam211/src/meshTools/lnInclude -I/opt/openfoam211/src/finiteVolume/lnInclude -I/opt/openfoam211/src/turbulenceModels/compressible/LES/GenEddyVisc -I/opt/openfoam211/src/turbulenceModels/compressible/LES/LESModel -I/opt/openfoam211/src/turbulenceModels/compressible/LES/lnInclude -IlnInclude -I. -I/opt/openfoam211/src/OpenFOAM/lnInclude -I/opt/openfoam211/src/OSspecific/POSIX/lnInclude -fPIC -c $SOURCE -o Make/linux64GccDPOpt/dynLocalAverageSmagorinsky.o dynLocalAverageSmagorinsky/dynLocalAverageSmagorinsky.C: In member function ‘Foam::volScalarField Foam::compressible::LESModels::dynLocalAverageSmag orinsky::cQ_(const volSymmTensorField&) const’: dynLocalAverageSmagorinsky/dynLocalAverageSmagorinsky.C:104:31: error: reference to ‘db’ is ambiguous In file included from /opt/openfoam211/src/OpenFOAM/lnInclude/regIOobject.H:41:0, from /opt/openfoam211/src/OpenFOAM/lnInclude/GeometricField.H:42, from /opt/openfoam211/src/OpenFOAM/lnInclude/GeometricScalarField.H:38, from /opt/openfoam211/src/OpenFOAM/lnInclude/GeometricFields.H:34, from /opt/openfoam211/src/finiteVolume/lnInclude/volFields.H:37, from /opt/openfoam211/src/thermophysicalModels/basic/lnInclude/basicThermo.H:39, from /opt/openfoam211/src/turbulenceModels/compressible/turbulenceModel/turbulenceModel.H:51, from /opt/openfoam211/src/turbulenceModels/compressible/LES/LESModel/LESModel.H:51, from /opt/openfoam211/src/turbulenceModels/compressible/LES/GenEddyVisc/GenEddyVisc.H:42, from dynLocalAverageSmagorinsky/dynLocalAverageSmagorinsky.H:53, from dynLocalAverageSmagorinsky/dynLocalAverageSmagorinsky.C:24: /opt/openfoam211/src/OpenFOAM/lnInclude/IOobject.H:246:35: error: candidates are: const Foam::objectRegistry& Foam::IOobject::db() const /opt/openfoam211/src/OpenFOAM/lnInclude/IOobject.H:246:35: error: const Foam::objectRegistry& Foam::IOobject::db() const dynLocalAverageSmagorinsky/dynLocalAverageSmagorinsky.C:104:63: error: expected primary-expression before ‘>’ token In file included from /opt/openfoam211/src/turbulenceModels/compressible/LES/GenEddyVisc/GenEddyVisc.H:42:0, from dynLocalAverageSmagorinsky/dynLocalAverageSmagorinsky.H:53, from dynLocalAverageSmagorinsky/dynLocalAverageSmagorinsky.C:24: /opt/openfoam211/src/turbulenceModels/compressible/LES/LESModel/LESModel.H: In instantiation of ‘static Foam::autoPtr<Foam::compressible::LESModel> Foam::compressible::LESModel::adddictionaryConstru ctorToTable<LESModelType>::New(const volScalarField&, const volVectorField&, const surfaceScalarField&, const Foam::basicThermo&, const Foam::word&) [with LESModelType = Foam::compressible::LESModels::dynLocalAverageSmag orinsky; Foam::volScalarField = Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>; Foam::volVectorField = Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>; Foam::surfaceScalarField = Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>]’: /opt/openfoam211/src/turbulenceModels/compressible/LES/LESModel/LESModel.H:128:1: required from ‘Foam::compressible::LESModel::adddictionaryConstr uctorToTable<LESModelType>::adddictionaryConstruct orToTable(const Foam::word&) [with LESModelType = Foam::compressible::LESModels::dynLocalAverageSmag orinsky]’ dynLocalAverageSmagorinsky/dynLocalAverageSmagorinsky.C:39:1: required from here /opt/openfoam211/src/turbulenceModels/compressible/LES/LESModel/LESModel.H:115:9: error: no matching function for call to ‘Foam::compressible::LESModels::dynLocalAverageSma gorinsky::dynLocalAverageSmagorinsky(const volScalarField&, const volVectorField&, const surfaceScalarField&, const Foam::basicThermo&, const Foam::word&)’ /opt/openfoam211/src/turbulenceModels/compressible/LES/LESModel/LESModel.H:115:9: note: candidates are: dynLocalAverageSmagorinsky/dynLocalAverageSmagorinsky.C:115:1: note: Foam::compressible::LESModels::dynLocalAverageSmag orinsky::dynLocalAverageSmagorinsky(const volScalarField&, const volVectorField&, const surfaceScalarField&, const Foam::basicThermo&) dynLocalAverageSmagorinsky/dynLocalAverageSmagorinsky.C:115:1: note: candidate expects 4 arguments, 5 provided In file included from dynLocalAverageSmagorinsky/dynLocalAverageSmagorinsky.C:24:0: dynLocalAverageSmagorinsky/dynLocalAverageSmagorinsky.H:91:9: note: Foam::compressible::LESModels::dynLocalAverageSmag orinsky::dynLocalAverageSmagorinsky(const Foam::compressible::LESModels::dynLocalAverageSmag orinsky&) dynLocalAverageSmagorinsky/dynLocalAverageSmagorinsky.H:91:9: note: candidate expects 1 argument, 5 provided In file included from /opt/openfoam211/src/turbulenceModels/compressible/LES/GenEddyVisc/GenEddyVisc.H:42:0, from dynLocalAverageSmagorinsky/dynLocalAverageSmagorinsky.H:53, from dynLocalAverageSmagorinsky/dynLocalAverageSmagorinsky.C:24: /opt/openfoam211/src/turbulenceModels/compressible/LES/LESModel/LESModel.H: In static member function ‘static Foam::autoPtr<Foam::compressible::LESModel> Foam::compressible::LESModel::adddictionaryConstru ctorToTable<LESModelType>::New(const volScalarField&, const volVectorField&, const surfaceScalarField&, const Foam::basicThermo&, const Foam::word&) [with LESModelType = Foam::compressible::LESModels::dynLocalAverageSmag orinsky; Foam::volScalarField = Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>; Foam::volVectorField = Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>; Foam::surfaceScalarField = Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh>]’: /opt/openfoam211/src/turbulenceModels/compressible/LES/LESModel/LESModel.H:115:9: warning: control reaches end of non-void function [-Wreturn-type] make: *** [Make/linux64GccDPOpt/dynLocalAverageSmagorinsky.o] Error 1 plz help me |
Dear All,
In dynLocalAverageSmagorinsky and other dynamic LES model, when we need to calculate the model constants using a dynamic way, we will do the averaging, like i.e. <Lij*Mij>/<Mkl*Mkl>. In principle, this kind of averaging is performed in the homogeneous direction in the flows. I do not know how this is implemented in other flow solvers. In openfoam, this is done using fvc::average(), this operation is only based on weighting of areas of all the faces belonging to one cell. So this is LOCAL dynamic method. Could anyone say something about if such implementation is really reflecting the averaging in the original sense (i.e. averaging in one homogeneous direction)? OFFO Thank you |
Hello, flames,
I also try to compile the dynLocalAverageSmagorinsky Model into openfoam 2.1.1. But when i use wmake libso, i see error message. Could you please share with me your folders for the dynLocalAverageSmagorinsky Model. Could you tell me whats that error? Thank you |
Hi All,
When I use this dynamic model, for the regions having large mesh size, I found there are negative muSGS appearing there. So I cannot confirm if this is acceptable results or not. The flow fields and pressure seem still fine even if the mySGS is negative there. Anybody has such kind of experience using dynamic Smagorinsky model? OFFO |
deji, could you please share your literature reference for the compressible dyn smagorinsky with k equation (you call it hybrid-sgs)?
Thank you in advance! |
got it:
local dyn compressible Smagorinsky: Martin, M. Pino; Piomelli, Ugo; Candler, Graham V. -- Subgrid-Scale Models for Compressible Large-Eddy Simulations -- Theoret. Comput. Fluid Dynamics, 2000 13, p:361-376 And Martin, M. Pino; Piomelli, Ugo; Candler, Graham V. -- A priori tests of SGS models in compressible turbulence -- 3rd ASME/JSME Joint Fluids Engineering Conference -- 1999 -- Army High Performance Computing Research Center k-Equation is based on oneEqEddy: k-Equation: Yoshizawa, Akira; Horiuti, Kiyosi -- A Statistically-Derived Subgrid-Scale Kinetic Energy Model for the Large-Eddy Simulation of Turbulent Flows -- Journal of the Physical Society of Japan -- 1985 -- Vol. 54 -- Issue 8 -- pages 2834-2839 -- doi: 10.1143/JPSJ.54.2834 p, li k_sgs-transport: Menon, S; Yeung, P.-K.; Kim, W.-W. -- Effect of subgrid models on the computed interscale energy transfer in isotropic turbulence -- Computers & Fluids -- 1996 -- Volume 25 -- Issue 2 -- pages: 165-180 -- doi: 10.1016/0045-7930(95)00036-4 where the parameter c_k = 0.0094 is defined like in oneEqEddy by: Nakayama, A.; Vengadesan, S. N. -- On the influence of numerical schemes and subgrid-stress models on large eddy simulation of turbulent flow past a square cylinder -- International Journal for Numerical Methods of Fluids -- 2002 -- Volume 38 -- Issue 3 -- pages: 227-253 -- doi: 10.1002/fld.214 |
Thank You, I was also looking for the source of literature. And also this is a good reference:
http://www.aem.umn.edu/~kmahesh/publ...aiaa10_les.pdf Also which version of OpenFOAM could you compile the code with? Cheers! |
i compiled it with 2.3.x and it works well.
but you need to modify some small parts. just diff the comp. Smagorinsky from 1.6 or 1.7 with the actual one. Thats all. |
Thanks! Also you can have a look at following for other compressible LEs subgrid implementations: :)
https://github.com/fireFoam-dev/fire...mpressible/LES |
All times are GMT -4. The time now is 23:56. |