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

turbulentDFSEMInlet

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

Like Tree11Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 19, 2016, 10:58
Default turbulentDFSEMInlet
  #1
Senior Member
 
Mahdi Hosseinali
Join Date: Apr 2009
Location: NB, Canada
Posts: 272
Rep Power: 15
anishtain4 is on a distinguished road
Hi,

I've recently installed the OF 1606 in the hope to use the divergent free boundary condition and get a reasonable pressure field at the inlet.
When I set a boundary layer case to solve, it runs up to first pimple iteration and doesn't go any further. I've increased the allocated ram but that doesn't seem to be the issue. My case runs well with turbulentInlet with following options:

Code:
    inlet
    {
        type            turbulentInlet;
        fluctuationScale (0.14 0.05 0.05);
        alpha           0.05;
        referenceField  uniform (7.72 0 0);
        value           uniform (7.72 0 0);
    }
However doesn't produce useful pressure field. But this options fial:

Code:
    inlet
    {
        type        turbulentDFSEMInlet;
        delta       0.20;
        R           uniform (0.5 0.1 0.1 0.03 0.01 0.01);
        U           uniform (7.75 0 0);
        L           uniform 0.00;
        value       uniform (7.75 0 0);
        nCellsPerEddy 3;
        mapMethod   nearestCell;
    }
The boundary layer should be 0.0115m thick, the top wall (symmetric) is 0.4m away.

Also if anyone can give me a hint on how to export L from another simulation I would appreciate it. If I've understood well it's epsilon/k, and the first thing comes into mind is to use foamCalc and a k-epsilon solution, but foamCalc does not include division, should I go ahead and hard code it?
anishtain4 is offline   Reply With Quote

Old   April 27, 2017, 06:09
Default
  #2
Member
 
Hilbert
Join Date: Aug 2015
Location: Australia
Posts: 52
Rep Power: 7
Hillie is on a distinguished road
Hi Mahdi,

Did you end of solving this problem properly? If you haven't could you try running the code in serial? My case seems to work in serial model, but not in parallel?

Cheers,
Hilbert
Hillie is offline   Reply With Quote

Old   April 27, 2017, 20:07
Default
  #3
Member
 
Hilbert
Join Date: Aug 2015
Location: Australia
Posts: 52
Rep Power: 7
Hillie is on a distinguished road
Dear Foamers,

I just want to expand on my previous post to see if anybody has some idea's since I am running out.

I am trying to run a case with the turbulentDFSEMInlet as my velocity inlet.

Now I have asses to a cluster which is running V1606 and my workstation which is running V1612.
When I try to run the case in parallel on the cluster it hangs on the turbulentDFSEMInlet when it tried to seed eddies into the flow. I get the following output.

Quote:
Reading field U

Turbulent DFSEM patch inlet: interpolating field R from "/short/fd8/hvp561/OpenFoam/LES/M20I7/V35/processor0/../constant/boundaryData/inlet/0"
Turbulent DFSEM patch inlet: interpolating field L from "/short/fd8/hvp561/OpenFoam/LES/M20I7/V35/processor0/../constant/boundaryData/inlet/0"
Turbulent DFSEM patch inlet: interpolating field U from "/short/fd8/hvp561/OpenFoam/LES/M20I7/V35/processor0/../constant/boundaryData/inlet/0"
Creating turbulence model

Selecting turbulence model type LES
Selecting LES turbulence model WALE
Selecting LES delta type cubeRootVol
WALECoeffs
{
Ce 1.048;
Ck 0.094;
Cw 0.325;
}

No finite volume options present

fluxScheme: Kurganov

Starting time loop

Mean and max Courant Numbers = 0.00927962091699481 0.0759951601114363
deltaT = 1.25e-09
Time = 0.0119072264273089

diagonal: Solving for rho, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal: Solving for rhoUx, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal: Solving for rhoUy, Initial residual = 0, Final residual = 0, No Iterations 0
diagonal: Solving for rhoUz, Initial residual = 0, Final residual = 0, No Iterations 0
Turbulent DFSEM patch: inlet seeded 193 eddies with total volume 3.13745594498e-08
When I run the case in serial model on the cluster it does run though.

When I run the case in parallel on my workstation it also hangs. The example for this inlet :

$FOAM_TUTORIALS/incompressible/pimpleFoam/channel395DFSEM, Does run in parallel though.


Because it runs in serial model it would suggest that I have set the case up correctly, but the fact that it hangs in parallel mode, while the example does run in parallel model would suggest that there is something case specific going on.

