CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   time functions in openFoam? (https://www.cfd-online.com/Forums/openfoam-solving/85162-time-functions-openfoam.html)

cyberbrain February 18, 2011 09:53

time functions in openFoam?
 
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

fcollonv February 21, 2011 03:50

Time varying boundary conditions
 
Quote:

Originally Posted by cyberbrain (Post 295947)
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

cyberbrain February 22, 2011 08:01

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.

umer.chaudrey August 30, 2011 07:58

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

gschaider August 30, 2011 08:15

Quote:

Originally Posted by umer.chaudrey (Post 322260)
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

umer.chaudrey August 30, 2011 08:21

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

meth November 2, 2015 21:25

Quote:

Originally Posted by cyberbrain (Post 296416)
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


All times are GMT -4. The time now is 15:11.