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

power law inlet condition

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   October 11, 2010, 01:14
Default power law inlet condition
  #1
New Member
 
Abhinav Sharma
Join Date: Sep 2010
Posts: 28
Rep Power: 15
asharma is on a distinguished road
Hi,
I'm trying to set a CFD model to simulate flow over urban environment. My inlet boundary condition is a developed power law wind profile, how can i implement this in a RAS model?

power law profile:-

Uo=2.5(z/10)^0.299


Thanks,

Abhinav
asharma is offline   Reply With Quote

Old   October 12, 2010, 08:00
Default
  #2
Senior Member
 
Francois Beaubert
Join Date: Mar 2009
Location: Lille, France
Posts: 147
Rep Power: 17
francois is on a distinguished road
Have a look at groovyBC

http://openfoamwiki.net/index.php/Contrib_groovyBC
francois is offline   Reply With Quote

Old   October 14, 2010, 00:51
Default Another Method
  #3
Member
 
Alan Russell
Join Date: Aug 2009
Location: Boise, Idaho USA
Posts: 61
Rep Power: 16
AlanR is on a distinguished road
I use another method for a power law inlet profile. There's an inlet boundary type called called timeVaryingMappedFixedValue. It allows you to set up a list/file of points (xyz) across your inlet and set the velocity (uvw) at each point.

In the constant directory you need a directory structure like this:
yourcasefile/constant/boundaryData/minX/0

This will set up a profile on one side of the domain (minimum X values in my setup). In the minX directory there's a file called points. In this file you plot the xyz values where you will specify the inlet velocity. Start with two or three xy locations and at each, designate several points above the surface. In the 0 directory, you need a file called U. In this file, you specify the velocity at each point.

Look at the tutorial called /incompressible/simpleFoam/pitzDailyExptInlet to see the structure and how each file is put together.

Alan
AlanR is offline   Reply With Quote

Old   October 14, 2010, 01:04
Default
  #4
New Member
 
Abhinav Sharma
Join Date: Sep 2010
Posts: 28
Rep Power: 15
asharma is on a distinguished road
Hi,
Thanks for the suggestions, ill try out both methods...

Regards,
Abhinav
asharma is offline   Reply With Quote

Old   October 21, 2010, 01:25
Default
  #5
New Member
 
Abhinav Sharma
Join Date: Sep 2010
Posts: 28
Rep Power: 15
asharma is on a distinguished road
hi Alan,
I finally got around setting up my mesh, and my flow conditions. I've been trying to set up my time varying velocity field as you mentioned, i had a couple of questions regarding the same..
1. What points do i specify for the inlet.. the left most where my flow field in entering or respective the cell center values?
2.i'm not clear by the minz and maxz notation they use to define the velocity profile, what does it refer to?

Regards,
Abhinav
asharma is offline   Reply With Quote

Old   October 25, 2010, 08:54
Default
  #6
Member
 
Vishal Jambhekar
Join Date: Mar 2009
Location: University Stuttgart, Stuttgart Germany
Posts: 90
Blog Entries: 1
Rep Power: 17
vishal is on a distinguished road
Is there any utility so that these points can be generated from from mesh data.

points can be any arbitary or it should only be cell centers (sounds silly, but want to know if the code interpolates values at arbitary locations in domain)...???
__________________
Cheers,

Vishal Jambhekar...
"Simulate the way ahead......!!!"
vishal is offline   Reply With Quote

Old   October 26, 2010, 00:10
Default
  #7
New Member
 
Abhinav Sharma
Join Date: Sep 2010
Posts: 28
Rep Power: 15
asharma is on a distinguished road
well i finally got around setting up the files to use the timeVaryingMappedFixedValue condition... points can be arbitrary so i'm assuming the code interpolates the values to the cell centers. Although i had a problem when i input too many points in files i defined in "boundaryData" folder, decreasing the number of points seemed to have solved the problem. Hope that helps...

