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/)
-   -   2 phase turbulent open channel (https://www.cfd-online.com/Forums/openfoam-pre-processing/173642-2-phase-turbulent-open-channel.html)

Madi June 23, 2016 14:06

2 phase turbulent open channel
 
5 Attachment(s)
Hello Foamers,

I'm quite new in OpenFoam and i try to make a 2 phase turbulent open Channel vor my Master Thesis. Now there a a few very anoying problems.

When I run my simulation the result isn't what i accpected. Normally the water should have the velocity which I have choose, and the air (atmosphere) above the water should have the velocity zero. That doesn't fit in my case (see pictures). How can I solve it?

Also my water level should be constant in the inlet and the outlet. Which isn't the case. :(

Tank you for your help

Taataa July 7, 2016 06:35

freestream
 
Hi Madi,

The problem is probably related to the BCs. Use freestream and freestreamPressure boundary conditions for inlet and outlet.

Code:

p_rgh:
    inlet/outlet
    {
        type            freestreamPressure;
    }

p:
    inlet/outlet
    {
        type            calculated;
    }

U/k/epsilon:
    inlet/outlet
    {
   
        type                        freestream;
        freestreamValue                $internalField;
    }

Hope this help.

Madi July 7, 2016 07:44

4 Attachment(s)
Hello Taataa,
thanks for your help. I change my BC's but when I now try to run my model i get the following error:
#0 Foam::error::printStack(Foam::Ostream&) in "/opt/OpenFOAM/OpenFOAM-2.4.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#1 Foam::sigFpe::sigHandler(int) in "/opt/OpenFOAM/OpenFOAM-2.4.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#2 ? in "/lib64/libc.so.6"
#3 Foam::multiply(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) in "/opt/OpenFOAM/OpenFOAM-2.4.0/platforms/linux64GccDPOpt/lib/libOpenFOAM.so"
#4 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator*<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<doub le, Foam::fvPatchField, Foam::volMesh> > const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) in "/opt/OpenFOAM/OpenFOAM-2.4.0/platforms/linux64GccDPOpt/bin/interFoam"
#5 Foam::incompressible::RASModels::kEpsilon::correct () in "/opt/OpenFOAM/OpenFOAM-2.4.0/platforms/linux64GccDPOpt/lib/libincompressibleRASModels.so"
#6 ? in "/opt/OpenFOAM/OpenFOAM-2.4.0/platforms/linux64GccDPOpt/bin/interFoam"
#7 __libc_start_main in "/lib64/libc.so.6"
#8 ? in "/opt/OpenFOAM/OpenFOAM-2.4.0/platforms/linux64GccDPOpt/bin/interFoam"
Gleitkomma-Ausnahme (Speicherabzug geschrieben)

I work on this case for a while and have fixed the problem with the constant water level at the inlet and outlet. But my veolcities at the inlet and outlet are so much higher than the inlet velocity :( I put some pictures and my file cases in the attachement. The blue ones are my original BC's which i have changed into your proposal. It would be grate when you can help me again.

Madi

Taataa July 7, 2016 08:03

I looked through your case and found this problem:

Change alpha BC to:
Code:

inlet/oulet
    {
            type                        calculated;
            value                        $internalField;
    }


Madi July 7, 2016 08:26

1 Attachment(s)
Hey Taataa,
thanks for your fast answer. But now I have the following error :(

valueInternalCoeffs cannot be called for a calculatedFvPatchField
on patch inlet of field alpha.water in file "/work/ber/Rinne_2Phasen_turb/0/alpha.water"
You are probably trying to solve for a field with a default boundary condition.

From function calculatedFvPatchField<Type>::valueInternalCoeffs( const tmp<scalarField>&) const
in file /opt/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude/calculatedFvPatchField.C at line 154.

Bashar April 5, 2017 20:53

Quote:

Originally Posted by Madi (Post 608402)
Hey Taataa,
thanks for your fast answer. But now I have the following error :(

valueInternalCoeffs cannot be called for a calculatedFvPatchField
on patch inlet of field alpha.water in file "/work/ber/Rinne_2Phasen_turb/0/alpha.water"
You are probably trying to solve for a field with a default boundary condition.

From function calculatedFvPatchField<Type>::valueInternalCoeffs( const tmp<scalarField>&) const
in file /opt/OpenFOAM/OpenFOAM-2.4.0/src/finiteVolume/lnInclude/calculatedFvPatchField.C at line 154.

Hi,

I have similar error in my case, did you manage to solve this error?
Bashar

wavefunction April 20, 2018 08:41

Same error
 
Hi all.

Even I have the same error. Did anyone manage to solve it? In my case my field is not even present in the 0/ folder.

pm11dt May 18, 2018 18:46

Hi everyone,

I am also having the same issue with my case.

Has anyone found an answer to this issue?

Probably spent a total of 100 hours scrolling through these forums and no one seems to able to answer this question!


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