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/)
-   -   Where to find information on dictionaries (https://www.cfd-online.com/Forums/openfoam-solving/142660-where-find-information-dictionaries.html)

mattia October 6, 2014 11:51

Where to find information on dictionaries
 
Hi everyone!

I hope I chose the right section to post to.

I was wondering where I could find some information on the various dictionaries used by OpenFOAM. I feel that the documentation is somewhat lacking in this sense: when I need to use something that is not covered in the user guide, where can I find information about it? I know there are the tutorials too, but the various utilites are only used and never explained or commented upon.

More precisely, I am currently trying to solve a multiphase moving mesh case similar to the one shown in the interDyMFoam/DTCHull tutorial, but I am finding it difficult to proper set up the dictionary since I don't know where to find some kind of list with all the possible entries for the dynamicMeshDict and their meaning. Also the wiki page (http://openfoamwiki.net/index.php/Ma...m#Dynamic_Mesh) was not helpful, since it is too concise.

Can you please point me to some references where the less basic OpenFOAM utilities are explained?

Thanks in advance

vitokad October 6, 2014 12:22

Hi Mattia,

if I understand what you are searching, in the installation directory of OpenFOAM there are all dictionaries with all commands that you can use. If you do a search in the directory, for example "controlDict", you'll find a file called "controlDict" with all the commands that you can use. Copy it in your simulation's directory and modify it ;)

mattia October 7, 2014 04:23

Hello Vito,

thanks a lot for the reply! :)
I am not sure I understand what you mean though. If I search for "dynamicMeshDict" in my OpenFOAM installation folder, this is what I get:
Code:

mattia@replicant:~$ of230
mattia@replicant:~$ cd $WM_PROJECT_DIR
mattia@replicant:OpenFOAM-2.3.0$ pwd
/home/mattia/OpenFOAM/OpenFOAM-2.3.0
mattia@replicant:OpenFOAM-2.3.0$ find . -name "dynamicMeshDict"
./tutorials/combustion/PDRFoam/flamePropagationWithObstacles/constant/dynamicMeshDict
./tutorials/multiphase/interFoam/laminar/damBreak/constant/dynamicMeshDict
./tutorials/multiphase/LTSInterFoam/DTCHull/constant/dynamicMeshDict
./tutorials/multiphase/interDyMFoam/ras/mixerVesselAMI/constant/dynamicMeshDict
./tutorials/multiphase/interDyMFoam/ras/sloshingTank3D/constant/dynamicMeshDict
./tutorials/multiphase/interDyMFoam/ras/sloshingTank3D6DoF/constant/dynamicMeshDict
./tutorials/multiphase/interDyMFoam/ras/testTubeMixer/constant/dynamicMeshDict
./tutorials/multiphase/interDyMFoam/ras/sloshingTank2D3DoF/constant/dynamicMeshDict
./tutorials/multiphase/interDyMFoam/ras/damBreakWithObstacle/constant/dynamicMeshDict
./tutorials/multiphase/interDyMFoam/ras/sloshingTank2D/constant/dynamicMeshDict
./tutorials/multiphase/interDyMFoam/ras/sloshingTank3D3DoF/constant/dynamicMeshDict
./tutorials/multiphase/interDyMFoam/ras/floatingObject/constant/dynamicMeshDict
./tutorials/multiphase/interDyMFoam/ras/DTCHull/constant/dynamicMeshDict
./tutorials/multiphase/compressibleInterDyMFoam/ras/sloshingTank2D/constant/dynamicMeshDict
./tutorials/multiphase/interPhaseChangeDyMFoam/propeller/constant/dynamicMeshDict
./tutorials/multiphase/interMixingFoam/laminar/damBreak/constant/dynamicMeshDict
./tutorials/mesh/moveDynamicMesh/SnakeRiverCanyon/constant/dynamicMeshDict
./tutorials/mesh/foamyHexMesh/mixerVessel/constant/dynamicMeshDict
./tutorials/incompressible/pimpleDyMFoam/propeller/constant/dynamicMeshDict
./tutorials/incompressible/pimpleDyMFoam/mixerVesselAMI2D/constant/dynamicMeshDict
./tutorials/incompressible/pimpleDyMFoam/wingMotion/wingMotion2D_pimpleDyMFoam/constant/dynamicMeshDict
./tutorials/incompressible/pimpleDyMFoam/oscillatingInletACMI2D/constant/dynamicMeshDict
./tutorials/incompressible/pimpleDyMFoam/movingCone/constant/dynamicMeshDict
./tutorials/compressible/rhoPimpleDyMFoam/annularThermalMixer/constant/dynamicMeshDict
./src/dynamicFvMesh/dynamicRefineFvMesh/dynamicMeshDict
mattia@replicant:OpenFOAM-2.3.0$

The only file I thought might be what you were referring to is the last one, but I'm afraid it does not contain what I was looking for:
Code:

mattia@replicant:dynamicRefineFvMesh$ cat dynamicMeshDict
/*--------------------------------*- C++ -*----------------------------------*\
| =========                |                                                |
| \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox          |
|  \\    /  O peration    | Version:  2.0.0                                |
|  \\  /    A nd          | Web:      www.OpenFOAM.org                      |
|    \\/    M anipulation  |                                                |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    object      dynamicMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

//dynamicFvMeshLib  "libtopoChangerFvMesh.so";
dynamicFvMesh      dynamicRefineFvMesh;
//staticFvMesh;

mixerFvMeshCoeffs
{
    coordinateSystem
    {
        type            cylindrical;
        origin          (0 0 0);
        axis            (0 0 1);
        direction      (1 0 0);
    }

    rpm            10;

    slider
    {
        inside      insideSlider;
        outside    outsideSlider;
    }
}

// Refinement
dynamicRefineFvMeshCoeffs
{
    // Refine every refineInterval timesteps
    refineInterval 3;

    // Maximum refinement level (starts from 0)
    maxRefinement 2;

    // Maximum cell limit (approximate)
    maxCells 1000000;

    // volScalarField to base refinement on
    field gamma;

    // Which cells to un/refine: based on point values (simple averaging).
    // - refine pointCells of point value inbetween minLevel..maxLevel
    // - unrefine pointCells that are within nBufferLayers of points marked
    //  for refinement.
    minLevel 0.01;
    maxLevel 0.99;
    nBufferLayers 1;

    // Newly introduced patch points optionally get projected onto a surface
    //projectSurfaces ("fixedWalls4.stl");
    //projectPatches (fixedWalls);
    // Maximum project distance
    //projectDistance 1;

    // Fluxes to adapt. For newly created faces or split faces the flux
    // gets estimated from an interpolated volVectorField ('velocity')
    // First is name of the flux to adapt, second is velocity that will
    // be interpolated and inner-producted with the face area vector.
    correctFluxes ((phi U));
}

// ************************************************************************* //
mattia@replicant:dynamicRefineFvMesh$

Did I misunderstand your suggestion?

Thanks again for your help :)

vitokad October 7, 2014 09:05

You understand right, but it is strange there is not a general dynamicMeshDict file that contains the possible commands..I'll try to look on my computer and I'lltell you

mattia October 8, 2014 05:06

Ok, I'll wait for your reply! Thanks a lot :)


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