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

LES Setup of a cyclic channel flow for compressible solver

Register Blogs Community New Posts Updated Threads Search

Like Tree1Likes
  • 1 Post By Phil910

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   April 1, 2022, 16:30
Default LES Setup of a cyclic channel flow for compressible solver
  #1
New Member
 
Philipp
Join Date: Mar 2022
Posts: 6
Rep Power: 4
Phil910 is on a distinguished road
Dear all,

i am struggling a bit with the Setup of a rather simple Testcase to evaluate the wall temperature in a channel flow with rhoPimpleFoam as a Large Eddy Simulation.
My setup is the following:

- 3 dimensional channel with the dimensions: (6*pi*h 2*h 3*pi*h) (streamwise wall-normal spanwise)
- A constant heat flux is provided from the wall with the constant heat flux boundary condition
- As a fluid i'm using air which is at normal pressure and 300 K at the first timestep (Pr = 0.71)
- Cyclic boundary condition in spanwise direction

So far i used a Custom Turbulent Inlet Condition for U to generate Turbulence which enters my channel (that worked pretty well). The temperature was set to a fixedValue of 300 K at the inlet. This Case was set up and runs well. Unfortunately i found that due to the limited length of the channel the temperature field does not really show any turbulent fluctuations in the center of the channel (Just for your information i'm using the DNS of Alcántara-Ávila and Hoya, "Direct numerical simulation of thermal channel flow for medium–high Prandtl numbers up to Re τ = 2000" (2021) as a refernce, where they have a fully developed turbulent field in the center of the channel). I want to avoid my computation getting to expensive so my plan is to also use a cyclic boundary condition in streamwise direction.

In order to do so i read that i need to use a additional source term for the momentum equation which "keeps my fluid moving through the domain" (sorry for my missing knowledge i'm very new to openfoam). I found different tutorials and also threads in this forum where this is done using the "meanVelocityForce" as a momentum Source in the fvOptions dict. Unfortunately this works only for incompressible solvers and i could not find a solution of adding this momentum Source using rhoPimpleFoam.
Does anyone know a way to setup cyclic Boundary conditions in streamwise direction for a channel flow with an compressible solver?
A tutorial about a cyclic channel flow i found is this: "

The next problem i will be facing is probably the constant heat supply by my heat flux BC which will cause a rising mean temperature in the channel. I found some other threads where this is discussed and an Energy Equation solving for T-T_wall is plugged into the solver it will be only solved for the relative temperature. This is discussed here:
Streamwise periodic heat trasnfer
and here:
Cyclic heat transfer
I don't really know if it is possible to use the same approach and define a different Energy Equation in rhoPimpleFoam (espacially as a beginner with very little C++ experience). Maybe someone can give me an estimation on how complicated this would be. But as a first step i would be really happy to set up my channel flow with cyclic boundary conditions.

Thanks in advance for your help!
Regards,
Philipp
Phil910 is offline   Reply With Quote

Old   May 25, 2022, 06:03
Default
  #2
New Member
 
Philipp
Join Date: Mar 2022
Posts: 6
Rep Power: 4
Phil910 is on a distinguished road
So in the meantime i have been working on my channel flow a bit and found a setup that works quite well for me and gives me a cyclic channel flow. Maybe this can be helpful if anyone is also a beginner and tries to set up something similar.

The mapped boundary condition actually did the job for me. I found another thread where the usage of the boundary condition is explained in detail but unfortunately can't find it now, so i will briefly describe what i did.

In the polyMesh dict i set my inlet as a mappedPatch:

Code:
inlet
    {
        type            mappedPatch;
        inGroups        List<word> 1(mappedPatch);
        nFaces          680;
        startFace       100620;
        sampleMode      nearestPatchFace;
        sampleRegion    region0;
        samplePatch     outlet;
        offsetMode      uniform;
        offset          (0.1571 0 0);
    }
The offset is the distance to the patch from where i want to map my vaues (in my case this is just the outlet, which is 0.1571 units in x direction from the inlet).

Then for Temperature, U, alphat, nut and k in the 0 folder i just used mapped as a inlet condition. An example inlet cond. for U:

Code:
inlet
    {
        type                    mapped;
        value                   uniform (0 0 0);
        interpolationScheme     cellPoint;
        setAverage              true;
        average                 (6.442 0 0);
    }
There was no need for an extra source term in the momentum equation anymore because i used the "average" option as you can see here. I simply set my bulk velocity as an average and measurement of the mass flow indicates that it is constant.
However for u i used an internalField from another (precursor) simulation where i used my turbulent inlet condition so i already have turbulence in my domain and do not need to wait until it develops in my channel.

This setup works for me, nothing really special here but i was struggling with this a little when i started with OF so maybe it helps someone in the same situation that i was in.

Also i needed to reduce my time step a little othewise my simualtion with the mapped BC tended to become unstable which resulted in the typical "negatve initial temperature...." error.

For the wall temperature i decided to use a setup where i have one hot wall and one cold wall so i don't have a rising temperature in my channel. Very similar to what Wang and Pletcher did in their paper from 1996 "On the large eddy simulation of a turbulent channel flow with significant heat transfer". They used two different Temperature ratios T_h/T_c = 1.02 and T_h/T_c = 3 .
littleJazz likes this.
Phil910 is offline   Reply With Quote

Old   October 29, 2022, 05:24
Default
  #3
New Member
 
Jazz Wu
Join Date: Aug 2021
Posts: 3
Rep Power: 5
littleJazz is on a distinguished road
Dear Philipp,

Could you show more settings about boundary conditions for T? Thank you so much.
littleJazz is offline   Reply With Quote

Old   November 14, 2024, 08:42
Default
  #4
New Member
 
Sritej Kumbar
Join Date: Nov 2024
Posts: 2
Rep Power: 0
stiffler_014 is on a distinguished road
Hello Foamer, I am working on the case of compressible flow at low Ma number high Re = 13000 at Pr = 0.71. I have geometry of Cuboidal pipe(Cross 2X2 , Length= 4m). The sides of the pipe are cyclic as well as the inlet and outlet with the intention to represent 3dimentsationaltiy of fuel pipe within the engine. The walls are carrying noSlip BC. I have provied BC for wall with regards to temperature as 300 degC and the inlet outlet cyclic behaviour at 330DegC. I followed the posts and applied two BC for two cases: The one with cyclic only BC didnot genereate turbulnce and the one with mappedBC is stack overflowing. I am intereseted in running the mappedBC to check for turbulence gernetation.
I have refered the Research Paper Direct "Numerical simulation of thermal channel flow for medium–high
Prandtl numbers up to Reτ = 2000" and Phil910's suggestions . Also found "A pimpleFoam tutorial for channel flow, with respect to different LES models." performed by Olle Penttinen.
Needed your Opinions @Phil910

boundaryField
{
bottomWall
{
type noSlip;
}
topWall
{
type noSlip;
}
sides1_half0
{
type cyclic;
}
sides2_half0
{
type cyclic;
}
inout1_half0
{
type mapped;
value uniform (0.1335 0 0 );
interpolationScheme cellPoint;
setAverage true;
average (0.1335 0 0);

}
inout1_half1
{
type mapped;
value uniform (0 0 0 );
interpolationScheme cellPoint;
setAverage true;
average (0.1335 0 0);

}
sides2_half1
{
type cyclic;
}
sides1_half1
{
type cyclic;
}
inout2_half0
{
type mapped;
value uniform (0.1335 0 0 );
interpolationScheme cellPoint;
setAverage true;
average (0.1335 0 0);
}
inout2_half1
{
type mapped;
value uniform (0.1335 0 0 );
interpolationScheme cellPoint;
setAverage true;
average (0.1335 0 0);
}
}
stiffler_014 is offline   Reply With Quote

Reply

Tags
channel flow, compressible, cyclic boundary condition, heat tranfer, rhopimplefoam


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
LES of turbulent channel flow (overprediction) nathanricks FLUENT 1 March 3, 2024 22:47
Enabling Open Channel Flow Sub-Model in Mixture model cod213 FLUENT 0 January 10, 2017 14:40
LES database for turbulent channel flow at Re_tau=590 sbaffini Main CFD Forum 10 May 27, 2014 11:55
Cyclic boundary conditions concerning channel with constant flow rate pascool OpenFOAM Pre-Processing 1 November 16, 2012 14:04
Signal decay in les channel flow pankaj saha Main CFD Forum 0 July 25, 2008 13:34


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