CFD Online Discussion Forums

CFD Online Discussion Forums (
-   OpenFOAM (
-   -   Change inlet velocity (

riesotto February 18, 2012 07:13

Change inlet velocity
Hi all,

how can I change the velocity at the inlet during a calculation. For better convergence I want to start up my simulation with a low velocity value and after some iterations change it to a higher value. Is there an easy way to do this????

kind regards

nimasam February 18, 2012 08:44

yep there is,
look at groovyBC or swak4foam

riesotto February 18, 2012 08:49

Hi nimasam,
thx for your reply. I will check this options...:)
kind regards

philippose February 18, 2012 11:35


I guess the easiest solution would be to use something like the "timeVaryingUniformFixedValue" boundary condition available in the native OpenFOAM distribution.

In your particular case, you can use this boundary condition to create a ramp of the inlet velocity to stabilize the initial part of the run.

Just search for the boundary condition in the forums for more details


riesotto February 18, 2012 14:22

Hi Philippose,

thx for your hint. It works fine with "timeVaryingUniformFixedValue".

Here for all who are intrested:
- first I wrote a file called rampe.dat, that is located in the main folder (the folder with /0, /constant, /system). This file contains:
(0.0 (-0.75 0.0 0.0))
(25.0 (-3.79 0.0 0.0))
(50.0 (-7.58 0.0 0.0))
(75.0 (-13.64 0.0 0.0))

here the first number (0.0 , 25.0 ...) is the time of the simulation and the following three numbers is the vector of the velocity (-0.75 0.0 0.0).

- Then I modified the boundary condition for the velocity (U):
type timeVaryingUniformFixedValue;
filename "rampe.dat"
value uniform (0 0 0);
outOfBounds clamp;

here outOfBounds means that after the endtime (75.0) the last value (-13.64 0.0 0.0) is retained.

- At the end I started the simulation and it works :D

Now I have a new Problem. Is it possible to change the value of omega in the MRFZones with this or any other method?????

kind regards,

All times are GMT -4. The time now is 14:38.