CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   how to achieve homogeneous vertical profile for turbulence (https://www.cfd-online.com/Forums/openfoam/237975-how-achieve-homogeneous-vertical-profile-turbulence.html)

saugatshr4 August 16, 2021 14:48

how to achieve homogeneous vertical profile for turbulence
 
1 Attachment(s)
Hello,

I am working on turbulence modeling of the Atmospheric Boundary Layer. Here I have been able to maintain a homogeneous wind velocity profile. However, I have been unable to maintain a homogeneous profile for tubrulence.

I have given a manual input for the Turbulent Kinetic energy (TKE). It seems that the TKE seems to dissipate very early in the domain and doesn't travel the domain. I have attached a picture of the TKE in the along wind direction of the domain.

FYI, I'm trying to implement a k-epsilon model.

Can anybody please help me. I have been stuck in this problem for a long time.

I will be very grateful for your help.

Thank You.

With best regards,
Saugat

mAlletto August 16, 2021 17:27

That's probably because the inflow tke is not a solution of the homogeneous equation. If you run a flat plate simulation with periodic boundary conditions in stream wise direction you will get your homogeneous solution.

saugatshr4 August 17, 2021 10:27

Thank You mAlletto, for the response.

The advice you gave me did work and now I am able to conserve the turbulence in my model domain.

So, I gave the cyclic boundary layer inputs to the inlet and the outlet. Due to this I had to use fvOptions to give the velocity and turbulence input parameters. For the velocity I used the patchMeanVelocityForce function.

However, here I could only give the a fixed value. I require to give a profile here. I tried using the fixed profile function from a CSV here but could implement it.

Can you please help me give give a profile to those parameters?

Your help will be really valuable in my work.

Thank You.

With best regards,

Saugat

This is for the fixed value of velocity
Quote:

momentumSource
{
type patchMeanVelocityForce;
active yes;

patchMeanVelocityForceCoeffs
{
selectionMode all;
fields (U);
patch inlet;
Ubar (0 8 0);
relaxation 0.2;
}
}
I tried this it doesn't work (its more like a wild guess):
Quote:

momentumSource
{
type patchMeanVelocityForce;
active yes;

patchMeanVelocityForceCoeffs
{
selectionMode all;
fields (U);
patch inlet;
U
{
type fixedProfile;
profile csvFile;
profileCoeffs
{
nHeaderLine 0;
refColumn 0;
componentColumns (1);
separator ",";
mergeSeparators 0;
outOfBounds clamp;
file "C:\Program Files\blueCFD-Core-2017\ofuser-of5\run\manualK_20210812\0\Book2.csv";
}
direction (0 0 1);
origin 0;
}
relaxation 0.2;
}
}

mAlletto August 17, 2021 16:19

I didn't understand your question. Can you be more precise

saugatshr4 August 18, 2021 09:36

2 Attachment(s)
Hello mAlletto,

I implemented the periodic boundary condition but I don't get a homogeneous solution.
I have attached the profile of the TKE profile and epsilon profile. The TKE is for some reason getting attached to the top. Even in the epsilon profile, there are higher values at the top. However, for epsilon, the profile at the bottom is something that I want.
FYI, I am getting a homogeneous profile for the wind speed but turbulence is a big problem for me.
I am using a slip condition on the top layer. For the inlet and the outlet, I'm using cyclic boundary conditions. I have given a profile of wind speed, turbulence kinetic energy, and epsilon using the fvoption.

Can you suggest a solution for this?

With best regards,
Saugat

mAlletto August 18, 2021 18:00

Seems like you have a source term in the middle of the domain. To achieve a homogeneous solution only a few cells in stream wise direction are required. Can you also post the velocity

mAlletto August 18, 2021 18:05

You find a tutorial how to achieve a homogeneous solution for an atmospheric boundary layer here https://develop.openfoam.com/Develop...atmFlatTerrain

saugatshr4 September 17, 2021 01:11

1 Attachment(s)
Sorry, mAlletto for the late response.
As request by you, I have attached the velocity profile.
Thank You.

DJF January 24, 2022 05:33

Very interesting tutorial, mAlletto! I've been struggling with an ABL simulation of a complex terrain using LES and DFSEM. The velocity profile changes rapidly in streamwise direction, especially near the ground surface where I get much larger velocities compared to the reference profile.

I'm currently using pressureInletOutletVelocity at the top boundary for U. For nut at the ground surface I'm using atmNutUWallFunction.

What do you suggest for the BCs at the top boundary? fixedShearStress?

mAlletto January 24, 2022 05:44

For a log profile fixedShear is ok. For a Eckman profile a slip condition is ok


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