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

Parabolic inlet velocity profile

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

Like Tree8Likes

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 26, 2008, 06:54
Default Hello davey david. I don't
  #81
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20
sega is on a distinguished road
Hello davey david.

I don't know why this problem is related to the parabolic inlet velocity?

I had a similar problem. I made a mistake with the pressure distribution. Do you have pdRefCell and pdRefValue entries in your fvSolution-file? Maybe these entries do not correspond to your mesh? You can try setting a reference value for the pressure directly at a boundary instead.
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   June 26, 2008, 07:09
Default @sebastians question whether i
  #82
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
@sebastians question whether it is possible to use funkySetFields:
Yes. You can do something similar to http://openfoamwiki.net/index.php/Co...t-Room_Example (basically set a parabolic internal field, use that field on selected patches and afterwards clear the internal field and keep the values at the patches). Whether this is easier than programming a util is a matter of taste

Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   July 1, 2008, 11:33
Default hello, i need to implement a
  #83
Member
 
davey david
Join Date: Mar 2009
Posts: 54
Rep Power: 17
suredross is on a distinguished road
hello,
i need to implement a boundary condition on a patch(wall) and write out only those values.it is more of a slip condition enforced at the boundary(case is 2D).can the parabolic velocity boundary condition be modified to do this??any ideas and thoughts are welcome.

cheers
davey
suredross is offline   Reply With Quote

Old   July 1, 2008, 14:24
Default Hello! So, I have worked a
  #84
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20
sega is on a distinguished road
Hello!

So, I have worked a little bit with the tool.
As a reminder I tried to change it so it would set the velocity components in y-direction instead of x.
It's compiling and looks like this:

setParabolicInlet.C

I would like to set the parabolic inflow to the boundary-patch inflow so I did this:

setParabolicInlet . . inflow 0.5305

Have a look at the output:

Exec : setParabolicInlet . . inflow 0.5305
Date : Jul 01 2008
Time : 19:13:59
Host : M1530
PID : 9011
Root : /home/sega/OpenFOAM/sega-1.4.1/run/nucleateBoiling
Case : .
Nprocs : 1
Create time

Create mesh for time = 0

Vector field U

Patching inlet
x [ 0 , 0 ] z [ -1.98553e-22 , 2.43404e-22 ]
=> x [ 0 , 0 ] z [ -1.98553e-22 , 4.41957e-22 ]
Writing modified field U

End

But it looks like the tool does nothing at all . Maybe beacuse of this strange x-interval?

I think I made some severe mistakes changing the directions. I hope you have some suggestions?

Thanks so far & Greetings from Germany.
Sebastian
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   July 1, 2008, 14:53
Default Hi Sebastian! In your code
  #85
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Sebastian!

In your code the minX/maxX-line should now access component(0)

Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   July 2, 2008, 04:08
Default Yes, Thank you. I have changed
  #86
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20
sega is on a distinguished road
Yes, Thank you. I have changed it and now its working.

But I have some more problems setting the right parabolic inlet.

If I set
scalar vel=maxVel*(1-(x/1e-3)*(x/1e-3));
I get a parabolic profile, which is axi-symmetric (an arc). The length of the area I want so set up with the profile is 1mm, thus the 1e-3 in the denumerator. But the values are far too big (1e+6) and negative.

If I just set
scalar vel=maxVel*(1-x*x)
I get the "complete" parabolic profile, but with the right magnitude.

So, what I want is a half parabolic profile with the correct magnitude.

What may be wrong with the code?
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   July 2, 2008, 04:48
Default The problem might be that the
  #87
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
The problem might be that the extent of the patch is calculated using the face centres, but in reality the face vertices should be used.
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   July 2, 2008, 06:29
Default I dont know how and why this c
  #88
Senior Member
 
sega's Avatar
 
Sebastian Gatzka
Join Date: Mar 2009
Location: Frankfurt, Germany
Posts: 729
Rep Power: 20
sega is on a distinguished road
I dont know how and why this can effect the profile, but this sounds like a limitation.

