# time functions in openFoam?

 User Name Remember Me Password
 Register Blogs Members List Search Today's Posts Mark Forums Read

 February 18, 2011, 10:53 time functions in openFoam? #1 New Member   Petar Zivkovic Join Date: Feb 2011 Posts: 6 Rep Power: 6 Hi all... i'm new to openFoam and Finite Volume Method...I've been working with finite elements for a while and now i have problems with openFoam (or openFoam has problems with me,what is more likely.. So...i've made parametric model and generated mesh for simple straight pipe flow example... my question is ... is it possible to prescribe inlet velocity values on inlet which will change(linearly, or whatever) over time for each step in calculation... for example...i want to simulate blood flow in artery...and velocity values at arteries inlet change their values over time...is it possible to prescribe input value for each step or not? I'm using icoFoam although i'm not sure if this is right choice of solver for this transient problem. Thanks in advance. Petar meth likes this.

February 21, 2011, 04:50
Time varying boundary conditions
#2
Member

Frederic Collonval
Join Date: Apr 2009
Location: Technische Universitaet Munich - Lehrstuhl fuer Thermodynamik
Posts: 53
Rep Power: 8
Quote:
 Originally Posted by cyberbrain my question is ... is it possible to prescribe inlet velocity values on inlet which will change(linearly, or whatever) over time for each step in calculation... for example...i want to simulate blood flow in artery...and velocity values at arteries inlet change their values over time...is it possible to prescribe input value for each step or not?
Hello Petar

There are two boundary conditions that can interest you:
timeVaryingUniformFixedValue
timeVaryingFlowRateInletVelocity

The first one allow you to specified a fixed value interpolated linearly from a file. The other one do the same but for the flow rate.

The description are
timeVaryingUniformFixedValue
00028 A time-varying form of a uniform fixed value boundary condition.
00029
00030 Example of the boundary condition specification:
00031 @verbatim
00032 inlet
00033 {
00034 type timeVaryingUniformFixedValue;
00035 fileName "\$FOAM_CASE/time-series";
00036 outOfBounds clamp; // (error|warn|clamp|repeat)
00037 }
00038 @endverbatim

timeVaryingFlowRateInletVelocity
00027 Description
00028 A time-varying form of a flow normal vector boundary condition.
00029
00030 Example of the boundary condition specification:
00031 @verbatim
00032 inlet
00033 {
00034 type timeVaryingFlowRateInletVelocity;
00035 flowRate 0.2; // Volumetric/mass flow rate [m3/s or kg/s]
00036 value uniform (0 0 0); // placeholder
00037 fileName "\$FOAM_CASE/time-series";
00038 outOfBounds repeat; // (error|warn|clamp|repeat)
00039 }
00040 @endverbatim
00041
00042 Note
00043 - The value is positive inwards
00044 - may not work correctly for transonic inlets!
00045 - strange behaviour with potentialFoam since the U equation is not solved

The file "time-series" (you can choose the name you want) has the following structure (the example is for the flow rate):
(
// Time field
(0 10)
(1 15)
(2 5)
);

The interpolation between the value is linear.

Good luck,

Frederic

 February 22, 2011, 09:01 #3 New Member   Petar Zivkovic Join Date: Feb 2011 Posts: 6 Rep Power: 6 Thanks for quick reply Frederic. I'll give it a try and i'll post my results/problems/solutions if someone has similar question in the future. Thanks again.

 August 30, 2011, 07:58 #4 New Member   Muhammad Umer Ijaz Chaudrey Join Date: Aug 2011 Location: Eindhoven, The Netherlands Posts: 26 Rep Power: 6 Hi everyone, i am a new user of openFoam. using version 2.0 I am trying to implement timeVaryingUniformFixedValue boundary condition for outlet in which Pressure varies with time at a face. I read the initial discussion and tried to implement it. This is how my pressure file looks: "WALL_c0_f5 { type timeVaryingUniformFixedValue; timeDataFileName outlet.dat; value uniform 82700; outOFBounds stop; //clamp/repeat } The outlet.dat text file is in the form of: (t0 p0 t1 p1.. .... tN pN ) But when i try to run simpleFoam, i get this error: --> FOAM FATAL IO ERROR: keyword outOfBounds is undefined in dictionary "/home/asml/Umer/openfoam200/Work/test/testtransient/0/p::boundaryField::WALL_c0_f5" file: /home/asml/Umer/openfoam200/Work/test/testtransient/0/p::boundaryField::WALL_c0_f5 from line 24 to line 26. From function dictionary::lookupEntry(const word&, bool, bool) const in file db/dictionary/dictionary.C at line 400. Kindly please help me or guide me how to fix this. Thanks Kind Regards, Umer

