|
[Sponsors] |
January 30, 2013, 05:04 |
Boundary Conditions Problem
|
#1 |
Senior Member
Himanshu Sharma
Join Date: Jul 2012
Posts: 101
Rep Power: 13 |
Hi,
I am trying to simulate a jet flow inside a square domain i have imported my mesh geometry successfully inside OpenFoam. the boundary conditions i need to specify is shown in the diagram below. The inlet velocity in y direction ,the outlets are all the faces which are at atmospheric pressure i am unable to fix the problem with the boundary condition specification projet2.png /*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField uniform 0; boundaryField { inlet { type zeroGradient; } wall { type zeroGradient; } outlet { type fixedValue; value uniform 0; } } // ************************************************** *********************** // this is my pressure boundary condition file please see if i am wrong any where also adding my velocity boundary condition file Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ 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 { type inletOutlet; inletValue uniform (-2 0 0); value (0 0 0); } wall { type fixedValue; value uniform (0 0 0); } outlet { type fixedValue; value uniform (0 0 0); } } // ************************************************************************* // if some body can help on this issue. thanks |
|
January 30, 2013, 10:26 |
|
#2 |
Member
Ali Khalifesoltani
Join Date: Mar 2011
Location: Esfahan, Iran
Posts: 56
Rep Power: 15 |
Hi himanshu28,
According to the problem geometry that you have attached the velocity Inlet should be (0 -2 0), not (-2 0 0). Regards, Ali |
|
January 30, 2013, 12:46 |
Thanks &Query
|
#3 | |
Senior Member
Himanshu Sharma
Join Date: Jul 2012
Posts: 101
Rep Power: 13 |
Quote:
Thanks for the reply. I have made this correction but still my pressure conditions are not so satisfactory if you can comment on which "type" to choose for specifying it.i will attach some of my results jet27.pngvector.png I have use icoFoam and i am still not able to achieve steady state solution i think that is the on reason that i am not able to see the complete movement of fluid in the domain |
||
February 1, 2013, 07:42 |
Pressure Outlet condition ??
|
#4 |
Senior Member
Himanshu Sharma
Join Date: Jul 2012
Posts: 101
Rep Power: 13 |
I have edited my model a bit and provided an inlet hole and outlet hole but i am confused in the pressure conditions on the wall
presently what i have done is this Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField uniform 0; boundaryField { inlet { type zeroGradient; } outlet { type fixedValue; value uniform 100; } wall { type zeroGradient; } } // ************************************************************************* // the inlet is from right and the outlet is from left phase ..with these set of pressure cond. i am using ico Foam solver for my case .and getting following error. after time 0.06 Code:
#0 Foam::error::printStack(Foam::Ostream&) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #1 Foam::sigFpe::sigHandler(int) in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #2 in "/lib/libc.so.6" #3 Foam::PBiCG::solve(Foam::Field<double>&, Foam::Field<double> const&, unsigned char) const in "/opt/openfoam210/platforms/linux64GccDPOpt/lib/libOpenFOAM.so" #4 in "/opt/openfoam210/platforms/linux64GccDPOpt/bin/icoFoam" #5 in "/opt/openfoam210/platforms/linux64GccDPOpt/bin/icoFoam" #6 in "/opt/openfoam210/platforms/linux64GccDPOpt/bin/icoFoam" #7 __libc_start_main in "/lib/libc.so.6" #8 in "/opt/openfoam210/platforms/linux64GccDPOpt/bin/icoFoam" Floating point exception |
|
February 2, 2013, 07:54 |
|
#5 |
Member
Ali Khalifesoltani
Join Date: Mar 2011
Location: Esfahan, Iran
Posts: 56
Rep Power: 15 |
Hi himanshu28,
I don't know what the error means, but it seems that your pressure B.C. is OK. How about the velocity B.C.? Did you define it correctly? the inlet velocity B.C. should be fixedValue, outlet should be zeroGradient, & wall should be fixedValue and equal to 0. Regards, Ali |
|
February 3, 2013, 01:14 |
Problem unresolved
|
#6 | |
Senior Member
Himanshu Sharma
Join Date: Jul 2012
Posts: 101
Rep Power: 13 |
Quote:
I have specifed the same velocity boundaray conditions attaching the code Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ 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 { type fixedValue; value uniform (0 0 -12); } outlet { type zeroGradient; } wall { type fixedValue; value uniform (0 0 0); } } // ************************************************************************* // the jet is not at all developing inside the box it seems something wrong with my boundary conditions only.Should i provide zeroGradient of velocity at the wall? I have a unstructured mesh(tetrahedral imported form ICEM) is it the cause. |
||
February 3, 2013, 01:39 |
|
#7 |
Member
Ali Khalifesoltani
Join Date: Mar 2011
Location: Esfahan, Iran
Posts: 56
Rep Power: 15 |
Hi,
When the error occures? after a few timesteps going on or before the solution starts? zeroGradient means that your variable has equal magnitude to the cell beside it. so if your B.C. is no-slip wall it seems that using this condition is not true. could you attach your last screenshot containing coordinate axis(x,y,z)? and could you take a screen shot of terminal that contains a few lines before your error until the end? Regards |
|
February 4, 2013, 05:05 |
|
#8 | |
Senior Member
Himanshu Sharma
Join Date: Jul 2012
Posts: 101
Rep Power: 13 |
Quote:
thanks for replying. I have attached some pics. the error comes after running some time step. as u would see in the error pic. so please see and suggest if i need to make corrections in my boundary conditions.cordi.jpgdia.pngerror.jpg |
||
February 4, 2013, 05:13 |
|
#9 |
Member
Martin
Join Date: Nov 2011
Posts: 35
Rep Power: 14 |
Hello himanshu28,
I think the Problem is the boundary file p. Try this: Code:
/*--------------------------------*- C++ -*----------------------------------*\ | ========= | | | \\ / F ield | OpenFOAM: The Open Source CFD Toolbox | | \\ / O peration | Version: 2.1.1 | | \\ / A nd | Web: www.OpenFOAM.org | | \\/ M anipulation | | \*---------------------------------------------------------------------------*/ FoamFile { version 2.0; format ascii; class volScalarField; object p; } // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * // dimensions [0 2 -2 0 0 0 0]; internalField uniform 98000; boundaryField { inlet { type fixedValue; value uniform 98000; } outlet { type zeroGradient; } wall { type zeroGradient; } } // ************************************************************************* // |
|
February 4, 2013, 06:04 |
|
#10 |
Member
Ali Khalifesoltani
Join Date: Mar 2011
Location: Esfahan, Iran
Posts: 56
Rep Power: 15 |
Hi,
As I see the problem settings is such that the courant number becomes much larger than allowed value and so cause the solution to diverge. you must change your boundary as the courant number reduces. there is some suggestions: 1- decrease the inlet velocity and run the problem again. 2- as wernsen said make the initial pressure equal to inlet pressure and set the outlet pressure as zeroGradient. 3- make a finer mesh so that the courant number will decrease. this method is recommended only if you don't have any permission to change the other B.C.s and will make your solution very time consuming. 4- decrease your time-step to decrease Co Number. 5- a blend of 4 past suggestions. Regards, Ali |
|
February 4, 2013, 06:39 |
Thanks &Query
|
#11 |
Senior Member
Himanshu Sharma
Join Date: Jul 2012
Posts: 101
Rep Power: 13 |
hi,
Thanks for the reply . But what this 98000 stand for i am trying to put the same boundary conditions on the given problem. As you can see my error message pic that the Courant number is reaching way high should i reduce the time step more presently i am trying to run the solution for start time 0.0 end time 0.3 deltaT 0.001 is it the problem? its giving error....problem unresolved. |
|
February 4, 2013, 07:11 |
|
#12 |
Member
Ali Khalifesoltani
Join Date: Mar 2011
Location: Esfahan, Iran
Posts: 56
Rep Power: 15 |
Hello again,
you can reduce time-step, it doesn't affect the solution but will reduce the Co number and can help your solution to converge. you should determine your time-step such as your Co number doesn't exceed 1 in the solution. 1-reduce and reduce it until the Co number in the terminal shows the accepted value. as I understood, your mesh is tetrahedral. unstructured meshes if they are not generated well, will have some cells that are very smaller than the biggest cell in your mesh. it will also make your solution dependent to these small cells, so that you should reduce your time step as much as the courant will be max 1 for these cells. If the geometry is not so complicated, such as your case, structured grids are more suggested. they often don't face to these problems. 2-make a good structured grid and run again. if your problem didn't solved I will be glad to help you if I could. Regards, Ali |
|
February 4, 2013, 07:28 |
|
#13 | |
Member
Martin
Join Date: Nov 2011
Posts: 35
Rep Power: 14 |
Quote:
|
||
February 4, 2013, 07:31 |
|
#14 |
Member
Martin
Join Date: Nov 2011
Posts: 35
Rep Power: 14 |
oh and the "internalField 98000" ist the initial value (t=0) of your internal p-field in Pa. I always had problems with a initial value of 0 Pa.
Last edited by wernsen; February 4, 2013 at 07:32. Reason: typo |
|
February 5, 2013, 00:16 |
|
#15 |
Senior Member
Himanshu Sharma
Join Date: Jul 2012
Posts: 101
Rep Power: 13 |
OK..i have tryed these set of boundary conditions but still my courant number is going very high i think i should pack more number of cells inside my domain.In the previous case (my first post ) i had a single slit and in the box and the mesh count was nearly 1200000+ hence there was no issues with that, in my present case i have on 13000+ cells only i think the cell count that is the mesh may be the reason for it.I am trying to refine my mesh and i think then it should work because according to prescribed boundary conditions in Open Foam and our set boundary conditions are satisfying the flow physics also.i hope it works
|
|
February 5, 2013, 00:22 |
|
#16 | |
Senior Member
Himanshu Sharma
Join Date: Jul 2012
Posts: 101
Rep Power: 13 |
Quote:
The 3rd options which us you suggested will work i think. As I think there are less number of cells being packed and hence the my CFL number is shooting up now i am trying to mesh my geometry with finer grid hope it works. Regards Himanshu |
||
February 8, 2013, 07:11 |
Problem unresolved
|
#17 | |
Senior Member
Himanshu Sharma
Join Date: Jul 2012
Posts: 101
Rep Power: 13 |
Quote:
I tryed your suggestions i refined my mesh, set my boundary conditions as discussed previously but the error is still coming and my Courant number is still shooting up like anything..... i don't know what to do.i will be tell step by step procedure that i did, 1) generated mesh using ICEM--->converted to .msh formate for Ansys fluent. 2) Used conversion option of OpenFoam and converted to foam mesh. 3) Edited my "p , U conditions" -->edited timeStep in "controlDict 0.0001" 4.)Run IcoFoam solver to solve. 5.)the same error after running some iterations. Do i need to have a "setField" file to define pressure conditions inside the domain if required how to do that since i have defined 3 patches only inlet outlet and wall i case across this file searching in tutorials. I am attaching the pics of my mesh statics. mesh.jpg |
||
February 8, 2013, 08:52 |
|
#18 |
Senior Member
|
Hi!
Just upload your case or give a link (you can put it on the Googl drive e.g.)
__________________
Best regards, Dr. Alexander VAKHRUSHEV Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics" Simulation and Modelling of Metallurgical Processes Department of Metallurgy University of Leoben http://smmp.unileoben.ac.at |
|
February 8, 2013, 08:54 |
|
#19 |
Senior Member
|
One quick advice: you can start from potentialFoam solution to improve your initial conditions.
__________________
Best regards, Dr. Alexander VAKHRUSHEV Christian Doppler Laboratory for "Metallurgical Applications of Magnetohydrodynamics" Simulation and Modelling of Metallurgical Processes Department of Metallurgy University of Leoben http://smmp.unileoben.ac.at |
|
February 8, 2013, 09:53 |
case file on googleDOC
|
#20 | |
Senior Member
Himanshu Sharma
Join Date: Jul 2012
Posts: 101
Rep Power: 13 |
Quote:
this is my case link at google Drive. Last edited by himanshu28; February 9, 2013 at 00:34. |
||
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
mass flow in is not equal to mass flow out | saii | CFX | 12 | March 19, 2018 05:21 |
An error has occurred in cfx5solve: | volo87 | CFX | 5 | June 14, 2013 17:44 |
CG, BICGSTAB(2) : problem with matrix operation and boundary conditions | moomba | Main CFD Forum | 2 | February 17, 2010 03:37 |
Problem with Boundary conditions | Mahiboobswamulu | Main CFD Forum | 10 | August 26, 2003 13:24 |
boundary conditions problem | reinaldo kuhn | Phoenics | 1 | March 27, 2003 11:46 |