CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM Pre-Processing (https://www.cfd-online.com/Forums/openfoam-pre-processing/)
-   -   Define water level in icoFOam (https://www.cfd-online.com/Forums/openfoam-pre-processing/184671-define-water-level-icofoam.html)

steffn87 March 8, 2017 03:27

Define water level in icoFOam
 
1 Attachment(s)
Hi everyone,

perhaps someone could help me with the icoFom solver.
I build up with blockMesh a tank with a tiny output for water discharge.

With the setFieldsDict File i defined a water level in the tank for the first simulation step.

Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      dictionary;
    location    "system";
    object      setFieldsDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

defaultFieldValues
(
    volScalarFieldValue alpha.water 0
);

regions
(
    boxToCell
    {
        box (0.01 0.51 -0.05) (2.99 1 0.05);
        fieldValues
        (
            volScalarFieldValue alpha.water 1
        );
    }
);

This is my alpha.water File:
Code:

FoamFile
{
    version    2.0;
    format      ascii;
    class      volScalarField;
    object      alpha.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions      [0 0 0 0 0 0 0];

internalField  uniform 0;

boundaryField
{
    inlet
    {
            type        zeroGradient;
     
    }
    outlet
    {
            type        zeroGradient;
    }

    fixedWalls
    {
            type        zeroGradient;
    }
defaultFaces
    {
        type            empty;
    }

}

Now i am searching for a solver (to define the fvSolution File) in icoFoam to solve alpha.water.

In the end it should be a nearly constant water level and a constant discharge to prove Toricellis law.

I am just using OpenFOAM since 3 weeks, so i am really a newbie;)

Thank you very much for your help or new thought processes!

steffn87 March 8, 2017 04:17

Define water level in icoFOam
 
Hi everyone,

im searching for a way to define a beginning water level in an open tank with icoFoam.

I tried it with the SetFiledsDict, but it seems very complicated, because then i have to define an alpha.water File and also a solver in the fvSolution FIle to solve alpha.water.

Is there an easy way to just define a starting water level?

Thank you very much!!! I am very thankful for new thought processings, cause im very new in OpenFOAM...

Thanks


Steffen

nesca87 March 9, 2017 02:48

do you want to solve two phase flow problem? Because if you do, I think rather than using icoFoam, you probably want to use a multiphase solver, instead.

And yes, setFieldDicts can be used and maybe the easiest way to define the initial condition (incl. beginning level)

steffn87 March 9, 2017 05:13

Hi,

thank you very much for your reply!

No i just want to calculate the discharge of an open container with a beginning water level.

My problem is that i dont know how to set a begining water level, without defining a water phase (alpha.water), that openfoam has to solve...

dybuk April 19, 2017 05:37

Hi
icoFoam is single phase incompressible solver.
Look at interFoam solvers (multiphase) for solving your problem.


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