CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > OpenFOAM > OpenFOAM Running, Solving & CFD

boundary conditions and errors

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   June 6, 2016, 17:47
Default boundary conditions and errors
  #1
KTG
Senior Member
 
Abe
Join Date: May 2016
Posts: 119
Rep Power: 10
KTG is on a distinguished road
Hi Foamers,

I am new to openFOAM, and am having some trouble understanding the boundary conditions. I am setting up a very simple interfoam case. It is a Hele-Shaw type experiment where a light, low viscosity fluid is displaced by a denser, high viscosity one. The domain is a rectangle, where fluid flows between two flat plates that are close together (like Poiselle flow, but two phase). The geometry and viscosity make the Reynolds number low enough to disregard turbulence. I am pretty confident that I setup blockmesh and alpha.water properly, but probably not boundary conditions. I am getting this error message that I don't understand:

Code:
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
Create time

Create mesh for time = 0


PIMPLE: Operating solver in PISO mode

Reading field p_rgh

Reading field U

Reading/calculating face flux field phi

Reading transportProperties

Selecting incompressible transport model Newtonian
Selecting incompressible transport model Newtonian
#0  Foam::error::printStack(Foam::Ostream&) in "/opt/OpenFOAM/OpenFOAM-v3.0+/platforms/linux64Gcc48DPInt32Opt/lib/libOpenFOAM.so"
#1  Foam::sigFpe::sigHandler(int) in "/opt/OpenFOAM/OpenFOAM-v3.0+/platforms/linux64Gcc48DPInt32Opt/lib/libOpenFOAM.so"
#2  ? in "/lib64/libc.so.6"
#3  ? in "/lib64/libm.so.6"
#4  Foam::pow(Foam::dimensioned<double> const&, Foam::dimensioned<double> const&) in "/opt/OpenFOAM/OpenFOAM-v3.0+/platforms/linux64Gcc48DPInt32Opt/lib/libOpenFOAM.so"
#5  Foam::interfaceProperties::interfaceProperties(Foam::GeometricField<double, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::IOdictionary const&) in "/opt/OpenFOAM/OpenFOAM-v3.0+/platforms/linux64Gcc48DPInt32Opt/lib/libinterfaceProperties.so"
#6  Foam::immiscibleIncompressibleTwoPhaseMixture::immiscibleIncompressibleTwoPhaseMixture(Foam::GeometricField<Foam::Vector<double>, Foam::fvPatchField, Foam::volMesh> const&, Foam::GeometricField<double, Foam::fvsPatchField, Foam::surfaceMesh> const&) in "/opt/OpenFOAM/OpenFOAM-v3.0+/platforms/linux64Gcc48DPInt32Opt/lib/libimmiscibleIncompressibleTwoPhaseMixture.so"
#7  ? in "/opt/OpenFOAM/OpenFOAM-v3.0+/platforms/linux64Gcc48DPInt32Opt/bin/interFoam"
#8  __libc_start_main in "/lib64/libc.so.6"
#9  ? in "/opt/OpenFOAM/OpenFOAM-v3.0+/platforms/linux64Gcc48DPInt32Opt/bin/interFoam"
Floating point exception (core dumped)
The impression I get is that the boundary conditions I set up are causing openFoam to calculate some paradoxical flux values or something.


Here are my blockMesh, p_rgh, and U setups:

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v3.0+                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       dictionary;
    object      blockMeshDict;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

convertToMeters 1;

vertices
(
    (0 0 0)
    (.1 0 0)
	(.1 .16 0)
	(0 .16 0)
    (0 0 -.001)
    (.1 0 -.001)
	(.1 .16 -.001)
	(0 .16 -.001)
	
);

blocks
(
    hex (0 1 2 3 4 5 6 7) (30 30 10) simpleGrading (1 1 1)
);

edges
(
);

boundary
(
    inlet
    {
        type patch;
        faces
        (
            (1 5 6 2)
            
        );
    }
    outlet
    {
        type patch;
        faces
        (
            (0 3 7 4)
            (3 2 6 7)
        );
    }
    wedgewalls
    {
        type wall;
        faces
        (
            (0 1 2 3)
            (4 7 6 5)
			(0 4 5 1)
        );
    }
  
);

mergePatchPairs
(
);

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

Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v3.0+                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volScalarField;
    object      p_rgh;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform 0;

boundaryField
{
    inlet
  
    {
        type            prghPressure;
        rho             1263.9;
		href			.16;
        p               uniform 0;
        value           uniform 0; // optional initial value
    }
    

    outlet
    {
        type            fixedValue;
		value			uniform 0;
    }


	wedgewalls
	{
        type            fixedFluxPressure;
        value           uniform 0;	
	}    


}
Code:
/*--------------------------------*- C++ -*----------------------------------*\
| =========                 |                                                 |
| \\      /  F ield         | OpenFOAM: The Open Source CFD Toolbox           |
|  \\    /   O peration     | Version:  v3.0+                                 |
|   \\  /    A nd           | Web:      www.OpenFOAM.com                      |
|    \\/     M anipulation  |                                                 |
\*---------------------------------------------------------------------------*/
FoamFile
{
    version     2.0;
    format      ascii;
    class       volVectorField;
    location    "0";
    object      U;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

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

internalField   uniform (0 0 0);

boundaryField
{
    inlet
 	{
		type			zeroGradient;

    }

    outlet
    {
        type            zeroGradient;
    }

    wedgewalls
    {
        type            fixedValue;
        value           uniform (0 0 0);
    }
   
}


// ************************************************************************* //
The flow is driven by the constant hydrostatic pressure on the "inlet" boundary where the heavier fluid enters. The lighter displaced fluid should exit the "outlet" boundary, with the only resistance being a little drag on the walls and atmospheric pressure. So I set atmospheric to zero, so that I wouldn't have to add it to the rghPressure boundary in the p_rgh file. I think the problem is in the U inlet or outlet boundaries. I don't know the actual velocity at either boundary, so I really just guessed fixedGradient. Does this just mean that velocity is constant in the direction normal to the boundary? I seem to have some deficiencies in understanding what the openFoam documentation means mathematically. I have been trying to use the documentation: http://openfoam.github.io/Documentat...ml/a00003.html , but it is pretty overwhelming at this point. All suggestions welcome! Also, if anyone has any tips about using the documentation / learning the boundary conditions....

Thanks-
KTG is offline   Reply With Quote

Reply

Tags
beginner, boundary condition, documentation, hele-shaw cell

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
[ICEM] errors in defining periodic boundary conditions ahirekar10 ANSYS Meshing & Geometry 1 May 5, 2014 04:21
Micro Scale Pore, icoFoam gooya_kabir OpenFOAM Running, Solving & CFD 2 November 2, 2013 13:58
An error has occurred in cfx5solve: volo87 CFX 5 June 14, 2013 17:44
Is there any method to analyse the errors cause by boundary conditions? hadesmajesty Main CFD Forum 1 August 9, 2009 09:47
Boundary Conditions Jan Ramboer Main CFD Forum 11 August 16, 1999 08:59


All times are GMT -4. The time now is 04:27.