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

simpleFoam tutorial PitzDaily using Reynolds stress tensor (LRR RASModel)

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

Like Tree16Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 2, 2022, 04:36
Default
  #21
Senior Member
 
Carlos Rubio Abujas
Join Date: Jan 2018
Location: Spain
Posts: 127
Rep Power: 9
crubio.abujas is on a distinguished road
Hi lpz456,


Sadly, I've never succeded in making this tutorial to work. Even trying relaxation factor as low as 0.05 during 20k iteration the solution converges and maintain this "transient" behaviour. I found curious that the turbulent fields (R, epsilon, nut) seem to be converged, but velocity ad pressure keeps oscilating.



I've tried it on v7 and v2012 in case is some implementation error, but no luck. I guess there is something on the setting I'm mising, but I cannot figure out what.
crubio.abujas is offline   Reply With Quote

Old   March 2, 2022, 12:03
Default
  #22
Senior Member
 
Carlos Rubio Abujas
Join Date: Jan 2018
Location: Spain
Posts: 127
Rep Power: 9
crubio.abujas is on a distinguished road
After some time I tried again to run this case, with some minor advances:

1. I figured out that R relaxationFactor sould be in "equations" instead of "fields"

As far as I know, the differente is on fields the new value is applied directly to the new field, where on the case of "equations" it is used to relax the solving matrix.

2. I've observed that sometimes the tolerance of the R fields drops abruptly to 1e-10 or so and is kept stuck due to solver settings. To avoid this I set a minimum of 1 iteration on each field on the solvers. I algo tried to tight the relative and absolute tolerance of the solvers.

3. I've check the results of the kEpsilon case against some literature found on internet. I've found a comparative on the results for LRR, kEpsilon and
kOmega. Here the link.

Sadly, I did not find enough information in this file to replicate the results on LRR. When comparing the results, the kEpsilon case is quite similar to the results presented here.

The results on velocity and nut are pretty similar among the three turbulence models. As on the current approach we are pre-initiallizing the fields with the results of kEpsilon I expected minor changes on these fields. However what I've seen is a drastic variation on all the profiles, which makes me doubt about the usefullness of the preinitialization.

Following this line of reasoning, as I consider that mi initial guess is pretty close to the final results, I imposed a strong relaxation factor on U and p, hoping that the turbulence fields can update fast enought to keep them close to the initial value. However I had no success.

I share the current state of mi fvSolution file in case it can be helpfull for anyone trying to replicate this tutorial.


system/fvSolution
Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  7
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version         2;
    format          ascii;
    class           dictionary;
    location        "system";
    object          fvSolution;
}

solvers
{
    p
    {
        solver          GAMG;
        tolerance       1e-08;
        relTol          0.01;
        smoother        GaussSeidel;
    }
    "(U|k|epsilon|omega|f|v2)"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1e-08;
        relTol          0.001;
        minIter         1;
    }
    R
    {
        solver          GAMG;
        smoother        GaussSeidel;
        tolerante       1e-08;
        relTol          0.001;
        minIter         1;
    }
}

SIMPLE
{
    nNonOrthogonalCorrectors 0;
    consistent      yes;
}

relaxationFactors
{
    fields
    {
        p               0.01;
    }
    equations
    {
        U               0.05;
        R               0.01;
        epsilon         0.05;
    }
}


// ************************************************************************* //
lpz456 likes this.
crubio.abujas is offline   Reply With Quote

Old   March 6, 2022, 20:15
Default
  #23
New Member
 
SunTime
Join Date: Nov 2020
Posts: 14
Rep Power: 5
lpz456 is on a distinguished road
Quote:
Originally Posted by crubio.abujas View Post
After some time I tried again to run this case, with some minor advances:

1. I figured out that R relaxationFactor sould be in "equations" instead of "fields"

As far as I know, the differente is on fields the new value is applied directly to the new field, where on the case of "equations" it is used to relax the solving matrix.

2. I've observed that sometimes the tolerance of the R fields drops abruptly to 1e-10 or so and is kept stuck due to solver settings. To avoid this I set a minimum of 1 iteration on each field on the solvers. I algo tried to tight the relative and absolute tolerance of the solvers.

3. I've check the results of the kEpsilon case against some literature found on internet. I've found a comparative on the results for LRR, kEpsilon and
kOmega. Here the link.

Sadly, I did not find enough information in this file to replicate the results on LRR. When comparing the results, the kEpsilon case is quite similar to the results presented here.

The results on velocity and nut are pretty similar among the three turbulence models. As on the current approach we are pre-initiallizing the fields with the results of kEpsilon I expected minor changes on these fields. However what I've seen is a drastic variation on all the profiles, which makes me doubt about the usefullness of the preinitialization.

