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/)
-   -   Inlet patch problems (https://www.cfd-online.com/Forums/openfoam-solving/107308-inlet-patch-problems.html)

martyn88 September 23, 2012 20:42

Inlet patch problems
 
5 Attachment(s)
Hello Foamers,

I am having trouble getting a simulation to run and the main problem appears to be at my inlet. It is basically a converging diverging nozzle poking into a freestream and I am defining a inlet flow rate at the nozzle and a small coflow above the nozzle.

I have attempted to use the flowrateinletvelocity condition but it appears to not be prescribing a velocity at the inlet, regardless of how high I set the mass flow rate. I have initialised my internal field velocity at 2m/s so all thats happening is the internal field is leaving the domain and being replaced by zero velocity air.

Here is my mesh at the inlet:

Attachment 15887


I also used a fixed value velocity at the inlet to compare and found the following:

For flowrateinletvelocity:

- what is wrong with my inlet patch? It seems like it is not properly connected or something, like it is blocked.
- why does mass flow rate BC cause no apparent inlet velocity to be defined?
- why is the temperature not propagating (or doing so extremely slowly)?

Attachment 15889

Attachment 15890


Fixed value velocity:

- when fixed value velocity is defined, flow is developing, but way too slowly. 20 m/s inlet U should have travelled 4 metres (8 nozzle lengths) in 0.2 secs, however it has not even made the nozzle exit (travelled 10cm max)

Attachment 15891

Attachment 15892

Please find attached the checkMesh log

Create time

Create polyMesh for time = 0

Time = 0

Mesh stats
points: 617519
faces: 1789130
internal faces: 1727110
cells: 586040
boundary patches: 8
point zones: 0
face zones: 1
cell zones: 1

Overall number of cells of each type:
hexahedra: 586040
prisms: 0
wedges: 0
pyramids: 0
tet wedges: 0
tetrahedra: 0
polyhedra: 0

Checking topology...
Boundary definition OK.
Cell to face addressing OK.
Point usage OK.
Upper triangular ordering OK.
Face vertices OK.
Number of regions: 1 (OK).

Checking patch topology for multiply connected surfaces ...
Patch Faces Points Surface topology
CYCLIC_1 23366 23821 ok (non-closed singly connected)
CYCLIC_2 23366 23821 ok (non-closed singly connected)
FREESTREAM_BOTTOM 812 870 ok (non-closed singly connected)
FREESTREAM_TOP 7784 8091 ok (non-closed singly connected)
INLET 588 631 ok (non-closed singly connected)
INLET_COFLOW 1372 1450 ok (non-closed singly connected)
NOZZLEWALL 2772 2900 ok (non-closed singly connected)
OUTLET 1960 2052 ok (non-closed singly connected)

Checking geometry...
Overall domain bounding box (-464.1161237 -5.05255153e-19 -1.064772188e-12) (1143 274.3200073 193.9735322)
Mesh (non-empty, non-wedge) directions (1 1 1)
Mesh (non-empty) directions (1 1 1)
Boundary openness (-3.79177398008e-17 -5.85917462408e-14 4.36207997116e-14) OK.
Max cell openness = 2.92805429189e-16 OK.
Max aspect ratio = 11.1240642867 OK.
Minumum face area = 0.330563016672. Maximum face area = 36.1242486469. Face area magnitudes OK.
Min volume = 1.56100489244. Max volume = 165.81880705. Total volume = 36706377.576. Cell volumes OK.
Mesh non-orthogonality Max: 48.8035890294 average: 8.6477627171
Non-orthogonality check OK.
Face pyramids OK.
Max skewness = 0.859011733412 OK.
Coupled point location match (average 0) OK.

Mesh OK.


Does anyone have any ideas why it is acting so strangely at the inlet?

Thanks

Ahmed Khattab September 24, 2012 17:50

please could you post error message appeared to you when tries to run your case.

martyn88 September 25, 2012 11:30

Hi,

I terminated the run, it did not crash. However, using the flowrateinletvelocity BC at inlet, there was no inflow and it pretty much resulted in the initial non-zero velocity field passing through the outlet, leaving the system as a field of zero velocity.
However using the fixed value velocity the flow did develop early in the nozzle but the density just gradually diverged as the flow seemed blocked and the pressure was really high.

olivierG September 26, 2012 04:01

hello,

more info is needed to help you:
- what are the other BC conditions ? (outlet type, wall, ...)
- which solver do you use ?
- fvscheme / solution ?

regards,
olivier

martyn88 September 26, 2012 11:00

Hi Olivier (and anyone else that is interested),

I am running an LES simulation of a turbulent supersonic free jet using the rhoPimpleFoam solver.

I have put my entire case directory in a dropbox which you can find below:

https://www.dropbox.com/s/k7bcdr0gjo...ulation.tar.gz

Or if you would prefer then please find below my BC files and my fvscheme, fvsolution and control dict files:

FoamFile
{
version 2.0;
format ascii;
class volVectorField;
location "5e-05";
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField uniform (1 0 0);

boundaryField
{
INLET
{
type flowRateInletVelocity;
flowRate table
(
(0 0.05496)
(0.5 5.496)
(3 5.496)
);

value uniform (0 0 0);
}
INLET_COFLOW
{
type flowRateInletVelocity;
flowRate table
(
(0 0.005496)
(0.5 0.5496)
(3 0.5496)
);
value uniform (0 0 0);
}
OUTLET
{
type pressureInletOutletVelocity;
value uniform (0 0 0);
}
NOZZLEWALL
{
type fixedValue;
value uniform (0 0 0);
}
CYCLIC_1
{
type cyclicAMI;
}
FREESTREAM_TOP
{
type slip;
value uniform (0 0 0);
}
FREESTREAM_BOTTOM
{
type slip;
value uniform (0 0 0);
}
CYCLIC_2
{
type cyclicAMI;
}
}
// ************************************************** *********************** //
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "5e-05";
object T;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 0 0 1 0 0 0];

internalField uniform 300;

boundaryField
{
INLET
{
type totalTemperature;
gamma 1.338;
phi phi;
psi psi;
T0 uniform 973;
}
INLET_COFLOW
{
type totalTemperature;
gamma 1.4;
phi phi;
psi psi;
T0 uniform 300;

}
OUTLET
{
type inletOutletTotalTemperature;
gamma 1.4;
T0 uniform 300;
value uniform 300;
}
NOZZLEWALL
{
type fixedValue;//cooled nozzle wall
value uniform 300;
}
CYCLIC_1
{
type cyclicAMI;
}
FREESTREAM_TOP
{
type zeroGradient;
}
FREESTREAM_BOTTOM
{
type zeroGradient;
}
CYCLIC_2
{
type cyclicAMI;
}
}


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

FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "5e-05";
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField uniform 101325;

boundaryField
{
INLET
{
type zeroGradient;
}
INLET_COFLOW
{
type zeroGradient;
}
OUTLET
{
type totalPressure;
rho rho;
psi none;
gamma 1.4;
p0 uniform 101325;
value uniform 101325;
}
NOZZLEWALL
{
type zeroGradient;
}
CYCLIC_1
{
type cyclicAMI;
}
FREESTREAM_TOP
{
type zeroGradient;
}
FREESTREAM_BOTTOM
{
type zeroGradient;
}
CYCLIC_2
{
type cyclicAMI;
}
}


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

FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "5e-05";
object muSgs;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField uniform 0;

boundaryField
{
INLET
{
type calculated;
value uniform 0;
}
INLET_COFLOW
{
type calculated;
value uniform 0;
}
OUTLET
{
type calculated;
value uniform 0;
}
NOZZLEWALL
{
type muSgsUSpaldingWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0;
}
CYCLIC_1
{
type cyclicAMI;
}
FREESTREAM_TOP
{
type calculated;
value uniform 0;
}
FREESTREAM_BOTTOM
{
type calculated;
value uniform 0;
}
CYCLIC_2
{
type cyclicAMI;
}
}


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

FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "5e-05";
object k;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField uniform 2e-05;

boundaryField
{
INLET
{
type fixedValue;
value uniform 2e-05;
}
INLET_COFLOW
{
type inletOutlet;
inletValue uniform 2e-05;
value uniform 2e-05;
}
OUTLET
{
type inletOutlet;
inletValue uniform 2e-05;
value uniform 2e-05;
}
NOZZLEWALL
{
type compressible::kqRWallFunction;
value uniform 2e-05;//not sure about this
}
CYCLIC_1
{
type cyclicAMI;
}
FREESTREAM_TOP
{
type zeroGradient;
}
FREESTREAM_BOTTOM
{
type zeroGradient;
}
CYCLIC_2
{
type cyclicAMI;
}
}


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

FoamFile
{
version 2.0;
format ascii;
class volTensorField;
location "5e-05";
object B;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField uniform (0 0 0 0 0 0 0 0 0);

boundaryField
{
INLET
{
type fixedValue;
value uniform (0 0 0 0 0 0 0 0 0);
}
INLET_COFLOW
{
type fixedValue;
value uniform (0 0 0 0 0 0 0 0 0);
}
OUTLET
{
type inletOutlet;
inletValue uniform (0 0 0 0 0 0 0 0 0);
value uniform (0 0 0 0 0 0 0 0 0);
}
NOZZLEWALL
{
type zeroGradient;
}
CYCLIC_1
{
type cyclicAMI;
}
FREESTREAM_TOP
{
type zeroGradient;
}
FREESTREAM_BOTTOM
{
type zeroGradient;
}
CYCLIC_2
{
type cyclicAMI;
}
}


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

FoamFile
{
version 2.0;
format ascii;
class volScalarField;
location "5e-05";
object alphaSgs;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField uniform 0;

boundaryField
{
INLET
{
type calculated;
value uniform 0;
}
INLET_COFLOW
{
type calculated;
value uniform 0;
}
OUTLET
{
type calculated;
value uniform 0;
}
NOZZLEWALL
{
type alphaSgsWallFunction;
Cmu 0.09;
kappa 0.41;
E 9.8;
value uniform 0;
}
CYCLIC_1
{
type cyclicAMI;
}
FREESTREAM_TOP
{
type calculated;
value uniform 0;
}
FREESTREAM_BOTTOM
{
type calculated;
value uniform 0;
}
CYCLIC_2
{
type cyclicAMI;
}
}


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

FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSchemes;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

ddtSchemes
{
default backward;
}

gradSchemes
{
default Gauss linear limited 0.333;//Gauss linear
}

divSchemes
{
default none;
div(phi,U) Gauss upwind;//Gauss filteredLinear2 0.2 0;
div(phi,h) Gauss upwind;//Gauss filteredLinear2 0.2 0;
div(phi,K) Gauss upwind;//Gauss linear;
div(phi,k) Gauss upwind;//Gauss limitedLinear 1;
div(phi,B) Gauss upwind;//Gauss limitedLinear 1;
div(phi,muTilda) Gauss upwind;//Gauss limitedLinear 1;
div(B) Gauss upwind;//Gauss linear;
div((muEff*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
default none;
laplacian(muEff,U) Gauss linear limited 0.333;//Gauss linear corrected;
laplacian((rho*(1|A(U))),p) Gauss linear limited 0.333;//Gauss linear corrected;
laplacian(alphaEff,h) Gauss linear limited 0.333;//Gauss linear corrected;
laplacian(DkEff,k) Gauss linear limited 0.333;//Gauss linear corrected;
laplacian(DBEff,B) Gauss linear limited 0.333;//Gauss linear corrected;
laplacian(DmuTildaEff,muTilda) Gauss linear limited 0.333;//Gauss linear corrected;
}

interpolationSchemes
{
default linear;
}

snGradSchemes
{
default limited 0.333;//corrected;
}

fluxRequired
{
default no;
p ;
}


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

FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object fvSolution;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

solvers
{
"(p|rho)"
{
solver PCG;
preconditioner DIC;
tolerance 1e-6;
relTol 0.01;
}

"(p|rho)Final"
{
$p;
relTol 0;
}

"(U|h|k|nuTilda)"
{
solver PBiCG;
preconditioner DILU;
tolerance 1e-6;
relTol 0.01;
}

"(U|h|k|nuTilda)Final"
{
$U;
relTol 0;
}
}

PIMPLE
{
momentumPredictor yes;
nOuterCorrectors 4;
nCorrectors 1;
nNonOrthogonalCorrectors 1;
rhoMin rhoMin [ 1 -3 0 0 0 ] 0.1;
rhoMax rhoMax [ 1 -3 0 0 0 ] 3;
}

relaxationFactors
{
fields
{
}
equations
{
"(U|h|k|epsilon|omega).*" 1;
}
}

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

FoamFile
{
version 2.0;
format ascii;
class dictionary;
location "system";
object controlDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

application rhoPimpleFoam;

startFrom startTime;

startTime 0;

stopAt endTime;

endTime 3;

max_Iter 20;

deltaT 1e-05;

writeControl adjustableRunTime;

writeInterval 0.05;

purgeWrite 0;

writeFormat ascii;

writePrecision 12;

writeCompression off;

timeFormat general;

timePrecision 6;

runTimeModifiable true;

adjustTimeStep yes;

maxCo 0.2;

functions
{
fieldAverage1
{
type fieldAverage;
functionObjectLibs ( "libfieldFunctionObjects.so" );
enabled true;
outputControl outputTime;

fields
(
U
{
mean on;
prime2Mean on;
base time;
}

p
{
mean on;
prime2Mean on;
base time;
}
);
}
}

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

Thank you so much for your response,

Hugh

martyn88 October 1, 2012 03:39

Help still needed
 
Does anyone have any ideas on how to fix this?

Any help would be much appreciated :)

Thanks
Hugh

maasyraf3 April 21, 2017 18:34

Quote:

Originally Posted by martyn88 (Post 383566)
Hi,

I terminated the run, it did not crash. However, using the flowrateinletvelocity BC at inlet, there was no inflow and it pretty much resulted in the initial non-zero velocity field passing through the outlet, leaving the system as a field of zero velocity.
However using the fixed value velocity the flow did develop early in the nozzle but the density just gradually diverged as the flow seemed blocked and the pressure was really high.

Hi Sir, how do we asjust the rho in transport properties?
It seems we can change the kinmatic viscosity but not density.
Can you advise thanks

Sent from my M631Y using CFD Online Forum mobile app


All times are GMT -4. The time now is 01:40.