CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Pre-Processing

How to set fully developed velocity profile at inlet in OpenFOAM 12?

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

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   November 10, 2024, 09:04
Default How to set fully developed velocity profile at inlet in OpenFOAM 12?
  #1
Member
 
Wesley T.
Join Date: Apr 2009
Posts: 34
Rep Power: 18
Wesley is on a distinguished road
would like to create apply a fully developed velocity profile at the inlet to my simulation.

I am currently using OpenFOAM 12 and I have not yet found how to do this.

I have tried several approaches without success.

For comparison, in OpenFOAM 9, applying this inlet condition:


Code:
    Inlet
    {
        type                flowRateInletVelocity;
        volumetricFlowRate  3.39e-5;
        extrapolateProfile  yes;
        value               uniform (0 0 0);
    }
would result in this inlet velocity profile (scaled to the velocity profile of the inlet):




This same information in OpenFOAM 12 results in a uniform inlet velocity (scale is from 0 to the average velocity across the inlet):



I have not yet found how to create a fully developed velocity profile at the inlet.

Thank you for any help you can give to me to get a fully developed velocity profile with OpenFOAM 12.

Edited to add: Until I can get a developed velocity profile at the inlet, I will be using an added length of flow with the slip boundary condition. This will deliver a somewhat developed velocity profile and will not result in very high pressures at the outer circumference of the inlet where the flow is in contact with the walls (noSlip) of the simulation.

Last edited by Wesley; November 10, 2024 at 09:07. Reason: Adding the workaround I will be using, in case it is helpful to others
Wesley is offline   Reply With Quote

Old   October 27, 2025, 19:01
Default
  #2
New Member
 
Russ Moerland
Join Date: Sep 2022
Posts: 1
Rep Power: 0
rmoerland is on a distinguished road
Not sure if you found the solution, but it appears what you're looking for is the 'profile' option to flowRateInletVelocity. This was committed by Henry on Jan 24, 2022. So, it should be in version 10 and later.


From the documentation:


Example of the boundary condition specification for a volumetric flow rate:
<patchName>
{
type flowRateInletVelocity;
volumetricFlowRate 0.2;
profile laminarBL;
}


Example of the boundary condition specification for a mass flow rate:


<patchName>
{
type flowRateInletVelocity;
massFlowRate 0.2;
profile turbulentBL;
rho rho;
rhoInlet 1.0;
}
rmoerland is offline   Reply With Quote

Old   November 2, 2025, 09:09
Default No solution yet
  #3
Member
 
Wesley T.
Join Date: Apr 2009
Posts: 34
Rep Power: 18
Wesley is on a distinguished road
Thank you for the suggestion, but it does not appear to give me the expected results. There is still not a developed flow at the inlet.


It is always possible I am overlooking something, so here is what I have for the U file at time 0:


Code:
/*--------------------------------*- C++ -*----------------------------------*\
  =========                 |
  \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox
   \\    /   O peration     | Website:  https://openfoam.org
    \\  /    A nd           | Version:  12
     \\/     M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    format      ascii;
    class       volVectorField;
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 1 -1 0 0 0 0];

internalField   uniform (0 0 0);

boundaryField
{
    Inlet
    {
        type    flowRateInletVelocity;
        volumetricFlowRate  3.39E-05;
        profile laminarBL;
    }

    Outlet
    {
        type            zeroGradient;
    }

    Walls
    {
        type            noSlip;
    }

}

// ************************************************************************* //
Inlet velocity results for time = 0



Inlet velocity results for time = final (steady-state solution reached)









Quote:
Originally Posted by rmoerland View Post
Not sure if you found the solution, but it appears what you're looking for is the 'profile' option to flowRateInletVelocity. This was committed by Henry on Jan 24, 2022. So, it should be in version 10 and later.


From the documentation:


Example of the boundary condition specification for a volumetric flow rate:
<patchName>
{
type flowRateInletVelocity;
volumetricFlowRate 0.2;
profile laminarBL;
}


Example of the boundary condition specification for a mass flow rate:


<patchName>
{
type flowRateInletVelocity;
massFlowRate 0.2;
profile turbulentBL;
rho rho;
rhoInlet 1.0;
}
Wesley is offline   Reply With Quote

Old   November 2, 2025, 15:50
Default
  #4
New Member
 
Michael Häckel
Join Date: Nov 2025
Posts: 16
Rep Power: 2
michael_h is on a distinguished road
There are several tutorial which use flowRateInletVelocity successfully.
They are listed with foamInfo -a flowRateInletVelocity.

It is important that your "Walls" are "type wall" and not "type patch" in blockMeshDict or snappyHexMeshDict.
michael_h is offline   Reply With Quote

Old   November 3, 2025, 07:08
Default Setting type to "wall" in constant/polyMesh/boundary worked
  #5
Member
 
Wesley T.
Join Date: Apr 2009
Posts: 34
Rep Power: 18
Wesley is on a distinguished road
michael_h, thank you for the guidance.


I followed your comment on the "Walls" allowed the inlet velocity profile to create the developed velocity profile at the inlet.

I use Salome to generate the geometries I am simulating. To change the type, I went to the /constant/polyMesh directory and modified the type from what had been "patch" to "wall".

Code:
    Walls
    {
        type            wall;
        nFaces          3248;
        startFace       64940;
    }
There is now a developed velocity profile at the inlet, as shown below.






Quote:
Originally Posted by michael_h View Post
There are several tutorial which use flowRateInletVelocity successfully.
They are listed with foamInfo -a flowRateInletVelocity.

It is important that your "Walls" are "type wall" and not "type patch" in blockMeshDict or snappyHexMeshDict.
Wesley is offline   Reply With Quote

Reply

Tags
extrapolateprofile

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fully developed temperature profile at tube inlet amrkaood FLUENT 0 September 1, 2020 06:11
fully developed turbulent flow at inlet using mapped BC atul1018 OpenFOAM Running, Solving & CFD 0 August 21, 2020 06:44
UDF Velocity profile at inlet aar007 Fluent UDF and Scheme Programming 1 June 28, 2020 23:43
Pressure profile in Velocity inlet Pertica FLUENT 3 June 15, 2020 09:30
what the result is negatif pressure at inlet chong chee nan FLUENT 0 December 29, 2001 06:13


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