As I just have 8 cells over the inflow-patch in x-direction I have written a small MATLAB-file which is calculating the values at the cellcenters an put them into a nonuniform List into the U-file by hand.

I'm not sure where this will lead, but I will get back to you.
__________________
Schrödingers wife: "What did you do to the cat? It's half dead!"
sega is offline   Reply With Quote

Old   July 3, 2008, 06:13
Default Hi Sebastian! Well in your
  #89
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
Hi Sebastian!

Well in your case the utility thinks that the channel is 1/8th narrower than it actually is (misses half a cell on the left and on the right)

Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   July 8, 2008, 22:26
Default hi, I have go through all the
  #90
Senior Member
 
weihong yao
Join Date: Mar 2009
Posts: 117
Rep Power: 17
ivanyao is on a distinguished road
hi,
I have go through all the messages.but I don't know how to compile the setParabolicInlet.I am doing a simulation about the compute wind engineering,I do the simulation in rhoturbFoam.my inlet velocity profile:U=U_0*(Z/Z_0)^0.25,"U_0","Z_0"are constants I provide."Z" is the height of the building.I am using OF1.4,and I have downloaded the parabolicVelocity_HJ_17Jan2007.tgz,but I don't know what I should do next.is there anyone help me step by step?that is very important to me.I would very very appreciate it.
thanks,Ivan
ivanyao is offline   Reply With Quote

Old   November 17, 2008, 15:08
Default I have no idea. A debug-versio
  #91
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 4,225
Rep Power: 51
gschaider will become famous soon enoughgschaider will become famous soon enough
I have no idea. A debug-version of OF would give us the line-number of the program at which this is occuring:
http://openfoamwiki.net/index.php/Main_FAQ#An_application_ends_with_a_segmentati on_fault._What_is_wrong.3F

Bernhard
__________________
Note: I don't use "Friend"-feature on this forum out of principle. Ah. And by the way: I'm not on Facebook either. So don't be offended if I don't accept your invitation/friend request
gschaider is offline   Reply With Quote

Old   November 17, 2008, 16:07
Default Thanks Bernhard I'll try.
  #92
New Member
 
Ranjiv Maulana
Join Date: Mar 2009
Posts: 1
Rep Power: 0
rama0004 is on a distinguished road
Thanks Bernhard

I'll try.
rama0004 is offline   Reply With Quote

Old   November 19, 2008, 23:09
Default hi, I have compiled the lib
  #93
New Member
 
carrieyang
Join Date: Mar 2009
Posts: 5
Rep Power: 17
carrie is on a distinguished road
hi,
I have compiled the libs successfully,but when i type paraFoam <root> <case>,it show:
From function dlLibraryTable::open(const fileName& functionLibName)
in file db/dlLibraryTable/dlLibraryTable.C at line 79
could not load /home/ivan/OpenFOAM/ivan-1.4.1/lib/linuxGccDPOpt/libparabolicVelocity.so: undefined symbol: _ZN4Foam4word5debugE
what is problem?could anyone give me a hand?
carrie is offline   Reply With Quote

Old   December 16, 2008, 08:03
Default Hello All, A question which
  #94
Senior Member
 
Mark Couwenberg
Join Date: Mar 2009
Location: Netherlands
Posts: 130
Rep Power: 17
markc is on a distinguished road
Hello All,

A question which is not exactly related to this thread but it looks like here are people who might be able to help me a bit further.
For some postprocessing utility I need to read in the value of the BC (fixedValue uniform) on some patch, usually U on Inlet patch.
So I ask the user to give the name of the inlet patch, the field to be read and than the utility should find in the times directory the correct value. E.g. if the the next BC for Inlet is given:
>>>
Inlet
{
type pressureInletVelocity;
value uniform (5 0 0);
}
>>>

the utility should return the vector (5 0 0);
Does anyone know how to perform this (simple) task?
Thanks in advance,

Brgds,

Mark
markc is offline   Reply With Quote

Old   December 16, 2008, 11:12
Default Radu, Thanks for your reply
  #95
Senior Member
 
