|
[Sponsors] |
Issue about values of omega, k using SpalarAllmaras |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
October 5, 2021, 17:40 |
Issue about values of omega, k using SpalarAllmaras
|
#1 |
New Member
Sandro Brad Martinez Sardon
Join Date: Sep 2021
Posts: 17
Rep Power: 5 |
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; } 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. |
|
October 6, 2021, 05:15 |
|
#2 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,236
Rep Power: 29 |
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 |
|
October 8, 2021, 12:46 |
|
#3 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
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.
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
October 8, 2021, 12:47 |
|
#4 |
Senior Member
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13 |
Also the correct syntax is:
fields( k omega );
__________________
The OpenFOAM community is the biggest contributor to OpenFOAM: User guide/Wiki-1/Wiki-2/Code guide/Code Wiki/Journal Nilsson/Guerrero/Holzinger/Holzmann/Nagy/Santos/Nozaki/Jasak/Primer Governance Bugs/Features: OpenFOAM (ESI-OpenCFD-Trademark) Bugs/Features: FOAM-Extend (Wikki-FSB) Bugs: OpenFOAM.org How to create a MWE New: Forkable OpenFOAM mirror |
|
October 8, 2021, 13:14 |
|
#5 |
Senior Member
Yann
Join Date: Apr 2012
Location: France
Posts: 1,236
Rep Power: 29 |
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 |
|
October 8, 2021, 18:43 |
|
#6 |
New Member
Sandro Brad Martinez Sardon
Join Date: Sep 2021
Posts: 17
Rep Power: 5 |
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; } 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. |
|
October 8, 2021, 18:59 |
|
#7 |
New Member
Sandro Brad Martinez Sardon
Join Date: Sep 2021
Posts: 17
Rep Power: 5 |
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. |
|
|
|
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 16:07 |
Instabilities with too low yplus values? | BendikS | OpenFOAM Running, Solving & CFD | 0 | February 27, 2017 06:37 |
how to calculate the omega at inlet boundary in k omega sst | Scabbard | OpenFOAM Running, Solving & CFD | 2 | September 30, 2014 14:06 |
exact face values | RubenG | Main CFD Forum | 0 | June 22, 2009 12:09 |
strange node values @ solid/fluid interface - help | JB | FLUENT | 2 | November 1, 2008 13:04 |