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

twoPhaseEulerFoam and LES

Register Blogs Community New Posts Updated Threads Search

Like Tree2Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 14, 2012, 11:20
Exclamation twoPhaseEulerFoam with LES - a quick (and dirty) shot
  #41
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 339
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
I gave it a try to hack a large eddy turbulence model into twoPhaseEulerFoam.

My approach is based on the assumption, that with LES only nuEffa and nuEffb are directly influenced. So I changed the definition of them. Also the large eddy model is calculated for the mixture like it is done in multiPhaseEulerFoam.

I added this code to createFields.H

Code:
// new for LES
    singlePhaseTransportModel fluid(U, phi);

    autoPtr<incompressible::LESModel> sgsModel
    (
        incompressible::LESModel::New(U, phi, fluid)
    );

    Info<< "Calculating field nuEffa\n" << endl;
    volScalarField nuEffa
    (
        IOobject
        (
            "nuEffa",
            runTime.timeName(),
            mesh,
            IOobject::NO_READ,
            IOobject::NO_WRITE
        ),
        sgsModel->nut() + nua
        //sqr(Ct)*nutb + nua
    );

    Info<< "Calculating field nuEffb\n" << endl;
    volScalarField nuEffb
    (
        IOobject
        (
            "nuEffb",
            runTime.timeName(),
            mesh,
            IOobject::NO_READ,
            IOobject::NO_WRITE
        ),
        sgsModel->nut() + nub
        //nutb + nub
    );
To the file twoPhaseEulerFoam.C two lines were added

Code:
#include "singlePhaseTransportModel.H"
#include "LESModel.H"
In the file UEqns.H the following changes were made

Code:
        //nuEffa = sqr(Ct)*nutb + nua;
        nuEffa = sgsModel->nut() + nua;

        /*volTensorField Rca
        (
            "Rca",
            ((2.0/3.0)*I)*(sqr(Ct)*k + nuEffa*tr(gradUaT)) - nuEffa*gradUaT
        );*/
        volTensorField Rca
        (
            "Rca",
            ((2.0/3.0)*I)*(nuEffa*tr(gradUaT)) - nuEffa*gradUaT
        );
nuEffb and Rcb were altered accordingly.


I attached the source files, from which I removed stuff related to kinetic theory (which I do not need). For reasons of file size limitation the folders Make, interfacialModels and phaseModel are not included in the archive.