Does anybody have idea idea's / things I could test since I am running out of idea's?
Hillie is offline   Reply With Quote

Old   June 30, 2017, 13:29
Default
  #4
Member
 
Alex
Join Date: Jun 2011
Posts: 32
Rep Power: 11
liquidspoon is on a distinguished road
Hope this reply isn't too late...

I have been trying to use this boundary condition as well, and am running into the same issue (works in serial, hangs in parallel). The culprit is the following line in the BC:

Code:
 
scalar fCorr =
    gSum((UMean_ & patchNormal_)*patch().magSf())
    /gSum(U & -patch().Sf());
For some reason, this gSum operation fails when only one processor contains the patch. If you set up the decomposeParDict to split the patch over at least two processors, it works.
nao and Linanik like this.
liquidspoon is offline   Reply With Quote

Old   June 21, 2018, 07:07
Default turbulentDFSEMInlet hanging at first pimple iteration
  #5
Member
 
Yeru
Join Date: Jul 2014
Location: UK
Posts: 36
Rep Power: 8
shang is on a distinguished road
Hey Alex,

I am encountering the same problem. But this BC neither works on parallel nor serial case for me. Same with Mahdi, it runs up to first pimple iteration and doesn't go any further, even though I split the patch in 2.

Do you have any idea on how to solve it?

Kind regards,
Yeru
shang is offline   Reply With Quote

Old   June 24, 2018, 18:59
Default
  #6
Member
 
Hilbert
Join Date: Aug 2015
Location: Australia
Posts: 52
Rep Power: 7
Hillie is on a distinguished road
Hey Yeru,


Just a question, how big is your domain? I was doing some more testing with this boundary condition(in serial) and I noticed something interesting.
If you take the standard tutorial for the BC (which is a channel flow with a dimension in the order of meters) and you change the dimension to mm it does not work.



It would suggest there is a critical size under which the BC struggles.


Cheers,
Hilbert
Hillie is offline   Reply With Quote

Old   June 29, 2018, 07:19
Default
  #7
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 447
Rep Power: 9
mAlletto is on a distinguished road
Hello everybody.

I did my first runs with the turbulentDFSEMInlet boundary conditions. What I found, is when applying realistic levels of turbulence for atmospheric boundary layers (a turbulence intencity TI of about 10%):

type turbulentDFSEMInlet;
delta 4;
nCellPerEddy 2;
mapMethod nearestCell;
value uniform ( 0 0 0 ); // restart value
L uniform 25;
R uniform (0.5 0.1 0.1 0.5 0.01 0.5);

is that the maximum velocities produced by this boundary conditions are ten times higher than the mean wind (is approximately 10m/s). I found this value quit high because it is totally unrealistic.

Did anybody experience the same?
mAlletto is offline   Reply With Quote

Old   July 2, 2018, 11:25
Default
  #8
Member
 
Roland
Join Date: Mar 2009
Location: Netherlands
Posts: 72
Rep Power: 14
sylvester is on a distinguished road
Hi Michael,

I am also experiencing too high maximum velocities.

I noticed that in $FOAM_INST_DIR/src/finiteVolume/fields/fvPatchFields/derived/turbulentDFSEMInlet/turbulentDFSEMInletFvPatchVectorField.C the code does not follow the reference, thereby allowing larger fluctuations:
Code:
        // Allow eddies to be smaller than the mesh scale as suggested by
        // the reference?
        // s = min(s, nCellPerEddy_*cellDx[faceI]);
        s = max(s, nCellPerEddy_*cellDx[faceI]);
This may be the cause of the high velocities, but I did not have the time to investigate further.

Kind regards,
Roland
sylvester is offline   Reply With Quote

Old   July 5, 2018, 04:40
Default DFSEM min/max difference
  #9
Member
 
Roland
Join Date: Mar 2009
Location: Netherlands
Posts: 72
Rep Power: 14
sylvester is on a distinguished road
Hi,

I checked the difference in results between
Code:
s = min(s, nCellPerEddy_*cellDx[faceI]);
and
Code:
s = max(s, nCellPerEddy_*cellDx[faceI]);
Although the size of eddies changes, the maximum velocity remains about the same, see attached images.

Kind regards,
Roland
Attached Images
File Type: jpeg eddies_min.jpeg (187.9 KB, 125 views)
File Type: jpeg eddies_max.jpeg (190.2 KB, 100 views)
sylvester is offline   Reply With Quote

Old   July 5, 2018, 06:11
Default
  #10
Member
 
Yeru
Join Date: Jul 2014
Location: UK
Posts: 36
Rep Power: 8
shang is on a distinguished road
Hey Hilbert,