Regards,
Abhinav
asharma is offline   Reply With Quote

Old   November 22, 2010, 10:20
Default
  #8
Member
 
Vishal Jambhekar
Join Date: Mar 2009
Location: University Stuttgart, Stuttgart Germany
Posts: 90
Blog Entries: 1
Rep Power: 17
vishal is on a distinguished road
This is the boundary condition i have set for inlet in U, k and epsilon and using simpleFoam.

KV_North
{
type timeVaryingMappedFixedValue;
setAverage off;
}

I wanted to clarify what do exactly mean by setAvrage field here......!!!

Thanks and regards.......
__________________
Cheers,

Vishal Jambhekar...
"Simulate the way ahead......!!!"
vishal is offline   Reply With Quote

Old   December 3, 2010, 06:32
Default
  #9
Member
 
Vishal Jambhekar
Join Date: Mar 2009
Location: University Stuttgart, Stuttgart Germany
Posts: 90
Blog Entries: 1
Rep Power: 17
vishal is on a distinguished road
Getting following ERROR if i set "setAverage" field on in above comment. Can someone tell me the reason....... please....

Time = 5

smoothSolver: Solving for Ux, Initial residual = 0, Final residual = 0, No Iterations 0
smoothSolver: Solving for Uy, Initial residual = 0, Final residual = 0, No Iterations 0
smoothSolver: Solving for Uz, Initial residual = 0, Final residual = 0, No Iterations 0
GAMG: Solving for p, Initial residual = 0, Final residual = 0, No Iterations 0
time step continuity errors : sum local = 0, global = 0, cumulative = 0
[3] #0 Foam::error:rintStack(Foam::Ostream&)[2] #0 Foam::error:rintStack(Foam::Ostream&) in "/home/vj/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libOpenFOAM.so"
[3] #1 Foam::sigFpe::sigFpeHandler(int) in "/home/vj/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libOpenFOAM.so"
[2] #1 Foam::sigFpe::sigFpeHandler(int) in "/home/vj/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libOpenFOAM.so"
[3] #2 in "/home/vj/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libOpenFOAM.so"
[2] #2 __restore_rt at sigaction.c:0
[3] #3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&)__restore_rt in "/home/vj/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libOpenFOAM.so"
[3] #4 void Foam::divide<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at sigaction.c:0
[2] #3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/home/vj/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libincompressibleRASModels.so"
[3] #5 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam:perator/<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<doub le, Foam::fvPatchField, Foam::volMesh> > const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/home/vj/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libOpenFOAM.so"
[2] #4 void Foam::divide<Foam::fvPatchField, Foam::volMesh>(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/home/vj/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libincompressibleRASModels.so"
[3] #6 Foam::incompressible::RASModels::kEpsilon::correct () in "/home/vj/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libincompressibleRASModels.so"
[2] #5 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam:perator/<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<doub le, Foam::fvPatchField, Foam::volMesh> > const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/home/vj/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libincompressibleRASModels.so"
[2] #6 Foam::incompressible::RASModels::kEpsilon::correct () in "/home/vj/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libincompressibleRASModels.so"
[3] #7 in "/home/vj/OpenFOAM/OpenFOAM-1.7.1/lib/linux64GccDPOpt/libincompressibleRASModels.so"
[2] #7 mainmain in "/home/vj/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linux64GccDPOpt/simpleFoam"
[2] #8 __libc_start_main in "/home/vj/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linux64GccDPOpt/simpleFoam"
[3] #8 __libc_start_main in "/lib64/libc.so.6"
[3] #9 in "/lib64/libc.so.6"
[2] #9 Foam::regIOobject::writeObject(Foam::IOstream::str eamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType) constFoam::regIOobject::writeObject(Foam::IOstream ::streamFormat, Foam::IOstream::versionNumber, Foam::IOstream::compressionType) const in "/home/vj/OpenFOAM/OpenFOAM-1.7.1/applications/bin/linux64GccDPOpt/simpleFoam"
__________________
Cheers,

