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

Issue about values of omega, k using SpalarAllmaras

Register Blogs Community New Posts Updated Threads Search

Like Tree7Likes
  • 1 Post By Yann
  • 3 Post By HPE
  • 1 Post By HPE
  • 2 Post By Yann

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 5, 2021, 16:40
Default Issue about values of omega, k using SpalarAllmaras
  #1
New Member
 
Sandro Brad Martinez Sardon
Join Date: Sep 2021
Posts: 16
Rep Power: 4
sandrobrad is on a distinguished road
Hi there!,
I'm just wondering if I'm able to know what are the values of k and omega using SpalartAllmaras model.

My idea is to implement the follwing code in the controlDict:
Code:
turbulenceFields1
    {
        // Mandatory entries (unmodifiable)
        type            turbulenceFields;
        libs            (fieldFunctionObjects);

        // Mandatory entries (runtime modifiable)
        // Either field or fields entries
        
        field k;
        field omega;

        // Optional (inherited) entries
    
        enabled         true;
        log             true;
        timeStart       0;
        timeEnd         20000;
        executeControl  timeStep;
        executeInterval 1;
        writeControl    timeStep;
        writeInterval   1;
    }
Eventually, I wasn't able to get these values because the following error appears:


Code:
#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in /lib/x86_64-linux-gnu/libpthread.so.0
#3  Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) at ??:?
#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&) at ??:?
#5  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) at ??:?
#6  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::functionObjects::turbulenceFields::omega<Foam::IncompressibleTurbulenceModel<Foam::transportModel> >(Foam::IncompressibleTurbulenceModel<Foam::transportModel> const&) const at ??:?
#7  Foam::functionObjects::turbulenceFields::execute() at ??:?
#8  Foam::functionObjects::timeControl::execute() at ??:?
#9  Foam::functionObjectList::execute() at ??:?
#10  Foam::Time::run() const at ??:?
#11  Foam::Time::loop() at ??:?
#12  Foam::simpleControl::loop() at ??:?
#13  ? in /usr/lib/openfoam/openfoam2106/platforms/linux64GccDPInt32Opt/bin/simpleFoam
#14  __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
#15  ? in /usr/lib/openfoam/openfoam2106/platforms/linux64GccDPInt32Opt/bin/simpleFoam
Floating point exception (core dumped)

Do you have any idea about what's going on or where shoould I start? Is it posible to get k omega values if I'm using other turbulence model?
Thanks in advance.
sandrobrad is offline   Reply With Quote

Old   October 6, 2021, 04:15
Default
  #2
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,066
Rep Power: 26
Yann will become famous soon enough
Hi Sandro,

All the RANS turbulence models in OpenFOAM computes the turbulence visocity nut. Each model uses a specific set of equations for this.

Spalart-Almaras is a one equation model computing a modified turbulence viscosity named nuTilda.
The k-omega family is based on a two equation model computing the kinetic energy (k) and turbulence specific dissipation rate (omega).

Spalart-Almaras does not have anything to do with k and omega so you cannot get these values from a case running with Spalart-Almaras. Generally speaking, when you are using a turbulence model you can only access to variables computed by this model.

Yann
sandrobrad likes this.
Yann is offline   Reply With Quote

