|
[Sponsors] |
Simulation DNS for two phase flow in openFoam |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
December 8, 2020, 06:50 |
Simulation DNS for two phase flow in openFoam
|
#1 |
Member
ESI
Join Date: Sep 2017
Posts: 49
Rep Power: 9 |
Dear All,
Now I am simulating the channel flow with a cavity. in the cavity, it is an air- flow and channel with water flow. I am setting the simulationType with laminar in turbulenceProperties. Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.6 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object turbulenceProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // simulationType laminar; // ************************************************************************* // In file transportProperties Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.6 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object transportProperties; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // phases (water air); water { transportModel Newtonian; nu 1e-06; rho 1000; } air { transportModel Newtonian; nu 1.48e-05; rho 1; } sigma 0.072; // ************************************************************************* // and file g Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 1.6 | | \\ / 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]; value ( 9.81 0 0); // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 8 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application interFoam; startFrom latestTime; latestTime 0.001; stopAt endTime; endTime 0.002; deltaT 0.0000001; writeControl adjustableRunTime; writeInterval 0.0001; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression off; timeFormat general; timePrecision 6; runTimeModifiable yes; adjustTimeStep on; maxCo 0.5; maxAlphaCo 0.5; maxDeltaT 1; // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 8 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSchemes; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // ddtSchemes { default Euler; } gradSchemes { default Gauss linear; } divSchemes { div(rhoPhi,U) Gauss linearUpwind grad(U); div(phi,alpha) Gauss interfaceCompression vanLeer 1; div(phi,k) Gauss upwind; div(phi,epsilon) Gauss upwind; 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 | Website: https://openfoam.org \\ / A nd | Version: 8 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object fvSolution; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // solvers { "alpha.water.*" { nAlphaCorr 2; nAlphaSubCycles 1; MULESCorr yes; nLimiterIter 3; alphaApplyPrevCorr yes; solver smoothSolver; smoother symGaussSeidel; tolerance 1e-8; relTol 0; minIter 1; } pcorr { solver GAMG; smoother DIC; tolerance 1e-4; relTol 0.01; } pcorrFinal { $pcorr; relTol 0; }; p_rgh { solver GAMG; smoother DIC; tolerance 1e-7; relTol 0.001; } p_rghFinal { $p_rgh; relTol 0; } "U.*" { solver smoothSolver; smoother symGaussSeidel; tolerance 1e-7; relTol 0; } } PIMPLE { momentumPredictor yes; nOuterCorrectors 1; nCorrectors 3; nNonOrthogonalCorrectors 0; } Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 8 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "system"; object topoSetDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // actions ( { name box; type cellSet; action new; source boxToCell; sourceInfo { box (0 0.00003 0) (0.0009 0.00033 0.00045); } } { name mycell; type cellZoneSet; action new; source setToCellZone; sourceInfo { set box; } } ); // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 8 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; location "constant"; object fvOptions; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // momentumSource { type meanVelocityForce; selectionMode cellSet; cellSet mycell; fields (U); Ubar (18.7565 0 0); relaxation 1.0; } // ************************************************************************* // in U before run funkysetFieldsDit Code:
boundaryField { Top { type noSlip; } Ridges { type noSlip; } Wall_below { type slip; } inlet { type cyclicAMI; value uniform (18 0 0); } outlet { type cyclicAMI; value uniform (18 0 0); } left { type cyclicAMI; value uniform (18 0 0); } right { type cyclicAMI; value uniform (18 0 0); } air_inlet { type cyclicAMI; value uniform (0 0 0); } air_outlet { type cyclicAMI; value uniform (0 0 0); } Left_air { type slip; } Right_air { type slip; } } Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 8 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object alpha.water; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 0 0 0 0]; internalField uniform 0; boundaryField { inlet { type cyclicAMI; } outlet { type cyclicAMI; } Top { type zeroGradient; } right { type cyclicAMI; } left { type cyclicAMI; } Ridges { type zeroGradient; } Wall_below { type zeroGradient; } air_inlet { type cyclicAMI; } air_outlet { type cyclicAMI; } Right_air { type zeroGradient; } Left_air { type zeroGradient; } } // ************************************************************************* // Code:
/*--------------------------------*- C++ -*----------------------------------*\ ========= | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox \\ / O peration | Website: https://openfoam.org \\ / A nd | Version: 8 \\/ M anipulation | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "1"; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField uniform 0; boundaryField { inlet { type cyclicAMI; } outlet { type cyclicAMI; } Top { type zeroGradient; } right { type cyclicAMI; } left { type cyclicAMI; } Ridges { type zeroGradient; } Wall_below { type fixedValue; value uniform 0; } air_inlet { type cyclicAMI; } air_outlet { type cyclicAMI; } Right_air { type zeroGradient; } Left_air { type zeroGradient; } } // ************************************************************************* // have anyone could give me the advices when I using fvoptions what is an error and how to create the fluctuation velocity (full developed turpulent) in DNS simulation? the result which I want to achieve like the picture but for two-phase flow (this is sigle flow) sincerely Thank you for any advice! |
|
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Issues on the simulation of high-speed compressible flow within turbomachinery | dowlee | OpenFOAM Running, Solving & CFD | 11 | August 6, 2021 07:40 |
Periodic boundary condition for two phase flow in OpenFoam? | ht2017 | OpenFOAM Pre-Processing | 0 | October 19, 2020 06:41 |
Sharing links for two phase solver packages developed by openfoam community | swap_9068 | OpenFOAM Programming & Development | 1 | April 2, 2017 06:43 |
Suggestion for a new sub-forum at OpenFOAM's Forum | wyldckat | Site Help, Feedback & Discussions | 20 | October 28, 2014 10:04 |
help needed with simulation of turbulent flow around an obstacle with openfoam | kingfaycel5 | OpenFOAM | 4 | March 3, 2013 16:07 |