CFD Online Discussion Forums

CFD Online Discussion Forums (https://www.cfd-online.com/Forums/)
-   OpenFOAM (https://www.cfd-online.com/Forums/openfoam/)
-   -   Set liquid level in a Tank (https://www.cfd-online.com/Forums/openfoam/74610-set-liquid-level-tank.html)

chemeng April 4, 2010 21:35

Set liquid level in a Tank
 
Hello! I want to simulate a two phase mixing tank (air-water). I want to set the water level at a high of 0.26 meters in the y direction in the tank before the operation starts.
My overall domain is: (-0.129986 0 -0.129999) (0.13 0.35 0.129999)
I want to simulate two cases:
1. Without airation, using MRFSimpleFoam.
2. With airation, using MRFTwoPhaseEulerFoam.
For the first case I don't know how to set the liquid level.
For the second case I have tried setFields, but I don't know if it is correct. My setFieldsDict is:

regions
(
boxToCell
{
box (-0.129986 0 -0.12.9999) (0.13 0.26 0.12999);
fieldValues
(
volScalarFieldValue alpha 0
);
}
);
Could anybody help me to set the liquid level in the first case and say to me if in the second case the configuration is ok?
Thanks in advance.

ngj April 6, 2010 04:07

The alpha value should be set to 1 not 0.

Best regards,

Niels

piprus April 6, 2010 10:52

Try something like this:
Code:

defaultFieldValues (
     volScalarFieldValue alpha1 0 // default value for the domain

  );
  regions
 (
     boxToCell
     {
   box (-0.129986 0 -0.12.9999) (0.13 0.26 0.12999);
   fieldValues
   (
     volScalarFieldValue alpha1 1 // value for the specified region
  );
   }
 );


chemeng April 6, 2010 19:39

But alpha is the dispersed phase volume fraction right? so if i put alpha equal to 1 it is like if my tank is fill with air, not with water I think. I am confused. Correct me if I am wrong. Thank you for your reply.

alberto April 6, 2010 23:46

Hello,

MRFSimpleFoam is a single-phase solver, so you cannot specify the level of the liquid, since there is only one phase.

I assume MRFTwoPhaseEulerFoam is your extension of twoPhaseEulerFoam, since I've not seen a solver with that name :-)

However you are correct: alphas is the volume fraction of the dispersed phase.

As suggested above, setFields should work to set alpha. Take a look at the examples for twoPhaseEulerFoam.

Best,


All times are GMT -4. The time now is 05:00.