My computational domain is quite small, it has a size of 0.2112*0.02*0.02(m). I have reported it as a bug to the developer, they are asking me to test it on the latest release. I will let you know if the latest version can solve the problem.

Regards,
Yeru
shang is offline   Reply With Quote

Old   July 20, 2018, 07:12
Default
  #11
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 447
Rep Power: 9
mAlletto is on a distinguished road
Quote:
Originally Posted by sylvester View Post
Hi,

I checked the difference in results between
Code:
s = min(s, nCellPerEddy_*cellDx[faceI]);
and
Code:
s = max(s, nCellPerEddy_*cellDx[faceI]);
Although the size of eddies changes, the maximum velocity remains about the same, see attached images.

Kind regards,
Roland
Hello I made a simulation of an atmospheric boundary layer with an log profile as input over a flat plat. Periodic condition in span wise direction and advecitve at top and outuflow. I put the following input condition:

inlet
{
type turbulentDFSEMInlet;
delta 4;
nCellPerEddy 2;
mapMethod nearestCell;
value uniform ( 0 0 0 ); // restart value
L uniform 25;
R uniform (0.05 0.01 0.01 0.05 0.01 0.05);
}

The magnitude of R is 0.42.

Analysing the time averaged Reynolds stress tensor I found that the values close to the inlet are an order of magnitude higher and the solution needs nearly 700m to go down to the value provided by the inflow condition. The figures show a slice normal to the wall (the first two) and a lice in streamwise direction. It can be seen clearly that the magnitude of R in the first 2 cells is an order of magnitude higher than the one specified in the boundary condition and it takes quite long until it goes down. I don't know if it a bug in the code or an inconsistency in the formulation of the boundary condition.
Attached Images
File Type: png 2018-07-20_09h03_14.png (49.9 KB, 95 views)
File Type: png 2018-07-20_09h03_57.png (41.1 KB, 63 views)
File Type: png 2018-07-20_11h01_22.png (36.8 KB, 53 views)
mAlletto is offline   Reply With Quote

Old   August 24, 2018, 03:44
Default
  #12
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 447
Rep Power: 9
mAlletto is on a distinguished road
What I did now is to compare the results obtained in the tutorial channel395DFSEM provided by openfoam.com and my simulation.

For my simulation the domain is much bigger (2000m high) and in contrast to the channel flow I have a slip boundary condition at the top. It is basically a half channel with a logarithmic inflow profile. The magnitude of the Reynolds stress is constant and the values is around 1.8 m^2/s ^2. So it is in the same order of magnitude as the one for the channel simulation.

The maximum velocities however produced by my simulation are 10 times higher compared to the channel flow simulation.

Find attached the inflow profiles of the channel, a snapshot of the velocity at the inflow of the channel and the same quantities of my simulation.

So since the basic difference between my simulation and the channel is the length scale, maybe I'll investigate further in this direction. Maybe someone has a hint how to lower the maximum velocity fluctuations at the inflow.
Attached Images
File Type: png InflowChannel.png (29.9 KB, 72 views)
File Type: png Uchannel.png (78.3 KB, 94 views)
File Type: png InflowHalfchannel.png (43.2 KB, 65 views)
File Type: jpg UHalfChannel.jpg (53.7 KB, 76 views)
mAlletto is offline   Reply With Quote

Old   August 29, 2018, 10:24
Default
  #13
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 447
Rep Power: 9
mAlletto is on a distinguished road
The next analysis I performed is to compare the velocity field generated at the entrance of the half channel for two different domain sizes. The first domain had an extension of 20000m x 2000m x 2000m in streamwise, spanwise and wall normal direction. The second domain was 20m x 2m x 2m in order to match the dimension provided by the tutorial. The mean velocity profile and the mean R required by the boundary condition were the same for both cases. L I scaled it by a factor of 0.001 in the second case.

Another difference is that I used delta 4; for the bigger domain and
delta 0.2; for the smaller domain in order to have a comparable number of eddies seeded into the domain.

The strange think is that the magnitudes of the maximum velocities differ substantially by almost an order of magnitude.

Find attached the figures. The first figure is the bigger domain and the second the smaller. I have the feeling that something is wrong with the boundary condition.
Attached Images
File Type: jpg U2000m.jpg (40.5 KB, 61 views)
File Type: png U2m.png (131.3 KB, 61 views)
sylvester likes this.
mAlletto is offline   Reply With Quote

