|
[Sponsors] |
how to define velocity for a circular inlet from a file |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
September 10, 2014, 04:00 |
how to define velocity for a circular inlet from a file
|
#1 |
Senior Member
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 16 |
Dear Fellows
I have a circular inlet with a radius R=4 mm which is surrounded by an annulus and I have an inlet boundary file from experimental data as: PHP Code:
Best, Bobi |
|
September 10, 2014, 04:41 |
|
#2 |
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,711
Blog Entries: 6
Rep Power: 52 |
Dear Bobi,
you can handle some inlet bc with groovy. At the moment I think you have the ability to do it by your own that means defining all velocitys manual in groovy. Maybe you also have some abilitys to get access to your data file and make it easier. At least may be there is some available BC for OpenFOAM like codedFixedValue. My first suggestion is using groovy BUT I remember that there was some BC that uses values out of a file (maybe just time dependend variables). For groovy you should have sth. like: Code:
type groovyBC; valueExpression "pos().x < 0.0003 ? vector(0 51.35 0) : pos().x < 0.0005 ? vector(0 51.5531 0) . . . : 0.3520"; value uniform (0 0 0); If you can make a fitting curve (polynomial or other function), then you can implement the function and let the function do all the work like: Code:
type groovyBC; variables "f= 42*pow(e,pos().x-0.23);e=2.71828182845904"; // just an example valueExpression "vector(0, f, 0)"; value uniform (0 0 0);
__________________
Keep foaming, Tobias Holzmann Last edited by Tobi; September 10, 2014 at 05:46. |
|
September 13, 2014, 10:07 |
|
#3 |
Senior Member
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 16 |
Dear Tobi
Many thanks for your kind hints. Actually, I was familiar with groovyBC. Accordingly, I have used this formulation which is derived from poiseuille fully developed flow. However, this formulation is not sufficiently accurate. (In this formulation Y-axis is the axis of Cylinder). This is the formulation I have used: Code:
FUEL { type groovyBC; variables "Vm=54;Xp=pos().x;Zp=pos().z;h=0.004;a=-Vm/(h*h);b=Vm;"; fractionExpression "1"; valueExpression "vector(0, a*((Xp*Xp)+(Zp*Zp))+b, 0)"; value uniform (0 0 0); } http://www.openfoam.org/version2.1.0...conditions.php However, My problem is the format of input file I tried some but the file format was not accepted. Have you ever done this before, If hopefully yes is it possible to upload a file according to the following : CSV file uniformValue csvFile; csvFileCoeffs { fileName "$FOAM_CASE/myDataFile" outOfBounds clamp; hasHeaderLine true; refColumn 0; componentColumns (0 1 2); // vector example } polynomial uniformValue polynomial // y = 0.1 + 1.3x^2 + 2.7x^3 ( (0.1 0) (1.3 2.0) (2.7 3.0) ); Best Regards Bobi Last edited by babakflame; September 13, 2014 at 11:20. |
|
September 13, 2014, 15:57 |
|
#4 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Greetings to all!
@Bobi:
Bruno
__________________
|
|
September 13, 2014, 16:26 |
|
#5 |
Senior Member
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 16 |
Dear Bruno
Many thanks for your quick reply. 1. I am using OpenFOAM 2.1.x 2. I am going to take a deep look at your link. Best Regards Bobi |
|
September 14, 2014, 08:36 |
|
#6 |
Senior Member
Bobby
Join Date: Oct 2012
Location: Michigan
Posts: 454
Rep Power: 16 |
Dear Bruno
Many thanks for your link. I read your link carefully. Nonetheless, your link was about time dependent inlet velocities. I think this does not work out for me quite well, since my case (the uploaded file in the first post of this thread) does not vary with time but vary with location. The only thing that comes to my mind is changing the header of your example from: Code:
Time, Ux, Uy, Uz Code:
X, Y, Z, Ux, Uy, Uz However, is it correct ,i mean is this the way to define space dependent inlet boundary files? Any hint is appreciated. Best Regards Bobi |
|
September 14, 2014, 09:29 |
|
#7 |
Retired Super Moderator
Bruno Santos
Join Date: Mar 2009
Location: Lisbon, Portugal
Posts: 10,981
Blog Entries: 45
Rep Power: 128 |
Hi Bobi,
Oh, sorry, I didn't notice that important detail OK, then AFAIK, there isn't a BC ready made in OpenFOAM 2.1.x to do that. You'll have to code your own BC. You can use as references the following BCs:
I don't have enough time to look further into this myself Good luck! Best regards, Bruno |
|
September 23, 2015, 02:31 |
|
#8 |
New Member
Mitchell Baum
Join Date: Sep 2015
Location: Australia
Posts: 7
Rep Power: 11 |
Hi Bobi,
I also require a similar application of a time independent, spatially varying inlet velocity profile which I have determined from experimental data. Have you made any further progress on this since your last post? Any guidance is greatly appreciated! Kind regards, Mitchell |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Problem compiling a custom Lagrangian library | brbbhatti | OpenFOAM Programming & Development | 2 | July 7, 2014 12:32 |
Trouble compiling utilities using source-built OpenFOAM | Artur | OpenFOAM Programming & Development | 14 | October 29, 2013 11:59 |
[OpenFOAM] Annoying issue of automatic "Rescale to Data Range " with paraFoam/paraview 3.12 | keepfit | ParaView | 60 | September 18, 2013 04:23 |
2.0.x on Mac OSX | niklas | OpenFOAM Installation | 74 | March 28, 2012 17:46 |
UDF FOR UNSTEADY TIME STEP | mayur | FLUENT | 3 | August 9, 2006 11:19 |