CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (https://www.cfd-online.com/Forums/openfoam-solving/)
-   -   Boundary conditions for a 1-d channel (https://www.cfd-online.com/Forums/openfoam-solving/94021-boundary-conditions-1-d-channel.html)

 popezmark November 3, 2011 05:54

Boundary conditions for a 1-d channel

Hi everyone.
I'm a new Foamer and i need some advice, can you help me please?

I'm trying to run a simple 1-D simulation similar, to the shockTube tutorial, with sonicFoam solver.
I have a rectangular conduit 1d with inlet and outlet patches at the edges, and the other faces are classified "empty".
In the first phase of the simulation, I have, inside the conduit, air with low pressure and temperature, and ZERO velocity. I want to have the inlet OPEN and communicating with a high pressure and temperature air ambience. The outlet is CLOSED like a wall. So, I expect the formation of a shockwave, starting from the inlet and moving towards the outlet, and of course there will be introduction of hot air coming from the outside and passing through the open inlet, compressing the cold air that was inside the conduit. Eventually the shockwave reach the closed outlet and is reflected back.

My question is: what is the most appropriate pressure boundary condition for the inlet? I tried this:

For pressure:

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [1 -1 -2 0 0 0 0];

internalField uniform 196000; <-- I'm using Pascal

boundaryField
{
inlet
{
type totalPressure;
gamma 1.4;
p0 353000;
}
outlet
{
}
empty
{
type empty;
}
}

// ************************************************** *********************** //
for temperature:

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 0 0 1 0 0 0];

internalField uniform 435; <--- kelvin

boundaryField
{
inlet
{
type fixedValue;
value uniform 1589;
}
outlet
{
}
empty
{
type empty;
}
}

// ************************************************** *********************** //

and for velocity:

// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
inlet
{
}
outlet
{
type fixedValue;
value uniform (0 0 0); <--- this is for the wall
}
empty
{
type empty;
}
}

// ************************************************** *********************** //

Am I doing correctly?

Thank you everyone.

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