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/)
-   -   rhoSimpleFoam with specified mass flow rate at outlet (https://www.cfd-online.com/Forums/openfoam-solving/229903-rhosimplefoam-specified-mass-flow-rate-outlet.html)

ishan_ae August 30, 2020 15:27

rhoSimpleFoam with specified mass flow rate at outlet
 
Hello.

I want to run a subsonic compressible flow inside a duct. I am essentially trying to replicate the boundary conditions used in experimental setup through OpenFOAM 7.0.

For the outlet of the system, the mass flow rate has been provided and at the inlet total pressure/total temperature as been provided.

For the specified mass flow rate, I want to use flowRateOutletVelocity.

But I am confused as to what parameters have to be actually defined in the BC definition.

I used
Code:

foamInfo -FlowRateOutletVelocity
to get some information:

Code:

Velocity outlet boundary condition which corrects the extrapolated velocity
    to match the specified flow rate.

    For a mass-based flux:
    - the flow rate should be provided in kg/s
    - if \c rho is "none" the flow rate is in m^3/s
    - otherwise \c rho should correspond to the name of the density field
    - if the density field cannot be found in the database, the user must
      specify the outlet density using the \c rhoOutlet entry

    For a volumetric-based flux:
    - the flow rate is in m^3/s

outlet
{
    type                  flowRateOutletVelocity;
    massFlowRate          0.256
    rhoOutlet            xxxxx;    //what is this  value?
    rho                  rho;      //how is this different from rhoOutlet
}

What are the rho and rhoOutlet parameters here?

I want to use the mass flow rate definition.

I have referred to the discussion here but there seems to be no conclusion: https://www.cfd-online.com/Forums/op...plication.html

Finally, how can I initialize my rhoSimpleFoam solution ? Do you suggest running first in simpleFoam and then running rhoSimpleFoam ? If I do this, will I have to change the boundary conditions ?

Some information on this will be helpful.

jherb August 31, 2020 11:12

If you use a solver for incompressible flows like simpleFoam which does not have a density field, you have to specify rho with the rhoOutlet key word. If you use a solver for compressible flows, e.g. buoyantPimpleFoam, then you must specify the name of the density field, which in then would be rho.

Tobermory August 31, 2020 17:44

In case Joachim's response is not 100% clear, take a look at the "Detailed Description" of the Doxygen entry for the BC: https://cpp.openfoam.org/v8/classFoa...d.html#details.

You are using rhoSimpleFoam, i.e. a compressible solver with a density field that has the default name "rho", so if I am reading it right you should be able to ignore the rho and rhoOutlet parameters and just define the massFlowRate, viz:

Code:

<patchName>
    {
        type                flowRateOutletVelocity;
        massFlowRate        0.2;
        value              uniform (0 0 0);
    }

Good luck.

ishan_ae September 1, 2020 01:11

Thanks for the information. For simpleFoam if I ignore any of the rho related parameters, then volumetric flow rate has to be specified. So let's say that my m_dot is 4 kg/s and my density is 2 kg/m3. If I am understanding it right, for simpleFoam, I will have to use m_dot / 2 = 2 m3/s. Or can I just use the actual m_dot value ? I know that for in compressible flows, OF uses kinematic pressure and hence the density term doesn't come into the picture.

I am still not sure what does
Code:

rho rho;
mean here ? Is it calculated using ideal gas law ?

In the same documentation link, it mentions that rhoOutlet entry needs to be provided(for rhoSimpleFoam run) if the density field is not available at start-up. Density field will of course not be available at start-up because that's what I want to solve for.

In that case I will have to give the density value using the rhoOutlet parameter right ? The issue is that I don't have this value. I have tried to make some estimations using 1D isentropic flow calculations but in vain. There is simply not enough information available. The only information I have from experimental setup is total pressure/temperature at duct inlet, Mach number at a location upstream of outlet, and finally mass flow rate at outlet.


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