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

turbulentDFSEMInlet boundaryData and U, R, L, generation

Register Blogs Community New Posts Updated Threads Search

Like Tree11Likes
  • 1 Post By mjavrincon
  • 9 Post By mjavrincon
  • 1 Post By XJ_Wang

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   May 6, 2021, 08:50
Default turbulentDFSEMInlet boundaryData and U, R, L, generation
  #1
New Member
 
mjavrincon's Avatar
 
Mario Javier Rincón
Join Date: Dec 2020
Location: Denmark
Posts: 9
Rep Power: 5
mjavrincon is on a distinguished road
Hi guys,

I am trying to set up an LES simulation with turbulentDFSEMInlet boundary condition. In order to do so, I run a precursor RANS simulation with uniform inlet conditions and k-omega SST model of the same geometry. During the RANS simulation I extract the data at the outlet with the following code in controlDict:

Code:
    sampledPlanes
    {
        type                     surfaces;
        functionObjectLibs ( "libsampling.so" );
        outputControl        timeStep;
        outputInterval       1000;
        enabled                true;
        surfaceFormat       boundaryData;
        fields                    ( U turbulenceProperties:R turbulenceProperties:L );
        interpolationScheme cellPatchConstrained;
        surfaces                ( outlet { type patch ; patches ( outlet ) ; interpolate false ; } );
    }
Afterwards, I edit the case to adjust it for LES, take the data of U, R, L under postProcessing/sampledPlanes/ and copy it with the right format under constant/boundaryData. The problem is that I always get the following error when trying to decompose or run the case with turbulentDFSEMInlet:

Code:
Time = 0
Turbulent DFSEM patch inlet: interpolating field R from "/data/MJRP/fullCases/LES/constant/boundaryData/inlet/0/R"
Turbulent DFSEM patch inlet: interpolating field L from "/data/MJRP/fullCases/LES/constant/boundaryData/inlet/0/L"
Turbulent DFSEM patch inlet: interpolating field U from "/data/MJRP/fullCases/LES/constant/boundaryData/inlet/0/U"


--> FOAM FATAL ERROR:
Reynolds stress (2.3018333e-31 7.4816001e-32 -1.3597915e-31 -3.9599454e-32 -2.22473e-32 -1.2211324e-31) at face 1 leads to an invalid Cholesky decomposition due to the constraint R_yy - sqr(a_xy) >= 0

    From static bool Foam::turbulentDFSEMInletFvPatchVectorField::checkStresses(const symmTensorField&)
    in file fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C at line 992.

FOAM exiting
I have tried everything that I know including improving the mesh and extract the data in different ways at the outlet. I have not seen any solution to the problem online and perhaps I have an error of concept on how the BC works, but I hope that you could help me.

Thus, does anyone faced the same problem and knows what is failing here?

Thanks in advance!
smayoral likes this.

Last edited by mjavrincon; May 6, 2021 at 16:26. Reason: wrong patch
mjavrincon is offline   Reply With Quote

Old   May 10, 2021, 08:35
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: 931
Rep Power: 13
HPE is on a distinguished road
Hi,

One of the input Reynolds stress tensor element contains only zero-valued elements.

That's physically not possible. Therefore, OpenFOAM complains.

Hope this helps.
HPE is offline   Reply With Quote

Old   May 17, 2021, 03:59
Default Solved
  #3
New Member
 
mjavrincon's Avatar
 
Mario Javier Rincón
Join Date: Dec 2020
Location: Denmark
Posts: 9
Rep Power: 5
mjavrincon is on a distinguished road
Thank you for your reply.

I have found the issue and I finally made it work.

The main problem is that I was extracting the data exactly at the inlet patch, where the Reynolds Stress tensor is zero.

I had to extract the simulation data from RANS at a certain distance from the inlet, where the flow is fully developed in my case. Doing so and then adjusting the case before running the LES in constant/boundaryData gives no problems when decomposing the case. Here you can see the function in controlDict to sample a plane:

Code:
sampledSurface
    {
        type            surfaces;
        executeControl  runTime;
        executeInterval 0.15;
        writeControl    runTime;
        writeInterval   500;
        enabled         true;
        surfaceFormat   boundaryData;
        interpolationScheme none;
        interpolate     false;
        triangulate     false;
        fields          ( U turbulenceProperties:R turbulenceProperties:L UPrime2Mean );
        surfaces        ( inletSurface { 
                                     type plane ; 
                                     planeType pointAndNormal ; 
                                     pointAndNormalDict { 
                                              point ( -0.07 0 0 ) ; 
                                              normal ( 1 0 0 ) ; 
                                              interpolate false ; 
                                              triangulate false ; 
                                              } 
                                      } );
    }
As a reference, attached you can see the difference between having uniform inlet conditions and using DFSEM. I hope it helps if anyone else find themselves in trouble.
Attached Images
File Type: jpg DFSEMvsUniform.jpg (58.6 KB, 201 views)

Last edited by mjavrincon; May 17, 2021 at 05:46. Reason: picture not attached
mjavrincon is offline   Reply With Quote

Old   June 12, 2021, 00:58
Default
  #4
New Member
 
Sandeep
Join Date: Apr 2017
Location: IIT Delhi, New Delhi, India
Posts: 13
Rep Power: 9
Sandeep lamba is on a distinguished road
hi Mario Javier Rincón, It is of great help for me. Thanks for sharing.
Sandeep lamba is offline   Reply With Quote

Old   June 12, 2021, 10:10
Default
  #5
HPE
Senior Member
 
HPE's Avatar
 
Herpes Free Engineer
Join Date: Sep 2019
Location: The Home Under The Ground with the Lost Boys
Posts: 931
Rep Power: 13
HPE is on a distinguished road
- sorry posted as a mistake -
HPE is offline   Reply With Quote

Old   August 12, 2022, 13:07
Default
  #6
New Member
 
Xiangjie Wang
Join Date: Jul 2019
Posts: 26
Rep Power: 7
XJ_Wang is on a distinguished road
Hi Mario,

Thanks for sharing.

I also found a problem in the old version of OpenFOAM.com

For example in v1912,
OpenFOAM-v1912/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C
line 995:
Code:
scalar a_yz = (R.yz() - a_xy*a_xz)*a_yy;
this should be:
Code:
scalar a_yz = (R.yz() - a_xy*a_xz)/a_yy;
I have found it has been corrected in v2112.(not sure in which version it was corrected for the first time)

Hope this will be helpful if other foamers encounter this problem.
alireza94 likes this.
XJ_Wang is offline   Reply With Quote

Reply

Tags
boundarydata, les, les inlet conditions, turbulentdfseminlet


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
Imposing PIV (2D) experimental data at turbulentDFSEMInlet for LES t.teschner OpenFOAM Running, Solving & CFD 7 April 25, 2024 05:50
Creation of boundaryData for turbulentDigitalFilterInlet Bazinga OpenFOAM Pre-Processing 1 July 15, 2021 08:20
turbulentDFSEMInlet and boundaryFoam hconel OpenFOAM Running, Solving & CFD 1 September 14, 2020 11:34
generation of boundaryData files for timeVaryingMappedFixedValue MartinEB OpenFOAM Programming & Development 5 June 3, 2020 20:11
Creating boundaryData folder for timeVaryingMappedFixedValue boundary condition Sid! OpenFOAM Running, Solving & CFD 2 October 4, 2017 02:44


All times are GMT -4. The time now is 14:11.