CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Parabolic inlet velocity profile (https://www.cfd-online.com/Forums/openfoam-solving/57793-parabolic-inlet-velocity-profile.html)

mss December 14, 2006 07:47

Hej, For my project I desid
 
Hej,

For my project I desided to use the icoFoam case, but I need to
specify velocity inlet (it should be parabolic). Could u give me some
hint how I can do it?

Thank u,
Rita

msrinath80 December 14, 2006 09:24

See Bernhard's responses above
 
See Bernhard's responses above. I used his utility without any problems for 2D cases. Haven't tried for 3D yet; but I guess there should be no problems.

Quoting from Bernhard:

Place the source in a directory. Create a directory called 'Make' in it in which you create a file named 'options' with this content

EXE_INC = \
-I$(LIB_SRC)/cfdTools/lnInclude \
-I$(LIB_SRC)/finiteVolume/lnInclude

EXE_LIBS = -lfiniteVolume

and a file called 'files' with this content

setParabolicInlet.C
EXE = $(FOAM_USER_APPBIN)/setParabolicInlet

After a wmake the executable is in your path and you can start using it.

BTW: you'll also need a creatFields.H:

Info<< "Vector field U\n" << endl;
volVectorField U
(
IOobject
(
"U",
runTime.timeName(),
mesh,
IOobject::MUST_READ,
IOobject::AUTO_WRITE
),
mesh
);

mss December 14, 2006 09:37

Thank u very much, I will try
 
Thank u very much, I will try it.

Rita

mss January 17, 2007 03:51

Hej, Sorry maybe it is a no
 
Hej,

Sorry maybe it is a not good question about the parabolic inlet...But could u give me some hint where I should put exatly the setParabolicInlet.C Should I put it in the OpenFOAM/OpenFOAM-1.3/applications/solvers/incompressible/icoFoam or where? I am asking because as I understood that the way is very important in OpenFOAM.

Thank u,
Rita

msrinath80 January 17, 2007 09:26

Not very critical to put it in
 
Not very critical to put it in a particular place. However, an organized arrangement always helps. I have mine put in a separate directory:

[username@hostname parabolic_velocity_inlet]$ pwd
/home/username/OpenFOAM/username-1.3/custom_utils/Bernhard_Gschaider/parabolic_v elocity_inlet
[username@hostname parabolic_velocity_inlet]$ ls -la
total 84K
drwxr-xr-x 3 username users 4.0K Nov 15 21:12 .
drwxr-xr-x 3 username users 4.0K Nov 14 16:58 ..
-rw-r--r-- 1 username users 156 Nov 14 16:58 createFields.H
drwxr-xr-x 3 username users 4.0K Nov 15 21:12 Make
-rw-r--r-- 1 username users 7.2K Nov 14 16:58 setParabolicInlet.C
-rw-r--r-- 1 username users 33K Nov 15 21:12 setParabolicInlet.dep
[username@hostname parabolic_velocity_inlet]$

alberto January 17, 2007 17:00

I can't find the solution prop
 
I can't find the solution proposed by Hrvoje. Can someone post it here?

Regards,
Alberto

hjasak January 17, 2007 17:07

Attached. http://www.cfd-o
 
Attached.

http://www.cfd-online.com/OpenFOAM_D...hment_icon.gif parabolicVelocity_HJ_17Jan2007.tgz

Enjoy,

Hrv

alberto January 18, 2007 08:55

Thanks! Alberto
 
Thanks!

Alberto

mss January 23, 2007 04:28

Hej pUl|, Thank you very
 
Hej pUl|,

Thank you very much for advice. Now my ParabolicInlet is working
fine.


I created my own folder:
"OpenFOAM/margst-1.3/applications/solvers/Parabolic_velocity_inlet"
and compiled all files there.

The problem with this is that I can "see" my new case only within
OpenFOAM shell and ,for some reason, I can look at the results withy
Paraview.


For example, i create the class:

Case : IcoFoam,
Case root : OpenFOAM/margst-1.3/applications/solvers/Parabolic_velocity_inlet
Case name: test

But as soon as I close OpenFOAM, the case disappears for good from
the case brauser. How can one "save" the case? Plus, how can one use
ParaView for my newly created class?



Best regards,
Rita

mss January 24, 2007 04:47

Hej I want to create a lin
 
Hej

I want to create a linear profile of Temperature Boundary condition on
the one of the vertical walls. Before I was adding it
as a vector, but if I want to refine my mesh I have to change my vector
manualy.

Could you give me a hint what I should add to the file ParabolicInlet.C to
have both conditions (parabolic Inlet for velocity and linear profile for
temperature).

Thank you in advance,
Rita

bummi April 17, 2007 08:32

Hi Bernhard, stupid questio
 
Hi Bernhard,

stupid question:

I would like to modify my boundary conditions by using your code. Everything works fine, but instead of a list with the data. Simply the maximum value of the velocity is responded in my boundary

So

Inlet
{
type fixedValue;
value uniform (0 0 0);
}
results in

Inlet
{
type fixedValue;
value uniform (1 0 0);
}

if my maximum velocity is 1. Any Idea????

Thanks Bummi

gschaider April 17, 2007 17:27

Hi Bummi! You refering to m
 
Hi Bummi!

You refering to my posting from April 26, 2006, are you? That code makes an assumption about the orientation of the patch: that it is parallel to the y-z-plane. Most propably your patch is parallel to xz or xy. Then the result should be the way you described it.
You'll have to modify the code to fit your geometry or rotate the geometry. Or write a more general utility.

regards
Bernhard

bummi April 18, 2007 02:34

Hi Bernhard, I'll try this!
 
Hi Bernhard,

I'll try this! Thank you very much, especially for the fast response!!

regards

Bummi

bummi April 18, 2007 03:15

Hi Bernhard again, the dire
 
Hi Bernhard again,

the direction was not the problem. It was correct, but I added some other parts to your code for modifying the inlet concentration and those caused the problem. By deleting them everything works.

Stupid me.

Regard

Bummi

pnguyen1 April 20, 2007 02:29

Hi Hvr, Could you re-post you
 
Hi Hvr,
Could you re-post your "parabolicVelocity_HJ_17Jan2007.tgz", please ?
I could not download it !
Thank you very much!
Phuc-Danh

dmoroian April 20, 2007 02:34

The archive is good, I've just
 
The archive is good, I've just tried it.
Be careful when you download it to change its name from something like parabolicVelocity_HJ_17Jan2007-3679.unk to parabolicVelocity_HJ_17Jan2007.tgz

Dragos

pnguyen1 April 20, 2007 02:50

Hi Hvr, Sorry, I can download
 
Hi Hvr,
Sorry, I can download it now.
Thank you very much!
Phuc-Danh

pnguyen1 April 20, 2007 02:51

Hi Dragos, Thanks for your ad
 
Hi Dragos,
Thanks for your additional precision !
Phuc-Danh

r2d2 May 3, 2007 07:54

Dragos, Once you download th
 
Dragos,
Once you download the files, where do you have to
put them?
In:
~/OpenFOAM/OpenFOAM-1.3/src/finiteVolume/
fields/fvPatchFields/derivedFvPatchFields/

and

/home/radu/OpenFOAM/OpenFOAM-1.3/src/
finiteVolume/lnInclude/
???
What next? Do you have an example of U in one of the 0īs with the correct syntax?
Thanks,
Radu

torvic August 14, 2007 15:10

Hi to everyone, I'm trying
 
Hi to everyone,

I'm trying to implement a parabolic profile in an inlet for reactingFoam, since I want to study an open flame and literature suggest to have such a developed profile before entering the crossflow plane. So, I'm trying two options: to compile the Bernhard's "SetParabolicInlet.C" and that of Dr. Jasak "ParabolicVelocity" under OF-1.4.1.

In the first one i get an error message concerning to fvPatchFieldFields.H. this is the message:

Making dependency list for source file parabolic.C
could not open file fvPatchFieldFields.H for source file parabolic.C
SOURCE=parabolic.C ; g++ -m32 -Dlinux -DDP -Wall -Wno-strict-aliasing -Wextra -Wno-unused-parameter -Wold-style-cast -O3 -DNoRepository -ftemplate-depth-40 -I/home/foam-1.4.1/OpenFOAM/OpenFOAM-1.4.1/src/finiteVolume/lnInclude -I/home/foam-1.4.1/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude -IlnInclude -I. -I/home/foam-1.4.1/OpenFOAM/OpenFOAM-1.4.1/src/OpenFOAM/lnInclude -fPIC -pthread -c $SOURCE -o Make/linuxGccDPOpt/parabolic.o
parabolic.C:36:32: error: fvPatchFieldFields.H: No such file or directory
parabolic.C: In function 'int main(int, char**)':
parabolic.C:74: error: 'fvPatchVectorFieldField' was not declared in this scope
parabolic.C:74: error: 'Upatches' was not declared in this scope
make: *** [Make/linuxGccDPOpt/parabolic.o] Error 1

I looked for this file but didn't find it. I'm not sure if it is not anymore in OF-1.4.1, since I compiled it well under OF-1.3.

With respect to the one of Dr. Jasak, I modified the line he suggests (Alberto Passalacqua's post):

const vectorField& c = patch().Cf();

but I don't know if i have to compile as the one of bernhard's: create a Make, add file and options files.

I also tried to find the message Dr. Jasak refers to concerning a previous long message about compiling and linking new libraries (February 13 2007 answering to Thomas Jung) but i don't find it.

Please, I would thank so much if someone can give me a hint of how to proceed.

Thanks for reading,

best

V


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