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/)
-   -   How to set fully developed flow aty inlet? (https://www.cfd-online.com/Forums/openfoam-solving/159880-how-set-fully-developed-flow-aty-inlet.html)

FernandoSoares September 25, 2015 15:59

How to set fully developed flow aty inlet?
 
1 Attachment(s)
Hi there Foamers,

I was wondering how to set properly a fully developed velocity profile WITH the pressure gradient required to push the fluid (newtonian). As far as I have checked mostly what has been adopted regards only mapping the velocity profile at the geometry inlet however with zeroGradient for the pressure field.

Is it just me or does these b.c. sound quiet off? Suppose I do know the pressure gradient in order to assure the development of the flow, which b.c. should I adopt at the outlet? I mean for a simple geometry, e.g. a backward facing step for instance.

I was trying something like

U:
Code:

    inlet
    {
        type            fixedValue;
        value          nonuniform List<vector>
    (developed velocity profile here ...)
    }
    outlet
    {
        type            inletOutlet;
        inletValue      uniform (0 0 0);
        value          uniform (0 0 0);
    }

p:
Code:

    inlet
    {
        type            fixedGradient;
        gradient        uniform (~known Pressure Gradient);
    }
    outlet
    {
        type            outletInlet;
        outletValue    uniform 0;
        value          uniform 0;
    }

and I get no good convergence whatsover. (FYI I start the run with a mapped solution obtained from a previous result for a smaller geomtery). A plot of the residuals I am getting for simpleFoam with standard kEpsilon model is attached to this thread.

How is one suppose to set such a boundary condition in order to assure the velocity profile is in fact developed (i.e. with pressure gradient at the inlet)? I've already used zeroGradient for pressure, but it seems to me such condition doesn't agree with definition of developed flow.

Best regards to all and many thanks in advance for any advise.

F. Soares

PS: I found this thread on the subject emphasizing what I mean.

nimasam September 28, 2015 02:57

instead of using zeroGradient, employing fixedFluxPressure at inlet for pressure will consider your concerns. because fixedFluxPressure sets the pressure gradient based on velocity field

FernandoSoares September 30, 2015 13:44

Sorry for the late reply, but thanks for your advise. I am trying to use the b.c. you mentioned but I am getting the following error message

Code:

--> FOAM FATAL ERROR:
updateCoeffs(const scalarField& snGradp) MUST be called before updateCoeffs() or evaluate() to set the boundary gradient.

    From function fixedFluxPressureFvPatchScalarField::updateCoeffs()
    in file fields/fvPatchFields/derived/fixedFluxPressure/fixedFluxPressureFvPatchScalarField.C at line 151.

FOAM exiting

I must say I am not sure how to set it in my 0/p file. According to the damBreak tutorial

Code:

    leftWall
    {
        type            fixedFluxPressure;
        value          uniform 0;
    }

    rightWall
    {
        type            fixedFluxPressure;
        value          uniform 0;
    }

    lowerWall
    {
        type            fixedFluxPressure;
        value          uniform 0;
    }

although these are used at walls not at an inlet.

Are you familiar with the proper setting for fixedFluxPressure? What am I missing here?

Once again thank you for your help.

F. Soares

vidyadhar November 17, 2016 04:18

Hello Soares,

I am new to openfoam and I would like to simulate fully developed flow through a rectangular channel.

Since you have already tried, can you, please, help me in setting the velocity field for fully developed case.

Thanks & Regards,
vidyadhar

FernandoSoares November 17, 2016 08:40

Quote:

Originally Posted by vidyadhar (Post 625687)
Hello Soares,

I am new to openfoam and I would like to simulate fully developed flow through a rectangular channel.

Since you have already tried, can you, please, help me in setting the velocity field for fully developed case.

Thanks & Regards,
vidyadhar

Hi there, Vidyadhar.

Perhaps what you need for such a geometry is simply the boundaryFoam solver. If I understood correctly, your problem is to find the velocity profile for a developed flow corresponding to a rectangular cross-sectioned pipe. Right? Check the tutorials in
Code:

$FOAM_TUTORIALS/incompressible/boundaryFoam
I believe you'll find what you're looking for in there!

Best regards,

Fernando Soares Alves.

PS: Check also this .pdf which summarizes the most used boundary conditions in the former OpenFOAM version 2.3.0. I hope it will also help you.

vidyadhar November 17, 2016 09:29

Hi Fernando,

thank you for the quick reply.

Actually, I want to give inlet condition as fully developed flow.

I want to study the flow behavior through a T junction (either with 1 inlet & 2 outlets or with 2 inlets & 1 outlet).

I am using Caelus6.04 version, which is similar to openfoam. I have openfoam 4.1 also.

I find in some forums, for defining fully developed flow at inlet: some are referring to groovyBCs; some are directly modifying their 0/U file.

As you have tried to use fully developed flow conditions at inlet for your geometry, can you please let me know how to implement for my case.

Thanks & Regards,
vidyadhar

FernandoSoares November 17, 2016 12:02

Hi, Vidyadhar.

Actually I couldn't make it work. I've tried this fixedFluxPressure as mentioned above but kept getting the error message. Searching for this BC again today I've also found this blog entry. Ok, it's in japanese but Google translate is here for those sort of things. Besides you can also check the .pdf I mentioned to see the correct sintaxe for such BC.

Greetings and let me know if you could get it to work for your problem.

Fernando Soares Alves.

vidyadhar November 18, 2016 00:16

Hello Fernando,

Thank you very much.

I will let you know once I get any output.

Regards,
vidyadhar


All times are GMT -4. The time now is 00:25.