|
[Sponsors] |
How to set non uniform boundary condition for multiphaseInterFOAM |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
February 21, 2018, 22:14 |
How to set non uniform boundary condition for multiphaseInterFOAM
|
#1 |
Member
|
Dear friends,
I want to set a three-phase flow moving from left to right as the attached image. I try to use groovybc to set the boundary conditions as following: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object alpha.air; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 0 0 0 0]; internalField uniform 0; boundaryField { atmosphere { type inletOutlet; inletValue uniform 1; value uniform 1; } /* atmosphere { type inletOutlet; inletValue uniform 0; value uniform 0; }*/ inlet { type groovyBC; valueExpression "(pos().y>0.6) ? 1 : 0"; value uniform 0; // type zeroGradient; } outlet { type zeroGradient; } bottom { type zeroGradient; } front { type empty; } back { type empty; } cylinder { type zeroGradient; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object alpha.oil; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 0 0 0 0]; internalField uniform 0; boundaryField { atmosphere { type inletOutlet; inletValue uniform 0; value uniform 0; } inlet { type groovyBC; valueExpression "(pos().y>0.3 && pos().y<=0.6) ? 1 : 0"; value uniform 0; //type zeroGradient; } outlet { type zeroGradient; } bottom { type zeroGradient; } front { type empty; } back { type empty; } cylinder { type zeroGradient; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object alpha.water; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 0 0 0 0]; internalField uniform 0; boundaryField { atmosphere { type inletOutlet; inletValue uniform 0; value uniform 0; } inlet { type groovyBC; valueExpression "(pos().y<=0.3) ? 1 : 0"; value uniform 0; //type zeroGradient; } outlet { type zeroGradient; } bottom { type zeroGradient; } front { type empty; } back { type empty; } cylinder { type zeroGradient; } } // ************************************************************************* // Code:
#0 Foam::error::printStack(Foam::Ostream&) at ??:? #1 Foam::sigFpe::sigHandler(int) at ??:? #2 ? in "/lib/x86_64-linux-gnu/libc.so.6" #3 Foam::divide(Foam::Field<double>&, Foam::UList<double> const&, Foam::UList<double> const&) at ??:? #4 Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > Foam::operator/<Foam::fvPatchField, Foam::volMesh>(Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&, Foam::tmp<Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> > const&) at ??:? #5 Foam::multiphaseMixture::multiphaseMixture(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) at ??:? #6 ? at ??:? #7 __libc_start_main in "/lib/x86_64-linux-gnu/libc.so.6" #8 ? at ??:? Floating point exception (core dumped) Code:
type zeroGradient; Could anyone give some help? Best regards, Chengan |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
CFD analaysis of Pelton turbine | amodpanthee | CFX | 31 | April 19, 2018 19:02 |
Wrong flow in ratating domain problem | Sanyo | CFX | 17 | August 15, 2015 07:20 |
interFoam | Hydraulic Jump | Correct boundary condition p_rgh | pythag0ra5 | OpenFOAM Running, Solving & CFD | 17 | September 5, 2014 05:31 |
An error has occurred in cfx5solve: | volo87 | CFX | 5 | June 14, 2013 18:44 |
Convective Heat Transfer - Heat Exchanger | Mark | CFX | 6 | November 15, 2004 16:55 |