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 |
|
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 |
Hi,
Thanks for the suggestions, ill try out both methods... Regards, Abhinav |
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 |
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)...??? |
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 |
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....... |
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" |
Quote:
tq. |
Quote:
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! |
Did you find a solution to your question? Because I'm now facing exactly the same problem.
|
Quote:
Did you find a solution to your question? Because I'm now facing exactly the same problem. |
All times are GMT -4. The time now is 22:50. |