# combining parabolic inlet velocity profile with time varying velocity vector values

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

 March 27, 2018, 02:30 combining parabolic inlet velocity profile with time varying velocity vector values #1 New Member   Jawahar Join Date: Nov 2016 Posts: 4 Rep Power: 9 I have used groovyBC to generate parabolic velocity profile at inlet of a axi-symmetric pipe flow problem. I want the center-line velocity value(magnitude) to change with respect to values read from file. I have used the groovyBC like this, INLET { type groovyBC; value uniform (1 0 0); variables ( "Vm=2;" "yp=pos().y;" "zp=pos().z;" "r=sqrt(pow(yp,2)+pow(zp,2));" "rmax=max(r);" "a=-Vm/(rmax*rmax);b=Vm;" ); fractionExpression "1"; valueExpression "vector(a*((yp*yp)+(zp*zp))+b,0,0)"; } Here "Vm" is the magnitude of the velocity profile. this has to change every time step. time=0.001 Vm=0.34 time=0.002 Vm=0.45 time=0.003 Vm=0.38 time=0.004 Vm=0.40 ... ... ... ... time=0.8 Vm=0.24 Any possibility of implementing this in groovyBC.? or can we write a separate boundary condition file for this.? I am new to OpenFoam. faiazk likes this.

 June 1, 2018, 18:38 #2 New Member   Faiaz Khaled Join Date: Oct 2017 Location: United States of America Posts: 17 Rep Power: 8 Dear Jawahar, I have a similar question to this. Were to able to generate velocity profile varying with time at the inlet? Please let me know. Thank you. Regards, Faiaz

 June 2, 2018, 18:52 #3 Senior Member   anonymous Join Date: Jan 2016 Posts: 416 Rep Power: 13 Hi! Honestly i'm not familiar with groovyBC, but i think you can use codedFixedValueFvPatchField: https://cpp.openfoam.org/v5/classFoa...d.html#details I have never tried to use this BC with interpolation table from a file, but you can include libs and header files so I think you can use it with a little coding if you don't want to write a new BC and compile it and etc...

July 10, 2023, 06:41
#4
New Member

Brahim Aly
Join Date: May 2023
Posts: 1
Rep Power: 0
Quote:
 Originally Posted by faiazk Dear Jawahar, I have a similar question to this. Were to able to generate velocity profile varying with time at the inlet? Please let me know. Thank you. Regards, Faiaz

Hello Faiaz,

I'm really curious if you had some keys to solve your problem. Actually I'm working on the same problem.

My geometry is a T junction with two inlets and I want to have a door function for the maximum velocity that goes from 0 to 1 every 10 time steps. As for the profile of the velocity it should be parabolic.

I have used groovyBC, codedFixedValue and created my own boundary condition. I failed in each of them.

groovyBc: It did great with sine function and i had the pulse that I wanted but I struggled to do a ramp.

codedFixedValue: It worked as fine as it can gets with the ramp and the parabolization for geometries that are created in blockMesh. But when it came to apply it on my T junction that i imported from Salome, the parablozation don't work no more; I do my parabolization with a loop over all inlets patches.

MyParabolicV (personnal BC): I struggle implementing the time loop to do the ramp.

Would appreciate any help or pointer,
BABY FOAMER, Brahim.

 Tags groovybc, time vayring bc, unsteady b.c.