|
[Sponsors] |
How to maintain the fluid level initially and let them flow (pressure difference) |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
June 24, 2024, 04:05 |
How to maintain the fluid level initially and let them flow (pressure difference)
|
#1 |
New Member
nawa
Join Date: Aug 2023
Posts: 5
Rep Power: 3 |
Can anyone help me with the boundary conditions for my simple multiphase problem?
The problem is similar to the pressure difference flow of fluid from one tank (in my case, the inlet tank) to the bottom dome through a pipe, as shown in the picture. For my problem, what should be the inlet and outlet boundaries to avoid floating-point execution errors? All mesh tests are okay, so I suspect the issue lies solely with the boundary conditions. It works perfectly well when I change the boundary conditions to zeroGradient for all. However, I must derive my inlet pressure and velocities based on the fluid flow driven by the pressure difference. When I use the inletOutlet boundaries, it results in floating-point exceptions. I need the inlet and outlet sections to allow reverse flow as well. Here are the case files for my scenario that run successfully but don't work with inletOutlet boundaries: alpha files = I just pasted alpha.air file here but let me tell you all the boudaries are same for alpha.air slurry and gas and it is to reduce some spaces since it is getting long. Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object alpha.air; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 0 0 0 0];//kg m s K mol A cd internalField uniform 0; boundaryField { inlet { type inletOutlet; inletValue uniform 0; value uniform 0; } outlet { type inletOutlet; inletValue uniform 0; value uniform 0; } walls { type zeroGradient; } inlet_pipe { type zeroGradient; } dome { type zeroGradient; } gas_outlet { type zeroGradient; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object p_rgh; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0];//kg m s K mol A cd internalField uniform 0; boundaryField { inlet { type zeroGradient; } outlet { type fixedValue; value uniform 0; } gas_outlet { type zeroGradient; } walls { type zeroGradient; } inlet_pipe { type zeroGradient; } dome { type zeroGradient; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volVectorField; location "0"; object U; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -1 0 0 0 0];//kg m s K mol A cd internalField uniform (0 0 0); boundaryField { inlet { type noSlip; } outlet { type fixedValue; value uniform (0 0 0); } inlet_pipe { type noSlip; } walls { type noSlip; } gas_outlet { type noSlip; } dome { type noSlip; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object transportProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // phases ( slurry { transportModel powerLaw; powerLawCoeffs { n n [0 0 0 0 0 0 0] 0.467; k k [0 2 -1 0 0 0 0] 1.052; nuMin nuMin [ 0 2 -1 0 0 0 0 ] 0.07; nuMax nuMax [ 0 2 -1 0 0 0 0 ] 0.29; } rho [ 1 -3 0 0 0 0 0 ] 1000; } gas { transportModel Newtonian; nu [0 2 -1 0 0 0 0] 0.00001816; rho [1 -3 0 0 0 0 0] 0.627; } air { transportModel Newtonian; nu [0 2 -1 0 0 0 0] 0.00001655; rho [1 -3 0 0 0 0 0] 1.145; } ); sigmas ( (slurry air) 0.071 (slurry gas) 0.071 (air gas) 0 ); // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class uniformDimensionedVectorField; location "constant"; object g; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 1 -2 0 0 0 0];//kg m s K mol A cd value (0 0 -9.81);//gravitational accelertaion // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object turbulenceProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // simulationType laminar;//we assume the flow to be laminar // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes { default Euler; } gradSchemes { default Gauss linear; grad(U) Gauss linear; grad(gamma) Gauss linear; } divSchemes { div(rhoPhi,U) Gauss upwind; div(phi,alpha) Gauss vanLeer; 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; } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { "alpha.*" { nAlphaSubCycles 4; cAlpha 1; } "pcorr.*" { solver PCG; preconditioner { preconditioner GAMG; tolerance 1e-05; relTol 0; smoother GaussSeidel; } tolerance 1e-05; relTol 0; maxIter 100; } p_rgh { solver GAMG; tolerance 1e-07; relTol 0.05; smoother GaussSeidel; } p_rghFinal { solver PCG; preconditioner { preconditioner GAMG; tolerance 1e-07; relTol 0; nVcycles 2; smoother GaussSeidel; } tolerance 1e-07; relTol 0; maxIter 20; } U { solver smoothSolver; smoother GaussSeidel; tolerance 1e-08; relTol 0.1; nSweeps 1; } UFinal { $U; tolerance 1e-08; relTol 0; } } PIMPLE { nCorrectors 2; nNonOrthogonalCorrectors 0; } relaxationFactors { equations { "U.*" 1; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 4.0 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object setFieldsDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // defaultFieldValues ( volScalarFieldValue alpha.air 1 volScalarFieldValue alpha.slurry 0 volScalarFieldValue alpha.gas 0 ); regions ( boxToCell { origin (0 0 0); box (-2.5 -1.5 -0.975) (2.5 1.5 0.975); fieldValues ( volScalarFieldValue alpha.slurry 1 volScalarFieldValue alpha.gas 0 volScalarFieldValue alpha.air 0 ); } boxToCell { origin (-2.3 0 1.65); box (-2.8 -0.5 1.525) (-1.8 0.5 1.775); fieldValues ( volScalarFieldValue alpha.slurry 1 volScalarFieldValue alpha.gas 0 volScalarFieldValue alpha.air 0 ); } boxToCell { origin (0 0 1.475); box (-1.25 -1.25 0.975) (1.25 1.25 1.975); fieldValues ( volScalarFieldValue alpha.slurry 0 volScalarFieldValue alpha.gas 1 volScalarFieldValue alpha.air 0 ); } ); this is the previous thread that I have already explored but nohing seems to work Inlet Boundary Condition for Open Channel type flow Last edited by nawa; June 24, 2024 at 05:07. |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Pressure Outlet Targeted Mass Flow Rate | LuckyTran | FLUENT | 1 | November 23, 2016 11:40 |
block-structured mesh for t-junction | Robert@cfd | ANSYS Meshing & Geometry | 20 | November 11, 2011 05:59 |
flow simulation across a small fan | jane luo | Main CFD Forum | 15 | April 12, 2004 18:49 |
Terrible Mistake In Fluid Dynamics History | Abhi | Main CFD Forum | 12 | July 8, 2002 10:11 |
Hydrostatic pressure in 2-phase flow modeling (long) | DS & HB | Main CFD Forum | 0 | January 8, 2000 16:00 |