CFD Online Discussion Forums

CFD Online Discussion Forums (http://www.cfd-online.com/Forums/)
-   OpenFOAM Running, Solving & CFD (http://www.cfd-online.com/Forums/openfoam-solving/)
-   -   How to properly use mappedFlowRate (http://www.cfd-online.com/Forums/openfoam-solving/101715-how-properly-use-mappedflowrate.html)

Taltan May 11, 2012 16:29

How to properly use mappedFlowRate
 
I am trying to simulate compressible LES in an infinite pipe with periodic boundary conditions. I can not use the cyclic boundary as it would not drive the flow, so I have to use the mapped boundary condition. I would use the boundary condition called directMapped from 2.0.0 (I think it is called mappedField now), but I am uneasy to the whole averaging. I need to capture flow characteristics which could be dampened by this averaging. So I have opted for the mappedFlowRate.

However, I am at a loss in figuring how to properly use the mappedFlowRate (renamed from directMappedFlowRate in 2.0.0) boundary condition.

In the source code the example states
Code:

    inlet
    {
        type            mappedFlowRate;
        phi            phi;
        rho            rho;
        neigPhi        neigPhiName_;    // Volumetric/mass flow rate
                                        // [m3/s or kg/s]
        value          uniform (0 0 0); // placeholder
    }

It is the neighPhi I am not sure how to define.

I would guess that you specify a phi (from a file?) which has the proper units (either m3/s or kg/s). If this is the case, how would I generate this file?

In my boundary file I have defined the inlet patch as
Code:

    inlet
    {
        type            mappedPatch;
        sampleMode        nearestPatchFace;
        samplePatch        outlet;
        offset                (9e-3 0 0);
        nFaces          100;
        startFace      70820;
    }

and my U file has
Code:

    inlet
    {
        type            mappedFlowRate;
        rho                rho;
        phi                phi;
        neigPhi                neigPhiName_;
        value          nonuniform List<vector>

Here I have used potentialFoam to get an initial velocity field in my pipe such that the mappedFlowRate has some values to use. It seems like the neigPhi parameter does nothing when I change it. No error messages even.

This does run without problems, but it does not seem to maintain the mass flow rate at the inlet.

Has anyone successfully used this boundary condition? Any help would be greatly appreciated!

Taltan May 12, 2012 09:04

I found a tutorial case which uses this boundary condition (/tutorials/combustion/fireFoam/les/oppositeBurningPanels). However in this case the inlet is not the boundary on which the mappedFlowRate is used.
The boundary condition looks like this in the U file:
Code:

    "(region0_to.*)"
    {
        type            mappedFlowRate;
        phi            phi;
        nbrPhi          phiGas;
        rho            rho;
        value          uniform (0 0 0);
    }

Apparently the nbrPhi is called phiGas. This is the only occurence where the name phiGas appeared in this case. It seems like this variable does not do much.

vishal_s January 2, 2014 04:11

Hi Arve, did you figured out how to use it??

adambarfi August 7, 2014 04:54

I had the same problem and I found the solution.
here you are the way you should implement the mappedFlowRate:

Code:

    myPatch
    {
        type            mappedFlowRate;
        phi            phi;
        rho            rho;
        neigPhi        phi;
        value          uniform (0 0 0); // placeholder
    }

in which:
phi: not required --> default value=phi
rho: not required --> default value=rho
neigPhi: required --> name of flux field on neighbour mesh

you can find more information about it here

hope this help


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