|
[Sponsors] |
rasInterFoam Channel Flowlooking for working case |
|
LinkBack | Thread Tools | Search this Thread | Display Modes |
April 18, 2006, 18:08 |
Hello,
I am having some pro
|
#1 |
Member
nicolas
Join Date: Mar 2009
Location: Glasgow
Posts: 42
Rep Power: 17 |
Hello,
I am having some problems (see http://www.cfd-online.com/OpenFOAM_D...tml?1144138075) imposing good boundary conditions to solve a 3D channel flow case. Could anyone post a case that worked fine so that i can check what i am doing wrong? Cheers, Nicolas |
|
March 4, 2009, 22:15 |
Hi Nicolas,
I am a newbie f
|
#2 |
Member
|
Hi Nicolas,
I am a newbie for OpenFOAM. I read the link you post above and I think I got the similar problem. I could not get correct results for simple Open Channel Flow case by using InterFoam solver. Maybe the problem is solved already but I could not find the solution in OpenFOAM discussion forum. Therefore, please let me know whether the problem is solved in OpenFOAM, it would be great appreciated. I also attached my case below. Please point out the wrong setup if possible. Thanks. ---------------------------------------------- mesh /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \ / O peration | Version: 1.5 | | \ / A nd | Web: http://www.OpenFOAM.org | | \/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object blockMeshDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // convertToMeters 1.0; vertices ( (0 0 0) //point0 (10 0 0) //point1 (0 0.2 0) //point2 (10 0.2 0) //point3 (0 0.5 0) //point4 (10 0.5 0) //point5 (0 0 0.1) //point6 (10 0 0.1) //point7 (0 0.2 0.1) //point8 (10 0.2 0.1) //point9 (0 0.5 0.1) //point10 (10 0.5 0.1) //point11 ); blocks ( hex (0 1 3 2 6 7 9 8) (50 20 1) simpleGrading (1 1 1) hex (2 3 5 4 8 9 11 10) (50 20 1) simpleGrading (1 1 1) ); edges ( ); patches ( patch inletWater ( (0 6 8 2) ) patch inletAir ( (2 8 10 4) ) patch outletWater ( (7 1 3 9) ) patch outletAir ( (9 3 5 11) ) patch Atmosphere ( (10 11 5 4) ) patch Bottom ( (7 6 0 1) ) ); mergePatchPairs ( ); // ************************************************** *********************** // ----------------------------------- setFields /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \ / O peration | Version: 1.5 | | \ / A nd | Web: http://www.OpenFOAM.org | | \/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object setFieldsDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // defaultFieldValues ( volScalarFieldValue gamma 0 volVectorFieldValue U (0.0 0 0) ); regions ( boxToCell { box (0 0 0) (10 0.2 0.1); fieldValues ( volScalarFieldValue gamma 1 volVectorFieldValue U (0.1 0 0) ); } ); // ************************************************** *********************** // --------------------------------------- ControlDIct /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \ / O peration | Version: 1.5 | | \ / A nd | Web: http://www.OpenFOAM.org | | \/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class dictionary; object controlDict; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // application interFoam; //startFrom lastTime; startFrom startTime; startTime 0; stopAt endTime; endTime 50; deltaT 0.001; writeControl adjustableRunTime; writeInterval 1; purgeWrite 0; writeFormat ascii; writePrecision 6; writeCompression uncompressed; timeFormat general; timePrecision 6; runTimeModifiable yes; adjustTimeStep yes; maxCo 0.5; maxDeltaT 1; //libs ("libOpenFOAM.so" "libconvectiveOutlet.so"); // ************************************************** *********************** // --------------------------------------- U /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \ / O peration | Version: 1.5 | | \ / A nd | Web: http://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]; internalField uniform ( 0 0 0); boundaryField { inletWater { type fixedValue; value uniform (0.1 0 0); } inletAir { type fixedValue; value uniform (0 0 0); } outletWater { type zeroGradient; } outletAir { type zeroGradient; } Atmosphere { type pressureInletOutletVelocity; phi phi; value uniform (0 0 0); } Bottom { type zeroGradient; } defaultFaces { type empty; } } // ************************************************** *********************** // ------------------------------------- gamma /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \ / O peration | Version: 1.5 | | \ / A nd | Web: http://www.OpenFOAM.org | | \/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object gamma; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 0 0 0 0 0 0]; internalField uniform 0; boundaryField { inletWater { type zeroGradient; } inletAir { type zeroGradient; } outletWater { type fixedValue; value uniform 1; } outletAir { type fixedValue; value uniform 0; } Atmosphere { type inletOutlet; inletValue uniform 0; value uniform 0; } Bottom { type zeroGradient; } defaultFaces { type empty; } } // ************************************************** *********************** // pd /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \ / O peration | Version: 1.5 | | \ / A nd | Web: http://www.OpenFOAM.org | | \/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; location "0"; object pd; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [1 -1 -2 0 0 0 0]; internalField uniform 0; boundaryField { inletWater { type zeroGradient; } inletAir { type zeroGradient; } outletWater { type fixedValue; value uniform 0; } outletAir { type fixedValue; value uniform 0; } Atmosphere { type totalPressure; U U; phi phi; rho none; psi none; gamma 1; p0 uniform 0; value uniform 0; } Bottom { type zeroGradient; } defaultFaces { type empty; } } // ************************************************** *********************** // that is all. some one suggests to use inletOutlet to gamma, but I think it does not satisfy the fixed water depth in downstream condition. what do you think? Anyone of FOAMers will be apprecaited for your comments. Regards Su Xiaohui |
|
March 6, 2009, 05:17 |
hi Su Xiaohui ,
i think you
|
#3 |
Member
hamdi
Join Date: Mar 2009
Posts: 75
Rep Power: 17 |
hi Su Xiaohui ,
i think your pb is in the setField and controldict files, first in setfiels file, in order to show the motion of you flow you should'nt fill all your domain in water for example box (0 0 0) (1 0.2 0.1); in file controlDict: endtime= distance/velocity=10/0.1=100s; preferably we take endtime=endtime*2=200s and deltaT=(C0*deltax)/U (see userguide or programm's guid), when deltax=10/50=0.2, thus deltaT=(0.5*0.2)/0.1=1s not 0.001, also writeInterval means the number of folders which contains the results , writeInterval= means the steps of time to writing a folders of results, for exp if writeInterval = 5 impliques that at each 5 second you will have a folder of results; hope it help you. hamdi |
|
March 18, 2009, 02:32 |
|
#4 |
Member
|
Hi Hamdi,
Thanks for your information. I have once tried the setup you mentioned before, but results are not good. Have you even been got good resluts for such simple OpenChannel flow case? If So I would be greatly appreciated you can share them in this forum. Thanks again for your reply. Regards Su Xiaohui |
|
March 24, 2009, 01:49 |
where is source term rho*g in Ueqn.H of InterFOAM?
|
#5 |
Member
|
Dear all,
I noted that a variable with ghf[ surfaceScalarField ghf("gh", g & mesh.Cf());] and this ghf is used in Ueqn.H for solving U (let LHS=RHS) In order to say clearly, I copy the code below ************************************************** ************************************** surfaceScalarField muf = twoPhaseProperties.muf(); fvVectorMatrix UEqn ( fvm::ddt(rho, U) + fvm::div(rhoPhi, U) - fvm::laplacian(muf, U) - (fvc::grad(U) & fvc::grad(muf)) //- fvc::div(muf*(fvc::interpolate(dev(fvc::grad(U))) & mesh.Sf())) ); if (momentumPredictor) { solve ( UEqn == fvc::reconstruct ( ( fvc::interpolate(interface.sigmaK())*fvc::snGrad(g amma) - ghf*fvc::snGrad(rho) - fvc::snGrad(pd) ) * mesh.magSf() ) ); } After derivation I knew ghf*fvc::snGrad(rho) plus fvc::snGrad(pd) is snGrad(p) based on p=pd+rho*gh. However, if my derivation is right, where the source term rho*g is in momentum equation? I am really appreciated if anyone can give me a hand on it. Best Regards Su Xiaohui |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Parallel rasInterFoam | openfoam_user | OpenFOAM Running, Solving & CFD | 4 | November 1, 2008 05:14 |
RasInterFoam or lesInterFoam | hsieh | OpenFOAM Running, Solving & CFD | 2 | March 31, 2006 15:42 |
RasInterFoam cavitation | maritozzo | OpenFOAM Running, Solving & CFD | 2 | December 6, 2005 15:09 |
Sample not working in my case | sampaio | OpenFOAM Post-Processing | 1 | October 26, 2005 14:41 |
Working with compressed case and data files | Darrell Anthony Egarr | FLUENT | 0 | December 15, 2002 08:05 |