CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   RASmodel laminar vs. simulationType laminar (https://www.cfd-online.com/Forums/openfoam-solving/147659-rasmodel-laminar-vs-simulationtype-laminar.html)

thiagopl January 26, 2015 15:40

RASmodel laminar vs. simulationType laminar
 
Hi,

I'm using the buoyantBoussinesqSimpleFoam in OF 2.3.1 to solve the classical vertically heated square enclosure with laminar flow (Ra=10^3 ).
My first question is: What is the differennce between setting simulationType laminar in the turbulenceProperties dictionary and RASmodel laminar in RASProperties dictionary?
Actually, I notice that the turbulenceProperties is not necessary when you set RASmodel laminar in RASProperties. However, the opposite is not true.
Another question is: If the turbulence model is off, why do I still need to set all the turbulent properties in the /0 folder?

Tkz.

alexeym January 27, 2015 03:26

Hi,

Here is how buoyantBoussinesqSimpleFoam creates turbulence model:

Code:

...
    Info<< "Creating turbulence model\n" << endl;
    autoPtr<incompressible::RASModel> turbulence
    (
        incompressible::RASModel::New(U, phi, laminarTransport)
    );
...

And if you look at RASModel::New, you will see, first it reads RASProperties file:

Code:

autoPtr<RASModel> RASModel::New
(
    const volVectorField& U,
    const surfaceScalarField& phi,
    transportModel& transport,
    const word& turbulenceModelName
)
{
    // get model name, but do not register the dictionary
    // otherwise it is registered in the database twice
    const word modelType
    (
        IOdictionary
        (
            IOobject
            (
                "RASProperties",
                U.time().constant(),
                U.db(),
                IOobject::MUST_READ_IF_MODIFIED,
                IOobject::NO_WRITE,
                false
            )
        ).lookup("RASModel")
    );

    Info<< "Selecting RAS turbulence model " << modelType << endl;

    dictionaryConstructorTable::iterator cstrIter =
        dictionaryConstructorTablePtr_->find(modelType);
    ...

But if you look at another solver, for example, pimpleFoam, which deals with turbulence in more general way (i.e. you can use LES models with it):

Code:

autoPtr<incompressible::turbulenceModel> turbulence
(
    incompressible::turbulenceModel::New(U, phi, laminarTransport)
);

and in this case it will first read turbulenceProperties file:

Code:

autoPtr<turbulenceModel> turbulenceModel::New
(
    const volVectorField& U,
    const surfaceScalarField& phi,
    transportModel& transport,
    const word& turbulenceModelName
)
{
    // get model name, but do not register the dictionary
    // otherwise it is registered in the database twice
    const word modelType
    (
        IOdictionary
        (
            IOobject
            (
                "turbulenceProperties",
                U.time().constant(),
                U.db(),
                IOobject::MUST_READ_IF_MODIFIED,
                IOobject::NO_WRITE,
                false
            )
        ).lookup("simulationType")
    );
    ...
}

Finally, if you keep turbulence model other than laminar in RASProperties but switch off turbulence, you still need turbulence IC and BC because turbulence model will create these fields and read them in constructor. But will skip any recalculation of turbulence properties.

thiagopl January 27, 2015 11:28

Ok, thank you for the answer.

I'm still in the superficial user level so... this is what I got: this is a carachteristic of the way the buoyantBoussinesqSimpleFoam creates the turbulence model (previously set as RASmodel (?)). In others applications, turbulencePropertires might be read first and then we need to set simulationType in turbulenceProperties. Once laminar was choosed, we shouldn't need any <tubulenceModel>Properties dictionary.

Ok?

alexeym January 27, 2015 11:38

Yes, that is correct.

And answering your original question, there's no physical difference between "simulationType laminar" and "RASModel laminar". Both return zero volume fields for nut, k, epsilon, and omega. Difference is in the way classes are instantiated.


All times are GMT -4. The time now is 02:46.