1

Previous: The wholeMesh Up: Preprocessing Next: Multiple Reference Frame –
This is an automatically generated documentation by LaTeX2HTML utility. In case of any issue, please, contact us at info@cfdsupport.com.

Initial and boundary conditions

  • At first we need to change the patch types of patches between inside and outside meshes (AMIInside and AMIOutside), the new type should be cyclicAMI.
  • This boundary condition type additionally needs the parameter neighbourPatch.
  • The file mixerCase/wholeMesh/constant/polyMesh/boundary should contain the following lines

     

    	AMIOutside
    	{
    		type			cyclicAMI;
    		nFaces			160;
    		startFace		22320;
    		neighbourPatch		AMIInside;
    	}
    	AMIInside
    	{
    		type			cyclicAMI;
    		nFaces			80;
    		startFace   		22560;
    		neighbourPatch		AMIOutside;
    	}
    
  • NOTE: Numbers nFaces and startFaces are generated automatically during the mesh making process; so they might be different for different meshes.

     

  • This manipulation may be done by utility changeDictionary. Look at wholeMesh/system/changeDictionaryDict.
    # cd $FOAM_RUN /mixerCase/wholeMesh
    # changeDictionary

     

  • Next we look at the boundary conditions.
  • There is folder 0 with prepared files U, p_rgh and alpha.water.org in both test case’s directories MRFCase and SBMCase.
  • We look at the conditions for velocity U:

     

    /*--------------------------------*- C++ -*----------------------------------*\
    | =========                 |                                                 |
    | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
    |  \\    /   O peration     | Version:  2.3.x                                 |
    |   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
    |    \\/     M anipulation  |                                                 |
    |*---------------------------------------------------------------------------*|
    |  File created by CFD support s.r.o., Thu Oct 16 07:44:50 2014               |
    |                    http://www.cdfsupport.com                                |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version     2.3;
        format      ascii;
        class       volVectorField;
        location    "0";
        object      U;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    dimensions      [0 1 -1 0 0 0 0];
    
    internalField   uniform (0 0 0);
    
    boundaryField
    {
        frontAndBack
        {
            type            empty;
        }
        fixedWalls
        {
            type            fixedValue;
            value           uniform (0 0 0);
        }
        AMIOutside
        {
            type            cyclicAMI;
            value           uniform (0 0 0);
        }
        mixer
        {
            type            fixedValue;
            value           uniform (0 0 0);
        }
        AMIInside
        {
            type            cyclicAMI;
            value           uniform (0 0 0);
        }
    }
    
  • Next we look at the conditions for pressure p_rgh:

     

    /*--------------------------------*- C++ -*----------------------------------*\
    | =========                 |                                                 |
    | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
    |  \\    /   O peration     | Version:  2.3.x                                 |
    |   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
    |    \\/     M anipulation  |                                                 |
    |*---------------------------------------------------------------------------*|
    |  File created by CFD support s.r.o., Thu Oct 16 07:44:50 2014               |
    |                    http://www.cdfsupport.com                                |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version     2.3;
        format      ascii;
        class       volScalarField;
        location    "0";
        object      p_rgh;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    dimensions      [1 -1 -2 0 0 0 0];
    
    internalField   uniform 0;
    
    boundaryField
    {
        frontAndBack
        {
            type            empty;
        }
        fixedWalls
        {
            type            zeroGradient;    
                            //sets fixed gradient pressure based on the atmospheric pressure
            value           uniform 0;
        }
        AMIOutside
        {
            type            cyclicAMI;
            value           uniform 0;
        }
        mixer
        {
            type            zeroGradient;    
            value           uniform 0;
        }
        AMIInside
        {
            type            cyclicAMI;
            value           uniform 0;
        }
    }
    
  • We look at the file alpha.water.org, which is a backup file for alpha.water (the phase ratio).
    /*--------------------------------*- C++ -*----------------------------------*\
    | =========                 |                                                 |
    | \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
    |  \\    /   O peration     | Version:  2.3.x                                 |
    |   \\  /    A nd           | Web:      www.OpenFOAM.org                      |
    |    \\/     M anipulation  |                                                 |
    |*---------------------------------------------------------------------------*|
    |  File created by CFD support s.r.o., Thu Oct 16 07:44:50 2014               |
    |                    http://www.cdfsupport.com                                |
    \*---------------------------------------------------------------------------*/
    FoamFile
    {
        version     2.3;
        format      ascii;
        class       volScalarField;
        location    "0";
        object      alpha.water.org;
    }
    // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
    
    dimensions      [0 0 0 0 0 0 0];
    
    internalField   uniform 0;
    
    boundaryField
    {
        frontAndBack
        {
            type            empty;
        }
        fixedWalls
        {
            type            zeroGradient;
        }
        AMIOutside
        {
            type            cyclicAMI;
            value           uniform 0;
        }
        mixer
        {
            type            zeroGradient;
        }
        AMIInside
        {
            type            cyclicAMI;
            value           uniform 0;
        }
    }