CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Time varying boundary type (http://www.cfd-online.com/Forums/openfoam-solving/58236-time-varying-boundary-type.html)

juho February 20, 2008 04:56

Hello First post on the mes
 
Hello

First post on the message board. I've only begun looking into OpenFOAM a few weeks ago.

I'm trying to simulate a intake plenum of a car and I'm using rhoTurbFoam.

My problem is how to define the time dependant boundary conditions for the outlets to each cylinder.

In a test case I currently have defined them as:

===============================================

0/U:


out1
{
type inletOutlet;
inletValue uniform (0 0 0);
value uniform (0 0 0);
}
inlet
{
type pressureInletOutletVelocity;
phi phi;
value uniform (0 0 0);
}

0/p:

out1
{
type timeVaryingUniformFixedValue;
timeDataFileName ".../out1p.dat";
value uniform 100000;
}
inlet
{
type totalPressure;
U U;
phi phi;
rho none;
psi none;
gamma 1;
p0 uniform 100000;
value uniform 100000;
}
===============================================

The out1.dat has a period of constant inlet pressure followed by a sine curve of a lower pressure.

This setup gives something resembling the boundary conditions I want but it's not really correct. I would like to change the type of the boundary depending on time:

===============================================
T1:
===============================================

p:

out1
{
type timeVaryingUniformFixedValue;
timeDataFileName ".../out1p.dat";
value uniform 100000;
}

U:
out1
{
type zeroGradient;
}

===============================================
T2:
===============================================

p:

out1
{
type zeroGradient
}

U:
out1
{
type fixedValue;
value uniform (0 0 0);
}

===============================================

Is there an easy way to accomplish this? Or is there a better way to approach the issue all together?

I would greatly appreciate any help or guidance!

Juho

olesen February 21, 2008 03:17

At first glance, it would seem
 
At first glance, it would seem that you need to write a time-varying mixed boundary condition and use the mixing parameter to switch between the value and the gradient.

The example input file might look like this:

// time fraction refValue refGradient

// using 10m/s
( 0.1 1 10 0)
...
// using zero-gradient
( 0.2 0 10 0)


/mark

juho February 21, 2008 10:21

Thank you! I'll start looki
 
Thank you!

I'll start looking into writing a timeVaryingMixed boundary condition. Let's see how it goes...

Juho

floooo December 8, 2008 05:03

Hi, Juho I'm also intereste
 
Hi, Juho

I'm also interested on timeVaryingMixed boundary condition.
Have you successfully done it ??

Florian

rassilon February 17, 2010 01:41

Quote:

Originally Posted by floooo (Post 181238)
Hi, Juho

I'm also interested on timeVaryingMixed boundary condition.
Have you successfully done it ??

Florian


Hi Juho, Floooo,

Did you get anywhere with your Boundary Condition problems?

I too am looking at developing a time based BC that changes from an inlet to a wall at a specified time during the run.

I am looking at using an IF, THEN, ELSE statement within the condition code to try and get it working, however so far I have had no luck.

If you have had any success with your problems, then I would love to hear about it!


R


All times are GMT -4. The time now is 09:32.