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

Compressible WALE model

Register Blogs Community New Posts Updated Threads Search

Like Tree14Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 14, 2015, 04:25
Default
  #41
New Member
 
jiujiumin
Join Date: May 2013
Posts: 9
Rep Power: 12
jiujiumin is on a distinguished road
Quote:
Originally Posted by owayz View Post
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
Hi deji
Your attached files are the WALE model for compressible flow in openFOAM ,Iwant to get the WALE model for incompressible flow in openFOAM, Or can I know what the name of the incompressible WALE model is in openFOAM?

cheers
jiujiumin
jiujiumin is offline   Reply With Quote

Old   April 14, 2015, 04:30
Default
  #42
New Member
 
jiujiumin
Join Date: May 2013
Posts: 9
Rep Power: 12
jiujiumin is on a distinguished road
Quote:
Originally Posted by sagnikmazumdar View Post
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
Hi sagnikmazumdar
Do you have the incompressible WALE model? if you have ,can you send it to me? I will very gald to share experience with you.

Thanks for all the help.
cheers
jiujiumin
jiujiumin is offline   Reply With Quote

Old   March 30, 2016, 21:50
Default dynLocalAverageSmagorinsky : 2.3.x
  #43
Member
 
Join Date: Feb 2014
Posts: 63
Rep Power: 12
Uyan is on a distinguished road
Hi all,

I tried to use dynLocalAverageSmagorinsky using OF-2.3.x

I managed to do some necessary modifications and compiled the library file without a problem. Changed the LESProperties file and controlDict file.

However I run this with rhoPimpleFoam tutorial case pitzDaily , I run into a problem that ends with a Floating point exception (core dumped)
Code:
Reading field U

Reading/calculating face flux field phi

Creating turbulence model

Selecting turbulence model type LESModel
Selecting LES turbulence model dynLocalAverageSmagorinsky
Selecting LES delta type cubeRootVol
--> FOAM Warning : 
    From function cubeRootVolDelta::calcDelta()
    in file cubeRootVolDelta/cubeRootVolDelta.C at line 52
    Case is 2D, LES is not strictly applicable

#0  Foam::error::printStack(Foam::Ostream&) in "/home/asela/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1  Foam::sigFpe::sigHandler(int) in "/home/asela/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2   in "/lib/x86_64-linux-gnu/libc.so.6"
#3  Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/home/asela/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#4  void Foam::divide<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/home/asela/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/libfluidThermophysicalModels.so"
#5   at ~/OpenFOAM/OpenFOAM-2.3.x/src/OpenFOAM/lnInclude/GeometricFieldReuseFunctions.H:368
#6  Foam::compressible::LESModels::dynLocalAverageSmagorinsky::cD_(Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh> const&) const at ~/OpenFOAM/asela-2.3.x/src/turbulenceModels/compressible/LES/dynLocalAverageSmagorinsky/dynLocalAverageSmagorinsky.C:78
#7  Foam::compressible::LESModels::dynLocalAverageSmagorinsky::updateSubGridScaleFields(Foam::GeometricField<Foam::SymmTensor<double>, Foam::fvPatchField, Foam::volMesh> const&) at ~/OpenFOAM/asela-2.3.x/src/turbulenceModels/compressible/LES/dynLocalAverageSmagorinsky/dynLocalAverageSmagorinsky.C:49
#8  Foam::compressible::LESModels::dynLocalAverageSmagorinsky::dynLocalAverageSmagorinsky(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::fluidThermo const&, Foam::word const&, Foam::word const&) at ~/OpenFOAM/asela-2.3.x/src/turbulenceModels/compressible/LES/dynLocalAverageSmagorinsky/dynLocalAverageSmagorinsky.C:146
#9  Foam::compressible::LESModel::adddictionaryConstructorToTable<Foam::compressible::LESModels::dynLocalAverageSmagorinsky>::New(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::fluidThermo const&, Foam::word const&) at ~/OpenFOAM/asela-2.3.x/src/turbulenceModels/compressible/LES/lnInclude/LESModel.H:117
#10  Foam::compressible::LESModel::New(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::fluidThermo const&, Foam::word const&) in "/home/asela/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/libcompressibleLESModels.so"
#11  Foam::compressible::turbulenceModel::addturbulenceModelConstructorToTable<Foam::compressible::LESModel>::NewturbulenceModel(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::fluidThermo const&, Foam::word const&) in "/home/asela/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/libcompressibleLESModels.so"
#12  Foam::compressible::turbulenceModel::New(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::fluidThermo const&, Foam::word const&) in "/home/asela/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/libcompressibleTurbulenceModel.so"
#13  
 in "/home/asela/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/bin/rhoPimpleFoam"
