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 01:26. |