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

time functions in openFoam?

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

Reply
 
LinkBack Thread Tools Display Modes
Old   February 18, 2011, 10:53
Default time functions in openFoam?
  #1
New Member
 
Petar Zivkovic
Join Date: Feb 2011
Posts: 6
Rep Power: 6
cyberbrain is on a distinguished road
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
cyberbrain is offline   Reply With Quote

Old   February 21, 2011, 04:50
Default Time varying boundary conditions
  #2
Member
 
Frederic Collonval
Join Date: Apr 2009
Location: Technische Universitaet Munich - Lehrstuhl fuer Thermodynamik
Posts: 53
Rep Power: 8
fcollonv is on a distinguished road
Quote:
Originally Posted by cyberbrain View Post
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
fcollonv is offline   Reply With Quote

Old   February 22, 2011, 09:01
Default
  #3
New Member
 
Petar Zivkovic
Join Date: Feb 2011
Posts: 6
Rep Power: 6
cyberbrain is on a distinguished road
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.
cyberbrain is offline   Reply With Quote

Old   August 30, 2011, 07:58
Default
  #4
New Member
 
Muhammad Umer Ijaz Chaudrey
Join Date: Aug 2011
Location: Eindhoven, The Netherlands
Posts: 26
Rep Power: 6
umer.chaudrey is on a distinguished road
Send a message via Skype™ to 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
umer.chaudrey is offline   Reply With Quote

Old   August 30, 2011, 08:15
Default
  #5
Assistant Moderator
 
Bernhard Gschaider
Join Date: Mar 2009
Posts: 3,915
Rep Power: 40
gschaider will become famous soon enoughgschaider will become famous soon enough
Quote:
Originally Posted by umer.chaudrey View Post
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
gschaider is offline   Reply With Quote

Old   August 30, 2011, 08:21
Default
  #6
New Member
 
Muhammad Umer Ijaz Chaudrey
Join Date: Aug 2011
Location: Eindhoven, The Netherlands
Posts: 26
Rep Power: 6
umer.chaudrey is on a distinguished road
Send a message via Skype™ to umer.chaudrey
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
umer.chaudrey is offline   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
Time step size and max iterations per time step pUl| FLUENT 31 August 21, 2015 04:46
Cross-compiling OpenFOAM 1.7.0 on Linux for Windows 32 and 64bits with Mingw-w64 wyldckat OpenFOAM Announcements from Other Sources 3 September 8, 2010 06:25
Modified OpenFOAM Forum Structure and New Mailing-List pete Site News & Announcements 0 June 29, 2009 05:56
Computation Time compared to OpenFOAM Florian Fruth CFX 4 June 29, 2007 10:18
Can I define grids motion as a time functions Darcy CFX 4 March 29, 2001 21:14


All times are GMT -4. The time now is 18:36.