Old   September 13, 2018, 12:10
Default
  #14
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 447
Rep Power: 9
mAlletto is on a distinguished road
Ok I think I found the error: In Poletto et al they provide in eq. (11) the formula for
C1 = {(\sqrt{10 V_0} * \sum ( \sigma_i/3) * min(\sigma_i) )} / {( \sqrt(N) * \prod(\sigma_i) )}.

I checked the implementation in the source code. This is correct.
The problem is that C1 should be unitles. In eq (11) of poletto et at it is not. the correct formulation should be
C1 = {(({10 V_0})^{1/3} * \sum ( \sigma_i/3) * min(\sigma_i) )} / {( \sqrt(N) * \prod(\sigma_i) )}.
In this way the constant is unitless.
The wrong formulation is in line with the observation that by increasing the domain size by a factor of 1000 the maximum velocity increases by 10.

see the documentation of the boundary condition:

https://www.openfoam.com/documentati...8C_source.html

https://www.openfoam.com/documentati...8C_source.html


I'm I wrong?
mAlletto is offline   Reply With Quote

Old   January 21, 2019, 18:03
Default
  #15
DJF
New Member
 
Join Date: Jan 2019
Posts: 8
Rep Power: 4
DJF is on a distinguished road
Any news on the correction of the C1 coefficient? Just did a quick test on OF v1812 and got very high velocities as well.
DJF is offline   Reply With Quote

Old   January 22, 2019, 02:57
Default
  #16
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 447
Rep Power: 9
mAlletto is on a distinguished road
The guys from openfoam.com are in contact with the authors of the paper to clarify the issue.
mAlletto is offline   Reply With Quote

Old   January 22, 2019, 05:46
Default
  #17
DJF
New Member
 
Join Date: Jan 2019
Posts: 8
Rep Power: 4
DJF is on a distinguished road
Thank's for the reply. Any recomendations on similar methods in OF or how to overcome this issue? I'm trying to model the atm BL in OF. In the past I used for this purpose the Vortex Method in Fluent with satisfactory results.
DJF is offline   Reply With Quote

Old   January 22, 2019, 06:39
Default
  #18
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 447
Rep Power: 9
mAlletto is on a distinguished road
you can use the recycling method using the mapped bc of openfoam.

otherwise there is the a syntetic eddy method of lemos available

https://github.com/LEMOS-Rostock/LEMOS-2.4.x

I did not test it so I have no idea how it performs. but there is a thread here were it is discussed.
mAlletto is offline   Reply With Quote

Old   January 23, 2019, 09:13
Default
  #19
Member
 
ssa
Join Date: Sep 2018
Posts: 91
Rep Power: 4
ssa_cfd is on a distinguished road
Hi,, I have the same problem. It stops at PIMPLE Iteration 1. There is no error nothing.

Is there a solution to this problem.

Thanks. ssa

Quote:
Originally Posted by anishtain4 View Post
Hi,

I've recently installed the OF 1606 in the hope to use the divergent free boundary condition and get a reasonable pressure field at the inlet.
When I set a boundary layer case to solve, it runs up to first pimple iteration and doesn't go any further. I've increased the allocated ram but that doesn't seem to be the issue. My case runs well with turbulentInlet with following options:

Code:
    inlet
    {
        type            turbulentInlet;
        fluctuationScale (0.14 0.05 0.05);
        alpha           0.05;
        referenceField  uniform (7.72 0 0);
        value           uniform (7.72 0 0);
    }
However doesn't produce useful pressure field. But this options fial:

Code:
    inlet
    {
        type        turbulentDFSEMInlet;
        delta       0.20;
        R           uniform (0.5 0.1 0.1 0.03 0.01 0.01);
        U           uniform (7.75 0 0);
        L           uniform 0.00;
        value       uniform (7.75 0 0);
        nCellsPerEddy 3;
        mapMethod   nearestCell;
    }
The boundary layer should be 0.0115m thick, the top wall (symmetric) is 0.4m away.

Also if anyone can give me a hint on how to export L from another simulation I would appreciate it. If I've understood well it's epsilon/k, and the first thing comes into mind is to use foamCalc and a k-epsilon solution, but foamCalc does not include division, should I go ahead and hard code it?
ssa_cfd is offline   Reply With Quote

Old   January 23, 2019, 10:55
Default
  #20
Senior Member
 
Michael Alletto
Join Date: Jun 2018
Location: Bremen
Posts: 447
Rep Power: 9
mAlletto is on a distinguished road
You have to ensure that you have more than one processor at your inlet patch. Then it works.
mAlletto 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



All times are GMT -4. The time now is 07:15.