Vishal Jambhekar...
"Simulate the way ahead......!!!"
vishal is offline   Reply With Quote

Old   February 29, 2016, 02:15
Default
  #10
New Member
 
atikah_121
Join Date: Apr 2015
Posts: 4
Rep Power: 11
atikah121 is on a distinguished road
Quote:
Originally Posted by asharma View Post
Hi,
I'm trying to set a CFD model to simulate flow over urban environment. My inlet boundary condition is a developed power law wind profile, how can i implement this in a RAS model?

power law profile:-

Uo=2.5(z/10)^0.299


Thanks,

Abhinav
My problem is same like this but I'm using ANSYS Fluent. How I can set power law equation for RANS model in Ansys?

tq.
atikah121 is offline   Reply With Quote

Old   May 25, 2018, 13:41
Default
  #11
Member
 
Cristina Hernandez
Join Date: May 2018
Posts: 35
Rep Power: 7
crizpi21 is on a distinguished road
Quote:
Originally Posted by AlanR View Post
I use another method for a power law inlet profile. There's an inlet boundary type called called timeVaryingMappedFixedValue. It allows you to set up a list/file of points (xyz) across your inlet and set the velocity (uvw) at each point.

In the constant directory you need a directory structure like this:
yourcasefile/constant/boundaryData/minX/0

This will set up a profile on one side of the domain (minimum X values in my setup). In the minX directory there's a file called points. In this file you plot the xyz values where you will specify the inlet velocity. Start with two or three xy locations and at each, designate several points above the surface. In the 0 directory, you need a file called U. In this file, you specify the velocity at each point.

Look at the tutorial called /incompressible/simpleFoam/pitzDailyExptInlet to see the structure and how each file is put together.

Alan

Hi,

I have come up with a similar problem. I have a really simple geometry (just a 2D rectangular domain) and I want to have a power law velocity profile at the inlet:

u(y)=2*(y/10)^0.12

The solution proposed by AlanR using a boundary condition of type "timeVaryingMappedFixedValue" was fine, but it requires to write manually every single x, y and z coordinate for the inlet and also the value of velocity u at each point.

Is there any other way OpenFOAM can directly read the y coordinates of the inlet face and calculate the value of the velocity from the mathematical expression, rather than having to introduce it manually?

Also, I am open to any other suggestions to create a power law profile at the inlet. Thanks!
crizpi21 is offline   Reply With Quote

Old   May 25, 2018, 13:44
Default
  #12
Member
 
Cristina Hernandez
Join Date: May 2018
Posts: 35
Rep Power: 7
crizpi21 is on a distinguished road
Did you find a solution to your question? Because I'm now facing exactly the same problem.
crizpi21 is offline   Reply With Quote

Old   May 25, 2018, 13:45
Default
  #13
Member
 
Cristina Hernandez
Join Date: May 2018
Posts: 35
Rep Power: 7
crizpi21 is on a distinguished road
Quote:
Originally Posted by vishal View Post
Is there any utility so that these points can be generated from from mesh data.

points can be any arbitary or it should only be cell centers (sounds silly, but want to know if the code interpolates values at arbitary locations in domain)...???

Did you find a solution to your question? Because I'm now facing exactly the same problem.
crizpi21 is offline   Reply With Quote

Reply


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
inlet and outlet boundary condition for turbomachinery solution siamak1424 OpenFOAM 2 August 15, 2009 11:14
inlet boundary condition swe704 FLUENT 4 June 3, 2009 16:58
Non-Newtonian Flow: Power law (2D BFS) hellouch FLUENT 3 April 21, 2009 03:03
Doubt in Inlet Pressure Boundary Condition Sumitha FLUENT 3 October 20, 2008 03:19
inlet condition in preconditioning method ricklee Main CFD Forum 0 January 30, 2006 13:35


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