#14  __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6"
#15  
 in "/home/asela/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/bin/rhoPimpleFoam"
Here with I have attached the modified .H & .C file of dynLocalAverageSmagorinsky Model for 2.3.x.

If anyone of you have got into this trouble and found a way out please let me know how did you solve this.

Thanks
Attached Files
File Type: h dynLocalAverageSmagorinsky.H (4.2 KB, 8 views)
File Type: c dynLocalAverageSmagorinsky.C (6.1 KB, 9 views)
Uyan is offline   Reply With Quote

Old   March 31, 2016, 15:24
Default
  #44
Member
 
Krishna
Join Date: Jun 2012
Posts: 33
Blog Entries: 1
Rep Power: 13
rkc.cfd is on a distinguished road
Hi,

I just looked at the initial U file. Could you change the value to a non zero value and run the case and check if there is a floating point issue.

Also install a debug version of the code to check which variable is getting diverged.

Cheers!
rkc.cfd is offline   Reply With Quote

Old   April 2, 2016, 07:12
Default dynLocalAverageSmagorinsky : 2.3.x
  #45
Member
 
Join Date: Feb 2014
Posts: 63
Rep Power: 12
Uyan is on a distinguished road
Hi Krishna,

Thanks for your response.
I changed the initial velocity file but it did not solve the problem. I am not an expert in debugging OpenFOAM however I understand the problem comes at the step where turbulenceModel is constructed.

However many people have used this model from this thread without a problem. Here with I have attached my turbulenceModel with Make files for you to regenerate the problem on 2.3.x on debug mode, and the pitzDaily case to run.

If you have spare time please have a look at this. It compiles without any warnings or errors

This was the debug output at crash.

Code:
Create mesh for time = 0


PIMPLE: no residual control data found. Calculations will employ 3 corrector loops

Reading thermophysical properties

Selecting thermodynamics package 
{
    type            hePsiThermo;
    mixture         pureMixture;
    transport       const;
    thermo          eConst;
    equationOfState perfectGas;
    specie          specie;
    energy          sensibleInternalEnergy;
}

Reading field U

Reading/calculating face flux field phi

Creating turbulence model

Selecting turbulence model type LESModel
Selecting LES turbulence model dynLocalAverageSmagorinsky
Selecting LES delta type cubeRootVol
--> FOAM Warning : 
    From function cubeRootVolDelta::calcDelta()
    in file cubeRootVolDelta/cubeRootVolDelta.C at line 52
    Case is 2D, LES is not strictly applicable


Program received signal SIGFPE, Arithmetic exception.
0x00007ffff41cea86 in Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) ()
   from /home/asela/OpenFOAM/OpenFOAM-2.3.x/platforms/linux64GccDPOpt/lib/libOpenFOAM.so
Attached Files
File Type: gz dynLocalAverageSmagorinsky23x.tar.gz (30.0 KB, 11 views)
File Type: gz pitzDaily.tar.gz (50.0 KB, 11 views)

Last edited by Uyan; April 2, 2016 at 07:13. Reason: attach files
Uyan is offline   Reply With Quote

Old   April 2, 2016, 08:54
Default dynLocalAverageSmagorinsky : 2.3.x
  #46
Member
 
Join Date: Feb 2014
Posts: 63
Rep Power: 12
Uyan is on a distinguished road
Hi Krishnan,

Looks like now the problem is solved , by setting

Code:
unset FOAM_SIGFPE
, solves the problem at the moment and solver runs through iterations.
Uyan is offline   Reply With Quote

Old   April 3, 2016, 07:58
Default shock wave
  #47
New Member
 
