CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

How to define proper BC?

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   December 6, 2021, 13:39
Default How to define proper BC?
  #1
New Member
 
Ali Can
Join Date: Apr 2021
Posts: 28
Rep Power: 5
Ryuzaki is on a distinguished road
Hi,

I read an article and I want to do the work here myself, but many initial conditions are given. For example, we can find the free flow velocity based on the Mach number at the given temperature. However, Pressure inlet boundary condition is used. Mass flow rate value is also given. I'm so confused.

thx in advance..
Attached Images
File Type: jpg 1.JPG (24.8 KB, 16 views)
File Type: jpg 2.JPG (20.9 KB, 17 views)
Ryuzaki is offline   Reply With Quote

Old   December 6, 2021, 15:34
Default
  #2
Member
 
Join Date: May 2017
Posts: 31
Rep Power: 8
sqek is on a distinguished road
It looks like they're giving all the information they measured, not just what they set, for convenience

The second image looks like they were setting the pressure for the inlet and outlet, and letting the solver find the velocity (so in openfoam, you'd use pressureInletOutletVelocity or similar for the velocity) - which can be tricky to find the right numerical schemes, as it doesn't tend to converge very well
(the stagnation pressure difference between inlet and outlet can only come from losses within the flow, so it needs to get turbulent and shock losses right, and the feedback loop from pressure-velocity-losses-pressure is quite slow so it takes ages to converge)

So the free-stream conditions that they give in the first one are measured from their results most likely, and they're only setting inlet/outlet pressures and temperatures
sqek is offline   Reply With Quote

Old   December 9, 2021, 05:02
Default
  #3
New Member
 
Ali Can
Join Date: Apr 2021
Posts: 28
Rep Power: 5
Ryuzaki is on a distinguished road
dear sqek,
Firstly I wish to express my gratitude for your detailed expression.
I was thinking of using boundary conditions "pressureInletVelocity" for "u" and "totalPressure" for "p". If I use them, do I have to enter 0 for "pressureInletVelocity" and wait for the software to calculate the speed?

The U value for Mach 1.71 at 300K is approximately 594m/s. What if I enter "freestreamVelocity=594" for the inlet without going into the situations I mentioned above? Similarly, I'm thinking of entering the "p" value as 500000 for the inlet and 101325 for the outlet.

What do you think? thx in advance..
Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1912 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField uniform 500000;

boundaryField
{
fab
{
type symmetry;
}

wall
{
type zeroGradient;
}
inlet
{
type totalPressure;
gamma 1.4;
p0 $internalField;
}

outlet
{
type waveTransmissive;
field p;
psi thermosi;
gamma 1.4;
fieldInf 101325;
lInf 100;
value 101325;
}
top
{
type zeroGradient;
}
}

// ************************************************** *********************** //
Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1912 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 1 -1 0 0 0 0];
internalField uniform (593.751 0 0);

boundaryField
{
farfield
{
type freestreamVelocity;
freestreamValue $internalField;
}

bottom
{
type noSlip;
}

top
{
type slip;
}

fab
{
type symmetry;
}
}

// ************************************************** *********************** //
Quote:
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v1912 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //



dimensions [0 0 0 1 0 0 0];

internalField uniform 300;

boundaryField
{
inlet
{
type fixedValue;
value $internalField;
}

outlet
{
type inletOutlet;
value $internalField;
}

wall
{
type zeroGradient;
}

kayma
{
type zeroGradient;
}

front
{
type zeroGradient;
}

top
{
type zeroGradient;
}

back
{
type symmetry;
}
}

// ************************************************** *********************** //
Quote:
Originally Posted by sqek View Post
It looks like they're giving all the information they measured, not just what they set, for convenience

The second image looks like they were setting the pressure for the inlet and outlet, and letting the solver find the velocity (so in openfoam, you'd use pressureInletOutletVelocity or similar for the velocity) - which can be tricky to find the right numerical schemes, as it doesn't tend to converge very well
(the stagnation pressure difference between inlet and outlet can only come from losses within the flow, so it needs to get turbulent and shock losses right, and the feedback loop from pressure-velocity-losses-pressure is quite slow so it takes ages to converge)

So the free-stream conditions that they give in the first one are measured from their results most likely, and they're only setting inlet/outlet pressures and temperatures
Ryuzaki is offline   Reply With Quote

Reply


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 Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Fluent UDF for moving laser heating of a solid block Cooper24 Fluent UDF and Scheme Programming 7 July 9, 2021 05:56
HELP----Surface Reaction UDF Ashi Fluent UDF and Scheme Programming 1 May 19, 2020 21:13
SR_Rate UDF For a MEMs model timjm Fluent UDF and Scheme Programming 1 October 10, 2018 02:16
udf problem eb.nabizadeh Fluent UDF and Scheme Programming 2 March 1, 2013 00:28
Installing OF 1.6 on Mac OS X gschaider OpenFOAM Installation 129 June 19, 2010 09:23


All times are GMT -4. The time now is 02:37.