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

Trouble validating EBRSM model - fvOptions problem ?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 30, 2022, 10:03
Default Trouble validating EBRSM model - fvOptions problem ?
  #1
New Member
 
Kermit
Join Date: Jan 2021
Location: France
Posts: 19
Rep Power: 5
tyskies is on a distinguished road
Hello everyone,


I just implemented the EB model of Manceau, R., & Hanjalić, K. (2002) following the lines of Javadi, A. (2016). However, I'm having trouble to validate my implementation with the channel flow at Retau=395... I attached my results with the precursor simulation (left) and the simulation with EB model (right).

kOmegaSST_results.jpg EBRSM_results.jpg

Note that the u+-profile is good wtih the precursor simulation (not with the EB model) and that the flow accelerate in the centerline with the new turbulence model. This is confirmed when we look at the pressure gradient in the log of both simulations:
0.985 for the precursor simulation and 0.689 with the other.

Does anyone faced those kind of issue ?
Does anybody knows how to solve this ?

Thanks.


NB: I'm using OpenFOAM v2012.
tyskies is offline   Reply With Quote

Old   March 30, 2022, 10:58
Default
  #2
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
Good to double check your implementation: discrepancy in fvc::grad(U)

Did the EBRSM converge? Did you run the simulation long enough?
HPE is offline   Reply With Quote

Old   March 31, 2022, 13:41
Default
  #3
New Member
 
Kermit
Join Date: Jan 2021
Location: France
Posts: 19
Rep Power: 5
tyskies is on a distinguished road
Quote:
Originally Posted by HPE View Post
Good to double check your implementation: discrepancy in fvc::grad(U)

Did the EBRSM converge? Did you run the simulation long enough?
Thanks for your answer HPE !

Since yesterday:
1) I've double checked my implementation as you suggested.
2) I've compared my implementation with SSG model because the part where gradU is used is the same as in EB model.
To me, all seems good! Still attached my model and the test case:

validation_ebrsm.zip

And yes, the results that I show are converged...

Do you have any other ideas ?
Thanks a lot for the help!

Last edited by tyskies; March 31, 2022 at 15:03.
tyskies is offline   Reply With Quote

Old   March 31, 2022, 15:22
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
- uncomment "correctNut()" func.
- run the case with "simpleFoam" with "consistent=true"

May be the following is equivalent to what you have, but the new is less confusing to me
- volTensorField Omega(skew(gradU)); => volTensorField Omega(gradU.T() - gradU); // remember OpenFOAM's gradU is actually the tranpose of the usual Jacobian notation
- twoSymm(b & Omega) => twoSymm(b & Omega.T())

hope these help
HPE is offline   Reply With Quote

Old   March 31, 2022, 16:40
Default
  #5
New Member
 
Kermit
Join Date: Jan 2021
Location: France
Posts: 19
Rep Power: 5
tyskies is on a distinguished road
Quote:
Originally Posted by HPE View Post
- uncomment "correctNut()" func.
- run the case with "simpleFoam" with "consistent=true"

May be the following is equivalent to what you have, but the new is less confusing to me
- volTensorField Omega(skew(gradU)); => volTensorField Omega(gradU.T() - gradU); // remember OpenFOAM's gradU is actually the tranpose of the usual Jacobian notation
- twoSymm(b & Omega) => twoSymm(b & Omega.T())

hope these help

Thanks for your answer !


I've modified the code the way you suggested and re-run the case with pisoFoam and simpleFoam. Unfortunately (or not!), I get the same results with both solvers:

pisoFoam_EBRSM_results.jpg simpleFoam_EBRSM_results.jpg

EDIT: The horizontal axis of the top right corner figure is y+, not (x2/delta).


I think the problem is due to the way the solver adjusts the pressure gradient because it drops quickly at the beginning of the simulation...
Have you ever read a thread on those kind of issues with the meanVelocityForce option ?


Another time thanks for your help!
tyskies is offline   Reply With Quote

Old   April 1, 2022, 03:53
Default
  #6
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
I am confident that "meanVelocityForce" is fine.
How many iterations did you run in simpleFoam case?
HPE is offline   Reply With Quote

Old   April 1, 2022, 04:09
Default
  #7
New Member
 
Kermit
Join Date: Jan 2021
Location: France
Posts: 19
Rep Power: 5
tyskies is on a distinguished road
Quote:
Originally Posted by HPE View Post
I am confident that "meanVelocityForce" is fine.
How many iterations did you run in simpleFoam case?