kalpa lakmal
Join Date: Apr 2016
Location: srilanka
Posts: 3
Rep Power: 10
kalpa is on a distinguished road
when change the U in the 0 file for the rhoCentralForm for the oblique shock on the wedge, mach numer also will change according that velocity how it is happening pz explain it to me
kalpa is offline   Reply With Quote

Old   April 4, 2016, 16:59
Default
  #48
Member
 
Krishna
Join Date: Jun 2012
Posts: 33
Blog Entries: 1
Rep Power: 13
rkc.cfd is on a distinguished road
It s good that solver is going through after resetting the flag. I dont know what that flag does. To install Debug version use the following link:

http://www.tfd.chalmers.se/~hani/kur...OwnLaptop.html

Also to know more about debugging check the following links:

http://www.tfd.chalmers.se/~hani/kur.../debugging.pdf

https://openfoamwiki.net/index.php/HowTo_debugging

I don't have a 2.3.x version to check the code.
rkc.cfd is offline   Reply With Quote

Old   May 10, 2016, 07:20
Default
  #49
Senior Member
 
zhangyan's Avatar
 
Yan Zhang
Join Date: May 2014
Posts: 120
Rep Power: 11
zhangyan is on a distinguished road
Quote:
Originally Posted by deji View Post
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
Hello Deji,
I have something confused about you code.
In Martin's paper, Tau_kk = C_I * alpha .
As we know, Tau_kk = 2 K_sgs.
But in your code, K_sgs = C_I * alpha /rho.
I think it should be K_sgs = 0.5 * C_I * alpha /rho.
Maybe you transferred "0.5" to other place and I didn't see.
zhangyan is offline   Reply With Quote

Old   January 27, 2020, 07:09
Exclamation SGS Kinetic Energy Calculation
  #50
Member
 
godfatherBond's Avatar
 
Maximus Arelius
Join Date: Jan 2017
Location: Morocco
Posts: 35
Rep Power: 9
godfatherBond is on a distinguished road
Quote:
Originally Posted by zhangyan View Post
Hello Deji,
I have something confused about you code.
In Martin's paper, Tau_kk = C_I * alpha .
As we know, Tau_kk = 2 K_sgs.
But in your code, K_sgs = C_I * alpha /rho.
I think it should be K_sgs = 0.5 * C_I * alpha /rho.
Maybe you transferred "0.5" to other place and I didn't see.
Hi Yan Zhang,
I also believe that
Code:
k_ = 0.5*Taukk.
Hence, there should not be a factor of 2.0 there. Did you fix it and validate the code?
__________________
--
🃏Maximus🃏

Last edited by godfatherBond; January 28, 2020 at 01:54.
godfatherBond is offline   Reply With Quote

Old   January 27, 2020, 23:03
Thumbs up Updated Compressible Dynamic Smagorinksy (v4, v5)
  #51
Member
 
godfatherBond's Avatar
 
Maximus Arelius
Join Date: Jan 2017
Location: Morocco
Posts: 35
Rep Power: 9
godfatherBond is on a distinguished road
If anybody missed the compressible dynamic Smagorinsky model in the newer versions of OF (v4, v5,...), I am attaching a working version. The code is very well commented, hence it is easier to understand.
Also, some definitions (like filtered strain rate,..etc) are Favre Filtered to be consistent with the literature.


Please let me know you comments.
Attached Files
File Type: h dynSmagorinskyComp.H (6.3 KB, 10 views)
File Type: c dynSmagorinskyComp.C (8.9 KB, 18 views)
__________________
--
🃏Maximus🃏

Last edited by godfatherBond; January 28, 2020 at 05:22.
godfatherBond 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
LES Compressible Smagorinsky Model iyer_arvind OpenFOAM Running, Solving & CFD 26 September 9, 2014 07:22
Low-Re turbulence model for compressible flow volker OpenFOAM Programming & Development 0 March 15, 2010 10:20
LES and combustion model Margherita Cadorin CFX 0 October 29, 2008 05:24
Problem calculate Y in compressible turbulence model luca OpenFOAM Running, Solving & CFD 5 June 1, 2006 05:53
simulation of RSM in compressible mixing layer lars Main CFD Forum 0 February 19, 2004 22:40


All times are GMT -4. The time now is 06:54.