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

twoPhaseEulerFoam and LES

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools 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: 165
Rep Power: 14
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, 17 views)
File Type: gz twoPhaseLESEulerFoam.tar.gz (8.1 KB, 18 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: 178
Rep Power: 6
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, 03:18
Default
  #43
New Member
 
mrityunjay sahu
Join Date: Jun 2013
Posts: 5
Rep Power: 4
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, 05:07
Default
  #44
Senior Member
 
Gerhard Holzinger
Join Date: Feb 2012
Location: Austria
Posts: 165
Rep Power: 14
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

Reply

Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On



All times are GMT -4. The time now is 12:29.