Old   October 8, 2021, 11:46
Default
  #3
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 12
HPE is on a distinguished road
With v2106, you should be able to estimate (see Yann's comments) k and omega field from the SpalartAllmaras model: openfoam-v2106/solver-and-physics#turbulence-field-estimation

With which version have you tried your case? If that was the v2106, could you post a MWE, so that we can reproduce the error?

Thanks.
Yann, hogsonik and sandrobrad like this.
HPE is offline   Reply With Quote

Old   October 8, 2021, 11:47
Default
  #4
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 932
Rep Power: 12
HPE is on a distinguished road
Also the correct syntax is:

fields( k omega );
sandrobrad likes this.
HPE is offline   Reply With Quote

Old   October 8, 2021, 12:14
Default
  #5
Senior Member
 
Yann
Join Date: Apr 2012
Location: France
Posts: 1,066
Rep Power: 26
Yann will become famous soon enough
Good point HPE, I did not know this function object.

My bad, I should have had a look at it after reading Sandro's initial post.

Thanks,
Yann
HPE and sandrobrad like this.
Yann is offline   Reply With Quote

Old   October 8, 2021, 17:43
Default
  #6
New Member
 
Sandro Brad Martinez Sardon
Join Date: Sep 2021
Posts: 16
Rep Power: 4
sandrobrad is on a distinguished road
Okay I implemented the following function in the controlDict:
Code:
turbulenceFields1
    {
        // Mandatory entries (unmodifiable)
        type            turbulenceFields;
        libs            (fieldFunctionObjects);

        // Mandatory entries (runtime modifiable)
        // Either field or fields entries
        
        fields
            (
            k
            epsilon
            nut
            nuEff
            R
            devReff
            L
            I
            );

        // Optional (inherited) entries
    
        enabled         true;
        log             true;
        timeStart       0;
        timeEnd         20000;
        executeControl  timeStep;
        executeInterval 100;
        writeControl    timeStep;
        writeInterval   100;
    }
Then I start the simulation and every 100 step the solver creates a folder corresponding to the timesimulation, every 100s and so on. Well, my question is that I don't know what's the file created called turbulenceProperties:k,turbulencePropertiesmega. ... . I mean, I don't know how to interpret that amount of values. Please could you help me telling me what is the purpose of these values because I'm looking for initial values of omega, k in order to start to use the komegasst turbulence model.

By other hand, since the beginning I wanted to sim using the komegaSST but I don't know the initial omega and k values. So I thought that using the spalartallmaras turbulence model, checking the values of k and omega and use these values could be a good idea but, ¿what values from the spalartallmaras sim should I use in order to get these values? Thanks in advance and feel free to ask me whatever you want.
Best regards and thanks for ur answers.
sandrobrad is offline   Reply With Quote

Old   October 8, 2021, 17:59
Default
  #7
New Member
 
Sandro Brad Martinez Sardon
Join Date: Sep 2021
Posts: 16
Rep Power: 4
sandrobrad is on a distinguished road
Note that in the fields I didn't add the omega. When I add that feature the simulation stops and the following message prints out :

Code:
 PyFoam WARNING on line 37 of file /home/sandrobrad/.local/lib/python3.8/site-packages/PyFoam/Infrastructure/ServerBase.py : No certficate file /home/sandrobrad/.pyFoam/foamServerCertificate.cert exists. Therefor no SSL-connection for the FoamServer possible
 To generate a private key:
    openssl genrsa -out /home/sandrobrad/.pyFoam/foamServerCertificate.key 2048 
Then generate the cerificate that is valid for 3 years with 
    openssl req -new -x509 -key /home/sandrobrad/.pyFoam/foamServerCertificate.key -out /home/sandrobrad/.pyFoam/foamServerCertificate.cert -days 1095 
/*---------------------------------------------------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  2106                                  |
|   \\  /    A nd           | Website:  www.openfoam.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
Build  : _7b82832f-20210625 OPENFOAM=2106
Arch   : "LSB;label=32;scalar=64"
Exec   : simpleFoam
Date   : Oct 08 2021
Time   : 23:54:39
Host   : sandrobrad-GL753VD
PID    : 11703
I/O    : uncollated
Case   : /home/sandrobrad/steady0012/spalartallmaras
nProcs : 1
trapFpe: Floating point exception trapping enabled (FOAM_SIGFPE).
fileModificationChecking : Monitoring run-time modified files using timeStampMaster (fileModificationSkew 5, maxFileModificationPolls 20)
allowSystemOperations : Allowing user-supplied system call operations

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0


SIMPLE: convergence criteria
    field p     tolerance 1e-10
    field U     tolerance 1e-10
    field nuTilda     tolerance 1e-10
    field "(k|epsilon|omega)"     tolerance 1e-10

Reading field p

Reading field U

Reading/calculating face flux field phi

Selecting incompressible transport model Newtonian
Selecting turbulence model type RAS
Selecting RAS turbulence model SpalartAllmaras
Selecting patchDistMethod meshWave
RAS
{
    RASModel        SpalartAllmaras;
    turbulence      on;
    printCoeffs     on;
    sigmaNut        0.666667;
    kappa           0.41;
    Cb1             0.1355;
    Cb2             0.622;
    Cw2             0.3;
    Cw3             2;
    Cv1             7.1;
    Cs              0.3;
}

No MRF models present

No finite volume options present

Starting time loop

turbulenceFields turbulenceFields1: storing fields:
    turbulenceProperties:nut
    turbulenceProperties:nuEff
    turbulenceProperties:k
    turbulenceProperties:R
    turbulenceProperties:I
    turbulenceProperties:L
    turbulenceProperties:devReff
    turbulenceProperties:omega
    turbulenceProperties:epsilon

forceCoeffs forceCoeffs1:
    rho: rhoInf
    Freestream density (rhoInf) set to 1.225
    Not including porosity effects

Time = 1

smoothSolver:  Solving for Ux, Initial residual = 1, Final residual = 0.00635739, No Iterations 12
smoothSolver:  Solving for Uy, Initial residual = 1, Final residual = 0.00335301, No Iterations 12
GAMG:  Solving for p, Initial residual = 1, Final residual = 0.00993536, No Iterations 181
time step continuity errors : sum local = 0.000983448, global = 2.92864e-06, cumulative = 2.92864e-06
smoothSolver:  Solving for nuTilda, Initial residual = 1, Final residual = 0.00868777, No Iterations 12
ExecutionTime = 1.69 s  ClockTime = 1 s

#0  Foam::error::printStack(Foam::Ostream&) at ??:?
#1  Foam::sigFpe::sigHandler(int) at ??:?
#2  ? in /lib/x86_64-linux-gnu/libpthread.so.0
#3  Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) at ??:?
#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&) at ??:?
#5  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) at ??:?
#6  Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::functionObjects::turbulenceFields::omega<Foam::IncompressibleTurbulenceModel<Foam::transportModel> >(Foam::IncompressibleTurbulenceModel<Foam::transportModel> const&) const at ??:?
#7  Foam::functionObjects::turbulenceFields::execute() at ??:?
#8  Foam::functionObjects::timeControl::execute() at ??:?
#9  Foam::functionObjectList::execute() at ??:?
#10  Foam::Time::run() const at ??:?
#11  Foam::Time::loop() at ??:?
#12  Foam::simpleControl::loop() at ??:?
#13  ? in /usr/lib/openfoam/openfoam2106/platforms/linux64GccDPInt32Opt/bin/simpleFoam
#14  __libc_start_main in /lib/x86_64-linux-gnu/libc.so.6
#15  ? in /usr/lib/openfoam/openfoam2106/platforms/linux64GccDPInt32Opt/bin/simpleFoam
Floating point exception (core dumped)

And you may wondering, how do you know that issue is related with the omega?.
Okay, I know it beacause if I eliminate the omega in the fields, the sim works perfectly. So , there is something strange with the omega in that function. Do you know what is going on? Thanks in advance.
sandrobrad 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
Y+ values for engine port analysis- SST k omega pary07 STAR-CCM+ 3 January 30, 2018 15:07
Instabilities with too low yplus values? BendikS OpenFOAM Running, Solving & CFD 0 February 27, 2017 05:37
how to calculate the omega at inlet boundary in k omega sst Scabbard OpenFOAM Running, Solving & CFD 2 September 30, 2014 13:06
exact face values RubenG Main CFD Forum 0 June 22, 2009 11:09
strange node values @ solid/fluid interface - help JB FLUENT 2 November 1, 2008 12:04


All times are GMT -4. The time now is 18:00.