There is also a modified case based on the pitzDaily tutorial of pisoFoam included. The initial condition on alpha is that alpha is zero everywhere. This should guarantee a certain level of similarity to the pitzDaily case of pisoFoam. Viscosity is set to match the value of the pitzDaily case of pisoFoam, alos gravity is set to zero. I used in both cases the dynamicSmagorinsky LESModel of Alberto (https://github.com/AlbertoPa/dynamicSmagorinsky/)

The qualitative behaviour looks similar to the results of pisoFoam, but I did no validation yet.

What do you think of all this?
Attached Files
File Type: gz pitzDailyTwoPhaseLES.tar.gz (3.9 KB, 24 views)
File Type: gz twoPhaseLESEulerFoam.tar.gz (8.1 KB, 24 views)
GerhardHolzinger is offline   Reply With Quote

Old   June 15, 2012, 03:17
Default
  #42
Senior Member
 
Albrecht vBoetticher
Join Date: Aug 2010
Location: Zürich, Swizerland
Posts: 237
Rep Power: 16
vonboett is on a distinguished road
Looks good to me so far. I am looking forward to someone validating your code with DNS or Experimental Data.

Maybe a possible step would be to ask Saffari/Hosseinnia for their OpenFOAM model they used in "Two-phase Euler-Lagrange CFD simulation of evaporative cooling in a Wind Tower" In: Energy and Buildings, vol. 41 issue 9, 2009, and compare your simulation to their figure 6 which compares the simulation with analytical data. The setup allows to compare lots of single aspects like drop size, velocity, tower diameter etc.

In September it will be decided if my project treating sediment transport is accepted, if yes I will try out your code.
vonboett is offline   Reply With Quote

Old   November 9, 2013, 02:18
Default
  #43
New Member
 
mrityunjay sahu
Join Date: Jun 2013
Posts: 5
Rep Power: 12
m00nmun is on a distinguished road
Quote:
Originally Posted by GerhardHolzinger View Post
I gave it a try to hack a large eddy turbulence model into twoPhaseEulerFoam.

My approach is based on the assumption, that with LES only nuEffa and nuEffb are directly influenced. So I changed the definition of them. Also the large eddy model is calculated for the mixture like it is done in multiPhaseEulerFoam.

I added this code to createFields.H

Code:
// new for LES
    singlePhaseTransportModel fluid(U, phi);

    autoPtr<incompressible::LESModel> sgsModel
    (
        incompressible::LESModel::New(U, phi, fluid)
    );

    Info<< "Calculating field nuEffa\n" << endl;
    volScalarField nuEffa
    (
        IOobject
        (
            "nuEffa",
            runTime.timeName(),
            mesh,
            IOobject::NO_READ,
            IOobject::NO_WRITE
        ),
        sgsModel->nut() + nua
        //sqr(Ct)*nutb + nua
    );

    Info<< "Calculating field nuEffb\n" << endl;
    volScalarField nuEffb
    (
        IOobject
        (
            "nuEffb",
            runTime.timeName(),
            mesh,
            IOobject::NO_READ,
            IOobject::NO_WRITE
        ),
        sgsModel->nut() + nub
        //nutb + nub
    );
To the file twoPhaseEulerFoam.C two lines were added

Code:
#include "singlePhaseTransportModel.H"
#include "LESModel.H"
In the file UEqns.H the following changes were made

Code:
        //nuEffa = sqr(Ct)*nutb + nua;
        nuEffa = sgsModel->nut() + nua;

        /*volTensorField Rca
        (
            "Rca",
            ((2.0/3.0)*I)*(sqr(Ct)*k + nuEffa*tr(gradUaT)) - nuEffa*gradUaT
        );*/
        volTensorField Rca
        (
            "Rca",
            ((2.0/3.0)*I)*(nuEffa*tr(gradUaT)) - nuEffa*gradUaT
        );
nuEffb and Rcb were altered accordingly.


I attached the source files, from which I removed stuff related to kinetic theory (which I do not need). For reasons of file size limitation the folders Make, interfacialModels and phaseModel are not included in the archive.

There is also a modified case based on the pitzDaily tutorial of pisoFoam included. The initial condition on alpha is that alpha is zero everywhere. This should guarantee a certain level of similarity to the pitzDaily case of pisoFoam. Viscosity is set to match the value of the pitzDaily case of pisoFoam, alos gravity is set to zero. I used in both cases the dynamicSmagorinsky LESModel of Alberto (https://github.com/AlbertoPa/dynamicSmagorinsky/)

The qualitative behaviour looks similar to the results of pisoFoam, but I did no validation yet.

What do you think of all this?


I have tried the file pitzDailyTwoPhaseLES. However I am getting following error:

--> FOAM FATAL IO ERROR:
keyword Ct is undefined in dictionary "/home/mj/Desktop/twoPhaseEulerFoamLES/constant/transportProperties"

file: /home/mj/Desktop/twoPhaseEulerFoamLES/constant/transportProperties from line 21 to line 41.

From function dictionary::lookupEntry(const word&, bool, bool) const
in file db/dictionary/dictionary.C at line 400.

FOAM exiting


I am new to OpenFOAM kindly advised.
m00nmun is offline   Reply With Quote

Old   November 11, 2013, 04:07
Default
  #44
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 339
Rep Power: 28
GerhardHolzinger will become famous soon enoughGerhardHolzinger will become famous soon enough
Quote:
Originally Posted by m00nmun View Post
I have tried the file pitzDailyTwoPhaseLES. However I am getting following error:

--> FOAM FATAL IO ERROR:
keyword Ct is undefined in dictionary "/home/mj/Desktop/twoPhaseEulerFoamLES/constant/transportProperties"

file: /home/mj/Desktop/twoPhaseEulerFoamLES/constant/transportProperties from line 21 to line 41.

From function dictionary::lookupEntry(const word&, bool, bool) const
in file db/dictionary/dictionary.C at line 400.

FOAM exiting


I am new to OpenFOAM kindly advised.

The error message says, that you need to specify a constant named "Ct" in the file transportProperties. Believe it or not, most of the times the error messages reported by OpenFOAM are very meaningful.
GerhardHolzinger is offline   Reply With Quote

Old   November 16, 2017, 22:48
Default
  #45
Senior Member
 
Join Date: Jan 2013
Posts: 372
Rep Power: 14
openfoammaofnepo is on a distinguished road
Dear Alberto,

Do you have any publication using LES twoPhaseEulerFoam for me to refer to? Thanks!

OFFO

Quote:
Originally Posted by alberto View Post
Hi,

yes, I worked on that during my PhD. I essentially used Smagorynsky type models for the gas phase to simulated gas-particle flows. The work was done with OF 1.4.0, and does not compile with more recent versions of OpenFOAM. I did not port it to OpenFOAM 1.5.x for lack of time (I'm working on a different topic right now).

What I can suggest to you is to reuse the single phase classes for LES, and adapt them at the multiphase case, which is essentially what I did.

Best regards,
openfoammaofnepo 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



All times are GMT -4. The time now is 04:49.