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 the flow direction is determined in fvOptions? (https://www.cfd-online.com/Forums/openfoam-solving/235386-how-flow-direction-determined-fvoptions.html)

nucerl April 13, 2021 02:40

How the flow direction is determined in fvOptions?
 
Hello, everyone!

I am working with twoPhaseEulerFoam solver to simulate air injection to a large tank. Here, the air inlet velocity is quite high (Jg~150 m/s) and the nozzle diameter is about 5 mm. In the tutorials (tutorials/multiphase/twoPhaseEulerFoam/laminar/injection/constant/fvOptions) they used fvOptions to replicate the injector which is given below. There are a few things I don't understand here:
  1. How do I set a fixed inlet velocity (or mass flow rate) here?
    - I thought I would use the momentumSource1 but I am not sure if I should use the massSource1 instead? In this example, the inlet velocity is not defined in the U.air in the "0" folder but instead, it's given here as a boundary source.
  2. How can I plot the inlet velocity?
    - Would using the plot over line be enough to prove the inlet velocity if I center the beginning of the line to the center defined in the points?
  3. How can we change the direction of the flow here?
    - I thought I could change the direction of the flow by changing the sign in the vector component in vectorSemiImplicitSource but changing it did not affect the orientation at all. The flow always goes in a positive Y direction which is opposite to gravity.

I have just started to learn OpenFOAM this week and I am coming from a system code background as a user so please go easy on me :)

Thank you for your help in advance,

Erol.


Code:

/*--------------------------------*- C++ -*----------------------------------*\
  =========                |
  \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox
  \\    /  O peration    | Website:  https://openfoam.org
    \\  /    A nd          | Version:  7
    \\/    M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    location    "constant";
    object      fvOptions;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

injector1
{
    timeStart      0.1;
    duration        5;
    selectionMode  points;
    points
    (
        (0.075 0.2 0.05)
    );
}

options
{
    massSource1
    {
        type            scalarSemiImplicitSource;

        $injector1;

        volumeMode      absolute;
        injectionRateSuSp
        {
            thermo:rho.air    (1e-3 0); // kg/s
        }
    }

    momentumSource1
    {
        type            vectorSemiImplicitSource;

        $injector1;

        volumeMode      absolute;
        injectionRateSuSp
        {
            U.air          ((0 -1e-2 0) 0); // kg*m/s^2
        }
    }

    energySource1
    {
        type            scalarSemiImplicitSource;

        $injector1;

        volumeMode      absolute;
        injectionRateSuSp
        {
            e.air      (500 0); // kg*m^2/s^3
        }
    }
}


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



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