Following this line of reasoning, as I consider that mi initial guess is pretty close to the final results, I imposed a strong relaxation factor on U and p, hoping that the turbulence fields can update fast enought to keep them close to the initial value. However I had no success.

I share the current state of mi fvSolution file in case it can be helpfull for anyone trying to replicate this tutorial.


system/fvSolution
Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  7
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version         2;
    format          ascii;
    class           dictionary;
    location        "system";
    object          fvSolution;
}

solvers
{
    p
    {
        solver          GAMG;
        tolerance       1e-08;
        relTol          0.01;
        smoother        GaussSeidel;
    }
    "(U|k|epsilon|omega|f|v2)"
    {
        solver          smoothSolver;
        smoother        symGaussSeidel;
        tolerance       1e-08;
        relTol          0.001;
        minIter         1;
    }
    R
    {
        solver          GAMG;
        smoother        GaussSeidel;
        tolerante       1e-08;
        relTol          0.001;
        minIter         1;
    }
}

SIMPLE
{
    nNonOrthogonalCorrectors 0;
    consistent      yes;
}

relaxationFactors
{
    fields
    {
        p               0.01;
    }
    equations
    {
        U               0.05;
        R               0.01;
        epsilon         0.05;
    }
}


// ************************************************************************* //
Thank you for your reply.
Recently, I also noticed the link you provided. In fact, there is information worthy of attention in the link. The openfoam version in the link is 1.7.1. By comparing with openfoamv2106, you will find that the LRR model has changed significantly. There is an item called wall reflection in the new version.
I tried to close the wall reflection term in the turbulenceproperties file and use the uniform initial field of R. The convergence has been significantly improved! Although there are still some unsteady properties.
Therefore, at present, I locate the convergence problem in the LRR model itself (especially the wall reflection term). I intend to study the equation itself first, and then solve the convergence problem.
Good luck, too!
lpz456 is offline   Reply With Quote

Old   March 6, 2022, 21:14
Default
  #24
New Member
 
SunTime
Join Date: Nov 2020
Posts: 14
Rep Power: 5
lpz456 is on a distinguished road
Unfortunately, after consulting fluent's theory manual, I found that the wall reflection term is switched on by default. In the case I studied, the simulation by fluent has good convergence, but by openfoam always diverges.
lpz456 is offline   Reply With Quote

Old   August 4, 2023, 14:29
Default
  #25
New Member
 
Lennin Amorim
Join Date: Oct 2022
Posts: 1
Rep Power: 0
Artch is on a distinguished road
Quote:
Originally Posted by dlahaye View Post
Abstract

3/ Case Set-Up

Step 2/3: Setting up the 0-folder
In the second step we edit the 0-folder. We do *not* define the boundary conditions for the components of the tensor R for inlet, outlet and wall patches directly. Instead, we resort to a two-substep procedure in which in the first substep, a simulation using a two-equation turbulence model runs for a number of iterations. In the second substep, the stress tensor R is computed in post-processing stage for the latest iteration. This computed stress tensor is used as boundary value setting for the simulation using the LRR model.

More specifically, in the first substep, we run simpleFoam on the out-of-the-box tutorial. At the last iteration (iteration 283 in our case) we compute the stress tensor R by post-processing computed results and running simpleFoam -postProcess -func R -latestTime. This command produce a file called turbulenceProperties: R in the latest time folder (folder 283). This file can be renamed to R and copied to the 0-folder. Observe that the settings for the turbulence equation used in the first run is used as input to compute R. One can thus *not* modify the constant-folder/turbulenceProperties-file prior to computing R. One can visualize components and magnitude of the tensor R in paraview.

I've had abysmal convergence problems with the running first the k-Epsilon tutorial first and using the R field for the last iteration.


I managed to get much better results runing the simpleFoam -postProcess -func R -latestTime command on a clean k-epsilon case, and then changing the turbulence model.


https://www.cfd.at/sites/default/fil...ExampleSix.pdf
ABgabriel13 likes this.
Artch is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Calculating Reynolds stress in steady RANS tjhkenneth SU2 0 February 9, 2020 14:36
simpleFoam: Reynolds Stress, turbulenceProperties:R, no output FoamingSimon OpenFOAM 16 October 10, 2019 07:24
Turbulent DFSEM reynolds stress calculation ssa_cfd OpenFOAM Running, Solving & CFD 0 February 1, 2019 08:23
Modified simpleFOAM using given Reynolds stress field K62 OpenFOAM Running, Solving & CFD 2 March 24, 2017 03:41
Reynolds Stress Models Roued Main CFD Forum 20 February 8, 2000 02:58


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