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

question about swirlMassFlowRateInletVelocity boundary type

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   March 19, 2009, 06:33
Default question about swirlMassFlowRateInletVelocity boundary type
  #1
New Member
 
parham momeni
Join Date: Mar 2009
Location: glasgow, uk
Posts: 25
Rep Power: 16
mcjicpm2 is an unknown quantity at this point
Hi,
I am trying to use the swirlMassFlowRateInletVelocity boundary type:written by olesen in the following discussion room
http://www.cfd-online.com/Forums/ope...ordinates.html

as below:
You might try the swirlMassFlowRateInletVelocity boundary type:
swirlbc.tar.gz

Description
Describes an massflow normal vector boundary condition by its
magnitude as an integral over its area, with a swirl component.
The current density is used to correct the velocity.
Note: The value is positive for inward pointing vectors
Swirl is defined in RPM about the patch centre-axis according
to a right-hand rule (inwards axis).
Only useful for planar patches.

Example of the BC specification:

inlet
{
type swirlMassFlowRateInletVelocity;
massFlowRate 0.2; // [kg/s]
rpm 5000;
}


Can anybody please tel me after I downloaded the files what should I do after? where should I copy the files? should I compile something?

please help me since I am very new to openfoam and it is needed for me to learn it .
mcjicpm2 is offline   Reply With Quote

Old   April 24, 2009, 06:30
Default
  #2
Member
 
Leonardo Giampani Morita
Join Date: Apr 2009
Location: Paris, France
Posts: 58
Rep Power: 17
leonardo.morita is on a distinguished road
Hello,

I don't know if it is too late, but I'll try to help you and to get some help too.

I was suggested to install all personal applications in OpenFOAM\<user>-<version> folder, not to mix with OpenFOAM's already installed applications.
In the case of one new BC, you can copy the files into the \src\<newBC> folder, for example. After that, you have to create one other folder, named Make, in the same address of the .C file. In this Make folder, you need to create two files: options and files. So in the end you'll have something like:

OpenFOAM\<user>-<version>\src\<newBC>
- <newBC>.C
- Make\files
- Make\option

(in general, you may have more than just one .C and even some .H files)

And I can't help you anymore...here I'll ask somebody to explain what I should exactly write in these Make\files and Make\options.
I think that in the Make\files we must list the files that are going to be compiled and at the end, the address and name of the file (.so, in this case) that will be created. For this case (swirlMassFlowRateInletVelocity), I tried:

swirlMassFlowRateInletVelocityFvPatchVectorField.C

LIB = $(FOAM_USER_LIBBIN)/swirlMassFlowRateInletVelocity

In the case of the Make\options, I just know we have to show what libraries etc will be needed during the compilation (with -I), but I can't understand the meaning of the rest of the code. In this case, I have:

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

LIB_LIBS = \
-lfiniteVolume

After I give the wmake libso comand, I receive some error messages (backslash-newline at the end of file, no match function to call etc) and no library is created.

Could anybody help?

Thank you,

Leo
leonardo.morita is offline   Reply With Quote

Old   April 28, 2009, 05:08
Default
  #3
Member
 
Leonardo Giampani Morita
Join Date: Apr 2009
Location: Paris, France
Posts: 58
Rep Power: 17
leonardo.morita is on a distinguished road
Hello again,

After some help from Mark, the code's developer, I could finally solve my problem. Here is a brief guide for those who have the same problem:

1. The organisation of the files is very important and it is higly recommended to keep your own applications in your personal folder, OpenFOAM/<user>-<version>. So you should/may have (you can replace src by one other folder, like a foamUser, for example):

~/src/
~/src/Make/
~/src/Make/files
~/src/Make/options
~/src/<newlib>/
~/src/<newlib>/<file>.C
~/src/<newlib>/<file>.H
~/src/libfoamUser.C

where, in this case:

<newlib> = swirlFlowRateInletVelocity
<file>.C = swirlFlowRateInletVelocityFvPatchVectorField.C
<file>.H = swirlFlowRateInletVelocityFvPatchVectorField.H

2. The content of the Make/files file is:

<newlib>/<file>.C //relative address of the file to be compiled

libfoamUser.C
LIB = $(FOAM_USER_LIBBIN)/libFoamUser

3. And that of the Make/options is:

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

LIB_LIBS = \
-lfiniteVolume

4. The only library that will be created is libfoamUser.so, which will gather information about all your own libraries listed in the Make/files file. If you want to add some other library later, all you have to do is to create a new folder with the .C and .H files and to put an extra line in the Make/files, like:

<newlib>/<file>.C //relative address of the file to be compiled

5. Once the files are well placed, you can compile it using wmake libso in the ~/src/ folder

Hope this will be useful!
leonardo.morita is offline   Reply With Quote

Old   November 16, 2009, 14:41
Default
  #4
Senior Member
 
tian's Avatar
 
Tian
Join Date: Mar 2009
Location: Berlin, germany
Posts: 122
Rep Power: 17
tian is on a distinguished road
Hi,

it is also working for the OpenFOAM 1.5-dev Version?

Bye
Thomas
tian is offline   Reply With Quote

Old   November 17, 2009, 14:16
Default
  #5
Senior Member
 
tian's Avatar
 
Tian
Join Date: Mar 2009
Location: Berlin, germany
Posts: 122
Rep Power: 17
tian is on a distinguished road
Hi,

I changed the code for OpenFOAM-1.5-dev Version. Thanks

Bye
Tian
Attached Files
File Type: gz swirlMassFlowRateInletVelocity.gz (3.0 KB, 38 views)
tian is offline   Reply With Quote

Old   August 28, 2014, 04:08
Default Modify swirlFlowRateInletVelocityFvPatchVectorField
  #6
Member
 
Ndong-Mefane Stephane Boris
Join Date: Nov 2013
Location: Kawasaki (JAPAN)
Posts: 53
Rep Power: 13
S_teph_2000 is on a distinguished road
Hello,

I would like to modify swirlFlowRateInletVelocityFvPatchVectorField in order to use velocity components (in cylindrical coordinates if possible) instead of rpm. I will also add that each velocity component is a function of the radial component of U.

instead of:
{
type swirlMassFlowRateInletVelocity;
massFlowRate 0.2; // [kg/s]
rpm 5000;
}

we would have
{
type swirlMassFlowRateInletVelocity;
massFlowRate 0.2; // [kg/s]
Ur = f1(r); //I also need to find a way to input an expression "f(r)" instead of a value. maybe with Swak{...}, or groovyBC???
Ut = f2(r);
Uz = f3(r);
}

with r=x^2+y^2

I an trying to set the BC for the inlet of a steam turbine...HELP PLEASE!!

Stephane
S_teph_2000 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
Invalid boundary type name blobloblo OpenFOAM Installation 1 June 9, 2008 12:21
what is 'interior' boundary type Muhammad Usman Qureshi FLUENT 3 July 25, 2007 15:57
boundary conditions' type (UDF) Doru Grosan FLUENT 0 August 24, 2005 11:22
Transient Boundary Type Prakash Verma FLUENT 0 March 1, 2005 17:00
Change Boundary type? ccc FLUENT 6 January 15, 2004 06:24


All times are GMT -4. The time now is 22:52.