August 30, 2011, 08:15
#5
Assistant Moderator

Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
Quote:
 Originally Posted by umer.chaudrey Hi everyone, i am a new user of openFoam. using version 2.0 I am trying to implement timeVaryingUniformFixedValue boundary condition for outlet in which Pressure varies with time at a face. I read the initial discussion and tried to implement it. This is how my pressure file looks: "WALL_c0_f5 { type timeVaryingUniformFixedValue; timeDataFileName outlet.dat; value uniform 82700; outOFBounds stop; //clamp/repeat } The outlet.dat text file is in the form of: (t0 p0 t1 p1.. .... tN pN ) But when i try to run simpleFoam, i get this error: --> FOAM FATAL IO ERROR: keyword outOfBounds is undefined in dictionary "/home/asml/Umer/openfoam200/Work/test/testtransient/0/p::boundaryField::WALL_c0_f5" file: /home/asml/Umer/openfoam200/Work/test/testtransient/0/p::boundaryField::WALL_c0_f5 from line 24 to line 26. From function dictionary::lookupEntry(const word&, bool, bool) const in file db/dictionary/dictionary.C at line 400. Kindly please help me or guide me how to fix this. Thanks Kind Regards, Umer
You're asking exactly the same question in another thread (and have already received help there - correct help I must add). If I were Tobias I'd be offended that you don't trust him and stop helping. Especially as the problem is a minor captial-letter that should be minor. Look through your original question and you should be able to spot it

 August 30, 2011, 08:21 #6 New Member   Muhammad Umer Ijaz Chaudrey Join Date: Aug 2011 Location: Eindhoven, The Netherlands Posts: 26 Rep Power: 6 Dear Bernard Gshaider First of all, I am extremely sorry, I am new here on the forum as well, so do not know much of the dynamics here. I posted on that post regarding unsolved problem too again, do not mean to offend or disrespect anyones assistance. Saw two similar forums regarding a similar topic. Anyway my apologies, yes I have found the spelling mistake. Thank you, will get back if I get stuck again. Kind Regards, Umer

November 2, 2015, 22:25
#7
Member

methma Rajamuni
Join Date: Jul 2015
Location: Victoria, Australia
Posts: 32
Rep Power: 2
Quote:
 Originally Posted by cyberbrain Thanks for quick reply Frederic. I'll give it a try and i'll post my results/problems/solutions if someone has similar question in the future. Thanks again.

I have a similar question, I want to give dirichlet boundary condition for U with a time dependent value that I am calculating in each time step. I would like to know how you did it. Can you please help me on this if you have an insight.

Best,

Methma

 Thread Tools Display Modes Linear Mode

 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 OffTrackbacks are On Pingbacks are On Refbacks are On Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post pUl| FLUENT 31 August 21, 2015 04:46 wyldckat OpenFOAM Announcements from Other Sources 3 September 8, 2010 06:25 pete Site News & Announcements 0 June 29, 2009 05:56 Florian Fruth CFX 4 June 29, 2007 10:18 Darcy CFX 4 March 29, 2001 21:14

All times are GMT -4. The time now is 13:41.

 Contact Us - CFD Online - Top