CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > CFX

transient inlet boundary - reading from file

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

Reply
 
LinkBack Thread Tools Display Modes
Old   October 16, 2008, 08:19
Default transient inlet boundary - reading from file
  #1
John
Guest
 
Posts: n/a
Hi, I have a measured transient inlet velocity profile which i want to read into CFX (~90 files). The manual only deals with reading steady-state inlet profiles, but i guess there's a way to modify the Fortran code to be able to read a number of files instead? Unfortunately, my knowledge in Fortran isn't the best so if anyone could give me some hints (or provide a code) I would be very grateful.

Or is there another way, not using Fortran?

regards John
  Reply With Quote

Old   October 20, 2008, 16:59
Default Re: transient inlet boundary - reading from file
  #2
CycLone
Guest
 
Posts: n/a
If the inlet is planar (say in the XY plane), you could load all the data into a single profile and offset each profile in "time" at different offset in the Z direction. Whey you load the profile, instead of passing the Z location, pass it time, but multiply it by C [m/s], where C maps the time to the Z position.

I would make sure the Z separation of the profiles is on the order of the average mesh edge length. The other Z planes will have little influence on the interpolated value when the current time value makes you fall on a profile Z plane.

Another benefit of this approach is that you can use timesteps that are in-between your profile time values.

-CycLone
  Reply With Quote

Old   October 22, 2008, 03:08
Default Re: transient inlet boundary - reading from file
  #3
John
Guest
 
Posts: n/a
Hi CycLone and thanks for your answer.

I don't think I understood everything, do you mean that I should create a .csv file with the following contents:

X1,Y1,t0,u1,v1

X2,Y2,t0,u2,v2

X3,Y3,t0,u3,v3

. . . . . . .

. . . . . . .

. . . . . . .

X1,Y1,t1,u1,v1

X2,Y2,t1,u2,v2

X3,Y3,t1,u3,v3

. . . . . . .

etc...

How can I pass time to CFX instead of Z? The method seems promising if I can use timesteps that are in-between the measured values!

Thanks, John
  Reply With Quote

Old   October 22, 2008, 10:29
Default Re: transient inlet boundary - reading from file
  #4
CycLone
Guest
 
Posts: n/a
Basically, set the units for t to [m] and write your profile file. Imagine your profile as a 3D volume extended in space, but the third dimension is really time. What you want is to move the profile in time so it intersects your boundary condition at the right point.

When you use a profile, you need to pass coordinates to it. If Pre inserts the profile for you it will automatically create the corresponding expressions and insert x,y,z as the coordinates. The format of the CEL function used to interpolate from a profile is very simple. If you have a profile called "inletProfile" for instance and a variable u1, the function will be:

inletProfile.u1(coord 1,coord 2,coord 3)

The coordinates are CEL expressions passed to the function to be evaluated. Usually you would use x, y, z, but you can use any expression you want, as long as it has the right units. In your case you would use x, y, and f(t), where f(t) is a function of time that returns a "z" location. For example, if you list time in your profile as the real time, but with units of [m], and your boundary is located at z=.25 [m], then your function would be:

zVirtual=.25[m] + 1 [m/s] * t

More generally you could write this as

zVirtual= a + b*t a = .25 [m] b = 1 [m/s]

For you profile, you would put:

inletProfile.u1(x,y,zVirtual)

and voila! you have a time dependant profile.

You can use the same method to offset profiles in space, rotate them, move them in time etc.

You gotta love CEL!

-CycLone
  Reply With Quote

Old   October 22, 2008, 10:35
Default Re: transient inlet boundary - reading from file
  #5
John
Guest
 
Posts: n/a
"You gotta love CEL! "

VERY true, and I've got it working now Thanks very much for your help and suggestion!

John
  Reply With Quote

Reply

Thread Tools
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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
swak4foam building problem GGerber OpenFOAM Installation 54 April 24, 2015 16:02
Transient Mass flow inlet boundary condition nikhil FLUENT 1 April 16, 2014 09:58
1.7.x Environment Variables on Linux 10.04 rasma OpenFOAM Installation 9 July 30, 2010 04:43
Compiling gmshFoam with OpenFOAM-1.5 BlGene Open Source Meshers: Gmsh, Netgen, CGNS, ... 10 August 6, 2009 04:26
Compiling OpenFOAM13 on AMD64 with Redhat Enterprise mbeaudoin OpenFOAM Installation 20 June 17, 2008 06:43


All times are GMT -4. The time now is 09:04.