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/)
-   -   error using interFoam solver (https://www.cfd-online.com/Forums/openfoam-pre-processing/221639-error-using-interfoam-solver.html)

Mi95 October 23, 2019 16:17

error using interFoam solver
 
Hello guys,


im currently trying to simulate a u pipe, that has at the beginning a fluid area and an area with air within. At the inlet i assigned a volume flow rate and at the outlet a certain pressure. To set those cell sets with fluid and air area i created two zones with setFields and checked it with paraView.
Everything was fine, but when i started the simulation, an error occurs



Reading g

Reading hRef
Calculating field g.h



--> FOAM FATAL IO ERROR:
Unable to set reference cell for field p
Please supply either pRefCell or pRefPoint


file: /home/mi/Schreibtisch/OF7/openfoam7/Test-Tutorials/multiphase/interFoam/RAS/Urohrphasig/urohrphasig/system/fvSolution.PIMPLE from line 84 to line 86.



after checking how to solve that error, i added



pRefCell 0;

pRefValue 0;

to the PIMPLE loop in in the fvSolution file. Now i get the following error


--> FOAM FATAL ERROR:
Continuity error cannot be removed by adjusting the outflow.
Please check the velocity boundary conditions and/or run potentialFoam to initialise the outflow.
Total flux : 2.22507e-308
Specified mass inflow : 0.0197
Specified mass outflow : 0
Adjustable mass outflow : 0


From function bool Foam::adjustPhi(Foam::surfaceScalarField&, const volVectorField&, Foam::volScalarField&)
in file cfdTools/general/adjustPhi/adjustPhi.C at line 107.



my U file looks like this

FoamFile
{
version 2.0;
format ascii;
class volVectorField;
object U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 1 -1 0 0 0 0];

internalField uniform (0 0 0);

boundaryField
{
wand
{
type noSlip;

}

inlet
{
type flowRateInletVelocity;
volumetricFlowRate constant 0.0197;


}
outlet
{
type pressureInletOutletVelocity;
inletValue uniform (0 0 0);
value $internalField;
}
#includeEtc "caseDicts/setConstraintTypes"
}

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


my p file looks like this
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [1 -1 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
wand
{
type zeroGradient;
}
outlet
{
type fixedValue;
value uniform (0 -200 0);

}
inlet
{
ype fixedValue;
value uniform (0 0 0);
}
}

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

my p rgh file looks like this
FoamFile
{
version 2.0;
format ascii;
class volScalarField;
object p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [1 -1 -2 0 0 0 0];

internalField uniform 0;

boundaryField
{
wand
{
type fixedFluxPressure;
value uniform 0;
}

outlet
{
type fixedFluxPressure;
value uniform 0;
}

inlet
{
type fixedFluxPressure;
value uniform 0;
}
#includeEtc "caseDicts/setConstraintTypes"
}

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



i tried similar boundaries at other solvers and it worked perfectly fine.

but as i wand to model two phases i have to use some of the multiphase solvers and the best start is in my opinion the interFoam solver regarding the wanted output values.
Do you have any suggestions regarding the errors?
i would really appreciate any advice.


best regards Mi

nimasam November 4, 2019 03:52

2 options:
1-put BC for outlet fixedValue
2-define the pRefCell and pRefValue in the fvSolution

Bodo1993 January 30, 2020 18:10

Quote:

Originally Posted by nimasam (Post 748785)
2 options:
1-put BC for outlet fixedValue
2-define the pRefCell and pRefValue in the fvSolution


Hi, I have a simple 2D channel flow. I use twoLiquidMixingFoam multiphase solver. I have variations in density and I was advised not to set the whole outlet boundary patch to a fixed value. Therefore, I used your second option; however, I got the error below:

--> FOAM FATAL ERROR:
Continuity error cannot be removed by adjusting the outflow.
Please check the velocity boundary conditions and/or run potentialFoam to initialise the outflow.
Total flux : 7.06977e-06
Specified mass inflow : 0.00343952
Specified mass outflow : 0
Adjustable mass outflow : 1.37957e-163


I would appreciate your assistance. Thanks.


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