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

Phase not getting patched or selected

Register Blogs Community New Posts Updated Threads Search

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 1, 2024, 03:40
Post Phase not getting patched or selected
  #1
New Member
 
BIRENDRA MANDAL
Join Date: Sep 2024
Posts: 1
Rep Power: 0
birendra_iitkgp is on a distinguished road
I am trying to simulate a split T junction in openFoam using the InterFoam capillaryRise case file using PISO. I have generated the mesh using Fluent. But while patching the phases in setFieldsDict, no cells are getting selected for the water phase. Where am I going wrong??

Alpha.water file

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: 2306 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
arch "LSB;label=32;scalar=64";
class volScalarField;
location "0";
object alpha.water;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 0 0 0 0 0 0];

internalField uniform 0;

boundaryField
{
inlet_oil
{
type fixedValue;
value uniform 0;
}
inlet_water
{
type fixedValue;
value uniform 1;
}
outlet_1
{
type zeroGradient;
}
outlet_2
{
type zeroGradient;
}
walls
{
type constantAlphaContactAngle;
theta0 145;
limit gradient;
value uniform 0;
}
}


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

p_rgh file

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2306 |
| \\ / A nd | Website: 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_oil
{
type fixedFluxPressure;
}

inlet_water
{
type fixedFluxPressure;
}

outlet_1
{
type fixedValue;
value uniform 0;
}


U_file

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

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

internalField uniform (0 0 0);

boundaryField
{
inlet_oil
{
type fixedValue;
value uniform (0.0278 0 0); // flow in x-dir
}

inlet_water
{
type fixedValue;
value uniform (0 0.00833 0); // flow in y-dir
}

outlet_1
{
type zeroGradient;
}

outlet_2
{
type zeroGradient;
}

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

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


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


g_file

/*--------------------------------*- C++ -*----------------------------------*\
| ========= | |
| \\ / F ield | OpenFOAM: The Open Source CFD Toolbox |
| \\ / O peration | Version: v2306 |
| \\ / A nd | Website: www.openfoam.com |
| \\/ M anipulation | |
\*---------------------------------------------------------------------------*/
FoamFile
{
version 2.0;
format ascii;
class uniformDimensionedVectorField;
object g;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

dimensions [0 1 -2 0 0 0 0];
value (0 0 -9.81); // gravity in neg z-dir


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

transportProperties_file

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

phases (water oil);

water
{
transportModel Newtonian;
nu [ 0 2 -1 0 0 0 0 ] 9.808e-07;
rho [ 1 -3 0 0 0 0 0 ] 938;
}

oil
{
transportModel Newtonian;
nu [ 0 2 -1 0 0 0 0 ] 0.00003337869;
rho [ 1 -3 0 0 0 0 0 ] 859.83;
}

sigma 0.00436; // surface tension in N/m


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

turbulenceProperties_file

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

simulationType laminar;


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

ControlDict_file

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

application interFoam;

startFrom latestTime;

startTime 0;

stopAt endTime;

endTime 1;

deltaT 1e-5;

writeControl adjustable;

writeInterval 0.005;

purgeWrite 0;

writeFormat ascii;

writePrecision 6;

writeCompression off;

timeFormat general;

timePrecision 6;

runTimeModifiable yes;

adjustTimeStep yes;

maxCo 0.25;

maxAlphaCo 0.2;

maxDeltaT 1;


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

fvSchemes_file

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

ddtSchemes
{
default Euler;
}

gradSchemes
{
default Gauss linear;
grad(U) Gauss linear;
grad(p) Gauss linear;
grad(alpha) Gauss linear; // Green-Gauss node-based gradient calculation
}

divSchemes
{
default none;
div(rhoPhi,U) Gauss linearUpwind grad(U); // Second-order upwind for velocity
div(phi,alpha) Gauss vanLeer; // For VOF method, sometimes PLIC is handled internally
div(phirb,alpha) Gauss linear;
div(((rho*nuEff)*dev2(T(grad(U))))) Gauss linear;
}

laplacianSchemes
{
default Gauss linear corrected;
}

interpolationSchemes
{
default linear;
}

snGradSchemes
{
default corrected;
}


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

fvSolution_file

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

solvers
{
alpha.water
{
nAlphaCorr 1;
nAlphaSubCycles 2;
cAlpha 1;
solver smoothSolver;
tolerance 1e-07;
relTol 0;
}

"pcorr.*"
{
solver PCG;
preconditioner DIC;
tolerance 1e-10;
relTol 0;
}

p_rgh
{
solver PCG;
preconditioner DIC;
tolerance 1e-07;
relTol 0.05;
}

p_rghFinal
{
$p_rgh;
tolerance 1e-07;
relTol 0;
}

U
{
solver smoothSolver;
smoother symGaussSeidel;
tolerance 1e-06;
relTol 0.05;
}

UFinal
{
$U;
tolerance 1e-06;
relTol 0;
}
}

PISO
{
nCorrectors 2;
nNonOrthogonalCorrectors 0;
pRefCell 0;
pRefValue 0;
momentumPredictor yes;
}


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

setFieldsDict_file

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

defaultFieldValues
(
volScalarFieldValue alpha.water 0
);

regions
(
boxToCell
{
box (-1.83697e-20 -0.0003 0) (0.00155 0.00065 0.0001);
fieldValues
(
volScalarFieldValue alpha.water 0
);
}

boxToCell
{
box (0.000249999 -0.00029999 0.0001) (0.000349999 -0.00014999999 0);
fieldValues
(
volScalarFieldValue alpha.water 1
);
}
);


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

I am unable to understand where I am going wrong or missing something. Please help.
Attached Files
File Type: zip capillaryRise_wb100_25_msh.zip (150.9 KB, 0 views)
birendra_iitkgp is offline   Reply With Quote

Reply

Tags
#openfoam #debug


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
Sharing links for two phase solver packages developed by openfoam community swap_9068 OpenFOAM Programming & Development 1 April 2, 2017 06:43
Adding an energy source term to a phase with reactions lxlxlxt Fluent Multiphase 0 February 10, 2014 21:42
multi phase flow with chemical reactions in one phase Habibfateh OpenFOAM Programming & Development 0 February 10, 2014 08:33
Derive fixed number of phase from clone () in multiphaseEulerFoam Solver Aj Nair OpenFOAM Programming & Development 0 December 16, 2013 21:41
two Phase column simulation chemeng OpenFOAM 3 August 18, 2010 13:53


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