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/)
-   -   Velocity B.C. problem for multiphaseInterFoam (https://www.cfd-online.com/Forums/openfoam-solving/216816-velocity-b-c-problem-multiphaseinterfoam.html)

dokeun April 21, 2019 13:34

Velocity B.C. problem for multiphaseInterFoam
 
Hello.

I'm trying to utilizing multiphaseInterFoam for liquid impinging problem.

I got the error message as below
Code:

[3]
[3] --> FOAM FATAL ERROR:
[3]
    request for volVectorField U.air from objectRegistry region0 failed
    available objects of type volVectorField are

3
(
U_0
U
HbyA
)
[3]
[0] [1]
[1]
[1] --> FOAM FATAL ERROR:
[1]
    request for volVectorField U.air from objectRegistry region0 failed
    available objects of type volVectorField are

3
(
U_0
U
HbyA
)
[1]
[1]
[1]    From function const Type& Foam::objectRegistry::lookupObject(const Foam::word&) const [with Type = Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>]
[1]    in file /home/ubuntu/OpenFOAM/OpenFOAM-6/src/OpenFOAM/lnInclude/objectRegistryTemplates.C
[0]
[0] --> FOAM FATAL ERROR:
[0]
    request for volVectorField U.air from objectRegistry region0 failed
    available objects of type volVectorField are

3
(
U_0
U
HbyA
)
[0]
[0]
[0]    From function const Type& Foam::objectRegistry::lookupObject(const Foam::word&) const [with Type = Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>]
[0]    in file /home/ubuntu/OpenFOAM/OpenFOAM-6/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 193. at line 193.
[1]
FOAM parallel run aborting
[1]
[2]
[2]

[0]
FOAM parallel run aborting
[0]
[0] #0  Foam::error::printStack(Foam::Ostream&)[2] --> FOAM FATAL ERROR:
[2]
    request for volVectorField U.air from objectRegistry region0 failed
    available objects of type volVectorField are

3
(
U_0
U
HbyA
)
[2]
[2]
[2]    From function const Type& Foam::objectRegistry::lookupObject(const Foam::word&) const [with Type = Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>]
[2]    in file /home/ubuntu/OpenFOAM/OpenFOAM-6/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 193.
[2]
FOAM parallel run aborting
[2]
[2] #0  Foam::error::printStack(Foam::Ostream&)[1] #0  Foam::error::printStack(Foam::Ostream&)[3]
[3]    From function const Type& Foam::objectRegistry::lookupObject(const Foam::word&) const [with Type = Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh>]
[3]    in file /home/ubuntu/OpenFOAM/OpenFOAM-6/src/OpenFOAM/lnInclude/objectRegistryTemplates.C at line 193.
[3]
FOAM parallel run aborting
[3]
[3] #0  Foam::error::printStack(Foam::Ostream&) at ??:?
[1] #1  Foam::error::abort() at ??:?
[0] #1  Foam::error::abort() at ??:?
[2] #1  Foam::error::abort() at ??:?
[3] #1  Foam::error::abort() at ??:?
[2] #2  Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const& Foam::objectRegistry::lookupObject<Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> >(Foam::word const&) const at ??:?
[1] #2  Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const& Foam::objectRegistry::lookupObject<Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> >(Foam::word const&) const at ??:?
[3] #2  Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const& Foam::objectRegistry::lookupObject<Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> >(Foam::word const&) const at ??:?
[0] #2  Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const& Foam::objectRegistry::lookupObject<Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> >(Foam::word const&) const at ??:?
 at ??:?
[2] #3  Foam::totalPressureFvPatchScalarField::updateCoeffs() at ??:?
[3] #3  Foam::totalPressureFvPatchScalarField::updateCoeffs()[1] #3  Foam::totalPressureFvPatchScalarField::updateCoeffs() at ??:?
[0] #3  Foam::totalPressureFvPatchScalarField::updateCoeffs() at ??:?
[1] #4  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::Boundary::updateCoeffs() at ??:?
[3] #4  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::Boundary::updateCoeffs() at ??:?
[2] #4  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::Boundary::updateCoeffs() at ??:?
[0] #4  Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh>::Boundary::updateCoeffs() at ??:?
[2] #5  Foam::fvMatrix<double>::fvMatrix(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensionSet const&) at ??:?
[1] #5  Foam::fvMatrix<double>::fvMatrix(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensionSet const&) at ??:?
[3] #5  Foam::fvMatrix<double>::fvMatrix(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensionSet const&) at ??:?
[0] #5  Foam::fvMatrix<double>::fvMatrix(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::dimensionSet const&) at ??:?
 at ??:?
[3] #6  Foam::fv::gaussLaplacianScheme<double, double>::fvmLaplacianUncorrected(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
[1] #6  Foam::fv::gaussLaplacianScheme<double, double>::fvmLaplacianUncorrected(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&)[2] #6  Foam::fv::gaussLaplacianScheme<double, double>::fvmLaplacianUncorrected(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
[0] #6  Foam::fv::gaussLaplacianScheme<double, double>::fvmLaplacianUncorrected(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
 at ??:?
[1] #7  Foam::fv::gaussLaplacianScheme<double, double>::fvmLaplacian(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&)[2] #7  Foam::fv::gaussLaplacianScheme<double, double>::fvmLaplacian(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
[3] #7  Foam::fv::gaussLaplacianScheme<double, double>::fvmLaplacian(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
[0] #7  Foam::fv::gaussLaplacianScheme<double, double>::fvmLaplacian(Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&, Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&) at ??:?
[1] #8  at ??:?
[3] #8  at ??:?
[2] #8  ?? at ??:?
[0] #8  ? in "/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/multiphaseInterFoam"
[1] #9  in "/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/multiphaseInterFoam"
[3] #9  in "/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/multiphaseInterFoam"
[2] #9  ???? in "/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/multiphaseInterFoam"
[0] #9  in "/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/multiphaseInterFoam"
[1] #10  __libc_start_main in "/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/multiphaseInterFoam"
[2] #10  __libc_start_main in "/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/multiphaseInterFoam"
[3] #10  __libc_start_main? in "/lib/x86_64-linux-gnu/libc.so.6"
[1] #11  in "/lib/x86_64-linux-gnu/libc.so.6"
[3] #11  in "/lib/x86_64-linux-gnu/libc.so.6"
[2] #11  ? in "/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/multiphaseInterFoam"
[0] #10  __libc_start_main?? in "/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/mul in "/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/multiphaseInterFoam"
tiphaseInterFoam"
 in "/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/multiphaseInterFoam"
 in "/lib/x86_64-linux-gnu/libc.so.6"
[0] #11  ? in "/opt/openfoam6/platforms/linux64GccDPInt32Opt/bin/multiphaseInterFoam"
[ae118aa2fa16:00524] 3 more processes have sent help message help-mpi-api.txt / mpi-abort
[ae118aa2fa16:00524] Set MCA parameter "orte_base_help_aggregate" to 0 to see all help / error messages

I don't understand why this error occurs and how to fix it.
I hope someone give me a lesson.
The U.air I have is like
Code:

/*--------------------------------*- C++ -*----------------------------------*\
  =========                |
  \\      /  F ield        | OpenFOAM: The Open Source CFD Toolbox
  \\    /  O peration    | Website:  https://openfoam.org
    \\  /    A nd          | Version:  6
    \\/    M anipulation  |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version    2.0;
    format      ascii;
    class      volVectorField;
    location    "0";
    object      U.air;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
dimensions      [ 0 1 -1 0 0 0 0 ];

internalField  uniform (0 0 0);

boundaryField
{
    inlet_a
    {
        type            fixedValue;
        value          $internalField;
    }
    wall
    {
        type            noSlip;
    }
    inlet_pph
    {
        type            fixedValue;
        value          $internalField;
    }
    inlet_psh
    {
        type            fixedValue;
        value          $internalField;
    }
    atmosphere
    {
        type            pressureInletOutletVelocity;
        value          uniform (0 0 0);
    }
  symmetry_l
  {
      type            symmetry;
  }
  symmetry_r
  {
      type            symmetry;
  }
  defaultFaces
  {
      type            empty;
  }
    internalField
    {
        type            fixedValue;
        value          $internalField;
    }
}


// ************************************************************************* //

Sincerely yours.

alexeym April 21, 2019 16:49

Hi,

If you look a little bit deeper into error message, you can spot this line:

Code:

Foam::totalPressureFvPatchScalarField::updateCoeffs()
So, the error happes in fact in p_rgh boundary conditions, and U.air file, you have posted, has no value in diagnosing your problem.

If we take a look at totalPressureFvPatchScalarField.C, you will find there this:

Code:

void Foam::totalPressureFvPatchScalarField::updateCoeffs()
{
    updateCoeffs
    (
        p0(),
        patch().lookupPatchField<volVectorField, vector>(UName())
    );
}

So, this method uses UName_ property to look up velocity fields. And in constructor of the boundary field there are these lines:

Code:

Foam::totalPressureFvPatchScalarField::totalPressureFvPatchScalarField
(
    const fvPatch& p,
    const DimensionedField<scalar, volMesh>& iF,
    const dictionary& dict
)
:
    fixedValueFvPatchScalarField(p, iF, dict, false),
    UName_(dict.lookupOrDefault<word>("U", "U")),
...

So, to fix error, you just put "U U.air" into the B.C. dictionary.

dokeun April 21, 2019 22:23

Dear Alexey,
I really appreciate for your instruction.
I found that unnecessary codes were in p_rgh file and delete these lines for U, phi as below.
I won’t solved it without your comment.
Code:

boundaryField
{
  ...
    atmosphere
    {
        type            totalPressure;
        p0              uniform 0;
        //U              U.air;    <- I deleted this line
        //phi            phi.air;  <- I deleted this line
    }
  ....
}

Actually


All times are GMT -4. The time now is 09:49.