|
[Sponsors] | |||||
internal flow BCs: pressure driven versus velocity driven |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
|
|
|
#1 |
|
Senior Member
Mihai Pruna
Join Date: Apr 2010
Location: Boston
Posts: 195
Rep Power: 17 ![]() |
this is what I have in my p and U files for a flow driven by velocity. it seems to run fine:
for velocity: SDuctWallface1 { type fixedValue; value uniform (0 0 0); } SDuctWallface2 { type fixedValue; value uniform (0 0 0); } SDuctInletface1 { type surfaceNormalFixedValue; refValue uniform -20.000000; } SDuctOutletface1 { type zeroGradient; } for pressure: SDuctWallface1 { type zeroGradient; } SDuctWallface2 { type zeroGradient; } SDuctInletface1 { type zeroGradient; } SDuctOutletface1 { type fixedValue; value uniform 0.000000; } now, trying on a case where I want to run a flow driven by the difference between inlet total pressure and outlet pressure: for velocity: SDuctWallface1 { type fixedValue; value uniform (0 0 0); } SDuctWallface2 { type fixedValue; value uniform (0 0 0); } SDuctInletface1 { type pressureInletVelocity; } SDuctOutletface1 { type zeroGradient; } for pressure: SDuctWallface1 { type zeroGradient; } SDuctWallface2 { type zeroGradient; } SDuctInletface1 { type totalPressure; value uniform 100000.000000; } SDuctOutletface1 { type fixedValue; value uniform 0.000000; } error: --> FOAM FATAL IO ERROR: keyword gamma is undefined in dictionary "/home/cadne /run/sductpres/0/p::boundaryField::SDuctInletface1" file: /home/cadnexus/OpenFOAM/cadnexus-2.1.0/run/sduc DuctInletface1 from line 51 to line 52. From function dictionary::lookupEntry(const word& in file db/dictionary/dictionary.C at line 400. I'm running simpleFoam so it's incompressible.
__________________
Mihai Pruna's Bio |
|
|
|
|
|
|
|
|
#2 |
|
Senior Member
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 19 ![]() |
It's complaining because there are more components required to define the totalPressure boundary condition you have set at the inlet. You might have meant fixedValue, like this:
SDuctInletface1 { type fixedValue; value uniform 100000.000000; } |
|
|
|
|
|
|
|
|
#3 | |
|
Senior Member
Mihai Pruna
Join Date: Apr 2010
Location: Boston
Posts: 195
Rep Power: 17 ![]() |
Quote:
to me it seems there would be too many unknowns to establish the flow field.
__________________
Mihai Pruna's Bio |
||
|
|
|
||
|
|
|
#4 |
|
Senior Member
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 19 ![]() |
You might need to set your velocity inlet as zeroGradient.
|
|
|
|
|
|
|
|
|
#5 |
|
Senior Member
Mihai Pruna
Join Date: Apr 2010
Location: Boston
Posts: 195
Rep Power: 17 ![]() |
it's worth a try.
__________________
Mihai Pruna's Bio |
|
|
|
|
|
|
|
|
#6 |
|
Senior Member
Mihai Pruna
Join Date: Apr 2010
Location: Boston
Posts: 195
Rep Power: 17 ![]() |
that didn't yield good results. At all.
Can anyone give me a good example of a total pressure BC and extra parameters set up?
__________________
Mihai Pruna's Bio |
|
|
|
|
|
|
|
|
#7 |
|
Senior Member
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 19 ![]() |
||
|
|
|
|
|
|
|
#8 |
|
Senior Member
Mihai Pruna
Join Date: Apr 2010
Location: Boston
Posts: 195
Rep Power: 17 ![]() |
is this one of the tutorials? if so, which one?
thanks!
__________________
Mihai Pruna's Bio |
|
|
|
|
|
|
|
|
#9 |
|
Senior Member
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 19 ![]() |
It's the elbow tutorial (modified) for icoFoam. I changed the BC's to be pressure driven. I put zeroGradient U BC's on inlets and the outlet, no slip on the walls. I assigned a pressure drop of 10 Pa.
|
|
|
|
|
|
|
|
|
#10 | |
|
Senior Member
Mihai Pruna
Join Date: Apr 2010
Location: Boston
Posts: 195
Rep Power: 17 ![]() |
Quote:
Thanks!
__________________
Mihai Pruna's Bio |
||
|
|
|
||
|
|
|
#11 |
|
Senior Member
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 19 ![]() |
/*--------------------------------*- C++ -*----------------------------------*\
| ========= | | | \\ / F ield | OpenFOAM Extend Project: Open Source CFD | | \\ / O peration | Version: 1.6-ext | | \\ / A nd | Web: www.extend-project.de | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField uniform 0; boundaryField { wall-4 { type zeroGradient; } velocity-inlet-5 { type fixedValue; value uniform 10; } velocity-inlet-6 { type fixedValue; value uniform 10; } pressure-outlet-7 { type fixedValue; value uniform 0; } wall-8 { type zeroGradient; } frontAndBackPlanes { type empty; } } // ************************************************** *********************** // /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM Extend Project: Open Source CFD | | \\ / O peration | Version: 1.6-ext | | \\ / A nd | Web: www.extend-project.de | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0]; internalField uniform (0 0 0); boundaryField { wall-4 { type fixedValue; value uniform (0 0 0); } velocity-inlet-5 { type zeroGradient; } velocity-inlet-6 { type zeroGradient; } pressure-outlet-7 { type zeroGradient; } wall-8 { type fixedValue; value uniform (0 0 0); } frontAndBackPlanes { type empty; } } |
|
|
|
|
|
|
|
|
#12 |
|
Senior Member
Mihai Pruna
Join Date: Apr 2010
Location: Boston
Posts: 195
Rep Power: 17 ![]() |
this is the velocity driven flow, not pressure driven.
__________________
Mihai Pruna's Bio |
|
|
|
|
|
|
|
|
#13 |
|
Senior Member
Kyle Mooney
Join Date: Jul 2009
Location: San Francisco, CA USA
Posts: 323
Rep Power: 19 ![]() |
I've assigned a fixed deltaP between the inlets and the outlets. Dirchlet BC's are assigned for U at the walls only as no slip, no penetration. Von Neumann conditions at the inlet and outlet for U.
Please explain your reasoning for describing this as a velocity driven flow. |
|
|
|
|
|
|
|
|
#14 |
|
Senior Member
Mihai Pruna
Join Date: Apr 2010
Location: Boston
Posts: 195
Rep Power: 17 ![]() |
my bad, since the patches were named velocity, didn't look at the header properly
![]() sorry thanks
__________________
Mihai Pruna's Bio |
|
|
|
|
|
|
|
|
#15 |
|
Member
Saba Saeb
Join Date: Dec 2010
Location: Erlangen, Germany
Posts: 32
Rep Power: 17 ![]() |
I think you just missed to specify a value for gamma, in case of using totalpressure, you also have to set a value for gamma, the boundary conditions that you sent in your first posts seem right.
|
|
|
|
|
|
|
|
|
#16 | |
|
Senior Member
Mihai Pruna
Join Date: Apr 2010
Location: Boston
Posts: 195
Rep Power: 17 ![]() |
Quote:
I also had to change value uniform to p0 uniform. it's running now with inlet specifying total pressure. keep your fingers crossed.
__________________
Mihai Pruna's Bio |
||
|
|
|
||
|
|
|
#17 | |
|
Member
Saba Saeb
Join Date: Dec 2010
Location: Erlangen, Germany
Posts: 32
Rep Power: 17 ![]() |
Quote:
Cheers, Saba |
||
|
|
|
||
|
|
|
#18 |
|
Senior Member
Mihai Pruna
Join Date: Apr 2010
Location: Boston
Posts: 195
Rep Power: 17 ![]() |
from what i understand, it has to do with the way pressure is transmitted via waves. if you set both inlet and outlet to fixed pressures you are overconstraining the problem.
i think if you set fixed inlet you have to set wavetransmissive at the outlet. with total pressure,it adjusts itself i guess. not sure ![]() my solution even with total pressure at inlet has a singularity and i am trying to figure out if the mesh is causing it or something else.
__________________
Mihai Pruna's Bio |
|
|
|
|
|
|
|
|
#19 |
|
New Member
Oluwalogbon Akinnola
Join Date: Mar 2012
Posts: 23
Rep Power: 15 ![]() |
What does gamma stand for in openFOAM?
|
|
|
|
|
|
|
|
|
#20 |
|
Super Moderator
Tobias Holzmann
Join Date: Oct 2010
Location: Bad Wörishofen
Posts: 2,716
Blog Entries: 6
Rep Power: 53 ![]() ![]() ![]() |
Hi all,
for the totalPressure BC there are different ways for calculation. It depends on the initialization of the BC. But first to your question @lobstar. gamma = Heat capacity ratio That is the important code for totalPressure: Code:
if (psiName_ == "none" && rhoName_ == "none")
{
operator==(p0p - 0.5*(1.0 - pos(phip))*magSqr(Up));
}
else if (rhoName_ == "none")
{
const fvPatchField<scalar>& psip =
patch().lookupPatchField<volScalarField, scalar>(psiName_);
if (gamma_ > 1.0)
{
scalar gM1ByG = (gamma_ - 1.0)/gamma_;
operator==
(
p0p
/pow
(
(1.0 + 0.5*psip*gM1ByG*(1.0 - pos(phip))*magSqr(Up)),
1.0/gM1ByG
)
);
}
else
{
operator==(p0p/(1.0 + 0.5*psip*(1.0 - pos(phip))*magSqr(Up)));
}
}
else if (psiName_ == "none")
{
const fvPatchField<scalar>& rho =
patch().lookupPatchField<volScalarField, scalar>(rhoName_);
operator==(p0p - 0.5*rho*(1.0 - pos(phip))*magSqr(Up));
}
In the constructors you find the way how to set this bc correct and if you do not set an value which value would be set instead - an example that works: Code:
outlet
{
type totalPressure;
p0 uniform 100000;
psi none;
gamma 0;
rho rho;
value uniform 100000;
}
and that lead you to that calculation:
operator==(p0p - 0.5*rho*(1.0 - pos(phip))*magSqr(Up));
Code:
operator==(p0p - 0.5*(1.0 - pos(phip))*magSqr(Up));
its here:
if (psiName_ == "none" && rhoName_ == "none")
{
operator==(p0p - 0.5*(1.0 - pos(phip))*magSqr(Up));
}
Tobi Last edited by Tobi; August 30, 2012 at 10:06. |
|
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Maintaining Static Pressure at Fluid Flow Inlet | cdevalve | FLUENT | 3 | January 14, 2012 01:11 |
| Channel flow: Inlet pressure AND uniform velocity? | frmap1 | Main CFD Forum | 0 | April 15, 2010 11:32 |
| Pressure driven laminar flow simpleFoam pressure higher at the outlet than inlet | gabriel | OpenFOAM Running, Solving & CFD | 16 | September 30, 2009 19:20 |
| Urgent: How to model a stationary sphere in a pressure driven flow using Ansys CFX? | farhan | OpenFOAM Running, Solving & CFD | 1 | April 14, 2009 15:34 |
| Hydrostatic pressure in 2-phase flow modeling (CFX4.2) | HB &DS | CFX | 0 | January 9, 2000 14:19 |