CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Programming & Development (https://www.cfd-online.com/Forums/openfoam-programming-development/)
-   -   Compressible WALE model (https://www.cfd-online.com/Forums/openfoam-programming-development/96885-compressible-wale-model.html)

deji February 3, 2012 13:39

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

owayz August 1, 2012 14:09

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

owayz August 1, 2012 14:12

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

deji August 1, 2012 14:13

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

deji August 1, 2012 14:14

I also coded the locally dynamic Smagorinsky compressible SGS model and I prefer it over the WALE model.:D

owayz August 1, 2012 15:27

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

deji August 1, 2012 15:45

Sure thing. I will send you both SGS solvers via email and you can post it on the forum if you like.

Cheers,
Deji

mksingh August 1, 2012 16:49

Quote:

Originally Posted by deji (Post 374910)
Sure thing. I will send you both SGS solvers via email and you can post it on the forum if you like.

Cheers,
Deji

Hi,
Could you please also send me both SGS solvers to me?
Thanks in advance.
M K Singh

deji August 2, 2012 09:54

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

deji August 2, 2012 21:32

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

deji August 2, 2012 21:44

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

owayz August 3, 2012 12:33

I need sometime I will surely get back to you on this topic. :)
Thanks for sharing them.
Regards,
Awais

mksingh August 6, 2012 11:47

Dear Deji,
Thanks for your solvers. I will test it and update you in this regard.
M K Singh

owayz August 6, 2012 19:50

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

deji August 7, 2012 13:20

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

cosimobianchini August 20, 2012 04:47

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

deji October 1, 2012 15:06

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

vonboett January 7, 2013 11:26

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

sagnikmazumdar January 16, 2014 14:39

Quote:

Originally Posted by deji (Post 374888)
I also coded the locally dynamic Smagorinsky compressible SGS model and I prefer it over the WALE model.:D

Hi Deji, I was going through your CFD online posts and got to know that you have a compressible version of 'dynLocalAverageSmagorinsky' model. Would it be possible to share it with us ! This model does not exist in the new version of OpenFOAM but we found that its incompressible version does a better job than other existing model for some cases. We would be happy to acknowledge you as one of the contributors in our work.

I can be reached at 'sagnikmazumdar@gmail.com'.

Thanks for all the help.

Sagnik

sagnikmazumdar January 17, 2014 12:26

Hi Deji, I got the files. I did not see it was already attached to another post. Thanks for the help.

Sagnik

deji February 4, 2014 09:01

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

sagnikmazumdar February 4, 2014 15:26

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

flames February 5, 2014 04:52

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

flames February 8, 2014 18:20

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
In the LES folder, the file structure is:

Code:

dynLocalAverageSmagorinsky (folder), Make (folder)
My Make/files is:

Code:

dynLocalAverageSmagorinsky/dynLocalAverageSmagorinsky.C

LIB = $(FOAM_USER_LIBBIN)/libcompressibleLESModels_user

Make/options:
Code:

EXE_INC = \
    -I$(LIB_SRC)/turbulenceModels \
    -I$(LIB_SRC)/turbulenceModels/LES/LESdeltas/lnInclude \
    -I$(LIB_SRC)/turbulenceModels/LES/LESfilters/lnInclude \
    -I$(LIB_SRC)/thermophysicalModels/basic/lnInclude \
    -I$(LIB_SRC)/meshTools/lnInclude \
    -I$(LIB_SRC)/finiteVolume/lnInclude \
    -I$(LIB_SRC)/turbulenceModels/compressible/LES/GenEddyVisc \
    -I$(LIB_SRC)/turbulenceModels/compressible/LES/LESModel \
    -I$(LIB_SRC)/turbulenceModels/compressible/LES/lnInclude

LIB_LIBS = \
    -lcompressibleTurbulenceModel \
    -lLESdeltas \
    -lLESfilters \
    -lfiniteVolume \
    -lmeshTools

The library libcompressibleLESModels_user.so is obtained in the following path (I confirmed that the .so file is successfully generated.):
Code:

/home/user/OpenFOAM/user-2.1.1/platforms/linux64IccDPOpt/lib
In the case, I add the following line in the system/control:
Code:

libs ("libcompressibleLESModels_user.so");
The file LESProperties is:

Code:

LESModel        dynLocalAverageSmagorinsky;    //Smagorinsky;    //oneEqEddy;

delta          cubeRootVol;

printCoeffs    on;

dynLocalAverageSmagorinskyCoeffs
{
    ce            1.048;
    filter        simple;
}
.........

When I run the case, I still had the problem as follows:

Code:

[0]
[0]
[0] --> FOAM FATAL ERROR:
[1] [2]
[2]
[2] --> FOAM FATAL ERROR:
[2] Unknown LESModel type dynLocalAverageSmagorinsky

Valid LESModel types:

15
(
DeardorffDiffStress
LRRDiffStress
Smagorinsky
SpalartAllmaras
SpalartAllmarasDDES
SpalartAllmarasIDDES
dynLagrangian
dynOneEqEddy
homogeneousDynOneEqEddy
homogeneousDynSmagorinsky
kOmegaSSTSAS
laminar
mixedSmagorinsky
oneEqEddy
spectEddyVisc
)
[2]
[2]
[2]    From function LESModel::New(const volVectorField&, const surfaceScalarField& ,transportModel&, const word&)
[2]    in file LESModel/LESModel.C at line [0] Unknown LESModel type dynLocalAverageSmagorinsky

It seems that the solver does not know the newly generated library, however I do not know which procedure I neglected to correctly use this turbulence model. Does anybody have any suggestions about the above implementations? Thank you in advance.

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.

flames February 8, 2014 20:03

Dear Deji,

In the source code of dynLocalAverageSmagorinsky.C, the resolved turbulent stresses L_ij is calculated as:

Code:

volSymmTensorField Lij = filter_(rho()*sqr(U())) - sqr(filter_(rho()*U()))/filter_(rho());
Actually it is not completely equivalent to the equation in the paper by Martin, Piomelli and Canlder. Using the above equation, actually the following assumption is assumed:

\overline{\rho f} = \overline{\rho}\overline{f}

Did you test this assumption? I know that in compressible L_ij is easy to calculate in compressible LES, but as you know in openfoam it is not actually compressible. At least in my case it is Low Ma solver. I ask this just for curiosity. Thanks.

flames February 10, 2014 05:39

Nobody knows something about the errors which make the compiliation not successfully? Thanks.

vonboett February 10, 2014 08:08

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/

flames February 10, 2014 08:25

Thank you for your information. Are they for compressible or incompressible LES?

cheers,
f

vonboett February 10, 2014 08:47

sorry, my mistake, only incompressible as far as I know

flames February 24, 2014 17:04

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())));
In the prediction of Cd, the strain rate tensor are treated not a Favre way. This is not consistent with the Paper by Martin, Piomelli and Candler 2000. In your code uploaded. They are calculated without the density (not a Favre way). Are these your simplifications?

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
{
    volSymmTensorField Dfilter = filter_(rho()*D)/filter_(rho());
    volScalarField magSijfilter = sqrt(2.0*(Dfilter && Dfilter));
    volScalarField magSij = sqrt(2*(D && D));

    volSymmTensorField Lij = filter_(rho()*sqr(U())) - sqr(filter_(rho()*U()))/filter_(rho());
//  volSymmTensorField Bij = -2*sqr(2*delta())*filter_(rho())*filter_(magSij)*(filter_(D)-filter_(tr(D))*I/3);
//  volSymmTensorField Bij = -2*sqr(2*delta())*filter_(rho())*magSijfilter*(Dfilter - Dtrfilter*I/3);
    volSymmTensorField Bij = -2*sqr(2*delta())*filter_(rho())*magSijfilter*dev(Dfilter);
    volSymmTensorField Aij = -2*sqr(delta())*rho()*magSij*dev(D);
    volSymmTensorField Mij = Bij - filter_(Aij);
    volScalarField LijMij = Lij && Mij;
    volScalarField MklMkl = Mij && Mij;

    // Performing local average on cell faces on return
    return fvc::average(LijMij)/fvc::average(MklMkl);
}