Mark Couwenberg
Join Date: Mar 2009
Location: Netherlands
Posts: 130
Rep Power: 17
markc is on a distinguished road
Radu,

Thanks for your reply, very useful. I am getting closer, but still not there.
Now, if I imcorporate your snippet, during build I get the error message 'U' was not declared in this scope.

I also have a variable "fieldName", which is declared as const word. If I use this instead of U (to generalize the use of the final utility). In that case I get the error message that const class::Foam has no member named 'boundaryField'. Well, I understand the meaning of these messages but I do not know how to correct them.
Any advice here? Do I have to add some kind of createfield.H for U? This did not work so far as well.

Kind regards,

Mark
markc is offline   Reply With Quote

Old   January 9, 2009, 15:42
Default anyway i wave to write a B
  #96
Member
 
antonio segalini
Join Date: Mar 2009
Posts: 75
Rep Power: 17
antonio_ing is on a distinguished road
anyway

i wave to write a BC that, taking a surface patch, each point with coordinates (x,y,z) must have a velocity omega*(-y,x,0). Can someone send me an example?

thanks again for all the help
antonio_ing is offline   Reply With Quote

Old   January 13, 2009, 16:57
Default I have used the following piec
  #97
New Member
 
sesha
Join Date: Mar 2009
Posts: 23
Rep Power: 17
hamsadhwani8 is on a distinguished road
I have used the following piece of code as a InletVelocityProfile.H include file in my solver. The idea is to assign some section of the inlet a particular velocity and the rest something else. However, the 'for loop' does not seem to do anything! Can anyone comment on this?

InletVelocityProfile.H looks like this

label inletPatchID = mesh.boundaryMesh().findPatchID("inlet");

// Get reference to boundary value, patch centers
fvPatchVectorField& inletU = U.boundaryField()[inletPatchID];
const fvsPatchVectorField& inletFaceCentres = mesh.Cf().boundaryField()[inletPatchID];

scalarField y = inletFaceCentres.component(vector::Y);

forAll(inletU, faceI)
{
if (y >= 0.02)
{
inletU == 0.5*vector(1,0,0);
}
else
{
inletU == 0.0*vector(1,0,0);
}
}
hamsadhwani8 is offline   Reply With Quote

Old   January 13, 2009, 16:58
Default Ofcourse, I also have U.wr
  #98
New Member
 
sesha
Join Date: Mar 2009
Posts: 23
Rep Power: 17
hamsadhwani8 is on a distinguished road
Ofcourse, I also have

U.write() at the end of the include file.

Thanks
Sesha
hamsadhwani8 is offline   Reply With Quote

Old   January 14, 2009, 11:13
Default Hi, It should work with:
  #99
Senior Member
 
santos's Avatar
 
Jose Luis Santos
Join Date: Mar 2009
Location: Portugal
Posts: 215
Rep Power: 18
santos is on a distinguished road
Send a message via Skype™ to santos
Hi,

It should work with:

forAll(inletU, faceI)
{
if (y >= 0.02)
{
inletU[faceI] == 0.5*vector(1,0,0);
}
else
{
inletU[faceI] == 0.0*vector(1,0,0);
}
}

Regards,
Jose Santos
santos is offline   Reply With Quote

Old   January 14, 2009, 11:15
Default Also replace == with =.
  #100
Senior Member
 
santos's Avatar
 
Jose Luis Santos
Join Date: Mar 2009
Location: Portugal
Posts: 215
Rep Power: 18
santos is on a distinguished road
Send a message via Skype™ to santos
Also replace == with =.
santos is offline   Reply With Quote

Reply

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
UDF Unsteady velocity parabolic profile Rashad FLUENT 3 October 1, 2018 16:27
2D air parabolic velocity profile ilker FLUENT 2 November 12, 2008 09:43
parabolic velocity profile? bssdyl FLUENT 4 March 22, 2006 12:32
problem in 3d parabolic velocity profile Lokesh FLUENT 8 August 11, 2005 06:36
Parabolic temperature Inlet Profile in a tube majestywzh FLUENT 0 April 9, 2003 07:37


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