CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   power law inlet condition (http://www.cfd-online.com/Forums/openfoam-solving/80902-power-law-inlet-condition.html)

asharma October 11, 2010 01:14

power law inlet condition
 
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

francois October 12, 2010 08:00

Have a look at groovyBC

http://openfoamwiki.net/index.php/Contrib_groovyBC

AlanR October 14, 2010 00:51

Another Method
 
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

asharma October 14, 2010 01:04

Hi,
Thanks for the suggestions, ill try out both methods...

Regards,
Abhinav

asharma October 21, 2010 01:25

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

vishal October 25, 2010 08:54

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)...???

asharma October 26, 2010 00:10

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

vishal November 22, 2010 11:20

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.......

vishal December 3, 2010 07:32

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::printStack(Foam::Ostream&)[2] #0 Foam::error::printStack(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::operator/<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::operator/<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"

atikah121 February 29, 2016 03:15

Quote:

Originally Posted by asharma (Post 278609)
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.


All times are GMT -4. The time now is 17:57.