Code:

volScalarField dynLocalAverageSmagorinsky::cI_(const volSymmTensorField& D) const
{
    volSymmTensorField Dfilter = filter_(rho()*D)/filter_(rho());
    volScalarField magSij = sqrt(2.0*(Dfilter && Dfilter));

    volSymmTensorField Lij = filter_(rho()*sqr(U())) - sqr(filter_(rho()*U()))/filter_(rho());
    volScalarField Lkk = tr(Lij);
    volScalarField beta = 2*sqr(2*delta())*filter_(rho())*sqr(magSij);
    volScalarField alpha = filter_(2*rho()*sqr(delta())*sqr(magSij));

    // Performing local average on cell faces on return
    return (fvc::average(Lkk))/(fvc::average(beta - alpha));
}

Any comments is appreciated for the above code lines. Thank you.


Quote:

Originally Posted by deji (Post 375144)
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


kafka_on_the_shore April 3, 2014 10:33

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.

HEM April 7, 2014 08:57

Quote:

Originally Posted by deji (Post 375869)
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

hello,
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

openfoammaofnepo April 13, 2014 09:55

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

HEM April 14, 2014 06:21

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

openfoammaofnepo September 2, 2014 09:06

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

FerdiFuchs November 18, 2014 08:21

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!

FerdiFuchs November 19, 2014 10:14

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

rkc.cfd November 19, 2014 12:30

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!

FerdiFuchs November 20, 2014 03:04

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.

rkc.cfd November 20, 2014 13:32

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.