Yes, actually I agree with you on meanVelocityForce (thinking of it during the night!).

I ran 100 000 iterations.
It looks like the Reynolds stresses and the U+-profile converged at the 25 000th iteration.
Moreover, the pressure gradient/wall shear stress is 0.7185 at the end of the simulation whereas it should be around 0.98.

Last edited by tyskies; April 1, 2022 at 04:13. Reason: Add information to my reply!
tyskies is offline   Reply With Quote

Old   April 5, 2022, 07:31
Default
  #8
New Member
 
Kermit
Join Date: Jan 2021
Location: France
Posts: 19
Rep Power: 5
tyskies is on a distinguished road
Quote:
Originally Posted by HPE View Post
I am confident that "meanVelocityForce" is fine.
How many iterations did you run in simpleFoam case?

I've done some tests and when I remove the boundary condition on epsilon I get the same results. Everything is working as if the boundary condition on epsilon isn't applied.

As my programming skills in OpenFoam are limited, have you any idea how I can improve this part ?
Moreover, what does the following command epsEqn.ref().boundaryManipulate ?


Thanks for your help!

Last edited by tyskies; April 5, 2022 at 12:43.
tyskies is offline   Reply With Quote

Old   April 6, 2022, 10:24
Default
  #9
New Member
 
Kermit
Join Date: Jan 2021
Location: France
Posts: 19
Rep Power: 5
tyskies is on a distinguished road
Quote:
Originally Posted by HPE View Post
I am confident that "meanVelocityForce" is fine.
How many iterations did you run in simpleFoam case?
I've been able to obtain correct results with the following lines for the epsilon boundary condition:

Code:
    const fvPatchList& patches = this->mesh_.boundary();
    forAll(patches, patchi)
    {
        const fvPatch& curPatch = patches[patchi];
        if (isA<wallFvPatch>(curPatch))
        {
          //const scalarField& nuw = nu().boundaryField()[patchi];
          forAll(curPatch, facei)
          {
              label celli = curPatch.faceCells()[facei];
              epsilon_[celli] = 2.0 * 0.002532 * k_[celli] / 0.0003 / 0.0003 ;  // / (nearWallDist(this->mesh_).y()[facei] * nearWallDist(this->mesh_).y()[facei]); // this->y_[patchi][facei] / this->y_[patchi][facei];
          }
       }
    }
Results.jpg


Now, I need to properly implement the following boundary condition: epsilon = 2 * nu * k_ / y / y

However, when I use the following lines:


Code:
    const fvPatchList& patches = this->mesh_.boundary();
    forAll(patches, patchi)
    {
        const fvPatch& curPatch = patches[patchi];
        if (isA<wallFvPatch>(curPatch))
        {
          forAll(curPatch, facei)
          {
              label celli = curPatch.faceCells()[facei];
              // epsilon_[celli] = (1/0.0003/0.0003) * nuw[facei] * k_[celli] ;  // / (nearWallDist(this->mesh_).y()[facei] * nearWallDist(this->mesh_).y()[facei]); // this->y_[patchi][facei] / this->y_[patchi][facei];
              epsilon_[celli] = 2.0 * nu_[celli] * k_[celli] / curPatch[facei].y() / curPatch[facei].y();
           }
       }
    }
I get an error :

Code:
error: no match for ‘operator[]’ (operand types are ‘const Foam::fvPatch’ and ‘Foam::label’ {aka ‘int’})
  412 |               epsilon_[celli] = 2.0 * nu_[celli] * k_[celli] / curPatch[facei].y() / curPatch[facei].y();
What am I doing wrong ?
Thanks for your help!

Last edited by tyskies; April 6, 2022 at 11:59.
tyskies 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
Air-lift model with hot gases and water. Time step problem. PauliusRap FLOW-3D 0 August 4, 2014 04:47
Mixture model problem - could someone please advise? matlab_monkey FLUENT 2 July 26, 2012 08:20
Turbulence model for mixing problem??? nileshjrane Main CFD Forum 7 September 14, 2010 04:57
Turbulence model for mixing problem nileshjrane OpenFOAM Running, Solving & CFD 1 September 7, 2010 17:48
problem with MFR model for multiphase mixing tanks Srinivas Main CFD Forum 1 November 7, 2005 14:16


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